WO2016182316A1 - 인트라 예측을 수행하는 영상 복호화 방법 및 그 장치 및 인트라 예측을 수행하는 영상 부호화 방법 및 그 장치 - Google Patents

인트라 예측을 수행하는 영상 복호화 방법 및 그 장치 및 인트라 예측을 수행하는 영상 부호화 방법 및 그 장치 Download PDF

Info

Publication number
WO2016182316A1
WO2016182316A1 PCT/KR2016/004873 KR2016004873W WO2016182316A1 WO 2016182316 A1 WO2016182316 A1 WO 2016182316A1 KR 2016004873 W KR2016004873 W KR 2016004873W WO 2016182316 A1 WO2016182316 A1 WO 2016182316A1
Authority
WO
WIPO (PCT)
Prior art keywords
current block
contour
sample
block
segment
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.)
Ceased
Application number
PCT/KR2016/004873
Other languages
English (en)
French (fr)
Inventor
박민우
최인권
이진영
김찬열
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Samsung Electronics Co Ltd filed Critical Samsung Electronics Co Ltd
Priority to CN201680040532.5A priority Critical patent/CN107852506A/zh
Priority to JP2017559102A priority patent/JP6532542B2/ja
Priority to EP16792962.9A priority patent/EP3273694A4/en
Priority to AU2016262259A priority patent/AU2016262259B2/en
Priority to US15/573,320 priority patent/US20180176595A1/en
Priority to KR1020177032854A priority patent/KR20180006915A/ko
Publication of WO2016182316A1 publication Critical patent/WO2016182316A1/ko
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/14Coding unit complexity, e.g. amount of activity or edge presence estimation
    • 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
    • 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/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process

Definitions

  • An image decoding method and apparatus for performing intra prediction and an image encoding method and apparatus for performing intra prediction are described in detail below.
  • video codec for efficiently encoding or decoding high resolution or high definition video content.
  • video is encoded according to a limited encoding method based on coding units having a tree structure.
  • image data in the spatial domain is transformed into coefficients in the frequency domain.
  • the video codec divides an image into blocks of a predetermined size for fast computation of a transform, performs a DCT transform for each block, and encodes frequency coefficients in units of blocks. Compared to the image data of the spatial domain, the coefficients of the frequency domain are easily compressed. In particular, since the image pixel value of the spatial domain is expressed as a prediction error through inter prediction or intra prediction of the video codec, a large amount of data may be converted to 0 when the prediction error is transformed.
  • the video codec reduces data volume by substituting data repeatedly generated continuously with small size data.
  • a more precise and simple prediction method may be provided to increase encoding efficiency and to increase transmission efficiency.
  • a video decoding method may include determining whether first and second coordinates of the contour determined according to mode information of a contour for determining at least one segment from a current block are derivable from neighboring blocks of the current block. Determining; If at least a first coordinate and a second coordinate of the contour can be derived from a neighboring block of the current block, the at least from the current block based on the first and second coordinates of the contour derived from a neighboring block of the current block; Determining one segment; Determining whether to perform prediction according to a direction of the boundary with respect to a boundary area including a boundary of segments constituting the current block; And if it is determined that prediction is performed in the boundary area according to the direction of the boundary, performing prediction on the boundary area using the surrounding samples of the current block according to the direction of the boundary.
  • FIG. 1A is a block diagram of a video encoding apparatus for performing contour-based intra prediction, according to an embodiment.
  • FIG. 1B is a flowchart of a video encoding method of performing contour-based intra prediction, according to an embodiment.
  • FIG. 2A is a block diagram of a video decoding apparatus for performing contour-based intra prediction, according to an embodiment.
  • 2B is a flowchart of a video decoding method of performing contour-based intra prediction, according to an embodiment.
  • FIG. 3 is a block diagram of an image encoder based on coding units, according to an embodiment.
  • FIG. 4 is a block diagram of an image decoder based on coding units, according to an exemplary embodiment.
  • 5A to 5C illustrate a method of determining a segment that is a prediction unit for prediction encoding from a current block according to various embodiments.
  • FIG. 6 illustrates a method of determining a segment for prediction encoding from a current block by using an outline according to an object boundary according to various embodiments.
  • FIGS. 7A and 7B are diagrams for describing a mode of an outline for determining at least one segment from a current block according to various embodiments.
  • FIG. 8 shows examples of modes of contour for determining at least one segment from the current block of FIG. 7A.
  • FIG. 9 shows examples of mode information of an outline indicating a mode of the outline of FIG. 8.
  • FIG. 10 illustrates a current block according to an embodiment.
  • FIG. 11 illustrates a method of determining coordinates of an outline for determining at least one segment from a current block, according to an embodiment.
  • 12 to 14 illustrate a method of determining coordinates of an outline for determining at least one segment from a current block according to various embodiments.
  • 15 to 16B illustrate a method of determining the coordinates of an outline according to the precision of a sample, according to various embodiments.
  • FIG. 17 illustrates an example of a mask representing segments forming a current block, according to an exemplary embodiment.
  • FIG. 18 illustrates examples of various methods of determining a mask value of a sample included in a boundary area of the current block of FIG. 17.
  • 19 and 20 illustrate examples of a method of generating a mask of a current block according to various embodiments.
  • 21 illustrates an example of a method of generating a mask of the current block, according to an embodiment.
  • 22 illustrates a method of performing prediction on segments of a current block, according to an embodiment.
  • 23 illustrates a method of performing prediction on segments of a current block according to an embodiment.
  • 24 is a diagram for describing a method of transmitting sample values of segments of a current block according to various embodiments.
  • 25 and 26 illustrate a method of generating a sample value of a segment of a current block by using neighboring samples of the current block according to various embodiments.
  • FIG. 27 is a flowchart of a method of predicting a current block according to the number of segments divided from a current block, according to an embodiment.
  • FIG. 28 is a diagram for describing a process of encoding and decoding residual data of a current block according to a transformation unit of a current block, according to an embodiment.
  • 29 to 31 illustrate a method of obtaining a contour of a current block from neighboring blocks of the current block according to various embodiments.
  • 32 and 33 illustrate a method of performing prediction by using a subblock of a current block according to various embodiments.
  • 34 illustrates a method of determining three segments from a current block according to an embodiment.
  • 35 illustrates a method of determining segments using subblocks of a current block based on an outline of a current block according to an embodiment.
  • 36 illustrates a method of determining a contour of a current block according to an embodiment.
  • 37 is a diagram illustrating a method of obtaining a prediction value of a current block, according to an embodiment, in pseudo code.
  • 38 illustrates a method of performing prediction on a current block, according to an embodiment.
  • 39 illustrates a detailed process of performing prediction using a reference sample with respect to a current block according to an embodiment.
  • 40A to 40C illustrate a method of performing prediction on a boundary area of a current block according to various embodiments.
  • 41 illustrates a method of performing prediction on a boundary area of a current block according to various embodiments.
  • FIG. 42 illustrates a method of performing prediction on a boundary area of a current block according to an embodiment.
  • 43 and 44 illustrate a method of performing prediction on a boundary area of a current block according to various embodiments.
  • 45 illustrates syntax elements for performing intra prediction, according to an embodiment.
  • 46 is a diagram illustrating deeper coding units according to depths, and prediction units, according to various embodiments.
  • 48 is a diagram illustrating encoding information according to various embodiments.
  • a video decoding method may include determining whether first and second coordinates of the contour determined according to mode information of a contour for determining at least one segment from a current block are derivable from neighboring blocks of the current block. Determining; If at least a first coordinate and a second coordinate of the contour can be derived from a neighboring block of the current block, the at least from the current block based on the first and second coordinates of the contour derived from a neighboring block of the current block; Determining one segment; Determining whether to perform prediction according to a direction of the boundary with respect to a boundary area including a boundary of segments constituting the current block; And if it is determined that prediction is performed in the boundary area according to the direction of the boundary, performing prediction on the boundary area using the surrounding samples of the current block according to the direction of the boundary.
  • the performing of the prediction on the boundary area may include: determining the width of the boundary area when it is determined to perform the prediction according to a direction of the boundary on the boundary area; And performing prediction on the boundary area according to the determined width.
  • the width of the boundary area may be the number of samples in the horizontal direction or the number of samples in the vertical direction with respect to the samples positioned at the boundaries of the segments constituting the current block.
  • the determining of the width of the boundary area may be based on information indicating the width of the boundary area obtained from the bitstream.
  • the width of the boundary area may be determined using a neighboring block of the current block.
  • the method may further include performing prediction on the remaining areas of the current block except for the boundary area when the current block is not included in all of the boundary areas according to the determined width.
  • the method may further include: generating a mask of the current block indicating a boundary of segments constituting the current block when it is determined that prediction is not performed according to the direction of the boundary with respect to the boundary area; Determining sample values of samples included in the at least one segment using the surrounding samples of the current block; And determining a prediction value of the boundary area based on the generated mask and the sample values of the determined samples.
  • the mask of the current block may be determined by determining a mask value of a sample of the current block based on a positional relationship between a boundary of segments constituting the current block and a sample of the current block. It may be characterized in that for generating.
  • the method may further include filtering the boundary area of the current block based on the mask of the current block.
  • the performing of the filtering may include determining whether a sample of the current block is a sample located at a boundary of segments constituting the current block based on a mask of the current block; And if the samples of the current block are located at the boundary, filtering the samples of the current block based on the neighboring samples of the samples of the current block.
  • a video encoding method may include determining whether first and second coordinates of the contour determined according to a mode of the contour for determining at least one segment from a current block are derivable from neighboring blocks of the current block. Determining; If at least a first coordinate and a second coordinate of the contour can be derived from a neighboring block of the current block, the at least from the current block based on the first and second coordinates of the contour derived from a neighboring block of the current block; Determining one segment; Determining whether to perform prediction according to a direction of the boundary with respect to a boundary area including a boundary of segments constituting the current block; And encoding information indicating whether to perform prediction according to the direction of the boundary and mode information of an outline indicating the direction of the boundary in the boundary area.
  • the method may further include determining a width of the boundary area when it is determined that prediction is performed in the boundary area according to the direction of the boundary.
  • the method may further include encoding information indicating the width of the determined boundary region.
  • the width of the boundary area may be determined using a neighboring block of the current block.
  • the method may further include performing prediction according to a direction of the boundary on the boundary area according to the determined width; And when the current block is not included in all of the boundary regions according to the determined width, performing prediction on the remaining regions of the current block except for the boundary region.
  • the method may further include: generating a mask of the current block indicating a boundary of segments constituting the current block when it is determined that prediction is not performed according to the direction of the boundary with respect to the boundary area; Determining sample values of samples included in the at least one segment using the surrounding samples of the current block; And determining a prediction value of the boundary area based on the generated mask and the sample values of the determined samples.
  • the mask of the current block may be determined by determining a mask value of a sample of the current block based on a positional relationship between a boundary of segments constituting the current block and a sample of the current block. It may be characterized in that for generating.
  • the method may further include filtering the boundary area of the current block based on the mask of the current block.
  • the performing of the filtering may include determining whether a sample of the current block is a sample located at a boundary of segments constituting the current block based on a mask of the current block; And if the samples of the current block are located at the boundary, filtering the samples of the current block based on the neighboring samples of the samples of the current block.
  • a video decoding apparatus may further include deriving first and second coordinates of a contour from neighboring blocks of the current block, which are determined according to mode information of a contour for determining at least one segment from a current block. Determine whether it is possible, and if the first coordinate and the second coordinate of the contour are derivable from the neighboring block of the current block, based on the first and second coordinates of the contour derived from the neighboring block of the current block; A segment determination unit that determines the at least one segment from a current block; And determining whether to perform prediction according to the direction of the boundary with respect to the boundary region including the boundary of the segments constituting the current block, and determining to perform prediction according to the direction of the boundary in the boundary region. And a prediction performer configured to perform prediction on the boundary area by using the neighboring samples of the current block in the direction of the boundary.
  • a contour-based intra prediction coding method and a contour-based intra decoding method according to an embodiment are proposed.
  • 46 to 48 a video encoding method and a video decoding method based on coding units having a hierarchical structure according to an embodiment when the intra prediction video encoding method based on the previously proposed contour is not used. Is initiated.
  • the 'image' may be a still image of the video or a video, that is, the video itself.
  • sample means data to be processed as data allocated to a sampling position of an image.
  • residuals of the pixel values or the block in the image of the spatial domain may be samples.
  • the term 'current block' may mean a block of an image to be encoded or decoded.
  • 'Neighboring Block' indicates at least one coded or decoded block neighboring the current block.
  • the neighboring block may be located at the top of the current block, at the top right of the current block, at the left of the current block, or at the top left of the current block. It may also include temporally neighboring blocks as well as spatially neighboring blocks.
  • the temporally neighboring neighboring blocks may include co-located blocks or neighboring blocks of the same location block as the current block of the reference picture.
  • FIGS. 1A to 45 a video decoding and encoding apparatus and a video decoding and encoding method for performing contour-based intra prediction according to an embodiment are described with reference to FIGS. 1A to 45.
  • 1A is a block diagram of a video encoding apparatus 10 that performs contour-based intra prediction, according to an embodiment.
  • 1B is a flowchart of a video encoding method of performing contour-based intra prediction, according to an embodiment.
  • the video encoding apparatus 10 may include a segment determiner 12, a prediction performer 16, and a bitstream generator 16.
  • the current pictures included in the video according to an embodiment may be partitioned into a maximum coding unit that is a coding unit having a maximum size. For example, if the current picture is larger than the maximum coding unit, image data of the current picture may be split into at least one maximum coding unit.
  • the maximum coding unit may be a data unit having a size of 16x16, 32x32, 64x64, 128x128, 256x256, etc., and may be a square data unit having a square power of 2 with a horizontal and vertical size greater than eight.
  • the coding unit according to an embodiment may be determined according to the maximum size and depth.
  • the depth indicates the number of times the coding unit is spatially divided from the maximum coding unit, and as the depth increases, the coding unit for each depth may be split from the maximum coding unit to the minimum coding unit.
  • the depth of the largest coding unit may be the highest depth, and the depth of the minimum coding unit may be the coded depth.
  • the maximum coding unit decreases as the depth increases, the size of the coding unit for each depth decreases, and thus, the coding unit of the higher depth may include coding units of a plurality of lower depths.
  • the image data of the current picture may be divided into maximum coding units according to the maximum size of the coding unit, and each maximum coding unit may include coding units divided by depths. Since the maximum coding unit is divided according to depths, image data of a spatial domain included in the maximum coding unit may be hierarchically classified according to depths.
  • the maximum depth and the maximum size of the coding unit that limit the total number of times of hierarchically dividing the height and the width of the maximum coding unit may be preset.
  • Image data in a maximum coding unit is encoded based on coding units according to depths according to at least one depth less than or equal to a maximum depth, and encoding results based on coding units for each depth are compared. As a result of comparing the encoding error of the coding units according to depths, a depth having the smallest encoding error may be selected. At least one coding depth may be determined for each maximum coding unit.
  • the coding unit is hierarchically divided and the number of coding units increases.
  • a coding error of each data is measured, and whether or not division into a lower depth is determined. Therefore, even in the data included in one largest coding unit, since the encoding error for each depth is different according to the position, the coding depth may be differently determined according to the position. Accordingly, one or more coding depths may be set for one maximum coding unit, and data of the maximum coding unit may be partitioned according to coding units of one or more coding depths.
  • coding units having a tree structure included in the current maximum coding unit may be determined.
  • the coding units having a tree structure according to an embodiment include coding units having a depth determined as a coding depth among all deeper coding units included in the maximum coding unit.
  • the coding unit of the coding depth may be hierarchically determined according to the depth in the same region within the maximum coding unit, and may be independently determined for the other regions.
  • the coded depth for the current region may be determined independently of the coded depth for the other region.
  • the maximum depth according to an embodiment is an index related to the number of divisions from the maximum coding unit to the minimum coding unit.
  • the first maximum depth according to an embodiment may represent the total number of divisions from the maximum coding unit to the minimum coding unit.
  • the second maximum depth according to an embodiment may represent the total number of depth levels from the maximum coding unit to the minimum coding unit. For example, when the depth of the largest coding unit is 0, the depth of the coding unit obtained by dividing the largest coding unit once may be set to 1, and the depth of the coding unit divided twice may be set to 2. In this case, if the coding unit divided four times from the maximum coding unit is the minimum coding unit, since depth levels of 0, 1, 2, 3, and 4 exist, the first maximum depth is set to 4 and the second maximum depth is set to 5. Can be.
  • prediction encoding and transformation of the largest coding unit may be performed.
  • prediction encoding and transformation are performed based on depth-wise coding units for each maximum coding unit and for each depth less than or equal to the maximum depth.
  • the video encoding apparatus 10 may variously select a size or shape of a data unit for encoding image data.
  • the encoding of the image data is performed through prediction encoding, transforming, entropy encoding, and the like.
  • the same data unit may be used in every step, or the data unit may be changed in steps.
  • the video encoding apparatus 10 may select not only a coding unit for encoding the image data, but also a data unit different from the coding unit in order to perform predictive encoding of the image data in the coding unit.
  • prediction encoding may be performed based on a coding unit of a coding depth, that is, a more strange undivided coding unit, according to an embodiment.
  • a more strange undivided coding unit that is the basis of prediction coding is referred to as a 'prediction unit'.
  • the original image may include a boundary of an object represented by a straight line or the like in the original image, and the current block of the image may determine the outline of the current block according to the boundary of the object.
  • the outline of the current block may be a straight line, a curve, a broken line, etc. according to the boundary of the object represented by the values of the samples of the current block.
  • the contour of the current block may be divided into segments that are prediction units of the current block.
  • the prediction mode of the prediction unit may be at least one of an intra mode, an inter mode, and a skip mode.
  • the encoding may be performed independently for each prediction unit within the coding unit to select a prediction mode having the smallest encoding error.
  • the segment determiner 12 may determine whether to perform contour-based prediction on the current block. That is, the segment determiner 12 according to an exemplary embodiment may determine whether to determine a prediction unit for performing prediction of the current block based on a contour along a boundary of an object included in the current block.
  • the segment determiner 12 may convert the current block into a plurality of segments of various types based on the contour according to the sample values of the current block. Can be split.
  • the segment determiner 12 may divide the partition type into one partition type among predetermined partition types of the current block.
  • the segment determiner 12 may determine segments to be divided based on the contour of the current block from the current block in order to perform prediction on the current block.
  • the contour of the current block according to an embodiment may be determined corresponding to the boundary of an object included in the current block.
  • the contour of the current block according to one embodiment may be determined based on the values of the samples of the current block or using the neighboring blocks of the current block.
  • the segment determiner 12 may determine a mode of the contour of the current block according to the contour of the current block.
  • the mode of the contour of the current block may indicate the direction of the contour in the current block.
  • a mode of the contour indicating a side through which the contour passes among respective sides of the current block may be determined.
  • the mode of the contour of the current block may represent at least two sides of which the contour touches among the upper side, the right side, the lower side, and the left side of the current block.
  • the mode of the contour for determining the at least one segment from the current block according to an embodiment may be determined as one of the first to sixth modes.
  • the video encoding apparatus 10 may perform all of the decoding and decoding of the current block according to the first to sixth modes by using a rate-distortion optimization (RDO) method, which is the best among the first to sixth modes. You can select a mode with an RD cost.
  • RDO rate-distortion optimization
  • the segment determiner 12 may determine mode information of the contour according to the determined mode of the contour of the current block.
  • the segment determination unit 12 may assign a number to each side of the current block, and determine a combination of numbers corresponding to the side indicated by the mode of the outline of the current block as mode information of the outline of the current block.
  • the segment determiner 12 may determine whether to derive information about coordinates of the contour of the current block from neighboring blocks of the current block.
  • the information about the coordinates of the outline is information for specifying the position of the outline and may indicate coordinates of the x-axis and the y-axis of the outline.
  • the information about the coordinates of the contour of the current block may include first coordinates indicating a start point of the single straight contour and second coordinates indicating an end point of the contour. It may be information indicating.
  • the segment determiner 12 when the information about the coordinates of the contour of the current block can be derived from the neighboring block of the current block, the segment determiner 12 according to an embodiment acquires information about the coordinates of the contour of the current block from the neighboring block. can do. Alternatively, when the information about the coordinates of the contour of the current block is not derivable from the neighboring blocks of the current block, the segment determiner 12 according to an embodiment uses the samples inside the current block to determine the coordinates of the contour. Determine information
  • the segment determiner 12 may determine that the neighboring sample adjacent to the outside of the side of the current block indicated by the mode of the outline of the current block is available. Coordinates can be derived from adjacent surrounding samples. For example, a usable sample among neighboring samples adjacent to the outside of the current block may be a sample located above or to the left of the current block.
  • the segment determiner 12 may determine that the segment located in the corresponding side of the current block is not available when a neighboring sample adjacent to the outside of the side of the current block indicated by the mode of the current block is not available. Coordinates can be determined from samples inside the current block. For example, a sample that is not available among neighboring samples adjacent to the outside of the current block may be a sample located below or to the right of the current block.
  • the samples inside the current block to be used may be samples adjacent to the inside of the side of the current block, Since the coordinates cannot be derived from the neighboring block, the coordinates can be transmitted to the video decoding apparatus 20.
  • the segment determiner 12 may determine at least one segment for prediction from the current block based on the determined information about the coordinates of the contour of the current block.
  • the prediction performing unit 14 may perform the boundary area corresponding to the contour of the current block with respect to the boundary area representing the boundary of the segments of the current block. You can decide whether to perform the prediction. That is, the prediction performing unit 14 may determine whether to determine the prediction value for the samples included in the boundary area of the current block based on the direction of the boundary.
  • the prediction performing unit 14 may select a prediction method having the best RD cost among the prediction method according to the direction of the boundary of the current block and the prediction method using the mask of the current block.
  • the boundary area of the current block may be an area composed of samples through which the contour of the current block passes, or may be an area including a predetermined width based on the contour of the current block.
  • the predetermined width of the boundary region may represent the number of predetermined samples in the horizontal direction or the number of samples in the vertical direction centering on the samples located at the boundaries of the segments constituting the current block.
  • the predetermined width may indicate not only the distance in the horizontal direction or the distance in the vertical direction, but also the distance in the direction orthogonal to the boundary with respect to the boundary of the segments constituting the current block.
  • the prediction performing unit 14 may determine the width of the boundary area of the current block using the neighboring blocks of the current block.
  • the prediction execution unit 14 may determine the width of the boundary area of the current block as a candidate having the best RD cost among the plurality of predetermined size candidates.
  • the prediction performing unit 14 uses neighboring samples of the current block according to the direction of the boundary with respect to the boundary area of the current block. You can make predictions.
  • a peripheral sample of the current block may be a sample adjacent to the outside of the current block, and may include, for example, an upper peripheral sample, a right upper peripheral sample, a left peripheral sample, and a lower left peripheral sample of the current block. have.
  • the prediction performing unit 14 may determine a reference sample determined according to the direction of the boundary from the current sample of the boundary region among the neighboring samples of the current block.
  • the prediction performing unit 14 may generate a prediction value of the samples included in the boundary region of the current block based on the determined sample value of the reference sample.
  • the prediction performing unit 14 may perform the prediction on the remaining areas of the current block except the boundary area, that is, the area corresponding to the segment.
  • intra prediction according to the DC mode may be performed on the segment region.
  • a mask of the current block indicating the boundary between the segments is generated. Can be.
  • the mask of the current block is data for determining an area of at least one segment divided from the current block and a boundary between the segments, and may include an array of mask values corresponding to respective samples of the current block. have.
  • the mask value of the current block may be generated based on the positional relationship between the contour of the current block and each sample value of the current block.
  • the prediction performing unit 14 may perform intra prediction based on contours on segments of the current block.
  • the prediction performing unit 14 may perform prediction on the current block by using the neighboring samples of the current block and the generated mask of the current block.
  • the prediction performing unit 14 may generate a sample value of a segment of the current block by using neighboring samples of the current block.
  • the sample value of the segment may be a sample value of each of the samples included in the segment region.
  • an intra prediction scheme such as DC mode may be used.
  • the position of the neighboring sample of the current block to be referenced may be determined based on the mode of the contour of the current block.
  • the prediction performing unit 14 may generate a prediction value of the segment of the current block by applying a mask of the current block to the sample value of the generated segment of the current block.
  • the prediction value of the segment may be a prediction value of each sample included in the segment region, and may be generated using a weighted sum of the sample value of the segment of the current block and the mask value of the current block.
  • filtering may be performed on the current block on which prediction is performed, according to an embodiment.
  • filtering may be performed on prediction values of samples located at boundaries between segments of the current block of the current block.
  • whether the sample of the current block is a sample located at the boundary of the current block may be determined based on a mask of the current block.
  • the video encoding apparatus 10 may perform the transformation of the image data of the coding unit based on not only the coding unit for encoding the image data but also a data unit different from the coding unit.
  • the transformation may be performed based on a data unit having a size smaller than or equal to the coding unit.
  • the data unit for the transformation may include a data unit for the intra mode and a data unit for the inter mode.
  • the data unit on which the transformation is based may be referred to as a 'transformation unit'.
  • the residual data of the coding unit may be partitioned according to the transform unit having a tree structure according to the transform depth.
  • a transform depth indicating a number of divisions between the height and the width of the coding unit divided to the transform unit may be set. For example, if the size of the transform unit of the current coding unit of size 2Nx2N is 2Nx2N, the transform depth is 0, the transform depth 1 if the size of the transform unit is NxN, and the transform depth 2 if the size of the transform unit is N / 2xN / 2. Can be. That is, the transformation unit having a tree structure may also be set for the transformation unit according to the transformation depth.
  • the encoded information for each coded depth requires not only the coded depth but also prediction related information and transformation related information. Therefore, not only a coding depth that generates a minimum coding error, but also a partition type obtained by dividing a prediction unit into partitions, a prediction mode for each prediction unit, and a size of a transformation unit for transformation may be determined.
  • a coding error of coding units according to depths may be measured by using a Lagrangian multiplier based rate-distortion optimization technique.
  • the bitstream generator 16 may generate a bitstream including information necessary for encoding and decoding the current block.
  • the bitstream generator 16 may generate a bitstream including information indicating whether to perform contour based prediction on the current block.
  • bitstream generator 16 may generate a bitstream including the mode information of the outline indicating the mode of the outline of the current block.
  • the bitstream generator 16 may generate a bitstream including information about coordinates of the contour of the current block according to mode information of the contour of the current block. For example, when the mode information of the contour of the current block indicates that the coordinates of the contour of the current block can be derived from neighboring blocks of the current block, the information about the coordinates of the contour of the current block may not be included in the bitstream. In addition, when the mode information of the contour of the current block indicates that the coordinates of the contour of the current block are not derivable from neighboring blocks of the current block, information about the coordinates of the contour of the current block may be included in the bitstream.
  • bitstream generation unit 16 may include information indicating whether to perform prediction according to the direction of the boundary with respect to the current block, information about the width of the boundary area of the current block, and prediction values of the current block. Information indicating whether to perform filtering may be further included in the bitstream.
  • bitstream generator 16 may include information about a coded depth, information about a coding mode according to depths, partition type information of a prediction unit, prediction mode information, and size information of a transformation unit in a bitstream. You can include more.
  • the video encoding apparatus 10 may improve the transmission efficiency and the encoding efficiency by performing the intra prediction based on the contour, thereby improving the quality of the reconstructed image and reducing the amount of information necessary for the prediction of the image.
  • FIG. 1B is a flowchart of a video encoding method of performing contour-based intra prediction, according to an embodiment.
  • the video encoding apparatus 10 may determine that the first and second coordinates of the contour determined according to the mode of the contour for determining the at least one segment from the current block are from the neighboring blocks of the current block. It can be determined whether or not it can be derived.
  • the video encoding apparatus 10 may determine a mode of the contour for determining at least one segment from the current block.
  • the video encoding apparatus 10 may determine the outline of the current block based on sample values of samples of the current block. Alternatively, the video encoding apparatus 10 may determine the outline of the current block by using a neighboring block adjacent to the outside of the current block. The video encoding apparatus 10 according to an embodiment may select a mode having the best RD cost among a plurality of modes.
  • the video encoding apparatus 10 may determine whether the coordinates of the contour can be derived from a neighboring block adjacent to the outside of the current block based on the determined mode of the contour of the current block.
  • the video encoding apparatus 10 may determine that the coordinates of the contour of the current block are derivable from the neighboring blocks of the current block. have.
  • the video encoding apparatus 10 may determine that the coordinates of the outline of the current block are not derivable from the neighboring blocks of the current block. have.
  • whether the coordinates of the contour of the current block are derivable from neighboring blocks of the current block may be determined for each of the plurality of coordinates of the contour.
  • the video encoding apparatus 10 may include the first coordinate of the contour derived from the neighboring block of the current block and At least one segment may be determined from the current block based on the second coordinate.
  • the encoding apparatus 10 may derive the coordinates of the contour from the neighboring block of the current block.
  • the video encoding apparatus 10 may determine the coordinates of the contour that cannot be derived from the neighboring block by using the samples in the current block.
  • the samples in the current block may be samples adjacent to the side indicated by the outline of the current block and located inside the current block.
  • the video encoding apparatus 10 may determine the coordinates of the contour of the current block based on the gradient of the sample value for the samples of the neighboring block or the variation of the sample value for the samples in the current block. have.
  • the video encoding apparatus 10 may determine at least one segment for performing prediction from the current block based on the coordinates of the outline. For example, the video encoding apparatus 10 according to an embodiment may determine two segments when the current block is divided based on a single straight outline.
  • the video encoding apparatus 10 may determine whether to perform prediction according to a direction of a boundary with respect to a boundary area including a boundary of segments constituting a current block.
  • the video encoding apparatus 10 may select a prediction method having a best RD cost among a prediction method based on a direction of a boundary of a current block and a prediction method using a mask of a current block.
  • the video encoding apparatus 10 may perform prediction on the current block according to the determined method.
  • the video encoding apparatus 10 may encode information indicating whether to perform prediction according to the direction of the boundary in the boundary area and mode information of the contour indicating the direction of the boundary.
  • the video encoding apparatus 10 may further encode information about the width of the boundary area of the current block.
  • the video encoding apparatus 10 when the mode information of the contour of the current block can be derived from a neighboring block in which the coordinates of the contour of the current block are adjacent to the outside of the current block, the video encoding apparatus 10 according to an embodiment may be configured to the coordinates of the contour of the current block.
  • the information encoding apparatus 10 may not encode information, and if the mode information of the contour of the current block is not derivable from the neighboring blocks of the current block, the video encoding apparatus 10 according to an embodiment may include the current block.
  • Information about the coordinates of the outline can be encoded.
  • the video encoding apparatus 10 may include a central processor (not shown) that collectively controls the segment determiner 12, the prediction performer 14, and the bitstream generator 16.
  • the segment determiner 12, the prediction performer 14, and the bitstream generator 16 are each operated by their own processors (not shown), and the video as the processors (not shown) operate organically with each other.
  • the encoding device 10 may be operated as a whole.
  • the segment determiner 12, the prediction performer 14, and the bitstream generator 16 may be controlled under the control of an external processor (not shown) of the video encoding apparatus 10.
  • the video encoding apparatus 10 includes one or more data storage units (not shown) in which input / output data of the segment determiner 12, the prediction performer 14, and the bitstream generator 16 are stored. can do. Also, the video encoding apparatus 10 according to an embodiment may include a memory controller (not shown) that controls data input / output of a data storage unit (not shown).
  • the video encoding apparatus 10 may perform a video encoding operation including transformation by operating in conjunction with an internal video encoding processor or an external video encoding processor to output a video encoding result.
  • the internal video encoding processor of the video encoding apparatus 10 may implement a video encoding operation as a separate processor.
  • the video encoding apparatus 10, the central computing unit, or the graphics processing unit may include a video encoding processing module to implement a basic video encoding operation.
  • 2A is a block diagram 20 of a video decoding apparatus for performing contour-based intra prediction, according to an exemplary embodiment.
  • 2B is a flowchart of a video decoding method of performing contour-based intra prediction, according to an embodiment.
  • the video decoding apparatus 20 may include a segment determiner 22 and a prediction performer 24.
  • the video decoding apparatus 20 may further include a receiver (not shown) that receives and parses a bitstream of the encoded video.
  • the video decoding apparatus 20 may parse image data encoded for each coding unit and information necessary for encoding and decoding of the coding unit.
  • the video decoding apparatus 20 reconstructs the current picture by decoding image data of each maximum coding unit based on the information about the coded depth and the encoding mode for each maximum coding unit of the video. That is, the video decoding apparatus 20 may decode the encoded image data based on the information about the determined prediction unit, the prediction mode, the transformation unit, and the like for each coding unit among the coding units included in the maximum coding unit.
  • the decoding process may include a prediction process including intra prediction and motion compensation, and a frequency inverse transform process.
  • the segment determiner 22 may determine whether to perform contour based prediction on a current block corresponding to a coding unit of a coding depth. That is, the segment determiner 22 according to an exemplary embodiment may determine whether to determine segments, which are prediction units for performing prediction of the current block, based on an outline of a boundary of an object included in the current block.
  • the segment determiner 22 may determine whether to perform contour based prediction on the current block by using information indicating the prediction mode received from the video encoding apparatus 10.
  • the information indicating the prediction mode for the current block may include prediction that the current block uses a general intra mode using square or rectangular prediction units or is divided using an outline according to a boundary of an object included in the current block. It may include information indicating whether to use the contour-based intra prediction mode using the segment as a unit.
  • the segment determiner 22 may divide the current block into a plurality of segments of various types based on the contour of the current block. In addition, if it is determined that the segment determination unit 22 does not perform contour-based prediction, the segment determiner 22 may divide the current block into one partition type among predetermined partition types of the current block.
  • the segment determiner 22 may determine the number of segments of the current block based on information about the number of segments of the current block obtained from the bitstream. For example, when the information about the number of segments of the current block indicates that one segment is divided from the current block, the current block may not be divided.
  • the segment determiner 22 may determine at least one segment from the current block by using information about the contour of the current block obtained from the bitstream.
  • the information about the outline of the current block may include mode information of the outline and information about the coordinates of the outline.
  • the segment determiner 22 determines the mode of the outline of the current block based on the mode information of the outline of the current block, and parses information about the coordinates of the outline of the current block from the bitstream. You can decide whether or not.
  • the information about the coordinates of the outline of the current block may include first coordinate information and second coordinate information of the outline of the current block.
  • the segment determiner 22 may be related to the coordinates of the contour of the current block when the mode information of the contour of the current block indicates the mode of the contour that the coordinates of the contour of the current block can be derived from neighboring blocks of the current block. Information may not be parsed. For example, when the first coordinate or the second coordinate of the contour according to the mode of the contour of the current block is located on the upper side or the left side of the current block, the segment determiner 22 may determine the first coordinate or the first of the contour of the current block. 2 Coordinates may not be parsed.
  • the segment determiner 22 when the mode information of the contour of the current block indicates the mode of the contour in which the coordinates of the contour of the current block are not derivable from the neighboring blocks of the current block, the segment determiner 22 according to an embodiment of the present invention may be configured to execute the information. Samples can be used to determine the coordinates of the contour. For example, when the first coordinate or the second coordinate of the contour according to the mode of the contour of the current block is located on the lower side or the right side of the current block, the segment determiner 22 may determine the first coordinate or the first of the contour of the current block. Two coordinates can be parsed from the bitstream.
  • the segment determiner 22 may derive the first coordinate of the contour from the neighboring block adjacent to the outer side of the upper side of the current block, and the lowermost end of the upper peripheral block adjacent to the current block.
  • the sample value of the series of samples can be used to derive the first coordinate of the contour.
  • the segment determiner 22 when deriving the second coordinate of the contour from the neighboring block located on the left side of the current block, the segment determiner 22 according to the exemplary embodiment of the rightmost series of samples of the left block adjacent to the current block.
  • the second coordinate of the contour may be derived using the sample value.
  • the coordinates of the contour of the current block can be determined based on the amount of change of the sample values of the series of samples of the neighboring block.
  • the segment determiner 22 may determine the contour of the current block based on the coordinate information of the contour obtained from the bitstream. Coordinates can be determined.
  • the segment determiner 22 may determine at least one segment for prediction from the current block based on the determined contour of the current block.
  • a mask of the current block for determining a boundary between segments may be generated.
  • the prediction performing unit 24 may determine a mask value for each sample of the current block based on a positional relationship between each sample of the current block and the contour of the current block.
  • the mask of the current block may represent an area of segments of the current block and a boundary between the segments.
  • the prediction performing unit 24 may be configured in a direction of a boundary corresponding to the outline of the current block with respect to a boundary area including boundaries of segments of the current block. It is possible to determine whether to perform the prediction accordingly. That is, the prediction performing unit 24 may determine whether to determine the prediction value for the samples included in the boundary region of the current block based on the direction of the boundary.
  • the prediction performing unit 24 may determine whether to perform prediction according to the direction of the boundary by using information indicating whether to perform prediction according to the direction of the boundary to the current block obtained from the bitstream. have.
  • the boundary area of the current block may be an area composed of samples through which the contour of the current block passes, or may be an area including a predetermined width based on the contour of the current block.
  • the prediction performing unit 24 may determine the width of the boundary area of the current block using a neighboring block adjacent to the outside of the current block. In addition, the prediction performing unit 24 may determine the width of the boundary area of the current block using information on the width of the boundary area parsed from the bitstream.
  • the information about the width of the boundary area may be predetermined numerical information directly indicating the width of the boundary area, or may be index information indicating one of a plurality of predetermined size candidates.
  • the prediction performer 24 If it is determined that the prediction performer 24 according to the embodiment performs prediction according to the direction of the boundary with respect to the current block, the neighboring area adjacent to the outside of the current block according to the direction of the boundary with respect to the boundary area of the current block is determined.
  • the sample can be used to perform predictions.
  • a peripheral sample of the current block may include an upper peripheral sample, a right upper peripheral sample, a left peripheral sample, and a lower left peripheral sample of the current block.
  • the prediction performing unit 24 may determine a reference sample determined according to the direction of the boundary from the current sample of the boundary area among the neighboring samples of the current block.
  • the prediction performing unit 24 may generate a prediction value of the samples included in the boundary region of the current block based on the determined sample value of the reference sample.
  • the prediction performing unit 24 may perform prediction on the remaining areas of the current block except the boundary area, that is, the area corresponding to the segment. For example, intra prediction according to the DC mode may be performed on the segment region.
  • the prediction performing unit 24 may apply to the current block by using the neighboring samples of the current block and the generated current block mask. Prediction can be performed.
  • the prediction performing unit 24 may generate a sample value of a segment of the current block by using neighboring samples of the current block.
  • the sample value of the segment may be a sample value of each of the samples included in the segment region.
  • an intra prediction scheme such as DC mode may be used.
  • the position of the neighboring sample of the current block to be referenced may be determined based on the mode of the contour of the current block.
  • the prediction performing unit 24 may generate a prediction value of a segment of the current block by applying a mask indicating a region and a boundary of the segments of the current block to the sample values of the samples included in the generated segment region.
  • the predicted value of the segment may be a predicted value of each sample included in the segment region, and may be generated using a weighted sum of the sample value of the segment of the current block and the mask value of the current block.
  • the prediction performing unit 24 may perform filtering on the current block on which the prediction is performed.
  • filtering may be performed on prediction values of samples located at boundaries between segments of the current block of the current block.
  • the prediction performing unit 24 may determine whether to perform filtering on the prediction value of the current block by using information indicating whether filtering is parsed from the bitstream.
  • the video decoding apparatus 20 may reconstruct the video by performing motion compensation using the predicted data.
  • the motion compensation may refer to an operation of reconstructing a reconstructed image by synthesizing prediction data and residual data.
  • 2B is a flowchart of a video decoding method of performing contour-based intra prediction, according to an embodiment.
  • the video decoding apparatus 20 may include a first block and a second coordinate of a contour determined according to mode information of a contour for determining at least one segment from a current block. It can be determined whether or not it can be derived from.
  • the video decoding apparatus 20 may obtain mode information of an outline for determining at least one segment from a current block from a bitstream to determine mode information of an outline of the current block.
  • the video decoding apparatus 20 may determine whether to perform contour based prediction on the current block by using information indicating a prediction mode for the current block obtained from the bitstream.
  • the information indicating the prediction mode for the current block may include prediction that the current block uses a general intra mode using square or rectangular prediction units or is divided using an outline according to a boundary of an object included in the current block. It may include information indicating whether to use the contour-based intra prediction mode using the segment as a unit.
  • the video decoding apparatus 20 may obtain mode information of the contour of the current block from the bitstream.
  • the video decoding apparatus 20 may determine whether the first coordinate and the second coordinate of the contour are derivable from the neighboring block of the current block based on the acquired mode information of the contour of the current block.
  • the video decoding apparatus 20 when the mode information of the contour of the current block indicates a mode in which the coordinates of the contour of the current block are located on the upper side or the left side of the current block, the video decoding apparatus 20 according to an embodiment of the present embodiment It can be determined that the coordinate of can be derived from a neighboring block adjacent to the outside of the current block. Also, when the mode information of the contour of the current block indicates a mode in which the coordinates of the contour of the current block are located on the lower side or the right side of the current block, the video decoding apparatus 20 according to an exemplary embodiment may include It may be determined that is not derivable from a neighboring block adjacent to the outside of the current block.
  • the video decoding apparatus 20 may include the first coordinate of the contour derived from the neighboring block of the current block and At least one segment may be determined from the current block based on the second coordinate.
  • the neighboring block of the current block may include a block adjacent to the upper side or the left side of the current block.
  • the video decoding apparatus 20 may determine that the coordinates of the contour of the current block can be derived from the neighboring blocks of the current block when the side of the current block indicated by the mode of the contour of the current block is the upper side or the left side.
  • the video decoding apparatus 20 may obtain information about a coordinate of a non-derivable contour from a bitstream when the first coordinate or the second coordinate of the contour is not derivable from a neighboring block of the current block. Can be.
  • the video decoding apparatus 20 may determine at least one segment from the current block by using information about coordinates of the contour of the current block obtained from the bitstream and mode information of the contour.
  • the video decoding apparatus 20 may determine whether to perform prediction according to the direction of the boundary with respect to the boundary region including the boundary of the determined segments constituting the current block.
  • the video decoding apparatus 20 may determine whether to perform prediction according to the direction of the boundary by using information indicating whether to perform prediction according to the direction of the boundary to the current block obtained from the bitstream. have.
  • the video decoding apparatus 20 uses neighboring samples adjacent to the outside of the current block in the direction of the boundary. Prediction can be performed in the boundary region.
  • the boundary area of the current block may be an area composed of samples through which the contour of the current block passes, or may be an area including a predetermined width based on the contour of the current block.
  • the video decoding apparatus 20 may determine the width of the boundary area of the current block by using the neighboring block of the current block. Also, the video decoding apparatus 20 according to an embodiment may determine the width of the boundary area of the current block by using information about the width of the boundary area parsed from the bitstream.
  • the information about the width of the boundary area may be predetermined numerical information directly indicating the width of the boundary area, or may be index information indicating one of a plurality of predetermined size candidates.
  • the video decoding apparatus 20 may determine a reference sample determined according to the direction of the boundary from the current sample of the boundary region among the neighboring samples of the current block.
  • the video decoding apparatus 20 may generate a prediction value of the samples included in the boundary region of the current block based on the determined sample value of the reference sample.
  • the video decoding apparatus 20 may perform prediction on the remaining areas of the current block except the boundary area, that is, the area corresponding to the segment. For example, intra prediction according to the DC mode may be performed on the segment region.
  • the video decoding apparatus 20 may apply to the current block by using the neighboring samples of the current block and the generated current block mask. Prediction can be performed.
  • the video decoding apparatus 20 may generate a mask of a current block indicating a boundary between segments.
  • the video decoding apparatus 20 may determine a mask value of a sample of the current block based on a positional relationship between the contour that determines at least one segment from the current block and the sample of the current block.
  • the video decoding apparatus 20 may perform prediction on the current block by using the neighboring samples of the current block and the generated mask of the current block.
  • the video decoding apparatus 20 may generate sample values of the samples included in the segment area of the current block by using the neighboring samples of the current block. For example, an intra prediction scheme such as DC mode may be used.
  • the video decoding apparatus 20 may generate a predicted value of a segment of the current block by applying a mask indicating a region and a boundary of the segments of the current block to sample values of the samples included in the generated segment region. have.
  • the video decoding apparatus 20 may perform filtering on the current block on which prediction is performed. For example, filtering may be performed on prediction values of samples located at boundaries between segments of the current block of the current block.
  • the video decoding apparatus 20 may determine whether to perform filtering on the prediction value of the current block by using information indicating whether to perform filtering received from the bitstream.
  • the video decoding apparatus 20 may include a central processor (not shown) which collectively controls the segment determiner 22 and the prediction performer 24.
  • the segment determiner 22 and the prediction performer 24 are operated by their own processors (not shown), and the video decoding apparatus 20 operates as a whole as the processors (not shown) operate organically with each other. May be Alternatively, the segment determiner 22 and the prediction performer 24 may be controlled under the control of an external processor (not shown) of the video decoding apparatus 20 according to various embodiments.
  • the video decoding apparatus 20 may include one or more data storage units (not shown) in which input / output data of the segment determination unit 22 and the prediction execution unit 24 are stored.
  • the video decoding apparatus 20 may include a memory controller (not shown) that controls data input / output of the data storage unit (not shown).
  • the video decoding apparatus 20 may perform a video decoding operation including an inverse transform by operating in conjunction with an internal video decoding processor or an external video decoding processor to restore video through video decoding.
  • the internal video decoding processor of the video decoding apparatus 20 includes not only a separate processor but also a video decoding processing module 20, a central processing unit, and a graphic processing unit including a video decoding processing module. It may also include the case of implementing.
  • FIG. 3 is a block diagram of an image encoder 300 based on coding units, according to an exemplary embodiment.
  • the image encoder 300 performs operations performed by the encoding unit determiner 120 of the video encoding apparatus 10 or 100 to encode image data. That is, the intra predictor 310 performs intra prediction on the coding unit of the intra mode among the current frames 305, and the motion estimator 320 and the motion compensator 325 perform the current frame 305 of the inter mode. And the inter frame estimation and the motion compensation using the reference frame 395.
  • the data output from the intra predictor 310, the motion estimator 320, and the motion compensator 325 are output as quantized transform coefficients through the transformer 330 and the quantizer 340.
  • the quantized transform coefficients are restored to the data of the spatial domain through the inverse quantizer 360 and the inverse transformer 370, and the recovered data of the spatial domain is passed through the deblocking unit 380 and the offset applying unit 390. Processed and output to the reference frame 395.
  • the quantized transform coefficients may be output to the bitstream 355 via the entropy encoder 350.
  • the intra predictor 310, the motion estimator 320, the motion compensator 325 which are components of the image encoder 300, Encoding unit 330, quantization unit 340, entropy encoding unit 350, inverse quantization unit 360, inverse transform unit 370, deblocking unit 380, and offset applying unit 390 all perform maximum coding. In consideration of the maximum depth for each unit, an operation based on each coding unit among the coding units having a tree structure should be performed.
  • the intra predictor 310, the motion estimator 320, and the motion compensator 325 predict each coding unit among coding units having a tree structure in consideration of the maximum size and the maximum depth of the current maximum coding unit.
  • the unit and the prediction mode may be determined, and the transformer 330 may determine the size of a transform unit in each coding unit among the coding units having a tree structure.
  • the intra predictor 310 may perform the same operations as the operations performed by the segment determiner 12 of FIG. 1A.
  • FIG. 4 is a block diagram of an image decoder 400 based on coding units, according to an exemplary embodiment.
  • the parsing unit 410 parses encoded image data to be decoded from the bitstream 405 and encoding information necessary for decoding.
  • the encoded image data is output as inverse quantized data through the entropy decoding unit 420 and the inverse quantization unit 430, and the image data of the spatial domain is restored through the inverse transformation unit 440.
  • the intra predictor 450 For the image data of the spatial domain, the intra predictor 450 performs intra prediction on the coding unit of the intra mode, and the motion compensator 460 uses the reference frame 485 together to apply to the coding unit of the inter mode. Perform motion compensation for the For example, the intra predictor 450 may perform the same operations as those performed by the segment determiner 22 and the predictor 24 of FIG. 2A.
  • the data of the spatial region passed through the intra predictor 450 and the motion compensator 460 may be post-processed through the deblocking unit 470 and the offset applying unit 480 and output to the reconstructed frame 495.
  • the post-processed data through the deblocking unit 470 and the offset applying unit 480 may be output as the reference frame 485.
  • step-by-step operations after the parser 410 of the image decoder 400 may be performed.
  • the parser 410, the entropy decoder 420, the inverse quantizer 430, and the inverse transform unit 440 which are components of the image decoder 400, may be used.
  • the intra predictor 450, the motion compensator 460, the deblocking unit 470, and the offset applying unit 480 must all perform operations based on coding units having a tree structure for each maximum coding unit. do.
  • the intra predictor 450 and the motion compensator 460 determine a prediction unit and a prediction mode for each coding unit having a tree structure, and the inverse transformer 440 must determine the size of the transformation unit for each coding unit. do.
  • 5A to 5C illustrate a method of determining a segment that is a prediction unit for prediction encoding from a current block according to various embodiments.
  • FIG. 5A is a diagram for describing a method of determining at least one segment constituting a current block from a current block according to an embodiment, in comparison with a method of determining a prediction block from a current block in HEVC.
  • FIG. 5A is a diagram for describing a method of determining at least one segment constituting a current block from a current block according to an embodiment, in comparison with a method of determining a prediction block from a current block in HEVC.
  • the original image may include a boundary of an object represented by a straight line or the like in the original image, and as shown in FIG. 5A, includes a current block 51 including the boundary of the object therein. It may include.
  • a prediction unit having a predetermined size obtained by hierarchically dividing the current block 51.
  • the intra prediction may be performed to generate a predicted image. That is, in HEVC, the current block 51 is predicted by hierarchically dividing the current block 51 into square or rectangular prediction units. Thus, in order to increase the accuracy of prediction, the current block 51 is very small in the vicinity of an object boundary.
  • the prediction must be performed on a plurality of prediction units by dividing the prediction units.
  • partition information indicating whether a block is divided partition information indicating whether a block is divided, partition type information indicating a partition type of a divided minimum unit block, and information by partitioning a block such as a prediction mode of the block are additionally required.
  • the current block 51 in order to perform prediction with respect to a current block 51 including a boundary of an object, the current block 51 is divided like a block 52 to divide a plurality of prediction units. You can decide.
  • the partition information indicating whether to partition each block including split information indicating whether the current block 51 is divided and split information indicating whether the blocks divided from the current block 51 are divided, and the minimum unit to be divided Partition type information indicating a split form of a prediction unit constituting blocks of may be used.
  • partition information and partition type information for one block may be information corresponding to one bin or bit, respectively.
  • a plurality of pieces of information of 57 bins according to 17 partition information and 40 partition type information may be required.
  • a contour-based intra prediction coding method of determining a segment, which is a prediction unit of a current block, from a current block by using a contour according to a boundary of an object included in the current block according to an embodiment.
  • the current block 51 may be divided like the block 53 according to the boundary of the object included in the current block 51.
  • the information about the partitioning of the block necessary for partitioning the current block 51 like the block 53 is information corresponding to nine bins, which may be much less than when using the partitioning method according to HEVC.
  • the current block 51 is a block according to a contour corresponding to a boundary of an object included in the current block 51. It can be divided into four segments of 53. The current block 51 can be divided using three straight lines along the boundary of the object.
  • At least one segment may be determined from the current block 51.
  • the information about the number of segments determined from the current block 51 is information for indicating the total number of segments constituting the current block 51. For example, the information is divided from the current block 51.
  • the information about the number of segments to be used may be 'number of segments-1'. If the current block 51 is not divided, there is one segment, so information about the number of segments divided from the current block 51 may be zero.
  • the mode information of the contour for determining the segment from the current block 51 may be information indicating a direction of the contour according to the boundary of an object in the current block 51.
  • the information about the coordinates of the contour for determining the segment from the current block 51 is information for specifying the position of the contour, for example, when the contour is a straight line, the first point representing the starting point of the contour. It may include a coordinate and a second coordinate representing the end point of the contour. In this case, each coordinate information may be represented by x coordinate and y coordinate for each coordinate. Coordinate information may be encoded and decoded and transmitted and received, or may be derived from the current block 51 or neighboring blocks of the current block 51.
  • the current block 51 is divided according to the contour, so that the video encoding apparatus 10 and the video decoding apparatus 20
  • the transmission efficiency can be increased by reducing the amount of data transmitted / received), and the encoding efficiency can also be increased.
  • the contour corresponding to the object and the boundary included in the current block 51 it is possible to predict more accurately and reduce the error of the reconstructed image.
  • 5B illustrates an example of a method of determining at least one segment constituting the current block 54 from the current block 54 according to another embodiment.
  • the current block 54 may be divided like the block 55 according to a boundary of an object included in the current block 54.
  • the boundary of the object included in the current block 54 may be a curve, and the current block 54 may be divided like the block 55 according to the contour or the curved straight line of the curve corresponding to the boundary.
  • the contour corresponding to the boundary may be one curve, and two segments constituting the current block 54 may be determined.
  • the current block 54 may be divided into at least one segment using information about coordinates of the contour of the current block 54.
  • the information about the coordinates of the contour is information for specifying the position of the contour, for example, information about the number of points necessary for specifying the contour and the current block 54 of each point. It may include coordinate information indicating a position in.
  • the current block 54 may be divided like the block 55 by the contour specified according to three points.
  • the contour specified according to the three points may be a straight line or a curved line.
  • various algorithms may be used to specify the contour using the points. For example, a piece wise linear curve, a conic section or a Bezier curve may be used.
  • the information (num_point_minus2) regarding the number of points required to specify the contour may be 'number of points-2', and in the case of block 55, the information about the number of points required may be 1. have.
  • the coordinate information of the three points may include a first coordinate (seg_start) indicating the start point of the outline, a second coordinate (seg_middle) indicating the bending point of the outline, and a third coordinate (seg_end) indicating the end point of the outline.
  • the coordinate information may be encoded and decoded and transmitted and received, or may be derived from the current block 54 or neighboring blocks of the current block 54.
  • the current block 54 may be divided according to an outline to reduce the amount of data transmitted and received between the video encoding apparatus 10 and the video decoding apparatus 20, thereby increasing transmission efficiency and increasing encoding efficiency. .
  • contours such as curves corresponding to objects and boundaries included in the current block 54, more accurate prediction is possible, thereby reducing errors in the reconstructed image.
  • 5C illustrates an example of a method of determining at least one segment constituting the current block 56 according to another embodiment.
  • a current block 56 may be divided into blocks 57 according to boundaries of objects included in the current block 56.
  • the boundary of the object included in the current block 56 may form one closed figure, and the current block 56 may be divided into the block 57 according to the outline of the figure corresponding to the boundary.
  • the contour for determining the segment from the current block 56 may be one closed figure, and the segments determined from the current block 56 may be two segments outside and inside the closed figure, respectively. .
  • the current block 56 may be divided into at least one segment using information about coordinates of the contour for determining the segment from the current block 56.
  • the information about the coordinates of the contour for determining the segment from the current block 56 is information for specifying the position of the contour, for example, information on the number of points necessary for specifying the contour. And coordinate information indicative of a location within the current block 56 of each point.
  • the current block 56 may be divided like the block 57 by a contour specified according to four points.
  • the contour specified according to the four points may be a closed figure of a rectangle.
  • the information num_point_minus2 about the number of points required to specify the contour may be 'number-2', and in the case of block 57, the information about the number of points required may be 2. have.
  • the coordinate information of the four points may include a first coordinate (seg_start), a second coordinate (seg_middle), a third coordinate (seg_middle), and a fourth coordinate (seg_end) of the closed figure.
  • the coordinate information may be encoded and decoded and transmitted and received, or may be derived from the current block 56 or neighboring blocks of the current block 56.
  • the current block 56 may be divided according to an outline to reduce the amount of data transmitted and received between the video encoding apparatus 10 and the video decoding apparatus 20 to increase transmission efficiency, and to increase encoding efficiency.
  • an error of the reconstructed image may be reduced by using outlines such as an object included in the current block 56 and a closed figure corresponding to the boundary.
  • FIG. 6 illustrates a method of determining a segment for prediction encoding from a current block by using an outline according to an object boundary according to various embodiments.
  • a single straight line, a plurality of straight lines, a curved line, a single curve, a plurality of curves, a closed figure, or the like may be used. have.
  • a segment for prediction encoding may be determined from the current block by using a combination of the above methods, such as using a single straight line and a single curve at the same time.
  • FIGS. 7A and 7B are diagrams for describing a mode of contour for determining at least one segment from a current block 70 according to various embodiments.
  • a single straight line contour in the current block 70 may be determined, and two segments constituting the current block 70 may be determined according to the determined single straight line contour.
  • the mode of the contour for determining segments divided from the current block 70 may be determined according to the boundary of the object included in the current block 70, and may indicate the direction of the contour.
  • the contour used to determine segments from the current block 70 is a straight line, by specifying a side through which the contour passes among four sides of the current block 70, according to an embodiment.
  • the direction of the contour can be specified.
  • the mode information of the contour may be information indicating at least two sides of the upper side, the right side, the lower side, and the left side of the current block 70 that the contour touches.
  • Each of the four sides of the current block 70 may be assigned a number, and may represent all possible directions of the contour as a combination of numbers assigned to the sides.
  • 0, 1, 2, and 3 may be allocated to the upper side, the right side, the lower side, and the left side of the current block 70, respectively. Numbers may be assigned to each side of the current block 70 in ascending or descending order in a clockwise direction. For example, when the current block 70 is divided into two segments using a straight outline passing through the right side and the left side of the current block 70, the mode information of the outline corresponds to 1 representing the right side and 3 representing the left side. '1-3 directions' may be indicated.
  • the directions of the straight line contour dividing the current block 70 are 0-1 direction, 0-2 direction, 0-3 direction, 1-2 Directions, 1-3 directions, and 2-3 directions.
  • the 1-0 direction may be omitted in the same direction as the 0-1 direction.
  • the mode information of the contour may be information indicating one of six directions of the linear contour that can be used in the current block 70.
  • the direction of the contour of the current block 70 may be specified using not only four sides constituting the current block 70 but also sides constituting neighboring blocks of the current block 70.
  • 0, 1, 2, and 3 are allocated to the upper side, the right side, the lower side, and the left side of the current block 70, respectively, and the upper side, the current block (the right side of the right block of the current block 70).
  • 4, 5, 6, and 7 may be allocated to the upper side of the left block of 70), the right side of the lower left block of the current block 70, and the left side of the upper block of the current block, respectively.
  • the direction of the contour of the current block 70 may be more diversified.
  • the mode information of the contour indicating the direction of the contour may indicate one of more than six directions.
  • the direction of the contour may be specified by assigning numbers to the sides constituting the current block 70 or the peripheral sides of the current block 70 in various ways. .
  • FIG. 8 shows examples of modes of contour for determining at least one segment from the current block 70 of FIG. 7A.
  • the current block 70 is the block 80, the block 81, the block of FIG. 8 according to the direction of the contour. 82, block 83, block 84, and block 85 may be divided into one.
  • the modes of the contour indicating the direction of the contour dividing the current block 70 are the first mode (0-1 direction) and the second mode.
  • One of mode (0-2 directions), third mode (0-3 directions), fourth mode (1-2 directions), fifth mode (1-3 directions), and sixth mode (2-3 directions) Can be.
  • block 80, block 81, block 82, block 83, block 84 and block 85 each have a contour mode of the first mode, the second mode, and the third mode. In this case, the fourth mode, the fifth mode, and the sixth mode may be indicated.
  • a start point which is one end of the contour dividing block 80, is located on the upper side of block 80, and an end point, which is the other end, is located on the right side of block 80.
  • the mode of the contour may be a first mode. At this time, the mode of the contour is the first mode irrespective of which position of the upper side of the block 80 the start point and the end point is located on the right side of the block 80.
  • the mode of the contour when the starting point of the contour dividing the block 81 is located on the upper side of the block 81 and the end point is located below the block 81 is the second mode. Can be.
  • the mode of the contour in the case where it is located on the upper side of the starting point block 82 of the contour dividing the block 82 and on the left side of the end point block 82 may be the third mode. have.
  • the mode of the contour when the starting point of the contour dividing the block 83 is located on the right side of the block 83 and the end point is located on the lower side of the block 83 is the fourth mode. Can be.
  • the mode of the contour when the starting point of the contour dividing the block 84 is located on the right side of the block 84 and the end point is located on the left side of the block 84 is the fifth mode. Can be.
  • the mode of the contour when the starting point of the contour dividing the block 85 is located at the lower side of the block 85 and the end point is located at the left side of the block 85 is the sixth mode. Can be.
  • the mode of the contour for determining the at least one segment from the current block 70 may be determined as one of the first to sixth modes.
  • the video encoding apparatus 10 may perform the decoding and decoding of the current block 70 according to the first to sixth modes, using the rate-distortion optimization (RDO) method, and have the best RD cost. Can be selected.
  • RDO rate-distortion optimization
  • the video encoding apparatus 10 calculates a cost for each side of the current block 70 and based on the calculated cost for each side, the mode of the outline of the current block 70. Can be determined.
  • the cost for each side of the current block 70 may be calculated using the samples corresponding to each side. For example, the cost for the top side of the current block 70 may be calculated using samples located in the current block 70 and abutting the top side. Similarly, the cost for the right side, bottom side and left side of the current block 70 may be calculated using the right side adjacent samples, the bottom side adjacent samples and the left side adjacent samples, respectively, in the current block 70.
  • the cost for each side in accordance with one embodiment may be the variance of the samples of each side.
  • the video encoding apparatus 10 may select two sides having the largest variance of samples corresponding to the sides of each side of the current block 70, and determine a mode of the contour representing the selected two sides.
  • the variance of each side of the current block 70 may be obtained only for the luma block, or may be obtained by using both the luma block and the chroma block.
  • variances using both luma blocks and chroma blocks may be obtained by giving different weights to variances for the luma blocks and variances for the chroma blocks.
  • the cost for each side of the current block 70 may be the total sum of difference values between adjacent samples for the samples of each side.
  • the cost for each side according to another embodiment may be a total sum of absolute values of results obtained by applying a 1D Sobel operator to samples of each side.
  • the cost for each side of the current block 70 may be calculated in consideration of the availability of each side of the current block 70.
  • the availability of each side of the current block 70 may indicate whether a neighboring block adjacent to the outside of each side of the current block 70 is available.
  • the video encoding apparatus 10 may determine a mode of the contour from among modes other than a mode including an unusable side in consideration of the availability of each side. For example, when the current block 70 is a block located at the edge of the image, some of the sides of the current block 70 may not be available.
  • the mode of the contour for determining at least one segment from the current block 70 may be determined by combining the above-described methods. For example, some of the six modes are selected using the cost for each side of the current block 70, and the decoding and decoding of the current block 70 is performed on the selected some modes to obtain the best mode. One mode with the RD cost can be determined as the mode of the final contour.
  • FIG. 9 shows examples of mode information of an outline indicating a mode of the outline of FIG. 8.
  • the mode of the contour indicating the direction of the contour may include six modes.
  • the mode information of the contour indicating the mode of the contour may be sub-compensated and decoded using various coding schemes such as fixed length coding (FLC), variable length coding (VLC), arithmetic coding, and the like.
  • information indicating the second mode and the fifth mode is binarized into two bits, and information indicating the first mode, the third mode, the fourth mode, and the sixth mode is described. It can be binarized to 3 bits.
  • the mode information of the contour when the mode of the contour is the first mode (line_orient 0), the mode information of the contour may be represented by binary 100.
  • the mode information of the contour when the mode of the contour is the second mode (line_orient 1), the mode information of the contour may be represented by binary 00.
  • the mode information of the contour When the mode of the contour is the third mode (line_orient 2), the mode information of the contour may be represented by binary 101.
  • the mode of the contour is the fourth mode (line_orient 3), the mode information of the contour may be represented by binary 110.
  • the mode of the contour is the fifth mode (line_orient 4)
  • the mode information of the contour When the mode of the contour is the sixth mode (line_orient 5), the mode information of the contour may be represented by binary 111.
  • the present invention is not limited thereto, and the mode information of the outline may be expressed in various ways.
  • Mode information of the binarized contour in the video encoding apparatus may be included in the bitstream through arithmetic encoding, and may be transmitted to the video decoding apparatus 20.
  • the video decoding apparatus 20 may perform arithmetic decoding and inverse binarization on the received bitstream to obtain mode information of the contour of the current block.
  • FIG. 10 illustrates a current block according to an embodiment.
  • the current block may be a block of size 8x8.
  • the size of the current block is expressed as width x height, and may include sizes such as 64x64, 32x32, and 16x16. In addition, it may include various sizes such as MxN. In this case, M and N may be different integers.
  • the samples in the current block may appear white and the surrounding samples of the current block may appear gray.
  • the coordinate of the contour of the current block may be determined using samples in the current block. Specifically, when the contour is a single straight contour, both ends (starting point and end point) of the contour are positioned on the sides indicated by the mode of the contour according to the mode of the contour, so that the coordinates of the contour are the current corresponding to the side indicated by the mode of the contour. Can be determined using the samples in the block. For example, the coordinates of the contour may be determined based on the gradient of the sample value between samples in the current block.
  • the first coordinate of the contour may be determined using samples in the current block corresponding to the upper side of the current block, and the second coordinate of the contour May be determined using the samples in the current block corresponding to the right side of the current block. That is, the first coordinate of the contour may be the position of one of the samples inwardly adjacent to the upper side, and the second coordinate of the contour may be the position of one of the samples inwardly adjacent to the right side. . In this case, the position of the sample may be an integer pixel unit or a sub pixel unit.
  • the samples in the current block corresponding to the side indicated by the mode of the contour may be samples inwardly adjacent to each side of the current block.
  • the samples corresponding to the upper side of the current block may be samples located at the top of the current block.
  • samples corresponding to the right side, the bottom side, and the left side of the current block may be the rightmost samples, the bottommost samples, and the leftmost samples in the current block, respectively.
  • the topmost samples, the rightmost samples, the bottommost samples, and the leftmost samples in the current block may each be eight white samples.
  • the coordinates of the contour for determining the at least one segment from the current block may be derived from neighboring blocks of the current block.
  • the coordinates of the contour may be determined using neighboring blocks adjacent to the outside of the side indicated by the mode of the contour.
  • the coordinates of the contour may be determined based on a gradient of sample values between samples in the neighboring blocks of the current block. In this case, the samples in the neighboring block may be reconstructed samples.
  • the first coordinate of the contour may be derived using samples of the neighboring block adjacent to the upper outer side of the current block.
  • the first coordinate of the contour may be determined using the lowest samples of the upper peripheral block of the current block.
  • the second coordinate of the contour may be derived using samples of the neighboring block adjacent to the left outer side of the current block.
  • the second coordinate of the contour may be determined using the rightmost samples of the left peripheral block of the current block.
  • the samples in the neighboring block adjacent to the side indicated by the mode of the contour are samples adjacent to the current block up or to the left, and eight samples (shaded display) adjacent to the upper side and on the left side. It may include eight adjacent gray samples (shaded).
  • the coordinates of the contour for determining at least one segment from the current block are derived from the neighboring blocks of the current block, the coordinates of the derived contour are refined to encode and decode the current block using the coordinates of the adjusted contour. You may.
  • the video encoding apparatus 10 may encode the coordinates of the contour of the current block and transmit the encoded coordinates to the video decoding apparatus 20.
  • the video encoding apparatus 10 may not transmit the coordinates of the contour when the coordinates of the contour of the current block can be derived from the neighboring blocks of the current block.
  • the video encoding apparatus 10 uses values of the coordinates of the contour derived from the neighboring block and the samples in the current block.
  • the difference value of the coordinate value of the determined contour may be encoded and transmitted to the video decoding apparatus 20.
  • the video decoding apparatus 20 may determine the coordinate of the contour of the current block based on the received difference value and the value of the coordinate of the contour derived from the neighboring block of the current block.
  • FIG. 11 illustrates a method of determining coordinates of an outline for determining at least one segment from a current block, according to an embodiment.
  • the coordinates of the contour of the current block may be determined using samples in the current block or neighboring samples adjacent to the current block as described above in FIG. Can be.
  • the position of the sample having the largest gradient of the sample value among the samples in the current block or neighboring samples adjacent to the current block may be determined as the position of the coordinate of the contour.
  • a 1D Sobel operator with a filter value such as [-1, 0, 1] can be applied to samples in the current block or neighboring samples adjacent to the current block to determine the coordinates of the contour.
  • the coordinates of the contour may be determined as the coordinates of the contour, the position of the sample having the largest absolute value as a result of applying the one-dimensional Sobel operator.
  • the first coordinate and the second coordinate of the contour may be determined based on the equation below.
  • line_pos1_n arg max n (
  • line_pos2_m arg max n (
  • S n , S n -1 and S n +1 are the sample values of the sample at n position, the sample value of the sample at n-1 position and the sample value of the sample at n + 1 position, respectively
  • S m , S m ⁇ 1 and S m + 1 are the sample values of the sample at the m position, the sample value of the sample at the m-1 position and the sample value of the sample at the m + 1 position, respectively.
  • n may be the x coordinate of the sample
  • m may be the y coordinate of the sample.
  • line_pos1_n may be a coordinate of the first coordinate of the contour
  • line_pos2_m may be a y coordinate of the second coordinate of the contour.
  • n is the x coordinate of the top samples of the current block or the top samples adjacent to the current block, and the first coordinate of the contour. May be (line_pos1_n, 0).
  • n becomes the y coordinate of the rightmost samples of the current block
  • the first coordinate of the contour is (nCbS-1, line_pos1_n).
  • nCbS may be the horizontal or vertical size of the current block.
  • the values of the first coordinate and the second coordinate of the contour may be determined in units of integer pixels or may be determined in units of subpixels.
  • the first coordinate of the contour is determined using samples adjacent to the outside of the upper side of the current block or samples adjacent to the inside of the upper side ( line_pos1_n, 0), and the second coordinate of the contour may be determined as (0, line_pos2_m) using samples adjacent to the outside of the left side of the current block or samples adjacent to the inside of the left side.
  • the coordinates of the contour of the current block may be determined by first determining the first coordinate of the contour and then determining the second coordinate of the contour using the determined first coordinate.
  • the first coordinate may be determined using the above-described method with respect to one side of the current block indicated by the mode of the contour.
  • the first coordinate of the contour may be determined based on the equation below.
  • line_pos1_n arg max n (
  • the second coordinate of the contour may be determined by using samples corresponding to the other side of the current block indicated by the mode of the contour and surrounding samples of the determined first coordinate.
  • the second coordinate of the contour may be determined using a correlation between the peripheral samples of the first coordinate and the peripheral samples of the second coordinate.
  • the second coordinate of the contour may be determined based on the equation below.
  • line_pos2_m arg max m (4 *
  • S n -1 and S n +1 which are sample values of the peripheral samples of the first coordinate of the predetermined contour may be used.
  • the coordinates of the contour of the current block may be determined using various types of operators used for boundary detection.
  • the sample values of the samples in the current block or the neighboring samples adjacent to the current block may be used as they are.
  • the filtered sample value may be used by applying a filter to the sample value for removal.
  • the filter applied to the sample value may be a low-pass filter or a one-dimensional Gaussian filter having a filter value such as [1, 2, 1].
  • the first coordinate or the second coordinate of the contour may be determined as one of the plurality of candidate coordinates.
  • N candidate coordinates having an optimal cost may be determined using samples in the current block or neighboring samples adjacent to the current block.
  • the cost of candidate coordinates can be calculated according to the equations described above.
  • One of the determined N candidate coordinates may be determined as the first coordinate or the second coordinate of the contour.
  • index information indicating one candidate among candidate coordinates may be transmitted and received between the video encoding apparatus 10 and the video decoding apparatus 20.
  • 12 to 14 illustrate a method of determining coordinates of an outline for determining at least one segment from a current block according to various embodiments.
  • the current block may be a block of size 8x8.
  • the size of the current block is expressed as width x height, and may include sizes such as 64x64, 32x32, and 16x16. In addition, it may include various sizes such as MxN. In this case, M and N may be integers of different sizes.
  • the current block may determine coordinates of an outline for determining a segment using samples in the current block.
  • the coordinates of the contour may be determined using the sample value of the samples adjacent to and located inside the side of the current block.
  • the first coordinate of the contour is determined using eight samples of adjacent to the upper side in the current block, and the second coordinate of the contour is in the current block. It can be determined using eight samples adjacent to the right side.
  • the sample on the upper right side of the current block is an overlapping sample and may be used for both determining the first coordinate and determining the second coordinate.
  • the mode of the contour is the second mode
  • the first coordinate of the contour is determined using eight samples adjacent to the upper side in the current block
  • the second coordinate of the contour is eight samples adjacent to the lower side in the current block.
  • the mode of the contour is the third mode
  • the first coordinate of the contour is determined using eight samples adjacent to the top side in the current block
  • the second coordinate of the contour is eight samples adjacent to the left side in the current block.
  • the upper left sample of the current block is an overlapping sample and may be used to determine both the first coordinate and the second coordinate.
  • the first coordinate of the contour is determined using eight samples adjacent to the right side in the current block
  • the second coordinate of the contour is eight samples adjacent to the lower side in the current block.
  • Can be determined using the The lower right sample of the current block is an overlapping sample and may be used for both determining the first coordinate and determining the second coordinate.
  • the mode of the contour is the fifth mode
  • the first coordinate of the contour is determined using eight samples adjacent to the right side in the current block
  • the second coordinate of the contour is eight samples adjacent to the left side in the current block.
  • the mode of the contour is the sixth mode
  • the first coordinate of the contour is determined using eight samples adjacent to the lower side in the current block
  • the second coordinate of the contour is eight samples adjacent to the left side in the current block.
  • Can be determined using the The lower left sample of the current block is an overlapping sample and may be used to determine both the first coordinate and the second coordinate.
  • the current block may determine the coordinates of the contour for determining the segment using not only the samples in the current block but also the neighboring samples of the current block. If peripheral samples adjacent to the outside of the current block are available, the coordinates of the contour may be determined using the sample values of the peripheral samples adjacent to the outside of the current block. For example, in FIG. 13, the available peripheral samples adjacent to the outside of the current block may include eight samples adjacent to the top side of the current block or eight samples adjacent to the left side of the current block.
  • the first coordinate of the contour is determined using eight peripheral samples adjacent to the outside of the upper side of the current block, and the second coordinate of the contour is currently It can be determined using eight samples adjacent to the right side in the block.
  • the first coordinate of the contour is determined using eight peripheral samples adjacent to the outside of the upper side of the current block, and the second coordinate of the contour is adjacent to the lower side in the current block. It can be determined using eight samples.
  • the first coordinate of the contour is determined using eight peripheral samples adjacent to the outside of the upper side of the current block, and the second coordinate of the contour is outside of the left side of the current block. It can be determined using eight adjacent samples.
  • the first coordinate of the contour is determined using eight samples adjacent to the right side in the current block
  • the second coordinate of the contour is eight samples adjacent to the lower side in the current block.
  • Can be determined using the The lower right sample of the current block is an overlapping sample and may be used for both determining the first coordinate and determining the second coordinate.
  • the mode of the contour is the fifth mode
  • the first coordinate of the contour is determined using eight samples adjacent to the right side in the current block
  • the second coordinate of the contour is 8 adjacent to the outside of the left side of the current block. Can be determined using the four peripheral samples.
  • the mode of the contour is the sixth mode
  • the first coordinate of the contour is determined using eight samples adjacent to the lower side in the current block
  • the second coordinate of the contour is 8 adjacent to the inside of the left side of the current block. Can be determined using the two samples.
  • the coordinates of the contour may be determined using peripheral samples adjacent to the outside of the right side or peripheral samples adjacent to the outside of the bottom side. It may be.
  • the video encoding apparatus 10 may determine that the coordinates of the inducible contour are not derivable without transmitting to the video decoding apparatus 20. Only information about coordinates can be transmitted.
  • the video encoding apparatus 10 encodes a difference value between the value of the coordinate of the outline derived from the neighboring block and the value of the coordinate of the outline determined by using the samples in the current block in case of the coordinate of the inducible outline. 20 may be transmitted.
  • the video decoding apparatus 20 may determine the coordinates of the outline of the current block by adding the difference value received from the bitstream to the coordinate of the outline derived from the neighboring block.
  • the current block may determine the coordinates of the contour for determining the segment using not only the samples in the current block but also the neighboring samples of the current block.
  • the coordinate of the contour may be determined using the samples of the position shifted the samples of FIG. 13. That is, samples extending in the upper, lower, left or right direction of the samples in the current block and the surrounding samples of the current block may be used.
  • the first coordinate of the contour is determined by using eight samples at a position in which eight samples adjacent to the outside of the upper side of the current block are moved by one to the left.
  • the second coordinate of the contour may be determined using eight samples adjacent to the right side in the current block.
  • the mode of the contour is the fourth mode
  • the first coordinate of the contour is determined using eight samples of the position where eight samples adjacent to the right side in the current block are moved upward by one
  • the second coordinate of the contour May be determined using eight samples adjacent to the lower side in the current block.
  • the lower right sample of the current block is an overlapping sample and may be used for both determining the first coordinate and determining the second coordinate.
  • the mode of the contour is the sixth mode
  • the first coordinate of the contour is determined using eight samples adjacent to the lower side in the current block
  • the second coordinate of the contour is 8 adjacent to the outside of the left side of the current block. Samples may be determined using eight samples of a position shifted upward by one.
  • the coordinates of the contour are determined by using the samples of the moved position, two sides representing the direction of the contour do not have overlapping coordinates, so that the coordinates of the contour of more various combinations may be determined.
  • 15 to 16B illustrate a method of determining the coordinates of an outline according to the precision of a sample, according to various embodiments.
  • the coordinates of the contour according to various embodiments may be determined according to the precision of the sample according to various embodiments.
  • the coordinates of the contour may be represented using integer pixel precision, half (1/2) pixel precision, or quarter (1/4) pixel precision.
  • a block 1501 represented by integer pixel precision, a block 1502 represented by half pixel precision, and a block 1503 represented by quarter pixel precision may be blocks having a size of 4x4.
  • the position of the integer sample may be represented by using the center point of the upper left sample of block 1501 as the origin (0, 0).
  • the x and y coordinates of the location of the integer samples of block 1501 may be determined by numbers of 0 to 3, respectively.
  • the coordinate of the contour according to an embodiment may be determined as the position of the integer sample inside the block 1501 or may be determined as the position of the virtual integer sample outside the block 1501.
  • the position of an integer sample can also be represented by making the upper left vertex of the block 1501 the origin (0, 0), and making the side of each sample an integer position.
  • the half or quarter sample is assumed to be the upper left vertex origin (0, 0) of block 1502 or block 1503. It can express the position of.
  • the x- and y-coordinates of the positions of the half samples in block 1502 may be determined with numbers from 0 to 7, respectively, and the x- and y-coordinates of the positions of the quarter samples in block 1503 may be determined with numbers from 0 to 15, respectively. have.
  • the coordinates of the contour may be determined as the position of the half sample or the quarter sample inside the block 1502 or the block 1503, or the virtual half sample outside the block 1502 or the block 1503. It may also be determined by the location of the quarter sample.
  • a coordinate transformation function can be used. For example, when further subdividing the precision, such as converting integer pixel precision to half pixel precision or quarter pixel precision, an injective non-surjective function may be used. In addition, when the precision is reduced, for example, when converting half pixel precision to integer pixel precision or converting quarter pixel precision to integer pixel precision or half pixel precision, a non-injective transfer function may be used.
  • the coordinates of the contour may be determined using the sample value of integer samples.
  • the coordinates of the contour may be determined as the position of the integer sample having the largest change in the sample value with the surrounding integer samples.
  • the coordinates of the contour according to an embodiment may be determined as the position of the sample having the largest absolute value by applying a one-dimensional Sobel operator having a filter value such as [-1, 0, 1] to integer samples. .
  • the positions of the integer samples may be represented by X, and the height of X may represent the magnitude of the sample value of each of the samples.
  • the sample value of the samples may be a number from 0 to 255.
  • the position of the integer sample having the largest change in the sample value between the integer samples may be the position of the integer sample 1610. That is, the absolute value of the difference between the sample values of the left and right samples of the integer sample 1610 may be the largest.
  • the coordinates of the contour may be determined as the position of the integer sample 1610.
  • the coordinates of the contour may be determined using half pixel precision.
  • integer samples may be represented by a large X and half samples may be represented by a small X, respectively.
  • the height of the samples may represent the magnitude of the sample value of each of the samples.
  • the coordinates of the contour may be determined as the position of the half sample 1621.
  • sample values of subsamples such as half samples may be generated by interpolation using sample values of integer samples.
  • the sample value of the half sample 1621 can be obtained using the sample values of the left integer sample 1620 and the right integer sample 1622.
  • the coordinates of the contour may be determined using the sample value of the generated half sample and the sample value of the integer sample.
  • the coordinates of the contour may be determined as the position of the sample 1621 having the largest absolute value by applying the one-dimensional Sobel operator to the samples with half pixel precision.
  • the coordinates of the contour may be determined using the sample value of the upper sample and the sample value of the lower sample with half pixel precision.
  • an integer coordinate 1621 of the contour may be determined based on integer samples, and a sample value of the left half sample 1623 and a right half sample 1621 of the integer coordinate 1620 may be generated. have.
  • the coordinates of the contour according to the exemplary embodiment include a sample value and a right sample 1622 of the left sample 1624 of the integer sample 1620 among the sample values of the left half sample 1623 and the sample value of the right half sample 1621. It may be determined as the position of the right half sample (1621) having a sample value close to the average value of the sample value of).
  • integer coordinates are determined based on the sample value of the upper integer sample and the lower integer sample of the integer sample, and one of the upper half sample and the lower half sample of the determined integer coordinates is determined.
  • the coordinates of the contour can be determined by the position of the sample.
  • FIG. 17 illustrates an example of a mask representing segments of the current block 1701 according to an embodiment.
  • the mask for the current block 1701 is data for determining an area of segments segmented from the current block 1701 and a boundary between the segments, and includes a mask array corresponding to each sample of the current block 1701. Can be.
  • the current block 1701 according to an embodiment may be divided into a plurality of segment areas according to the outline of the current block. Also, an area of the current block 1701 according to an embodiment may be divided into a plurality of segment areas and a boundary area 1720 between the segment areas.
  • the boundary area 1720 of the current block may be an area composed of samples through which the contour of the current block passes, or may be an area having a predetermined width around the contour of the current block. have.
  • the current block 1701 may be divided into two segments according to the straight outline 1705.
  • the current block 1701 may be divided into a left segment that includes the origin (0, 0) and a right segment that does not include the origin (0, 0).
  • the origin (0, 0) may be the location of the upper left sample in the current block 1701.
  • mask values for samples included in the left segment region of the current block 1701 may be all determined to be 0, and mask values corresponding to samples included in the right segment region may be determined to be all one.
  • the samples in the current block 1701 may be samples of a rectangular or square unit, the vicinity of the contour 1705 may be different from the case where the position of the sample of the current block 1701 is included in the left segment area or the right segment area.
  • the position of the sample is in the boundary region 1720 of spans the left segment region and the right segment region.
  • mask values for samples included in the boundary area 1720 between the left and right segments of the current block 1701 may be determined as 0 or 1 according to the method described below with reference to FIG. 18. Can be.
  • Samples included in the boundary area 1720 are samples through which the contour 1705 of the current block 1701 passes.
  • ten samples may be included in the boundary area 1720.
  • the contour 1705 of the current block 1701 can pass through the sample 1710 located at (3, 5), and the sample 1701 including a portion of the contour 1705 is the boundary area 1720. ) May be included.
  • the mask values for the samples included in the left segment region of the current block 1701 are all set to 0, and the mask values corresponding to the samples included in the right segment region are all 255 (or , 256).
  • Mask values corresponding to samples included in the boundary area 1720 between the left and right segments of the current block 1701 according to an embodiment are 0 to 255 (or, according to the method described below with reference to FIG. 18). 256).
  • Mask values of samples of the left segment area and the right segment area are not limited to the above examples, and may be different values according to the bit depth of the mask value.
  • each mask value for all samples included in the current block 1701 may be determined, so that a mask of the current block 1701 including the mask values may be generated.
  • a mask of the current block 1701 may be generated for the luma block of the current block 1701 and the chroma block of the current block 1701, respectively.
  • the mask for the chroma block may be generated based on the mask for the luma block of the current block 1701.
  • the mask for the chroma block may be generated by down-sampling the mask for the luma block of the current block 1701 or applying decimation considering phase shift. When decimation is applied, at least one of a 3-tap Gaussian filter in a horizontal direction and a 3-tap Gaussian filter in a vertical direction may be used.
  • a mask for the chroma block may be generated based on the information about the contour of the luma block of the current block 1701. That is, the coordinates of the outline for the luma block of the current block 1701 may be converted to obtain coordinates of the outline for the chroma block, and the mask for the chroma block may be generated using the coordinates of the outline for the chroma block. have.
  • the mask for the chroma block of the current block 1701 may be generated first, and then the mask for the luma block may be derived using the mask for the chroma block.
  • FIG. 18 illustrates examples of various methods of determining a mask value of a sample 1710 included in the boundary region of the current block 1701 of FIG. 17.
  • samples 1801, samples 1802, and samples 1803 that are samples included in the boundary region are shown.
  • the mask value corresponding to the sample 1710 included in the boundary area of the current block 1701 of FIG. 17 may be determined in the same manner as the sample 1801, the sample 1802, or the sample 1803 of FIG. 18.
  • a mask value corresponding to the sample 1801 is based on an area of two regions in the sample 1801 generated by an outline passing through the sample 1801. Can be determined.
  • the two regions in the sample 1801 generated by the contours are the left region (or upper left region) of the sample 1801 and the right region (or lower region) of the sample 1801. Can be.
  • the left region of the sample 1801 may be an area including an upper left vertex of the sample 1801 which is the origin of the sample 1801.
  • the mask value corresponding to the sample 1801 is The size of the area of the two regions in the sample 1801 generated by the contour may be determined.
  • the mask value corresponding to the sample 1801 is compared with the mask value of the right segment of the current block 1701 when the right area (0.75) is wider than the left area (0.25) by comparing the areas of the two areas in the sample 1801. The same value can be determined as 1.
  • the mask value corresponding to the sample 1801 according to an embodiment is generated by the outline. It can be determined in proportion to the size of the area of the two regions in the sample 1801 to be.
  • the mask value corresponding to the sample 1801 according to the embodiment is "((width of the left region of the sample 1801 * mask value of the left segment) + (width of the right region of the sample 1801) * Mask value of the right segment)) / the width of the sample 1801 ".
  • the area of the left area is 0.25
  • the area of the right area is 0.75
  • the mask value of the left segment of the current block 1701 is 0
  • the mask value of the right segment of the current block 1701 is 255
  • the sample 1801 If the width of is 1, the mask value corresponding to the sample 1801 may be determined as 191.25.
  • the mask value corresponding to the sample 1801 may be determined to be 191, rounded up to a value of 191.25.
  • the mask value of the right segment is 256
  • the mask value corresponding to the sample 1801 may be determined as 192.
  • the mask value of the left segment may be a mask value corresponding to a sample adjacent to the left side of the sample 1801
  • the mask value of the right segment may be a mask value corresponding to a sample adjacent to the right side of the sample 1801.
  • the mask value of the left segment may be a mask value corresponding to a sample adjacent to the upper side of the sample 1801
  • the mask value of the right segment may be a mask value corresponding to a sample adjacent to the lower side of the sample 1801.
  • a mask value corresponding to the sample 1802 may be determined based on a vertical distance d between a center of the sample 1802 and a contour passing through the sample 1802. Can be.
  • two regions within the sample 1802 generated by the contours are the left region (or upper left region) of the sample 1802 and the right region (or lower region) of the sample 1802. Can be.
  • the left region of the sample 1802 may be an area including an upper left vertex of the sample 1802, which is the origin of the sample 1802.
  • the mask value corresponding to the sample 1802 according to an embodiment is the center of the sample 1802. And a value between 0 and 255 based on the distance d between the contour passing through the sample 1801.
  • the mask value corresponding to the sample 1802 according to an embodiment is “128-clip3 ((when the region including the center of the sample 1802 is the left region including the origin of the sample 1802). 0, 1, d / threshold) * 128 ".
  • the mask value corresponding to the sample 1802 is "128 + clip3 (0) when the area including the center of the sample 1802 is a right area not including the origin of the sample 1802. , 1, d / threshold) * 128 ".
  • the threshold may be a threshold value that is set in advance to adjust the width of the boundary region
  • the Clip3 function may be defined as follows.
  • a value of 128 is an exemplary value and may be different depending on the bit depth of the mask value.
  • a mask value corresponding to the sample 1803 may include a horizontal distance d x and a vertical distance from a center of the sample 1803 to a contour passing through the sample 1803. It may be determined using the distance d y .
  • the mask value corresponding to the sample 1710 may be determined by calculating the cost c for the sample 1710 and comparing the cost for the sample 1710 with zero.
  • the cost c for the sample 1710 may be a value representing the distance between the sample 1710 and the contour passing through the current block 1701.
  • the cost for a sample 1710 can be calculated as follows.
  • (x0, y0) is the first coordinate of the contour 1705 passing through the sample 1710
  • (x1, y1) is the second coordinate of the contour 1705 passing through the sample 1710
  • (x, y ) May be the coordinates of the current sample 1710.
  • 19 and 20 illustrate examples of a method of generating a mask of the current block 1901 according to various embodiments.
  • a current block 1901 is shown that is divided into two segments using a single straight outline.
  • the current block 1901 may be an 8x8 block, but this is only an example.
  • the current block 1901 may be a 64x64, 32x32, 16x16, or the like block.
  • the current block 1901 may be divided into two segments according to an outline for determining at least one segment from the current block 1901.
  • the current block 1901 may be divided into a first segment and a second segment by an outline.
  • the first segment may be a left (or upper left) segment of the current block 1901 and the second segment may be a right (or lower right) segment of the current block 1901.
  • an area in which the samples completely included in the first segment of the current block 1901 is located is a first area (white), and an area in which the samples completely included in the second segment is located is a second area. It may be 2 areas (shading display).
  • a region in which a portion of the sample of the current block 1901 is included in the left segment and the remaining portion is included in the right segment may be a boundary region (dot display).
  • a mask value corresponding to each of the samples of the current block 1901 constituting the mask of the current block 1901 is A bit depth of 1 may be determined as a binary value.
  • a mask value corresponding to the first region may be determined as 0, and a mask value corresponding to the second region may be determined as 1. .
  • the mask value corresponding to the boundary area of the current block 1901 may be determined to be equal to 0, the same as the mask value corresponding to the first area.
  • the mask value corresponding to the boundary area of the current block 1901 may be determined to be 1 as the mask value corresponding to the second area.
  • mask values corresponding to some samples among the samples included in the boundary area of the current block 1901 are respectively determined to be zero.
  • the mask values corresponding to the remaining samples may be determined to be 1, respectively.
  • a grayscale value having two or more bit depths is determined for each sample of the current block 1901, and the grayscale value of the current block 1901 is determined based on the determined grayscale value.
  • the mask of the current block 1901 may be generated by determining a binary value having a bit depth of 1 for each sample.
  • the grayscale value corresponding to the sample of the current block 1901 may be determined according to various methods of determining a mask value of the sample included in the boundary region described above with reference to FIG. 18. For example, when the bit depth is 8, the grayscale value corresponding to the sample of the current block 1901 may be a value of 0 to 255.
  • a mask value corresponding to the first region of the current block 1901 may be determined as 0, and a mask value corresponding to the second region may be determined to be 255.
  • the mask value corresponding to the samples included in the boundary region of the current block 1901 may be determined as a value between 0 and 255, respectively, according to various methods described above with reference to FIG. 18.
  • the mask values of the current block 1901 may be generated by converting the grayscale mask values determined as values 0 to 255 to binary values.
  • a mask value of a binary may be generated based on a grayscale mask value for each sample determined as block 2001. If the mask value of the grayscale corresponding to the first area of the block 2001 is 0, the binary mask value may be determined to be zero. In addition, when the mask value of the grayscale corresponding to the second area of the block 2001 is 255, the binary mask value may be determined as 1.
  • the binary mask value of the sample is determined to be 0, and the mask of the grayscale corresponding to the sample is determined. If the value is greater than or equal to 128, the binary mask value of the sample may be determined as 1.
  • the binary mask value of the sample is determined to be 0, and the grayscale corresponding to the sample is determined. If the mask value is greater than 128, the binary mask value of the sample may be determined as 1.
  • the video decoding apparatus 20 and the video encoding apparatus 10 may more accurately express the boundary of the current block 1901 using the grayscale mask value, and convert the grayscale mask value into a binary mask value. It can reduce the complexity of the operation using the mask and increase the efficiency.
  • an area corresponding to a segment including an upper left sample that is an origin (0, 0) of the current block 1901 among the segments of the current block 1901 is determined as the first area, and corresponds to the remaining segments.
  • the area may be determined as the second area.
  • the cost c of the samples included in the current block 1901 may be calculated as follows, so that the position of the sample having the calculated cost less than zero may be determined as the first region.
  • (x0, y0) is the first coordinate of the contour passing through the current block 1901
  • (x1, y1) is the second coordinate of the contour
  • (x, y) is the coordinate of the sample of the current block 1901 Can be.
  • 21 illustrates an example of a method of generating a mask of the current block 2101, according to one embodiment.
  • a current block 2101 is shown that is divided into at least one segment using a single straight outline.
  • the current block 2101 may be an 8x8 block, but this is only an example and may be a block of 64x64, 32x32, 16x16, or the like.
  • the current block 2101 may not be divided into a first region, a second region, and a boundary region as shown in FIG. 17. Can be.
  • the contour passing through the current block 2101 does not divide the current block 2101 into two segments, the current block 2101 may not be divided into a first region, a second region, and a boundary region as shown in FIG. 17. Can be.
  • the contour passing only one sample located at the vertex of the current block 2101 the current block 2101 may be divided into one segment, and the current block 2101 may be contoured. This can be divided into segmented regions that are not boundary regions and boundary regions.
  • the contour may pass only one sample of the upper left sample, the lower left sample, the upper right sample, and the lower right sample of the samples in the current block 2101.
  • the mask of the current block 2101 may include a first mask value and a second mask value.
  • a mask value corresponding to a sample included in the boundary area of the current block 2101 is determined as a first mask value
  • the value may be determined as the second mask value.
  • the first mask value and the second mask value may be preset values differently according to bit depths of the mask values.
  • the first mask value may be 0 and the second mask value may be 127 (or 128).
  • the first mask value may be 255 (or 256), and the second mask value may be zero.
  • the first mask value and the second mask value of the current block 2101 may be set differently according to the position of the boundary area within the current block 2101. For example, when the boundary region of the current block 2101 is located at the upper left corner of the current block 2101, the first mask value and the second mask value are determined to be 0 and 127, respectively, and the current block 2101 When the boundary area is located at the upper right side in the current block 2101, the first mask value and the second mask value may be determined as 255 and 127, respectively.
  • 22 illustrates a method of performing prediction on a segment of the current block 2201 according to an embodiment.
  • At least one segment determined from the current block 2201 may be predicted using an intra prediction scheme.
  • the segment of the current block 2201 may be predicted using the intra DC mode.
  • the intra DC mode may be a method of generating a prediction value of a segment of the current block 2201 using reference samples around the current block 2201 in a picture including the current block 2201.
  • the predicted value of the segment of the current block 2201 may be a DC value, which may be an average value of the surrounding reference samples.
  • prediction of the segment of the current block 2201 may be performed in consideration of the boundary between the segments. Specifically, a sample value of a segment, which is a DC value, is first generated based on reference samples around the current block 2201, and a predicted value of the segment is applied by applying a mask indicating a region and a boundary of the segment to the sample value of the generated segment. Can be generated.
  • the sample value of the segment may mean sample values for each of the samples included in the region corresponding to the segment.
  • the prediction value of the segment may mean prediction values for each of the samples included in the region corresponding to the segment.
  • FIG. 22 is a diagram for describing a method of generating a sample value of a segment of the current block 2201 using reference samples around the current block 2201, according to an exemplary embodiment.
  • a sample value of a segment of the current block 2201 may be generated based on reference samples adjacent to the outside of the current block 2201.
  • Reference samples adjacent to the current block 2201 may include an upper reference sample adjacent to the upper outer side of the current block 2201 and a left reference sample adjacent to the left outer side.
  • the current block 2201 may be divided into two segments according to a mode of the contour for determining at least one segment from the current block 2201.
  • sample values of the samples included in the two segments of the current block 2201 may be generated based on reference samples adjacent to the outside of each corresponding segment of the reference samples of the current block 2201.
  • the current block 2201 may be divided into a left segment and a right segment.
  • the sample value of the left segment of the current block 2201 may be generated based on the upper reference sample and the left reference sample adjacent to the upper side and the left outer side of the left segment, respectively.
  • the sample value of the samples included in the left segment may be determined as an average value of the sample values of the upper reference samples and the left reference samples of the left segment.
  • the upper reference sample adjacent to the left segment may include samples positioned to the left of the first coordinate of the outline of the current block 2201 among the adjacent upper peripheral samples of the current block 2201.
  • the sample value of the right segment of the current block 2201 may be generated based on an upper reference sample adjacent to the right segment.
  • the upper reference sample adjacent to the right segment may include samples positioned to the right of the first coordinate of the outline of the current block 2201 among the adjacent upper peripheral samples of the current block 2201.
  • the current block 2201 may be divided into a left segment and a right segment.
  • the sample value of the left segment of the current block 2201 may be generated based on the upper reference sample and the left reference sample adjacent to the left segment, and the sample value of the right segment of the current block 2201 is adjacent to the right segment.
  • the upper reference sample adjacent to the left segment may include samples located to the left of the first coordinate of the outline of the current block 2201 among the adjacent upper peripheral samples of the current block 2201
  • the adjacent upper reference sample may include samples positioned to the right of the first coordinate of the contour of the current block 2201 among adjacent upper peripheral samples of the current block 2201.
  • the current block 2201 may be divided into a left segment and a right segment.
  • the sample value of the left segment of the current block 2201 may be generated based on the upper reference sample and the left reference sample adjacent to the left segment.
  • the upper reference sample adjacent to the left segment may include samples positioned to the left of the first coordinate of the outline of the current block 2201 among the adjacent upper peripheral samples of the current block 2201
  • the adjacent left reference sample may include samples located above the second coordinate of the outline of the current block 2201 among adjacent left peripheral samples of the current block 2201.
  • the sample value of the right segment of the current block 2201 may be generated based on the upper reference sample and the left reference sample adjacent to the right segment.
  • the upper reference sample adjacent to the right segment may include samples positioned to the right of the first coordinate of the outline of the current block 2201 among the adjacent upper peripheral samples of the current block 2201,
  • the adjacent left reference sample may include samples located below the second coordinate of the outline of the current block 2201 among adjacent left peripheral samples of the current block 2201.
  • the current block 2201 may be divided into a left segment and a right segment.
  • the sample value of the left segment of the current block 2201 may be generated based on the upper reference sample and the left reference sample adjacent to the left segment.
  • the sample value of the right segment of the current block 2201 may be directly transmitted without being generated using the neighboring samples of the current block 2201.
  • the video decoding apparatus 20 may generate the sample value by receiving information about the sample value of the right segment from the video encoding apparatus 10.
  • the sample value of the right segment of the current block 2201 may be generated using neighboring samples that are not adjacent to the current block 2201. A more detailed description thereof will be described later with reference to FIG. 23.
  • the current block 2201 may be divided into an upper segment and a lower segment.
  • the sample value of the upper segment of the current block 2201 may be generated based on the upper reference sample and the left reference sample adjacent to the upper segment.
  • the left reference sample adjacent to the upper segment may include samples located above the second coordinate of the outline of the current block 2201 among the adjacent left neighboring samples of the current block 2201.
  • the sample value of the lower segment of the current block 2201 may be generated based on the left reference sample adjacent to the lower segment.
  • the left reference sample adjacent to the lower segment may include samples located below the second coordinate of the outline of the current block 2201 among the adjacent left neighboring samples of the current block 2201.
  • the current block 2201 may be divided into a left segment and a right segment.
  • the sample value of the right segment of the current block 2201 may be generated based on the upper reference sample and the left reference sample adjacent to the right segment.
  • the left reference sample adjacent to the right segment may include samples positioned above the second coordinate of the outline of the current block 2201 among the adjacent left neighboring samples of the current block 2201.
  • the sample value of the left segment of the current block 2201 may be generated based on the left reference sample adjacent to the left segment.
  • the left reference sample adjacent to the left segment may include samples positioned below the second coordinate of the outline of the current block 2201 among the adjacent left neighboring samples of the current block 2201.
  • the sample value of the segments may be determined as the sample value of one of the reference samples or the median value of the sample values of the reference samples.
  • the sample value of the segment of the current block 2201 may be generated for the luma component and the chroma component, respectively, and the predicted value of the segment may be generated for the luma component and the chroma component, respectively.
  • the mode of the contour of the current block 2201 is the fourth mode
  • the sample value of the luma component of the right segment of the current block 2201 is determined by being directly transmitted and received between the video encoding apparatus 10 and the video decoding apparatus 20.
  • the sample value of the chroma component can be determined by deriving from the sample value of the luma component.
  • the sample value of the right segment of the current block 2201 is transmitted and received between the video encoding apparatus 10 and the video decoding apparatus 20. Can be.
  • the video encoding apparatus 10 may determine the sample values of all segments of the current block for accurate prediction even when the neighboring reference samples adjacent to the current block are available regardless of the mode of the contour. You can also send.
  • the video encoding apparatus 10 calculates a difference value between a sample value of a real segment obtained using samples included in a segment of a current block and a sample value of a segment derived using peripheral reference samples. It may also be transmitted to the video decoding apparatus 20.
  • the video decoding apparatus 20 may reconstruct the sample value of the segment of the current block based on the sample value of the segment derived from the segment and the difference value received from the video encoding apparatus 10 using the peripheral reference samples of the current block. have.
  • a predicted value of the segment of the current block 2201 may be generated by applying a mask indicating the area and the boundary of the segment to the sample value of the generated segment. Can be.
  • a prediction value of the segments of the current block 2201 may be determined based on a sample value of the segments. For example, when the mask value of the first region in which the samples included in the first segment are located is 0 and the mask value of the second region in which the samples included in the second segment are located is 1, the current block 2201 may be used. The predicted value of the first segment may be determined as the sample value of the first segment, and the predicted value of the second segment of the current block 2201 may be determined as the sample value of the second segment.
  • the predicted value of the samples included in the boundary region of the current block 2201 may be determined according to the mask value of the boundary region. For example, the predicted value of the sample having a mask value of zero among the samples included in the boundary region of the current block 2201 is determined as the sample value of the first segment having the same mask value, and the predicted value of the sample having a mask value of 1. May be determined as the sample value of the second segment having the same mask value.
  • the predicted value of the segments of the current block 2201 is Based on the sample value of the segments can be calculated as follows.
  • P represents a prediction value of each sample included in the current block 2201
  • M represents a mask value of each sample included in the current block 2201.
  • DC0 may represent a sample value of the first segment of the current block 2201
  • DC1 may represent a sample value of the second segment of the current block 2201.
  • 255 and 128 are the maximum value and the median value according to the bit depth of the mask value of the current block 2201, respectively, and may be changed according to the bit depth of the mask value of the current block 2201.
  • the predicted value of the first segment of the current block 2201 having a mask value of 0 is determined as the sample value of the first segment
  • the predicted value of the second segment of the current block 2201 having a mask value of 255 is formed of the first value. It can be determined as a sample value of two segments.
  • the predicted values of the samples included in the boundary region of the current block 2201 may be determined using the mask value of the boundary region, the sample value of the first segment, and the sample value of the second segment.
  • the boundary of an object included in the current block 2201 may be more accurately represented.
  • a method of predicting the current block 2201 in consideration of segments determined according to the contour of the current block 2201 according to an embodiment is combined with an intra prediction and inter prediction method using an existing rectangular prediction block.
  • a prediction block of block 2201 may be generated.
  • the prediction block of the current block 2201 may be generated as follows.
  • P0 (x, y) represents a prediction block of the current block 2201 according to a method of predicting the current block 2201 in consideration of segments determined according to the outline of the current block 2201 according to an embodiment.
  • P1 (x, y) may represent a prediction block of the current block 2201 according to an intra prediction or inter prediction method using an existing rectangular prediction block.
  • P (x, y) may represent the final prediction block of the current block 2201.
  • P1 (x, y) may be the prediction block of the current block 2201 generated using the planar mode of HEVC.
  • P1 (x, y) may be a prediction block of the current block 2201 generated using the first mode selected by the most probable mode (MPM) rule of HEVC.
  • MPM most probable mode
  • the final prediction block of the current block 2201 may be generated by assigning a weight to each prediction block as follows.
  • the prediction block of the current block 2201 is generated by a combination of various methods as described above, the coding efficiency of the gradient or texture of the sample value in the current block 2201 may be improved.
  • the combination of the above various methods of the prediction block of the current block 2201 may be selectively applied on a block basis.
  • 23 illustrates a method of performing prediction on a segment of the current block 2301 according to an embodiment.
  • a current block 2301 is shown in which the mode of the contour is the fourth mode according to an embodiment.
  • the current block 2301 may be divided into a left (or top left) segment and a right (or bottom right) segment. At this time, since the right segment of the current block 2301 is not adjacent to any of the upper reference samples and the left reference samples of the current block 2301, the sample value of the right segment of the current block 2301 is determined by the current block ( Adjacent upper reference samples and left reference samples of 2301 are not available.
  • a sample value of the right segment of the current block 2301 may be generated with reference to the neighboring samples of the current block 2301.
  • the neighboring sample of the current block 2301 referred to may not be a sample adjacent to the current block 2301.
  • the sample value of the right segment of the current block 2301 may be generated by referring to samples of a position in which the upper sample and the left sample that are adjacent to the outside of the current block 2301 are extended.
  • the reference sample may be a sample at a position where the upper sample of the current block 2301 is extended to the right and a sample at a position where the left sample of the current block 2301 is extended to the lower side.
  • the reference sample may include a sample located at the bottom right of the upper right block 2302 of the current block 2301 and a sample located at the bottom right of the lower left block 2302 of the current block 2301.
  • the sample value of the right segment of the current block 2301 is at the lower right of the lower left block 2302 of the block 2301 and the sample value of the sample located at the lower right of the block 2302 according to one embodiment. It may be determined as the average value of the sample values of the located sample.
  • the video encoding apparatus 10 and the video decoding apparatus do not refer to adjacent or non-adjacent neighboring reference samples of the current block 2301 for the sample value of the right segment of the current block 2301 according to another embodiment. It can be directly transmitted and received between the (20).
  • the video encoding apparatus 10 may determine the sample value of the right segment by using the sample values of the samples included in the region corresponding to the right segment of the current block 2301. For example, the sample value of the right segment may be determined as an average of the sample values of the samples included in the region corresponding to the right segment of the current block 2301. The video encoding apparatus 10 according to an embodiment may transmit the determined sample value of the right segment to the video decoding apparatus 20.
  • the sample value of the right segment may be transmitted as data having the same bit depth as the bit depth of the samples of the current block 2301.
  • the sample value of the right segment may be transmitted as data having a bit depth smaller than the bit depth of the samples of the current block 2301 through quantization for transmission efficiency.
  • 24 is a diagram for describing a method of transmitting sample values of segments of the current block 2301 according to various embodiments.
  • the sample value of the segment may be quantized and dequantized for transmission efficiency.
  • the video encoding apparatus 10 may uniformly quantize the sample value of the determined segment to a 4-bit value as follows. .
  • DCquant may be a quantized sample value
  • DCorig may be a sample value before quantization
  • the video encoding apparatus 10 may round the sample value of the determined segment and uniformly quantize it to a 4-bit value as follows.
  • the video decoding apparatus 20 may dequantize the sample value of the segment received from the video encoding apparatus 10 as follows.
  • the video decoding apparatus 20 may dequantize the sample value of the segment received from the video encoding apparatus 10 as follows.
  • the video encoding apparatus 10 and the video decoding apparatus 20 may non-uniformly quantize and dequantize the sample values of the segments, respectively.
  • a quantization coefficient for non-uniformly quantization when the bit depth of the samples of the current block 2301 is 8 bits is shown.
  • the numbers in the graph may be sample values before quantization, and the y coordinate may be quantized sample values.
  • the x-coordinate may be a result value in which the quantized sample value is scaled.
  • the sample value of the segment may be more quantized in the vicinity of the intermediate value 128, and the quantized sample value may be scaled to 4 bits of data.
  • the coding efficiency can be increased.
  • the video encoding apparatus 10 may non-uniformly quantize a sample value of a segment as follows.
  • the mode of the contour of the current block 2301 is the fourth mode
  • the sample value or the prediction value of the right segment of the current block 2301 according to an embodiment of the video encoding apparatus 10 and the video decoding apparatus 20 It can be sent and received between.
  • the video encoding apparatus 10 transmits the sample values of all segments of the current block for accurate prediction, even when neighboring reference samples adjacent to the current block are available regardless of the mode of the contour. It may be.
  • 25 and 26 illustrate a method of generating sample values of segments of a current block by using neighboring samples of the current blocks 2510, 2610, and 2620, according to various embodiments.
  • Peripheral samples of the current block 2510 may include an upper peripheral sample, a left peripheral sample, and an upper left peripheral sample of the current block 2510.
  • the samples shown in FIG. 25 may be samples of a luma component.
  • the sample value of the current block 2510 may be generated by referring to a reference sample of some of the neighboring samples. For example, peripheral samples that are greater than or equal to a predetermined distance to the contour among the peripheral samples of the current block 2510 may be determined as reference samples.
  • a reference sample of the current block 2510 may be determined using the first coordinate 2501 and the second coordinate 2502 of the outline of the current block 2510.
  • the first coordinate 2501 and the second coordinate 2502 of the contour of the current block 2510 may be determined as the position of a sample adjacent to the current block according to the method described above with reference to FIGS. 11 to 14.
  • the reference sample of the current block 2510 may be determined as a neighboring sample of which the distance between the first coordinate 2501 and the second coordinate 2502 of the contour is greater than or equal to a predetermined distance among the surrounding samples of the current block 2510. Can be.
  • the current block 2510 since the mode of the contour of the current block 2510 is the third mode, the current block 2510 may be divided into a first segment on an upper left side and a second segment on a lower right side of the current block 2510.
  • the sample value of the first segment of the current block 2510 is predetermined to the left from the first coordinates 2501 of the outline of the current block 2510 among upper peripheral samples adjacent to the first segment. It may be determined using a reference sample that is separated by more than a predetermined distance upward from the second coordinate 2502 of the contour of the current block 2510 among reference samples that are separated by more than a distance and left samples adjacent to the first segment.
  • sample value of the second segment of the current block 2510 is to the right from the first coordinates 2501 of the outline of the current block 2510 among the upper peripheral samples adjacent to the second segment. It may be determined using a reference sample that is separated by a predetermined distance or more downward from the second coordinate 2502 of the contour of the current block 2510 among reference samples that are separated by a predetermined distance and the left neighboring samples adjacent to the second segment. .
  • the predetermined distance is a predetermined distance in consideration of the size of the current block 2510, the efficiency of the operation, the image quality of the image, and the like, and may be, for example, 2 pixels in FIG.
  • Peripheral samples of the current blocks 2610 and 2620 may include upper peripheral samples, left peripheral samples, and upper left peripheral samples of the current blocks 2610 and 2620.
  • the samples shown in FIG. 26 may be samples of a chroma component.
  • the sample value of the current block 2610 may be generated using reference samples of some of the surrounding samples. For example, peripheral samples that are more than a predetermined distance from the contour among the peripheral samples of the current block 2610 may be determined as reference samples.
  • a reference sample of the current block 2610 may be determined using the first coordinate 2601 and the second coordinate 2602 of the outline of the current block 2610.
  • the current block 2610 of the chroma component may be a block having half pixel precision.
  • the first coordinate 2601 of the contour of the current block 2610 is determined to be an integer sample position above the current block 2610, and the second coordinate 2602 is the current block 2610. It may be determined as the half sample position of the left side of.
  • the reference sample of the current block 2610 may be determined as a neighboring sample that is separated from the first coordinate 2601 and the second coordinate 2602 of the contour among the surrounding samples of the current block 2610 by a predetermined distance or more.
  • the current block 2610 may be divided into a first segment on an upper left side and a second segment on a lower right side of the current block 2610.
  • the sample value of the first segment of the current block 2610 is predetermined to the left from the first coordinates 2601 of the outline of the current block 2610 among the upper peripheral samples adjacent to the first segment. It may be determined using a reference sample that is separated by a distance or more from the second coordinate 2602 of the outline of the current block 2610 among the reference sample that is separated by more than a distance and the left peripheral samples adjacent to the first segment.
  • sample value of the second segment of the current block 2610 is to the right from the first coordinate 2601 of the contour of the current block 2610 among the upper peripheral samples adjacent to the second segment. It may be determined using a reference sample that is separated by a predetermined distance or more downward from the second coordinate 2602 of the contour of the current block 2610 among the reference sample that is separated by a predetermined distance and the left side adjacent to the second segment. .
  • the predetermined distance is a predetermined distance in consideration of the size of the block, the efficiency of the operation, the image quality of the image, and the like.
  • the predetermined distance in FIG. Can be 1 pixel.
  • a reference sample of the current block 2620 of the chroma component may be determined based on the first coordinate 2603 and the second coordinate 2604 in integer pixel units.
  • the first coordinate 2603 and the second coordinate 2604 of the contour of the current block 2620 of the chroma component are determined as positions of neighboring samples in integer units of the current block 2620, and the current block (
  • the reference sample of 2620 may be determined as a peripheral sample spaced a predetermined distance or more from the determined first coordinates 2603 and the second coordinates 2604.
  • FIG. 27 is a flowchart of a method of predicting a current block according to the number of segments divided from a current block in the video decoding apparatus 20 according to an embodiment.
  • the current block may be predicted using another prediction method according to the number of segments divided from the current block.
  • the number of segments divided from the current block may be determined.
  • the number of segments divided from the current block may be determined based on information seg_num_minus1 regarding the number of segments.
  • the current block when the number of segments divided from the current block is 1, the current block may not include a boundary of an object in the current block. In this case, the current block may be determined as one segment.
  • a prediction mode for one segment determined from the current block may be determined.
  • the prediction mode for one segment determined from the current block may include a DC mode, a planar mode, a vertical mode, and a horizontal mode, which generate prediction values of the current block using neighboring samples of the current block.
  • the mode may be a mode or a combination thereof.
  • the current block is divided into two segments based on the contour of the object boundary, and prediction for each segment may be performed.
  • step 2730 may include the case of three or more as well as the case where the number of segments is two.
  • FIG. 28 is a diagram for describing a process of encoding and decoding residual data of a current block according to a transformation unit of a current block, according to an embodiment.
  • the current block may be divided into a transform unit that is a data unit that is a base of transform of a frequency.
  • the transformation unit may be processed by dividing the transformation unit including the outline of the current block and the transformation unit not including the outline of the current block.
  • the residual data according to the difference between the prediction block generated for the current block and the original block is generated, and the transform, protons, and entropy decoding are performed. It can handle the dual radar.
  • prediction may be performed on the transform unit of the current block to generate and process residual data according to a difference between the prediction block and the original block of the transform unit.
  • residual data according to the difference between the prediction block generated for the current block and the original block may be generated.
  • the prediction block may be generated and used in consideration of the region of each segment of the current block in the transform unit of the current block. For example, when generating a prediction block, a mask of the generated current block may be used, or a mask for a transform unit may be newly generated and used.
  • filtering may be performed to reduce an error of a boundary between transform units with respect to a transform unit of a current block according to an embodiment. For example, referring to FIG. 28, an 8 ⁇ 8 transform unit is shown.
  • Samples located at the edge of the transform unit may be filtered based on adjacent peripheral samples.
  • adjacent neighboring samples may include the upper sample and the left sample of the transform unit as usable samples, and samples located at the edge of the transform unit adjacent to the available surrounding samples may be filtered.
  • the filtered sample of the transform unit may be filtered as follows.
  • C represents the filtered sample value of the sample in the transform unit
  • B represents the sample value before the sample in the transform unit is filtered
  • A represents the sample value of the surrounding sample used to filter the sample in the transform unit.
  • the filtered sample of the transform unit is the sample value A0 of the upper sample and It can be filtered using all of the sample value A1 of the left sample.
  • the filtered sample of the transform unit may be filtered by giving different weights to the sample values as follows.
  • Filtering for the transform unit may be applied to the transform block of the luma component and the transform block of the chroma component, respectively, or may be applied only to the luma component to reduce the complexity of the operation.
  • 29 to 31 illustrate a method of obtaining a contour of a current block from neighboring blocks of the current block according to various embodiments.
  • the neighboring block 2920 of the current block 2910 may be a block adjacent to the left side of the current block 2910.
  • the partitioning of the block of the current block 2910 is performed by using information about the partitioning of the block of the neighboring block 2920.
  • Information can be obtained.
  • the information about the division of the block of the neighboring block 2920 may be information about the coordinate of the outline.
  • the mode information of the contour of the current block 2910 and the coordinates of the contour may be determined using coordinate information of the contour of the neighboring block 2920 of the current block.
  • the contour of the peripheral block 2920 is a single straight contour passing through the first coordinate 2921 and the second coordinate 2922, and the mode of the contour may be the first mode. Since the outline of the neighboring block 2920 is based on the boundary of the object in the picture, it is highly likely to be connected to the outline of the current block 2910, so that the outline of the neighboring block 2920 exists in the extension of the outline of the neighboring block 2920. The probability can be high. Therefore, the contour of the neighboring block 2920 according to an embodiment may be extended toward the current block 2910 to derive the contour of the current block 2910.
  • the contour of the peripheral block 2920 may extend toward the current block 2910 based on the first coordinate 2921 and the second coordinate 2922 of the contour of the peripheral block 2920.
  • the contour of the neighboring block 2920 may extend in the direction of the current block 2910 based on the slope of the contour of the neighboring block 2920.
  • the outline of the current block 2910 obtained by expanding the outline of the neighboring block 2920 is a straight outline passing through the first coordinate 2911 and the second coordinate 2912 and having a mode of the fifth mode. Can be determined.
  • the method of determining the outline of the current block 2910 using the neighboring block 2920 may be performed by the following process.
  • the information about the contour of the neighboring block 2920 of the current block 2910 may include mode information and coordinate information of the contour, and whether or not the contour exists in the neighboring block 2920 may be determined based on the information about the number of segments of the neighboring block 2920. .
  • the mode and coordinates of the outline of the current block 2910 may be determined based on the outline of the expanded peripheral block 2920.
  • the position of the sample through which the contour of the extended peripheral block 2920 is passed among the samples located at the edge of the current block 2910 may be the coordinate of the contour of the current block 2910, and the current block 2910
  • the mode of the contour of the current block 2910 may be determined according to the coordinates of the contour of.
  • the information on the contour of the current block 2910 derived from the neighboring block 2920 is obtained.
  • the information about the contour of the current block 2910 of the quarter pixel precision derived based on the contour of the quarter pixel precision neighboring block 2920 may be converted into information of integer pixel precision.
  • information about the contour of the current block 3010 may be obtained using other neighboring blocks in addition to the left block A1 of the current block 3010.
  • the left block A1, the lower left block A0, the upper block B1, the upper right block B0, and the upper left block B2 of the current block 3010 may be used.
  • a block decoded before the current block 3010 may be used among blocks located near the current block 3010.
  • a list of candidate neighboring blocks may be generated.
  • the candidate list of neighboring blocks may include a left block A1, an upper block B1, a right upper block B0, a lower left block A0, and an upper left block B2 in order.
  • the candidate list of the neighboring block may include a left block A1, an upper block B1, an upper left block B2, an upper right block B0, and a lower left block A0 in this order.
  • the candidate list of neighboring blocks including neighboring blocks in various orders may be generated in the video encoding apparatus 10 and the video decoding apparatus 20 in the same manner.
  • a candidate list of neighboring blocks may be generated such that only one neighboring block among the plurality of neighboring blocks is included as a candidate.
  • a pruning process may be performed to exclude candidates from which contours of the same current block 3010 are derived, such that only one neighboring block of the plurality of neighboring blocks may be included as a candidate.
  • index information indicating one candidate among candidate lists of neighboring blocks may be transmitted and received between the video encoding apparatus 10 and the video decoding apparatus 20. Or, if the candidate list of neighboring blocks includes only one candidate, index information may not be transmitted or received.
  • the outline of the current block 3010 may be derived using a plurality of candidate blocks among candidates included in the candidate list of the neighboring block.
  • the outline of the current block 3010 may be determined by adjusting the coordinates of the outline of the current block 3010 derived from the neighboring block.
  • the coordinates of the contour of the current block 3010 derived from the neighboring block can be adjusted by moving according to a predetermined value on the x axis or the y axis.
  • the predetermined value may be +1, -1, +2, -2, and the like.
  • information about the adjusted outline of the neighboring block may be included in the candidate list of the neighboring block used to obtain the outline of the current block 3010.
  • information about the contour of the current block 3010 derived from the neighboring block may be used as prediction data.
  • the video decoding apparatus 20 may determine between the information about the outline of the current block 3010 determined using the samples in the current block 3010 and the information about the outline of the current block 3010 derived from the neighboring block.
  • the difference value may be encoded and transmitted to the video decoding apparatus 20.
  • the video decoding apparatus 20 determines the coordinates of the contour of the current block 3010 based on the received difference value and the information about the contour of the current block 3010 derived from the neighboring blocks of the current block, thereby making the current block more accurate. Decoding of 3010 may be possible.
  • the candidate list may further include a default block.
  • the candidate list may further include a default block.
  • the predetermined number of candidate lists may be five. Referring to FIG. 31, examples of a default block appear.
  • the default blocks of FIG. 31 may be sequentially included in the candidate list.
  • the information about the contour of the neighboring block may be generated based on the reconstructed neighboring block.
  • the information about the contour of the neighboring block generated based on the reconstructed neighboring block may be stored in a buffer and used to determine the contour of the current block 3010 at the time of encoding the current block 3010.
  • the video decoding apparatus 20 may also decode the current block 3010 using the neighboring blocks reconstructed in the same manner.
  • one of a general block unit prediction method (eg, intra prediction of HEVC) may be used.
  • the mode can be selected.
  • the prediction mode of the current block 3010 may be determined as the first mode of the list of most probable mode (MPM) modes of the current block 3010.
  • the MPM mode list of the current block 3010 may include a mode of a left block or an upper block adjacent to the current block 3010.
  • the MPM mode list of the current block 3010 may further include a planner mode, a DC mode, a vertical mode, and the like.
  • the prediction mode of the current block 3010 may be determined to be a DC mode
  • the prediction mode of the current block 3010 may be determined to be an angular mode of an angle most similar to the slope of the outline of the current block 3010. .
  • the information about the contour of the current block 3010 may be obtained by referring to an edge map including information indicating an edge direction of samples included in the current block.
  • the edge map of the current block 3010 may be generated in picture units or block units, and may be transmitted by being included in a slice header or a header of the current block 3010.
  • 32 and 33 illustrate a method of performing prediction using subblocks of blocks 3210 and 3220 according to various embodiments.
  • block 3210 and block 3220 are shown, according to one embodiment.
  • the block 3210 and the block 3220 may use sub blocks.
  • block 3210 and block 3220 may each be a 64x64 block, and subblocks of block 3210 and 3220 may each be 8x8 blocks.
  • coding efficiency may be deteriorated when the block 3210 is divided based on a straight outline. Accordingly, coding efficiency may be improved by dividing the block 3210 according to an embodiment into a plurality of subblocks including the subblock 3211 and dividing the plurality of subblocks based on a linear contour.
  • Subblocks of the block 3210 according to an embodiment may be divided into at least one segment based on a linear outline along an object boundary, and prediction may be performed on each segment.
  • the sub block not including the boundary of the object may be predicted according to a general intra prediction method.
  • a block 3220 that includes boundaries of a plurality of objects is shown. Specifically, since the block 3220 includes a boundary between two objects, the method of using two linear contours along the boundary of the two objects may be more complicated than using a single linear contour. Accordingly, the complexity of the operation can be reduced by dividing the block 3220 into a plurality of subblocks and dividing the plurality of subblocks based on a single linear contour.
  • the subblocks of the block 3220 may be divided into at least one segment based on a single straight line contour along an object boundary, and prediction may be performed on each segment.
  • the sub block not including the boundary of the object may be predicted according to a general intra prediction method.
  • an encoding and decoding order of subblocks included in blocks 3310, 3320, 3330, 3340, and 3350 according to various embodiments is shown.
  • the subblocks of the blocks 3310 may be encoded or decoded in the z-scan order.
  • the sub-blocks of the block 3320 may be sequentially encoded or decoded from left to right.
  • the sub blocks of the block 3330 may be sequentially encoded or decoded from the upper side to the right side.
  • the block 3340 when the block 3340 is divided into sub-blocks, the block 3340 may be divided into a plurality of regions first, and sub-blocks of the block 3340 may be encoded or decoded according to the priority of the plurality of regions. .
  • the block 3340 may be divided into one region, two regions, three regions, and four regions, and may be sequentially encoded or decoded from subblocks included in the region.
  • an order of encoding or decoding of subblocks may be determined according to a z-scan order.
  • the block 3350 when the block 3350 is divided into sub-blocks, the block 3350 may be divided into a plurality of regions first, and sub-blocks of the block 3350 may be encoded or decoded according to the priority of the plurality of regions. .
  • the block 3350 may be divided into one region, two regions, three regions, fourth regions, and five regions, and may be sequentially encoded or decoded from subblocks included in the region.
  • an order of encoding or decoding of subblocks may be determined according to a z-scan order.
  • 34 illustrates a method of determining three segments from the current block 3400, according to one embodiment.
  • the current block 3400 may be encoded based on the first contour 3401 of the current block 3400, and encoding information about the current block 3400 may be transmitted to the video decoding apparatus 20.
  • the transmitted encoding information may include information about the first contour 3401 of the current block 3400.
  • the mode of the first contour 3401 of the current block 3400 may be a fourth mode.
  • the video decoding apparatus 20 that has received encoding information about the current block 3400 according to an embodiment may obtain information about the first contour 3401 of the current block 3400 from the received encoding information. have.
  • the second contour 3402 of the current block 3400 may be obtained by using upper and left peripheral samples adjacent to the current block 3400.
  • the current block 3400 is divided into three segments by using a first contour 3401 based on encoding information obtained from a bitstream and a second contour 3401 derived from neighboring samples of the current block. It can be divided and decoded.
  • the current block 3400 may be divided into a first segment 3410, a second segment 3420, and a third segment 3430 according to the first contour 3401 and the second contour 3402. .
  • the mask of the current block 3400 may be generated based on the first segment 3410, the second segment 3420, and the third segment 3430.
  • the mask value of the region corresponding to the first segment 3410 is 0, and the mask value of the region corresponding to the second segment 3420 is 255 (or 256).
  • the mask value of the corresponding region may be determined as 511 (or 512).
  • the mask value of the boundary region between the first segment 3410 and the second segment 3420 is a value of 0 to 255
  • the mask value of the boundary region between the second segment 3420 and the third segment 3430. May be determined as a value from 256 to 511.
  • the current block 3400 may reconstruct a more accurate image by using an additional derived second contour.
  • 35 illustrates a method of determining segments by using a subblock of the current block 3500 based on the outline of the current block 3500 according to an embodiment.
  • the current block 3500 may be divided into a plurality of subblocks based on a contour corresponding to a boundary of an object included in the current block 3500.
  • the current block 3500 may determine a contour corresponding to the boundary of the current block 3500, and may be divided into a plurality of sub-blocks using the determined contour.
  • the current block 3500 may be divided into four first subblocks having the same size as the first subblock 3510.
  • the length of the width and length of the first sub-block 3510 may be half of the length of the width and length of the current block 3500, respectively.
  • the current block 3500 may be divided hierarchically into smaller sub-blocks according to whether the current block 3500 includes the outline of the current block 3500.
  • a first sub-block including the contour of the current block 3500 of the four first sub-blocks may have four sub-lengths of which the length of the width and length is half the length of the width and length of the first sub-block, respectively. It may be divided into two sub blocks again.
  • the first sub block 3510, which does not include the outline of the current block 3500, of the four first sub blocks may not be divided any more.
  • the current block 3500 may determine the segment using the divided first sub block and the second sub block. For example, for the second sub block 3520 including the outline of the current block 3500 among the second sub blocks, the outline of the second sub block 3520 based on the outline of the current block 3500 is Can be determined.
  • the second sub block 3520 may be divided into at least one segment according to the determined contour of the second sub block 3520. For example, the second sub block 3520 may be divided into two segments according to a straight line contour.
  • the second block including the first block 3510 and the second block 3520 and the current block 3500 that do not include the contour of the current block 3500.
  • Prediction may be performed using the segments segmented from block 3520.
  • intra prediction may be performed on the first block 3510 and the second block 3520 by using an intra mode such as a DC mode, a planar mode, an angular mode, or the like.
  • intra mode such as a DC mode, a planar mode, an angular mode, or the like.
  • second blocks including the outline of the current block 3500 such as the second block 3520
  • intra prediction using segments divided according to boundaries of objects in the blocks described with reference to FIGS. 1 to 4 may be performed. have.
  • the split depth in which the current block 3500 is divided may be determined based on coding efficiency, and the determined split depth may be transmitted from the video encoding apparatus 10 to the video decoding apparatus 20.
  • 36 illustrates a method of determining an outline of a current block 3600 according to an embodiment.
  • the outline of the current block 3600 may be determined using a piece-wise linear outline.
  • the first coordinate a indicating the start point of the contour corresponding to the boundary of the object and the second coordinate b indicating the end point of the contour may be determined.
  • the contour of the current block 3600 may not be determined as a single straight line connecting the first coordinate a and the second coordinate b, but may be determined as two straight lines using the third coordinate d.
  • the third coordinate d may be a coordinate vertically moved by a predetermined displacement amount from a center of a straight line connecting the first coordinate a and the second coordinate b.
  • the information used to determine the contour of the current block 3600 may include a first coordinate (a), a second coordinate (b), and a straight line connecting the first coordinate (a) and the second coordinate (b). It may be a predetermined displacement amount representing a vertical distance from the center to the third coordinate d.
  • the third coordinate d of the current block 3600 may be determined with an integer pixel precision in order to reduce the complexity of the operation during encoding and decoding. For example, a method of determining the position of the integer sample closest to the actual position may be used.
  • a predetermined amount of displacement for representing the third coordinate d may also be determined in integer units.
  • the predetermined displacement amount may be indexed among a plurality of preset displacement amounts. That is, the predetermined amount of displacement may be determined using index information indicating one of a plurality of preset displacements, and the index information may be transmitted and received between the video encoding apparatus 10 and the video decoding apparatus 20.
  • 37 is a diagram illustrating a method of obtaining a prediction value of a current block, according to an embodiment, in pseudo code.
  • the prediction value of the current block may be generated by first generating a sample value of a segment divided from the current block, and applying a mask indicating a region and a boundary of the segment to the sample value of the generated segment.
  • an error occurring when the prediction is performed may be reduced.
  • the filtering may be performed on the boundary region where the contour of the current block is located.
  • filtering may be performed on a predicted value of a sample located at a boundary of segments of a current block among samples of the current block.
  • whether the sample of the current block is located at the boundary of the segments may be determined based on the mask of the current block.
  • Mask [x] [y] represents a mask value of a sample at the (x, y) position of the current block
  • P [x] [y] represents a predicted value of a sample at the (x, y) position of the current block
  • P ftr [x] [y] represents the filtered prediction of the sample at position (x, y) of the current block.
  • W and H represent the width and height of the current block, respectively.
  • whether a sample of the current block is located at a boundary of segments may be determined by comparing mask values of neighboring samples of the current sample. For example, when the mask value of the left sample and the mask value of the right sample are different, it may be determined that the current sample of the current block is located at the boundary of the segments. When the mask value of the left sample and the mask value of the right sample are the same, it may be determined that the current sample of the current block is not located at the boundary of the segments. Alternatively, when the mask value of the upper sample and the mask value of the lower sample are different, it may be determined that the current sample of the current block is located at the boundary of the segments. If the mask value of the upper sample and the mask value of the lower sample are the same, it may be determined that the current sample of the current block is not located at the boundary of the segments.
  • the sample value of the current sample and the sample value of the neighboring sample may be compared to use only the samples inside the current block.
  • a sample value of a sample determined to be located at a boundary of segments among samples of a current block may be filtered based on sample values of neighboring samples. For example, when the mask value of the left sample and the mask value of the right sample are different, the sample value of the current sample may be filtered by the average of the sample value of the current sample, the sample value of the left sample, and the sample value of the right sample. In this case, a weight may be applied to each sample value used. For example, a horizontal one-dimensional Gaussian filter having a filter value such as [1, 2, 1] may be used.
  • the sample value of the current sample may be filtered by the average of the sample value of the current sample, the sample value of the upper sample, and the sample value of the lower sample.
  • a vertical one-dimensional Gaussian filter having a filter value such as [1, 2, 1] may be used.
  • both horizontal and vertical filtering may be performed regardless of the order.
  • only one of filtering in the horizontal direction and filtering in the vertical direction may be performed with respect to the current block.
  • one of the filtering in the horizontal direction and the filtering in the vertical direction may be determined based on the slope of the contour of the current block. If the slope of the outline of the current block is larger than the change amount in the horizontal (x axis) than the change amount in the vertical (y axis), the filtering in the vertical direction is performed, and the change amount in the horizontal (x axis) is vertical (y axis). In the case of smaller than the amount of change to the horizontal filtering may be performed.
  • At least one of horizontal filtering and vertical filtering may be performed according to the mode of the contour of the current block.
  • the mode of the outline of the current block is the second mode representing the vertical outline
  • only the filtering in the horizontal direction may be performed
  • the mode of the outline of the current block is the fifth mode representing the horizontal outline
  • Only vertical filtering can be performed.
  • both the horizontal filtering and the vertical filtering may be performed.
  • the luma block and the chroma lock may be filtered in different ways.
  • the luma component of the current block may be filtered according to the mode of the contour of the current block
  • the chroma component of the current block may be filtered according to the slope of the contour of the current block.
  • a two-dimensional filter a median filter, an average filter, or the like may be used without being limited to the one-dimensional filter.
  • FIGS. 38 to 44 a method of performing prediction for a current block using a contour of the current block directly without generating a mask for the current block is disclosed.
  • 38 illustrates a method of performing prediction on the current block 3800 according to an embodiment.
  • the contour 3820 corresponding to the boundary of the object included in the current block 3800 may be determined with respect to the current block 3800.
  • the contour 3820 of the current block 3800 can be specified by information about the coordinates of the contour 3820 and mode information of the contour 3820.
  • the current block 3800 may be divided into at least one segment based on the contour 3820 of the current block 3800, and the contour 3820 may be divided into the plurality of segments when the current block 3800 is divided into a plurality of segments.
  • the boundary region including the boundary of the segment may appear.
  • whether to perform prediction according to the direction of the boundary may be determined with respect to the current block 3800 according to an embodiment. That is, it may be determined whether to determine the prediction value for the samples included in the boundary area of the current block 3800 according to the direction of the boundary.
  • the video encoding apparatus 10 may select a prediction method having the best RD cost among a prediction method based on a boundary direction and a prediction method using a mask, and according to an embodiment, video decoding
  • the apparatus 20 may receive and determine information indicating whether to perform prediction according to the direction of the boundary with respect to the current block 3800 from the video encoding apparatus 10.
  • the prediction may be performed on the boundary region of the current block 3800 according to the exemplary embodiment, using the surrounding samples of the current block 3800 according to the direction of the boundary. have.
  • the boundary area of the current block 3800 is a predetermined area including a boundary between segments corresponding to the outline 3820 of the current block 3800, and has a predetermined width around the outline of the current block. It may be an area specified by. For example, referring to FIG. 38, the boundary area of the current block 3800 represents an area up to the left straight line 3830 and an area up to the right straight line 3840 around the contour 3820 of the current block 3800. It may be an area that includes.
  • the predetermined width of the boundary area may be determined by the number of samples in the horizontal direction or the number of samples in the vertical direction, centering on the samples located at the boundaries of the segments constituting the current block 3800.
  • the predetermined width can be 2 pixels to the left and to the right.
  • the predetermined width may indicate not only a distance in a horizontal direction or a distance in a vertical direction, but also a distance in a direction orthogonal to the boundary about the boundary of the segments constituting the current block 3800.
  • the predetermined width of the boundary area may be determined equally or symmetrically with respect to a direction facing each other about samples located at the boundary of the current block 3800.
  • the video encoding apparatus 10 may determine a predetermined width of the boundary region as the number having the best RD cost, and the video decoding apparatus 20 according to an embodiment may delimit the video encoding apparatus 10 from the video encoding apparatus 10.
  • Information indicating a predetermined width of the area can be received.
  • the predetermined width of the boundary region may be derived from the neighboring block of the current block 3800.
  • the predetermined width of the boundary area may be determined based on the amount of change in the sample value between the upper peripheral block or the left peripheral block of the current block 3800.
  • a prediction value of the samples included in the boundary area of the current block 3800 may be obtained by referring to surrounding samples of the current block 3800 along the direction of the boundary of the current block 3800.
  • the peripheral sample of the current block 3800 may include an upper peripheral sample, a right upper peripheral sample, a left peripheral sample, and a lower left peripheral sample of the current block 3800.
  • a reference sample to be referred to the prediction of the boundary region among the neighboring samples of the current block 3800 may be determined using the contour 3820 of the current block 3800. For example, if the contour 3820 of the current block 3800 passes through the sample 3810 of the neighboring samples adjacent to the upper outside of the current block 3800, the sample 3810 and the sample 3810 are centered. Samples located within a predetermined width in the horizontal direction may be reference samples. In FIG. 38, when the width of the boundary area of the current block 3800 is 2 pixels in the horizontal direction, the reference sample may be five samples centered on the sample 3810.
  • a predicted value of the samples included in the boundary region of the current block 3800 may be generated based on the determined reference sample.
  • the prediction may be performed on the remaining areas other than the boundary area of the current block 3800, that is, the area corresponding to the segment.
  • intra prediction according to the DC mode may be performed on the segment region.
  • 39 illustrates a detailed process of performing prediction on a current block 3900 using a reference sample, according to an embodiment.
  • FIG. 39 a portion of the current block 3900 including a boundary area according to the contour 3910 of the current block 3900 and an upper peripheral block adjacent to the outside above the current block 3900 are shown.
  • the mode of the contour 3910 of the current block 3900 may be a first mode or a second mode, and the width of the boundary area of the current block 3900 may be 2 pixels.
  • FIG. 39 a method of generating a predicted value of a sample 3920 among samples included in a boundary region of the current block 3900 according to an embodiment will be described in detail.
  • a sample 3930, a sample 3940, and a sample 3950 of the upper peripheral samples may be included in the reference sample to predict the boundary region of the current block 3900 according to an embodiment.
  • the reference position 3960 of the sample 3920 may be determined.
  • the reference location 3960 of the sample 3920 may be determined based on the direction of the boundary between the segments constituting the current block 3900, that is, the direction of the contour 3910.
  • the boundary region of the current block 3900 The predicted value of the sample included in may be generated using the sample value of the sample of the reference position.
  • the predicted value of the sample included in the boundary region of the current block 3900 may be the sample value of the sample of the reference position, or may be a value obtained by refining the sample value of the sample of the reference position.
  • the predicted value of the sample 3920 is plural. Can be generated using a reference sample.
  • the predicted value of the sample 3920 is the sample value of the reference sample 3940 and the reference. It may be generated based on the sample value of the sample 3950.
  • the sample value of the reference position 3960 of the sample 3920 is obtained.
  • the sample value of the reference position 3960 of the sample 3920 may be an average value of the sample values of the reference sample 3940 and the reference sample 3950.
  • the predicted value of the sample 3920 included in the boundary region of the current block 3900 may be a sample value of the sample of the generated reference position 3960, or a sample value of the sample of the generated reference position 3960. It may be a adjusted value.
  • the method of performing interpolation on the reference position of the sample included in the boundary area of the current block 3900 according to an embodiment is not limited thereto and may be replaced with another interpolation method.
  • the reference position 3960 of the sample 3920 included in the boundary region of the current block 3900 may be determined with a precision of 1 / n pixel units (n is an integer), and the determined sample 3920 is determined.
  • the sample value of the reference position 3960 may be generated with a precision of 1 / n pixel units according to the reference position 3960 of.
  • a sample value of the reference position 3960 may be generated by assigning a weight value according to the distance from the reference position 3960 with a precision of 1 / n pixel units to the sample values of the reference samples adjacent to the reference position 3960. have.
  • 40A to 40C illustrate a method of performing prediction on a boundary area of a current block according to various embodiments.
  • the current block 4010 may include a boundary area including a boundary along a single straight line contour.
  • the predicted value of the sample included in the boundary region of the current block 4010 may be generated using the reference sample of the current block 4010 according to the direction of the boundary.
  • the reference sample of the current block 4010 may be a sample adjacent to the outside of the current block 4010.
  • the reference sample of the current block 4010 may include a left sample and an upper left sample 4011 of the current block 4010.
  • the reference position of the sample included in the boundary area of the current block 4010 may be out of the upper left sample 4011 and point upward than the upper left sample 4011.
  • the reference sample of the current block 4010 may be further extended to further include an upper sample 4012 of the upper left sample 4011 of the current block 4010.
  • the sample value of the upper sample 4012 of the upper left sample 4011 may be obtained from a neighboring block coded and decoded before the current block 4010, or padding the sample value of the upper left sample 4011. It can also be generated by.
  • a prediction value of a sample included in a boundary region of the current block 4010 may include a left sample, a top left sample 4011, and a top sample 4012 of the top left sample 4011 of the current block 4010. It can be generated using the sample values of.
  • the reference position of the sample included in the boundary area deviates from the upper left sample 4021, and the upper left side.
  • the reference sample of the current block 4020 may be extended to further include an upper sample 4022 of the current block 4020.
  • the predicted value of the sample included in the boundary region of the current block 4020 uses the sample values of the left sample, the upper left sample 4021, and the upper sample 4022 of the current block 4020. Can be generated.
  • the current block 4030 may include a boundary area including a boundary along a single straight line contour.
  • the predicted value of the sample included in the boundary region of the current block 4030 may be generated using the reference sample of the current block 4030 according to the direction of the boundary.
  • the reference sample of the current block 4030 may include an upper sample and an upper left sample 4031 of the current block 4030.
  • the reference position of the sample included in the boundary region of the current block 4030 may leave the sample 4031 and point to the left side of the upper left sample 4031.
  • the reference sample of the current block 4030 may be further extended to further include a left sample 4032 of the upper left sample 4031 of the current block 4030.
  • the sample value of the left sample 4032 of the upper left sample 4031 may be obtained from a neighboring block decoded before the current block 4030, and generated by padding the sample value of the upper left sample 4031. May be
  • the predicted value of the sample included in the boundary region of the current block 4030 may include the upper sample, the upper left sample 4031, and the left sample of the upper left sample 4031 of the current block 4030.
  • 4032 may be generated using the sample values.
  • the reference position of the sample included in the boundary region of the current block deviates from the upper peripheral sample, the upper right peripheral sample, the left peripheral sample, and the lower left peripheral sample of the current block.
  • the sample value of the reference position can be obtained in various ways, such as extending the sample at the closest position among the upper peripheral sample, the upper right peripheral sample, the left peripheral sample and the lower left peripheral sample, or performing interpolation according to the slope of the boundary of the current block. Can be generated.
  • 41 illustrates a method of performing prediction on a boundary area of a current block according to various embodiments.
  • Peripheral samples along the direction of the boundary of the current block may exist both above the current block and to the left of the current block.
  • the prediction value of the sample included in the boundary region of the current block may be generated by referring to at least one of an upper sample adjacent to the upper outer side of the current block and a left sample adjacent to the left outer side of the current block. have. That is, the reference sample of the sample included in the boundary region of the current block may include at least one of an upper sample of the current block and a left sample of the current block.
  • a prediction value of a sample included in the boundary region of the current block 4110 may be generated using the sample value of the upper sample of the current block.
  • the prediction value of the sample included in the boundary region of the current block 4120 may be generated using the sample value of the left sample of the current block.
  • a reference sample along the direction of the boundary of the current block is present in the upper side of the current block and also in the left side of the current block, usable samples of the upper sample and the left sample may be used as the reference sample.
  • both the upper sample and the left sample of the current block may be used, or only one of the two samples may be used.
  • the predicted value of the sample included in the boundary region of the current block may be the average value of the predicted value according to the upper sample and the predicted value according to the left sample. Can be.
  • the prediction value according to the upper sample and the prediction value according to the left sample are considered in consideration of the distance from the sample included in the boundary region of the current block to the upper sample and the distance from the sample included in the boundary region of the current block to the left sample. You can also give weight to.
  • the prediction value of the sample included in the boundary region of the current block may be generated using only one sample of the upper sample and the left sample.
  • one sample to be referenced among the upper sample and the left sample may be determined based on the slope of the contour of the current block according to an embodiment. If the slope of the outline of the current block is close to the horizontal direction, the left sample may be determined as the reference sample, and if the slope of the outline of the current block is close to the vertical direction, the upper sample may be determined as the reference sample.
  • one sample of the upper sample and the left sample may be determined as the reference sample based on the width of the boundary area of the current block according to an embodiment.
  • the samples having the smaller number of samples corresponding to the boundary area of the current block among the upper samples and the left samples of the current block may be determined as the reference sample.
  • a reference sample may be determined among upper samples and left samples of the current block based on the encoding and decoding efficiency and the decoding performance of the prediction of the boundary area of the current block, according to an embodiment.
  • the samples having the larger variance of the sample value among the upper samples and the left samples of the current block may be determined as reference samples.
  • FIG. 42 illustrates a method of performing prediction on a boundary area of the current block 4200 according to an embodiment.
  • the current block 4200 may be divided into four identical subblocks, and prediction may be performed for each subblock unit.
  • the current block 4200 may be an 8x8 coding unit, and each sub block may be a 4x4 transformation unit.
  • the current block 4200 may be a coding unit having a maximum size, and each sub block may be a coding unit split from a coding unit having a maximum size.
  • a reference sample for generating a prediction value of the sub-block may be determined as neighboring samples adjacent to the current block 4200.
  • the lower left side is performed.
  • the prediction value of the sub-block located at the lower left may be generated.
  • the reference position with respect to the sample included in the sub block located at the lower left of the current block 4200 may be a position of a neighboring sample adjacent to the current block 4200 in the direction of the boundary of the current block 4200. Can be determined.
  • 43 and 44 illustrate a method of performing prediction on a boundary area of a current block according to various embodiments.
  • the width of the boundary region of the current block may be determined first.
  • the width of the boundary area of the current block may represent the number of samples in the horizontal direction or the number of samples in the vertical direction centering on the samples positioned at the boundaries of the segments constituting the current block.
  • the width of the boundary area of the current block is the number N of samples to the left and the number M of samples to the right, centering on the samples located at the boundary of the current block. Or the number P of samples upwards and the number Q of samples downwards.
  • the width of the boundary region may be determined that N and M or P and Q may be the same or may not be the same.
  • N and M or P and Q may be fixed or may be adaptively different for each block. May be adjusted.
  • the width of the boundary area of the current block when the width of the boundary area of the current block is fixed in the direction orthogonal to the boundary, the width in the vertical direction or the horizontal direction of the boundary area of the current block may be determined differently according to the slope of the boundary of the current block. Can be.
  • the number of reference samples for prediction of the boundary region of the current block may also vary according to the width of the boundary region in the vertical direction or the width in the horizontal direction.
  • the predetermined size T may be an integer pixel unit or a sub pixel unit.
  • the predetermined size T which is information about the width of the boundary area of the current block, may be encoded and transmitted to the video decoding apparatus 20.
  • index information indicating one of a plurality of candidates of a predetermined size T may be used as information about a width of a boundary area of the current block. For example, "0", "4", and "double the width of the current block" for a predetermined size T may be indexed and signaled as 0, 10, 11, respectively.
  • the unit of the predetermined size T may be an integer pixel unit.
  • the predetermined size T is twice the width of the current block, all samples of the current block may be included in the boundary region, and prediction values of all samples of the current block may be generated by performing prediction on the boundary region.
  • the width of the boundary area of the current block may be derived from the neighboring blocks of the current block. For example, information such as variance, average, standard deviation, outlier, and the like for samples included in the neighboring block of the current block may be used.
  • samples included in the boundary regions of the current blocks 4310, 4320, and 4330 may be determined according to various criteria.
  • a sample included in the boundary area of the current block 4310 may be configured such that a position of the sample among the samples of the current block 4310 is completely in the boundary area of the current block 4310. It may be a sample included.
  • a sample included in the boundary area of the current block 4320 includes a center of the position of the sample among the samples of the current block 4320 in the boundary area of the current block 4310. May be a sample.
  • the samples included in the boundary area of the current block 4330 may be partially or partially positioned at the boundary area of the current block 4330 among the samples of the current block 4330. It may be a sample spanned.
  • FIG. 44 shows examples when the contour of the current blocks 4410, 4420, and 4430 is a curved contour. Samples included in the boundary regions of the current blocks 4410, 4420, and 4430 may be determined according to various criteria as in the current blocks 4310, 4320, and 4330 of FIG. 43.
  • the prediction may be performed on the remaining regions except for the boundary regions. That is, in the current blocks 4310, 4320, 4330, 4410, 4420, and 4430 of FIGS. 43 and 44, the remaining areas except the boundary areas correspond to segments, and the white samples are shown in FIGS. 43 and 43. It may be an area that appears.
  • intra prediction according to the DC mode may be performed on the segment region.
  • filtering between the boundary region and the segment region is performed.
  • Filtering may be performed for the samples in which the segment region is adjacent to the left or right side of the samples among the samples of the boundary regions of the current blocks 4310, 4320, 4330, 4410, 4420, 4430 of FIGS. 43 and 44.
  • the filtering is performed for the samples of the boundary region to the left or the right of the sample among the samples of the segment regions of the current blocks 4310, 4320, 4330, 4410, 4420 and 4430 of FIGS. 43 and 44. Can be performed.
  • filtering may be performed on the samples adjacent to the samples above or below the samples among the samples of the boundary areas of the current blocks 4310, 4320, 4330, 4410, 4420, and 4430 of FIGS. 43 and 44. Can be performed. In addition, for the samples of the segment regions of the current blocks 4310, 4320, 4330, 4410, 4420, 4430 of FIGS. 43 and 44 that the samples in the boundary region are adjacent to the upper or lower portions of the samples, filtering is performed. Can be performed.
  • the sampling method may be performed according to the same algorithm as the pseudo code of FIG. 27.
  • the mask values of the current blocks 4310, 4320, and 4330 of FIG. 43 may be 1 or 0 depending on whether they are included in the boundary area when determining the samples included in the boundary areas of the current blocks 4310, 4320, and 4330.
  • the determined mask value can be used for filtering.
  • Filtering performed between the boundary area and the segment area of the current blocks 4310, 4320, 4330, 4410, 4420, and 4430 of FIGS. 43 and 44 may be applied to both the horizontal direction and the vertical direction. It may be applied according to one of the horizontal direction and the vertical direction.
  • the filtering is performed on the boundary regions to reduce the error of the prediction values of the boundary regions. You may.
  • the prediction values of the samples included in the boundary regions of the current blocks 4310, 4320, 4330, 4410, 4420, and 4430 may be generated and filtered to the generated prediction values.
  • a one-dimensional Gaussian filter having a filter value such as [1, 2, 1] may be used.
  • the neighboring samples referred to to predict the boundary regions of the current blocks 4310, 4320, 4330, 4410, 4420, and 4430 are first filtered, and the current block 4310, based on the filtered neighboring samples, is filtered.
  • a prediction value of samples of the boundary regions of 4320, 4330, 4410, 4420, and 4430 may be generated.
  • 45 illustrates syntax elements for performing intra prediction, according to an embodiment.
  • information indicating a prediction mode for the current block may be parsed from the bitstream.
  • the information representing the prediction mode for the current block may include information about whether the current block uses an intra mode based on a coding unit of a hierarchical structure using a square or rectangular prediction unit or according to a boundary of an object included in the current block. It may include information (intra_mode_flag) indicating whether to use the contour-based intra prediction mode using a segment that is a prediction unit split using the contour.
  • the current block may be predicted according to intra modes such as DC mode, planar mode, and angular mode.
  • information indicating the prediction mode does not indicate the intra mode in which the current block is general
  • information (seg_num_minus1) regarding the number of segments divided from the current block may be parsed.
  • the information about the number of segments of the current block indicates that there is one segment divided from the current block
  • the current block may not be divided, and information indicating the prediction mode of the same first segment as the current block may be 1seg_mode) may be parsed.
  • the information 1seg_mode indicating the prediction mode of the first segment may indicate one of intra modes such as a DC mode, a planar mode, and an angular mode.
  • the current block may be divided into segments for prediction of the current block. That is, information about the contour for determining at least one segment from the current block may be parsed.
  • Information about the contour of the current block may include mode information of the contour and information about the coordinates of the contour.
  • mode information line_orient of the contour of the current block may be parsed.
  • the mode information of the contour may be information indicating the direction of the contour.
  • the mode information line_orient of the contour of the current block may be information indicating at least two sides of the four sides of the current block that the contour of the current block touches.
  • the mode of the contour of the current block may be determined according to the mode information line_orient of the contour of the current block.
  • the mode of the contour of the current block it may be determined whether to parse information about the coordinates of the contour of the current block.
  • the information about the coordinates of the contour of the current block may include first coordinate information line_pos1 and second coordinate information line_pos2 of the contour of the current block. Specifically, it may be determined whether the coordinates of the contour of the current block are derivable from the neighboring blocks of the current block or should be parsed according to the mode of the contour of the current block.
  • the first coordinate information (line_pos1) of the contour of the current block. ) And the second coordinate information line_pos2 may not be parsed. Further, when it is determined that the first coordinate and the second coordinate of the contour of the current block are not derivable from the neighboring blocks of the current block based on the mode of the contour of the block, the first coordinate information (line_pos1) of the contour of the current block. And the second coordinate information line_pos2 may be parsed from the bitstream. Whether to parse the information about the coordinates of the contour of the current block may be determined for each of the first coordinate and the second coordinate.
  • both the first coordinate information line_pos1 and the second coordinate information line_pos2 of the contour of the current block are both Can be parsed.
  • the sample value or the prediction value seg1_dc of the second segment located at the lower right side of the current block may be parsed without being generated using the neighboring samples of the current block.
  • information (boundary_filling_flag) indicating whether prediction is performed according to the direction of the boundary with respect to the current block may be parsed.
  • prediction values of samples included in the boundary area of the current block may be generated according to the direction of the boundary. For example, the predicted values of the samples included in the boundary region of the current block may be generated using the method described above with reference to FIGS. 38 to 44.
  • the information about the boundary area of the current block may be parsed.
  • the information about the boundary area of the current block may include information about the width of the boundary area (boundary_filling_thickness).
  • the information indicating the width of the border area may be directly indicating the width of the border area or may be index information indicating one of the candidates of a plurality of predetermined widths.
  • the prediction values of the samples included in the boundary region of the current block may be samples and Can be generated using a mask value.
  • boundary_filtering_disable_flag indicating whether to perform filtering on the prediction value of the current block according to an embodiment may be parsed.
  • An example of the filtering method performed on the predicted value of the boundary region with respect to the current block according to an embodiment may be the same as the method of FIG. 37.
  • an intra prediction video encoding method based on the previously proposed contour is not used, and a video encoding method based on a coding unit having a hierarchical structure using a rectangular or square prediction unit is used.
  • a video encoding method based on a coding unit having a hierarchical structure using a rectangular or square prediction unit is used.
  • the relationship between the depth-dependent coding unit, the prediction unit, and the transformation unit will be described later.
  • 46 is a diagram illustrating deeper coding units according to depths, and prediction units, according to various embodiments.
  • the video encoding apparatus 10 according to an embodiment and the video decoding apparatus 20 according to an embodiment may use hierarchical coding units to consider image characteristics.
  • the maximum height, width, and maximum depth of the coding unit may be adaptively determined according to the characteristics of the image, and may be variously set according to a user's request. According to the maximum size of the preset coding unit, the size of the coding unit for each depth may be determined.
  • the hierarchical structure 600 of a coding unit illustrates a case in which a maximum height and a width of a coding unit are 64 and a maximum depth is three.
  • the maximum depth indicates the total number of divisions from the maximum coding unit to the minimum coding unit. Since the depth deepens along the vertical axis of the hierarchical structure 600 of the coding unit according to an embodiment, the height and the width of the coding unit for each depth are divided.
  • a prediction unit and a partition on which the prediction encoding of each depth-based coding unit is shown along the horizontal axis of the hierarchical structure 600 of the coding unit are illustrated. In this case, the prediction unit and the partition of the depth-based coding unit illustrated in FIG. 46 may represent the prediction unit of the current block when the contour-based prediction coding method is not used.
  • the coding unit 610 has a depth of 0 as the largest coding unit of the hierarchical structure 600 of the coding unit, and the size, ie, the height and width, of the coding unit is 64x64.
  • a depth deeper along the vertical axis includes a coding unit 620 of depth 1 having a size of 32x32, a coding unit 630 of depth 2 having a size of 16x16, and a coding unit 640 of depth 3 having a size of 8x8.
  • a coding unit 640 of depth 3 having a size of 8 ⁇ 8 is a minimum coding unit.
  • Prediction units and partitions of the coding unit are arranged along the horizontal axis for each depth. That is, if the coding unit 610 of size 64x64 having a depth of zero is a prediction unit, the prediction unit may include a partition 610 of size 64x64, partitions 612 of size 64x32, and size included in the coding unit 610 of size 64x64. 32x64 partitions 614, 32x32 partitions 616.
  • the prediction unit of the coding unit 620 having a size of 32x32 having a depth of 1 includes a partition 620 of size 32x32, partitions 622 of size 32x16 and a partition of size 16x32 included in the coding unit 620 of size 32x32. 624, partitions 626 of size 16x16.
  • the prediction unit of the coding unit 630 of size 16x16 having a depth of 2 includes a partition 630 of size 16x16, partitions 632 of size 16x8, and a partition of size 8x16 included in the coding unit 630 of size 16x16. 634, partitions 636 of size 8x8.
  • the prediction unit of the coding unit 640 of size 8x8 having a depth of 3 includes a partition 640 of size 8x8, partitions 642 of size 8x4 and a partition of size 4x8 included in the coding unit 640 of size 8x8. 644, partitions 646 of size 4x4.
  • the coding unit determiner 120 of the video encoding apparatus 10 or 100 may determine a depth of each of the depths included in the maximum coding unit 610 in order to determine the depth of the maximum coding unit 610. Encoding must be performed for each coding unit.
  • the number of deeper coding units according to depths for including data having the same range and size increases as the depth increases. For example, four coding units of depth 2 are required for data included in one coding unit of depth 1. Therefore, in order to compare the encoding results of the same data for each depth, each of the coding units having one depth 1 and four coding units having four depths 2 should be encoded.
  • encoding is performed for each prediction unit of each coding unit along a horizontal axis of the hierarchical structure 600 of the coding unit, and a representative coding error, which is the smallest coding error at a corresponding depth, may be selected. have.
  • a depth deeper along the vertical axis of the hierarchical structure 600 of the coding unit the encoding may be performed for each depth, and the minimum coding error may be searched by comparing the representative coding error for each depth.
  • the depth and partition in which the minimum coding error occurs in the maximum coding unit 610 may be selected as the depth and partition mode of the maximum coding unit 610.
  • the video encoding apparatus 10 encodes or decodes an image in coding units having a size smaller than or equal to the maximum coding unit for each maximum coding unit.
  • the size of a transformation unit for transformation in the encoding process may be selected based on a data unit that is not larger than each coding unit.
  • the 32x32 size conversion unit 720 is The conversion can be performed.
  • the data of the 64x64 coding unit 710 is transformed into 32x32, 16x16, 8x8, and 4x4 transform units of 64x64 size or less, and then encoded, and the transform unit having the least error with the original is selected. Can be.
  • 48 is a diagram illustrating encoding information according to various embodiments.
  • the bitstream generator 16 of the video encoding apparatus 10 may include information about a partition mode 800, information 810 about a prediction mode, and transformation for each coding unit of each depth as split information.
  • Information 820 about the unit size may be encoded and transmitted.
  • the information 800 about the partition mode illustrated in FIG. 48 may be used when the prediction coding based on the contour of the current block of the image is not used.
  • the information about the partition mode 800 is a data unit for predictive encoding of the current coding unit and indicates information about a partition type in which the prediction unit of the current coding unit is divided.
  • the current coding unit CU_0 of size 2Nx2N is divided into one of a partition 802 of size 2Nx2N, a partition 804 of size 2NxN, a partition 806 of size Nx2N, and a partition 808 of size NxN.
  • the information 800 about the partition mode of the current coding unit represents one of a partition 802 of size 2Nx2N, a partition 804 of size 2NxN, a partition 806 of size Nx2N, and a partition 808 of size NxN. It is set to.
  • the information 810 about the prediction mode indicates a prediction mode of the prediction unit. For example, through the information 810 about the prediction mode, the segment determined based on the partition of the current block indicated by the information 800 about the partition mode or the outline of the current block is the intra mode 812, the inter mode 814. And whether the prediction encoding is performed in one of the skip modes 816.
  • the information about the transform unit size 820 indicates whether to transform the current coding unit based on the transform unit.
  • the transform unit may be one of a first intra transform unit size 822, a second intra transform unit size 824, a first inter transform unit size 826, and a second inter transform unit size 828. have.
  • the video decoding apparatus 20 extracts information about partition mode 800, information 810 about prediction mode, and information 820 about transform unit size for each depth-based coding unit. Can be used for decoding.

Landscapes

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

Abstract

현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드 정보를 획득하는 단계; 상기 윤곽의 모드 정보에 기초하여, 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한지 여부를 결정하는 단계; 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한 경우, 상기 현재 블록의 주변 블록으로부터 유도되는 상기 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 상기 현재 블록으로부터 상기 적어도 하나의 세그먼트를 결정하는 단계; 및 상기 결정된 적어도 하나의 세그먼트에 대하여 예측을 수행하는 단계를 포함하는 비디오 복호화 방법이 개시된다.

Description

인트라 예측을 수행하는 영상 복호화 방법 및 그 장치 및 인트라 예측을 수행하는 영상 부호화 방법 및 그 장치
인트라 예측을 수행하는 영상 복호화 방법 및 장치와 인트라 예측을 수행하는 영상 부호화 방법 및 장치에 관한다.
고해상도 또는 고화질 비디오 컨텐트를 재생, 저장할 수 있는 하드웨어의 개발 및 보급에 따라, 고해상도 또는 고화질 비디오 컨텐트를 효과적으로 부호화하거나 복호화하는 비디오 코덱의 필요성이 증대하고 있다. 기존의 비디오 코덱에 따르면, 비디오는 트리 구조의 부호화 단위에 기반하여 제한된 부호화 방식에 따라 부호화되고 있다.
변환을 이용하여 공간 영역의 영상 데이터는 주파수 영역의 계수들로 변환된다. 비디오 코덱은, 변환의 빠른 연산을 위해 영상을 소정 크기의 블록들로 분할하고, 블록마다 DCT 변환을 수행하여, 블록 단위의 주파수 계수들을 부호화한다. 공간 영역의 영상 데이터에 비해 주파수 영역의 계수들이, 압축하기 쉬운 형태를 가진다. 특히 비디오 코덱의 인터 예측 또는 인트라 예측을 통해 공간 영역의 영상 화소값은 예측 오차로 표현되므로, 예측 오차에 대해 변환이 수행되면 많은 데이터가 0으로 변환될 수 있다. 비디오 코덱은 연속적으로 반복적으로 발생하는 데이터를 작은 크기의 데이터로 치환함으로써, 데이터량을 절감하고 있다.
비디오 부호화 및 복호화 과정에서 예측 영상을 생성하기 위하여 좀 더 정밀하고 간단한 예측 방법이 요구된다.
일 실시예에 따라, 예측 영상의 생성을 위해 인트라 예측을 수행하는 때 좀 더 정밀하고 간단한 예측 방법을 제공하여 부호화 효율을 높일 수 있으며 전송 효율 또한 높일 수 있다.
본 발명의 기술적 과제들은 이상에서 언급한 특징으로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 당해 기술분야의 통상의 기술자에게 명확하게 이해될 수 있을 것이다.
일 실시예에 따른 비디오 복호화 방법은, 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드 정보에 따라 결정되는 상기 윤곽의 제 1 좌표 및 제 2 좌표가 상기 현재 블록의 주변 블록으로부터 유도 가능한지 여부를 결정하는 단계; 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한 경우, 상기 현재 블록의 주변 블록으로부터 유도되는 상기 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 상기 현재 블록으로부터 상기 적어도 하나의 세그먼트를 결정하는 단계; 상기 현재 블록을 구성하는 세그먼트들의 경계를 포함하는 경계 영역에 대하여 상기 경계의 방향에 따라 예측을 수행할지 여부를 결정하는 단계; 및 상기 경계 영역에 상기 경계의 방향에 따라 예측을 수행하는 것으로 결정되는 경우, 상기 경계의 방향에 따른 상기 현재 블록의 주변 샘플을 이용하여 상기 경계 영역에 예측을 수행하는 단계를 포함한다.
도 1a 는 일 실시예에 따른 윤곽 기반의 인트라 예측을 수행하는 비디오 부호화 장치의 블록도이다.
도 1b 는 일 실시예에 따른 윤곽 기반의 인트라 예측을 수행하는 비디오 부호화 방법의 흐름도이다.
도 2a는 일 실시예에 따른 윤곽 기반의 인트라 예측을 수행하는 비디오 복호화 장치의 블록도이다.
도 2b 는 일 실시예에 따른 윤곽 기반의 인트라 예측을 수행하는 비디오 복호화 방법의 흐름도이다.
도 3은 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부의 블록도를 도시한다.
도 4는 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부의 블록도를 도시한다.
이하, 도 5a 내지 도 5c는 다양한 실시예에 따른 현재 블록으로부터 예측 부호화를 위한 예측 단위인 세그먼트를 결정하는 방법을 도시한다.
도 6은 다양한 실시예에 따라 물체의 경계에 따른 윤곽을 이용하여 현재 블록으로부터 예측 부호화를 위한 세그먼트를 결정하는 방법을 나타낸다.
도 7a 및 도 7b는 다양한 실시예에 따른 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드를 설명하기 위한 도면이다.
도 8은 도 7a의 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드의 예시들을 나타낸다.
도 9는 도 8의 윤곽의 모드를 나타내는 윤곽의 모드 정보의 예시들을 나타낸다.
도 10은 일 실시예에 따른 현재 블록을 나타낸다.
도 11은 일 실시예에 따른 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 좌표를 결정하는 방법을 나타낸다.
도 12 내지 도 14은 다양한 실시예에 따른 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 좌표를 결정하는 방법을 나타낸다.
도 15 내지 도 16b는 다양한 실시예에 따른 윤곽의 좌표를 샘플의 정밀도에 따라 결정하는 방법을 나타낸다.
도 17은 일 실시예에 따른 현재 블록을 구성하는 세그먼트들의 나타내는 마스크의 일 예시를 나타낸다.
도 18은 도 17의 현재 블록의 경계 영역에 포함되는 샘플의 마스크값을 결정하는 다양한 방법의 예시들을 나타낸다.
도 19 및 20은 다양한 실시예에 따른 현재 블록의 마스크를 생성하는 방법의 예시들을 나타낸다.
도 21은 일 실시예에 따른 현재 블록의 마스크를 생성하는 방법의 예시를 나타낸다.
도 22는 일 실시예에 따른 현재 블록의 세그먼트에 대하여 예측을 수행하는 방법을 나타낸다.
도 23은 일 실시예에 따른 현재 블록의 세그먼트에 대하여 예측을 수행하는 방법을 나타낸다.
도 24는 다양한 실시예에 따른 현재 블록의 세그먼트들의 샘플값을 전송하는 방법을 설명하기 위한 도면이다.
도 25 및 도 26는 다양한 실시예에 따른 현재 블록의 주변 샘플들을 이용하여 현재 블록의 세그먼트의 샘플값을 생성하는 방법을 나타낸다.
도 27은 일 실시예에 따른 현재 블록으로부터 분할되는 세그먼트의 개수에 따른 현재 블록의 예측 방법의 흐름도를 나타낸다.
도 28은 일 실시예에 따른 현재 블록의 변환 단위에 따른 현재 블록의 레지듀얼 데이터의 부호화 및 복호화 과정을 설명하기 위한 도면이다.
도 29 내지 도 31은 다양한 실시예에 따른 현재 블록의 윤곽을 현재 블록의 주변 블록으로부터 획득하는 방법을 나타낸다.
도 32 및 도 33은 다양한 실시예에 따른 현재 블록의 서브 블록을 이용하여 예측을 수행하는 방법을 나타낸다.
도 34는 일 실시예에 따른 현재 블록으로부터 세 개의 세그먼트를 결정하는 방법을 나타낸다.
도 35는 일 실시예에 따른 현재 블록의 윤곽에 기초하여 현재 블록의 서브 블록을 이용하여 세그먼트들을 결정하는 방법을 나타낸다.
도 36은 일 실시예에 따른 현재 블록의 윤곽을 결정하는 방법을 나타낸다.
도 37은 일 실시예에 따른 현재 블록의 예측값을 획득하는 방법을 수도 코드(pseudo code)로 나타낸 일 예시이다.
도 38은 일 실시예에 따른 현재 블록에 대하여 예측을 수행하는 방법을 나타낸다.
도 39는 일 실시예에 따른 현재 블록에 대하여 참조 샘플을 이용하여 예측을 수행하는 상세한 과정을 나타낸다.
도 40a 내지 도 40c는 다양한 실시예에 따른 현재 블록의 경계 영역에 대하여 예측을 수행하는 방법을 나타낸다.
도 41은 다양한 실시예에 따른 현재 블록의 경계 영역에 대하여 예측을 수행하는 방법을 나타낸다.
도 42는 일 실시예에 따른 현재 블록의 경계 영역에 대하여 예측을 수행하는 방법을 나타낸다.
도 43 및 도 44는 다양한 실시예에 따른 현재 블록의 경계 영역에 대하여 예측을 수행하는 방법을 나타낸다.
도 45는 일 실시예에 따른 인트라 예측 수행을 위한 신택스 엘리먼트들을 나타낸다.
도 46 는 다양한 실시예에 따른 심도별 부호화 단위 및 예측 단위를 도시한다.
도 47은 다양한 실시예에 따른, 부호화 단위 및 변환 단위의 관계를 도시한다.
도 48은 다양한 실시예에 따른 부호화 정보들을 도시한다.
일 실시예에 따른 비디오 복호화 방법은, 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드 정보에 따라 결정되는 상기 윤곽의 제 1 좌표 및 제 2 좌표가 상기 현재 블록의 주변 블록으로부터 유도 가능한지 여부를 결정하는 단계; 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한 경우, 상기 현재 블록의 주변 블록으로부터 유도되는 상기 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 상기 현재 블록으로부터 상기 적어도 하나의 세그먼트를 결정하는 단계; 상기 현재 블록을 구성하는 세그먼트들의 경계를 포함하는 경계 영역에 대하여 상기 경계의 방향에 따라 예측을 수행할지 여부를 결정하는 단계; 및 상기 경계 영역에 상기 경계의 방향에 따라 예측을 수행하는 것으로 결정되는 경우, 상기 경계의 방향에 따른 상기 현재 블록의 주변 샘플을 이용하여 상기 경계 영역에 예측을 수행하는 단계를 포함한다.
또한, 상기 경계 영역에 예측을 수행하는 단계는, 상기 경계 영역에 상기 경계의 방향에 따라 예측을 수행하는 것으로 결정되는 경우, 상기 경계 영역의 폭을 결정하는 단계; 및 상기 결정된 폭에 따른 상기 경계 영역에 대하여 예측을 수행하는 단계를 포함할 수 있다.
또한, 상기 경계 영역의 폭은, 상기 현재 블록을 구성하는 세그먼트들의 경계에 위치하는 샘플을 중심으로 수평 방향으로의 샘플의 수 또는 수직 방향으로의 샘플의 수인 것을 특징으로 할 수 있다.
또한, 경계 영역의 폭을 결정하는 단계는, 비트스트림으로부터 획득되는 상기 경계 영역의 폭을 나타내는 정보에 기초하여 결정하는 것을 특징으로 할 수 있다.
또한, 상기 경계 영역의 폭을 결정하는 단계는, 상기 현재 블록의 주변 블록을 이용하여 상기 경계 영역의 폭을 결정하는 것을 특징으로 할 수 있다.
또한, 상기 현재 블록이 상기 결정된 폭에 따른 상기 경계 영역에 모두 포함되지 않는 경우, 상기 경계 영역을 제외한 상기 현재 블록의 나머지 영역에 대하여 예측을 수행하는 단계를 더 포함할 수 있다.
또한, 상기 경계 영역에 대하여 상기 경계의 방향에 따라 예측을 수행하지 않는 것으로 결정된 경우, 상기 현재 블록을 구성하는 세그먼트들의 경계를 나타내는 상기 현재 블록의 마스크를 생성하는 단계; 상기 현재 블록의 주변 샘플을 이용하여 상기 적어도 하나의 세그먼트에 포함된 샘플들의 샘플 값을 결정하는 단계; 및 상기 생성된 마스크 및 상기 결정된 샘플들의 샘플 값에 기초하여, 상기 경계 영역의 예측 값을 결정하는 단계를 더 포함할 수 있다.
또한, 상기 현재 블록의 마스크를 생성하는 단계는, 상기 현재 블록을 구성하는 세그먼트들의 경계와 상기 현재 블록의 샘플 간의 위치 관계에 기초하여 상기 현재 블록의 샘플의 마스크 값을 결정함으로써 상기 현재 블록의 마스크를 생성하는 것을 특징으로 할 수 있다.
또한, 상기 현재 블록의 마스크에 기초하여 상기 현재 블록의 경계 영역에 필터링을 수행하는 단계를 더 포함할 수 있다.
또한, 상기 필터링을 수행하는 단계는, 상기 현재 블록의 마스크에 기초하여, 상기 현재 블록의 샘플이 상기 현재 블록을 구성하는 세그먼트들의 경계에 위치하는 샘플인지 여부를 결정하는 단계; 및 상기 현재 블록의 샘플이 상기 경계에 위치하는 경우, 상기 현재 블록의 샘플의 주변 샘플에 기초하여 상기 현재 블록의 샘플을 필터링하는 단계를 포함할 수 있다.
다른 일 실시예에 따른 비디오 부호화 방법은, 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드에 따라 결정되는 상기 윤곽의 제 1 좌표 및 제 2 좌표가 상기 현재 블록의 주변 블록으로부터 유도 가능한지 여부를 결정하는 단계; 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한 경우, 상기 현재 블록의 주변 블록으로부터 유도되는 상기 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 상기 현재 블록으로부터 상기 적어도 하나의 세그먼트를 결정하는 단계; 상기 현재 블록을 구성하는 세그먼트들의 경계를 포함하는 경계 영역에 대하여 상기 경계의 방향에 따라 예측을 수행할지 여부를 결정하는 단계; 및 상기 경계 영역에 상기 경계의 방향에 따라 예측을 수행할지 여부를 나타내는 정보 및 상기 경계의 방향을 나타내는 윤곽의 모드 정보를 부호화하는 단계를 포함할 수 있다.
또한, 상기 경계 영역에 상기 경계의 방향에 따라 예측을 수행하는 것으로 결정되는 경우, 상기 경계 영역의 폭을 결정하는 단계를 더 포함할 수 있다.
또한, 상기 결정된 경계 영역의 폭을 나타내는 정보를 부호화하는 단계를 더 포함할 수 있다.
또한, 상기 경계 영역의 폭을 결정하는 단계는, 상기 현재 블록의 주변 블록을 이용하여 상기 경계 영역의 폭을 결정하는 것을 특징으로 할 수 있다.
또한, 상기 결정된 폭에 따른 상기 경계 영역에 상기 경계의 방향에 따라 예측을 수행하는 단계; 및 상기 현재 블록이 상기 결정된 폭에 따른 상기 경계 영역에 모두 포함되지 않는 경우, 상기 경계 영역을 제외한 상기 현재 블록의 나머지 영역에 대하여 예측을 수행하는 단계를 더 포함할 수 있다.
또한, 상기 경계 영역에 대하여 상기 경계의 방향에 따라 예측을 수행하지 않는 것으로 결정된 경우, 상기 현재 블록을 구성하는 세그먼트들의 경계를 나타내는 상기 현재 블록의 마스크를 생성하는 단계; 상기 현재 블록의 주변 샘플을 이용하여 상기 적어도 하나의 세그먼트에 포함된 샘플들의 샘플 값을 결정하는 단계; 및 상기 생성된 마스크 및 상기 결정된 샘플들의 샘플 값에 기초하여, 상기 경계 영역의 예측 값을 결정하는 단계를 더 포함할 수 있다.
또한, 상기 현재 블록의 마스크를 생성하는 단계는, 상기 현재 블록을 구성하는 세그먼트들의 경계와 상기 현재 블록의 샘플 간의 위치 관계에 기초하여 상기 현재 블록의 샘플의 마스크 값을 결정함으로써 상기 현재 블록의 마스크를 생성하는 것을 특징으로 할 수 있다.
또한, 상기 현재 블록의 마스크에 기초하여 상기 현재 블록의 경계 영역에 필터링을 수행하는 단계를 더 포함할 수 있다.
또한, 상기 필터링을 수행하는 단계는, 상기 현재 블록의 마스크에 기초하여, 상기 현재 블록의 샘플이 상기 현재 블록을 구성하는 세그먼트들의 경계에 위치하는 샘플인지 여부를 결정하는 단계; 및 상기 현재 블록의 샘플이 상기 경계에 위치하는 경우, 상기 현재 블록의 샘플의 주변 샘플에 기초하여 상기 현재 블록의 샘플을 필터링하는 단계를 포함할 수 있다.
또 다른 일 실시예에 따른 비디오 복호화 장치는, 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드 정보에 따라 결정되는 상기 윤곽의 제 1 좌표 및 제 2 좌표가 상기 현재 블록의 주변 블록으로부터 유도 가능한지 여부를 결정하고, 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한 경우 상기 현재 블록의 주변 블록으로부터 유도되는 상기 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 상기 현재 블록으로부터 상기 적어도 하나의 세그먼트를 결정하는 세그먼트 결정부; 및 상기 현재 블록을 구성하는 세그먼트들의 경계를 포함하는 경계 영역에 대하여 상기 경계의 방향에 따라 예측을 수행할지 여부를 결정하고, 상기 경계 영역에 상기 경계의 방향에 따라 예측을 수행하는 것으로 결정되는 경우 상기 경계의 방향에 따른 상기 현재 블록의 주변 샘플을 이용하여 상기 경계 영역에 예측을 수행하는 예측 수행부를 포함한다.
이하 도 1a 내지 도 45을 참조하여, 일 실시예에 따른 윤곽을 기반으로한 인트라 예측 부호화(contour-based intra prediction coding) 방법 및 윤곽을 기반으로한 인트라 복호화 방법이 제안된다. 또한, 도 46 내지 도 48을 참조하여, 앞서 제안한 윤곽을 기반으로한 인트라 예측 비디오 부호화 방법이 사용되지 않는 경우의 일 실시예에 따른 계층적 구조의 부호화 단위에 기초한 비디오 부호화 방법 및 비디오 복호화 방법이 개시된다.
이하, '영상'은 비디오의 정지영상이거나 동영상, 즉 비디오 그 자체를 나타낼 수 있다.
이하 '샘플'은, 영상의 샘플링 위치에 할당된 데이터로서 프로세싱 대상이 되는 데이터를 의미한다. 예를 들어, 공간영역의 영상에서 픽셀 값들 또는 블록의 레지듀얼이 샘플들일 수 있다.
이하 ‘현재 블록(Current Block)’은, 부호화 또는 복호화 하고자 하는 영상의 블록을 의미할 수 있다.
이하 ‘주변 블록(Neighboring Block)’은, 현재 블록에 이웃하는 부호화되었거나 또는 복호화된 적어도 하나의 블록을 나타낸다. 예를 들어, 주변 블록은 현재 블록의 상단, 현재 블록의 우측 상단, 현재 블록의 좌측, 또는 현재 블록의 좌측 상단에 위치할 수 있다. 또한 공간적으로 이웃하는 블록뿐 아니라 시간적으로 이웃하는 블록도 포함할 수 있다. 예를 들어, 시간적으로 이웃하는 주변 블록은 참조 픽쳐의 현재 블록과 동일한 위치(co-located) 블록 혹은 동일한 위치 블록의 주변 블록을 포함할 수 있다.
먼저, 도 1a 내지 도 45를 참조하여, 일 실시예에 따른 윤곽 기반 인트라 예측을 수행하기 위한 비디오 복호화 및 부호화 장치와 비디오 복호화 및 부호화 방법 이 개시된다.
도 1a 는 일 실시예에 따른 윤곽 기반의 인트라 예측을 수행하는 비디오 부호화 장치(10)의 블록도이다. 도 1b 는 일 실시예에 따른 윤곽 기반의 인트라 예측을 수행하는 비디오 부호화 방법의 흐름도이다.
도 1a를 참조하면, 일 실시예에 따른 비디오 부호화 장치(10)는 세그먼트 결정부(12), 예측 수행부(16) 및 비트스트림 생성부(16)를 포함할 수 있다.
일 실시예에 따른 비디오에 포함된 현재 픽처들은 최대 크기의 부호화 단위인 최대 부호화 단위로 구획될 수 있다. 예를 들어, 현재 픽처가 최대 부호화 단위보다 크다면, 현재 픽처의 영상 데이터는 적어도 하나의 최대 부호화 단위로 분할될 수 있다. 일 실시예에 따른 최대 부호화 단위는 크기 16x16, 32x32, 64x64, 128x128, 256x256 등의 데이터 단위로, 가로 및 세로 크기가 8보다 큰 2의 제곱승인 정사각형의 데이터 단위일 수 있다.
일 실시예에 따른 부호화 단위는 최대 크기 및 심도에 따라 결정될 수 있다. 심도란 최대 부호화 단위로부터 부호화 단위가 공간적으로 분할한 횟수를 나타내며, 심도가 깊어질수록 심도별 부호화 단위는 최대 부호화 단위로부터 최소 부호화 단위까지 분할될 수 있다. 최대 부호화 단위의 심도가 최상위 심도이며 최소 부호화 단위의 심도가 부호화 심도일 수 있다. 최대 부호화 단위는 심도가 깊어짐에 따라 심도별 부호화 단위의 크기는 감소하므로, 상위 심도의 부호화 단위는 복수 개의 하위 심도의 부호화 단위를 포함할 수 있다.
전술한 바와 같이 부호화 단위의 최대 크기에 따라, 현재 픽처의 영상 데이터를 최대 부호화 단위로 분할하며, 각각의 최대 부호화 단위는 심도별로 분할되는 부호화 단위들을 포함할 수 있다. 일 실시예에 따른 최대 부호화 단위는 심도별로 분할되므로, 최대 부호화 단위에 포함된 공간 영역(spatial domain)의 영상 데이터가 심도에 따라 계층적으로 분류될 수 있다.
최대 부호화 단위의 높이 및 너비를 계층적으로 분할할 수 있는 총 횟수를 제한하는 최대 심도 및 부호화 단위의 최대 크기가 미리 설정되어 있을 수 있다.
일 실시예에 따른 최대 부호화 단위 내의 영상 데이터는 최대 심도 이하의 적어도 하나의 심도에 따라 심도별 부호화 단위에 기반하여 부호화되고, 각각의 심도별 부호화 단위에 기반한 부호화 결과가 비교된다. 심도별 부호화 단위의 부호화 오차의 비교 결과 부호화 오차가 가장 작은 심도가 선택될 수 있다. 각각의 최대화 부호화 단위마다 적어도 하나의 부호화 심도가 결정될 수 있다.
일 실시예에 따른 최대 부호화 단위의 크기는 심도가 깊어짐에 따라 부호화 단위가 계층적으로 분할되며 부호화 단위의 개수는 증가한다. 또한, 하나의 최대 부호화 단위에 포함되는 동일한 심도의 부호화 단위들이라 하더라도, 각각의 데이터에 대한 부호화 오차를 측정하고 하위 심도로의 분할 여부가 결정된다. 따라서, 하나의 최대 부호화 단위에 포함되는 데이터라 하더라도 위치에 따라 심도별 부호화 오차가 다르므로 위치에 따라 부호화 심도가 달리 결정될 수 있다. 따라서, 하나의 최대 부호화 단위에 대해 부호화 심도가 하나 이상 설정될 수 있으며, 최대 부호화 단위의 데이터는 하나 이상의 부호화 심도의 부호화 단위에 따라 구획될 수 있다.
따라서, 일 실시예에 따른 현재 최대 부호화 단위에 포함되는 트리 구조에 따른 부호화 단위들이 결정될 수 있다. 일 실시예에 따른 '트리 구조에 따른 부호화 단위들'은, 현재 최대 부호화 단위에 포함되는 모든 심도별 부호화 단위들 중, 부호화 심도로 결정된 심도의 부호화 단위들을 포함한다. 부호화 심도의 부호화 단위는, 최대 부호화 단위 내에서 동일 영역에서는 심도에 따라 계층적으로 결정되고, 다른 영역들에 대해서는 독립적으로 결정될 수 있다. 마찬가지로, 현재 영역에 대한 부호화 심도는, 다른 영역에 대한 부호화 심도와 독립적으로 결정될 수 있다.
일 실시예에 따른 최대 심도는 최대 부호화 단위로부터 최소 부호화 단위까지의 분할 횟수와 관련된 지표이다. 일 실시예에 따른 제 1 최대 심도는, 최대 부호화 단위로부터 최소 부호화 단위까지의 총 분할 횟수를 나타낼 수 있다. 일 실시예에 따른 제 2 최대 심도는 최대 부호화 단위로부터 최소 부호화 단위까지의 심도 레벨의 총 개수를 나타낼 수 있다. 예를 들어, 최대 부호화 단위의 심도가 0이라고 할 때, 최대 부호화 단위가 1회 분할된 부호화 단위의 심도는 1로 설정되고, 2회 분할된 부호화 단위의 심도가 2로 설정될 수 있다. 이 경우, 최대 부호화 단위로부터 4회 분할된 부호화 단위가 최소 부호화 단위라면, 심도 0, 1, 2, 3 및 4의 심도 레벨이 존재하므로 제 1 최대 심도는 4, 제 2 최대 심도는 5로 설정될 수 있다.
또한, 최대 부호화 단위의 예측 부호화 및 변환이 수행될 수 있다. 예측 부호화 및 변환도 마찬가지로, 최대 부호화 단위마다, 최대 심도 이하의 심도마다 심도별 부호화 단위를 기반으로 수행된다.
최대 부호화 단위가 심도별로 분할될 때마다 심도별 부호화 단위의 개수가 증가하므로, 심도가 깊어짐에 따라 생성되는 모든 심도별 부호화 단위에 대해 예측 부호화 및 변환을 포함한 부호화가 수행되어야 한다. 이하 설명의 편의를 위해 적어도 하나의 최대 부호화 단위 중 현재 심도의 부호화 단위인 현재 블록에 대한 예측 부호화 및 변환을 설명하겠다.
일 실시예에 따른 비디오 부호화 장치(10)는, 영상 데이터의 부호화를 위한 데이터 단위의 크기 또는 형태를 다양하게 선택할 수 있다. 영상 데이터의 부호화를 위해서는 예측 부호화, 변환, 엔트로피 부호화 등의 단계를 거치는데, 모든 단계에 걸쳐서 동일한 데이터 단위가 사용될 수도 있으며, 단계별로 데이터 단위가 변경될 수도 있다.
예를 들어 비디오 부호화 장치(10)는, 영상 데이터의 부호화를 위한 부호화 단위뿐만 아니라, 부호화 단위의 영상 데이터의 예측 부호화를 수행하기 위해, 부호화 단위와 다른 데이터 단위를 선택할 수 있다.
최대 부호화 단위의 예측 부호화를 위해서는, 일 실시예에 따른 부호화 심도의 부호화 단위, 즉 더 이상한 분할되지 않는 부호화 단위를 기반으로 예측 부호화가 수행될 수 있다. 이하, 예측 부호화의 기반이 되는 더 이상한 분할되지 않는 부호화 단위를 '예측 단위'라고 지칭한다.
일 실시예에 따른 원본 영상은 직선 등으로 나타내는 물체(object)의 경계(boundary)를 원본 영상의 내에 포함할 수 있고, 영상의 현재 블록은 물체의 경계에 따라 현재 블록의 윤곽을 결정할 수 있다. 예를 들어, 현재 블록의 윤곽은 현재 블록의 샘플들의 값에 의하여 표현되는 물체의 경계에 따라 직선, 곡선, 꺾인선 등이 될 수 있다. 결정된 현재 블록의 윤곽을 이용하여 현재 블록의 예측 단위인 세그먼트들로 분할될 수 있다.
예측 단위의 예측 모드는, 인트라 모드, 인터 모드 및 스킵 모드 중 적어도 하나일 수 있다. 부호화 단위 이내의 하나의 예측 단위마다 독립적으로 부호화가 수행되어 부호화 오차가 가장 작은 예측 모드가 선택될 수 있다.
구체적으로, 일 실시예에 따른 세그먼트 결정부(12)는 현재 블록에 대하여 윤곽에 기반한 예측(contour-based prediction)을 수행할지 여부를 결정할 수 있다. 즉, 일 실시예에 따른 세그먼트 결정부(12)는 현재 블록의 예측을 수행하기 위한 예측 단위를 현재 블록에 포함된 물체의 경계에 따른 윤곽에 기초하여 결정할지 여부를 결정할 수 있다.
예를 들어, 윤곽 기반의 예측을 수행하는 것으로 결정되면, 일 실시예에 따른 세그먼트 결정부(12)는 현재 블록의 샘플값들에 따른 윤곽에 기초하여 현재 블록을 다양한 형태의 복수 개의 세그먼트들로 분할 수 있다. 또한, 윤곽 기반의 예측을 수행하지 않는 것으로 결정되면, 일 실시예에 따른 세그먼트 결정부(12)는 현재 블록의 소정의 파티션 타입들 중 하나의 파티션 타입으로 분할할 수 있다.
윤곽 기반의 예측이 수행되는 경우, 일 실시예에 따른 세그먼트 결정부(12)는 현재 블록에 대한 예측을 수행하기 위하여, 현재 블록으로부터 현재 블록의 윤곽에 기초하여 분할되는 세그먼트들을 결정할 수 있다. 일 실시예에 따른 현재 블록의 윤곽은 현재 블록에 포함된 물체의 경계에 대응하여 결정될 수 있다. 예를 들어, 일 실시예에 따른 현재 블록의 윤곽은 현재 블록의 샘플들의 값에 기초하여, 또는, 현재 블록의 주변 블록을 이용하여, 결정될 수 있다.
일 실시예에 따른 세그먼트 결정부(12)는, 현재 블록의 윤곽에 따라 현재 블록의 윤곽의 모드를 결정할 수 있다. 예를 들어, 현재 블록의 윤곽의 모드는 현재 블록 내에서의 윤곽의 방향을 나타낼 수 있다.
일 실시예에 따른 현재 블록으로부터 예측을 위한 세그먼트들을 결정하기 위한 윤곽이 직선 윤곽인 경우, 현재 블록의 각각의 변(side)들 중 윤곽이 지나는 변을 가리키는 윤곽의 모드가 결정될 수 있다. 예를 들어, 현재 블록이 상변, 우변, 하변 및 좌변을 갖는 경우, 현재 블록의 윤곽의 모드는 현재 블록의 상변, 우변, 하변 및 좌변 중 윤곽이 닿는 적어도 두 변을 나타낼 수 있다.
일 실시예에 따른 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드는 제 1 모드 내지 제 6 모드 중 하나의 모드로 결정될 수 있다. 예를 들어, 비디오 부호화 장치(10)는 RDO(rate-distortion optimization) 방법을 이용해, 제 1 모드 내지 제 6 모드에 따라 현재 블록의 부복호화를 모두 수행하여 제 1 모드 내지 제 6 모드 중 최선의 RD cost를 갖는 모드를 선택할 수 있다.
또한, 일 실시예에 따른 세그먼트 결정부(12)는, 결정된 현재 블록의 윤곽의 모드에 따라 윤곽의 모드 정보를 결정할 수 있다. 예를 들어, 세그먼트 결정부(12)는 현재 블록의 각 변에 숫자를 할당하고, 현재 블록의 윤곽의 모드가 나타내는 변에 대응하는 숫자의 조합을 현재 블록의 윤곽의 모드 정보로 결정할 수 있다. 다양한 실시예에 따른 현재 블록의 윤곽과 윤곽의 모드 정보를 결정하는 더욱 구체적인 방법은 이하 도 6 내지 도 9를 참조하여 후술하도록 한다.
일 실시예에 따른 세그먼트 결정부(12)는, 현재 블록의 윤곽의 좌표에 관한 정보를 현재 블록의 주변 블록으로부터 유도할지 여부를 결정할 수 있다. 윤곽의 좌표에 관한 정보는 윤곽의 위치를 특정하기 위한 정보로서, 윤곽의 x축 및 y축의 좌표를 나타낼 수 있다. 예를 들어, 일 실시예에 따른 현재 블록의 윤곽이 단일 직선 윤곽인 경우, 현재 블록의 윤곽의 좌표에 관한 정보는 단일 직선 윤곽의 시작점을 나타내는 제 1 좌표 및 윤곽의 끝점을 나타내는 제 2 좌표를 나타내는 정보일 수 있다.
구체적으로, 일 실시예에 따른 세그먼트 결정부(12)는, 현재 블록의 윤곽의 좌표에 관한 정보가 현재 블록의 주변 블록으로부터 유도 가능한 경우, 현재 블록의 윤곽의 좌표에 관한 정보를 주변 블록으로부터 획득할 수 있다. 또는, 일 실시예에 따른 세그먼트 결정부(12)는, 현재 블록의 윤곽의 좌표에 관한 정보가 현재 블록의 주변 블록으로부터 유도 가능하지 않은 경우, 현재 블록의 내부의 샘플들을 이용하여 윤곽의 좌표에 관한 정보를 결정할 수 있다.
예를 들어, 일 실시예에 따른 세그먼트 결정부(12)는, 현재 블록의 윤곽의 모드가 가리키는 현재 블록의 변의 외부에 인접하는 주변 샘플이 사용 가능한 경우, 현재 블록의 해당 변에 위치하는 윤곽의 좌표를 인접하는 주변 샘플로부터 유도할 수 있다. 예를 들어, 현재 블록의 외부에 인접하는 주변 샘플들 중 사용 가능한 샘플은, 현재 블록의 상측 또는 좌측에 위치하는 샘플일 수 있다.
또한, 일 실시예에 따른 세그먼트 결정부(12)는, 현재 블록의 윤곽의 모드가 나타내는 현재 블록의 변의 외부에 인접하는 주변 샘플이 사용 가능하지 않은 경우, 현재 블록의 해당 변에 위치하는 윤곽의 좌표를 현재 블록의 내부의 샘플로부터 결정할 수 있다. 예를 들어, 현재 블록의 외부에 인접하는 주변 샘플들 중 사용 가능하지 않은 샘플은, 현재 블록의 하측 또는 우측에 위치하는 샘플일 수 있다. 현재 블록의 윤곽의 모드가 나타내는 현재 블록의 변의 외부에 인접하는 주변 샘플이 사용 가능하지 않은 경우, 이용되는 현재 블록 내부의 샘플들은 현재 블록의 변의 내부에 인접하는 샘플들일 수 있으며, 결정되는 윤곽의 좌표는 주변 블록으로부터 유도될 수 없으므로 비디오 복호화 장치(20)로 전송될 수 있다.
다양한 실시예에 따른 현재 블록의 윤곽의 좌표를 결정하는 더욱 구체적인 방법은, 이하 도 10 내지 도 16b에서 후술하도록 한다.
일 실시예에 따른 세그먼트 결정부(12)는, 결정된 현재 블록의 윤곽의 좌표에 관한 정보에 기초하여 현재 블록으로부터 예측을 위한 적어도 하나의 세그먼트를 결정할 수 있다.
현재 블록의 예측을 위한 적어도 하나의 세그먼트가 결정되면, 일 실시예에 따른 예측 수행부(14)는 현재 블록의 세그먼트들의 경계를 나타내는 경계 영역에 대하여 현재 블록의 윤곽에 대응되는 경계의 방향에 따라 예측을 수행할지 여부를 결정할 수 있다. 즉, 예측 수행부(14)는 현재 블록의 경계 영역에 포함되는 샘플들에 대한 예측값을 경계의 방향에 기초하여 결정할지 여부를 결정할 수 있다.
일 실시예에 따른 예측 수행부(14)는 현재 블록의 경계의 방향에 따른 예측 방법과 현재 블록의 마스크를 이용한 예측 방법 중 최선의 RD cost를 갖는 예측 방법을 선택할 수 있다.
일 실시예에 따른 현재 블록의 경계 영역은 현재 블록의 윤곽이 지나가는 샘플들로 구성되는 영역일 수도 있고, 현재 블록의 윤곽을 기준으로 소정의 폭을 포함하는 영역일 수 있다.
일 실시예에 따른 경계 영역의 소정의 폭은, 현재 블록을 구성하는 세그먼트들의 경계에 위치하는 샘플들을 중심으로하는 수평 방향으로의 소정의 샘플의 수 또는 수직 방향으로의 샘플의 수를 나타낼 수 있으며, 소정의 폭은 수평 방향으로의 거리 또는 수직 방향으로의 거리뿐만 아니라, 현재 블록을 구성하는 세그먼트들의 경계를 기준으로 경계에 직교하는 방향으로의 거리를 나타낼 수도 있다.
일 실시예에 따른 예측 수행부(14)는 현재 블록의 경계 영역의 폭을 현재 블록의 주변 블록을 이용하여 결정할 수 있다. 또한, 예측 수행부(14)는 현재 블록의 경계 영역의 폭을 복수 개의 소정의 크기 후보 중 최선의 RD cost를 갖는 후보로 결정할 수도 있다.
일 실시예에 따른 예측 수행부(14)는, 현재 블록에 대하여 경계의 방향에 따른 예측을 수행하는 것으로 결정된 경우, 현재 블록의 경계 영역에 대해 경계의 방향에 따른 현재 블록의 주변 샘플을 이용하여 예측을 수행할 수 있다.
일 실시예에 따른 현재 블록의 주변 샘플은, 현재 블록의 외부에 인접하는 샘플로서, 예를 들어, 현재 블록의 상측 주변 샘플, 우상측 주변 샘플, 좌측 주변 샘플 및 좌하측 주변 샘플을 포함할 수 있다. 구체적으로, 일 실시예에 따른 예측 수행부(14)는 현재 블록의 주변 샘플들 중, 경계 영역의 현재 샘플로부터 경계의 방향에 따라 결정되는 참조 샘플을 결정할 수 있다.
참조 샘플이 결정되면, 일 실시예에 따른 예측 수행부(14)는 현재 블록의 경계 영역에 포함된 샘플들의 예측값을 결정된 참조 샘플의 샘플값에 기초하여 생성할 수 있다.
또한, 경계 영역에 대한 예측이 수행되면, 일 실시예에 따른 예측 수행부(14)는 현재 블록 내에서 경계 영역을 제외한 나머지 영역, 즉, 세그먼트에 해당하는 영역에 대하여 예측이 수행될 수 있다. 예를 들어, 세그먼트 영역에 대하여 DC 모드에 따른 인트라 예측이 수행될 수 있다.
다양한 실시예에 따른 현재 블록에 대하여 경계 방향에 따른 예측을 수행하는 더욱 구체적인 방법은, 이하, 도 38 내지 도 44를 참조하여 후술한다.
또한, 현재 블록에 대하여 경계의 방향에 따른 예측을 수행하지 않는 것으로 결정된 경우, 일 실시예에 따른 현재 블록의 예측을 위한 적어도 하나의 세그먼트가 결정되면, 세그먼트 간의 경계를 나타내는 현재 블록의 마스크가 생성될 수 있다.
일 실시예에 따른 현재 블록의 마스크는 현재 블록으로부터 분할되는 적어도 하나의 세그먼트의 영역 및 세그먼트들 간의 경계를 판단하기 위한 데이터로서, 현재 블록의 각 샘플들에 대응하는 마스크값들의 배열로 구성될 수 있다. 일 실시예에 따른 현재 블록의 마스크의 값은 현재 블록의 윤곽과 현재 블록의 각 샘플 값의 위치 관계에 기초하여 생성될 수 있다.
다양한 실시예에 따른 현재 블록의 마스크를 결정하는 구체적인 방법은, 이하 도 17 내지 도 21를 참조하여 후술한다.
일 실시예에 따른 예측 수행부(14)는 현재 블록의 세그먼트들에 대하여 윤곽에 기반한 인트라 예측을 수행할 수 있다.
예를 들어, 일 실시예에 따른 예측 수행부(14)는 현재 블록의 주변 샘플 및 생성된 현재 블록의 마스크를 이용하여 현재 블록에 대하여 예측을 수행할 수 있다.
구체적으로, 일 실시예에 따른 예측 수행부(14)는 현재 블록의 세그먼트의 샘플값을 현재 블록의 주변 샘플을 이용하여 생성할 수 있다. 이때, 세그먼트의 샘플값은 세그먼트 영역에 포함된 각각의 샘플들의 샘플값일 수 있다. 예를 들어, DC 모드 등의 인트라 예측 방식이 이용될 수 있다. 참조할 현재 블록의 주변 샘플의 위치는, 현재 블록의 윤곽의 모드에 기초하여 결정될 수 있다.
일 실시예에 따른 예측 수행부(14)는 생성된 현재 블록의 세그먼트의 샘플값에 현재 블록의 마스크를 적용함으로써 현재 블록의 세그먼트의 예측값을 생성될 수 있다. 이때, 세그먼트의 예측값은 세그먼트 영역에 포함된 각각의 샘플들의 예측값일 수 있으며, 현재 블록의 세그먼트의 샘플값과 현재 블록의 마스크 값의 가중합(weighted sum)을 이용하여 생성될 수 있다.
다양한 실시예에 따른 현재 블록의 마스크를 이용하여 현재 블록의 예측값을 생성하는 더욱 구체적인 방법은, 이하 도 22 내지 도 26를 참조하여 후술한다.
또한, 일 실시예에 따른 예측이 수행된 현재 블록에 대하여 필터링이 수행될 수 있다. 예를 들어, 현재 블록의 현재 블록의 세그먼트들 간의 경계에 위치하는 샘플들의 예측값에 대하여 필터링이 수행될 수 있다.
일 실시예에 따른 현재 블록에 대하여 필터링을 수행하는 경우, 현재 블록의 샘플이 현재 블록의 경계에 위치하는 샘플인지 여부는, 현재 블록의 마스크에 기초하여 결정될 수 있다.
다양한 실시예에 따른 예측이 수행된 현재 블록에 대하여 필터링을 수행하는 더욱 구체적인 방법은, 이하 도 37을 참조하여 후술한다.
또한, 일 실시예에 따른 비디오 부호화 장치(10)는, 영상 데이터의 부호화를 위한 부호화 단위뿐만 아니라, 부호화 단위와 다른 데이터 단위를 기반으로 부호화 단위의 영상 데이터의 변환을 수행할 수 있다.
부호화 단위의 변환을 위해서는, 부호화 단위보다 작거나 같은 크기의 데이터 단위를 기반으로 변환이 수행될 수 있다. 예를 들어, 변환을 위한 데이터 단위는, 인트라 모드를 위한 데이터 단위 및 인터 모드를 위한 데이터 단위를 포함할 수 있다.
이하, 변환의 기반이 되는 데이터 단위는 '변환 단위'라고 지칭될 수 있다. 부호화 단위와 유사한 방식으로, 부호화 단위 내의 변환 단위도 재귀적으로 더 작은 크기의 변환 단위로 분할되면서, 부호화 단위의 레지듀얼 데이터가 변환 심도에 따라 트리 구조에 따른 변환 단위에 따라 구획될 수 있다.
일 실시예에 따른 변환 단위에 대해서도, 부호화 단위의 높이 및 너비가 분할하여 변환 단위에 이르기까지의 분할 횟수를 나타내는 변환 심도가 설정될 수 있다. 예를 들어, 크기 2Nx2N의 현재 부호화 단위의 변환 단위의 크기가 2Nx2N이라면 변환 심도 0, 변환 단위의 크기가 NxN이라면 변환 심도 1, 변환 단위의 크기가 N/2xN/2이라면 변환 심도 2로 설정될 수 있다. 즉, 변환 단위에 대해서도 변환 심도에 따라 트리 구조에 따른 변환 단위가 설정될 수 있다.
부호화 심도별 부호화 정보는, 부호화 심도 뿐만 아니라 예측 관련 정보 및 변환 관련 정보가 필요하다. 따라서, 최소 부호화 오차를 발생시킨 부호화 심도 뿐만 아니라, 예측 단위를 파티션으로 분할한 파티션 타입, 예측 단위별 예측 모드, 변환을 위한 변환 단위의 크기 등이 결정될 수 있다.
심도별 부호화 단위의 부호화 오차가 라그랑지 곱(Lagrangian Multiplier) 기반의 율-왜곡 최적화 기법(Rate-Distortion Optimization)을 이용하여 측정될 수 있다.
일 실시예에 따른 비트스트림 생성부(16)는, 결정된 현재 블록 부호화 및 복호화에 필요한 정보들을 포함하는 비트스트림을 생성할 수 있다. 예를 들어, 일 실시예에 따른 비트스트림 생성부(16)는 현재 블록에 대하여 윤곽에 기반한 예측을 수행할지 여부를 나타내는 정보를 포함하는 비트스트림을 생성할 수 있다.
또한, 일 실시예에 따른 비트스트림 생성부(16)는 현재 블록의 윤곽의 모드를 나타내는 윤곽의 모드 정보를 포함하는 비트스트림을 생성할 수 있다.
또한, 일 실시예에 따른 비트스트림 생성부(16)는 현재 블록의 윤곽의 모드 정보에 따라 현재 블록의 윤곽의 좌표에 관한 정보를 포함하는 비트스트림을 생성할 수 있다. 예를 들어, 현재 블록의 윤곽의 모드 정보가 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도 가능함을 나타내는 경우, 현재 블록의 윤곽의 좌표에 관한 정보는 비트스트림에 포함되지 않을 수 있다. 또한, 현재 블록의 윤곽의 모드 정보가 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도 가능하지 않음을 나타내는 경우, 현재 블록의 윤곽의 좌표에 관한 정보는 비트스트림에 포함될 수 있다.
또한, 일 실시예에 따른 비트스트림 생성부(16)는 현재 블록에 대하여 경계의 방향에 따라 예측을 수행할지 여부를 나타내는 정보, 현재 블록의 경계 영역의 폭에 관한 정보, 현재 블록의 예측값에 대하여 필터링을 수행할지 여부를 타나내는 정보 등을 비트스트림에 더 포함시킬 수 있다.
또한, 일 실시예에 따른 비트스트림 생성부(16)는 부호화 심도에 관한 정보, 심도별 부호화 모드에 관한 정보, 예측 단위의 파티션 타입 정보, 예측 모드 정보, 변환 단위의 크기 정보 등을 비트스트림에 더 포함시킬 수 있다.
전술한 바와 같이 비디오 부호화 장치(10)는 윤곽에 기반한 인트라 예측을 수행함으로써 복원 영상의 품질을 향상시키는 동시에 영상의 예측에 필요한 정보의 양을 줄임으로써 전송 효율 및 부호화 효율을 향상시킬 수 있다.
이하, 윤곽 기반의 인트라 예측을 수행하는 비디오 부호화 장치(10)의 동작을 도 1b를 참조하여 상술한다.
도 1b 는 일 실시예에 따른 윤곽 기반의 인트라 예측을 수행하는 비디오 부호화 방법의 흐름도이다.
11 단계에서, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드에 따라 결정되는 윤곽의 제 1 좌표 및 제 2 좌표가 현재 블록의 주변 블록으로부터 유도 가능한지 여부를 결정할 수 있다.
구체적으로, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드를 결정할 수 있다.
예를 들어, 비디오 부호화 장치(10)는 현재 블록의 샘플들의 샘플값에 기초하여 현재 블록의 윤곽을 결정할 수 있다. 또는 비디오 부호화 장치(10)는 현재 블록의 외부에 인접하는 주변 블록을 이용하여 현재 블록의 윤곽을 결정할 수도 있다. 일 실시예에 따른 비디오 부호화 장치(10)는 복수 개의 모드들 중 최선의 RD cost를 갖는 모드를 선택할 수 있다.
일 실시예에 따른 비디오 부호화 장치(10)는 결정된 현재 블록의 윤곽의 모드에 기초하여, 현재 블록의 외부에 인접하는 주변 블록으로부터 윤곽의 좌표가 유도 가능한지 여부를 결정할 수 있다.
예를 들어, 비디오 부호화 장치(10)는 현재 블록의 윤곽의 모드가 가리키는 현재 블록의 변이 현재 블록의 상변 또는 좌변인 경우, 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도 가능한 것으로 결정할 수 있다.
또한, 비디오 부호화 장치(10)는 현재 블록의 윤곽의 모드가 가리키는 현재 블록의 변이 현재 블록의 하변 또는 우변인 경우, 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도 가능하지 않은 것으로 결정할 수 있다.
일 실시예에 따른 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도 가능한지 여부는, 윤곽의 복수 개의 좌표에 대하여 각각 결정될 수 있다.
13 단계에서, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록의 주변 블록으로부터 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한 경우, 현재 블록의 주변 블록으로부터 유도되는 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 현재 블록으로부터 적어도 하나의 세그먼트를 결정할 수 있다.
구체적으로, 일 실시예에 따른 부호화 장치(10)는 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도 가능한 경우, 현재 블록의 주변 블록으로부터 윤곽의 좌표를 유도할 수 있다.
이때, 일 실시예에 따른 비디오 부호화 장치(10)는 주변 블록으로부터 유도 가능하지 않은 윤곽의 좌표는 현재 블록 내의 샘플들을 이용하여 결정할 수 있다. 이때 현재 블록 내의 샘플들은 현재 블록의 윤곽이 가리키는 변에 인접하고 현재 블록의 내부에 위치하는 샘플들일 수 있다.
일 실시예에 따른 비디오 부호화 장치(10)는 주변 블록의 샘플들에 대한 샘플값의 변화량(gradient) 또는 현재 블록 내의 샘플들에 대한 샘플값의 변화량에 기초하여 현재 블록의 윤곽의 좌표를 결정할 수 있다.
또한, 일 실시예에 따른 비디오 부호화 장치(10)는 윤곽의 좌표에 기초하여 현재 블록으로부터 예측 수행을 위한 적어도 하나의 세그먼트를 결정할 수 있다. 예를 들어, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록이 단일 직선 윤곽에 기초하여 분할되는 경우, 두 개의 세그먼트를 결정할 수 있다.
15 단계에서, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록을 구성하는 세그먼트들의 경계를 포함하는 경계 영역에 대하여 경계의 방향에 따라 예측을 수행할지 여부를 결정할 수 있다.
일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록의 경계의 방향에 따른 예측 방법과 현재 블록의 마스크를 이용한 예측 방법 중 최선의 RD cost를 갖는 예측 방법을 선택할 수 있다.
일 실시예에 따른 비디오 부호화 장치(10)는 결정된 방법에 따라 현재 블록에 대한 예측을 수행할 수 있다.
17 단계에서, 일 실시예에 따른 비디오 부호화 장치(10)는 경계 영역에 경계의 방향에 따라 예측을 수행할지 여부를 나타내는 정보 및 경계의 방향을 나타내는 윤곽의 모드 정보를 부호화할 수 있다.
현재 블록에 대하여 경계의 방향에 따른 예측을 수행하는 것으로 결정된 경우, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록의 경계 영역의 폭에 관한 정보를 더 부호화할 수 있다.
또한, 현재 블록의 윤곽의 모드 정보가 현재 블록의 윤곽의 좌표가 현재 블록의 외부에 인접하는 주변 블록으로부터 유도 가능한 경우, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록의 윤곽의 좌표에 관한 정보를 부호화 하지 않을 수 있고, 현재 블록의 윤곽의 모드 정보가 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도 가능하지 않은 경우, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록의 윤곽의 좌표에 관한 정보를 부호화할 수 있다.
일 실시예에 따른 비디오 부호화 장치(10)는 세그먼트 결정부(12), 예측 수행부(14) 및 비트스트림 생성부(16)를 총괄적으로 제어하는 중앙 프로세서(미도시)를 포함할 수 있다. 또는, 세그먼트 결정부(12), 예측 수행부(14) 및 비트스트림 생성부(16)가 각각의 자체 프로세서(미도시)에 의해 작동되며, 프로세서(미도시)들이 상호 유기적으로 작동함에 따라 비디오 부호화 장치(10)가 전체적으로 작동될 수도 있다. 또는, 비디오 부호화 장치(10)의 외부 프로세서(미도시)의 제어에 따라, 세그먼트 결정부(12), 예측 수행부(14) 및 비트스트림 생성부(16)가 제어될 수도 있다.
일 실시예에 따른 비디오 부호화 장치(10)는 세그먼트 결정부(12), 예측 수행부(14) 및 비트스트림 생성부(16)의 입출력 데이터가 저장되는 하나 이상의 데이터 저장부(미도시)를 포함할 수 있다. 또한, 일 실시예에 따른 비디오 부호화 장치(10)는 데이터 저장부(미도시)의 데이터 입출력을 관할하는 메모리 제어부(미도시)를 포함할 수도 있다.
일 실시예에 따른 비디오 부호화 장치(10)는 비디오 부호화 결과를 출력하기 위해, 내부에 탑재된 비디오 인코딩 프로세서 또는 외부 비디오 인코딩 프로세서와 연계하여 작동함으로써, 변환을 포함한 비디오 부호화 동작을 수행할 수 있다. 일 실시예에 따른 비디오 부호화 장치(10)의 내부 비디오 인코딩 프로세서는, 별개의 프로세서로서 비디오 부호화 동작을 구현할 수 있다. 또한, 비디오 부호화 장치(10) 또는 중앙 연산 장치, 그래픽 연산 장치가 비디오 인코딩 프로세싱 모듈을 포함함으로써 기본적인 비디오 부호화 동작을 구현하는 경우도 가능하다.
도 2a는 일 실시예에 따른 윤곽 기반의 인트라 예측을 수행하는 비디오 복호화 장치의 블록도(20)이다. 도 2b 는 일 실시예에 따른 윤곽 기반의 인트라 예측을 수행하는 비디오 복호화 방법의 흐름도이다.
도 2a를 참조하면, 비디오 복호화 장치(20)는 세그먼트 결정부(22) 및 예측 수행부(24)를 포함할 수 있다.
또한, 비디오 복호화 장치(20)는 부호화된 비디오에 대한 비트스트림을 수신하여 파싱하는 수신부(미도시)를 더 포함할 수 있다. 예를 들어, 일 실시예에 따른 비디오 복호화 장치(20)는 부호화 단위 별로 부호화된 영상 데이터와 부호화 단위의 부호화 및 복호화에 필요한 정보들을 파싱할 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 비디오의 최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보에 기초하여 각각의 최대 부호화 단위의 영상 데이터를 복호화하여 현재 픽처를 복원한다. 즉, 비디오 복호화 장치(20)는 최대 부호화 단위에 포함되는 부호화 단위들 가운데 각각의 부호화 단위마다, 결정된 예측 단위, 예측 모드, 변환 단위 등에 관한 정보에 기초하여 부호화된 영상 데이터를 복호화할 수 있다. 복호화 과정은 인트라 예측 및 움직임 보상을 포함하는 예측 과정, 및 주파수 역변환 과정을 포함할 수 있다.
구체적으로, 일 실시예에 따른 세그먼트 결정부(22)는 부호화 심도의 부호화 단위에 해당하는 현재 블록에 대하여, 윤곽에 기반한 예측을 수행할지 여부를 결정할 수 있다. 즉, 일 실시예에 따른 세그먼트 결정부(22)는 현재 블록의 예측을 수행하기 위한 예측 단위가 되는 세그먼트들을 현재 블록에 포함된 물체의 경계에 따른 윤곽에 기초하여 결정할지 여부를 결정할 수 있다.
일 실시예에 따른 세그먼트 결정부(22)는 비디오 부호화 장치(10)로부터 수신되는 예측 모드를 나타내는 정보를 이용하여 현재 블록에 대하여 윤곽에 기반한 예측을 수행할지 여부를 결정할 수 있다. 예를 들어, 현재 블록에 대한 예측 모드를 나타내는 정보는, 현재 블록을 정사각형 또는 직사각형의 예측 단위를 이용하는 일반적인 인트라 모드를 이용할지 또는 현재 블록에 포함된 물체의 경계에 따른 윤곽을 이용하여 분할되는 예측 단위인 세그먼트를 이용하는 윤곽 기반 인트라 예측 모드를 이용할지 여부를 나타내는 정보를 포함할 수 있다.
일 실시예에 따른 세그먼트 결정부(22)는, 윤곽 기반의 예측을 수행하는 것으로 결정되면, 현재 블록의 윤곽에 기초하여 현재 블록을 다양한 형태의 복수 개의 세그먼트들로 분할 수 있다. 또한, 일 실시예에 따른 세그먼트 결정부 (22)는, 윤곽 기반의 예측을 수행하지 않는 것으로 결정되면, 현재 블록을 현재 블록의 소정의 파티션 타입들 중 하나의 파티션 타입으로 분할할 수 있다.
윤곽 기반의 예측이 수행되는 경우, 일 실시예에 따른 세그먼트 결정부 (22)는 비트스트림으로부터 획득되는 현재 블록의 세그먼트의 개수에 관한 정보에 기초하여 현재 블록의 세그먼트의 개수를 결정할 수 있다. 예를 들어, 현재 블록의 세그먼트의 개수에 관한 정보가 현재 블록으로부터 분할되는 세그먼트가 1개임을 나타내는 경우, 현재 블록은 분할되지 않을 수 있다.
또한, 일 실시예에 따른 세그먼트 결정부(22)는 비트스트림으로부터 획득되는 현재 블록의 윤곽에 관한 정보를 이용하여 현재 블록으로부터 적어도 하나의 세그먼트를 결정할 수 있다. 예를 들어, 현재 블록의 윤곽에 관한 정보는 윤곽의 모드 정보 및 윤곽의 좌표에 관한 정보를 포함할 수 있다.
구체적으로, 일 실시예에 따른 세그먼트 결정부(22)는 현재 블록의 윤곽의 모드 정보에 기초하여 현재 블록의 윤곽의 모드를 결정하고, 현재 블록의 윤곽의 좌표에 관한 정보를 비트스트림으로부터 파싱할지 여부를 결정할 수 있다. 예를 들어, 현재 블록의 윤곽의 좌표에 관한 정보는 현재 블록의 윤곽의 제 1 좌표 정보 및 제 2 좌표 정보를 포함할 수 있다.
일 실시예에 따른 세그먼트 결정부(22)는 현재 블록의 윤곽의 모드 정보가 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도 가능한 윤곽의 모드를 가리키는 경우, 현재 블록의 윤곽의 좌표에 관한 정보를 파싱하지 않을 수 있다. 예를 들어, 세그먼트 결정부(22)는 현재 블록의 윤곽의 모드에 따른 윤곽의 제 1 좌표 또는 제 2 좌표가 현재 블록의 상변 또는 좌변에 위치하는 경우, 현재 블록의 윤곽의 제 1 좌표 또는 제 2 좌표를 파싱하지 않을 수 있다.
또한, 일 실시예에 따른 세그먼트 결정부(22)는 현재 블록의 윤곽의 모드 정보가 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도 가능하지 않은 윤곽의 모드를 가리키는 경우, 현재 블록의 내부의 샘플들을 이용하여 윤곽의 좌표를 결정할 수 있다. 예를 들어, 세그먼트 결정부(22)는 현재 블록의 윤곽의 모드에 따른 윤곽의 제 1 좌표 또는 제 2 좌표가 현재 블록의 하변 또는 우변에 위치하는 경우, 현재 블록의 윤곽의 제 1 좌표 또는 제 2 좌표를 비트스트림으로부터 파싱할 수 있다.
예를 들어, 일 실시예에 따른 세그먼트 결정부(22)는, 윤곽의 제 1 좌표를 현재 블록의 상측의 외부에 인접하는 주변 블록으로부터 유도하는 경우, 현재 블록에 인접하는 상측 주변 블록의 최하단의 일련의 샘플들의 샘플값을 이용하여 윤곽의 제 1 좌표를 유도할 수 있다. 또한, 일 실시예에 따른 세그먼트 결정부(22)는, 윤곽의 제 2 좌표를 현재 블록의 좌측에 위치하는 주변 블록으로부터 유도하는 경우, 현재 블록에 인접하는 좌측 블록의 최우측의 일련의 샘플들의 샘플값을 이용하여 윤곽의 제 2 좌표를 유도할 수 있다. 예를 들어, 현재 블록의 윤곽의 좌표는 주변 블록의 일련의 샘플들의 샘플값들의 변화량에 기초하여 결정될 수 있다.
또한, 일 실시예에 따른 세그먼트 결정부(22)는, 현재 블록의 주변 블록으로부터 현재 블록의 윤곽의 좌표를 유도하지 않는 경우, 비트스트림으로부터 획득되는 윤곽의 좌표 정보에 기초하여 현재 블록의 윤곽의 좌표를 결정할 수 있다.
다양한 실시예에 따른 현재 블록의 윤곽의 좌표를 결정하는 더욱 구체적인 방법은, 이하 도 10 내지 도 16b에서 후술하도록 한다.
일 실시예에 따른 세그먼트 결정부(22)는 결정된 현재 블록의 윤곽에 기초하여 현재 블록으로부터 예측을 위한 적어도 하나의 세그먼트를 결정할 수 있다.
일 실시예에 따른 현재 블록의 예측을 위한 적어도 하나의 세그먼트가 결정되면, 세그먼트 간의 경계를 판단하기 위한 현재 블록의 마스크가 생성될 수 있다.
구체적으로, 일 실시예에 따른 예측 수행부(24)는 현재 블록의 각각의 샘플들과 현재 블록의 윤곽 간의 위치 관계에 기초하여 현재 블록의 각각의 샘플들에 대한 마스크 값을 결정할 수 있다. 일 실시예에 따른 현재 블록의 마스크는 현재 블록의 세그먼트들의 영역 및 세그먼트들 간의 경계를 나타낼 수 있다.
다양한 실시예에 따른 현재 블록의 마스크를 결정하는 더욱 구체적인 방법은, 이하 도 17 내지 도 21를 참조하여 후술한다.
현재 블록의 예측을 위한 적어도 하나의 세그먼트가 결정되면, 일 실시예에 따른 예측 수행부(24)는 현재 블록의 세그먼트들의 경계를 포함하는 경계 영역에 대하여 현재 블록의 윤곽에 대응되는 경계의 방향에 따라 예측을 수행할지 여부를 결정할 수 있다. 즉, 예측 수행부(24)는 현재 블록의 경계 영역에 포함되는 샘플들에 대한 예측값을 경계의 방향에 기초하여 결정할지 여부를 결정할 수 있다.
일 실시예에 따른 예측 수행부(24)는 비트스트림으로부터 획득되는 현재 블록에 경계의 방향에 따라 예측을 수행할지 여부를 나타내는 정보를 이용하여, 경계의 방향에 따라 예측을 수행할지 여부를 결정할 수 있다. 일 실시예에 따른 현재 블록의 경계 영역은 현재 블록의 윤곽이 지나가는 샘플들로 구성되는 영역일 수도 있고, 현재 블록의 윤곽을 기준으로 소정의 폭을 포함하는 영역일 수 있다.
일 실시예에 따른 예측 수행부(24)는 현재 블록의 경계 영역의 폭을 현재 블록의 외부에 인접하는 주변 블록을 이용하여 결정할 수 있다. 또한, 예측 수행부(24)는 현재 블록의 경계 영역의 폭을 비트스트림으로부터 파싱되는 경계 영역의 폭에 관한 정보를 이용하여 결정할 수도 있다. 일 실시예에 따른 경계 영역의 폭에 관한 정보는 경계 영역의 폭을 직접 나타내는 소정의 수치 정보일 수도 있고, 복수 개의 소정의 크기 후보 중 하나를 나타내는 인덱스 정보일 수도 있다.
일 실시예에 따른 예측 수행부(24)는, 현재 블록에 대하여 경계의 방향에 따른 예측을 수행하는 것으로 결정된 경우, 현재 블록의 경계 영역에 대해 경계의 방향에 따른 현재 블록의 외부에 인접하는 주변 샘플을 이용하여 예측을 수행할 수 있다.
예를 들어, 일 실시예에 따른 현재 블록의 주변 샘플은, 현재 블록의 상측 주변 샘플, 우상측 주변 샘플, 좌측 주변 샘플 및 좌하측 주변 샘플을 포함할 수 있다. 구체적으로, 일 실시예에 따른 예측 수행부(24)는 현재 블록의 주변 샘플들 중, 경계 영역의 현재 샘플로부터 경계의 방향에 따라 결정되는 참조 샘플을 결정할 수 있다.
참조 샘플이 결정되면, 일 실시예에 따른 예측 수행부(24)는 현재 블록의 경계 영역에 포함된 샘플들의 예측값을 결정된 참조 샘플의 샘플값에 기초하여 생성할 수 있다.
또한, 경계 영역에 대한 예측이 수행되면, 일 실시예에 따른 예측 수행부(24)는 현재 블록 내에서 경계 영역을 제외한 나머지 영역, 즉, 세그먼트에 해당하는 영역에 대하여 예측이 수행될 수 있다. 예를 들어, 세그먼트 영역에 대하여 DC 모드에 따른 인트라 예측이 수행될 수 있다.
다양한 실시예에 따른 현재 블록에 대하여 경계 방향에 따른 예측을 수행하는 더욱 구체적인 방법은, 이하, 도 38 내지 도 44를 참조하여 후술한다.
또한, 현재 블록에 대하여 경계의 방향에 따른 예측을 수행하지 않는 것으로 결정된 경우, 일 실시예에 따른 예측 수행부(24)는 현재 블록의 주변 샘플 및 생성된 현재 블록의 마스크를 이용하여 현재 블록에 대하여 예측을 수행할 수 있다.
구체적으로, 일 실시예에 따른 예측 수행부(24)는 현재 블록의 주변 샘플을 이용하여 현재 블록의 세그먼트의 샘플값을 생성할 수 있다. 이때, 세그먼트의 샘플값은 세그먼트 영역에 포함된 각각의 샘플들의 샘플값일 수 있다. 예를 들어, DC 모드 등의 인트라 예측 방식이 이용될 수 있다. 참조할 현재 블록의 주변 샘플의 위치는 현재 블록의 윤곽의 모드에 기초하여 결정될 수 있다.
또한, 일 실시예에 따른 예측 수행부(24)는 생성된 세그먼트 영역에 포함된 샘플들의 샘플값에 현재 블록의 세그먼트들의 영역 및 경계를 나타내는 마스크를 적용함으로써 현재 블록의 세그먼트의 예측값을 생성할 수 있다. 이때, 세그먼트의 예측값은 세그먼트 영역에 포함된 각각의 샘플들의 예측값일 수 있으며, 현재 블록의 세그먼트의 샘플값과 현재 블록의 마스크 값의 가중합을 이용하여 생성될 수 있다.
다양한 실시예에 따른 현재 블록의 예측값을 생성하는 더욱 구체적인 방법은, 이하 도 22 내지 도 26를 참조하여 후술한다.
또한, 일 실시예에 따른 예측 수행부(24)는 예측이 수행된 현재 블록에 대하여 필터링을 수행할 수 있다. 예를 들어, 현재 블록의 현재 블록의 세그먼트들 간의 경계에 위치하는 샘플들의 예측값에 대하여 필터링이 수행될 수 있다.
일 실시예에 따른 예측 수행부(24)는 비트스트림으로부터 파싱되는 필터링 수행 여부를 나타내는 정보를 이용하여, 현재 블록의 예측값에 대하여 필터링을 수행할지 여부를 결정할 수 있다.
다양한 실시예에 따른 예측이 수행된 현재 블록에 대하여 필터링을 수행하는 구체적인 방법은, 이하 도 37을 참조하여 후술한다.
일 실시예에 따른 현재 블록에 대하여 예측이 수행되어 예측 블록이 생성되면, 비디오 복호화 장치(20)는 예측된 데이터를 이용하여 움직임 보상을 수행함으로써 비디오를 복원할 수 있다. 움직임 보상은, 예측 데이터와 레지듀얼 데이터를 합성하여 복원 영상을 재구성하는 동작을 의미할 수 있다.
이하, 윤곽 기반의 인트라 예측을 수행하는 비디오 복호화 장치(20)의 동작을 도 2b를 참조하여 후술하도록 한다.
도 2b 는 일 실시예에 따른 윤곽 기반의 인트라 예측을 수행하는 비디오 복호화 방법의 흐름도이다.
21 단계에서, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드 정보에 따라 결정되는 윤곽의 제 1 좌표 및 제 2 좌표가 현재 블록의 주변 블록으로부터 유도 가능한지 여부를 결정할 수 있다.
구체적으로, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드 정보를 비트스트림으로부터 획득하여 현재 블록의 윤곽의 모드 정보를 결정할 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 비트스트림으로부터 획득되는 현재 블록에 대한 예측 모드를 나타내는 정보를 이용하여, 현재 블록에 대하여 윤곽에 기반한 예측을 수행할지 여부를 결정할 수 있다. 예를 들어, 현재 블록에 대한 예측 모드를 나타내는 정보는, 현재 블록을 정사각형 또는 직사각형의 예측 단위를 이용하는 일반적인 인트라 모드를 이용할지 또는 현재 블록에 포함된 물체의 경계에 따른 윤곽을 이용하여 분할되는 예측 단위인 세그먼트를 이용하는 윤곽 기반 인트라 예측 모드를 이용할지 여부를 나타내는 정보를 포함할 수 있다.
현재 블록에 대하여 윤곽에 기반한 예측을 수행하는 것으로 결정된 경우, 일 실시예에 따른 비디오 복호화 장치(20)는 비트스트림으로부터 현재 블록의 윤곽의 모드 정보를 획득할 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 획득된 현재 블록의 윤곽의 모드 정보에 기초하여, 현재 블록의 주변 블록으로부터 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한지 여부를 결정할 수 있다.
예를 들어, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 윤곽의 모드 정보가 현재 블록의 윤곽의 좌표가 현재 블록의 상변 또는 좌변에 위치하는 모드를 가리키는 경우, 현재 블록의 해당 윤곽의 좌표가 현재 블록의 외부에 인접하는 주변 블록으로부터 유도 가능한 것으로 판단할 수 있다. 또한, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 윤곽의 모드 정보가 현재 블록의 윤곽의 좌표가 현재 블록의 하변 또는 우변에 위치하는 모드를 가리키는 경우, 현재 블록의 해당 윤곽의 좌표가 현재 블록의 외부에 인접하는 주변 블록으로부터 유도 가능하지 않은 것으로 판단할 수 있다.
23 단계에서, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 주변 블록으로부터 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한 경우, 현재 블록의 주변 블록으로부터 유도되는 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 현재 블록으로부터 적어도 하나의 세그먼트를 결정할 수 있다.
일 실시예에 따른 현재 블록의 주변 블록은 현재 블록의 상측 또는 좌측에 인접하는 블록을 포함할 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 윤곽의 모드가 가리키는 현재 블록의 변이 상변 또는 좌변인 경우, 현재 블록의 윤곽의 좌표를 현재 블록의 주변 블록으로부터 유도 가능한 것으로 결정할 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 주변 블록으로부터 윤곽의 제 1 좌표 또는 제 2 좌표가 유도 가능하지 않은 경우, 유도 가능하지 않은 윤곽의 좌표에 관한 정보를 비트스트림으로부터 획득할 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 비트스트림으로부터 획득된 현재 블록의 윤곽의 좌표에 관한 정보와 윤곽의 모드 정보를 이용하여 현재 블록으로부터 적어도 하나의 세그먼트를 결정할 수 있다.
25 단계에서, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록을 구성하는 결정된 세그먼트들의 경계를 포함하는 경계 영역에 대하여 경계의 방향에 따라 예측을 수행할지 여부를 결정할 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 비트스트림으로부터 획득되는 현재 블록에 경계의 방향에 따라 예측을 수행할지 여부를 나타내는 정보를 이용하여, 경계의 방향에 따라 예측을 수행할지 여부를 결정할 수 있다.
27 단계에서, 일 실시예에 따른 비디오 복호화 장치(20)는, 경계 영역에 경계의 방향에 따라 예측을 수행하는 것으로 결정되는 경우, 경계의 방향에 따른 현재 블록의 외부에 인접하는 주변 샘플을 이용하여 경계 영역에 예측을 수행할 수 있다.
일 실시예에 따른 현재 블록의 경계 영역은 현재 블록의 윤곽이 지나가는 샘플들로 구성되는 영역일 수도 있고, 현재 블록의 윤곽을 기준으로 소정의 폭을 포함하는 영역일 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 경계 영역의 폭을 현재 블록의 주변 블록을 이용하여 결정할 수 있다. 또한, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 경계 영역의 폭을 비트스트림으로부터 파싱되는 경계 영역의 폭에 관한 정보를 이용하여 결정할 수도 있다. 일 실시예에 따른 경계 영역의 폭에 관한 정보는 경계 영역의 폭을 직접 나타내는 소정의 수치 정보일 수도 있고, 복수 개의 소정의 크기 후보 중 하나를 나타내는 인덱스 정보일 수도 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 주변 샘플들 중, 경계 영역의 현재 샘플로부터 경계의 방향에 따라 결정되는 참조 샘플을 결정할 수 있다.
참조 샘플이 결정되면, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 경계 영역에 포함된 샘플들의 예측값을 결정된 참조 샘플의 샘플값에 기초하여 생성할 수 있다.
또한, 경계 영역에 대한 예측이 수행되면, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록 내에서 경계 영역을 제외한 나머지 영역, 즉, 세그먼트에 해당하는 영역에 대하여 예측이 수행될 수 있다. 예를 들어, 세그먼트 영역에 대하여 DC 모드에 따른 인트라 예측이 수행될 수 있다.
다양한 실시예에 따른 현재 블록에 대하여 경계 방향에 따른 예측을 수행하는 더욱 구체적인 방법은, 이하, 도 38 내지 도 44를 참조하여 후술한다.
또한, 현재 블록에 대하여 경계의 방향에 따른 예측을 수행하지 않는 것으로 결정된 경우, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 주변 샘플 및 생성된 현재 블록의 마스크를 이용하여 현재 블록에 대하여 예측을 수행할 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 세그먼트 간의 경계를 나타내는 현재 블록의 마스크를 생성될 수 있다. 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록으로부터 적어도 하나의 세그먼트를 결정하는 윤곽과 현재 블록의 샘플 간의 위치 관계에 기초하여 현재 블록의 샘플의 마스크 값을 결정할 수 있다.
또한, 일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 주변 샘플 및 생성된 현재 블록의 마스크를 이용하여 현재 블록에 대하여 예측을 수행할 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 현재 블록의 주변 샘플을 이용하여 현재 블록의 세그먼트 영역에 포함된 샘플들의 샘플값을 생성할 수 있다. 예를 들어, DC 모드 등의 인트라 예측 방식이 이용될 수 있다.
또한, 일 실시예에 따른 비디오 복호화 장치(20)는 생성된 세그먼트 영역에 포함된 샘플들의 샘플값에 현재 블록의 세그먼트들의 영역 및 경계를 나타내는 마스크를 적용함으로써 현재 블록의 세그먼트의 예측값을 생성할 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는 예측이 수행된 현재 블록에 대하여 필터링을 수행할 수 있다. 예를 들어, 현재 블록의 현재 블록의 세그먼트들 간의 경계에 위치하는 샘플들의 예측값에 대하여 필터링이 수행될 수 있다. 일 실시예에 따른 비디오 복호화 장치(20)는 비트스트림으로부터 수신되는 필터링 수행 여부를 나타내는 정보를 이용하여, 현재 블록의 예측값에 대하여 필터링을 수행할지 여부를 결정할 수 있다.
다양한 실시예에 따른 비디오 복호화 장치(20)는 세그먼트 결정부(22) 및 예측 수행부(24)를 총괄적으로 제어하는 중앙 프로세서(미도시)를 포함할 수 있다. 또는, 세그먼트 결정부(22) 및 예측 수행부(24)가 각각의 자체 프로세서(미도시)에 의해 작동되며, 프로세서(미도시)들이 상호 유기적으로 작동함에 따라 비디오 복호화 장치(20)가 전체적으로 작동될 수도 있다. 또는, 다양한 실시예에 따른 비디오 복호화 장치(20)의 외부 프로세서(미도시)의 제어에 따라, 세그먼트 결정부(22) 및 예측 수행부(24)가 제어될 수도 있다.
다양한 실시예에 따른 비디오 복호화 장치(20)는 세그먼트 결정부(22) 및 예측 수행부(24)의 입출력 데이터가 저장되는 하나 이상의 데이터 저장부(미도시)를 포함할 수 있다. 비디오 복호화 장치(20)는 데이터 저장부(미도시)의 데이터 입출력을 관할하는 메모리 제어부(미도시)를 포함할 수도 있다.
다양한 실시예에 따른 비디오 복호화 장치(20)는 비디오 복호화를 통해 비디오를 복원하기 위해, 내부에 탑재된 비디오 디코딩 프로세서 또는 외부 비디오 디코딩 프로세서와 연계하여 작동함으로써, 역변환을 포함한 비디오 복호화 동작을 수행할 수 있다. 다양한 실시예에 따른 비디오 복호화 장치(20)의 내부 비디오 디코딩 프로세서는, 별개의 프로세서뿐만 아니라, 비디오 복호화 장치(20) 또는 중앙 연산 장치, 그래픽 연산 장치가 비디오 디코딩 프로세싱 모듈을 포함함으로써 기본적인 비디오 복호화 동작을 구현하는 경우도 포함할 수도 있다.
도 3은 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부(300)의 블록도를 도시한다.
일 실시예에 따른 영상 부호화부(300)는, 비디오 부호화 장치(10)(100)의 부호화 단위 결정부(120)에서 영상 데이터를 부호화하는데 거치는 작업들을 수행한다. 즉, 인트라 예측부(310)는 현재 프레임(305) 중 인트라 모드의 부호화 단위에 대해 인트라 예측을 수행하고, 움직임 추정부(320) 및 움직임 보상부(325)는 인터 모드의 현재 프레임(305) 및 참조 프레임(395)를 이용하여 인터 추정 및 움직임 보상을 수행한다.
인트라 예측부(310), 움직임 추정부(320) 및 움직임 보상부(325)로부터 출력된 데이터는 변환부(330) 및 양자화부(340)를 거쳐 양자화된 변환 계수로 출력된다. 양자화된 변환 계수는 역양자화부(360), 역변환부(370)을 통해 공간 영역의 데이터로 복원되고, 복원된 공간 영역의 데이터는 디블로킹부(380) 및 오프셋 적용부(390)를 거쳐 후처리되어 참조 프레임(395)으로 출력된다. 양자화된 변환 계수는 엔트로피 부호화부(350)를 거쳐 비트스트림(355)으로 출력될 수 있다.
일 실시예에 따른 비디오 부호화 장치(10)(100)에 적용되기 위해서는, 영상 부호화부(300)의 구성 요소들인 인트라 예측부(310), 움직임 추정부(320), 움직임 보상부(325), 변환부(330), 양자화부(340), 엔트로피 부호화부(350), 역양자화부(360), 역변환부(370), 디블로킹부(380) 및 오프셋 적용부(390)가 모두, 최대 부호화 단위마다 최대 심도를 고려하여 트리 구조에 따른 부호화 단위들 중 각각의 부호화 단위에 기반한 작업을 수행하여야 한다.
특히, 인트라 예측부(310), 움직임 추정부(320) 및 움직임 보상부(325)는 현재 최대 부호화 단위의 최대 크기 및 최대 심도를 고려하여 트리 구조에 따른 부호화 단위들 중 각각의 부호화 단위의 예측 단위 및 예측 모드를 결정하며, 변환부(330)는 트리 구조에 따른 부호화 단위들 중 각각의 부호화 단위 내의 변환 단위의 크기를 결정하여야 한다. 예를 들어, 인트라 예측부(310)은 도 1a의 세그먼트 결정부(12)가 수행하는 동작들과 동일한 동작을 수행할 수 있다.
도 4는 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부(400)의 블록도를 도시한다.
도 4를 참조함녀, 파싱부(410)는 비트스트림(405)으로부터 복호화 대상인 부호화된 영상 데이터 및 복호화를 위해 필요한 부호화에 관한 정보를 파싱한다. 부호화된 영상 데이터는 엔트로피 복호화부(420) 및 역양자화부(430)를 거쳐 역양자화된 데이터로 출력되고, 역변환부(440)를 거쳐 공간 영역의 영상 데이터가 복원된다.
공간 영역의 영상 데이터에 대해서, 인트라 예측부(450)는 인트라 모드의 부호화 단위에 대해 인트라 예측을 수행하고, 움직임 보상부(460)는 참조 프레임(485)를 함께 이용하여 인터 모드의 부호화 단위에 대해 움직임 보상을 수행한다. 예를 들어, 인트라 예측부(450)는 도 2a의 세그먼트 결정부(22) 및 예측 수행부(24)에서 수행되는 동작들과 동일한 동작을 수행할 수 있다.
인트라 예측부(450) 및 움직임 보상부(460)를 거친 공간 영역의 데이터는 디블로킹부(470) 및 오프셋 적용부(480)를 거쳐 후처리되어 복원 프레임(495)으로 출력될 수 있다. 또한, 디블로킹부(470) 및 오프셋 적용부(480)를 거쳐 후처리된 데이터는 참조 프레임(485)으로서 출력될 수 있다.
비디오 복호화 장치(20) 에서 영상 데이터를 복호화하기 위해, 일 실시예에 따른 영상 복호화부(400)의 파싱부(410) 이후의 단계별 작업들이 수행될 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)에 적용되기 위해서는, 영상 복호화부(400)의 구성 요소들인 파싱부(410), 엔트로피 복호화부(420), 역양자화부(430), 역변환부(440), 인트라 예측부(450), 움직임 보상부(460), 디블로킹부(470) 및 오프셋 적용부(480)가 모두, 최대 부호화 단위마다 트리 구조에 따른 부호화 단위들에 기반하여 작업을 수행하여야 한다.
특히, 인트라 예측부(450), 움직임 보상부(460)는 트리 구조에 따른 부호화 단위들 각각마다 예측 단위 및 예측 모드를 결정하며, 역변환부(440)는 부호화 단위마다 변환 단위의 크기를 결정하여야 한다.
이하, 도 5a 내지 도 5c는 다양한 실시예에 따른 현재 블록으로부터 예측 부호화를 위한 예측 단위인 세그먼트를 결정하는 방법을 도시한다.
도 5a는 일 실시예에 따른 현재 블록으로부터 현재 블록을 구성하는 적어도 하나의 세그먼트를 결정하는 방법을 HEVC에서 현재 블록으로부터 예측 블록을 결정하는 방법과 비교 설명하기 위한 도면이다.
일 실시예에 따른 원본 영상은, 직선 등으로 나타나는 물체(object)의 경계(boundary)를 원본 영상의 내에 포함할 수 있고, 도 5a와 같이 물체의 경계를 내부에 포함하는 현재 블록(51)을 포함할 수 있다.
물체의 경계를 내부에 포함하는 현재 블록(51)을 부호화 및 복호화하기 위하여, 예를 들어, HEVC(High Efficiency Video Coding)에서는, 현재 블록(51)을 계층적으로 분할한 소정의 크기의 예측 단위를 이용하여 인트라 예측을 수행함으로써 예측 영상을 생성할 수 있다. 즉, HEVC에서는 현재 블록(51)을 정사각형 또는 직사각형의 예측 단위로 계층적으로 분할하여 현재 블록(51)을 예측하므로, 예측의 정밀도를 높이기 위해서는 물체의 경계 부근에서 현재 블록(51)을 매우 작은 예측 단위로 분할하여 다수의 예측 단위에 대하여 예측을 수행하여야 한다.
이와 같이 작은 예측 단위를 이용하는 경우, 블록의 분할 여부를 나타내는 분할 정보 및 분할된 최소 단위의 블록의 분할 형태를 나타내는 파티션 타입 정보, 블록의 예측 모드와 같은 블록의 분할에 의한 정보들이 추가적으로 필요하게 된다.
예를 들어, 도 5a를 참조하면, HEVC에서는, 물체의 경계를 포함하는 현재 블록(51)에 대하여 예측을 수행하기 위해 현재 블록(51)을 블록(52)과 같이 분할하여 복수 개의 예측 단위들을 결정할 수 있다. 이때, 현재 블록(51)의 분할 여부를 나타내는 분할 정보 및 현재 블록(51)으로부터 분할된 블록들의 분할 여부를 나타내는 분할 정보를 포함하는 각각의 블록의 분할 여부를 나타내는 분할 정보와, 분할된 최소 단위의 블록들을 구성하는 예측 단위의 분할 형태를 나타내는 파티션 타입 정보가 이용될 수 있다. 예를 들어, 인터 예측의 경우, 하나의 블록에 대한 분할 정보 및 파티션 타입 정보는 각각 하나의 빈(bin, 또는 bit)에 해당하는 정보일 수 있다. 이때, 현재 블록(51)이 블록(52)와 같이 분할되기 위해서는 17개의 분할 정보와 40개의 파티션 타입 정보에 따른 57 빈의 다수의 정보가 필요할 수 있다.
반면에, 일 실시예에 따른 현재 블록에 포함된 물체의 경계에 따른 윤곽을 이용하여, 현재 블록으로부터 현재 블록의 예측 단위인 세그먼트를 결정하는 윤곽 기반 인트라 예측 부호화(contour-based intra prediction coding) 방법에 따르면, 현재 블록(51)은 현재 블록(51)에 포함된 물체의 경계에 따라 블록(53)과 같이 분할될 수 있다. 이때, 현재 블록(51)을 블록(53)과 같이 분할하기 위하여 필요한 블록의 분할에 관한 정보는 아홉 개의 빈에 해당하는 정보로서, HEVC에 따른 분할 방법을 이용하는 경우보다 매우 적을 수 있다.
예를 들어, 일 실시예에 따른 현재 블록(51)으로부터 세그먼트를 결정하는 방법에 따르면, 현재 블록(51)은 현재 블록(51)에 포함된 물체의 경계에 대응하는 윤곽(contour)에 따라 블록(53)의 4개의 세그먼트로 분할될 수 있다. 현재 블록(51)은 물체의 경계에 따른 3 개의 직선을 이용하여 분할될 수 있다.
구체적으로, 현재 블록(51)으로부터 결정되는 세그먼트의 개수에 관한 정보, 현재 블록(51)으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽(contour)의 모드 정보 및 윤곽의 좌표들에 관한 정보를 이용하여 현재 블록(51)으로부터 적어도 하나의 세그먼트가 결정될 수 있다.
일 실시예에 따른 현재 블록(51)으로부터 결정되는 세그먼트의 개수에 관한 정보는 현재 블록(51)을 구성하는 세그먼트의 총 개수를 나타내기 위한 정보로서, 예를 들어, 현재 블록(51)으로부터 분할되는 세그먼트의 개수에 관한 정보는 '세그먼트의 수-1'일 수 있다. 현재 블록(51)이 분할되지 않는 경우 세그먼트는 하나가 되므로 현재 블록(51)으로부터 분할되는 세그먼트의 개수에 관한 정보는 0이 될 수 있다.
일 실시예에 따른 현재 블록(51)으로부터 세그먼트를 결정하기 위한 윤곽(contour)의 모드 정보는 현재 블록(51) 내의 물체의 경계에 따른 윤곽의 방향을 나타내는 정보일 수 있다.
일 실시예에 따른 현재 블록(51)으로부터 세그먼트를 결정하기 위한 윤곽의 좌표들에 관한 정보는 윤곽의 위치를 특정하기 위한 정보로서, 예를 들어 윤곽이 직선인 경우, 윤곽의 시작점을 나타내는 제 1 좌표 및 윤곽의 끝점을 나타내는 제 2 좌표를 포함할 수 있다. 이때, 각각의 좌표 정보는 각각의 좌표에 대한 x좌표 및 y좌표로 표현될 수 있다. 좌표 정보들은 부호화 및 복호화되어 송수신될 수도 있으며, 현재 블록(51) 또는 현재 블록(51)의 주변 블록들로부터 유도될 수도 있다.
일 실시예에 따른 현재 블록(51)으로부터 현재 블록(51)을 구성하는 세그먼트를 결정하는 방법에 따르면, 현재 블록(51)은 윤곽에 따라 분할됨으로써 비디오 부호화 장치(10) 및 비디오 복호화 장치(20) 간에 송수신되는 데이터의 양을 줄여 전송 효율을 높일 수 있으며, 부호화 효율도 높일 수 있다. 또한, 현재 블록(51)에 포함된 물체와 경계에 대응되는 윤곽을 이용함으로써, 더욱 정확한 예측이 가능하여 복원 영상의 오차를 줄일 수 있다.
일 실시예에 따른 현재 블록(51)으로부터 윤곽 기반의 예측을 위한 세그먼트를 결정하는 더욱 상세한 방법은 도 6 내지 도 14를 참조하며 후술하도록 한다.
도 5b는 다른 일 실시예에 따른 현재 블록(54)으로부터 현재 블록(54)을 구성하는 적어도 하나의 세그먼트를 결정하는 방법의 일 예시를 나타낸다.
도 5b를 참조하면, 일 실시예에 따른 현재 블록(54)은 현재 블록(54)에 포함된 물체의 경계에 따라 블록(55)과 같이 분할될 수 있다. 현재 블록(54)에 포함된 물체의 경계는 곡선일 수 있으며, 현재 블록(54)은 해당 경계에 대응하는 곡선의 윤곽 또는 꺾인 직선에 따라 블록(55)과 같이 분할될 수 있다. 예를 들어, 경계에 대응되는 윤곽은 하나의 곡선이 될 수 있고, 현재 블록(54)를 구성하는 두 개의 세그먼트가 결정될 수 있다.
일 실시예에 따른 현재 블록(54)은 현재 블록(54)의 윤곽의 좌표들에 관한 정보를 이용하여 적어도 하나의 세그먼트로 분할될 수 있다. 일 실시예에 따른 윤곽의 좌표들에 관한 정보는 윤곽의 위치를 특정하기 위한 정보로서, 예를 들어, 윤곽을 특정하기 위하여 필요한 점의 개수에 관한 정보 및 각각의 점의 현재 블록(54) 내에서의 위치를 나타내는 좌표 정보를 포함할 수 있다.
예를 들어, 도 5b를 참조하면, 현재 블록(54)은 세 점에 따라 특정되는 윤곽에 의하여 블록(55)과 같이 분할될 수 있다. 이때, 세 점에 따라 특정되는 윤곽은 꺾인 직선 또는 곡선이 될 수 있다.
이때, 점들을 이용하여 윤곽을 특정하기 위하여 다양한 알고리즘이 이용될 수 있다. 예를 들어, piece wise linear curve, conic section 또는 Bezier curve 등이 이용될 수 있다.
일 실시예에 따른 윤곽을 특정하기 위하여 필요한 점의 개수에 관한 정보(num_point_minus2)는 '점의 개수-2'일 수 있으며, 블록(55)의 경우 필요한 점의 개수에 관한 정보는 1이 될 수 있다. 또한, 세 점의 좌표 정보는 윤곽의 시작점을 나타내는 제 1 좌표(seg_start), 윤곽의 꺽이는 점을 나타내는 제 2 좌표(seg_middle) 및 윤곽의 끝점을 나타내는 제 3 좌표(seg_end)를 포함할 수 있다. 이때, 좌표 정보들은 부호화 및 복호화되어 송수신될 수도 있으며, 현재 블록(54) 또는 현재 블록(54)의 주변 블록들로부터 유도될 수도 있다.
일 실시예에 따른 현재 블록(54)은 윤곽에 따라 분할됨으로써 비디오 부호화 장치(10) 및 비디오 복호화 장치(20) 간에 송수신되는 데이터의 양을 줄여 전송 효율을 높일 수 있으며, 부호화 효율도 높일 수 있다. 또한, 현재 블록(54)에 포함된 물체와 경계에 대응되는 곡선 등의 윤곽을 이용함으로써, 더욱 정확한 예측이 가능하여 복원 영상의 오차를 줄일 수 있다.
도 5c는 또 다른 일 실시예에 따른 현재 블록(56)을 구성하는 적어도 하나의 세그먼트를 결정하는 방법의 일 예시를 나타낸다.
도 5c를 참조하면, 일 실시예에 따른 현재 블록(56)은 현재 블록(56)에 포함된 물체의 경계에 따라 블록(57)으로 분할될 수 있다. 현재 블록(56)에 포함된 물체의 경계는 하나의 닫힌 도형을 이룰 수 있으며, 현재 블록(56)은 해당 경계에 대응하는 도형의 윤곽에 따라 블록(57)으로 분할될 수 있다. 예를 들어, 현재 블록(56)로부터 세그먼트를 결정하기 위한 윤곽은 하나의 닫힌 도형이 될 수 있고, 현재 블록(56)으로부터 결정되는 세그먼트는 각각 닫힌 도형의 외부와 내부의 두 개의 세그먼트 일 수 있다.
일 실시예에 따른 현재 블록(56)은 현재 블록(56)으로부터 세그먼트를 결정하기 위한 윤곽의 좌표들에 관한 정보를 이용하여 적어도 하나의 세그먼트로 분할될 수 있다. 일 실시예에 따른 현재 블록(56)으로부터 세그먼트를 결정하기 위한 윤곽의 좌표들에 관한 정보는 윤곽의 위치를 특정하기 위한 정보로서, 예를 들어, 윤곽을 특정하기 위하여 필요한 점의 개수에 관한 정보 및 각각의 점의 현재 블록(56) 내에서의 위치를 나타내는 좌표 정보를 포함할 수 있다.
예를 들어, 도 5c를 참조하면, 현재 블록(56)은 네 점에 따라 특정되는 윤곽에 의하여 블록(57)과 같이 분할될 수 있다. 이때, 네 점에 따라 특정되는 윤곽은 사각형의 닫힌 도형이 될 수 있다.
일 실시예에 따른 윤곽을 특정하기 위하여 필요한 점의 개수에 관한 정보(num_point_minus2)는 '점의 개수-2'일 수 있으며, 블록(57)의 경우 필요한 점의 개수에 관한 정보는 2가 될 수 있다. 또한, 네 점의 좌표 정보는 닫힌 도형의 제 1 좌표(seg_start), 제 2 좌표(seg_middle), 제 3 좌표(seg_middle) 및 제 4 좌표(seg_end)를 포함할 수 있다. 이때, 좌표 정보들은 부호화 및 복호화되어 송수신될 수도 있으며, 현재 블록(56) 또는 현재 블록(56)의 주변 블록들로부터 유도될 수도 있다.
일 실시예에 따른 현재 블록(56)은 윤곽에 따라 분할됨으로써 비디오 부호화 장치(10) 및 비디오 복호화 장치(20) 간에 송수신되는 데이터의 양을 줄여 전송 효율을 높일 수 있으며, 부호화 효율도 높일 수 있다. 또한, 현재 블록(56)에 포함된 물체와 경계에 대응되는 닫힌 도형 등의 윤곽을 이용함으로써, 복원 영상의 오차를 줄일 수 있다.
도 6은 다양한 실시예에 따라 물체의 경계에 따른 윤곽을 이용하여 현재 블록으로부터 예측 부호화를 위한 세그먼트를 결정하는 방법을 나타낸다.
도 6을 참조하면, 다양한 실시예에 따른 현재 블록으로부터 예측 부호화를 위한 세그먼트를 결정하는 방법에서, 단일 직선, 복수 개의 직선, 꺽인 직선, 단일 곡선, 복수 개의 곡선, 또는 닫힌 도형 등이 이용될 수 있다.
또한, 단일 직선과 단일 곡선을 동시에 이용하는 등, 위의 방법들의 조합을 이용하여 현재 블록으로부터 예측 부호화를 위한 세그먼트가 결정될 수 있다.
이하에서는 단일 직선의 윤곽을 이용하여 현재 블록으로부터 예측 부호화를 위한 적어도 하나의 세그먼트를 결정하는 방법의 구체적인 과정을 후술하도록 한다.
도 7a 및 도 7b는 다양한 실시예에 따른 현재 블록(70)으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드를 설명하기 위한 도면이다.
일 실시예에 따른 현재 블록(70)에서, 현재 블록(70) 내의 단일 직선 윤곽이 결정될 수 있고, 결정된 단일 직선 윤곽에 따라 현재 블록(70)을 구성하는 두 개의 세그먼트가 결정될 수 있다.
이때, 일 실시예에 따른 현재 블록(70)으로부터 분할되는 세그먼트들을 결정하기 위한 윤곽의 모드는, 현재 블록(70)에 포함된 물체의 경계에 따라 결정될 수 있으며, 윤곽의 방향을 나타낼 수 있다.
도 7a를 참조하면, 일 실시예에 따른 현재 블록(70)으로부터 세그먼트들을 결정하기 위하여 이용되는 윤곽이 직선인 경우, 현재 블록(70)의 네 변(side)들 중 윤곽이 지나는 변을 특정함으로써 윤곽의 방향이 특정될 수 있다. 예를 들어, 윤곽의 모드 정보는 현재 블록(70)의 상변, 우변, 하변 및 좌변 중 윤곽이 닿는 적어도 두 변을 나타내는 정보일 수 있다.
일 실시예에 따른 현재 블록(70)의 네 변들에 각각 번호를 할당하고, 변들에 할당된 번호의 조합으로서 가능한 윤곽의 방향을 모두 나타낼 수 있다.
예를 들어, 도 7a를 참조하면, 현재 블록(70)의 상변, 우변, 하변 및 좌변에 각각 0, 1, 2 및 3이 할당될 수 있다. 현재 블록(70)의 각 변에 시계방향에 따라 오름차순 또는 내림차순으로 번호가 할당될 수 있다. 예를 들어, 현재 블록(70)의 우변과 좌변을 지나는 직선 윤곽을 이용하여 현재 블록(70)이 두 개의 세그먼트로 분할되는 경우, 윤곽의 모드 정보는 우변을 나타내는 1과 좌변을 나타내는 3에 따른 '1-3 방향'을 나타낼 수 있다.
도 7a와 같이 현재 블록(70)의 네 변에 번호가 할당된 경우, 현재 블록(70)을 분할하는 직선 윤곽의 방향은 0-1 방향, 0-2 방향, 0-3 방향, 1-2 방향, 1-3 방향 및 2-3 방향이 있을 수 있다. 이때, 1-0 방향은 0-1 방향과 같은 방향으로 생략될 수 있다. 따라서, 윤곽의 모드 정보는 현재 블록(70)에서 이용될 수 있는 직선 윤곽의 6개의 방향 중 하나의 방향을 나타내는 정보일 수 있다.
도 7b를 참조하면, 현재 블록(70)을 구성하는 네 변뿐만 아니라 현재 블록(70)의 주변 블록들을 구성하는 변들까지 이용하여 현재 블록(70)의 윤곽의 방향을 특정할 수 있다.
예를 들어, 도 7b를 참조하면, 현재 블록(70)의 상변, 우변, 하변 및 좌변에 각각 0, 1, 2 및 3이 할당되고, 현재 블록(70)의 우측 블록의 상변, 현재 블록(70)의 좌측 블록의 상변, 현재 블록(70)의 좌하측 블록의 우변 및 현재 블록의 상측 블록의 좌변에 각각 4, 5, 6 및 7이 할당될 수 있다.
현재 블록(70)을 구성하는 네 변뿐만 아니라 현재 블록(70)의 주변 블록들을 구성하는 변들까지 이용함으로써, 현재 블록(70)의 윤곽의 방향이 더 다양해 질 수 있다. 이때, 윤곽의 방향을 나타내는 윤곽의 모드 정보는 6개를 초과하는 방향 중 하나의 방향을 나타낼 수 있다.
도 7a 및 도 7b의 방법 이 외에도 윤곽의 방향을 결정하기 위하여 현재 블록(70)을 구성하는 변들 또는 현재 블록(70)의 주변 변들에 다양한 방식으로 번호를 할당하여 윤곽의 방향을 특정할 수 있다.
도 8은 도 7a의 현재 블록(70)으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드의 예시들을 나타낸다.
도 7a의 일 실시예에 따른 현재 블록(70)을 단일 직선의 윤곽에 기초하여 분할하는 경우, 현재 블록(70)은 윤곽의 방향에 따라 도 8의 블록(80), 블록(81), 블록(82), 블록(83), 블록(84) 및 블록(85) 중 하나의 형태로 분할될 수 있다.
즉, 도 7a와 같이 현재 블록(70)의 네 변에 번호가 할당된 경우, 현재 블록(70)을 분할하는 윤곽의 방향을 나타내는 윤곽의 모드는 제 1 모드(0-1 방향), 제 2 모드(0-2 방향), 제 3 모드(0-3 방향), 제 4 모드(1-2 방향), 제 5 모드(1-3 방향) 및 제 6 모드(2-3 방향) 중 하나일 수 있다. 도 8에서, 블록(80), 블록(81), 블록(82), 블록(83), 블록(84) 및 블록(85)은 각각 윤곽의 모드가 제 1 모드, 제 2 모드, 제 3 모드, 제 4 모드, 제 5 모드 및 제 6 모드인 경우를 나타낼 수 있다.
예를 들어, 블록(80)을 참조하면, 블록(80)을 분할하는 윤곽의 한쪽 끝인 시작점이 블록(80)의 상변에 위치하고, 나머지 한쪽 끝인 끝점이 블록(80)의 우변에 위치하는 경우의 윤곽의 모드는 제 1 모드일 수 있다. 이때, 윤곽의 시작점이 블록(80)의 상변의 어느 위치에 위치하는지와 끝점이 블록(80)의 우변의 어느 위치에 위치하는지에 상관 없이 윤곽의 모드는 제 1 모드이다.
또한, 블록(81)을 참조하면, 블록(81)을 분할하는 윤곽의 시작점이 블록(81)의 상변에 위치하고, 끝점이 블록(81)의 하측에 위치하는 경우의 윤곽의 모드는 제 2 모드일 수 있다. 또한, 블록(82)을 참조하면, 블록(82)을 분할하는 윤곽의 시작점 블록(82)의 상변에 위치하고, 끝점 블록(82)의 좌변에 위치하는 경우의 윤곽의 모드는 제 3 모드일 수 있다.
또한, 블록(83)을 참조하면, 블록(83)을 분할하는 윤곽의 시작점 블록(83)의 우변에 위치하고, 끝점이 블록(83)의 하변에 위치하는 경우의 윤곽의 모드는 제 4 모드일 수 있다. 또한, 블록(84)을 참조하면, 블록(84)을 분할하는 윤곽의 시작점이 블록(84)의 우변에 위치하고, 끝점이 블록(84)의 좌변에 위치하는 경우의 윤곽의 모드는 제 5 모드일 수 있다. 또한, 블록(85)을 참조하면, 블록(85)을 분할하는 윤곽의 시작점이 블록(85)의 하변에 위치하고, 끝점이 블록(85)의 좌변에 위치하는 경우의 윤곽의 모드는 제 6 모드일 수 있다.
일 실시예에 따른 현재 블록(70)으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드는 제 1 모드 내지 제 6 모드 중 하나의 모드로 결정될 수 있다. 예를 들어, 비디오 부호화 장치(10)는 RDO(rate-distortion optimization) 방법을 이용해, 제 1 모드 내지 제 6 모드에 따른 현재 블록(70)의 부복호화를 모두 수행하여 최선의 RD cost를 갖는 모드를 선택할 수 있다.
또는, 복잡도를 줄이기 위하여 비디오 부호화 장치(10)는 현재 블록(70)의 각 변에 대한 코스트(cost)를 계산하고, 계산된 각 변에 대한 코스트에 기초하여 현재 블록(70)의 윤곽의 모드를 결정할 수 있다. 현재 블록(70)의 각 변에 대한 코스트는 각 변에 대응하는 샘플들을 이용하여 계산할 수 있다. 예를 들어, 현재 블록(70)의 상변에 대한 코스트는 현재 블록(70) 내에 위치하고 상변에 접하는 샘플들을 이용하여 계산할 수 있다. 이와 마찬가지로, 현재 블록(70)의 우변, 하변 및 좌변에 대한 코스트는 각각 현재 블록(70) 내의 우변 인접 샘플들, 하변 인접 샘플들 및 좌변 인접 샘플들을 이용하여 계산할 수 있다.
예를 들어, 일 실시예에 따른 각 변에 대한 코스트는 각 변의 샘플들의 분산(variance)일 수 있다. 비디오 부호화 장치(10)는 현재 블록(70)의 각 변들 중 변에 대응하는 샘플들의 분산이 가장 큰 두 변을 선택하여, 선택된 두 변을 나타내는 윤곽의 모드를 결정할 수 있다.
이때, 현재 블록(70)의 각 변에 대한 분산은 루마(luma) 블록에 대하여만 구할수도 있고, 루마 블록과 크로마(chroma) 블록을 모두 이용하여 구할 수도 있다. 또는, 루마 블록에 대한 분산과 크로마 블록에 대한 분산에 각각 다른 가중치(weight)를 두어 루마 블록과 크로마 블록을 모두 이용한 분산을 구할 수도 있다.
또는, 다른 일 실시예에 따른 현재 블록(70)의 각 변에 대한 코스트는 각 변의 샘플들에 대하여 인접 샘플들간의 차이값의 총 합일 수 있다. 또한, 또 다른 일 실시예에 따른 각 변에 대한 코스트는 각 변의 샘플들에 대하여 1차원 소벨 오퍼레이터(1D Sobel operator)를 적용한 결과 값들의 절대값의 총 합일 수 있다.
또는, 일 실시예에 따른 현재 블록(70)의 각 변에 대한 코스트는 현재 블록(70)의 각 변에 대한 사용 가능 여부(availability)를 고려하여 계산될 수 있다. 예를 들어, 현재 블록(70)의 각 변에 대한 사용 가능 여부는 현재 블록(70)의 각 변의 외부에 인접하는 주변 블록의 사용 가능 여부를 나타낼 수 있다.
일 실시예에 따른 비디오 부호화 장치(10)는 각 변에 대한 사용 가능 여부를 고려하여, 사용 가능하지 않은 변을 포함하는 모드를 제외한 모드들 중에서 윤곽의 모드를 결정할 수 있다. 예를 들어, 현재 블록(70)이 영상의 가장자리에 위치하는 블록인 경우, 현재 블록(70)의 변들 중 일부의 변들은 사용 가능하지 않을 수 있다.
또는, 일 실시예에 따른 현재 블록(70)으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드는 상술한 방법들을 조합하여 결정될 수도 있다. 예를 들어, 현재 블록(70)의 각 변에 대한 코스트를 이용하여 6 개의 모드들 중 일부의 모드들을 선택하고, 선택된 일부의 모드들에 대하여 현재 블록(70)의 부복호화를 수행하여 최선의 RD cost를 갖는 하나의 모드를 최종의 윤곽의 모드로 결정할 수 있다.
도 9는 도 8의 윤곽의 모드를 나타내는 윤곽의 모드 정보의 예시들을 나타낸다.
도 8을 참조하여 상술한 바와 같이, 단일 직선의 윤곽에 기초하여 현재 블록을 분할하는 경우, 윤곽의 방향을 나타내는 윤곽의 모드는 6개의 모드를 포함할 수 있다. 이때, 윤곽의 모드를 나타내는 윤곽의 모드 정보는 FLC(fixed length coding), VLC(variable length coding), 산술 부호화(arithmetic coding) 등의 다양한 부호화 방식을 이용하여 부보화 및 복호화될 수 있다.
예를 들어, 도 9를 참조하면, VLC 방식을 이용하는 경우 제 2 모드 및 제 5 모드를 나타내는 정보는 2 비트로 이진화되여 나타나고 제 1 모드, 제 3 모드, 제 4 모드 및 제 6 모드를 나타내는 정보는 3비트로 이진화될 수 있다.
도 9를 참조하면, 윤곽의 모드가 제 1 모드인 경우(line_orient 0), 윤곽의 모드 정보는 이진수 100으로 표현될 수 있다. 또한, 윤곽의 모드가 제 2 모드인 경우(line_orient 1), 윤곽의 모드 정보는 이진수 00으로 표현될 수 있다. 윤곽의 모드가 제 3 모드인 경우(line_orient 2), 윤곽의 모드 정보는 이진수 101으로 표현될 수 있다. 윤곽의 모드가 제 4 모드인 경우(line_orient 3), 윤곽의 모드 정보는 이진수 110으로 표현될 수 있다. 윤곽의 모드가 제 5 모드인 경우(line_orient 4), 윤곽의 모드 정보는 이진수 01으로 표현될 수 있다. 윤곽의 모드가 제 6 모드인 경우(line_orient 5), 윤곽의 모드 정보는 이진수 111으로 표현될 수 있다.
다만, 이에 제한되지 않고 윤곽의 모드 정보는 다양한 방식으로 표현될 수 있다.
비디오 부호화장치에서 이진화된 윤곽의 모드 정보는 산술 부호화를 거쳐 비트스트림에 포함될 수 있고, 비디오 복호화 장치(20)로 전송될 수 있다. 비디오 복호화 장치(20)는 수신된 비트스트림에 대하여 산술 복호화 및 역이진화를 수행하여 현재 블록의 윤곽의 모드 정보를 획득할 수 있다.
이하 도 10 내지 도 16b을 참조하여 다양한 실시예에 따른 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 좌표를 결정하는 방법을 후술하도록 한다.
도 10은 일 실시예에 따른 현재 블록을 나타낸다.
도 10을 참조하면, 현재 블록은 8x8 크기의 블록일 수 있다. 현재 블록의 크기는 너비x높이로 표현되며, 이외에도 64x64, 32x32, 16x16 등의 크기를 포함할 수 있다. 또한, 이외에도 MxN 등의 다양한 크기를 포함할 수 있다. 이때, M 및 N은 서로 다른 정수일 수 있다.
도 10에서, 현재 블록 내의 샘플들은 흰색으로 나타나고, 현재 블록의 주변 샘플들은 회색으로 나타날 수 있다.
일 실시예에 따른 현재 블록의 윤곽의 좌표는, 현재 블록 내의 샘플들을 이용하여 결정될 수 있다. 구체적으로, 윤곽이 단일 직선 윤곽인 경우 윤곽의 모드에 따라 윤곽의 모드가 가리키는 변들에 윤곽의 양쪽 끝(시작점 및 끝점)이 위치하는 것이므로, 윤곽의 좌표는 윤곽의 모드가 가리키는 변에 해당하는 현재 블록 내의 샘플들을 이용하여 결정될 수 있다. 예를 들어, 윤곽의 좌표는 현재 블록 내의 샘플들 간에 샘플값의 변화량(gradient)에 기초하여 결정될 수 있다.
구체적으로, 윤곽의 모드가 현재 블록의 상변과 우변을 가리키는 제 1 모드인 경우, 윤곽의 제 1 좌표는 현재 블록의 상변에 대응하는 현재 블록 내의 샘플들을 이용하여 결정될 수 있고, 윤곽의 제 2 좌표는 현재 블록의 우변에 대응하는 현재 블록 내의 샘플들을 이용하여 결정될 수 있다. 즉, 윤곽의 제 1 좌표는 상변에 안쪽으로 인접하는 샘플들 중 하나의 샘플의 위치가 될 수고, 윤곽의 제 2 좌표는 우변에 안쪽으로 인접하는 샘플들 중 하나의 샘플의 위치가 될 수 있다. 이때, 샘플의 위치는 정수 픽셀 단위일 수도 있고, 서브 픽셀 단위일 수도 있다.
즉, 일 실시예에 따른 윤곽의 모드가 가리키는 변에 대응되는 현재 블록 내의 샘플들은 현재 블록의 각 변에 안쪽으로 인접하는 샘플들일 수 있다. 예를 들어, 현재 블록의 상변에 해당하는 샘플들은 현재 블록 내의 최상단에 위치하는 샘플들일 수 있다. 또한, 현재 블록의 우변, 하변 및 좌변에 해당하는 샘플들은 각각 현재 블록 내의 최우측 샘플들, 최하단 샘플들 및 최좌측 샘플들일 수 있다. 도 10을 참조하면, 현재 블록 내의 최상단 샘플들, 최우측 샘플들, 최하단 샘플들 및 최좌측 샘플들은 각각 8개의 흰색 샘플들일 수 있다.
또한, 일 실시예에 따른 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 좌표는, 현재 블록의 주변 블록으로부터 유도될 수 있다. 구체적으로, 윤곽의 좌표는 윤곽의 모드가 가리키는 변의 외부에 인접하는 주변 블록들을 이용하여 결정될 수 있다. 예를 들어, 윤곽의 좌표는 현재 블록의 주변 블록 내의 샘플들 간의 샘플값의 변화량(gradient)에 기초하여 결정될 수 있다. 이때, 주변 블록 내의 샘플들은 복원된 샘플일 수 있다.
예를 들어, 윤곽의 모드가 현재 블록의 상변과 좌변을 가리키는 제 3 모드인 경우, 윤곽의 제 1 좌표는 현재 블록의 상측 외부에 인접하는 주변 블록의 샘플들을 이용하여 유도될 수 있다. 윤곽의 제 1 좌표는 현재 블록의 상측 주변 블록의 최하단 샘플들을 이용하여 결정될 수 있다. 또한, 윤곽의 제 2 좌표는 현재 블록의 좌측 외부에 인접하는 주변 블록의 샘플들을 이용하여 유도될 수 있다. 윤곽의 제 2 좌표는 현재 블록의 좌측 주변 블록의 최우단 샘플들을 이용하여 결정될 수 있다.
도 10에서, 일 실시예에 따른 윤곽의 모드가 가리키는 변에 인접하는 주변 블록 내의 샘플들은 현재 블록에 상측 또는 좌측으로 인접하는 샘플들로서, 상측에 인접하는 8개의 샘플들(음영 표시) 및 좌측에 인접하는 8개의 회색 샘플들(음영 표시됨)을 포함할 수 있다.
현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 좌표를 현재 블록의 주변 블록으로부터 유도하는 경우, 유도된 윤곽의 좌표를 조정(refine)하여 조정된 윤곽의 좌표를 이용하여 현재 블록을 부호화 및 복호화 할 수도 있다.
일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록의 윤곽의 좌표를 부호화하여 비디오 복호화 장치(20)로 전송할 수 있다. 또는, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도가 가능한 경우, 윤곽의 좌표를 전송하지 않을 수도 있다.
현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 좌표를 현재 블록의 주변 블록으로부터 유도하는 경우, 비디오 부호화 장치(10)는 주변 블록으로부터 유도된 윤곽의 좌표의 값과 현재 블록 내의 샘플들을 이용하여 결정된 윤곽의 좌표의 값의 차분값을 부호화하여 비디오 복호화 장치(20)로 전송할 수도 있다. 비디오 복호화 장치(20)는 수신된 차분값과 현재 블록의 주변 블록으로부터 유도되는 윤곽의 좌표의 값에 기초하여 현재 블록의 윤곽의 좌표를 결정할 수 있다.
도 11은 일 실시예에 따른 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 좌표를 결정하는 방법을 나타낸다.
도 11을 참조하면, 현재 블록 내의 샘플들 및 현재 블록의 주변 샘플들이 나타난다.
현재 블록으로부터 적어로 하나의 세그먼트를 결정하기 위한 윤곽의 좌표를 결정하는 경우, 현재 블록의 윤곽의 좌표는 도 10에서 상술한것과 같이 현재 블록 내의 샘플들 또는 현재 블록에 인접한 주변 샘플들을 이용하여 결정될 수 있다. 구체적으로, 현재 블록 내의 샘플들 또는 현재 블록에 인접한 주변 샘플들을 샘플들 간에 샘플값의 변화량(gradient)이 가장 큰 샘플의 위치가 윤곽의 좌표의 위치로 결정될 수 있다.
예를 들어, 현재 블록 내의 샘플들 또는 현재 블록에 인접한 주변 샘플들에 [-1, 0, 1]과 같은 필터값을 갖는 1차원 소벨 오퍼레이터(1D Sobel operator)를 적용하여 윤곽을 좌표를 결정할 수 있다. 구체적으로, 윤곽의 좌표는 1차원 소벨 오퍼레이터를 적용한 결과인 절대값이 가장 큰 샘플의 위치를 윤곽의 좌표로 결정할 수 있다. 예를 들어, 윤곽의 제 1 좌표 및 제 2 좌표는 아래의 수식에 기초하여 결정될 수 있다.
line_pos1_n = arg maxn(|Sn -1 - Sn +1|)
line_pos2_m = arg maxn(|Sm -1 - Sm +1|)
이때, Sn, Sn -1 및 Sn +1은 각각 n위치의 샘플의 샘플값, n-1 위치의 샘플의 샘플값 및 n+1 위치의 샘플의 샘플값이고, Sm, Sm -1 및 Sm +1은 각각 m위치의 샘플의 샘플값, m-1 위치의 샘플의 샘플값 및 m+1 위치의 샘플의 샘플값이다. n은 샘플의 x좌표이고, m은 샘플의 y좌표가 될 수 있다. line_pos1_n은 윤곽의 제 1 좌표의 좌표이고, line_pos2_m은 윤곽의 제 2 좌표의 y좌표일 수 있다. 예를 들어, 윤곽의 모드에 따른 윤곽의 제 1 좌표가 현재 블록의 상측에 위치하는 경우, n은 현재 블록의 최상단 샘플들 또는 현재 블록에 인접한 상단 샘플들의 x좌표가 되고, 윤곽의 제 1 좌표는 (line_pos1_n, 0)이 될 수 있다.
또한, 윤곽의 모드에 따른 윤곽의 제 1 좌표가 현재 블록의 우측에 위치하는 경우, n은 현재 블록의 최우측 샘플들의 y좌표가 되고, 윤곽의 제 1 좌표는 (nCbS-1, line_pos1_n)이 될 수 있다. nCbS는 현재 블록의 수평방향 또는 수직방향의 크기일 수 있다.
또한, 윤곽의 모드에 따른 윤곽의 제 2 좌표가 현재 블록의 하측에 위치하는 경우, m은 현재 블록의 최하단 샘플들의 x좌표가 되고, 윤곽의 제 2 좌표는 (line_pos2_m, nCbS-1)이 될 수 있다. 또한, 윤곽의 모드에 따른 윤곽의 제 2 좌표가 현재 블록의 좌측에 위치하는 경우, m은 현재 블록의 최좌측 샘플들 또는 현재 블록에 인접한 좌측 샘플들의 y좌표가 되고, 윤곽의 제 2 좌표는 (0, line_pos2_m)이 될 수 있다.
이때, 윤곽의 제 1 좌표 및 제 2 좌표의 값은 정수 픽셀 단위로 결정될 수도 있고 서브 픽셀 단위로 결정될 수도 있다.
예를 들어, 도 11을 참조하면, 현재 블록의 윤곽의 모드가 제 3 모드인 경우, 윤곽의 제 1 좌표는 현재 블록의 상변의 외부에 인접한 샘플들 또는 상변의 내부에 인접한 샘플들을 이용하여 (line_pos1_n, 0)로 결정될 수 있고, 윤곽의 제 2 좌표는 현재 블록의 좌변의 외부에 인접한 샘플들 또는 좌변의 내부에 인접한 샘플들을 이용하여 (0, line_pos2_m)로 결정될 수 있다.
또한, 다른 일 실시예에 따른 현재 블록의 윤곽의 좌표는, 윤곽의 제 1 좌표를 먼저 결정하고, 결정된 제 1 좌표를 이용하여 윤곽의 제 2 좌표를 결정함으로써 결정될 수 있다. 구체적으로, 먼저, 윤곽의 모드가 가리키는 현재 블록의 일 변에 대하여 앞서 서술한 방법을 이용하여 제 1 좌표를 결정할 수 있다. 예를 들어, 윤곽의 제 1 좌표는 아래의 수식에 기초하여 결정될 수 있다.
line_pos1_n = arg maxn(|Sn -1 - Sn +1|)
또한, 윤곽의 제 2 좌표는, 윤곽의 모드가 가리키는 현재 블록의 다른 일 변에 해당하는 샘플들과, 결정된 제 1 좌표의 주변 샘플들을 이용하여 결정될 수 있다. 윤곽의 제 2 좌표는 제 1 좌표의 주변 샘플들과 제 2 좌표의 주변 샘플들 간의 상관 관계(correlation)을 이용하여 결정될 수 있다. 예를 들어, 윤곽의 제 2 좌표는 아래의 수식에 기초하여 결정될 수 있다.
line_pos2_m = arg maxm(4*|Sm -1 - Sm +1|-|Sn -1 - Sm +1|-|Sn -1 - Sm +1|)
이때, 윤곽의 제 2 좌표(0, line_pos2_m)를 구할 때, 미리 결정된 윤곽의 제 1 좌표의 주변 샘플의 샘플값인 Sn -1 및 Sn +1을 이용할 수 있다.
이 외에도 경계 검출을 위하여 사용되는 다양한 방식의 오퍼레이터들을 이용하여 현재 블록의 윤곽의 좌표가 결정될 수 있다.
또한, 현재 블록 내의 샘플들 또는 현재 블록에 인접한 주변 샘플들을 이용하여 현재 블록의 윤곽의 좌표를 결정하는 경우, 현재 블록 내의 샘플들 또는 현재 블록에 인접한 주변 샘플들의 샘플값을 그대로 이용할 수도 있고, 노이즈 제거 등을 위하여 샘플값에 필터를 적용하여 필터링된 샘플값을 이용할 수도 있다. 예를 들어, 샘플값에 적용하는 필터는 저역통과필터(low-pass filter) 또는 [1, 2, 1]과 같은 필터값을 갖는 1차원 가우시안 필터(Gaussian filter)일 수 있다.
또한, 다른 일 실시예에 따르면, 윤곽의 제 1 좌표 또는 제 2 좌표는 복수 개의 후보 좌표들 중 하나로 결정될 수 있다. 예를 들어, 현재 블록 내의 샘플들 또는 현재 블록에 인접한 주변 샘플들을 이용하여 최적의 cost를 갖는 N 개의 후보 좌표가 결정될 수 있다. 예를 들어, 후보 좌표들의 cost는 앞서 설명된 수식들에 따라 계산될 수 있다. 결정된 N 개의 후보 좌표 중 하나가 윤곽의 제 1 좌표 또는 제 2 좌표로 결정될 수 있다. 예를 들어, 비디오 부호화 장치(10) 및 비디오 복호화 장치(20) 간에 후보 좌표들 중 하나의 후보를 가리키는 인덱스 정보가 송수신될 수 있다.
도 12 내지 도 14은 다양한 실시예에 따른 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 좌표를 결정하는 방법을 나타낸다.
도 12 내지 도 14에서 현재 블록은 8x8 크기의 블록일 수 있다. 현재 블록의 크기는 너비x높이로 표현되며, 이외에도 64x64, 32x32, 16x16 등의 크기를 포함할 수 있다. 또한 이외에도 MxN 등의 다양한 크기를 포함할 수 있다. 이때, M 및 N은 서로 다른 크기의 정수일 수 있다.
도 12를 참조하면, 현재 블록은 현재 블록 내의 샘플들을 이용하여 세그먼트를 결정하기 위한 윤곽의 좌표를 결정할 수 있다. 예를 들어, 윤곽의 좌표는 현재 블록의 변에 인접하고 내부에 위치하는 샘플들의 샘플값을 이용하여 결정될 수 있다.
예를 들어, 도 12에서, 윤곽의 모드가 제 1 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 상변에 인접하는의 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 우변에 인접하는 8개의 샘플들을 이용하여 결정될 수 있다. 이때, 현재 블록의 우측 상단의 샘플은 겹치는 샘플로, 제 1 좌표의 결정과 제 2 좌표의 결정에 모두 이용될 수 있다.
또한, 윤곽의 모드가 제 2 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 상변에 인접하는 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 하변에 인접하는 8개의 샘플들을 이용하여 결정될 수 있다.
또한, 윤곽의 모드가 제 3 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 상변에 인접하는 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 좌변에 인접하는 8개의 샘플들을 이용하여 결정될 수 있다. 이때, 현재 블록의 좌측 상단의 샘플은 겹치는 샘플로 제 1 좌표의 결정과 제 2 좌표의 결정에 모두 이용될 수 있다.
또한, 윤곽의 모드가 제 4 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 우변에 인접하는 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 하변에 인접하는 8개의 샘플들을 이용하여 결정될 수 있다. 현재 블록의 우측 하단의 샘플은 겹치는 샘플로 제 1 좌표의 결정과 제 2 좌표의 결정에 모두 이용될 수 있다.
또한, 윤곽의 모드가 제 5 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 우변에 인접하는 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 좌변에 인접하는 8개의 샘플들을 이용하여 결정될 수 있다.
또한, 윤곽의 모드가 제 6 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 하변에 인접하는 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 좌변에 인접하는 8개의 샘플들을 이용하여 결정될 수 있다. 현재 블록의 좌측 하단의 샘플은 겹치는 샘플로 제 1 좌표의 결정과 제 2 좌표의 결정에 모두 이용될 수 있다.
도 13를 참조하면, 현재 블록은 현재 블록 내의 샘플들뿐만 아니라 현재 블록의 주변 샘플들을 이용하여, 세그먼트를 결정하기 위한 윤곽의 좌표를 결정할 수 있다. 현재 블록의 외부에 인접하는 주변 샘플들이 사용 가능한 경우, 윤곽의 좌표는 현재 블록에 외부에 인접하는 주변 샘플들의 샘플값을 이용하여 결정될 수 있다. 예를 들어, 도 13에서, 현재 블록의 외부에 인접하는 사용 가능한 주변 샘플들은, 현재 블록의 상변에 인접하는 8개의 샘플들 또는 현재 블록의 좌변에 인접하는 8개의 샘플들을 포함할 수 있다.
예를 들어, 도 13에서, 윤곽의 모드가 제 1 모드인 경우, 윤곽의 제 1 좌표는 현재 블록의 상변의 외부에 인접하는 8개의 주변 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 우변에 인접하는 8개의 샘플들을 이용하여 결정될 수 있다.
또한, 윤곽의 모드가 제 2 모드인 경우, 윤곽의 제 1 좌표는 현재 블록의 상변의 외부에 인접하는 8개의 주변 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 하변에 인접하는 8개의 샘플들을 이용하여 결정될 수 있다.
또한, 윤곽의 모드가 제 3 모드인 경우, 윤곽의 제 1 좌표는 현재 블록의 상변의 외부에 인접하는 8개의 주변 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록의 좌측의 외부에 인접하는 8개의 주변 샘플들을 이용하여 결정될 수 있다.
또한, 윤곽의 모드가 제 4 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 우변에 인접하는 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 하변에 인접하는 8개의 샘플들을 이용하여 결정될 수 있다. 현재 블록의 우측 하단의 샘플은 겹치는 샘플로 제 1 좌표의 결정과 제 2 좌표의 결정에 모두 이용될 수 있다.
또한, 윤곽의 모드가 제 5 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 우변에 인접하는 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록의 좌변의 외부에 인접하는 8개의 주변 샘플들을 이용하여 결정될 수 있다.
또한, 윤곽의 모드가 제 6 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 하변에 인접하는 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록의 좌변의 내부에 인접하는 8개의 샘플들을 이용하여 결정될 수 있다.
또는, 현재 블록의 우변의 외부에 인접한 주변 샘플들 또는 하변의 외부에 인접한 주변 샘플들이 사용 가능할 경우, 우변의 외부에 인접한 주변 샘플들 또는 하변의 외부에 인접한 주변 샘플들을 이용하여 윤곽의 좌표를 결정할 수도 있다.
일 실시예에 따른 윤곽의 좌표가 현재 블록의 주변 샘플을 이용하여 유도 가능한 경우, 비디오 부호화 장치(10)는 유도 가능한 윤곽의 좌표는 비디오 복호화 장치(20)로 전송하지 않고 유도 가능하지 않는 윤곽의 좌표에 관한 정보만 전송할 수 있다.
또는, 비디오 부호화 장치(10)는 유도 가능한 윤곽의 좌표의 경우, 주변 블록으로부터 유도된 윤곽의 좌표의 값과 현재 블록 내의 샘플들을 이용하여 결정된 윤곽의 좌표의 값의 차분값을 부호화하여 비디오 복호화 장치(20)로 전송할 수도 있다. 비디오 복호화 장치(20)는 비트스트림으로부터 수신된 차분값에 주변 블록으로부터 유도된 윤곽의 좌표의 값을 더하여, 현재 블록의 윤곽의 좌표를 결정할 수 있다.
도 14를 참조하면, 현재 블록은 현재 블록 내의 샘플들뿐만 아니라 현재 블록의 주변 샘플들을 이용하여, 세그먼트를 결정하기 위한 윤곽의 좌표를 결정할 수 있다. 이때, 일 실시예에 따른 윤곽의 좌표는 도 13의 샘플들을 이동(shift)시킨 위치의 샘플들을 이용하여 결정될 수 있다. 즉, 현재 블록 내의 샘플들 및 현재 블록의 주변 샘플들을 상측, 하측, 좌측 또는 우측 방향으로 연장한 샘플들이 이용될 수 있다.
예를 들어, 도 14에서, 윤곽의 모드가 제 1 모드인 경우, 윤곽의 제 1 좌표는 현재 블록의 상변의 외부에 인접한 8개의 샘플들이 좌측으로 1만큼 이동된 위치의 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 우변에 인접한 8개의 샘플들을 이용하여 결정될 수 있다.
또한, 윤곽의 모드가 제 4 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 우변에 인접한 8개의 샘플들이 상측으로 1만큼 이동된 위치의 8개의 샘플들 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록 내의 하변에 인접한 8개의 샘플들을 이용하여 결정될 수 있다. 현재 블록의 우측 하단의 샘플은 겹치는 샘플로 제 1 좌표의 결정과 제 2 좌표의 결정에 모두 이용될 수 있다.
또한, 윤곽의 모드가 제 6 모드인 경우, 윤곽의 제 1 좌표는 현재 블록 내의 하변에 인접하는 8개의 샘플들을 이용하여 결정되고, 윤곽의 제 2 좌표는 현재 블록의 좌변의 외부에 인접하는 8개의 샘플이 상측으로 1만큼 이동된 위치의 8개의 샘플들을 이용하여 결정될 수 있다.
일 실시예에 따른 윤곽의 좌표를 이동된 위치의 샘플들을 이용하여 결정함에 따라, 윤곽의 방향을 나타내는 두 변이 겹치는 좌표를 갖지 않아 더 다양한 조합의 윤곽의 좌표가 결정될 수 있다.
도 15 내지 도 16b는 다양한 실시예에 따른 윤곽의 좌표를 샘플의 정밀도에 따라 결정하는 방법을 나타낸다.
다양한 실시예에 따른 윤곽의 좌표는 다양한 실시예에 따른 샘플의 정밀도(precision)에 따라 결정될 수 있다.
예를 들어, 다양한 실시예에 따른 윤곽의 좌표는 정수 픽셀 정밀도, 하프(1/2) 픽셀 정밀도 또는 쿼터(1/4) 픽셀 정밀도를 이용하여 나타날 수 있다. 도 15를 참조하면, 정수 픽셀 정밀도로 나타난 블록(1501), 하프 픽셀 정밀도로 나타난 블록(1502) 및 쿼터 픽셀 정밀도로 나타난 블록(1503)은 4x4 크기의 블록일 수 있다.
블록(1501)을 참조하면, 정수 픽셀 정밀도를 이용하는 경우 블록(1501)의 좌측 상단 샘플의 중심점을 원점(0, 0)으로 하여 정수 샘플의 위치를 표현할 수 있다. 블록(1501)의 정수 샘플의 위치의 x좌표 및 y좌표는 각각 0 내지 3의 수로 결정될 수 있다. 이때, 일 실시예에 따른 윤곽의 좌표는 블록(1501) 내부의 정수 샘플의 위치로 결정될 수도 있고, 블록(1501) 외부의 가상의 정수 샘플의 위치로 결정될 수도 있다.
또한, 정수 픽셀 정밀도를 이용하는 경우 블록(1501)의 좌측 상단 꼭지점을 원점(0, 0)으로 하고, 각 샘플의 변을 정수 위치로 하여, 정수 샘플의 위치를 표현할 수도 있다.
블록(1502) 또는 블록(1503)을 참조하면, 하프 픽셀 정밀도 또는 쿼터 픽셀 정밀도를 이용하는 경우, 블록(1502) 또는 블록(1503)의 좌측 상단 꼭지점 원점(0, 0)으로 하여 하프 샘플 또는 쿼터 샘플의 위치를 표현할 수 있다. 블록(1502)의 하프 샘플의 위치의 x좌표 및 y좌표는 각각 0 내지 7의 수로 결정될 수 있고, 블록(1503)의 쿼터 샘플의 위치의 x좌표 및 y좌표는 각각 0 내지 15의 수로 결정될 수 있다.
이때, 일 실시예에 따른 윤곽의 좌표는 블록(1502) 또는 블록(1503) 내부의 하프 샘플 또는 쿼터 샘플의 위치로 결정될 수도 있고, 블록(1502) 또는 블록(1503) 외부의 가상의 하프 샘플 또는 쿼터 샘플의 위치로 결정될 수도 있다.
윤곽의 좌표의 정밀도를 변환하는 경우, 좌표 변환 함수를 이용할 수 있다. 예를 들어, 정수 픽셀 정밀도를 하프 픽셀 정밀도 또는 쿼터 픽셀 정밀도로 변환하는 경우와 같이 정밀도를 더 세분화하는 경우, 비전사 단사 함수(injective non-surjective function)를 이용할 수 있다. 또한, 하프 픽셀 정밀도를 정수 픽셀 정밀도로 변환하거나 쿼터 픽셀 정밀도를 정수 픽셀 정밀도 또는 하프 픽셀 정밀도로 변환하는 경우와 같이 정밀도를 줄이는 경우, 비단사 전사 함수(surjective non-injective function)을 이용할 수 있다.
정수 픽셀 정밀도를 이용하는 경우, 일 실시예에 따른 윤곽의 좌표는 정수 샘플들의 샘플값을 이용하여 결정될 수 있다. 일 실시예에 따른 윤곽의 좌표는 주변 정수 샘플들과의 샘플값의 변화가 가장 큰 정수 샘플의 위치로 결정될 수 있다. 예를 들어, 일 실시예에 따른 윤곽의 좌표는 정수 샘플들에 [-1, 0, 1]과 같은 필터값을 갖는 1차원 소벨 오퍼레이터를 적용하여 절대값이 가장 큰 샘플의 위치로 결정될 수 있다.
예를 들어, 도 16a을 참조하면, 가로 일열로 나열된 여섯 개의 정수 샘플들이 나타날 수 있다. 도 16a에서 정수 샘플들의 위치는 각각 X로 표시될 수 있고, X의 높낮이는 각각의 샘플들의 샘플값의 크기를 나타낼 수 있다. 예를 들어, 샘플들의 샘플값은 0 내지 255의 수일 수 있다.
도 16a에서, 정수 샘플들 간에 샘플값의 변화가 가장 큰 정수 샘플의 위치는 정수 샘플(1610)의 위치일 수 있다. 즉, 정수 샘플(1610)의 좌측 샘플과 우측 샘플의 샘플값의 차이의 절대값이 가장 클 수 있다. 일 실시예에 따른 윤곽의 좌표는 정수 샘플(1610)의 위치로 결정될 수 있다.
또한, 도 16b를 참조하면, 일 실시예에 따른 윤곽의 좌표는 하프 픽셀 정밀도를 이용하여 결정될 수 있다. 도 16b에서 정수 샘플들을 각각 큰 X로 표시되고 하프 샘플들은 각각 작은 X로 표시될 수 있다. 샘플들의 높낮이는 각각 샘플들의 샘플값의 크기를 나타낼 수 있다.
도 16b에서, 윤곽의 좌표는 하프 샘플(1621)의 위치로 결정될 수 있다. 구체적으로, 하프 샘플과 같은 서브 샘플들의 샘플값을 정수 샘플들의 샘플값을 이용해 인터폴레이션(interpolation)하여 생성할 수 있다. 예를 들어, 하프 샘플(1621)의 샘플값은 좌측 정수 샘플(1620)과 우측 정수 샘플(1622)의 샘플값을 이용하여 구할 수 있다. 일 실시예에 따른 윤곽의 좌표는 생성된 하프 샘플의 샘플값 및 정수 샘플의 샘플값을 이용하여 결정될 수 있다. 예를 들어, 윤곽의 좌표는 하프 픽셀 정밀도로 샘플들에 1차원 소벨 오퍼레이터를 적용하여 절대값이 가장 큰 샘플(1621)의 위치로 결정될 수 있다.
또한, 세로 일열로 나열된 샘플들을 이용하는 경우, 하프 픽셀 정밀도로 상측 샘플의 샘플값과 하측 샘플의 샘플값을 이용하여 윤곽의 좌표를 결정할 수 있다.
또한, 연산의 복잡도를 줄이기 위하여 모든 서브 샘플들의 샘플값을 생성하지 않고도 윤곽의 좌표가 결정될 수도 있다. 예를 들어, 정수 샘플 들에 기초하여 윤곽의 정수 좌표(1621)를 결정하고, 정수 좌표(1620)의 좌측 하프 샘플(1623)의 샘플값과 우측 하프 샘플(1621)의 샘플값을 생성할 수 있다. 일 실시예에 따른 윤곽의 좌표는, 좌측 하프 샘플(1623)의 샘플값과 우측 하프 샘플(1621)의 샘플값 중, 정수 샘플(1620)의 좌측 샘플(1624)의 샘플값과 우측 샘플(1622)의 샘플값의 평균값과 가까운 값의 샘플값을 가지는 우측 하프 샘플(1621)의 위치로 결정될 수 있다.
또는, 세로 일열로 나열된 샘플들을 이용하는 경우, 정수 샘플의 상측 정수 샘플의 샘플값과 하측 정수 샘플의 샘플값에 기초하여 정수 좌표를 결정하고, 결정된 정수 좌표의 상측 하프 샘플과 하측 하프 샘플 중 하나의 샘플의 위치로 윤곽의 좌표를 결정할 수 있다.
이하에서는 도 17 내지 도 20을 참조하여 현재 블록을 구성하는 세그먼트들의 영역 및 경계를 나타내는 현재 블록의 마스크를 생성하는 방법을 후술한다.
도 17은 일 실시예에 따른 현재 블록(1701)을 구성하는 세그먼트들의 나타내는 마스크의 일 예시를 나타낸다.
도 17을 참조하면, 일 실시예에 따른 8x8 크기의 현재 블록(1701)에 대한 마스크가 나타난다. 현재 블록(1701)에 대한 마스크는 현재 블록(1701)으로부터 분할되는 세그먼트들의 영역 및 세그먼트들 간의 경계를 판단하기 위한 데이터로서, 현재 블록(1701)의 각 샘플들에 대응하는 마스크값들의 배열로 구성될 수 있다.
일 실시예에 따른 현재 블록(1701)은 현재 블록의 윤곽에 따라 복수 개의 세그먼트 영역으로 분할될 수 있다. 또한, 일 실시예에 따른 현재 블록(1701)의 영역은 복수 개의 세그먼트 영역과 세그먼트 영역들 사이의 경계 영역(1720)으로 구분될 수 있다. 예를 들어, 일 실시예에 따른 현재 블록의 경계 영역(1720)은, 현재 블록의 윤곽이 지나가는 샘플들로 구성되는 영역일 수도 있고, 현재 블록의 윤곽을 중심으로 소정의 폭을 갖는 영역일 수 있다.
구체적으로, 도 17을 참조하면, 현재 블록(1701)은 직선 윤곽(1705)에 따라 두 개의 세그먼트로 분할될 수 있다. 현재 블록(1701)은 원점(0, 0)을 포함하는 좌측 세그먼트와 원점(0, 0)을 포함하지 않는 우측 세그먼트로 분할될 수 있다. 예를 들어, 원점(0, 0)은 현재 블록(1701) 내의 좌측 상단 샘플의 위치일 수 있다.
일 실시예에 따른 현재 블록(1701)의 좌측 세그먼트 영역에 포함되는 샘플들에 대한 마스크값들은 모두 0으로 결정되고, 우측 세그먼트 영역에 포함되는 샘플들에 대응하는 마스크값들은 모두 1로 결정될 수 있다. 이때, 현재 블록(1701) 내의 샘플들은 직사각형 또는 정사각형 단위의 샘플들일 수 있기 때문에, 현재 블록(1701)의 샘플의 위치가 좌측 세그먼트 영역 또는 우측 세그먼트 영역에 포함되는 경우 이외에도, 윤곽(1705)의 근처의 경계 영역(1720)에서 샘플의 위치가 좌측 세그먼트 영역 및 우측 세그먼트 영역에 걸쳐있는 경우가 있을 수 있다.
따라서, 일 실시예에 따른 현재 블록(1701)의 좌측 세그먼트와 우측 세그먼트 사이의 경계 영역(1720)에 포함되는 샘플들에 대한 마스크 값들은 도 18을 참조하여 후술하는 방법에 따라 0 또는 1로 결정될 수 있다.
일 실시예에 따른 경계 영역(1720)에 포함되는 샘플들은 현재 블록(1701)의 윤곽(1705)이 지나가는 샘플들로서, 도 17에서는 열 개의 샘플들이 경계 영역(1720)에 포함될 수 있다. 예를 들어, 현재 블록(1701)의 윤곽(1705)은 (3, 5)에 위치하는 샘플(1710)을 지나갈 수 있고, 윤곽(1705)의 일부를 포함하는 샘플(1701)은 경계 영역(1720)에 포함될 수 있다.
또한, 일 실시예에 따른 현재 블록(1701)의 좌측 세그먼트 영역에 포함되는 샘플들에 대한 마스크값들은 모두 0으로 결정되고, 우측 세그먼트 영역에 포함되는 샘플들에 대응하는 마스크값들은 모두 255(혹은, 256)로 결정될 수도 있다. 일 실시예에 따른 현재 블록(1701)의 좌측 세그먼트와 우측 세그먼트 사이의 경계 영역(1720)에 포함되는 샘플들에 대응하는 마스크 값들은 도 18을 참조하여 후술하는 방법에 따라 0 내지 255(혹은, 256)의 값으로 결정될 수 있다.
좌측 세그먼트 영역과 우측 세그먼트 영역의 샘플들의 마스크값들은 위의 예시들에 제한되지 않고, 마스크값의 비트 뎁스에 따라 다른 값이 될 수 있다.
일 실시예에 따른 현재 블록(1701)에 포함된 모든 샘플들에 대한 각각의 마스크값이 결정됨으로써, 마스크값들을 포함하는 현재 블록(1701)의 마스크가 생성될 수 있다.
일 실시예에 따른 현재 블록(1701)의 마스크는 현재 블록(1701)의 루마 블록과 현재 블록(1701)의 크로마 블록에 대하여 각각 생성될 수 있다. 또는, 현재 블록(1701)의 루마 블록에 대한 마스크에 기초하여 크로마 블록에 대한 마스크를 생성할 수도 있다. 예를 들어, 현재 블록(1701)의 루마 블록에 대한 마스크를 다운 샘플링하거나 위상 이동을 고려한 데시메이션(decimation)을 적용하여 크로마 블록에 대한 마스크를 생성할 수 있다. 데시메이션을 적용하는 경우, 수평 방향으로의 3-탭 가우시안 필터 및 수직 방향으로의 3-탭 가우시안 필터 중 적어도 하나를 이용할 수 있다.
또는, 현재 블록(1701)의 루마 블록에 대한 윤곽에 관한 정보에 기초하여 크로마 블록에 대한 마스크를 생성할 수도 있다. 즉, 현재 블록(1701)의 루마 블록에 대한 윤곽의 좌표들을 변환하여 크로마 블록에 대한 윤곽의 좌표들을 획득하고, 획득된 크로마 블록에 대한 윤곽의 좌표들을 이용하여 크로마 블록에 대한 마스크를 생성할 수 있다.
또는, 현재 블록(1701)의 크로마 블록에 대한 마스크를 먼저 생성한 후, 크로마 블록에 대한 마스크를 이용하여 루마 블록에 대한 마스크를 유도할 수도 있다.
도 18은 도 17의 현재 블록(1701)의 경계 영역에 포함되는 샘플(1710)의 마스크값을 결정하는 다양한 방법의 예시들을 나타낸다.
도 18을 참조하면, 경계 영역에 포함되는 샘플들인 샘플(1801), 샘플(1802) 및 샘플(1803)이 나타난다. 도 17의 현재 블록(1701)의 경계 영역에 포함되는 샘플(1710)에 대응되는 마스크값은 도 18의 샘플(1801), 샘플(1802) 또는 샘플(1803)과 같은 방법으로 결정될 수 있다.
구체적으로, 샘플(1801)을 참조하면, 일 실시예에 따른 샘플(1801)에 대응되는 마스크값은, 샘플(1801)을 지나가는 윤곽에 의하여 생성되는 샘플(1801) 내의 두 영역의 면적에 기초하여 결정될 수 있다. 예를 들어, 도 18에서, 윤곽에 의하여 생성되는 샘플(1801) 내의 두 영역은 샘플(1801)의 좌측 영역(또는, 좌상측 영역) 및 샘플(1801)의 우측 영역(또는, 우하측 영역)일 수 있다. 샘플(1801)의 좌측 영역은 샘플(1801)의 원점인 샘플(1801)의 좌측 상단 꼭지점을 포함하는 영역일 수 있다.
도 17에서 현재 블록(1701)의 좌측 세그먼트에 포함되는 샘플들의 마스크값이 0이고 우측 세그먼트에 포함되는 샘플들의 마스크값이 1인 경우, 일 실시예에 따른 샘플(1801)에 대응되는 마스크값은 윤곽에 의하여 생성되는 샘플(1801) 내의 두 영역의 면적의 크기에 따라 결정될 수 있다. 샘플(1801)에 대응되는 마스크값은, 샘플(1801) 내의 두 영역의 면적을 비교하여 우측 면적(0.75)이 좌측 면적(0.25)보다 넓은 경우, 현재 블록(1701)의 우측 세그먼트의 마스크값과 같은 값인 1로 결정될 수 있다.
또한, 도 17에서 좌측 세그먼트에 포함되는 샘플들의 마스크값이 0이고 우측 세그먼트에 포함되는 샘플들의 마스크값이 255인 경우, 일 실시예에 따른 샘플(1801)에 대응되는 마스크값은 윤곽에 의하여 생성되는 샘플(1801) 내의 두 영역의 면적의 크기에 비례하여 결정될 수 있다. 예를 들어, 일 실시예에 따른 샘플(1801)에 대응되는 마스크값은 "((샘플(1801)의 좌측 영역의 넓이 * 좌측 세그먼트의 마스크값) + (샘플(1801)의 우측 영역의 넓이 * 우측 세그먼트의 마스크값)) / 샘플(1801)의 넓이"로 결정될 수 있다.
예를 들어, 좌측 영역은 넓이는 0.25, 우측 영역의 넓이는 0.75, 현재 블록(1701)의 좌측 세그먼트의 마스크값은 0, 현재 블록(1701)의 우측 세그먼트의 마스크값은 255, 샘플(1801)의 넓이는 1인 경우, 샘플(1801)에 대응되는 마스크값은 191.25로 결정될 수 있다. 또는, 샘플(1801)에 대응되는 마스크값은 191.25의 값을 반올림한 191으로 결정될 수 있다. 또는, 우측 세그먼트의 마스크 값이 256인 경우, 샘플(1801)에 대응되는 마스크값은 192로 결정될 수 있다.
이때, 좌측 세그먼트의 마스크값은 샘플(1801)의 좌측에 인접하는 샘플에 대응되는 마스크값일 수 있고, 우측 세그먼트의 마스크 값은 샘플(1801)의 우측에 인접하는 샘플에 대응되는 마스크값일 수 있다. 또는, 좌측 세그먼트의 마스크값은 샘플(1801)의 상측에 인접하는 샘플에 대응되는 마스크값일 수 있고, 우측 세그먼트의 마스크 값은 샘플(1801)의 하측에 인접하는 샘플에 대응되는 마스크값일 수 있다.
또한, 샘플(1802)을 참조하면, 일 실시예에 따른 샘플(1802)에 대응되는 마스크값은, 샘플(1802)의 중심과 샘플(1802)을 지나가는 윤곽 간의 수직 거리(d)에 기초하여 결정될 수 있다. 예를 들어, 도 18에서, 윤곽에 의하여 생성되는 샘플(1802) 내의 두 영역은 샘플(1802)의 좌측 영역(또는, 좌상측 영역) 및 샘플(1802)의 우측 영역(또는, 우하측 영역)일 수 있다. 샘플(1802)의 좌측 영역은 샘플(1802)의 원점인 샘플(1802)의 좌측 상단 꼭지점을 포함하는 영역일 수 있다.
도 17에서 좌측 세그먼트에 포함되는 샘플들의 마스크값이 0이고 우측 세그먼트에 포함되는 샘플들의 마스크값이 255인 경우, 일 실시예에 따른 샘플(1802)에 대응되는 마스크값은 샘플(1802)의 중심과 샘플(1801)을 지나가는 윤곽 간의 거리(d)에 기초하여 0과 255의 사이값으로 결정될 수 있다. 예를 들어, 일 실시예에 따른 샘플(1802)에 대응되는 마스크값은, 샘플(1802)의 중심을 포함하는 영역이 샘플(1802)의 원점을 포함하는 좌측 영역인 경우, "128 - clip3(0, 1, d/threshold) * 128"으로 결정될 수 있다. 또한, 일 실시예에 따른 샘플(1802)에 대응되는 마스크값은, 샘플(1802)의 중심을 포함하는 영역이 샘플(1802)의 원점을 포함하지 않는 우측 영역인 경우, "128 + clip3(0, 1, d/threshold) * 128"으로 결정될 수 있다.
이때, threshold 는 미리 설정되는 역치값으로서 경계 영역의 폭을 조절하는 역할을 할 수 있고, Clip3함수는 다음과 같이 정의될 수 있다.
Clip3(a,b,c) = a (when c<a), b (when c>b),or c (when a≤c≤b)
위의 수식들에서 128의 값은 예시적인 값으로서, 마스크값의 비트 뎁스에 따라 다른 값이 될 수 있다.
또한, 샘플(1803)을 참조하면, 일 실시예에 따른 샘플(1803)에 대응되는 마스크값은, 샘플(1803)의 중심으로부터 샘플(1803)을 지나가는 윤곽에 이르는 수평 거리(dx) 및 수직 거리(dy)를 이용하여 결정될 수도 있다.
또한, 일 실시예에 따른 샘플(1710)에 대응되는 마스크값은, 샘플(1710)에 대한 코스트(c)를 계산하고, 샘플(1710)에 대한 코스트를 0과 비교함으로써, 결정할 수 있다.
샘플(1710)에 대한 코스트(c)는, 해당 샘플(1710)과 현재 블록(1701)을 지나는 윤곽 간의 거리를 나타내는 값일 수 있다. 예를 들어, 일 실시예에 따른 샘플(1710)에 대한 코스트 다음과 같이 계산될 수 있다.
c = f(x, y, x0, y0, x1, y1) = (y - y0)*(x1 - x0) - (x - x0)*(y1 - y0)
이때, (x0, y0)은 샘플(1710)을 지나는 윤곽(1705)의 제 1 좌표이고, (x1, y1)은 샘플(1710)을 지나는 윤곽(1705)의 제 2 좌표이고, (x, y)는 현재 샘플(1710)의 좌표일 수 있다.
도 19 및 20은 다양한 실시예에 따른 현재 블록(1901)의 마스크를 생성하는 방법의 예시들을 나타낸다.
도 19을 참조하면, 단일 직선 윤곽을 이용하여 두 개의 세그먼트로 분할되는 현재 블록(1901)이 나타난다. 일 실시예에 따른 현재 블록(1901)은 8x8 크기의 블록일 수 있으나, 이는 일 예시일 뿐이며, 이외에도 64x64, 32x32, 16x16 등의 크기의 블록이 될 수 있다.
일 실시예에 따른 현재 블록(1901)은, 현재 블록(1901)으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽에 따라, 두 개의 세그먼트로 분할될 수 있다. 예를 들어, 현재 블록(1901)은 윤곽에 의하여 제 1 세그먼트와 제 2 세그먼트로 분할될 수 있다. 이때, 도 19를 참조하면, 제 1 세그먼트는 현재 블록(1901)의 좌측(또는, 좌상측) 세그먼트이고 제 2 세그먼트는 현재 블록(1901)의 우측(또는, 우하측) 세그먼트일 수 있다.
현재 블록(1901)을 참조하면, 현재 블록(1901)의 제 1 세그먼트에 완전히 포함되는 샘플들이 위치하는 영역은 제 1 영역(흰색)이고, 제 2 세그먼트에 완전히 포함되는 샘플들이 위치하는 영역은 제 2 영역(음영 표시)일 수 있다. 또한, 현재 블록(1901)의 샘플의 일부는 좌측 세그먼트에 포함되고 나머지 일부는 우측 세그먼트에 포함되는 샘플들이 위치하는 영역은 경계 영역(도트 표시)일 수 있다.
도 19 및 20의 다양한 실시예에 따른 현재 블록(1901)의 마스크를 생성하는 방법에 따르면, 현재 블록(1901)의 마스크를 구성하는 현재 블록(1901)의 각각의 샘플들에 대응하는 마스크값은 비트뎁스가 1인 바이너리 값으로 결정될 수 있다.
구체적으로, 일 실시예에 따른 현재 블록(1901)의 마스크를 생성하는 방법에 따르면, 제 1 영역에 대응되는 마스크값은 0으로 결정되고, 제 2 영역에 대응되는 마스크값은 1로 결정될 수 있다.
이때, 블록(1902)을 참조하면, 현재 블록(1901)의 경계 영역에 대응되는 마스크 값은 제 1 영역에 대응되는 마스크값과 동일하게 0으로 결정될 수 있다. 또는 블록(1903)을 참조하면, 현재 블록(1901)의 경계 영역에 대응되는 마스크값은 제 2 영역에 대응되는 마스크값과 동일하게 1로 결정될 수 있다.
또한, 도 20에서, 현재 블록(1901)의 마스크를 생성하기 위한 다른 실시예에 따르면, 현재 블록(1901)의 경계 영역에 포함되는 샘플들 중 일부 샘플들에 대응되는 마스크값은 각각 0으로 결정되고, 나머지 샘플들에 대응되는 마스크값은 각각 1로 결정될 수 있다.
구체적으로, 도 20의 블록(2001)을 참조하면, 현재 블록(1901)의 각 샘플에 대해 2 이상의 비트뎁스를 갖는 그레이스케일 값을 결정하고, 결정된 그레이스케일 값에 기초하여 현재 블록(1901)의 각 샘플에 대해 비트뎁스가 1인 바이너리 값을 결정함으로써 현재 블록(1901)의 마스크가 생성될 수 있다.
현재 블록(1901)의 샘플에 대응되는 그레이스케일 값은, 도 18에서 상술된 경계 영역에 포함되는 샘플의 마스크값을 결정하는 다양한 방법에 따라 결정될 수 있다. 예를 들어, 비트뎁스가 8인 경우, 현재 블록(1901)의 샘플에 대응되는 그레이스케일 값은 0 내지 255의 값이 될 수 있다.
예를 들어, 블록(2001)을 참조하면, 현재 블록(1901)의 제 1 영역에 대응되는 마스크 값은 0으로 결정되고, 제 2 영역에 대응되는 마스크 값은 255로 결정될 수 있다. 또한, 현재 블록(1901)의 경계 영역에 포함되는 샘플들에 대응되는 마스크 값은 도 18에서 상술된 다양한 방법에 따라 각각 0과 255 사이의 값으로 결정될 수 있다.
이와 같이 0 내지 255의 값으로 결정된 그레이스케일의 마스크값들을 바이너리 값으로 변환함으로써, 일 실시예에 따른 현재 블록(1901)의 마스크를 생성할 수 있다.
예를 들어, 블록(2002)을 참조하면, 블록(2001)과 같이 결정된 각각의 샘플들에 대한 그레이스케일의 마스크값에 기초하여 바이너리의 마스크값을 생성할 수 있다. 블록(2001)의 제 1 영역에 대응되는 그레이스케일의 마스크값이 0인 경우 바이너리 마스크값은 0으로 결정될 수 있다. 또한, 블록(2001)의 제 2 영역에 대응되는 그레이스케일의 마스크값이 255인 경우 바이너리 마스크값은 1로 결정될 수 있다.
또한, 블록(2001)의 경계 영역에 포함된 샘플들 중, 샘플에 대응되는 그레이스케일의 마스크값이 128보다 작은 경우 해당 샘플의 바이너리 마스크값은 0으로 결정되고, 샘플에 대응되는 그레이스케일의 마스크값이 128보다 크거나 같은 경우 해당 샘플의 바이너리 마스크값은 1로 결정될 수 있다. 또는, 블록(2001)의 경계 영역에 포함된 샘플들 중, 샘플에 대응되는 그레이스케일의 마스크값이 128보다 작거나 같은 경우 해당 샘플의 바이너리 마스크값은 0으로 결정되고, 샘플에 대응되는 그레이스케일의 마스크값이 128보다 큰 경우 해당 샘플의 바이너리 마스크값은 1로 결정될 수 있다.
비디오 복호화 장치(20) 및 비디오 부호화 장치(10)는 그레이스케일의 마스크값을 이용하여 현재 블록(1901)의 경계를 더욱 정확하게 표현할 수 있고, 그레이스케일의 마스크값을 바이너리 마스크값으로 변환하여 이용함으로써 마스크를 이용한 연산의 복잡도를 줄이고 효율을 높일 수 있다.
상술된 도 19 및 도 20의 방법이 수행되는 과정에서, 현재 블록(1901)의 제 1 영역을 결정하기 위해 다양한 방법들이 이용될 수 있다.
예를 들어, 현재 블록(1901)의 세그먼트들 중 현재 블록(1901)의 원점(0, 0)인 좌측 상단 샘플을 포함하는 세그먼트에 대응되는 영역이 제 1 영역으로 결정되고, 나머지 세그먼트에 대응되는 영역이 제 2 영역으로 결정될 수 있다.
또한, 다른 방법으로서 현재 블록(1901)에 포함된 샘플들에 대한 코스트(c)를 다음과 같이 계산하여, 계산된 코스트가 0보다 작은 샘플의 위치는 제 1 영역으로 판단할 수 있다.
c = f(x, y, x0, y0, x1, y1) = (y - y0)*(x1 - x0) - (x - x0)*(y1 - y0)
이때, (x0, y0)은 현재 블록(1901)을 지나는 윤곽의 제 1 좌표이고, (x1, y1)은 윤곽의 제 2 좌표이고, (x, y)는 현재 블록(1901)의 샘플의 좌표일 수 있다.
도 21은 일 실시예에 따른 현재 블록(2101)의 마스크를 생성하는 방법의 예시를 나타낸다.
도 21을 참조하면, 단일 직선 윤곽을 이용하여 적어도 하나의 세그먼트로 분할되는 현재 블록(2101)이 나타난다. 일 실시예에 따른 현재 블록(2101)은 8x8 크기의 블록일 수 있으나, 이는 일 예시일 뿐이며, 이외에도 64x64, 32x32, 16x16 등의 크기의 블록이 될 수 있다.
이때, 현재 블록(2101)을 지나는 윤곽은 현재 블록(2101)을 두 개의 세그먼트로 분할하지 않으므로, 현재 블록(2101)이 도 17에서와 같이 제 1 영역, 제 2 영역 및 경계 영역으로 나뉘지 않을 수 있다. 예를 들어, 도 21을 참조하면, 윤곽이 현재 블록(2101)의 꼭지점에 위치한 하나의 샘플만을 지나는 경우, 현재 블록(2101)은 하나의 세그먼트로 분할될 수 있고, 현재 블록(2101)은 윤곽이 지나는 경계 영역과 경계 영역이 아닌 세그먼트 영역으로 나뉠 수 있다.
구체적으로, 도 21에서, 윤곽은 현재 블록(2101) 내의 샘플들 중, 좌측 상단 샘플, 좌측 하단 샘플, 우측 상단 샘플 및 우측 하단 샘플 중 하나의 샘플만을 지날 수 있다.
도 21과 같은 경우에, 현재 블록(2101)의 마스크는 제 1 마스크값과 제 2 마스크값으로 구성될 수 있다. 예를 들어, 현재 블록(2101)의 경계 영역에 포함되는 샘플에 대응되는 마스크값은 제 1 마스크값으로 결정되고, 현재 블록(2101)의 경계 영역이 아닌 나머지 영역에 포함되는 샘플에 대응되는 마스크값은 제 2 마스크값으로 결정될 수 있다. 제 1 마스크값 및 제 2 마스크값은 미리 설정된 값으로서 마스크값의 비트뎁스에 따라 다르게 설정될 수 있다. 예를 들어, 제 1 마스크값은 0이고, 제 2 마스크값은 127(혹은, 128)일 수 있다. 또는, 제 1 마스크값이 255(혹은, 256)이고, 제 2 마스크값은 0일 수도 있다.
일 실시예에 따른 현재 블록(2101)의 제 1 마스크값 및 제 2 마스크값은 현재 블록(2101) 내에서의 경계 영역의 위치에 따라 다르게 설정될 수 있다. 예를 들어, 현재 블록(2101)의 경계 영역이 현재 블록(2101) 내의 좌측 상단에 위치하는 경우, 제 1 마스크값 및 제 2 마스크값은 각각 0 및 127로 결정되고, 현재 블록(2101)의 경계 영역이 현재 블록(2101) 내의 우측 상단에 위치하는 경우, 제 1 마스크값 및 제 2 마스크값은 각각 255 및 127로 결정될 수 있다.
도 22는 일 실시예에 따른 현재 블록(2201)의 세그먼트에 대하여 예측을 수행하는 방법을 나타낸다.
현재 블록(2201)으로부터 결정된 적어도 하나의 세그먼트는 인트라 예측(intra prediction) 방식을 이용하여 예측될 수 있다.
구체적으로, 도 22를 참조하면, 현재 블록(2201)의 세그먼트는 인트라 DC 모드를 이용하여 예측될 수 있다. 인트라 DC 모드는 현재 블록(2201)이 포함된 픽처 내의 현재 블록(2201)의 주변의 참조 샘플들을 이용하여 현재 블록(2201)의 세그먼트의 예측값을 생성하는 방법일 수 있다. 예를 들어, DC 모드에서 현재 블록(2201)의 세그먼트의 예측값은 DC 값으로서, 참조되는 주변 참조 샘플들의 평균값이 될 수 있다.
한편, 현재 블록(2201) 내에 윤곽이 포함되어 세그먼트들 간의 경계가 생기는 경우, 일 실시예에 따른 현재 블록(2201)의 세그먼트에 대한 예측은 세그먼트들 간의 경계를 고려하여 수행될 수 있다. 구체적으로, 현재 블록(2201)의 주변의 참조 샘플들에 기초하여 DC 값인 세그먼트의 샘플값이 먼저 생성되고, 생성된 세그먼트의 샘플값에 세그먼트들의 영역 및 경계를 나타내는 마스크를 적용하여 세그먼트의 예측값이 생성될 수 있다. 이때, 세그먼트의 샘플값은 세그먼트에 대응되는 영역에 포함되는 샘플들 각각에 대한 샘플값들을 의미할 수 있다. 또한, 세그먼트의 예측값은 세그먼트에 대응되는 영역에 포함되는 샘플들에 각각에 대한 예측값들을 의미할 수 있다.
도 22는 일 실시예에 따른 현재 블록(2201)의 주변의 참조 샘플들을 이용하여 현재 블록(2201)의 세그먼트의 샘플값을 생성하는 방법을 설명하기 위한 도면이다.
일 실시예에 따른 현재 블록(2201)의 세그먼트의 샘플값은 현재 블록(2201)의 외부에 인접한 참조 샘플들에 기초하여 생성될 수 있다. 일 실시예에 따른 현재 블록(2201)에 인접한 참조 샘플들은 현재 블록(2201)의 상측 외부에 인접한 상측 참조 샘플 및 좌측 외부에 인접한 좌측 참조 샘플을 포함할 수 있다.
도 22를 참조하면, 현재 블록(2201)은 현재 블록(2201)으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드에 따라 두 개의 세그먼트로 분할 될 수 있다. 이때, 현재 블록(2201)의 두 개의 세그먼트에 포함된 샘플들의 샘플값은 현재 블록(2201)의 참조 샘플들 중 각각의 해당 세그먼트의 외부에 인접하는 참조 샘플들에 기초하여 생성될 수 있다.
구체적으로, 윤곽의 모드가 제 1 모드인 경우, 현재 블록(2201)은 좌측 세그먼트와 우측 세그먼트로 분할될 수 있다. 현재 블록(2201)의 좌측 세그먼트의 샘플값은 좌측 세그먼트의 상측 및 좌측 외부에 각각 인접하는 상측 참조 샘플 및 좌측 참조 샘플에 기초하여 생성될 수 있다. 예를 들어, 좌측 세그먼트에 포함된 샘플들의 샘플값은 좌측 세그먼트의 상측 참조 샘플들 및 좌측 참조 샘플들의 샘플값의 평균값으로 결정될 수 있다. 이때, 좌측 세그먼트에 인접하는 상측 참조 샘플은 현재 블록(2201)의 인접하는 상측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 1 좌표보다 좌측에 위치하는 샘플들을 포함할 수 있다. 또한, 현재 블록(2201)의 우측 세그먼트의 샘플값은 우측 세그먼트에 인접하는 상측 참조 샘플에 기초하여 생성될 수 있다. 이때, 우측 세그먼트에 인접하는 상측 참조 샘플은 현재 블록(2201)의 인접하는 상측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 1 좌표보다 우측에 위치하는 샘플들을 포함할 수 있다.
또한, 윤곽의 모드가 제 2 모드인 경우, 현재 블록(2201)은 좌측 세그먼트와 우측 세그먼트로 분할될 수 있다. 현재 블록(2201)의 좌측 세그먼트의 샘플값은 좌측 세그먼트에 인접하는 상측 참조 샘플 및 좌측 참조 샘플에 기초하여 생성될 수 있고, 현재 블록(2201)의 우측 세그먼트의 샘플값은 우측 세그먼트에 인접하는 상측 참조 샘플에 기초하여 생성될 수 있다. 이때, 좌측 세그먼트에 인접하는 상측 참조 샘플은 현재 블록(2201)의 인접하는 상측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 1 좌표보다 좌측에 위치하는 샘플들을 포함할 수 있고, 우측 세그먼트에 인접하는 상측 참조 샘플은 현재 블록(2201)의 인접하는 상측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 1 좌표보다 우측에 위치하는 샘플들을 포함할 수 있다.
또한, 윤곽의 모드가 제 3 모드인 경우, 현재 블록(2201)은 좌측 세그먼트와 우측 세그먼트로 분할될 수 있다. 현재 블록(2201)의 좌측 세그먼트의 샘플값은 좌측 세그먼트에 인접하는 상측 참조 샘플 및 좌측 참조 샘플에 기초하여 생성될 수 있다. 이때, 좌측 세그먼트에 인접하는 상측 참조 샘플은 현재 블록(2201)의 인접하는 상측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 1 좌표보다 좌측에 위치하는 샘플들을 포함할 수 있고, 좌측 세그먼트에 인접하는 좌측 참조 샘플은 현재 블록(2201)의 인접하는 좌측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 2 좌표보다 상측에 위치하는 샘플들을 포함할 수 있다. 또한, 현재 블록(2201)의 우측 세그먼트의 샘플값은 우측 세그먼트에 인접하는 상측 참조 샘플 및 좌측 참조 샘플에 기초하여 생성될 수 있다. 이때, 우측 세그먼트에 인접하는 상측 참조 샘플은 현재 블록(2201)의 인접하는 상측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 1 좌표보다 우측에 위치하는 샘플들을 포함할 수 있고, 우측 세그먼트에 인접하는 좌측 참조 샘플은 현재 블록(2201)의 인접하는 좌측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 2 좌표보다 하측에 위치하는 샘플들을 포함할 수 있다.
또한, 윤곽의 모드가 제 4 모드인 경우, 현재 블록(2201)은 좌측 세그먼트와 우측 세그먼트로 분할될 수 있다. 현재 블록(2201)의 좌측 세그먼트의 샘플값은 좌측 세그먼트에 인접하는 상측 참조 샘플 및 좌측 참조 샘플에 기초하여 생성될 수 있다. 이때, 현재 블록(2201)의 우측 세그먼트의 샘플값은 현재 블록(2201)의 주변 샘플을 이용하여 생성되지 않고 직접 전송될 수 있다. 예를 들어, 윤곽의 모드가 제 4 모드인 경우, 비디오 복호화 장치(20)는 비디오 부호화 장치(10)로부터 우측 세그먼트의 샘플값에 관한 정보를 수신하여 샘플값을 생성할 수 있다. 또는, 현재 블록(2201)의 우측 세그먼트의 샘플값은 현재 블록(2201)에 인접하지 않은 주변 샘플들을 이용하여 생성될 수도 있다. 이에 대한 더욱 상세한 설명은 도 23를 참조하여 후술하도록 한다.
또한, 윤곽의 모드가 제 5 모드인 경우, 현재 블록(2201)은 상측 세그먼트와 하측 세그먼트로 분할될 수 있다. 현재 블록(2201)의 상측 세그먼트의 샘플값은 상측 세그먼트에 인접하는 상측 참조 샘플 및 좌측 참조 샘플에 기초하여 생성될 수 있다. 이때, 상측 세그먼트에 인접하는 좌측 참조 샘플은 현재 블록(2201)의 인접하는 좌측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 2 좌표보다 상측에 위치하는 샘플들을 포함할 수 있다. 또한, 현재 블록(2201)의 하측 세그먼트의 샘플값은 하측 세그먼트에 인접하는 좌측 참조 샘플에 기초하여 생성될 수 있다. 이때, 하측 세그먼트에 인접하는 좌측 참조 샘플은 현재 블록(2201)의 인접하는 좌측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 2 좌표보다 하측에 위치하는 샘플들을 포함할 수 있다.
또한, 윤곽의 모드가 제 6 모드인 경우, 현재 블록(2201)은 좌측 세그먼트와 우측 세그먼트로 분할될 수 있다. 현재 블록(2201)의 우측 세그먼트의 샘플값은 우측 세그먼트에 인접하는 상측 참조 샘플 및 좌측 참조 샘플에 기초하여 생성될 수 있다. 이때, 우측 세그먼트에 인접하는 좌측 참조 샘플은 현재 블록(2201)의 인접하는 좌측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 2 좌표보다 상측에 위치하는 샘플들을 포함할 수 있다. 또한, 현재 블록(2201)의 좌측 세그먼트의 샘플값은 좌측 세그먼트에 인접하는 좌측 참조 샘플에 기초하여 생성될 수 있다. 이때, 좌측 세그먼트에 인접하는 좌측 참조 샘플은 현재 블록(2201)의 인접하는 좌측 주변 샘플들 중 현재 블록(2201)의 윤곽의 제 2 좌표보다 하측에 위치하는 샘플들을 포함할 수 있다.
다만, 세그먼트들의 샘플값은 참조 샘플들의 샘플값의 평균값 이외에도, 참조 샘플들 중 하나의 샘플의 샘플값 또는 참조 샘플들의 샘플값의 중간값 등으로 결정될 수 있다.
일 실시예에 따른 현재 블록(2201)의 세그먼트의 샘플값은 루마 성분과 크로마 성분에 대하여 각각 생성될 수 있고, 세그먼트의 예측값 또한 루마 성분과 크로마 성분에 대하여 각각 생성될 수 있다. 현재 블록(2201)의 윤곽의 모드가 제 4 모드인 경우, 현재 블록(2201)의 우측 세그먼트의 루마 성분의 샘플값은 비디오 부호화 장치(10) 및 비디오 복호화 장치(20) 간에 직접 송수신됨으로써 결정되고, 크로마 성분의 샘플값은 루마 성분의 샘플값으로부터 유도하여 결정할 수 있다.
한편, 현재 블록(2201)의 윤곽의 모드가 제 4 모드인 경우, 일 실시예에 따른 현재 블록(2201)의 우측 세그먼트의 샘플값은 비디오 부호화 장치(10)와 비디오 복호화 장치(20) 간에 송수신될 수 있다.
그러나, 다른 실시예에 따른 비디오 부호화 장치(10)는 윤곽의 모드에 관계 없이, 현재 블록에 인접한 주변 참조 샘플들을 이용할 수 있는 경우에도, 정확한 예측을 위하여 현재 블록의 모든 세그먼트들의 샘플값을 결정하여 전송할 수도 있다.
또한, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록의 세그먼트에 포함된 샘플들을 이용하여 획득한 실제 세그먼트의 샘플값과 주변 참조 샘플들을 이용하여 유도되는 세그먼트의 샘플값의 차이값을 계산하여 비디오 복호화 장치(20)로 전송할 수도 있다. 비디오 복호화 장치(20)는 현재 블록의 주변 참조 샘플들을 이용하여 세그먼트의 유도되는 세그먼트의 샘플값과 비디오 부호화 장치(10)로부터 수신되는 차이값에 기초하여 현재 블록의 세그먼트의 샘플값을 복원할 수 있다.
상술한 방법들에 따라 현재 블록(2201)의 세그먼트의 샘플값이 생성되면, 생성된 세그먼트의 샘플값에 세그먼트의 영역 및 경계를 나타내는 마스크를 적용하여 현재 블록(2201)의 세그먼트의 예측값을 생성할 수 있다.
구체적으로, 일 실시예에 따른 현재 블록(2201)의 마스크가 바이너리 마스크인 경우, 현재 블록(2201)의 세그먼트들의 예측값은 세그먼트들의 샘플값에 기초하여 결정될 수 있다. 예를 들어, 제 1 세그먼트에 포함되는 샘플들이 위치하는 제 1 영역의 마스크값이 0이고 제 2 세그먼트에 포함되는 샘플들이 위치하는 제 2 영역의 마스크값이 1인 경우, 현재 블록(2201)의 제 1 세그먼트의 예측값은 제 1 세그먼트의 샘플값으로 결정되고, 현재 블록(2201)의 제 2 세그먼트의 예측값은 제 2 세그먼트의 샘플값으로 결정될 수 있다.
이때, 현재 블록(2201)의 경계 영역에 포함된 샘플들의 예측값은 경계 영역의 마스크값에 따라 결정될 수 있다. 예를 들어, 현재 블록(2201)의 경계 영역에 포함된 샘플들 중 마스크값이 0인 샘플의 예측값은 동일한 마스크 값을 갖는 제 1 세그먼트의 샘플값으로 결정되고, 마스크값이 1인 샘플의 예측값은 동일한 마스크 값을 갖는 제 2 세그먼트의 샘플값으로 결정될 수 있다.
또한, 일 실시예에 따른 현재 블록(2201)의 마스크가 바이너리 마스크가 그레이스케일의 마스크인 경우, 예를 들어, 마스크값의 비트 뎁스가 8비트인 경우, 현재 블록(2201)의 세그먼트들의 예측값은 세그먼트들의 샘플값에 기초하여 아래와 같이 계산될 수 있다.
P = ((255 - M) * DC0 + (M) * DC1 + 128) >> 8
이때, P는 현재 블록(2201)에 포함된 각각의 샘플들의 예측값을 나타내고, M은 현재 블록(2201)에 포함된 각각의 샘플들의 마스크값을 나타낸다. 또한, DC0는 현재 블록(2201)의 제 1 세그먼트의 샘플값을 나타내고, DC1은 현재 블록(2201)의 제 2 세그먼트의 샘플값을 나타낼 수 있다. 위 식에서 255, 128은 각각 현재 블록(2201)의 마스크값의 비트 뎁스에 따른 최대값 및 중간값으로서, 현재 블록(2201)의 마스크값의 비트 뎁스에 따라 변경될 수 있다.
위 식에 따라, 마스크값이 0인 현재 블록(2201)의 제 1 세그먼트의 예측값은 제 1 세그먼트의 샘플값으로 결정되고, 마스크값이 255인 현재 블록(2201)의 제 2 세그먼트의 예측값은 제 2 세그먼트의 샘플값으로 결정될 수 있다. 이때, 현재 블록(2201)의 경계 영역에 포함된 샘플들의 예측값은 경계 영역의 마스크값과 제 1 세그먼트의 샘플값 및 제 2 세그먼트의 샘플값을 이용하여 결정될 수 있다.
상술한 바와 같이, 일 실시예에 따른 현재 블록(2201)으로부터 결정된 세그먼트들을 고려하여 현재 블록(2201)을 예측하는 방법에 따르면, 현재 블록(2201) 내에 포함된 물체의 경계를 더욱 정확히 표현할 수 있다.
한편, 일 실시예에 따른 현재 블록(2201)의 윤곽에 따라 결정된 세그먼트들을 고려하여 현재 블록(2201)을 예측하는 방법과 기존의 사각형의 예측 블록을 이용하는 인트라 예측 및 인터 예측 방법을 조합하여, 현재 블록(2201)의 예측 블록을 생성할 수도 있다.
예를 들어, 일 실 시예에 따른 현재 블록(2201)의 예측 블록은 아래와 같이 생성될 수 있다.
P(x, y) = (P0(x, y) + P1(x, y) + 1) >> 1
이때, P0(x, y)는 일 실시예에 따른 현재 블록(2201)의 윤곽에 따라 결정된 세그먼트들을 고려하여 현재 블록(2201)을 예측하는 방법에 따른 현재 블록(2201)의 예측 블록을 나타낸다. P1(x, y)은 기존의 사각형의 예측 블록을 이용하는 인트라 예측 또는 인터 예측 방법에 따른 현재 블록(2201)의 예측 블록을 나타낼 수 있다. P(x, y)는 현재 블록(2201)의 최종 예측 블록을 나타낼 수 있다.
예를 들어, P1(x, y)은 HEVC의 플래너(planar) 모드를 이용하여 생성된 현재 블록(2201)의 예측 블록일 수 있다. 또는, P1(x, y)은 HEVC의 MPM(most probable mode) 규칙에 의하여 선택된 첫 번째 모드를 이용하여 생성된 현재 블록(2201)의 예측 블록일 수 있다.
또한, 일 실시예에 따른 현재 블록(2201)의 최종 예측 블록은 각각의 예측 블록에 가중치를 할당하여 아래와 같이 생성될 수도 있다.
P(x, y) = (3 * P0(x, y) + P1(x, y) + 2) >> 2
현재 블록(2201)의 예측 블록을 위와 같은 다양한 방법의 조합에 의하여 생성함에따라, 현재 블록(2201) 내의 샘플값의 기울기(gradient) 또는 텍스쳐(texture)의 표현에 대한 부호화 효율을 높일 수 있다. 현재 블록(2201)의 예측 블록을 위와 같은 다양한 방법의 조합하는 방법은 블록 단위로 선택적으로 적용될 수도 있다.
도 23은 일 실시예에 따른 현재 블록(2301)의 세그먼트에 대하여 예측을 수행하는 방법을 나타낸다.
도 23을 참조하면, 일 실시예에 따른 윤곽의 모드가 제 4 모드인 현재 블록(2301)이 나타난다.
윤곽의 모드가 제 4 모드인 경우, 일 실시예에 따른 현재 블록(2301)은 좌측(또는, 좌상측) 세그먼트와 우측(또는, 우하측) 세그먼트로 분할될 수 있다. 이때, 현재 블록(2301)의 우측 세그먼트는 현재 블록(2301)의 상측 참조 샘플 및 좌측 참조 샘플 중 어느 참조 샘플과도 인접하지 않기 때문에, 현재 블록(2301)의 우측 세그먼트의 샘플값은 현재 블록(2301)의 인접한 상측 참조 샘플 및 좌측 참조 샘플을 이용할 수 없다.
한편, 도 23을 참조하면, 일 실시예에 따른 현재 블록(2301)의 우측 세그먼트의 샘플값은 현재 블록(2301)의 주변 샘플을 참조하여 생성될 수 있다. 이때, 참조되는 현재 블록(2301)의 주변 샘플은 현재 블록(2301)에 인접하는 샘플이 아닐 수 있다.
구체적으로, 일 실시예에 따른 현재 블록(2301)의 우측 세그먼트의 샘플값은, 현재 블록(2301)의 외부에 인접하는 상측 샘플 및 좌측 샘플을 확장한 위치의 샘플들을 참조하여 생성될 수 있다. 예를 들어, 참조 샘플은 현재 블록(2301)의 상측 샘플을 우측으로 확장한 위치의 샘플 및 현재 블록(2301)의 좌측 샘플을 하측으로 확장한 위치의 샘플일 수 있다. 예를 들어, 참조 샘플은 현재 블록(2301)의 우측 상단 블록(2302)의 우측 하단에 위치한 샘플 및 현재 블록(2301)의 좌측 하단 블록(2302)의 우측 하단에 위치한 샘플을 포함할 수 있다.
예를 들어, 일 실시예에 따른 현재 블록(2301)의 우측 세그먼트의 샘플값은 블록(2302)의 우측 하단에 위치한 샘플의 샘플값 및 블록(2301)의 좌측 하단 블록(2302)의 우측 하단에 위치한 샘플의 샘플값의 평균값으로 결정될 수 있다.
또한, 다른 실시예에 따른 현재 블록(2301)의 우측 세그먼트의 샘플값은, 현재 블록(2301)의 인접하거나 인접하지 않은 주변의 참조 샘플을 참조하지 않고, 비디오 부호화 장치(10) 및 비디오 복호화 장치(20) 간에 직접 송수신될 수 있다.
구체적으로, 일 실시예에 따른 비디오 부호화 장치(10)는 현재 블록(2301)의 우측 세그먼트에 대응되는 영역에 포함되는 샘플들의 샘플값을 이용하여 우측 세그먼트의 샘플값을 결정할 수 있다. 예를 들어, 우측 세그먼트의 샘플값은 현재 블록(2301)의 우측 세그먼트에 대응되는 영역에 포함되는 샘플들의 샘플값의 평균으로 결정될 수 있다. 일 실시예에 따른 비디오 부호화 장치(10)는 결정된 우측 세그먼트의 샘플값을 비디오 복호화 장치(20)로 전송할 수 있다.
이때, 일 실시예에 따른 우측 세그먼트의 샘플값은 현재 블록(2301)의 샘플들의 비트 뎁스와 동일한 비트 뎁스의 데이터로 전송될 수 있다. 또는, 우측 세그먼트의 샘플값은 전송 효율을 위하여 양자화를 거쳐 현재 블록(2301)의 샘플들의 비트 뎁스 보다 작은 비트 뎁스의 데이터로 전송될 수 있다.
도 24는 다양한 실시예에 따른 현재 블록(2301)의 세그먼트들의 샘플값을 전송하는 방법을 설명하기 위한 도면이다.
일 실시예에 따른 현재 블록(2301)의 세그먼트의 샘플값이 비디오 부호화 장치(10)와 비디오 복호화 장치(20) 간에 전송되는 경우, 세그먼트의 샘플값은 전송 효율을 위하여 양자화 및 역양자화될 수 있다.
구체적으로, 일 실시예에 따른 비디오 부호화 장치(10)는 결정된 세그먼트의 샘플값이 8 비트의 DC 값인 경우, 결정된 세그먼트의 샘플값을 아래와 같이 4 비트의 값으로 균등하게(uniformly) 양자화할 수 있다.
DCquant = DCorig >> 4
이때, DCquant는 양자화된 샘플값이고, DCorig은 양자화 전의 샘플값일 수 있다. 또는, 일 실시예에 따른 비디오 부호화 장치(10)는 결정된 세그먼트의 샘플값을 반올림하여 아래와 같이 4 비트의 값으로 균등하게(uniformly) 양자화할 수도 있다.
DCquant = (DCorig + 8) >> 4
또한, 일 실시예에 따른 비디오 복호화 장치(20)는 비디오 부호화 장치(10)로부터 수신된 세그먼트의 샘플값을 아래와 같이 역양자화할 수 있다.
DC = DCquant << 4
또는, 일 실시예에 따른 비디오 복호화 장치(20)는 비디오 부호화 장치(10)로부터 수신된 세그먼트의 샘플값을 아래와 같이 역양자화할 수 있다.
DC = (DCquant << 4) + 8
또한, 다른 일 실시예에 따른 비디오 부호화 장치(10)와 비디오 복호화 장치(20)는 세그먼트의 샘플값을 각각 비균등(non-uniformly) 양자화 및 역양자화할 수 있다.
구체적으로, 도 24를 참조하면, 현재 블록(2301)의 샘플들의 비트 뎁스가 8비트인 경우의 비균등(non-uniformly) 양자화를 위한 양자화 계수가 나타난다. 도 24의 표를 보면, 그래프 내의 숫자는 양자화 전의 샘플값이고, y좌표는 양자화된 샘플값일 수 있다. x좌표는 양자화된 샘플값이 스케일링된 결과값일 수 있다.
이때, 세그먼트의 샘플값은 중간값인 128의 근처에서 더욱 세밀하게 양자화될 수 있고, 양자화된 샘플값은 4비트의 데이터로 스케일링 될 수 있다. 이러한 비균등 양자화를 하는 경우, 중간값의 근처에 샘플값이 존재할 확률이 클 수 있으므로 부호화 효율을 높일 수 있다.
구체적으로, 일 실시예에 따른 비디오 부호화 장치(10)는 세그먼트의 샘플값을 아래와 같이 비균등 양자화할 수 있다.
DC = 128 + (DCIdx < 7 -1, 1) * (((DCIdx - 7) * (DCIdx - 7) * 585 + 128) >> 8)
한편, 현재 블록(2301)의 윤곽의 모드가 제 4 모드인 경우, 일 실시예에 따른 현재 블록(2301)의 우측 세그먼트의 샘플값 또는 예측값은 비디오 부호화 장치(10)와 비디오 복호화 장치(20) 간에 송수신될 수 있다.
그러나, 다른 일 실시예에 따른 비디오 부호화 장치(10)는 윤곽의 모드에 관계 없이, 현재 블록에 인접한 주변 참조 샘플들을 이용할 수 있는 경우에도, 정확한 예측을 위하여 현재 블록의 모든 세그먼트들의 샘플값을 전송할 수도 있다.
도 25 및 도 26는 다양한 실시예에 따른 현재 블록(2510, 2610, 2620)의 주변 샘플들을 이용하여 현재 블록의 세그먼트의 샘플값을 생성하는 방법을 나타낸다.
도 25를 참조하면, 8x8 크기의 현재 블록(2510)과 현재 블록(2510)의 인접한 주변 샘플들이 나타난다. 일 실시예에 따른 현재 블록(2510)의 주변 샘플들은 현재 블록(2510)의 상측 주변 샘플, 좌측 주변 샘플 및 좌상측 주변 샘플을 포함할 수 있다. 이때, 도 25에 나타난 샘플들은 루마 성분의 샘플들일 수 있다.
일 실시예에 따른 현재 블록(2510)의 샘플값은 주변 샘플들 중 일부의 참조 샘플을 참조하여 생성될 수 있다. 예를 들어, 현재 블록(2510)의 주변 샘플들 중 윤곽까지의 소정의 거리 이상 되는 주변 샘플들이 참조 샘플로 결정될 수 있다.
구체적으로, 도 25를 참조하면, 현재 블록(2510)의 윤곽의 제 1 좌표(2501)와 제 2 좌표(2502)를 이용하여 현재 블록(2510)의 참조 샘플이 결정될 수 있다. 예를 들어, 현재 블록(2510)의 윤곽의 제 1 좌표(2501)와 제 2 좌표(2502)는 도 11 내지 도 14에서 상술한 방법에 따라 현재 블록에 인접한 샘플의 위치로 결정될 수 있다.
일 실시예에 따른 현재 블록(2510)의 참조 샘플은, 현재 블록(2510)의 주변 샘플 중 윤곽의 제 1 좌표(2501) 및 제 2 좌표(2502)와의 거리가 소정 거리 이상 되는 주변 샘플로 결정될 수 있다. 예를 들어, 현재 블록(2510)의 윤곽의 모드가 제 3 모드여서 현재 블록(2510)은 현재 블록(2510)의 좌상측의 제 1 세그먼트와 우하측의 제 2 세그먼트로 분할될 수 있다.
일 실시예에 따른 현재 블록(2510)의 제 1 세그먼트의 샘플값은, 제 1 세그먼트에 인접하는 상측의 주변 샘플들 중 현재 블록(2510)의 윤곽의 제 1 좌표(2501)로부터 좌측으로 소정의 거리 이상 떨어진 참조 샘플과 제 1 세그먼트에 인접하는 좌측의 주변 샘플들 중 현재 블록(2510)의 윤곽의 제 2 좌표(2502)로부터 상측으로 소정의 거리 이상 떨어진 참조 샘플을 이용하여 결정될 수 있다.
또한, 일 실시예에 따른 현재 블록(2510)의 제 2 세그먼트의 샘플값은, 제 2 세그먼트에 인접하는 상측의 주변 샘플들 중 현재 블록(2510)의 윤곽의 제 1 좌표(2501)로부터 우측으로 소정의 거리 이상 떨어진 참조 샘플과 제 2 세그먼트에 인접하는 좌측의 주변 샘플들 중 현재 블록(2510)의 윤곽의 제 2 좌표(2502)로부터 하측으로 소정의 거리 이상 떨어진 참조 샘플을 이용하여 결정될 수 있다.
이때, 소정의 거리는, 현재 블록(2510)의 크기, 연산의 효율, 영상의 화질 등을 고려하여 미리 설정된 거리로서, 예를 들어, 도 25에서는 2 픽셀이 될 수 있다.
도 26를 참조하면, 4x4 크기의 현재 블록(2610, 2620)과 현재 블록(2610, 2620)의 인접한 주변 샘플들이 나타난다. 다양한 실시예에 따른 현재 블록(2610, 2620)의 주변 샘플들은 현재 블록(2610, 2620)의 상측 주변 샘플, 좌측 주변 샘플 및 좌상측 주변 샘플을 포함할 수 있다. 이때, 도 26에 나타난 샘플들은 크로마 성분의 샘플들일 수 있다.
일 실시예에 따른 현재 블록(2610)의 샘플값은 주변 샘플들 중 일부의 참조 샘플을 이용하여 생성될 수 있다. 예를 들어, 현재 블록(2610)의 주변 샘플들 중 윤곽으로부터 소정의 거리 이상 떨어진 주변 샘플들이 참조 샘플로 결정될 수 있다.
구체적으로, 도 26를 참조하면, 현재 블록(2610)의 윤곽의 제 1 좌표(2601)와 제 2 좌표(2602)를 이용하여 현재 블록(2610)의 참조 샘플이 결정될 수 있다. 이때, 일 실시예에 따른 크로마 성분의 현재 블록(2610)은 하프 픽셀 정밀도의 블록일 수 있다. 예를 들어, 도 26에서, 현재 블록(2610)의 윤곽의 제 1 좌표(2601)는 현재 블록(2610)의 상측의 정수 샘플 위치로 결정되고, 제 2 좌표(2602)는 현재 블록(2610)의 좌측의 하프 샘플 위치로 결정될 수 있다.
일 실시예에 따른 현재 블록(2610)의 참조 샘플은, 현재 블록(2610)의 주변 샘플 중 윤곽의 제 1 좌표(2601) 및 제 2 좌표(2602)와 소정 거리 이상 떨어진 주변 샘플로 결정될 수 있다. 예를 들어, 현재 블록(2610)의 윤곽의 모드가 제 3 모드여서 현재 블록(2610)은 현재 블록(2610)의 좌상측의 제 1 세그먼트와 우하측의 제 2 세그먼트로 분할될 수 있다.
일 실시예에 따른 현재 블록(2610)의 제 1 세그먼트의 샘플값은, 제 1 세그먼트에 인접하는 상측의 주변 샘플들 중 현재 블록(2610)의 윤곽의 제 1 좌표(2601)로부터 좌측으로 소정의 거리 이상 떨어진 참조 샘플과 제 1 세그먼트에 인접하는 좌측의 주변 샘플들 중 현재 블록(2610)의 윤곽의 제 2 좌표(2602)로부터 상측으로 소정의 거리 이상 떨어진 참조 샘플을 이용하여 결정될 수 있다.
또한, 일 실시예에 따른 현재 블록(2610)의 제 2 세그먼트의 샘플값은, 제 2 세그먼트에 인접하는 상측의 주변 샘플들 중 현재 블록(2610)의 윤곽의 제 1 좌표(2601)로부터 우측으로 소정의 거리 이상 떨어진 참조 샘플과 제 2 세그먼트에 인접하는 좌측의 주변 샘플들 중 현재 블록(2610)의 윤곽의 제 2 좌표(2602)로부터 하측으로 소정의 거리 이상 떨어진 참조 샘플을 이용하여 결정될 수 있다.
이때, 소정의 거리는, 블록의 크기, 연산의 효율, 영상의 화질 등을 고려하여 미리 설정된 거리로서, 예를 들어, 도 26에서 소정의 거리는, 도 25의 루마 블록인 현재 블록(2510)의 절반인 1 픽셀이 될 수 있다.
또는, 다른 일 실시예에 따른 크로마 성분의 현재 블록(2620)의 참조 샘플은, 정수 픽셀 단위의 제 1 좌표(2603) 및 제 2 좌표(2604)에 기초하여 결정될 수 있다. 일 실시예에 따른 크로마 성분의 현재 블록(2620)의 윤곽의 제 1 좌표(2603) 및 제 2 좌표(2604)는 현재 블록(2620)의 정수 단위의 주변 샘플의 위치로 결정되고, 현재 블록(2620)의 참조 샘플은 결정된 제 1 좌표(2603) 및 제 2 좌표(2604)로부터 소정 거리 이상 떨어진 주변 샘플로 결정될 수 있다.
도 27은 일 실시예에 따른 비디오 복호화 장치(20)에서 현재 블록으로부터 분할되는 세그먼트의 개수에 따른 현재 블록의 예측 방법의 흐름도를 나타낸다.
일 실시예에 따른 현재 블록은 현재 블록으로부터 분할되는 세그먼트의 개수에 따라 다른 예측 방법을 이용하여 예측될 수 있다.
구체적으로, 2710 단계에서, 일 실시예에 따른 현재 블록으로부터 분할되는 세그먼트의 개수가 결정될 수 있다. 예를 들어, 현재 블록으로부터 분할되는 세그먼트의 개수는 세그먼트의 개수에 관한 정보(seg_num_minus1)에 기초하여 결정될 수 있다.
2720 단계에서, 현재 블록으로부터 분할되는 세그먼트의 개수가 1개인 경우, 현재 블록은 현재 블록 내에 물체의 경계를 포함하지 않는 것일 수 있다. 이때, 현재 블록은 하나의 세그먼트로 결정될 수 있다.
또한, 현재 블록으로부터 결정된 하나의 세그먼트에 대한 예측 모드가 결정될 수 있다. 예를 들어, 현재 블록으로부터 결정된 하나의 세그먼트에 대한 예측 모드는 현재 블록의 주변 샘플들을 이용하여 현재 블록의 예측값을 생성하는 DC 모드, 플래너(planar) 모드, 수직(vertical) 모드, 수평(horizontal) 모드 또는 이들의 조합을 나타내는 모드가 될 수 있다.
2730 단계에서, 현재 블록으로부터 분할되는 세그먼트의 개수가 2개인 경우, 현재 블록은 물체의 경계에 따른 윤곽에 기초하여 두 개의 세그먼트로 분할되고, 각각의 세그먼트에 대한 예측이 수행될 수 있다.
또한, 2730 단계는, 세그먼트의 개수가 2개인 경우뿐만 아니라 3개 이상인 경우도 포함할 수 있다.
도 28은 일 실시예에 따른 현재 블록의 변환 단위에 따른 현재 블록의 레지듀얼 데이터의 부호화 및 복호화 과정을 설명하기 위한 도면이다.
일 실시예에 따른 현재 블록은 주파수의 변환의 기반이 되는 데이터 단위인 변환 단위로 분할될 수 있다. 이때, 변환 단위는 현재 블록의 윤곽을 포함하는 변환 단위와 현재 블록의 윤곽을 포함하지 않는 변환 단위로 구분하여 처리될 수 있다.
구체적으로, 현재 블록의 윤곽을 포함하지 않는 변환 단위의 경우, 현재 블록에 대하여 생성된 예측 블록과 원본 블록과의 차분에 따른 레지듀얼 데이터를 생성하고, 변환, 양자와 및 엔트로피 디코딩을 수행하여 레지듀얼 레이터를 처리할 수 있다. 또는, 현재 블록의 변환 단위에 대해 예측을 수행하여 변환 단위에 대한 예측 블록과 원본 블록과의 차분에 따른 레지듀얼 데이터를 생성하여 처리할 수 있다.
또한, 현재 블록의 윤곽을 포함하는 변환 단위의 경우, 현재 블록에 대하여 생성된 예측 블록과 원본 블록과의 차분에 따른 레지듀얼 데이터를 생성할 수 있다. 또는, 현재 블록의 변환 단위에서 현재 블록의 각각의 세그먼트의 영역을 고려하여 예측 블록을 생성하여 이용할 수 있다. 예를 들어, 예측 블록의 생성 시에는, 생성된 현재 블록의 마스크가 이용될 수도 있고, 변환 단위에 대한 마스크가 새로이 생성되어 이용될 수도 있다.
또한, 일 실시예에 따른 현재 블록의 변환 단위에 대하여, 변환 단위 간의 경계의 오차를 줄여주기 위한 필터링이 수행될 수 있다. 예를 들어, 도 28을 참조하면, 8x8 크기의 변환 단위가 도시된다.
일 실시예에 따른 변환 단위의 가장자리에 위치한 샘플들은 인접한 주변 샘플들에 기초하여 필터링될 수 있다. 예를 들어, 인접한 주변 샘플들은 사용 가능한 샘플들로서 변환 단위의 상측 샘플 및 좌측 샘플을 포함할 수 있고, 사용 가능한 주변 샘플들에 인접한 변환 단위의 가장자리에 위치한 샘플들이 필터링될 수 있다.
구체적으로, 변환 단위의 필터링되는 샘플은 아래와 같이 필터링될 수 있다.
C = (A + B + 1) >> 1
이때, C는 변환 단위의 샘플의 필터링된 샘플값을 나타내고, B는 변환 단위의 샘플의 필터링 되기 전의 샘플값을 나타내고, A는 변환 단위의 샘플을 필터링하기 위하여 이용되는 주변 샘플의 샘플값을 나타낼 수 있다.
또한, 변환 단위의 필터링 되는 샘플이 상측 샘플과 좌측 샘플에 모두 인접하는 경우(예를 들어, 변환 단위 내의 좌상측 샘플), 변환 단위의 필터링되는 샘플은 아래와 같이 상측 샘플의 샘플값(A0) 및 좌측 샘플의 샘플값(A1)을 모두 이용하여 필터링 될 수 있다.
C = (A0 + A1 + 2 * B + 2) >> 2
또한, 변환 단위의 필터링되는 샘플은 아래와 같이 샘플값들에 서로 다른 가중치를 두어 필터링될 수도 있다.
C = (A + 3 * B + 2) >> 2
C = (A0 + A1 + 6 * B + 4) >> 3
일 실시예에 따른 변환 단위에 대한 필터링은 루마 성분의 변환 블록 및 크로마 성분의 변환 블록에 각각 적용될 수 있으며, 연산의 복잡도를 줄이기 위하여 루마 성분에만 적용될 수도 있다.
도 29 내지 도 31은 다양한 실시예에 따른 현재 블록의 윤곽을 현재 블록의 주변 블록으로부터 획득하는 방법을 나타낸다.
도 29는 일 실시예에 따른 현재 블록(2910)의 윤곽을 현재 블록(2910)의 주변 블록(2920)으로부터 획득하는 방법을 나타낸다. 예를 들어, 일 실시예에 따른 현재 블록(2910)의 주변 블록(2920)은 현재 블록(2910)에 좌측으로 인접하는 블록일 수 있다.
구체적으로, 비디오 디코딩 과정에서 현재 블록(2910)의 주변 블록(2920)의 복원이 완료되면, 주변 블록(2920)의 블록의 분할에 관한 정보를 이용하여 현재 블록(2910)의 블록의 분할에 관한 정보를 획득할 수 있다. 예를 들어, 주변 블록(2920)의 블록의 분할에 관한 정보는 윤곽의 좌표에 관한 정보일 수 있다.
예를 들어, 현재 블록(2910)의 윤곽의 모드 정보 및 윤곽의 좌표는 현재 블록의 주변 블록(2920)의 윤곽의 좌표 정보를 이용하여 결정될 수 있다.
도 29를 참조하면, 주변 블록(2920)의 윤곽은 제 1 좌표(2921)와 제 2 좌표(2922)를 지나는 단일 직선 윤곽으로서, 윤곽의 모드는 제 1 모드일 수 있다. 주변 블록(2920)의 윤곽은 픽처 내의 물체의 경계에 따른 것이므로 현재 블록(2910)의 윤곽과 연결될 가능성이 높으므로, 주변 블록(2920)의 윤곽을 연장선 상에 현재 블록(2910)의 윤곽이 존재할 확률이 높을 수 있다. 따라서, 일 실시예에 따른 주변 블록(2920)의 윤곽을 현재 블록(2910)을 향하여 확장하여 현재 블록(2910)의 윤곽을 유도할 수 있다.
예를 들어, 주변 블록(2920)의 윤곽은 주변 블록(2920)의 윤곽의 제 1 좌표(2921) 및 제 2 좌표(2922)에 기초하여 현재 블록(2910)을 향하여 확장될 수 있다. 또한, 주변 블록(2920)의 윤곽은 주변 블록(2920)의 윤곽의 기울기에 기초하여 현재 블록(2910)의 방향으로 확장될 수 있다.
도 29를 참조하면, 주변 블록(2920)의 윤곽을 확장하여 획득되는 현재 블록(2910)의 윤곽은, 제 1 좌표(2911) 및 제 2 좌표(2912)를 지나고 모드가 제 5 모드인 직선 윤곽으로 결정될 수 있다.
구체적으로, 일 실시예에 따른 현재 블록(2910)의 윤곽을 주변 블록(2920)을 이용하여 결정하는 방법은 다음과 같은 과정에 의하여 수행될 수 있다.
먼저, 현재 블록(2910)의 주변 블록(2920)의 윤곽에 관한 정보가 사용 가능한지 여부가 결정될 수 있다. 예를 들어, 주변 블록(2920)이 현재 블록(2910) 보다 먼저 복호화되고, 주변 블록(2920) 내에 윤곽이 존재하는 경우, 주변 블록(2920)의 윤곽에 관한 정보가 사용 가능한 것으로 결정될 수 있다. 이때, 윤곽에 관한 정보는 윤곽의 모드 정보 및 좌표 정보를 포함할 수 있으며, 주변 블록(2920) 내에 윤곽이 존재하는지 여부는 주변 블록(2920)의 세그먼트의 개수에 관한 정보에 기초하여 결정될 수 있다.
현재 블록(2910)의 주변 블록(2920)의 윤곽에 관한 정보가 사용 가능한 것으로 결정되면, 현재 블록(2910)의 방향으로 확장된 주변 블록(2920)의 윤곽이 현재 블록(2910)을 지나는지 여부가 결정될 수 있다.
확장된 주변 블록(2920)의 윤곽이 현재 블록(2910)을 지난다면, 확장된 주변 블록(2920)의 윤곽에 기초하여 현재 블록(2910)의 윤곽의 모드 및 좌표를 결정할 수 있다. 예를 들어, 현재 블록(2910)의 가장자리에 위치한 샘플들 중 확장된 주변 블록(2920)의 윤곽이 지나는 샘플의 위치가 현재 블록(2910)의 윤곽의 좌표가 될 수 있고, 현재 블록(2910)의 윤곽의 좌표에 따라 현재 블록(2910)의 윤곽의 모드가 결정될 수 있다.
이때, 주변 블록(2920)의 윤곽에 관한 정보에 대한 샘플 정밀도가 현재 블록(2910)의 샘플 정밀도와 상이한 경우, 주변 블록(2920)으로부터 유도된 현재 블록(2910)의 윤곽에 관한 정보를 샘플 정밀도의 차이만큼 변환하고, 변환된 샘플 정밀도에 따른 윤곽의 정보를 이용할 수 있다. 예를 들어, 쿼터 픽셀 정밀도 주변 블록(2920)의 윤곽에 관한 정보를 이용하여 유도된 쿼터 픽셀 정밀도의 현재 블록(2910)의 윤곽에 관한 정보를 정수 픽셀 정밀도의 정보로 변환할 수 있다.
또한, 도 30을 참조하면, 현재 블록(3010)의 윤곽에 관한 정보는 현재 블록(3010)의 좌측 블록(A1) 이외에도 다른 주변 블록들을 이용하여 획득될 수 있다. 예를 들어, 현재 블록(3010)의 좌측 블록(A1), 좌하측 블록(A0), 상측 블록(B1), 우상측 블록(B0) 및 좌상측 블록(B2)이 이용될 수 있으며, 이 외에도 현재 블록(3010)의 근처에 위치하는 블록들 중 현재 블록(3010) 보다 먼저 복호화된 블록이 이용될 수 있다.
또한, 다수의 주변 블록들 중 하나의 주변 블록을 이용하는 경우, 주변 블록들을 후보로 하는 리스트가 생성될 수 있다. 예를 들어, 주변 블록의 후보 리스트는 좌측 블록(A1), 상측 블록(B1), 우상측 블록(B0), 좌하측 블록(A0) 및 좌상측 블록(B2)를 순서대로 포함할 수 있다. 또한, 주변 블록의 후보 리스트는 좌측 블록(A1), 상측 블록(B1), 좌상측 블록(B2), 우상측 블록(B0) 및 좌하측 블록(A0)을 순서대로 포함할 수도 있으나, 이에 제한되지 않고 다양한 순서로 주변 블록들을 포함하는 주변 블록의 후보 리스트가 비디오 부호화 장치(10)와 비디오 복호화 장치(20)에서 동일하게 생성될 수 있다.
이때, 복수 개의 주변 블록들에 대하여 유도되는 현재 블록(3010)의 윤곽이 동일한 경우, 복수 개의 주변 블록 중 하나의 주변 블록만이 후보로 포함되도록 주변 블록의 후보 리스트를 생성할 수 있다. 예를 들어, 동일한 현재 블록(3010)의 윤곽이 유도되는 후보들을 제외하는 프루닝(pruning) 과정이 수행됨으로써, 복수 개의 주변 블록 중 하나의 주변 블록만이 후보로 포함될 수 있다.
또한, 비디오 부호화 장치(10) 및 비디오 복호화 장치(20) 간에 주변 블록의 후보 리스트 중 하나의 후보를 가리키는 인덱스 정보가 송수신될 수 있다. 또는, 주변 블록의 후보 리스트가 하나의 후보만을 포함하는 경우, 인덱스 정보는 송수신되지 않을 수도 있다.
또한, 현재 블록(3010)의 윤곽은 주변 블록의 후보 리스트에 포함된 후보들 중 복수 개의 후보 블록을 이용하여 유도될 수도 있다.
또한, 현재 블록(3010)의 윤곽은 주변 블록으로부터 유도된 현재 블록(3010)의 윤곽의 좌표를 조정(refine)함으로써 결정될 수도 있다. 예를 들어, 주변 블록으로부터 유도된 현재 블록(3010)의 윤곽의 좌표는 x축 또는 y축으로 소정의 값에 따라 이동함으로써 조정될 수 있다. 소정의 값은 +1, -1, +2, -2 등의 값이 될 수 있다.
또한, 주변 블록의 윤곽의 좌표 조정하여, 조정된 주변 블록의 윤곽에 관한 정보가 현재 블록(3010)의 윤곽의 획득에 이용되는 주변 블록의 후보 리스트에 포함될 수 있다.
또한, 주변 블록으로부터 유도되는 현재 블록(3010)의 윤곽에 관한 정보를 예측 데이터로 이용할 수도 있다. 예를 들어, 비디오 복호화 장치(20)는 현재 블록(3010) 내의 샘플들을 이용하여 결정되는 현재 블록(3010)의 윤곽에 관한 정보와 주변 블록으로부터 유도되는 현재 블록(3010)의 윤곽에 관한 정보 간의 차분값을 부호화하여 비디오 복호화 장치(20)로 전송할 수 있다. 비디오 복호화 장치(20)는 수신되는 차분값과 현재 블록의 주변 블록으로부너 유도되는 현재 블록(3010)의 윤곽에 관한 정보에 기초하여 현재 블록(3010)의 윤곽의 좌표를 결정함으로써 더욱 정확한 현재 블록(3010)의 복호화가 가능할 수 있다.
또한, 비디오 부호화 장치(10) 및 비디오 복호화 장치(20)에서 주변 블록의 후보 리스트를 생성하는 경우, 후보 리스트는 디폴트 블록을 더 포함할 수 있다. 구체적으로, 후보 리스트에 포함된 주변 블록 후보가 소정의 개수보다 작은 경우 후보 리스트는 디폴트 블록을 더 포함할 수 있다. 예를 들어, 후보 리스트에 대한 소정의 개수는 5개 일 수 있다. 도 31을 참조하면, 디폴트 블록의 예시들이 나타난다. 예를 들어, 리스트에 포함된 주변 블록 후보가 소정의 개수보다 작은 경우, 도 31의 디폴트 블록들이 차례로 후보 리스트에 포함될 수 있다.
또한, 현재 블록(3010)의 주변 블록이 윤곽에 따라 부호화되지 않아 주변 블록의 윤곽에 관한 정보가 없는 경우, 복원된 주변 블록에 기초하여 주변 블록의 윤곽에 관한 정보를 생성할 수 있다. 복원된 주변 블록에 기초하여 생성된 주변 블록의 윤곽에 관한 정보는 버퍼에 저장되었다가 현재 블록(3010)의 부호화 시에 현재 블록(3010)의 윤곽의 결정에 이용될 수 있다. 이때, 비디오 복호화 장치(20)에서도 동일한 방법으로 복원된 주변 블록을 이용하여 현재 블록(3010)을 복호화할 수 있다.
또한, 일 실시예에 따른 물체의 경계에 따른 윤곽에 기초하여 부호화된 현재 블록(3010)이 블록 단위로 복호화되는 경우, 일반적인 블록 단위의 예측 방법(예를 들어, HEVC의 인트라 예측) 중 하나의 모드가 선택될 수 있다.
구체적으로, 현재 블록(3010)의 예측 모드는, 현재 블록(3010)의 MPM(most probable mode) 모드 리스트 중 첫 번째 모드로 결정될 수 있다. 예를 들어, 현재 블록(3010)의 MPM 모드 리스트는 현재 블록(3010)에 인접한 좌측 블록 또는 상측 블록의 모드를 포함할 수 있다. 또한, 현재 블록(3010)의 MPM 모드 리스트는 플래너 모드, DC 모드, 수직(vertical) 모드 등을 더 포함할 수 있다. 또는, 현재 블록(3010)의 예측 모드는 DC 모드로 결정될 수도 있고, 현재 블록(3010)의 예측 모드는 현재 블록(3010)의 윤곽의 기울기와 가장 유사한 각도의 앵귤러(angular) 모드로 결정될 수도 있다.
또한, 일 실시예에 따른 현재 블록(3010)의 윤곽에 관한 정보는, 현재 블록에 포함된 샘플들에 대한 에지 방향을 나타내는 정보를 포함하는 에지 맵(edge map)을 참조하여 획득될 수 있다. 현재 블록(3010)의 에지 맵은 픽처 단위 또는 블록 단위로 생성될 수 있고, 슬라이스 헤더 또는 현재 블록(3010)의 헤더에 포함되어 전송될 수 있다.
도 32 및 도 33은 다양한 실시예에 따른 블록들(3210, 3220)의 서브 블록을 이용하여 예측을 수행하는 방법을 나타낸다.
도 32를 참조하면, 일 실시예에 따른 블록(3210) 및 블록(3220)이 나타난다. 일 실시예에 따른 블록(3210) 및 블록(3220)이 직선 윤곽을 이용하여 분할되는 경우, 블록(3210) 및 블록(3220)은 서브 블록을 이용할 수 있다. 예를 들어, 블록(3210) 및 블록(3220)은 각각 64x64 크기의 블록이고, 블록(3210) 및 블록(3220)의 서브 블록은 각각 8x8 크기의 블록일 수 있다.
구체적으로, 블록(3210)을 참조하면, 블록(3210)에 포함된 물체의 경계는 곡선이기 때문에 블록(3210)을 직선 윤곽에 기초하여 분할하는 경우 부호화 효율이 떨어질 수 있다. 따라서, 일 실시예에 따른 블록(3210)을 서브 블록(3211)을 포함하는 복수 개의 서브 블록들로 분할하고, 복수 개의 서브 블록들을 각각 직선 윤곽을 기초로 분할함으로써 부호화 효율이 향상될 수 있다.
일 실시예에 따른 블록(3210)의 서브 블록들은 물체의 경계에 따른 직선 윤곽에 기초하여 적어도 하나의 세그먼트로 분할되고, 각각의 세그먼트에 대하여 예측이 수행될 수 있다. 이때, 물체의 경계가 포함되지 않은 서브 블록은 일반적인 인트라 예측 방법에 따라 예측될 수도 있다.
또한, 블록(3220)을 참조하면, 복수 개의 물체의 경계를 포함하는 블록(3220)이 나타난다. 구체적으로, 블록(3220)은 두 개의 물체의 경계를 포함하므로 두 개의 물체의 경계에 따른 두 개의 직선 윤곽을 이용하는 방법은 단일 직선 윤곽을 이용하는 방법보다 복잡도가 높을 수 있다. 따라서, 일 실시예에 따른 블록(3220)을 복수 개의 서브 블록들로 분할하고, 복수 개의 서브 블록들을 각각 단일 직선 윤곽을 기초로 분할함으로써 연산의 복잡도를 낮출 수 있다.
일 실시예에 따른 블록(3220)의 서브 블록들은 물체의 경계에 따른 단일 직선 윤곽에 기초하여 적어도 하나의 세그먼트로 분할되고, 각각의 세그먼트에 대하여 예측이 수행될 수 있다. 이때, 물체의 경계가 포함되지 않은 서브 블록은 일반적인 인트라 예측 방법에 따라 예측될 수도 있다.
도 33을 참조하면, 다양한 실시예에 따른 블록들(3310, 3320, 3330, 3340, 3350)에 포함된 서브 블록의 부호화 및 복호화 순서가 나타난다. 예를 들어, 다양한 실시예에 따른 블록(3310)이 서브 블록을 이용하여 분할되는 경우, 블록들(3310)의 서브 블록은 z-scan 순서에 따라 부호화 또는 복호화될 수 있다.
또한, 블록(3320)이 서브 블록으로 분할되는 경우, 블록(3320)의 서브 블록들은 좌측에서 우측 방향으로 순차적으로 부호화 또는 복호화될 수 있다.
또한, 블록(3330)이 서브 블록으로 분할되는 경우, 블록(3330)의 서브 블록들은 상측에서 우측 방향으로 순차적으로 부호화 또는 복호화될 수 있다.
또한, 블록(3340)이 서브 블록으로 분할되는 경우, 블록(3340)은 복수 개의 영역들로 먼저 구분되고, 복수 개의 영역의 우선 순위에 따라 블록(3340)의 서브 블록들이 부호화 또는 복호화될 수 있다. 예를 들어, 블록(3340)이 1 영역, 2 영역, 3 영역 및 4 영역으로 구분되고, 1 영역에 포함된 서브 블록들부터 순차적으로 부호화 또는 복호화될 수 있다. 또한, 블록(3340)의 1 영역 내의 서브 블록득 간에는 z-scan 순서에 따라 서브 블록들의 부호화 또는 복호화의 순서가 결정될 수 있다.
또한, 블록(3350)이 서브 블록으로 분할되는 경우, 블록(3350)은 복수 개의 영역 들로 먼저 구분되고, 복수 개의 영역의 우선 순위에 따라 블록(3350)의 서브 블록들이 부호화 또는 복호화될 수 있다. 예를 들어, 블록(3350)이 1 영역, 2 영역, 3 영역, 제 4 영역 및 5 영역으로 구분되고, 1 영역에 포함된 서브 블록들부터 순차적으로 부호화 또는 복호화될 수 있다. 또한, 블록(3340)의 1 영역 내의 서브 블록득 간에는 z-scan 순서에 따라 서브 블록들의 부호화 또는 복호화의 순서가 결정될 수 있다.
도 34는 일 실시예에 따른 현재 블록(3400)으로부터 세 개의 세그먼트를 결정하는 방법을 나타낸다.
일 실시예에 따른 현재 블록(3400)은 현재 블록(3400)의 제 1 윤곽(3401)에 기초하여 부호화 되고, 현재 블록(3400)에 관한 부호화 정보들은 비디오 복호화 장치(20)로 전송될 수 있다. 예를 들어, 전송되는 부호화 정보들은 현재 블록(3400)의 제 1 윤곽(3401)에 관한 정보를 포함할 수 있다.
도 34를 참조하면, 현재 블록(3400)의 제 1 윤곽(3401)의 모드는 제 4 모드일 수 있다.
일 실시예에 따른 현재 블록(3400)에 관한 부호화 정보들을 수신한 비디오 복호화 장치(20)는, 수신된 부호화 정보들로부터 현재 블록(3400)의 제 1 윤곽(3401)에 관한 정보를 획득할 수 있다. 비디오 복호화 장치(20)는 제 1 윤곽(3401)에 관한 정보에 기초하여 제 1 윤곽(3401)의 모드가 제 4 모드인 경우, 현재 블록(3400)의 상측 및 좌측을 지나는 제 2 윤곽(3402)을 결정할 수 있다. 이때, 현재 블록(3400)의 제 2 윤곽(3402)은 현재 블록(3400)에 인접하는 상측 주변 샘플 및 좌측 주변 샘플들을 이용하여 획득될 수 있다.
일 실시예에 따른 현재 블록(3400)은 비트스트림으로부터 획득된 부호화 정보들에 따른 제 1 윤곽(3401)과 현재 블록의 주변 샘플들로부터 유도되는 제 2 윤곽(3401)을 이용하여 세 개의 세그먼트로 분할되어 복호화될 수 있다. 예를 들어, 현재 블록(3400)은 제 1 윤곽(3401) 및 제 2 윤곽(3402)에 따라 제 1 세그먼트(3410), 제 2 세그먼트(3420) 및 제 3 세그먼트(3430)으로 분할될 수 있다.
이때, 일 실시예에 따른 현재 블록(3400)의 마스크는 제 1 세그먼트(3410), 제 2 세그먼트(3420) 및 제 3 세그먼트(3430)에 기초하여 생성될 수 있다. 예를 들어, 제 1 세그먼트(3410)에 대응되는 영역의 마스크값은 0으로, 제 2 세그먼트(3420)에 대응되는 영역의 마스크값은 255(혹은, 256)으로, 제 3 세그먼트(3430)에 대응되는 영역의 마스크값은 511(혹은, 512)로 결정될 수 있다. 또한, 제 1 세그먼트(3410)와 제 2 세그먼트(3420) 사이의 경계 영역의 마스크값은 0 내지 255의 값으로, 제 2 세그먼트(3420)와 제 3 세그먼트(3430) 사이의 경계 영역의 마스크값은 256 내지 511의 값으로 결정될 수 있다.
일 실시예에 따른 현재 블록(3400)은 추가적인 유도된 제 2 윤곽을 이용함으로써, 더욱 정확한 영상을 복원할 수 있다.
도 35는 일 실시예에 따른 현재 블록(3500)의 윤곽에 기초하여 현재 블록(3500)의 서브 블록을 이용하여 세그먼트들을 결정하는 방법을 나타낸다.
일 실시예에 따른 현재 블록(3500)은 현재 블록(3500)에 포함된 물체의 경계에 대응되는 윤곽에 기초하여 복수 개의 서브 블록들로 분할될 수 있다. 이때, 일 실시예에 따른 현재 블록(3500)은 현재 블록(3500)의 경계에 대응되는 윤곽을 결정할 수 있고, 결정된 윤곽을 이용하여 복수 개의 서브 블록으로 분할될 수 있다.
예를 들어, 현재 블록(3500)은 제 1 서브 블록(3510)과 같은 크기의 네 개의 제 1 서브 블록들로 분할될 수 있다. 제 1 서브 블록(3510)의 가로 및 세로의 길이는 각각 현재 블록(3500)의 가로 및 세로의 길이의 절반일 수 있다.
또한, 현재 블록(3500)은 현재 블록(3500)의 윤곽을 포함하는지 여부에 따라 계층적으로 연속해서 더 작은 서브 블록들로 분할될 수 있다. 예를 들어, 네 개의 제 1 서브 블록들 중 현재 블록(3500)의 윤곽을 포함하는 제 1 서브 블록은 가로 및 세로의 길이가 각각 제 1 서브 블록의 가로 및 세로의 길이의 절반인 네 개의 제 2 서브 블록들로 다시 분할될 수 있다. 네 개의 제 1 서브 블록들 중 현재 블록(3500)의 윤곽을 포함하지 않는 제 1 서브 블록(3510)은 더 이상 분할되지 않을 수 있다.
일 실시예에 따른 현재 블록(3500)은 분할된 제 1 서브 블록 및 제 2 서브 블록을 이용하여 세그먼트를 결정할 수 있다. 예를 들어, 제 2 서브 블록들 중 현재 블록(3500)의 윤곽을 포함하는 제 2 서브 블록(3520)에 대하여, 현재 블록(3500)의 윤곽에 기초하는 제 2 서브 블록(3520)의 윤곽이 결정될 수 있다. 또한, 결정된 제 2 서브 블록(3520)의 윤곽에 따라 제 2 서브 블록(3520)이 적어도 하나의 세그먼트로 분할될 수 있다. 예를 들어, 제 2 서브 블록(3520)은 직선 윤곽에 따라 두 개의 세그먼트로 분할될 수 있다.
일 실시예에 따른 현재 블록(3500)에 대하여, 현재 블록(3500)의 윤곽을 포함하지 않는 제 1 블록(3510) 및 제 2 블록(3520)과 현재 블록(3500)의 윤곽을 포함하는 제 2 블록(3520)으로부터 분할된 세그먼트들을 이용하여 예측이 수행될 수 있다.
예를 들어, 제 1 블록(3510) 및 제 2 블록(3520)에 대하여 DC 모드, 플래너(planar) 모드, 앵귤러(angular) 모드 등의 인트라 모드를 이용하여 인트라 예측이 수행될 수 있다. 제 2 블록(3520)과 같은 현재 블록(3500)의 윤곽을 포함하는 제 2 블록들에 대하여는 도 1 내지 도 4에서 설명된 블록 내의 물체의 경계에 따라 분할되는 세그먼트를 이용한 인트라 예측이 수행될 수 있다.
이때, 현재 블록(3500)이 분할되는 분할 심도는 부호화 효율에 기초하여 결정되고, 결정된 분할 심도는 비디오 부호화 장치(10)에서 비디오 복호화 장치(20)로 전송될 수 있다.
도 36은 일 실시예에 따른 현재 블록(3600)의 윤곽을 결정하는 방법을 나타낸다.
일 실시예에 따른 현재 블록(3600)에 포함된 물체의 경계가 단일 직선에 대응되지 않는 경우, 현재 블록(3600)의 윤곽은 구분적 선형(piece-wise linear) 윤곽을 이용하여 결정될 수 있다.
구체적으로, 일 실시예에 따른 현재 블록(3600)에서 물체의 경계에 대응되는 윤곽의 시작점을 나타내는 제 1 좌표(a)와 윤곽의 끝점을 나타내는 제 2 좌표(b)가 결정될 수 있다. 이때, 현재 블록(3600)의 윤곽을 제 1 좌표(a)와 제 2 좌표(b)를 연결하는 단일 직선으로 결정하지 않고, 제 3 좌표(d)를 이용하여 두 개의 직선으로 결정할 수 있다.
예를 들어, 제 3 좌표(d)는 제 1 좌표(a)와 제 2 좌표(b)를 연결하는 직선의 중심으로부터 소정의 변위량만큼 수직 이동된 좌표일 수 있다. 이때, 현재 블록(3600)의 윤곽을 결정하기 위하여 이용되는 정보는, 제 1 좌표(a), 제 2 좌표(b) 및 제 1 좌표(a)와 제 2 좌표(b)를 연결하는 직선의 중심으로부터 제 3 좌표(d)까지의 수직 거리를 나타내는 소정의 변위량일 수 있다.
일 실시예에 따른 현재 블록(3600)의 제 3 좌표(d)는 부호화 및 복호화 시의 연산의 복잡도를 낮추기 위하여 정수 픽셀 단위의 정밀도로 결정될 수 있다. 예를 들어, 실제 위치에서 가장 가까운 정수 샘플의 위치로 결정되는 방법 등이 이용될 수 있다. 또한, 제 3 좌표(d)를 나타내기 위한 소정의 변위량 또한 정수 단위로 결정될 수 있다. 소정의 변위량은 미리 설정된 복수 개의 변위량들 중 인덱싱될 수도 있다. 즉, 미리 설정된 복수 개의 변위량들 중 하나를 가리키는 인덱스 정보를 이용하여 소정의 변위량이 결정될 수 있으며, 인덱스 정보는 비디오 부호화 장치(10) 및 비디오 복호화 장치(20) 간에 송수신될 수 있다.
도 37은 일 실시예에 따른 현재 블록의 예측값을 획득하는 방법을 수도 코드(pseudo code)로 나타낸 일 예시이다.
일 실시예에 따른 현재 블록의 예측값은, 현재 블록으로부터 분할된 세그먼트의 샘플값이 먼저 생성되고, 생성된 세그먼트의 샘플값에 세그먼트의 영역 및 경계를 나타내는 마스크를 적용함으로써 생성될 수 있다.
이후, 일 실시예에 따른 현재 블록의 예측값에 필터링을 수행함으로써 예측 수행 시에 발생하는 오차를 줄일 수 있다. 구체적으로, 필터링은 현재 블록의 윤곽이 위치하는 경계 영역에 대해 수행될 수 있다.
예를 들어, 도 37의 수도 코드를 참조하면, 현재 블록의 샘플 중 현재 블록의 세그먼트들의 경계에 위치하는 샘플의 예측값에 대하여 필터링을 수행할 수 있다. 이때, 현재 블록의 샘플이 세그먼트들의 경계에 위치하는지 여부는 현재 블록의 마스크에 기초하여 판단될 수 있다. 도 37에서, Mask[x][y]는 현재 블록의 (x, y) 위치의 샘플의 마스크값을 나타내고, P[x][y]는 현재 블록의 (x, y) 위치의 샘플의 예측값을 나타내고, Pftr[x][y]은 현재 블록의 (x, y) 위치의 샘플의 필터링된 예측값을 나타낸다. W와 H는 각각 현재 블록의 너비 및 높이를 나타낸다.
일 실시예에 따른 현재 블록의 샘플이 세그먼트들의 경계에 위치하는 여부는 현재 샘플의 주변 샘플들의 마스크값을 비교함으로써 결정될 수 있다. 예를 들어, 좌측 샘플의 마스크값과 우측 샘플의 마스크값이 다른 경우 현재 블록의 현재 샘플은 세그먼트들의 경계에 위치하는 것으로 결정될 수 있다. 좌측 샘플의 마스크값과 우측 샘플의 마스크값이 동일한 경우 현재 블록의 현재 샘플은 세그먼트들의 경계에 위치하지 않는 것으로 결정될 수 있다. 또는, 상측 샘플의 마스크값과 하측 샘플의 마스크값이 다른 경우 현재 블록의 현재 샘플은 세그먼트들의 경계에 위치하는 것으로 결정될 수 있다. 상측 샘플의 마스크값과 하측 샘플의 마스크값이 동일한 경우 현재 블록의 현재 샘플은 세그먼트들의 경계에 위치하지 않는 것으로 결정될 수 있다.
다만, 현재 블록의 현재 샘플이 현재 블록의 변의 안쪽에 인접하여 위치하는 경우, 현재 블록의 내부의 샘플들만 이용하기 위하여 현재 샘플의 샘플값과 주변 샘플의 샘플값이 비교될 수 있다.
일 실시예에 따른 현재 블록의 샘플 중 세그먼트들의 경계에 위치하는 것으로 판단된 샘플의 샘플값은, 주변 샘플들의 샘플값에 기초하여 필터링될 수 있다. 예를 들어, 좌측 샘플의 마스크값과 우측 샘플의 마스크값이 다른 경우, 현재 샘플의 샘플값은 현재 샘플의 샘플값, 좌측 샘플의 샘플값 및 우측 샘플의 샘플값의 평균으로 필터링될 수 있다. 이때, 이용되는 각각의 샘플값들에는 가중치가 적용될 수 있다. 예를 들어, [1, 2, 1]과 같은 필터값을 갖는 수평 방향의 1차원 가우시안 필터가 이용될 수 있다.
또한, 상측 샘플의 마스크값과 하측 샘플의 마스크값이 다른 경우, 현재 샘플의 샘플값은 현재 샘플의 샘플값, 상측 샘플의 샘플값 및 하측 샘플의 샘플값의 평균으로 필터링될 수도 있다. 예를 들어, [1, 2, 1]과 같은 필터값을 갖는 수직 방향의 1차원 가우시안 필터가 이용될 수 있다.
일 실시예에 따른 현재 블록에 대하여, 수평 방향의 필터링과 수직 방향의 필터링이 순서에 상관없이 모두 수행될 수 있다.
또는, 다른 일 실시예에 따르면 현재 블록에 대하여 수평 방향의 필터링 및 수직 방향의 필터링 중 하나의 필터링만이 수행될 수도 있다. 예를 들어, 현재 블록의 윤곽의 기울기에 기초하여 수평 방향의 필터링 및 수직 방향의 필터링 중 하나가 결정될 수 있다. 현재 블록의 윤곽의 기울기가 수평(x축)으로의 변화량이 수직(y축)으로의 변화량보다 더 큰 경우 수직 방향의 필터링이 수행되고, 수평(x축)으로의 변화량이 수직(y축)으로의 변화량보다 더 작은 경우 수평 방향의 필터링이 수행될 수 있다.
또는, 또 다른 일 실시예에 따르면 현재 블록의 윤곽의 모드에 따라 수평 방향의 필터링 및 수직 방향의 필터링 중 적어도 하나의 필터링이 수행될 수 있다. 예를 들어, 현재 블록의 윤곽의 모드가 수직의 윤곽을 나타내는 제 2 모드인 경우, 수평 방향의 필터링만 수행될 수 있고, 현재 블록의 윤곽의 모드가 수평의 윤곽을 나타내는 제 5 모드인 경우, 수직 방향의 필터링만 수행될 수 있다. 또한, 현재 블록의 윤곽의 모드가 제 2 모드 및 제 5 모드를 제외한 나머지 모드인 경우, 수평 방향의 필터링과 수직 방향의 필터링이 모두 수행될 수 있다.
이때, 루마 블록과 크로마 록에 대하여 각각 다른 방법으로 필터링을 수행할 수도 있다. 예를 들어, 현재 블록의 루마 성분에 대하여 현재 블록의 윤곽의 모드에 따른 필터링을 수행하고, 현재 블록의 크로마 성분에 대하여는 현재 블록의 윤곽의 기울기에 따른 필터링을 수행할 수도 있다.
또한, 이들의 조합에 의하여 필터링 방법을 결정하는 것 또한 가능하며, 1차원 필터에 제한되지 않고 2차원 필터, 중앙값 필터(median filter), 평균값 필터(average filter) 등이 이용될 수 있다.
이하 도 38 내지 도 44에서는 다양한 실시예에 따른 현재 블록에 대하여 현재 블록의 윤곽을 이용하여 예측을 수행하는 방법을 후술한다. 이때, 도 38 내지 도 44에서는 현재 블록에 대한 마스크를 생성하지 않고 현재 블록의 윤곽을 직접 이용하여 현재 블록에 대한 예측을 수행하는 방법이 개시된다.
도 38은 일 실시예에 따른 현재 블록(3800)에 대하여 예측을 수행하는 방법을 나타낸다.
일 실시예에 따른 현재 블록(3800)에 대하여 현재 블록(3800)에 포함된 물체의 경계에 대응되는 윤곽(3820)이 결정될 수 있다. 예를 들어, 현재 블록(3800)의 윤곽(3820)은 윤곽(3820)의 좌표들에 관한 정보 및 윤곽(3820)의 모드 정보에 의하여 특정될 수 있다.
일 실시예에 따른 현재 블록(3800)은 현재 블록(3800)의 윤곽(3820)에 기초하여 적어도 하나의 세그먼트로 분할될 수 있고, 현재 블록(3800)이 복수 개의 세그먼트로 분할되는 경우 윤곽(3820)에 따라 세그먼드들의 경계(boundary)를 포함하는 경계 영역이 나타날 수 있다.
이때, 일 실시예에 따른 현재 블록(3800)에 대하여, 경계의 방향에 따라 예측을 수행할지 여부가 결정될 수 있다. 즉, 현재 블록(3800)의 경계 영역에 포함되는 샘플들에 대한 예측값을 경계의 방향에 따라 결정할지 여부가 결정될 수 있다. 예를 들어, 일 실시예에 따른 비디오 부호화 장치(10)는 경계의 방향에 따른 예측 방법과 마스크를 이용한 예측 방법 중 최선의 RD cost를 갖는 예측 방법을 선택할 수 있고, 일 실시예에 따른 비디오 복호화 장치(20)는 비디오 부호화 장치(10)로부터 현재 블록(3800)에 대하여 경계의 방향에 따른 예측을 수행할지 여부를 나타내는 정보를 수신하여 결정할 수 있다.
경계의 방향에 따른 예측이 수행되는 것으로 결정되면, 일 실시예에 따른 현재 블록(3800)의 경계 영역에 대하여, 경계의 방향에 따른 현재 블록(3800)의 주변 샘플을 이용하여 예측이 수행될 수 있다.
일 실시예에 따른 현재 블록(3800)의 경계 영역은, 현재 블록(3800)의 윤곽(3820)에 대응되는 세그먼트들 간의 경계를 포함하는 소정의 영역으로서, 현재 블록의 윤곽을 중심으로 소정의 폭으로 특정되는 영역일 수 있다. 예를 들어, 도 38을 참조하면, 현재 블록(3800)의 경계 영역은 현재 블록(3800)의 윤곽(3820)을 중심으로 좌측 직선(3830)까지의 영역 및 우측 직선(3840)까지의 영역을 포함하는 영역일 수 있다.
일 실시예에 따른 경계 영역의 소정의 폭은, 현재 블록(3800)을 구성하는 세그먼트들의 경계에 위치하는 샘플들을 중심으로하는 수평 방향으로의 소정의 샘플의 수 또는 수직 방향으로의 샘플의 수를 나타낼 수 있으며, 예를 들어, 도 38에서, 소정의 폭은 좌측 및 우측으로의 2 픽셀이 될 수 있다. 또한, 소정의 폭은 수평 방향으로의 거리 또는 수직 방향으로의 거리뿐만 아니라, 현재 블록(3800)을 구성하는 세그먼트들의 경계를 중심으로 경계에 직교하는 방향으로의 거리를 나타낼 수도 있다.
일 실시예에 따른 경계 영역의 소정의 폭은, 현재 블록(3800)의 경계에 위치하는 샘플들을 중심으로 마주보는 방향에 대하여 동일하게 결정될 수도 있고, 동일하지 않게 비대칭적으로 결정될 수도 있다.
일 실시예에 따른 비디오 부호화 장치(10)는 경계 영역의 소정의 폭을 최선의 RD cost를 갖는 수로 결정할 수 있고, 일 실시예에 따른 비디오 복호화 장치(20)는 비디오 부호화 장치(10)로부터 경계 영역의 소정의 폭을 나타내는 정보를 수신할 수 있다.
또는, 일 실시예에 따른 경계 영역의 소정은 폭은 현재 블록(3800)의 주변 블록으로부터 유도될 수도 있다. 예를 들어, 경계 영역의 소정의 폭은 현재 블록(3800)의 상측 주변 블록 또는 좌측 주변 블록들 간에 샘플값의 변화량에 기초하여 결정될 수 있다.
일 실시예에 따른 현재 블록(3800)의 경계 영역에 포함되는 샘플들의 예측값은, 현재 블록(3800)의 경계의 방향에 따른 현재 블록(3800)의 주변 샘플을 참조하여 획득될 수 있다.
구체적으로, 일 실시예에 따른 현재 블록(3800)의 주변 샘플은 현재 블록(3800)의 상측 주변 샘플, 우상측 주변 샘플, 좌측 주변 샘플 및 좌하측 주변 샘플을 포함할 수 있다. 일 실시예에 따른 현재 블록(3800)의 주변 샘플들 중 경계 영역의 예측에 참조될 참조 샘플은 현재 블록(3800)의 윤곽(3820)을 이용하여 결정될 수 있다. 예를 들어, 현재 블록(3800)의 윤곽(3820)이 현재 블록(3800)의 상측 외부에 인접하는 주변 샘플들 중 샘플(3810)을 지나는 경우, 샘플(3810) 및 샘플(3810)을 중심으로 수평 방향으로의 소정의 폭 내에 위치하는 샘플들이 참조 샘플이 될 수 있다. 도 38에서, 일 실시예에 따른 현재 블록(3800)의 경계 영역의 폭이 수평 방향으로의 2 픽셀인 경우, 참조 샘플은 샘플(3810)을 중심으로 하는 다섯 개의 샘플이 될 수 있다.
참조 샘플이 결정되면, 일 실시예에 따른 현재 블록(3800)의 경계 영역에 포함된 샘플들의 예측값이 결정된 참조 샘플에 기초하여 생성될 수 있다.
또한, 경계 영역에 대한 예측이 수행되면, 일 실시예에 따른 현재 블록(3800)의 경계 영역을 제외한 나머지 영역, 즉, 세그먼트에 해당하는 영역에 대하여 예측이 수행될 수 있다. 예를 들어, 세그먼트 영역에 대하여 DC 모드에 따른 인트라 예측이 수행될 수 있다.
도 39는 일 실시예에 따른 현재 블록(3900)에 대하여 참조 샘플을 이용하여 예측을 수행하는 상세한 과정을 나타낸다.
도 39에서, 현재 블록(3900)의 윤곽(3910)에 따른 경계 영역을 포함하는 현재 블록(3900)의 일부와 현재 블록(3900)의 상측으로 외부에 인접하는 상측 주변 블록이 나타난다. 도 39에서, 현재 블록(3900)의 윤곽(3910)의 모드는 제 1 모드 또는 제 2 모드일 수 있으며, 현재 블록(3900)의 경계 영역의 폭은 2 픽셀일 수 있다. 도 39를 참조하여, 일 실시예에 따른 현재 블록(3900)의 경계 영역에 포함된 샘플들 중 샘플(3920)의 예측값을 생성하는 방법을 상술하도록 한다.
일 실시예에 따른 현재 블록(3900)의 경계 영역에 대한 예측을 위하여 상측 주변 샘플들 중 샘플(3930), 샘플(3940) 및 샘플(3950)이 참조 샘플에 포함될 수 있다. 이때, 일 실시예에 따른 현재 블록(3900)의 경계 영역에 포함된 샘플(3920)의 예측값을 생성하기 위하여, 샘플(3920)의 참조 위치(3960)가 결정될 수 있다. 예를 들어, 샘플(3920)의 참조 위치(3960)는 현재 블록(3900)을 구성하는 세그먼트들 간의 경계의 방향, 즉, 윤곽(3910)의 방향에 기초하여 결정될 수 있다.
일 실시예에 따른 현재 블록(3900)의 경계 영역에 포함된 샘플의 참조 위치가 현재 블록(3900)의 상측 샘플들 중 하나의 참조 샘플의 중심에 위치하는 경우, 현재 블록(3900)의 경계 영역에 포함된 샘플의 예측값은 참조 위치의 샘플의 샘플값을 이용하여 생성될 수 있다. 예를 들어, 현재 블록(3900)의 경계 영역에 포함된 샘플의 예측값은 참조 위치의 샘플의 샘플값이 될 수도 있고, 참조 위치의 샘플의 샘플값을 조정(refine)한 값이 될 수도 있다.
다만, 도 39에서와 같이 현재 블록(3900)의 경계 영역에 포함된 샘플(3920)의 참조 위치(3960)가 하나의 참조 샘플의 위치를 가리키지 않는 경우, 샘플(3920)의 예측값은 복수 개의 참조 샘플을 이용하여 생성될 수 있다. 예를 들어, 샘플(3920)의 참조 위치(3960)가 참조 샘플(3940) 및 참조 샘플(3950)의 경계에 위치하는 경우, 샘플(3920)의 예측값은 참조 샘플(3940)의 샘플값 및 참조 샘플(3950)의 샘플값에 기초하여 생성될 수 있다.
구체적으로, 샘플(3920)의 참조 위치(3960)에 대하여 참조 위치에 인접한 참조 샘플들을 이용하여 선형 보간(bi-linear interpolation)을 수행함으로써, 샘플(3920)의 참조 위치(3960)의 샘플값을 생성할 수 있다. 예를 들어, 샘플(3920)의 참조 위치(3960)의 샘플값은 참조 샘플(3940) 및 참조 샘플(3950)의 샘플값들의 평균값이 될 수 있다. 이때, 현재 블록(3900)의 경계 영역에 포함된 샘플(3920)의 예측값은, 생성된 참조 위치(3960)의 샘플의 샘플값이 될 수도 있고, 생성된 참조 위치(3960)의 샘플의 샘플값을 조정한 값이 될 수도 있다.
또한, 일 실시예에 따른 현재 블록(3900)의 경계 영역에 포함된 샘플의 참조 위치에 대하여 보간을 수행하는 방법이 이에 제한되지 않고 다른 보간 방법으로 대체될 수 있다.
또한, 일 실시예에 따른 현재 블록(3900)의 경계 영역에 포함된 샘플(3920)의 참조 위치(3960)는 1/n 픽셀 단위(n은 정수)의 정밀도로 결정될 수 있고, 결정된 샘플(3920)의 참조 위치(3960)에 따라 1/n 픽셀 단위의 정밀도로 참조 위치(3960)의 샘플값이 생성될 수 있다. 예를 들어, 참조 위치(3960)에 인접한 참조 샘플들의 샘플값에 참조 위치(3960)와의 거리에 따른 가중치를 1/n 픽셀 단위의 정밀도로 할당함으로써 참조 위치(3960)의 샘플값이 생성될 수 있다.
도 40a 내지 도 40c는 다양한 실시예에 따른 현재 블록의 경계 영역에 대하여 예측을 수행하는 방법을 나타낸다.
도 40a를 참조하면, 일 실시예에 따른 현재 블록(4010)의 경계 영역에 대하여 예측을 수행하는 과정이 나타난다. 일 실시예에 따른 현재 블록(4010)은 단일 직선 윤곽에 따른 경계를 포함하는 경계 영역을 포함할 수 있다.
일 실시예에 따른 현재 블록(4010)의 경계 영역에 포함된 샘플의 예측값은 경계의 방향에 따라 현재 블록(4010)의 참조 샘플을 이용하여 생성될 수 있다. 일 실시예에 따른 현재 블록(4010)의 참조 샘플은 현재 블록(4010)의 외부에 인접하는 샘플일 수 있다. 예를 들어, 현재 블록(4010)의 참조 샘플은 현재 블록(4010)의 좌측 샘플 및 좌상측 샘플(4011)을 포함할 수 있다.
다만, 도 40a에서, 현재 블록(4010)의 경계 영역에 포함된 샘플의 참조 위치가 좌상측 샘플(4011)을 벗어나 좌상측 샘플(4011)보다 상측을 가리킬 수 있다. 이때, 현재 블록(4010)의 참조 샘플은 더욱 확장되어(extend) 현재 블록(4010)의 좌상측 샘플(4011)의 상측 샘플(4012)를 더 포함할 수 있다. 좌상측 샘플(4011)의 상측 샘플(4012)의 샘플 값은, 현재 블록(4010) 보다 먼저 부호화 및 복호화된 주변 블록으로부터 획득될 수도 있고, 좌상측 샘플(4011)의 샘플값을 패딩(padding)함으로써 생성될 수도 있다.
일 실시예에 따른 현재 블록(4010)의 경계 영역에 포함된 샘플의 예측 값은, 현재 블록(4010)의 좌측 샘플, 좌상측 샘플(4011) 및 좌상측 샘플(4011)의 상측 샘플(4012)의 샘플값들을 이용하여 생성될 수 있다.
또한, 도 40b를 참조하면, 일 실시예에 따른 현재 블록(4020)의 경계 영역에 대하여 예측을 수행하는 과정에서, 경계 영역에 포함된 샘플의 참조 위치가 좌상측 샘플(4021)을 벗어나 좌상측 샘플(4021)보다 상측을 가리키는 경우, 현재 블록(4020)의 참조 샘플은 확장되어 현재 블록(4020)의 상측 샘플(4022)를 더 포함할 수 있다.
따라서, 일 실시예에 따른 현재 블록(4020)의 경계 영역에 포함된 샘플의 예측 값은, 현재 블록(4020)의 좌측 샘플, 좌상측 샘플(4021) 및 상측 샘플(4022)의 샘플값들을 이용하여 생성될 수 있다.
또한, 도 40c를 참조하면, 일 실시예에 따른 현재 블록(4030)의 경계 영역에 대하여 예측을 수행하는 과정이 나타난다. 일 실시예에 따른 현재 블록(4030)은 단일 직선 윤곽에 따른 경계를 포함하는 경계 영역을 포함할 수 있다.
따라서, 일 실시예에 따른 현재 블록(4030)의 경계 영역에 포함된 샘플의 예측값은 경계의 방향에 따라 현재 블록(4030)의 참조 샘플을 이용하여 생성될 수 있다. 예를 들어, 현재 블록(4030)의 참조 샘플은 현재 블록(4030)의 상측 샘플 및 좌상측 샘플(4031)을 포함할 수 있다.
이때, 도 40c에서, 현재 블록(4030)의 경계 영역에 포함된 샘플의 참조 위치가 샘플(4031)을 벗어나 좌상측 샘플(4031) 보다 좌측을 가리킬 수 있다.
일 실시예에 따른 현재 블록(4030)의 참조 샘플은 더욱 확장되어(extend) 현재 블록(4030)의 좌상측 샘플(4031)의 좌측 샘플(4032)를 더 포함할 수 있다. 좌상측 샘플(4031)의 좌측 샘플(4032)의 샘플 값은, 현재 블록(4030) 보다 먼저 복호화된 주변 블록으로부터 획득될 수도 있고, 좌상측 샘플(4031)의 샘플값을 패딩(padding)함으로써 생성될 수도 있다.
따라서, 일 실시예에 따른 현재 블록(4030)의 경계 영역에 포함된 샘플의 예측 값은, 현재 블록(4030)의 상측 샘플, 좌상측 샘플(4031) 및 좌상측 샘플(4031)의 좌측 샘플(4032)의 샘플값들을 이용하여 생성될 수 있다.
또한, 도 40a 내지 도 40c에서 설명된 실시예 외에도, 현재 블록의 경계 영역에 포함된 샘플의 참조 위치가 현재 블록의 상측 주변 샘플, 우상측 주변 샘플, 좌측 주변 샘플 및 좌하측 주변 샘플을 벗어나는 경우, 상측 주변 샘플, 우상측 주변 샘플, 좌측 주변 샘플 및 좌하측 주변 샘플 중 가까운 위치의 샘플을 확장하거나, 현재 블록의 경계의 기울기에 따라 보간을 수행하는 등, 다양한 방식으로 참조 위치의 샘플값을 생성할 수 있다.
도 41은 다양한 실시예에 따른 현재 블록의 경계 영역에 대하여 예측을 수행하는 방법을 나타낸다.
현재 블록의 경계의 방향에 따른 주변 샘플이 현재 블록의 상측과 현재 블록의 좌측에 모두 존재할 수 있다. 이때, 일 실시예에 따른 현재 블록의 경계 영역에 포함된 샘플의 예측 값은 현재 블록의 상측 외부에 인접하는 상측 샘플 및 현재 블록의 좌측 외부에 인접하는 좌측 샘플 중 적어도 하나를 참조하여 생성될 수 있다. 즉, 현재 블록의 경계 영역에 포함된 샘플의 참조 샘플은 현재 블록의 상측 샘플 및 현재 블록의 좌측 샘플 중 적어도 하나를 포함할 수 있다.
예를 들어, 도 41을 참조하면, 현재 블록(4110)의 경계 영역에 포함된 샘플의 예측 값은 현재 블록의 상측 샘플의 샘플값을 이용하여 생성될 수 있다. 또한, 현재 블록(4120)의 경계 영역에 포함된 샘플의 예측 값은 현재 블록의 좌측 샘플의 샘플값을 이용하여 생성될 수 있다.
일 실시예에 따른 현재 블록의 경계의 방향에 따른 참조 샘플이 현재 블록의 상측에도 존재하고 현재 블록의 좌측에도 존재하는 경우, 상측 샘플과 좌측 샘플 중 사용 가능한 샘플을 참조 샘플로 이용할 수 있다.
또는, 현재 블록의 상측 샘플과 좌측 샘플이 모두 사용 가능한 경우, 상측 샘플과 좌측 샘플이 모두 이용될 수도 있고, 둘 중 하나의 샘플만 이용될 수도 있다.
예를 들어, 현재 블록의 상측 샘플과 좌측 샘플이 모두 사용 가능한 경우, 현재 블록의 경계 영역에 포함된 샘플의 예측 값은, 상측 샘플에 따른 예측 값과 좌측 샘플에 따른 예측 값의 평균 값이 될 수 있다. 또는, 현재 블록의 경계 영역에 포함된 샘플로부터 상측 샘플까지의 거리와 현재 블록의 경계 영역에 포함된 샘플로부터 좌측 샘플까지의 거리를 고려하여, 상측 샘플에 따른 예측 값과 좌측 샘플에 따른 예측 값에 가중치를 줄 수도 있다.
또한, 현재 블록의 상측 샘플과 좌측 샘플이 모두 사용 가능한 경우, 현재 블록의 경계 영역에 포함된 샘플의 예측 값은, 상측 샘플과 좌측 샘플 중 하나의 샘플만 이용하여 생성될 수 있다. 예를 들어, 일 실시예에 따른 현재 블록의 윤곽의 기울기에 기초하여 상측 샘플과 좌측 샘플 중 참조할 하나의 샘플을 결정할 수 있다. 현재 블록의 윤곽의 기울기가 수평 방향에 가까운 경우 좌측 샘플이 참조 샘플로 결정되고, 현재 블록의 윤곽의 기울기가 수직 방향에 가까운 경우 상측 샘플이 참조 샘플로 결정될 수 있다.
또는, 일 실시예에 따른 현재 블록의 경계 영역의 폭에 기초하여 상측 샘플과 좌측 샘플 중 하나의 샘플이 참조 샘플로 결정될 수도 있다. 또는, 일 실시예에 따른 현재 블록의 상측 샘플들과 좌측 샘플들 중 현재 블록의 경계 영역에 대응되는 샘플들의 수가 더 적은 쪽의 샘플들을 참조 샘플로 결정할 수 있다. 또는, 일 실시예에 따른 현재 블록의 경계 영역의 예측의 부복호화 효율 및 부복호화 성능에 기초하여, 현재 블록의 상측 샘플들과 좌측 샘플들 중 참조 샘플을 결정할 수도 있다. 또는, 일 실시예에 따른 현재 블록의 상측 샘플들과 좌측 샘플들 중 샘플 값의 분산이 더 큰 쪽의 샘플들을 참조 샘플로 결정할 수 도 있다.
도 42는 일 실시예에 따른 현재 블록(4200)의 경계 영역에 대하여 예측을 수행하는 방법을 나타낸다.
일 실시예에 따른 현재 블록(4200)은 동일한 네 개의 서브 블록으로 분할되고, 각각의 서브 블록 단위로 예측이 수행될 수 있다. 예를 들어, 현재 블록(4200)은 8x8 크기의 부호화 단위이고, 각각의 서브 블록은 4x4 크기의 변환 단위일 수 있다. 또는, 현재 블록(4200)은 최대 크기의 부호화 단위이고, 각각의 서브 블록은 최대 크기의 부호화 단위로부터 분할된 부호화 단위일 수 있다.
일 실시예에 따른 현재 블록(4200)의 서브 블록 단위에 대하여 예측을 수행하는 경우, 서브 블록의 예측 값을 생성하기 위한 참조 샘플은 현재 블록(4200)에 인접한 주변 샘플들로 결정될 수 있다.
예를 들어, 도 42를 참조하면, 일 실시예에 따른 현재 블록(4200)에 포함된 서브 블록들 중 현재 블록(4200)의 좌측 하단에 위치하는 서브 블록에 대한 예측을 수행하는 경우, 좌측 하단에 위치하는 서브 블록에 인접하는 주변 샘플이 아니라, 현재 블록(4200)의 상측에 인접하는 주변 샘플을 참조하여, 좌측 하단에 위치하는 서브 블록의 예측 값을 생성할 수 있다.
구체적으로, 현재 블록(4200)의 좌측 하단에 위치하는 서브 블록에 포함된 샘플에 대한 참조 위치는, 현재 블록(4200)의 경계의 방향에 따라 현재 블록(4200)에 인접하는 주변 샘플의 위치로 결정될 수 있다.
도 43 및 도 44는 다양한 실시예에 따른 현재 블록의 경계 영역에 대하여 예측을 수행하는 방법을 나타낸다.
일 실시예에 따른 현재 블록의 경계 영역에 대하여 경계의 방향에 따라 예측을 수행하는 경우, 현재 블록의 경계 영역의 폭이 먼저 결정될 수 있다. 현재 블록의 경계 영역의 폭은 현재 블록을 구성하는 세그먼트들의 경계에 위치하는 샘플들을 중심으로하는 수평 방향으로의 샘플의 수 또는 수직 방향으로의 샘플의 수를 나타낼 수 있다.
예를 들어, 일 실시예에 따른 현재 블록에서, 현재 블록의 경계 영역의 폭은, 현재 블록의 경계에 위치하는 샘플들을 중심으로, 좌측으로의 샘플의 수 N 및 우측으로의 샘플의 수 M로 특정되거나, 또는 상측으로의 샘플의 수 P 및 하측으로의 샘플의 수 Q로 특정될 수 있다.
도 40a를 참조하면, 현재 블록(4010)의 경계 영역은 P=Q=4의 폭을 가질 수 있다. 또한, 도 40b를 참조하면, 현재 블록(4020)의 경계 영역은 P=Q=2의 폭을 가질 수 있다. 또한, 도 40c를 참조하면, 현재 블록(4030)의 경계 영역은 N=M=2의 폭을 가질 수 있다.
다양한 실시예에 따른 경계 영역의 폭은 N과 M 또는 P와 Q가 동일하게 결정될 수도 있고 동일하지 않게 결정될 수도 있다 또한, N과 M 또는 P와 Q가 고정되어 있을 수도 있고, 블록 마다 다르게 적응적으로 조정될 수도 있다.
예를 들어, 현재 블록의 경계 영역의 폭이 경계에 직교하는 방향으로 고정되는 경우, 현재 블록의 경계 영역의 수직 방향으로의 폭 또는 수평 방향으로의 폭은 현재 블록의 경계의 기울기에 따라 다르게 결정될 수 있다. 또한, 이때 경계 영역의 수직 방향으로의 폭 또는 수평 방향으로의 폭에 따라 현재 블록의 경계 영역의 예측을 위한 참조 샘플의 수도 달라질 수 있다.
또는, 현재 블록의 경계 영역의 폭은 N=M=P=Q=T로 소정의 크기 T로 결정될 수 있다. 이때, 소정의 크기 T는 정수 픽셀 단위일 수도 있고, 서브 픽셀 단위일 수도 있다. 현재 블록의 경계 영역의 폭에 관한 정보인 소정의 크기 T는 부호화되어 비디오 복호화 장치(20)로 전송될 수 있다.
또한, 복수 개의 소정의 크기 T의 후보들 중 하나를 가리키는 인덱스 정보가 현재 블록의 경계 영역의 폭에 관한 정보로 이용될 수도 있다. 예를 들어, 소정의 크기 T에 대하여 "0", "4" 및 "현재 블록의 너비의 2배"를 각각 0, 10, 11로 인덱싱하여 시그널링할 수 있다. 이때, 소정의 크기 T의 단위는 정수 픽셀 단위일 수 있다. 소정의 크기 T가 현재 블록의 너비의 2배인 경우, 현재 블록의 모든 샘플이 경계 영역에 포함될 수 있고, 경계 영역에 대한 예측을 수행함으로써 현재 블록의 모든 샘플의 예측 값을 생성할 수 있다.
또는, 현재 블록의 경계 영역의 폭은 현재 블록의 주변 블록으로부터 유도될 수 있다. 예를 들어, 현재 블록의 주변 블록에 포함된 샘플들에 대한 분산, 평균, 표준 편차, 이상점(outlier) 등의 정보들이 이용될 수 있다.
도 43을 참조하면, 다양한 실시예에 따른 현재 블록(4310, 4320, 4330)의 경계 영역에 대하여 예측을 수행하는 과정이 나타난다. 이때, 현재 블록(4310, 4320, 4330)의 경계 영역은 N=M=2의 폭을 가질 수 있고, 현재 블록(4310, 4320, 4330)의 참조 샘플은 현재 블록(4310, 4320, 4330)의 상측 주변 샘플일 수 있다.
이때, 다양한 실시예에 따른 현재 블록(4310, 4320, 4330)의 경계 영역에 포함되는 샘플들이 다양한 기준에 따라 결정될 수 있다. 예를 들어, 현재 블록(4310)을 참조하면, 현재 블록(4310)의 경계 영역에 포함되는 샘플은, 현재 블록(4310)의 샘플들 중 샘플의 위치가 현재 블록(4310)의 경계 영역에 완전히 포함되는 샘플일 수 있다.
또는, 현재 블록(4320)을 참조하면, 현재 블록(4320)의 경계 영역에 포함되는 샘플은, 현재 블록(4320)의 샘플들 중 샘플의 위치의 중심이 현재 블록(4310)의 경계 영역에 포함되는 샘플일 수 있다.
또는, 현재 블록(4330)을 참조하면, 현재 블록(4330)의 경계 영역에 포함되는 샘플은, 현재 블록(4330)의 샘플들 중 샘플의 위치가 현재 블록(4330)의 경계 영역에 전부 또는 일부라도 걸쳐지는 샘플일 수 있다.
또한, 도 44는 현재 블록(4410, 4420, 4430)의 윤곽이 곡선 윤곽인 경우의 예시들을 나타낸다. 현재 블록(4410, 4420, 4430)의 경계 영역에 포함되는 샘플들은, 도 43의 현재 블록(4310, 4320, 4330)과 마찬가지로 다양한 기준에 따라 결정될 수 있다.
다양한 실시예에 따른 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 경계 영역에 대한 예측이 수행되면, 경계 영역을 제외한 나머지 영역에 대하여 예측이 수행될 수 있다. 즉, 도 43의 및 도 44의 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)들에서 경계 영역을 제외한 나머지 영역은 세그먼트에 해당하는 영역들로서, 도 43 및 도 43에서 흰색 샘플들로 나타나는 영역일 수 있다. 예를 들어, 세그먼트 영역에 대하여 DC 모드에 따른 인트라 예측이 수행될 수 있다.
또한, 도 43의 및 도 44의 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 경계 영역에 대한 예측 및 세그먼트 영역에 대한 예측이 모두 수행되면, 경계 영역과 세그먼트 영역 사이를 필터링할 수 있다. 경계 영역과 세그먼트 영역에 대하여 서로 다른 방법으로 예측이 수행되어 오차에 의한 품질 저하가 발생될 수 있다. 따라서, 오차를 줄이고 가시적인 품질 저하를 방지하기 위하여 경계 영역과 세그먼트 영역 사이에 필터링이 수행될 수 있다.
예를 들어, 도 43의 및 도 44의 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 경계 영역의 샘플들 중 샘플의 좌측 또는 우측으로 세그먼트 영역의 샘플이 인접하는 샘플에 대하여, 필터링이 수행될 수 있다. 또한, 도 43의 및 도 44의 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 세그먼트 영역의 샘플들 중 샘플의 좌측 또는 우측으로 경계 영역의 샘플이 인접하는 샘플에 대하여, 필터링이 수행될 수 있다.
또는, 도 43의 및 도 44의 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 경계 영역의 샘플들 중 샘플의 상측 또는 하측으로 세그먼트 영역의 샘플이 인접하는 샘플에 대하여, 필터링이 수행될 수 있다. 또한, 도 43의 및 도 44의 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 세그먼트 영역의 샘플들 중 샘플의 상측 또는 하측으로 경계 영역의 샘플이 인접하는 샘플에 대하여, 필터링이 수행될 수 있다.
구체적으로, 일 실시예에 따른 샘플링 방법은 도 27의 수도 코드와 동일한 알고리즘에 따라 수행될 수 있다. 이때, 도 43의 현재 블록(4310, 4320, 4330)의 마스크값은 현재 블록(4310, 4320, 4330)의 경계 영역에 포함되는 샘플을 결정하는 때에 경계 영역에 포함되는지 여부에 따라 1 또는 0으로 결정될 수 있고, 결정된 마스크값이 필터링에 이용될 수 있다.
다양한 실시예에 따른 도 43의 및 도 44의 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 경계 영역과 세그먼트 영역 사이에 수행되는 필터링은, 수평 방향 및 수직 방향 모두에 적용될 수도 있고, 수평 방향 및 수직 방향 중 하나의 방향에 따라 적용될 수도 있다.
또한, 다양한 실시예에 따른 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 경계 영역에 대하여 예측을 수행하는 경우, 경계 영역의 예측 값에 대한 오차를 줄이기 위하여 경계 영역에 필터링을 수행할 수도 있다.
예를 들어, 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 경계 영역에 포함된 샘플들의 예측 값을 생성하고, 생성된 예측 값들에 필터링할 수 있다. 예를 들어, [1, 2, 1]과 같은 필터값을 갖는 1차원 가우시안 필터가 이용될 수 있다. 또한, 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 경계 영역을 예측하기 위하여 참조되는 주변 샘플들에 대하여 먼저 필터링을 수행하고, 필터링된 주변 샘플들에 기초하여 현재 블록(4310, 4320, 4330, 4410, 4420, 4430)의 경계 영역의 샘플들의 예측 값을 생성할 수도 있다.
도 45는 일 실시예에 따른 인트라 예측 수행을 위한 신택스 엘리먼트들을 나타낸다.
일 실시예에 따른 현재 블록에 대한 예측 모드를 나타내는 정보가 비트스트림으로부터 파싱될 수 있다. 예를 들어, 현재 블록에 대한 예측 모드를 나타내는 정보는, 현재 블록을 정사각형 또는 직사각형의 예측 단위를 이용하는 계층적 구조의 부호화 단위에 기초한 인트라 모드를 이용할지 또는 현재 블록에 포함된 물체의 경계에 따른 윤곽을 이용하여 분할되는 예측 단위인 세그먼트를 이용하는 윤곽 기반 인트라 예측 모드를 이용할지 여부를 나타내는 정보(intra_mode_flag)를 포함할 수 있다.
예측 모드를 나타내는 정보가 현재 블록이 일반적인 인트라 모드를 나타내는 경우, 현재 블록은 DC 모드, 플래너(planar) 모드, 앵귤러(angular) 모드 등의 인트라 모드에 따라 예측될 수 있다.
또한, 예측 모드를 나타내는 정보가 현재 블록이 일반적인 인트라 모드를 나타내지 않는 경우, 현재 블록으로부터 분할되는 세그먼트의 개수에 관한 정보(seg_num_minus1)가 파싱될 수 있다. 예를 들어, 현재 블록의 세그먼트의 개수에 관한 정보가 현재 블록으로부터 분할되는 세그먼트가 1개임을 나타내는 경우, 현재 블록은 분할되지 않을 수 있으며, 현재 블록과 동일한 제 1 세그먼트의 예측 모드를 나타내는 정보(1seg_mode)가 파싱될 수 있다. 예를 들어, 제 1 세그먼트의 예측 모드를 나타내는 정보(1seg_mode)는 DC 모드, 플래너(planar) 모드, 앵귤러(angular) 모드 등의 인트라 모드 중 하나를 나타낼 수 있다.
현재 블록의 세그먼트의 개수에 관한 정보가 현재 블록으로부터 분할되는 세그먼트가 2개 이상임을 나타내는 경우, 현재 블록은 현재 블록의 예측을 위한 세그먼트들로 분할될 수 있다. 즉, 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽에 관한 정보가 파싱될 수 있다. 일 실시예에 따른 현재 블록의 윤곽에 관한 정보는 윤곽의 모드 정보 및 윤곽의 좌표에 관한 정보를 포함할 수 있다.
구체적으로, 현재 블록으로부터 두개 이상의 세그먼트가 분할되는 경우, 현재 블록의 윤곽의 모드 정보(line_orient)가 파싱될 수 있다. 예를 들어, 윤곽의 모드 정보는 윤곽의 방향을 나타내는 정보일 수 있다.
일 실시예에 따른 현재 블록의 윤곽의 모드 정보(line_orient)는 현재 블록의 네 변들 중 현재 블록의 윤곽이 닿는 적어도 두 변을 나타내는 정보일 수 있다. 예를 들어, 일 실시예에 따른 현재 블록의 윤곽의 모드 정보(line_orient)는 현재 블록의 상측, 우측, 하측 및 좌측 중 두 변을 나타내는 정보로서, 제 1 모드(line_orient==0), 제 2 모드(line_orient==1), 제 3 모드(line_orient==2), 제 4 모드(line_orient==3), 제 5 모드(line_orient==4) 및 제 6 모드(line_orient==5) 중 하나를 나타낼 수 있다. 현재 블록의 윤곽의 모드 정보(line_orient)에 따라 현재 블록의 윤곽의 모드가 결정될 수 있다.
일 실시에에 따른 현재 블록의 윤곽의 모드가 결정되면, 현재 블록의 윤곽의 좌표에 관한 정보를 파싱할지 여부가 결정될 수 있다. 현재 블록의 윤곽의 좌표에 관한 정보는 현재 블록의 윤곽의 제 1 좌표 정보(line_pos1) 및 제 2 좌표 정보(line_pos2)를 포함할 수 있다. 구체적으로, 현재 블록의 윤곽의 모드에 따라 현재 블록의 윤곽의 좌표가 현재 블록의 주변 블록으로부터 유도 가능한지 또는 파싱하여야 하는지 여부가 결정될 수 있다.
예를 들어, 현재 블록의 윤곽의 모드에 기초하여 현재 블록의 윤곽의 제 1 좌표 및 제 2 좌표가 현재 블록의 주변 블록으로부터 유도 가능한 것으로 결정되는 경우, 현재 블록의 윤곽의 제 1 좌표 정보(line_pos1) 및 제 2 좌표 정보(line_pos2)는 파싱되지 않을 수 있다. 또한, 블록의 윤곽의 모드에 기초하여 현재 블록의 윤곽의 제 1 좌표 및 제 2 좌표가 현재 블록의 주변 블록으로부터 유도 가능하지 않은 것으로 결정되는 경우, 현재 블록의 윤곽의 제 1 좌표 정보(line_pos1) 및 제 2 좌표 정보(line_pos2)는 비트스트림으로부터 파싱될 수 있다. 현재 블록의 윤곽의 좌표에 관한 정보의 파싱 여부는 제 1 좌표 및 제 2 좌표 각각에 대하여 결정될 수 있다.
예를 들어, 현재 블록의 윤곽의 제 1 좌표가 유도 가능하고 제 2 좌표가 유도 가능하지 않은 경우(예를 들어, line_orient==0), 현재 블록의 윤곽의 제 2 좌표 정보(line_pos2)만이 파싱될 수 있다.
또한, 현재 블록의 윤곽의 제 1 좌표 및 제 2 좌표가 모두 현재 블록의 주변 블록으로부터 유도 가능하지 않은 경우, 현재 블록의 윤곽의 제 1 좌표 정보(line_pos1) 및 제 2 좌표 정보(line_pos2)가 모두 파싱될 수 있다. 이때, 현재 블록 내의 우측 하단에 위치한 제 2 세그먼트의 샘플값 또는 예측값(seg1_dc)은 현재 블록의 주변 샘플을 이용하여 생성되지 않고 파싱될 수 있다.
또한, 일 실시예에 따른 현재 블록에 대하여 경계의 방향에 따라 예측을 수행할지 여부를 나타내는 정보(boundary_filling_flag)가 파싱될 수 있다. 경계의 방향에 따라 예측을 수행할지 여부를 나타내는 정보(boundary_filling_flag)가 수행함을 나타내는 경우, 현재 블록의 경계 영역에 포함되는 샘플들의 예측값이 경계의 방향에 따라 생성될 수 있다. 예를 들어, 현재 블록의 경계 영역에 포함되는 샘플들의 예측값은 도 38 내지 도 44에 상술된 방법을 이용하여 생성될 수 있다.
이때, 일 실시예에 따른 현재 블록의 경계 영역에 관한 정보가 파싱될 수 있다. 예를 들어, 현재 블록의 경계 영역에 관한 정보는 경계 영역의 폭에 관한 정보(boundary_filling_thickness)를 포함할 수 있다. 경계 영역의 폭을 나타내는 정보는 경계 영역의 폭을 직접 나타낼 수도 있고, 복수 개의 소정의 폭의 후보 중 하나를 나타내는 인덱스 정보일 수도 있다.
또는, 경계의 방향에 따라 예측을 수행할지 여부를 나타내는 정보(boundary_filling_flag)가 경계의 방향에 따른 예측을 나타내지 않는 경우, 현재 블록의 경계 영역에 포함되는 샘플들의 예측값은 현재 블록의 세그먼트 영역의 샘플 및 마스크값를 이용하여 생성될 수 있다.
또한, 일 실시예에 따른 현재 블록의 예측값에 대하여 필터링을 수행할지 여부를 나타내는 정보(boundary_filtering_disable_flag)가 파싱될 수 있다. 일 실시예에 따른 현재 블록에 대하여 경계 영역의 예측값에 대하여 수행되는 필터링 방법의 일 예시는 도 37의 방법과 동일할 수 있다.
이하, 도 46 내지 도 49를 참조하여, 앞서 제안한 윤곽을 기반으로한 인트라 예측 비디오 부호화 방법이 사용되지 않고, 직사각형 또는 정사각형의 예측 단위를 이용하는 계층적 구조의 부호화 단위에 기초한 비디오 부호화 방법이 사용되는 경우의, 심도별 부호화 단위, 예측 단위 및 변환 단위의 관계를 후술한다.
도 46 는 다양한 실시예에 따른 심도별 부호화 단위 및 예측 단위를 도시한다.
일 실시예에 따른 비디오 부호화 장치(10) 및 일 실시예에 따른 비디오 복호화 장치(20)는 영상 특성을 고려하기 위해 계층적인 부호화 단위를 사용할 수 있다. 부호화 단위의 최대 높이 및 너비, 최대 심도는 영상의 특성에 따라 적응적으로 결정될 수도 있으며, 사용자의 요구에 따라 다양하게 설정될 수도 있다. 미리 설정된 부호화 단위의 최대 크기에 따라, 심도별 부호화 단위의 크기가 결정될 수 있다.
일 실시예에 따른 부호화 단위의 계층 구조(600)는 부호화 단위의 최대 높이 및 너비가 64이며, 최대 심도가 3인 경우를 도시하고 있다. 이 때, 최대 심도는 최대 부호화 단위로부터 최소 부호화 단위까지의 총 분할 횟수를 나타낸다. 일 실시예에 따른 부호화 단위의 계층 구조(600)의 세로축을 따라서 심도가 깊어지므로 심도별 부호화 단위의 높이 및 너비가 각각 분할한다. 또한, 부호화 단위의 계층 구조(600)의 가로축을 따라, 각각의 심도별 부호화 단위의 예측 부호화의 기반이 되는 예측 단위 및 파티션이 도시되어 있다. 이때, 도 46에 도시된 심도별 부호화 단위의 예측 단위 및 파티션은, 윤곽 기반의 예측 부호화 방법을 이용하지 않는 경우의 현재 블록의 예측 단위를 나타낼 수 있다.
즉, 부호화 단위(610)는 부호화 단위의 계층 구조(600) 중 최대 부호화 단위로서 심도가 0이며, 부호화 단위의 크기, 즉 높이 및 너비가 64x64이다. 세로축을 따라 심도가 깊어지며, 크기 32x32인 심도 1의 부호화 단위(620), 크기 16x16인 심도 2의 부호화 단위(630), 크기 8x8인 심도 3의 부호화 단위(640)가 존재한다. 크기 8x8인 심도 3의 부호화 단위(640)는 최소 부호화 단위이다.
각각의 심도별로 가로축을 따라, 부호화 단위의 예측 단위 및 파티션들이 배열된다. 즉, 심도 0의 크기 64x64의 부호화 단위(610)가 예측 단위라면, 예측 단위는 크기 64x64의 부호화 단위(610)에 포함되는 크기 64x64의 파티션(610), 크기 64x32의 파티션들(612), 크기 32x64의 파티션들(614), 크기 32x32의 파티션들(616)로 분할될 수 있다.
마찬가지로, 심도 1의 크기 32x32의 부호화 단위(620)의 예측 단위는, 크기 32x32의 부호화 단위(620)에 포함되는 크기 32x32의 파티션(620), 크기 32x16의 파티션들(622), 크기 16x32의 파티션들(624), 크기 16x16의 파티션들(626)로 분할될 수 있다.
마찬가지로, 심도 2의 크기 16x16의 부호화 단위(630)의 예측 단위는, 크기 16x16의 부호화 단위(630)에 포함되는 크기 16x16의 파티션(630), 크기 16x8의 파티션들(632), 크기 8x16의 파티션들(634), 크기 8x8의 파티션들(636)로 분할될 수 있다.
마찬가지로, 심도 3의 크기 8x8의 부호화 단위(640)의 예측 단위는, 크기 8x8의 부호화 단위(640)에 포함되는 크기 8x8의 파티션(640), 크기 8x4의 파티션들(642), 크기 4x8의 파티션들(644), 크기 4x4의 파티션들(646)로 분할될 수 있다.
일 실시예에 따른 비디오 부호화 장치(10)(100)의 부호화 단위 결정부(120)는, 최대 부호화 단위(610)의 심도를 결정하기 위해, 최대 부호화 단위(610)에 포함되는 각각의 심도의 부호화 단위마다 부호화를 수행하여야 한다.
동일한 범위 및 크기의 데이터를 포함하기 위한 심도별 부호화 단위의 개수는, 심도가 깊어질수록 심도별 부호화 단위의 개수도 증가한다. 예를 들어, 심도 1의 부호화 단위 한 개가 포함하는 데이터에 대해서, 심도 2의 부호화 단위는 네 개가 필요하다. 따라서, 동일한 데이터의 부호화 결과를 심도별로 비교하기 위해서, 한 개의 심도 1의 부호화 단위 및 네 개의 심도 2의 부호화 단위를 이용하여 각각 부호화되어야 한다.
각각의 심도별 부호화를 위해서는, 부호화 단위의 계층 구조(600)의 가로축을 따라, 심도별 부호화 단위의 예측 단위들마다 부호화를 수행하여, 해당 심도에서 가장 작은 부호화 오차인 대표 부호화 오차가 선택될 수 있다. 또한, 부호화 단위의 계층 구조(600)의 세로축을 따라 심도가 깊어지며, 각각의 심도마다 부호화를 수행하여, 심도별 대표 부호화 오차를 비교하여 최소 부호화 오차가 검색될 수 있다. 최대 부호화 단위(610) 중 최소 부호화 오차가 발생하는 심도 및 파티션이 최대 부호화 단위(610)의 심도 및 파티션 모드로 선택될 수 있다.
도 47은 다양한 실시예에 따른, 부호화 단위 및 변환 단위의 관계를 도시한다.
일 실시예에 따른 비디오 부호화 장치(10) 또는 일 실시예에 따른 비디오 복호화 장치(20)는, 최대 부호화 단위마다 최대 부호화 단위보다 작거나 같은 크기의 부호화 단위로 영상을 부호화하거나 복호화한다. 부호화 과정 중 변환을 위한 변환 단위의 크기는 각각의 부호화 단위보다 크지 않은 데이터 단위를 기반으로 선택될 수 있다.
예를 들어, 일 실시예에 따른 비디오 부호화 장치(10) 또는 일 실시예에 따른 비디오 복호화 장치(20)에서, 현재 부호화 단위(710)가 64x64 크기일 때, 32x32 크기의 변환 단위(720)를 이용하여 변환이 수행될 수 있다.
또한, 64x64 크기의 부호화 단위(710)의 데이터를 64x64 크기 이하의 32x32, 16x16, 8x8, 4x4 크기의 변환 단위들로 각각 변환을 수행하여 부호화한 후, 원본과의 오차가 가장 적은 변환 단위가 선택될 수 있다.
도 48은 다양한 실시예에 따른 부호화 정보들을 도시한다.
일 실시예에 따른 비디오 부호화 장치(10)의 비트스트림 생성부(16)는, 분할정보로서 각각의 심도의 부호화 단위마다 파티션 모드에 관한 정보(800), 예측 모드에 관한 정보(810), 변환 단위 크기에 대한 정보(820)를 부호화하여 전송할 수 있다.
이때, 도 48에 도시된 파티션 모드에 관한 정보(800)는 영상의 현재 블록에 대하여 윤곽을 기반으로한 예측 부호화를 이용하지 않는 경우에 이용될 수 있다.
파티션 모드에 대한 정보(800)는, 현재 부호화 단위의 예측 부호화를 위한 데이터 단위로서, 현재 부호화 단위의 예측 단위가 분할된 파티션의 형태에 대한 정보를 나타낸다. 예를 들어, 크기 2Nx2N의 현재 부호화 단위 CU_0는, 크기 2Nx2N의 파티션(802), 크기 2NxN의 파티션(804), 크기 Nx2N의 파티션(806), 크기 NxN의 파티션(808) 중 하나의 타입으로 분할될 수 있다. 이 경우 현재 부호화 단위의 파티션 모드에 관한 정보(800)는 크기 2Nx2N의 파티션(802), 크기 2NxN의 파티션(804), 크기 Nx2N의 파티션(806) 및 크기 NxN의 파티션(808) 중 하나를 나타내도록 설정된다.
예측 모드에 관한 정보(810)는, 예측 단위의 예측 모드를 나타낸다. 예를 들어 예측 모드에 관한 정보(810)를 통해, 파티션 모드에 관한 정보(800)가 가리키는 현재 블록의 파티션 또는 현재 블록의 윤곽에 기반하여 결정된 세그먼트가 인트라 모드(812), 인터 모드(814) 및 스킵 모드(816) 중 하나로 예측 부호화가 수행되는지 여부가 설정될 수 있다.
또한, 변환 단위 크기에 관한 정보(820)는 현재 부호화 단위를 어떠한 변환 단위를 기반으로 변환을 수행할지 여부를 나타낸다. 예를 들어, 변환 단위는 제 1 인트라 변환 단위 크기(822), 제 2 인트라 변환 단위 크기(824), 제 1 인터 변환 단위 크기(826), 제 2 인터 변환 단위 크기(828) 중 하나일 수 있다.
일 실시예에 따른 비디오 복호화 장치(20)는, 각각의 심도별 부호화 단위마다 파티션 모드에 관한 정보(800), 예측 모드에 관한 정보(810), 변환 단위 크기에 대한 정보(820)를 추출하여 복호화에 이용할 수 있다.
이제까지 개시된 다양한 실시예들이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 명세서에서 개시된 실시예들의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 명세서의 개시 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 명세서의 개시범위에 포함된 것으로 해석되어야 할 것이다.

Claims (20)

  1. 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드 정보를 획득하는 단계;
    상기 윤곽의 모드 정보에 기초하여, 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한지 여부를 결정하는 단계;
    상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한 경우, 상기 현재 블록의 주변 블록으로부터 유도되는 상기 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 상기 현재 블록으로부터 상기 적어도 하나의 세그먼트를 결정하는 단계; 및
    상기 결정된 적어도 하나의 세그먼트에 대하여 예측을 수행하는 단계를 포함하는 비디오 복호화 방법.
  2. 제 1 항에 있어서,
    상기 적어도 하나의 세그먼트를 결정하는 단계는,
    상기 윤곽의 모드 정보에 따라 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표 중 적어도 하나가 유도 가능하지 않은 경우, 비트스트림으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표 중 적어도 하나를 획득하는 것을 특징으로 하는 방법.
  3. 제 2 항에 있어서,
    상기 획득된 윤곽의 모드 정보에 따라 상기 윤곽의 제 1 좌표가 상기 현재 블록의 우측에 위치하는 경우, 상기 제 1 좌표를 비트스트림으로부터 획득하는 단계; 및
    상기 획득된 윤곽의 모드 정보에 따라 상기 윤곽의 제 2 좌표가 상기 현재 블록의 하단에 위치하는 경우, 상기 제 2 좌표를 비트스트림으로부터 획득하는 단계를 더 포함하는 방법.
  4. 제 1 항에 있어서,
    상기 획득된 윤곽의 모드 정보에 따라 상기 윤곽의 제 1 좌표가 상기 현재 블록의 상단에 위치하는 경우, 상기 윤곽의 제 1 좌표를 상기 현재 블록의 상단 블록으로부터 유도하는 단계; 및
    상기 획득된 윤곽의 모드 정보에 따라 상기 윤곽의 제 2 좌표가 상기 현재 블록의 좌측에 위치하는 경우, 상기 윤곽의 제 2 좌표를 상기 현재 블록의 좌측 블록으로부터 유도하는 단계를 더 포함하는 방법.
  5. 제 4 항에 있어서,
    상기 윤곽의 제 1 좌표를 상기 현재 블록의 상단 블록으로부터 유도하는 단계는,
    상기 현재 블록의 상단 블록의 최하단 샘플들의 샘플값을 이용하여 상기 윤곽의 제 1 좌표를 유도하고,
    상기 윤곽의 제 2 좌표를 상기 현재 블록의 좌측 블록으로부터 유도하는 단계는,
    상기 현재 블록의 좌측 블록의 최우측 샘플들의 샘플값을 이용하여 상기 윤곽의 제 2 좌표를 유도하는 것을 특징으로 하는 방법.
  6. 제 1 항에 있어서,
    상기 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드 정보는 상기 현재 블록의 상변, 우변, 하변 및 좌변 중 적어도 두 변을 나타내는 정보를 포함하는 하는 방법.
  7. 제 1 항에 있어서,
    상기 현재 블록으로부터 결정되는 적어도 하나의 세그먼트의 개수에 관한 정보를 획득하는 단계; 및
    상기 적어도 하나의 세그먼트의 개수에 관한 정보가 상기 현재 블록이 하나의 세그먼트로 결정됨을 나타내는 경우, 상기 하나의 세그먼트에 대한 예측 모드를 나타내는 정보를 획득하는 단계를 더 포함하는 방법.
  8. 제 1 항에 있어서,
    상기 적어도 하나의 세그먼트에 대하여 예측을 수행하는 단계는,
    상기 현재 블록을 구성하는 세그먼트들의 경계를 나타내는 상기 현재 블록의 마스크를 생성하는 단계;
    상기 현재 블록의 주변 샘플을 이용하여 상기 적어도 하나의 세그먼트에 포함된 샘플들의 샘플 값을 결정하는 단계; 및
    상기 생성된 마스크 및 상기 결정된 샘플 값에 기초하여, 상기 적어도 하나의 세그먼트의 예측 값을 결정하는 단계를 포함하는 방법.
  9. 제 8 항에 있어서,
    상기 현재 블록의 마스크를 생성하는 단계는,
    상기 현재 블록으로부터 적어도 하나의 세그먼트를 결정하는 윤곽과 상기 현재 블록의 샘플 간의 위치 관계에 기초하여 상기 현재 블록의 샘플의 마스크 값을 결정함으로써 상기 현재 블록의 마스크를 생성하는 것을 특징으로 하는 방법.
  10. 제 8 항에 있어서,
    상기 적어도 하나의 세그먼트에 포함된 샘플들의 샘플 값을 결정하는 단계는,
    상기 획득된 윤곽의 모드 정보에 기초하여 상기 현재 블록의 주변 블록에 포함된 참조 샘플을 결정하는 단계; 및
    상기 결정된 참조 샘플을 이용하여 상기 적어도 하나의 세그먼트에 포함된 샘플들의 샘플 값을 결정하는 단계를 포함하는 방법.
  11. 현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드를 결정하는 단계;
    상기 윤곽의 모드에 기초하여, 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한지 여부를 결정하는 단계;
    상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한 경우, 상기 현재 블록의 주변 블록으로부터 유도되는 상기 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 상기 현재 블록으로부터 상기 적어도 하나의 세그먼트를 결정하는 단계;
    상기 적어도 하나의 세그먼트를 이용하여 상기 현재 블록에 대하여 예측을 수행하는 단계; 및
    상기 윤곽의 모드를 나타내는 상기 윤곽의 모드 정보를 부호화하는 단계를 포함하는 비디오 부호화 방법.
  12. 제 11 항에 있어서,
    상기 적어도 하나의 세그먼트를 결정하는 단계는,
    상기 윤곽의 모드 정보에 따라 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표 중 적어도 하나가 유도 가능하지 않은 경우, 상기 현재 블록의 가장자리에 위치한 샘플들을 이용하여 결정되는 상기 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 상기 현재 블록으로부터 상기 적어도 하나의 세그먼트를 결정하는 것을 특징으로 하는 방법.
  13. 제 12 항에 있어서,
    상기 현재 블록의 가장자리에 위치한 샘플들 중 상기 현재 블록의 상단 샘플들 또는 상기 현재 블록의 우측 샘플들을 이용하여 상기 윤곽의 제 1 좌표를 결정하는 단계; 및
    상기 현재 블록의 가장자리에 위치한 샘플들 중 상기 현재 블록의 하단 샘플들 또는 상기 현재 블록의 좌측 샘플들을 이용하여 상기 윤곽에 대한 제 2 좌표를 결정하는 단계를 더 포함하는 방법.
  14. 제 12 항에 있어서,
    상기 결정된 윤곽의 모드에 따라 상기 윤곽의 제 1 좌표가 상기 현재 블록의 우측에 위치하는 경우, 상기 현재 블록 내의 우측 샘플들을 이용하여 결정되는 상기 윤곽의 제 1 좌표를 결정하는 단계; 및
    상기 결정된 윤곽의 모드에 따라 상기 윤곽의 제 2 좌표가 상기 현재 블록의 하단에 위치하는 경우, 상기 현재 블록 내의 하단 샘플들을 이용하여 상기 윤곽의 제 2 좌표를 결정하는 단계를 포함하는 방법.
  15. 제 11 항에 있어서,
    상기 결정된 윤곽의 모드에 따라 상기 윤곽의 제 1 좌표가 상기 현재 블록의 상단에 위치하는 경우, 상기 윤곽의 제 1 좌표를 상기 현재 블록의 상단 블록으로부터 유도하는 단계; 및
    상기 획득된 윤곽의 모드 정보에 따라 상기 윤곽의 제 2 좌표가 상기 현재 블록의 좌측에 위치하는 경우, 상기 윤곽의 제 2 좌표를 상기 현재 블록의 좌측 블록으로부터 유도하는 단계를 더 포함하는 방법.
  16. 제 15 항에 있어서,
    상기 윤곽의 제 1 좌표를 상기 현재 블록의 상단 블록으로부터 유도하는 단계는,
    상기 현재 블록의 상단 블록의 최하단 샘플들을 샘플값을 이용하여 상기 윤곽의 제 1 좌표를 유도하고,
    상기 윤곽의 제 2 좌표를 상기 현재 블록의 좌측 블록으로부터 유도하는 단계는,
    상기 현재 블록의 좌측 블록의 최우측 샘플들의 샘플값을 이용하여 상기 윤곽의 제 2 좌표를 유도하는 것을 특징으로 하는 방법.
  17. 제 11 항에 있어서,
    상기 현재 블록으로부터 결정되는 적어도 하나의 세그먼트의 개수를 결정하는 단계; 및
    상기 현재 블록이 하나의 세그먼트로 결정되는 경우, 상기 적어도 하나의 세그먼트의 개수에 관한 정보 및 상기 하나의 세그먼트에 대한 예측 모드를 나타내는 정보를 부호화하는 단계를 더 포함하는 방법.
  18. 제 11 항에 있어서,
    상기 현재 블록을 구성하는 세그먼트들의 경계를 나타내는 상기 현재 블록의 마스크를 생성하는 단계;
    상기 현재 블록의 주변 샘플을 이용하여 상기 적어도 하나의 세그먼트에 포함된 샘플들의 샘플 값을 결정하는 단계; 및
    상기 생성된 마스크 및 상기 결정된 샘플 값에 기초하여, 상기 적어도 하나의 세그먼트의 예측 값을 결정하는 단계를 더 포함하는 방법.
  19. 제 18 항에 있어서,
    상기 현재 블록의 마스크를 생성하는 단계는,
    상기 현재 블록으로부터 적어도 하나의 세그먼트를 결정하는 윤곽과 상기 현재 블록의 샘플 간의 위치 관계에 기초하여 상기 현재 블록의 샘플의 마스크 값을 결정함으로써 상기 현재 블록의 마스크를 생성하는 것을 특징으로 하는 방법.
  20. 비디오 복호화 장치에 있어서,
    현재 블록으로부터 적어도 하나의 세그먼트를 결정하기 위한 윤곽의 모드 정보를 획득하고, 상기 윤곽의 모드 정보에 기초하여 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한지 여부를 결정하고, 상기 현재 블록의 주변 블록으로부터 상기 윤곽의 제 1 좌표 및 제 2 좌표가 유도 가능한 경우 상기 현재 블록의 주변 블록으로부터 유도되는 상기 윤곽의 제 1 좌표 및 제 2 좌표에 기초하여 상기 현재 블록으로부터 상기 적어도 하나의 세그먼트를 결정하는 세그먼트 결정부; 및
    상기 결정된 적어도 하나의 세그먼트에 대하여 예측을 수행하는 예측 수행부를 포함하는 비디오 복호화 장치.
PCT/KR2016/004873 2015-05-12 2016-05-10 인트라 예측을 수행하는 영상 복호화 방법 및 그 장치 및 인트라 예측을 수행하는 영상 부호화 방법 및 그 장치 Ceased WO2016182316A1 (ko)

Priority Applications (6)

Application Number Priority Date Filing Date Title
CN201680040532.5A CN107852506A (zh) 2015-05-12 2016-05-10 用于执行帧内预测的图像解码方法及其装置以及用于执行帧内预测的图像编码方法及其装置
JP2017559102A JP6532542B2 (ja) 2015-05-12 2016-05-10 イントラ予測を行う映像復号方法及びその装置並びにイントラ予測を行う映像符号化方法
EP16792962.9A EP3273694A4 (en) 2015-05-12 2016-05-10 Image decoding method for performing intra prediction and device thereof, and image encoding method for performing intra prediction and device thereof
AU2016262259A AU2016262259B2 (en) 2015-05-12 2016-05-10 Image decoding method for performing intra prediction and device thereof, and image encoding method for performing intra prediction and device thereof
US15/573,320 US20180176595A1 (en) 2015-05-12 2016-05-10 Image decoding method for performing intra prediction and device thereof, and image encoding method for performing intra prediction and device thereof
KR1020177032854A KR20180006915A (ko) 2015-05-12 2016-05-10 인트라 예측을 수행하는 영상 복호화 방법 및 그 장치 및 인트라 예측을 수행하는 영상 부호화 방법 및 그 장치

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201562160164P 2015-05-12 2015-05-12
US62/160,164 2015-05-12

Publications (1)

Publication Number Publication Date
WO2016182316A1 true WO2016182316A1 (ko) 2016-11-17

Family

ID=57249274

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2016/004873 Ceased WO2016182316A1 (ko) 2015-05-12 2016-05-10 인트라 예측을 수행하는 영상 복호화 방법 및 그 장치 및 인트라 예측을 수행하는 영상 부호화 방법 및 그 장치

Country Status (7)

Country Link
US (1) US20180176595A1 (ko)
EP (1) EP3273694A4 (ko)
JP (1) JP6532542B2 (ko)
KR (1) KR20180006915A (ko)
CN (1) CN107852506A (ko)
AU (1) AU2016262259B2 (ko)
WO (1) WO2016182316A1 (ko)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018143496A1 (ko) * 2017-02-03 2018-08-09 엘지전자(주) 예측 모드를 유도하여 비디오 신호를 인코딩, 디코딩하는 방법 및 장치
WO2019041219A1 (zh) * 2017-08-31 2019-03-07 深圳市大疆创新科技有限公司 编码方法、解码方法以及编码装置和解码装置
CN111213379A (zh) * 2017-10-16 2020-05-29 数字洞察力有限公司 用于将图像编码/解码的方法、装置和存储比特流的记录介质

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10880548B2 (en) * 2016-06-01 2020-12-29 Samsung Electronics Co., Ltd. Methods and apparatuses for encoding and decoding video according to coding order
US11284076B2 (en) * 2017-03-22 2022-03-22 Electronics And Telecommunications Research Institute Block form-based prediction method and device
MX2021003854A (es) * 2018-10-01 2021-05-27 Op Solutions Llc Métodos y sistemas de partición exponencial.
US10939118B2 (en) * 2018-10-26 2021-03-02 Mediatek Inc. Luma-based chroma intra-prediction method that utilizes down-sampled luma samples derived from weighting and associated luma-based chroma intra-prediction apparatus
KR20240024335A (ko) 2018-11-22 2024-02-23 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 서브 블록 기반 인터 예측을 위한 조정 방법
WO2020159988A1 (en) * 2019-01-28 2020-08-06 Op Solutions, Llc Inter prediction in exponential partitioning
WO2020256483A1 (ko) * 2019-06-21 2020-12-24 삼성전자 주식회사 영상 부호화 방법 및 장치, 영상 복호화 방법 및 장치
KR102808776B1 (ko) 2019-08-13 2025-05-15 두인 비전 컴퍼니 리미티드 서브 블록 기반 인터 예측의 모션 정밀도
CN110730343B (zh) * 2019-09-20 2021-12-07 中山大学 一种多功能视频编码帧间划分方法、系统及存储介质
WO2021052505A1 (en) 2019-09-22 2021-03-25 Beijing Bytedance Network Technology Co., Ltd. Reference picture resampling in video processing
US11388419B2 (en) * 2020-02-05 2022-07-12 Apple Inc. Smoothed directional and DC intra prediction
CN115883834A (zh) * 2021-09-30 2023-03-31 维沃移动通信有限公司 帧内预测的方法及终端
US12549722B2 (en) * 2022-06-02 2026-02-10 Tencent America LLC Systems and methods for partition-based predictions
CN119788867A (zh) * 2023-10-08 2025-04-08 海信视像科技股份有限公司 视频编码方法、视频解码方法及装置
CN119788866A (zh) * 2023-10-08 2025-04-08 海信视像科技股份有限公司 视频编码方法、视频解码方法及装置
KR20250174382A (ko) * 2024-06-05 2025-12-12 주식회사 엘지유플러스 비선형 기하학적 분할 모드에 기반한 비디오 부호화 및 복호화를 위한 방법 및 장치

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090074164A (ko) * 2006-09-29 2009-07-06 톰슨 라이센싱 기하학적 인트라 예측
KR20140070511A (ko) * 2014-05-15 2014-06-10 삼성전자주식회사 영상의 부호화 방법 및 장치, 영상 복호화 방법 및 장치
KR20140077990A (ko) * 2011-11-11 2014-06-24 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. 적응적 분할 코딩
KR20140139615A (ko) * 2010-10-08 2014-12-05 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. 블록 분할 및 블록 병합을 지원하는 픽처 코딩
KR20140142272A (ko) * 2012-04-20 2014-12-11 후아웨이 테크놀러지 컴퍼니 리미티드 이미지를 처리하는 방법
WO2016182317A1 (ko) * 2015-05-12 2016-11-17 삼성전자 주식회사 인트라 예측을 수행하는 영상 복호화 방법 및 그 장치 및 인트라 예측을 수행하는 영상 부호화 방법 및 그 장치

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090095316A (ko) * 2008-03-05 2009-09-09 삼성전자주식회사 영상 인트라 예측 방법 및 장치
EP2384004A4 (en) * 2009-01-29 2012-08-01 Lg Electronics Inc METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNALS USING INTRA MODE CONTOUR CODING
EP2509319A4 (en) * 2009-12-01 2013-07-10 Humax Co Ltd METHOD AND DEVICE FOR CODING / DECODING HIGH-RESOLUTION PICTURES
JP5222878B2 (ja) * 2010-03-24 2013-06-26 日本放送協会 イントラ予測装置、符号化器、復号器及びプログラム
EP2559248A2 (en) * 2010-04-12 2013-02-20 Qualcomm Incorporated Fixed point implementation for geometric motion partitioning
CN102948144B (zh) * 2010-04-26 2018-09-21 太阳专利托管公司 用于从周围块的统计推断出针对帧内预测的滤波模式
CN103053162B (zh) * 2010-09-30 2017-12-08 太阳专利托管公司 图像编码方法、图像编码装置
EP4161078A1 (en) * 2011-11-11 2023-04-05 GE Video Compression, LLC Effective wedgelet partition coding using spatial prediction

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090074164A (ko) * 2006-09-29 2009-07-06 톰슨 라이센싱 기하학적 인트라 예측
KR20140139615A (ko) * 2010-10-08 2014-12-05 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. 블록 분할 및 블록 병합을 지원하는 픽처 코딩
KR20140077990A (ko) * 2011-11-11 2014-06-24 프라운호퍼 게젤샤프트 쭈르 푀르데룽 데어 안겐반텐 포르슝 에. 베. 적응적 분할 코딩
KR20140142272A (ko) * 2012-04-20 2014-12-11 후아웨이 테크놀러지 컴퍼니 리미티드 이미지를 처리하는 방법
KR20140070511A (ko) * 2014-05-15 2014-06-10 삼성전자주식회사 영상의 부호화 방법 및 장치, 영상 복호화 방법 및 장치
WO2016182317A1 (ko) * 2015-05-12 2016-11-17 삼성전자 주식회사 인트라 예측을 수행하는 영상 복호화 방법 및 그 장치 및 인트라 예측을 수행하는 영상 부호화 방법 및 그 장치

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3273694A4 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018143496A1 (ko) * 2017-02-03 2018-08-09 엘지전자(주) 예측 모드를 유도하여 비디오 신호를 인코딩, 디코딩하는 방법 및 장치
WO2019041219A1 (zh) * 2017-08-31 2019-03-07 深圳市大疆创新科技有限公司 编码方法、解码方法以及编码装置和解码装置
CN111213379A (zh) * 2017-10-16 2020-05-29 数字洞察力有限公司 用于将图像编码/解码的方法、装置和存储比特流的记录介质
CN111213379B (zh) * 2017-10-16 2023-11-21 数字洞察力有限公司 用于将图像编码/解码的方法、装置和存储比特流的记录介质
US11831870B2 (en) 2017-10-16 2023-11-28 Digitalinsights Inc. Method, device, and recording medium storing bit stream, for encoding/decoding image
US12439043B2 (en) 2017-10-16 2025-10-07 Digitalinsights Inc. Method, device, and recording medium storing bit stream, for encoding/decoding image

Also Published As

Publication number Publication date
AU2016262259A1 (en) 2017-11-09
EP3273694A1 (en) 2018-01-24
CN107852506A (zh) 2018-03-27
JP2018520549A (ja) 2018-07-26
JP6532542B2 (ja) 2019-06-19
US20180176595A1 (en) 2018-06-21
EP3273694A4 (en) 2018-04-25
AU2016262259B2 (en) 2019-01-17
KR20180006915A (ko) 2018-01-19

Similar Documents

Publication Publication Date Title
WO2016182316A1 (ko) 인트라 예측을 수행하는 영상 복호화 방법 및 그 장치 및 인트라 예측을 수행하는 영상 부호화 방법 및 그 장치
WO2016182317A1 (ko) 인트라 예측을 수행하는 영상 복호화 방법 및 그 장치 및 인트라 예측을 수행하는 영상 부호화 방법 및 그 장치
WO2020222588A1 (ko) 적응적 모션 벡터 해상도를 이용한 비디오 신호 처리 방법 및 장치
WO2019177354A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019190224A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020096388A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2018226015A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020139059A1 (ko) 움직임 벡터 차분의 부호화 방법 및 부호화 장치, 및 움직임 벡터 차분의 복호화 방법 및 복호화 장치
WO2018012886A1 (ko) 영상 부호화/복호화 방법 및 이를 위한 기록 매체
WO2018128417A1 (ko) 비디오 복호화 방법 및 그 장치 및 비디오 부호화 방법 및 그 장치
WO2019190140A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2016137149A1 (ko) 폴리곤 유닛 기반 영상 처리 방법 및 이를 위한 장치
WO2018174617A1 (ko) 블록 형태에 기반한 예측 방법 및 장치
WO2020004912A1 (ko) 양자화 파라미터를 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2017192011A2 (ko) 화면 내 예측을 이용한 영상 부호화/복호화 방법 및 장치
WO2018131982A1 (ko) 영상 신호 부호화/복호화 방법 및 장치
WO2020050600A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2018097700A1 (ko) 필터링을 위한 방법 및 장치
WO2019139393A1 (ko) 색차 성분에 관한 화면내 예측 부호화/복호화 방법 및 장치
WO2020067700A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2018034373A1 (ko) 영상 처리 방법 및 이를 위한 장치
WO2019074273A1 (ko) 인터 예측 정보를 사용하는 방법 및 장치
WO2020226359A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2022260374A1 (ko) 개선된 크로스 컴포넌트 선형 모델 예측을 이용하는 비디오 코딩방법 및 장치
WO2020005046A1 (ko) 영상 부호화/복호화 방법 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16792962

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2016262259

Country of ref document: AU

Date of ref document: 20160510

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2017559102

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 15573320

Country of ref document: US

ENP Entry into the national phase

Ref document number: 20177032854

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE