KR101994216B1 - A method and an apparatus for decoding a video signal - Google Patents

A method and an apparatus for decoding a video signal Download PDF

Info

Publication number
KR101994216B1
KR101994216B1 KR1020170161466A KR20170161466A KR101994216B1 KR 101994216 B1 KR101994216 B1 KR 101994216B1 KR 1020170161466 A KR1020170161466 A KR 1020170161466A KR 20170161466 A KR20170161466 A KR 20170161466A KR 101994216 B1 KR101994216 B1 KR 101994216B1
Authority
KR
South Korea
Prior art keywords
transform
block
conversion
current block
size
Prior art date
Application number
KR1020170161466A
Other languages
Korean (ko)
Other versions
KR20170134300A (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 KR20170134300A publication Critical patent/KR20170134300A/en
Application granted granted Critical
Publication of KR101994216B1 publication Critical patent/KR101994216B1/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/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • 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
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/18Methods 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 a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process

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

본 발명은, 비디오 신호로부터 현재 매크로블록의 변환 크기 플래그 획득하는 단계; 상기 변환 크기 플래그에 대응되는 제 1 변환 블록에 대해, 상기 제 1 변환 블록 내 각 픽셀 위치에서 0이 아닌 변환 계수(non-zero transform coefficient)의 개수를 확인하는 단계; 상기 제 1 변환 블록 내에서 0이 아닌 변환계수의 개수가 가장 많은 픽셀의 위치를 우선순위로 하여 상기 제 1 변환 블록의 스캔 오더를 변경하는 단계; 제 2 변환 블록 내 각 픽셀 위치에서 0이 아닌 변환 계수의 개수를 결정하고, 상기 제 1 변환 블록의 변경된 스캔 오더를 상기 제 2 변환 블록의 초기화된 스캔 오더로 설정하는 단계; 상기 제 1 변환 블록 내 각 픽셀 위치에서의 0이 아닌 변환 계수의 개수와 상기 제 2 변환 블록 내 각 픽셀 위치에서의 0이 아닌 변환 계수의 개수를 더하고 가장 많은 개수를 가진 픽셀의 위치를 우선순위로 하여 상기 제 2 변환 블록의 스캔 오더를 변경하는 단계; 및 상기 변경된 스캔 오더에 따라 배열된 변환 계수를 디코딩하는 단계를 포함하되, 상기 제 1 변환 블록과 상기 제 2 변환 블록은 상기 변환 크기 플래그에 대응되는 크기를 가지고, 상기 현재 매크로블록에 포함되는 것을 특징으로 하는 비디오 신호의 디코딩 방법을 제공한다.The present invention provides a method comprising: obtaining a transform size flag of a current macroblock from a video signal; Confirming, for a first transform block corresponding to the transform magnitude flag, the number of non-zero transform coefficients at each pixel position in the first transform block; Changing a scan order of the first transform block with a position of a pixel having a largest number of non-zero transform coefficients in the first transform block as a priority; Determining the number of non-zero transform coefficients at each pixel location in the second transform block and setting the modified scan order of the first transform block to an initialized scan order of the second transform block; The number of non-zero transform coefficients at each pixel position in the first transform block and the number of non-zero transform coefficients at each pixel position in the second transform block are added, and the position of the pixel having the largest number is added to the priority Changing a scan order of the second transform block; And decoding the transform coefficients arranged according to the changed scan order, wherein the first transform block and the second transform block have a size corresponding to the transform magnitude flag, and the transform coefficients included in the current macroblock The present invention provides a decoding method of a video signal.

Description

비디오 신호의 디코딩 방법 및 장치{A METHOD AND AN APPARATUS FOR DECODING A VIDEO SIGNAL}TECHNICAL FIELD [0001] The present invention relates to a method and apparatus for decoding a video signal,

본 발명은 비디오 신호의 디코딩 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for decoding a video signal.

압축 부호화란 디지털화한 정보를 통신 회선을 통해 전송하거나, 저장 매체에 적합한 형태로 저장하는 일련의 신호 처리 기술을 의미한다. 압축 부호화의 대상에는 음성, 영상, 문자 등의 대상이 존재하며, 특히 영상을 대상으로 압축 부호화를 수행하는 기술을 비디오 영상 압축이라고 일컫는다. 비디오 영상의 일반적인 특징은 공간적 중복성, 시간적 중복성을 지니고 있는 점에 특징이 있다.The compression coding means a series of signal processing techniques for transmitting digitized information through a communication line or storing the information in a form suitable for a storage medium. The target of compression coding includes objects such as voice, image, and character. In particular, the technique of performing compression coding on an image is referred to as video image compression. A typical feature of video images is characterized by spatial redundancy and temporal redundancy.

이와 같이 공간적 중복성 및 시간적 중복성을 충분히 제거하지 않으면, 비디오 신호를 부호화하는 데 있어서 압축률이 낮아질 뿐만 아니라, 공간적 중복성 및 시간적 중복성을 과도하게 제거하는 경우, 비디오 신호를 디코딩하는 데 있어서 필요한 정보를 생성하지 못하기 때문에 복원율이 나빠지는 문제점이 있었다.If the spatial redundancy and the temporal redundancy are not sufficiently removed, not only the compression rate is lowered in coding the video signal, but also the spatial redundancy and the temporal redundancy are excessively eliminated, the information necessary for decoding the video signal is not generated There is a problem that the restoration rate is deteriorated.

본 발명은, 비디오 신호로부터 현재 매크로블록의 변환 크기 플래그 획득하는 단계; 상기 변환 크기 플래그에 대응되는 제 1 변환 블록에 대해, 상기 제 1 변환 블록 내 각 픽셀 위치에서 0이 아닌 변환 계수(non-zero transform coefficient)의 개수를 확인하는 단계; 상기 제 1 변환 블록 내에서 0이 아닌 변환계수의 개수가 가장 많은 픽셀의 위치를 우선순위로 하여 상기 제 1 변환 블록의 스캔 오더를 변경하는 단계; 제 2 변환 블록 내 각 픽셀 위치에서 0이 아닌 변환 계수의 개수를 결정하고, 상기 제 1 변환 블록의 변경된 스캔 오더를 상기 제 2 변환 블록의 초기화된 스캔 오더로 설정하는 단계; 상기 제 1 변환 블록 내 각 픽셀 위치에서의 0이 아닌 변환 계수의 개수와 상기 제 2 변환 블록 내 각 픽셀 위치에서의 0이 아닌 변환 계수의 개수를 더하고 가장 많은 개수를 가진 픽셀의 위치를 우선순위로 하여 상기 제 2 변환 블록의 스캔 오더를 변경하는 단계; 및 상기 변경된 스캔 오더에 따라 배열된 변환 계수를 디코딩하는 단계를 포함하되, 상기 제 1 변환 블록과 상기 제 2 변환 블록은 상기 변환 크기 플래그에 대응되는 크기를 가지고, 상기 현재 매크로블록에 포함되는 것을 특징으로 하는 비디오 신호의 디코딩 방법을 제공한다.The present invention provides a method comprising: obtaining a transform size flag of a current macroblock from a video signal; Confirming, for a first transform block corresponding to the transform magnitude flag, the number of non-zero transform coefficients at each pixel position in the first transform block; Changing a scan order of the first transform block with a position of a pixel having a largest number of non-zero transform coefficients in the first transform block as a priority; Determining the number of non-zero transform coefficients at each pixel location in the second transform block and setting the modified scan order of the first transform block to an initialized scan order of the second transform block; The number of non-zero transform coefficients at each pixel position in the first transform block and the number of non-zero transform coefficients at each pixel position in the second transform block are added, and the position of the pixel having the largest number is added to the priority Changing a scan order of the second transform block; And decoding the transform coefficients arranged according to the changed scan order, wherein the first transform block and the second transform block have a size corresponding to the transform magnitude flag, and the transform coefficients included in the current macroblock The present invention provides a decoding method of a video signal.

또한, 본 발명은, 상기 현재 매크로블록 내 각 변환 블록에 대해 스캔 오더를 초기화할지 여부를 나타내는 스캔 오더 초기화 플래그 정보를 획득하는 단계를 더 포함하되, 상기 스캔 오더 초기화 플래그 정보가 각 변환 블록에 대해 스캔 오더를 초기화할 것을 지시하는 경우, 상기 제 2 변환 블록의 초기화된 스캔 오더가 상기 제 1 변환 블록의 변경된 스캔 오더로 설정되는 것을 특징으로 한다.The present invention further includes a step of acquiring scan order initialization flag information indicating whether to initialize a scan order for each transform block in the current macroblock, The initialized scan order of the second conversion block is set to the changed scan order of the first conversion block when instructing to initialize the scan order.

또한, 본 발명에서, 상기 변환 크기 플래그 정보는 복수개인 것을 특징으로 한다.Further, in the present invention, the conversion size flag information is plural.

또한, 본 발명에서, 상기 변환 크기 플래그 정보는 16x16 블록 단위로 변환 과정을 수행하는지 아니면 그보다 작은 블록 단위로 변환 과정을 수행하는지 여부를 나타내는 제 1 변환 크기 플래그 정보와, 8x8 블록 단위로 변환 과정을 수행하는지 아니면 4x4 블록 단위로 변환 과정을 수행하는지 여부를 나타내는 제 2 변환 크기 플래그 정보를 포함하는 것을 특징으로 한다.Also, in the present invention, the conversion size flag information may include first conversion size flag information indicating whether the conversion process is performed on a 16x16 block basis or on a smaller block basis, and a conversion process on an 8x8 block basis Second conversion size flag information indicating whether the conversion is performed in units of 4x4 blocks or not.

또한, 본 발명에서, 상기 제 1 변환 크기 플래그 정보가 16x16 블록 단위보다 작은 블록 단위로 변환 과정을 수행할 것을 나타내고, 상기 제 2 변환 크기 플래그 정보가 8x8 블록 단위로 변환 과정을 수행할 것을 나타내는 경우, 상기 제 1 변환 블록과 상기 제 2 변환 블록은 8x8 크기의 블록에 대응되는 것을 특징으로 한다.Also, in the present invention, it is shown that the first conversion size flag information is converted into a block unit smaller than a 16x16 block unit, and when the second conversion size flag information indicates conversion processing to an 8x8 block unit , And the first transform block and the second transform block correspond to an 8x8 block.

또한, 본 발명은, 상기 비디오 신호로부터 변환 타입을 나타내는 변환 타입 플래그 정보를 획득하는 단계를 더 포함하되, 상기 변환 계수를 디코딩하는 단계는, 상기 변환 타입 플래그 정보에 기초하여 이산 여현 변환(DCT) 또는 카루넨-루브 변환(KLT)을 이용하는 것을 특징으로 한다.Further, the present invention further includes a step of obtaining conversion type flag information indicating a conversion type from the video signal, wherein the step of decoding the conversion coefficient includes a DCT (DCT) Or Karunen-Loove transformation (KLT).

또한, 본 발명에서, 상기 변환 타입 플래그 정보가 카루넨-루브 변환(KLT)을 이용할 것을 나타내고 상기 현재 매크로블록의 블록 타입이 인트라 블록을 나타내는 경우, 카루넨-루브 변환(KLT)을 이용하여 상기 변환 계수를 디코딩하는 것을 특징으로 한다.Further, in the present invention, when the conversion type flag information indicates that the Karunen-Loove transform (KLT) is used and the block type of the current macroblock indicates an intra block, the Karunen-Loove transform (KLT) And decodes the transform coefficient.

또한, 본 발명은, 비디오 신호로부터 현재 매크로블록의 변환 크기 플래그를 획득하는 엔트로피 디코딩부; 상기 변환 크기 플래그에 대응되는 제 1 변환 블록에 대해, 상기 제 1 변환 블록 내 각 픽셀 위치에서 0이 아닌 변환 계수(non-zero transform coefficient)의 개수를 확인하고, 상기 제 1 변환 블록 내에서 0이 아닌 변환계수의 개수가 가장 많은 픽셀의 위치를 우선순위로 하여 상기 제 1 변환 블록의 스캔 오더를 변경하는 제 1 스캔 오더 변경부; 제 2 변환 블록 내 각 픽셀 위치에서 0이 아닌 변환 계수의 개수를 결정하고, 상기 제 1 변환 블록의 변경된 스캔 오더를 상기 제 2 변환 블록의 초기화된 스캔 오더로 설정하고, 상기 제 1 변환 블록 내 각 픽셀 위치에서의 0이 아닌 변환 계수의 개수와 상기 제 2 변환 블록 내 각 픽셀 위치에서의 0이 아닌 변환 계수의 개수를 더하고 가장 많은 개수를 가진 픽셀의 위치를 우선순위로 하여 상기 제 2 변환 블록의 스캔 오더를 변경하는 제 2 스캔 오더 변경부; 및 상기 변경된 스캔 오더에 따라 배열된 변환 계수를 디코딩하는 변환 디코딩부를 포함하되, 상기 제 1 변환 블록과 상기 제 2 변환 블록은 상기 변환 크기 플래그에 대응되는 크기를 가지고, 상기 현재 매크로블록에 포함되는 것을 특징으로 하는 비디오 신호의 디코딩 장치를 제공한다.Further, the present invention provides an apparatus comprising: an entropy decoding unit for obtaining a conversion size flag of a current macroblock from a video signal; Checking the number of non-zero transform coefficients at each pixel position in the first transform block for a first transform block corresponding to the transform magnitude flag, A first scan order change unit changing a scan order of the first transform block with a position of a pixel having a largest number of transform coefficients as a priority; Determining the number of non-zero transform coefficients at each pixel position in the second transform block, setting the changed scan order of the first transform block to an initialized scan order of the second transform block, The number of non-zero transform coefficients at each pixel position and the number of non-zero transform coefficients at each pixel position in the second transform block are added, and the position of the pixel having the largest number is added to the second transform A second scan order changing unit for changing a scan order of a block; And a transform decoding unit for decoding the transform coefficients arranged according to the changed scan order, wherein the first transform block and the second transform block have a size corresponding to the transform magnitude flag, And a decoding unit for decoding the video signal.

본 발명은 변환 과정에서 이용되는 단위 블록의 크기를 다양하게 정의함으로써 코딩 효율을 향상시킬 수 있다.The present invention can improve the coding efficiency by variously defining the sizes of the unit blocks used in the conversion process.

또한, 본 발명은 변환 과정에서 이용되는 단위 블록의 크기를 나타내는 플래그 정보를 정의함으로써 코딩 효율을 향상시킬 수 있다.Further, the present invention can improve coding efficiency by defining flag information indicating the size of a unit block used in the conversion process.

또한, 본 발명은 변환 타입을 나타내는 플래그를 정의하고, 그에 따라 이산여현변환(Discrete Cosine Transform, 이하 'DCT'라 함) 또는 카루넨-루브 변환(Karhunen-Loeve Transform, 이하 'KLT'라 함)을 사용함으로써 코딩 효율을 향상시킬 수 있다.In addition, the present invention defines a flag indicating a conversion type and performs a discrete cosine transform (DCT) or a Karhunen-Loeve transform (KLT) The coding efficiency can be improved.

또한, 본 발명은 매크로블록의 예측 모드에 따라 DCT 또는 KLT를 사용함으로써 코딩 효율을 향상시킬 수 있다.Further, the present invention can improve the coding efficiency by using DCT or KLT according to the prediction mode of the macroblock.

또한, 본 발명은 변환 과정에서 이용되는 단위 블록의 크기를 레지듀얼 블록의 크기보다 작거나 같도록 설정하여 적응적으로 이용함으로써 코딩 효율을 향상시킬 수 있다.Also, the present invention can improve the coding efficiency by adaptively using the size of the unit block used in the conversion process by setting the size of the unit block to be less than or equal to the size of the residual block.

또한, 본 발명은 인트라 예측 모드로 코딩된 매크로블록의 각 변환 블록마다 다른 변환 커널(transform kernel)을 사용함으로써 코딩 효율을 향상시킬 수 있다.In addition, the present invention can improve the coding efficiency by using different transform kernels for each transform block of the macroblock coded in the intra-prediction mode.

또한, 본 발명은 매크로블록의 각 변환 블록마다 스캐닝 오더(scanning order)를 업데이트함으로써 코딩 효율을 향상시킬 수 있다.In addition, the present invention can improve the coding efficiency by updating the scanning order for each transform block of the macroblock.

또한, 본 발명은 0이 아닌 변환계수레벨의 포함 여부를 나타내는 정보의 중복성을 제거함으로써 코딩 효율을 향상시킬 수 있다.In addition, the present invention can improve the coding efficiency by eliminating redundancy of information indicating whether or not a non-zero transform coefficient level is included.

상기 발명들은 16x16 매크로블록보다 큰 매크로블록 기반의 인코딩 및 디코딩 과정에서 사용될 경우 코딩 효율을 더욱 향상시킬 수 있다.The above inventions can further improve coding efficiency when used in a macro-block-based encoding and decoding process that is larger than a 16x16 macroblock.

도 1은 본 발명이 적용되는 실시예로서, 비디오 신호 디코딩 장치의 개략적인 블록도를 나타낸다.
도 2, 도 3A 및 도 3B는 본 발명이 적용되는 실시예들로서, 플래그 정보에 기초하여 변환 과정에서 이용되는 단위 블록의 크기를 결정하는 과정을 나타낸다.
도 4는 본 발명이 적용되는 실시예로서, 변환 타입을 나타내는 플래그 또는 매크로블록의 예측 모드에 기초하여 변환 방법(DCT 또는 KLT)을 결정하는 과정을 설명하기 위한 흐름도이다.
도 5는 본 발명이 적용되는 실시예로서, 변환 블록의 위치에 따라 다른 변환 커널(transform kernel)을 적용하는 새로운 모드 기반형 변환(Mode Dependent Directional Transform)을 설명하기 위한 개략적인 블록도를 나타낸다.
도 6은 본 발명이 적용되는 실시예로서, 변환 블록의 위치에 따라 다른 변환 커널(transform kernel)을 사용하는 구체적인 예를 나타낸다.
도 7은 본 발명이 적용되는 실시예로서, 변환 블록마다 스캔 오더(scan order)를 재배열하는 과정을 설명하기 위한 흐름도를 나타낸다.
도 8A 내지 도 8D는 본 발명이 적용되는 실시예들로서, 변환 블록마다 스캔 오더(scan order)를 재배열하는 과정을 설명하기 위한 구체적인 예를 나타낸다.
1 shows a schematic block diagram of a video signal decoding apparatus to which the present invention is applied.
FIGS. 2, 3A, and 3B illustrate a process of determining a size of a unit block used in a conversion process based on flag information according to embodiments of the present invention.
FIG. 4 is a flowchart for explaining a process of determining a conversion method (DCT or KLT) based on a prediction mode of a flag or a macroblock indicating a conversion type according to an embodiment to which the present invention is applied.
FIG. 5 is a schematic block diagram for explaining a new mode-dependent transformation according to an embodiment of the present invention, in which a transform kernel is applied according to a location of a transform block.
FIG. 6 shows a specific example in which a transform kernel is used according to the position of a transform block, to which the present invention is applied.
FIG. 7 is a flowchart illustrating a process of rearranging a scan order for each conversion block according to an embodiment of the present invention. Referring to FIG.
8A to 8D illustrate a specific example for explaining a process of rearranging a scan order for each conversion block according to embodiments of the present invention.

비디오 신호의 비트열 구성을 살펴보면, 동영상 부호화 처리 그 자체를 다루는 VCL(Video Coding Layer, 비디오 부호화 계층)과 부호화된 정보를 전송하고 저장하는 하위 시스템과의 사이에 있는 NAL(Network Abstraction Layer, 네트워크 추상 계층)이라는 분리된 계층 구조로 정의되어 있다. 부호화 과정의 출력은 VCL 데이터이고 전송하거나 저장하기 전에 NAL 단위로 맵핑된다. 각 NAL 단위는 압축된 비디오 데이터 또는 헤더 정보에 해당하는 데이터인 RBSP(Raw Byte Sequence Payload, 동영상 압축의 결과데이터)를 포함한다.In the bit stream structure of the video signal, there is a NAL (Network Abstraction Layer) between the VCL (Video Coding Layer), which handles the moving image encoding process itself, and a subsystem for transmitting and storing the encoded information, Layer). ≪ / RTI > The output of the encoding process is VCL data and is mapped to NAL units before transmission or storage. Each NAL unit includes RBSP (Raw Byte Sequence Payload), which is data corresponding to compressed video data or header information.

NAL 단위는 기본적으로 NAL헤더와 RBSP의 두 부분으로 구성된다. NAL 헤더에는 그 NAL 단위의 참조 픽쳐가 되는 슬라이스가 포함되어 있는지 여부를 나타내는 플래그 정보(nal_ref_idc)와 NAL 단위의 종류를 나타내는 식별자(nal_unit_type)가 포함되어 있다. RBSP 에는 압축된 원본의 데이터를 저장하며, RBSP 의 길이를 8비트의 배수로 표현하기 위해 RBSP 의 마지막에 RBSP 채워넣기 비트(RBSP trailing bit)를 첨가한다. 이러한 NAL 단위의 종류에는 IDR (Instantaneous Decoding Refresh, 순간 복호 리프레쉬) 픽쳐, SPS (Sequence Parameter Set, 시퀀스 파라미터 세트), PPS (Picture Parameter Set, 픽쳐 파라미터 세트), SEI (Supplemental Enhancement Information, 보충적 부가정보) 등이 있다.The NAL unit basically consists of two parts: the NAL header and the RBSP. The NAL header includes flag information (nal_ref_idc) indicating whether a slice serving as a reference picture of the NAL unit is included and an identifier (nal_unit_type) indicating the type of the NAL unit. The RBSP stores the compressed original data, and the RBSP trailing bit is added to the end of the RBSP to represent the length of the RBSP in multiples of 8 bits. Such NAL unit types include an IDR (Instantaneous Decoding Refresh) picture, a SPS (Sequence Parameter Set), a PPS (Picture Parameter Set), SEI (Supplemental Enhancement Information) .

또한, 규격에서는 대상 제품을 적당한 비용으로 구현 가능하도록 여러 가지 프로파일 및 레벨로 제약하고 있는데, 복호기는 해당 프로파일과 레벨에서 정해진 제약을 만족시켜야 한다. 이처럼 복호기가 어떤 압축 영상의 범위까지 대응할 수 있는지 그 기능 또는 파라미터를 나타내기 위해 프로파일과 레벨이라는 두 가지의 개념이 정의되었다. 비트스트림이 어떤 프로파일에 기초하는 것인가는 프로파일 식별자(profile_idc)로 식별할 수 있다. 프로파일 식별자란, 비트스트림이 기반을 둔 프로파일을 나타내는 플래그를 의미한다. 예를 들어, H.264/AVC 에서는 프로파일 식별자가 66 이면 베이스라인 프로파일에 기초함을 의미하고, 77 이면 메인 프로파일에 기초함을 의미하며, 88 이면 확장 프로파일에 기초함을 의미한다. 상기 프로파일 식별자는 시퀀스 파라미터 세트에 포함될 수 있다.In addition, the specification limits the target product to various profiles and levels so that it can be implemented at a reasonable cost. The decoder must satisfy the constraints defined in the profile and level. Two concepts are defined to represent the function or parameter of a compressed image so that the decoder can correspond to the range of the profile and the level. Which profile the bit stream is based on can be identified by a profile identifier (profile_idc). A profile identifier means a flag indicating a profile on which a bitstream is based. For example, in H.264 / AVC, if the profile identifier is 66, it means that it is based on the baseline profile, 77 means it is based on the main profile, and 88 means it is based on the extension profile. The profile identifier may be included in the sequence parameter set.

시퀀스 파라미터 세트란, 프로파일, 레벨 등 시퀀스 전체의 부호화에 걸쳐있는 정보가 포함되어 있는 헤더 정보를 말한다. 압축된 동영상 전체, 즉 시퀀스는 반드시 시퀀스 헤더로부터 시작하여야 하므로 헤더 정보에 상당하는 시퀀스 파라미터 세트는 그 파라미터 세트를 참조하는 데이터보다 먼저 복호기에 도착하여야 한다. 결국, 시퀀스 파라미터 세트 RBSP 는 동영상 압축의 결과 데이터에 대한 헤더 정보로써의 역할을 한다. 비트스트림이 입력되면, 먼저 프로파일 식별자는 입력된 비트스트림이 복수개의 프로파일 중에서 어떤 프로파일에 기초하는 것인지를 식별하게 된다. The sequence parameter set refers to header information including information extending over the encoding of the entire sequence, such as profile and level. Since the entire compressed moving picture, that is, the sequence must start from the sequence header, a sequence parameter set corresponding to the header information must arrive at the decoder before data referring to the parameter set. As a result, the sequence parameter set RBSP serves as header information for the resultant data of moving image compression. When a bitstream is input, the profile identifier first identifies which profile among the plurality of profiles the input bitstream is based on.

도 1은 본 발명이 적용되는 비디오 신호 디코딩 장치의 개략적인 블록도를 나타낸다.1 shows a schematic block diagram of a video signal decoding apparatus to which the present invention is applied.

도 1을 참조하면, 상기 디코딩 장치는 크게 엔트로피 디코딩부(100), 역양자화부(200), 역변환부(300), 인트라 예측부(400), 디블록킹 필터부(500), 복호 픽쳐 버퍼부(600), 인터 예측부(700) 등을 포함할 수 있다. 상기 역변환부(300)는 변환 크기 결정부(310), 스캔 오더 초기화부(320), 스캔 오더 변경부(330) 및 변환 디코딩부(340)을 포함한다.1, the decoding apparatus includes an entropy decoding unit 100, an inverse quantization unit 200, an inverse transform unit 300, an intra prediction unit 400, a deblocking filter unit 500, A prediction unit 600, an inter prediction unit 700, and the like. The inverse transformer 300 includes a transform size determining unit 310, a scan order initialization unit 320, a scan order changing unit 330, and a transform decoding unit 340.

먼저, 디코딩 장치에서는 수신된 비디오 영상을 복호하기 위하여 NAL 단위로 파싱을 수행한다. 일반적으로 하나 또는 그 이상의 시퀀스 파라미터 셋과 픽쳐 파라미터 셋이 슬라이스 헤더와 슬라이스 데이터가 디코딩되기 전에 디코더로 전송된다. 이 때 NAL 헤더 영역 또는 NAL 헤더의 확장 영역에는 여러 가지 속성 정보가 포함될 수 있다.First, the decoding apparatus performs parsing in units of NALs in order to decode the received video image. Typically, one or more sequence parameter sets and picture parameter sets are sent to the decoder before the slice header and slice data are decoded. At this time, the extended area of the NAL header area or the NAL header may include various attribute information.

파싱된 비트스트림은 엔트로피 디코딩부(100)를 통하여 엔트로피 디코딩되고, 각 매크로브록의 계수, 움직임 벡터 등이 추출된다. 역양자화부(200)에서는 엔트로피 디코딩된 데이터들에 일정한 상수를 곱하여 변환 계수값을 획득하고, 역변환부(300)에서는 상기 변환 계수값을 역변환하여 화소값을 복원하게 된다. 이때, 상기 변환 크기 결정부(310)에서는 변환 크기 관련 정보를 획득하여 변환 크기를 결정할 수 있다. 예를 들어, 적응적 변환 크기 플래그 정보, 또는 변환 크기 플래그 정보 등을 획득할 수 있다. 이는 도 2, 도 3A 및 도 3B에서 보다 상세히 설명하도록 한다. 상기 스캔 오더 초기화부(320)는 역양자화된 변환 계수들에 대한 스캔 오더를 초기화하고, 상기 스캔 오더 변경부(330)는 0이 아닌 변환 계수의 개수에 기초하여 각 블록에 적합한 스캔 오더로 변경 또는 업데이트한다. 상기 변환 디코딩부(340)는 상기 변경 또는 업데이트된 스캔 오더에 기초하여 상기 변환 계수들을 디코딩한다. 한편, 인코딩 장치에서는 이러한 변환 과정을 통해 상기 변환 계수값의 개수를 줄일수록 압축 효과를 높일 수 있으며, 화면 내 중요 데이터들이 변환 과정을 통해 일부의 계수에 집중적으로 분포할 수 있도록 함으로 보다 압축 효과를 높일 수 있다. 따라서, 본 발명에서는 이러한 변환 과정의 실시예들을 설명할 것이다.The parsed bit stream is entropy-decoded through the entropy decoding unit 100, and coefficients and motion vectors of each macro-block are extracted. The inverse quantization unit 200 obtains a transform coefficient value by multiplying the entropy decoded data by a constant, and the inverse transform unit 300 inversely transforms the transform coefficient value to recover the pixel value. At this time, the conversion size determining unit 310 can determine the conversion size by obtaining conversion size related information. For example, adaptive conversion size flag information, conversion size flag information, and the like can be obtained. This will be described in more detail in FIGS. 2, 3A and 3B. The scan order initialization unit 320 initializes a scan order for the inversely quantized transform coefficients, and the scan order change unit 330 changes the scan order to a scan order suitable for each block based on the number of non- Or updates. The transform decoding unit 340 decodes the transform coefficients based on the changed or updated scan order. On the other hand, in the encoding apparatus, as the number of the transform coefficient values is reduced through the conversion process, the compression effect can be increased, and important data in the screen can be concentratedly distributed to some coefficients through the conversion process. . Accordingly, embodiments of such a conversion process will be described in the present invention.

그리고, 상기 복원된 화소값을 이용하여 인트라 예측부(400)에서는 현재 픽쳐 내의 디코딩된 샘플로부터 인트라 예측(intra prediction)을 수행하게 된다. 상기 인트라 예측부(400)에서는 현재 픽쳐 내에서 현재 블록의 주변 블록의 픽셀을 이용하여 현재 블록을 예측하는데, 보다 정확한 예측을 수행할 수 있다면 화질을 향상시킬 수 있을 뿐만 아니라 코딩 효율을 향상시킬 수 있게 된다.The intra predictor 400 performs intra prediction on the decoded samples in the current picture using the reconstructed pixel values. The intraprediction unit 400 predicts a current block using pixels of neighboring blocks of the current block in the current picture. If more accurate prediction can be performed, not only the image quality can be improved but also the coding efficiency can be improved .

디블록킹 필터부(500)에서는 블록 왜곡 현상을 감소시키기 위해 각각의 코딩된 매크로블록에 적용된다. 필터는 블록의 가장자리를 부드럽게 하여 디코딩된 프레임의 화질을 향상시킨다. 필터링 과정의 선택은 경계 세기(boundary strenth)와 경계 주위의 이미지 샘플의 변화(gradient)에 의해 좌우된다. 필터링을 거친 픽쳐들은 출력되거나 참조 픽쳐로 이용하기 위해 복호 픽쳐 버퍼부(600)에 저장된다. The deblocking filter unit 500 is applied to each coded macroblock to reduce block distortion. The filter smooths the edge of the block to improve the quality of the decoded frame. The choice of the filtering process depends on the boundary strength and the gradient of the image samples around the boundary. The filtered pictures are output or stored in the decoding picture buffer unit 600 for use as a reference picture.

복호 픽쳐 버퍼부(Decoded Picture Buffer unit)(600)에서는 인터 예측(inter prediction)을 수행하기 위해서 이전에 코딩된 픽쳐들을 저장하거나 개방하는 역할 등을 수행할 수 있다. 이 때 복호 픽쳐 버퍼부(600)에 저장하거나 개방하기 위해서 각 픽쳐의 디코딩 순서를 나타내는 정보(frame_num)와 픽쳐의 출력 순서를 나타내는 정보(Picture Order Count, POC)를 이용하게 된다. 이렇게 관리되는 참조 픽쳐들은 인터 예측부(700)에서 이용될 수 있다.The decoded picture buffer unit 600 may perform a function of storing or opening previously coded pictures in order to perform inter prediction. At this time, information (frame_num) indicating the decoding order of each picture and information (Picture Order Count, POC) indicating the order of outputting pictures are used to store or open the picture in the decoding picture buffer unit 600. The reference pictures managed in this way can be used in the inter prediction unit 700.

상기 인터 예측부(700)에서는 엔트로피 디코딩부(100)로부터 전송된 정보들을 이용하여 현재 블록의 움직임을 보상한다. 비디오 신호로부터 현재 블록에 이웃하는 블록들의 움직임 벡터를 추출하고, 상기 현재 블록의 움직임 벡터 예측값을 획득한다. 상기 획득된 움직임 벡터 예측값과 상기 비디오 신호로부터 추출되는 차분 벡터를 이용하여 현재 블록의 움직임을 보상한다. 또한, 이러한 움직임 보상은 하나의 참조 픽쳐를 이용하여 수행될 수도 있고, 복수의 픽쳐를 이용하여 수행될 수도 있다. The inter-prediction unit 700 compensates for the motion of the current block using the information transmitted from the entropy decoding unit 100. Extracts a motion vector of blocks neighboring the current block from the video signal, and obtains a motion vector predicted value of the current block. And motion compensation of the current block is compensated using the obtained motion vector prediction value and a difference vector extracted from the video signal. In addition, such motion compensation may be performed using one reference picture or using a plurality of pictures.

디코딩 장치는 예측 모드 정보에 따라 인터 예측 또는 인트라 예측 과정을 통해 생성된 예측값(predictor)을 획득한다. 그리고, 비디오 신호로부터 추출된 레지듀얼과 상기 획득된 예측값을 더함으로써 현재 픽쳐를 복원할 수 있다. 여기서, 레지듀얼(residual)이라 함은 원 신호와 예측 신호 간의 차이를 나타내고, 상기 신호는 시퀀스 단위, 픽쳐 단위, 슬라이스 단위, 매크로블록 단위, 서브블록 단위 또는 픽셀 단위가 될 수 있으며, 본 명세서 내에서 그 단위는 각 디코딩 과정에 적절한 단위로 해석될 수 있다.The decoding apparatus obtains a predictor generated through an inter prediction or an intra prediction according to prediction mode information. Then, the current picture can be restored by adding the residual value extracted from the video signal and the obtained predicted value. Here, the term 'residual' indicates a difference between the original signal and the prediction signal, and the signal may be a sequence unit, a picture unit, a slice unit, a macroblock unit, a subblock unit, or a pixel unit. The unit can be interpreted as an appropriate unit for each decoding process.

또한, 본 발명은 보다 확장된 해상도를 갖는 비디오 신호의 처리를 위해 이용될 수 있다. 즉, 확장된 해상도를 갖는 비디오 신호의 처리를 위해 확장된 크기(size)의 매크로블록을 정의할 수 있다. 예를 들어, 16x16,16x8, 8x16 8x8, 8x4, 4x8, 4x4 크기의 매크로블록뿐만 아니라, 32x32, 64x32, 32x64, 64x64 등의 크기를 갖는 매크로블록을 이용할 수 있다. 매크로블록의 크기는 비디오 신호의 해상도에 따라 적응적으로 결정될 수 있다. 예를 들어, 비디오 신호의 해상도가 VGA(640x480, 4:3) 이하인 경우에는 16x16 크기의 매크로블록을 이용할 수 있고, VGA 이상 1080P 이하인 경우에는 32x32 크기의 매크로블록을 이용할 수 있고, 나아가 1080P 이상 4kx2k 이하인 경우에는 64x64 크기의 매크로블록을 이용할 수 있다. Further, the present invention can be used for processing a video signal having a more extended resolution. That is, it is possible to define macroblocks of an extended size for processing a video signal having an extended resolution. For example, macroblocks having sizes of 32x32, 64x32, 32x64, and 64x64 can be used as well as macroblocks of 16x16, 16x8, 8x16 8x8, 8x4, 4x8, and 4x4 sizes. The size of the macroblock may be adaptively determined according to the resolution of the video signal. For example, if the resolution of the video signal is VGA (640x480, 4: 3) or less, a 16x16 macroblock can be used. If the resolution of the video signal is VGA or higher and 1080P or lower, 32x32 macroblocks can be used. , A 64x64 macroblock can be used.

도 2, 도 3A 및 도 3B는 본 발명이 적용되는 실시예들로서, 플래그 정보에 기초하여 변환 과정에서 이용되는 단위 블록의 크기를 결정하는 과정을 나타낸다.FIGS. 2, 3A, and 3B illustrate a process of determining a size of a unit block used in a conversion process based on flag information according to embodiments of the present invention.

인코딩 장치 및 디코딩 장치에서 사용되는 변환 기법 중에는 블록 기반 변환 방법과 이미지 기반 변환 방법이 있다. 상기 블록 기반 변환 방법으로는 이산 여현 변환(Discrete Cosine Transform, 이하 'DCT'라 함), 카루넨-루브 변환(Karhuhen-Loeve Transform, 이하 'KLT'라 함) 등이 있다. 여기서, 이산 여현 변환(DCT)이란 공간 도메인(spatial domain) 상의 신호를 2차원 주파수 성분으로 분해(변환)하는 것을 나타낸다. 블록 내에서 좌측상단으로 갈수록 낮은 주파수 성분을 가지고, 우측하단으로 갈수록 높은 주파수 성분을 갖는 패턴을 이룬다. 예를 들어, 64개의 2차원의 주파수 성분 중 가장 좌측상단에 존재하는 1개만이 직류성분(DC : Direct Current)으로 주파수가 0인 성분이며, 나머지는 교류성분(AC : Alternate Current) 으로 낮은 주파수 성분부터 높은 주파수 성분까지 63개로 구성된다. 이산 여현 변환(DCT)을 수행한다는 것은 원 비디오 신호의 블록에 포함된 기저성분(64개의 기본 패턴 성분)들 각각의 크기를 구하는 것이며, 이 크기는 이산 여현 변환 계수이다.Among the conversion techniques used in the encoding apparatus and the decoding apparatus are a block-based conversion method and an image-based conversion method. The block-based transform method includes a Discrete Cosine Transform (DCT) and a Karhuhen-Loeve Transform (KLT). Here, DCT (DCT) refers to decomposing (converting) a signal in a spatial domain into a two-dimensional frequency component. In the block, the pattern has a lower frequency component toward the upper left and a higher frequency component toward the lower right. For example, only one of the 64 two-dimensional frequency components located at the upper left of the left side is a direct current (DC) component having a frequency of 0, and the remaining components are alternating current (AC) It consists of 63 components, from high-frequency components. Performing the DCT is to obtain the size of each base component (64 basic pattern components) included in a block of the original video signal, and this size is a DCT coefficient.

또한, 이산 여현 변환(DCT)은 단순히 원 비디오 신호 성분으로 표현하기 위하여 사용되는 변환으로, 역변환시 주파수 성분으로부터 원래의 영상신호로 완전히 복원된다. 즉, 영상의 표현 방법만을 바꾸는 것으로, 중복된 정보를 포함해 원 영상에 포함된 모든 정보를 모두 보존한다. 원 영상을 이산 여현 변환(DCT)하는 경우, 원영상의 진폭분포와 달리 이산 여현 변환(DCT) 계수는 0 근처의 값에 몰려서 존재하게 되므로 이를 이용하여 높은 압축효과를 얻을 수 있게 된다.Also, the DCT is a transform used for simply representing the original video signal component, and is completely restored from the frequency component to the original video signal upon inverse transformation. That is, all the information included in the original image is stored including the duplicated information by changing only the image presentation method. When DCT is performed on the original image, the discrete cosine transform (DCT) coefficient coincides with the value close to 0, unlike the amplitude distribution of the original image, so that a high compression effect can be obtained using the DCT coefficient.

한편, 카루넨-루브 변환(KLT)은 다차원(N차원)의 특징 벡터(feature vector)로 이루어진 데이터에 대해서, 최대한 원본 정보를 유지하면서 낮은 차원(K차원)으로 차원을 축소시켜 데이터를 처리하는 방법 중 하나이다. 즉, 데이터의 특징을 잘 나타내는 고유의 성분들을 추출하고 이 값들 중 특징 성분이 높은 값들만을 취함으로써 차원을 줄이고 원본 정보와의 차이를 최소화하는 것이다. 예를 들어, 인트라 블록의 인코딩 또는 디코딩시 이용되는 예측 모드에 따라 카루넨-루브 변환(KLT) 방법을 이용할 수 있으며, 스캐닝 오더 방법도 상기 예측 모드에 따라 다르게 적용함으로써 코딩 효율을 높일 수 있다.On the other hand, the Karunen-Lube transform (KLT) transforms data consisting of multidimensional (N-dimensional) feature vectors into a low dimension (K dimension) while maintaining original information as much as possible Method. In other words, it extracts the unique components that characterize the data and extracts only the high value among the feature values, thereby reducing the dimension and minimizing the difference from the original information. For example, a Karunen-Loove transform (KLT) method can be used according to a prediction mode used in encoding or decoding an intra block, and coding efficiency can be improved by applying a scanning order method differently according to the prediction mode.

본 발명의 일실시예로서, 하나의 매크로블록에 대해 변환 과정에서 이용되는 단위 블록의 크기(이하, '변환 크기'라 한다)를 적응적으로 설정할 수 있다. 예를 들어, 해상도가 큰 비디오 신호를 처리하는 경우, 변환 크기를 상기 비디오 신호의 해상도에 적합하도록 결정할 수 있다. 구체적 예로, XGA(eXtended Graphics Array, 1024x768, 4:3) 해상도를 갖는 비디오 신호에서 32x32 크기의 매크로블록을 이용하는 경우, 변환 크기를 16x16으로 설정할 수 있다. 이때, 32x32 매크로블록에 대해 16x16 변환 크기만을 이용하여 변환 과정을 수행할 수 있으며, 또는 32x32, 32x16, 16x32, 16x16, 16x8, 8x16, 8x8, 8x4, 4x8, 4x4 중 적어도 하나의 변환 크기를 이용하여 변환 과정을 수행할 수 있다. 즉, 하나의 매크로블록에 대해 단 하나의 변환 크기만을 이용할 수도 있고, 복수개의 변환 크기를 이용할 수도 있다. In one embodiment of the present invention, the size of a unit block (hereinafter, referred to as 'conversion size') used in a conversion process for one macroblock may be adaptively set. For example, when processing a video signal having a high resolution, the conversion size may be determined to be suitable for the resolution of the video signal. As a specific example, when a 32x32 macroblock is used in a video signal having an XGA (eXtended Graphics Array, 1024x768, 4: 3) resolution, the conversion size can be set to 16x16. At this time, the conversion process can be performed using only the 16x16 conversion size for the 32x32 macroblock, or the conversion process can be performed using at least one conversion size of 32x32, 32x16, 16x32, 16x16, 16x8, 8x16, 8x8, 8x4, 4x8, Conversion process can be performed. That is, only one conversion size may be used for one macro block, or a plurality of conversion sizes may be used.

또한, 본 발명에서는, 블록마다 적절한 변환 크기를 설정 가능하게 하는 적응적 변환 크기 플래그 정보(adaptive transform size flag information)를 정의할 수 있다. 상기 적응적 변환 크기 플래그 정보는 코딩 유닛이 수평 및 수직 방향으로 절반 크기를 갖는 코딩 유닛들로 분할되는지 여부를 나타내는 정보로 정의될 수도 있다. 여기서, 코딩 유닛은 픽쳐, 슬라이스, 매크로블록, 서브블록, 변환 블록, 블록, 픽셀 등을 의미할 수 있다. 즉, 제 1 코딩 유닛의 상기 적응적 변환 크기 플래그 정보가 참이면, 제 2 코딩 유닛마다 상기 적응적 변환 크기 플래그 정보가 획득될 수 있다. 이때, 상기 제 2 코딩 유닛은 상기 제 1 코딩 유닛에 포함되는 서브 블록을 나타낸다. 그리고, 상기 적응적 변환 크기 플래그 정보는 변환부 또는 역변환부(300)에서 획득될 수 있으며, 구체적으로 변환 크기 결정부(310)에서 획득될 수 있다. 또한, 상기 적응적 변환 크기 플래그 정보는 현재 변환 유닛의 크기를 최소 변환 크기 및 최대 변환 크기 중 적어도 하나와 비교함으로써 획득될 수 있다. 예를 들어, 현재 변환 유닛의 크기가 최소 변환 크기보다 크고 최대 변환 크기보다 작거나 같은 경우에 상기 적응적 변환 크기 플래그 정보가 획득될 수 있다. 상기 적응적 변환 크기 플래그 정보에 기초하여 변환 유닛의 크기가 결정되고, 그에 따라 변환 과정이 수행될 것이다. 또는 상기 적응적 변환 크기 플래그 정보에 기초하여 코딩블록 플래그 정보(coded_block_flag)를 획득할 수 있다. 여기서, 코딩블록 플래그 정보(coded_block_flag)는 변환 유닛이 0이 아닌 변환계수레벨을 포함하는지 여부를 나타낸다.Further, in the present invention, adaptive transform size flag information can be defined that enables to set an appropriate transform size for each block. The adaptive transform size flag information may be defined as information indicating whether the coding unit is divided into coding units having a half size in the horizontal and vertical directions. Here, the coding unit may mean a picture, a slice, a macro block, a sub-block, a transform block, a block, a pixel, and the like. That is, if the adaptive transform magnitude flag information of the first coding unit is true, the adaptive transform magnitude flag information may be obtained for each second coding unit. Here, the second coding unit indicates a sub-block included in the first coding unit. The adaptive transform size flag information may be obtained by the transform unit or the inverse transform unit 300 and may be specifically obtained by the transform size determining unit 310. [ In addition, the adaptive transform magnitude flag information may be obtained by comparing the size of the current transform unit with at least one of a minimum transform magnitude and a maximum transform magnitude. For example, the adaptive transform size flag information can be obtained when the size of the current transform unit is larger than the minimum transform size and smaller than or equal to the maximum transform size. The size of the conversion unit is determined based on the adaptive conversion size flag information, and the conversion process will be performed accordingly. Or the coding block flag information (coded_block_flag) based on the adaptive transform size flag information. Here, the coding block flag information (coded_block_flag) indicates whether the conversion unit includes a non-zero conversion coefficient level.

예를 들어, 상기 제 1 코딩 유닛의 크기가 128x128이면, 상기 제 2 코딩 유닛은 64x64 크기를 갖는 4개의 서브 블록들을 나타낼 수 있다. 그리고, 만약 상기 적응적 변환 크기 플래그 정보가 존재하지 않는다면, 현재 블록의 변환 크기와 최소 변환 크기를 비교함으로써 보다 상기 적응적 변환 크기 플래그 정보를 유도할 수 있다. 예를 들어, 현재 블록의 변환 크기가 최소 변환 크기보다 크다면, 상기 적응적 변환 크기 플래그 정보는 코딩 유닛이 수평 및 수직 방향으로 절반 크기를 갖는 코딩 유닛들로 분할되는 것을 나타낼 것이고, 현재 블록의 변환 크기가 최소 변환 크기보다 크지 않다면 상기 적응적 변환 크기 플래그 정보는 상기 적응적 변환 크기 플래그 정보는 코딩 유닛이 수평 및 수직 방향으로 절반 크기를 갖는 코딩 유닛들로 분할되지 않을 것을 나타낼 것이다. 즉, 현재 블록의 변환 크기가 최소 변환 크기보다 크다면, 상기 적응적 변환 크기 플래그 정보는 '1'로 유도되어, 각 서브 블록마다 상기 적응적 변환 크기 플래그 정보를 확인할 것이다. 그리고, 현재 블록의 변환 크기가 최소 변환 크기보다 크지 않다면 상기 적응적 변환 크기 플래그 정보는 '0'으로 유도되어, 현재 블록의 변환 크기가 적용될 것이다.For example, if the size of the first coding unit is 128x128, the second coding unit may represent four sub-blocks having a size of 64x64. And, if the adaptive transform magnitude flag information does not exist, the adaptive transform magnitude flag information can be derived by comparing the transform magnitude of the current block with the minimum transform magnitude. For example, if the transform size of the current block is greater than the minimum transform size, the adaptive transform magnitude flag information will indicate that the coding unit is divided into coding units having half the size in the horizontal and vertical directions, If the transform size is not greater than the minimum transform size, the adaptive transform magnitude flag information indicates that the adaptive transform magnitude flag information is not to be divided into coding units having a half size in the horizontal and vertical directions. That is, if the transform size of the current block is larger than the minimum transform size, the adaptive transform size flag information is derived as '1' to check the adaptive transform size flag information for each sub-block. If the conversion size of the current block is not larger than the minimum conversion size, the adaptive conversion size flag information is derived as '0', and the conversion size of the current block will be applied.

구체적 예로, 상기 적응적 변환 크기 플래그 정보를 split_transform_unit_flag 라 하자. 도 2를 참조하면, 현재 매크로블록(블록 A)의 크기가 128x128일 때, split_transform_unit_flag에 따라 128x128, 64x64, 32x32, 16x16, 8x8, 4x4 변환 크기 중 적어도 하나가 선택될 수 있다. 현재 매크로블록(블록 A) 레벨에서 상기 split_transform_unit_flag가 추출되고, 상기 split_transform_unit_flag가 '0'의 값을 나타내면 128x128 변환 크기가 적용되고, 상기 split_transform_unit_flag가 '1'의 값을 나타내면 상기 128x128 현재 매크로블록 내 64x64 크기의 4개의 서브 블록들에 대해 각각 상기 split_transform_unit_flag를 획득할 수 있다. 그리고, 64x64 크기의 서브 블록(블록 B) 레벨에서 획득된 split_transform_unit_flag가 '0'의 값을 나타내면 64x64 변환 크기가 적용되고, 상기 split_transform_unit_flag가 '1'의 값을 나타내면 다시 상기 64x64 서브 블록 내 32x32 크기의 4개의 서브 블록들에 대해 각각 상기 split_transform_unit_flag를 획득할 수 있다. 마찬가지로 이하의 서브 블록들에 대해서도 상기와 같은 과정이 동일하게 적용될 수 있다.As a specific example, the adaptive conversion size flag information is referred to as split_transform_unit_flag. 2, when the size of the current macro block (block A) is 128x128, at least one of 128x128, 64x64, 32x32, 16x16, 8x8, and 4x4 transform sizes may be selected according to the split_transform_unit_flag. If the split_transform_unit_flag indicates a value of '0', a 128x128 transform size is applied. If the split_transform_unit_flag indicates a value of '1', a 64x64 size in the current macroblock of 128x128 Block_transform_unit_flag for each of the four subblocks of the " split_transform_unit_flag " field. If the split_transform_unit_flag obtained at the 64x64 subblock (block B) level indicates a value of '0', a 64x64 transform size is applied. If the split_transform_unit_flag indicates a value of 1, the 32x32 size It is possible to obtain the split_transform_unit_flag for each of the four subblocks. Similarly, the same process can be applied to the following subblocks.

또한, 본 발명에서는, 상기 변환 크기를 나타내는 플래그 정보를 정의할 수 있다. 예를 들어, 도 3A 및 도 3B를 참조하면, transform_16x16_size_flag 및 transform_8x8_size_flag 에 따라 16x16, 8x8, 4x4 변환 크기 중 하나가 선택될 수 있다. 여기서, transform_16x16_size_flag 는 16x16 블록 단위로 변환 과정을 수행하는지 아니면 그보다 작은 블록 단위로 변환 과정을 수행하는지 여부를 나타내고, 매크로블록 레벨에서 획득될 수 있다. 그리고, transform_8x8_size_flag 는 8x8 블록 단위로 변환 과정을 수행하는지 아니면 4x4 블록 단위로 변환 과정을 수행하는지 여부를 나타내고, 서브 매크로블록 레벨에서 획득될 수 있다. 도 3A를 참조하면, transform_16x16_size_flag 가 '1'을 나타내면, 16x16 블록 단위로 변환 과정을 수행하고, '0'을 나타내면, transform_8x8_size_flag 를 확인한다. 상기 transform_8x8_size_flag 가 '1'을 나타내면, 8x8 블록 단위로 변환 과정을 수행하고, '0'을 나타내면, 4x4 블록 단위로 변환 과정을 수행한다.Further, in the present invention, flag information indicating the conversion size can be defined. For example, referring to Figures 3A and 3B, one of the 16x16, 8x8, 4x4 transform sizes may be selected according to transform_16x16_size_flag and transform_8x8_size_flag. Here, the transform_16x16_size_flag indicates whether the conversion process is performed on a 16x16 block unit basis or on a smaller block basis, and can be obtained at a macroblock level. The transform_8x8_size_flag indicates whether conversion is performed in 8x8 block units or 4x4 block units, and can be obtained at the sub macro block level. Referring to FIG. 3A, if the transform_16x16_size_flag indicates '1', the transforming process is performed in units of 16x16 blocks. If the transform_16x16_size_flag indicates '0', the transform_8x8_size_flag is confirmed. If the transform_8x8_size_flag indicates '1', the conversion process is performed in 8x8 block units. If the transform_8x8_size_flag indicates '0', the conversion process is performed in 4x4 block units.

마찬가지로, 도 3B를 참조하면, transform_8x8_size_flag 가 '0'을 나타내면, 4x4 블록 단위로 변환 과정을 수행하고, '1'을 나타내면, transform_16x16_size_flag 를 확인한다. 상기 transform_16x16_size_flag 가 '1'을 나타내면, 16x16 블록 단위로 변환 과정을 수행하고, '0'을 나타내면, 8x8 블록 단위로 변환 과정을 수행한다. Likewise, referring to FIG. 3B, if the transform_8x8_size_flag indicates '0', the conversion process is performed on a 4x4 block basis. If the transform_8x8_size_flag indicates '1', the transform_16x16_size_flag is confirmed. If the transform_16x16_size_flag indicates '1', the conversion process is performed in 16x16 block units, and if it is '0', the conversion process is performed in 8x8 block units.

본 발명이 적용되는 다른 실시예로서, 매크로블록의 크기에 따라 사용 가능한 변환 크기를 미리 설정해놓은 경우 디코딩 장치는 상기 변환 크기를 나타내는 플래그 정보를 수신하지 않고 디코딩 장치 내에서 유도할 수 있다. 예를 들어, 매크로블록의 크기가 32x32 일 때 8x8 변환 크기를 이용하지 않는다고 설정해 놓은 경우, transform_8x8_size_flag 가 '0'을 나타낸다면 4x4 블록 단위로 변환 과정을 수행하고, transform_8x8_size_flag 가 '1'을 나타낸다면 16x16 블록 단위로 변환 과정을 수행할 것이다. 이때, transform_16x16_size_flag 는 '1'로 유도될 것이다. 마찬가지로, 매크로블록의 크기가 8x8 일 경우, transform_8x8_size_flag 가 '0'을 나타낸다면 4x4 블록 단위로 변환 과정을 수행하고, transform_8x8_size_flag 가 '1'을 나타낸다면 8x8 블록 단위로 변환 과정을 수행할 것이다. 이때, transform_16x16_size_flag 는 '0'으로 유도될 것이다.In another embodiment to which the present invention is applied, if a usable conversion size is previously set according to the size of a macroblock, the decoding apparatus can guide the decoding apparatus without receiving flag information indicating the conversion size. For example, if the size of a macroblock is set to 32x32 and the 8x8 transform size is not used, if the transform_8x8_size_flag indicates '0', a conversion process is performed in units of 4x4 blocks. If the transform_8x8_size_flag indicates '1' The conversion process will be performed on a block-by-block basis. At this time, the transform_16x16_size_flag will be derived as '1'. Similarly, if the size of the macro block is 8x8, if the transform_8x8_size_flag indicates '0', the conversion process is performed in units of 4x4 blocks, and if the transform_8x8_size_flag indicates '1', the conversion process will be performed in units of 8x8 blocks. At this time, the transform_16x16_size_flag will be derived as '0'.

다른 실시예로, 8x8 변환 크기는 인트라 8x8 블록에만 이용된다고 하면, 인트라 8x8 블록과 인트라 16x16 블록을 식별하기 위해 transform_16x16_size_flag 만 전송되고, transform_8x8_size_flag 는 디코딩 장치에서 '1'로 유도될 것이다. 또는 4x4 변환 크기가 인트라 8x8 블록에만 이용된다고 하면, 인트라 8x8 블록과 인트라 16x16 블록을 식별하기 위해 transform_16x16_size_flag 만 전송되고, transform_8x8_size_flag 는 서브 매크로블록 타입에 따라 디코딩 장치에서 '0' E또는 '1'로 유도될 것이다.In another embodiment, if the 8x8 transform size is used only for the intra 8x8 block, only transform_16x16_size_flag is transmitted to identify the intra 8x8 block and the intra 16x16 block, and transform_8x8_size_flag will be derived to '1' at the decoding device. If the 4x4 transform size is used only for the intra 8x8 block, only the transform_16x16_size_flag is transmitted to identify the intra 8x8 block and the intra 16x16 block, and the transform_8x8_size_flag is converted to '0' E or '1' Will be.

상기에서 설명한 바와 같이, 변환 크기, 매크로블록 크기, 변환 크기를 나타내는 플래그 정보 등은 일실시예에 불과할 뿐이고, 32x32, 32x16, 16x32, 16x16, 16x8, 8x16, 8x8, 8x4, 4x8, 4x4 및 32x32 이상의 크기도 모두 적용할 수 있을 것이다. 또한, 도 2, 도 3A 및 도 3B에서의 2개의 플래그 정보 조합도 일실시예에 해당하고, 하나의 플래그 정보에 의해 변환 크기를 나타낼 수 있으며, 또한 복수개의 플래그 정보를 조합하여 다양한 실시예들을 설정할 수도 있을 것이다.As described above, the flag information indicating the conversion size, the macro block size, and the conversion size is only an example, and it is not limited to 32x32, 32x16, 16x32, 16x16, 16x8, 8x16, 8x8, 8x4, 4x8, 4x4, All sizes will be applicable. The combination of two pieces of flag information in Figs. 2, 3A and 3B corresponds to one embodiment, and the conversion size can be represented by one piece of flag information, and a plurality of pieces of flag information can be combined to form various embodiments You can also set it.

도 4는 본 발명이 적용되는 실시예로서, 변환 타입을 나타내는 플래그 또는 매크로블록의 예측 모드에 기초하여 변환 방법(DCT 또는 KLT)을 결정하는 과정을 설명하기 위한 흐름도이다.FIG. 4 is a flowchart for explaining a process of determining a conversion method (DCT or KLT) based on a prediction mode of a flag or a macroblock indicating a conversion type according to an embodiment to which the present invention is applied.

상기 도 2, 도 3A 및 도 3B에서 살펴본 것처럼, 코딩 효율 향상을 위해 비디오 신호의 처리시 다양한 변환 방법(DCT, KLT 등)이 적용될 수 있다. 예를 들어, 인코딩 장치는 각 슬라이스에 대해 DCT 또는 KLT 등을 적용하여 왜곡률 최적화(Rate-Distortion optimization)가 되는 변환 방법을 결정할 수 있다. 결정된 변환 방법은 구문 요소로 코딩되어 전송될 수 있고, 매크로블록 레이어, 슬라이스 헤더 또는 픽쳐 파라미터 셋 정보 내에서 정의될 수 있다. 구체적 예로, 인코딩 장치는 먼저 슬라이스에 대해 DCT를 적용하고 왜곡률 비용(RD cost)을 계산한 다음, KLT를 적용하고 왜곡률 비용(RD cost)을 계산한다. KLT의 왜곡률 비용(RD cost)이 DCT의 왜곡률 비용(RD cost)보다 작다면 상기 슬라이스에 대한 변환 방법으로 KLT가 선택되고, 이를 구문 요소로 코딩하여 전송한다. 여기서, 상기 구문 요소는 변환 타입을 나타내는 플래그 정보를 의미할 수 있다. As shown in FIGS. 2, 3A and 3B, various conversion methods (DCT, KLT, and the like) can be applied in processing a video signal to improve coding efficiency. For example, the encoding apparatus can determine a conversion method that is rate-distortion optimization by applying DCT or KLT to each slice. The determined transform method can be coded and sent as a syntax element, and can be defined in a macroblock layer, slice header, or picture parameter set information. As a specific example, the encoding apparatus first applies the DCT to the slice and calculates the distortion cost (RD cost), then applies the KLT and calculates the distortion cost (RD cost). If the distortion cost (RD cost) of the KLT is smaller than the distortion cost (RD cost) of the DCT, the KLT is selected as a conversion method for the slice, and the KLT is encoded and transmitted using syntax elements. Here, the syntax element may mean flag information indicating a conversion type.

예를 들어, 도 4를 참조하면, 먼저 변환 타입을 나타내는 변환 타입 플래그 정보를 획득하고(S410), 상기 변환 타입 플래그 정보(transform_type_flag)가 '0'을 나타내면 DCT가 적용되고(S420), 상기 변환 타입 플래그 정보가 '1'을 나타내면 매크로블록의 타입에 기초하여 DCT 또는 KLT가 적용될 수 있다(S430). 매크로블록의 타입이 인트라 블록을 나타내면 KLT가 적용되고(S450), 인트라 블록이 아니면 DCT가 적용될 수 있다(S440). 이렇게 변환된 데이터들은 양자화 과정을 거치게 된다(S460). 이처럼, 본 발명에서는 매크로블록의 예측 모드에 기초하여 각 예측 모드마다 적절한 변환 방법이 이용될 수 있다. For example, referring to FIG. 4, first, conversion type flag information indicating a conversion type is obtained (S410). If the conversion type flag information (transform_type_flag) indicates '0', DCT is applied (S420) If the type flag information indicates '1', DCT or KLT may be applied based on the type of the macroblock (S430). If the type of the macroblock indicates an intra block, KLT is applied (S450). If the type of the macroblock is not an intra block, a DCT may be applied (S440). The transformed data is subjected to a quantization process (S460). As described above, in the present invention, an appropriate conversion method can be used for each prediction mode based on the prediction mode of the macroblock.

도 5는 본 발명이 적용되는 실시예로서, 변환 블록의 위치에 따라 다른 변환 커널(transform kernel)을 적용하는 새로운 모드 기반형 변환(Mode Dependent Directional Transform)을 설명하기 위한 개략적인 블록도를 나타낸다.FIG. 5 is a schematic block diagram for explaining a new mode-dependent transformation according to an embodiment of the present invention, in which a transform kernel is applied according to a location of a transform block.

모드 기반형 변환(Mode Dependent Directional Transform)이란, 인트라 블록의 코딩에서 사용되는 예측 모드에 따라 KLT에 기반을 둔 변환 방법을 사용하고, 스캐닝 오더 또한 각 예측 모드에 따라 다르게 적용하여 코딩 효율을 향상시키는 기술을 말한다. 상기 도 5를 참조하면, 예측부에서는 각 모드에 따른 예측 신호를 전송하고, 변환부에서는 원 신호와 상기 예측 신호와의 차이를 나타내는 레지듀얼 신호를 수신하고 상기 레지듀얼 신호를 변환하여 변환 계수를 생성한다. 이때, 상기 변환부에서는 각 모드에 따른 레지듀얼 신호에 대해 별개의 변환 커널(transform kernel)을 적용할 수 있다. 이처럼, 인트라 블록의 각 예측 모드에 따라 생성된 변환 계수들은 양자화부를 통하여 양자화된다. 또한, 모드 기반형 변환에서는 수평 변환과 수직 변환에 대한 별개의 변환 커널을 이용할 수 있다.The Mode Dependent Directional Transformation is a method in which a conversion method based on KLT is used according to a prediction mode used in coding an intra block and a scanning order is also applied differently according to each prediction mode to improve coding efficiency Technology. Referring to FIG. 5, the predicting unit transmits a prediction signal according to each mode, and the converting unit receives a residual signal indicating a difference between the original signal and the prediction signal, and converts the residual signal, . At this time, a separate transform kernel may be applied to the residual signal according to each mode. As described above, the transform coefficients generated according to each prediction mode of the intra block are quantized through the quantization unit. Also, in the mode-based conversion, a separate conversion kernel for horizontal and vertical conversion can be used.

도 6은 본 발명이 적용되는 실시예로서, 변환 블록의 위치에 따라 다른 변환 커널(transform kernel)을 사용하는 구체적인 예를 나타낸다.FIG. 6 shows a specific example in which a transform kernel is used according to the position of a transform block, to which the present invention is applied.

본 발명의 실시예로서, 변환 크기는 예측 블록의 크기보다 작거나 같을 수 있다. 예를 들어, 32x32 블록의 경우 변환 크기는 32x32, 16x16, 8x8, 4x4 가 될 수 있고, 16x16 블록의 경우 변환 크기는 16x16, 8x8, 4x4 가 될 수 있고, 8x8 블록의 경우 변환 크기는 8x8, 4x4 가 될 수 있으며, 4x4 블록의 경우 변환 크기는 4x4 만 될 수 있다.As an embodiment of the present invention, the transform size may be less than or equal to the size of the predicted block. For example, in the case of a 32x32 block, the conversion size may be 32x32, 16x16, 8x8, 4x4. In the case of a 16x16 block, the conversion size may be 16x16, 8x8, 4x4. In the case of the 8x8 block, In the case of a 4x4 block, the transform size can be 4x4 only.

또한, 16x16 블록에 대해 변환 크기 8x8을 적용하는 경우, 4개의 변환 블록에 대해 동일한 변환 커널을 적용할 수 있다. 또는 상기 도 6을 참조하면, 각 변환 블록의 위치에 따라 각기 다른 변환 커널을 적용할 수도 있다. 이 경우, 4개의 변환 커널이 필요할 것이다.In addition, when a conversion size of 8x8 is applied to a 16x16 block, the same conversion kernel can be applied to four conversion blocks. Alternatively, referring to FIG. 6, different conversion kernels may be applied depending on the location of each conversion block. In this case, you will need four conversion kernels.

도 7은 본 발명이 적용되는 실시예로서, 변환 블록마다 스캔 오더(scan order)를 재배열하는 과정을 설명하기 위한 흐름도를 나타낸다.FIG. 7 is a flowchart illustrating a process of rearranging a scan order for each conversion block according to an embodiment of the present invention. Referring to FIG.

스캔 오더라 함은 변환 계수를 일차원 형태로 배열하기 위한 순서를 의미하며, 낮은 주파수의 계수는 앞쪽에 높은 주파수의 계수는 뒤쪽에 위치하게 된다. 변환 계수 디코딩 과정은 4x4 휘도 레지듀얼 블록, 8x8 휘도 레지듀얼 블록, 인트라 16x16 예측 모드인 휘도 샘플, 그리고 색차 샘플 등에 적용될 수 있다. 또한, 앞서 살펴본 바와 같이 변환 크기가 더 커진다면 그 대상 블록 또는 샘플도 그에 따라 커질 수 있다. 예를 들어, 16x16 휘도 레지듀얼 블록, 32x32 휘도 레지듀얼 블록, 인트라 32x32 예측 모드인 휘도 샘플, 그리고 색차 샘플 등에 변환 계수 디코딩 과정이 적용될 수 있다.The scan order refers to a sequence for arranging the transform coefficients in a one-dimensional form, and the lower frequency coefficients are located on the front side and the higher frequency coefficients are located on the rear side. The transform coefficient decoding process can be applied to a 4x4 luminance residual block, an 8x8 luminance residual block, a luminance sample which is an intra 16x16 prediction mode, and a color difference sample. Also, as previously noted, if the transform size is larger, the target block or sample may be larger accordingly. For example, a transform coefficient decoding process may be applied to a 16x16 luminance residual block, a 32x32 luminance residual block, a luminance sample that is an intra 32x32 prediction mode, and a color difference sample.

구체적 예로, 상기 도 2, 도 3A 및 도 3B에서 설명한 transform_16x16_size_flag 및 transform_8x8_size_flag 에 따라, 상기 플래그 정보들이 16x16 블록 단위로 변환 과정을 수행할 것을 나타내는 경우, 16x16 휘도 레지듀얼 블록에 대해 변환 계수 디코딩 과정이 적용될 수 있다. 또는 상기 플래그 정보들이 8x8 블록 단위로 변환 과정을 수행할 것을 나타내는 경우, 8x8 휘도 레지듀얼 블록에 대해 변환 계수 디코딩 과정이 적용될 수 있다.As a concrete example, when the flag information indicates to perform the conversion process on a 16x16 block basis according to the transform_16x16_size_flag and the transform_8x8_size_flag described in FIGS. 2, 3A, and 3B, a transform coefficient decoding process is applied to the 16x16 luminance residual block . Or if the flag information indicates to perform the conversion process in 8x8 block units, a conversion coefficient decoding process may be applied to the 8x8 luminance residual block.

본 발명의 일실시예로, 8x8 휘도 레지듀얼 블록에 대해 변환 계수 디코딩 과정이 적용되는 경우, 먼저 8x8 휘도 레지듀얼 블록 내 64개의 값이 스캔 오더에 따라 초기값으로 설정된다. 여기서, 상기 64개의 초기값은 변환 계수를 나타내고, 스캔 오더는 지그재그 스캔을 의미할 수 있다. 그리고, 상기 변환 계수들은 변경된 스캔 오더에 따라 재배열함으로써 런렝스(run-length) 코딩시 비트수를 줄일 수 있다. 여기서, 변경된 스캔 오더는 0이 아닌 변환 계수의 개수를 계산하여 그 개수가 가장 많은 픽셀 위치를 우선순위로 설정하는 것을 의미한다. 0이 아닌 변환 계수의 개수는 매 매크로블록, 또는 매 변환 블록마다 계산하여 업데이트될 수 있다. In an embodiment of the present invention, when a transform coefficient decoding process is applied to an 8x8 luminance residual block, 64 values in an 8x8 luminance residual block are initially set to initial values according to a scan order. Here, the 64 initial values represent the transform coefficients, and the scan order may refer to a zigzag scan. The transform coefficients may be rearranged according to the changed scan order, thereby reducing the number of bits in run-length coding. Here, the changed scan order means that the number of non-zero transform coefficients is calculated and the pixel position having the largest number is set as a priority order. The number of non-zero transform coefficients may be calculated and updated for every macroblock or every transform block.

예를 들어, 도 7을 참조하면, 먼저 매크로블록 내 제 1 변환 블록 내 각 픽셀 위치에서 0이 아닌 변환 계수의 개수를 카운트한다(S710). 그리고, 제 1 변환 블록 내 각 픽셀 위치에서 0이 아닌 변환 계수의 개수가 가장 많은 픽셀 위치를 우선순위로 하여 스캔 오더를 변경할 수 있다(S720). 제 2 변환 블록 내 각 픽셀 위치에서 0이 아닌 변환 계수의 개수를 결정하고, 제 1 변환 블록의 변경된 스캔 오더를 제 2 변환 블록의 초기화된 스캔 오더로 이용할 수 있다(S730). 여기서, 상기 제 1 변환 블록과 상기 제 2 변환 블록은 하나의 매크로블록 내 분할된 블록을 나타내며, 예를 들어, 현재 매크로블록이 8x8 매크로블록이고, 상기 현재 매크로블록 내 4x4 휘도 레지듀얼 블록 단위로 변환 계수 디코딩 과정이 적용되는 경우, 상단 좌측 4x4 블록을 제 1 변환 블록, 상단 우측 4x4 블록을 제 2 변환 블록, 하단 좌측 4x4 블록을 제 3 변환 블록, 하단 우측 4x4 블록을 제 4 변환 블록이라 정의할 수 있다. 이러한 서브블록들의 순서는 본 실시예에 한정되지 않는다. 그리고, 상기 제 1 변환 블록 내 각 픽셀 위치에서의 0이 아닌 변환 계수의 개수와 상기 제 2 변환 블록 내 각 픽셀 위치에서의 0이 아닌 변환 계수의 개수를 더하고 가장 많은 개수를 가진 픽셀 위치를 우선순위로 하여 제 2 변환 블록의 스캔 오더를 변경할 수 있다(S740). 이와 같이 스캔 오더의 업데이트 과정을 통해 코딩 효율을 향상시킬 수 있다. 이에 대한 구체적인 실시예는 도 8A 내지 도 8D에서 상세히 설명하도록 한다.For example, referring to FIG. 7, the number of non-zero transform coefficients at each pixel position in the first transform block in the macroblock is counted (S710). In step S720, the scan order can be changed with priority given to pixel positions having the largest number of non-zero transform coefficients at each pixel position in the first transform block. The number of non-zero transform coefficients at each pixel position in the second transform block may be determined and the modified scan order of the first transform block may be used as the initialized scan order of the second transform block (S730). Here, the first transform block and the second transform block represent a divided block in one macroblock. For example, the current macroblock is an 8x8 macroblock, and the 4x4 luminance residual block in the current macroblock When the transform coefficient decoding process is applied, the upper left 4x4 block is defined as a first transform block, the upper right 4x4 block as a second transform block, the lower left 4x4 block as a third transform block, and the lower right 4x4 block as a fourth transform block can do. The order of these subblocks is not limited to this embodiment. Then, the number of non-zero transform coefficients at each pixel position in the first transform block is added to the number of non-zero transform coefficients at each pixel position in the second transform block, and a pixel position having the largest number is added The scan order of the second conversion block can be changed in step S740. In this manner, the coding efficiency can be improved by updating the scan order. A specific embodiment of this will be described in detail in Figs. 8A to 8D.

또한, 상기 스캔 오더의 업데이트 과정은 매 매크로블록 또는 매 변환 블록 또는 매 블록마다 수행될 수 있다. 그리고, 상기 스캔 오더의 업데이트 과정 이후 스캔 오더의 초기화를 수행하는데, 이를 나타내는 플래그 정보를 정의할 수 있다. 예를 들어, 스캔 오더 초기화 플래그 정보가 '1'을 나타내면 매 매크로블록 또는 매 변환 블록에 대해 스캔 오더를 초기화하고, '0'을 나타내면 다시 상기 스캔 오더의 업데이트 과정을 수행하게 된다. In addition, the update process of the scan order may be performed for every macroblock, every transform block, or every block. After the update of the scan order, initialization of the scan order is performed, and flag information indicating the flag information can be defined. For example, if the scan order initialization flag information indicates '1', the scan order is initialized for each macroblock or each transform block, and if the scan order initialization flag information indicates '0', the scan order update process is performed again.

도 8A 내지 도 8D는 본 발명이 적용되는 실시예들로서, 변환 블록마다 스캔 오더(scan order)를 재배열하는 과정을 설명하기 위한 구체적인 예를 나타낸다.8A to 8D illustrate a specific example for explaining a process of rearranging a scan order for each conversion block according to embodiments of the present invention.

본 실시예에서는 현재 매크로블록이 32x32 매크로블록이고, 상기 현재 매크로블록 내 16x16 블록 단위로 변환 계수 디코딩 과정이 적용되는 경우, 상단 좌측 16x16 블록을 제1블록, 상단 우측 16x16 블록을 제2블록, 하단 좌측 16x16 블록을 제3블록, 하단 우측 16x16 블록을 제4블록이라 정의할 수 있다. 여기서, 상기 제1블록 내지 제4블록은 변환 블록을 의미할 수 있다. 그리고, 회색 블록은 0이 아닌 변환 계수를 포함하고 있음을 나타내며, 회색 블록 내 숫자는 스캔 오더를 나타낸다.In the present embodiment, when the current macroblock is a 32x32 macroblock and the transform coefficient decoding process is applied in units of 16x16 blocks in the current macroblock, the upper left 16x16 block is referred to as a first block, the upper right 16x16 block as a second block, The left 16x16 block is defined as the third block, and the lower right 16x16 block is defined as the fourth block. Here, the first to fourth blocks may denote a transform block. The gray block indicates that the non-zero conversion coefficient is included, and the number in the gray block indicates the scan order.

도 8A를 참조하면, 먼저 제1블록 내 0이 아닌 변환 계수를 카운트하면 총 4개의 회색 픽셀 내에 0이 아닌 변환 계수가 존재함을 알 수 있다. 초기화된 스캔 오더는 지그재그 스캔 오더에 따르며, 여기서 상기 초기화된 스캔 오더는 지그재그 스캔 오더에 한정되지 않는다. 0이 아닌 변환 계수가 존재하는 회색 픽셀을 기준으로 지그재그 스캔 오더를 적용할 경우, 상기 도 8A에 나타난 바와 같이 업데이트된 스캔 오더를 획득할 수 있다.Referring to FIG. 8A, when non-zero conversion coefficients in the first block are counted, it can be seen that non-zero conversion coefficients exist in all four gray pixels. The initialized scan order is according to the zigzag scan order, wherein the initialized scan order is not limited to the zigzag scan order. When a zigzag scan order is applied based on gray pixels having non-zero transform coefficients, an updated scan order can be obtained as shown in FIG. 8A.

그리고, 도 8B를 참조하면, 먼저 제2블록 내 0이 아닌 변환 계수를 카운트하고 상기 제1블록 내 0이 아닌 변환 계수의 개수와 합하여 최종적으로 누적된 0이 아닌 변환 계수의 개수를 카운트할 수 있다. 그리고, 제2블록의 초기화된 스캔 오더는 이전 제1블록에서 최종 업데이트된 스캔 오더가 이용된다. 마찬가지로, 누적된 0이 아닌 변환 계수의 개수 중 가장 많은 개수를 가지는 픽셀 위치를 기준으로 스캔 오더를 변경할 수 있다.8B, a non-zero conversion coefficient in the second block is counted, and the number of non-zero conversion coefficients that are finally accumulated by adding the number of non-zero conversion coefficients in the first block is counted have. The initialized scan order of the second block is the last updated scan order in the previous first block. Likewise, the scan order can be changed based on the pixel position having the largest number of non-zero conversion coefficients accumulated.

그리고, 도 8C를 참조하면, 먼저 제3블록 내 0이 아닌 변환 계수를 카운트하고 상기 제2블록에서 누적된 0이 아닌 변환 계수의 개수와 합하여 최종적으로 누적된 0이 아닌 변환 계수의 개수를 카운트할 수 있다. 그리고, 제3블록의 초기화된 스캔 오더는 이전 제2블록에서 최종 업데이트된 스캔 오더가 이용된다. 마찬가지로, 최종적으로 누적된 0이 아닌 변환 계수의 개수 중 가장 많은 개수를 가지는 픽셀 위치를 우선순위로 하여 스캔 오더를 변경할 수 있다.8C, a non-zero conversion coefficient in the third block is first counted and added to the number of non-zero conversion coefficients accumulated in the second block, and the number of non- can do. In the initialized scan order of the third block, the last updated scan order in the previous second block is used. Likewise, the scan order can be changed with priority given to pixel positions having the largest number of non-zero conversion coefficients that are finally accumulated.

마찬가지로, 도 8D를 참조하면, 먼저 제4블록 내 0이 아닌 변환 계수를 카운트하고 상기 제3블록에서 누적된 0이 아닌 변환 계수의 개수와 합하여 최종적으로 누적된 0이 아닌 변환 계수의 개수를 카운트할 수 있다. 그리고, 제4블록의 초기화된 스캔 오더는 이전 제3블록에서 최종 업데이트된 스캔 오더가 이용된다. 마찬가지로, 최종적으로 누적된 0이 아닌 변환 계수의 개수 중 가장 많은 개수를 가지는 픽셀 위치를 우선순위로 하여 스캔 오더를 변경할 수 있다.8D, a non-zero conversion coefficient in the fourth block is counted and added to the number of non-zero conversion coefficients accumulated in the third block to count the number of non-zero conversion coefficients finally accumulated can do. In the initialized scan order of the fourth block, the last updated scan order in the previous third block is used. Likewise, the scan order can be changed with priority given to pixel positions having the largest number of non-zero conversion coefficients that are finally accumulated.

이처럼 각 서브 블록마다 스캔 오더를 업데이트함으로써 보다 코딩 효율을 향상시킬 수 있다. 그리고, 매 슬라이스마다 스캔 오더를 초기화하지 않고 스캔 오더가 다시 초기화되는지 여부를 나타내는 플래그 정보를 슬라이스 헤더에서 정의할 수 있다.Thus, the coding efficiency can be improved by updating the scan order for each sub-block. Flag information indicating whether or not the scan order is re-initialized can be defined in the slice header without initializing the scan order for each slice.

이렇게 업데이트된 스캔 오더에 따라 1차원 배열된 변환 계수들은 디코딩된다.The one-dimensionally arranged transform coefficients are decoded according to the updated scan order.

한편, 상기 도 2, 도 3A 및 도 3B에서 설명한 바와 같이, 해상도가 큰 비디오 신호를 처리하는 경우, 변환 크기를 상기 비디오 신호의 해상도에 적합하도록 결정할 수 있다. 이때, 0이 아닌 변환계수레벨을 포함하는지 나타내는 정보들의 중복 전송을 방지할 필요가 있다. 예를 들어, 코딩블록 플래그 정보(coded_block_flag)는 0이 아닌 변환계수레벨을 포함하는지 여부를 나타내고, 상기 코딩블록 플래그 정보(coded_block_flag)가 '0'이면 0이 아닌 변환계수레벨을 포함하지 않고, '1'이면 적어도 하나의 0이 아닌 변환계수레벨을 포함하고 있음을 나타낸다. 다른 플래그 정보로, 블록패턴정보(coded_block_pattern)는 4개의 8X8 휘도 블록 및 이와 관련된 색차 블록이 0이 아닌 변환계수레벨을 포함하는지 여부를 나타낸다. 상기 블록패턴정보(coded_block_pattern)는 매크로블록 레이어에서 현재 매크로블록의 예측 모드가 인트라 16X16 예측모드가 아니면 추출된다. 여기서, 블록 패턴 정보란, 레지듀얼의 존재 여부를 알려주는 일종의 대표 비트 플래그로서, 16x16, 8×8 또는 4x4 휘도 블록의 레지듀얼 존재 여부를 나타낼 수 있다. 예를 들어, 현재 매크로블록이 존재하면 이를 4등분하여 좌측 상단 블록을 0번째 비트, 우측 상단 블록을 1번째 비트, 좌측 하단 블록을 2번째 비트, 우측 하단 블록을 3번째 비트로 설정하여 각 블록마다 레지듀얼의 존재 여부를 표현할 수 있다. 블록 패턴 정보는 6비트로 표현되는데, 위에서 살펴본 바와 같이 휘도 블록은 0~3번째 비트로 표현되고 색차 블록은 2비트(AC와 DC)로 표현된다. On the other hand, as described in FIGS. 2, 3A and 3B, when a video signal having a high resolution is processed, the conversion size can be determined to be suitable for the resolution of the video signal. At this time, there is a need to prevent duplicate transmission of information indicating whether or not it includes a non-zero transform coefficient level. For example, if the coding flag information (coded_block_flag) is '0', the coding flag flag information (coded_block_flag) indicates whether or not the coding flag flag coded_block_flag includes a non-zero conversion coefficient level. 1 'indicates that at least one non-zero transform coefficient level is included. With other flag information, the block pattern information (coded_block_pattern) indicates whether the four 8X8 luminance blocks and the color difference block associated therewith include non-zero transform coefficient levels. The block pattern information (coded_block_pattern) is extracted if the prediction mode of the current macroblock in the macroblock layer is not the intra 16x16 prediction mode. Here, the block pattern information is a representative bit flag indicating whether a residual exists or not, and may indicate whether a 16 × 16, 8 × 8, or 4 × 4 luminance block exists in a residual state. For example, if a current macroblock is present, it is divided into quarters to set the left upper block to the 0th bit, the upper right block to the 1st bit, the lower left block to the 2nd bit, and the lower right block to the 3rd bit, The existence of the residual can be expressed. The block pattern information is represented by 6 bits. As described above, the luminance block is represented by 0 to 3 bits and the color difference block is represented by 2 bits (AC and DC).

예를 들어, 현재 매크로블록의 크기가 16x16 이고, 16x16 블록 단위로 변환 계수 디코딩 과정이 적용되면, 상기 블록패턴정보(coded_block_pattern)의 휘도 성분은 1비트로 줄이고, 상기 코딩블록 플래그 정보(coded_block_flag)는 전송하지 않을 수 있다. 다른 예로, 현재 매크로블록의 크기가 16x16 이고, 16x8 / 8x16 블록 단위로 변환 계수 디코딩 과정이 적용되면, 상기 블록패턴정보(coded_block_pattern)의 휘도 성분은 2비트로 줄이고, 상기 코딩블록 플래그 정보(coded_block_flag)는 전송하지 않을 수 있다. 다른 예로, 현재 매크로블록의 크기가 32x32 이고, 16x16 블록 단위로 변환 계수 디코딩 과정이 적용되면, 상기 블록패턴정보(coded_block_pattern)의 휘도 성분은 4비트를 쓰고, 상기 코딩블록 플래그 정보(coded_block_flag)는 전송하지 않을 수 있다.For example, if the current macroblock size is 16x16 and the transform coefficient decoding process is applied in units of 16x16 blocks, the luminance component of the block pattern information coded_block_pattern is reduced to 1 bit, and the coding block flag information coded_block_flag is transmitted I can not. As another example, if the current macroblock size is 16x16 and the transform coefficient decoding process is applied in units of 16x8 / 8x16 blocks, the luminance component of the block pattern information coded_block_pattern is reduced to 2 bits, and the coding block flag information coded_block_flag is It may not transmit. As another example, if the size of the current macroblock is 32x32 and the transform coefficient decoding process is applied in units of 16x16 blocks, the luminance component of the block pattern information (coded_block_pattern) is written with 4 bits, and the coding block flag information (coded_block_flag) I can not.

한편, 상기 코딩블록 플래그 정보(coded_block_flag)는 적응적 변환 크기 플래그 정보에 기초하여 획득될 수 있다. 상기 적응적 변환 크기 플래그 정보는 상기 도 2에서 상세히 설명한 바 있다. 상기 적응적 변환 크기 플래그 정보는 현재 변환 유닛의 크기를 최소 변환 크기 및 최대 변환 크기 중 적어도 하나와 비교함으로써 획득될 수 있다. 상기 적응적 변환 크기 플래그 정보가, 코딩 유닛이 수평 및 수직 방향으로 절반 크기를 갖는 코딩 유닛들로 분할되는 것을 나타내는 경우, 변환 유닛의 크기가 결정되고, 그에 따라 변환 과정이 수행될 것이다. 또는 상기 적응적 변환 크기 플래그 정보가, 코딩 유닛이 수평 및 수직 방향으로 절반 크기를 갖는 코딩 유닛들로 분할되지 않음을 나타내는 경우, 상기 코딩블록 플래그 정보(coded_block_flag)가 획득될 수 있다.On the other hand, the coding block flag information (coded_block_flag) can be obtained based on the adaptive conversion size flag information. The adaptive conversion size flag information is described in detail in Fig. The adaptive transform magnitude flag information may be obtained by comparing the size of the current transform unit with at least one of a minimum transform magnitude and a maximum transform magnitude. If the adaptive transform size flag information indicates that the coding unit is divided into coding units having half the size in the horizontal and vertical directions, the size of the transform unit is determined and the transform process will be performed accordingly. Or the coding block flag information coded_block_flag may be obtained when the adaptive transform size flag information indicates that the coding unit is not divided into coding units having a half size in the horizontal and vertical directions.

이상에서 설명한 바와 같이, 본 발명이 적용되는 디코딩/인코딩 장치는 DMB(Digital Multimedia Broadcasting)과 같은 멀티미디어 방송 송/수신 장치에 구비되어, 비디오 신호 및 데이터 신호 등을 복호화하는데 사용될 수 있다. 또한 상기 멀티미디어 방송 송/수신 장치는 이동통신 단말기를 포함할 수 있다.As described above, the decoding / encoding apparatus to which the present invention is applied can be used in a multimedia broadcasting transmitting / receiving apparatus such as DMB (Digital Multimedia Broadcasting) to decode a video signal, a data signal and the like. Also, the multimedia broadcasting transmitting / receiving apparatus may include a mobile communication terminal.

또한, 본 발명이 적용되는 디코딩/인코딩 방법은 컴퓨터에서 실행되기 위한 프로그램으로 제작되어 컴퓨터가 읽을 수 있는 기록 매체에 저장될 수 있으며, 본 발명에 따른 데이터 구조를 가지는 멀티미디어 데이터도 컴퓨터가 읽을 수 있는 기록 매체에 저장될 수 있다. 상기 컴퓨터가 읽을 수 있는 기록 매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 저장 장치를 포함한다. 컴퓨터가 읽을 수 있는 기록 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등도 포함한다. 또한, 상기 인코딩 방법에 의해 생성된 비트스트림은 컴퓨터가 읽을 수 있는 기록 매체에 저장되거나, 유/무선 통신망을 이용해 전송될 수 있다.In addition, the decoding / encoding method to which the present invention is applied may be a program for being executed by a computer and stored in a computer-readable recording medium, and the multimedia data having the data structure according to the present invention may be stored in a computer- And can be stored in a recording medium. The computer-readable recording medium includes all kinds of storage devices in which data that can be read by a computer system is stored. Examples of the computer-readable recording medium include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like. In addition, the bit stream generated by the encoding method may be stored in a computer-readable recording medium or transmitted using a wired / wireless communication network.

이상, 전술한 본 발명의 바람직한 실시예는, 예시의 목적을 위해 개시된 것으로, 당업자라면 이하 첨부된 특허청구범위에 개시된 본 발명의 기술적 사상과 그 기술적 범위 내에서, 다양한 다른 실시예들을 개량, 변경, 대체 또는 부가 등이 가능할 것이다.It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit or scope of the invention as defined by the appended claims. , Substitution or addition, or the like.

Claims (13)

디코딩(decoding) 장치에서 비디오(video) 신호를 디코딩하는 방법에 있어서,
현재 블록이 0이 아닌 변환 계수 레벨을 포함하는지 여부를 나타내는 플래그 정보를 획득하는 단계;
변환 타입을 나타내는 변환 타입 정보를 획득하는 단계; 및
상기 플래그 정보 및 상기 변환 타입 정보에 기초하여 제1 변환 또는 제2 변환을 이용하여 상기 현재 블록을 디코딩하는 단계를 포함하되,
상기 변환 타입 정보가 0의 값을 나타내거나 또는 상기 현재 블록이 인트라 블록이 아닌 경우, 상기 현재 블록은 상기 제1 변환을 이용하여 디코딩되고,
상기 변환 타입 정보가 1의 값을 나타내고 상기 현재 블록이 인트라 블록인 경우, 상기 현재 블록은 상기 제2 변환을 이용하여 디코딩되는,
비디오 신호의 디코딩 방법.
A method for decoding a video signal in a decoding apparatus,
Obtaining flag information indicating whether the current block includes a non-zero transform coefficient level;
Obtaining conversion type information indicating a conversion type; And
Decoding the current block using a first conversion or a second conversion based on the flag information and the conversion type information,
If the transform type information indicates a value of 0 or if the current block is not an intra block, the current block is decoded using the first transform,
Wherein if the transform type information indicates a value of 1 and the current block is an intra block, then the current block is decoded using the second transform,
A method for decoding a video signal.
제1항에 있어서,
상기 현재 블록은 적어도 하나의 변환 블록을 포함하며, 상기 적어도 하나의 변환 블록에 대해 동일한 변환 커널(transform kernel)이 적용되는, 비디오 신호의 디코딩 방법.
The method according to claim 1,
Wherein the current block comprises at least one transform block and the same transform kernel is applied to the at least one transform block.
제2항에 있어서,
상기 변환 커널의 크기는 4x4, 8x8, 또는 16x16을 포함하는, 비디오 신호의 디코딩 방법.
3. The method of claim 2,
Wherein the size of the transform kernel comprises 4x4, 8x8, or 16x16.
제1항에 있어서,
상기 현재 블록을 디코딩하는 단계는,
변환 계수 정보를 획득하는 것과, 상기 획득된 변환 계수 정보에 대해 상기 제1 변환 또는 상기 제2 변환을 수행하는 것을 포함하는, 비디오 신호의 디코딩 방법.
The method according to claim 1,
Wherein the decoding of the current block comprises:
Obtaining transform coefficient information, and performing the first transform or the second transform on the obtained transform coefficient information.
제1항에 있어서,
상기 제1 변환은 이산 코사인 변환(discrete cosine transform, DCT)에 해당하고, 상기 제2 변환은 카루넨-루브 변환(Karhuhen-Loeve Transform, KLT)에 해당하는, 비디오 신호의 디코딩 방법.
The method according to claim 1,
Wherein the first transform corresponds to a discrete cosine transform (DCT) and the second transform corresponds to a Karhuhen-Loeve Transform (KLT).
비디오 신호(video signal)를 디코딩(decoding)하기 위한 디코딩 장치에 있어서, 상기 디코딩 장치는
현재 블록이 0이 아닌 변환 계수 레벨을 포함하는지 여부를 나타내는 플래그 정보를 획득하고, 변환 타입을 나타내는 변환 타입 정보를 획득하고, 상기 플래그 정보 및 상기 변환 타입 정보에 기초하여 제1 변환 또는 제2 변환을 이용하여 상기 현재 블록을 디코딩하도록 구성되며,
상기 변환 타입 정보가 0의 값을 나타내거나 또는 상기 현재 블록이 인트라 블록이 아닌 경우, 상기 현재 블록은 상기 제1 변환을 이용하여 디코딩되고,
상기 변환 타입 정보가 1의 값을 나타내고 상기 현재 블록이 인트라 블록인 경우, 상기 현재 블록은 상기 제2 변환을 이용하여 디코딩되는,
비디오 신호의 디코딩 장치.
A decoding apparatus for decoding a video signal, the decoding apparatus comprising:
Acquiring flag information indicating whether the current block includes a non-zero conversion coefficient level, acquiring conversion type information indicating a conversion type, and acquiring, based on the flag information and the conversion type information, a first conversion or a second conversion To decode the current block,
If the transform type information indicates a value of 0 or if the current block is not an intra block, the current block is decoded using the first transform,
Wherein if the transform type information indicates a value of 1 and the current block is an intra block, then the current block is decoded using the second transform,
/ RTI >
제6항에 있어서,
상기 현재 블록은 적어도 하나의 변환 블록을 포함하며, 상기 적어도 하나의 변환 블록에 대해 동일한 변환 커널(transform kernel)이 적용되는, 비디오 신호의 디코딩 장치.
The method according to claim 6,
Wherein the current block comprises at least one transform block and the same transform kernel is applied to the at least one transform block.
제7항에 있어서,
상기 변환 커널의 크기는 4x4, 8x8, 또는 16x16을 포함하는, 비디오 신호의 디코딩 장치.
8. The method of claim 7,
Wherein the size of the transform kernel comprises 4x4, 8x8, or 16x16.
제6항에 있어서,
상기 현재 블록을 디코딩하는 것은,
변환 계수 정보를 획득하는 것과, 상기 획득된 변환 계수 정보에 대해 상기 제1 변환 또는 상기 제2 변환을 수행하는 것을 포함하는, 비디오 신호의 디코딩 장치.
The method according to claim 6,
The decoding of the current block comprises:
Obtaining transform coefficient information, and performing the first transform or the second transform on the obtained transform coefficient information.
제6항에 있어서,
상기 제1 변환은 이산 코사인 변환(discrete cosine transform, DCT) 에 해당하고, 상기 제2 변환은 카루넨-루브 변환(Karhuhen-Loeve Transform, KLT)에 해당하는, 비디오 신호의 디코딩 장치.
The method according to claim 6,
Wherein the first transform corresponds to a discrete cosine transform (DCT), and the second transform corresponds to a Karhuhen-Loeve Transform (KLT).
인코딩(encoding) 장치에서 비디오(video) 신호를 인코딩하는 방법에 있어서,
현재 블록이 0이 아닌 변환 계수 레벨을 포함하는지 여부를 나타내는 플래그 정보를 획득하는 단계;
변환 타입을 나타내는 변환 타입 정보를 획득하는 단계; 및
상기 플래그 정보 및 상기 변환 타입 정보에 기초하여 제1 변환 또는 제2 변환을 이용하여 상기 현재 블록을 인코딩하는 단계를 포함하되,
상기 변환 타입 정보가 0의 값을 나타내거나 또는 상기 현재 블록이 인트라 블록이 아닌 경우, 상기 현재 블록은 상기 제1 변환을 이용하여 인코딩되고,
상기 변환 타입 정보가 1의 값을 나타내고 상기 현재 블록이 인트라 블록인 경우, 상기 현재 블록은 상기 제2 변환을 이용하여 인코딩되는,
비디오 신호의 인코딩 방법.
A method of encoding a video signal in an encoding device,
Obtaining flag information indicating whether the current block includes a non-zero transform coefficient level;
Obtaining conversion type information indicating a conversion type; And
Encoding the current block using a first conversion or a second conversion based on the flag information and the conversion type information,
If the transform type information indicates a value of 0 or the current block is not an intra block, the current block is encoded using the first transform,
Wherein if the transform type information indicates a value of 1 and the current block is an intra block, then the current block is encoded using the second transform,
A method of encoding a video signal.
제11항의 방법에 의해 인코딩된 비디오 신호가 저장된, 컴퓨터가 읽을 수 있는 기록 매체.12. A computer-readable recording medium on which a video signal encoded by the method of claim 11 is stored. 비디오(video) 신호를 인코딩(encoding)하기 위한 인코딩 장치에 있어서, 상기 인코딩 장치는
현재 블록이 0이 아닌 변환 계수 레벨을 포함하는지 여부를 나타내는 플래그 정보를 획득하고, 변환 타입을 나타내는 변환 타입 정보를 획득하고, 상기 플래그 정보 및 상기 변환 타입 정보에 기초하여 제1 변환 또는 제2 변환을 이용하여 상기 현재 블록을 인코딩하도록 구성되며,
상기 변환 타입 정보가 0의 값을 나타내거나 또는 상기 현재 블록이 인트라 블록이 아닌 경우, 상기 현재 블록은 상기 제1 변환을 이용하여 인코딩되고,
상기 변환 타입 정보가 1의 값을 나타내고 상기 현재 블록이 인트라 블록인 경우, 상기 현재 블록은 상기 제2 변환을 이용하여 인코딩되는,
비디오 신호의 인코딩 장치.
An encoding apparatus for encoding a video signal, the encoding apparatus comprising:
Acquiring flag information indicating whether the current block includes a non-zero conversion coefficient level, acquiring conversion type information indicating a conversion type, and acquiring, based on the flag information and the conversion type information, a first conversion or a second conversion To encode the current block,
If the transform type information indicates a value of 0 or the current block is not an intra block, the current block is encoded using the first transform,
Wherein if the transform type information indicates a value of 1 and the current block is an intra block, then the current block is encoded using the second transform,
An apparatus for encoding a video signal.
KR1020170161466A 2009-06-07 2017-11-29 A method and an apparatus for decoding a video signal KR101994216B1 (en)

Applications Claiming Priority (10)

Application Number Priority Date Filing Date Title
US18483409P 2009-06-07 2009-06-07
US61/184,834 2009-06-07
US25784409P 2009-11-04 2009-11-04
US61/257,844 2009-11-04
US28832309P 2009-12-20 2009-12-20
US61/288,323 2009-12-20
US29025009P 2009-12-28 2009-12-28
US29025109P 2009-12-28 2009-12-28
US61/290,251 2009-12-28
US61/290,250 2009-12-28

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020100053253A Division KR101805531B1 (en) 2009-06-07 2010-06-07 A method and an apparatus for decoding a video signal

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020190073421A Division KR102096407B1 (en) 2009-06-07 2019-06-20 A method and an apparatus for decoding a video signal

Publications (2)

Publication Number Publication Date
KR20170134300A KR20170134300A (en) 2017-12-06
KR101994216B1 true KR101994216B1 (en) 2019-06-28

Family

ID=60922207

Family Applications (3)

Application Number Title Priority Date Filing Date
KR1020170161466A KR101994216B1 (en) 2009-06-07 2017-11-29 A method and an apparatus for decoding a video signal
KR1020190073421A KR102096407B1 (en) 2009-06-07 2019-06-20 A method and an apparatus for decoding a video signal
KR1020200036864A KR102213876B1 (en) 2009-06-07 2020-03-26 A method and an apparatus for decoding a video signal

Family Applications After (2)

Application Number Title Priority Date Filing Date
KR1020190073421A KR102096407B1 (en) 2009-06-07 2019-06-20 A method and an apparatus for decoding a video signal
KR1020200036864A KR102213876B1 (en) 2009-06-07 2020-03-26 A method and an apparatus for decoding a video signal

Country Status (1)

Country Link
KR (3) KR101994216B1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115379216A (en) * 2018-06-03 2022-11-22 Lg电子株式会社 Video signal decoding apparatus, video signal encoding apparatus, video signal transmitting apparatus, and video signal storage medium
KR20210102468A (en) * 2019-02-06 2021-08-19 엘지전자 주식회사 Method and apparatus for processing a video signal using reduced transform
KR102310900B1 (en) * 2019-07-02 2021-10-12 한국전력공사 Diagnostic apparatus for facilities of power transmission using unmaned aerial vehicle and method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5241395A (en) * 1989-08-07 1993-08-31 Bell Communications Research, Inc. Adaptive transform coding using variable block size

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Test Model under Consideration. JCT-VC of ITU-T and ISO/IEC. JCTVC-A205 draft002. May. 24, 2010, pp.1-113

Also Published As

Publication number Publication date
KR20170134300A (en) 2017-12-06
KR20200035388A (en) 2020-04-03
KR102096407B1 (en) 2020-04-02
KR102213876B1 (en) 2021-02-05
KR20190075031A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
KR101805531B1 (en) A method and an apparatus for decoding a video signal
KR102453759B1 (en) A method and an apparatus for decoding a video signal
US10986372B2 (en) Method and apparatus for decoding a video signal
CA3000998C (en) Image encoding device, image decoding device, image encoding method, and image decoding method
US20170041602A1 (en) Method and apparatus of deriving intra prediction mode using most probable mode group
KR20140095112A (en) Method and device for optimizing encoding/decoding of compensation offsets for a set of reconstructed samples of an image
CA2989193A1 (en) Method of deriving quantization parameter
JP2014534752A (en) Video decoding device
KR102213876B1 (en) A method and an apparatus for decoding a video signal
KR101468078B1 (en) Method and apparatus for intra prediction
KR20140089488A (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR102286420B1 (en) A method and an apparatus for decoding a video signal
JP7418561B2 (en) Video coding method and device based on conversion
KR101886259B1 (en) Method and apparatus for image encoding, and computer-readable medium including encoded bitstream

Legal Events

Date Code Title Description
A107 Divisional application of patent
E902 Notification of reason for refusal
E90F Notification of reason for final refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant