KR20180009373A - A method and an apparatus for processing a video signal - Google Patents

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

Info

Publication number
KR20180009373A
KR20180009373A KR1020180005837A KR20180005837A KR20180009373A KR 20180009373 A KR20180009373 A KR 20180009373A KR 1020180005837 A KR1020180005837 A KR 1020180005837A KR 20180005837 A KR20180005837 A KR 20180005837A KR 20180009373 A KR20180009373 A KR 20180009373A
Authority
KR
South Korea
Prior art keywords
macroblock
block
information
current block
current
Prior art date
Application number
KR1020180005837A
Other languages
Korean (ko)
Other versions
KR101931950B1 (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 KR20180009373A publication Critical patent/KR20180009373A/en
Application granted granted Critical
Publication of KR101931950B1 publication Critical patent/KR101931950B1/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/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • 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/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/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using 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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • 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/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • 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

If the macroblock type of a current macroblock is intramixed, block type identification information on the partition of the current macroblock is obtained to specify a block type for the partition of the current macroblock. The current macroblock can be predicted by obtaining the intra prediction mode of the current macroblock according to the block type of the current macroblock. In the case of a macroblock larger than 16x16, various block types are adaptively applied to reduce the number of bits necessary for coding a macroblock type, thereby improving coding efficiency.

Description

비디오 신호 처리 방법 및 장치{A METHOD AND AN APPARATUS FOR PROCESSING A VIDEO SIGNAL}TECHNICAL FIELD [0001] The present invention relates to a video signal processing method and apparatus,

본 발명은 인트라 또는 인터 예측 및 블록 단위 부호화에 관한 방법과 장치에 관한 것이다.The present invention relates to a method and apparatus for intra or inter prediction and block unit coding.

영상 신호의 압축률을 높이기 위해 시간적 중복성과 공간적 중복성을 제거하는 방법 즉, 인트라 또는 인터 예측을 수행하며, 직교 변환 및 벡터 양자화 등의 기술을 이용한다.In order to increase the compression ratio of a video signal, a method of eliminating temporal redundancy and spatial redundancy, that is, intra or inter prediction is performed, and techniques such as orthogonal transformation and vector quantization are used.

본 발명의 목적은 인트라 예측을 이용하여 비디오 신호를 효율적으로 처리하고자 함에 있다.It is an object of the present invention to efficiently process a video signal using intra prediction.

본 발명의 또 다른 목적은 출력 영역에 속하지 아니하는 영역을 코딩함에 필요한 비트수를 줄이고자 함에 있다.It is a further object of the present invention to reduce the number of bits needed to code an area that does not belong to the output area.

상기 목적을 달성하기 위하여 본 발명은 16x16 보다 큰 매크로 블록인 경우 I 슬라이스의 매크로 블록 타입을 정의하고, 그에 따른 상기 매크로 블록의 예측 블록의 크기 및 인트라 예측 모드를 획득하는 방법을 제시한다.According to an aspect of the present invention, there is provided a method of defining a macroblock type of an I-slice in the case of a macroblock larger than 16x16, and obtaining a size and an intra-prediction mode of the predicted block of the macroblock.

본 발명은 슬라이스 타입에 따라 경계 매크로 블록의 매크로 블록 타입을 정의하고, I 슬라이스의 경계 매크로 블록에 대해서는 예측 블록의 크기 및 인트라 예측 모드를 결정하는 방법을 제시하고, P 슬라이스 또는 B 슬라이스의 경계 매크로 블록에 대해서는 스킵 모드를 이용한 인터 예측 방법을 제시한다.The present invention proposes a method of defining a macroblock type of a boundary macroblock according to a slice type and determining a size of a prediction block and an intra prediction mode for a boundary macroblock of an I slice, The inter prediction method using skip mode is proposed for the block.

본 발명에 따르면, 비디오 영상의 크기가 커짐에 따라 16x16 보다 큰 매크로 블록을 적응적으로 이용함으로써 매크로 블록 타입을 코딩함에 필요한 비트수를 줄일 수 있어 코딩의 효율성을 향상시킬 수 있다. I 슬라이스의 매크로 블록의 경우에도 서브 매크로 블록 단위로 코딩함으로써, 예측의 정확성을 높일 수 있으며, 동시에 상기 매크로 블록의 예측 블록의 크기를 변환 크기 정보에 기초하여 결정함으로써, 매크로 블록 타입을 코딩함에 필요한 비트수를 줄일 수 있어 코딩의 효율성도 향상시킬 수 있다. 경계 매크로 블록에 대한 매크로 블록 타입, 인트라 예측 모드, 모션 정보 등을 별도로 전송하지 아니하고 디코더에서 유도하거나 결정하도록 함으로써, 상기 매크로 블록 타입, 인트라 예측 모드, 모션 정보 등을 코딩함에 필요한 비트수를 줄일 수 있다.According to the present invention, as the size of a video image increases, the number of bits necessary for coding a macroblock type can be reduced by adaptively using macroblocks larger than 16x16, thereby improving coding efficiency. Even in the case of a macroblock of an I-slice, the accuracy of prediction can be improved by coding in units of sub-macroblocks. At the same time, the size of the prediction block of the macroblock is determined based on the transform size information, The number of bits can be reduced and coding efficiency can be improved. Intra prediction mode, motion information, and the like for the boundary macroblock are not separately transmitted but are derived or determined by the decoder, thereby reducing the number of bits necessary for coding the macroblock type, intra prediction mode, motion information, have.

도 1은 비디오 신호 디코딩 장치의 개략적인 블록도이다.
도 2는 매크로 블록 타입 및 변환 크기 정보를 이용하여 매크로 블록을 디코딩하는 장치를 도시한 것이다.
도 3은 매크로 블록 타입 및 변환 크기 정보를 이용하여 매크로 블록을 디코딩하는 과정을 도시한 블록도이다.
도 4는 매크로 블록이 32x32인 경우, P 매크로 블록 및 B 매크로 블록의 서브 매크로 블록 타입을 도시한 테이블이다.
도 5는 매크로 블록이 32x32인 경우, 인트라 매크로 블록 타입의 일 실시예를 도시한 것이다.
도 6은 매크로 블록 타입 정보 및 블록 타입 지시 정보를 이용하여 서브 매크로 블록을 디코딩하는 방법을 도시한 블록도 이다.
도 7은 블록 타입 지시 정보를 이용하여 서브 매크로 블록 타입을 결정하는 방법의 일 실시예를 도시한 블록도이다.
도 8은 매크로 블록이 인트라 모드로 코딩되는 경우, 매크로 블록의 인트라 예측 모드를 획득하는 방법을 도시한 블록도이다.
도 9는 경계 매크로 블록 및 경계 서브 매크로 블록을 도시한 것이다.
도 10은 I슬라이스의 경우, 경계 매크로 블록 내의 서브 매크로 블록을 디코딩하는 방법을 도시한 블록도이다.
도 11은 넌-경계 서브 매크로 블록의 인트라 예측 모드를 설정하는 방법의 일실시예를 도시한 것이다.
도 12는 P 슬라이스 또는 B 슬라이스의 경우, 경계 매크로 블록 내의 서브 매크로 블록을 디코딩하는 방법을 도시한 블록도이다.
도 13은 P 슬라이스 또는 B 슬라이스 내의 경계 매크로 블록의 위치에 따라 매크로 블록 타입을 결정하는 방법을 도시한 것이다.
1 is a schematic block diagram of a video signal decoding apparatus.
FIG. 2 illustrates an apparatus for decoding a macroblock using macroblock type and transform size information.
3 is a block diagram illustrating a process of decoding a macroblock using macroblock type and transform size information.
4 is a table showing sub macro-block types of the P macroblock and the B macroblock when the macroblock is 32x32.
FIG. 5 shows an embodiment of the intra macroblock type when the macroblock is 32x32.
6 is a block diagram illustrating a method of decoding a sub-macroblock using macroblock type information and block type indication information.
FIG. 7 is a block diagram illustrating an embodiment of a method for determining a sub-macro-block type using block type indication information.
8 is a block diagram showing a method of acquiring an intra prediction mode of a macroblock when a macroblock is coded in an intra mode.
9 shows boundary macroblocks and boundary sub macroblocks.
10 is a block diagram showing a method of decoding a sub-macroblock in a boundary macroblock in the case of an I-slice.
FIG. 11 shows an embodiment of a method for setting an intra-prediction mode of a non-boundary sub-macroblock.
12 is a block diagram showing a method of decoding a sub-macroblock in a boundary macroblock in the case of a P slice or a B slice.
13 shows a method of determining a macroblock type according to the position of a boundary macroblock in a P slice or a B slice.

이하 첨부된 도면을 참조로 본 발명의 바람직한 실시예를 상세히 설명하기로 한다. 이에 앞서, 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다. 따라서, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시예에 불과할 뿐이고 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형예들이 있을 수 있음을 이해하여야 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Prior to this, terms and words used in the present specification and claims should not be construed as limited to ordinary or dictionary terms, and the inventor should appropriately interpret the concepts of the terms appropriately It should be interpreted in accordance with the meaning and concept consistent with the technical idea of the present invention based on the principle that it can be defined. Therefore, the embodiments described in this specification and the configurations shown in the drawings are merely the most preferred embodiments of the present invention and do not represent all the technical ideas of the present invention. Therefore, It is to be understood that equivalents and modifications are possible.

먼저, 매크로 블록에 대해서 살펴보기로 한다. 매크로 블록은 비디오 프레임을 처리하기 위한 기본 단위로서, 16x16 화소로 이루어진 영역으로 정의할 수 있다. 그러나, 비디오 영상의 크기가 커짐에 따라 16x16 보다 큰 영역으로 정의될 수도 있다. 예를 들어, 매크로 블록은 32x32, 또는 64x64 화소로 이루어진 영역으로 정의할 수 있다. 이 경우, 16x16 보다 큰 매크로 블록은 종래보다 해상도가 큰 비디오 프레임을 처리하기 위한 기본 단위가 될 수 있다.First, let's look at the macro block. A macroblock is a basic unit for processing video frames, and can be defined as an area consisting of 16x16 pixels. However, as the video image size increases, it may be defined as an area larger than 16x16. For example, a macroblock can be defined as an area consisting of 32x32 pixels or 64x64 pixels. In this case, a macroblock larger than 16x16 can be a basic unit for processing a video frame having a higher resolution than the conventional one.

16x16 보다 큰 매크로 블록은 비디오 영상의 해상도에 따라 적응적으로 이용될 수 있다. 예를 들어, 비디오 영상의 해상도가 VGA이하인 경우에는 매크로 블록의 크기를 16x16으로 설정할 수 있으며, 이에 따라 매크로 블록의 파티션으로서 16x8, 8x16, 8x8, 4x8, 8x4, 4x4 크기의 블록들이 사용될 수 있다. 해상도가 VGA 이상 1080P 이하인 경우에는 매크로 블록의 크기를 32x32으로 설정할 수 있으며, 이에 따라 32x16, 16x32, 16x16, 16x8, 8x16, 8x8 크기의 블록들이 사용될 수 있고, 해상도가 1080P 이상 4Kx2K 이하인 경우에는 매크로 블록의 크기를 64x64으로 설정할 수 있으며, 64x32, 32x64, 32x32, 32x16, 16x32, 16x16 크기의 블록들이 사용될 수 있다. 다만, 인코더에서는 비디오 영상의 해상도에 따라 16x16 매크로 블록 또는 16x16 보다 큰 매크로 블록 가운데서 최적의 매크로 블록의 크기를 결정할 수 있다. 상기 결정된 매크로 블록의 크기 정보는 슬라이스 레벨이나 시퀀스 레벨에서 디코더로 전송될 수 있으며, 이에 따라 매크로 블록의 크기를 적응적으로 이용할 수 있다.Macroblocks larger than 16x16 can be used adaptively according to the resolution of the video image. For example, when the resolution of a video image is VGA or less, the size of a macroblock can be set to 16x16. Thus, blocks of 16x8, 8x16, 8x8, 4x8, 8x4, and 4x4 can be used as partitions of a macroblock. 16x16, 16x8, 8x16, and 8x8 blocks can be used. When the resolution is 1080P or more and 4Kx2K or less, the macroblock size can be set to 32x32, 64x64, 32x64, 32x32, 32x16, 16x32, and 16x16 blocks can be used. However, the encoder can determine the optimal size of a macroblock among 16 × 16 macroblocks or macroblocks larger than 16 × 16 according to the resolution of a video image. The size information of the determined macroblock may be transmitted to the decoder at a slice level or a sequence level, and thus the size of the macroblock may be adaptively used.

매크로 블록의 크기에 따른 매크로 블록 타입에 대해서 살펴보기로 한다. 매크로 블록 타입은 매크로 블록의 예측 모드에 따라, 즉, 인트라 모드인지 인터 모드인지 여부에 따라 각각 정의될 수 있다. 매크로 블록은 일정 크기의 블록 단위로 예측되며, 이하 예측 블록의 크기 정보는 상기 일정 크기의 블록 단위와 동일한 의미로 사용될 수 있다. 매크로 블록 타입은 예측 블록의 크기 정보를 포함할 수 있으며, 인터 예측을 수행하는 매크로 블록 타입은 참조 방향에 대한 정보도 포함할 수 있다.The macro block type according to the size of the macro block will be described below. The macroblock type can be defined according to the prediction mode of the macroblock, that is, whether it is an intra mode or an inter mode. The macroblock is predicted in block units of a predetermined size, and the size information of the prediction block is used in the same meaning as the block unit of the predetermined size. The macroblock type may include the size information of the prediction block, and the macroblock type that performs the inter prediction may also include information on the reference direction.

구체적으로 살펴보면, 인트라 모드로 코딩된 매크로 블록은 16x16화소, 8x8화소, 4x4화소의 블록 단위로 코딩될 수 있다. 인터 모드로 코딩된 매크로 블록은 모션 보상을 위해 16x16화소, 16x8화소, 8x16화소 8x8화소가 매크로 블록 타입으로 사용되며, 8x8화소가 사용될 경우 8x4화소, 4x8화소, 4x4화소가 서브 매크로 블록 타입으로 사용될 수 있다.Specifically, a macroblock coded in intra mode can be coded in block units of 16x16 pixels, 8x8 pixels, and 4x4 pixels. A macroblock coded in the inter mode is used as a macroblock type for 16 × 16 pixels, 16 × 8 pixels, 8 × 16 pixels and 8 × 8 pixels for motion compensation. When 8 × 8 pixels are used, 8 × 4 pixels, 4 × 8 pixels and 4 × 4 pixels are used as a sub macro block type .

이하, 16x16 보다 큰 매크로 블록에 따른 매크로 블록 타입을 정의하고자 한다. 비디오 영상의 크기가 커짐에 따라 상대적으로 크기가 작은 매크로 블록 타입은 사용빈도가 감소할 것인바, 이러한 매크로 블록 타입에 대한 정보를 제거할 수 있고, 그에 따라 매크로 블록 타입에 할당된 비트수를 줄일 수 있다. 예를 들어, 비디오 영상의 해상도가 VGA이하인 경우라면 앞서 설명한 매크로 블록 타입을 이용할 수 있다. 그러나, 해상도가 VGA 이상 1080P 이하인 경우라면, 8x8화소보다 작은 매크로 블록 타입은 이용하지 아니할 수 있다. 즉, 인트라 모드로 코딩된 매크로 블록은 16x16화소, 8x8화소의 블록 단위로 코딩될 수 있으며, 인터 모드로 코딩된 매크로 블록은 16x16화소, 16x8화소, 8x16화소 8x8화소가 매크로 블록 타입으로 이용될 수 있다. 이 경우 서브 매크로 블록 타입으로 8x4화소, 4x8화소, 4x4화소가 이용되지 않을 수 있다. 해상도가 1080P 이상 4Kx2K 이하인 경우라면, 16x16화소보다 작은 매크로 블록 타입은 이용하지 아니할 수 있다. 즉, 인트라 모드로 코딩된 블록 및 인터 모드로 코딩된 블록에 대해서는 16x16화소가 매크로 블록 타입으로 이용될 수 있다.Hereinafter, a macroblock type according to a macroblock larger than 16x16 is defined. As the size of the video image increases, the frequency of use of a relatively small size macroblock type decreases, information on such a macroblock type can be removed, thereby reducing the number of bits allocated to the macroblock type . For example, if the resolution of the video image is VGA or less, the above-described macroblock type can be used. However, if the resolution is VGA or higher and 1080P or less, a macroblock type smaller than 8x8 pixels may not be used. That is, a macroblock coded in the intra mode can be coded in units of blocks of 16x16 pixels and 8x8 pixels, and a macroblock coded in the inter mode can be used as a macroblock type in 16x16 pixels, 16x8 pixels, 8x16 pixels and 8x8 pixels have. In this case, 8x4 pixels, 4x8 pixels, and 4x4 pixels may not be used as the sub macro block type. If the resolution is 1080P or more and 4Kx2K or less, a macroblock type smaller than 16x16 pixels may not be used. That is, for a block coded in intra mode and a block coded in inter mode, 16x16 pixels can be used as a macroblock type.

마찬가지로 인코더에서는 비디오 영상의 해상도에 따라 최적의 매크로 블록 타입을 결정할 수 있고, 상기 결정된 매크로 블록 타입 정보는 슬라이스 레벨이나 시퀀스 레벨에서 디코더로 전송될 수 있으며, 이에 따라 매크로 블록 타입을 적응적으로 이용할 수 있다.Similarly, the encoder can determine the optimal macroblock type according to the resolution of the video image, and the determined macroblock type information can be transmitted to the decoder at the slice level or the sequence level, and thus the macroblock type can be adaptively used have.

도 1은 비디오 신호 디코딩 장치의 개략적인 블록도이다. 1 is a schematic block diagram of a video signal decoding apparatus.

도 1을 참조하면, 본 발명의 비디오 신호 디코딩 장치는 엔트로피 디코딩부(110), 역양자화부(120), 역변환부(125), 디블록킹 필터링부(130), 복호 픽쳐 저장부(140), 인터 예측부(150), 인트라 예측부(160)를 포함한다. 1, the video signal decoding apparatus of the present invention includes an entropy decoding unit 110, an inverse quantization unit 120, an inverse transform unit 125, a deblocking filtering unit 130, a decoded picture storage unit 140, An inter prediction unit 150, and an intra prediction unit 160.

엔트로피 코딩부(110)는 비디오 신호 비트스트림을 엔트로피 디코딩하여 각 매크로 블록의 변환 계수, 모션 벡터, 참조 픽쳐 인덱스 등을 추출한다. 역양자화부(120)는 엔트로피 디코딩된 변환 계수를 역양자화하고, 역변환부(125)는 역양자화된 변환 계수를 이용하여 원래의 화소값을 복원한다. 디블록킹 필터링부(130)는 블록 왜곡 현상을 감소시키기 위해 각각의 코딩된 매크로 블록에 적용된다. 필터링을 거친 픽쳐는 출력되거나 참조 픽쳐로 이용하기 위해 복호 픽쳐 저장부(140)에 저장된다. 인터 예측부(150)는 복호 픽쳐 저장부(140)에 저장된 참조 픽쳐와 엔트로피 디코딩부(110)로부터 전달받은 인터 예측 정보(참조 픽쳐 인덱스, 모션 벡터 등)를 이용하여 현재 픽쳐를 예측할 수 있다. 구체적으로 살펴보면, 비디오 신호로부터 현재 블록에 인접한 블록(이하, 이웃 블록이라 함.)의 모션 벡터를 추출하고, 상기 이웃 블록으로부터 상기 현재 블록의 모션 벡터 예측값을 획득할 수 있다. 상기 이웃 블록이라 함은 현재 블록의 좌측, 상단, 우측 상단의 블록을 포함할 수 있다. 예를 들어, 상기 이웃 블록들의 모션 벡터의 수평 성분과 수직 성분 각각의 중앙값을 사용하여 현재 블록의 모션 벡터 예측값을 획득하는 것으로 설정할 수 있다. 또는, 현재 블록의 좌측 블록이 하나 이상의 인터 모드로 코딩된 예측 블록을 가지는 경우에는 그 중 가장 상단에 위치한 예측 블록의 모션 벡터를 이용하여 현재 블록의 모션 벡터의 예측값을 획득하는 것으로 설정할 수도 있다. 현재 블록의 상단 블록이 하나 이상의 인터 모드로 코딩된 예측 블록을 가지는 경우에는 그 중 가장 좌측에 위치한 예측 블록의 모션 벡터를 이용하여 현재 블록의 모션 벡터의 예측값을 획득하는 것으로 설정할 수도 있다. 이웃 블록 중 현재 블록의 상단, 우측 상단의 블록이 픽쳐 또는 슬라이스의 경계 밖에 위치할 경우, 좌측 블록의 모션 벡터를 현재 블록의 모션 벡터의 예측값으로 설정할 수 있다. 이웃 블록 중 현재 블록과 참조 픽쳐 인덱스가 같은 블록이 하나만 있는 경우에는 그 블록의 모션 벡터를 예측에 사용하는 것으로 설정할 수 있다.The entropy coding unit 110 entropy-decodes the video signal bitstream and extracts a transform coefficient, a motion vector, a reference picture index, and the like of each macroblock. The inverse quantization unit 120 dequantizes the entropy-decoded transform coefficients, and the inverse transform unit 125 restores the original pixel values using the dequantized transform coefficients. The deblocking filtering unit 130 is applied to each coded macroblock to reduce the block distortion phenomenon. The filtered picture is stored in the decoded picture storage unit 140 for output or use as a reference picture. The inter prediction unit 150 may predict the current picture using the reference picture stored in the decoding picture storage unit 140 and the inter prediction information (reference picture index, motion vector, etc.) received from the entropy decoding unit 110. [ More specifically, a motion vector of a block adjacent to a current block (hereinafter, referred to as a neighboring block) may be extracted from a video signal, and a motion vector predicted value of the current block may be obtained from the neighboring block. The neighboring block may include a left block, an upper block, and a right upper block of the current block. For example, the motion vector prediction value of the current block can be obtained by using the median of the horizontal component and the vertical component of the motion vectors of the neighboring blocks. Alternatively, when the left block of the current block has a prediction block coded in one or more inter modes, the prediction value of the motion vector of the current block may be obtained using the motion vector of the prediction block located at the top of the current block. If the upper block of the current block has a prediction block coded in more than one inter mode, the prediction value of the motion vector of the current block may be obtained using the motion vector of the prediction block located at the leftmost of the blocks. The motion vector of the left block can be set as the predicted value of the motion vector of the current block when the block at the upper end and the right end of the current block are located outside the boundary of the picture or slice. If there is only one block in the neighboring block having the same current block and reference picture index, the motion vector of the block can be set to be used for prediction.

매크로 블록 타입에 따른 매크로 블록의 파티션에 기초하여 모션 벡터의 예측값을 획득할 수도 있다. 예를 들어, 현재 매크로 블록 타입에 따른 상기 현재 매크로 블록의 파티션이 8x16 인 경우, 상기 현재 매크로 블록의 파티션의 인덱스가 0이면, 상기 현재 매크로 블록의 좌측 블록을, 현재 블록의 인덱스가 1이면, 현재 블록의 우측 상단 블록을 예측에 사용하는 것으로 설정할 수 있다. 현재 매크로 블록 타입에 따른 매크로 블록의 파티션이 16x8 인 경우, 상기 매크로 블록의 파티션의 인덱스가 0이면, 현재 블록의 상단 블록을, 상기 매크로 블록의 파티션의 인덱스가 1이면, 현재 블록의 좌측 블록을 예측에 사용하는 것으로 설정할 수 있다. The predicted value of the motion vector may be obtained based on the partition of the macroblock according to the macroblock type. For example, if the partition of the current macroblock according to the current macroblock type is 8x16, if the index of the partition of the current macroblock is 0, the left block of the current macroblock, The upper right block of the current block can be set to be used for prediction. If the partition of the current macroblock is 16x8, if the index of the partition of the current macroblock is 0, the upper block of the current block is determined as the partition of the current macroblock. If the index of the partition of the macroblock is 1, It can be set to be used for prediction.

현재 블록의 모션 벡터 예측값을 획득함에 있어서, 이웃 블록으로부터 추출가능한 여러 가지의 모션 벡터를 모션 벡터 예측값의 후보자로 정의할 수 있다. 상기 모션 벡터 예측값의 후보자는 상기 설명한 바와 같이 이웃 블록 중 어느 하나의 블록의 모션 벡터, 이웃 블록의 모션 벡터들의 중앙값 또는 평균값 등을 포함할 수 있으며, 이웃 블록의 모션 벡터의 빈도수를 고려하여 상기 모션 벡터의 예측값의 후보자를 결정할 수도 있으나, 이에 한정되지 아니한다. 그에 따라 인코더에서는 모션 벡터 예측값의 후보자 중 현재 블록의 모션 벡터 예측값으로 가장 효율성이 좋은 모션 벡터를 선택하고, 상기 선택된 모션 벡터 정보를 디코더로 전송할 수 있다. 상기 선택된 모션 벡터 정보는 슬라이스 레벨 또는 매크로 블록 레벨에서 획득될 수 있다. 상기 모션 벡터 예측값의 후보자를 인덱스를 이용하여 정의할 수도 있으며, 상기 선택된 모션 벡터 정보는 상기 인덱스를 포함할 수 있다. In obtaining the motion vector prediction value of the current block, various motion vectors extractable from the neighboring block may be defined as candidates of the motion vector prediction value. As described above, the candidate of the motion vector prediction value may include a motion vector of any one of neighboring blocks, a median value or an average value of motion vectors of neighboring blocks, and the motion vector of the neighboring block, The candidate of the predicted value of the vector may be determined, but is not limited thereto. Accordingly, the encoder selects a motion vector having the best efficiency as a motion vector prediction value of a current block among candidates of the motion vector prediction value, and transmits the selected motion vector information to the decoder. The selected motion vector information may be obtained at a slice level or a macroblock level. The candidate of the motion vector prediction value may be defined using an index, and the selected motion vector information may include the index.

현재 블록의 모션 벡터와 모션 벡터 예측값간의 차분 벡터만을 부호화함으로써 부호화해야 할 비트량을 줄일 수 있다. 상기 획득된 모션 벡터 예측값과 비디오 신호로부터 추출되는 차분 벡터를 이용하여 현재 블록의 모션을 보상한다. 또한, 이러한 모션 보상은 하나의 참조 픽쳐를 이용하여 수행될 수도 있고, 복수의 픽쳐를 이용하여 수행될 수도 있다.Only the difference vector between the motion vector of the current block and the motion vector prediction value is encoded, thereby reducing the amount of bits to be encoded. 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 may be performed using a plurality of pictures.

예를 들어, 매크로 블록이 16x16 인 경우, 인터 예측을 위해 16x16, 16x8, 8x16, 8x8, 8x4, 4x8, 4x4까지 총 7종류의 파티션이 사용될 수 있다. 이들은 매크로 블록 타입 또는 서브 매크로 블록 타입으로 계층화하여 표시될 수 있다. 구체적으로 예측 블록의 크기는 매크로 블록 타입으로 표시될 수 있으며, 16x16, 16x8, 8x16, 8x8 중 하나가 선택될 수 있다. 만일 8x8 이 선택되면, 서브 매크로 블록 타입으로 8x8, 8x4, 4x8, 4x4 중 하나의 파티션이 선택될 수 있다.For example, if the macroblock is 16x16, a total of seven types of partitions can be used for inter prediction, including 16x16, 16x8, 8x16, 8x8, 8x4, 4x8, and 4x4. These can be displayed in a layered manner as a macro-block type or a sub-macro-block type. Specifically, the size of the prediction block may be represented by a macroblock type, and one of 16x16, 16x8, 8x16, and 8x8 may be selected. If 8x8 is selected, one of 8x8, 8x4, 4x8, and 4x4 partitions can be selected as the sub macro block type.

예측 블록마다 참조 픽쳐 인덱스와 모션 벡터를 코딩할 수 있다. 또는, 참조 픽쳐 인덱스는 매크로 블록마다, 모션 벡터는 예측 블록마다 코딩할 수도 있다. 서브 매크로 블록에서도 매크로 블록과 동일하게 코딩 방식을 결정할 수 있다. 상기 언급한 인터 예측에 관련된 내용은 이하 인터 예측을 수행하는 경우에 동일하게 적용될 수 있음을 이해하여야 한다. It is possible to code the reference picture index and the motion vector for each prediction block. Alternatively, the reference picture index may be coded for each macroblock, and the motion vector for each prediction block. In the sub-macroblock, the coding scheme can be determined in the same manner as the macroblock. It is to be understood that the contents of the above-mentioned inter prediction can be equally applied to the case of inter prediction.

스킵 매크로 블록은 스킵 모드로 코딩된 매크로 블록을 의미할 수 있으며, 이는 현재 매크로 블록을 복원함에 있어서, 현재 매크로 블록에 대한 정보, 즉, 모션 벡터, 참조 픽쳐 인덱스, 및 레지듀얼 데이터를 가지지 아니하고, 이전에 코딩된 참조 픽쳐 내의 매크로 블록의 화소값을 그대로 이용하는 방식으로 정의할 수 있다. 스킵 매크로 블록 코딩함에 있어서, 모션 벡터를 이용한 모션 보상이 수반될 수 있으며, 상기 모션 벡터는 이웃 블록을 이용하여 유도될 수 있다. 이웃 블록으로부터 상기 모션 벡터를 유도하는 방법은 앞서 설명한 모션 벡터 유도 방법을 동일하게 적용할 수 있다. 이하, B 스킵 매크로 블록의 모션 벡터 및 참조 픽쳐 인덱스를 유도하는 방법에 대해서 살펴보기로 한다. List1 참조 픽쳐 중 가장 작은 참조 인덱스를 가지는 픽쳐를 앵커 픽쳐라고 정의할 수 있다. 그리고, 상기 현재 블록과 같은 공간 위치에 있는 앵커 픽쳐의 블록을 앵커 블록이라고 정의할 수 있다.The skip macroblock may be a macroblock coded in a skip mode. In reconstructing the current macroblock, the skip macroblock may include information on the current macroblock, i.e., a motion vector, a reference picture index, and residual data, The pixel value of the macroblock in the previously coded reference picture can be defined as it is. In skip macroblock coding, motion compensation using a motion vector may be involved, and the motion vector may be derived using a neighboring block. The method of deriving the motion vector from the neighboring block can be applied to the motion vector deriving method described above. Hereinafter, a method of deriving the motion vector and the reference picture index of the B skip macroblock will be described. A picture having the smallest reference index among the List 1 reference pictures can be defined as an anchor picture. A block of anchor picture in the same spatial position as the current block may be defined as an anchor block.

예를 들어, 상기 앵커 블록의 모션 정보를 이용하여 현재 블록의 모션 정보를 예측할 수 있다. 상기 앵커 블록의 List0 방향의 모션 벡터를 mvCol 이라 정의할 수 있다. 이때, 상기 앵커 블록의 List0 방향의 모션 벡터가 없고, List1 방향의 모션 벡터가 있다면 List1 방향의 모션 벡터를 mvCol 로 할 수 있다. 여기서, B 픽쳐의 경우, 임의의 두 장을 참조 픽쳐로 사용할 수 있는데, 이 때 이용되는 예측을 List0 예측, List1 예측이라 한다. 예를 들어, List0 예측은 포워드 방향에 대한 예측을, List1 예측은 백워드 방향에 대한 예측을 의미할 수 있다.For example, the motion information of the current block can be predicted using the motion information of the anchor block. The motion vector of the anchor block in the List0 direction can be defined as mvCol. At this time, if there is no motion vector in the direction of List 0 of the anchor block and there is a motion vector in the direction of List 1, the motion vector in the direction of List 1 can be mvCol. Here, in the case of the B picture, arbitrary two pictures can be used as reference pictures. The prediction used at this time is referred to as List 0 prediction and List 1 prediction. For example, List0 prediction can mean prediction for forward direction, and List1 prediction can mean prediction for backward direction.

현재 블록의 List0 참조 픽쳐는 상기 mvCol 이 참조하는 픽쳐가 되고, List1 참조 픽쳐는 앵커 픽쳐가 된다. 만일, 상기 앵커 블록이 모션 정보를 가지지 않는 경우(예를 들어, 인트라 모드로 코딩된 경우) 모션 벡터의 크기는 0이 되고, List0 참조 픽쳐는 참조 픽쳐 인덱스가 -1이 된다.The List0 reference picture of the current block is the picture referred to by mvCol, and the List1 reference picture is the anchor picture. If the anchor block does not have motion information (for example, coded in intra mode), the size of the motion vector becomes 0, and the List 0 reference picture has a reference picture index of -1.

또한, 모션 벡터 mvCol로부터 List0의 모션 벡터 mvL0와 List1의 모션 벡터 mvL1을 구할 수 있다. 참조 픽쳐, 현재 픽쳐, 그리고 앵커 픽쳐 사이에서 모션의 속도가 일정하다고 가정하면, mvL0 와 mvL1의 크기는 참조 픽쳐, 현재 픽쳐, 앵커 픽쳐의 시간 간격에 비례하게 된다. 따라서, 참조 픽쳐와 현재 픽쳐의 간격, 그리고 참조 픽쳐와 앵커 픽쳐의 간격을 이용해서 mvL0와 mvL1을 구할 수 있다. 구체적으로 살펴보면, 앵커 블록의 List0 참조 인덱스가 장기 참조 픽쳐를 참조하고 있는 경우에는 다음 수학식 1과 같이 구할 수 있다.The motion vector mvL0 of List0 and the motion vector mvL1 of List1 can be obtained from the motion vector mvCol. Assuming that the speed of motion is constant between the reference picture, the current picture and the anchor picture, the sizes of mvL0 and mvL1 are proportional to the time intervals of the reference picture, the current picture, and the anchor picture. Therefore, mvL0 and mvL1 can be obtained using the distance between the reference picture and the current picture, and the distance between the reference picture and the anchor picture. Specifically, when the reference index of the List 0 of the anchor block refers to the long-term reference picture, it can be obtained as shown in the following equation (1).

Figure pat00001
Figure pat00001

앵커 블록의 List0 참조 인덱스가 장기 참조 픽쳐를 참조하고 있지 않은 경우에는 다음 수학식 2와 같이 구할 수 있다.When the List 0 reference index of the anchor block does not refer to the long-term reference picture, it can be obtained by the following equation (2).

Figure pat00003
Figure pat00003

Figure pat00004
Figure pat00004

한편, 공간 방향의 모션 정보 상관도를 이용하여 현재 블록의 모션 정보를 예측할 수도 있다. 이 경우, 상기 앵커 픽쳐와 앵커 블록이 모션 정보를 유도하는데 사용될 수 있다. On the other hand, the motion information of the current block may be predicted using the motion information correlation in the spatial direction. In this case, the anchor picture and the anchor block can be used to derive motion information.

먼저, 현재 슬라이스의 예측 모드를 식별하게 된다. 예를 들어, 현재 슬라이스의 슬라이스 타입이 B 슬라이스인 경우, B 스킵 모드가 이용될 수 있다. 그리고, 현재 블록의 이웃 블록들의 모션 정보를 획득할 수 있다. 예를 들어, 현재 블록의 좌측에 있는 블록을 이웃 블록 A, 상측에 있는 블록을 이웃 블록 B, 우측 상위에 있는 블록을 이웃 블록 C라 하면, 상기 이웃 블록 A,B,C의 모션 정보를 획득할 수 있다. 상기 이웃 블록들의 모션 정보를 이용하여 현재 블록의 List0 또는 List1 방향에 대한 참조 픽쳐 인덱스를 유도할 수 있다. 그리고, 상기 현재 블록의 참조 픽쳐 인덱스에 기초하여 제 1 변수를 유도할 수 있다. 상기 제 1 변수는 현재 블록의 모션 벡터를 임의의 값으로 예측하기 위해 이용되는 변수를 의미할 수 있다. 예를 들어, 현재 블록의 List0 또는 List1 방향에 대한 참조 픽쳐 인덱스는 상기 이웃 블록들의 참조 픽쳐 인덱스들 중에서 가장 작은 값으로 유도될 수 있다. 이 경우, 다음 수학식 3이 이용될 수 있다.First, the prediction mode of the current slice is identified. For example, if the slice type of the current slice is a B slice, a B skip mode may be used. Then, motion information of neighboring blocks of the current block can be obtained. For example, if the block on the left side of the current block is referred to as a neighboring block A, the block on the upper side is referred to as a neighboring block B, and the block on the upper right side is referred to as a neighboring block C, motion information of the neighboring blocks A, can do. The reference picture index for the List0 or List1 direction of the current block can be derived using the motion information of the neighboring blocks. The first variable may be derived based on the reference picture index of the current block. The first variable may mean a variable used to predict the motion vector of the current block to an arbitrary value. For example, the reference picture index for the List0 or List1 direction of the current block may be derived as the smallest value among the reference picture indexes of the neighboring blocks. In this case, the following equation (3) can be used.

Figure pat00005
Figure pat00005

Figure pat00006
Figure pat00006

Figure pat00007
Figure pat00007

Figure pat00008
Figure pat00008

구체적 예로, MinPositive(0,1) = 0 이 된다. 즉, 두 개의 유효한 인덱스가 존재하는 경우 작은 값을 얻을 수 있다. 또는 MinPositive(-1,0) = 0 이 된다. 즉, 하나의 유효한 인덱스가 존재하는 경우 유효한 인덱스 값인 큰 값을 얻을 수 있다. 또는 MinPositive(-1,-1) = -1 이 된다. 즉, 두 개가 모두 유효하지 않은 인덱스인 경우, 예를 들어, 두 개의 이웃 블록이 모두 인트라 모드로 코딩된 블록이거나 두 개의 이웃 블록을 이용할 수 없는 경우에는 큰 값인 -1 값을 얻게 된다. 결국, 결과값이 유효하지 않은 값이 나오려면 하나라도 유효한 값이 있으면 안된다.As a specific example, MinPositive (0, 1) = 0. That is, if there are two valid indexes, a smaller value can be obtained. Or MinPositive (-1,0) = 0. That is, if there is one valid index, a large value which is a valid index value can be obtained. Or MinPositive (-1, -1) = -1. For example, if two neighboring blocks are all coded in intra mode, or if two neighboring blocks are not available, then a large -1 value is obtained. As a result, any valid value must not be present in order for the result to be invalid.

먼저, 상기 제 1 변수의 초기값으로, 상기 제 1 변수를 0으로 셋팅할 수 있다. 또한, 상기 유도된 List0 또는 List1 방향에 대한 참조 픽쳐 인덱스가 모두 0보다 작을 경우, 상기 현재 블록의 List0 또는 List1 방향에 대한 참조 픽쳐 인덱스는 0으로 셋팅될 수 있다. 그리고, 상기 제 1 변수는, 상기 현재 블록의 참조 픽쳐가 존재하지 않음을 나타내기 위한 값으로 셋팅될 수 있다. 이 때, 상기 유도된 List0 또는 List1 방향에 대한 참조 픽쳐 인덱스가 모두 0보다 작은 경우란, 예를 들면, 상기 이웃 블록이 인트라 모드로 코딩된 블록일 경우, 또는 상기 이웃 블록이 이용가능하지 않게 되는 경우를 의미할 수 있다. 이러한 경우, 상기 제 1 변수를 1로 셋팅함으로서 현재 블록의 모션 벡터를 0으로 셋팅할 수 있게 된다.First, the first variable may be set to 0 as an initial value of the first variable. If all the reference picture indexes for the derived List0 or List1 direction are less than 0, the reference picture index for the List0 or List1 direction of the current block may be set to zero. The first variable may be set to a value indicating that there is no reference picture of the current block. Here, the case where the derived reference picture indexes for the List0 or List1 directions are all less than 0 indicates that the neighboring block is a block coded in the intra mode or the neighboring block is not available It can mean the case. In this case, by setting the first variable to '1', the motion vector of the current block can be set to '0'.

본 실시예에서는 3개의 이웃 블록을 이용하게 되므로, 결국 3개의 이웃 블록 모두가 인트라 모드로 코딩된 블록이거나 이용할 수 없는 경우, 현재 블록의 참조 픽쳐 인덱스가 유효하지 않은 -1 값을 가질 수 있게 된다. 따라서, 현재 블록의 참조 픽쳐 인덱스가 모두 유효하지 않은 경우 상기 제 1 변수가 1로 셋팅될 수 있다. 즉, 현재 블록이 사용할 참조 픽쳐가 존재하지 않는 경우에 상기 제 1 변수가 1로 셋팅될 수 있다.In this embodiment, since three neighboring blocks are used, if all three neighboring blocks are coded in intra mode or can not be used, the reference picture index of the current block can have an invalid value of -1 . Therefore, if the reference picture indexes of the current block are not all valid, the first variable may be set to one. That is, the first variable may be set to '1' if there is no reference picture to be used by the current block.

앵커 픽쳐 내의 앵커 블록의 모션 정보를 이용하여 제 2 변수를 유도할 수 있다. 상기 제 2 변수는 현재 블록의 모션 벡터를 임의의 값으로 예측하기 위해 이용되는 변수를 의미할 수 있다. 예를 들어, 앵커 블록의 모션 정보가 일정한 조건을 만족하는 경우에 상기 제 2 변수를 1로 셋팅할 수 있다. 그리고, 상기 제 2 변수가 1로 셋팅되는 경우, 현재 블록의 List0 또는 List1 방향에 대한 모션 벡터를 0으로 셋팅할 수 있게 된다. 상기 일정한 조건은 다음과 같을 수 있다. 첫째, List1 방향에 대한 참조 픽쳐 중 가장 작은 참조 인덱스를 가지는 픽쳐가 단기 참조 픽쳐이어야 한다. 둘째, 앵커 블록의 참조하는 픽쳐의 참조 인덱스가 0 이어야 한다. 셋째, 앵커 블록의 모션 벡터의 수평 성분, 수직 성분 크기가 ±1 화소 이하이어야 한다. 이처럼, 상기 일정한 조건을 모두 만족하는 경우에 모션이 거의 없는 영상에 가깝다고 판단하여 현재 블록의 모션 벡터를 0으로 셋팅하는 것이다.The second parameter can be derived using the motion information of the anchor block in the anchor picture. The second variable may mean a variable used for predicting the motion vector of the current block to an arbitrary value. For example, if the motion information of the anchor block satisfies a certain condition, the second variable may be set to 1. [ If the second variable is set to '1', the motion vector for the List 0 or List 1 direction of the current block can be set to '0'. The certain condition may be as follows. First, the picture having the smallest reference index among the reference pictures for the List 1 direction should be a short-term reference picture. Second, the reference index of the reference picture of the anchor block should be zero. Third, the horizontal component and the vertical component of the motion vector of the anchor block should be within ± 1 pixel. In this way, if the predetermined condition is satisfied, it is determined that the motion vector is close to the motionless motion vector, and the motion vector of the current block is set to zero.

상기 유도된 제 1 변수와 제 2 변수에 기초하여 현재 블록의 모션 정보를 예측할 수 있다. 예를 들어, 상기 제 1 변수가 1로 셋팅될 경우, 현재 블록의 List0 또는 List1 방향에 대한 모션 벡터를 0으로 셋팅할 수 있다. 또한, 상기 제 2 변수를 1로 셋팅할 경우, 현재 블록의 List0 또는 List1 방향에 대한 모션 벡터를 0으로 셋팅할 수 있게 된다. 여기서, 0 또는 1로 셋팅하는 것은 일 실시예일 뿐이며, 상기 제 1 변수 또는 상기 제 2 변수는 다른 일정한 값으로 셋팅하여 이용할 수도 있다. The motion information of the current block can be predicted based on the derived first variable and the second variable. For example, if the first variable is set to 1, the motion vector for the List 0 or List 1 direction of the current block can be set to zero. When the second variable is set to '1', the motion vector for the direction of the List0 or List1 of the current block can be set to '0'. Here, the setting of 0 or 1 is only an embodiment, and the first variable or the second variable may be set to a different constant value.

상기 일정한 조건을 만족하지 않는 경우에는 현재 픽쳐내의 이웃 블록들의 모션 정보로부터 현재 블록의 모션 정보를 유도할 수 있다. 예를 들어, 모션 벡터의 경우, 상기 스킵 매크로 블록의 모션 벡터 유도 방법이 동일하게 적용될 수 있다. If the predetermined condition is not satisfied, the motion information of the current block can be derived from the motion information of neighboring blocks in the current picture. For example, in the case of a motion vector, the motion vector derivation method of the skip macroblock may be equally applied.

참조 픽쳐 인덱스는 좌측, 상단, 우측 상단에 위치한 모션 벡터의 참조 픽쳐 인덱스 가운데 최소값을 계산하고, 이를 현재 블록의 참조 픽쳐 인덱스로 할 수 있다. 상기 설명한 스킵 모드에 관련된 내용은 이하 현재 블록이 스킵 모드로 코딩되는 경우에 동일하게 적용될 수 있음을 이해하여야 한다.The reference picture index can calculate the minimum value among the reference picture indexes of the motion vectors located at the left, upper, and right upper ends, and can be used as the reference picture index of the current block. It is to be understood that the contents related to the skip mode described above can be equally applied to the case where the current block is coded in the skip mode.

인트라 예측부(160)는 현재 픽쳐내의 복원된 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 상기 현재 픽쳐내의 복원된 픽셀은 디블록킹 필터링이 적용되지 아니한 픽셀일 수 있다. 상기 예측된 현재 픽쳐와 역변환부로부터 나온 레지듀얼이 더해져서 원래 픽쳐를 복원한다. 인트라 모드에 대해서 자세히 살펴보면, H.264/AVC에서 인트라 예측을 수행하는 블록 단위로 4x4화소, 8x8화소, 16x16화소가 사용될 수 있다. 인트라 4x4 예측은 현재 인트라 4x4 블록을 기준으로 좌측 블록내의 우측 4화소, 상단 블록내의 하단 4화소, 좌측 상단 블록내의 우측 하단 1화소, 우측 상단 블록내의 좌측 하단 1화소를 사용하여 예측 블록내의 4x4화소의 예측값을 획득한다. 이 경우 인트라 예측 모드는 H.264/AVC에서의 9가지 예측 방향 중 가장 적절한 예측 방향을 4x4화소 블록마다 1개씩 선택하고, 선택된 예측 방향에 기초하여 4x4화소의 블록 단위로 예측을 수행한다. 인트라 8x8 예측은 상기 인트라 4x4와 동일한 방식으로 예측을 수행할 수 있다. 인트라 16x16 예측은 현재 매크로 블록을 기준으로 상단 매크로 블록의 하단 16화소, 좌측 매크로 블록의 우측 16화소로부터 수직 예측, 수평 예측, 평균치 예측, 평면 예측의 4가지 방법 중에서 하나를 선택해서 예측을 수행한다.The intraprediction unit 160 may perform intraprediction using the restored pixels in the current picture. The restored pixel in the current picture may be a pixel to which deblocking filtering is not applied. The predicted current picture and residual from the inverse transform unit are added to reconstruct the original picture. As to the intra mode, 4x4 pixels, 8x8 pixels, and 16x16 pixels can be used in block units for intra prediction in H.264 / AVC. Intra 4x4 prediction is performed by using 4x4 pixels in the predicted block using the 4 pixels on the right side in the left block, 4 pixels on the lower side in the upper block, 1 pixel on the lower right in the upper left block, and 1 pixel on the lower left in the upper right block, . In this case, the intra prediction mode selects one of the nine prediction directions in H.264 / AVC, one for each 4x4 pixel block, and performs prediction in units of 4x4 pixels based on the selected prediction direction. The intra 8x8 prediction can perform the prediction in the same manner as the intra 4x4. Intra 16x16 prediction is performed by selecting one of the four methods of vertical prediction, horizontal prediction, average value prediction, and plane prediction from the lower 16 pixels of the upper macroblock and the 16 pixels of the right side of the left macro block on the basis of the current macroblock .

이하, 앞서 설명한 매크로 블록 타입을 결정하는 구체적인 방법에 대해서 도 2, 도 3 및 도 4를 참조하여 살펴보기로 한다.Hereinafter, a concrete method of determining the macroblock type as described above will be described with reference to FIGS. 2, 3, and 4. FIG.

도 2는 매크로 블록 타입 및 변환 크기 정보를 이용하여 매크로 블록을 디코딩하는 장치를 도시한 것이다.FIG. 2 illustrates an apparatus for decoding a macroblock using macroblock type and transform size information.

도 2를 참조하면, 매크로 블록 타입 결정부(200)는 현재 디코딩되는 매크로 블록의 매크로 블록 타입을 인코더부터 전송된 비트스트림으로부터 획득할 수 있다. 이하, 도 3을 참조하여 매크로 블록이 32x32인 경우를 예로 들어 설명하기로 한다.Referring to FIG. 2, the macroblock type determination unit 200 may obtain a macroblock type of a current macroblock to be decoded from a bitstream transmitted from an encoder. Hereinafter, with reference to FIG. 3, the case where the macroblock is 32x32 will be described as an example.

도 3은 매크로 블록 타입 및 변환 크기 정보를 이용하여 매크로 블록을 디코딩하는 과정을 도시한 블록도이다.3 is a block diagram illustrating a process of decoding a macroblock using macroblock type and transform size information.

도 3을 참조하면, 매크로 블록에 대한 스킵 매크로 블록 지시 정보를 획득할 수 있다(S300). 상기 스킵 모드 지시 정보라 함은 매크로 블록이 스킵 모드로 코딩되어 있는지 여부를 지시하는 정보일 수 있다. 예를 들어, 상기 스킵 모드 지시 정보가 1인 경우 상기 매크로 블록은 스킵 모드로 코딩됨을 의미할 수 있고, 상기 스킵 모드 지시 정보가 0인 경우 상기 매크로 블록은 스킵 모드로 코딩되지 않음을 의미할 수 있다. 상기 스킵 모드 지시 정보에 따라 상기 매크로 블록이 스킵 모드로 코딩되지 아니한 경우에는 매크로 블록 타입을 획득할 수 있다(S310). I 슬라이스인 경우, 상기 매크로 블록 타입에 따라 상기 매크로 블록은 32x32화소, 16x16화소, 또는 8x8화소의 블록 단위로 인트라 예측될 수 있다.Referring to FIG. 3, skip macroblock indication information for a macroblock may be obtained (S300). The skip mode instruction information may be information indicating whether a macroblock is coded in a skip mode. For example, if the skip mode indicating information is 1, the macroblock may be coded in a skip mode, and if the skip mode indicating information is 0, the macroblock may not be coded in a skip mode. have. If the macroblock is not coded in the skip mode according to the skip mode instruction information, the macroblock type may be obtained (S310). In the case of an I-slice, the macroblock may be intra-predicted in blocks of 32x32 pixels, 16x16 pixels, or 8x8 pixels according to the macroblock type.

또는, P 매크로 블록 및 B 매크로 블록과 마찬가지로 서브 매크로 블록 타입을 정의할 수 있으며, 상기 매크로 블록 타입에 기초하여 상기 서브 매크로 블록 타입을 획득할 수 있다(S320).Alternatively, as in the case of the P macro block and the B macro block, a sub macro block type can be defined and the sub macro block type can be acquired based on the macro block type (S320).

예를 들어, 상기 매크로 블록 타입이 16x16인 경우, 서브 매크로 블록 타입을 획득할 수 있다. 상기 서브 매크로 블록 타입은 예측 모드 정보와 예측 블록 크기 정보를 포함할 수 있다. 따라서, 상기 서브 매크로 블록 타입에 따라 서브 매크로 블록은 16x16화소, 8x8화소, 또는 4x4화소의 블록 단위로 인트라 예측될 수 있다. 상기 서브 매크로 블록 타입은 예측 모드 정보만을 포함할 수도 있다. 즉, 상기 서브 매크로 블록 타입은 상기 서브 매크로 블록이 인트라 모드로 예측되는지 여부만을 나타낼 수 있다. 이하, 서브 매크로 블록 타입이 예측 모드 정보만을 포함하는 경우, 서브 매크로 블록의 예측 블록의 크기 정보 및 인트라 예측 모드를 획득하는 방법에 대해서 살펴보기로 한다.For example, if the macroblock type is 16x16, the sub macroblock type can be obtained. The sub-macro-block type may include prediction mode information and prediction block size information. Therefore, according to the sub-macro-block type, the sub-macro-block can be intra-predicted in block units of 16x16 pixels, 8x8 pixels, or 4x4 pixels. The sub-macro-block type may include only prediction mode information. That is, the sub-macro-block type may only indicate whether the sub-macro-block is predicted in the intra mode. Hereinafter, a method for acquiring the size information and the intra-prediction mode of the prediction block of the sub-macroblock when the sub-macroblock type includes only the prediction mode information will be described.

인트라 예측부(210)는 예측 블록 크기 결정부(220) 및 인트라 예측 모드 획득부(230)를 포함할 수 있다. 상기 예측 블록 크기 결정부(220)는 상기 서브 매크로 블록 타입에 따라 상기 서브 매크로 블록이 인트라 모드로 예측됨을 나타내는 경우, 변환 크기 정보를 이용하여 예측 블록의 크기 정보를 결정할 수 있다. 상기 인트라 예측 모드 획득부(230)는 상기 서브 매크로 블록의 인트라 예측 모드를 인코더로부터 전송된 비트스트림으로부터 획득할 수 있다(S330).The intra prediction unit 210 may include a prediction block size determination unit 220 and an intra prediction mode acquisition unit 230. The prediction block size determination unit 220 may determine the size information of the prediction block using the transform size information when the sub macro block is predicted to be in the intra mode according to the sub macro block type. The intra-prediction mode obtaining unit 230 may obtain the intra-prediction mode of the sub-macroblock from the bit stream transmitted from the encoder (S330).

예를 들어, 상기 서브 매크로 블록 타입에 따라 상기 서브 매크로 블록이 인트라 모드로 예측되는 경우, 상기 서브 매크로 블록에 대한 변환 크기 정보를 획득할 수 있다. 상기 변환 크기 정보라 함은 변환 계수 복호 및 영상 생성 과정을 수행하는 블록 단위를 지시하는 정보일 수 있다. 상기 변환 크기 정보가 4x4화소 블록 단위로 변환 계수 복호 및 영상 생성 과정을 수행함을 지시하는 경우, 상기 서브 매크로 블록의 예측 블록의 크기 정보는 4x4화소로 결정될 수 있고, 상기 서브 매크로 블록은 4x4화소의 블록 단위로 인트라 예측될 수 있다. 상기 변환 크기 정보가 8x8화소, 또는 16x16화소인 경우에도 동일한 방식이 적용될 수 있다.For example, when the sub-macroblock is predicted in the intra mode according to the sub-macroblock type, the transform size information for the sub-macroblock can be obtained. The transform size information may be information indicating a block unit performing the transform coefficient decoding and image generation process. The size information of the prediction block of the sub macro block may be determined to be 4x4 pixels and the sub macro block may be determined to be a 4x4 pixel block, Can be intra-predicted on a block-by-block basis. The same method can be applied even when the conversion size information is 8x8 pixels or 16x16 pixels.

상기 서브 매크로 블록 타입에 따라 상기 서브 매크로 블록이 인트라 모드로 예측되는 경우, 인트라 예측 모드 참조 정보에 기초하여 상기 서브 매크로 블록의 인트라 예측 모드를 획득할 수 있다. 상기 인트라 예측 모드 참조 정보라 함은 예측 블록을 기준으로 이웃하는 블록의 인트라 예측 모드로부터 상기 예측 블록의 인트라 예측 모드가 유도되는지를 지시하는 정보를 의미할 수 있다.If the sub-macroblock is predicted in the intra-mode according to the sub-macroblock type, the intra-prediction mode of the sub-macroblock can be obtained based on the intra-prediction mode reference information. The intra prediction mode reference information may be information indicating whether an intra prediction mode of the prediction block is derived from an intra prediction mode of a neighboring block based on the prediction block.

예를 들어, 상기 서브 매크로 블록 타입에 따라 상기 서브 매크로 블록이 인트라 모드로 예측되는 경우, 상기 인트라 예측 모드 참조 정보를 획득할 수 있다. 상기 인트라 예측 모드 참조 정보가 이웃 블록의 인트라 예측 모드로부터 예측 블록의 인트라 예측 모드가 유도됨을 지시하는 경우, 상기 예측 블록을 기준으로 좌측 블록 및 우측 블록의 인트라 예측 모드를 이용하여 상기 서브 매크로 블록내의 예측 블록에 대한 인트라 예측 모드를 유도할 수 있다. 상기 유도된 인트라 예측 모드는 좌측 블록의 인트라 예측 모드와 우측 블록의 인트라 예측 모드 중에서 최소값으로 유도될 수 있다. 상기 인트라 예측 모드 참조 정보가 이웃 블록의 인트라 예측 모드로부터 예측 블록의 인트라 예측 모드가 유도되지 아니함을 지시하는 경우, 상기 서브 매크로 블록내의 예측 블록에 대한 인트라 예측 모드를 파싱할 수 있다. 앞서 설명한 예측 블록의 크기 정보 및 인트라 예측 모드를 획득하는 방법은 이하 인트라 모드로 코딩되는 블록에 대해서 동일하게 적용될 수 있다.For example, when the sub-macroblock is predicted in the intra mode according to the sub-macroblock type, the intra-prediction mode reference information can be obtained. Wherein when the intra prediction mode reference information indicates that an intra prediction mode of a prediction block is derived from an intra prediction mode of a neighboring block, The intra prediction mode for the prediction block can be derived. The derived intra-prediction mode may be derived to the minimum value among the intra-prediction mode of the left block and the intra-prediction mode of the right block. The intra prediction mode for the prediction block in the sub macro block may be parsed if the intra prediction mode reference information indicates that the intra prediction mode of the prediction block is not derived from the intra prediction mode of the neighboring block. The size information of the prediction block and the method of acquiring the intra-prediction mode described above can be similarly applied to a block coded in the intra mode.

상기 예측 블록의 크기 정보, 인트라 예측 모드, 및 서브 매크로 블록의 이웃 블록내의 픽셀값을 이용하여 상기 서브 매크로 블록을 예측할 수 있다(S350). 복원부(250)는 예측된 매크로 블록과 인코더로부터 전송된 레지듀얼을 더하여 매크로 블록을 복원할 수 있다. 상기 레지듀얼은 본래 매크로 블록의 픽셀값과 예측된 매크로 블록의 픽셀값간의 차분값으로 정의할 수 있다. The sub-macro-block may be predicted using the size information of the prediction block, the intra-prediction mode, and pixel values in neighboring blocks of the sub-macro-block (S350). The restoring unit 250 may restore the macroblock by adding the predicted macroblock and the residual transmitted from the encoder. The residual may be defined as a difference value between the pixel value of the original macroblock and the pixel value of the predicted macroblock.

인터 예측부(240)는 상기 서브 매크로 블록 타입 정보에 따라 상기 서브 매크로 블록이 인터 모드로 코딩된 경우, 상기 서브 매크로 블록의 모션 정보를 획득할 수 있다(S340). If the sub-macroblock is coded in inter mode according to the sub-macroblock type information, the inter-prediction unit 240 may acquire motion information of the sub-macroblock (S340).

예를 들어, 상기 서브 매크로 블록 타입은 도 4와 같이 정의할 수 있다. 도 4는 매크로 블록이 32x32인 경우, P 매크로 블록 및 B 매크로 블록의 서브 매크로 블록 타입의 일 실시예를 도시한 테이블이다. 도 4를 참조하면, 상기 서브 매크로 블록 타입이 P_L0_16X8인 경우, 상기 서브 매크로 블록은 2개의 서브 매크로 블록의 파티션을 가지며, 16X8화소의 블록 단위로 인터 예측될 수 있다. 즉, 상기 서브 매크로 블록의 파티션별로 모션 벡터 및 참조 픽쳐 인덱스를 획득할 수 있다. 상기 모션 벡터 및 참조 픽쳐 인덱스를 이용하여 상기 서브 매크로 블록을 예측할 수 있다(S350). 복원부(250)는 예측된 매크로 블록과 인코더로부터 전송된 레지듀얼을 더하여 매크로 블록을 복원할 수 있다.For example, the sub-macro-block type can be defined as shown in FIG. 4 is a table showing one embodiment of the sub macro-block types of the P macroblock and the B macroblock when the macroblock is 32x32. Referring to FIG. 4, when the sub-macro-block type is P_L0_16X8, the sub-macro-block has two sub-macro-block partitions and can be inter-predicted in block units of 16X8 pixels. That is, the motion vector and the reference picture index can be obtained for each partition of the sub macro block. The sub-macroblock may be predicted using the motion vector and the reference picture index (S350). The restoring unit 250 may restore the macroblock by adding the predicted macroblock and the residual transmitted from the encoder.

상기 스킵 모드 지시 정보에 따라 상기 매크로 블록이 스킵 모드로 코딩되는 경우에는 참조 픽쳐 및 참조 블록으로부터 모션 정보를 유도하여 상기 매크로 블록을 예측할 수 있다(S350).If the macroblock is coded in the skip mode according to the skip mode instruction information, the macroblock may be predicted by deriving motion information from the reference picture and the reference block (S350).

이하, 도 5를 참조하여 16x16 보다 큰 매크로 블록에 대한 매크로 블록 타입을 살펴보기로 한다.Hereinafter, referring to FIG. 5, a macroblock type for a macroblock larger than 16x16 will be described.

도 5는 매크로 블록이 32x32인 경우 매크로 블록 타입의 일 실시예를 도시한 것이다.FIG. 5 shows an embodiment of a macroblock type when the macroblock is 32x32.

도 5(a)를 참조하면, 매크로 블록이 32x32인 경우, 상기 매크로 블록은 32x32화소, 16x16화소, 또는 8x8화소의 블록 단위로 인트라 예측될 수 있다. 상기 매크로 블록 타입이 인트라 32x32인 경우, 상기 매크로 블록을 기준으로 상단 매크로 블록의 하단 32화소, 좌측 매크로 블록의 우측 32화소로부터 수직 예측, 수평 예측, 평균치 예측, 평면 예측의 4가지 모드 중에서 하나를 획득해서 예측할 수 있다. 상기 매크로 블록 타입이 인트라 16x16인 경우에는 상기 매크로 블록내의 16x16 블록을 기준으로 좌측 블록내의 우측 16화소, 상단 블록내의 하단 16화소, 좌측 상단 블록내의 우측 하단 1화소, 우측 상단 블록내의 좌측 하단 1화소를 사용하여 16x16화소의 예측값을 획득할 수 있다. 이 경우 인트라 예측 모드는 H.264/AVC에서의 9가지 모드 중 가장 적절한 인트라 예측 모드를 16x16화소 블록마다 1개씩 획득할 수 있다. 상기 획득된 인트라 예측 모드에 기초하여 16x16화소의 블록 단위로 예측할 수 있다. 상기 매크로 블록 타입이 인트라 8x8인 경우, 앞서 설명한 인트라 16x16와 동일한 방법으로 예측할 수 있다.Referring to FIG. 5A, when the macroblock is 32x32, the macroblock can be intra-predicted in block units of 32x32 pixels, 16x16 pixels, or 8x8 pixels. If the macroblock type is intra 32x32, one of the four modes of vertical prediction, horizontal prediction, average prediction, and plane prediction is selected from the lower 32 pixels of the upper macroblock and the 32 pixels of the right side of the left macro block, Can be obtained and predicted. When the macroblock type is an intra 16x16, the 16 pixels on the right side in the left block, the lower 16 pixels in the upper block, the lower right pixel in the upper left block, and the lower left pixel in the upper right block in reference to the 16x16 block in the macroblock It is possible to obtain a predicted value of 16x16 pixels. In this case, the intra prediction mode can acquire the most appropriate intra prediction mode among the nine modes in H.264 / AVC, one for each 16x16 pixel block. Prediction can be performed in units of 16x16 pixels on the basis of the obtained intra prediction mode. When the macroblock type is intra 8x8, it can be predicted in the same manner as the intra 16x16 described above.

도 5(b)를 참조하면, 매크로 블록이 32x32인 경우, 상기 매크로 블록은 32x32화소, 16x16화소, 또는 8x8화소 이외에 4x4화소의 블록 단위로 인트라 예측될 수도 있으며, 이 경우 앞서 설명한 인트라 16x16와 동일한 방법으로 예측할 수 있다.Referring to FIG. 5B, when the macroblock is 32x32, the macroblock may be intra-predicted in blocks of 4x4 pixels in addition to 32x32 pixels, 16x16 pixels, or 8x8 pixels. In this case, Method can be predicted.

도 5(c)를 참조하면, 매크로 블록이 32x32인 경우, 상기 매크로 블록 타입은 인트라 32x32, 인트라 16x16, 또는 인트라 8x8 이외에 인트라 믹스드(I_mixed)를 포함할 수 있다. 상기 매크로 블록 타입이 인트라 믹스드인 경우, 상기 매크로 블록의 파티션에 대한 블록 타입 정보를 획득할 수 있고, 이에 따라 인트라 8x8 또는 인트라 4x4의 블록 단위로 적응적으로 인트라 예측될 수 있다. 상기 매크로 블록의 파티션은 일정한 크기로 분할된 매크로 블록내의 블록을 의미하며, 이는 서브 매크로 블록을 의미할 수도 있다.Referring to FIG. 5C, when the macroblock is 32x32, the macroblock type may include intra-mixed (I_mixed) in addition to intra 32x32, intra 16x16, or intra 8x8. When the macroblock type is intramixed, block type information on a partition of the macroblock can be obtained, and thus can be intra-predicted adaptively on a block basis of an intra 8x8 or intra 4x4 block. The partition of the macroblock means a block in a macroblock divided into a certain size, which may be a sub-macroblock.

도 5(d)를 참조하여, 인트라 믹스드(I_mixed)의 다른 실시예를 살펴보기로 한다. 매크로 블록이 32x32인 경우, I 슬라이스의 매크로 블록 타입으로 인트라 32x32 및 인트라 믹스드를 정의할 수 있다. 상기 매크로 블록 타입이 인트라 믹스드인 경우, 상기 매크로 블록의 파티션에 대하여 인트라 16x16, 인트라 8x8 또는 인트라 4x4의 블록 단위로 적응적으로 인트라 예측될 수 있다. 따라서, 도 5(c)에서와 달리 매크로 블록 타입으로 인트라 16x16 및 인트라 8x8를 이용하지 아니할 수 있다.Referring to FIG. 5 (d), another embodiment of intramixed (I_mixed) will be described. If the macroblock is 32x32, intra 32x32 and intramixed can be defined as macroblock type of I slice. If the macroblock type is intramixed, the partition of the macroblock may be intra-predicted adaptively in units of blocks of intra 16x16, intra 8x8, or intra 4x4. Therefore, unlike FIG. 5C, the intra 16x16 and the intra 8x8 may not be used as the macro block type.

이하, I 슬라이스의 매크로 블록 타입을 인트라 NxN (N은 16보다 큰 정수) 및 인트라 믹스드로 정의한 경우, 매크로 블록을 디코딩하는 방법에 대해서 도 6 내지 도 8을 참조하여 살펴보기로 한다.Hereinafter, when a macroblock type of an I-slice is defined as intra NxN (N is an integer larger than 16) and intra-mixed, a method of decoding a macroblock will be described with reference to FIG. 6 to FIG.

도 6은 매크로 블록 타입 및 블록 타입 식별 정보를 이용하여 매크로 블록을 디코딩하는 방법을 도시한 블록도이다.6 is a block diagram illustrating a method of decoding a macroblock using macroblock type and block type identification information.

매크로 블록 레이어에서 현재 매크로 블록에 대한 매크로 블록 타입을 획득할 수 있다(S600). 상기 매크로 블록 타입이 인트라 믹스드인 경우, 상기 현재 매크로 블록의 파티션에 대하여 블록 타입 식별 정보를 획득할 수 있다(S610). 상기 매크로 블록의 파티션은 일정한 크기로 분할된 매크로 블록내의 블록을 의미한다. 예를 들어, 매크로 블록이 32x32 인 경우, 상기 매크로 블록의 파티션은 4개의 16x16 블록으로 설정할 수 있다. 상기 블록 타입 식별 정보를 이용하여 현재 매크로 블록의 파티션에 대한 블록 타입을 결정할 수 있으며(S620), 이는 도 7을 참조하여 살펴보기로 한다.The macroblock type for the current macroblock can be obtained in the macroblock layer (S600). If the macroblock type is intramixed, the block type identification information may be obtained for the partition of the current macroblock (S610). The partition of the macroblock means a block in a macroblock divided into a certain size. For example, if the macroblock is 32x32, the partition of the macroblock can be set to four 16x16 blocks. The block type for the partition of the current macroblock may be determined using the block type identification information (S620), and this will be described with reference to FIG.

도 7은 블록 타입 식별 정보를 이용하여 매크로 블록의 파티션에 대한 블록 타입을 결정하는 방법의 일 실시예를 도시한 블록도이다.7 is a block diagram illustrating an embodiment of a method for determining a block type for a partition of a macroblock using block type identification information.

도 7을 참조하면, 매크로 블록의 파티션에 대하여 제 1 블록 타입 식별 정보를 획득할 수 있다(S700). 상기 제 1 블록 타입 식별 정보는 상기 매크로 블록의 파티션에 대한 블록 타입이 인트라 4x4인지 여부를 지시하는 정보를 의미할 수 있다. 상기 제 1 블록 타입 식별 정보에 따라 상기 매크로 블록의 파티션에 대한 블록 타입이 인트라 4x4인 경우에는 상기 매크로 블록의 파티션은 4x4화소의 블록 단위로 인트라 예측될 수 있다(S720). 상기 제 1 블록 타입 정보에 따라 상기 매크로 블록의 파티션에 대한 블록 타입이 인트라 4x4가 아닌 경우에는 제 2 블록 타입 식별 정보를 획득할 수 있다(S710). 상기 제 2 블록 타입 식별 정보는 상기 매크로 블록의 파티션에 대한 블록 타입이 인트라 8x8인지 여부를 지시하는 정보를 의미할 수 있다. 상기 제 2 블록 타입 식별 정보에 따라 상기 매크로 블록의 파티션에 대한 블록 타입이 인트라 8x8인 경우에는 상기 매크로 블록의 파티션은 8x8화소의 블록 단위로 인트라 예측될 수 있다(S740). 상기 제 2 블록 타입 식별 정보에 따라 상기 매크로 블록의 파티션에 대한 블록 타입이 인트라 8x8가 아닌 경우에는 상기 매크로 블록의 파티션은 16x16화소의 블록 단위로 인트라 예측될 수 있다(S730).Referring to FIG. 7, first block type identification information may be obtained for a partition of a macroblock (S700). The first block type identification information may be information indicating whether the block type for the partition of the macroblock is intra 4x4. If the block type for the partition of the macroblock is intra 4x4 according to the first block type identification information, the partition of the macroblock may be intra-predicted in block units of 4x4 pixels (S720). If the block type for the partition of the macroblock is not intra 4x4 according to the first block type information, the second block type identification information may be obtained (S710). The second block type identification information may be information indicating whether the block type for the partition of the macroblock is intra 8x8. If the block type for the partition of the macroblock is intra 8x8 according to the second block type identification information, the partition of the macroblock may be intrapredicted on a block basis of 8x8 pixels (S740). If the block type for the partition of the macroblock is not intra 8x8 according to the second block type identification information, the partition of the macroblock may be intra predicted in block units of 16x16 pixels (S730).

도 6을 참조하면, 상기 현재 매크로 블록의 파티션에 대한 인트라 예측 모드를 획득할 수 있다(S630). 상기 현재 매크로 블록의 파티션에 대한 인트라 예측 모드는 앞서 살펴본 바와 같이 인트라 예측 모드 참조 정보에 기초하여 이웃 블록의 인트라 예측 모드로부터 유도되거나, 비트스트림으로부터 파싱할 수 있다. 예를 들어, 상기 현재 매크로 블록의 파티션이 16x16이고 상기 현재 매크로 블록의 파티션에 대한 블록 타입이 인트라 4x4인 경우, 상기 현재 매크로 블록의 파티션내의 4x4 블록 단위로 인트라 예측 모드를 획득할 수 있다.Referring to FIG. 6, an intra prediction mode for the partition of the current macroblock may be obtained (S630). As described above, the intra prediction mode for the partition of the current macroblock may be derived from the intra prediction mode of the neighboring block or may be parsed from the bitstream based on the intra prediction mode reference information. For example, if the partition of the current macro block is 16x16 and the block type of the partition of the current macro block is intra 4x4, the intra prediction mode can be obtained in 4x4 block units in the partition of the current macro block.

다만, 상기 현재 매크로 블록의 매크로 블록 타입이 인트라 믹스가 아닌 경우에는 상기 매크로 블록 타입에 기초하여 상기 현재 매크로 블록을 예측할 수 있다(S650). 이 경우, 상기 매크로 블록 타입은 인트라 예측 모드 및 CBP 정보를 포함할 수 있다. 따라서,상기 매크로 블록 타입에 따른 인트라 예측 모드 및 이웃 블록의 픽셀을 이용하여 상기 현재 매크로 블록의 픽셀값을 예측할 수 있다. 상기 이웃 블록은 상기 현재 매크로 블록에 이전에 복원된 블록을 의미할 수 있다. 예를 들어, 상기 현재 매크로 블록을 기준으로 좌측에 위치한 블록과 상단에 위치한 블록을 의미할 수 있다. 상기 이웃 블록의 픽셀은 디블록킹 필터링이 적용되지 아니한 복원된 픽셀일 수 있다.However, if the current macroblock type is not an intramix, the current macroblock may be predicted based on the macroblock type in operation S650. In this case, the macroblock type may include an intra prediction mode and CBP information. Therefore, the pixel value of the current macroblock can be predicted using the intra prediction mode according to the macroblock type and the pixels of the neighboring block. The neighboring block may refer to a block previously restored to the current macroblock. For example, it may mean a block located on the left side and a block located on the upper side based on the current macroblock. The pixels of the neighboring block may be reconstructed pixels to which no deblocking filtering is applied.

다만, 상기 매크로 블록 타입이 인트라 예측 모드 및 CBP 정보를 포함하지 않는 경우에는 별도로 상기 인트라 예측 모드 및 블록 패턴 정보를 획득할 수 있으며, 이는 도 8을 참조하여 살펴보기로 한다.However, if the macroblock type does not include the intra prediction mode and the CBP information, the intra prediction mode and the block pattern information may be separately obtained, and this will be described with reference to FIG.

도 8은 매크로 블록이 인트라 모드로 코딩되는 경우, 매크로 블록의 인트라 예측 모드를 획득하는 방법을 도시한 블록도이다.8 is a block diagram showing a method of acquiring an intra prediction mode of a macroblock when a macroblock is coded in an intra mode.

도 8을 참조하면, 현재 매크로 블록의 매크로 블록 타입을 획득할 수 있다(S800). 상기 매크로 블록 타입에 따라 상기 현재 매크로 블록이 인트라 모드로 예측되는 경우에는 상기 현재 매크로 블록에 대한 인트라 예측 모드 참조 정보를 획득할 수 있다(S810). 예를 들어, 상기 현재 매크로 블록이 인트라 모드로 예측되는 경우는 상기 매크로 블록 타입이 인트라 NxN 또는 인트라 믹스드인 경우일 수 있다. 상기 인트라 예측 모드 참조 정보는 상기 현재 매크로 블록의 예측 블록 단위로 획득될 수 있다. 상기 인트라 예측 모드 참조 정보가 이웃 블록의 인트라 예측 모드로부터 예측 블록의 인트라 예측 모드가 유도됨을 지시하는 경우, 상기 예측 블록을 기준으로 좌측 블록 및 우측 블록의 인트라 예측 모드를 이용하여 상기 예측 블록에 대한 인트라 예측 모드를 유도할 수 있다(S820). 상기 유도된 인트라 예측 모드는 좌측 블록의 인트라 예측 모드와 우측 블록의 인트라 예측 모드 중에서 최소값으로 유도될 수 있다. 상기 인트라 예측 모드 참조 정보가 이웃 블록의 인트라 예측 모드로부터 예측 블록의 인트라 예측 모드가 유도되지 아니함을 지시하는 경우, 상기 예측 블록에 대한 인트라 예측 모드를 비트스트림으로부터 파싱할 수 있다(S840). 상기 인트라 예측 모드 및 이웃 블록의 픽셀을 이용하여 상기 예측 블록의 픽셀을 예측할 수 있다(S830). 상기 이웃 블록은 상기 예측 블록에 이전에 복원된 블록을 의미할 수 있다. 예를 들어, 상기 예측 블록을 기준으로 좌측에 위치한 블록과 상단에 위치한 블록을 의미할 수 있다. 상기 이웃 블록의 픽셀은 디블록킹 필터링이 적용되지 아니한 복원된 픽셀일 수 있다. Referring to FIG. 8, a macroblock type of a current macroblock may be obtained (S800). If the current macroblock is predicted to be an intra mode according to the macroblock type, the intra prediction mode reference information for the current macroblock may be obtained (S810). For example, when the current macroblock is predicted in the intra mode, the macroblock type may be intra NxN or intramixed. The intra prediction mode reference information may be obtained in units of prediction blocks of the current macroblock. Wherein, when the intra prediction mode reference information indicates that an intra prediction mode of a prediction block is derived from an intra prediction mode of a neighboring block, the intraprediction mode prediction unit predicts an intra prediction mode of the prediction block using the intra prediction mode of the left block and the right block, The intra prediction mode can be derived (S820). The derived intra-prediction mode may be derived to the minimum value among the intra-prediction mode of the left block and the intra-prediction mode of the right block. If the intra prediction mode reference information indicates that the intra prediction mode of the prediction block is not derived from the intra prediction mode of the neighboring block, the intra prediction mode for the prediction block may be parsed from the bitstream in operation S840. The pixels of the prediction block may be predicted using the pixels of the intra prediction mode and neighboring blocks (S830). The neighboring block may refer to a block previously reconstructed in the prediction block. For example, it may refer to a block located at the left side and a block located at the upper side based on the prediction block. The pixels of the neighboring block may be reconstructed pixels to which no deblocking filtering is applied.

상기 매크로 블록 타입에 따라 상기 현재 매크로 블록이 인터 모드로 예측되는 경우, 상기 현재 매크로 블록에 대한 모션 정보를 획득하고(S850), 상기 모션 정보를 이용하여 상기 현재 매크로 블록을 인터 모드로 예측할 수 있다(S860).If the current macroblock is predicted to be in the inter mode according to the macroblock type, motion information on the current macroblock may be obtained (S850), and the current macroblock may be predicted in the inter mode using the motion information (S860).

이하, 매크로 블록이 경계 매크로 블록에 해당하는 경우 상기 매크로 블록의 매크로 블록 타입을 결정하는 방법에 대해서 살펴보기로 한다.Hereinafter, a method for determining a macroblock type of the macroblock when the macroblock corresponds to a boundary macroblock will be described.

도 9는 경계 매크로 블록 및 경계 서브 매크로 블록을 도시한 것이다.9 shows boundary macroblocks and boundary sub macroblocks.

도 9를 참조하면, 코딩 영역(coded region)은 디코딩 프로세스에 의해 출력된 프레임을 의미할 수 있다. 출력 영역(output region)은 상기 코딩 영역내에 특정된 사각형 영역을 의미할 수 있고, 좁게는 코딩 영역에서 실제로 디스플레이되는 영역으로 볼 수도 있다. 경계 매크로 블록이라 함은 상기 출력 영역에 속하지 않는 영역을 포함한 매크로 블록을 의미할 수 있고, 넌-경계 매크로 블록이라 함은 상기 출력 영역에 속한 영역만을 포함한 매크로 블록을 의미할 수 있다. 경계 서브 매크로 블록은 상기 경계 매크로 블록내의 서브 매크로 블록으로서, 상기 출력 영역에 속한 영역을 포함한 서브 매크로 블록을 의미할 수 있다. 반대로, 넌-경계 서브 매크로 블록은 상기 경계 매크로 블록내에서 상기 경계 서브 매크로 블록을 제외한 나머지 서브 매크로 블록을 의미할 수 있다. 즉, 상기 경계 매크로 블록내의 서브 매크로 블록으로서, 상기 출력 영역에 속한 영역을 포함하지 않는 서브 매크로 블록을 의미할 수 있다.Referring to FIG. 9, a coded region may denote a frame output by a decoding process. An output region may refer to a rectangular region specified within the coding region, and narrowly may be viewed as an area actually displayed in the coding region. The boundary macroblock may refer to a macroblock including an area not belonging to the output area, and the non-boundary macroblock may refer to a macroblock including only the area belonging to the output area. The boundary sub-macroblock may be a sub-macroblock in the boundary macroblock, and may be a sub-macroblock including an area belonging to the output area. In contrast, the non-boundary sub-macroblock may mean the remaining sub-macroblocks except for the boundary sub-macroblock in the boundary macroblock. That is, the sub macro block in the boundary macroblock may be a sub macro block that does not include the area belonging to the output area.

도 10은 I슬라이스의 경우, 경계 매크로 블록내의 서브 매크로 블록을 디코딩하는 방법을 도시한 블록도이다.10 is a block diagram showing a method of decoding a sub-macroblock in a boundary macroblock in the case of an I-slice.

도 10을 참조하면, 영상 시퀀스에 대한 프레임 오프셋 정보를 획득할 수 있다(S1000). 상기 프레임 오프셋 정보라 함은 영상 시퀀스의 픽쳐내의 샘플들로서, 프레임내의 특정 영역에 속한 샘플들을 특정하는 정보를 의미할 수 있다. 또는, 상기 출력 영역에 속한 샘플을 특정하는 정보를 의미할 수 있다. 상기 프레임 오프셋 정보를 이용하여 프레임내의 경계 매크로 블록을 특정할 수 있다(S1010). 상기 프레임 오프셋 정보에 따라 현재 매크로 블록이 경계 매크로 블록에 해당하는 경우, 상기 현재 매크로 블록의 매크로 블록 타입은 인트라 믹스드로 설정할 수 있다(S1020). 이 경우, 상기 프레임 오프셋 정보에 기초하여 상기 현재 매크로 블록의 파티션이 경계 서브 매크로 블록인지를 특정할 수 있다. 상기 현재 매크로 블록의 파티션이 경계 서브 매크로 블록인 경우에는 도 7에서 살명한 바와 같이 블록 타입 식별 정보를 이용하여 경계 서브 매크로 블록 타입을 결정할 수 있으며(S1050), 상기 경계 서브 매크로 블록 타입에 따라 상기 경계 서브 매크로 블록의 인트라 예측 모드를 획득할 수 있다(S1060). 상기 인트라 예측 모드 및 상기 경계 서브 매크로 블록의 이웃 블록내 픽셀값을 이용하여 상기 경계 서브 매크로 블록의 픽셀값을 예측할 수 있다(S1040). 그러나, 상기 현재 서브 매크로 블록이 넌-경계 서브 매크로 블록인 경우에는 상기 현재 서브 매크로 블록은 일정 크기의 블록 단위로 인트라 예측될 수 있다. 예를 들어, 상기 현재 매크로 블록이 32x32인 경우, 상기 현재 서브 매크로 블록의 블록 타입은 인트라 16x16으로 설정할 수 있다. 또한, 상기 현재 서브 매크로 블록이 휘도 계수를 가지는지 여부를 나타내는 CBP(Coded Block Pattern) 정보는 0으로 설정할 수 있다.Referring to FIG. 10, frame offset information for a video sequence may be obtained (S1000). The frame offset information may be information for specifying samples belonging to a specific area in a frame as samples in a picture of a video sequence. Or, it may mean information specifying a sample belonging to the output region. The boundary macroblock in the frame can be specified using the frame offset information (S1010). If the current macroblock corresponds to the boundary macroblock according to the frame offset information, the macroblock type of the current macroblock may be intra-mixed (S1020). In this case, it is possible to specify whether the partition of the current macroblock is a border sub-macroblock based on the frame offset information. If the partition of the current macroblock is a border sub-macroblock, the boundary sub-macroblock type may be determined using the block type identification information as illustrated in FIG. 7 (S1050) The intra-prediction mode of the boundary sub-macroblock can be obtained (S1060). The pixel value of the boundary sub-macroblock may be predicted using the intra-prediction mode and pixel values in neighboring blocks of the boundary sub-macroblock (S1040). However, if the current sub-macroblock is a non-boundary sub-macroblock, the current sub-macroblock may be intrapredicted on a block-by-block basis. For example, if the current macroblock is 32x32, the block type of the current sub macroblock may be set to intra 16x16. In addition, CBP (Coded Block Pattern) information indicating whether the current sub-macroblock has a luminance coefficient may be set to zero.

한편, 상기 현재 서브 매크로 블록이 넌-경계 서브 매크로 블록인 경우에는 상기 현재 서브 매크로 블록의 인트라 예측 모드를 별도로 획득하지 아니하고, 상기 현재 서브 매크로 블록의 위치 정보에 기초하여 9가지 인트라 예측 모드 중에서 가장 효율적인 모드를 상기 현재 서브 매크로 블록의 인트라 예측 모드로 설정할 수 있다(S1030). 상기 현재 서브 매크로 블록은 현재 프레임내에서 좌측, 우측, 상단, 하단, 좌측 상단, 좌측 하단, 우측 상단, 또는 우측 하단에 위치할 수 있으며, 상기 위치에 따른 상기 현재 서브 매크로 블록의 이웃 블록을 고려하여 인트라 예측 모드를 결정할 수 있다. 상기 이웃 블록은 상기 현재 서브 매크로 블록에 인접한 블록으로서, 상기 현재 서브 매크로 블록에 앞서 복원된 픽셀값을 가지는 블록을 의미할 수 있다. 구체적인 실시예는 도 11을 참조하여 살펴보기로 한다. 상기 인트라 예측 모드 및 상기 넌-경계 서브 매크로 블록의 이웃 블록내 픽셀값을 이용하여 상기 넌-경계 서브 매크로 블록의 픽셀값을 예측할 수 있다(S1040).If the current sub-macroblock is a non-boundary sub-macroblock, the intra-prediction mode of the current sub-macroblock is not separately acquired, and the intra-prediction mode of the current sub- The efficient mode can be set to the intra prediction mode of the current sub macro block (S1030). The current sub-macroblock may be located at the left, right, top, bottom, left top, bottom left, top right, or bottom right of the current frame, and considers neighboring blocks of the current sub- Thereby determining the intra prediction mode. The neighboring block may be a block adjacent to the current sub-macroblock and having a pixel value reconstructed prior to the current sub-macroblock. A specific embodiment will be described with reference to FIG. The pixel value of the non-boundary sub-macroblock may be predicted using the intra-prediction mode and pixel values in neighboring blocks of the non-boundary sub-macroblock (S1040).

도 11은 넌-경계 서브 매크로 블록의 인트라 예측 모드를 설정하는 방법의 일실시예를 도시한 것이다.FIG. 11 shows an embodiment of a method for setting an intra-prediction mode of a non-boundary sub-macroblock.

도 11(a)를 참조하면, 넌-경계 서브 매크로 블록이 프레임내의 우측에 위치하는 경우, 상기 넌-경계 서브 매크로 블록의 좌측 서브 매크로 블록은 복원된 픽셀값을 가지는 바, 9가지 인트라 예측 모드 중에서 수평 예측를 이용하여 상기 넌-경계 서브 매크로 블록을 예측함이 효율적일 수 있다.11A, when a non-boundary sub-macro-block is located on the right side of a frame, the left sub-macro-block of the non-boundary sub-macro-block has a restored pixel value, It may be efficient to predict the non-boundary sub-macroblock using horizontal prediction.

도 11(b)를 참조하면, 넌-경계 서브 매크로 블록이 프레임내의 하단에 위치하는 경우, 9가지 인트라 예측 모드 중에서 수직 예측을 이용하여 상기 넌-경계 서브 매크로 블록을 예측함이 효율적일 수 있다.Referring to FIG. 11 (b), when the non-boundary sub-macroblock is located at the bottom of the frame, it may be efficient to predict the non-boundary sub-macroblock using the vertical prediction among the nine intra prediction modes.

도 11(c)를 참조하면, 넌-경계 서브 매크로 블록이 프레임내의 우측 하단에 위치하는 경우, 수직 예측 및 수평 예측을 이용하여 상기 넌-경계 서브 매크로 블록을 예측할 수 있다. 즉, 인덱스가 1인 넌-경계 서브 매크로 블록은 인덱스가 0인 경계 서브 매크로 블록이 좌측에 위치하는 바, 수평 예측을 인트라 예측 모드로 설정할 수 있다. 인덱스가 2인 넌-경계 서브 매크로 블록은 인덱스가 0인 경계 서브 매크로 블록이 상단에 위치하는 바, 수직 예측을 인트라 예측 모드로 설정할 수 있고, 인덱스가 3인 넌-경계 서브 매크로 블록은 인덱스가 1인 넌-경계 서브 매크로 블록이 상단에 위치하는 바, 수직 예측을 인트라 예측 모드로 설정할 수 있다. 그 밖의 경우에는 넌-경계 서브 매크로 블록의 인트라 예측 모드를 평균 예측으로 설정할 수 있다.Referring to FIG. 11 (c), when the non-boundary sub-macroblock is located at the lower right of the frame, the non-boundary sub-macroblock can be predicted using vertical prediction and horizontal prediction. That is, since the boundary sub-macroblock having index 0 is located on the left side, the non-boundary sub-macroblock having index 1 can set the horizontal prediction to the intra prediction mode. A non-boundary sub-macroblock having an index of 2 can set a vertical prediction to an intra-prediction mode as a boundary sub-macroblock having an index of 0 is located at the top, and a non-boundary sub- 1 non-boundary sub macro block is located at the top, the vertical prediction can be set to the intra prediction mode. Otherwise, the intra-prediction mode of the non-boundary sub-macroblock can be set to the average prediction.

상기 설정된 인트라 예측 모드 및 상기 넌-경계 서브 매크로 블록의 이웃 블록의 복원된 픽셀값을 이용하여 상기 넌-경계 서브 매크로 블록의 픽셀값을 예측할 수 있다(S1030).The pixel value of the non-boundary sub-macroblock may be predicted using the set intra-prediction mode and the reconstructed pixel value of the neighboring block of the non-boundary sub-macroblock (S 1030).

도 12는 P/B슬라이스의 경우, 경계 매크로 블록내의 서브 매크로 블록을 디코딩하는 방법을 도시한 블록도이다.12 is a block diagram showing a method of decoding a sub-macroblock in a boundary macroblock in the case of a P / B slice.

도 12를 참조하면, 영상 시퀀스에 대한 프레임 오프셋 정보를 획득할 수 있다(S1200). 앞서 설명한 바와 같이 상기 프레임 오프셋 정보를 이용하여 프레임내의 경계 매크로 블록을 특정할 수 있다(S1205). Referring to FIG. 12, frame offset information for a video sequence may be obtained (S1200). As described above, the boundary macro block in the frame can be specified using the frame offset information (S1205).

상기 프레임 오프셋 정보에 따라 현재 매크로 블록이 넌-경계 매크로 블록에 해당하는 경우, 슬라이스 헤더에서 스킵 모드 지시 정보를 획득할 수 있다(S1210). 상기 스킵 모드 지시 정보에 따라 상기 현재 매크로 블록이 스킵 모드로 코딩되는 경우에는 모션 정보, 참조 픽쳐 인덱스 등을 획득하지 아니하며, 참조 블록으로부터 모션 정보 및 참조 픽쳐 인덱스를 유도할 수 있다(S1215). 상기 유도된 모션 정보 및 참조 픽쳐 인덱스를 이용하여 상기 현재 매크로 블록을 예측할 수 있다(S1230). 상기 스킵 모드 지시 정보에 따라 상기 현재 매크로 블록이 스킵 모드로 코딩되지 아니하는 경우에는 매크로 블록 레이어에서 매크로 블록 타입을 획득할 수 있다(S1220). 상기 매크로 블록 타입에 따른 상기 현재 매크로 블록의 파티션에 대하여 모션 정보를 획득할 수 있고(S1225), 상기 모션 정보에 기초하여 상기 현재 매크로 블록을 예측할 수 있다(S1230). If the current macroblock corresponds to the non-boundary macroblock according to the frame offset information, skip mode indication information may be obtained in the slice header (S1210). If the current macroblock is coded in the skip mode according to the skip mode instruction information, the motion information and the reference picture index are not obtained, and the motion information and the reference picture index can be derived from the reference block (S1215). The current macroblock may be predicted using the derived motion information and the reference picture index (S1230). If the current macroblock is not coded in the skip mode according to the skip mode instruction information, the macroblock type may be obtained in the macroblock layer (S1220). The motion information may be obtained for the partition of the current macroblock according to the macroblock type (S1225), and the current macroblock may be predicted based on the motion information (S1230).

상기 프레임 오프셋 정보에 따라 현재 매크로 블록이 경계 매크로 블록에 해당하는 경우, 상기 현재 매크로 블록의 매크로 블록 타입 정보는 디코더로 전송되지 아니하며, 슬라이스 타입을 고려하여 설정될 수 있다(S1235). 상기 현재 매크로 블록의 매크로 블록 타입 정보는 상기 현재 매크로 블록의 파티션 정보를 포함하며, 상기 현재 매크로 블록의 파티션 정보는 인터 예측을 수행하는 블록 단위를 의미할 수 있다. If the current macroblock corresponds to the boundary macroblock according to the frame offset information, the macroblock type information of the current macroblock is not transmitted to the decoder and may be set considering the slice type (S1235). The macroblock type information of the current macroblock includes partition information of the current macroblock, and the partition information of the current macroblock may be a block unit performing inter prediction.

상기 현재 매크로 블록이 32x32인 경우를 예로 들어 설명하면, 슬라이스 타입이 P슬라이스인 경우에는 P_16x16, P_32x16, 또는 P_16x32로 설정될 수 있고, 슬라이스 타입이 B슬라이스인 경우에는 B_16x16, B_32x16, 또는 B_16x32로 설정될 수 있다. 추가적으로, 경계 매크로 블록의 위치를 고려하여 상기 현재 매크로 블록의 매크로 블록 타입을 결정할 수도 있으며, 이는 도 13을 참조하여 설명하기로 한다.If the current macroblock is 32x32, it may be set to P_16x16, P_32x16, or P_16x32 when the slice type is a P slice, and B_16x16, B_32x16, or B_16x32 when the slice type is B slice. . In addition, the macroblock type of the current macroblock may be determined in consideration of the position of the boundary macroblock, which will be described with reference to FIG.

도 13은 P/B슬라이스내의 경계 매크로 블록의 위치에 따라 매크로 블록 타입을 결정하는 방법을 도시한 것이다.13 shows a method of determining a macroblock type according to the position of a boundary macroblock in a P / B slice.

도 13(a)를 참조하면, 경계 매크로 블록이 프레임내의 좌측 또는 우측에 위치하는 경우, 상기 경계 매크로 블록의 매크로 블록 타입은 슬라이스 타입을 고려하여 P_16x32 또는 B_16x32로 설정될 수 있다.13A, when the boundary macroblock is located on the left or right side of the frame, the macroblock type of the boundary macroblock may be set to P_16x32 or B_16x32 in consideration of the slice type.

도 13(b)를 참조하면, 경계 매크로 블록이 프레임내의 상단 또는 하단에 위치하는 경우, 상기 경계 매크로 블록의 매크로 블록 타입은 슬라이스 타입을 고려하여 P_32x16 또는 B_32x16으로 설정될 수 있다.13B, when the boundary macroblock is located at the upper or lower end of the frame, the macroblock type of the boundary macroblock may be set to P_32x16 or B_32x16 in consideration of the slice type.

상기 현재 매크로 블록이 상기 경계 매크로 블록에 해당하는 경우, 상기 프레임 오프셋 정보를 이용하여 상기 현재 매크로 블록의 파티션에 대하여 경계 서브 매크로 블록인지 여부를 특정할 수 있다(S1240). 상기 현재 매크로 블록의 파티션은 현재 서브 매크로 블록과 동일한 의미로 해석될 수도 있다. 상기 현재 매크로 블록의 파티션이 경계 서브 매크로 블록인 경우에는 서브 매크로 블록 레이어에서 상기 현재 매크로 블록의 파티션에 대한 블록 타입을 획득하고(S1245), 상기 블록 타입에 기초하여 상기 현재 매크로 블록의 파티션에 대한 모션 정보를 획득할 수 있다(S1250). 상기 획득된 모션 정보를 이용하여 상기 현재 매크로 블록의 파티션을 예측할 수 있다(S1255).If the current macroblock corresponds to the boundary macroblock, it may be determined whether the boundary is a boundary sub macroblock for the partition of the current macroblock using the frame offset information (S1240). The partition of the current macroblock may be interpreted to have the same meaning as the current sub macroblock. If the partition of the current macroblock is a border sub-macroblock, a block type for the partition of the current macroblock is obtained in the sub-macroblock layer (S1245), and the block type of the partition of the current macroblock is obtained The motion information can be obtained (S1250). The partition of the current macroblock may be predicted using the obtained motion information (S1255).

상기 현재 매크로 블록의 파티션이 넌-경계 서브 매크로 블록인 경우에는 상기 현재 매크로 블록의 파티션은 스킵 모드를 이용하여 코딩되는 것으로 설정할 수 있다(S1260). 따라서, 상기 현재 매크로 블록의 파티션은 참조 블록으로부터 모션 정보를 유도하고, 상기 유도된 모션 정보에 기초하여 인터 예측을 수행할 수 있다(S1265).If the partition of the current macroblock is a non-boundary sub-macroblock, the partition of the current macroblock may be coded using a skip mode (S1260). Accordingly, the partition of the current macroblock may derive motion information from the reference block, and perform inter prediction based on the derived motion information (S1265).

본 발명은 비디오 신호를 인코딩하고 디코딩하는 데 적용될 수 있다.The present invention can be applied to encoding and decoding video signals.

Claims (8)

비디오 신호를 위한 비트스트림을 디코딩하기 위한 방법으로서,
현재 블록에 대한 스킵 모드 지시 정보를 상기 비트스트림으로부터 획득하는 단계,
상기 스킵 모드 지시 정보가 1인 경우 상기 현재 블록이 스킵 모드로 코딩됨을 지시하고, 상기 스킵 모드 지시 정보가 0인 경우 상기 현재 블록이 스킵 모드로 코딩되지 않음을 지시하며,
상기 현재 블록이 스킵 모드로 코딩된 경우 상기 현재 블록에 대한 모션 벡터, 참조 픽처 인덱스, 레지듀얼 데이터는 상기 비트스트림으로부터 획득되지 아니하며;
상기 스킵 모드 지시 정보가 1인 경우, 상기 현재 블록에 대한 후보 인덱스 정보를 상기 비트스트림으로부터 획득하고, 상기 현재 블록의 이웃 블록들 중에서 상기 후보 인덱스 정보가 지시하는 이웃 블록의 모션 정보를 상기 현재 블록에 대한 모션 정보로 유도하는 단계; 및
상기 현재 블록에 대한 모션 정보에 기초하여 인터 예측을 수행하는 단계를 포함하는, 방법.
A method for decoding a bitstream for a video signal,
Obtaining skip mode indication information for a current block from the bit stream,
Wherein the current block is coded in a skip mode when the skip mode indicating information is 1 and indicates that the current block is not coded in a skip mode when the skip mode indicating information is 0,
If the current block is coded in a skip mode, motion vectors, reference picture indexes, and residual data for the current block are not obtained from the bitstream;
Acquires from the bitstream candidate index information for the current block if the skip mode indicating information is 1, and acquires motion information of a neighboring block indicated by the candidate index information from neighboring blocks of the current block, To motion information on the motion information; And
And performing inter prediction based on motion information for the current block.
제1항에 있어서,
상기 이웃 블록들은 상기 현재 블록에 인접한 좌측 이웃 블록, 상단 이웃 블록, 및 우측 상단 이웃 블록을 포함하는, 방법.
The method according to claim 1,
Wherein the neighboring blocks include a left neighboring block, an upper neighboring block, and a upper right neighboring block adjacent to the current block.
제1항에 있어서,
상기 모션 정보는 모션 벡터 및 참조 픽처 인덱스를 포함하는, 방법.
The method according to claim 1,
Wherein the motion information comprises a motion vector and a reference picture index.
제1항에 있어서,
상기 스킵 모드 지시 정보가 0인 경우, 상기 방법은
상기 현재 블록에 대한 파티션 정보를 상기 비트스트림으로부터 획득하는 단계, 상기 현재 블록에 대한 파티션 정보는 인터 예측을 수행하는 단위를 지시하며;
상기 인터 예측 수행 단위에 해당하는 파티션 각각에 대하여 모션 벡터 및 참조 픽처 인덱스를 획득하고 상기 획득된 모션 벡터 및 참조 픽처 인덱스를 이용하여 해당 파티션에 대해 인터 예측을 수행하는 단계를 더 포함하는, 방법.
The method according to claim 1,
If the skip mode indication information is 0,
Obtaining partition information for the current block from the bitstream; partition information for the current block indicates a unit for performing inter prediction;
Obtaining a motion vector and a reference picture index for each partition corresponding to the inter prediction unit, and performing inter prediction on the partition using the obtained motion vector and reference picture index.
비디오 신호를 위한 비트스트림을 디코딩하기 위한 디코딩 장치로서,
현재 블록에 대한 스킵 모드 지시 정보를 상기 비트스트림으로부터 획득하도록 구성된 엔트로피 디코딩부, 상기 스킵 모드 지시 정보가 1인 경우 상기 현재 블록이 스킵 모드로 코딩됨을 지시하고, 상기 스킵 모드 지시 정보가 0인 경우 상기 현재 블록이 스킵 모드로 코딩되지 않음을 지시하며, 상기 현재 블록이 스킵 모드로 코딩된 경우 상기 현재 블록에 대한 모션 벡터, 참조 픽처 인덱스, 레지듀얼 데이터는 상기 비트스트림으로부터 획득되지 아니하며; 및
상기 스킵 모드 지시 정보가 1인 경우, 상기 현재 블록에 대한 후보 인덱스 정보를 상기 비트스트림으로부터 획득하고, 상기 현재 블록의 이웃 블록들 중에서 상기 후보 인덱스 정보가 지시하는 이웃 블록의 모션 정보를 상기 현재 블록에 대한 모션 정보로 유도하고, 상기 현재 블록에 대한 모션 정보에 기초하여 인터 예측을 수행하도록 구성된 인터 예측부를 포함하는, 디코딩 장치.
13. A decoding apparatus for decoding a bitstream for a video signal,
An entropy decoding unit configured to obtain skip mode indication information for a current block from the bitstream; an indication unit for indicating that the current block is coded in a skip mode if the skip mode indication information is 1; The motion vector, the reference picture index, and the residual data for the current block are not obtained from the bitstream when the current block is coded in the skip mode; And
Acquires from the bitstream candidate index information for the current block if the skip mode indicating information is 1, and acquires motion information of a neighboring block indicated by the candidate index information from neighboring blocks of the current block, And an inter-prediction unit configured to perform inter-prediction based on the motion information for the current block.
제5항에 있어서,
상기 이웃 블록들은 상기 현재 블록에 인접한 좌측 이웃 블록, 상단 이웃 블록, 및 우측 상단 이웃 블록을 포함하는, 디코딩 장치.
6. The method of claim 5,
Wherein the neighboring blocks include a left neighboring block, an upper neighboring block, and a right upper neighboring block adjacent to the current block.
제5항에 있어서,
상기 모션 정보는 모션 벡터 및 참조 픽처 인덱스를 포함하는, 디코딩 장치.
6. The method of claim 5,
Wherein the motion information comprises a motion vector and a reference picture index.
제5항에 있어서,
상기 스킵 모드 지시 정보가 0인 경우, 상기 엔트로피 디코딩부는 상기 현재 블록에 대한 파티션 정보를 상기 비트스트림으로부터 획득하고, 상기 현재 블록에 대한 파티션 정보는 인터 예측을 수행하는 단위를 지시하며, 상기 인터 예측부는 상기 인터 예측 수행 단위에 해당하는 파티션 각각에 대하여 모션 벡터 및 참조 픽처 인덱스를 획득하고 상기 획득된 모션 벡터 및 참조 픽처 인덱스를 이용하여 해당 파티션에 대해 인터 예측을 수행하는, 디코딩 장치.
6. The method of claim 5,
If the skip mode indicating information is 0, the entropy decoding unit obtains partition information for the current block from the bitstream, the partition information for the current block indicates a unit for performing inter prediction, Wherein the motion vector and the reference picture index are obtained for each partition corresponding to the inter prediction unit, and the inter prediction is performed for the corresponding partition using the obtained motion vector and the reference picture index.
KR1020180005837A 2009-05-12 2018-01-17 A method and an apparatus for processing a video signal KR101931950B1 (en)

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
US17763809P 2009-05-12 2009-05-12
US61/177,638 2009-05-12
US22625209P 2009-07-16 2009-07-16
US61/226,252 2009-07-16
US25631809P 2009-10-30 2009-10-30
US61/256,318 2009-10-30
US26136009P 2009-11-15 2009-11-15
US61/261,360 2009-11-15

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020170109981A Division KR101821217B1 (en) 2009-05-12 2017-08-30 A method and an apparatus for processing a video signal

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020180163070A Division KR101984605B1 (en) 2009-05-12 2018-12-17 A method and an apparatus for processing a video signal

Publications (2)

Publication Number Publication Date
KR20180009373A true KR20180009373A (en) 2018-01-26
KR101931950B1 KR101931950B1 (en) 2018-12-24

Family

ID=43407388

Family Applications (7)

Application Number Title Priority Date Filing Date
KR1020100043470A KR101742992B1 (en) 2009-05-12 2010-05-10 A method and an apparatus for processing a video signal
KR1020170063952A KR101775533B1 (en) 2009-05-12 2017-05-24 A method and an apparatus for processing a video signal
KR1020170109981A KR101821217B1 (en) 2009-05-12 2017-08-30 A method and an apparatus for processing a video signal
KR1020180005837A KR101931950B1 (en) 2009-05-12 2018-01-17 A method and an apparatus for processing a video signal
KR1020180163070A KR101984605B1 (en) 2009-05-12 2018-12-17 A method and an apparatus for processing a video signal
KR1020190059980A KR102037327B1 (en) 2009-05-12 2019-05-22 A method and an apparatus for processing a video signal
KR1020190131338A KR102168120B1 (en) 2009-05-12 2019-10-22 A method and an apparatus for processing a video signal

Family Applications Before (3)

Application Number Title Priority Date Filing Date
KR1020100043470A KR101742992B1 (en) 2009-05-12 2010-05-10 A method and an apparatus for processing a video signal
KR1020170063952A KR101775533B1 (en) 2009-05-12 2017-05-24 A method and an apparatus for processing a video signal
KR1020170109981A KR101821217B1 (en) 2009-05-12 2017-08-30 A method and an apparatus for processing a video signal

Family Applications After (3)

Application Number Title Priority Date Filing Date
KR1020180163070A KR101984605B1 (en) 2009-05-12 2018-12-17 A method and an apparatus for processing a video signal
KR1020190059980A KR102037327B1 (en) 2009-05-12 2019-05-22 A method and an apparatus for processing a video signal
KR1020190131338A KR102168120B1 (en) 2009-05-12 2019-10-22 A method and an apparatus for processing a video signal

Country Status (1)

Country Link
KR (7) KR101742992B1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9113168B2 (en) 2009-05-12 2015-08-18 Lg Electronics Inc. Method and apparatus of processing a video signal
KR101742992B1 (en) * 2009-05-12 2017-06-02 엘지전자 주식회사 A method and an apparatus for processing a video signal
EP2728872A4 (en) * 2011-07-01 2016-05-11 Samsung Electronics Co Ltd Video encoding method with intra prediction using checking process for unified reference possibility, video decoding method and device thereof
MX2013008533A (en) * 2011-11-02 2013-08-12 Panasonic Corp Video coding method, video coder, video decoding method, video decoder, and video codec.
KR101830352B1 (en) 2011-11-09 2018-02-21 에스케이 텔레콤주식회사 Method and Apparatus Video Encoding and Decoding using Skip Mode
CN108353164B (en) 2015-09-11 2022-06-24 株式会社Kt Method and apparatus for processing video signal
US11539972B2 (en) 2018-03-29 2022-12-27 Industry Academy Cooperation Foundation Of Sejong University Method and apparatus for encoding/decoding image
EP4044598A4 (en) * 2019-11-05 2022-12-07 LG Electronics Inc. Method and device for processing image information for image/video coding
WO2022266971A1 (en) * 2021-06-24 2022-12-29 Oppo广东移动通信有限公司 Encoding method, decoding method, encoder, decoder and computer storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101742992B1 (en) * 2009-05-12 2017-06-02 엘지전자 주식회사 A method and an apparatus for processing a video signal

Also Published As

Publication number Publication date
KR20180136925A (en) 2018-12-26
KR20170061649A (en) 2017-06-05
KR20170102846A (en) 2017-09-12
KR101931950B1 (en) 2018-12-24
KR102168120B1 (en) 2020-10-20
KR101742992B1 (en) 2017-06-02
KR102037327B1 (en) 2019-10-28
KR101984605B1 (en) 2019-05-31
KR20100122450A (en) 2010-11-22
KR20190122617A (en) 2019-10-30
KR101821217B1 (en) 2018-01-23
KR101775533B1 (en) 2017-09-06
KR20190058427A (en) 2019-05-29

Similar Documents

Publication Publication Date Title
KR102436983B1 (en) Method and apparatus for processing a video signal
KR101984605B1 (en) A method and an apparatus for processing a video signal
KR101316060B1 (en) Decoding method of inter coded moving picture
KR101949749B1 (en) Method and apparatus for processing a video signal
WO2010131903A2 (en) Method and apparatus for processing a video signal
EP2932718B1 (en) Device and method for scalable coding of video information based on high efficiency video coding
KR102354628B1 (en) A method of video processing for processing coding tree units and coding units, a method and appratus for decoding and encoding video using the processing.
KR20140129607A (en) Method and apparatus for processing moving image
KR102657392B1 (en) A method of video processing providing independent properties between coding tree units and coding units, a method and appratus for decoding and encoding video using the processing
KR20130067280A (en) Decoding method of inter coded moving picture
KR20150070849A (en) Method and apparatus for encoding/decoding video
KR102333745B1 (en) Method and apparatus for processing a video signal
KR20140130574A (en) Method and apparatus for processing moving image
KR20140130572A (en) Method and apparatus for processing moving image

Legal Events

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