KR101631274B1 - Method and apparatus for encoding/decoding mode information - Google Patents

Method and apparatus for encoding/decoding mode information Download PDF

Info

Publication number
KR101631274B1
KR101631274B1 KR1020090128343A KR20090128343A KR101631274B1 KR 101631274 B1 KR101631274 B1 KR 101631274B1 KR 1020090128343 A KR1020090128343 A KR 1020090128343A KR 20090128343 A KR20090128343 A KR 20090128343A KR 101631274 B1 KR101631274 B1 KR 101631274B1
Authority
KR
South Korea
Prior art keywords
mode
information
encoding
current block
block
Prior art date
Application number
KR1020090128343A
Other languages
Korean (ko)
Other versions
KR20110011499A (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 삼성전자주식회사
Publication of KR20110011499A publication Critical patent/KR20110011499A/en
Application granted granted Critical
Publication of KR101631274B1 publication Critical patent/KR101631274B1/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/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • 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/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • 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/174Methods 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 slice, e.g. a line of blocks or a group of blocks
    • 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/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/184Methods 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 bits, e.g. of the compressed video stream
    • 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
    • H04N19/625Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using discrete cosine transform [DCT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/24Systems for the transmission of television signals using pulse code modulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

현재 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드에 따라 부호화되었는지 판단하고, 판단 결과에 기초해 선택적으로 모드 정보를 복호화하는 계층적인 모드 정보 복호화 방법 및 장치, 그에 대응되는 모드 정보 부호화 방법 및 장치가 개시된다.A method and apparatus for hierarchical mode information decoding that determines whether a current block is coded according to the same encoding mode as a plurality of consecutive previous blocks and selectively decodes mode information based on the determination result, a mode information encoding method and apparatus corresponding thereto Lt; / RTI >

모드, 정보, 부호화, 복호화, 계층적 Mode, information, encoding, decoding, hierarchical

Description

모드 정보를 부호화, 복호화하는 방법 및 장치{Method and apparatus for encoding/decoding mode information}[0001] The present invention relates to a method and an apparatus for encoding / decoding mode information,

본 발명은 모드 정보를 부호화, 복호화하는 방법 및 장치에 관한 것으로 보다 상세히는 복수의 모드에 따라 부호화되는 영상의 모드 정보를 부호화, 복호화하는 방법 및 장치에 관한 것이다. The present invention relates to a method and apparatus for encoding and decoding mode information, and more particularly, to a method and apparatus for encoding and decoding mode information of an image encoded according to a plurality of modes.

무선 네트워크 기술이 발전하면서, 무선 네트워크를 통한 디바이스 사이의 상호 연결이 이슈가 되고 있다. 많은 기업이 무선 네트워크를 통한 디바이스 사이의 상호 연결 기술을 확보하기 위해 노력하고 있다. 특히 최근에는 HDMI(High Definition Multimedia Interface)를 대체할 비압축 HD 상호 연결 기술인 WiHD (Wireless HD) 표준화가 진행되고 있다. WiHD에 따르면 TV, 홈시어터, DVD 플레이어, 블루레이 플레이어, 캠코더 등과 다양한 디바이스이 무선 네트워크를 통해 상호 연결된다.As wireless network technologies evolve, interconnection between devices over wireless networks is becoming an issue. Many companies are making efforts to secure interconnection technology between devices over wireless networks. Recently, WiHD (Wireless HD) standardization, which is an uncompressed HD interconnect technology to replace HDMI (High Definition Multimedia Interface), is under way. According to WiHD, TVs, home theater, DVD players, Blu-ray players, camcorders and other devices are interconnected via wireless networks.

본 발명이 해결하고자 하는 기술적 과제는 복수의 모드에 따라 부호화되는 영상의 모드 정보를 부호화, 복호화하는 방법 및 장치를 제공하는데 있고, 상기 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공하는데 있다.SUMMARY OF THE INVENTION The present invention provides a method and apparatus for encoding and decoding mode information of an image encoded according to a plurality of modes, and a computer readable recording medium having recorded thereon a program for executing the method .

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 모드 정보 복호화 방법은 소정의 부호화 모드의 반복 횟수에 대한 정보에 기초해 현재 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드에 따라 부호화되었는지 판단하는 단계; 상기 판단 결과, 동일한 것으로 판단되면, 상기 복수의 블록의 복호화 모드와 동일하게 상기 현재 블록의 복호화 모드를 결정하는 단계; 및 상기 판단 결과, 동일하지 않은 것으로 판단되면, 상기 현재 블록이 제1 모드에 따라 부호화되었는지 나타내는 제1 정보 및 상기 현재 블록이 다른 모드들 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 파싱하여 상기 현재 블록의 복호화 모드를 결정하는 단계를 포함하고, 상기 제1 모드는 상기 제1 블록이 상기 제1 블록에 인접한 이전에 부호화된 제2 블록과 동일하여 상기 제1 모드에 따라 부호화되었음을 나타내는 정보를 상기 제1 블록의 픽셀 값 대신에 부호화하는 모드인 것을 특징으로 한다.According to an aspect of the present invention, there is provided a method for decoding mode information, the method comprising the steps of: determining whether a current block is coded according to the same encoding mode as a plurality of consecutive previous blocks based on information on a repetition number of a predetermined encoding mode ; Determining a decoding mode of the current block in the same manner as the decoding modes of the plurality of blocks if it is determined to be the same; And parsing second information indicating whether the current block is coded according to the first mode and second mode indicating whether the current block is coded according to a mode among the other modes, And determining a decoding mode of the current block, wherein the first mode includes information indicating that the first block is the same as the previously encoded second block adjacent to the first block and is encoded according to the first mode And encoding is performed instead of the pixel value of the first block.

본 발명의 또 다른 실시예에 따르면, 상기 제1 정보 및 상기 제2 정보를 파싱하여 상기 현재 블록의 복호화에 이용될 모드를 결정하는 단계는 상기 제1 정보를 파싱하는 단계; 상기 제1 정보의 파싱 결과, 상기 현재 블록이 제1 모드에 따라 부호화되지 않은 것으로 판단되면, 상기 현재 블록이 제2 모드 및 제3 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 파싱하는 단계; 및 상기 제1 정보 및 제2 정보 중 적어도 하나의 복호화 결과에 기초해 상기 현재 블록의 복호화 모드를 결정하는 단계를 포함한다.According to another embodiment of the present invention, the step of parsing the first information and the second information to determine a mode to be used for decoding the current block includes: parsing the first information; Parsing second information indicating whether the current block is encoded according to a mode of the second mode or a third mode if it is determined that the current block is not encoded according to the first mode as a result of the parsing of the first information, ; And determining a decoding mode of the current block based on decoding result of at least one of the first information and the second information.

본 발명의 또 다른 실시예에 따르면, 상기 제2 모드는 상기 제1 블록의 픽셀 값들을 이산 코사인 변환하고, 이산 코사인 결과 생성된 계수들을 최상위 비트로부터 최하위 비트까지의 복수의 비트 플레인(bit plane)으로 나누어 비트 플레인 단위로 부호화하는 모드인 것을 특징으로 한다.According to another embodiment of the present invention, the second mode performs a discrete cosine transform on the pixel values of the first block, and outputs the coefficients generated as the discrete cosine to a plurality of bit planes from the most significant bit to the least significant bit, And coding is performed in units of bit planes.

본 발명의 또 다른 실시예에 따르면, 상기 제3 모드는 상기 제1 블록의 픽셀 값들을 최상위 비트로부터 최하위 비트까지의 복수의 비트 플레인으로 나누어 비트 플레인 단위로 부호화하는 모드인 것을 특징으로 한다.According to another embodiment of the present invention, the third mode is a mode of dividing the pixel values of the first block into a plurality of bit planes from the most significant bit to the least significant bit, and encoding the pixel values in units of bit planes.

본 발명의 또 다른 실시예에 따르면, 상기 소정 부호화 모드의 반복 횟수에 대한 정보는 연속된 두 개의 블록에 대해 동일한 부호화 모드가 반복되면, 부호화 모드가 동일한 세 번째 이후의 블록들에 대해 상기 제1 정보 및 상기 제2 정보를 대신해 파싱되는 정보인 것을 특징으로 한다.According to another embodiment of the present invention, when the same encoding mode is repeated for two consecutive blocks, the information on the number of repetitions of the predetermined encoding mode is set such that, for the third and subsequent blocks having the same encoding mode, And information that is parsed in place of the second information.

본 발명의 또 다른 실시예에 따르면, 상기 소정 부호화 모드의 반복 횟수에 대한 정보는 상기 현재 블록의 부호화에 이용될 수 있는 복수의 부호화 모드 각각에 대한 반복 횟수에 대한 정보 중 적어도 하나를 포함한다.According to another embodiment of the present invention, the information on the number of repetitions of the predetermined encoding mode includes at least one of information on repetition times for each of the plurality of encoding modes that can be used for encoding the current block.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 모드 정보를 복호화하는 방법은 현재 블록의 부호화 모드를 결정하는 단계; 상기 결정된 현재 블록의 부호화 모드가 연속된 복수의 이전 블록의 부호화 모드와 동일한지 판단하는 단계; 상기 판단 결과, 동일한 것으로 판단되면, 상기 현재 블록의 부호화 모드에 대한 정보 대신에 상기 동일한 부호화 모드의 반복 횟수에 대한 정보를 부호화하는 단계; 및 상기 판단 결과, 동일하지 않은 것으로 판단되면, 상기 현재 블록이 제1 모드에 따라 부호화되었는지 나타내는 제1 정보 및 상기 현재 블록이 다른 모드들 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 부호화하는 단계를 포함하고, 상기 제1 모드는 상기 제1 블록이 상기 제1 블록에 인접한 이전에 부호화된 제2 블록과 동일하여 상기 제1 모드에 따라 부호화되었음을 나타내는 정보를 상기 제1 블록의 픽셀 값 대신에 부호화하는 모드인 것을 특징으로 한다.According to an aspect of the present invention, there is provided a method of decoding mode information, including: determining a coding mode of a current block; Determining whether a coding mode of the determined current block is the same as a coding mode of a plurality of consecutive previous blocks; Encoding the information on the number of repetitions of the same encoding mode instead of information on the encoding mode of the current block if it is determined to be the same as the determination result; And encoding the first information indicating whether the current block is coded according to the first mode and the second information indicating whether the current block is coded according to which mode among the other modes, Wherein the first mode includes information indicating that the first block is encoded in accordance with the first mode, which is the same as the previously encoded second block adjacent to the first block, instead of the pixel value of the first block Encoding mode.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 모드 정보를 복호화하는 장치는 소정의 부호화 모드의 반복 횟수에 대한 정보에 기초해 현재 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드에 따라 부호화되었는지 판단하는 런판단부; 및 상기 판단 결과, 동일한 것으로 판단되면, 상기 복수의 블록의 복호화 모드와 동일하게 상기 현재 블록의 복호화 모드를 결정하고, 상기 판단 결과, 동일하지 않은 것으로 판단되면, 상기 현재 블록이 제1 모드에 따라 부호화되었는지 나타내는 제1 정보 및 상기 현재 블록이 다른 모드들 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보에 기초해 상기 현재 블록의 복호화 모드를 결정하는 모드 결정부를 포함하고, 상기 제1 모드는 상기 제1 블록이 상기 제1 블록에 인접한 이전에 부호화된 제2 블록과 동일하여 상기 제1 모드에 따라 부호화되었음을 나타내는 정보를 상기 제1 블록의 픽셀 값 대신에 부호화하는 모드인 것을 특징 으로 한다.According to an aspect of the present invention, there is provided an apparatus for decoding mode information, the apparatus comprising: a decoding unit configured to decode mode information according to an encoding mode of a current block, An execution determiner for determining whether the encoded data is coded; And determining a decoding mode of the current block in the same manner as the decode mode of the plurality of blocks if it is determined to be the same as a result of the determination, And a mode determiner for determining a decoding mode of the current block based on first information indicating whether the current block is coded and second information indicating a mode in which the current block is coded according to another mode, One block is encoded in place of the pixel value of the first block, the information indicating that the block is encoded according to the first mode, which is the same as the previously encoded second block adjacent to the first block.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 모드 정보를 부호화하는 장치는 결정된 현재 블록의 부호화 모드가 연속된 복수의 이전 블록의 부호화 모드와 동일한지 판단하는 런판단부; 상기 판단 결과, 동일한 것으로 판단되면, 상기 현재 블록의 부호화 모드에 대한 정보 대신에 상기 동일한 부호화 모드의 반복 횟수에 대한 정보를 부호화하는 런부호화부; 및 상기 판단 결과, 동일하지 않은 것으로 판단되면, 상기 현재 블록이 제1 모드에 따라 부호화되었는지 나타내는 제1 정보 부호화부; 및 상기 현재 블록이 다른 모드들 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 부호화하는 제2 정보 부호화부를 포함하고, 상기 제1 모드는 상기 제1 블록이 상기 제1 블록에 인접한 이전에 부호화된 제2 블록과 동일하여 상기 제1 모드에 따라 부호화되었음을 나타내는 정보를 상기 제1 블록의 픽셀 값 대신에 부호화하는 모드인 것을 특징으로 한다.According to an aspect of the present invention, there is provided an apparatus for encoding mode information, the apparatus including: a run determining unit for determining whether a current encoding mode of a current block is identical to a plurality of consecutive encoding modes of a previous block; A puncturing unit that encodes the information on the number of repetitions of the same encoding mode instead of the information on the encoding mode of the current block, And a first information encoding unit for indicating whether the current block is coded according to a first mode if it is determined that the current block is not the same as a result of the determination; And a second information encoding unit encoding second information indicating whether the current block is encoded according to which mode among the other modes, wherein the first mode is a mode in which the first block is a previously encoded The second mode is a mode for encoding information in accordance with the first mode instead of the pixel value of the first block.

상기 기술적 과제를 해결하기 위해 본 발명은 상기 모드 정보 부호화 방법 및 모드 정보 복호화 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공한다.According to another aspect of the present invention, there is provided a computer-readable recording medium storing a program for executing the mode information encoding method and the mode information decoding method.

이하에서는 도면을 참조하여 본 발명의 실시예들을 상세히 설명한다. Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치를 도시한다. 1 illustrates an image encoding apparatus according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 일 실시예에 따른 영상 부호화 장치(100)는 모드 결정부(110), 부호화부(120) 및 모드 정보 부호화부(130)를 포함한다. Referring to FIG. 1, an image encoding apparatus 100 according to an embodiment of the present invention includes a mode determination unit 110, an encoding unit 120, and a mode information encoding unit 130.

모드 결정부(110)는 현재 블록의 부호화에 이용되는 모드를 결정한다. 무선 네트워크를 통한 디바이스들의 상효 연결에 대한 기술들은 무선 네트워크를 통해 HD 이상의 고화질 콘텐트를 송수신하는 것을 목적으로 하고 있다. 다만, 다양한 디바이스 사이의 상호 연결이 가능하게하기 위해 적은 메모리와 낮은 복잡도에 포커스를 맞추어 표준화가 진행 중이다. 따라서, 영상의 부호화에 있어서도 최대한 낮은 복잡도를 추구하고 있는 바, MPEG-1, MPEG-2, MPEG-4 H.264/MPEG-4 AVC(Advanced Video coding)와 같은 종래 기술에 따른 영상 부호화 방법과 달리 압축률을 높이기 위한 복잡한 기법들을 이용하지 않는다. The mode determination unit 110 determines a mode used for encoding the current block. Technologies for effective connection of devices over a wireless network are intended to transmit and receive high definition content over HD over a wireless network. However, standardization is under way with focus on low memory and low complexity to enable interconnection between various devices. Accordingly, the present invention is directed to a video encoding method according to the related art such as MPEG-1, MPEG-2 and MPEG-4 H.264 / MPEG-4 AVC (Advanced Video Coding) It does not use complicated techniques for increasing the compression ratio.

그러나, 영상의 픽셀 값들을 전혀 압축하지 않고 전송하는 것은 높은 전송율의 무선 네트워크를 요구하게 되므로, 이 또한 다양한 디바이스 사이의 상호 연결을 방해하는 요소가 될 수 있다. 따라서, 후술하는 스킵 모드(skip mode), 내추럴 모드(natural mode) 및 그래픽 모드(graphic mode)의 세 가지 모드를 이용하여 영상을 부호화, 복호화함으로써 낮은 복잡도와 적정 수준의 압축률을 보장할 수 있다.However, since transmitting pixel values of an image without compressing at all requires a wireless network with a high data rate, this can also be an obstacle to interconnection between various devices. Accordingly, it is possible to guarantee low complexity and an appropriate level of compression rate by encoding and decoding an image using three modes of a skip mode, a natural mode and a graphic mode, which will be described later.

스킵 모드는 현재 블록이 현재 블록에 인접한 블록과 동일한지 여부에 기초해 현재 블록을 부호화하는 모드이고, 내추럴 모드는 현재 블록이 자연 영상에 대한 블록이면, 이산 코사인 변환(DCT : discrete cosine transform) 및 비트 플레인(bit plane) 분할을 이용해 현재 블록을 부호화하는 모드이다. 그래픽 모드는 현재 블록이 문자(text)와 같이 인위적(artificially)으로 생성된 영상에 대한 블록이면, 비트 플레인 분할을 이용해 현재 블록을 부호화하는 모드이다. 스킵 모 드, 내추럴 모드 및 그래픽 모드에 대해서는 도 3 내지 5를 참조하여 상세히 후술한다. The skip mode is a mode for encoding a current block based on whether the current block is the same as a block adjacent to the current block. The natural mode is a mode for discrete cosine transform (DCT) and a discrete cosine transform And a current block is encoded using a bit plane division. The graphics mode is a mode for encoding a current block using bit plane division if the current block is a block for an artificially generated image such as text. The skip mode, the natural mode and the graphic mode will be described later in detail with reference to Figs. 3 to 5.

모드 결정부(110)는 전술한 복수의 모드 중 어떤 모드에 따라 현재 블록을 부호화할지 결정한다. 우선, 모드 결정부(110)는 현재 블록이 현재 블록에 인접한 이전에 부호화된 현재 슬라이스의 다른 블록과 동일 또는 유사한지 판단한다. 현재 블록의 픽셀 값과 현재 슬라이스의 이전에 부호화된 블록의 픽셀 값을 비교하여 동일 또는 유사한지 판단한다. 도 2 및 3을 참조하여 상세히 설명한다. The mode determination unit 110 determines which mode among the plurality of modes described above to code the current block. First, the mode determination unit 110 determines whether the current block is the same as or similar to another block of a current slice that has been coded adjacent to the current block. The pixel value of the current block is compared with the pixel value of the previously coded block of the current slice to determine whether they are the same or similar. Will be described in detail with reference to Figs. 2 and 3. Fig.

도 2는 본 발명의 일 실시예에 따른 영상 부호화 단위를 도시한다.FIG. 2 illustrates an image encoding unit according to an embodiment of the present invention.

도 2를 참조하면, 영상 부호화 장치(100)는 슬라이스 단위, 블록 단위, 비트 플레인 단위로 영상을 분할하여 부호화한다. 현재 픽처(210)를 복수의 슬라이스(212 내지 216)로 분할한다. 세로가 N인 복수의 슬라이스(212 내지 216)로 분할할 수 있다. 그런 다음 각각의 슬라이스를 NxN 크기의 블록으로 분할한다. 블록은 다시 최상위 비트에 대한 비트 플레인으로부터 최하위 비트에 대한 비트 플레인까지 복수의 비트 플레인으로 분할될 수 있다. 만약 블록의 픽셀 값 또는 이산 코사인 계수가 M 비트로 표현된다면, 전제 M 개의 비트 플레인으로 분할될 수 있다.Referring to FIG. 2, the image encoding apparatus 100 encodes an image in slice units, block units, and bit plane units. The current picture 210 is divided into a plurality of slices 212 to 216. [ Can be divided into a plurality of slices (212 to 216) having a length of N. Then, each slice is divided into NxN sized blocks. The block may again be divided into a plurality of bitplanes from the bitplane for the most significant bit to the bitplane for the least significant bit. If the pixel value of the block or the discrete cosine coefficient is represented by M bits, it can be divided into M bit planes.

도 3은 본 발명의 일 실시예에 따른 스킵 모드를 판단하는 방법을 설명하기 위한 도면이다.3 is a diagram for explaining a method of determining a skip mode according to an embodiment of the present invention.

도 3을 참조하면, 도 2와 관련하여 전술한 바와 같이 현재 픽처(310)는 복수의 슬라이스로 분할될 수 있다. 영상 부호화 장치(100)가 도 3에 도시된 슬라이스(320)를 부호화하는 경우를 예로 들어 설명한다. Referring to FIG. 3, the current picture 310 may be divided into a plurality of slices, as described above with respect to FIG. The case where the image coding apparatus 100 codes the slice 320 shown in FIG. 3 will be described as an example.

현재 슬라이스(320)의 현재 블록(322)을 부호화하기 위해 영상 부호화 장치(100)의 모드 결정부(110)는 현재 블록(322)이 현재 블록에 인접한 이전에 부호화된 블록(324)과 동일 또는 유사한지 판단한다. 부호화되는 현재 블록(322)은 공간적으로 인접한 이전에 부호화된 블록과 동일 또는 유사한 확률이 높다. 따라서, 모드 결정부(110)는 현재 블록(322)이 좌측에 인접한 이전에 부호화된 블록(324)과 동일 또는 유사하면, 현재 블록(322)의 부호화 모드를 스킵 모드로 결정할 수 있다. 인접한 블록(324)은 현재 블록의 부호화 바로 직전에 부호화된 블록일 수 있다.The mode determination unit 110 of the image encoding apparatus 100 determines whether or not the current block 322 is the same as the previously encoded block 324 adjacent to the current block to encode the current block 322 of the current slice 320, . The current block 322 to be coded is likely to be the same or similar to a previously coded block that is spatially adjacent. Accordingly, if the current block 322 is the same as or similar to the previously encoded block 324 adjacent to the current block 322, the mode determination unit 110 can determine the encoding mode of the current block 322 as a skip mode. The adjacent block 324 may be a block immediately before the encoding of the current block.

현재 블록(322)과 인접한 블록(324)이 동일 또는 유사한지 여부에 대한 판단은 다양한 방법으로 수행될 수 있다. 현재 블록(322)과 인접한 블록(324) 사이의 SAD(Sum of Absolute Difference), MSE(Mean Square Error), SNR(Signal to Noise Ratio), 최대 차이(Max Difference) 등에 기초해 코스트(cost)를 계산하고, 계산된 코스트에 따라 현재 블록(322)과 인접한 블록(324)이 동일 또는 유사한지 판단한다. SAD, MSE, 최대 차이가 '0'에 가까울수록 현재 블록(322)과 인접한 블록(324)이 동일 또는 유사한 것으로 판단할 수 있다.The determination as to whether the current block 322 and the adjacent block 324 are the same or similar can be performed in various ways. A cost is calculated based on a Sum of Absolute Difference (SAD), a Mean Square Error (MSE), a Signal to Noise Ratio (SNR), a Max Difference, etc. between the current block 322 and the adjacent block 324 And determines whether the current block 322 and the adjacent block 324 are the same or similar according to the calculated cost. As the SAD, MSE, maximum difference approaches '0', it can be determined that the current block 322 and the adjacent block 324 are the same or similar.

모드 결정부(110)는 현재 블록(322)과 인접한 블록(324)이 완전히 동일한 경우에만 현재 블록(322)의 부호화 모드를 스킵 모드로 결정할 수도 있고, 현재 블록(322)과 유사한 경우에도 현재 블록(322)의 부호화 모드를 스킵 모드로 결정할 수도 있다. 다시 말해, 전술한 SAD, MSE, 최대 차이 등이 '0'일 때만, 현재 블록(322)의 부호화 모드를 스킵 모드로 결정할 수도 있고, 소정 임계 값 이하인 때 에도 현재 블록(322)과 인접한 블록(324)이 유사한 것으로 판단하여 현재 블록(322)의 부호화 모드를 스킵 모드로 결정할 수도 있다.The mode determination unit 110 may determine the encoding mode of the current block 322 to be a skip mode only when the current block 322 and the neighboring block 324 are completely the same, (322) may be determined as a skip mode. In other words, the coding mode of the current block 322 may be determined to be a skip mode only when the above-described SAD, MSE, maximum difference, etc. is '0' 324) is determined to be similar, and the encoding mode of the current block 322 may be determined as a skip mode.

모드 결정부(110)가 현재 블록과 인접한 블록의 동일 또는 유사 여부를 판단한 결과, 현재 블록의 부호화 모드를 스킵 모드가 아닌 것으로 결정하면, 모드 결정부(110)는 다시 현재 블록을 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화할지 판단한다. 현재 블록이 자연 연상, 즉 인위적으로 생성되지 않은 영상에 대한 블록인 것으로 판단되면 현재 블록의 부호화 모드를 내추럴 모드로 결정하고, 반대로 현재 블록이 텍스트, 컴퓨터 그래픽과 같이 인위적으로 생성된 영상에 대한 블록인 것으로 판단되면, 현재 블록의 부호화 모드를 그래픽 모드로 결정한다. If the mode determination unit 110 determines that the current block is not the skip mode as a result of determining whether or not the current block is the same as or similar to the current block, the mode determination unit 110 again determines the current block as a natural mode, Mode to be encoded according to which mode. If it is determined that the current block is a natural associative block, that is, a block for an artificially generated image, the encoding mode of the current block is determined to be the natural mode. On the contrary, if the current block is a block for artificially generated images such as text, The encoding mode of the current block is determined to be the graphic mode.

현재 블록을 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화할지 판단하는 기준에는 제한이 없으며, 다양한 알고리즘을 이용해 현재 블록이 인위적으로 생성된 영상에 대한 블록인지 판단할 수 있다. 예를 들어, 인위적인 영상은 특정 영역에 동일한 픽셀 값들이 분포할 확률이 높으므로, 현재 블록의 픽셀 값들을 비교하여 동일한 픽셀 값들이 소정 개수 이상이면, 인위적으로 생성된 영상에 대한 블록인 것으로 판단할 수 있다.There is no limitation on the criterion for determining whether to encode the current block according to the mode of the natural mode or the graphic mode, and it is possible to determine whether the current block is a block for an artificially generated image by using various algorithms. For example, since an artificial image has a high probability that the same pixel values are distributed in a specific region, the pixel values of the current block are compared, and if the same pixel values are equal to or more than a predetermined number, it is determined that the block is an artificially generated image .

또한, 본 발명의 또 다른 실시예에 따르면, 현재 블록을 내추럴 모드 및 그래픽 모드에 따라 각각 부호화한 다음, 부호화 결과를 RD 코스트(Rate Distortion Cost)에 기초해 내추럴 모드 또는 그래픽 모드를 현재 블록의 부호화 모드로 결정할 수 있는데, 이에 대한 상세한 설명은 도 7을 참조하여 후술한다. According to another embodiment of the present invention, the current block is encoded according to the natural mode and the graphic mode, and the encoding result is encoded in the natural mode or the graphics mode on the basis of the RD cost (Rate Distortion Cost) Mode, which will be described later in detail with reference to FIG.

모드 결정부(110)에서 현재 블록의 부호화에 이용될 모드를 결정하면, 부호화부는 모드 결정부(110)에서 결정된 부호화 모드에 따라 현재 블록을 부호화한다. When the mode determination unit 110 determines a mode to be used for encoding the current block, the encoding unit encodes the current block according to the encoding mode determined by the mode determination unit 110.

현재 블록이 이전에 부호화된 인접한 블록과 동일 또는 유사하여 현재 블록의 부호화 모드가 스킵 모드로 결정되었다면, 현재 블록의 픽셀 값 대신에 현재 블록이 스킵 모드로 부호화되었음을 나타내는 정보를 부호화한다. 현재 블록이 스킵 모드에 따라 부호화되었음을 나타내는 플래그 정보를 현재 블록의 픽셀 값 대신에 부호화할 수 있다. If the current block is the same as or similar to the previously encoded neighboring block and the encoding mode of the current block is determined to be the skip mode, information indicating that the current block is encoded in the skip mode is encoded instead of the pixel value of the current block. Flag information indicating that the current block is coded according to the skip mode can be encoded in place of the pixel value of the current block.

현재 블록의 픽셀 값을 직접 부호화하는 대신에 1 비트의 플래그 정보로 현재 블록을 부호화할 수 있으므로, 영상의 압축률이 향상된다. 또한, 스킵 모드에 따라 현재 블록을 부호화하기 위해 현재 블록 바로 이전에 부호화된 블록만 참조하므로, 낮은 복잡도로 스킵 모드를 구현할 수 있다.The current block can be encoded with 1-bit flag information instead of directly encoding the pixel value of the current block, thereby improving the compression rate of the image. In addition, since only a block immediately before the current block is coded to encode the current block according to the skip mode, a skip mode can be implemented with a low complexity.

현재 블록이 이전에 부호화된 인접한 블록과 동일 또는 유사하지 않아 현재 블록의 부호화 모드가 스킵 모드가 아닌 것으로 결정되었다면, 부호화부(130)는 현재 블록을 내추럴 모드 또는 그래픽 모드에 따라 부호화한다. 모드 결정부(110)가 현재 블록의 부호화 모드를 내추럴 모드로 결정하였다면, 내추럴 모드에 따라 현재 블록을 부호화하고, 모드 결정부(110)가 현재 블록의 부호화 모드를 그래픽 모드로 결정하였다면, 그래픽 모드에 따라 부호화한다. 내추럴 모드 및 그래픽 모드에 따른 부호화 방법은 도 4 내지 6을 참조하여 상세히 설명한다. If it is determined that the current block is not the skip mode because the current block is not the same as or similar to the previously encoded neighboring block, the encoding unit 130 encodes the current block according to the natural mode or the graphic mode. If the mode determining unit 110 determines that the encoding mode of the current block is the natural mode, the current block is encoded according to the natural mode. If the mode determining unit 110 determines the encoding mode of the current block as the graphic mode, . The encoding method according to the natural mode and the graphic mode will be described in detail with reference to FIGS.

도 4는 본 발명의 또 다른 실시예에 따른 영상 부호화 장치를 도시한다. FIG. 4 illustrates an image encoding apparatus according to another embodiment of the present invention.

도 4를 참조하면, 본 발명의 일 실시예에 따른 영상 부호화 장치(400)는 모 드 결정부(410), 내추럴 모드 부호화부(420), 그래픽 모드 부호화부(430) 및 모드 정보 부호화부(440)를 포함한다. 모드 결정부(410)는 도 1의 모드 결정부(110)에 대응되며, 내추럴 모드 부호화부(420), 그래픽 모드 부호화부(430) 및 모드 정보 부호화부(440)는 도 1의 부호화부(120)에 대응된다. 4, an image encoding apparatus 400 according to an exemplary embodiment of the present invention includes a mode determination unit 410, a natural mode encoding unit 420, a graphic mode encoding unit 430, and a mode information encoding unit 440). 1, and the natural mode encoding unit 420, the graphic mode encoding unit 430, and the mode information encoding unit 440 correspond to the encoding unit (not shown) of FIG. 1 120).

모드 결정부(410)는 현재 블록의 부호화 모드를 결정한다. 스킵 모드, 내추럴 모드 및 그래픽 모드 중 현재 블록의 부호화에 이용되는 모드를 결정할 수 있다.The mode determination unit 410 determines the encoding mode of the current block. A mode to be used for encoding the current block, among the skip mode, the natural mode and the graphic mode, can be determined.

모드 결정부(410)가 현재 블록의 부호화 모드를 스킵 모드로 결정하면, 모드 정보 부호화부(440)는 현재 블록이 스킵 모드에 따라 부호화되었음을 나타내는 정보를 부호화한다. 현재 블록의 픽셀 값 대신에 현재 블록이 스킵 모드에 따라 부호화되었음을 나타내는 플래그 정보를 부호화할 수 있다.When the mode determination unit 410 determines the encoding mode of the current block as a skip mode, the mode information encoding unit 440 encodes information indicating that the current block has been encoded according to the skip mode. It is possible to encode flag information indicating that the current block is coded according to the skip mode instead of the pixel value of the current block.

모드 결정부(410)가 현재 블록의 부호화 모드를 내추럴 모드로 결정하면, 내추럴 모드 부호화부(420)는 현재 블록을 내추럴 모드에 따라 부호화한다. 현재 블록을 이산 코사인 변환하여 이산 코사인 계수들을 생성하고, 생성된 계수들을 복수의 비트 플레인으로 분리하여 각각의 비트 플레인을 비트 플레인 기반(bit plane basis) 부호화 방법을 이용해 부호화한다. 도 5를 참조하여 상세히 설명한다. If the mode determination unit 410 determines that the encoding mode of the current block is the natural mode, the natural mode encoding unit 420 encodes the current block according to the natural mode. The current block is subjected to discrete cosine transform to generate discrete cosine coefficients, the generated coefficients are divided into a plurality of bit planes, and each bit plane is encoded using a bit plane basis encoding method. Will be described in detail with reference to FIG.

도 5는 본 발명의 일 실시예에 따른 내추럴 모드 부호화부를 도시한다. FIG. 5 illustrates a natural mode encoding unit according to an embodiment of the present invention.

도 5를 참조하면, 본 발명의 일 실시예에 다른 내추럴 모드 부호화부(420)는 변환부(510), 비트 플레인 선택부(520) 및 비트 플레인 부호화부(530)를 포함한다.5, the natural mode encoding unit 420 according to an embodiment of the present invention includes a transform unit 510, a bit plane selector 520, and a bit plane encoder 530.

변환부(510)는 현재 블록을 이산 코사인 변환(DCT : discrete cosine transform)하여 이산 코사인 변환 계수들을 생성한다. 이산 코사인 변환은 픽셀 도메인의 픽셀 값을 주파수 도메인으로 변환하여 주파수 도메인의 계수들을 생성하는 방법의 예시일 뿐이며, 다른 방법이 현재 블록의 변환에 이용될 수 있음은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 사람은 쉽게 알 수 있다. The transform unit 510 generates discrete cosine transform coefficients by performing a discrete cosine transform (DCT) on the current block. Discrete cosine transform is merely an example of a method of transforming a pixel value of a pixel domain into a frequency domain to generate coefficients of the frequency domain and it is possible that another method can be used for transforming a current block. A person with knowledge can easily know.

변환부(510)가 현재 블록을 이산 코사인 변환하여 생성된 이산 코사인 변환 계수들 중 DC(direct current) 성분의 계수에 대한 비트열은 그대로 비트스트림에 삽입된다. 그러나, AC(alternating current) 성분의 계수들은 비트 플레인 기반 부호화 방법에 따라 부호화된다. The bit stream for the DC (direct current) coefficient of the discrete cosine transform coefficients generated by the transform unit 510 by discrete cosine transforming the current block is inserted into the bit stream as it is. However, the coefficients of the AC (alternating current) component are encoded according to the bit plane-based encoding method.

비트 플레인 선택부(520)는 AC 성분의 계수들을 복수의 비트 플레인으로 분리한다. AC 성분의 계수들의 최상위 비트들로 구성된 비트 플레인으로부터 최하위 비트들로 구성된 비트 플레인까지 복수의 비트플레인으로 분리한다. M 비트의 AC 성분의 계수들을 비트 단위로 분리하여 M 개의 비트 플레인을 생성한다. AC 성분의 계수들에 대한 비트열들의 최상위 비트들로 구성된 제1 비트 플레인을 분리하고, 최상위 비트 다음의 비트들로 구성된 제2 비트 플레인을 분리한다. 비트 플레인의 분리를 최하위 비트까지 반복하여 M 개의 비트 플레인을 분리한다.The bit plane selector 520 separates the coefficients of the AC component into a plurality of bit planes. From the bit plane constituted by the most significant bits of the coefficients of the AC component to the bit plane constituted by the least significant bits. And separates the coefficients of the AC component of M bits in bit units to generate M bit planes. Separates a first bit plane composed of the most significant bits of the bit strings for coefficients of the AC component, and separates a second bit plane composed of bits following the most significant bit. The separation of the bit planes is repeated up to the least significant bit to separate the M bit planes.

비트 플레인 선택부(520)에서 복수의 비트 플레인을 분리하면, 비트 플레인 부호화부(530)는 생성된 복수의 비트 플레인 각각을 비트 플레인 기반 부호화 방법을 이용해 부호화한다. 비트 플레인을 부호화하는 방법에는 제한이 없으며, 종래 기술에 따른 모든 비트 플레인 기반 부호화 방법에 본 발명에 이용될 수 있다. 또한, 본 발명의 일 실시예에 따르면, 비트 마스크(bit mask)를 이용해 각각의 비트 플레인을 부호화할 수 있다. 각각의 비트 플레인에서 의미있는 비트가 존재하는 영역을 비트 마스트를 이용해 설정하고, 설정된 영역에 대해서만 비트 플레인 기반 부호화를 수행할 수 있다.When the bit plane selector 520 separates a plurality of bit planes, the bit plane encoder 530 encodes each of the plurality of generated bit planes using a bit plane based encoding method. There is no limitation on the method of coding the bit plane, and the present invention can be applied to all the bit plane based coding methods according to the related art. Also, according to an embodiment of the present invention, each bit plane can be encoded using a bit mask. It is possible to set a region where significant bits exist in each bit plane using a bit mast and to perform bit plane based encoding only on the set region.

이상, 도 5와 관련하여 DC 계수 및 AC 계수를 분리하여 별도로 부호화하는 방법에 대해서 설명하였다. 그러나, 도 5와 관련하여 전술한 부호화 방법은 예시적인 것이며, 이산 코사인 변환 및 비트 플레인 기반 부호화 방법을 이용하여 현재 블록을 이용하는 모든 방법이 내추럴 모드 부호화부(420)에 적용될 수 있다. As described above, the method of separating the DC coefficients and the AC coefficients separately and coding them separately has been described with reference to FIG. However, the encoding method described above with reference to FIG. 5 is an exemplary one, and all the methods using the current block using the discrete cosine transform and the bit plane based encoding method can be applied to the natural mode encoding unit 420. FIG.

다시 도 4를 참조하면, 모드 결정부(410)가 현재 블록의 부호화 모드를 그래픽 모드로 결정하면, 그래픽 모드 부호화부(430)는 현재 블록을 그래픽 모드에 따라 부호화한다. 현재 블록의 픽셀 값을 복수의 비트 플레인으로 분리하여 각각의 비트 플레인을 비트 플레인 기반(bit plane basis) 부호화 방법을 이용해 부호화한다. 도 6a를 참조하여 상세히 설명한다. Referring again to FIG. 4, when the mode determination unit 410 determines the encoding mode of the current block to be a graphic mode, the graphic mode encoding unit 430 encodes the current block according to the graphic mode. The pixel values of the current block are divided into a plurality of bit planes and each bit plane is encoded using a bit plane basis coding method. Will be described in detail with reference to FIG. 6A.

도 6a는 본 발명의 일 실시예에 따른 그래픽 모드 부호화부를 도시한다. 6A illustrates a graphic mode encoding unit according to an embodiment of the present invention.

도 6a를 참조하면, 본 발명의 일 실시예에 따른 그래픽 모드 부호화부(430)는 비트 플레인 선택부(610) 및 비트 플레인 부호화부(620)를 포함한다.Referring to FIG. 6A, the graphic mode encoding unit 430 includes a bit plane selecting unit 610 and a bit plane encoding unit 620.

비트 플레인 선택부(610)는 현재 블록의 픽셀 값들을 복수의 비트 플레인으로 분리한다. P 비트의 픽셀 값들을 비트 단위로 분리하여 픽셀 값의 최상위 비트들로 구성된 비트 플레인으로부터 픽셀 값의 최하위 비트들로 구성된 비트 플레인까지 P 개의 비트 플레인을 생성한다. The bit plane selector 610 separates the pixel values of the current block into a plurality of bit planes. Separates pixel values of P bits in a bit unit, and generates P bit planes from a bit plane constituted by the most significant bits of the pixel value to a bit plane constituted by the least significant bits of the pixel value.

비트 플레인 선택부(610)에서 복수의 비트 플레인을 분리하면, 비트 플레인 부호화부(620)는 생성된 복수의 비트 플레인 각각을 비트 플레인 기반 부호화 방법을 이용해 부호화한다.When the bit plane selecting unit 610 separates a plurality of bit planes, the bit plane encoding unit 620 encodes each of the generated plurality of bit planes using a bit plane based encoding method.

도 6b는 본 발명의 일 실시예에 따른 비트 플레인 기반 부호화 방법을 도시한다.FIG. 6B illustrates a bit plane-based encoding method according to an embodiment of the present invention.

도 6b를 참조하면, 비트 플레인 부호화부(620)는 동일한 비트 값들을 그룹화하여 비트 플레인을 부호화한다. 블록의 크기가 4x4이고, 픽셀 값이 8 비트인 경우를 예로 들어 설명하면, 비트 플레인 부호화부(620)는 먼저 최상위 비트인 비트 7에 대한 비트 플레인을 도 6b에 도시된 바와 같이 부호화한다. 비트 7에 대한 비트 플레인을 ‘0’의 그룹(631)과 ‘1’의 그룹들(632)로 나누어 부호화한다. 최상위 비트 7에 대한 비트 플레인이 동일한 비트를 포함하고 있지 않으므로, 먼저 ‘1’을 부호화하고, 분할 형태를 나타내기 위해 ‘000111111111000’을 부호화한다. Referring to FIG. 6B, the bit plane encoding unit 620 encodes bit planes by grouping the same bit values. For example, when the size of the block is 4x4 and the pixel value is 8 bits, the bit plane encoding unit 620 first encodes the bit plane for bit 7, which is the most significant bit, as shown in FIG. 6B. The bit plane for bit 7 is divided into a group 631 of '0' and a group 632 of '1'. Since the bit plane for the most significant bit 7 does not contain the same bit, '1' is encoded first and '000111111111000' is encoded to indicate the division type.

비트 6에 대한 비트 플레인은 비트 7의 그룹들에 기초해 각각의 그룹들이 다시 서로 다른 비트 값에 의해 분할되는지 여부에 따라 부호화된다. 도 6b에 도시된 실시예에서는 ‘0’의 그룹(631) 및 ‘1’의 그룹(632)이 모두 분할되지 않았으므로, ‘0’의 그룹(631)이 분할되지 않았음을 나타내는 ‘00’과 ‘1’의 그룹(632)이 분할되지 않았음을 나타내는 ‘01’을 부호화한다.The bit planes for bit 6 are encoded according to whether groups are again divided by different bit values based on the groups of bits 7. 00 'indicating that the group 631 of' 0 'is not divided because the group 631 of' 0 'and the group 632 of' 1 'are not all divided in the embodiment shown in FIG. 6B, And '01' indicating that the group 632 of '1' is not divided.

비트 5에 대한 비트 플레인에서는 비트 6에 대한 비트 플레인의 ‘1’의 그룹(632)이 두 개의 그룹(634 및 644)로 분할된다. 따라서, ‘0’의 그룹이 분할되지 않았음을 나타내는 ‘00’을 먼저 부호화하고, ‘1’의 그룹(632)이 분할되었음 을 나타내기 위해 ‘1’을 부호화한다. 그런 다음, ‘1’의 그룹(632)이 분할된 형태를 나타내기 위해 ‘0000011111’을 부호화한다. In the bit plane for bit 5, the group 632 of bit planes '1' for bit 6 is divided into two groups 634 and 644. Accordingly, '00' indicating that the group of '0' is not divided is encoded first, and '1' is encoded to indicate that the group 632 of '1' is divided. Then, '0000011111' is encoded to indicate the divided form of the group 632 of '1'.

비트 4에 대한 비트 플레인에서는 ‘1’의 그룹(632)이 분할되어 생성된 그룹들(633 및 634) 중 ‘0’의 그룹(633)이 다시 한번 분할된다. 따라서, ‘0’의 그룹(631)이 분할되지 않았음을 나타내기 위해 ‘00’을 먼저 부호화한다. 또한, ‘1’의 그룹(632)이 분할되어 생성된 그룹들(633 및 634) 중 ‘0’의 그룹(633)이 분할되었음을 나타내기 위해 ‘1’을 부호화하고, ‘0’의 그룹(633)의 분할 형태를 나타내기 위해 ‘11100’이 부호화된다. 그런 다음, ‘1’의 그룹(634)은 분할되지 않았음을 나타내기 위해 ‘01’이 부호화된다.In the bit plane for bit 4, the group 632 of '1' is divided and the group 633 of '0' among the generated groups 633 and 634 is once again divided. Accordingly, '00' is encoded first to indicate that the group 631 of '0' is not divided. 1 'is encoded to indicate that the group 633 of' 0 'among the groups 633 and 634 generated by dividing the group 632 of' 1 'is divided, and the group of' 0 ' ≪ RTI ID = 0.0 > 633). ≪ / RTI > Then, '01' is encoded to indicate that the group 634 of '1' is not segmented.

비트 플레인 부호화부(620)는 전술한 동일한 비트 값을 그룹화하여 생성된 비트 그룹에 기초한 비트 플레인 기반 부호화 방법을 최하위 비트까지 반복 적용하여 각각의 비트 플레인을 부호화한다. The bit-plane coding unit 620 codes each bit-plane by repeatedly applying the bit-plane-based coding method based on the bit group generated by grouping the same bit values to the least significant bit.

다시, 도 4를 참조하면, 모드 정보 부호화부(440)는 현재 블록의 부호화에 이용된 모드에 대한 정보를 부호화한다. 모드 결정부(410)가 현재 블록의 부호화 모드를 스킵 모드로 결정하면, 모드 정보 부호화부(440)는 현재 블록이 스킵 모드에 따라 부호화되었음을 나타내는 정보를 부호화한다. 전술한 바와 같이 현재 블록이 스킵 모드에 따라 부호화되었음을 나타내는 플래그 정보를 부호화할 수 있다.Referring again to FIG. 4, the mode information encoding unit 440 encodes information on the mode used for encoding the current block. When the mode determination unit 410 determines the encoding mode of the current block as a skip mode, the mode information encoding unit 440 encodes information indicating that the current block has been encoded according to the skip mode. The flag information indicating that the current block has been coded according to the skip mode can be encoded as described above.

모드 결정부(410)가 현재 블록의 부호화 모드를 내추럴 모드 또는 그래픽 모드로 결정하면, 모드 정보 부호화부(440)는 현재 블록이 내추럴 모드에 따라 부호화되었음을 나타내는 정보 또는 그래픽 모드에 따라 부호화되었음을 나타내는 정보 를 부호화할 수 있다. 스킵 모드와 마찬가지로 현재 블록이 내추럴 모드 또는 그래픽 모드에 따라 부호화되었음을 나타내는 플래그 정보를 부호화할 수 있다. If the mode determination unit 410 determines the encoding mode of the current block to be a natural mode or a graphic mode, the mode information encoding unit 440 outputs information indicating that the current block has been encoded according to the natural mode, or information indicating that the current block has been encoded according to the graphic mode Can be encoded. Like the skip mode, flag information indicating that the current block has been encoded according to the natural mode or the graphic mode can be encoded.

또한, 모드 정보 부호화부(440)는 현재 블록을 포함하는 현재 슬라이스가 스킵 모드 또는 내추럴 모드 또는 그래픽 모드에 따라 부호화된 블록을 포함하는지 나타내는 정보를 부호화할 수 있다. 현재 슬라이스에 대한 플래그 정보이므로, 현재 슬라이스의 구문 요소(syntax element)로서 플래그 정보를 부호화할 수 있다.In addition, the mode information encoding unit 440 may encode information indicating whether the current slice including the current block includes a block encoded according to a skip mode, a natural mode, or a graphics mode. Since it is the flag information for the current slice, the flag information can be encoded as a syntax element of the current slice.

도 7은 본 발명의 또 다른 실시예에 따른 영상 부호화 장치를 도시한다. FIG. 7 illustrates an image encoding apparatus according to another embodiment of the present invention.

도 7을 참조하면, 본 발명의 또 다른 실시예에 따른 영상 부호화 장치(700)는 스킵 모드 결정부(710), 내추럴 모드 부호화부(720), 그래픽 모드 부호화부(730), 모드 결정부(740) 및 모드 정보 부호화부(750)를 포함한다. 7, an image encoding apparatus 700 according to another embodiment of the present invention includes a skip mode determination unit 710, a natural mode encoding unit 720, a graphics mode encoding unit 730, a mode determination unit 730, 740 and a mode information encoding unit 750.

스킵 모드 결정부(710) 및 모드 결정부(740)는 도 1의 모드 결정부(110)에 대응되고, 내추럴 모드 부호화부(720), 그래픽 모드 부호화부(730) 및 모드 정보 부호화부(750)는 도 1의 부호화부(120)에 대응된다. The skip mode determination unit 710 and the mode determination unit 740 correspond to the mode determination unit 110 of FIG. 1 and include a natural mode encoding unit 720, a graphic mode encoding unit 730, and a mode information encoding unit 750 Corresponds to the encoding unit 120 in Fig.

스킵 모드 결정부(710)는 현재 블록을 스킵 모드에 따라 부호화할지 여부를 결정한다. 현재 블록의 픽셀 값과 현재 블록에 인접한 이전에 부호화된 블록의 픽셀 값을 비교하여 현재 블록과 인접한 블록이 동일 또는 유사한 것으로 판단되면 현재 블록의 부호화 모드를 스킵 모드로 결정한다.The skip mode determination unit 710 determines whether to encode the current block according to the skip mode. The pixel value of the current block is compared with the pixel value of the previously encoded block adjacent to the current block. If it is determined that the current block and the adjacent block are the same or similar, the encoding mode of the current block is determined as a skip mode.

스킵 모드 결정부(710)가 현재 블록의 부호화 모드를 스킵 모드로 결정하면, 모드 정보 부호화부(750)는 현재 블록이 스킵 모드에 따라 부호화되었음을 나타내는 정보를 부호화한다. 전술한 바와 같이 현재 블록이 스킵 모드에 따라 부호화되 었음을 나타내는 플래그 정보가 모드 정보 부호화부(750)에서 부호화될 수 있다. When the skip mode determination unit 710 determines the skip mode of the current block, the mode information encoding unit 750 encodes information indicating that the current block has been encoded according to the skip mode. Flag information indicating that the current block has been coded according to the skip mode can be encoded by the mode information encoding unit 750 as described above.

스킵 모드 결정부(710)가 현재 블록의 부호화 모드를 스킵 모드가 아닌 것으로 결정하면, 내추럴 모드 부호화부(720) 및 그래픽 모드 부호화부(730)는 현재 블록을 내추럴 모드 및 그래픽 모드에 따라 각각 부호화한다. If the skip mode determining unit 710 determines that the current block encoding mode is not the skip mode, the natural mode encoding unit 720 and the graphic mode encoding unit 730 encode the current block in the natural mode and the graphic mode, respectively do.

모드 결정부(740)는 내추럴 모드 부호화부(720)의 부호화 결과와 그래픽 모드 부호화부(730)의 부호화 결과를 비교하여 현재 블록을 내추럴 모드에 따라 부호화할지 그래픽 모드에 따라 부호화할지 결정한다. The mode determination unit 740 compares the encoding result of the natural mode encoding unit 720 with the encoding result of the graphic mode encoding unit 730 to determine whether to encode the current block according to the natural mode or the graphic mode.

내추럴 모드에 따라 부호화한 결과와 그래픽 모드에 따라 부호화한 결과에 기초해 RD 코스트를 계산한다. 코스트 = (Rate) + (lambda)x(distortion)에 따라 코스트를 계산하여 코스트가 작은 모드를 현재 블록의 부호화 모드로 결정한다. 'lambda'는 실시예에 따라 다르게 설정될 수 있으며, 'lambda'를 조정하여 내추럴 모드 및 그래픽 모드의 선택 비율을 변경할 수 있다.The RD cost is calculated based on the results coded according to the natural mode and the results coded according to the graphic mode. The cost is calculated according to the cost = (Rate) + (lambda) x (distortion), and the mode with a small cost is determined as the encoding mode of the current block. 'lambda' can be set differently according to the embodiment, and the selection ratio of the natural mode and the graphic mode can be changed by adjusting 'lambda'.

모드 결정부(740)에서 현재 블록의 부호화 모드를 내추럴 모드 또는 그래픽 모드로 결정하면, 모드 정보 부호화부(750)는 결정된 부호화 모드에 대한 정보를 부호화한다. 현재 블록이 내추럴 모드에 따라 부호화되었음을 나타내는 플래그 정보 또는 그래픽 모드에 따라 부호화되었음을 나타내는 플래그 정보를 부호화할 수 있다.When the mode determination unit 740 determines the encoding mode of the current block to be the natural mode or the graphic mode, the mode information encoding unit 750 encodes information on the determined encoding mode. Flag information indicating that the current block is coded according to the natural mode or flag information indicating that the current block is coded according to the graphic mode can be encoded.

또한, 전술한 바와 같이 모드 정보 부호화부(750)는 각각의 블록에 대한 모드 정보 이외에 현재 슬라이스가 스킵 모드 또는 내추럴 모드 또는 그래픽 모드에 따라 부호화된 블록을 포함하는지 나타내는 정보를 부호화할 수 있다.In addition, as described above, the mode information encoding unit 750 may encode information indicating whether the current slice includes a block coded according to a skip mode, a natural mode, or a graphics mode, in addition to the mode information of each block.

도 8은 본 발명의 일 실시예에 따른 영상 복호화 장치를 도시한다. FIG. 8 illustrates an image decoding apparatus according to an embodiment of the present invention.

도 8을 참조하면, 본 발명의 일 실시예에 따른 영상 복호화 장치(800)는 모드 정보 복호화부(810) 및 복호화부(820)를 포함한다.Referring to FIG. 8, an apparatus 800 for decoding an image according to an embodiment of the present invention includes a mode information decoding unit 810 and a decoding unit 820.

모드 정보 복호화부(810)는 비트스트림에 포함되어 있는 현재 블록의 부호화 모드에 대한 정보를 복호화한다. 비트스트림을 파싱하여 현재 블록이 스킵 모드, 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 정보를 복호화한다. The mode information decoding unit 810 decodes information on the encoding mode of the current block included in the bitstream. And parses the bitstream to decode information indicating whether the current block is coded according to a skip mode, a natural mode, or a graphic mode.

복호화부(820)는 모드 정보 복호화부(810)에서 복호화된 모드 정보에 기초해 현재 블록을 복호화한다. 모드 정보의 복호화 결과 현재 블록이 스킵 모드에 따라 부호화되었다면, 현재 블록과 동일 또는 유사한 블록 즉, 인접한 이전에 복호화된 블록에 기초해 현재 블록을 복원한다. 인접한 블록은 현재 블록의 복호화 바로 이전에 복호화된 블록일 수 있다. 현재 블록이 내추럴 모드 또는 그래픽 모드에 따라 부호화되었다면, 도 5 및 도 6a와 관련하여 전술한 부호화 방법들을 역으로 수행하여 현재 블록을 복원한다. 도 9를 참조하여 상세히 설명한다. The decoding unit 820 decodes the current block based on the mode information decoded by the mode information decoding unit 810. [ If the current block is coded according to the skip mode as the decoding result of the mode information, the current block is restored based on the same or similar block as the current block, i.e., based on the adjacent previously decoded block. Adjacent blocks may be blocks decoded immediately prior to decoding of the current block. If the current block is coded according to the natural mode or the graphic mode, the encoding methods described above with reference to FIGS. 5 and 6A are reversed to restore the current block. Will be described in detail with reference to FIG.

도 9는 본 발명의 또 다른 실시예에 따른 영상 복호화 장치를 도시한다. FIG. 9 illustrates an image decoding apparatus according to another embodiment of the present invention.

도 9를 참조하면 본 발명의 또 다른 실시예에 따른 영상 복호화 장치(900)는 모드 정보 복호화부(910), 스킵 모드 복호화부(920), 내추럴 모드 복호화부(930) 및 그래픽 모드 복호화부(940)를 포함한다. 모드 정보 복호화부(910)는 도 8의 모드 정보 복호화부(810)에 대응되고, 스킵 모드 복호화부(920), 내추럴 모드 복호화부(930) 및 그래픽 모드 복호화부(940)는 도 8의 복호화부(820)에 대응된다. 9, the image decoding apparatus 900 according to another exemplary embodiment of the present invention includes a mode information decoding unit 910, a skip mode decoding unit 920, a natural mode decoding unit 930, and a graphics mode decoding unit 940). 8, the skip mode decoding unit 920, the natural mode decoding unit 930, and the graphic mode decoding unit 940 correspond to the mode information decoding unit 810 of FIG. 8, and the mode information decoding unit 910 corresponds to the mode information decoding unit 810 of FIG. 820 < / RTI >

모드 정보 복호화부(910)는 도 9의 모드 정보 복호화부(810)와 같이 비트스트림에 포함되어 있는 현재 블록의 부호화 모드에 대한 정보를 복호화한다.The mode information decoding unit 910 decodes the information on the encoding mode of the current block included in the bitstream like the mode information decoding unit 810 of FIG.

스킵 모드 복호화부(920)는 복호화된 모드 정보가 스킵 모드에 대한 정보이면, 현재 블록을 스킵 모드에 따라 복호화한다. 현재 블록이 인접한 이전에 복호화된 블록에 기초해 현재 블록을 복원한다. 인접한 블록을 그대로 복사함으로써 현재 블록을 복원할 수 있다.If the decoded mode information is information on the skip mode, the skip mode decoding unit 920 decodes the current block according to the skip mode. And restores the current block based on the previously decoded block adjacent to the current block. The current block can be restored by copying the adjacent block as it is.

내추럴 모드 복호화부(930)는 복호화된 모드 정보가 내추럴 모드에 대한 정보이면, 현재 블록을 내추럴 모드에 따라 복호화한다. 내추럴 모드 복호화부(930)는 우선 비트스트림에 포함되어 있는 이산 코사인 계수 중 DC 성분의 계수를 파싱한다. 그런 다음, 비트 플레인 기반 복호화 방법을 이용해 이산 코사인 계수 중 AC 성분의 계수들에 대한 복수의 비트 플레인을 복원한다. 복원된 복수의 비트 플레인을 결합하여 AC 성분의 계수들이 복원되면, 복원된 AC 성분의 계수들 및 파싱된 DC 성분의 계수에 기초해 역이산 코사인 변환을 수행한다. 역이산 코사인 변환의 결과 현재 블록이 복원된다.If the decoded mode information is information on the natural mode, the natural mode decoding unit 930 decodes the current block according to the natural mode. The natural mode decoding unit 930 first parses the coefficient of the DC component among the discrete cosine coefficients included in the bitstream. Then, the bit plane-based decoding method is used to recover a plurality of bit planes for the coefficients of the AC component among the discrete cosine coefficients. When the reconstructed plurality of bit planes are combined and the coefficients of the AC component are reconstructed, the inverse discrete cosine transform is performed based on the coefficients of the reconstructed AC component and the coefficients of the parsed DC component. As a result of the inverse discrete cosine transform, the current block is restored.

그래픽 모드 복호화부(940)는 복호화된 모드 정보가 그래픽 모드에 대한 정보이면, 현재 블록을 그래픽 모드에 따라 복호화한다. 비트 플레인 기반 복호화 방법을 이용해 현재 블록의 픽셀 값들에 대한 복수의 비트 플레인을 복원한다. 그런 다음, 복원된 복수의 비트 플레인을 결합하여 현재 블록의 픽셀 값들을 복원한다. If the decoded mode information is information on the graphics mode, the graphics mode decoding unit 940 decodes the current block according to the graphics mode. And reconstructs a plurality of bit planes for the pixel values of the current block using the bit plane-based decoding method. Then, the reconstructed bit planes are combined to reconstruct the pixel values of the current block.

도 10은 본 발명의 일 실시예에 따른 영상 부호화 방법을 설명하기 위한 흐 름도이다.FIG. 10 is a flow chart for explaining an image encoding method according to an embodiment of the present invention.

도 10을 참조하면, 단계 1010에서 본 발명의 일 실시예에 따른 영상 부호화 장치(100 또는 400)는 현재 블록을 스킵 모드에 따라 부호화할지 결정한다. 스킵 모드는 현재 블록과 인접한 블록이 동일 또는 유사하면, 현재 블록의 픽셀 값 대신에 현재 블록이 스킵 모드에 따라 부호화되었음을 나타내는 정보를 부호화하는 모드이다.Referring to FIG. 10, in step 1010, the image encoding apparatus 100 or 400 according to an embodiment of the present invention determines whether to encode a current block according to a skip mode. The skip mode is a mode for coding information indicating that the current block is coded according to the skip mode instead of the pixel value of the current block if the current block and the neighboring blocks are the same or similar.

단계 1010에서 현재 블록의 부호화 모드가 스킵 모드가 아닌 것으로 결정되면, 단계 1020에서 영상 부호화 장치(100 또는 400)는 현재 블록을 내추럴 모드에 따라 부호화할지 그래픽 모드에 따라 부호화할지 결정한다. 도 1의 모드 결정부(110)와 관련하여 전술한 바와 같이 현재 블록이 자연 영상에 대한 블록인지 인위적으로 생성된 영상에 대한 블록인지 판단하여 현재 블록을 내추럴 모드에 따라 부호화할지 그래픽 모드에 따라 부호화할지 결정한다. If it is determined in step 1010 that the encoding mode of the current block is not the skip mode, the image encoding apparatus 100 or 400 determines in step 1020 whether to encode the current block according to the natural mode or the graphic mode. 1, it is determined whether the current block is a block for a natural image or an artificially generated image, and the current block is coded according to a natural mode or coded according to a graphic mode .

단계 1030에서 영상 부호화 장치(100 또는 400)는 현재 블록을 내추럴 모드에 따라 부호화한다. 단계 1020의 판단 결과, 현재 블록이 자연 영상에 대한 블록으로 판단되면, 현재 블록을 내추럴 모드에 따라 부호화한다. 내추럴 모드의 부호화 방법은 도 5와 관련하여 전술하였다. In operation 1030, the image encoding apparatus 100 or 400 encodes the current block according to the natural mode. If it is determined in step 1020 that the current block is a block for the natural image, the current block is encoded according to the natural mode. The encoding method of the natural mode has been described above with reference to FIG.

단계 1040에서 영상 부호화 장치(100 또는 400)는 현재 블록을 그래픽 모드에 따라 부호화한다. 단계 1020의 판단 결과, 현재 블록이 인위적으로 생성된 영상에 대한 블록으로 판단되면, 현재 블록을 그래픽 모드에 따라 부호화한다. 그래픽 모드의 부호화 방법은 도 6a와 관련하여 전술하였다. In operation 1040, the image encoding apparatus 100 or 400 encodes the current block according to the graphic mode. If it is determined in step 1020 that the current block is a block for artificially generated video, the current block is encoded according to the graphics mode. The coding method of the graphic mode has been described above with reference to FIG. 6A.

단계 1050에서 영상 부호화 장치(100 또는 400)는 현재 블록의 부호화에 이용된 부호화 모드에 대한 정보를 부호화한다. 단계 1010에서 현재 블록의 부호화 모드가 스킵 모드로 결정되었으면, 현재 블록의 픽셀 값 대신에 현재 블록이 스킵 모드에 따라 부호화되었음을 나타내는 정보를 부호화한다. 또한, 단계 1010에서 현재 블록의 부호화 모드가 스킵 모드가 아닌 것으로 결정되어 단계 1030 내지 1040에서 내추럴 모드 또는 그래픽 모드에 따라 현재 블록을 부호화되었으면, 현재 블록이 내추럴 모드에 따라 부호화되었음을 나타내는 정보 또는 그래픽 모드에 따라 부호화되었음을 나타내는 정보를 부호화한다. In operation 1050, the image encoding apparatus 100 or 400 encodes information on the encoding mode used for encoding the current block. If the coding mode of the current block is determined to be a skip mode in step 1010, information indicating that the current block is coded according to the skip mode is encoded instead of the pixel value of the current block. If it is determined in step 1010 that the encoding mode of the current block is not skip mode and the current block is coded according to the natural mode or the graphic mode in steps 1030 to 1040, information indicating that the current block is encoded according to the natural mode, And encodes the information indicating that it has been coded according to the following equation.

도 11은 본 발명의 또 다른 실시예에 따른 영상 부호화 방법을 설명하기 위한 흐름도이다. 11 is a flowchart illustrating an image encoding method according to another embodiment of the present invention.

도 11을 참조하면, 단계 1110에서 본 발명의 일 실시예에 따른 영상 부호화 장치(100 또는 700)는 현재 블록을 스킵 모드에 따라 부호화할지 결정한다. 단계 1110은 도 10의 단계 1010에 대응된다. Referring to FIG. 11, in step 1110, the image encoding apparatus 100 or 700 according to an embodiment of the present invention determines whether to encode a current block according to a skip mode. Step 1110 corresponds to step 1010 in FIG.

단계 1110에서 현재 블록의 부호화 모드가 스킵 모드가 아닌 것으로 결정되면, 단계 1120 및 1130에서 영상 부호화 장치(100 또는 700)는 현재 블록을 내추럴 모드 및 그래픽 모드에 따라 각각 부호화한다. If it is determined in step 1110 that the encoding mode of the current block is not the skip mode, in steps 1120 and 1130, the image encoding apparatus 100 or 700 encodes the current block according to the natural mode and the graphic mode, respectively.

단계 1140에서 영상 부호화 장치(100 또는 700)는 현재 블록을 내추럴 모드에 따라 부호화한 결과 및 그래픽 모드에 따라 부호화한 결과를 비교하여 현재 블록의 부호화 모드를 결정한다. 내추럴 모드에 따라 부호화한 결과 및 그래픽 모드에 따라 부호화한 결과에 기초해 RD 코스트(Rate Distortion Cost)를 계산한다. 코스트 계산 결과 코스트가 작은 모드를 현재 블록의 부호화 모드로 결정한다. In operation 1140, the image encoding apparatus 100 or 700 determines the encoding mode of the current block by comparing the current block encoding result according to the natural mode and the encoding result according to the graphic mode. (Rate Distortion Cost) is calculated based on the result of encoding in accordance with the natural mode and the result of encoding in accordance with the graphic mode. The cost calculation result is determined to be the encoding mode of the current block.

단계 1150에서 영상 부호화 장치(100 또는 700)는 현재 블록의 부호화에 이용된 부호화 모드에 대한 정보를 부호화한다. 단계 1110에서 현재 블록의 부호화 모드가 스킵 모드로 결정되었으면, 현재 블록의 픽셀 값 대신에 현재 블록이 스킵 모드에 따라 부호화되었음을 나타내는 정보를 부호화한다. 또한, 단계 1110에서 현재 블록의 부호화 모드가 스킵 모드가 아닌 것으로 결정되어, 단계 1140에서 현재 블록의 부호화 모드가 내추럴 모드 또는 그래픽 모드로 결정되었으면, 현재 블록이 내추럴 모드에 따라 부호화되었음을 나타내는 정보 또는 그래픽 모드에 따라 부호화되었음을 나타내는 정보를 부호화한다. In operation 1150, the image encoding apparatus 100 or 700 encodes the information on the encoding mode used for encoding the current block. If the coding mode of the current block is determined to be the skip mode in step 1110, information indicating that the current block is coded according to the skip mode is encoded instead of the pixel value of the current block. If it is determined in step 1110 that the encoding mode of the current block is not a skip mode and the encoding mode of the current block is determined to be the natural mode or the graphic mode in step 1140, information indicating that the current block is encoded according to the natural mode, And encodes the information indicating that it is coded according to the mode.

도 12는 본 발명의 일 실시예에 따른 영상 복호화 방법을 설명하기 위한 흐름도이다.12 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

도 12를 참조하면, 단계 1210에서 본 발명의 일 실시예에 따른 영상 복호화 장치(800 또는 900)는 비트스트림에 포함되어 있는 현재 블록의 부호화 모드에 대한 정보를 복호화한다. 비트스트림을 파싱하여 현재 블록이 스킵 모드, 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 부호화 모드에 대한 정보를 복호화한다.Referring to FIG. 12, in operation 1210, an apparatus 800 or 900 according to an embodiment of the present invention decodes information on a coding mode of a current block included in a bitstream. And parses the bit stream to decode the information on the encoding mode indicating which mode the current block is coded according to the skip mode, the natural mode, and the graphic mode.

단계 1220에서 영상 복호화 장치(800 또는 900)는 복호화된 모드 정보에 기초해 현재 블록을 복호화한다. 단계 1210에서 모드 정보의 복호화 결과 현재 블록이 스킵 모드에 따라 부호화되었다면, 현재 블록과 동일 또는 유사한 블록 즉, 인접한 이전에 복호화된 블록에 기초해 현재 블록을 복원한다. 현재 블록이 내추럴 모드 또는 그래픽 모드에 따라 부호화되었다면, 도 5 및 도 6a와 관련하여 전술한 부호화 방법들을 역으로 수행하여 현재 블록을 복원한다. In operation 1220, the image decoding apparatus 800 or 900 decodes the current block based on the decoded mode information. If the current block is coded according to the skip mode as a result of the decoding of the mode information in step 1210, the current block is restored based on the same or similar block as the current block, i.e., based on the adjacent previously decoded block. If the current block is coded according to the natural mode or the graphic mode, the encoding methods described above with reference to FIGS. 5 and 6A are reversed to restore the current block.

도 13은 본 발명의 일 실시예에 따른 모드 정보 부호화 장치를 도시한다. 도 13에 도시된 모드 정보 부호화 장치는 도 4의 모드 정보 부호화부(440) 및 도 7의 모드 정보 부호화부(750)에 대응된다.FIG. 13 illustrates a mode information encoding apparatus according to an embodiment of the present invention. The mode information encoding apparatus shown in FIG. 13 corresponds to the mode information encoding unit 440 of FIG. 4 and the mode information encoding unit 750 of FIG.

도 13을 참조하면, 본 발명의 일 실시예에 따른 모드 정보 부호화 장치(1300)는 런판단부(1310), 제1 정보 부호화부(1320), 제2 정보 부호화부(1330), 런부호화부(1340) 및 슬라이스 정보 부호화부(1350)를 포함한다. 13, a mode information encoding apparatus 1300 according to an embodiment of the present invention includes a run determination unit 1310, a first information encoding unit 1320, a second information encoding unit 1330, (1340) and a slice information encoder (1350).

런판단부(1310)는 현재 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드에 따라 부호화되었는지 판단한다. 부호화 모드는 현재 블록의 부호화에 이용되는 방법으로서, 전술한 스킵 모드, 내추럴 모드 및 그래픽 모드 중 하나일 수 있다. The run determination unit 1310 determines whether the current block is coded according to the same encoding mode as a plurality of previous previous blocks. The encoding mode is a method used for encoding the current block, and may be one of the skip mode, the natural mode and the graphic mode described above.

인접한 블록은 동일한 픽셀 값을 가질 확률이 높은 것은 물론, 부호화 모드도 동일할 확률이 높다. 이 경우 부호화 모드에 대한 정보를 각각의 블록에 대해 모두 부호화하지 않고, 동일한 부호화 모드가 반복된 횟수에 대한 정보만 부호화하면, 부호화의 압축률을 향상시킬 수 있다. 따라서, 런판단부(1310)는 현재 블록의 부호화 모드가 이전에 복호화된 복수의 블록들의 부호화 모드가 동일한지 판단한다. 본 발명의 일 실시예에 따르면, 현재 블록의 부호화 모드가 현재 블록 이전에 부호화된 두 개의 연속된 블록들의 부호화 모드와 동일한지 판단할 수 있다. Adjacent blocks have a high probability of having the same pixel value, and are also likely to have the same encoding mode. In this case, if the information on the encoding mode is not all encoded for each block but only the information on the number of times the same encoding mode is repeated is encoded, the compression rate of encoding can be improved. Accordingly, the run determination unit 1310 determines whether the encoding mode of the current block is identical to the encoding mode of a plurality of previously decoded blocks. According to an embodiment of the present invention, it can be determined whether the encoding mode of the current block is the same as the encoding mode of two consecutive blocks encoded before the current block.

본 발명에 따르면, 소정의 블록을 부호화하는데 이용되는 모드는 스킵 모드, 내추럴 모드 및 그래픽 모드 세 가지일 수 있으므로, 동일한 모드의 반복도 스킵 모두의 반복, 내추럴 모두의 반복 및 그래픽 모드의 반복 세 가지일 수 있다. 따라서, 런판단부(1310)는 스킵 모드의 반복 여부, 내추럴 모드의 반복 여부 및 그래픽 모드의 반복 여부에 대해 모두에 판단할 수 있다. According to the present invention, since the modes used for encoding a predetermined block may be three kinds of skip mode, natural mode, and graphic mode, it is also possible to repeat all of the skip, repeat all of the natural, Lt; / RTI > Accordingly, the run determination unit 1310 can determine whether the skip mode is repeated, whether the natural mode is repeated, and whether the graphic mode is repeated.

그러나, 본 발명의 일 실시예에 따르면, 런판단부(1310)는 특정 모드의 반복 여부만 판단할 수 있다. 예를 들어, 스킵 모드, 내추럴 모드 및 그래픽 모드 중에서 스킵 모드가 연속된 블록에 대해 반복적으로 부호화에 이용될 확률이 내추럴 모드 및 그래픽 모드에 비해 높으므로, 런판단부(1310)는 스킵 모드의 반복 여부에 대해서만 판단할 수도 있다. However, according to one embodiment of the present invention, the run determination unit 1310 can determine whether or not the specific mode is repeated. For example, since the probability that the skip mode, the natural mode, and the graphic mode are repeatedly used for the encoding for the consecutive blocks is higher than the natural mode and the graphic mode, the run determination unit 1310 determines that the skip mode It can be judged only whether it is.

또한, 두 가지 모드의 조합에 대해서만 반복 여부를 판단할 수 있는 바, 두 가지 모드의 조합은 스킵 모드-그래픽 모드, 스킵 모드-내추럴 모드 또는 내추럴 모드-그래픽 모드일 수 있다.The combination of the two modes can be a skip mode-graphic mode, a skip mode-natural mode, or a natural mode-graphic mode.

도 14는 본 발명의 일 실시예에 따른 부호화 모드의 반복을 설명하기 위한 도면이다. 14 is a diagram for explaining repetition of an encoding mode according to an embodiment of the present invention.

도 14를 참조하면, 현재 슬라이스의 세 번째 블록을 현재 블록(1410)이라 할 때, 현재 블록(1410)은 이전에 부호화된 복수의 블록들(1420 및 1430)과 동일한 스킵 모드로 부호화한다. 따라서, 런판단부(1310)는 현재 블록(1410)의 부호화 모드가 이전에 부호화된 복수의 블록들(1420 및 1430)의 부호화 모드와 동일한 것으로 판단할 수 있고, 반복 횟수는 '1'이 된다. 반복 횟수가 결정되면, 후술하는 런부호화부(1340)에서 현재 블록(1410)의 부호화 모드를 부호화하는 대신에 반복 횟수 '1'만 부호화하면 된다.Referring to FIG. 14, when the third block of the current slice is referred to as a current block 1410, the current block 1410 is coded in the same skip mode as the plurality of previously encoded blocks 1420 and 1430. Accordingly, the run determination unit 1310 can determine that the encoding mode of the current block 1410 is the same as the encoding mode of the previously encoded blocks 1420 and 1430, and the repetition number is '1' . When the number of repetition times is determined, only a repetition number '1' may be coded in place of the encoding mode of the current block 1410 in a later-described run encoding unit 1340.

그러나, 도 14에 도시된 바와 같이 네 번째 블록(1412)도 현재 블록(1410)과 동일한 그래픽 모드로 부호화되므로, 현재 블록(1410)에 대해 반복 횟수를 부호화하지 않는다. 동일한 부호화 모드가 언제까지 반복될지 현재 블록(1410) 이후의 블록들의 부호화 모드를 결정해야 알 수 있으므로, 현재 블록(1410)의 부호화 모드에 대한 정보를 부호화할 때, 런판단부(1410)는 반복 횟수만 '1' 증가시키고, 런부호화부(1340)는 반복 횟수를 바로 부호화하지 않는다. However, as shown in FIG. 14, the fourth block 1412 is also encoded in the same graphic mode as the current block 1410, so that the number of repetitions is not encoded for the current block 1410. It is necessary to determine the encoding mode of the blocks after the current block 1410 to determine how long the same encoding mode is repeated. Therefore, when encoding the information on the encoding mode of the current block 1410, the run determination unit 1410 And the run encoding unit 1340 does not directly encode the repetition times.

현재 슬라이스(1400)의 네 번째 블록(1412)도 그래픽 모드로 부호화되었으므로, 런판단부(1410)가 반복 횟수를 다시 '1' 증가시켜, 반복 횟수는 '2'가 된다. 그러나, 다섯 번째 블록(1414)의 부호화 모드는 이전 블록들의 부호화 모드와는 상이한 스킵 모드이므로, 다섯 번째 블록(1414)의 부호화 모드를 대신해 반복 횟수를 부호화할 수 없다. Since the fourth block 1412 of the current slice 1400 is also coded in the graphic mode, the run determining unit 1410 increases the number of iterations by '1' again, and the number of iterations becomes 2. However, since the encoding mode of the fifth block 1414 is a skip mode different from the encoding mode of the previous blocks, it is not possible to encode the repetition times instead of the encoding mode of the fifth block 1414. [

따라서, 런부호화부(1340)는 네 번째 블록까지의 반복 횟수인 '2'를 부호화하고, 다섯 번째 블록(1414)의 부호화 모드인 스킵 모드를 나타내기 위해 후술하는 제1 정보 및 제2 정보를 부호화한다.Accordingly, the run encoding unit 1340 encodes '2', which is the number of repetitions up to the fourth block, and stores the first information and second information, which will be described later, in order to indicate the skip mode, which is the encoding mode of the fifth block 1414 .

제1 정보 부호화부(1320)는 현재 블록이 스킵 모드에 따라 부호화되었는지 나타내는 제1 정보를 부호화한다. 제1 정보는 현재 블록이 스킵 모드에 따라 부호화되었는지 나타내는 플래그 정보일 수 있다. 예를 들어, 모드 결정부(110, 410 및 740) 및 스킵 모드 결정부(710)의 부호화 모드를 결정에 기초해 현재 블록이 스킵 모드에 따라 부호화되었다면, 플래그 정보를 '1'로 설정하고, 현재 블록이 스킵 모드에 따라 부호화되지 않았다면, 플래그 정보를 '0'으로 설정할 수 있다.The first information encoding unit 1320 encodes the first information indicating whether the current block is coded according to the skip mode. The first information may be flag information indicating whether the current block is coded according to the skip mode. For example, if the current block is coded according to the skip mode based on the determination of the encoding modes of the mode determination units 110, 410, and 740 and the skip mode determination unit 710, the flag information is set to '1' If the current block is not coded according to the skip mode, flag information can be set to '0'.

본 발명의 또 다른 실시예에 따르면, 제1 정보 부호화부(1320)는 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 여부에 기초해 선택적으로 제1 정보를 부호화할 수 있다. 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하지 않는다면, 현재 슬라이스의 모든 블록에 대해 스킵 모드에 대한 정보는 동일하다. 다시 말해, 현재 슬라이스의 모든 블록에 대해 스킵 모드에 따라 부호화되었는지 나타내는 플래그 정보는 모두 '0'이다. 따라서, 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하지 않는다면, 각각의 블록에 대해 제1 정보를 부호화할 필요가 없다. 다시 말해, 제1 정보 부호화부(1320)는 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는 경우에만, 각각의 블록에 대해 제1 정보를 부호화한다. According to another embodiment of the present invention, the first information encoding unit 1320 may selectively encode the first information based on whether or not the current slice includes a block encoded according to the skip mode. If the current slice does not include the coded block according to the skip mode, the information on the skip mode is the same for all blocks of the current slice. In other words, flag information indicating whether all blocks of the current slice are coded according to the skip mode is '0'. Therefore, if the current slice does not include a block encoded according to the skip mode, it is not necessary to encode the first information for each block. In other words, the first information encoding unit 1320 encodes the first information for each block only when the current slice includes the block encoded according to the skip mode.

또한, 본 발명의 또 다른 실시예에 따르면, 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는 경우에도 현재 슬라이스가 내추럴 모드 또는 그래픽 모드에 따라 부호화된 블록을 포함하지 않는다면, 현재 블록은 스킵 모드에 따라 부호화됨이 명백하다. 따라서, 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는 경우에도 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록 또는 그래픽 모드에 따라 부호화된 블록을 포함하는 경우만 제1 정보를 부호화할 수 있다.According to another embodiment of the present invention, even if the current slice includes a block coded according to the skip mode, if the current slice does not include a block encoded according to the natural mode or the graphics mode, Lt; / RTI > Therefore, even when the current slice includes a block encoded according to the skip mode, the first information can be encoded only when the current slice includes the block encoded according to the natural mode or the block encoded according to the graphic mode.

현재 블록이 스킵 모드에 따라 부호화되지 않은 것으로 판단되면, 제2 정보 부호화부(1330)는 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 부호화한다. 제1 정보는 내추럴 모드 및 그 래픽 모드에 대한 정보로서 내추럴 모드 및 그래픽 모드 중 현재 블록의 부호화에 이용된 모드를 특정하기 위한 플래그 정보일 수 있다. If it is determined that the current block is not coded according to the skip mode, the second information encoding unit 1330 encodes the second information indicating whether the current block is coded according to the natural mode or the graphic mode. The first information may be information on the natural mode and the graphics mode, and may be flag information for specifying a mode used for encoding the current block, of the natural mode and the graphic mode.

예를 들어, 현재 블록이 내추럴 모드에 따라 부호화되었다면, 플래그 정보를 '0'으로 설정하고, 현재 블록이 그래픽 모드에 따라 부호화되었다면, 플래그 정보를 '1'로 설정할 수 있다. 현재 블록이 스킵 모드에 따라 부호화되었으면, 제1 정보 부호화부(1310)에서 이미 스킵 모드에 대한 정보가 부호화되므로, 제2 정보 부호화부(1320)가 내추럴 모드 및 그래픽 모드에 대한 정보를 부호화할 필요가 없다. For example, if the current block is coded according to the natural mode, the flag information is set to '0', and if the current block is coded according to the graphic mode, the flag information can be set to '1'. If the current block is coded according to the skip mode, the information on the skip mode is already coded by the first information encoding unit 1310, so that the second information encoding unit 1320 needs to encode information on the natural mode and the graphic mode There is no.

현재 블록이 스킵 모드에 따라 부호화되었는지 여부에 따라 선택적으로 제2 모드(예를 들어, 내추럴 모드) 및 제3 모드(예를 들어, 그래픽 모드) 중 어떤 모드에 따라 부호화되었는지 나타내는 정보를 부호화하기 때문에 모드에 대한 정보를 부호화하는데 필요한 비트 수를 줄일 수 있다. Information indicating whether a current block is coded according to a skip mode or not is selectively encoded according to a mode of a second mode (e.g., a natural mode) and a third mode (e.g., a graphics mode) It is possible to reduce the number of bits necessary for encoding the information on the mode.

다시 말해, 호프먼 코드(Hoffman code)에 따라 모드에 대한 정보가 부호화가 되어 모드에 대한 정보를 보다 효율적으로 부호화할 수 있다. 예를 들어, 현재 블록이 스킵 모드에 따라 부호화되면, '1'의 한 개의 비트로 스킵 모드에 따라 부호화되었음을 나타내는 정보를 부호화할 수 있고, 현재 블록이 내추럴 모드에 따라 부호화되면, '00'의 두개의 비트로 내추럴 모드에 따라 부호화되었음을 나타내는 정보를 부호화할 수 있다. 또한, 현재 블록이 그래픽 모드에 따라 부호화되면, '01'의 두개의 비트로 그래픽 모드에 따라 부호화되었음을 나타내는 정보를 부호화할 수 있다. 내추럴 모드에 대한 정보와 그래픽 모드에 대한 정보에서 첫 번째 비트인 '0'은 제1 정보로서 현재 블록이 스킵 모드에 따라 부호화되지 않았음을 나타 내는 정보이고, 두 번째 비트인 '0' 및 '1'이 제2 정보로서 내추럴 모드와 그래픽 모드 중 어떤 모드에 따라 현재 블록이 부호화되는지 나타내는 정보이다.In other words, the mode information is encoded according to the Hoffman code, so that information on the mode can be encoded more efficiently. For example, if the current block is coded according to the skip mode, information indicating that the current block is coded according to the skip mode can be encoded with one bit of '1'. If the current block is coded according to the natural mode, The information indicating that the encoding has been performed in accordance with the natural mode can be encoded. In addition, if the current block is coded according to the graphic mode, information indicating that the current block is coded according to the graphic mode with two bits of '01' can be encoded. The first bit '0' in the information on the natural mode and the information on the graphic mode is information indicating that the current block is not coded according to the skip mode as first information, and the second bits' 0 'and' 1 'is information indicating whether the current block is coded according to the mode of the natural mode or the graphic mode as the second information.

또한, 제2 부호화부(1330)는 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록 및 그래픽 모드에 따라 부호화된 블록을 모두 포함하는지 여부에 따라 선택적으로 제2 정보를 부호화할 수 있다. In addition, the second encoder 1330 can selectively encode the second information according to whether the current slice includes all of the blocks encoded according to the natural mode and the blocks encoded according to the graphic mode.

제1 부호화부(1320)에서 현재 블록의 부호화 모드가 스킵 모드가 아닌 것으로 결정된 경우에만 제2 부호화부(1330)에서 제2 정보를 부호화한다. 그러므로, 현재 블록의 부호화 모드는 내추럴 모드 또는 그래픽 모드이다. The second encoder 1330 encodes the second information only when the first encoder 1320 determines that the encoding mode of the current block is not the skip mode. Therefore, the encoding mode of the current block is a natural mode or a graphic mode.

그런데, 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록만 포함한다면, 현재 블록은 명백히 내추럴 모드에 따라 부호화된 블록이다. 따라서, 제2 정보를 부호화하지 않아도 현재 블록의 부호화 모드가 내추럴 모드임을 복호화하는 측에서 알 수 있다. 현재 슬라이스가 그래픽 모드에 따라 부호화된 블록만 포함하는 경우에도 마찬가지이다. 제2 정부 부호화부(1330)가 제2 정보를 부호화하지 않아도, 현재 블록이 그래픽 모드에 따라 부호화된 블록임을 복호화하는 측에서 알 수 있다. However, if the current slice includes only the blocks encoded according to the natural mode, the current block is an explicitly encoded block according to the natural mode. Therefore, even if the second information is not encoded, it can be known from the decoding side that the encoding mode of the current block is the natural mode. The same is true when the current slice includes only the blocks coded according to the graphic mode. Even if the second information encoding unit 1330 does not encode the second information, it can be known from the decoding side that the current block is a block encoded according to the graphic mode.

그러나, 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록 및 그래픽 모드에 따라 부호화된 블록을 모두 포함하면, 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되는지 부호화하는 측에서 알 수 없으므로, 제2 정보 부호화부(1330)는 내추럴 모드 및 그래픽 모드 중 현재 블록의 부호화에 이용된 모드를 특정하기 위한 제2 정보를 부호화한다. However, if the current slice contains both blocks coded according to the natural mode and blocks coded according to the graphic mode, it can not be known from the coding side that the current block is coded according to the natural mode or the graphic mode, The information encoding unit 1330 encodes the second information for specifying the mode used for encoding the current block, out of the natural mode and the graphic mode.

런부호화부(1340)는 동일한 부호화 모드의 반복 횟수에 대한 정보를 부호화한다. 연속된 복수의 이전 블록의 부호화 모드와 현재 블록의 부호화 모드가 동일하면, 반복 횟수를 '1' 증가시킨다. 동일한 부호화 모드가 계속해서 반복되면, 계속해서 반복 횟수를 '1' 증가시키고, 동일한 부호화 모드의 반복이 끝나고, 상이한 모드로 부호화되는 블록이 발생하면, 반복 횟수에 대한 정보를 부호화한다. The run encoding unit 1340 encodes information on the number of repetitions of the same encoding mode. If the encoding mode of the consecutive plural previous blocks is the same as the encoding mode of the current block, the number of repetition is increased by '1'. If the same encoding mode is continuously repeated, the number of repetition times is incremented by '1', and when a block to be encoded in a different mode after the repetition of the same encoding mode is generated, information on the repetition number is encoded.

도 14의 실시예를 참조하면, 현재 블록(1410) 및 네 번째 블록(1412)의 부호화 모드 대신에 반복 횟수 '2'가 부호화되므로, 현재 블록(1410) 및 네 번째 블록(1412)의 부호화 모드에 대한 정보를 부호화하는 소모되는 비트 수를 줄일 수 있다. 현재 블록(1410) 및 네 번째 블록(1412)의 부호화 모드가 그래픽 모드이므로, 전술한 제1 정보 및 제2 정보를 부호화하여 두 블록의 부호화 모드를 부호화하기 위해서는 최대 4 개의 비트가 필요하다. 그런데 반복 횟수 '2'에 대한 정보를 부호화 모드에 대한 정보 대신에 부호화하면, 2 비트로 표현될 수 있으므로, 부호화의 압축률이 향상된다. 14, since the repetition number '2' is encoded instead of the encoding mode of the current block 1410 and the fourth block 1412, the encoding mode of the current block 1410 and the encoding of the fourth block 1412 It is possible to reduce the number of bits consumed to encode information on the bitstream. Since the encoding mode of the current block 1410 and the fourth block 1412 is a graphical mode, a maximum of four bits are required to encode the first information and the second information to encode the encoding modes of the two blocks. However, if the information on the repetition frequency '2' is encoded in place of the information on the encoding mode, it can be represented by 2 bits, so that the compression rate of the encoding is improved.

슬라이스 정보 부호화부(1350)는 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 나타내는 제3 정보, 내추럴 모드에 따라 부호화된 블록 및 그래픽 모드에 따라 부호화된 블록을 포함하는지 나타내는 제4 정보를 부호화한다. 제4 정보는 내추럴 모드에 따라 부호화된 블록을 포함하는 나타내는 플래그 정보 및 그래픽 모드에 따라 부호화된 블록을 포함하는지 나타내는 플래그 정보를 포함할 수 있다. The slice information encoding unit 1350 encodes third information indicating whether the current slice includes a block encoded according to the skip mode, fourth information indicating whether the slice is encoded according to the natural mode, do. The fourth information may include flag information indicating that the encoded block is included according to the natural mode, and flag information indicating whether the block includes encoded blocks according to the graphic mode.

전술한 바와 같이 제1 정보 부호화부(1310) 및 제2 정보 부호화부(1320)는 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 여부, 내추럴 모드에 따라 부호화된 블록을 포함하는지 여부 및 그래픽 모드에 따라 부호화된 블록을 포함하는지 여부에 따라 선택적으로 제1 정보 및 제2 정보를 부호화할 수 있다. 따라서, 슬라이스 정보 부호화부(1350)는 제3 정보 및 제4 정보를 부호화하여 제1 정보 및 제2 정보가 부호화되지 않아도 복호화하는 측이 현재 블록의 부호화 모드를 특정할 수 있게 한다. As described above, the first information encoding unit 1310 and the second information encoding unit 1320 determine whether the current slice includes a block encoded according to the skip mode, whether it contains a block encoded according to the natural mode, The first information and the second information may be selectively encoded depending on whether the encoded block is included according to the mode. Therefore, the slice information encoding unit 1350 encodes the third information and the fourth information so that the decoding side can specify the encoding mode of the current block even if the first information and the second information are not encoded.

도 15는 본 발명의 일 실시예에 따른 모드 정보 부호화 방법을 설명하기 위한 흐름도이다. 도 15는 현재 슬라이스의 모든 블록의 부호화 모드에 대한 정보를 부호화하는 방법을 도시한다. 15 is a flowchart illustrating a mode information encoding method according to an embodiment of the present invention. FIG. 15 shows a method of coding information on a coding mode of all blocks of a current slice.

단계 1510에서 모드 정보 부호화 장치(1300)는 블록의 순서를 나타내는 인덱스 'i'를 '0'으로 설정한다. In step 1510, mode information encoding apparatus 1300 sets index 'i' indicating the order of blocks to '0'.

단계 1520에서 모드 정보 부호화 장치(1300)는 i 번째 블록의 부호화 모드를 결정한다. 모드 결정부(110, 410 및 740) 및 스킵 모드 결정부(710)를 통해 i 번째 블록이 스킵 모드, 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되는지 결정한다. In step 1520, the mode information encoding apparatus 1300 determines the encoding mode of the i-th block. Mode determining units 110, 410, and 740 and the skip mode determining unit 710, and determines which of the skip mode, the natural mode, and the graphic mode is encoded in the i-th block.

단계 1530에서 모드 정보 부호화 장치(1300)는 i 번째 블록이 연속된 복수의 이전 블록과 부호화 모드가 동일한지 판단한다. i 번째 블록이 연속된 두 개의 이전 블록과 부호화 모드가 동일한지 판단할 수 있다. In step 1530, the mode information encoding apparatus 1300 determines whether the encoding mode is the same as a plurality of previous blocks in which the i-th block is continuous. it can be determined whether the encoding mode is the same as the previous two blocks in which the i-th block is continuous.

연속된 두 개의 이전 블록과 부호화 모드가 동일한지 판단하는 경우에는 'i=0 또는 1' 즉, 현재 슬라이스의 최초 블록과 두 번째 블록은 이전에 부호화된 연속된 블록들의 개수가 두 개보다 작으므로, 연속된 두개의 이전 블록과 부호화 모드가 동일한지 판단할 수 없다. 따라서, 이 경우에는 연속된 복수의 이전 블록과 i 번째 블록의 부호화 모드가 동일하지 않은 것으로 판단한다.'I = 0 or 1', that is, the first block and the second block of the current slice are smaller than the number of the previously coded consecutive blocks, , It can not be determined whether the two previous consecutive blocks and the encoding mode are the same. Therefore, in this case, it is determined that the encoding modes of the consecutive plural previous blocks and the i-th block are not the same.

단계 1540에서 모드 정보 부호화 장치(1300)는 반복 횟수를 '1' 증가시킨다. 단계 1530에서 i 번째 블록이 이전에 부호화된 복수의 블록과 부호화 모드가 동일한 것으로 판단되면, 반복 횟수를 '1' 증가시킨다. 반복 횟수의 초기 값은 '0'으로 설정될 수 있다. In step 1540, the mode information encoding apparatus 1300 increases the number of repetitions by '1'. If it is determined in step 1530 that the i-th block has the same encoding mode as a plurality of blocks previously coded, the number of repetitions is increased by '1'. The initial value of the number of repetition times may be set to '0'.

단계 1550에서 모드 정보 부호화 장치(1300)는 반복 횟수에 대한 정보를 부호화한다. 단계 1530에서 i 번째 블록이 연속된 복수의 이전 블록과 부호화 모드가 동일하지 않은 것으로 판단되면, 반복 횟수에 대한 정보를 부호화한다. i 번째 블록의 부호화 모드에 대한 정보를 부호화하기 전에 i-1 번째 블록까지의 반복 횟수에 대한 정보를 부호화한다. 반복 횟수에 대한 정보를 부호화함과 동시에 반복 횟수를 다시 초기값인 '0'으로 리셋할 수 있다. In step 1550, the mode information encoding apparatus 1300 encodes information on the number of repetitions. If it is determined in step 1530 that the encoding mode is not the same as a plurality of consecutive previous blocks in the i-th block, information on the number of repetitions is encoded. information on the number of repetitions up to the (i-1) th block is encoded before information on the encoding mode of the i-th block is encoded. Information on the number of repetitions can be encoded and the number of repetitions can be reset to the initial value '0' again.

단계 1560에서 모드 정보 부호화 장치(1300)는 i 번째 블록의 부호화 모드에 대한 정보를 부호화한다. 현재 블록이 스킵 모드에 따라 부호화되었는지 나타내는 제1 정보 및 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 부호화할 수 있다. 단계 1560의 상세한 설명은 도 16 내지 18을 참조하여 상세히 후술한다. In step 1560, the mode information encoding apparatus 1300 encodes the information on the encoding mode of the i-th block. The first information indicating whether the current block is coded according to the skip mode and the second information indicating whether the current block is coded according to the natural mode or the graphic mode. Details of step 1560 will be described later in detail with reference to FIGS.

단계 1570에서 모드 정보 부호화 장치(1300)는 i 번째 블록이 마지막 블록인지 판단한다. 마지막 블록이 아니라면, 블록의 순서를 나타내는 인덱스 'i'를 '1' 증가시키고, 단계 1520 내지 1560을 반복한다. In step 1570, the mode information encoding apparatus 1300 determines whether the i-th block is the last block. If it is not the last block, the index 'i' indicating the order of the blocks is incremented by '1', and steps 1520 to 1560 are repeated.

단계 1590에서 모드 정보 부호화 장치(1300)는 현재 슬라이스에 대한 정보를 부호화한다. 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 나타내는 제3 정보 및 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록 및 그래픽 모드에 따라 부호화된 블록을 포함하는지 나타내는 제4 정보를 부호화한다.In step 1590, the mode information encoding apparatus 1300 encodes information on the current slice. Third information indicating whether the current slice includes the encoded block in accordance with the skip mode, and fourth information indicating whether the current slice includes the block encoded according to the natural mode and the block encoded according to the graphics mode.

도 16은 본 발명의 일 실시예에 따른 모드 정보 부호화 방법을 설명하기 위한 흐름도이다. 16 is a flowchart illustrating a mode information encoding method according to an embodiment of the present invention.

도 16은 도 15의 단계 1560을 상세히 도시한다. i 번째 블록이 현재 블록인 경우, 현재 블록의 부호화 모드에 대한 저보를 부호화하는 방법을 상세히 도시한다. FIG. 16 shows step 1560 of FIG. 15 in detail. and a case where the i-th block is the current block, a method for coding the hypothesis regarding the coding mode of the current block is shown in detail.

단계 1610에서 모드 정보 부호화 장치(1300)는 스킵 모드에 대한 정보를 부호화한다. 현재 블록이 스킵 모드에 따라 부호화되었는지 나타내는 제1 정보를 부호화한다. 현재 블록의 부호화 모드가 스킵 모드이면, 플래그 정보를 '1'로 설정하고, 현재 블록의 부호화 모드가 스킵 모드가 아니면, 플래그 정보를 '0'으로 설정할 수 있다.In step 1610, the mode information encoding apparatus 1300 encodes the information on the skip mode. And the first information indicating whether the current block is coded according to the skip mode. The flag information is set to '1' if the current block encoding mode is the skip mode, and the flag information can be set to '0' if the current block encoding mode is not the skip mode.

단계 1620에서 모드 정보 부호화 장치(1300)는 현재 블록의 부호화 모드가 스킵 모드인지 판단한다. 현재 블록의 부호화 모드가 스킵 모드가 아니면, 단계 1630에서 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 부호화한다. 현재 블록의 부호화 모드가 내추럴 모드이면 플래그 정보를 '0'으로 설정하고, 현재 블록의 부호화 모드가 그래픽 모드이 면 플래그 정보를 '1'로 설정할 수 있다.In step 1620, the mode information encoding apparatus 1300 determines whether the encoding mode of the current block is a skip mode. If the encoding mode of the current block is not skip mode, in step 1630, second information indicating whether the current block is encoded according to the natural mode or the graphic mode is encoded. The flag information is set to '0' if the encoding mode of the current block is the natural mode, and the flag information can be set to '1' if the encoding mode of the current block is the graphic mode.

도 17은 본 발명의 또 다른 실시예에 따른 모드 정보 부호화 방법을 설명하기 위한 흐름도이다.17 is a flowchart illustrating a mode information encoding method according to another embodiment of the present invention.

도 17은 본 발명의 또 다른 실시예에 따른 도 15의 단계 1560을 도시한다.Figure 17 illustrates step 1560 of Figure 15 according to another embodiment of the present invention.

단계 1710에서 모드 정보 부호화 장치(1300)는 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 판단한다. 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하지 않으면, 현재 블록에 대해 스킵 모드에 따라 부호화되었는지 나타내는 제1 정보를 부호화할 필요가 없다. In step 1710, the mode information encoding apparatus 1300 determines whether the current slice includes a block encoded according to the skip mode. If the current slice does not include the coded block in accordance with the skip mode, it is not necessary to encode the first information indicating whether or not the current block is coded according to the skip mode.

단계 1710에서 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는 것으로 판단되면, 단계 1720에서 모드 정보 부호화 장치(1300)는 현재 블록이 스킵 모드에 따라 부호화되었는지 나타내는 제1 정보를 부호화한다. 현재 블록이 스킵 모드에 따라 부호화되었으면, 플래그 정보를 '1'로 설정하고, 스킵 모드에 따라 부호화되지 않았으면, 플래그 정보를 '0'으로 설정할 수 있다.If it is determined in step 1710 that the current slice includes the coded block according to the skip mode, the mode information encoding apparatus 1300 encodes the first information indicating whether the current block is coded according to the skip mode in step 1720. If the current block is coded according to the skip mode, the flag information is set to '1', and if it is not coded according to the skip mode, the flag information can be set to '0'.

단계 1730에서 모드 정보 부호화 장치(1300)는 현재 블록이 스킵 모드에 따라 부호화되었는지 판단한다. 현재 블록이 스킵 모드에 따라 부호화되었으면, 현재 블록이 내추럴 모드 또는 그래픽 모드에 따라 부호화되었는지 나타내는 정보를 부호화하지 않는다. In step 1730, the mode information encoding apparatus 1300 determines whether the current block is coded according to the skip mode. If the current block is coded according to the skip mode, information indicating whether the current block is coded according to the natural mode or the graphic mode is not encoded.

단계 1740에서 모드 정보 부호화 장치는 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록 및 그래픽 모드에 따라 부호화된 블록을 모두 포함하는지 판단한다. 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록만 포함한다면, 현재 블록 도 내추럴 모드에 따라 부호화된 블록임이 명백하므로, 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 부호화할 필요가 없다. 또한, 현재 슬라이스가 그래픽 모드에 따라 부호화된 블록만 포함한다면, 현재 블록도 그래픽 모드에 따라 부호화된 블록임이 명백하므로, 마찬가지로 제2 정보를 부호화할 필요가 없다. In step 1740, the mode information encoding apparatus determines whether the current slice includes all the blocks encoded according to the natural mode and the blocks encoded according to the graphic mode. If the current slice includes only the blocks encoded according to the natural mode, it is apparent that the current block is also the block encoded according to the natural mode. Therefore, the second information indicating whether the current block is encoded according to the natural mode or the graphic mode is encoded no need. In addition, if the current slice contains only blocks encoded in accordance with the graphics mode, it is obvious that the current block is also a block encoded according to the graphics mode, so that it is not necessary to encode the second information.

단계 1750에서 모드 정보 부호화 장치는 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 부호화한다. 현재 블록이 내추럴 모드에 따라 부호화되었으면, 플래그 정보를 '0'으로 설정하고, 현재 블록이 그래픽 모드에 따라 부호화되었으면, '1'로 설정한다. In step 1750, the mode information encoding apparatus encodes the second information indicating whether the current block is coded according to the natural mode or the graphic mode. If the current block is coded according to the natural mode, the flag information is set to '0', and if the current block is coded according to the graphic mode, it is set to '1'.

도 18은 본 발명의 또 다른 실시예에 따른 모드 정보를 부호화하는 방법을 설명하기 위한 흐름도이다. 18 is a flowchart illustrating a method of encoding mode information according to another embodiment of the present invention.

도 18은 도 17과 마찬가지로 본 발명의 또 다른 실시예에 따른 도 15의 단계 1560을 도시한다.Fig. 18 shows step 1560 of Fig. 15 according to another embodiment of the present invention, similar to Fig.

도 18에 도시된 실시예를 도 17에 도시된 실시예와 비교하면 단계 1820이 추가된 것이 상이하다. 도 17에 도시된 실시예에 따르면, 현재 슬라이스가 스킵 모드에 따라 부호화된 블록만 포함하는 경우에도 제1 정보를 부호화하였다. 그러나, 도 18에 도시된 실시예에 따르면, 단계 1820이 추가되어 현재 슬라이스가 스킵 모드에 따라 부호화된 블록만 포함하는 경우에는 제1 정보를 부호화하지 않는다. Comparing the embodiment shown in FIG. 18 with the embodiment shown in FIG. 17, the addition of step 1820 is different. According to the embodiment shown in FIG. 17, the first information is encoded even when the current slice includes only the block encoded according to the skip mode. However, according to the embodiment shown in FIG. 18, step 1820 is added so that the first information is not encoded when the current slice includes only the blocks encoded according to the skip mode.

도 18에 따라 부호화되는 모드 정보를 정리하면 다음의 표와 같을 수 있다.The mode information encoded according to FIG. 18 can be summarized as the following table.

Figure 112009079084157-pat00001
Figure 112009079084157-pat00001

'skip_mode_used'는 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 나타내는 플래그 정보로서, 전술한 제3 정보에 대응된다. 'nat_mode_used'는 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록을 포함하는지 나타내는 플래그 정보이며, 'graphic_mode_used'는 현재 슬라이스가 그래픽 모드에 따라 부호화된 블록을 포함하는지 나타내는 플래그 정보이다. 'nat_mode_used' 및 'graphic_mode_used'는 전술한 제4 정보에 대응된다. 제1 정보는 현재 블록이 스킵 모드에 따라 부호화되었는지 나타내는 플래그 정보이며, 제2 정보는 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 플래그 정보이다.'skip_mode_used' is flag information indicating whether the current slice includes a block coded according to the skip mode, and corresponds to the above-described third information. 'nat_mode_used' is flag information indicating whether the current slice includes a block coded according to the natural mode, and 'graphic_mode_used' is flag information indicating whether the current slice includes a block coded according to the graphic mode. 'nat_mode_used' and 'graphic_mode_used' correspond to the above-described fourth information. The first information is flag information indicating whether the current block is coded according to the skip mode, and the second information is flag information indicating whether the current block is coded according to the natural mode or the graphic mode.

도 19는 본 발명의 일 실시예에 따른 모드 정보 복호화 장치를 도시한다. FIG. 19 illustrates a mode information decoding apparatus according to an embodiment of the present invention.

도 19에 도시된 모드 정보 부호화 장치는 도 8의 모드 정보 복호화부(810) 및 도 9의 모드 정보 복호화부(910)에 대응된다.The mode information encoding apparatus shown in FIG. 19 corresponds to the mode information decoding unit 810 of FIG. 8 and the mode information decoding unit 910 of FIG.

도 19를 참조하면, 본 발명의 일 실시예에 따른 모드 정보 복호화 장치(1900)는 슬라이스 정보 복호화부(1910), 제1 정보 복호화부(1920), 제2 정보 부호화부(1930), 런복호화부(1940), 런판단부(1950) 및 모드 결정부(1960)를 포함한다. 19, a mode information decoding apparatus 1900 according to an embodiment of the present invention includes a slice information decoding unit 1910, a first information decoding unit 1920, a second information encoding unit 1930, a run decoding A run determination unit 1950, and a mode determination unit 1960. The mode determination unit 1960 determines whether or not the operation mode is an operation mode.

슬라이스 정보 복호화부(1910)는 비트스트림으로부터 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 나타내는 제3 정보, 내추럴 모드에 따라 부호화된 블록 및 그래픽 모드에 따라 부호화된 블록을 포함하는지 나타내는 제4 정보를 파싱한다. 제4 정보는 내추럴 모드에 따라 부호화된 블록을 포함하는 나타내는 플래그 정보 및 그래픽 모드에 따라 부호화된 블록을 포함하는지 나타내는 플래그 정보를 포함할 수 있다.The slice information decoding unit 1910 receives third information indicating whether the current slice includes a block encoded according to the skip mode, a block encoded according to the natural mode, and a block encoded according to the graphics mode, Parses information. The fourth information may include flag information indicating that the encoded block is included according to the natural mode, and flag information indicating whether the block includes encoded blocks according to the graphic mode.

제1 정보 복호화부(1920)는 런판단부(1950)의 판단 결과, 현재 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드로 부호화되지 않았으면, 현재 블록이 스킵 모드에 따라 부호화되었는지 나타내는 제1 정보를 파싱한다. 제1 정보는 현재 블록이 스킵 모드에 따라 부호화되었는지 나타내는 플래그 정보일 수 있다. 현재 블록이 스킵 모드에 따라 부호화되었다면, 플래그 정보는 '1'일 수 있고, 현재 블록이 스킵 모드에 따라 부호화되지 않았다면, 플래그 정보를 '0'일 수 있다.If the current block is not coded in the same encoding mode as a plurality of consecutive previous blocks, the first information decoding unit 1920 determines whether the current block is coded according to the skip mode, Parses information. The first information may be flag information indicating whether the current block is coded according to the skip mode. If the current block is coded according to the skip mode, the flag information may be '1', and if the current block is not coded according to the skip mode, the flag information may be '0'.

본 발명의 또 다른 실시예에 따르면, 제1 정보 복호화부(1920)는 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 여부에 기초해 선택적으로 제1 정보를 부호화할 수 있다. 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하지 않는다면, 현재 슬라이스의 모든 블록이 스킵 모드에 따라 부호화되지 않았음이 명백하고, 모드 정보 부호화장치(1300)는 제1 정보를 부호화하지 않는다. 따라서, 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하지 않는다면, 각각의 블록에 대해 제1 정보를 파싱할 필요가 없다. 따라서, 제1 정보 복호화부(1920)는 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는 경우에만, 각각의 블록에 대해 제1 정보를 파싱한다. According to another embodiment of the present invention, the first information decoding unit 1920 may selectively encode the first information based on whether or not the current slice includes the block encoded according to the skip mode. If the current slice does not include the coded block according to the skip mode, it is evident that not all the blocks of the current slice have been coded according to the skip mode, and the mode information encoding apparatus 1300 does not encode the first information. Therefore, if the current slice does not include the coded block according to the skip mode, it is not necessary to parse the first information for each block. Therefore, the first information decoding unit 1920 parses the first information for each block only when the current slice includes the block encoded according to the skip mode.

또한, 본 발명의 또 다른 실시예에 따르면, 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는 경우에도 모드 정보 부호화 장치(1300)는 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록 또는 그래픽 모드에 따라 부호화된 블록을 포함하는 경우에만 제1 정보를 부호화한다. 따라서, 제1 정보 복호화부(1920)는 슬라이스 정보 복호화부(1910)에서 복호화된 제4 정보를 참조하여, 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록 또는 그래픽 모드에 따라 부호화된 블록을 포함하는 경우에만 제1 정보를 파싱할 수 있다.In addition, according to another embodiment of the present invention, even when the current slice includes a block encoded according to the skip mode, the mode information encoding apparatus 1300 may be configured to encode the current slice according to a block or graphic mode And encodes the first information only when the encoded block is included. Accordingly, the first information decoding unit 1920 refers to the fourth information decoded by the slice information decoding unit 1910, and when the current slice includes a block encoded according to the natural mode or a block encoded according to the graphic mode Only the first information can be parsed.

제2 정보 복호화부(1930)는 제1 정보 복호화부(1920)와 마찬가지로 런판단부(1950)의 판단 결과, 현재 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드로 부호화되지 않은 경우에만 제2 정보를 복호화한다. The second information decoding unit 1930 decodes the second information only if the current block is not coded in the same encoding mode as a plurality of consecutive previous blocks as a result of the run decision unit 1950, Decrypt information.

현재 블록이 스킵 모드에 따라 부호화되면, 제1 정보 복호화부(1920)에서 이미 스킵 모드에 대한 정보가 파싱하고, 현재 블록의 복호화에 이용될 모드가 스킵 모드로 결정되므로, 내추럴 모드 및 그래픽 모드에 대한 정보를 파싱할 필요가 없다. 따라서, 제2 정보 복호화부(1930)는 현재 블록이 스킵 모드에 따라 부호화되지 않은 것으로 판단되면, 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 파싱한다. 제2 정보는 내추럴 모드 및 그래픽 모드 중 현재 블록의 부호화에 이용된 모드를 특정하기 위한 플래그 정보일 수 있다. When the current block is coded according to the skip mode, the information about the skip mode is already parsed by the first information decoding unit 1920 and the mode to be used for decoding the current block is determined as the skip mode. There is no need to parse the information. Accordingly, if it is determined that the current block is not coded according to the skip mode, the second information decoding unit 1930 parses the second information indicating whether the current block is coded according to the natural mode or the graphic mode. The second information may be flag information for specifying a mode used for encoding the current block, of the natural mode and the graphic mode.

또한, 제2 정보 복호화부(1930)는 슬라이스 정보 복호화부(1910)에서 복호화된 제4 정보를 참조하여 선택적으로 제2 정보를 부호화할 수 있다. 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록만 포함하면, 현재 블록은 내추럴 모드에 따라 부호화된 블록이 명백하고, 모드 정보 부호화 장치(1300)는 제2 정보를 부호화하지 않으므로 제2 정보 복호화부(1930)가 제2 정보를 파싱할 필요가 없다. 또한, 현재 슬라이스가 그래픽 모드에 따라 부호화된 블록만 포함하면, 현재 블록은 그래픽 모드에 따라 부호화된 블록이 명백하고, 모드 정보 부호화 장치(1300)는 제2 정보를 부호화하지 않으므로, 제2 정보 복호화부(1930)가 제2 정보를 파싱할 필요가 없다. The second information decoding unit 1930 can selectively encode the second information with reference to the fourth information decoded by the slice information decoding unit 1910. [ If the current slice includes only the block encoded according to the natural mode, the block coded according to the natural mode of the current block is clear, and since the mode information encoding apparatus 1300 does not encode the second information, the second information decoding unit 1930 Need not parse the second information. In addition, if the current slice includes only a block encoded according to the graphics mode, the block encoded in accordance with the graphics mode of the current block is clear, and since the mode information encoding apparatus 1300 does not encode the second information, Section 1930 does not need to parse the second information.

요컨대, 제2 정보 복호화부(1930)는 제4 정보를 참조한 결과 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록 및 그래픽 모드에 따라 부호화된 블록을 모두 포함하는 경우에만 제2 정보를 파싱한다.In other words, the second information decoding unit 1930 parses the second information only when the current slice includes all of the blocks encoded in the natural mode and the blocks encoded in the graphic mode as a result of referring to the fourth information.

런복호화부(1940)는 동일한 부호화 모드의 반복 횟수에 대한 정보를 파싱한다. 동일한 부호화 모드의 반복 횟수에 대한 정보가 비트스트림에 포함되어 있으면, 이를 파싱하여 런판단부(1950)에 제공한다. The run decoding unit 1940 parses information on the number of repetitions of the same encoding mode. If the information on the number of repetitions of the same encoding mode is included in the bitstream, the information is parsed and provided to the run determination unit 1950.

런판단부(1950)는 현재 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드로 부호화되었는지 판단한다. 현재 블록이 현재 슬라이스의 k 번째 블록이라면, 연속된 복수의 이전 블록, k-1 번째 블록 및 k-2 번째 블록이 동일한 부호화 모드로 부호화되었는지 판단한다. k-1 번째 블록과 k-2 번째 블록이 동일한 부호화 모드로 부호화된 것으로 판단되면, 런복호화부(1940)를 통해 동일한 부호화 모드의 반복 횟수에 대한 정보를 파싱한다. The run determining unit 1950 determines whether the current block is coded in the same encoding mode as a plurality of consecutive previous blocks. If the current block is the kth block of the current slice, it is determined whether a plurality of consecutive previous blocks, k-1th block, and k-2th block are coded in the same coding mode. If it is determined that the (k-1) -th block and the (k-2) -th block are coded in the same encoding mode, the run decoding unit 1940 parses information on the number of repetitions of the same encoding mode.

반복 횟수에 대한 정보가 비트스트림에 포함되어 있지 않거나, 파싱된 반복 횟수에 대한 정보가 반복 횟수가 '0'임을 나타내고 있다면, 현재 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드로 부호화되지 않은 것으로 판단한다. 동일한 부호화 모드의 반복 횟수에 대한 정보가 파싱되었고, 그 값이 '0'보다 크면, 현재 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드로 부호화된 것으로 판단한다. If the information on the number of repetitions is not included in the bitstream, or if the information on the number of parsed repetitions indicates that the repetition count is '0', then the current block is not encoded in the same encoding mode as a plurality of consecutive previous blocks . Information on the number of repetitions of the same encoding mode is parsed, and if the value is larger than '0', it is determined that the current block is encoded in the same encoding mode as a plurality of consecutive previous blocks.

모드 정보 복호화 장치(1900)의 런판단부(1950)는 모드 정보 부호화 장치(1300)의 런판단부(1310)에 대응된다. 따라서, 런판단부(1950)는 런판단부(1310)과 마찬가지로 스킵 모드의 반복 여부, 내추럴 모드의 반복 여부 및 그래픽 모드의 반복 여부에 대해 모두에 판단하거나, 스킵 모드의 반복 여부에 대해서만 판단할 수도 있다. The run determination unit 1950 of the mode information decoding apparatus 1900 corresponds to the run determination unit 1310 of the mode information encoding apparatus 1300. Therefore, like the run decision unit 1310, the run determination unit 1950 determines whether the skip mode is repeated, whether the natural mode is repeated or whether the graphic mode is repeated, or whether only the skip mode is repeated or not It is possible.

또한, 두 가지 모드의 조합에 대해서만 반복 여부를 판단할 수 있는 바, 두 가지 모드의 조합은 스킵 모드-그래픽 모드, 스킵 모드-내추럴 모드 또는 내추럴 모드-그래픽 모드일 수 있다.The combination of the two modes can be a skip mode-graphic mode, a skip mode-natural mode, or a natural mode-graphic mode.

모드 결정부(1960)는 제1 정보 복호화부(1920)에서 복호화된 제1 정보, 제2 정보 복호화부(1930)에서 복호화된 제2 정보 및 런복호화부(1940)에서 복호화된 동일한 부호화 모드의 반복 횟수에 대한 정보 중 적어도 하나에 기초해 현재 블록의 복호화에 이용될 모드를 결정한다. 제1 정보에 기초해 현재 블록의 복호화에 이용될 모드가 스킵 모드인지 먼저 결정하고, 스킵 모드가 아니면, 제2 정보에 기초해 내추럴 모드 및 그래픽 모드 중 어떤 모드를 이용해 현재 블록을 복호화할 것인지 결정한다. The mode determination unit 1960 decodes the first information decoded by the first information decoding unit 1920, the second information decoded by the second information decoding unit 1930, and the second information decoded by the run decoding unit 1940, And determines a mode to be used for decoding the current block based on at least one of the information on the number of repetitions. Determines whether the mode to be used for decoding the current block is a skip mode based on the first information and determines whether to decode the current block using the natural mode or the graphic mode based on the second information if the mode is not the skip mode do.

런판단부(1950)의 판단 결과, 현재 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드로 부호화되었으면, 현재 블록의 복호화 모드를 이전 블록의 복호화 모드와 동일한 모드로 결정한다. If the current block is coded in the same encoding mode as a plurality of consecutive previous blocks as a result of the determination by the run determination unit 1950, the decoding mode of the current block is determined to be the same mode as the decode mode of the previous block.

도 20은 본 발명의 일 실시예에 따른 모드 정보 복호화 방법을 설명하기 위한 흐름도이다. 20 is a flowchart illustrating a mode information decoding method according to an embodiment of the present invention.

도 20을 참조하면, 단계 2010에서 모드 정보 복호화 장치(1700)는 비트스트림으로부터 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 나타내는 제3 정보, 내추럴 모드에 따라 부호화된 블록 및 그래픽 모드에 따라 부호화된 블록을 포함하는지 나타내는 제4 정보를 파싱한다.Referring to FIG. 20, in step 2010, the mode information decoding apparatus 1700 decodes, from the bitstream, third information indicating whether a current slice includes a block encoded according to a skip mode, a block encoded according to a natural mode, And parses the fourth information indicating whether it contains an encoded block.

단계 2020에서 모드 정보 복호화 장치(1700)는 블록의 순서를 나타내는 인덱스 'i'를 '0'으로 설정한다.In step 2020, the mode information decoding apparatus 1700 sets the index 'i' indicating the order of blocks to '0'.

단계 2030에서 모드 정보 복호화 장치(1700)는 i 번째 블록이 이전에 복호화된 연속된 복수의 블록의 부호화 모드와 동일한 모드로 부호화되었는지 판단한다. 동일한 부호화 모드의 반복 횟수에 대한 정보를 참조하여 아직 반복 횟수가 남았는지 판단한다. 반복 횟수가 '0'보다 크면, 반복 횟수가 남은 것으로 판단할 수 있다. 반복 횟수가 '0'보다 크면, 단계 2040에서 반복 횟수를 '1' 감소시킨다.In step 2030, the mode information decoding apparatus 1700 determines whether the i < th > block is coded in the same mode as the coding mode of a plurality of consecutive blocks decoded previously. It is determined whether the number of repetition times is still remaining by referring to the information on the repetition number of the same encoding mode. If the number of repetitions is greater than zero, it can be determined that the number of repetitions remains. If the number of repetition is greater than 0, the number of repetition is decreased by 1 in step 2040.

반복 횟수가 남지 않은 경우 즉, 반복 횟수가 '0'이면, i 번째 블록이 연속된 복수의 이전 블록과 동일한 부호화 모드로 부호화되지 않은 것이므로, 단계 2050에서 i 번째 블록의 부호화 모드에 대한 정보를 파싱한다. i 번째 블록이 스킵 모드에 따라 부호화되었는지 나타내는 제1 정보 및 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 파싱할 수 있다. 도 21 내지 23을 참조하여 상세히 후술한다. If the number of repetition is not enough, that is, if the repetition number is '0', the i-th block is not coded in the same encoding mode as a plurality of consecutive previous blocks. Therefore, in step 2050, information on the encoding mode of the i- do. the first information indicating whether the i-th block is coded according to the skip mode and the second information indicating whether the current block is coded according to the natural mode or the graphic mode. Will be described later in detail with reference to FIGS.

단계 2060에서 모드 정보 복호화 장치(1900)는 i 번째 블록이 이전 블록, 즉, i-1 번째 블록과 동일한 부호화 모드로 부호화되었는지 판단한다. i 번째 블록이 i-1 번째 블록과 동일한 부호화 모드로 부호화된 것으로 판단되면, 연속된 복수의 블록이 동일한 부호화 모드로 부호화된 것이므로, 다음 블록 즉, i+1 번째 블록도 동일한 부호화 모드로 부호화되었을 수 있다. In step 2060, the mode information decoding apparatus 1900 determines whether the i-th block is coded in the same coding mode as the previous block, i.e., the (i-1) -th block. If it is determined that the i-th block is coded in the same encoding mode as the (i-1) -th block, since a plurality of consecutive blocks are coded in the same encoding mode, the next block, i + .

따라서, 다음 블록의 부호화 모드를 결정하는데 참조하기 위해 단계 2062에서 모드 정보 복호화 장치(1900)는 동일한 부호화 모드의 반복 횟수에 대한 정보를 파싱한다. i+1 번째 블록이 i 번째 블록과 동일한 부호화 모드로 부호화되었다면, 동일한 부호화 모드의 반복 횟수에 대한 정보가 단계 2062에서 파싱되고, 동일한 부호화 모드로 부호화되지 않았다면, 파싱될 반복 횟수에 대한 정보가 없으므로, 파싱되지 않거나, 파싱되어도 반복 횟수는 '0'을 나타낸다. Therefore, in step 2062, the mode information decoding apparatus 1900 parses information on the number of repetitions of the same encoding mode in order to refer to the determination of the encoding mode of the next block. If the (i + 1) -th block is coded in the same coding mode as the i-th block, information on the number of iterations of the same coding mode is parsed in step 2062, and if there is no information on the number of iterations to be parsed , The number of repetitions is '0' even if it is not parsed or parsed.

단계 2070에서 모드 정보 복호화 장치(1900)는 i 번째 블록의 복호화 모드를 결정한다. 연속된 복수의 이전 블록과 동일한 부호화 모드로 부호화되어 단계 2030에서 반복 횟수가 남아있는 것으로 판단되었다면, i-1 번째 블록의 복호화 모드와 동일하게 i 번째 블록의 복호화 모드를 결정하고, 단계 2030에서 반복 횟수가 남아있지 않은 것으로 판단되어, 단계 2050에서 제1 정보 및 제2 정보가 파싱되었다면, 파싱된 제1 정보 및 제2 정보에 기초해 i 번째 블록의 복호화 모드를 결정한다. In step 2070, the mode information decoding apparatus 1900 determines a decoding mode of the i-th block. The decoding mode of the i-th block is determined in the same manner as the decoding mode of the (i-1) -th block, and the decoding mode of the i-th block is determined in step 2030 If the first information and the second information are parsed in step 2050, the decoding mode of the i-th block is determined based on the parsed first information and the second information.

단계 2080에서 모드 정보 복호화 장치(1900)는 i 번째 블록이 마지막 블록인지 판단한다. 마지막 블록이 아니라면, 단계 2090에서 인덱스 I를 '1' 증가 시키고, 단계 2030 내지 2070를 반복한다. In step 2080, the mode information decoding apparatus 1900 determines whether the i-th block is the last block. If not, the index I is incremented by 1 in step 2090 and steps 2030 to 2070 are repeated.

도 21은 본 발명의 또 다른 실시예에 따른 모드 정보를 복호화하는 방법을 설명하기 위한 흐름도이다. 21 is a flowchart illustrating a method of decoding mode information according to another embodiment of the present invention.

도 21은 본 발명의 일 실시예에 따른 도 20의 단계 2050을 상세히 도시한다. Figure 21 details step 2050 of Figure 20 in accordance with an embodiment of the present invention.

도 21을 참조하면, 단계 2110에서 모드 정보 복호화 장치(1900)는 현재 블록이 스킵 모드에 따라 부호화되었는지 나타내는 제1 정보를 복호화한다. 비트스트림에서 제1 정보를 파싱한다. Referring to FIG. 21, in step 2110, the mode information decoding apparatus 1900 decodes first information indicating whether a current block is coded according to a skip mode. And parses the first information in the bitstream.

단계 2120에서 모드 정보 복호화 장치(1900)는 단계 2110에서 복호화된 제1 정보에 기초해 현재 블록이 스킵 모드에 따라 부호화되었는지 판단한다.In step 2120, the mode information decoding apparatus 1900 determines whether the current block is coded according to the skip mode on the basis of the first information decoded in step 2110.

단계 2120에서 현재 블록이 스킵 모드에 따라 부호화되지 않은 것으로 판단되면, 단계 2130에서 모드 정보 복호화 장치(1900)는 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 부호화 모드에 따라 부호화되었는지 나타내는 제2 정보를 복호화한다. 비트스트림에서 제2 정보를 파싱한다. If it is determined in step 2120 that the current block is not coded according to the skip mode, the mode information decoding apparatus 1900 decodes the second information indicating in which encoding mode the current block is encoded in the natural mode or the graphic mode do. And parses the second information in the bitstream.

도 22는 본 발명의 또 다른 실시예에 따른 모드 정보를 복호화하는 방법을 설명하기 위한 흐름도이다.22 is a flowchart illustrating a method of decoding mode information according to another embodiment of the present invention.

도 22는 본 발명의 또 다른 실시예에 따른 도 20의 단계 2050을 도시한다. Figure 22 illustrates step 2050 of Figure 20 in accordance with another embodiment of the present invention.

도 22를 참조하면, 단계 2210에서 모드 정보 복호화 장치(1900)는 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 판단한다. 파싱된 제3 정보에 기초해 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는지 판단한다. 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하지 않으면, 현재 블록에 대해 스킵 모드에 따라 부호화되었는지 나타내는 제1 정보를 파싱할 필요가 없다.Referring to FIG. 22, in step 2210, the mode information decoding apparatus 1900 determines whether a current slice includes a block encoded according to a skip mode. Based on the parsed third information, whether the current slice includes a block encoded according to the skip mode. If the current slice does not include the coded block according to the skip mode, it is not necessary to parse the first information indicating whether the current block is coded according to the skip mode.

단계 2210에서 현재 슬라이스가 스킵 모드에 따라 부호화된 블록을 포함하는 것으로 판단되면, 단계 2220에서 모드 정보 복호화 장치(1900)는 현재 블록이 스킵 모드에 따라 부호화되었는지 나타내는 제1 정보를 파싱한다. If it is determined in step 2210 that the current slice includes the coded block according to the skip mode, the mode information decoding apparatus 1900 parses the first information indicating whether the current block is coded according to the skip mode in step 2220.

단계 2230에서 모드 정보 복호화 장치(1900)는 현재 블록이 스킵 모드에 따라 부호화되었는지 판단한다. 단계 2220에서 파싱된 제1 정보에 기초해 현재 블록이 스킵 모드에 따라 부호화되었는지 판단한다. 현재 블록이 스킵 모드에 따라 부호화되었다면, 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 정보를 파싱할 필요가 없다.In step 2230, the mode information decoding apparatus 1900 determines whether the current block is coded according to the skip mode. It is determined whether the current block is coded according to the skip mode based on the first information parsed in step 2220. If the current block is coded according to the skip mode, it is not necessary to parse the information indicating which mode the current block is encoded in, either the natural mode or the graphic mode.

단계 2240에서 모드 정보 복호화 장치(1900)는 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록 및 그래픽 모드에 따라 부호화된 블록을 모두 포함하는지 판단한다. 파싱된 제4 정보에 기초해 판단한다. 현재 슬라이스가 내추럴 모드에 따라 부호화된 블록만 포함한다면, 현재 블록도 내추럴 모드에 따라 부호화된 블록임이 명백하므로, 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 파싱할 필요가 없다. 또한, 현재 슬라이스가 그래픽 모드에 따라 부호화된 블록만 포함한다면, 현재 블록도 그래픽 모드에 따라 부호화된 블록임이 명백하므로, 제2 정보를 파싱할 필요가 없다.In step 2240, the mode information decoding apparatus 1900 determines whether the current slice includes all of the blocks coded according to the natural mode and blocks coded according to the graphic mode. Based on the parsed fourth information. If the current slice contains only the blocks encoded according to the natural mode, it is obvious that the current block is also the block encoded according to the natural mode, so that the second information indicating whether the current block is encoded according to the natural mode or the graphic mode is parsed no need. Also, if the current slice contains only blocks encoded according to the graphics mode, it is obvious that the current block is also a block encoded according to the graphics mode, so that it is not necessary to parse the second information.

단계 2250에서 모드 정보 복호화 장치(1900)는 현재 블록이 내추럴 모드 및 그래픽 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 파싱한다.In step 2250, the mode information decoding apparatus 1900 parses the second information indicating whether the current block is encoded according to the natural mode or the graphic mode.

도 23은 본 발명의 또 다른 실시예에 따른 모드 정보를 복호화하는 방법을 설명하기 위한 흐름도이다. 23 is a flowchart illustrating a method of decoding mode information according to another embodiment of the present invention.

도 23은 도 22와 마찬가지로 본 발명의 또 다른 실시예에 따른 도 20의 단계 2050을 도시한다.FIG. 23 shows step 2050 of FIG. 20 according to another embodiment of the present invention, similar to FIG.

도 23에 도시된 실시예를 도 22에 도시된 실시예와 비교하면 단계 2320이 추가된 것이 상이하다. 도 22에 도시된 실시예에 따르면, 현재 슬라이스가 스킵 모드에 따라 부호화된 블록만 포함하는 경우에도 제1 정보를 파싱하였다. 그러나, 도 23에 도시된 실시예에 따르면, 단계 2320이 추가되어 현재 슬라이스가 스킵 모드에 따라 부호화된 블록만 포함하는 경우에는 제1 정보를 파싱하지 않는다. Comparing the embodiment shown in FIG. 23 with the embodiment shown in FIG. 22 differs in that step 2320 is added. According to the embodiment shown in FIG. 22, the first information is parsed even when the current slice includes only the block encoded according to the skip mode. However, according to the embodiment shown in FIG. 23, step 2320 is added so that the first information is not parsed if the current slice contains only the blocks encoded according to the skip mode.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명이 상기의 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명의 사상은 아래에 기재된 특허청구범위에 의해서만 파악되어야 하고, 이와 균등하거나 또는 등가적인 변형 모두는 본 발명 사상의 범주에 속한다 할 것이다. 또한, 본 발명에 따른 시스템은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, Modification is possible. Accordingly, the spirit of the present invention should be understood only in accordance with the following claims, and all of the equivalent or equivalent variations will fall within the scope of the present invention. In addition, the system according to the present invention can be embodied as computer-readable codes on a computer-readable recording medium.

예를 들어, 본 발명의 예시적인 실시예에 따른 영상 부호화 장치, 영상 복호화 장치, 모드 정보 부호화 장치 및 모드 정보 복호화 장치는 도 1, 4, 7, 8, 9, 13 및 19에 도시된 바와 같은 장치의 각각의 유닛들에 커플링된 버스, 상기 버스에 결합된 적어도 하나의 프로세서를 포함할 수 있다. 또한, 명령, 수신된 메시지 또는 생성된 메시지를 저장하기 위해 상기 버스에 결합되어, 전술한 바와 같은 명령들을 수행하기 위한 적어도 하나의 프로세서에 커플링된 메모리를 포함할 수 있다. For example, the image encoding apparatus, the image decoding apparatus, the mode information encoding apparatus, and the mode information decoding apparatus according to the exemplary embodiments of the present invention can be applied to various types of apparatuses such as those shown in Figs. 1, 4, 7, 8, 9, 13 and 19 A bus coupled to each unit of the device, and at least one processor coupled to the bus. It may also include a memory coupled to the bus for storing instructions, received messages or generated messages and coupled to the at least one processor for performing the instructions as described above.

또한, 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.In addition, the computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored. Examples of the recording medium include a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like, and a carrier wave (for example, transmission via the Internet). The computer-readable recording medium may also be distributed over a networked computer system so that computer readable code can be stored and executed in a distributed manner.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치를 도시한다.1 illustrates an image encoding apparatus according to an embodiment of the present invention.

도 2는 본 발명의 일 실시예에 따른 영상 부호화 단위를 도시한다.FIG. 2 illustrates an image encoding unit according to an embodiment of the present invention.

도 3은 본 발명의 일 실시예에 따른 스킵 모드를 판단하는 방법을 설명하기 위한 도면이다.3 is a diagram for explaining a method of determining a skip mode according to an embodiment of the present invention.

도 4는 본 발명의 또 다른 실시예에 따른 영상 부호화 장치를 도시한다. FIG. 4 illustrates an image encoding apparatus according to another embodiment of the present invention.

도 5는 본 발명의 일 실시예에 따른 내추럴 모드 부호화부를 도시한다.FIG. 5 illustrates a natural mode encoding unit according to an embodiment of the present invention.

도 6a는 본 발명의 일 실시예에 따른 그래픽 모드 부호화부를 도시한다.6A illustrates a graphic mode encoding unit according to an embodiment of the present invention.

도 6b는 본 발명의 일 실시예에 따른 비트 플레인 기반 부호화 방법을 도시한다. FIG. 6B illustrates a bit plane-based encoding method according to an embodiment of the present invention.

도 7은 본 발명의 또 다른 실시예에 따른 영상 부호화 장치를 도시한다.FIG. 7 illustrates an image encoding apparatus according to another embodiment of the present invention.

도 8은 본 발명의 일 실시예에 따른 영상 복호화 장치를 도시한다.FIG. 8 illustrates an image decoding apparatus according to an embodiment of the present invention.

도 9는 본 발명의 또 다른 실시예에 따른 영상 복호화 장치를 도시한다.FIG. 9 illustrates an image decoding apparatus according to another embodiment of the present invention.

도 10은 본 발명의 일 실시예에 따른 영상 부호화 방법을 설명하기 위한 흐름도이다.10 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.

도 11은 본 발명의 또 다른 실시예에 따른 영상 부호화 방법을 설명하기 위한 흐름도이다.11 is a flowchart illustrating an image encoding method according to another embodiment of the present invention.

도 12는 본 발명의 일 실시예에 따른 영상 복호화 방법을 설명하기 위한 흐름도이다.12 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

도 13은 본 발명의 일 실시예에 따른 모드 정보 부호화 장치를 도시한다. FIG. 13 illustrates a mode information encoding apparatus according to an embodiment of the present invention.

도 14는 본 발명의 일 실시예에 따른 부호화 모드의 반복을 설명하기 위한 도면이다. 14 is a diagram for explaining repetition of an encoding mode according to an embodiment of the present invention.

도 15는 본 발명의 일 실시예에 따른 모드 정보 부호화 방법을 설명하기 위한 흐름도이다. 15 is a flowchart illustrating a mode information encoding method according to an embodiment of the present invention.

도 16은 본 발명의 또 다른 실시예에 따른 모드 정보 부호화 방법을 설명하기 위한 흐름도이다. 16 is a flowchart illustrating a mode information encoding method according to another embodiment of the present invention.

도 17은 본 발명의 또 다른 실시예에 따른 모드 정보 부호화 방법을 설명하기 위한 흐름도이다. 17 is a flowchart illustrating a mode information encoding method according to another embodiment of the present invention.

도 18은 본 발명의 또 다른 실시예에 따른 모드 정보 부호화 방법을 설명하기 위한 흐름도이다. 18 is a flowchart for explaining a mode information encoding method according to another embodiment of the present invention.

도 19는 본 발명의 일 실시예에 따른 모드 정보 복호화 장치를 도시한다.FIG. 19 illustrates a mode information decoding apparatus according to an embodiment of the present invention.

도 20은 본 발명의 일 실시예에 따른 모드 정보 복호화 방법을 설명하기 위한 흐름도이다. 20 is a flowchart illustrating a mode information decoding method according to an embodiment of the present invention.

도 21은 본 발명의 일 실시예에 따른 모드 정보 복호화 방법을 설명하기 위한 흐름도이다. FIG. 21 is a flowchart illustrating a mode information decoding method according to an embodiment of the present invention. Referring to FIG.

도 22는 본 발명의 또 다른 실시예에 따른 모드 정보 복호화 방법을 설명하기 위한 흐름도이다. 22 is a flowchart illustrating a mode information decoding method according to another embodiment of the present invention.

도 23은 본 발명의 또 다른 실시예에 따른 모드 정보 복호화 방법을 설명하기 위한 흐름도이다. 23 is a flowchart illustrating a mode information decoding method according to another embodiment of the present invention.

Claims (17)

소정의 부호화 모드의 반복 횟수에 대한 정보에 기초해 현재 블록의 부호화 모드가 연속된 복수의 이전 블록의 부호화 모드와 동일한지 판단하는 단계;Determining whether a coding mode of a current block is the same as a coding mode of a plurality of previous previous blocks based on information on a repetition number of a predetermined coding mode; 상기 판단 결과, 동일한 것으로 판단되면, 상기 복수의 이전 블록의 복호화 모드와 동일하게 상기 현재 블록의 복호화 모드를 결정하는 단계; 및Determining a decoding mode of the current block in the same manner as the decoding modes of the plurality of previous blocks if it is determined to be the same; And 상기 판단 결과, 동일하지 않은 것으로 판단되면, 상기 현재 블록이 제1 모드에 따라 부호화되었는지 나타내는 제1 정보 및 상기 현재 블록이 다른 모드들 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 파싱하여 상기 현재 블록의 복호화 모드를 결정하는 단계를 포함하고, If it is determined that the current block is not the same as the current block, the first information indicating whether the current block is coded according to the first mode and the second information indicating whether the current block is coded according to which mode among the other modes are parsed, Determining a decoding mode of the block, 상기 제1 모드는 상기 제1 블록이 상기 제1 블록에 인접한 이전에 부호화된 제2 블록과 동일하여 상기 제1 모드에 따라 부호화되었음을 나타내는 정보를 상기 제1 블록의 픽셀 값 대신에 부호화하는 모드인 것을 특징으로 하는 모드 정보 복호화 방법.Wherein the first mode is a mode for coding the information indicating that the first block is encoded in accordance with the first mode, which is the same as the previously encoded second block adjacent to the first block, instead of the pixel value of the first block And decodes the mode information. 제 1 항에 있어서, 상기 제1 정보 및 상기 제2 정보를 파싱하여 상기 현재 블록의 복호화에 이용될 모드를 결정하는 단계는2. The method of claim 1, wherein determining a mode to be used for decoding the current block by parsing the first information and the second information comprises: 상기 제1 정보를 파싱하는 단계;Parsing the first information; 상기 제1 정보의 파싱 결과, 상기 현재 블록이 제1 모드에 따라 부호화되지 않은 것으로 판단되면, 상기 현재 블록이 제2 모드 및 제3 모드 중 어떤 모드에 따 라 부호화되었는지 나타내는 제2 정보를 파싱하는 단계; 및Parsing the second information indicating whether the current block is coded according to the mode of the second mode or the third mode if it is determined that the current block is not coded according to the first mode as a result of parsing the first information step; And 상기 제1 정보 및 제2 정보 중 적어도 하나의 복호화 결과에 기초해 상기 현재 블록의 복호화 모드를 결정하는 단계를 포함하는 것을 특징으로 하는 모드 정보 복호화 방법.And determining a decoding mode of the current block based on at least one decoding result of the first information and the second information. 제 2 항에 있어서, 상기 제2 모드는 3. The method of claim 2, 상기 제1 블록의 픽셀 값들을 이산 코사인 변환하고, 이산 코사인 결과 생성된 계수들을 최상위 비트로부터 최하위 비트까지의 복수의 비트 플레인(bit plane)으로 나누어 비트 플레인 단위로 부호화하는 모드인 것을 특징으로 하는 모드 정보 복호화 방법.A mode in which the pixel values of the first block are subjected to discrete cosine transform and the coefficients generated as a result of the discrete cosine are divided into a plurality of bit planes from the most significant bit to the least significant bit and encoded in bit plane units. Information decoding method. 제 2 항에 있어서, 상기 제3 모드는 3. The method of claim 2, wherein the third mode 상기 제1 블록의 픽셀 값들을 최상위 비트로부터 최하위 비트까지의 복수의 비트 플레인으로 나누어 비트 플레인 단위로 부호화하는 모드인 것을 특징으로 하는 모드 정보 복호화 방법.And dividing the pixel values of the first block into a plurality of bit planes from a most significant bit to a least significant bit, and encoding the pixel values in units of bit planes. 제 1 항에 있어서, 상기 소정 부호화 모드의 반복 횟수에 대한 정보는 2. The method of claim 1, wherein the information on the number of repetitions of the predetermined encoding mode is 연속된 두 개의 블록에 대해 동일한 부호화 모드가 반복되면, 부호화 모드가 동일한 세 번째 이후의 블록들에 대해 상기 제1 정보 및 상기 제2 정보를 대신해 파싱되는 정보인 것을 특징으로 하는 모드 정보 복호화 방법.Wherein when the same encoding mode is repeated for two consecutive blocks, the information is parsed in place of the first information and the second information for the third and subsequent blocks having the same encoding mode. 제 5 항에 있어서, 상기 소정 부호화 모드의 반복 횟수에 대한 정보는6. The method of claim 5, wherein the information on the number of repetitions of the predetermined encoding mode is 상기 현재 블록의 부호화에 이용될 수 있는 복수의 부호화 모드 각각에 대한 반복 횟수에 대한 정보 중 적어도 하나를 포함하는 것을 특징으로 하는 모드 정보 복호화 방법.And information on the number of repetitions of each of the plurality of encoding modes that can be used for encoding the current block. 현재 블록의 부호화 모드를 결정하는 단계;Determining a coding mode of the current block; 상기 결정된 현재 블록의 부호화 모드가 연속된 복수의 이전 블록의 부호화 모드와 동일한지 판단하는 단계;Determining whether a coding mode of the determined current block is the same as a coding mode of a plurality of consecutive previous blocks; 상기 판단 결과, 동일한 것으로 판단되면, 상기 현재 블록의 부호화 모드에 대한 정보 대신에 상기 동일한 부호화 모드의 반복 횟수에 대한 정보를 부호화하는 단계; 및Encoding the information on the number of repetitions of the same encoding mode instead of information on the encoding mode of the current block if it is determined to be the same as the determination result; And 상기 판단 결과, 동일하지 않은 것으로 판단되면, 상기 현재 블록이 제1 모드에 따라 부호화되었는지 나타내는 제1 정보 및 상기 현재 블록이 다른 모드들 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 부호화하는 단계를 포함하고, If it is determined that the current block is coded according to the first mode and the second information indicating that the current block is coded according to the mode among the other modes, Including, 상기 제1 모드는 상기 제1 블록이 상기 제1 블록에 인접한 이전에 부호화된 제2 블록과 동일하여 상기 제1 모드에 따라 부호화되었음을 나타내는 정보를 상기 제1 블록의 픽셀 값 대신에 부호화하는 모드인 것을 특징으로 하는 모드 정보 부호화 방법.Wherein the first mode is a mode for coding the information indicating that the first block is encoded in accordance with the first mode, which is the same as the previously encoded second block adjacent to the first block, instead of the pixel value of the first block And a mode information encoding step of encoding the mode information. 제 7 항에 있어서, 상기 제1 정보 및 상기 제2 정보를 부호화하는 단계는8. The method of claim 7, wherein encoding the first information and the second information comprises: 상기 제1 정보를 부호화하는 단계;Encoding the first information; 상기 현재 블록이 제1 모드에 따라 부호화되지 않은 것으로 판단되면, 상기 현재 블록이 제2 모드 및 제3 모드 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 부호화하는 단계를 포함하는 것을 특징으로 하는 모드 정보 부호화 방법.And encoding the second information indicating whether the current block is coded according to a mode of the second mode or the third mode if it is determined that the current block is not coded according to the first mode, Information encoding method. 제 8 항에 있어서, 상기 제2 모드는 9. The method of claim 8, wherein the second mode 상기 제1 블록의 픽셀 값들을 이산 코사인 변환하고, 이산 코사인 결과 생성된 계수들을 최상위 비트로부터 최하위 비트까지의 복수의 비트 플레인(bit plane)으로 나누어 비트 플레인 단위로 부호화하는 모드인 것을 특징으로 하는 모드 정보 부호화 방법.A mode in which the pixel values of the first block are subjected to discrete cosine transform and the coefficients generated as a result of the discrete cosine are divided into a plurality of bit planes from the most significant bit to the least significant bit and encoded in bit plane units. Information encoding method. 제 8 항에 있어서, 상기 제3 모드는 9. The method of claim 8, wherein the third mode 상기 제1 블록의 픽셀 값들을 최상위 비트로부터 최하위 비트까지의 복수의 비트 플레인으로 나누어 비트 플레인 단위로 부호화하는 모드인 것을 특징으로 하는 모드 정보 부호화 방법.Dividing the pixel values of the first block into a plurality of bit planes from a most significant bit to a least significant bit, and encoding the pixel values in units of bit planes. 제 7 항에 있어서, 상기 동일한 부호화 모드의 반복 횟수에 대한 정보는 8. The method of claim 7, wherein the information on the number of repetitions of the same encoding mode is 연속된 두 개의 블록에 대해 상기 동일한 부호화 모드가 반복되면, 부호화 모드가 동일한 세 번째 이후의 블록들에 대해 상기 제1 정보 및 제2 정보를 대신해 부호화되는 정보인 것을 특징으로 하는 모드 정보 부호화 방법.Wherein when the same encoding mode is repeated for two consecutive blocks, the information is encoded in place of the first information and the second information for the third and subsequent blocks having the same encoding mode. 제 11 항에 있어서, 상기 동일한 부호화 모드의 반복 횟수에 대한 정보는12. The method of claim 11, wherein the information on the number of repetitions of the same encoding mode is 상기 현재 블록의 복호화에 이용될 수 있는 복수의 부호화 모드 각각에 대한 반복 횟수에 대한 정보 중 적어도 하나를 포함하는 것을 특징으로 하는 모드 정보 부호화 방법.And information on a repetition number of each of the plurality of encoding modes that can be used for decoding the current block. 소정의 부호화 모드의 반복 횟수에 대한 정보에 기초해 현재 블록의 부호화 모드가 연속된 복수의 이전 블록의 부호화 모드와 동일한지 판단하는 런판단부; 및An execution determiner for determining whether a coding mode of the current block is the same as a coding mode of a plurality of preceding previous blocks based on information on the number of repetition of a predetermined coding mode; And 상기 판단 결과, 동일한 것으로 판단되면, 상기 복수의 이전 블록의 복호화 모드와 동일하게 상기 현재 블록의 복호화 모드를 결정하고, 상기 판단 결과, 동일하지 않은 것으로 판단되면, 상기 현재 블록이 제1 모드에 따라 부호화되었는지 나타내는 제1 정보 및 상기 현재 블록이 다른 모드들 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보에 기초해 상기 현재 블록의 복호화 모드를 결정하는 모드 결정부를 포함하고, If it is determined that the current block is not the same as the current block, the decoding mode of the current block is determined in the same manner as the decoding modes of the plurality of previous blocks. If it is determined that the current block is not the same, And a mode determiner for determining a decoding mode of the current block based on first information indicating whether the current block is coded and second information indicating which mode the current block is coded according to another mode, 상기 제1 모드는 상기 제1 블록이 상기 제1 블록에 인접한 이전에 부호화된 제2 블록과 동일하여 상기 제1 모드에 따라 부호화되었음을 나타내는 정보를 상기 제1 블록의 픽셀 값 대신에 부호화하는 모드인 것을 특징으로 하는 모드 정보 복호화 장치.Wherein the first mode is a mode for coding the information indicating that the first block is encoded in accordance with the first mode, which is the same as the previously encoded second block adjacent to the first block, instead of the pixel value of the first block And outputs the mode information. 제 13 항에 있어서, 상기 소정 부호화 모드의 반복 횟수에 대한 정보는 14. The method of claim 13, wherein the information on the number of repetitions of the predetermined encoding mode is 연속된 두 개의 블록에 대해 동일한 부호화 모드가 반복되면, 부호화 모드가 동일한 세 번째 이후의 블록들에 대해 상기 제1 정보 및 상기 제2 정보를 대신해 파싱되는 정보인 것을 특징으로 하는 모드 정보 복호화 장치.Wherein the information is parsed in place of the first information and the second information for the third and subsequent blocks having the same encoding mode if the same encoding mode is repeated for two consecutive blocks. 결정된 현재 블록의 부호화 모드가 연속된 복수의 이전 블록의 부호화 모드와 동일한지 판단하는 런판단부;An execution determiner for determining whether a coding mode of the determined current block is the same as a coding mode of a plurality of consecutive previous blocks; 상기 판단 결과, 동일한 것으로 판단되면, 상기 현재 블록의 부호화 모드에 대한 정보 대신에 상기 동일한 부호화 모드의 반복 횟수에 대한 정보를 부호화하는 런부호화부;A puncturing unit that encodes the information on the number of repetitions of the same encoding mode instead of the information on the encoding mode of the current block, 상기 판단 결과, 동일하지 않은 것으로 판단되면, 상기 현재 블록이 제1 모드에 따라 부호화되었는지 나타내는 제1 정보 부호화부; 및A first information encoding unit for indicating whether the current block is coded according to a first mode if it is determined that the current block is not the same; And 상기 현재 블록이 다른 모드들 중 어떤 모드에 따라 부호화되었는지 나타내는 제2 정보를 부호화하는 제2 정보 부호화부를 포함하고, And a second information encoding unit encoding second information indicating which mode of the current block is encoded according to the mode, 상기 제1 모드는 상기 제1 블록이 상기 제1 블록에 인접한 이전에 부호화된 제2 블록과 동일하여 상기 제1 모드에 따라 부호화되었음을 나타내는 정보를 상기 제1 블록의 픽셀 값 대신에 부호화하는 모드인 것을 특징으로 하는 모드 정보 부호 화 장치.Wherein the first mode is a mode for coding the information indicating that the first block is encoded in accordance with the first mode, which is the same as the previously encoded second block adjacent to the first block, instead of the pixel value of the first block And outputs the mode information. 제 15 항에 있어서, 상기 동일한 부호화 모드의 반복 횟수에 대한 정보는 16. The method of claim 15, wherein the information on the number of repetitions of the same encoding mode is 연속된 두 개의 블록에 대해 상기 동일한 부호화 모드가 반복되면, 부호화 모드가 동일한 세 번째 이후의 블록들에 대해 상기 제1 정보 및 제2 정보를 대신해 부호화되는 정보인 것을 특징으로 하는 모드 정보 부호화 장치.Wherein when the same encoding mode is repeated for two consecutive blocks, the information is encoded in place of the first information and the second information for the third and subsequent blocks having the same encoding mode. 제 1 항 내지 제 12 항 중 어느 한 항의 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.A computer-readable recording medium storing a program for executing the method according to any one of claims 1 to 12.
KR1020090128343A 2009-07-28 2009-12-21 Method and apparatus for encoding/decoding mode information KR101631274B1 (en)

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
US22902409P 2009-07-28 2009-07-28
US61/229,024 2009-07-28
US24321809P 2009-09-17 2009-09-17
US61/243,218 2009-09-17
US24413909P 2009-09-21 2009-09-21
US61/244,139 2009-09-21
US25760909P 2009-11-03 2009-11-03
US61/257,609 2009-11-03

Publications (2)

Publication Number Publication Date
KR20110011499A KR20110011499A (en) 2011-02-08
KR101631274B1 true KR101631274B1 (en) 2016-06-17

Family

ID=43771695

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1020090115931A KR101710622B1 (en) 2009-07-28 2009-11-27 Method and apparatus for encoding/decoding image based on skip mode
KR1020090128343A KR101631274B1 (en) 2009-07-28 2009-12-21 Method and apparatus for encoding/decoding mode information

Family Applications Before (1)

Application Number Title Priority Date Filing Date
KR1020090115931A KR101710622B1 (en) 2009-07-28 2009-11-27 Method and apparatus for encoding/decoding image based on skip mode

Country Status (1)

Country Link
KR (2) KR101710622B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130022923A (en) * 2011-08-26 2013-03-07 삼성전자주식회사 Apparatus and method for encoding/decoding using virtual view synthesis prediction
KR200486325Y1 (en) 2016-06-01 2018-05-03 주식회사 천류 The fishline rack for fising rod

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100452883C (en) * 2001-12-17 2009-01-14 微软公司 Skip macroblock coding
JP4542107B2 (en) * 2005-07-22 2010-09-08 三菱電機株式会社 Image decoding apparatus and image decoding method
KR100736096B1 (en) * 2005-12-12 2007-07-06 삼성전자주식회사 Method and apparatus for encoding and decoding video signal by group
US8964851B2 (en) * 2009-06-09 2015-02-24 Sony Corporation Dual-mode compression of images and videos for reliable real-time transmission
JP5841944B2 (en) * 2009-09-04 2016-01-13 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. Scalable image encoding and decoding

Also Published As

Publication number Publication date
KR20110011499A (en) 2011-02-08
KR20110011496A (en) 2011-02-08
KR101710622B1 (en) 2017-02-28

Similar Documents

Publication Publication Date Title
US8588307B2 (en) Method and apparatus for encoding and decoding mode information
JP5957562B2 (en) Video encoding / decoding method and apparatus using large size transform unit
KR101631280B1 (en) Method and apparatus for decoding image based on skip mode
KR101695681B1 (en) Context-based adaptive binary arithmetic coding (cabac) video stream compliance
JP4837047B2 (en) Method and apparatus for encoding and decoding video signals in groups
KR20100102386A (en) Method and apparatus for encoding/decoding image based on residual value static adaptive code table selection
JP5855139B2 (en) Method for decoding a picture in the form of a bitstream
KR101631274B1 (en) Method and apparatus for encoding/decoding mode information
KR101703330B1 (en) Method and apparatus for re-encoding an image
KR101631278B1 (en) Method and apparatus for encoding/decoding mode information
JP4919213B2 (en) Digital watermark insertion method and detection method
KR101631277B1 (en) Method and apparatus for encoding/decoding image based on skip mode
Cyriac et al. Medical image compression using visual quantization and modified run length encoding

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

Year of fee payment: 4