[go: up one dir, main page]

KR102751535B1 - Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream - Google Patents

Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream Download PDF

Info

Publication number
KR102751535B1
KR102751535B1 KR1020230033494A KR20230033494A KR102751535B1 KR 102751535 B1 KR102751535 B1 KR 102751535B1 KR 1020230033494 A KR1020230033494 A KR 1020230033494A KR 20230033494 A KR20230033494 A KR 20230033494A KR 102751535 B1 KR102751535 B1 KR 102751535B1
Authority
KR
South Korea
Prior art keywords
division
block
target block
binary tree
image
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
KR1020230033494A
Other languages
Korean (ko)
Other versions
KR20230042236A (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
Priority claimed from KR1020170127939A external-priority patent/KR102511611B1/en
Application filed by 세종대학교산학협력단 filed Critical 세종대학교산학협력단
Publication of KR20230042236A publication Critical patent/KR20230042236A/en
Priority to KR1020250000609A priority Critical patent/KR20250011702A/en
Application granted granted Critical
Publication of KR102751535B1 publication Critical patent/KR102751535B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • 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/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
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/563Motion estimation with padding, i.e. with filling of non-object values in an arbitrarily shaped picture block or region for estimation purposes
    • 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

Landscapes

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

Abstract

본 발명은 영상 부호화 방법 및 영상 복호화 방법을 제공한다. 본 발명의 영상 부호화 방법은, 현재 영상을 복수의 블록들로 분할하는 제1 분할 단계, 및 상기 복수의 블록들 중 상기 현재 영상의 경계를 포함하는 분할 대상 블록을 복수의 하위 블록들로 분할하는 제2 분할 단계를 포함하고, 상기 제2 분할 단계는, 상기 하위 블록들 중 상기 현재 영상의 경계를 포함하는 하위 블록이 존재하지 않을 때까지, 상기 현재 영상의 경계를 포함하는 하위 블록을 상기 분할 대상 블록으로하여 재귀적으로 수행된다.The present invention provides an image encoding method and an image decoding method. The image encoding method of the present invention includes a first division step of division of a current image into a plurality of blocks, and a second division step of division of a division target block including a boundary of the current image among the plurality of blocks into a plurality of sub-blocks, wherein the second division step is recursively performed by using a sub-block including a boundary of the current image as a division target block until no sub-block including a boundary of the current image exists among the sub-blocks.

Description

영상 부호화 방법/장치, 영상 복호화 방법/장치 및 비트스트림을 저장한 기록 매체{IMAGE ENCODING METHOD/APPARATUS, IMAGE DECODING METHOD/APPARATUS AND AND RECORDING MEDIUM FOR STORING BITSTREAM}IMAGE ENCODING METHOD/APPARATUS, IMAGE DECODING METHOD/APPARATUS AND AND RECORDING MEDIUM FOR STORING BITSTREAM

본 발명은 영상 부호화/복호화 방법 및 장치에 관한 것이다. 특히, 영상 부호화/복호화에 있어서의 영상 경계 처리 방법 및 장치에 관한 것이다. 더욱 상세하게는, 영상의 패딩 및 트리 구조에서 영상의 경계를 효율적으로 처리하기 위한 방법 및 장치에 관한 것이다.The present invention relates to a method and device for image encoding/decoding. In particular, it relates to a method and device for image boundary processing in image encoding/decoding. More specifically, it relates to a method and device for efficiently processing image boundaries in image padding and tree structures.

최근, 인터넷에서는 동영상과 같은 멀티미디어 데이터의 수요가 급격히 증가하고 있다. 하지만 채널(Channel)의 대역폭(Bandwidth)이 발전하는 속도는 급격히 증가하고 있는 멀티미디어 데이터의 양을 따라가기 힘든 상황이다. 이러한 추세의 일환으로 국제 표준화 기구인 ITU-T의 VCEG(Video Coding Expert Group)과 ISO/IEC의 MPEG(Moving Picture Expert Group)에서는 꾸준한 공동 연구를 통하여 동영상 압축 표준을 연구하는 중이다.Recently, the demand for multimedia data such as video has been rapidly increasing on the Internet. However, the speed at which the bandwidth of the channel is growing is not keeping up with the rapidly increasing amount of multimedia data. As part of this trend, the Video Coding Expert Group (VCEG) of the international standardization organization ITU-T and the Moving Picture Expert Group (MPEG) of ISO/IEC are conducting continuous joint research to study video compression standards.

동영상 압축은 크게 화면 내 예측, 화면 간 예측, 변환, 양자화, 엔트로피(Entropy coding) 부호화, 인루프 필터(In-loop filter)로 구성된다. 이 중, 화면 내 예측은 현재 블록 주변에 존재하는 복원된 화소들을 이용하여 현재 블록을 위한 예측 블록을 생성하는 기술을 말한다. 이 때 부호화 과정이 블록 단위로 수행되기 때문에 영상의 크기가 블록 크기의 배수가 되지 않는다면 블록 단위로 부호화가 수행되기 어렵다는 문제점이 존재한다.Video compression is largely composed of intra-frame prediction, inter-frame prediction, transformation, quantization, entropy coding, and in-loop filter. Among these, intra-frame prediction refers to a technology that generates a prediction block for the current block using restored pixels existing around the current block. Since the encoding process is performed in block units, there is a problem that encoding is difficult to perform in block units if the image size is not a multiple of the block size.

본 발명은 영상의 부호화/복호화에 있어서, 블록 단위로 영상의 크기를 맞추기 위한 패딩 방법 및 장치를 제공하는 것을 목적으로 한다.The purpose of the present invention is to provide a padding method and device for adjusting the size of an image in block units in image encoding/decoding.

또한, 본 발명은 영상의 부호화/복호화에 있어서, 영상 경계 처리에 효율적인 블록 분할 방법 및 장치를 제공하는 것을 목적으로 한다.In addition, the present invention aims to provide a block division method and device that are efficient for image boundary processing in image encoding/decoding.

또한, 본 발명은 본 발명에 따른 영상 부호화 방법/장치에 의해 생성된 비트스트림을 저장하는 컴퓨터 판독 가능한 기록 매체를 제공하는 것을 목적으로 한다.In addition, the present invention aims to provide a computer-readable recording medium storing a bitstream generated by an image encoding method/device according to the present invention.

본 발명에 따른 영상 부호화 방법은, 현재 영상을 복수의 블록들로 분할하는 제1 분할 단계, 및 상기 복수의 블록들 중 상기 현재 영상의 경계를 포함하는 분할 대상 블록을 복수의 하위 블록들로 분할하는 제2 분할 단계를 포함하고, 상기 제2 분할 단계는, 상기 하위 블록들 중 상기 현재 영상의 경계를 포함하는 하위 블록이 존재하지 않을 때까지, 상기 현재 영상의 경계를 포함하는 하위 블록을 상기 분할 대상 블록으로하여 재귀적으로 수행될 수 있다.A video encoding method according to the present invention comprises a first division step of division of a current image into a plurality of blocks, and a second division step of division of a division target block including a boundary of the current image among the plurality of blocks into a plurality of sub-blocks, wherein the second division step may be recursively performed by using a sub-block including a boundary of the current image as a division target block until no sub-block including a boundary of the current image exists among the sub-blocks.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 제1 분할 단계는, 상기 현재 영상을 동일한 크기의 복수의 최대 블록으로 분할하는 단계일 수 있다.In the image encoding method according to the present invention, the first division step may be a step of dividing the current image into a plurality of maximum blocks of the same size.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 제2 분할 단계는, 상기 분할 대상 블록에 대해 쿼드 트리 분할 또는 이진 트리 분할을 수행하는 단계일 수 있다.In the image encoding method according to the present invention, the second division step may be a step of performing quad tree division or binary tree division on the division target block.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 분할 대상 블록이 상기 쿼드 트리 분할이 가능한 크기인 경우, 상기 제2 분할 단계는 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할을 수행하고, 상기 분할 대상 블록이 상기 쿼드 트리 분할이 가능하지 않은 크기인 경우, 상기 제2 분할 단계는 상기 분할 대상 블록에 대해 상기 이진 트리 분할을 수행할 수 있다.In the video encoding method according to the present invention, if the target block for division is of a size that allows quad-tree division, the second division step may perform the quad-tree division on the target block for division, and if the target block for division is of a size that does not allow quad-tree division, the second division step may perform the binary tree division on the target block for division.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할 또는 상기 이진 트리 분할이 수행된 경우, 상기 분할 대상 블록이 쿼드 트리 분할되는지의 여부를 나타내는 제1 분할 정보 또는 상기 분할 대상 블록이 이진 트리 분할되는지의 여부를 나타내는 제2 분할 정보는 부호화되지 않을 수 있다.In the image encoding method according to the present invention, when the quad tree division or the binary tree division is performed on the division target block in the second division step, the first division information indicating whether the division target block is divided into a quad tree or the second division information indicating whether the division target block is divided into a binary tree may not be encoded.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 이진 트리 분할이 수행된 경우, 상기 이진 트리 분할의 분할 방향은, 상기 분할 대상 블록에 포함되고 동시에 상기 현재 영상의 경계 내의 영역인 부호화 대상 블록의 형태에 기초하여 결정될 수 있다.In the image encoding method according to the present invention, when the binary tree division is performed on the division target block in the second division step, the division direction of the binary tree division can be determined based on the shape of the encoding target block which is included in the division target block and is also an area within the boundary of the current image.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 이진 트리 분할이 수행된 경우, 상기 이진 트리 분할의 분할 방향을 나타내는 분할 방향 정보는 부호화되지 않을 수 있다.In the image encoding method according to the present invention, when the binary tree division is performed on the division target block in the second division step, division direction information indicating the division direction of the binary tree division may not be encoded.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 제2 분할 단계는, 상기 분할 대상 블록에 포함되고 동시에 상기 현재 영상의 경계 밖의 영역인 남은 영역의 크기와 소정의 임계값을 비교하는 단계를 더 포함하고, 상기 비교 결과에 기초하여, 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할 및 상기 이진 트리 분할 중 하나를 수행할 수 있다.In the image encoding method according to the present invention, the second division step further includes a step of comparing the size of a remaining area, which is included in the division target block and is simultaneously an area outside the boundary of the current image, with a predetermined threshold value, and based on the comparison result, one of the quad tree division and the binary tree division can be performed on the division target block.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 남은 영역의 크기는 상기 남은 영역의 가로 길이 및 세로 길이 중 작은 쪽이고, 상기 제2 분할 단계는, 상기 남은 영역의 크기가 상기 소정의 임계값보다 큰 경우, 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할을 수행하고, 상기 남은 영역의 크기가 상기 소정의 임계값보다 작은 경우, 상기 분할 대상 블록에 대해 상기 이진 트리 분할을 수행할 수 있다.In the image encoding method according to the present invention, the size of the remaining region is a smaller one of the horizontal length and the vertical length of the remaining region, and in the second division step, if the size of the remaining region is greater than the predetermined threshold value, the quad tree division can be performed on the division target block, and if the size of the remaining region is less than the predetermined threshold value, the binary tree division can be performed on the division target block.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 제2 분할 단계는, 상기 분할 대상 블록에 대해 이진 트리 분할을 수행하는 단계이고, 상기 이진 트리 분할의 분할 방향은, 상기 분할 대상 블록에 포함되고 동시에 상기 현재 영상의 경계 밖의 영역인 남은 영역의 형태에 기초하여 결정될 수 있다.In the image encoding method according to the present invention, the second division step is a step of performing binary tree division on the division target block, and the division direction of the binary tree division can be determined based on the shape of a remaining area that is included in the division target block and is also an area outside the boundary of the current image.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 이진 트리 분할의 분할 방향은, 상기 남은 영역의 형태가 세로로 긴 블록인 경우, 세로 방향이고, 상기 남은 영역의 형태가 가로로 긴 블록인 경우, 가로 방향일 수 있다.In the image encoding method according to the present invention, the division direction of the binary tree division may be a vertical direction when the shape of the remaining region is a vertically long block, and may be a horizontal direction when the shape of the remaining region is a horizontally long block.

본 발명에 따른 영상 복호화 방법은, 현재 영상을 복수의 블록들로 분할하는 제1 분할 단계, 및 상기 복수의 블록들 중 상기 현재 영상의 경계를 포함하는 분할 대상 블록을 복수의 하위 블록들로 분할하는 제2 분할 단계를 포함하고, 상기 제2 분할 단계는, 상기 하위 블록들 중 상기 현재 영상의 경계를 포함하는 하위 블록이 존재하지 않을 때까지, 상기 현재 영상의 경계를 포함하는 하위 블록을 상기 분할 대상 블록으로하여 재귀적으로 수행될 수 있다.A method for decoding an image according to the present invention comprises a first division step of division of a current image into a plurality of blocks, and a second division step of division of a division target block including a boundary of the current image among the plurality of blocks into a plurality of sub-blocks, wherein the second division step may be recursively performed by using a sub-block including a boundary of the current image as a division target block until no sub-block including a boundary of the current image exists among the sub-blocks.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 제2 분할 단계는, 상기 분할 대상 블록에 대해 쿼드 트리 분할 또는 이진 트리 분할을 수행하는 단계일 수 있다.In the image decoding method according to the present invention, the second division step may be a step of performing quad tree division or binary tree division on the division target block.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 분할 대상 블록이 상기 쿼드 트리 분할이 가능한 크기인 경우, 상기 제2 분할 단계는 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할을 수행하고, 상기 분할 대상 블록이 상기 쿼드 트리 분할이 가능하지 않은 크기인 경우, 상기 제2 분할 단계는 상기 분할 대상 블록에 대해 상기 이진 트리 분할을 수행할 수 있다.In the image decoding method according to the present invention, if the target block for division is of a size that allows quad-tree division, the second division step may perform the quad-tree division on the target block for division, and if the target block for division is of a size that does not allow quad-tree division, the second division step may perform the binary tree division on the target block for division.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할 또는 상기 이진 트리 분할이 수행된 경우, 상기 분할 대상 블록이 쿼드 트리 분할되는지의 여부를 나타내는 제1 분할 정보 또는 상기 분할 대상 블록이 이진 트리 분할되는지의 여부를 나타내는 제2 분할 정보는 비트스트림으로부터 복호화되지 않고, 소정의 값으로 유도될 수 있다.In the image decoding method according to the present invention, when the quad tree division or the binary tree division is performed on the division target block in the second division step, the first division information indicating whether the division target block is divided into a quad tree or the second division information indicating whether the division target block is divided into a binary tree may be derived as a predetermined value without being decoded from the bitstream.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 이진 트리 분할이 수행된 경우, 상기 이진 트리 분할의 분할 방향은, 상기 분할 대상 블록에 포함되고 동시에 상기 현재 영상의 경계 내의 영역인 복호화 대상 블록의 형태에 기초하여 결정될 수 있다.In the image decoding method according to the present invention, when the binary tree division is performed on the division target block in the second division step, the division direction of the binary tree division can be determined based on the shape of the decoding target block which is included in the division target block and is also an area within the boundary of the current image.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 이진 트리 분할이 수행된 경우, 상기 이진 트리 분할의 분할 방향을 나타내는 분할 방향 정보는 비트스트림으로부터 복호화되지 않고, 소정의 값으로 유도될 수 있다.In the image decoding method according to the present invention, when the binary tree division is performed on the division target block in the second division step, division direction information indicating the division direction of the binary tree division may be derived as a predetermined value without being decoded from the bitstream.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 제2 분할 단계는, 상기 분할 대상 블록에 포함되고 동시에 상기 현재 영상의 경계 밖의 영역인 남은 영역의 크기와 소정의 임계값을 비교하는 단계를 더 포함하고, 상기 비교 결과에 기초하여, 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할 및 상기 이진 트리 분할 중 하나를 수행할 수 있다.In the image decoding method according to the present invention, the second division step further includes a step of comparing the size of a remaining area, which is included in the division target block and is simultaneously an area outside the boundary of the current image, with a predetermined threshold value, and based on the comparison result, one of the quad tree division and the binary tree division can be performed on the division target block.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 남은 영역의 크기는 상기 남은 영역의 가로 길이 및 세로 길이 중 작은 쪽이고, 상기 제2 분할 단계는, 상기 남은 영역의 크기가 상기 소정의 임계값보다 큰 경우, 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할을 수행하고, 상기 남은 영역의 크기가 상기 소정의 임계값보다 작은 경우, 상기 분할 대상 블록에 대해 상기 이진 트리 분할을 수행할 수 있다.In the image decoding method according to the present invention, the size of the remaining region is a smaller one of the horizontal length and the vertical length of the remaining region, and in the second division step, if the size of the remaining region is greater than the predetermined threshold value, the quad tree division can be performed on the division target block, and if the size of the remaining region is less than the predetermined threshold value, the binary tree division can be performed on the division target block.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 제2 분할 단계는, 상기 분할 대상 블록에 대해 이진 트리 분할을 수행하는 단계이고, 상기 이진 트리 분할의 분할 방향은, 상기 분할 대상 블록에 포함되고 동시에 상기 현재 영상의 경계 밖의 영역인 남은 영역의 형태에 기초하여 결정될 수 있다.In the image decoding method according to the present invention, the second division step is a step of performing binary tree division on the division target block, and the division direction of the binary tree division can be determined based on the shape of a remaining area that is included in the division target block and is also an area outside the boundary of the current image.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 이진 트리 분할의 분할 방향은, 상기 남은 영역의 형태가 세로로 긴 블록인 경우, 세로 방향이고, 상기 남은 영역의 형태가 가로로 긴 블록인 경우, 가로 방향일 수 있다.In the image decoding method according to the present invention, the division direction of the binary tree division may be a vertical direction when the shape of the remaining region is a vertically long block, and may be a horizontal direction when the shape of the remaining region is a horizontally long block.

본 발명에 따른 컴퓨터 판독 가능한 기록 매체는, 본 발명에 따른 영상 부호화 방법에 의해 생성된 비트스트림을 저장할 수 있다.A computer-readable recording medium according to the present invention can store a bitstream generated by an image encoding method according to the present invention.

본 발명에 따르면, 영상의 부호화/복호화에 있어서, 블록 단위로 영상의 크기를 맞추기 위한 패딩 방법 및 장치가 제공될 수 있다. According to the present invention, a padding method and device for adjusting the size of an image in block units in image encoding/decoding can be provided.

또한, 본 발명에 따르면, 영상의 부호화/복호화에 있어서, 영상 경계 처리에 효율적인 블록 분할 방법 및 장치가 제공될 수 있다.In addition, according to the present invention, a block division method and device that are efficient for image boundary processing in image encoding/decoding can be provided.

또한, 본 발명에 따르면, 본 발명에 따른 영상 부호화 방법/장치에 의해 생성된 비트스트림을 저장하는 컴퓨터 판독 가능한 기록 매체를 제공될 수 있다.In addition, according to the present invention, a computer-readable recording medium storing a bitstream generated by an image encoding method/device according to the present invention can be provided.

본 발명에 따른 패딩 방법 및 장치 또는 블록 분할 방법 및 장치를 이용하여 영상의 압축 효율을 향상시킬 수 있다.The compression efficiency of an image can be improved by using the padding method and device or the block division method and device according to the present invention.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치를 간략하게 나타낸 블록 구성도이다.
도 2는 영상 부호화/복호화 장치에 정의된 화면 내 예측 모드의 종류를 도시한 것이다.
도 3은 평면 모드에 기반한 화면 내 예측 방법을 도시한 것이다.
도 4는 화면 내 예측을 위한 참조 화소를 도시한 것이다.
도 5는 수평 모드와 수직 모드에 기반한 화면 내 예측 방법을 도시한 것이다.
도 6은 본 발명의 일 실시예에 따른 영상 복호화 장치를 간략하게 나타낸 블록 구성도이다.
도 7은 본 발명의 일 실시예에 따른 패딩 과정을 설명하기 위한 도면이다.
도 8a 및 8b는 본 발명에 따른 패딩 과정을 설명하기 위한 도면이다.
도 9는 도 1의 영상 분할부(101)의 동작을 설명하기 위한 도면이다.
도 10은 본 발명에 따른 복호화기에서의 동작을 설명하기 위한 도면이다.
도 11은 현재 영상의 크기가 최대 블록의 크기의 배수가 아닌 경우를 예시적으로 도시한 도면이다.
도 12a 내지 도 12e는 본 발명에 일 실시예 따른 영상 분할 방법을 설명하기 위한 예시도이다.
도 13a 내지 도 13e는 본 발명에 다른 실시예 따른 영상 분할 방법을 설명하기 위한 예시도이다.
FIG. 1 is a block diagram briefly illustrating an image encoding device according to one embodiment of the present invention.
Figure 2 illustrates the types of intra-screen prediction modes defined in a video encoding/decoding device.
Figure 3 illustrates an on-screen prediction method based on planar mode.
Figure 4 illustrates reference pixels for on-screen prediction.
Figure 5 illustrates an on-screen prediction method based on horizontal and vertical modes.
FIG. 6 is a block diagram briefly illustrating an image decoding device according to one embodiment of the present invention.
Figure 7 is a drawing for explaining a padding process according to one embodiment of the present invention.
Figures 8a and 8b are drawings for explaining a padding process according to the present invention.
Figure 9 is a drawing for explaining the operation of the image segmentation unit (101) of Figure 1.
Figure 10 is a drawing for explaining the operation of a decoder according to the present invention.
Figure 11 is an example diagram illustrating a case where the size of the current image is not a multiple of the size of the maximum block.
FIGS. 12a to 12e are exemplary diagrams for explaining an image segmentation method according to one embodiment of the present invention.
FIGS. 13a to 13e are exemplary diagrams for explaining an image segmentation method according to another embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.The present invention can be modified in various ways and has various embodiments, and specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, but should be understood to include all modifications, equivalents, or substitutes included in the spirit and technical scope of the present invention. In describing each drawing, similar reference numerals are used for similar components.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.The terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are only used to distinguish one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. The term and/or includes a combination of a plurality of related described items or any one of a plurality of related described items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When it is said that a component is "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components in between. On the other hand, when it is said that a component is "directly connected" or "directly connected" to another component, it should be understood that there are no other components in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprises" or "has" and the like are intended to specify the presence of a feature, number, step, operation, component, part or combination thereof described in the specification, but do not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts or combinations thereof.

이하, 첨부한 도면들을 참조하여, 본 발명의 실시예들을 상세하게 설명한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the attached drawings. Hereinafter, the same reference numerals are used for the same components in the drawings, and duplicate descriptions of the same components are omitted.

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.FIG. 1 is a block diagram showing an image encoding device according to an embodiment of the present invention.

도 1을 참조하면, 영상 부호화 장치(100)는 영상 분할부(101),화면 내 예측부(102), 화면 간 예측부(103), 감산부(104), 변환부(105), 양자화부(106), 엔트로피 부호화부(107), 역양자화부(108), 역변환부(109), 증산부(110), 필터부(111) 및 메모리(112)를 포함할 수 있다.Referring to FIG. 1, an image encoding device (100) may include an image segmentation unit (101), an intra-screen prediction unit (102), an inter-screen prediction unit (103), a subtraction unit (104), a transformation unit (105), a quantization unit (106), an entropy encoding unit (107), an inverse quantization unit (108), an inverse transformation unit (109), an increase unit (110), a filter unit (111), and a memory (112).

도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.Each component shown in FIG. 1 is independently depicted to indicate different characteristic functions in the image encoding device, and does not mean that each component is composed of separate hardware or a single software configuration unit. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or one component may be divided into multiple components to perform a function, and such integrated and separated embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.

또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.In addition, some components may not be essential components that perform essential functions in the present invention, but may be optional components that are merely used to improve performance. The present invention may be implemented by including only essential components for implementing the essence of the present invention, excluding components that are merely used to improve performance, and a structure that includes only essential components, excluding optional components that are merely used to improve performance, is also included in the scope of the present invention.

영상 분할부(100)는 입력된 영상을 적어도 하나의 블록으로 분할할 수 있다. 이 때, 입력된 영상은 픽처, 슬라이스, 타일, 세그먼트 등 다양한 형태와 크기를 가질 수 있다. 블록은 부호화 단위(CU), 예측 단위(PU) 또는 변환 단위(TU)를 의미할 수 있다. 상기 분할은 쿼드 트리(Quadtree) 또는 바이너리 트리(Biniary tree) 중 적어도 하나에 기반하여 수행될 수 있다. 쿼드 트리는 상위 블록을 너비와 높이가 상위 블록의 절반인 하위 블록으로 사분할하는 방식이다. 바이너리 트리는 상위 블록을 너비 또는 높이 중 어느 하나가 상위 블록의 절반인 하위 블록으로 이분할하는 방식이다. 전술한 바이너리 트리 기반의 분할을 통해, 블록은 정방형뿐만 아니라 비정방형의 형태를 가질 수 있다.The image segmentation unit (100) can segment an input image into at least one block. At this time, the input image can have various shapes and sizes such as pictures, slices, tiles, and segments. The block can mean a coding unit (CU), a prediction unit (PU), or a transformation unit (TU). The segmentation can be performed based on at least one of a quadtree or a binary tree. A quadtree is a method of dividing an upper block into four lower blocks whose width and height are half of those of the upper block. A binary tree is a method of dividing an upper block into lower blocks whose width or height is half of that of the upper block. Through the aforementioned binary tree-based segmentation, a block can have a non-square shape as well as a square shape.

이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.Hereinafter, in the embodiments of the present invention, the encoding unit may be used to mean a unit that performs encoding, or may be used to mean a unit that performs decoding.

예측부(102, 103)는 인터 예측을 수행하는 화면 간 예측부(103)와 인트라 예측을 수행하는 화면 내 예측부(102)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다.The prediction unit (102, 103) may include an inter-prediction unit (103) that performs inter-prediction and an intra-prediction unit (102) that performs intra-prediction. It may be determined whether to use inter-prediction or intra-prediction for a prediction unit, and specific information (e.g., intra-prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. At this time, the processing unit where the prediction is performed and the processing unit where the prediction method and specific contents are determined may be different. For example, the prediction method and the prediction mode, etc. may be determined in the prediction unit, and the prediction may be performed in the transformation unit.

생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(105)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(107)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(102, 103)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The residual value (residual block) between the generated prediction block and the original block can be input to the transformation unit (105). In addition, the prediction mode information, motion vector information, etc. used for prediction can be encoded by the entropy encoding unit (107) together with the residual value and transmitted to the decoder. When a specific encoding mode is used, it is also possible to encode the original block as it is and transmit it to the decoder without generating the prediction block through the prediction unit (102, 103).

화면 내 예측부(102)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 블록을 생성할 수 있다. 인트라 예측이 수행될 현재 블록의 주변 블록의 예측 모드가 인터 예측인 경우, 인터 예측이 적용된 주변 블록에 포함되는 참조 픽셀을, 인트라 예측이 적용된 주변의 다른 블록 내의 참조 픽셀로 대체될 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를, 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The prediction unit (102) within the screen can generate a prediction block based on reference pixel information surrounding the current block, which is pixel information within the current picture. If the prediction mode of a block surrounding the current block on which intra prediction is to be performed is inter prediction, a reference pixel included in a block surrounding the current block to which inter prediction is applied can be replaced with a reference pixel within another block surrounding the current block to which intra prediction is applied. That is, if a reference pixel is not available, the unavailable reference pixel information can be replaced with at least one reference pixel among the available reference pixels and used.

인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra prediction, the prediction mode can have a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use directional information when performing prediction. The mode for predicting luminance information and the mode for predicting chrominance information can be different, and the intra prediction mode information used for predicting luminance information or the predicted luminance signal information can be utilized to predict chrominance information.

화면 내 예측부(102)는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The prediction unit (102) within the screen may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a filter that performs filtering on the reference pixels of the current block and can adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.

화면 내 예측부(102)의 참조 화소 보간부는 예측 단위의 인트라 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 분수 단위 위치의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.The reference pixel interpolation unit of the prediction unit (102) within the screen can interpolate the reference pixel to generate a reference pixel at a fractional unit position when the intra prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value interpolated from the reference pixel. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.

예측부(102, 103)에서 생성된 예측 단위와 예측 단위의 원본 블록 간의 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력되어 변환될 수 있다. A residual block including residual value information, which is a difference value between a prediction unit generated in a prediction unit (102, 103) and an original block of the prediction unit, can be generated. The generated residual block can be input to a transformation unit (130) and transformed.

도 2는 인트라 예측 모드의 일 예를 설명하기 위한 도면이다. 도 2에 도시된 인트라 예측 모드는 총 35가지의 모드를 가지고 있다. 0번 모드는 평면 모드(Planar mode), 1번 모드는 DC 모드, 2 내지 34번 모드는 각도 모드(Angular mode)를 나타낸다. Fig. 2 is a diagram for explaining an example of an intra prediction mode. The intra prediction mode illustrated in Fig. 2 has a total of 35 modes. Mode 0 represents a planar mode, mode 1 represents a DC mode, and modes 2 to 34 represent angular modes.

도 3은 평면 모드의 화면 내 예측을 설명하기 위한 도면이다. Figure 3 is a drawing for explaining on-screen prediction in flat mode.

도 3은 평면 모드를 설명하기 위한 도면이다. 현재 블록 내의 첫 번째 화소 P1의 예측값을 생성하기 위해 Y축으로 같은 위치에 있는 복원된 화소와 현재 블록의 우측 상단에 존재하는 복원된 화소 T를 도시된 바와 같이 선형 보간 하여 생성한다. 마찬가지로 두 번째 화소 P2의 예측값을 생성하기 위해 X축으로 같은 위치에 있는 복원된 화소와 현재 블록의 좌측 하단에 존재하는 복원된 화소 L을 도시된 바와 같이 선형 보간 하여 생성한다. 두 개의 예측 화소 P1과 P2를 평균한 값이 최종적인 예측 화소가 된다. 평면 모드에서는 위와 같은 방식으로 예측 화소들을 유도하여 현재 블록의 예측 블록을 생성한다. FIG. 3 is a diagram for explaining the planar mode. In order to generate a prediction value of the first pixel P1 in the current block, the restored pixel T located at the upper right of the current block and the restored pixel at the same position in the Y-axis are linearly interpolated to generate the prediction value, as illustrated. Similarly, in order to generate a prediction value of the second pixel P2, the restored pixel at the same position in the X-axis and the restored pixel L located at the lower left of the current block are linearly interpolated to generate the prediction value, as illustrated. The average value of the two prediction pixels P1 and P2 becomes the final prediction pixel. In the planar mode, the prediction pixels are derived in the same manner as above to generate the prediction block of the current block.

도 4는 DC 모드를 설명하기 위한 도면이다. 현재 블록 주변의 복원된 화소들의 평균을 계산한 다음, 그 평균 값을 현재 블록 내의 모든 화소들의 예측값으로 이용한다.Figure 4 is a diagram for explaining the DC mode. The average of the restored pixels around the current block is calculated, and then the average value is used as the predicted value of all pixels in the current block.

도 5는 도 2의 10번 모드(수평 모드)와 26번 모드(수직 모드)를 이용하여 예측 블록을 생성하는 일 예를 설명하기 위한 도면이다. 10번 모드를 이용하는 경우, 현재 블록의 좌측에 접하는 각 참조화소를 오른쪽 방향으로 복사하여 현재 블록의 예측 블록을 생성한다. 마찬가지로 26번 모드는, 현재 블록의 상측에 접하는 각 참조 화소를 아래쪽 방향으로 복사하여 현재 블록의 예측 블록을 생성한다.Fig. 5 is a diagram for explaining an example of generating a prediction block using mode 10 (horizontal mode) and mode 26 (vertical mode) of Fig. 2. When mode 10 is used, each reference pixel bordering the left side of the current block is copied in the right direction to generate a prediction block of the current block. Similarly, mode 26 generates a prediction block of the current block by copying each reference pixel bordering the upper side of the current block in the downward direction.

다시 도 1을 참조하면, 화면 간 예측부(103)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 화면 간 예측부(103)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다. Referring back to FIG. 1, the inter-screen prediction unit (103) may predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of a portion of an encoded region within the current picture. The inter-screen prediction unit (103) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

참조 픽쳐 보간부에서는 메모리(112)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.The reference picture interpolation unit can receive reference picture information from the memory (112) and generate pixel information below an integer pixel from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients can be used to generate pixel information below an integer pixel in units of 1/4 pixels. In the case of a chrominance signal, a DCT-based 4-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients can be used to generate pixel information below an integer pixel in units of 1/8 pixels.

모션 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터값을 가질 수 있다. 모션 예측부에서는 모션 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 모션 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법 등 다양한 방법이 사용될 수 있다.The motion prediction unit can perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit. Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used to derive a motion vector. The motion vector can have a motion vector value of 1/2 or 1/4 pixel units based on the interpolated pixel. The motion prediction unit can predict the current prediction unit by using a different motion prediction method. Various methods such as the Skip method, the Merge method, and the AMVP (Advanced Motion Vector Prediction) method can be used as the motion prediction method.

감산부(104)는, 현재 부호화하려는 블록과 화면 내 예측부(102) 혹은 화면 간 예측부(103)에서 생성된 예측 블록을 감산하여 현재 블록의 잔차 블록을 생성한다.The subtraction unit (104) subtracts the block currently to be encoded from the prediction block generated from the intra-screen prediction unit (102) or inter-screen prediction unit (103) to generate a residual block of the current block.

변환부(105)에서는 잔차 데이터를 포함한 잔차 블록을 DCT, DST, KLT(Karhunen Loeve Transform) 등과 같은 변환 방법을 사용하여 변환시킬 수 있다. 이때 변환 방법은 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드에 기반하여 결정될 수 있다. 예를 들어, 인트라 예측 모드에 따라, 가로 방향으로는 DCT를 사용하고, 세로 방향으로는 DST를 사용할 수도 있다.In the transformation unit (105), the residual block including the residual data can be transformed using a transformation method such as DCT, DST, KLT (Karhunen Loeve Transform), etc. At this time, the transformation method can be determined based on the intra prediction mode of the prediction unit used to generate the residual block. For example, depending on the intra prediction mode, DCT may be used in the horizontal direction and DST may be used in the vertical direction.

양자화부(106)는 변환부(105)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(106)에서 산출된 값은 역양자화부(108)와 엔트로피 부호화부(107)에 제공될 수 있다.The quantization unit (106) can quantize the values converted to the frequency domain in the transformation unit (105). The quantization coefficients can vary depending on the block or the importance of the image. The values produced by the quantization unit (106) can be provided to the dequantization unit (108) and the entropy encoding unit (107).

상기 변환부(105) 및/또는 양자화부(106)는, 영상 부호화 장치(100)에 선택적으로 포함될 수 있다. 즉, 영상 부호화 장치(100)는, 잔차 블록의 잔차 데이터에 대해 변환 또는 양자화 중 적어도 하나를 수행하거나, 변환 및 양자화를 모두 스킵하여 잔차 블록을 부호화할 수 있다. 영상 부호화 장치(100)에서 변환 또는 양자화 중 어느 하나가 수행되지 않거나, 변환 및 양자화 모두 수행되지 않더라도, 엔트로피 부호화부(107)의 입력으로 들어가는 블록을 통상적으로 변환 블록이라 일컫는다. The above transformation unit (105) and/or quantization unit (106) may be optionally included in the image encoding device (100). That is, the image encoding device (100) may encode the residual block by performing at least one of transformation or quantization on the residual data of the residual block, or skipping both transformation and quantization. Even if neither transformation nor quantization is performed in the image encoding device (100), a block that enters the input of the entropy encoding unit (107) is typically referred to as a transformation block.

엔트로피 부호화부(107)는 입력 데이터를 엔트로피 부호화한다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.The entropy encoding unit (107) entropy encodes the input data. Entropy encoding can use various encoding methods such as, for example, Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding).

엔트로피 부호화부(107)는 예측부(102, 103)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. 엔트로피 부호화부(107)에서, 변환 블록의 계수는, 변환 블록 내 부분 블록 단위로, 0이 아닌 계수, 절대값이 1 또는 2보다 큰 계수, 그리고 계수의 부호 등을 나타내는 여러 종류의 플래그를 부호화될 수 있다. 상기 플래그만으로 부호화되지 않는 계수는, 플래그를 통해 부호화된 계수와 실제 변환 블록의 계수 간의 차이의 절대값을 통해 부호화될 수 있다. 역양자화부(108) 및 역변환부(109)에서는 양자화부(106)에서 양자화된 값들을 역양자화하고 변환부(105)에서 변환된 값들을 역변환한다. 역양자화부(108) 및 역변환부(109)에서 생성된 잔차값(Residual)은 예측부(102, 103)에 포함된 움직임 추정부, 움직임 보상부 및 화면 내 예측부(102)를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. 증산기(110)는, 예측부(102, 103)에서 생성된 예측 블록과, 역 변환부(109)를 통해 생성된 잔차 블록을 증산하여 복원 블록을 생성한다.The entropy encoding unit (107) can encode various information such as residual value coefficient information of an encoding unit and block type information, prediction mode information, division unit information, prediction unit information and transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information from the prediction units (102, 103). In the entropy encoding unit (107), the coefficients of a transform block can encode various types of flags indicating, for each partial block within the transform block, a non-zero coefficient, a coefficient whose absolute value is greater than 1 or 2, and the sign of the coefficient. A coefficient that is not encoded by the flag alone can be encoded by the absolute value of the difference between the coefficient encoded by the flag and the coefficient of the actual transform block. The inverse quantization unit (108) and the inverse transform unit (109) inverse quantize the values quantized by the quantization unit (106) and inverse transform the values transformed by the transform unit (105). The residual value generated from the inverse quantization unit (108) and the inverse transformation unit (109) can be combined with the predicted unit predicted through the motion estimation unit, motion compensation unit, and the in-screen prediction unit (102) included in the prediction unit (102, 103) to generate a reconstructed block. The multiplier (110) multiplies the predicted block generated from the prediction unit (102, 103) and the residual block generated through the inverse transformation unit (109) to generate a reconstructed block.

필터부(111)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.The filter unit (111) may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).

디블록킹 필터는 복원된 픽쳐에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.A deblocking filter can remove block distortion caused by boundaries between blocks in a restored picture. In order to determine whether to perform deblocking, it is possible to determine whether to apply a deblocking filter to the current block based on pixels included in several columns or rows included in the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied depending on the required deblocking filtering strength. In addition, when applying a deblocking filter, horizontal filtering and vertical filtering can be processed in parallel when performing vertical filtering and horizontal filtering.

오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correction unit can correct the offset from the original image on a pixel basis for the image on which deblocking has been performed. In order to perform offset correction for a specific picture, a method can be used in which the pixels included in the image are divided into a certain number of regions, the regions to be offset are determined, and the offset is applied to the regions, or a method can be used in which the offset is applied by considering the edge information of each pixel.

ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. Adaptive Loop Filtering (ALF) can be performed based on the value compared between the filtered restored image and the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the group is determined, and filtering can be performed differentially for each group. Information related to whether to apply ALF can be transmitted by luminance signal for each coding unit (CU), and the shape and filter coefficient of the ALF filter to be applied can be different for each block. In addition, the same shape (fixed shape) of the ALF filter can be applied regardless of the characteristics of the target block.

메모리(112)는 필터부(111)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 인터 예측을 수행 시 예측부(102, 103)에 제공될 수 있다.The memory (112) can store a restored block or picture produced through the filter unit (111), and the stored restored block or picture can be provided to the prediction unit (102, 103) when performing inter prediction.

도 6은 본 발명의 일 실시예에 따른 영상 복호화 장치(600)를 나타낸 블록도이다. FIG. 6 is a block diagram showing an image decoding device (600) according to one embodiment of the present invention.

도 6을 참조하면, 영상 복호화 장치(600)는 엔트로피 복호화부(601), 역양자화부(602), 역변환부(603), 증산부(604), 필터부(605), 메모리(606) 및 예측부(607, 608)를 포함할 수 있다.Referring to FIG. 6, the image decoding device (600) may include an entropy decoding unit (601), an inverse quantization unit (602), an inverse transformation unit (603), an amplification unit (604), a filter unit (605), a memory (606), and a prediction unit (607, 608).

영상 부호화 장치(100)에 의해 생성된 영상 비트스트림이 영상 복호화 장치(600)로 입력되는 경우, 입력된 비트스트림은 영상 부호화 장치(100)에서 수행된 과정과 반대의 과정에 따라 복호될 수 있다.When an image bitstream generated by an image encoding device (100) is input to an image decoding device (600), the input bitstream can be decoded according to a process opposite to the process performed in the image encoding device (100).

엔트로피 복호화부(601)는 영상 부호화 장치(100)의 엔트로피 부호화부(107)에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. 엔트로피 복호화부(601)에서, 변환 블록의 계수는, 변환 블록 내 부분 블록 단위로, 0이 아닌 계수, 절대값이 1 또는 2보다 큰 계수, 그리고 계수의 부호 등을 나타내는 여러 종류의 플래그를 기반으로 복호화될 수 있다. 상기 플래그만으로 표현되지 않는 계수는, 플래그를 통해 표현되는 계수와 시그날링된 계수의 합을 통해 복호화될 수 있다.The entropy decoding unit (601) can perform entropy decoding in a procedure opposite to that of the entropy encoding unit (107) of the video encoding device (100). For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) can be applied corresponding to the method performed in the video encoder. In the entropy decoding unit (601), the coefficients of the transform block can be decoded based on various types of flags indicating, for each partial block within the transform block, a coefficient that is not 0, a coefficient whose absolute value is greater than 1 or 2, and the sign of the coefficient. A coefficient that is not expressed by the flag alone can be decoded by the sum of the coefficient expressed by the flag and the signaled coefficient.

엔트로피 복호화부(601)에서는 부호화기에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.역 양자화부(602)는 양자화된 변환 블록에 역 양자화를 수행하여 변환 블록을 생성한다. 도 1의 역 양자화부(108)와 실질적으로 동일하게 동작한다.The entropy decoding unit (601) can decode information related to intra prediction and inter prediction performed in the encoder. The inverse quantization unit (602) performs inverse quantization on a quantized transform block to generate a transform block. It operates substantially the same as the inverse quantization unit (108) of Fig. 1.

역 변환부(603)은 변환 블록에 역 변환을 수행하여 잔차 블록을 생성한다. 이때, 변환 방법은 예측 방법(인터 또는 인트라 예측), 블록의 크기 및/또는 형태, 인트라 예측 모드 등에 관한 정보를 기반으로 결정될 수 있다. 도 1의 역 변환부(109)와 실질적으로 동일하게 동작한다. The inverse transform unit (603) performs an inverse transform on the transform block to generate a residual block. At this time, the transform method can be determined based on information about the prediction method (inter or intra prediction), the size and/or shape of the block, the intra prediction mode, etc. It operates substantially the same as the inverse transform unit (109) of Fig. 1.

증산부(604)는, 화면 내 예측부(607) 혹은 화면 간 예측부(608)에서 생성된 예측 블록과 역 변환부(603)를 통해 생성된 잔차 블록를 증산하여 복원 블록을 생성한다. 도 1의 증산부(110)과 실질적으로 동일하게 동작한다.The multiplication unit (604) multiplies the prediction block generated from the intra-screen prediction unit (607) or inter-screen prediction unit (608) and the residual block generated through the inverse transformation unit (603) to generate a restored block. It operates substantially the same as the multiplication unit (110) of Fig. 1.

필터부(605)는, 복원된 블록들에 발생하는 여러 종류의 노이즈를 감소시킨다.The filter unit (605) reduces various types of noise occurring in restored blocks.

필터부(605)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The filter unit (605) may include a deblocking filter, an offset correction unit, and an ALF.

영상 부호화 장치(100)로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화 장치(600)의 디블록킹 필터에서는 영상 부호화 장치(100)에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화 장치(600)에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. Information on whether a deblocking filter has been applied to a corresponding block or picture from a video encoding device (100) and, if a deblocking filter has been applied, information on whether a strong filter or a weak filter has been applied can be provided. The deblocking filter of the video decoding device (600) can receive information related to the deblocking filter provided from the video encoding device (100) and perform deblocking filtering on the corresponding block in the video decoding device (600).

오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.The offset correction unit can perform offset correction on the restored image based on information such as the type of offset correction applied to the image during encoding and the offset value.

ALF는 영상 부호화 장치(100)로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라미터 셋에 포함되어 제공될 수 있다. 필터부(605)는 도 1의 필터부(111)와 실질적으로 동일하게 동작한다.ALF can be applied to an encoding unit based on ALF application information, ALF coefficient information, etc. provided from a video encoding device (100). This ALF information can be provided while being included in a specific parameter set. The filter unit (605) operates substantially the same as the filter unit (111) of Fig. 1.

메모리(606)는 증산부(604)에 의해 생성된 복원 블록을 저장한다. 도 1의 메모리(112)와 실질적으로 동일하게 동작한다.Memory (606) stores the recovery block generated by the increase unit (604). It operates substantially the same as memory (112) of Fig. 1.

예측부(607, 608)는 엔트로피 복호화부(601)에서 제공된 예측 블록 생성 관련 정보와 메모리(606)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다. The prediction unit (607, 608) can generate a prediction block based on prediction block generation related information provided from the entropy decoding unit (601) and previously decoded block or picture information provided from the memory (606).

예측부(607, 608)는 화면 내 예측부(607) 및 화면 간 예측부(608)를 포함할 수 있다. 별도로 도시되지는 아니하였으나, 예측부(607, 608)는 예측 단위 판별부를 더 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(601)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 화면 간 예측부(608)는 영상 부호화 장치(100)에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.The prediction unit (607, 608) may include an intra-screen prediction unit (607) and an inter-screen prediction unit (608). Although not illustrated separately, the prediction unit (607, 608) may further include a prediction unit determination unit. The prediction unit determination unit may receive various information such as prediction unit information input from the entropy decoding unit (601), prediction mode information of an intra-prediction method, and motion prediction-related information of an inter-prediction method, and may distinguish a prediction unit from a current encoding unit and determine whether the prediction unit performs inter-prediction or intra-prediction. The inter-screen prediction unit (608) may perform inter-prediction on a current prediction unit based on information included in at least one of a previous picture or a subsequent picture of a current picture including the current prediction unit, by using information necessary for inter-prediction of the current prediction unit provided from the video encoding device (100). Alternatively, inter prediction can be performed based on information from some previously-reconstructed region within the current picture containing the current prediction unit.

화면 간 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode) 중 어떠한 방법인지 여부를 판단할 수 있다.In order to perform inter-screen prediction, it is possible to determine whether the motion prediction method of the prediction unit included in the encoding unit is Skip Mode, Merge Mode, or AMVP Mode based on the encoding unit.

화면 내 예측부(607)는, 현재 부호화하려는 블록 주변에 위치한, 그리고 기 복원된 화소들을 이용하여 예측 블록을 생성한다. The prediction unit (607) within the screen generates a prediction block using pixels located around the block to be currently encoded and previously restored.

화면 내 예측부(607)는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 영상 부호화 장치(100)에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The prediction unit (607) within the screen may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a filter that performs filtering on the reference pixels of the current block and may adaptively determine whether to apply the filter according to the prediction mode of the current prediction unit. The AIS filtering may be performed on the reference pixels of the current block using the prediction mode and AIS filter information of the prediction unit provided by the image encoding device (100). If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.

화면 내 예측부(607)의 참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 분수 단위 위치의 참조 화소를 생성할 수 있다. 생성된 분수 단위 위치의 참조 화소가 현재 블록 내의 화소의 예측 화소로 이용될 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.The reference pixel interpolation unit of the prediction unit (607) within the screen can interpolate the reference pixel to generate a reference pixel at a fractional unit position when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value interpolated from the reference pixel. The generated reference pixel at the fractional unit position can be used as a prediction pixel of a pixel in the current block. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.

화면 내 예측부(607)는 도 1의 화면 내 예측부(102)와 실질적으로 동일하게 동작한다.The on-screen prediction unit (607) operates substantially the same as the on-screen prediction unit (102) of Fig. 1.

화면 간 예측부(608)는, 메모리(606)에 저장된 참조 픽처, 움직임 정보를 이용하여 인터 예측 블록을 생성한다. 화면 간 예측부(608)는 도 1의 화면 간 예측부(103)와 실질적으로 동일하게 동작한다.The inter-screen prediction unit (608) generates an inter-prediction block using reference pictures and motion information stored in the memory (606). The inter-screen prediction unit (608) operates substantially the same as the inter-screen prediction unit (103) of Fig. 1.

본 발명은, 특히 패딩 및 영상의 경계 처리에 관한 것으로서, 이하에 본 발명의 다양한 실시예들을 도면들을 참조하면서 보다 상세하게 설명한다.The present invention relates particularly to padding and image boundary processing, and various embodiments of the present invention will be described in more detail below with reference to the drawings.

본 발명의 일 실시예에 따르면, 부호화 대상 영상이 도 1의 영상 분할부(101)에 입력되기 전에 전처리 과정이 수행될 수 있다. 부호화 대상 영상은 화소 단위의 다양한 가로 및 세로 크기를 가질 수 있다. 그러나, 영상의 부호화 및 복호화는 화소 단위가 아닌 임의의 블록 단위로 수행되기 때문에, 부호화 대상 영상의 크기를 블록 단위로 맞추기 위한 패딩 과정이 필요할 수 있다. According to one embodiment of the present invention, a preprocessing process may be performed before the image to be encoded is input to the image segmentation unit (101) of Fig. 1. The image to be encoded may have various horizontal and vertical sizes in pixel units. However, since encoding and decoding of the image are performed in arbitrary block units rather than pixel units, a padding process may be required to match the size of the image to be encoded in block units.

도 7은 본 발명의 일 실시예에 따른 패딩 과정을 설명하기 위한 도면이다.Figure 7 is a drawing for explaining a padding process according to one embodiment of the present invention.

도 7에 도시된 예에서, 부호화 대상 영상은 블록 영역과 비블록 영역을 포함한다. 상기 부호화 대상 영상에 대해 상기 전처리 과정이 수행됨으로써, 패딩된 영역이 추가될 수 있다. 패딩된 영역이 추가된 상기 부호화 대상 영상은 도 1의 영상 분할부(101)에 입력될 수 있다. In the example illustrated in Fig. 7, the target image to be encoded includes a block region and a non-block region. By performing the above preprocessing process on the target image to be encoded, a padded region can be added. The target image to which the padded region has been added can be input to the image segmentation unit (101) of Fig. 1.

도 7에 도시된 예에서, 최소 블록의 단위는 4x4일 수 있다. 블록의 가로 또는 세로의 길이는 2n일 수 있다. 따라서, 예를 들어, 부호화 대상 영상의 가로 및 세로의 길이가 각각 9인 경우, 상기 부호화 대상 영상의 우측 1열 및 하단 1행은 블록 영역에 포함되지 않는 비블록 영역이 될 수 있다. 이와 같이, 부호화 대상 영상이 비블록 영역을 포함하는 경우, 상기 최소 블록의 크기를 고려하여, 패딩을 수행할 수 있다. 이와 같이, 블록의 크기를 고려한 패딩을 수행함으로써, 패딩된 부호화 대상 영상은 비블록 영역을 포함하지 않게 된다. 패딩된 부호화 대상 영상은 도 1의 영상 분할부(101)에 입력되어 복수의 블록으로 분할됨으로써, 블록 단위의 부호화가 수행될 수 있다. In the example illustrated in FIG. 7, the unit of the minimum block may be 4x4. The horizontal or vertical length of the block may be 2 n . Therefore, for example, if the horizontal and vertical lengths of the image to be encoded are each 9, the right 1st column and the bottom 1st row of the image to be encoded may be a non-block area that is not included in the block area. In this way, if the image to be encoded includes a non-block area, padding may be performed considering the size of the minimum block. In this way, by performing padding considering the block size, the padded image to be encoded does not include a non-block area. The padded image to be encoded is input to the image segmentation unit (101) of FIG. 1 and is divided into a plurality of blocks, so that block-by-block encoding may be performed.

도 8a 및 8b는 본 발명에 따른 패딩 과정을 설명하기 위한 도면이다.Figures 8a and 8b are drawings for explaining a padding process according to the present invention.

먼저, 패딩해야할 화소에 가장 인접한 화소를 이용하여 가로 방향으로 패딩을 수행할 수 있다. 도 8a에 도시된 예에서, 가장 상단의 3개의 패딩 대상 화소는 좌측에 인접한 비블록 영역의 화소 A를 이용하여 패딩될 수 있다.First, padding can be performed in the horizontal direction using the pixels closest to the pixels to be padded. In the example shown in Fig. 8a, the top three padding target pixels can be padded using the pixels A in the non-block area adjacent to the left.

이후, 패딩해야할 화소에 가장 인접한 화소를 이용하여 세로 방향으로 패딩을 수행할 수 있다. 도 8b에 도시된 예에서, 가장 좌측의 3개의 패딩 대상 화소는 상단에 인접한 비블록 영역의 화소 I를 이용하여 패딩될 수 있다.Thereafter, padding can be performed in the vertical direction using the pixels closest to the pixels to be padded. In the example shown in Fig. 8b, the three leftmost padding target pixels can be padded using the pixels I of the non-block area adjacent to the top.

상기 예에서, 가로 방향에서 세로 방향으로의 패딩 과정을 설명하였으나, 이에 한정되지 않으며, 세로 방향에서 가로 방향으로의 패딩이 수행될 수도 있다. 상기 최소 블록의 크기는 도 9를 참조하여 설명할 블록 단위일 수도 있으며 서브 블록 단위일 수도 있다.In the above example, the padding process from the horizontal direction to the vertical direction has been described, but it is not limited thereto, and padding from the vertical direction to the horizontal direction may also be performed. The size of the minimum block may be a block unit as described with reference to Fig. 9, or may be a sub-block unit.

도 9는 도 1의 영상 분할부(101)의 동작을 설명하기 위한 도면이다.Figure 9 is a drawing for explaining the operation of the image segmentation unit (101) of Figure 1.

입력 영상은 복수의 최대 블록으로 분할될 수 있다. 최대 블록의 크기는 기설정되거나 비트스트림을 통해 시그널링될 수 있다. 예를 들어, 입력 영상의 크기는 128x128이고, 최대 블록의 크기는 64x64일 경우, 입력 영상은 4개의 최대 블록으로 분할될 수 있다. The input image can be divided into multiple maximum blocks. The size of the maximum block can be preset or signaled via the bitstream. For example, if the size of the input image is 128x128 and the size of the maximum block is 64x64, the input image can be divided into four maximum blocks.

각각의 최대 블록은 도 1의 영상 분할부(101)에 입력되어, 복수의 블록으로 분할될 수 있다. 입력 영상은 복수의 최대 블록으로 분할되지 않고, 곧바로 영상 분할부(101)에 입력될 수도 있다. 분할된 블록의 최소 크기 및/또는 서브 블록으로 분할될 수 있는 블록의 최대 크기는 기설정되거나, 블록의 상위 레벨의 헤더에서 시그널링될 수도 있다. 상기 상위 레벨은 비디오, 시퀀스, 픽쳐, 슬라이스, 타일, 촤대 부호화 유닛(LCU; Largest Coding Unit) 중 적어도 하나일 수 있다.Each maximum block can be input to the image segmentation unit (101) of Fig. 1 and divided into multiple blocks. The input image can be input directly to the image segmentation unit (101) without being divided into multiple maximum blocks. The minimum size of the divided block and/or the maximum size of the block that can be divided into sub-blocks can be preset or signaled in the header of the upper level of the block. The upper level can be at least one of video, sequence, picture, slice, tile, and largest coding unit (LCU).

현재 블록은 4개의 서브 블록으로 분할되거나 2개의 서브 블록으로 분할될 수 있다. The current block can be split into four sub-blocks or into two sub-blocks.

현재 블록이 4개의 서브 블록으로 분할되는 것을 쿼드 트리(quad-tree) 분할이라 할 수 있다. 현재 블록은 쿼드 트리 분할에 의해 동일한 크기를 갖는 4개의 서브 블록으로 분할될 수 있다. 제1 분할 정보는 현재 블록이 쿼드 트리 분할되는지의 여부를 나타내는 정보이다. 제1 분할 정보는 예컨대, 1비트의 플래그일 수 있다.The current block can be divided into four sub-blocks, which can be called a quad-tree division. The current block can be divided into four sub-blocks with the same size by a quad-tree division. The first division information is information indicating whether the current block is divided into a quad-tree. The first division information can be, for example, a 1-bit flag.

현재 블록이 2개의 서브 블록으로 분할되는 것을 이진 트리(binary-tree) 분할이라 할 수 있다. 현재 블록은 이진 트리 분할에 의해 동일하거나 상이한 크기를 갖는 2개의 서브 블록으로 분할될 수 있다. 제2 분할 정보는 현재 블록이 이진 트리 분할되는지의 여부를 나타내는 정보이다. 제2 분할 정보는 예컨대, 1비트의 플래그일 수 있다. 현재 블록이 이진 트리 분할되는 경우, 분할 방향 정보가 더 시그널링될 수 있다. 분할 방향 정보는 현재 블록의 분할이 가로 방향의 분할인지 세로 방향의 분할인지를 나타낼 수 있다. 분할 방향 정보는 예컨대, 1비트의 플래그일 수 있다. 현재 블록이 상이한 크기를 갖는 2개의 서브 블록으로 분할되는 경우, 분할 형태 정보가 더 시그널링될 수 있다. 분할 형태 정보는 2개의 서브 블록의 분할 비율을 나타낼 수 있다.The current block being split into two sub-blocks can be called a binary-tree split. The current block can be split into two sub-blocks having the same or different sizes by the binary-tree split. The second split information is information indicating whether the current block is split into a binary-tree split. The second split information can be, for example, a 1-bit flag. If the current block is split into a binary-tree split, split direction information can be further signaled. The split direction information can indicate whether the split of the current block is a horizontal split or a vertical split. The split direction information can be, for example, a 1-bit flag. If the current block is split into two sub-blocks having different sizes, split shape information can be further signaled. The split shape information can indicate a split ratio of the two sub-blocks.

현재 블록은 쿼드 트리 분할과 이진 트리 분할을 이용하여 재귀적으로 분할될 수 있다. 예컨대, 현재 블록이 4개의 서브 블록으로 쿼드 트리 분할되는 경우, 각각의 서브 블록은 재귀적으로 쿼드 트리 분할되거나, 이진 트리 분할되거나, 분할되지 않을 수 있다. 현재 블록이 2개의 서브 블록으로 이진 트리 분할되는 경우, 각각의 서브 블록은 재귀적으로 쿼드 트리 분할되거나, 이진 트리 분할되거나, 분할되지 않을 수 있다. 또는, 이진 트리 분할에 의해 생성된 서브 블록에 대해서는 쿼드 트리 분할이 수행되지 않을 수 있다. The current block can be recursively split using quad-tree splitting and binary-tree splitting. For example, if the current block is quad-tree split into four sub-blocks, each sub-block can be recursively quad-tree split, binary-tree split, or not split. If the current block is binary-tree split into two sub-blocks, each sub-block can be recursively quad-tree split, binary-tree split, or not split. Alternatively, quad-tree splitting may not be performed on sub-blocks generated by binary-tree splitting.

부호화기는 입력된 현재 블록에 대해 쿼드 트리 분할 여부를 결정할 수 있다. 상기 결정에 기초하여 제1 분할 정보를 부호화할 수 있다(S901). 현재 블록이 쿼드 트리 분할되는 경우(S902에서 Yes), 현재 블록은 4개의 블록으로 쿼드 트리 분할될 수 있다(S903). 쿼드 트리 분할에 의해 생성된 4개의 블록의 각각은 소정의 순서에 따라 단계 S901에 다시 입력될 수 있다(S904, S916). 상기 소정의 순서는 Z-스캔 순서일 수 있다. 단계 S904에서, 상기 4개의 블록 중 상기 소정의 순서에 따른 첫번째 블록이 특정되어, 단계 S901에 현재 블록으로서 입력될 수 있다.The encoder can determine whether or not to quad-tree-divide the input current block. Based on the determination, first division information can be encoded (S901). If the current block is quad-tree-divided (Yes in S902), the current block can be quad-tree-divided into four blocks (S903). Each of the four blocks generated by the quad-tree division can be re-input to step S901 according to a predetermined order (S904, S916). The predetermined order can be a Z-scan order. In step S904, a first block among the four blocks according to the predetermined order can be specified and input to step S901 as the current block.

현재 블록이 쿼드 트리 분할되지 않는 경우(S902에서 No), 부호화기는 현재 블록에 대해 이진 트리 분할 여부를 결정할 수 있다. 상기 결정에 기초하여 제2 분할 정보를 부호화할 수 있다(S905). 현재 블록이 이진 트리 분할되는 경우(S906에서 Yes), 부호화기는 현재 블록을 가로 분할할지 세로 분할할지를 결정하고, 상기 결정에 기초하여 분할 방향 정보를 부호화할 수 있다(S907). 현재 블록이 가로 분할되는 경우(S908에서 Yes), 현재 블록에 대한 가로 방향의 분할이 수행될 수 있다(S909). 그렇지 않은 경우(S908에서 No), 현재 블록에 대한 세로 방향의 분할이 수행될 수 있다(S910). 현재 블록에 대한 이진 트리 분할이 비대칭 분할인 경우, 분할 비율이 결정되어 분할 형태 정보가 더 부호화될 수 있다. 이 경우, 단계 S909 및 S910는 분할 형태 정보를 고려하여 수행될 수 있다. 이진 트리 분할에 의해 생성된 2개의 서브 블록의 각각은 소정의 순서에 따라 단계 S905에 다시 입력될 수 있다(S911, S914). 상기 소정의 순서는 좌측에서 우측, 또는 상단에서 하단일 수 있다. 단계 S911에서, 상기 2개의 서브 블록 중 상기 소정의 순서에 따른 첫번째 서브 블록이 특정되어, 단계 S905에 현재 블록으로서 입력될 수 있다. 이진 트리 분할에 의해 생성된 서브 블록에 대해 다시 쿼드 트리 분할이 허용되는 경우라면, 이진 트리 분할에 의해 생성된 2개의 블록의 각각은 소정의 순서에 따라 단계 S901로 입력될 수도 있다.If the current block is not quad-tree split (No in S902), the encoder can determine whether to split the current block into a binary tree. Second split information can be encoded based on the determination (S905). If the current block is split into a binary tree (Yes in S906), the encoder can determine whether to split the current block into horizontal or vertical splits, and can encode split direction information based on the determination (S907). If the current block is split into horizontal splits (Yes in S908), horizontal splitting for the current block can be performed (S909). Otherwise (No in S908), vertical splitting for the current block can be performed (S910). If the binary tree splitting for the current block is an asymmetric split, a split ratio can be determined so that split shape information can be further encoded. In this case, steps S909 and S910 can be performed in consideration of the split shape information. Each of the two sub-blocks generated by the binary tree partitioning can be input back to step S905 in a predetermined order (S911, S914). The predetermined order may be from left to right, or from top to bottom. In step S911, a first sub-block among the two sub-blocks in the predetermined order can be specified and input as a current block to step S905. If quad-tree partitioning is allowed again for the sub-block generated by the binary tree partitioning, each of the two blocks generated by the binary tree partitioning can also be input to step S901 in a predetermined order.

현재 블록이 이진 트리 분할되지 않는 경우(S906에서 No), 현재 블록 또는 현재 서브 블록에 대한 부호화가 수행될 수 있다(S912). 단계 S912의 부호화는 예측, 변환, 양자화 등을 포함할 수 있다.If the current block is not binary tree split (No in S906), encoding for the current block or current sub-block may be performed (S912). The encoding in step S912 may include prediction, transformation, quantization, etc.

단계 S912에서 부호화된 서브 블록이 이진 트리 분할에 의해 생성된 마지막 서브 블록이 아닌 경우(S913에서 No), 이진 트리 분할에 의해 생성된 다음 서브 블록이 특정되어, 단계 S905에 현재 블록으로서 입력될 수 있다(S914).If the encoded sub-block in step S912 is not the last sub-block generated by binary tree partitioning (No in S913), the next sub-block generated by binary tree partitioning can be specified and input as the current block in step S905 (S914).

단계 S912에서 부호화된 서브 블록이 이진 트리 분할에 의해 생성된 마지막 서브 블록인 경우(S913에서 Yes), 상기 부호화된 서브 블록이 속한 블록이 쿼드 트리 분할에 의해 생성된 블록들 중 마지막 블록인지 여부가 판단될 수 있다(S915). 마지막 블록인 경우(S915에서 Yes), 단계 S901에 입력된 최대 블록 또는 현재 영상에 대한 부호화를 종료할 수 있다. 마지막 블록이 아닌 경우(S915에서 No), 쿼드 트리 분할에 의해 생성된 다음 블록이 특정되어, 단계 S901에 현재 블록으로서 입력될 수 있다(S916).If the encoded sub-block in step S912 is the last sub-block generated by binary tree partitioning (Yes in S913), it can be determined whether the block to which the encoded sub-block belongs is the last block among the blocks generated by quad tree partitioning (S915). If it is the last block (Yes in S915), encoding for the maximum block input in step S901 or the current image can be terminated. If it is not the last block (No in S915), the next block generated by quad tree partitioning can be specified and input as the current block in step S901 (S916).

도 10은 본 발명에 따른 복호화기에서의 동작을 설명하기 위한 도면이다.Figure 10 is a drawing for explaining the operation of a decoder according to the present invention.

복호화기는 입력된 현재 블록의 제1 분할 정보를 복호화할 수 있다(S1001). 현재 블록이 쿼드 트리 분할되는 경우(S1002에서 Yes), 현재 블록은 4개의 블록으로 쿼드 트리 분할될 수 있다(S1003). 쿼드 트리 분할에 의해 생성된 4개의 블록의 각각은 소정의 순서에 따라 단계 S1001에 다시 입력될 수 있다(S1004, S1016). 상기 소정의 순서는 Z-스캔 순서일 수 있다. 단계 S1004에서, 상기 4개의 블록 중 상기 소정의 순서에 따른 첫번째 블록이 특정되어, 단계 S1001에 현재 블록으로서 입력될 수 있다.The decoder can decode the first division information of the input current block (S1001). If the current block is quad-tree divided (Yes in S1002), the current block can be quad-tree divided into four blocks (S1003). Each of the four blocks generated by the quad-tree division can be input again to step S1001 according to a predetermined order (S1004, S1016). The predetermined order can be a Z-scan order. In step S1004, a first block among the four blocks according to the predetermined order can be specified and input as the current block to step S1001.

현재 블록이 쿼드 트리 분할되지 않는 경우(S1002에서 No), 복호화기는 현재 블록의 제2 분할 정보를 복호화할 수 있다(S1005). 현재 블록이 이진 트리 분할되는 경우(S1006에서 Yes), 복호화기는 분할 방향 정보를 복호화할 수 있다(S1007). 현재 블록이 가로 분할되는 경우(S1008에서 Yes), 현재 블록에 대한 가로 방향의 분할이 수행될 수 있다(S1009). 그렇지 않은 경우(S1008에서 No), 현재 블록에 대한 세로 방향의 분할이 수행될 수 있다(S1010). 현재 블록에 대한 이진 트리 분할이 비대칭 분할인 경우, 분할 형태 정보가 더 복호화될 수 있다. 이 경우, 단계 S1009 및 S1010는 분할 형태 정보를 고려하여 수행될 수 있다. 이진 트리 분할에 의해 생성된 2개의 서브 블록의 각각은 소정의 순서에 따라 단계 S1005에 다시 입력될 수 있다(S1011, S1014). 상기 소정의 순서는 좌측에서 우측, 또는 상단에서 하단일 수 있다. 단계 S1011에서, 상기 2개의 서브 블록 중 상기 소정의 순서에 따른 첫번째 서브 블록이 특정되어, 단계 S1005에 현재 블록으로서 입력될 수 있다. 이진 트리 분할에 의해 생성된 서브 블록에 대해 다시 쿼드 트리 분할이 허용되는 경우라면, 이진 트리 분할에 의해 생성된 2개의 블록의 각각은 소정의 순서에 따라 단계 S1001로 입력될 수도 있다.If the current block is not quad-tree split (No in S1002), the decoder can decode second split information of the current block (S1005). If the current block is binary-tree split (Yes in S1006), the decoder can decode split direction information (S1007). If the current block is horizontally split (Yes in S1008), horizontal splitting for the current block can be performed (S1009). Otherwise (No in S1008), vertical splitting for the current block can be performed (S1010). If the binary tree splitting for the current block is an asymmetric split, split shape information can be further decoded. In this case, steps S1009 and S1010 can be performed in consideration of the split shape information. Each of the two sub-blocks generated by the binary tree splitting can be re-input to step S1005 in a predetermined order (S1011, S1014). The above predetermined order may be from left to right, or from top to bottom. In step S1011, a first sub-block among the two sub-blocks according to the above predetermined order may be specified and input as a current block to step S1005. If quad-tree division is allowed again for the sub-block generated by binary tree division, each of the two blocks generated by binary tree division may be input to step S1001 according to the predetermined order.

현재 블록이 이진 트리 분할되지 않는 경우(S1006에서 No), 현재 블록 또는 현재 서브 블록에 대한 복호화가 수행될 수 있다(S1012). 단계 S1012의 복호화는 예측, 역양자화, 역변환 등을 포함할 수 있다.If the current block is not binary tree split (No in S1006), decryption for the current block or the current sub-block may be performed (S1012). The decryption in step S1012 may include prediction, inverse quantization, inverse transformation, etc.

단계 S1012에서 복호화된 서브 블록이 이진 트리 분할에 의해 생성된 마지막 서브 블록이 아닌 경우(S1013에서 No), 이진 트리 분할에 의해 생성된 다음 서브 블록이 특정되어, 단계 S1005에 현재 블록으로서 입력될 수 있다(S1014).If the decrypted sub-block in step S1012 is not the last sub-block generated by binary tree partitioning (No in S1013), the next sub-block generated by binary tree partitioning can be specified and input as the current block in step S1005 (S1014).

단계 S1012에서 복호화된 서브 블록이 이진 트리 분할에 의해 생성된 마지막 서브 블록인 경우(S1013에서 Yes), 상기 복호화된 서브 블록이 속한 블록이 쿼드 트리 분할에 의해 생성된 블록들 중 마지막 블록인지 여부가 판단될 수 있다(S1015). 마지막 블록인 경우(S1015에서 Yes), 단계 S1001에 입력된 최대 블록 또는 현재 영상에 대한 복호화를 종료할 수 있다. 마지막 블록이 아닌 경우(S1015에서 No), 쿼드 트리 분할에 의해 생성된 다음 블록이 특정되어, 단계 S1001에 현재 블록으로서 입력될 수 있다(S1016).If the decrypted sub-block in step S1012 is the last sub-block generated by binary tree partitioning (Yes in S1013), it can be determined whether the block to which the decrypted sub-block belongs is the last block among the blocks generated by quad tree partitioning (S1015). If it is the last block (Yes in S1015), decryption for the maximum block input in step S1001 or the current image can be terminated. If it is not the last block (No in S1015), the next block generated by quad tree partitioning can be specified and input as the current block in step S1001 (S1016).

도 11은 현재 영상의 크기가 최대 블록의 크기의 배수가 아닌 경우를 예시적으로 도시한 도면이다. Figure 11 is an example diagram illustrating a case where the size of the current image is not a multiple of the size of the maximum block.

도 11에 도시된 바와 같이, 현재 영상을 복수의 최대 블록으로 분할하는 경우, 현재 영상의 우측 또는 하단에는 최대 블록 크기의 일부에 해당하는 영역이 남게 된다. 즉, 최대 블록 2, 최대 블록 5, 최대 블록 6, 최대 블록 7 또는 최대 블록 8의 경우, 일부 영역에 대해서만 현재 영상의 화소가 존재한다.As illustrated in Fig. 11, when dividing the current image into multiple maximum blocks, an area corresponding to a portion of the maximum block size remains on the right or bottom of the current image. That is, in the case of maximum block 2, maximum block 5, maximum block 6, maximum block 7, or maximum block 8, pixels of the current image exist only for some areas.

이하에서는, 도 11에 도시된 바와 같은 현재 영상을 효율적으로 분할하기 위한 본 발명에 따른 영상 분할 방법을 설명한다.Below, an image segmentation method according to the present invention for efficiently segmenting a current image as illustrated in FIG. 11 is described.

도 12a 내지 도 12e는 본 발명에 일 실시예 따른 영상 분할 방법을 설명하기 위한 예시도이다. 이하에서는, 도 12a 내지 도 12e를 참조하여, 도 11의 최대 블록 2의 분할 방법 및/또는 분할 정보의 부호화에 대해 설명한다. 도 12a 내지 도 12e를 참조한 이하의 설명에서, 현재 영상의 크기는 146x146, 최대 블록의 크기는 64x64, 쿼드 트리 분할될 수 있는 블록의 최소 크기는 16x16, 서브 블록의 최소 크기는 2x2인 것으로 가정한다.FIGS. 12A to 12E are exemplary diagrams for explaining an image segmentation method according to one embodiment of the present invention. Hereinafter, a segmentation method of the maximum block 2 of FIG. 11 and/or encoding of segmentation information will be described with reference to FIGS. 12A to 12E. In the following description with reference to FIGS. 12A to 12E, it is assumed that the size of the current image is 146x146, the size of the maximum block is 64x64, the minimum size of a block that can be split into a quad tree is 16x16, and the minimum size of a sub-block is 2x2.

도 12a는 최대 블록 2를 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 최대 블록 2는 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 12a에 도시된 바와 같이, 최대 블록 2의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 또한, 최대 블록 2의 크기는 64x64로서, 쿼드 트리 분할이 가능한 크기이다. 이 경우, 최대 블록 2는 쿼드 트리 분할될 수 있다(S903). 즉, 최대 블록 2에 대한 단계 S901은 생략될 수 있다. 그 후, 최대 블록 2를 쿼드 트리 분할하여 생성된 4개의 블록들(A0, A1, A2 및 A3) 중 첫번째 블록인 블록 A0에 대한 분할 및 부호화가 수행될 수 있다. 블록 A1과 블록 A3은 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 부호화가 생략될 수 있다. 블록 A2는 블록 A0과 마찬가지로 본 발명에 따라 분할 및 부호화될 수 있다.Fig. 12a is an enlargement of maximum block 2, and the part surrounded by a bold line is an area within the current image. Maximum block 2 may be a segmentation target block described with reference to Fig. 9. As illustrated in Fig. 12a, the rightmost position and the bottommost position of maximum block 2 are not completely included in the area of the current image. In addition, the size of maximum block 2 is 64x64, which is a size that allows quad-tree segmentation. In this case, maximum block 2 may be quad-tree segmented (S903). That is, step S901 for maximum block 2 may be omitted. Thereafter, segmentation and encoding may be performed on block A0, which is the first block among four blocks (A0, A1, A2, and A3) generated by quad-tree segmenting maximum block 2. Since blocks A1 and A3 are not completely included in the area of the current image, segmentation and encoding may be omitted. Block A2 may be segmented and encoded according to the present invention, similarly to block A0.

도 12b는 도 12a의 블록 A0을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 A0은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 12b에 도시된 바와 같이, 블록 A0의 최우측 위치(B1)와 최하단 위치(B3)는 현재 영상의 영역에 완전히 포함되지 않는다. 또한, 블록 A0의 크기는 32x32로서, 쿼드 트리 분할이 가능한 크기이다. 이 경우, 블록 A0은 쿼드 트리 분할될 수 있다(S903). 즉, 블록 A0에 대한 단계 S901은 생략될 수 있다. 그 후, 블록 A0을 쿼드 트리 분할하여 생성된 4개의 블록들(B0, B1, B2 및 B3) 중 첫번째 블록인 블록 B0에 대한 분할 및 부호화가 수행될 수 있다. 블록 B0는 도 9를 참조하여 설명한 방법으로 분할 및 부호화될 수 있다. 즉, 블록 B0는 쿼드 트리 분할 및/또는 이진 트리 분할에 의해 분할되거나 또는 분할되지 않고 부호화될 수 있다. 블록 B2는 블록 B0과 마찬가지로 본 발명에 따라 분할 및 부호화될 수 있다. 블록 B1과 블록 B3은 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 부호화가 생략될 수 있다. 블록 B2는 블록 B0과 동일한 방법으로 분할 및 부호화될 수 있다. 즉, 블록 B0과 블록 B2에 대해서는 단계 S901을 생략할 수 없다. 그러나, 블록 B1과 B3에 대해서는 후술하는 바와 같이, 단계 S901을 생략할 수 있다.FIG. 12b is an enlargement of block A0 of FIG. 12a, and a portion surrounded by a bold line is an area within the current image. Block A0 may be a segmentation target block described with reference to FIG. 9. As illustrated in FIG. 12b, the rightmost position (B1) and the bottommost position (B3) of block A0 are not completely included in the area of the current image. In addition, the size of block A0 is 32x32, which is a size that allows quad-tree segmentation. In this case, block A0 may be quad-tree segmented (S903). That is, step S901 for block A0 may be omitted. Thereafter, segmentation and encoding may be performed on block B0, which is the first block among four blocks (B0, B1, B2, and B3) generated by quad-tree segmenting block A0. Block B0 may be segmented and encoded by the method described with reference to FIG. 9. That is, block B0 can be encoded without being split or split by quad tree splitting and/or binary tree splitting. Block B2 can be split and encoded according to the present invention similarly to block B0. Since blocks B1 and B3 are not completely included in the area of the current image, splitting and encoding can be omitted. Block B2 can be split and encoded in the same manner as block B0. That is, step S901 cannot be omitted for blocks B0 and B2. However, step S901 can be omitted for blocks B1 and B3, as described below.

도 12c는 도 12b의 블록 B1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 B1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 12c에 도시된 바와 같이, 블록 B1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 또한, 블록 B1의 크기는 16x16으로서, 쿼드 트리 분할이 불가능한 크기이다. 이 경우, 블록 B1은 쿼드 트리 분할될 수 없고, 이진 트리 분할될 수 있다. 또한, 부호화 대상 블록은 세로로 긴 직사각형이므로, 분할 방향은 세로 방향으로 결정될 수 있다. 따라서, 블록 B1에 대해서는 단계 S901 내지 S907이 생략될 수 있고, 부호화 대상 블록의 형상에 따라 단계 S909 또는 S910의 이진 트리 분할이 수행될 수 있다. 그 후, 블록 B1을 이진 트리 분할하여 생성된 2개의 블록들(C1 및 C2) 중 첫번째 블록인 블록 C1에 대한 분할 및 부호화가 수행될 수 있다. 블록 C2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 부호화가 생략될 수 있다. FIG. 12C is an enlarged view of block B1 of FIG. 12B, and a portion surrounded by a bold line is an area within the current image. Block B1 may be a segmentation target block described with reference to FIG. 9. As illustrated in FIG. 12C, the rightmost position and the bottommost position of block B1 are not completely included in the area of the current image. In addition, the size of block B1 is 16x16, which is a size that cannot be quad-tree segmented. In this case, block B1 cannot be quad-tree segmented, but can be binary-tree segmented. In addition, since the encoding target block is a vertically long rectangle, the segmentation direction can be determined in the vertical direction. Therefore, steps S901 to S907 may be omitted for block B1, and binary-tree segmentation of step S909 or S910 may be performed depending on the shape of the encoding target block. After that, segmentation and encoding can be performed on block C1, which is the first block among the two blocks (C1 and C2) generated by binary tree segmentation of block B1. Since block C2 is not completely included in the area of the current image, segmentation and encoding can be omitted.

도 12d는 도 12c의 블록 C1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 C1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 12d에 도시된 바와 같이, 블록 C1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 또한, 블록 C1의 상위 블록인 B1에 대해 이진 트리 분할이 적용되었으므로, 블록 C1도 이진 트리 분할될 수 있다. 또한, 부호화 대상 블록은 세로로 긴 직사각형이므로, 분할 방향은 세로 방향으로 결정될 수 있다. 따라서, 블록 C1에 대해서는 단계 S905 내지 S907이 생략될 수 있고, 부호화 대상 블록의 형상에 따라 단계 S909 또는 S910의 이진 트리 분할이 수행될 수 있다. 그 후, 블록 C1을 이진 트리 분할하여 생성된 2개의 블록들(D1 및 D2) 중 첫번째 블록인 블록 D1에 대한 분할 및 부호화가 수행될 수 있다. 블록 D2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 부호화가 생략될 수 있다. FIG. 12d is an enlargement of block C1 of FIG. 12c, and a portion surrounded by a bold line is an area within the current image. Block C1 may be a segmentation target block described with reference to FIG. 9. As illustrated in FIG. 12d, the rightmost position and the bottommost position of block C1 are not completely included in the area of the current image. In addition, since binary tree segmentation is applied to B1, which is an upper block of block C1, block C1 may also be binary tree segmented. In addition, since the encoding target block is a vertically long rectangle, the segmentation direction may be determined in the vertical direction. Therefore, steps S905 to S907 may be omitted for block C1, and binary tree segmentation of step S909 or S910 may be performed depending on the shape of the encoding target block. Thereafter, segmentation and encoding may be performed on block D1, which is the first block among two blocks (D1 and D2) generated by binary tree segmenting block C1. Since block D2 is not fully contained within the current image area, segmentation and encoding can be omitted.

도 12e 는 도 12d의 블록 D1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 D1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 12e에 도시된 바와 같이, 블록 D1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 또한, 블록 D1의 상위 블록인 C1에 대해 이진 트리 분할이 적용되었으므로, 블록 D1도 이진 트리 분할될 수 있다. 또한, 부호화 대상 블록은 세로로 긴 직사각형이므로, 분할 방향은 세로 방향으로 결정될 수 있다. 따라서, 블록 D1에 대해서는 단계 S905 내지 S907이 생략될 수 있고, 부호화 대상 블록의 형상에 따라 단계 S909 또는 S910의 이진 트리 분할이 수행될 수 있다. 그 후, 블록 D1을 이진 트리 분할하여 생성된 2개의 블록들(E1 및 E2) 중 첫번째 블록인 블록 E1에 대한 분할 및 부호화가 수행될 수 있다. 블록 E1의 가로의 크기는 서브 블록의 최소 크기로 가정한 2와 동일하다. 따라서, 블록 E1에 대해서는 세로 분할이 수행될 수 없다. 즉, 블록 E1은 분할되지 않고 부호화되거나, 가로 분할된 후 부호화될 수 있다. 이 경우, 블록 E1에 대해서는 분할 여부에 관한 정보만 시그널링될 수 있다. 블록 E2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 부호화가 생략될 수 있다. FIG. 12e is an enlarged view of block D1 of FIG. 12d, and a portion surrounded by a bold line is an area within the current image. Block D1 may be a segmentation target block described with reference to FIG. 9. As illustrated in FIG. 12e, the rightmost position and the bottommost position of block D1 are not completely included in the area of the current image. In addition, since binary tree segmentation is applied to C1, which is an upper block of block D1, block D1 may also be binary tree segmented. In addition, since the encoding target block is a vertically long rectangle, the segmentation direction may be determined in the vertical direction. Therefore, steps S905 to S907 may be omitted for block D1, and binary tree segmentation of step S909 or S910 may be performed depending on the shape of the encoding target block. Thereafter, segmentation and encoding may be performed on block E1, which is the first block among two blocks (E1 and E2) generated by binary tree segmenting block D1. The horizontal size of block E1 is equal to 2, which is assumed to be the minimum size of a sub-block. Therefore, vertical segmentation cannot be performed on block E1. That is, block E1 can be encoded without being segmented, or can be encoded after being horizontally segmented. In this case, only information about whether block E1 is segmented can be signaled. Since block E2 is not completely included in the area of the current image, segmentation and encoding can be omitted.

도 11에 도시된 최대 블록 2와 최대 블록 5의 분할 정보 생략 방식은 동일할 수 있다. 또한, 최대 블록 6과 최대 블록 7의 분할 정보 생략 방식은 최대 블록 2와 최대 블록 5의 분할 정보 생략 방식과 가로인지 세로인지의 방향에 대한 차이만 있을 뿐 나머지는 동일할 수 있다. 최대 블록 8에 대해서는 가로 혹은 세로로 기설정된 기준을 이용하여 다른 최대 블록과 동일한 방식으로 분할 정보 생략을 수행할 수 있다.The partition information omission methods of maximum block 2 and maximum block 5 illustrated in Fig. 11 may be the same. In addition, the partition information omission methods of maximum block 6 and maximum block 7 may be the same as the partition information omission methods of maximum block 2 and maximum block 5 except for the difference in the direction of horizontal or vertical. For maximum block 8, the partition information omission may be performed in the same manner as other maximum blocks by using a criterion set horizontally or vertically.

이하에서는, 도 12a 내지 도 12e를 참조하여, 도 11의 최대 블록 2의 분할 방법 및/또는 분할 정보의 복호화에 대해 설명한다. Hereinafter, with reference to FIGS. 12a to 12e, a method for dividing the maximum block 2 of FIG. 11 and/or decoding the division information will be described.

도 12a는 최대 블록 2를 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 최대 블록 2는 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 12a에 도시된 바와 같이, 최대 블록 2의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 또한, 최대 블록 2의 크기는 64x64로서, 쿼드 트리 분할이 가능한 크기이다. 이 경우, 최대 블록 2는 쿼드 트리 분할될 수 있다(S1003). 즉, 최대 블록 2에 대한 단계 S1001은 생략될 수 있다. 그 후, 최대 블록 2를 쿼드 트리 분할하여 생성된 4개의 블록들(A0, A1, A2 및 A3) 중 첫번째 블록인 블록 A0에 대한 분할 및 복호화가 수행될 수 있다. 블록 A1과 블록 A3은 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 복호화가 생략될 수 있다. 블록 A2는 블록 A0과 마찬가지로 본 발명에 따라 분할 및 복호화될 수 있다.Fig. 12a is an enlargement of maximum block 2, and a part surrounded by a bold line is an area within the current image. Maximum block 2 may be a segmentation target block described with reference to Fig. 9. As illustrated in Fig. 12a, the rightmost position and the bottommost position of maximum block 2 are not completely included in the area of the current image. In addition, the size of maximum block 2 is 64x64, which is a size that allows quad-tree segmentation. In this case, maximum block 2 may be quad-tree segmented (S1003). That is, step S1001 for maximum block 2 may be omitted. Thereafter, segmentation and decoding may be performed on block A0, which is the first block among four blocks (A0, A1, A2, and A3) generated by quad-tree segmenting maximum block 2. Since blocks A1 and A3 are not completely included in the area of the current image, segmentation and decoding may be omitted. Block A2 may be segmented and decoded according to the present invention, similarly to block A0.

도 12b는 도 12a의 블록 A0을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 A0은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 12b에 도시된 바와 같이, 블록 A0의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 또한, 블록 A0의 크기는 32x32로서, 쿼드 트리 분할이 가능한 크기이다. 이 경우, 블록 A0은 쿼드 트리 분할될 수 있다(S1003). 즉, 블록 A0에 대한 단계 S1001은 생략될 수 있다. 그 후, 블록 A0을 쿼드 트리 분할하여 생성된 4개의 블록들(B0, B1, B2 및 B3) 중 첫번째 블록인 블록 B0에 대한 분할 및 복호화가 수행될 수 있다. 블록 B0는 도 9를 참조하여 설명한 방법으로 분할 및 복호화될 수 있다. 즉, 블록 B0는 쿼드 트리 분할 및/또는 이진 트리 분할에 의해 분할되거나 또는 분할되지 않고 복호화될 수 있다. 블록 B2는 블록 B0과 마찬가지로 본 발명에 따라 분할 및 복호화될 수 있다. 블록 B1과 블록 B3은 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 복호화가 생략될 수 있다. 블록 B2는 블록 B0과 동일한 방법으로 분할 및 복호화될 수 있다. 즉, 블록 B0과 블록 B2에 대해서는 단계 S1001을 생략할 수 없다. 그러나, 블록 B1과 B3에 대해서는 후술하는 바와 같이, 단계 S1001을 생략할 수 있다.FIG. 12b is an enlargement of block A0 of FIG. 12a, and a portion surrounded by a bold line is an area within the current image. Block A0 may be a segmentation target block described with reference to FIG. 9. As illustrated in FIG. 12b, the rightmost position and the bottommost position of block A0 are not completely included in the area of the current image. In addition, the size of block A0 is 32x32, which is a size that allows quad-tree segmentation. In this case, block A0 may be quad-tree segmented (S1003). That is, step S1001 for block A0 may be omitted. Thereafter, segmentation and decoding may be performed on block B0, which is the first block among four blocks (B0, B1, B2, and B3) generated by quad-tree segmenting block A0. Block B0 may be segmented and decoded by the method described with reference to FIG. 9. That is, block B0 can be decoded with or without being split by quad tree splitting and/or binary tree splitting. Block B2 can be split and decoded according to the present invention similarly to block B0. Since blocks B1 and B3 are not completely included in the area of the current image, splitting and decoding can be omitted. Block B2 can be split and decoded in the same manner as block B0. That is, step S1001 cannot be omitted for blocks B0 and B2. However, step S1001 can be omitted for blocks B1 and B3, as described below.

도 12c는 도 12b의 블록 B1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 B1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 12c에 도시된 바와 같이, 블록 B1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 또한, 블록 B1의 크기는 16x16으로서, 쿼드 트리 분할이 불가능한 크기이다. 이 경우, 블록 B1은 쿼드 트리 분할될 수 없고, 이진 트리 분할될 수 있다. 또한, 복호화 대상 블록은 세로로 긴 직사각형이므로, 분할 방향은 세로 방향으로 결정될 수 있다. 따라서, 블록 B1에 대해서는 단계 S1001 내지 S1007이 생략될 수 있고, 복호화 대상 블록의 형상에 따라 단계 S1009 또는 S1010의 이진 트리 분할이 수행될 수 있다. 그 후, 블록 B1을 이진 트리 분할하여 생성된 2개의 블록들(C1 및 C2) 중 첫번째 블록인 블록 C1에 대한 분할 및 복호화가 수행될 수 있다. 블록 C2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 복호화가 생략될 수 있다. FIG. 12C is an enlargement of block B1 of FIG. 12B, and a portion surrounded by a bold line is an area within the current image. Block B1 may be a segmentation target block described with reference to FIG. 9. As illustrated in FIG. 12C, the rightmost position and the bottommost position of block B1 are not completely included in the area of the current image. In addition, the size of block B1 is 16x16, which is a size that cannot be quad-tree segmented. In this case, block B1 cannot be quad-tree segmented, but can be binary-tree segmented. In addition, since the block to be decoded is a vertically long rectangle, the segmentation direction can be determined in the vertical direction. Therefore, steps S1001 to S1007 may be omitted for block B1, and binary-tree segmentation of step S1009 or S1010 may be performed depending on the shape of the block to be decoded. After that, segmentation and decoding can be performed on block C1, which is the first block among the two blocks (C1 and C2) generated by binary tree segmentation of block B1. Since block C2 is not completely included in the area of the current image, segmentation and decoding can be omitted.

도 12d는 도 12c의 블록 C1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 C1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 12d에 도시된 바와 같이, 블록 C1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 또한, 블록 C1의 상위 블록인 B1에 대해 이진 트리 분할이 적용되었으므로, 블록 C1도 이진 트리 분할될 수 있다. 또한, 복호화 대상 블록은 세로로 긴 직사각형이므로, 분할 방향은 세로 방향으로 결정될 수 있다. 따라서, 블록 C1에 대해서는 단계 S1005 내지 S1007이 생략될 수 있고, 복호화 대상 블록의 형상에 따라 단계 S1009 또는 S1010의 이진 트리 분할이 수행될 수 있다. 그 후, 블록 C1을 이진 트리 분할하여 생성된 2개의 블록들(D1 및 D2) 중 첫번째 블록인 블록 D1에 대한 분할 및 복호화가 수행될 수 있다. 블록 D2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 복호화가 생략될 수 있다. FIG. 12d is an enlargement of block C1 of FIG. 12c, and a portion surrounded by a bold line is an area within the current image. Block C1 may be a segmentation target block described with reference to FIG. 9. As illustrated in FIG. 12d, the rightmost position and the bottommost position of block C1 are not completely included in the area of the current image. In addition, since binary tree segmentation is applied to B1, which is an upper block of block C1, block C1 may also be binary tree segmented. In addition, since the block to be decoded is a vertically long rectangle, the segmentation direction may be determined in the vertical direction. Therefore, steps S1005 to S1007 may be omitted for block C1, and binary tree segmentation of step S1009 or S1010 may be performed depending on the shape of the block to be decoded. Thereafter, segmentation and decoding may be performed on block D1, which is the first block among two blocks (D1 and D2) generated by binary tree segmenting block C1. Since block D2 is not fully contained within the current image area, segmentation and decoding can be omitted.

도 12e는 도 12d의 블록 D1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 D1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 12e에 도시된 바와 같이, 블록 D1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 또한, 블록 D1의 상위 블록인 C1에 대해 이진 트리 분할이 적용되었으므로, 블록 D1도 이진 트리 분할될 수 있다. 또한, 복호화 대상 블록은 세로로 긴 직사각형이므로, 분할 방향은 세로 방향으로 결정될 수 있다. 따라서, 블록 D1에 대해서는 단계 S1005 내지 S1007이 생략될 수 있고, 복호화 대상 블록의 형상에 따라 단계 S1009 또는 S1010의 이진 트리 분할이 수행될 수 있다. 그 후, 블록 D1을 이진 트리 분할하여 생성된 2개의 블록들(E1 및 E2) 중 첫번째 블록인 블록 E1에 대한 분할 및 복호화가 수행될 수 있다. 블록 E1의 가로의 크기는 서브 블록의 최소 크기로 가정한 2와 동일하다. 따라서, 블록 E1에 대해서는 세로 분할이 수행될 수 없다. 즉, 블록 E1은 분할되지 않고 복호화되거나, 가로 분할된 후 복호화될 수 있다. 이 경우, 블록 E1에 대해서는 분할 여부에 관한 정보만 시그널링될 수 있다. 블록 E2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 복호화가 생략될 수 있다. FIG. 12E is an enlargement of block D1 of FIG. 12D, and a portion surrounded by a bold line is an area within the current image. Block D1 may be a segmentation target block described with reference to FIG. 9. As illustrated in FIG. 12E, the rightmost position and the bottommost position of block D1 are not completely included in the area of the current image. In addition, since binary tree segmentation is applied to C1, which is an upper block of block D1, block D1 may also be binary tree segmented. In addition, since the block to be decoded is a vertically long rectangle, the segmentation direction may be determined in the vertical direction. Accordingly, steps S1005 to S1007 may be omitted for block D1, and binary tree segmentation of step S1009 or S1010 may be performed depending on the shape of the block to be decoded. Thereafter, segmentation and decoding may be performed on block E1, which is the first block among two blocks (E1 and E2) generated by binary tree segmenting block D1. The horizontal size of block E1 is equal to 2, which is assumed to be the minimum size of a sub-block. Therefore, vertical segmentation cannot be performed on block E1. That is, block E1 can be decoded without being segmented, or can be decoded after being horizontally segmented. In this case, only information about whether block E1 is segmented can be signaled. Since block E2 is not completely included in the area of the current image, segmentation and decoding can be omitted.

도 12를 참조하여 설명한 실시예에서, 분할 대상 블록에 대해 쿼드 트리 분할이 수행되다가 소정 조건이 만족되면 이진 트리 분할이 수행될 수 있다. 상기 실시예에서는 분할 대상 블록의 크기가 쿼드 트리 분할이 가능한 크기인지의 여부가 상기 소정 조건에 해당한다. 상기 소정 조건은 쿼드 트리 분할이 가능한 블록과 이진 트리 분할이 가능한 블록의 최소 크기 및/또는 임계값을 이용하여 설정될 수도 있다. In the embodiment described with reference to FIG. 12, when quad-tree division is performed on a division target block and a predetermined condition is satisfied, binary tree division may be performed. In the above embodiment, whether the size of the division target block is a size that allows quad-tree division corresponds to the above predetermined condition. The above predetermined condition may be set using the minimum size and/or threshold value of a block that allows quad-tree division and a block that allows binary tree division.

임계값이 이용되는 경우, 분할 대상 블록 중 현재 영상에 완전히 포함되지 않는 영역(이하, “남은 영역”이라 함)의 크기와 임계값을 비교한 결과에 기초하여 쿼드 트리 분할과 이진 트리 분할 중 하나를 수행할 수 있다. 이하의 설명에서, 상기 임계값은 32라고 가정한다. When a threshold value is used, one of quad tree segmentation and binary tree segmentation can be performed based on the result of comparing the size of an area (hereinafter referred to as “remaining area”) that is not completely included in the current image among the segmentation target blocks with the threshold value. In the following description, it is assumed that the threshold value is 32.

예를 들어, 도 12a에서 부호화 대상 블록의 크기는 18x64이며, 남은 영역의 크기는 46x64이다. 남은 영역이 세로로 긴 직사각형이기 때문에, 남은 영역의 가로 길이와 임계값을 비교할 수 있다. 남은 영역의 가로 길이는 46이고, 이는 상기 임계값 32보다 크기 때문에 64x64 분할 대상 블록에 대해 쿼드 트리 분할을 수행할 수 있다. 도 12b에서는 남은 영역의 가로 길이가 14이고, 이는 상기 임계값 32보다 작기 때문에, 32x32 분할 대상 블록에 대해 이진 트리 분할을 수행할 수 있다. 즉, 분할 대상 블록의 크기가 쿼드 트리 분할이 가능한 크기라고 하더라도, 상기 조건에 따라 쿼드 트리 분할 대신 이진 트리 분할이 수행될 수 있다. 이 때, 이진 트리 분할의 분할 방향은 18x32 부호화 대상 블록의 가로와 세로 중, 작은 쪽을 기준으로 한다. 따라서, 도 12b의 블록 A0은 두 개의 세로로 긴 16x32 블록으로 분할될 수 있다. 이 후, 블록의 크기가 이진 트리 분할이 가능하지 않을 때까지 세로 방향의 이진 트리 분할을 반복적으로 수행할 수 있다.For example, in Fig. 12a, the size of the target block to be encoded is 18x64, and the size of the remaining area is 46x64. Since the remaining area is a vertically long rectangle, the horizontal length of the remaining area can be compared with a threshold value. The horizontal length of the remaining area is 46, which is larger than the threshold value 32, so that quad tree partitioning can be performed on the 64x64 target block to be partitioned. In Fig. 12b, the horizontal length of the remaining area is 14, which is smaller than the threshold value 32, so that binary tree partitioning can be performed on the 32x32 target block to be partitioned. That is, even if the size of the target block to be partitioned is a size that allows quad tree partitioning, binary tree partitioning can be performed instead of quad tree partitioning according to the above conditions. At this time, the partitioning direction of the binary tree partitioning is based on the smaller one of the width and height of the 18x32 target block to be encoded. Therefore, block A0 of Fig. 12b can be partitioned into two vertically long 16x32 blocks. After this, vertical binary tree splitting can be performed repeatedly until the block size becomes such that binary tree splitting is no longer possible.

상기 임계값은 전술한 블록의 상위 레벨의 헤더를 통해 시그널링될 수 있다. 상기 임계값은 쿼드 트리 분할이 가능한 블록의 최대 크기와 최소 크기 사이의 값이어야 한다. 또한, 상기 임계값은 이진 트리 분할이 가능한 블록의 최대 크기보다는 작게 설정될 수 있다. 상기 임계값이 이진 트리 분할이 가능한 블록의 최대 크기보다 크게 설정된 경우, 상기 임계값은 이진 트리 분할이 가능한 블록의 최대 크기로 변경 설정될 수 있다.The above threshold value can be signaled through the upper level header of the above-mentioned block. The above threshold value should be a value between the maximum size and the minimum size of a block that can be split into quad tree divisions. In addition, the above threshold value can be set smaller than the maximum size of a block that can be split into binary tree divisions. If the above threshold value is set larger than the maximum size of a block that can be split into binary tree divisions, the above threshold value can be changed to the maximum size of a block that can be split into binary tree divisions.

도 13a 내지 도 13e는 본 발명에 다른 실시예 따른 영상 분할 방법을 설명하기 위한 예시도이다.FIGS. 13a to 13e are exemplary diagrams for explaining an image segmentation method according to another embodiment of the present invention.

도 13a는 최대 블록 2를 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 최대 블록 2는 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 13a에 도시된 바와 같이, 최대 블록 2의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 이 경우, 남은 영역의 형태에 기초하여 블록 분할 방식을 선택할 수 있다. 도 13a에서 남은 영역은 세로로 긴 46x64 블록이므로, 최대 블록 2에 대해 세로 방향의 이진 트리 분할을 수행할 수 있다. 즉, 최대 블록 2에 대한 단계 S901 내지 S907이 생략될 수 있고, 남은 영역의 형태에 따라 단계 S909 또는 S910이 수행될 수 있다.Fig. 13a is an enlargement of maximum block 2, and the part surrounded by a bold line is an area within the current image. Maximum block 2 may be a segmentation target block described with reference to Fig. 9. As shown in Fig. 13a, the rightmost position and the bottommost position of maximum block 2 are not completely included in the area of the current image. In this case, a block segmentation method may be selected based on the shape of the remaining area. Since the remaining area in Fig. 13a is a vertically long 46x64 block, a vertical binary tree segmentation may be performed for maximum block 2. That is, steps S901 to S907 for maximum block 2 may be omitted, and step S909 or S910 may be performed depending on the shape of the remaining area.

도 13b는 도 13a의 블록 A0을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 A0은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 13b에 도시된 바와 같이, 블록 A0의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 이 경우, 남은 영역의 형태에 기초하여 블록 분할 방식을 선택할 수 있다. 도 13b에서 남은 영역은 세로로 긴 14x64 블록이므로, 블록 A0에 대해 세로 방향의 이진 트리 분할을 수행할 수 있다. 블록 B0는 현재 영상 영역 내의 블록이므로 서브 블록 분할을 이용하여 부호화될 수 있다. 블록 B0에 대해서는 단계 S905 내지 S908이 생략될 수 없다.FIG. 13b is an enlarged view of block A0 of FIG. 13a, and a portion surrounded by a bold line is an area within the current image. Block A0 may be a segmentation target block described with reference to FIG. 9. As shown in FIG. 13b, the rightmost position and the bottommost position of block A0 are not completely included in the area of the current image. In this case, a block segmentation method may be selected based on the shape of the remaining area. Since the remaining area in FIG. 13b is a vertically long 14x64 block, a vertical binary tree segmentation may be performed on block A0. Block B0 may be encoded using sub-block segmentation since it is a block within the current image area. Steps S905 to S908 cannot be omitted for block B0.

도 13c는 도 13b의 블록 B1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 B1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 13c에 도시된 바와 같이, 블록 B1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 이 경우, 남은 영역의 형태에 기초하여 블록 분할 방식을 선택할 수 있다. 도 13c에서 남은 영역은 세로로 긴 14x64 블록이므로, 블록 B1에 대해 세로 방향의 이진 트리 분할을 수행할 수 있다. 즉, 블록 B1에 대한 단계 S901 내지 S907이 생략될 수 있고, 남은 영역의 형태에 따라 단계 S909 또는 S910이 수행될 수 있다. 블록 C2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 부호화가 생략될 수 있다.Fig. 13c is an enlarged view of block B1 of Fig. 13b, and a portion surrounded by a bold line is an area within the current image. Block B1 may be a segmentation target block described with reference to Fig. 9. As shown in Fig. 13c, the rightmost position and the bottommost position of block B1 are not completely included in the area of the current image. In this case, a block segmentation method may be selected based on the shape of the remaining area. Since the remaining area in Fig. 13c is a vertically long 14x64 block, a vertical binary tree segmentation may be performed on block B1. That is, steps S901 to S907 for block B1 may be omitted, and step S909 or S910 may be performed depending on the shape of the remaining area. Since block C2 is not completely included in the area of the current image, segmentation and encoding may be omitted.

도 13d는 도 13c의 블록 C1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 C1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 13d에 도시된 바와 같이, 블록 C1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 이 경우, 남은 영역의 형태에 기초하여 블록 분할 방식을 선택할 수 있다. 도 13c에서 남은 영역은 세로로 긴 6x64 블록이므로, 블록 C1에 대해 세로 방향의 이진 트리 분할을 수행할 수 있다. 즉, 블록 C1에 대한 단계 S901 내지 S907이 생략될 수 있고, 남은 영역의 형태에 따라 단계 S909 또는 S910이 수행될 수 있다. 블록 D2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 부호화가 생략될 수 있다.FIG. 13d is an enlarged view of block C1 of FIG. 13c, and a portion surrounded by a bold line is an area within the current image. Block C1 may be a segmentation target block described with reference to FIG. 9. As shown in FIG. 13d, the rightmost position and the bottommost position of block C1 are not completely included in the area of the current image. In this case, a block segmentation method may be selected based on the shape of the remaining area. Since the remaining area in FIG. 13c is a vertically long 6x64 block, a vertical binary tree segmentation may be performed on block C1. That is, steps S901 to S907 for block C1 may be omitted, and step S909 or S910 may be performed depending on the shape of the remaining area. Since block D2 is not completely included in the area of the current image, segmentation and encoding may be omitted.

도 13e는 도 13d의 블록 D1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 D1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 13e에 도시된 바와 같이, 블록 D1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 이 경우, 남은 영역의 형태에 기초하여 블록 분할 방식을 선택할 수 있다. 도 13c에서 남은 영역은 세로로 긴 2x64 블록이므로, 블록 D1에 대해 세로 방향의 이진 트리 분할을 수행할 수 있다. 즉, 블록 D1에 대한 단계 S901 내지 S907이 생략될 수 있고, 남은 영역의 형태에 따라 단계 S909 또는 S910이 수행될 수 있다. 블록 E1의 가로의 크기는 서브 블록의 최소 크기로 가정한 2와 동일하다. 따라서, 블록 E1에 대해서는 세로 분할이 수행될 수 없다. 즉, 블록 E1은 분할되지 않고 부호화되거나, 가로 분할된 후 부호화될 수 있다. 이 경우, 블록 E1에 대해서는 분할 여부에 관한 정보만 시그널링될 수 있다. 블록 E2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 부호화가 생략될 수 있다. Fig. 13e is an enlargement of block D1 of Fig. 13d, and the part surrounded by a thick line is an area within the current image. Block D1 may be a segmentation target block described with reference to Fig. 9. As shown in Fig. 13e, the rightmost position and the bottommost position of block D1 are not completely included in the area of the current image. In this case, a block segmentation method may be selected based on the shape of the remaining area. In Fig. 13c, since the remaining area is a vertically long 2x64 block, a vertical binary tree segmentation may be performed on block D1. That is, steps S901 to S907 for block D1 may be omitted, and step S909 or S910 may be performed depending on the shape of the remaining area. The horizontal size of block E1 is equal to 2, which is assumed to be the minimum size of a sub-block. Therefore, vertical segmentation cannot be performed on block E1. That is, block E1 may be encoded without being segmented, or may be encoded after being horizontally segmented. In this case, only information about whether block E1 is segmented can be signaled. Since block E2 is not completely included in the area of the current image, segmentation and encoding can be omitted.

이하에서는, 도 13a 내지 도 13e를 참조하여, 도 11의 최대 블록 2의 분할 방법 및/또는 분할 정보의 복호화에 대해 설명한다. Hereinafter, with reference to FIGS. 13a to 13e, a method for dividing the maximum block 2 of FIG. 11 and/or decoding the division information will be described.

도 13a는 최대 블록 2를 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 최대 블록 2는 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 13a에 도시된 바와 같이, 최대 블록 2의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 이 경우, 남은 영역의 형태에 기초하여 블록 분할 방식을 선택할 수 있다. 도 13a에서 남은 영역은 세로로 긴 46x64 블록이므로, 최대 블록 2에 대해 세로 방향의 이진 트리 분할을 수행할 수 있다. 즉, 최대 블록 2에 대한 단계 S1001 내지 S1007이 생략될 수 있고, 남은 영역의 형태에 따라 단계 S1009 또는 S1010이 수행될 수 있다.Fig. 13a is an enlargement of maximum block 2, and the part surrounded by a bold line is an area within the current image. Maximum block 2 may be a segmentation target block described with reference to Fig. 9. As shown in Fig. 13a, the rightmost position and the bottommost position of maximum block 2 are not completely included in the area of the current image. In this case, a block segmentation method may be selected based on the shape of the remaining area. Since the remaining area in Fig. 13a is a vertically long 46x64 block, a vertical binary tree segmentation may be performed for maximum block 2. That is, steps S1001 to S1007 for maximum block 2 may be omitted, and step S1009 or S1010 may be performed depending on the shape of the remaining area.

도 13b는 도 13a의 블록 A0을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 A0은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 13b에 도시된 바와 같이, 블록 A0의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 이 경우, 남은 영역의 형태에 기초하여 블록 분할 방식을 선택할 수 있다. 도 13b에서 남은 영역은 세로로 긴 14x64 블록이므로, 블록 A0에 대해 세로 방향의 이진 트리 분할을 수행할 수 있다. 블록 B0는 현재 영상 영역 내의 블록이므로 서브 블록 분할을 이용하여 복호화될 수 있다. 블록 B0에 대해서는 단계 S1005 내지 S1008이 생략될 수 없다.FIG. 13b is an enlarged view of block A0 of FIG. 13a, and a portion surrounded by a bold line is an area within the current image. Block A0 may be a segmentation target block described with reference to FIG. 9. As shown in FIG. 13b, the rightmost position and the bottommost position of block A0 are not completely included in the area of the current image. In this case, a block segmentation method may be selected based on the shape of the remaining area. Since the remaining area in FIG. 13b is a vertically long 14x64 block, a vertical binary tree segmentation may be performed on block A0. Block B0 may be decoded using sub-block segmentation since it is a block within the current image area. Steps S1005 to S1008 cannot be omitted for block B0.

도 13c는 도 13b의 블록 B1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 B1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 13c에 도시된 바와 같이, 블록 B1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 이 경우, 남은 영역의 형태에 기초하여 블록 분할 방식을 선택할 수 있다. 도 13c에서 남은 영역은 세로로 긴 14x64 블록이므로, 블록 B1에 대해 세로 방향의 이진 트리 분할을 수행할 수 있다. 즉, 블록 B1에 대한 단계 S1001 내지 S1007이 생략될 수 있고, 남은 영역의 형태에 따라 단계 S1009 또는 S1010이 수행될 수 있다. 블록 C2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 복호화가 생략될 수 있다.Fig. 13c is an enlarged view of block B1 of Fig. 13b, and a portion surrounded by a bold line is an area within the current image. Block B1 may be a segmentation target block described with reference to Fig. 9. As shown in Fig. 13c, the rightmost position and the bottommost position of block B1 are not completely included in the area of the current image. In this case, a block segmentation method may be selected based on the shape of the remaining area. Since the remaining area in Fig. 13c is a vertically long 14x64 block, a vertical binary tree segmentation may be performed on block B1. That is, steps S1001 to S1007 for block B1 may be omitted, and step S1009 or S1010 may be performed depending on the shape of the remaining area. Since block C2 is not completely included in the area of the current image, segmentation and decoding may be omitted.

도 13d는 도 13c의 블록 C1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 C1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 13d에 도시된 바와 같이, 블록 C1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 이 경우, 남은 영역의 형태에 기초하여 블록 분할 방식을 선택할 수 있다. 도 13c에서 남은 영역은 세로로 긴 6x64 블록이므로, 블록 C1에 대해 세로 방향의 이진 트리 분할을 수행할 수 있다. 즉, 블록 C1에 대한 단계 S1001 내지 S1007이 생략될 수 있고, 남은 영역의 형태에 따라 단계 S1009 또는 S1010이 수행될 수 있다. 블록 D2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 복호화가 생략될 수 있다.FIG. 13d is an enlarged view of block C1 of FIG. 13c, and a portion surrounded by a bold line is an area within the current image. Block C1 may be a segmentation target block described with reference to FIG. 9. As illustrated in FIG. 13d, the rightmost position and the bottommost position of block C1 are not completely included in the area of the current image. In this case, a block segmentation method may be selected based on the shape of the remaining area. Since the remaining area in FIG. 13c is a vertically long 6x64 block, a vertical binary tree segmentation may be performed on block C1. That is, steps S1001 to S1007 for block C1 may be omitted, and step S1009 or S1010 may be performed depending on the shape of the remaining area. Since block D2 is not completely included in the area of the current image, segmentation and decoding may be omitted.

도 13e는 도 13d의 블록 D1을 확대한 것으로서, 굵은 선으로 둘러싸인 부분은 현재 영상 내의 영역이다. 블록 D1은 도 9를 참조하여 설명한 분할 대상 블록일 수 있다. 도 13e에 도시된 바와 같이, 블록 D1의 최우측 위치와 최하단 위치는 현재 영상의 영역에 완전히 포함되지 않는다. 이 경우, 남은 영역의 형태에 기초하여 블록 분할 방식을 선택할 수 있다. 도 13c에서 남은 영역은 세로로 긴 2x64 블록이므로, 블록 D1에 대해 세로 방향의 이진 트리 분할을 수행할 수 있다. 즉, 블록 D1에 대한 단계 S1001 내지 S1007이 생략될 수 있고, 남은 영역의 형태에 따라 단계 S1009 또는 S1010이 수행될 수 있다. 블록 E1의 가로의 크기는 서브 블록의 최소 크기로 가정한 2와 동일하다. 따라서, 블록 E1에 대해서는 세로 분할이 수행될 수 없다. 즉, 블록 E1은 분할되지 않고 복호화되거나, 가로 분할된 후 복호화될 수 있다. 이 경우, 블록 E1에 대해서는 분할 여부에 관한 정보만 시그널링될 수 있다. 블록 E2는 현재 영상의 영역에 완전히 포함되지 않으므로, 분할 및 복호화가 생략될 수 있다. Fig. 13e is an enlargement of block D1 of Fig. 13d, and the part surrounded by a thick line is an area within the current image. Block D1 may be a segmentation target block described with reference to Fig. 9. As shown in Fig. 13e, the rightmost position and the bottommost position of block D1 are not completely included in the area of the current image. In this case, a block segmentation method may be selected based on the shape of the remaining area. In Fig. 13c, since the remaining area is a vertically long 2x64 block, a vertical binary tree segmentation may be performed on block D1. That is, steps S1001 to S1007 for block D1 may be omitted, and step S1009 or S1010 may be performed depending on the shape of the remaining area. The horizontal size of block E1 is equal to 2, which is assumed to be the minimum size of a sub-block. Therefore, vertical segmentation cannot be performed on block E1. That is, block E1 may be decoded without being segmented, or may be decoded after being horizontally segmented. In this case, only information about whether block E1 is segmented can be signaled. Since block E2 is not completely included in the area of the current image, segmentation and decoding can be omitted.

도 13을 참조하여 설명한 실시예에서는, 분할 대상 블록에 대해 이진 트리 분할만이 수행되며, 이진 트리 분할의 방향은 남은 영역의 형상에 따라 결정될 수 있다.In the embodiment described with reference to FIG. 13, only binary tree division is performed on the division target block, and the direction of the binary tree division can be determined according to the shape of the remaining area.

도 9 및 도 10을 참조하여 설명한 실시예에 있어서, 서브 블록 단위 또는 블록 단위로 영상의 경계에 대한 분할 처리를 수행할 수 있다. 어떤 단위로 영상의 경계에 대한 분할 처리를 수행할 지 여부에 관한 정보는 시그널링될 수 있다. 예컨대, 상기 정보는 전술한 블록의 상위 레벨의 헤더를 통해 부호화기에서 복호화기로 시그널링될 수 있다.In the embodiment described with reference to FIGS. 9 and 10, segmentation processing for the boundary of the image can be performed in units of sub-blocks or blocks. Information regarding whether segmentation processing for the boundary of the image is to be performed in which unit can be signaled. For example, the information can be signaled from the encoder to the decoder through the header of the upper level of the block described above.

본 개시의 예시적인 방법들은 설명의 명확성을 위해서 동작의 시리즈로 표현되어 있지만, 이는 단계가 수행되는 순서를 제한하기 위한 것은 아니며, 필요한 경우에는 각각의 단계가 동시에 또는 상이한 순서로 수행될 수도 있다. 본 개시에 따른 방법을 구현하기 위해서, 예시하는 단계에 추가적으로 다른 단계를 포함하거나, 일부의 단계를 제외하고 나머지 단계를 포함하거나, 또는 일부의 단계를 제외하고 추가적인 다른 단계를 포함할 수도 있다.Although the exemplary methods of the present disclosure are presented as a series of operations for clarity of description, this is not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order, if desired. In order to implement a method according to the present disclosure, additional steps may be included in addition to the steps illustrated, or some of the steps may be excluded and the remaining steps may be included, or some of the steps may be excluded and additional other steps may be included.

본 개시의 다양한 실시 예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시 예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.The various embodiments of the present disclosure are not intended to list all possible combinations but rather to illustrate representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combinations of two or more.

또한, 본 개시의 다양한 실시 예는 하드웨어, 펌웨어(firmware), 소프트웨어, 또는 그들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 범용 프로세서(general processor), 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다. Additionally, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, the embodiments may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.

본 개시의 범위는 다양한 실시 예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.The scope of the present disclosure includes software or machine-executable instructions (e.g., an operating system, an application, firmware, a program, etc.) that cause operations according to the methods of various embodiments to be executed on a device or a computer, and a non-transitory computer-readable medium having such software or instructions stored thereon and being executable on the device or the computer.

Claims (16)

현재 영상을 복수의 블록들로 분할하는 제1 분할 단계; 및
상기 복수의 블록들 중 상기 현재 영상의 경계를 포함하는 분할 대상 블록을 복수의 하위 블록들로 분할하는 제2 분할 단계를 포함하고,
상기 제2 분할 단계는, 상기 하위 블록들 중 상기 현재 영상의 경계를 포함하는 하위 블록이 존재하지 않을 때까지, 상기 현재 영상의 경계를 포함하는 하위 블록을 상기 분할 대상 블록으로하여 재귀적으로 수행되고,
상기 제2 분할 단계는, 상기 분할 대상 블록의 크기 및 임계값에 기초하여 쿼드 트리 분할 또는 이진 트리 분할을 선택적으로 적용하여 상기 분할 대상 블록을 분할하되, 상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할 또는 상기 이진 트리 분할이 수행된 경우, 상기 분할 대상 블록의 분할 여부를 나타내는 분할 정보는 부호화되지 않고,
상기 쿼드 트리 분할은, 상기 분할 대상 블록의 크기와 쿼드 트리 분할이 가능한 블록의 크기를 비교한 결과에 기초하여 수행되고,
상기 이진 트리 분할은, 상기 쿼드 트리 분할이 수행되지 않는 경우, 상기 분할 대상 블록의 크기와 이진 트리 분할이 가능한 블록의 크기 및 상기 임계값을 비교한 결과에 기초하여 수행되고,
상기 임계값은, 상기 이진 트리 분할이 가능한 블록의 크기와는 상이하며, 쿼드 트리 분할이 가능한 블록의 최대 크기와 최소 크기 사이의 값인, 영상 부호화 방법.
A first segmentation step for dividing the current image into multiple blocks; and
A second segmentation step is included for segmenting a segmentation target block including a boundary of the current image among the plurality of blocks into a plurality of sub-blocks.
The second segmentation step is performed recursively using a sub-block including a boundary of the current image as a segmentation target block until there is no sub-block including a boundary of the current image among the sub-blocks.
The second division step selectively applies quad tree division or binary tree division based on the size and threshold of the division target block to divide the division target block, and if the quad tree division or binary tree division is performed on the division target block in the second division step, division information indicating whether the division target block is divided is not encoded.
The above quad tree division is performed based on the result of comparing the size of the division target block and the size of a block that can be divided into quad tree divisions.
The above binary tree division is performed based on the result of comparing the size of the division target block with the size of a block capable of binary tree division and the threshold value when the quad tree division is not performed.
A method for encoding an image, wherein the threshold value is different from the size of a block capable of binary tree division, and is a value between the maximum size and the minimum size of a block capable of quad tree division.
삭제delete 제1항에 있어서,
상기 하위 블록들 중 상기 현재 영상의 경계를 포함하지 않고 동시에, 상기 현재 영상의 밖에 위치하는 하위 블록에 대해서는 상기 제2 분할 단계 및 부호화를 생략하는 영상 부호화 방법.
In the first paragraph,
An image encoding method wherein the second segmentation step and encoding are omitted for sub-blocks among the above sub-blocks that do not include the boundary of the current image and are located outside the current image.
제1항에 있어서,
상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할 또는 상기 이진 트리 분할이 수행된 경우, 상기 분할 대상 블록이 쿼드 트리 분할되는 지의 여부를 나타내는 제1 분할 정보 또는 상기 분할 대상 블록이 이진 트리 분할되는 지의 여부를 나타내는 제2 분할 정보는 부호화되지 않는 영상 부호화 방법.
In the first paragraph,
A video encoding method wherein, when the quad tree division or the binary tree division is performed on the division target block in the second division step, the first division information indicating whether the division target block is subjected to a quad tree division or the second division information indicating whether the division target block is subjected to a binary tree division is not encoded.
제1항에 있어서,
상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 이진 트리 분할이 수행된 경우,
상기 이진 트리 분할의 분할 방향은, 상기 분할 대상 블록의 최우측 위치 및 상기 분할 대상 블록의 최하단 위치 중 어느 쪽이 상기 현재 영상의 영역에 포함되지 않는지에 기초하여 결정되는 영상 부호화 방법.
In the first paragraph,
If the binary tree division is performed on the division target block in the second division step,
An image encoding method wherein the division direction of the binary tree division is determined based on whether the rightmost position of the division target block and the bottommost position of the division target block are not included in the area of the current image.
제1항에 있어서,
상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 이진 트리 분할이 수행된 경우,
상기 이진 트리 분할의 분할 방향을 나타내는 분할 방향 정보는 부호화되지 않는 영상 부호화 방법.
In the first paragraph,
If the binary tree division is performed on the division target block in the second division step,
An image encoding method in which the split direction information indicating the split direction of the above binary tree split is not encoded.
제5항에 있어서,
상기 이진 트리 분할의 분할 방향은,
상기 분할 대상 블록의 최우측 위치가 상기 현재 영상의 영역에 포함되지 않는 경우, 세로 방향이고,
상기 분할 대상 블록의 최하단 위치가 상기 현재 영상의 영역에 포함되지 않는 경우, 가로 방향인 영상 부호화 방법.
In paragraph 5,
The division direction of the above binary tree division is,
If the rightmost position of the above-mentioned segmentation target block is not included in the area of the above-mentioned current image, it is in the vertical direction,
A horizontal image encoding method, wherein the lowest position of the above-mentioned segmentation target block is not included in the area of the above-mentioned current image.
현재 영상을 복수의 블록들로 분할하는 제1 분할 단계; 및
상기 복수의 블록들 중 상기 현재 영상의 경계를 포함하는 분할 대상 블록을 복수의 하위 블록들로 분할하는 제2 분할 단계를 포함하고,
상기 제2 분할 단계는, 상기 하위 블록들 중 상기 현재 영상의 경계를 포함하는 하위 블록이 존재하지 않을 때까지, 상기 현재 영상의 경계를 포함하는 하위 블록을 상기 분할 대상 블록으로하여 재귀적으로 수행되고,
상기 제2 분할 단계는, 상기 분할 대상 블록의 크기 및 임계값에 기초하여 쿼드 트리 분할 또는 이진 트리 분할을 선택적으로 적용하여 상기 분할 대상 블록을 분할하되, 상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할 또는 상기 이진 트리 분할이 수행된 경우, 상기 분할 대상 블록의 분할 여부를 나타내는 분할 정보는 비트스트림으로부터 복호화되지 않고 소정의 값으로 유도되며,
상기 쿼드 트리 분할은, 상기 분할 대상 블록의 크기와 쿼드 트리 분할이 가능한 블록의 크기를 비교한 결과에 기초하여 수행되고,
상기 이진 트리 분할은, 상기 쿼드 트리 분할이 수행되지 않는 경우, 상기 분할 대상 블록의 크기와 이진 트리 분할이 가능한 블록의 크기 및 상기 임계값을 비교한 결과에 기초하여 수행되고,
상기 임계값은, 상기 이진 트리 분할이 가능한 블록의 크기와는 상이하며, 쿼드 트리 분할이 가능한 블록의 최대 크기와 최소 크기 사이의 값인, 영상 복호화 방법.
A first segmentation step for dividing the current image into multiple blocks; and
A second segmentation step is included for segmenting a segmentation target block including a boundary of the current image among the plurality of blocks into a plurality of sub-blocks.
The second segmentation step is performed recursively using a sub-block including a boundary of the current image as a segmentation target block until there is no sub-block including a boundary of the current image among the sub-blocks.
The second division step selectively applies quad tree division or binary tree division based on the size and threshold of the division target block to divide the division target block, and when the quad tree division or binary tree division is performed on the division target block in the second division step, division information indicating whether the division target block is divided is derived as a predetermined value without being decoded from the bitstream.
The above quad tree division is performed based on the result of comparing the size of the division target block and the size of a block that can be divided into quad tree divisions.
The above binary tree division is performed based on the result of comparing the size of the division target block with the size of a block capable of binary tree division and the threshold value when the quad tree division is not performed.
A method for decoding an image, wherein the threshold value is different from the size of a block capable of binary tree division, and is a value between the maximum size and the minimum size of a block capable of quad tree division.
삭제delete 제8항에 있어서,
상기 분할 대상 블록의 최우측 위치 및 상기 분할 대상 블록의 최하단 위치 중 어느 하나가 상기 현재 영상의 영역에 포함되지 않는 경우,
이진 트리 분할이 가능한 최대 블록 크기에 기초하여, 상기 분할 대상 블록에 이진 트리 분할을 적용할지 여부를 결정하는 영상 복호화 방법.
In Article 8,
If either the rightmost position of the above division target block or the bottommost position of the above division target block is not included in the area of the current image,
An image decoding method for determining whether to apply binary tree splitting to a block to be split based on a maximum block size for which binary tree splitting is possible.
제8항에 있어서,
상기 하위 블록들 중 상기 현재 영상의 경계를 포함하지 않고 동시에, 상기 현재 영상의 밖에 위치하는 하위 블록에 대해서는 상기 제2 분할 단계 및 복호화를 생략하는 영상 복호화 방법.
In Article 8,
An image decoding method wherein the second segmentation step and decoding are omitted for sub-blocks among the above sub-blocks that do not include the boundary of the current image and are located outside the current image.
제8항에 있어서,
상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할 또는 상기 이진 트리 분할이 수행된 경우, 상기 분할 대상 블록이 쿼드 트리 분할되는지의 여부를 나타내는 제1 분할 정보 또는 상기 분할 대상 블록이 이진 트리 분할되는지의 여부를 나타내는 제2 분할 정보는 비트스트림으로부터 복호화되지 않고, 소정의 값으로 유도되는 영상 복호화 방법.
In Article 8,
A method for decoding an image, wherein, in the second division step, when the quad tree division or the binary tree division is performed on the division target block, the first division information indicating whether the division target block is divided into a quad tree or the second division information indicating whether the division target block is divided into a binary tree is not decoded from the bitstream but is derived as a predetermined value.
제8항에 있어서,
상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 이진 트리 분할이 수행된 경우,
상기 이진 트리 분할의 분할 방향은, 상기 분할 대상 블록의 최우측 위치 및 상기 분할 대상 블록의 최하단 위치 중 어느 쪽이 상기 현재 영상의 영역에 포함되지 않는지에 기초하여 결정되는 영상 복호화 방법.
In Article 8,
If the binary tree division is performed on the division target block in the second division step,
An image decoding method, wherein the division direction of the binary tree division is determined based on whether the rightmost position of the division target block and the bottommost position of the division target block are not included in the area of the current image.
제8항에 있어서,
상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 이진 트리 분할이 수행된 경우,
상기 이진 트리 분할의 분할 방향을 나타내는 분할 방향 정보는 비트스트림으로부터 복호화되지 않고, 소정의 값으로 유도되는 영상 복호화 방법.
In Article 8,
If the binary tree division is performed on the division target block in the second division step,
An image decoding method in which the splitting direction information indicating the splitting direction of the above binary tree split is not decoded from the bitstream but is derived as a predetermined value.
제8항에 있어서,
상기 이진 트리 분할의 분할 방향은,
상기 분할 대상 블록의 최우측 위치가 상기 현재 영상의 영역에 포함되지 않는 경우, 세로 방향이고,
상기 분할 대상 블록의 최하단 위치가 상기 현재 영상의 영역에 포함되지 않는 경우, 가로 방향인 영상 복호화 방법.
In Article 8,
The division direction of the above binary tree division is,
If the rightmost position of the above-mentioned segmentation target block is not included in the area of the above-mentioned current image, it is in the vertical direction,
A horizontal image decoding method when the lowest position of the above-mentioned segmentation target block is not included in the area of the above-mentioned current image.
영상 부호화 방법에 의해 생성된 비트스트림을 저장하는 컴퓨터 판독 가능한 기록 매체로서,
상기 영상 부호화 방법은,
현재 영상을 복수의 블록들로 분할하는 제1 분할 단계; 및
상기 복수의 블록들 중 상기 현재 영상의 경계를 포함하는 분할 대상 블록을 복수의 하위 블록들로 분할하는 제2 분할 단계를 포함하고,
상기 제2 분할 단계는, 상기 하위 블록들 중 상기 현재 영상의 경계를 포함하는 하위 블록이 존재하지 않을 때까지, 상기 현재 영상의 경계를 포함하는 하위 블록을 상기 분할 대상 블록으로하여 재귀적으로 수행되고,
상기 제2 분할 단계는, 상기 분할 대상 블록의 크기 및 임계값에 기초하여 쿼드 트리 분할 또는 이진 트리 분할을 선택적으로 적용하여 상기 분할 대상 블록을 분할하되, 상기 제2 분할 단계에서 상기 분할 대상 블록에 대해 상기 쿼드 트리 분할 또는 상기 이진 트리 분할이 수행된 경우, 상기 분할 대상 블록의 분할 여부를 나타내는 분할 정보는 부호화되지 않고,
상기 쿼드 트리 분할은, 상기 분할 대상 블록의 크기와 쿼드 트리 분할이 가능한 블록의 크기를 비교한 결과에 기초하여 수행되고,
상기 이진 트리 분할은, 상기 쿼드 트리 분할이 수행되지 않는 경우, 상기 분할 대상 블록의 크기와 이진 트리 분할이 가능한 블록의 크기 및 상기 임계값을 비교한 결과에 기초하여 수행되고,
상기 임계값은, 상기 이진 트리 분할이 가능한 블록의 크기와는 상이하며, 쿼드 트리 분할이 가능한 블록의 최대 크기와 최소 크기 사이의 값인 것을 특징으로 하는, 기록매체.
A computer-readable recording medium storing a bitstream generated by a video encoding method,
The above image encoding method is,
A first segmentation step for dividing the current image into multiple blocks; and
A second segmentation step is included for segmenting a segmentation target block including a boundary of the current image among the plurality of blocks into a plurality of sub-blocks.
The second segmentation step is performed recursively using a sub-block including a boundary of the current image as a segmentation target block until there is no sub-block including a boundary of the current image among the sub-blocks.
The second division step selectively applies quad tree division or binary tree division based on the size and threshold of the division target block to divide the division target block, and if the quad tree division or binary tree division is performed on the division target block in the second division step, division information indicating whether the division target block is divided is not encoded.
The above quad tree division is performed based on the result of comparing the size of the division target block and the size of a block that can be divided into quad tree divisions.
The above binary tree division is performed based on the result of comparing the size of the division target block with the size of a block capable of binary tree division and the threshold value when the quad tree division is not performed.
A recording medium, characterized in that the threshold value is different from the size of a block capable of binary tree division, and is a value between the maximum size and the minimum size of a block capable of quad tree division.
KR1020230033494A 2016-10-14 2023-03-14 Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream Active KR102751535B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020250000609A KR20250011702A (en) 2016-10-14 2025-01-03 Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR20160133754 2016-10-14
KR1020160133754 2016-10-14
KR1020170127939A KR102511611B1 (en) 2016-10-14 2017-09-29 Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020170127939A Division KR102511611B1 (en) 2016-10-14 2017-09-29 Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020250000609A Division KR20250011702A (en) 2016-10-14 2025-01-03 Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream

Publications (2)

Publication Number Publication Date
KR20230042236A KR20230042236A (en) 2023-03-28
KR102751535B1 true KR102751535B1 (en) 2025-01-09

Family

ID=85800160

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020230033494A Active KR102751535B1 (en) 2016-10-14 2023-03-14 Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream

Country Status (1)

Country Link
KR (1) KR102751535B1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101452713B1 (en) * 2009-10-30 2014-10-21 삼성전자주식회사 Method and apparatus for encoding and decoding coding unit of picture boundary
ES2746182T3 (en) * 2010-04-13 2020-03-05 Ge Video Compression Llc Prediction between planes

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Benjamin Bross et al, Proposed Editorial Improvements for High efficiency video coding (HEVC) Text Specification Draft 8, JCT-VC, JCTVC-K0030_v1, 2012-09-12, pp. 1-255

Also Published As

Publication number Publication date
KR20230042236A (en) 2023-03-28

Similar Documents

Publication Publication Date Title
JP6950055B2 (en) Video information coding / decoding method and equipment
KR102721487B1 (en) Method and apparatus for encoding/decoding an image
JP7391958B2 (en) Video signal encoding/decoding method and equipment used in the method
JP7423624B2 (en) Video signal encoding/decoding method and equipment
KR20210006993A (en) Intra prediction method based on CCLM and apparatus therefor
CN112823514A (en) Image signal encoding/decoding method and apparatus thereof
KR102416804B1 (en) Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream
CN113039788A (en) Video signal encoding/decoding method and apparatus for the same
CN113395517A (en) Video signal encoding/decoding method and apparatus thereof
KR102422485B1 (en) Method and apparatus for processing a video signal
KR20250011702A (en) Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream
KR20200093469A (en) Method for encoding/decoidng video signal and apparatus therefor
KR20190115426A (en) Method and apparatus for encoding/decoding an image
KR20220098114A (en) Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream
KR20230114250A (en) Method for encodign/decodign video signal and apparatus therefor
KR20240124260A (en) Method and apparatus for encoding/decoding an image
KR102389267B1 (en) A method and an apparatus for processing a video signal based on reference between components
KR102751535B1 (en) Image encoding method/apparatus, image decoding method/apparatus and and recording medium for storing bitstream
KR20220051156A (en) A method and an apparatus for processing a video signal based on reference between components
KR102870740B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR102693948B1 (en) Method and apparatus for encoding/decoding an image
KR20230005506A (en) Video Encoding And Decoding Method Using Transform Coefficients Sign Bit Hiding
HK40045584A (en) Image signal encoding/decoding method and apparatus therefor
HK1195980B (en) Determining boundary strength values for deblocking filtering for video coding
KR20140129410A (en) Method for encoding and decoding image using transform, and apparatus thereof

Legal Events

Date Code Title Description
A107 Divisional application of patent
PA0107 Divisional application

Comment text: Divisional Application of Patent

Patent event date: 20230314

Patent event code: PA01071R01D

Filing date: 20170929

Application number text: 1020170127939

PG1501 Laying open of application
E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

Comment text: Notification of reason for refusal

Patent event date: 20231208

Patent event code: PE09021S01D

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

Patent event code: PE07011S01D

Comment text: Decision to Grant Registration

Patent event date: 20241002

PG1601 Publication of registration