WO2020005046A1 - 영상 부호화/복호화 방법 및 장치 - Google Patents
영상 부호화/복호화 방법 및 장치 Download PDFInfo
- Publication number
- WO2020005046A1 WO2020005046A1 PCT/KR2019/007982 KR2019007982W WO2020005046A1 WO 2020005046 A1 WO2020005046 A1 WO 2020005046A1 KR 2019007982 W KR2019007982 W KR 2019007982W WO 2020005046 A1 WO2020005046 A1 WO 2020005046A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- block
- information
- prediction
- motion
- encoding
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/103—Selection of coding mode or of prediction mode
- H04N19/105—Selection 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/136—Incoming video signal characteristics or properties
- H04N19/137—Motion inside a coding unit, e.g. average field, frame or block difference
- H04N19/139—Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/159—Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/513—Processing of motion vectors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/513—Processing of motion vectors
- H04N19/517—Processing of motion vectors by encoding
- H04N19/52—Processing of motion vectors by encoding by predictive encoding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/523—Motion estimation or motion compensation with sub-pixel accuracy
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/537—Motion estimation other than block-based
- H04N19/54—Motion estimation other than block-based using feature points or meshes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/597—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding specially adapted for multi-view video sequence encoding
Definitions
- the present invention relates to a video encoding and decoding technique, and more particularly, to a method and apparatus for encoding / decoding in inter prediction.
- An object of the present invention is to provide an inter prediction method.
- the present invention also provides a method and apparatus for constructing a motion information prediction candidate group for inter prediction.
- the present invention also provides a method and apparatus for performing inter prediction according to a motion information encoding mode.
- the video encoding / decoding method and apparatus determine a motion information encoding mode of a target block, configure a motion information prediction candidate group according to the motion information encoding mode, and select one candidate from the motion information prediction candidate group.
- a motion information encoding mode of a target block configures a motion information prediction candidate group according to the motion information encoding mode, and select one candidate from the motion information prediction candidate group.
- FIG. 1 is a conceptual diagram of an image encoding and decoding system according to an embodiment of the present invention.
- FIG. 2 is a block diagram of a video encoding apparatus according to an embodiment of the present invention.
- FIG. 3 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.
- FIG. 4 is an exemplary diagram illustrating various partition types that may be obtained in a block partition unit of the present invention.
- Figure 5 shows an example of a family tree for explaining the genetic characteristics of the members of a household and the people in the blood relationship.
- FIG. 6 illustrates various arrangement examples of a counter block having a horizontal relationship with a target block.
- FIG. 7 illustrates various arrangement examples of a relative block that is perpendicular to the target block.
- FIG. 8 illustrates various arrangement examples of a relative block that is a vertical relationship with a target block and a horizontal relationship.
- FIG. 9 illustrates an example of block partitioning obtained according to a tree type.
- p to r represent block division examples of QT, BT, and TT.
- FIG. 10 is an exemplary diagram of division division obtained due to QT, BT, and TT.
- 11 is an exemplary diagram for checking correlation between blocks based on a partitioning scheme and a partitioning configuration.
- FIG. 12 is an exemplary diagram illustrating various cases of obtaining a prediction block through inter prediction.
- FIG. 13 illustrates an example of configuring a reference picture list according to an embodiment of the present invention.
- FIG. 14 is a conceptual diagram illustrating an out-of-movement motion model according to an embodiment of the present invention.
- 15 is an exemplary diagram illustrating motion estimation in units of subblocks according to an embodiment of the present invention.
- FIG. 16 is an exemplary diagram for arranging a block spatially or temporally adjacent to a reference block according to an embodiment of the present invention.
- the video encoding / decoding method and apparatus determine a motion information encoding mode of a target block, configure a motion information prediction candidate group according to the motion information encoding mode, and select one candidate from the motion information prediction candidate group.
- a motion information encoding mode of a target block configures a motion information prediction candidate group according to the motion information encoding mode, and select one candidate from the motion information prediction candidate group.
- first, second, A, and B may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.
- the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.
- one or more color spaces may be configured according to a color format of an image. It may consist of one or more pictures with a certain size or one or more pictures with other sizes, depending on the color format.
- color formats such as 4: 4: 4, 4: 2: 2, 4: 2: 0, and Monochrome (only Y) may be supported.
- YCbCr 4: 2: 0 one luminance component (Y in this example) and two chrominance components (Cb / Cr in this example) may be configured, wherein the chrominance component and the luminance component are configured.
- the ratio may have a length of 1: 2.
- 4: 4: 4 may have the same ratio of width and length.
- Images can be classified into I, P, B, etc. according to the image type (eg, picture type, slice type, tile group type, tile type, brick type, etc.).
- the I image type does not use a reference picture.
- the image may be encoded by itself, and the P image type may mean an image that is encoded using a reference picture but allows only forward prediction.
- the B image type may be encoded using a reference picture and may be encoded using the reference picture. Although it may mean an image that allows backward prediction, a part of the type may be combined (P and B are combined) or another type of image may be supported according to an encoding setting.
- the explicit processing may generate selection information indicating one candidate among a plurality of candidate groups for encoding information in a sequence, a slice, a tile group, a tile, a brick, a block, a subblock, and include the same in a bitstream.
- the decoder parses the related information in the same level as the encoder and restores the decoded information.
- the implicit processing may be understood as encoding / decoding information processed by the same process and rule in the encoder and the decoder.
- FIG. 1 is a conceptual diagram of an image encoding and decoding system according to an embodiment of the present invention.
- the video encoding apparatus 105 and the decoding apparatus 100 may include a personal computer (PC), a notebook computer, a personal digital assistant (PDA), and a portable multimedia player (PMP). Player), PlayStation Portable (PSP: PlayStation Portable), wireless communication terminal (Wireless Communication Terminal), smart phone (Smart Phone) or a user terminal such as a TV, or a server terminal such as an application server and a service server, etc.
- PC personal computer
- PDA personal digital assistant
- PMP portable multimedia player
- Player Portable
- PSP PlayStation Portable
- wireless communication terminal Wireless Communication Terminal
- smart phone Smart Phone
- user terminal such as a TV
- server terminal such as an application server and a service server, etc.
- a communication device such as a communication modem for communicating with a wired / wireless communication network, a memory (memory, 120, 125) or a program for storing various programs and data for inter or intra prediction for encoding or decoding an image and executing the operation
- various devices including processors (processors 110 and 115) for controlling.
- the image encoded in the bitstream by the image encoding apparatus 105 is real-time or non-real-time via the wired or wireless communication network (Network), such as the Internet, local area wireless communication network, wireless LAN network, WiBro network or mobile communication network, or cable or general purpose
- the image decoding apparatus 100 may be transmitted to the image decoding apparatus 100 through various communication interfaces such as a universal serial bus (USB), and may be decoded by the image decoding apparatus 100 to restore and reproduce the image.
- an image encoded in the bitstream by the image encoding apparatus 105 may be transferred from the image encoding apparatus 105 to the image decoding apparatus 100 through a computer-readable recording medium.
- the above-described image encoding apparatus and the image decoding apparatus may be separate apparatuses, but may be made of one image encoding / decoding apparatus according to implementation.
- some components of the image encoding apparatus may be implemented to include at least the same structure or to perform at least the same function as substantially the same technical elements as some components of the image decoding apparatus.
- the image decoding apparatus corresponds to a computing device applying the image encoding method performed by the image encoding apparatus to the decoding, the following description will focus on the image encoding apparatus.
- the computing device may include a memory for storing a program or software module for implementing an image encoding method and / or an image decoding method, and a processor connected to the memory and executing a program.
- the image encoding apparatus may be referred to as an encoder
- the image decoding apparatus may be referred to as a decoder.
- FIG. 2 is a block diagram of a video encoding apparatus according to an embodiment of the present invention.
- the image encoding apparatus 20 may include a predictor 200, a subtractor 205, a transformer 210, a quantizer 215, an inverse quantizer 220, an inverse transformer 225, An adder 230, a filter 235, an encoded picture buffer 240, and an entropy encoder 245 may be included.
- the prediction unit 200 may be implemented using a prediction module, which is a software module, and generates a prediction block with an intra prediction or inter prediction for a block to be encoded. can do.
- the prediction unit 200 may generate a prediction block by predicting a target block to be currently encoded in the image. In other words, the prediction unit 200 predicts the pixel value of each pixel of the target block to be encoded in the image according to the intra prediction or the inter prediction. Can generate a prediction block with
- the prediction unit 200 may transmit information necessary for generating a prediction block, such as information about a prediction mode such as an intra prediction mode or an inter prediction mode, to the encoder so that the encoder encodes the information about the prediction mode. Can be.
- the processing unit for which the prediction is performed the processing method for which the prediction method and the detailed content are determined may be determined according to the encoding setting.
- the prediction method, the prediction mode, etc. may be determined in the prediction unit, and the performance of the prediction may be performed in the transformation unit.
- the intra prediction unit may have a directional prediction mode such as a horizontal or vertical mode used according to a prediction direction, and a non-directional prediction mode such as DC or planar using a method of averaging or interpolating reference pixels.
- a directional prediction mode such as a horizontal or vertical mode used according to a prediction direction
- a non-directional prediction mode such as DC or planar using a method of averaging or interpolating reference pixels.
- Directional and non-directional modes allow you to configure candidate intra prediction modes, either 35 prediction modes (33 directional + 2 non-directional) or 67 prediction modes (65 directional + 2 non-directional), 131
- One of various candidates, such as prediction mode (129 directions + 2 directions) may be used as the candidate group.
- the intra prediction unit may include a reference pixel configuration unit, a reference pixel filter unit, a reference pixel interpolator, a prediction mode determiner, a prediction block generator, and a prediction mode encoder.
- the reference pixel configuration unit may configure a pixel belonging to a neighboring block around the target block and adjacent to the target block as a reference pixel for intra prediction. According to the encoding setting, one nearest reference pixel line may be configured as a reference pixel, or another adjacent reference pixel line may be configured as a reference pixel, and a plurality of reference pixel lines may be configured as a reference pixel.
- the reference pixel can be generated using the available reference pixel, and if not all of the reference pixel is a predetermined value (e.g., a pixel value represented by bit depth). Median of the range, etc.) may be used to generate the reference pixel.
- a predetermined value e.g., a pixel value represented by bit depth. Median of the range, etc.
- the reference pixel filter unit of the intra prediction unit may perform filtering on the reference pixel in order to reduce deterioration remaining through the encoding process.
- the filter used is a 3-tap filter [1/4, 1/2, 1/4], 5-tap filter [2/16, 3/16, 6/16, 3/16, 2/16], etc. It may be the same low-pass filter. Whether to apply filtering or the filtering type may be determined according to encoding information (for example, the size, shape, prediction mode, etc. of a block).
- the reference pixel interpolator of the intra prediction unit may generate pixels in a decimal unit through a linear interpolation process of the reference pixel according to the prediction mode, and an interpolation filter applied according to encoding information may be determined.
- the interpolation filter used may include a 4-tap cubic filter, a 4-tap Gaussian filter, a 6-tap Wiener filter, an 8-tap Kalman filter, and the like. Interpolation is generally performed separately from the process of performing the low pass filter, but the filtering process may be performed by combining the filters applied to the two processes into one.
- the prediction mode determiner of the intra prediction unit may select an optimal prediction mode of at least one prediction mode candidate group in consideration of an encoding cost, and the prediction block generator may generate the prediction block using the prediction mode.
- the prediction mode encoder may encode the optimal prediction mode based on a prediction value. In this case, the prediction information may be adaptively encoded according to the case where the prediction value is correct or the case where the prediction value is not correct.
- the prediction value is referred to as Most Probable Mode (MPM), and some modes may be configured as MPM candidate groups among all modes belonging to the prediction mode candidate group.
- the MPM candidate group includes preset prediction modes (eg, DC, planar, vertical, horizontal, diagonal, etc.) or prediction modes of spatially adjacent blocks (eg, left, top, top left, top right, bottom left blocks, etc.). This may include.
- a mode derived from a mode previously included in the MPM candidate group may be configured as the MPM candidate group.
- the order of inclusion in the MPM candidate group may be determined according to the priority, and when the number of MPM candidate groups (determined according to the number of prediction mode candidate groups) is filled according to the priority, the MPM candidate group configuration may be completed.
- priorities may be determined in order of a prediction mode of a spatially adjacent block, a predetermined prediction mode, and a mode derived from a prediction mode included in the MPM candidate group first, but other modifications are possible.
- the candidate group may be included in the order of left-up-down-left-right-left block, and the candidate group in the order of DC-plane-vertical-horizontal mode among preset prediction modes. It may be included in the, including a mode obtained by adding the +1, -1 and the like in the included mode in the candidate group, a total of six modes can be configured as a candidate group. Alternatively, a total of seven modes are included in the candidate group with one priority such as Left-Up-DC-Planar-Left-Right-Left-Up- (Left + 1)-(Left-1)-(Up + 1). It can be configured as.
- the subtraction unit 205 may generate a residual block by subtracting the prediction block from the target block.
- the subtractor 205 calculates a difference between the pixel value of each pixel of the target block to be encoded and the predicted pixel value of each pixel of the prediction block generated by the predictor, and is a residual signal in the form of a block. Residual blocks can be created.
- the subtraction unit 205 may generate the residual block according to units other than the block unit obtained through the block division unit described below.
- the transform unit 210 may convert a signal belonging to a spatial domain into a signal belonging to a frequency domain, and a signal obtained through a transformation process is called a transformed coefficient.
- a transform block having a transform coefficient may be obtained by transforming the residual block having the residual signal received from the subtractor, but the input signal is determined according to an encoding setting, which is not limited to the residual signal.
- the transform unit can transform the residual block using transformation techniques such as a Hadamard transform, a Discrete Sine Transform (DST Based-Transform), or a Discrete Cosine Transform (DCT Based-Transform).
- transformation techniques such as a Hadamard transform, a Discrete Sine Transform (DST Based-Transform), or a Discrete Cosine Transform (DCT Based-Transform).
- DST Based-Transform a Discrete Sine Transform
- DCT Based-Transform Discrete Cosine Transform
- At least one of the transformation schemes may be supported, and at least one detailed transformation scheme may be supported in each transformation scheme.
- the detailed changed technique may be a transformation technique in which a part of the basis vector is configured differently in each transformation technique.
- DCT digital coherence tomography
- DCT-8 one or more detailed transformation schemes of DCT-1 to DCT-8
- DST-8 one or more detailed transformation schemes of DST-1 to DST-8
- a portion of the detailed transformation scheme may be configured to form a transformation technique candidate group.
- DCT-2, DCT-8, and DST-7 may be configured as a transform technique candidate group to perform transform.
- the conversion can be performed in the horizontal / vertical direction.
- one-dimensional transform is performed in the horizontal direction using the transform technique of DCT-2
- one-dimensional transform is performed in the vertical direction using the transform technique of DST-7 to perform a total two-dimensional transform.
- the pixel value of can be converted into the frequency domain.
- Transform can be performed using one fixed transform technique or transform can be performed by adaptively selecting the transform scheme according to the encoding configuration.
- the adaptation method may be selected using an explicit or implicit method.
- each transformation technique selection information or transformation technique set selection information applied to the horizontal and vertical directions may occur in a unit such as a block.
- encoding settings may be defined according to an image type (I / P / B), a color component, a size / shape / position of a block, an intra prediction mode, and a predetermined conversion scheme may be selected accordingly.
- the partial transform is omitted depending on the encoding setting. That is, one or more of the horizontal / vertical units may be omitted, either explicitly or implicitly.
- the transformer may transmit information necessary to generate a transform block to the encoder to encode the information, and store the information in the bitstream and transmit the information to the decoder, and the decoder of the decoder parses the information and inversely transforms the information. Can be used for the process.
- the quantization unit 215 may quantize the input signal.
- the signal obtained through the quantization process is referred to as a quantized coefficient.
- a quantization block having a quantization coefficient may be obtained by quantizing a residual block having a residual transform coefficient received from a transform unit. The received signal is determined according to an encoding setting, which is not limited to the residual transform coefficient.
- the quantization unit may quantize the transformed residual block by using quantization techniques such as dead zone uniform threshold quantization, quantization weighted matrix, and the like, but are not limited thereto. Quantization techniques can be used.
- the quantization process may be omitted according to the encoding setting.
- the quantization process may be omitted (including the inverse process) according to the encoding setting (for example, the quantization parameter is 0. That is, the lossless compression environment).
- the quantization process may be omitted when the compression performance through quantization is not exhibited according to the characteristics of the image.
- the region in which the quantization process is omitted among the quantization blocks M x N may be an entire region or a partial region (M / 2 x N / 2, M x N / 2, M / 2 x N, etc.) and may be quantized.
- the omission selection information may be determined implicitly or explicitly.
- the quantization unit may transmit information necessary for generating a quantization block to the encoding unit and encode the information.
- the quantization unit stores the information in a bitstream and transmits the information to the decoder, and the decoder of the decoder parses the information and dequantizes it. Can be used for the process.
- the residual block may be transformed from the residual signal to generate a residual block having transform coefficients, and the quantization process may not be performed. Not only may the quantization process be performed without converting the residual signal into transform coefficients, but neither the transformation nor the quantization process may be performed. This may be determined according to the encoder setting.
- the inverse quantization unit 220 inverse quantizes the residual block quantized by the quantization unit 215. That is, the inverse quantizer 220 inversely quantizes the quantized frequency coefficient sequence to generate a residual block having the frequency coefficient.
- the inverse transform unit 225 inversely transforms the residual block inversely quantized by the inverse quantization unit 220. That is, the inverse transformer 225 inversely transforms frequency coefficients of the inversely quantized residual block to generate a residual block having a pixel value, that is, a reconstructed residual block.
- the inverse transform unit 225 may perform inverse transform by using the transformed method used in the transform unit 210 as the inverse.
- the adder 230 reconstructs the target block by adding the prediction block predicted by the predictor 200 and the residual block reconstructed by the inverse transform unit 225.
- the reconstructed target block is stored as a reference picture (or a reference block) in the encoded picture buffer 240 and may be used as a reference picture when encoding the next block, another block, or another picture of the target block.
- the filter unit 235 may include one or more post-processing filter processes such as a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), and the like.
- the deblocking filter may remove block distortion generated at the boundary between blocks in the reconstructed picture.
- the ALF may perform filtering based on a value obtained by comparing the reconstructed image with the original image after the block is filtered through the deblocking filter.
- the SAO may restore the offset difference from the original image on a pixel basis with respect to the residual block to which the deblocking filter is applied.
- Such a post-processing filter may be applied to the reconstructed picture or block.
- the encoded picture buffer 240 may store a block or a picture reconstructed by the filter unit 235.
- the reconstructed block or picture stored in the encoded picture buffer 240 may be provided to the prediction unit 200 that performs intra prediction or inter prediction.
- the entropy encoder 245 scans the generated quantization frequency coefficient sequence according to various scan methods to generate a quantization coefficient sequence, and outputs the encoded quantization coefficient sequence by encoding it using an entropy encoding technique.
- the scan pattern may be set to one of various patterns such as zigzag, diagonal lines, and rasters.
- encoded data including encoded information transmitted from each component may be generated and output as a bitstream.
- FIG. 3 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.
- the image decoding apparatus 30 includes an entropy decoder 305, a predictor 310, an inverse quantizer 315, an inverse transformer 320, an adder and subtractor 325, a filter 330, and the like.
- the decoded picture buffer 335 may be configured.
- the prediction unit 310 may be configured to include an intra prediction module and an inter prediction module.
- the image bitstream may be transferred to the entropy decoder 305.
- the entropy decoder 305 may decode the bitstream to decode the decoded data including the quantized coefficients and the decoded information transmitted to each component.
- the prediction unit 310 may generate a prediction block based on the data transferred from the entropy decoding unit 305.
- the reference picture list using a default construction technique may be constructed based on the reference picture stored in the decoded picture buffer 335.
- the intra prediction unit may include a reference pixel configuration unit, a reference pixel filter unit, a reference pixel interpolator, a prediction block generator, and a prediction mode decoder, some of which perform the same process as that of the encoder, and some of which inversely induces the process. Can be done.
- the inverse quantizer 315 may inverse quantize the quantized transform coefficients provided in the bitstream and decoded by the entropy decoder 305.
- the inverse transform unit 320 may generate a residual block by applying inverse transform techniques of inverse DCT, inverse integer transform, or the like to a transform coefficient.
- the inverse quantization unit 315 and the inverse transform unit 320 perform the processes performed by the transform unit 210 and the quantization unit 215 of the image encoding apparatus 20 described above, and may be implemented in various ways. have.
- the same process and inverse transform shared with the transform unit 210 and the quantization unit 215 may be used, and information about the transform and quantization process from the image encoding apparatus 20 (for example, transform size and transform). Shape, quantization type, etc.) may be used to reverse the transform and quantization processes.
- the residual block that has undergone inverse quantization and inverse transformation may be added to the prediction block derived by the prediction unit 310 to generate an image block reconstructed. This addition can be made by the adder and subtractor 325.
- the filter 330 may apply a deblocking filter to the reconstructed image block to remove blocking if necessary, and further add other loop filters to improve video quality before and after the decoding process. Can also be used.
- the reconstructed and filtered image block may be stored in the decoded picture buffer 335.
- the image encoding / decoding apparatus may further include a block divider.
- the block divider may divide the block into blocks of various units and sizes.
- the basic coding unit (or maximum coding unit. Coding Tree Unit. CTU) may mean a basic (or start) unit for prediction, transformation, quantization, etc. in the image encoding process.
- the basic coding unit may include one luminance basic coding block (or, maximum coding block, Coding Tree Block.CTB) and two basic color difference coding blocks according to a color format (YCbCr in this example). According to the size of each block can be determined.
- a coding block (CB) may be obtained according to a division process.
- a coding block may be understood as a unit that is not divided into further coding blocks according to a certain restriction, and may be set as a start unit of division into lower units.
- a block is not limited to a rectangular shape, but can be understood as a broad concept including various shapes such as triangles and circles.
- a block may be expressed as M ⁇ N, and a maximum value and a minimum value of each block may be obtained within a range. For example, if the maximum value of a block is 256 ⁇ 256 and the minimum value is 4 ⁇ 4, a 2 m ⁇ 2 n block (m and n are integers from 2 to 8 in this example) or 2 m ⁇ 2 m In this example, m and n are integers from 2 to 128, or m ⁇ m blocks (m and n are integers from 4 to 256).
- m and n may or may not be the same, and one or more ranges in which the blocks such as the maximum value and the minimum value are supported may occur.
- information about a maximum size and a minimum size of a block may occur, and information about a maximum size and a minimum size of a block, etc. may be generated in some division settings.
- the former may be range information on the maximum and minimum sizes that may occur in the image, and the latter may be information on the maximum and minimum sizes that may occur according to some division settings.
- the division setting may include image type (I / P / B), color component (YCbCr, etc.), block type (encoding / prediction / conversion / quantization, etc.), division type (Index or Type), and division method (QT in the Tree method).
- BT, TT, etc. may be defined by SI2, SI3, SI4, etc.) in an index method.
- width / length length ratio (the shape of the block) that the block may have, and a threshold value condition may be set for it.
- k is a ratio of length and width equal to A / B (A is a length or the same value among horizontal and vertical values, and B is the remaining value). It may be defined according to, and may be one or more real numbers such as 1.5, 2, 3, 4, and the like.
- constraints regarding the shape of one block in the image may be supported, or one or more constraints may be supported according to the division setting.
- whether or not block division is supported may be determined by the ranges and conditions as described above and the division setting described later. For example, if a candidate (child block) according to a partition of a block (parent block) satisfies a supported block condition, the partition may be supported. If not, the partition may not be supported.
- the block divider may be set in relation to each component of the image encoding apparatus and the decoding apparatus, and the size and shape of the block may be determined through this process.
- the set block may be defined differently according to the configuration unit, and a prediction block in the prediction unit, a transform block in the transform unit, and a quantization block in the quantization unit may correspond to this.
- the present invention is not limited thereto, and a block unit according to another component may be further defined.
- the input and output of each component is described in the case of a rectangular shape, but in some components it may be possible to input / output in a different form (for example, a right triangle, etc.).
- the size and shape of the initial (or starting) block of the block division may be determined from higher units.
- the initial block may be divided into smaller sized blocks, and when the optimal size and shape according to the division of the block is determined, the block may be determined as the initial block of the lower unit.
- the upper unit may be a coding block and the lower unit may be a prediction block or a transform block, but the present invention is not limited thereto, and various modifications may be possible.
- a partitioning process for searching for a block having an optimal size and shape like the upper unit may be performed.
- the block dividing unit may divide the basic coding block (or the largest coding block) into at least one coding block, and the coding block may divide into at least one prediction block / transform block / quantization block. .
- the prediction block may perform partitioning into at least one transform block / quantization block, and the transform block may perform partitioning into at least one quantization block.
- some blocks may be dependent relationships (ie, defined by higher units and lower units) with other blocks or may have independent relationships.
- the prediction block may be an upper unit of the transform block or may be an independent unit of the transform block, and various relationships may be set according to the type of the block.
- the unit-to-unit combination does not perform the division from the upper unit to the lower unit, but performs the encoding process (eg, the prediction unit, the transform unit, the inverse transform unit, etc.) of the lower unit in the block (size and shape) of the upper unit.
- the encoding process eg, the prediction unit, the transform unit, the inverse transform unit, etc.
- the splitting process may be shared in a plurality of units, and the splitting information may be generated in one unit (for example, higher unit).
- a prediction process, a transform, and an inverse transform process may be performed in a coding block (when a coding block is combined with a prediction block and a transform block).
- a prediction process may be performed in a coding block (when a coding block is combined with a prediction block), and a transform and inverse transform process may be performed in a transform block that is the same as or smaller than the coding block.
- a prediction process may be performed on a prediction block that is the same as or smaller than the coding block (when the coding block is combined with a transform block), and a transform and inverse transform process may be performed on the coding block.
- a prediction process may be performed on a prediction block that is the same as or smaller than the coding block (when the prediction block is combined with a transform block), and a transform and inverse transform process may be performed on the prediction block.
- a prediction process may be performed in a prediction block that is the same as or smaller than the coding block (when not combined in any block), and a transform and inverse transform process may be performed in a transform block that is the same as or smaller than the coding block.
- the encoding element may include an image type, a color component, an encoding mode (Intra / Inter), a segmentation setting, a block size / shape / position, a length / length ratio, and prediction related information (eg, an intra prediction mode, Inter prediction mode, etc.), transform related information (eg, transform technique selection information, etc.), quantization related information (eg, quantization region selection information, quantized transform coefficient encoding information, etc.), and the like.
- an intra prediction mode Inter prediction mode, etc.
- transform related information eg, transform technique selection information, etc.
- quantization related information eg, quantization region selection information, quantized transform coefficient encoding information, etc.
- mode information for example, split information, etc.
- the mode information may be stored in the bitstream together with information generated by the component to which the block belongs (for example, prediction related information and transform related information) and transmitted to the decoder, and may be parsed in units of the same level by the decoder. Can be used in the video decoding process.
- the initial block is in the form of a square, but the same may be similarly or similarly applied to the case where the initial block is in the form of a rectangle.
- the block divider may support various kinds of splits. For example, it may support tree-based partitioning or index-based partitioning, and other methods may be supported.
- the tree-based partition may determine the partition type based on various kinds of information (for example, whether to split, the tree type, the split direction, etc.), and the index-based partition may determine the partition type based on predetermined index information.
- FIG. 4 is an exemplary diagram illustrating various partition types that may be obtained in a block partition unit of the present invention.
- the division form as shown in FIG. 4 is obtained through one division (or process).
- the present disclosure is not limited thereto and may also be obtained through a plurality of division operations.
- additional divisional forms not shown in FIG. 4 may be possible.
- a quad tree QT
- BT binary tree
- TT ternary tree
- multi-tree split When one tree method is supported, it may be referred to as a single tree split, and when two or more tree methods are supported, a multi-tree split.
- the block is divided into two (i.e., four) in the horizontal and vertical directions (n), and in the case of BT, the block is divided into two in the horizontal or vertical directions (b to g). In the case of TT, the block is divided into three directions in one direction (h to m).
- the division method (o, p) may be supported by limiting the division direction to one of horizontal and vertical.
- the schemes (b, c) having uniform sizes
- only the schemes (d to g) having non-uniform sizes, or a mixture of the two schemes may be supported.
- TT only the division (h, j, k, m) in which the division has an arrangement (1: 1: 2, 2: 1: 1, etc. in a left-> right or up-> down direction) It can support only the methods (i, l) that are supported, centered (1: 2: 1, etc.), or a mixture of both.
- z-partition (b, d, e, h, i, j, o) limited to the horizontal division direction among the tree methods, or z-partition (c, f, g only limited to the vertical division direction). , k, l, m, p), or a mixture of both.
- z may be an integer of 2 or more, such as 2, 3, and 4.
- One or more methods of the tree split may be supported according to encoding settings. For example, it may support QT, support QT / BT, or support QT / BT / TT.
- the above example is a case where the base tree split is QT and BT and TT are included in the additional split scheme according to whether other trees are supported, but various modifications may be possible.
- information on whether or not the other tree is supported (bt_enabled_flag, tt_enabled_flag, bt_tt_enabled_flag, etc., may have a value of 0 or 1, 0 is not supported, and 1 is supported) is implicitly determined according to the encoding setting, or sequence, picture, It may be determined explicitly in units of slices, tile groups, tiles, bricks, and the like.
- the partition information may include information on whether to split (tree_part_flag. Or qt_part_flag, bt_part_flag, tt_part_flag, bt_tt_part_flag. The value may be 0 or 1, and 0 may be divided and 1 is divided). In addition, depending on the division schemes BT and TT, the division direction (dir_part_flag. Or bt_dir_part_flag, tt_dir_part_flag, bt_tt_dir_part_flag. May be 0 or 1, where 0 is ⁇ horizontal / horizontal>, and 1 is ⁇ vertical / vertical>) Information about may be added, which may be information that may occur when splitting is performed.
- partition information configurations may be possible.
- the following description assumes an example of how the partition information is configured at one depth level (ie, for the convenience of explanation, although recursive partitioning may be possible because one or more supported partition depths are set to one or more). do.
- the selection information on the split type (for example, tree_idx. 0 is QT, 1 is BT, 2 is TT) is checked. At this time, additionally check the split direction information according to the selected split type, and start again from the beginning if additional splitting is possible due to the next step (when the split depth has not reached the maximum, or end splitting if splitting is not possible). Go to).
- the information on whether to split some tree methods is checked and the process proceeds to the next step.
- the split is not performed, information on whether or not the partial tree method BT is split is checked.
- the split is not performed, information on whether or not the partial tree method TT is split is checked. At this time, if the division is not performed, the division ends.
- splitting of some tree type QT
- the process proceeds to the next step.
- the split direction information is checked and the process proceeds to the next step.
- the split of some tree split schemes TT
- the information on whether to split for some tree method is checked. At this time, if the split is not performed, the information on whether or not to split some tree methods (BT and TT) is checked. At this time, if the division is not performed, the division ends.
- splitting of some tree type QT
- the process proceeds to the next step.
- splitting of some tree methods BT and TT the split direction information is checked and the process proceeds to the next step.
- the above example may be the case where the priority of the tree split exists (examples 2 and 3) or does not exist (example 1), but various modification examples may be possible.
- the division of the current step is an example for explaining a case that is not related to the division result of the previous step, but it may also be possible to set the division of the current step depending on the division result of the previous step.
- the splitting of the same tree method (QT) may be supported in the current step.
- the partitioning information configuration described above may also be configured differently. (Examples to be described below are assumed to be examples 3)
- splitting information eg, splitting information, splitting direction information, etc.
- splitting information regarding the related tree method may be configured by removing the splitting information.
- the above example is adaptive for the case where block partitioning is allowed (e.g., block size is within the range between the maximum and minimum values, the partitioning depth of each tree method does not reach the maximum depth ⁇ allowed depth>, etc.). It is related to the structure of partitioning information, and adapts to the case where the block partitioning is limited (for example, the block size does not exist in the range between the maximum value and the minimum value, the partitioning depth of each tree method reaches the maximum depth, etc.). Partitioning information may be configured.
- tree-based partitioning in the present invention can be performed using a recursive manner. For example, when the partition flag of the coding block having the partition depth k is 0, encoding of the coding block is performed in the coding block having the partition depth k, and when the partition flag of the coding block having the partition depth k is 1, the coding block.
- the encoding of is performed in N sub-coding blocks having a division depth of k + 1 (wherein N is an integer of 2 or more, such as 2, 3, 4) according to a division scheme.
- the sub coded block may be set again to a coded block k + 1 and divided into sub coded blocks k + 2 through the above process. It can be determined according to.
- the bitstream structure for expressing the partition information may be selected from one or more scan methods.
- the bitstream of the split information may be configured based on the split depth order, or the bitstream of the split information may be configured based on whether the split information is divided.
- the partitioning information is obtained at the next level of depth.
- a method of preferentially acquiring additional splitting information in the received block, and another additional scanning method may be considered.
- the maximum block size and the minimum block size can have common settings regardless of tree type (or all trees), can have individual settings for each tree, or can have common settings for more than one tree. have. In this case, the maximum block size may be set equal to or smaller than the maximum coding block. If the size of the maximum block according to the first first tree is not the same as the maximum coding block, partitioning is implicitly performed using the predetermined second tree until the maximum block size of the first tree is reached.
- a common split depth may be supported, an individual split depth may be supported according to each tree, or a common split depth for two or more trees may be supported. Alternatively, some trees may have a split depth and some trees may not have a split depth.
- Explicit syntax elements for the configuration information may be supported, and some configuration information may be implicitly determined.
- CSI constant split index
- VSI variable split index
- the CSI scheme may be a scheme in which k subblocks are obtained through division in a predetermined direction, and k may be an integer of 2, 3, 4, or the like. In detail, it may be a partitioning scheme of a configuration in which the size and shape of the sub block are determined based on the k value regardless of the size and shape of the block.
- the predetermined direction may be combined with one or two or more of the horizontal, vertical, diagonal (upper left-> lower right direction, or lower left-> upper right direction) direction.
- the index-based CSI partitioning scheme of the present invention may include candidates divided into z in one of horizontal or vertical directions.
- z may be an integer of 2 or more, such as 2, 3, and 4, and one of the horizontal or vertical lengths of each sub block may be the same and the other may be the same or different.
- the ratio of the width or length of the sub-block is A 1 : A 2 : ...: A Z and A 1 to A Z may be an integer of 1 or more, such as 1, 2, and 3.
- x and y may be an integer of 1 or more, such as 1, 2, 3, 4, but may be limited if x and y are 1 at the same time (since a already exists).
- x and y may be an integer of 1 or more, such as 1, 2, 3, 4, but may be limited if x and y are 1 at the same time (since a already exists).
- FIG. 4 the case in which the ratio of the width or length of each sub-block is the same is illustrated. However, candidates including different cases may be included.
- it may include w candidates divided into one of some diagonal directions (upper left-> lower right direction) or some diagonal directions (lower left-> upper right direction), and w may be an integer of 2 or more, such as 2 and 3. .
- the sub-blocks may be divided into symmetrical partitions (b) and asymmetrical partitions (d, e) according to the length ratio of each sub-block. It can be divided into the divided form k arranged.
- the division type may be defined by various encoding elements including not only the length ratio of the sub block but also the shape of the sub block, and the division type supported by the encoding setting may be implicitly or explicitly determined.
- the candidate group in the index-based partitioning scheme may be determined based on the supported partition type.
- the VSI method may be a method in which one or more subblocks are obtained by dividing in a predetermined direction while the width (w) or height (h) of the subblock is fixed, and w and h are 1, 2, 4, It may be an integer of 1 or more, such as 8 or the like. In detail, it may be a partitioning scheme of a configuration in which the number of sub blocks is determined based on the size and shape of the block and the w or n value.
- the index-based VSI partitioning scheme of the present invention may include candidates that are partitioned by fixing either the horizontal or vertical length of the subblock. Or, it may include a candidate divided by fixing the horizontal and vertical length of the sub-block. Since the horizontal or vertical length of the sub-block is fixed, it may have a feature that allows equal division in the horizontal or vertical direction, but is not limited thereto.
- the block before dividing is M x N and the horizontal length of the subblock is fixed (w), the vertical length is fixed (h), or the horizontal and vertical length is fixed (w, h), the number of subblocks obtained is (M * N) / w, (M * N) / h, and (M * N) / w / h, respectively.
- only the CSI method or only the VSI method may be supported, or both methods may be supported, and information on the supported method may be implicitly or explicitly determined.
- a candidate group may be configured by including two or more candidates among the index divisions according to encoding settings.
- candidate groups such as ⁇ a, b, c ⁇ , ⁇ a, b, c, n ⁇ , and ⁇ a to g, n ⁇ can be configured, which can be divided into two horizontal or vertical directions or two horizontal and vertical directions.
- a block group predicted to occur a lot based on general statistical characteristics, such as a block form divided into two, may be an example of configuring a candidate group.
- candidate groups such as ⁇ a, b ⁇ , ⁇ a, o ⁇ , ⁇ a, b, o ⁇ or ⁇ a, c ⁇ , ⁇ a, p ⁇ , ⁇ a, c, p ⁇ may be configured.
- a candidate group such as ⁇ a, o, p ⁇ or ⁇ a, n, q ⁇ may be configured.
- An example of configuring a candidate group with a block type that is expected to generate a large number of partitions having a smaller size than a block before splitting is performed. Can be.
- a candidate group such as ⁇ a, r, s ⁇ may be configured.
- the optimal partitioning result obtained in the rectangular form is obtained through another method (tree method) in the pre-division block. It may be an example of configuring the divided form as a candidate group.
- various candidate group configurations may be possible, and one or more candidate group configurations may be supported in consideration of various encoding elements.
- index selection information may occur in a candidate group including a candidate (a) that is not split and candidates (b to s) that are split.
- information indicating whether or not to split may be generated (whether or not the split type is a), and index selection information may be generated in a candidate group consisting of candidates (b to s) to be split when splitting is performed (if not a). Can be.
- the partitioning information may be configured in various manners other than the above description, and the binary bits may be allocated to the index of each candidate in the candidate group through various methods, such as fixed length binarization and variable length binarization, except for the information indicating whether the partition is performed. have. If the number of candidate groups is two, one bit may be allocated to the index selection information, and if three or more, one bit or more may be allocated to the index selection information.
- the index-based partitioning method may be a method of selectively configuring a partition type that is expected to occur in a candidate group.
- a single hierarchical partition for example, a partition depth of 0 may be used instead of a tree-based hierarchical partition (recursive partition). Limitation). That is, it may be a method of supporting one partitioning operation, and a subblock obtained through index-based partitioning may not be further partitioned.
- this may mean that additional splitting into blocks of the same type having a smaller size is impossible (for example, a coding block obtained through an index splitting scheme may not be further splitted into coding blocks). It may also be possible to set (eg, not possible to split not only a coding block from a coding block into a prediction block but also a coding block). Of course, it is not limited to the above example, and other modification examples may be possible.
- a coding block may be obtained through a division process.
- the splitting process may be a tree-based splitting scheme, and according to the tree type, splitting forms of a (no split), n (QT), b, c (BT), i, l (TT), etc. of FIG. 4 may be used.
- the result can be.
- Various combinations of tree types such as QT / QT + BT / QT + BT + TT may be possible according to the encoding setting.
- An example to be described below shows a process of finally partitioning a prediction block and a transform block based on the coding block obtained through the above process, and assumes a case where a prediction, transform, and inverse transform process is performed based on each partition size.
- a prediction block may be set as the size of a coding block to perform a prediction process
- a transform block may be set as the size of a coding block (or a prediction block) to perform a transform and an inverse transform process. Since the prediction block and the transform block are set based on the coding block, there is no split information that occurs separately.
- the prediction block may be set as the size of the coding block to perform the prediction process.
- a transform block may be obtained through a partitioning process based on a coding block (or a prediction block), and a transform and inverse transform process may be performed based on the obtained size.
- the splitting process may be a tree-based splitting scheme, and according to the tree type, splitting schemes such as a (no split), b, c (BT), i, l (TT), and n (QT) of FIG. 4 may be used.
- the result can be.
- Various combinations of tree types such as QT / BT / QT + BT / QT + BT + TT may be possible depending on the encoding setting.
- the partitioning process may use an index-based partitioning scheme, and a split type result of a (no split), b, c, and d of FIG. 4 may be output according to the index type.
- Various candidate groups such as ⁇ a, b, c ⁇ , ⁇ a, b, c, d ⁇ , etc. may be configured according to the encoding setting.
- a prediction block in the case of a prediction block, a prediction block may be obtained by performing a partitioning process based on a coding block, and a prediction process may be performed based on the obtained size.
- the size of the coding block is set as it is, and the transform and inverse transform processes can be performed. This example may correspond to a case in which the prediction block and the transform block have independent relationships with each other.
- the partitioning process may use an index-based partitioning scheme, and a partition type result of a (no split), b to g, n, r, and s of FIG. 4 may be output according to an index type.
- various candidate groups such as ⁇ a, b, c, n ⁇ , ⁇ a to g, n ⁇ , ⁇ a, r, s ⁇ , and the like may be configured.
- a prediction block in the case of a prediction block, a prediction block may be obtained by performing a partitioning process based on a coding block, and a prediction process may be performed based on the obtained size.
- the size of the prediction block is set as it is to perform the transform and inverse transform process. This example may be the case where the transform block is set as it is obtained predicted block size, or vice versa (predicted block as the transform block size is set).
- the splitting process may use a tree-based splitting scheme, and a splitting scheme such as a (no split), b, c (BT), n (QT), etc. of FIG. 4 may be provided according to the tree type.
- a splitting scheme such as a (no split), b, c (BT), n (QT), etc. of FIG. 4 may be provided according to the tree type.
- various combinations of tree types such as QT / BT / QT + BT may be possible.
- the partitioning process may use an index-based partitioning scheme, and a partitioning form of a (no split), b, c, n, o, p, etc. of FIG. 4 may appear according to the index type.
- Various candidate groups may be configured such as ⁇ a, b, c, n ⁇ , ⁇ a, b, c, n, p ⁇ , and the like.
- the VSI scheme may be used alone or in combination with the CSI scheme to form a candidate group.
- a prediction block in the case of a prediction block, a prediction block may be obtained by performing a partitioning process based on a coding block, and a prediction process may be performed based on the obtained size.
- a prediction block in the case of the transform block, a prediction block may be obtained by performing a partitioning process based on the coding block, and a transform and inverse transform process may be performed based on the obtained size.
- This example may be a case of splitting the prediction block and the transform block based on the coding block.
- the partitioning process may use a tree-based partitioning method and an index-based partitioning method, and candidate groups may be configured in the same or similar manner as in the fourth example.
- the above example describes some cases that may occur depending on whether the division process of each type of block is shared or the like.
- the present disclosure is not limited thereto, and various modifications may be possible.
- the block division setting may be determined in consideration of various coding elements as well as the type of the block.
- the encoding elements may include an image type (I / P / B), a color component (YCbCr), a block size / shape / position, a block width / length length, a block type (encoding block, prediction block, transform block, Quantization block, etc.), segmentation state, encoding mode (Intra / Inter), prediction related information (intra prediction mode, inter prediction mode, etc.), transformation related information (transformation technique selection information, etc.), quantization related information (quantization region selection) Information, quantized transform coefficient encoding information, and the like).
- image type I / P / B
- YCbCr color component
- a block size / shape / position a block width / length length
- a block type encoding block, prediction block, transform block, Quantization block, etc.
- segmentation state encoding mode (Intra / Inter)
- prediction related information Intra prediction mode, inter prediction mode, etc.
- transformation related information transformation technique selection information, etc.
- Figure 5 shows an example of a family tree for explaining the genetic characteristics of the members of a household and the people in the blood relationship. For convenience of explanation, a horizontal and vertical relationship according to a specific gender (male) is shown.
- the target person may have a horizontal relationship (a) with his brother and his brother (grandfather), and may include grandfather (grandfather), father (father and above ancestors), child (son), and grandson. It can have a vertical relationship (b) with (above descendants).
- the characters placed in a horizontal relationship may have similar genetic factors such as appearance, physique, and personality. Or, there may be cases in which some elements are similar but not some elements. The similarity of all or part of the above genetic elements may be determined by various environmental factors (including mothers).
- the above description may be applicable to the same or similar to the vertical relationship.
- the genetic factors applying, physique, personality
- some genetic elements applying, physique of the subject may be similar to the father
- some genetic elements may be similar to the father (similar to the mother).
- the target person may be genetically similar to the grandfather (or grandson) and the grandfather may be genetically similar to the grandson, but the degree of similarity between each person may be determined based on the relationship between each person. That is, the similarity (two differences) between the grandfather and the target person may be high, and the similarity (four differences) between the grandfather and the grandson may be low.
- direct analysis may be a top priority to grasp the characteristics of the target person, but in the absence of the target person, direct analysis is impossible. In this case, it may be possible to roughly grasp the characteristics of the target person through indirect analysis of persons in various relations as in the above example. Of course, it may be necessary to analyze the person having a high similarity to the target person.
- the block-based encoding will be taken as an example.
- information of a block (relative block, Relative Block) having various relations with the target block may be used / referenced / referenced.
- the information of the relative block may be data based on pixel values, data based on mode information used in the encoding process, or data based on setting information used in the encoding process.
- it may be a pixel value in the spatial domain of the relative block or a coefficient value (or quantized coefficient) in the frequency domain.
- the information may be mode information generated in the encoding process of the relative block.
- the information may be information (reference candidate group, etc.) used for the reference setting used in the encoding process of the relative block.
- the data based on the pixel value or the data based on the mode information may be information configuring the reference setting.
- the relationship between blocks (target block and relative block, which is described mainly on the target block) may be defined as follows.
- the target block has no overlapping area with the other block (independent relationship between blocks)
- the target block is larger than and contains the opponent block. Or, if it is smaller than and included in the relative block (dependent relationship between blocks)
- the relative block may be located regardless of the space to which the target block belongs. That is, the relative block may belong to the same space in time as the target block or may belong to a space different in time from the target block.
- the relative block may be located in the space to which the target block belongs. That is, the relative block does not belong to a space different from the target block in time, but it is also possible when the concept of the relative block having a vertical relationship based on the region corresponding to the target block in the space different in time according to the encoding setting is supported. Can be.
- FIG. 6 illustrates various arrangement examples of a counter block having a horizontal relationship with a target block.
- a block placed in a horizontal relationship with a target block may be classified as a block belonging to a space Diff that is not identical to the same space Curr in time.
- a block belonging to the same space is a block F 0 , F 1 , F 2 that is not adjacent to (or far adjacent to) the block adjacent to the target block (UL, U, UR, L, DL). Can be classified.
- the block adjacent to the target block among the blocks belonging to the same space may be the block closest to the left, top, top left, top right, bottom left direction, etc., which is a raster scan (or Z-scan. Left top-> top right-> based on 2 x 2). In consideration of the order of the lower left-> lower right), a block which has already been encoded can be targeted.
- the positions of adjacent blocks may be determined according to a predetermined scan order, and the type of scan order (inverse Z scan ⁇ right-> lower-left-> right-> top left>, clock-wise scan ⁇ left-> top right-> right bottom) -> Lower left>, counter clock-wise scan ⁇ upper left-> lower left-> right lower-> upper right>, etc.), such as removing a block at the above position or adding a block at a new position (right, lower, lower right direction, etc.) May occur.
- the type of scan order inverse Z scan ⁇ right-> lower-left-> right-> top left>, clock-wise scan ⁇ left-> top right-> right bottom
- -> Lower left> e.g., counter clock-wise scan ⁇ upper left-> lower left-> right lower-> upper right>, etc.
- a block that is not adjacent to the target block may be a block that has already been encoded. In this case, they may belong to the same block unit (maximum coding block, etc.) as the target block, or may belong to the same division unit (slice, tile, etc.). That is, a limited setting may be supported such that a range (existing within the range of x_offset and y_offset in the horizontal and vertical directions with respect to the target block) for an area that is not adjacent but may be included as a relative block may be supported.
- a block having a horizontal relationship with a target block is assumed to have already been encoded, but is not limited thereto.
- encoding information / reference setting, etc. of a relative block in a horizontal relationship may be used (reference).
- the pixel value of the relative block may be used to generate the predicted value of the target block.
- a prediction value of the target block may be obtained by applying a method such as extrapolation, interpolation, averaging, or block matching or template matching to the pixel value of the relative block.
- the prediction value of the target block may be obtained by using a pixel matching of a relative block using a method such as block matching or template matching.
- block matching or template matching may be defined as an intra prediction (Mode_Intra) in terms of finding a prediction value in the same space, or may be defined as an inter prediction according to a prediction method (Mode_Inter), and another encoding mode further defined It may be classified as.
- all or part of the coefficient values in the frequency domain of the relative block may be used as predicted values (that is, used for predicting frequency components) of the target block.
- the mode information of the relative block may be used for encoding the mode information of the target block.
- prediction information of a relative block directional mode, non-directional mode, motion vector, etc.
- MPM motion vector, reference picture, etc.
- prediction information motion vector, reference picture, etc.
- the prediction method of the intra prediction not only the relative blocks belonging to the same space and the same color component as the target block in time (prediction mode using extrapolation, interpolation, average, etc.) but also in time with the target block Relative blocks belonging to the same space and different color components may be the object (prediction mode for copying data of different color components).
- the motion vector and the reference picture are targeted as an example of the prediction information, but may include various information such as a motion information encoding mode, a motion prediction direction, and a motion model.
- the reference setting of the relative block may be used for setting the reference of the target block.
- the MPM candidate group of the opponent block can be used as the MPM candidate group of the target block.
- the motion prediction candidate group of the relative block may be used as the motion prediction candidate group of the target block. That is, even if the candidate group is configured based on the opponent block, it means that the candidate group of the opponent block can be used as it is without using the candidate group in the target block.
- the relative block is assumed to be one block having a horizontal relationship with the target block.
- many relative blocks may exist in the image, and one or more relative blocks to be used for encoding the target block must be specified.
- the following case division is only one example, and it is necessary to understand that various case configurations and definitions are possible.
- a block belonging to the same space and adjacent to the target block may be identified as a relative block (case 1).
- a block belonging to the same space and not adjacent to the target block may be identified as a relative block (case 2).
- a block belonging to a unequal space may be identified as a relative block (case 3).
- a block belonging to all or part of (case 1) to (case 3) may be identified as a relative block.
- all or part of the left, upper, upper left, and upper right lower left blocks (L, U, UL, UR, DL) adjacent to the target block may be identified as a relative block.
- one or more of blocks that are not adjacent to the target block may be specified as the relative block.
- a block including coordinates of a predetermined position may be specified as the relative block based on the target block.
- the target block m x n has a range of (a + m-1, b + n-1) based on the upper left coordinates of (a, b).
- C blocks are (a, b), (a, b + n-1), (a + m-1, b), (a + m-1, b + n-1), (a + m / 2- 1, b + n / 2-1), (a + m / 2 + 1, b + n / 2-1), (a + m / 2-1, b + n / 2 + 1), (a + m / 2 + 1, b + n / 2 + 1), etc., means a block including a pixel at a predetermined position among the internal pixels of the target block.
- the L block means a block including a pixel at a predetermined position among the pixels beyond the left boundary of the target block such as (a-1, b), (a-1, b + n-1), and the U block ( It means a block including a pixel at a predetermined position among the pixels over an upper boundary of the target block such as a, b-1), (a + m-1, b-1), and the like.
- the UL block means a block including a pixel at a predetermined position among pixels above the upper left boundary of the target block such as (a-1, b-1), and the UR block is (a + m, b-1).
- F k block (k is 0 to 2) is defined as a horizontal / vertical / diagonal line such as (a-off_x, b), (a, b-off_y), (a-off_x, b-off_y), etc. It may mean a block including pixels spaced apart by a predetermined length (off_x, off_y, etc.) in the direction of.
- the predetermined length may be an integer of 1 or more, such as 4, 8, 16, or the like, and may be set based on the horizontal and vertical lengths of the target block. Or, it may be set based on the width and length of the largest coding block, and various modifications thereof may be possible.
- the predetermined length may be set implicitly as in the above example, or an associated syntax element may occur with an explicit value.
- a block having mode information having the sameness / similarity as the encoding information of the target block may be specified as the relative block.
- the mode information refers to information having encoding or other characteristics / meanings that have been encoded or already determined, rather than information to be encoded (or used / predicted, candidate group configuration, etc.) in the current step.
- the determined information may be information determined in a previous step in a mode determination process or information restored in a previous step in a decoding process.
- a block encoded using the non-movement motion model among previously encoded blocks may be identified as a relative block.
- the motion vector information according to the non-movement motion model of the specified relative block may be used to construct a candidate group for motion vector prediction according to the non-movement motion model of the target block.
- the motion model information refers to information having a different property / meaning used to identify the identity / similarity with the target block
- the motion vector according to the motion model (non-movement motion model) of the relative block is the motion of the target block.
- the information may be used to construct a motion vector prediction candidate group according to the model.
- the relative block may or may not be adjacent to the target block. When fewer modes having the sameness / similarity as the target block occur, a block in an area not adjacent to the target block may also be useful when a specific block is to be used / referenced.
- the relative block used / referenced for encoding the target block may be determined in consideration of the following matters.
- the relative block may be determined based on information to be used / referenced for encoding the target block.
- the information to be used / referenced for encoding the target block includes pixel value information for prediction, mode information related to prediction / conversion / quantization / in-loop filter / entropy encoding, and prediction / conversion / quantization / in-loop filter / entropy.
- Reference candidate group information related to encoding or the like may be the target.
- the relative block may be determined based on state information of the target block, image information to which the target block belongs, and the like.
- the state information of the target block may be defined based on the size, shape, width / length length ratio, picture / division unit (slice, tile, etc.) / Position in a unit such as a maximum coding block, and the like.
- the image information to which the target block belongs may be defined based on an image type (I / P / B), a color component (Y / Cb / Cr), and the like.
- the relative block may be determined based on the encoding information of the target block.
- the relative block may be determined based on whether it has information in which identity and similarity exist with the target block.
- the information referred to for identifying the identity / similarity may be mode information related to prediction / transformation / quantization / in-loop filter / entropy encoding.
- the category (case described above), number, location, etc. of the relative block may be determined. In detail, it may be determined which category is selected, and the number and location of relative blocks supported in the selected category may be determined. In this case, the number of blocks supported in each category may be m, n, o, and these may be integers of 0 or more such as 0, 1, 2, 3, 5, and the like.
- the relative block is the left, right, top, bottom, top, bottom, top, bottom, bottom, center, etc. centering on the target block (or the block corresponding to the target block in the image temporally different from the image to which the target block belongs).
- the relative block may be determined in the block nearest to the direction.
- a relative block may be determined among blocks that further satisfy the direction and a predetermined range / condition.
- the block may be a block (for example, left, top, and top left directions) that belong to a maximum coding block that is different from the maximum coding block to which the target block belongs or have a difference based on horizontal and vertical lengths of the target block.
- the relative block may be determined based on an encoding order, and the encoding order may be defined by various scan methods such as raster scan and z-scan.
- a predetermined number of blocks may be included as a relative block (based on a close encoding order), and the predetermined number may be an integer of 0 or more such as 0, 1, 2, 3, and the like.
- the relative block may be managed by a memory management scheme such as FIFO (First-in, First-out) according to the encoding order, and the relative block that may occur in (case 2) is determined (decision to include in the candidate group). It may be an example.
- one relative block When one relative block is supported, it may mean that only information of the corresponding block can be used / referenced. In addition, even if a plurality of relative blocks is supported, one piece of information may be derived based on a plurality of relative blocks according to encoding settings. As an example, three motion vectors may be supported by specifying three relative blocks such as left, top, and right top blocks for inter-prediction in motion prediction, but the median value of the motion vectors of the three blocks may be supported according to the encoding setting. Alternatively, one motion vector may be derived and used as a motion vector prediction value of the target block.
- the encoding setting may reduce generation of optimal candidate selection information generated by supporting two or more candidates, but it is not expected that one candidate having a high correlation with the encoding information of the target block is derived. It can be difficult. As such, a method of constructing a candidate group from a plurality of candidates may be more efficient. Of course, as the number of candidates included in the candidate group increases, the amount of information for expressing them may increase, so it is important to construct an effective candidate group.
- the following shows a candidate group configuration and encoding / decoding process based on a block having a horizontal relationship with a target block.
- a block referenced for encoding information of the target block is specified (1).
- Candidate groups are constituted by encoding information of the identified blocks in a predetermined order (2).
- One of the candidate groups is selected based on the encoding information of the target block (3).
- An image encoding / decoding process is performed based on the selected candidate (4).
- the relative block used for constructing the candidate group regarding the encoding information of the target block is specified.
- the relative block may be a block having a horizontal relationship with the target block. It has already been described above that a relative block of various categories as described above may be included and the relative block may be specified in consideration of various information such as state information of the target block in addition to the encoding information of the target block.
- the candidate group is formed according to a predetermined sequence of encoding information of the relative block specified through the above process.
- the information obtained based on the encoding information of one relative block may be included in the candidate group, and the information obtained based on the encoding information of the plurality of relative blocks may be included in the candidate group.
- a fixed order may be supported for the candidate group configuration order, or an adaptive order based on various coding elements (elements to be considered when specifying a relative block) may be supported.
- one of the candidate groups is selected based on the encoding information of the target block, and in (4), an image encoding / decoding process may be performed.
- the flowchart may be a process that is checked and performed in a block unit.
- some orders (1, 2) may be a process that is checked and performed in the initial stage of encoding.
- it is difficult to identify in advance which of the blocks having a horizontal relationship has a high correlation with the target block. A method of identifying in advance a correlation between the target block among blocks having a horizontal relationship will be described below.
- (3) describes a case in which information of one of the candidate groups is selected, it may also be possible when two or more pieces of information are selected according to the type of encoding information, the encoding setting, and the like, which is a commonly applicable description of the present invention. Can be.
- the target block and the relative block may be one of units such as an encoding / prediction / transformation / quantization / in-loop filter, and the target block and the relative block may be set in the same unit.
- the target block when the target block is an encoding block, the relative block may also be an encoding block, and modifications that are set in different units according to encoding settings may also be possible.
- FIG. 7 illustrates various arrangement examples of a relative block that is perpendicular to the target block.
- FIG. 7 illustrates a case in which recursive tree-based partitioning (QT) is performed, and will be described based on X and A to C blocks.
- a basic coding block CTU.C block
- B (1), X (2), and A (3) blocks may be obtained.
- a block placed vertically with the target block may be classified into an upper block (or an ancestor block) and a lower block (or a descendant block).
- the upper block of the target block (X) may be a B, C block
- the lower block may be an A block.
- the target block and the relative block may be set as the upper block and the lower block, or may be set as the lower block and the upper block, respectively.
- the relative block when the target block has a larger value based on the split depth k, the relative block may be a child (k + 1) or a grandson (k + 2) block, and has a smaller value. In this case, the relative block may be a negative (k-1) or a grandparent (k-2) block. That is, in addition to defining the vertical relationship between the existing blocks, the detailed relationship between the blocks can be confirmed through the division depth.
- one tree method is supported as in the above example, so that comparison using common split depths can be performed.
- the simple classification as in the above example is performed. The detailed relationship can be confirmed by considering the number of divisions and depths of each division.
- a QT is performed once in a 4M x 4N block
- a 2M x 2N block may be obtained at (QT) partition depth 1
- a BT is performed twice
- a 2M x 2N block may be obtained.
- the (BT) division depth is as can be obtained at two.
- the 4M x 4N block may be a negative (QT) or grandfather (BT) block on the basis of the 2M x 2N block, and in contrast, may be a child (QT) or grandson (BT) block, which is based on the result of the block division Relationships can be established.
- the start unit of the division is the maximum coding unit (the highest ancestor block, the maximum size that the block can have.
- the coding unit or the block There is a limitation that it is impossible to have a vertical relationship outside of the maximum coding unit, but it is possible to freely designate a block region having a vertical relationship according to the coding setting separately from the block division setting such as the maximum coding unit. Can be.
- the present invention assume a case regarding a vertical relationship that does not deviate from the maximum coding unit.
- the relationship between blocks will be described below based on the tree-based partitioning scheme, the same or similar application may be applied to the index-based partitioning scheme in advance.
- encoding information / reference setting of a counterpart block having a vertical relationship may be used.
- the target block is a lower block of the relative block.
- the upper block is not an independent unit that performs encoding, prediction, transformation, etc., but may be a temporary unit configured by a plurality of lower blocks. That is, it is necessary to understand that it is a start unit or an intermediate unit of a block division process for obtaining an independent unit for encoding (that is, encoding / prediction / transformation block, etc. in which division is no longer performed).
- a reference pixel of a relative block may be used to generate a prediction value of the target block.
- a prediction value of the target block may be obtained by applying a method such as extrapolation, interpolation, averaging, or template matching to the reference pixel of the relative block.
- a prediction value of the target block may be obtained by using a method such as template matching of the reference pixel of the relative block.
- the reference pixel of the relative block is not a pixel located in the relative block, but refers to a pixel obtained assuming that the relative block is a unit for performing intra prediction / inter prediction.
- the pixels of blocks eg, closest to the left, top, top, left, top, bottom, and left directions
- the pixels of blocks that are horizontal to the relative block (upper block) are included in the intra prediction / inter prediction of the target block (lower block). It means to use.
- the reference setting of the relative block may be used for setting the reference of the target block.
- the MPM candidate group of the opponent block can be used as the MPM candidate group of the target block.
- the motion prediction candidate group of the relative block may be used as the motion prediction candidate group of the target block. That is, even if the candidate group is configured based on the opponent block, it means that the candidate group of the opponent block can be used as it is without using the candidate group in the target block.
- encoding may be performed using information having a low correlation with the target block.
- relevant information is not obtained in a space that is completely separated from each other, there is a high possibility that there is a degree of correlation, and it is the same as integrating a process to be performed in each lower block unit into a common process in the upper block. Complexity can be reduced.
- parallel processing of a lower block belonging to an upper block may be possible.
- the relative block is one block having a vertical relationship with the target block
- the upper block may be smaller than or equal to a predetermined first threshold size.
- the first threshold size may mean the maximum size that the upper block may have.
- the first threshold size may be represented by the width (W), height (H), W x H, W * H, etc., W and H may be an integer of 8, 16, 32, 64 or more.
- the block having the first threshold size may be set based on the size of the maximum coding block, the maximum prediction block, the maximum transform block, and the like.
- the lower block may be greater than or equal to a second predetermined threshold size.
- the second threshold size may mean a minimum size that the lower block may have.
- the second threshold size may be represented by the width (W), height (H), W x H, W * H, etc., W and H may be an integer of 4, 8, 16, 32 or more.
- W and H may be an integer of 4, 8, 16, 32 or more.
- the second threshold size may be set to be smaller than or equal to the first threshold size.
- the block having the second threshold size may be set based on the size of the minimum coding block, the minimum prediction block, the minimum transform block, and the like.
- the minimum size of the lower block may be determined based on the size of the upper block.
- a predetermined division value (p) or a shift operation value (q. Right shift operation) is applied to at least one of the width and the height based on the width (W) and the height (H) of the upper block, so that the minimum of the lower block.
- the size eg, W% p or H >> q, etc.
- the division value may be an integer of 2, 4, 8, or more
- the shift operation value q may be an integer of 1, 2, 3, or more.
- the maximum size of the upper block may be determined based on the size of the lower block.
- a predetermined multiplication value (r) or a shift operation value (s. Left shift operation) is applied to at least one of the width and the height based on the width (W) and the height (H) of the lower block, so that the maximum of the upper block is applied.
- the size (eg, W * r or H ⁇ s, etc.) may be determined.
- the multiplication value may be an integer of 2, 4, 8 or more
- the shift operation value s may be an integer of 1, 2, 3 or more.
- the minimum size of the lower block may be determined in consideration of the size of the upper block and the split configuration.
- the division setting may be determined by the division type (tree type), the division depth (common depth, individual depth for each tree), and the like.
- the size of a block in which m split is performed may be determined as the minimum size of the lower block, and n split is performed in case BT (or TT) is supported.
- the size of the block may be determined as the minimum size of the lower block, and when QT and BT (or TT) are supported, the size of the block in which l division is performed may be determined as the minimum size of the lower block.
- m to l can be an integer of 1, 2, 3 or more, where the split depth m of the tree being split (or split into larger numbers) into smaller blocks (due to one splitting operation) is not. It may be set to be smaller than or equal to the split depth n of the tree. In addition, the split depth l when the tree splits are mixed may be set to be greater than or equal to the split depth m of the tree split into smaller blocks and less than or equal to the split depth n of the tree that is not split. .
- the maximum size of the upper block may be determined in consideration of the size and division setting of the lower block. In this description, it may be reversed from the above example, and detailed description thereof will be omitted.
- the relative block used / referenced for encoding the target block may be determined in consideration of the following matters.
- the relative block may be determined based on information to be used / referenced for encoding the target block.
- the information to be used / referenced in the encoding of the target block may be pixel candidate information for prediction and reference candidate group information related to prediction / conversion / quantization / in-loop filter / entropy encoding.
- the relative block may be determined based on state information of the target block, image information to which the target block belongs, and the like.
- the state information of the target block may be defined based on the size, shape, width / length length ratio, picture / division unit (slice, tile, etc.) / Position in a unit such as a maximum coding block, and the like.
- the image information to which the target block belongs may be defined based on an image type (I / P / B), a color component (Y / Cb / Cr), and the like.
- the number, size, position, etc. of the relative blocks may be determined in consideration of all or some of the elements mentioned in the above example. In detail, it is possible to determine whether or not to use / reference information of a block having a vertical relationship to the encoding of the target block, and the position and size of the relative block may be determined (when used / referenced).
- the position of the relative block may be represented by a predetermined coordinate (eg, upper left coordinate) in the block
- the size of the relative block may be represented by a width (W) and a height (H). can do.
- all lower blocks (target blocks) belonging to the relative block may use / reference encoding information of the corresponding block.
- the range of the lower block is limited, if the information belongs to the relative block and is larger than the size of the lower block, encoding information of the relative block may be used / referenced.
- selection information of the counter blocks may be additionally generated.
- the following shows a candidate group configuration and encoding / decoding process based on a block having a vertical relationship with a target block.
- a reference block for specifying the referenced block is determined (1).
- a block referred to for encoding information of the target block is specified based on the determined reference block (2).
- Candidate groups are constituted by encoding information of the identified blocks in a predetermined order (3). One of the candidate groups is selected based on the encoding information of the target block (4). An image encoding / decoding process is performed based on the selected candidate (5).
- a block (reference block) serving as a reference for constructing a candidate group on encoding information of the target block is determined from the target block or the first relative block.
- the first relative block may be a block (here, higher block) having a vertical relationship with the target block.
- the second relative block used for constructing the candidate group on the encoding information of the target block is specified.
- the second relative block may be a block having a horizontal relationship with the reference block.
- the candidate group is configured in the predetermined order of the encoding information of the second relative block specified through the above process.
- the description of blocks having a horizontal relationship may be derived through the above-described various embodiments as well as the candidate group construction and encoding / decoding processes based on the blocks having a horizontal relationship, and thus detailed descriptions thereof will be omitted.
- one of the candidate groups may be selected based on the encoding information of the target block, and in (5), an image encoding / decoding process may be performed.
- the process of forming the candidate group based on the upper block is performed only once, and the lower block may use / borrow it. That is, the flowchart may be a configuration that may occur in a block in which encoding / decoding is performed first. If the candidate group configuration based on the upper block is already completed and the reference block is determined to be the relative block in some order (2, 3), it may be added that the candidate group already configured may be simply used / borrowed.
- the lower block is described as a configuration of simply using / borrowing it, but the present invention is not limited thereto.
- some candidates may be fixed regardless of the lower block, and some candidates may be adaptive based on the lower block. That is, some candidates may be deleted / added / changed based on the lower block. In this case, the deletion / addition / change may be performed based on the position, size, etc. in the upper block of the lower block.
- the target block and the relative block may be one of units such as an encoding / prediction / transformation / quantization / in-loop filter, etc.
- the target block may be the same unit as the relative block or an upper unit.
- the relative block when the target block is a coding block, the relative block may be a coding block, and when the target block is a coding block, the relative block may be a prediction block or a transform block.
- FIG. 8 illustrates various arrangement examples of a relative block that is a vertical relationship with a target block and a horizontal relationship.
- FIG. 8 illustrates a case in which recursive tree-based partitioning (quat tree) is performed, and will be described based on X, A to G, and p to t blocks.
- a base coding block CTU
- the split depth increases, resulting in q / r / t (1), p / D / E / F / s (2), A / B / C / G / X (3)
- a block can be obtained.
- the block may be divided into a vertical relationship and a horizontal block.
- the relative block (upper block) having a vertical relationship of the target block X may be p and q blocks (except CTU), and the relative block having a horizontal relationship may be A to G blocks.
- the block division is determined according to the characteristics of the image. In the flat part such as the background or the area where there is little time change, the block division can be minimized, and the part with the complex pattern or the area where the temporal change is abrupt. In block partitioning, much may be performed.
- FIG. 9 illustrates an example of block partitioning obtained according to a tree type.
- p to r represent block division examples of QT, BT, and TT. It is assumed that block division is performed when the encoding of the block itself is not efficient because the characteristics of some regions in the block are different.
- QT (p) is divided into two in the horizontal and vertical directions, and at least one of the four subblocks has different characteristics. However, four subblocks are obtained and it is not known which specific subblock has different characteristics.
- a to D blocks may all have different characteristics, only one of the A to D blocks may have different characteristics, and the rest may have the same characteristics, and the A and B blocks have the same characteristics, and the C and D blocks may have different characteristics. It may have the same characteristics, A and C blocks may have the same characteristics and B and D blocks may have the same characteristics.
- a and B blocks, C and D blocks have the same characteristics, and BT is also supported, horizontal division can be performed among BT. However, if A and B blocks are divided into QTs such as p, A and B blocks, C and D blocks. It can be seen that are different characteristics. However, in this example, since only QT is supported, the correlation between the blocks cannot be accurately determined.
- the correlation between the target block and the relative block may be high. It can be or low.
- BT In the case of BT (q), it is divided into two in one of the horizontal and vertical directions, and it can be seen that the two sub blocks (E and F blocks) have different characteristics. It may be derived from the above definition under the assumption that if the characteristics between subblocks were the same or similar, they would not be divided. If only BT is supported and divided in an upper block having a division depth of 1 with respect to the target block, the correlation between the target block and the relative block may be low.
- TT In the case of TT (r), it is divided into three in one of the horizontal and vertical directions, and it can be seen that at least one of the three subblocks has different characteristics. However, three subblocks are obtained and it is not known which specific subblock has different characteristics.
- G to I blocks can all have different characteristics
- G and H blocks can have the same characteristics
- I blocks can have different characteristics
- H and I blocks have the same characteristics
- G blocks have different characteristics.
- G and H blocks have the same characteristics, I blocks have different characteristics, and BT (asymmetry) is also supported, vertical division (3: 1) of BT can be performed, but if it is divided by TT such as r It can be seen that the G, H, and I blocks have different characteristics. However, in this example, since only TT is supported, the correlation between the blocks cannot be accurately determined. If only the TT is divided and supported in an upper block having a division depth of 1 with respect to the target block, the correlation between the target block and the relative block may be high or low.
- the correlation between blocks may be high or low.
- the division scheme eg, QT
- the encoding information of the remaining subblocks other than one eg, D block.
- the encoding information of the remaining subblocks A to C except for the D block is the same or similar, it may be divided into QT because the characteristics of the D block are different.
- the description thereof will be referred to only the possibility, and the detailed description will be omitted.
- the encoding information of the block having a vertical relationship referring to the candidate group configuration information of the upper block (the block including A and D) of the D block. You can also use / reference.
- the correlation between sub-blocks when one tree split is supported in an upper block has been described. That is, when using / referenced the encoding information of a block having a horizontal relationship for encoding the target block, the encoding information of the relative block is more efficiently used / used by checking the division state (path) between the target block and the relative block. Reference may be made. For example, when configuring a candidate group, information of blocks determined to have low correlation may be excluded or low priority may be assigned. Alternatively, information of a block having a vertical relationship and reference setting can be used.
- the case in which one tree division is supported may include a case in which only one tree scheme is supported for block division, and even if a plurality of tree divisions is supported, the maximum, minimum, and maximum depths of blocks according to each tree scheme are supported.
- a tree in which splitting is not allowed at a previous splitting depth may also include a case in which only one tree splitting is supported by a block splitting setting which is not supported at a splitting depth later. That is, only QT is supported and can be partitioned using QT. QT / BT / TT is supported, but only BT is possible at this stage and can be partitioned using BT.
- FIG. 10 is an exemplary diagram of division division obtained due to QT, BT, and TT.
- the maximum coding block is 64 ⁇ 64 and the minimum coding block is 8 ⁇ 8.
- the maximum value of the block with QT support is 64 x 64
- the minimum value is 16 x
- the maximum value of the block with BT support is 32 x 32
- the minimum value is 4
- one of the horizontal and vertical lengths of the block is the maximum division.
- the depth is three.
- the TT assumes a case in which a split configuration is determined together with BT (when bundled).
- QT and BT are supported in the upper blocks A through M, and asymmetric BT (ABT) is additionally supported (QT, BT ⁇ or, SBT>, ABT) in the lower left blocks N through P.
- ABT asymmetric BT
- TT is additionally supported (QT, SBT, ABT, TT).
- Blocks B to E may be sub-blocks that can be obtained through QT (division 1), and BT (division 1 vertical division + 2 horizontal divisions, or 1 horizontal division + 2 vertical divisions, 3 divisions) It may be a sub block that can be obtained through the).
- blocks B through E may not be acquired through QT and may be sub-blocks divided through BT.
- horizontal division is performed (B + C / D + E) of BT
- vertical division is performed (B / C / D / E) in each region. Therefore, as described above, the B and C blocks and the D and E blocks obtained by BT in the same upper block (parent block, division depth 1 difference) may have low correlations, respectively.
- the partitioning since the partitioning is not performed because the B and D blocks and the C and E blocks are bundled, the B and D blocks and the C and E blocks may have low correlations, respectively. If the correlation is high, only vertical division of BT is performed, and division may not be performed in each region.
- the correlation between the subblocks acquired by BT is low, but it is limited to the subblocks belonging to the same upper block (parent block, split depth 1 difference), but in this example, the same upper block (grandparent block. 2 difference) to confirm the correlation between blocks.
- the J to M blocks may be subblocks that can be obtained through QT, and may be subblocks that can be obtained through BT.
- the tree method can be selected as the optimal partition type.
- QT is performed.
- the correlation between subblocks obtained through QT may be high or low.
- the correlation between sub-blocks may be determined differently because a plurality of tree splits are supported.
- J and K blocks, L and M blocks may have low correlations, and J and L blocks and K and M blocks may each have low correlations. If the correlation between blocks adjacent to the horizontal and vertical directions among the J to M blocks is high, the region having high correlation may not be divided even if QT is not performed and BT is performed.
- the correlation between the sub-blocks obtained by QT may be high or low, but this is a case where a single tree method is supported, and in this example, when a plurality of tree methods are supported, It may be the case of checking correlation between blocks based on the number.
- N to P blocks may be sub-blocks (2: 1: 1 ratio) obtained through BT (horizontal division 1 + horizontal division 1).
- N and O blocks may be high or low correlation (if only symmetric BT ⁇ SBT> is supported).
- the correlation may be low with the region in which the O and P blocks are bound.
- N blocks may not be as low as the correlation between O and P blocks.
- N blocks may have low correlation with O and P blocks.
- the N block may have a high correlation with the O block and a low correlation with the P block, and vice versa.
- asymmetric BT ⁇ ABT> may be supported. If the N and O blocks have high correlation, the regions of the N and O blocks may be bundled so that a horizontal division of the asymmetric BT in a 3: 1 ratio may be performed. However, since the BT (SBT) is performed twice, the correlation between N and O blocks may be low.
- the Q to S blocks may be sub-blocks obtained through TT (first horizontal division).
- the Q and S blocks may be high or low correlation (if only TT is supported). In this example, asymmetric BT may be supported. If the Q and R blocks have high correlation, the regions of the Q and R blocks may be bundled so that a 3: 1 ratio of asymmetric BT horizontal division may be performed. However, since TT is performed, the Q and R blocks may have low correlation.
- the correlation with the relative block in a horizontal relationship with the target block may be estimated based on the partitioning scheme and the partition setting supported. Let's look at the various cases of the correlation between blocks through the following.
- 11 is an exemplary diagram for checking correlation between blocks based on a partitioning scheme and a partitioning configuration.
- (a) to (c) may be a case where QT, BT and TT are performed, respectively, and may be a case where only QT, BT and TT can be supported in an upper block, respectively.
- QT and TT the correlation between adjacent blocks A and B or A and C in the horizontal or vertical direction may be high or low. This is called a general relationship.
- BT correlation between adjacent blocks A and B in a horizontal or vertical direction may be low. This is called a special relationship.
- (d) is a case where QT is performed and may be a case where QT and BT can be supported.
- the correlation between adjacent blocks A and B or A and C in the horizontal or vertical direction may be a low special relationship. If the correlation is high, BT may have been applied instead of QT.
- (e) is a case where BT is performed (1 vertical division + 1 horizontal division) and may be a case where QT and BT are supported.
- a and B since they are divided by BT in the same upper block, they may have a special relationship with low correlation.
- division may be performed by being tied together, but may be the case where the partition is divided into C due to encoding cost.
- a and C may be general relationships with high or low correlations, as may be the case.
- (f) is a case where BT is performed (1 vertical division + 1 vertical division) and may be a case where BT and TT are supported.
- a and C since they are divided by BT in the same upper block, they may be a special relationship with low correlation.
- a and B when A and B are tied together and splitting is performed (the part corresponding to 2 of the 1: 2: 1 areas of the TT), there is an additional splitting of the left area due to the TT. In this case, since it is difficult to determine the exact correlation, A and B may have a general relationship with high or low correlation.
- TT is performed (one vertical division) and may be a case where BT (or SBT), ABT, and TT are supported.
- the correlation between adjacent blocks A and B or A and C in the horizontal or vertical direction may be a low special relationship. If correlation is high, ABT may have been applied instead of TT.
- (h) is a case where QT and BT are performed (BT is divided into 2 vertical divisions), and may be a case where QT and BT can support ⁇ 1> and TT can support ⁇ 2>.
- a and B in the case of ⁇ 1>, since there is no case in which A and B are bundled and divided, there may be a general relationship having high or low correlation.
- ⁇ 2> there is a case where A and B can be divided and divided (after BT horizontal division, BT vertical division on the upper side, and TT vertical division on the lower side), but it is nevertheless divided using QT and BT. This may be a special relationship with low correlation.
- This example may be a case of confirming the number of cases related to block division that can be obtained from the same upper block (two differences in this example) having a division depth of one or more differences for checking a relationship between blocks.
- the target block belongs to the same space as the target block and may be adjacent to the adjacent block.
- the target block and the relative block may be adjacent blocks in a horizontal or vertical direction.
- Correlation between blocks can be identified and estimated based on various information. For example, the correlation between blocks may be checked based on state information (block size, shape, location, etc.) of the target block and the counter block.
- state information block size, shape, location, etc.
- the predetermined length (horizontal length or vertical length) of the relative block adjacent to the boundary (horizontal or vertical) in contact with the target block is greater than or equal to the predetermined length of the target block. If they are the same, the correlation between blocks may be much higher or somewhat lower, which is called general relation A. If the predetermined length of the relative block is smaller than the predetermined length of the target block, the correlation between blocks may be somewhat higher or much lower, which is referred to as general relationship B. At this time, the horizontal length of each block in the case of touching the horizontal boundary (the upper block) and the vertical length of each block in the case of touching the vertical boundary (the left block) can be compared.
- the correlation with the neighboring block adjacent to the long border of the horizontal / vertical length is a general relationship A
- Correlation with adjacent relative blocks may be a general relationship B.
- the above description may be some examples of identifying correlations between blocks based on state information of blocks, and various modifications may be possible. It may be possible to determine correlations between blocks based on various information as well as state information of blocks.
- the following describes a process for confirming correlation with a relative block having a horizontal relationship with a target block.
- ⁇ 1> Various setting information about block division in an image may be checked. Supported range information such as the maximum block size and the minimum block size of a unit such as encoding / prediction / transformation (assuming that the target block is a coding unit in this example) is identified. For example, it may be confirmed that the maximum coding block is 128 x 128 and the minimum coding block is 8 x 8.
- the maximum size of a block that supports QT may be 128 x 128, the minimum size may be 16 x 16, and the maximum size of a block that supports BT and TT is 128 x 128, 64 x 64, and the minimum size is common.
- 4 x 4 and the maximum partition depth may be 4.
- QT may be supported in a lower block (sub-block) when divided into QTs, and QT may not be supported in the lower block if the QT is split in another manner without being split into QTs.
- a condition in which some splits are prohibited may be checked in order to avoid overlapping results according to split schemes. For example, after TT is performed, vertical division of BT may be prohibited in the middle region. That is, in order to prevent overlapping partitioning results that may occur in accordance with each partitioning method, setting information forbidding partitioning that is prohibited in advance is checked.
- All or part of ⁇ 1> to ⁇ 4> and other additional setting information may be checked to identify block candidates that may be acquired in an image. This may be referenced to identify a block candidate that can be obtained according to a target block and a relative block described later.
- Status information such as the size, shape, and position of the target block and the counter block can be checked.
- it is checked whether the position of the block is located at the boundary of the unit of the picture, slice, tile group, tile, brick, block, or the like.
- a block may be set as a maximum coding block.
- the maximum coding block may be an upper block (the highest ancestor block) of the target block, but is a unit that is collectively divided in a picture unit that is not obtained according to a characteristic of an image. . Therefore, if the target block belongs to the largest coded block and the other maximum coded block, the correlation between the blocks cannot be confirmed, so it is necessary to check whether it belongs to the boundary.
- a process of checking correlation may be performed only when the boundary is not a boundary. That is, the correlation can be confirmed only when the boundary is not.
- the size, shape, and position of the target block and the relative block may be used to identify the division state of each block or the division path where each block is obtained. Detailed description thereof will be described later.
- the division state of the target block and the counter block can be checked.
- the split state may mean a split path in which each block is obtained.
- a process of identifying an upper block of each block may be performed by checking the partition state, where the upper block may mean a block having a vertical relationship with each block.
- a process of identifying an upper block acquired based on state information such as the size, shape, and location of each block and the split path is performed.
- the target block has position (top left) (32, 32), width and height 8 x 8, split depth p, split path (QT / 1-BT / h / 0-BT / v / 1 State information such as.
- Relative blocks have status information such as position (24, 32), width and height 8 x 8, split depth q, and split path (QT / 1-BT / h / 0-BT / v / 0).
- the division path may be expressed by a division method / division direction (h is horizontal and v is vertical. If not present) / division position (0 to 3 for QT, 0 to 1 for BT, etc.).
- the upper block (parent block, split depth 1 difference) of the target block is (24, 32), the width and height are 16 x 8, the split depth is p-1, and the split path is (QT / 1-BT / h / Status information such as 0) may be obtained.
- the upper block (partition depth q-1) of the relative block may be the same as the upper block of the target block.
- the target block acquires status information such as position (128, 64), width and height 16 x 32, split depth p, and split path (QT / 3-QT / 2-BT / v / 1). Can be.
- Relative blocks have positions (120, 64), width and height 8 x 32, split depth q, split paths (QT / 3-QT / 2-BT / v / 0-BT / v / 1) Information can be obtained.
- the upper block (parent block, split depth 1 difference) of the target block is (112, 64), the width and height are 32 x 32, the split depth is p-1, and the split path is (QT / 3-QT / 2) Status information such as can be obtained.
- the upper block (parent block, split depth 1 difference) of the relative block is (112, 64)
- the width and height are 16 x 32
- the split depth is q-1
- the split path is (QT / 3-QT / 2-BT status information such as / v / 0)
- State information such as the parent block of the relative block (grandparent block, split depth 2 difference) is (112, 64)
- width and height is 32 x 32
- split path is (QT / 3-QT / 2) May be obtained, which may be understood to be the same upper block as the upper block (parent block) of the target block.
- a process of identifying an upper block of each block may be performed based on the partition state, and a process of identifying a common upper block may be performed.
- an upper block having a division depth difference of 1 or more may be identified based on the target block and the relative block.
- the target block and the upper block having the split depth difference c and the upper block with the relative block and the split depth difference d may be identical to each other.
- c and d may be an integer of 1, 2 or more, and c and d may be the same or not the same.
- a predetermined first threshold value (maximum value) for c and d may exist, and the first threshold value may be an integer of 1, 2, or more.
- the second threshold may be an integer of 2, 3 or more. In other words, the correlation between blocks is not checked when the threshold condition is exceeded.
- the correlation may be determined according to the partitioning scheme. If it is QT or TT, it can be set as a general relationship (which may be high or low correlation), and in case of BT, it can be set as a special relationship.
- the target block and the relative block are divided and bound. If it exists, set it as a special relationship; if it doesn't exist, set it as a normal relationship.
- the above example is some cases for checking correlation between blocks, and various modifications and additions may be possible without being limited thereto.
- the correlation between the blocks identified through the above process may be used to refer to the encoding of the target block.
- the process of identifying the correlation may be performed in various orders other than the order listed above.
- the correlation is not limited to the above-mentioned one, and the correlation may be determined through a combination of some configuration or additional configuration.
- a correlation detecting process of another configuration may be performed, and the information of the relative block may be used / referenced for encoding the target block based on the correlation between the blocks identified through the above process.
- the correlation obtained through the above process may not be absolute facts about the characteristics of the blocks, or may be prediction information that estimates the correlations between blocks in consideration of block division. Therefore, since it may be information referred to a candidate group configuration for encoding information of the target block, the relative block determined to have low correlation can be excluded from the inclusion of the candidate group, and the candidate group structure is considered in consideration of the possibility that the identified correlation is not accurate. It may be possible to set a priority for the subordinate priorities or to borrow candidate group information of upper blocks having a vertical relationship. In the above example, it is assumed that the correlation between blocks is classified into two types, but two, three, or more classification categories may be supported.
- Whether or not the correlation between blocks is used / referenced for encoding (candidate group configuration, etc.) of the target block may be explicitly determined in units of sequence, picture, slice, tile group, tile, brick, block, or encoding setting. Can be implicitly based on Next, an example of various information constituting the encoding setting will be described.
- correlation reference between blocks may be determined according to information to be used / referenced for encoding a target block.
- the inter-block correlation may be considered to form the intra prediction mode candidate group, and the inter-block correlation may not be considered for the candidate group configuration to predict the motion vector representing the non-movement motion model during the inter prediction. have.
- correlation reference between blocks may be determined based on state information of the target block, image information to which the target block belongs, and the like.
- the state information of the target block may be defined based on the size, shape, width / length length ratio, picture / division unit (slice, tile, etc.) / Position in a unit such as a maximum coding block, and the like.
- the image information to which the target block belongs may be defined based on an image type (I / P / B), a color component (Y / Cb / Cr), and the like.
- the correlation between blocks may be referred to only when the size of the block falls within a predetermined range, and the correlation between the blocks cannot be referred to when the size is out of the predetermined range.
- the predetermined range may be defined by the first threshold size (minimum value) and the second threshold size (maximum value), and each threshold size is W, H, W x H in width (W) and height (H).
- W * H, W and H may be an integer of 1 or more, such as 4, 8, 16.
- correlation reference between blocks may be determined according to the category of the relative block (which can be derived from the position related description of the relative block having a horizontal relationship).
- the relative block belongs to the same space as the target block and may be an adjacent block. If it is a relative block that is not adjacent to the same block as the target block, the correlation may not be referred to.
- Coding settings may be defined in consideration of all or some of the elements mentioned in the above example, thereby implicitly determining whether to refer to correlation between blocks.
- the following shows a candidate group configuration and encoding / decoding process based on a block having a horizontal relationship with a target block.
- the correlation between the target block and the block in which the referability exists is checked (1).
- a block referenced for encoding information of the target block is specified based on correlation (2).
- Candidate groups are constituted by specifying the encoded information in a predetermined order (3).
- One of the candidate groups is selected based on the encoding information of the target block (4).
- An image encoding / decoding process is performed based on the selected candidate (5).
- the correlation between the target block and the block in which there is a possibility of being considered as a relative block is confirmed.
- a block used for constructing a candidate group on encoding information of the target block is specified based on the correlation identified through (1). That is, it may mean determining whether to include a relative block based on the identified correlation result.
- the description of the specification of the relative block having the above-described horizontal relationship may be considered together in this example.
- the candidate group is configured in the predetermined order of the encoding information of the relative block specified through the above process.
- the predetermined order may be supported by the adaptive order considering the relative block included or not included through (2).
- one of the candidate groups is selected based on the encoding information of the target block, and in (5), an image encoding / decoding process may be performed.
- the flowchart may be a case in which a block determined to have low correlation based on a correlation is not included as a relative block.
- the following shows another example of a candidate group configuration and encoding / decoding process based on a block having a horizontal relationship with a target block.
- a block referenced for encoding information of the target block is specified (1).
- the correlation between the target block and the specified block is checked (2).
- a predetermined order is determined and a candidate group is formed accordingly (3).
- One of the candidate groups is selected based on the encoding information of the target block (4).
- An image encoding / decoding process is performed based on the selected candidate (5).
- the relative block used for constructing the candidate group regarding the encoding information of the target block is specified.
- the correlation between the target block and the relative block is checked.
- the candidate group inclusion order may be determined based on the correlation identified through (2).
- the correlation is high or low, you can follow a predefined order; if the correlation is high, you can follow the order of placing the opponent block on top; if the correlation is low, place the opponent block in the lower order You can follow the order.
- the candidate group may be configured according to the order.
- one of the candidate groups is selected based on the encoding information of the target block, and in (5), an image encoding / decoding process may be performed.
- the flowchart may be a case of adaptively setting a candidate group inclusion order based on correlation.
- the following shows an example of a candidate group configuration and encoding / decoding process based on a block having a horizontal or vertical relationship with a target block.
- the reference block for specifying the block to be referred to starts with being set as the target block.
- a block referenced for encoding information of the target block is specified based on correlation (2A).
- Candidate groups are constituted by specifying the encoded information in a predetermined order (3A).
- the reference block for specifying the referenced block is changed to a predetermined higher block (2B). Based on the changed reference block, a block to be referred for encoding information of the target block is specified (3B). The encoding group of the identified block is constituted in a predetermined order (4B).
- One of the candidate groups is selected based on the encoding information of the target block (5).
- An image encoding / decoding process is performed based on the selected candidate group (6).
- the flowchart may be configured to be determined by one of the order P of 1-2A-3A-5-6 or the order Q of 1-2B-3B-4-5-6 according to the correlation determination result.
- the other block except for the corresponding block is specified as a relative block
- the reference block of the candidate group configuration Is changed to a higher block than the target block to identify a block having a horizontal relationship with the upper block as the counter block.
- the order of Q may be a combination of a candidate group configuration based on a vertically related block.
- the candidate group may be changed by changing a block unit based on the candidate group configuration. It may be an example of configuring. In the following explanations, redundant explanations will be omitted, and focus on the differences.
- the block serving as the candidate group reference is changed to the first relative block.
- the first relative block may be a block (here, higher block) having a vertical relationship with the target block.
- a second relative block used for constructing a candidate group with respect to encoding information of the target block is specified.
- the second relative block may be a block having a horizontal relationship with the reference block, and the reference block is an upper block.
- candidate groups are formed in a predetermined order from the encoding information of the second relative block specified through the above process.
- inter prediction may be configured as follows.
- the inter prediction of the prediction unit may include a reference picture construction step, a motion estimation step, a motion compensation step, a motion information determination step, and a motion information encoding step.
- the apparatus for encoding an image may include a reference picture configuration unit, a motion estimation unit, a motion compensator, a motion information determiner, and a motion for implementing a reference picture construction step, a motion estimation step, a motion compensation step, a motion information determination step, and a motion information encoding step. It can be configured to include an information encoder.
- inter prediction may be configured as follows.
- the inter prediction of the prediction unit may include a motion information decoding step, a reference picture construction step, and a motion compensation step.
- the apparatus for decoding an image may be configured to include a motion information decoding unit for implementing a motion information decoding step, a reference picture configuration step, a motion compensation step, a reference picture configuration unit, and a motion compensation unit.
- the motion information decoder may be performed using the method used by the motion information encoder in reverse. have.
- the prediction block generated through the motion compensator may be transmitted to the adder.
- FIG. 12 is an exemplary diagram illustrating various cases of obtaining a prediction block through inter prediction.
- unidirectional prediction may obtain a prediction block (A. omni-prediction) from previously coded reference pictures T-1 and T-2, or later coded reference pictures T + 1, A prediction block (B. backward prediction) can be obtained from T + 2).
- Bidirectional prediction may generate prediction blocks C and D from a plurality of previously coded reference pictures T-2 to T + 2.
- the P picture type may support unidirectional prediction and the B picture type may support bidirectional prediction.
- a picture referred to for encoding the current picture may be obtained from a memory, and the reference picture before the current picture and the reference picture after the current picture T have a time order or display order based on the current picture T.
- the reference picture list can be constructed.
- Inter-prediction may be performed on the current image as well as the previous or subsequent image based on the current image.
- Performing inter prediction on the current image may be referred to as non-directional prediction. This may be supported in the I picture type or in the P / B picture type, and the supported picture type may be determined according to the encoding setting.
- Performing the inter prediction on the current image is to generate a prediction block using spatial correlation. The prediction method is different from that of performing the inter prediction on another image for the purpose of using the temporal correlation. , Motion vectors, etc.) may be the same.
- P and B pictures are the image types for performing the inter prediction, it may be applicable to various other image types that are added or replaced.
- a given image type may support only inter-screen prediction without supporting intra picture prediction, may support only inter-screen prediction in a predetermined direction (backward), and may support only inter-screen prediction in a predetermined direction. Can be.
- the reference picture configuration unit may configure and manage a reference picture used for encoding the current picture through the reference picture list.
- At least one reference picture list may be configured according to an encoding setting (for example, an image type, a prediction direction, etc.), and a prediction block may be generated from the reference pictures included in the reference picture list.
- inter prediction may be performed on at least one reference picture included in the reference picture list 0 (L0) or the reference picture list 1 (L1).
- inter prediction may be performed on at least one reference picture included in the composite list LC generated by combining L0 and L1.
- the unidirectional prediction may be classified into forward prediction Pre_L0 using the forward reference picture list L0 and backward prediction Pred_L1 using the backward reference picture list L1.
- the bidirectional prediction Pre_BI may use both the forward reference picture list L0 and the backward reference picture list L1.
- copying the forward reference picture list L0 to the backward reference picture list L1 and performing two or more forward predictions may be included in the bidirectional prediction, and the backward reference picture list L1 may be forwarded. Copying to the direction reference picture list L0 and performing two or more backward prediction may also be included in the bidirectional prediction.
- the prediction direction may be indicated by flag information indicating a corresponding direction (for example, inter_pred_idc. This value is assumed to be adjustable by predFlagL0, predFlagL1, and predFlagBI). predFlagL0 indicates forward prediction or not, and predFlagL1 indicates forward prediction. Bidirectional prediction may be indicated by using predFlagBI or by predFlagL0 and predFlagL1 simultaneously (eg, when each flag is 1).
- the reference picture configuration unit may manage the picture list referred to the inter prediction of the current picture, and may set a rule for reference picture management in consideration of the limited memory size.
- the transmitted information may be defined as a reference picture set (RPS), and pictures selected in the RPS are divided into reference pictures and stored in a memory (or DPB), and pictures not selected in the RPS are classified into non-reference pictures and are fixed. After time it can be removed from memory.
- the memory may store a predetermined number of pictures (for example, 14, 15, 16 pictures or more), and the size of the memory may be set according to the level and the resolution of the image.
- FIG. 13 illustrates an example of configuring a reference picture list according to an embodiment of the present invention.
- reference pictures T-1 and T-2 existing before the current picture are assigned to L0 and reference pictures T + 1 and T + 2 existing after the current picture are assigned to L1.
- the reference picture of L1 may be allocated when the number of L0 reference pictures cannot be filled.
- the reference picture of L0 may be allocated.
- the current picture may be included in at least one reference picture list.
- the current picture may be included in L0 or L1
- L0 may be configured by adding a reference picture (or current picture) whose temporal order is T to a reference picture before the current picture, and a reference after the current picture.
- L1 may be configured by adding a reference picture having a temporal order T to the picture.
- the reference picture list structure may be determined according to the encoding setting.
- the current picture may be managed through a separate memory separated from the reference picture list, or the current picture may be included in the at least one reference picture list.
- a signal (curr_pic_ref_enabled_flag) indicating whether a current picture includes a reference picture list.
- the signal may be information implicitly determined or explicitly generated.
- curr_pic_ref_enabled_flag 0
- curr_pic_ref_enabled_flag 1
- curr_pic_ref_enabled_flag 1
- curr_pic_ref_from_l0_flag curr_pic_ref_from_l1_flag
- the current picture may be located in the first or last order of the reference picture list as shown in FIG. 13, and the arrangement order in the list may be determined according to the encoding setting (for example, type information of an image).
- the type I may be located first, and the type P / B may be located last, but not limited thereto.
- individual reference picture memories may be supported according to a signal (ibc_enabled_flag) indicating whether or not block matching (or template matching) is supported in the current picture.
- the signal may be information implicitly determined or explicitly generated.
- the reference picture component may include a reference picture interpolator, and it may be determined whether to perform an interpolation process for pixels in a decimal unit according to the interpolation precision of the inter prediction.
- the reference picture interpolation process may be omitted when the interpolation precision is an integer unit, and the reference picture interpolation process may be performed when the interpolation precision is a decimal unit.
- the interpolation filter used in the reference picture interpolation process may be determined according to an encoding setting, and one preset interpolation filter (for example, a DCT-IF (Discrete Cosine Transform Based Interpolation Filter) may be used) or a plurality of interpolation filters may be used.
- the selection information for the interpolation filter may be implicitly omitted.
- the selection information for the interpolation filter may be selected for video, sequence, picture, slice, tile group, tile, brick. , Blocks, etc. may be included in the unit.
- information on the interpolation filter (for example, filter coefficient information, etc.) may also be explicitly generated information.
- the same type of filter is used depending on the interpolation position (e.g., fractional units such as 1/2, 1/4, 1/8) (e.g., filter coefficient information is obtained according to the interpolation position from one filter equation) Or other kinds of interpolation filters depending on the interpolation position.
- a 6-tap Wiener filter may be applied to 1/2 unit, an 8-tap Kalman filter to 1/4 unit, and a linear filter to 1/8 unit.
- Interpolation precision (maximum precision at which interpolation is performed) can be determined according to the encoding setting, and integer units and decimal units (for example, 1/2, 1/4, 1/8, 1/16, 1/32, etc.) May be the precision of one of In this case, the interpolation precision may be determined according to an image type, a reference picture setting, a supported inter prediction method, and the like.
- interpolation precision may be set in integer units in the I image type and in decimal units in the P / B image type.
- the reference picture may be set to one of integer or decimal units according to the referenced picture.
- the block may be set to one of integer or decimal units. Otherwise, it may be set to decimal units.
- the interpolation process may be performed by selecting one of a plurality of interpolation precisions, and when the interpolation process according to the adaptive interpolation precision is supported (for example, adaptive_ref_resolution_enabled_flag.
- Precision selection information eg, ref_resolution_idx
- ref_resolution_idx may be generated in one of the plurality of interpolation precisions.
- the setting and information related to the interpolation precision may be implicitly determined or explicitly generated, and the setting and information may be generated by video, sequence, picture, slice, It may be included in units of tile groups, tiles, bricks, and the like.
- whether to support adaptive interpolation precision, precision selection information, precision candidate group, etc. based on encoding settings defined by one or more encoding elements in an image type, reference picture setting, supported intra prediction method, and supported motion model Can be done.
- a motion estimation and compensation process may be performed according to interpolation precision, and a representation unit and a storage unit for a motion vector may also be determined based on the interpolation precision.
- the motion estimation and compensation process is performed in 1/2 unit, and the motion vector is represented in 1/2 unit and can be used in the encoding process.
- the motion vector is stored in units of 1/2 and may be referred to in the motion information encoding process of another block.
- the motion estimation and compensation process is performed in 1/8 unit, and the motion vector is expressed in 1/8 unit and can be used in the encoding process and stored in 1/8 unit. have.
- the motion estimation and compensation process and the motion vector may be performed, represented, and stored in units different from interpolation precision, such as integer, 1/2, and 1/4 units. It may be adaptively determined according to an estimation / compensation method, a motion model, a motion information encoding mode, and the like.
- the motion estimation and compensation process is performed in 1/4 unit, and the motion vector is expressed in 1/4 unit. It can be stored in units of 1/8.
- the motion estimation and compensation process may be performed in 1/8 units, the motion vector may be expressed in units of 1/4, and stored in units of 1/8.
- the motion estimation and compensation process is performed in 1/4 unit, the motion vector is expressed in 1/4 unit, and can be stored in 1/8 unit. have.
- the motion estimation and compensation process may be performed in 1/8 units, and the motion vector may be expressed in 1/8 units and stored in units of 1/8.
- the motion estimation and compensation process is performed in 1/4 unit, the motion vector is expressed in 1/4 unit, and can be stored in 1/16 unit. have.
- the motion estimation and compensation process may be performed in 1/8 units, the motion vector may be expressed in units of 1/4, and may be stored in units of 1/16.
- the motion estimation and compensation process may be performed in units of 1/16, the motion vector may be expressed in units of 1/4, and may be stored in units of 1/16.
- the motion estimation and compensation, the motion vector representation, and the storage unit may be adaptively determined based on the inter prediction method or setting and the interpolation precision.
- the motion estimation and compensation and the motion vector representation unit may be adaptively determined according to the inter prediction method or setting, and the storage unit of the motion vector may be generally determined according to the interpolation precision, but is not limited thereto. Examples of various modifications may be possible without this.
- an example of one category eg, a motion model, a motion estimation / compensation method, etc.
- two or more categories are mixed to determine the setting.
- the reference picture interpolation precision may be determined according to the motion estimation and compensation settings supported according to the inter prediction method or the setting, whereas the interpolation precision information has a preset value or is selected from one of a plurality of precisions. Can be. For example, when the mobile motion model supports up to 1/8 unit and the non-movement motion model supports up to 1/16 unit, the interpolation process may be performed according to the precision unit of the non-movement motion model having the highest precision. have.
- reference picture interpolation may be performed according to settings of supported precision information such as a moving motion model, a non-moving motion model, a competition mode, a merge mode, a skip mode, and the like.
- the precision information may be implicitly or explicitly determined, and when the related information is explicitly generated, the precision information may be included in a unit of a video, a sequence, a picture, a slice, a tile group, a tile, a brick, and the like.
- the motion estimation unit refers to a process of estimating (or searching for) a block of which reference picture the target block is highly correlated with.
- the size and shape (M ⁇ N) of the target block on which the prediction is performed may be obtained from the block divider.
- the target block may be determined in a range of 4 ⁇ 4 to 128 ⁇ 128.
- the inter prediction may be generally performed in units of prediction blocks, but may be performed in units of coding blocks, transform blocks, or the like according to the setting of the block partitioner.
- the estimation may be performed within an estimated range of the reference region, and at least one motion estimation method may be used. In the motion estimation method, an estimation order and a condition of the pixel unit may be defined.
- Motion estimation may be performed based on a motion estimation method.
- an area to be compared for the motion estimation process may be a target block in case of block matching, or a predetermined area (template) set around the reference block in case of template matching.
- the block with the highest correlation can be found within the estimated range of the target block and the reference region, and the latter case can find the region with the highest correlation within the estimated range of the template and the reference region defined by the encoding setting. Can be.
- the template may be set in at least one of adjacent blocks such as left, top, top left, top right, and bottom left blocks with respect to the reference block.
- the adjacent block may be a block in which encoding is completed.
- the reference block is M x N
- M x h and v x N may be configured as templates on the upper side and the left side of the reference block, respectively.
- the template may have a predetermined fixed area (eg, left and upper blocks) and a length (w, h), or may have an adaptive setting by encoding setting.
- the encoding setting may be defined by the size, shape, position, width / length ratio, image type, color component, etc. of the reference block.
- the information about the template region, the length, and the like may be explicitly generated in units of a video, a sequence, a picture, a slice, a tile group, a tile, and a brick, and may be implicitly determined according to an encoding setting.
- the block matching may be one of methods for explicitly generating all or part of the motion information, and in the case of template matching, it may be one of methods for implicitly obtaining all or part of the motion information.
- the motion information (or type of motion information) that is explicitly or implicitly generated or acquired in the motion estimation method may be determined by the inter prediction prediction setting, and the inter prediction prediction setting may be defined by a motion model, a motion information encoding mode, or the like. have.
- information based on the estimation start position, the correction information of the final estimated completed motion vector (x, y vector association), and the like may be implicitly determined in the template matching, but related information may be explicitly generated.
- Information on the supportable range of template matching may be explicitly generated or implicitly determined according to an encoding setting.
- the encoding setting may be defined by one or more elements in the size, shape, position, image type, color component, etc. of the target block.
- template matching is supported in the range A x B to C x D, where A through D can be 4, 8, 16, 32, 64 or more integers and A and B are less than or equal to C and D, respectively.
- the support range of the template matching may be a configuration belonging to the support range of the block matching or an exception configuration (eg, when the minimum block size is smaller) may be possible.
- motion_comp_idx is 0, only block matching is supported, block matching and template matching are supported in a predetermined division unit such as picture or slice, or block matching and template matching are supported in block unit, or 1 is template matching in block unit. Accordingly, a plurality of related selection information may be generated, and candidates having the corresponding information may have different meanings), which may be included in block units.
- the above example may be a configuration that is preceded by the division (selection) of the motion estimation method in block units. For example, when template matching is selected, there is no information to be additionally confirmed, merged into a motion information encoding mode, and a contention mode may be supported as a candidate. In this case, when the merge mode is selected, the final estimated motion vector may be set as the motion vector of the target block, and when the competition mode is selected, offset information corrected in the horizontal or horizontal direction is additionally generated in the final estimated motion vector. The motion vector added to the target block may be set as the motion vector of the target block.
- template matching may be included as part of the inter prediction.
- a motion information encoding mode for template matching may be supported, or may be included as a candidate in a motion information prediction candidate group configured in a predetermined motion information encoding mode.
- the template matching may be performed by classification (selection) of the motion information encoding mode, and in the latter case, one candidate of a motion information prediction candidate group for representing optimal motion information in a predetermined motion information encoding mode may be used.
- the template matching may be performed by selecting.
- the template of the above example may be set based on a reference block, and the reference block may be a coding block or a prediction block (or a transform block).
- the coding block When the coding block is determined through the block dividing unit, it may be set as a prediction block, and when the coding block is determined, it may be divided into two or more prediction blocks.
- inter-picture prediction in units of sub-blocks is referred to as performing the inter-screen prediction by not splitting the coding block or splitting it into two or more prediction blocks (for example, a rectangle or a right triangle). That is, the reference block may be set as a coding block or a prediction block, and a template may be set based on the reference block.
- reference blocks for setting a template may be supported.
- the target block may be a block placed in a vertical relationship with a reference block or a block placed in a horizontal relationship.
- a coding block is a target block and an upper block having a vertical relationship with the coding block is a relative block.
- a coding block is a target block, and a block having a horizontal relationship with the coding block is a relative block.
- the coding block may be changed to a prediction block and applicable. It is also possible to assume the prediction block as the target block and the coding block as the relative block. In the following example, the case of ⁇ 1> is assumed.
- the method of configuring a template by setting a reference block among a plurality of candidate blocks includes information on whether explicitly supported in units such as sequence, picture, slice, tile group, tile, brick, block, etc. If the information is not confirmed, it can be assigned to a predefined value (0 or 1). Alternatively, support may be determined implicitly, or may be determined based on an encoding setting.
- the encoding setting may include one or more elements such as state information such as size, shape, and position of a block (target block), image type (I / P / B), color component, and whether inter prediction in units of sub blocks is applied. Can be defined by
- a method of setting a reference block among a plurality of candidate blocks may be supported when the size of the target block is greater than or equal to a predetermined first threshold size.
- the method may be supported when the size of the target block is less than or equal to the predetermined second threshold size.
- the threshold size may be expressed as W, H, W x H, and W * H through the width (W) and height (H), and is a predetermined value in the encoding / decoding apparatus, where W and H are 4, It may be an integer of 1 or more, such as 8 and 16.
- W * H can be an integer of 16, 32, 64 or more.
- the first threshold size is less than or equal to the second threshold size.
- the method is not supported, it means that the reference block is set to a predefined block (target block).
- candidate blocks may be defined in various ways.
- the relative block eg, the upper block
- the relative block may be a block having a division depth of at least one less than the division depth of the coding block.
- the block may be a block having a predetermined width C and a height D at a predetermined upper left coordinate (eg, located to the left or above a left upper coordinate of the target block).
- C and D may be an integer of 8, 16, 32 or more, and may be greater than or equal to the width and height of the target block.
- C and D may be determined based on information about a block size (for example, the size of the largest transform block, the size of the largest coding block, etc.).
- candidate selection information may be explicitly generated, and the candidate blocks may be set as reference blocks.
- the reference block may be implicitly determined, which may be based on an encoding setting.
- the relative block may be set as the reference block, and otherwise (second category), the target block may be set as the reference block. have.
- the target block is set as the reference block if the information is in the first category by encoding setting
- the first relative block for example, the upper block
- a second relative block eg, an adjacent block
- information for selecting one of a target block and a relative block may occur.
- the encoding setting may be defined by one or more factors, such as state information such as a size, shape, width / length ratio, position, etc. of a target block, an image type, a color component, or whether inter prediction in units of sub blocks is applied. .
- the reference block may be set in various candidate blocks including the target block, which may be determined explicitly or implicitly.
- various reference blocks for setting a template may be set, this may be content that may be applied to various cases of inter-screen prediction. That is, the above description may be similarly or similarly applied to the setting of the reference block for configuring the motion information prediction candidate group in the inter prediction, which will be described later.
- the reference block definition or the support range in the above example may be set identical or not identical.
- Motion estimation may be performed based on a motion model.
- Motion estimation and compensation may be performed using an additional motion model in addition to a translation motion model considering only parallel motion.
- motion estimation and compensation may be performed using a motion model that considers not only parallel movement but also movement such as rotation, perspective, zoom-in / out, and the like. This may be supported to improve encoding performance by generating a prediction block by reflecting the above various kinds of motions generated according to regional characteristics of the image.
- FIG. 14 is a conceptual diagram illustrating an out-of-movement motion model according to an embodiment of the present invention.
- an example of expressing motion information based on a motion vector V 0 and V 1 at a predetermined position is provided as an example of an affine model. Since motion may be expressed based on a plurality of motion vectors, accurate motion estimation and compensation may be possible.
- inter prediction may be performed based on a predefined motion model, but inter prediction based on an additional motion model may also be supported.
- the predefined motion model is a moving motion model and the additional motion model is an affine model, but various modifications are possible without being limited thereto.
- motion information (assuming unidirectional prediction) may be expressed based on one motion vector, and a control point (reference point) for representing motion information is assumed to be upper left coordinate, but is not limited thereto.
- a motion model other than movement it can be expressed by motion information having various configurations.
- Some motion estimation and compensation mentioned through an example to be described later may not be performed in units of blocks, or may be performed in units of predetermined sub blocks.
- the size and position of the predetermined subblock may be determined based on each motion model.
- 15 is an exemplary diagram illustrating motion estimation in units of subblocks according to an embodiment of the present invention.
- the motion estimation in units of sub-blocks according to the affine model two motion vectors is shown.
- the motion vector of each pixel included in the target block may be the same. That is, it may have a motion vector applied in a unit of pixels, and motion estimation and compensation may be performed using one motion vector V 0 .
- the motion vectors of the pixel units included in the target block may not be the same, and individual motion vectors of the pixel units may be required.
- a motion vector of a pixel unit or a sub block unit may be derived based on the motion vectors V 0 and V 1 of a predetermined control point position of the target block, and motion estimation and compensation are performed using the derived motion vectors. can do.
- V 0 ⁇ (V 0x , V 0y ) ⁇ is the motion vector of the upper left corner of the target block
- V 1 ⁇ (V 1x , V 1y ) ⁇ is the motion of the upper right corner of the target block.
- motion estimation and motion compensation of the non-movement motion model may be performed in units of subblocks.
- the size of the sub-block may be determined according to the encoding setting, may have a fixed size or may be set to an adaptive size.
- M and N may be an integer of 2, 4, 8, 16 or more, and M and N may or may not be the same.
- the size of the sub block may be explicitly generated in units of a sequence, a picture, a slice, a tile group, a tile, and a brick. Or, it may be implicitly determined by a common promise between the encoder and the decoder, or may be determined by the encoding setting.
- the encoding setting may be performed using state information such as the size, shape, and position of the target block, image type, color component, inter prediction prediction information (motion information encoding mode, reference picture information, interpolation precision, motion model, etc.). It can be defined by one or more elements.
- the above example has described a process of deriving the size of a subblock according to some non-movement motion model and performing motion estimation and compensation based thereon.
- motion estimation and compensation of a sub-block or pixel unit according to the motion model may be performed, and a detailed description thereof will be omitted.
- a motion vector of a block may be expressed by one motion vector, and the rotational motion may be expressed by rotation angle information.
- the rotation angle information may be measured with reference to a predetermined position (eg, upper left coordinate) with reference (0 degrees), and at predetermined intervals (eg, between -90 degrees and 90 degrees) at predetermined intervals (eg, angle difference).
- the value may be represented by k candidates (k is an integer of 1, 2, 3 or more) having a value of 0 degrees, 11.25 degrees, 22.25 degrees, and the like.
- the rotation angle information may be encoded by itself in the motion information encoding process or may be encoded (eg, prediction + difference information) based on motion information (eg, motion vector and rotation angle information) of adjacent blocks. .
- the motion of the block may be expressed by one motion vector, and the rotational motion of the block may be expressed by one or more additional motion vectors.
- the number of additional motion vectors may be an integer of 1, 2, or more, and the control point of the additional motion vector may be determined among upper right, lower left, and lower right coordinates, or other coordinates in the block may be set as control points.
- the additional motion vector may be encoded by itself in the motion information encoding process or may be encoded based on motion information of the adjacent block (for example, a motion vector according to a motion motion model or an out-of-motion motion model) (eg, prediction + difference). Value information) or may be encoded (eg, prediction + difference information) based on another motion vector in a block representing a rotational motion.
- motion information of the adjacent block for example, a motion vector according to a motion motion model or an out-of-motion motion model
- Value information or may be encoded (eg, prediction + difference information) based on another motion vector in a block representing a rotational motion.
- the movement movement of the block may be represented by one motion vector and the scaling movement may be represented by scaling information.
- the scaling information may be expressed as scaling information indicating expansion or contraction in the horizontal or vertical direction based on a predetermined position (eg, upper left coordinate).
- scaling may be applied in at least one of horizontal or vertical directions.
- individual scaling information applied in the horizontal or vertical direction may be supported, or scaling information commonly applied may be supported.
- the width and height of the scaled block are added to a predetermined position (left upper coordinate) to determine a position for motion estimation and compensation.
- the scaling information may be encoded by itself in the motion information encoding process or may be encoded (eg, prediction + difference information) based on motion information (eg, motion vectors and scaling information) of adjacent blocks.
- the movement of the block may be represented by one motion vector, and the size adjustment of the block may be represented by one or more additional motion vectors.
- the number of additional motion vectors may be one, two, or more integers, and the control point of the additional motion vector may be determined among upper right, lower left, and lower right coordinates, or other coordinates in the block may be set as control points. .
- the additional motion vector may be encoded by itself in the motion information encoding process or may be encoded based on motion information of the adjacent block (for example, a motion vector according to a motion motion model or an out-of-motion motion model) (eg, prediction + difference). Value information) or may be encoded (e.g., predicted + differential) based on predetermined coordinates (e.g., lower right coordinates) in the block.
- motion information of the adjacent block for example, a motion vector according to a motion motion model or an out-of-motion motion model
- Value information e.g., predicted + differential
- predetermined coordinates e.g., lower right coordinates
- a motion vector of a block may be represented by one motion vector
- a rotation motion may be represented by rotation angle information
- scale adjustment may be expressed by scaling information. Description of each movement can be derived through the above-described example, so a detailed description thereof will be omitted.
- the motion of the block may be represented by one motion vector, and other motion of the block may be represented by one or more additional motion vectors.
- the number of additional motion vectors may be one, two, or more integers
- the control point of the additional motion vector may be determined among upper right, lower left, and lower right coordinates, or other coordinates in the block may be set as control points. .
- the additional motion vector may be encoded by itself in the motion information encoding process or may be encoded based on motion information of the adjacent block (for example, a motion vector according to a motion motion model or an out-of-motion motion model) (eg, prediction + difference). Value information) or may be encoded (eg, prediction + difference information) based on another motion vector in a block representing various motions.
- the above description may be related to the affine model, which will be described based on the case of one or two additional motion vectors.
- the number of motion vectors used according to the motion model may be 1, 2, or 3, and may be regarded as an individual motion model according to the number of motion vectors used to express motion information.
- one motion vector is a predefined motion model.
- a plurality of motion models for inter prediction may be supported and may be determined by a signal (eg, adaptive_motion_mode_enabled_flag) indicating support of additional motion models.
- a signal eg, adaptive_motion_mode_enabled_flag
- the signal may occur in units of a video, a sequence, a picture, a slice, a tile group, a tile, a brick, a block, and the like, but when it is not possible to separately identify the signal, a signal value may be assigned according to a predefined setting. Or, it may be determined whether to support implicitly based on the encoding setting. Alternatively, an implicit or explicit case may be determined according to the encoding setting.
- the encoding setting may be defined by one or more elements in an image type, an image type (for example, 0 for general image, 1 for 360 degree image), and color component.
- a plurality of motion models are supported.
- the following assumes that there are two or more additionally supported motion models, and assumes that it is determined that a plurality of motion models are supported in units of sequence, picture, slice, tile group, tile, brick, etc. Configuration may be present.
- motion models A, B, and C are supported, A is a basically supported motion model, and B and C are additionally supportable motion models.
- Configuration information for the supported motion model may occur in the unit. That is, a supported motion model configuration such as ⁇ A, B ⁇ , ⁇ A, C ⁇ , ⁇ A, B, C ⁇ may be possible.
- an index (0 to 2) may be assigned to a candidate of the configuration and selected. If index 2 is selected, ⁇ A, C ⁇ , and if index 3 is selected, motion model configuration supporting ⁇ A, B, C ⁇ may be determined.
- information indicating whether a predetermined motion model is supported may be individually supported. That is, whether or not B support flag and C support flag may occur. If both flags are 0, only A may be supported.
- This example may be an example in which information indicating whether a plurality of motion models are supported is processed without being generated.
- the motion model of one of the candidate groups may be explicitly determined or used implicitly in block units.
- the motion estimator may be a configuration that exists in the encoding apparatus, but may be a component that may be included in the decoding apparatus according to a prediction method (for example, template matching).
- a prediction method for example, template matching
- the decoder may acquire motion information of the target block by performing motion estimation through an adjacent template of the target block.
- the motion estimation related information for example, motion estimation range, motion estimation method ⁇ scan order>, etc.
- the motion estimation related information may be implicitly determined or explicitly generated so that the video, sequence, picture, slice, tile group, tile, brick It may be included in such units.
- the motion compensator refers to a process of acquiring data of some blocks of some reference pictures determined through the motion estimation process as prediction blocks of the target block.
- the prediction block of the target block from at least one region (or block) of at least one reference picture based on motion information (eg, reference picture information, motion vector information, etc.) obtained through the motion estimation process. Can be generated.
- Motion compensation may be performed based on a motion compensation method as follows.
- motion compensation may be performed based on a motion model as follows.
- one motion vector (V x , V y ) of the target block (M x N) explicitly obtained from the reference picture and the upper left coordinate (P x , P y ) of the target block are acquired. Based on the coordinate (P x + V x , P y + V y ), data of a region corresponding to M to the right and N to the bottom may be compensated with the prediction block of the target block.
- Data of a region corresponding to M / m to the right and N / n to the bottom may be compensated with the prediction block of the subblock. That is, the prediction blocks of the subblocks may be collected and compensated with the prediction blocks of the target block.
- the process for selecting the optimal motion information of the target block may be performed by the motion information determiner.
- block distortion eg, Distortion of target and reconstructed blocks.
- Sum of Absolute Difference (SAD), Sum of Square Difference (SSD), etc. ⁇ and rate-distortion techniques that consider the amount of bits generated according to the corresponding motion information are used to determine optimal motion information in terms of coding cost.
- SAD Absolute Difference
- SSD Sum of Square Difference
- rate-distortion techniques that consider the amount of bits generated according to the corresponding motion information are used to determine optimal motion information in terms of coding cost.
- the prediction block generated based on the motion information determined through the above process may be transmitted to the subtractor and the adder.
- it may be a configuration that may be included in the decoding apparatus according to some prediction scheme (for example, template matching), and in this case, may be determined based on the distortion of the block.
- Inter-picture prediction related setting information such as a motion compensation method and a motion model may be considered in the motion information determiner.
- the motion compensation method selection information, the motion vector, the reference picture information, and the like may be optimal motion information.
- the motion model selection information, the motion vector, the reference picture information, and the like may be optimal motion information.
- the motion information encoder may encode motion information of the target block obtained through the motion information determination process.
- the motion information may include information about an image and a region referred to for prediction of the target block.
- the image information may include information about the referenced image (eg, reference image information, etc.) and information about the referenced region (eg, motion vector information, etc.).
- inter prediction prediction setting information (or selection information, for example, a motion estimation / compensation method, selection information of a motion model, etc.) may also be included in the motion information of the target block.
- Information eg, number of motion vectors, etc.
- the reference image and the region may be configured based on the inter prediction prediction setting.
- the motion information may be encoded by configuring the reference picture and the information about the reference area as one combination, and the combination of the information about the reference picture and the reference area may be configured as the motion information encoding mode.
- the information about the reference picture and the reference area may be obtained based on an adjacent block or predetermined information (eg, an image encoded before or after the current picture, a zero motion vector, etc.), and the adjacent block is a reference block. It may be a block (relative block) having a horizontal relationship with the. That is, the block ⁇ inter_blk_A> which belongs to the same space as the reference block and is closest to the target block, the block ⁇ inter_blk_B> which belongs to the same space as the reference block and is adjacent to the far distance, If to distinguish, blocks belonging to one or more of these categories can be identified as a relative block.
- an adjacent block or predetermined information eg, an image encoded before or after the current picture, a zero motion vector, etc.
- the adjacent block is a reference block. It may be a block (relative block) having a horizontal relationship with the. That is, the block ⁇ inter_blk_A> which belongs to the same space as the reference block and is closest to
- the motion information of the target block may be encoded based on the motion information or the reference picture information of the counterpart block, and the information (or an intermediate value, a conversion process, etc.) derived from the motion information or the reference picture information of the counterpart block may be encoded.
- Information the motion information of the target block can be encoded. That is, the motion information of the target block may be predicted from the neighboring block to encode information about the motion.
- the motion information of the target block may be predicted and encoded, or the motion information may be encoded as it is, which is a signal indicating whether to perform the prediction of the motion information (for example, mvp_enabled_flag.
- Prediction and encoding i.e., 1 must be a motion information encoding mode such as skip, parallel, contention mode, etc.).
- the signal is one. That is, in the following example, it is assumed that all or part of the motion information of the target block is encoded based on prediction.
- the reference block may be set among a block having a horizontal relationship with the target block or a block having a vertical relationship including the target block.
- various reference blocks can be set when encoding motion information of the target block based on (prediction) the reference picture information or the motion information of the counterpart block. Details thereof may be derived through the various examples described above, and thus detailed descriptions thereof will be omitted.
- the target block may be a block that is a stakeholder having motion information to be encoded
- the reference block may identify a block that is a reference (for example, adjacent blocks in the left and upper directions when constructing a motion information prediction candidate group). May be a reference block).
- the reference block may be set as a target block or may be set as a relative block (blocks in a vertical / horizontal relationship). Reference blocks mentioned in the following examples can be derived from the above-described various examples of the present invention including the present example.
- the motion information of the target block may be encoded based on one or more motion information encoding modes.
- the motion information encoding mode may be defined in various ways, and may include one or more in a skip mode, a merge mode, a comp mode, and the like.
- template matching tmp Based on the template matching tmp described above, it may be combined with the motion information encoding mode, supported by a separate motion information encoding mode, or included in a detailed configuration of all or part of the motion information encoding mode. This assumes that template matching is supported in higher units (eg, pictures, slices, etc.), but a flag regarding whether or not to support template matching may be considered as a factor in setting inter prediction.
- motion model (affine) it may be combined with the motion information encoding mode, supported by a separate motion information encoding mode, or included in a detailed configuration of all or part of the motion information encoding mode. This assumes that the upper unit is determined to support the non-movement motion model, but a flag regarding whether the support is supported may be considered as a factor in setting the inter prediction.
- individual motion information encoding modes such as temp_inter, temp_tmp, temp_ibc, and temp_affine may be supported.
- combined motion information encoding modes such as temp_inter_tmp, temp_inter_ibc, temp_inter_affine, temp_inter_tmp_ibc, and the like may be supported.
- the template-based candidate, the method-based candidate for performing block matching in the current picture, and the affine-based candidate may be included in the motion information prediction candidate group constituting the temp.
- temp may mean a skip mode, a merge mode, a contention mode (comp).
- motion information encoding modes such as skip_inter, skip_tmp, skip_ibc, skip_affine in the skip mode, merge_inter, merge_tmp, merge_ibc, merge_affine in the merge mode, comp_inter, comp_tmp, comp_ibc, and comp_affine are supported. Same as
- one mode may be selected by a flag for distinguishing between skip mode, merge mode, and competition mode. Can be. For example, if a flag indicating whether to skip mode is supported and a value of 1 is selected, a skip mode is selected; if a value of 0 is supported, a flag indicating whether to be a merge mode is supported. If the value is 0, the competition mode may be selected.
- the motion information prediction candidate group in each mode may include candidates based on inter, tmp, ibc, and affine.
- an additional flag for distinguishing detailed modes of the selected mode may be supported in addition to a flag for selecting one of a skip mode, a merge mode, and a competition mode.
- a merge mode it means that a flag selectable from the detailed modes of merge mode, merge_inter, merge_tmp, merge_ibc, merge_affine, etc., is additionally supported.
- a flag indicating whether merge_inter is supported or a flag selectable from merge_tmp, merge_ibc, merge_affine, etc. may be additionally supported.
- the motion information encoding mode candidates may be supported according to encoding settings.
- the encoding setting includes state information such as size, shape, width / length ratio, and position of a reference block (eg, target block), image type, image type, color component, and inter prediction prediction setting (eg, template matching support). Whether a block matching is supported in the current picture, a motion model support element, etc.).
- a supported motion information encoding mode may be determined according to the size of a block.
- the size of the block may be determined by the first threshold size (minimum value) or the second threshold size (maximum value), each threshold size is W, W as the width (W) and height (H) of the block; It may be expressed as H, W x H, W * H.
- W and H may be integers of 4, 8, 16 or more, and W * H may be integers of 16, 32, 64 or more.
- W and H may be integers of 16, 32, 64 or more, and W * H may be integers of 64, 128, 256 or more.
- the range can be defined by either the first threshold size or the second threshold size, or both.
- the threshold size may be fixed or adaptive according to an image (eg, image type).
- the first threshold size may be set based on a size of a minimum coding block, a minimum prediction block, a minimum transform block, and the like
- the second threshold size may be a size of a maximum coding block, a maximum prediction block, a maximum transform block, or the like. It may be set based on.
- a motion information encoding mode supported according to an image type may be determined.
- the I image type may include at least one of a skip mode, a merge mode, and a competition mode.
- a method of performing block matching (or template matching) on the current picture an individual motion information encoding mode relating to an affine model (hereinafter, referred to as a term) may be supported, or two or more elements are combined to encode motion information. Modes may be supported.
- elements other than the predetermined motion information encoding mode may be configured as motion information prediction candidate groups.
- the P / B image type may include at least one of a skip mode, a merge mode, and a contention mode.
- a general inter prediction, template matching, block matching may be performed on the current picture, and an individual motion information encoding mode relating to an affine model (hereinafter, referred to as a term) may be supported, or two or more elements may be combined to provide motion information.
- An encoding mode may be supported.
- elements other than the predetermined motion information encoding mode may be configured as motion information prediction candidate groups.
- the skip mode, the merge mode, and the contention mode may use / reference motion information of a relative block (candidate block) set based on a reference block for encoding motion information of the target block. That is, motion information (for example, a reference image or a reference region) may be derived from the relative block, and motion information (predictive motion information) obtained based on this may be predicted as motion information of the target block.
- motion information for example, a reference image or a reference region
- the difference information between the motion vector of the target block and the predicted motion vector does not occur in the skip mode and the merge mode, and the difference information may occur in the contention mode. That is, in the skip mode and the merge mode, the predicted motion vector may be used as the motion vector of the target block as it is, but the merge mode may be modified in which difference information occurs.
- the information about the reference picture of the target block may be used as the predictive reference picture information
- the information about the reference picture of the target block may be encoded without reference information.
- the encoding may be performed based on the prediction reference image information (eg, encoding a difference value after prediction).
- the residual component of the target block does not occur in the skip mode, and the residual component of the target block may occur in the merge mode and the contention mode. That is, residual components may be generated in a merge mode and a competition mode, and processing (transformation, quantization, and inverse processes) may be performed (for example, coded_block_flag may not be performed by checking the presence or absence of residual signals in a block). However, the merge mode may be modified such that residual components do not occur.
- the motion information prediction candidate group of the motion information encoding mode may be configured in various ways.
- the skip mode and the merge mode may configure a candidate group in common
- the competition mode may configure an individual candidate group.
- Candidate group configuration settings may be determined based on the motion information encoding mode.
- the candidate group configuration setting may be defined by the number of candidate groups, categories and positions of candidate blocks (relative blocks), candidate configuration methods, and the like.
- the number of candidate groups may be k, and k may be an integer of 1 to 6 or more. In this case, when the number of candidate groups is one, the candidate group selection information does not occur, and the motion information of the predefined candidate block is set as the prediction motion information. When the number of candidate groups is two or more, the candidate group selection information may be generated.
- the category of the candidate block may be at least one of inter_blk_A, inter_blk_B, and inter_blk_C. At this time, it may be a category in which inter_blk_A is included by default, and a category in which another category is additionally supported, but is not limited thereto.
- the position of the candidate block may be adjacent to the left, top, top left, top right, and bottom left directions of the reference block in the case of inter_blk_A or inter_blk_C, and may be derived from the description of FIG. 6.
- inter_blk_B it may be specified as a block having mode information having the sameity / similarity as the encoding information of the target block, and a related description may be derived from a part of specifying the block having the aforementioned horizontal relationship.
- motion information of a block having the same mode may be included in the candidate group.
- the positions of the candidate blocks referred to for constructing the motion information prediction candidate group were examined.
- a method of obtaining prediction motion information based on the candidate block will be described.
- the candidate block used for configuring the motion information prediction candidate group for inter prediction may mean a relative block in the above-described relationship between blocks. That is, a block specified among a number of relative blocks based on the reference block may be referred to as a candidate block, and a motion information prediction candidate group may be configured based on motion information of the candidate block. It should be understood that the candidate block may mean a relative block in the following example.
- FIG. 16 is an exemplary diagram for arranging a block spatially or temporally adjacent to a reference block according to an embodiment of the present invention.
- FIG. may be an exemplary diagram regarding the arrangement of blocks (relative blocks or candidate blocks) having a horizontal relationship with reference blocks belonging to the categories of inter_blk_A and inter_blk_C.
- a block belonging to inter_blk_A is referred to as a spatial candidate
- a block belonging to inter_blk_C is referred to as a temporal candidate.
- a block adjacent to the left, top, left, top, right, bottom, and left directions of the reference block, and a block corresponding to the reference block in the space Col_Pic that is not identical in time, is centered, left, and right.
- Blocks adjacent to the up, down, top left, top right, bottom left, and bottom right directions may be configured as candidate blocks for prediction of motion information of the target block.
- blocks adjacent to the direction may be partitioned (divided) into one or more subblock units (for example, the L block in the left direction may be divided into subblocks of l0, l1, l2, and l3).
- An adjacent block may be divided into four sub-blocks (the corresponding block is composed of 16 centers) but is not limited thereto and may be partitioned into the number of p various sub-blocks.
- p may be an integer of 1, 2, 3, 4 or more.
- p may be adaptively determined based on the position (direction) of an adjacent block.
- Col_Pic may be an image before or after the current image (eg, when the interval between the images is 1) based on the current image, and the corresponding block may be set to have the same position in the image as the reference block.
- Col_Pic may be an image in which an interval between images is previously defined based on the current image (eg, an interval between images is z. Z is an integer of 1, 2, 3), and the corresponding block is a predetermined coordinate of the reference block. (Eg, the upper left side) may be set to a position shifted by a predetermined disparity vector, and the disparity vector may be set to a predefined value.
- Col_Pic may be set based on motion information (eg, a reference image) of an adjacent block, and the disparity vector is set based on motion information (eg, a motion vector) of an adjacent block so that the position of the corresponding block is determined. Can be done.
- motion information eg, a reference image
- motion information eg, a motion vector
- k adjacent blocks may be referenced, and k may be an integer of 1, 2, or more. If k is 2 or more, Col_Pic and the disparity vector may be obtained based on operations such as the maximum value, the minimum value, the median value, and the weighted average value of the motion information (eg, the reference image or the motion vector) of the adjacent block.
- the disparity vector may be set as a motion vector of a left or an upper block, and may be set as an intermediate value or an average value of the motion vectors of a left and a lower left block.
- the setting of the temporal candidate may be determined based on a motion information configuration setting or the like. For example, the position of the Col_Pic, the position of the corresponding block, and the like, depending on whether the motion information to be included in the motion information prediction candidate group includes the motion information in the block unit or the sub block unit in the motion information prediction candidate group. This can be determined. For example, when motion information in units of sub-blocks is obtained, a block having a position shifted by a predetermined side vector may be set to a position of a corresponding block.
- the above example shows a case in which information about a position of a block corresponding to Col_Pic is implicitly determined, and explicitly related information may also occur in units of a sequence, a picture, a slice, a tile group, a tile, and a brick.
- the above-described motion information (spatial candidates and temporal candidates) of the spatially or temporally adjacent blocks (or candidate blocks) may be included in the motion information prediction candidate group according to the motion information encoding mode.
- singular motion information may be included in a candidate group as it is. That is, all or part of a singular motion vector, reference picture, prediction direction, or the like may be used as the prediction value of all or part of the motion vector, reference picture, prediction direction, etc. of the target block.
- the singular motion information may be obtained from one candidate block and may be a spatial candidate or a temporal candidate.
- a candidate obtained through this example is a spatial candidate.
- the case may be applied to all of a skip mode, a merge mode, and a contention mode.
- the singular motion information may be included in the candidate group after the adjustment (or transformation) process.
- This example also assumes a case in which singular motion information is obtained from one candidate block.
- an adjustment process for motion information (eg, a motion vector) of the candidate block may be performed based on a distance gap between a current picture and a reference picture and a distance gap between a picture to which the candidate block belongs and a reference picture of the candidate block. Can be.
- the motion vector of the candidate block may be adjusted through a scaling process based on the distance interval between the current picture and the reference picture.
- the adjusted motion vector of the candidate block may be included in the candidate group.
- the motion information such as the reference picture or the prediction direction may be included in the candidate group as the reference picture or the prediction direction information of the candidate block, or may be included in the candidate group based on the distance interval of the reference picture.
- predefined information for example, the reference picture is a picture before or after the current picture ⁇ reference picture index is 0>, the prediction direction is one of forward, backward, and bidirectional
- Information set based on the information may be included in the candidate group.
- the singular motion information may be a temporal candidate.
- a candidate obtained through this example is a temporal candidate.
- the case may be applied to all or part of a skip mode, a merge mode, a contention mode.
- the method may be applied to a skip mode, a merge mode, a contention mode, or may be applied to a contention mode without applying the skip mode and the merge mode.
- the plurality of motion information may be included in the candidate group after the combination process.
- the combining process may be performed on all or part of a motion vector, a reference picture, and a prediction direction.
- the combining process refers to a process of median and weighted average values of the motion information.
- q motion information obtained based on a median value, a weighted average value, and the like of the p motion information may be included in the candidate group.
- p may be an integer of 2, 3, 4 or more
- q may be an integer of 1, 2 or more.
- p and q may be 2 and 1, respectively.
- the average value may be equally weighted (for example, 1: 1, 1: 1: 1, etc.) to the motion information, or is not equally weighted (for example, 1: 2, 1: 3, 2: 3, 1 :). 1: 2, 1: 2: 3, etc.) may be applied.
- the plurality of motion information may be obtained from a plurality of candidate blocks. In this case, it is assumed that one motion information is obtained from one candidate block, but is not limited thereto.
- the motion information (input value of the combining process) of the candidate block may be limited to one of (1) or (2) or belong to both (1) and (2).
- the plurality of motion information may be derived from either a spatial candidate or a temporal candidate, and may be derived from both the spatial candidate and the temporal candidate.
- the combining process may be performed using spatial candidates or the combining process may be performed using temporal candidates.
- the combining process may be performed using one or more spatial candidates and one or more temporal candidates.
- the plurality of motion information may be obtained from previously included candidates of a candidate group. That is, a plurality of candidate motion information (eg, spatial candidate or temporal candidate) previously included in the candidate group formation process may be used as an input value of the combining process.
- candidate motion information used as an input value in the combining process may be derived from either a spatial candidate or a temporal candidate, and may be derived from both the spatial candidate and the temporal candidate.
- the above description may be a case where all or part of a skip mode, a merge mode, and a competition mode are applied. For example, it may be applied to a skip mode, a merge mode, a competition mode, or may be applied to a skip mode and a merge mode but not to a competition mode.
- the motion information obtained through the combination process is referred to as a spatial candidate and a temporal candidate as motion information derived from a spatial candidate and a temporal candidate, and the motion information derived from the spatial candidate and a temporal candidate is referred to as a spatial and temporal candidate. do.
- the following example looks at the derivation process of the candidate.
- the spatial derivation candidate may be obtained by applying a weighted average value or a median value acquisition process to all or some of the motion vectors of blocks in the left, upper, upper left, upper right and lower left directions of the reference block.
- a weighted average value or a median value acquisition process may be applied to all or some of the spatial candidates already included in the candidate group to obtain the spatial candidates.
- the following assumes that the motion vectors of l3, t3, tl, tr, and bl in Curr_Pic of FIG. 16 are considered as input values for a weighted average value or an intermediate value acquisition process.
- the x component of the motion vector can be derived from avg (l3_x, t3_x, tl_x, tr_x, bl_x), and the y component can be derived from avg (l3_y, t3_y, tl_y, tr_y, bl_y), and avg is the motion vector in parentheses.
- avg is the motion vector in parentheses.
- it is a function that calculates the average of.
- the x component of the motion vector may be derived from median (l3_x, t3_x, tl_x, tr_x, bl_x), and the y component may be derived from median (l3_y, t3_y, tl_y, tr_y, bl_y), where median is the median of the motion vector in parentheses. Assume that is a function that calculates.
- a weighted average or median value acquisition process may be performed on a motion vector of all or part of blocks in a left, right, up, down, top, right, left, bottom, right, and center directions of a block corresponding to a reference block. Can be applied to obtain a temporal derivation candidate.
- a temporal derivation candidate may be obtained by applying a weighted average value or a median value acquisition process to all or part of temporal candidates already included in the candidate group.
- the motion vectors of br, r2, and b2 in Col_Pic of FIG. 16 are considered as input values for a weighted average value or a median value acquisition process.
- the x component of the motion vector may be derived from avg (br_x, r2_x, b2_x), and the y component may be derived from avg (br_y, r2_y, b2_y).
- the x component of the motion vector may be derived from median (br_x, r2_x, b2_x), and the y component may be derived from median (br_y, r2_y, b2_y).
- a spatial and temporal derivation candidate may be obtained by applying a weighted average or median value acquisition process to all or some motion vectors of blocks of blocks corresponding to spatially adjacent blocks of a reference block.
- the spatial and temporal derivation candidates may be obtained by applying a weighted average or median obtaining process to all or some of the spatial or temporal candidates already included in the candidate group. Examples thereof will be omitted.
- the motion information obtained through the above process may be added (included) to the motion information prediction candidate group of the target block.
- the spatial information or temporal candidate is included in the motion information prediction candidate group as it is or based on a plurality of spatial or temporal candidates.
- An example is obtained by including. That is, the embodiments of (1) and (2) may be descriptions of spatial or temporal candidates, and the embodiments of (3) may be descriptions of spatial derivation candidates, temporal derivation candidates, and spatial and temporal derivation candidates. .
- the above-described example may be the case where the motion vector of the pixel unit is the same in the target block.
- An affine model has been described above as an example of a case in which a motion vector in a pixel unit or a sub block unit is not the same in a target block.
- a partial change in the motion vector of the sub-block unit in the target block an example of a case of expressing it as a candidate based on spatial or temporal correlation will be described.
- a case of obtaining a prediction value of motion information in sub-block units based on one or more pieces of motion information will be described below.
- This process may be similar to (3) of acquiring the motion information based on the plurality of motion information, but may be an example (4) in which the obtained motion information is obtained in sub-block units.
- the motion information obtained through the process of (4) may be included in the motion information prediction candidate group.
- Example (4) will be described below using the terms spatial derivation candidate, temporal derivation candidate, spatial and temporal derivation candidate which are used in the above examples.
- the reference block may be a case where the reference block is limited to the target block when acquiring a prediction value of the motion information on a sub-block basis.
- the reference block is limited to the target block when the motion information in the sub-block unit and the motion unit in the block unit are mixed to form a candidate group.
- the target block (four subblocks in this example ⁇ c0 + c1 + c4 + c5 / c2 + c3 + c6 + c7 / c8 + c9 + c12 + c13 / c10 + c11 in Curr_Pic in Figure 16) + c14 + c1 are referred to as D0, D1, D2, and D3, respectively>, and the spatially adjacent blocks (in this example, various blocks in Curr_Pic in FIG. 16) obtained based on sub-blocks.
- the target block by acquiring a single piece of motion information (left, top, right top positions) adjacent to the target block with respect to the sub block as a spatial derivation candidate, or by obtaining a spatial derivation candidate through a weighted average value or a median of the plurality of pieces of motion information Can be added to the motion information prediction candidate group.
- subblock D0 is l1, t1, t2 (lower area of left block, upper area of upper block, upper left block centering on subblock)
- subblock D1 is l1, t3, tr
- subblock D2 is l3.
- t1, t2, and subblock D3 may be spatially adjacent blocks of l3, t3, and tr of the corresponding subblock.
- the motion information prediction candidate group added to the target block is a spatial induction candidate (assuming that one example is supported), but the motion information derived therefrom is derived in units of each subblock (in this example, the number of subblocks). Can be as many as four). That is, when parsing information selected by a spatial derivation candidate, the decoder may acquire a motion information prediction value of each subblock as in the above process.
- a temporal derivation candidate a temporally contiguous block obtained based on a subblock in a target block (in this example, various blocks in Col_Pic of FIG. 16.
- One piece of motion information (right and bottom positions) may be acquired as a temporal derivation candidate or a temporal derivation candidate may be added to a plurality of pieces of motion information through a weighted average value or a median value and added to the motion information prediction candidate group of the target block.
- subblock D0 is c10, c6, c9 (lower left block, lower area of right block, lower area of lower block centered on corresponding subblock)
- subblock D1 is r2, r1, c11, subblock D2 B2, c14, b1
- the subblock D3 may be br, r3, and b3 are temporally adjacent blocks of the corresponding subblock.
- it is added as in the above example, it is a temporal derivation candidate, but the motion information derived thereby may be derived in each sub-block unit.
- spatial and temporal derivation candidates spatial or temporally adjacent blocks obtained based on subblocks in the target block (the blocks used in this example are temporally lower right adjacent to left and upper positions spatially adjacent to subblocks).
- the weighted average value or the median value of the motion information of the location may be obtained as a spatial and temporal derivation candidate and added to the motion information prediction candidate group of the target block.
- subblock D0 is l1, t1, c10
- subblock D1 is l1, t3, r2
- subblock D2 is l3, t1, b2
- subblock D3 is l3, t3, br are adjacent blocks of the subblock. Can be.
- the motion information obtained based on the one or more motion information may be included in the candidate group.
- q motion information obtained based on a median value, a weighted average value, and the like of the p motion information may be included in the candidate group.
- p may be an integer of 1, 2, 3 or more
- q may be an integer of 1, 2 or more.
- the average value may be equally weighted (for example, 1: 1, 1: 1: 1, etc.) to the motion information, or is not equally weighted (for example, 1: 2, 1: 3, 2: 3, 1 :). 1: 2, 1: 2: 3, etc.) may be applied.
- the input value of the process may be limited to one of (1) or (2) or may belong to both (1) and (2).
- the size of the subblock may be m x n, m and n may be an integer of 4, 8, 16 or more and m and n may or may not be the same.
- the size of the sub block may have a fixed value or may be adaptively set based on the size of the target block.
- the size of the subblock may be implicitly determined according to the encoding setting, or explicitly related information may be generated in various units.
- the definition of the encoding setting may be referred to from the various examples described above.
- the above description may be a case where all or part of a skip mode, a merge mode, and a competition mode are applied. For example, it may be applied to a skip mode, a merge mode, a competition mode, or may be applied to a skip mode and a merge mode but not to a competition mode.
- the relevant information may be explicitly generated in units of a sequence, a picture, a slice, a tile group, a tile, and a brick.
- support may be determined based on the encoding setting.
- the encoding setting includes state information such as size, shape, horizontal / vertical length ratio, and position of a reference block (eg, target block), image type, image type, color component, and inter prediction prediction setting (eg, motion information encoding). Mode, whether template matching is supported, whether block matching is supported in the current picture, a motion model support element, etc., etc.).
- the size of the block may be determined by the first threshold size (minimum value) or the second threshold size (maximum value), each threshold size is W, W as the width (W) and height (H) of the block; It may be expressed as H, W x H, W * H.
- W and H may be integers of 4, 8, 16 or more, and W * H may be integers of 16, 32, 64 or more.
- W * H may be integers of 64, 128, 256 or more.
- the range can be defined by either the first threshold size or the second threshold size, or both.
- the threshold size may be fixed or adaptive according to an image (eg, image type).
- the first threshold size may be set based on a size of a minimum coding block, a minimum prediction block, a minimum transform block, and the like
- the second threshold size may be a size of a maximum coding block, a maximum prediction block, a maximum transform block, or the like. It may be set based on.
- motion information of a spatially or temporally adjacent block may be included in the motion information prediction candidate group in the motion information encoding mode.
- the position of the spatially or temporally adjacent block may be the same as or similar to the previous embodiment.
- the candidate group configuration may be determined according to the motion model of the candidate block.
- the motion vector set configuration of the candidate block may be included in the candidate group as it is.
- the motion model of the candidate block when the motion model of the candidate block is a moving motion model, it may be included as one candidate of the motion vector of the control point position based on the relative position of the target block.
- the motion vectors of the upper left control points are based on the motion vectors of the left, upper, and upper left blocks of the reference target block (for example, in the case of a moving motion model).
- the motion vector of the right upper control point is predicted based on the motion vectors of the upper and right upper blocks of the reference block (for example, in the case of a moving motion model), and the motion vector of the lower left control point is predicted from the left of the reference block. It may be predicted based on the motion vector of the lower left block.
- a motion vector set of the block may be included in the candidate group (A).
- the motion model of the candidate block is a motion motion model
- a predetermined control point of the target block is included.
- a motion vector set obtained according to a combination of control points, which is considered as a candidate of a motion vector of, may be included in the candidate group (B).
- the candidate group may be configured using only one of A or B methods, or may be configured in the candidate group using both A and B methods.
- the method A may be configured first and the method B may be configured later, but is not limited thereto.
- the skip mode is described with respect to the merge mode and the contention mode on the assumption that the skip mode is the same as the candidate group configuration of the merge mode, but some elements of the candidate group configuration of the skip mode may not be the same as the merge mode.
- the motion information prediction candidate group (hereinafter, merge mode candidate group) for the merge mode may include k candidates, and k may be an integer of 2, 3, 4, 5, 6, or more.
- the merge mode candidate group may include at least one of a spatial candidate and a temporal candidate.
- the spatial candidate may be derived from at least one of blocks adjacent to the left, top, top left, top right, bottom left directions, etc. with respect to the reference block.
- There may be a priority for forming a candidate group and priority may be set such as left-up-down-left-top-left, top-left-top-right-bottom-left-top, top-left-bottom-left-top-right. For example, it may be set in the order of l3-t3-bl-tr-tl in Curr_Pic of FIG. 16.
- the candidate based on the priority, the availability of each candidate block (e.g., determined based on coding mode, block position, etc.), and the maximum allowable number of spatial candidates (an integer between p. 1 and the number of merge mode candidate groups) All or part of them may be included in the candidate group.
- the candidate group may not be included in the candidate group in the order of tl-tr-bl-t3-l3. If the maximum allowable number is 4 and the availability of the candidate blocks is true, the motion information of tl is If it is not included in the candidate group and the availability of some candidate blocks is false, the motion information of tl may be included in the candidate group.
- the temporal candidate may be derived from at least one of blocks adjacent to the center and left, right, up, down, top, right, left, bottom, and the like with respect to the block corresponding to the reference block.
- There may be a priority for forming a candidate group and priority such as center-left-bottom-right-bottom, left-bottom-center-left can be set. For example, it may be set in the order of c10-br in Col_Pic of FIG. 16.
- All or some of the candidates may be included in the candidate group based on the priority, the availability of each candidate block, and the maximum allowable number of temporal candidates (an integer between q and 1 and the number of merge mode candidate groups). If the maximum allowable number is 1 and the availability of c10 is true, the motion information of c10 may be included in the candidate group, and if the availability of c10 is false, the motion information of br may be included in the candidate group.
- the motion vector of the temporal candidate may be obtained based on the motion vector of the candidate block, and the reference picture of the temporal candidate is obtained based on the reference picture of the candidate block or a predefined reference picture (for example, a reference picture index is 0).
- the priority included in the merge mode candidate group may be set as a spatial candidate-temporal candidate or vice versa, and a priority in which a spatial candidate and a temporal candidate are mixed may be supported. In this example, it is assumed that the case is a spatial candidate-temporal candidate.
- the merge mode candidate group may further include motion information (statistical candidate) or block-based induction candidates (spatial derivation candidate, temporal derivation candidate, spatial and temporal derivation candidate) belonging to the same space and adjacent to each other.
- the statistical candidate and the block-based derivation candidate may be configured after the spatial candidate and the temporal candidate, but are not limited thereto and may have various priorities.
- a candidate group is configured in a statistical candidate-derived candidate order. The reverse may be possible without being limited thereto.
- the derivation candidate in units of blocks may use only one or both of a spatial derivation candidate, a temporal derivation candidate, or a spatial and temporal derivation candidate. In this example, it is assumed that a spatial derivation candidate is used.
- the statistical candidate in this example is motion information of a block far away from the reference block (or a block not closest to the reference block) and may be limited to a block having the same encoding mode as the target block. Further, it may be limited to a block having motion information in block units (when it is not motion information in subblock units).
- n pieces of motion information may be managed in the same manner as in the FIFO, and z pieces of motion information may be included in the merge mode candidate group as statistical candidates.
- z may vary according to a candidate configuration already included in the merge mode candidate group, may be an integer of 0, 1, 2 or more, and may be less than or equal to n.
- the derivation candidate on a block basis may be derived by combining n candidates already included in the merge mode candidate group, and n may be an integer of 2, 3, 4, or more.
- the combination candidate number n may be information that is explicitly generated in units of a sequence, a picture, a slice, a tile group, a tile, a brick, a block, and the like. Alternatively, it may be implicitly determined according to the encoding setting. In this case, the encoding setting may be defined based on one or more factors in the size, shape, position, image type, color component, etc. of the reference block.
- the number of combination candidates may be determined based on the number of candidates not filling the merge mode candidate group.
- the number of candidates not filled in the merge mode candidate group may be a difference value between the number of merge mode candidate groups and the number of candidates already filled. That is, if the merge mode candidate group configuration is already completed, the derivation candidate in units of blocks may not be added. If the merge mode candidate group configuration is not completed, block-derived candidates may be added, but when there are one or less candidate candidates filled in the merge mode candidate group, no block-derived candidates are added.
- a derivation candidate in a block unit may be added based on two candidates.
- a derivation candidate in a block unit is based on three or more candidates. Can be added.
- the n combination candidate positions may be preset positions in a merge mode candidate group.
- an index eg, 0 to ⁇ k-1>
- k means the number of merge mode candidate groups.
- the n combination candidate positions may correspond to index 0 to index n-1 in the merge mode candidate group.
- a derivation candidate in units of blocks may be obtained according to an index combination of (0, 1)-(0, 2)-(1, 2)-(0, 3).
- the n combination candidates may be determined in consideration of the prediction direction of each candidate belonging to the merge mode candidate group. For example, among candidates belonging to the merge mode candidate group, only candidates that are bidirectional prediction may be selectively used, or only candidates that are unidirectional prediction may be selectively used.
- the merge mode candidate group may be completed or may not be completed. If not, the merge mode candidate group configuration may be completed using a zero motion vector.
- subordinate priority motion information overlapping with a candidate already included in the candidate group may not be included in the candidate group.
- An exceptional case including not only this but overlapping motion information may occur.
- the redundancy means that the motion vector, the reference picture, and the prediction direction are the same, but an exceptional configuration that allows a predetermined error range (for example, the motion vector) may be possible.
- a merge mode candidate group may be configured based on correlation between blocks. For example, in case of a spatial candidate, motion information of a candidate block determined to have low correlation with a reference block may be assigned a low priority.
- a priority change that configures the left block as a lower priority may occur. For example, it may be changed in the order of top-bottom left-top right-bottom left-left.
- the priority order for constructing the candidate group of the induction candidate on a block basis is (0, 1)-(0, 2)-(1, 2)-(0, 3). If the candidate corresponding to the index 1 in the candidate group is the motion information (spatial candidate) of the left block, a priority change that constitutes the candidate corresponding to the index 1 as a lower priority may occur. For example, it may be changed in the order of (0, 2)-(0, 3)-(0, 1)-(1, 2).
- an efficient candidate group may be configured, thereby improving encoding performance.
- the motion information prediction candidate group (hereinafter, referred to as a competition mode candidate group) for the competition mode may include k candidates, and k may be an integer of 2, 3, 4, or more.
- the merge mode candidate group may include at least one of a spatial candidate and a temporal candidate.
- the spatial candidate may be derived from at least one of blocks adjacent to the left, top, top left, top right, bottom left directions, etc. with respect to the reference block.
- at least one candidate may be derived from a block adjacent to the left direction (left, lower left block) and a block adjacent to the upper direction (upper left, upper, upper right block).
- the priority of the lower left-left order may be set, and in the region adjacent to the upper direction, the priority of the right-top-up-left order may be set.
- the reference picture of the target block may be configured to derive a spatial candidate only in the same block, and the spatial candidate may be derived through a scaling process (marked with * in the following) based on the reference picture of the target block.
- the order of left-left lower-left * -lower left * or left-left lower-left lower * -left * order can be set, and in an area adjacent to the upper direction, the upper right-upper-upper left-upper right * awards * - * the upper left or upper right-on-top-left-upper-left * the * may * be a priority of the idols order setting.
- the temporal candidate may be derived from at least one of blocks adjacent to the center and left, right, up, down, top, right, left, bottom, and the like with respect to the block corresponding to the reference block.
- There may be a priority for forming a candidate group and priority such as center-left-bottom-right-bottom, left-bottom-center-left can be set. For example, it may be set in the order of c10-br in Col_Pic of FIG. 16.
- the temporal candidates may be included in the candidate group regardless of the candidate group configuration of the spatial candidates.
- All or some of the candidates may be included in the candidate group based on the priority, the availability of each candidate block, and the maximum allowable number of temporal candidates (an integer between q and 1 and the number of candidates for the competition mode).
- the temporal candidate when the maximum allowable number of spatial candidates is set equal to the number of merge mode candidate groups, the temporal candidate may not be included in the candidate group, and when the maximum number of allowable spatial candidates is not filled, the temporal candidate may be included in the candidate group. Can have. This example assumes the latter case.
- the motion vector of the temporal candidate may be obtained based on the motion vector of the candidate block and the distance interval between the current image and the reference image of the target block, and the reference image of the temporal candidate is the distance of the reference image of the current image and the target block.
- the reference picture may be acquired based on an interval or may be obtained based on a reference picture of a temporal candidate or as a predefined reference picture (eg, a reference picture index is 0).
- the competition mode candidate group configuration may be completed using the zero motion vector.
- subordinate priority motion information overlapping with a candidate already included in the candidate group may not be included in the candidate group.
- An exceptional case including not only this but overlapping motion information may occur.
- the redundancy means that the motion vector, the reference picture, and the prediction direction are the same, but an exceptional configuration that allows a predetermined error range (for example, the motion vector) may be possible.
- a competition mode candidate group may be configured based on the correlation between blocks. For example, in the case of the spatial candidate, motion information of the candidate block determined to have low correlation with the reference block may be excluded from the candidate group.
- the block rank are adjacent in the left direction L for the candidate configuration of the spatial candidate - left lower - L * a - the upper left-upper right * - a * - the upper left * Assume order. If it is determined that the upper block has a low correlation with the reference block according to the correlation between the blocks, the candidate for the upper block may be removed from the priority. For example, it may be changed in the order of upper right-upper left-upper right * -upper left * .
- an efficient candidate group may be configured, thereby improving encoding performance.
- the following describes a process of performing inter prediction according to a motion information encoding mode.
- the motion information encoding mode of the target block is derived (1).
- the referenced block is specified according to the derived motion information encoding mode (2).
- a motion information prediction candidate group is formed from motion information obtained based on the specified reference block and motion information encoding mode (3).
- the motion information of the target block is derived from the motion information prediction candidate group (4). Inter-prediction is performed using the motion information of the target block (5).
- flag information about the motion information encoding mode of the target block may be signaled.
- the motion information encoding mode may be determined as one of a skip mode, a merge mode, and a competition mode, and the signaling flag may include one or more pieces of information according to the determined mode.
- additional flag information for selecting one of the detailed categories of the determined mode may be signaled.
- a block to be referred to is specified according to the derived motion information encoding mode.
- the position of the referenced block may be configured differently according to the motion information encoding mode.
- what motion information to derive from the specified reference block may be determined based on the motion information encoding mode, and the derived motion information may be included in the candidate group.
- motion information corresponding to the corresponding index in the candidate group may be derived based on candidate selection information of the target block.
- the motion information configuration derived according to the motion information encoding mode may be determined. For example, in the skip mode or the merge mode, information about a motion vector, a reference picture, and a prediction direction may be derived based on one candidate selection information.
- the contention mode information about a motion vector may be derived based on one candidate selection information, and information about a reference picture and a prediction direction may be derived based on some other flag.
- inter prediction may be performed using motion information of the target block.
- the prediction block may be generated using the motion information obtained through the above process.
- the residual block of the target block may be added to restore the target block.
- the residual component may be derived by performing at least one of inverse quantization or inverse transformation on the residual coefficient signaled from the bitstream.
- difference motion vector that is a difference value between the motion vector of the target block and the predicted motion vector. This may be a description corresponding to a contention mode.
- the difference motion vector (described in terms of the absolute value of the difference motion vector in this example) is assumed that the motion vector precision (in this example, the motion vector precision is determined according to the reference picture interpolation precision). If the motion vector precision, which is an example of encoding a motion vector as it is, is not adaptively determined, this may not be the case).
- the motion vector precision is 1/4 unit
- the motion vector of the target block is (2.5, -4)
- the predicted motion vector is (3.5, -1)
- the differential motion vector is (-1, -3). Can be.
- the x difference component is the codeword and negative sign according to index 4
- the y difference component is the codeword and positive code according to index 12. A sign may be required.
- differential motion vector precision may be supported in addition to motion vector precision.
- the differential motion vector precision may have a precision smaller than or equal to the motion vector precision as a candidate group.
- the differential motion vector can be expressed variously according to the differential motion vector precision.
- the differential motion vector may be (5, 7).
- the x difference component has a codeword according to index 20 and a positive sign.
- the y difference component may require a codeword and a positive sign according to index 28.
- This example may be an example according to fixed differential motion vector precision.
- differential motion vector precision is the same as or different from motion vector precision, i.e. when selecting one of a plurality of precisions.
- it is assumed to be an integer (1) unit.
- the x difference component may require a codeword according to index 5 and a positive sign
- the y difference component may require a codeword according to index 7 and a positive sign.
- the same codeword is assigned to the index order regardless of the precision (for example, the same binarization method for the differential motion vector is provided)
- the y difference component is assigned a long codeword, such as a codeword according to indexes 20 and 28 (assuming that a short bit is assigned in the example with a small index, and a long bit is assigned in the case of a large index).
- a short codeword such as a codeword according to indexes 5 and 7 may be allocated to the x difference component and the y difference component.
- differential motion vector precision is supported for one differential motion vector.
- one differential motion vector precision is supported for the x and y difference components constituting one differential motion vector, it may be as follows.
- the differential motion vector is (5, -1.75) and the adaptive differential motion vector precision (integer (1) unit, 1/4 unit in this example) is supported, the following configuration may be possible.
- the x difference component may require a codeword according to index 5 and a positive sign.
- the y difference component requires a codeword according to index 7 and a negative sign. Can be.
- This example may be an optimal case, and the differential motion vector precision selection information of the x difference component may be determined in integer units, and the differential motion vector precision selection information of the y difference component may be determined in 1/4 units.
- the precision commonly applied to the differential motion vector may be supported, or the precision separately applied to the components of the differential motion vector may be supported, which may be determined according to the encoding setting.
- adaptive differential motion vector precision may be supported when at least one difference component is not zero.
- adaptive differential motion vector precision may be supported when each differential component is not zero.
- the differential motion vector precision may be determined according to the encoding setting, and may be one of integer units and decimal units. It may have one preset differential motion vector precision or one of a plurality of differential motion vector precisions. The former case may be an example determined based on the reference picture interpolation precision.
- differential motion vector precisions e.g., adaptive_mvd_precision_enabled_flag. 0, the preset differential motion vector precision is used; if 1, one of the plurality of differential motion vector precisions is used).
- mvd_precision_flag may be generated. At this time, it can be comprised in the precision candidate group in the precision of 4, 2, 1, 1/2, 1/4, 1/8, 1/16 unit. That is, the number of candidate groups may be an integer of 2, 3, 4, 5, or more.
- the motion vector precision and the differential motion vector precision of the above example are separately described according to the motion information encoding setting.
- the same or similar configuration may be used in that the motion vector precision is fixed or adaptive for the motion information to be encoded. Can be.
- the motion vector to be encoded in the present invention will be described under the assumption that it is composed of differential motion vectors and code information thereof.
- the adaptive differential motion vector precision is not supported, and at least one difference in the competition mode is obtained.
- Adaptive differential motion vector precision setting may be supported when the motion vector is not zero.
- the motion information is stored, as the motion information of the neighboring block is used to encode the motion information of the target block.
- This is described under a setting in which the precision of the motion vector storage unit is determined according to the reference picture interpolation precision. In other words, it is assumed that a representation unit and a storage unit for a motion vector are set differently, and the following example assumes that adaptive differential motion vector precision setting is supported.
- the precision for representing the motion vector (assuming 1/8 unit) and the precision for storing may be the same. If not the same as described above, for the sake of convenience of explanation, but in the present example will be described on the assumption that the same, the content may be extended to the case is not the same.
- the skip mode may store a motion vector according to a preset motion vector storage unit because no difference component occurs. That is, since the precision of the predicted motion vector (since the prediction is performed by the stored motion vector of the neighboring block) is the same as the preset motion vector precision, the predicted motion vector can be viewed as a reconstructed motion vector (as the motion vector of the target block) and stored as it is. have.
- the contention mode may store a motion vector according to a preset motion vector storage unit because a difference component may occur and thus the differential motion vector precision may or may not be the same as a preset motion vector storage unit. That is, since the precision of the prediction motion vector may or may not be the same as that of the differential motion vector, a process of matching the precision of the differential motion vector to the precision of the prediction motion vector may be performed before storing in the memory.
- the motion vector can be stored in the memory through the following process.
- mv_x mvp_x + mvd_x
- mv_y mvp_y + mvd_y
- mv_x mvp_x + (mvd_x ⁇ mvd_shift_x)
- mv_y mvp_y + (mvd_y ⁇ mvd_shift_y)
- mv denotes a reconstruction motion vector
- mvp denotes a predictive motion vector
- mvd denotes a differential motion vector.
- the mvd_shift followed by _x and _y are described for the purpose of distinguishing under the precision setting applied to the differential motion vector component separately, and can be removed and expressed in the precision setting commonly applied to the differential motion vector.
- a reconstructed motion vector may be obtained by adding a predicted motion vector and a differential motion vector.
- the motion estimation and compensation process when the representation unit (precision) and the storage unit of the motion vector are fixed to one precision (for example, are uniformly used in quarter units, are used to adaptively determine only the differential motion vector precision). May be).
- a process of matching precision may be performed before storing the motion vector.
- the motion vector precision and the storing precision may be different, and in this case, the motion vector may be stored in the memory through the following process.
- a motion estimation and compensation process, a representation unit and a storage unit of a motion vector are determined with a plurality of precisions (in this example, the case is set differently according to the motion information encoding mode. Will be described assuming that is used when mixed).
- mv_x mvp_x + (mvd_x ⁇ diff_prec)
- mv_y mvp_y + (mvd_y ⁇ diff_prec)
- mv_x mvp_x + ⁇ (mvd_x ⁇ mvd_shift_x) ⁇ diff_prec ⁇
- mv_y mvp_y + ⁇ (mvd_y ⁇ mvd_shift_y) ⁇ diff_prec ⁇
- mvp refers to motion vector information of the neighboring block stored as the predicted motion vector obtained from the neighboring block
- the mvp is already set to the motion vector storage unit (1/16).
- the accuracy with mvp (1/16 in this example) is performed.
- An adjustment process may remain. That is, a process of matching the precision with the motion vector storage unit (left shift operation by diff_prec in this example) may be performed.
- a differential motion vector precision candidate group may be determined according to interpolation precision (or motion vector precision).
- interpolation precision or motion vector precision
- a differential motion vector that can be generated when the interpolation precision is an integer unit may constitute a candidate group (eg, 1, 2, 4 units) in units of 1 or more integers, and in the case of a decimal unit, a unit of interpolation precision or more Row candidate group (for example, 2, 1, 1/4, 1/8 units. In this example, 1/8 is assumed to be interpolation precision).
- the methods according to the invention can be implemented in the form of program instructions that can be executed by various computer means and recorded on a computer readable medium.
- Computer-readable media may include, alone or in combination with the program instructions, data files, data structures, and the like.
- the program instructions recorded on the computer readable medium may be those specially designed and constructed for the present invention, or may be known and available to those skilled in computer software.
- Examples of computer readable media may include hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like.
- Examples of program instructions may include high-level language code that can be executed by a computer using an interpreter, as well as machine code such as produced by a compiler.
- the hardware device described above may be configured to operate with at least one software module to perform the operations of the present invention, and vice versa.
- the above-described method or apparatus may be implemented by combining all or part of the configuration or function, or may be implemented separately.
- the present invention can be used to encode / decode a video signal.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 대상 블록의 움직임 정보 부호화 모드를 결정하고, 상기 움직임 정보 부호화 모드에 따라 움직임 정보 예측 후보군을 구성하고, 상기 움직임 정보 예측 후보군 중 하나의 후보를 선택하여 상기 대상 블록의 움직임 정보로 유도하고, 상기 대상 블록의 움직임 정보에 기반하여 상기 대상 블록의 화면간 예측을 수행할 수 있다.
Description
본 발명은 영상 부호화 및 복호화 기술에 관한 것으로, 더욱 상세하게는, 화면간 예측에서의 부호화/복호화 방법 및 장치에 관한 것이다.
인터넷과 휴대 단말의 보급과 정보 통신 기술의 발전에 따라 멀티미디어 데이터에 대한 이용이 급증하고 있다. 따라서, 각종 시스템에서 영상 예측을 통해 다양한 서비스나 작업을 수행하기 위하여 영상 처리 시스템의 성능 및 효율 개선에 대한 필요성이 상당히 증가하고 있으나, 이러한 분위기에 호응할 수 있는 연구 개발 결과가 미흡한 실정이다.
이와 같이, 종래 기술의 영상 부호화 복호화 방법 및 장치에서는 영상 처리 특히 영상 부호화 또는 영상 복호화에 대한 성능 개선이 요구되고 있는 실정이다.
본 발명은 화면간 예측 방법을 제공하는 것을 목적으로 한다.
또한, 본 발명은 화면간 예측을 위한 움직임 정보 예측 후보군을 구성하는 방법 및 장치를 제공한다.
또한, 본 발명은 움직임 정보 부호화 모드에 따른 화면간 예측을 수행하는 방법 및 장치를 제공한다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 대상 블록의 움직임 정보 부호화 모드를 결정하고, 상기 움직임 정보 부호화 모드에 따라 움직임 정보 예측 후보군을 구성하고, 상기 움직임 정보 예측 후보군 중 하나의 후보를 선택하여 상기 대상 블록의 움직임 정보로 유도하고, 상기 대상 블록의 움직임 정보에 기반하여 상기 대상 블록의 화면간 예측을 수행할 수 있다.
상기와 같은 본 발명에 따른 화면간 예측을 사용하는 경우 효율적으로 움직임 정보 예측 후보군을 구성하여 대상 블록의 움직임 정보를 표현하는 비트의 절감을 유도할 수 있어 부호화 성능을 향상시킬 수 있다.
도 1은 본 발명의 실시예에 따른 영상 부호화 및 복호화 시스템에 대한 개념도이다.
도 2는 본 발명의 일 실시예에 따른 영상 부호화 장치에 대한 블록 구성도이다.
도 3은 본 발명의 일 실시예에 따른 영상 복호화 장치에 대한 블록 구성도이다.
도 4는 본 발명의 블록 분할부에서 획득할 수 있는 다양한 분할 형태를 나타낸 예시도이다.
도 5는 한 집안의 구성원과 그 혈연관계에 있는 인물들의 유전적 특성을 설명하기 위한 가계도의 일 예를 나타낸다.
도 6은 대상 블록과 수평적인 관계인 상대 블록의 다양한 배치 예를 나타낸다.
도 7은 대상 블록과 수직적인 관계인 상대 블록의 다양한 배치 예를 나타낸다.
도 8은 대상 블록과 수직적인 관계와 수평적인 관계인 상대 블록의 다양한 배치 예를 나타낸다.
도 9는 트리 종류에 따라 획득되는 블록 분할에 관한 예시도이다. 여기서, p 내지 r은 QT, BT, TT의 블록 분할 예시를 나타낸다.
도 10은 QT, BT, TT로 인해 획득되는 분할 분할에 관한 예시도이다.
도 11은 분할 방식, 분할 설정에 기반하여 블록 간의 상관성 확인을 위한 예시 그림이다.
도 12는 화면간 예측을 통해 예측 블록을 획득하는 다양한 경우를 나타내는 예시도이다.
도 13은 본 발명의 일 실시예에 따른 참조 픽쳐 리스트를 구성하는 예시도이다.
도 14는 본 발명의 일 실시예에 따른 이동 외 움직임 모델을 나타내는 개념도이다.
도 15는 본 발명의 일 실시예에 따른 서브 블록 단위의 움직임 추정을 나타내는 예시도이다.
도 16은 본 발명의 일 실시예에 따른 기준 블록에 공간적 또는 시간적으로 인접한 블록의 배치에 관한 예시도이다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 대상 블록의 움직임 정보 부호화 모드를 결정하고, 상기 움직임 정보 부호화 모드에 따라 움직임 정보 예측 후보군을 구성하고, 상기 움직임 정보 예측 후보군 중 하나의 후보를 선택하여 상기 대상 블록의 움직임 정보로 유도하고, 상기 대상 블록의 움직임 정보에 기반하여 상기 대상 블록의 화면간 예측을 수행할 수 있다.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.
제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.
본 발명에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 발명에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 것을 의미한다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.
통상적으로 영상의 컬러 포맷(Color Format)에 따라 하나 이상의 컬러 공간으로 구성될 수 있다. 컬러 포맷에 따라 일정 크기를 갖는 1개 이상의 픽쳐 또는 다른 크기를 갖는 1개 이상의 픽쳐로 구성될 수 있다. 일 예로, YCbCr 컬러 구성에서 4:4:4, 4:2:2, 4:2:0, Monochrome(Y로만 구성) 등의 컬러 포맷이 지원될 수 있다. 일 예로, YCbCr 4:2:0인 경우 1개의 휘도 성분(본 예에서, Y)과 2개의 색차 성분(본 예에서, Cb/Cr)으로 구성될 수 있으며, 이때 색차 성분과 휘도 성분의 구성 비는 가로, 세로 1:2를 가질 수 있다. 일 예로, 4:4:4인 경우 가로, 세로 동일한 구성 비를 가질 수 있다. 상기 예처럼 하나 이상의 컬러 공간으로 구성이 되는 경우 픽쳐는 각 컬러 공간으로의 분할을 수행할 수 있다.
영상은 영상 타입(예를 들어, 픽쳐 타입, 슬라이스 타입, 타일 그룹 타입, 타일 타입, 브릭 타입 등)에 따라 I, P, B 등으로 분류할 수 있는데, I 영상 타입은 참조 픽쳐를 사용하지 않고 자체적으로 부호화되는 영상을 의미할 수 있고, P 영상 타입은 참조 픽쳐를 사용하여 부호화를 하되 전방향 예측만을 허용하는 영상을 의미할 수 있으며, B 영상 타입은 참조 픽쳐를 사용하여 부호화를 하며 전/후방향 예측을 허용하는 영상을 의미할 수 있으나, 부호화 설정에 따라 상기 타입의 일부가 결합(P와 B를 결합)되거나 다른 구성의 영상 타입이 지원될 수도 있다.
본 발명에서 발생하는 다양한 부호화/복호화 정보는 명시적(Explicit) 또는 명시적(Implicit)인 처리가 가능할 수 있다. 여기서 명시적인 처리는 부호화 정보에 관한 복수의 후보군 중 하나의 후보를 가리키는 선택 정보를 시퀀스, 슬라이스, 타일 그룹, 타일, 브릭(Brick), 블록, 서브 블록 등에서 생성하여 이를 비트스트림에 수록할 수 있고, 복호화기에서 부호화기와 동일 수준의 단위에서 관련 정보를 파싱(Parsing)하여 복호화 정보로 복원하는 것으로 이해할 수 있다. 여기서 묵시적인 처리는 부호화/복호화 정보를 부호화기와 복호화기에서 동일한 과정, 규칙 등으로 처리되는 것으로 이해할 수 있다.
도 1은 본 발명의 실시예에 따른 영상 부호화 및 복호화 시스템에 대한 개념도이다.
도 1을 참조하면, 영상 부호화 장치(105) 및 복호화 장치(100)는 개인용 컴퓨터(PC:Personal Computer), 노트북 컴퓨터, 개인 휴대 단말기(PDA: Personal Digital Assistant), 휴대형 멀티미디어 플레이어(PMP: Portable Multimedia Player), 플레이스테이션 포터블(PSP: PlayStation Portable), 무선 통신 단말기(Wireless Communication Terminal), 스마트폰(Smart Phone) 또는 TV 등과 같은 사용자 단말기이거나 응용 서버와 서비스 서버 등 서버 단말기일 수 있으며, 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 부호화 또는 복호화를 위해 인터 또는 인트라 예측하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리(memory, 120, 125) 또는 프로그램을 실행하여 연산 및 제어하기 위한 프로세서(processor, 110, 115) 등을 구비하는 다양한 장치를 포함할 수 있다.
또한, 영상 부호화 장치(105)에 의해 비트스트림으로 부호화된 영상은 실시간 또는 비실시간으로 인터넷, 근거리 무선 통신망, 무선랜망, 와이브로망 또는 이동통신망 등의 유무선 통신망(Network) 등을 통하거나 케이블 또는 범용 직렬 버스(USB: Universal Serial Bus) 등과 같은 다양한 통신 인터페이스를 통해 영상 복호화 장치(100)로 전송되어 영상 복호화 장치(100)에서 복호화되어 영상으로 복원되고 재생될 수 있다. 또한, 영상 부호화 장치(105)에 의해 비트스트림으로 부호화된 영상은 컴퓨터 판독 가능한 기록 매체를 통하여 영상 부호화 장치(105)에서 영상 복호화 장치(100)로 전달될 수 있다.
전술한 영상 부호화 장치와 영상 복호화 장치는 각각 별도의 장치들일 수 있으나, 구현에 따라서 하나의 영상 부호화/복호화 장치로 만들어질 수 있다. 그 경우, 영상 부호화 장치의 일부 구성은 영상 복호화 장치의 일부 구성과 실질적으로 동일한 기술요소로서 적어도 동일한 구조를 포함하거나 적어도 동일한 기능을 수행하도록 구현될 수 있다.
따라서, 이하의 기술요소들과 이들의 작동 원리 등에 대한 상세 설명에서는 대응 기술요소들의 중복되는 설명을 생략하기로 한다. 또한, 영상 복호화 장치는 영상 부호화 장치에서 수행되는 영상 부호화 방법을 복호화에 적용하는 컴퓨팅 장치에 대응하므로, 이하의 설명에서는 영상 부호화 장치를 중심으로 설명하기로 한다.
컴퓨팅 장치는 영상 부호화 방법 및/또는 영상 복호화 방법을 구현하는 프로그램이나 소프트웨어 모듈을 저장하는 메모리와 메모리에 연결되어 프로그램을 수행하는 프로세서를 포함할 수 있다. 여기서, 영상 부호화 장치는 부호화기로, 영상 복호화 장치는 복호화기로 각각 지칭될 수 있다.
도 2는 본 발명의 일 실시예에 따른 영상 부호화 장치에 대한 블록 구성도이다.
도 2를 참조하면, 영상 부호화 장치(20)는 예측부(200), 감산부(205), 변환부(210), 양자화부(215), 역양자화부(220), 역변환부(225), 가산부(230), 필터부(235), 부호화 픽쳐 버퍼(240) 및 엔트로피 부호화부(245)를 포함할 수 있다.
예측부(200)는 소프트웨어 모듈인 예측 모듈(prediction module)을 이용하여 구현될 수 있고, 부호화할 블록에 대하여 화면내 예측 방식(Intra Prediction)이나 화면간 예측 방식(Inter Prediction)으로 예측 블록을 생성할 수 있다. 예측부(200)는 영상에서 현재 부호화하고자 하는 대상 블록(Target Block)을 예측하여 예측 블록을 생성할 수 있다. 다시 말해, 예측부(200)는 영상에서 부호화하고자 하는 대상 블록의 각 화소의 화소값(pixel value)을 화면내 예측 또는 화면간 예측에 따라 예측하여 생성된 각 화소의 예측 화소값(prediced pixel value)를 갖는 예측 블록을 생성할 수 있다. 또한, 예측부(200)는 화면내 예측 모드 또는 화면간 예측 모드와 같은 예측 모드에 대한 정보와 같은 예측 블록을 생성하는데 필요한 정보를 부호화부로 전달하여 부호화부로 하여금 예측 모드에 대한 정보를 부호화하도록 할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 부호화 설정에 따라 정해질 수 있다. 예를 들어, 예측 방법, 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수 있다.
화면내 예측부에서 예측 방향에 따라 사용하는 수평, 수직 모드 등과 같은 방향성 예측 모드와 참조 화소의 평균, 내삽 등 방법을 사용하는 DC, Planar와 같은 비방향성 예측 모드를 가질 수 있다. 방향성 및 비방향성 모드를 통해 화면내 예측 모드 후보군을 구성할 수 있으며, 35개의 예측 모드(방향성 33개 + 비방향성 2개) 또는 67개의 예측 모드(방향성 65개 + 비방향성 2개), 131개의 예측 모드(방향성 129개 + 비방향성 2개) 등과 같은 다양한 후보 중 하나를 후보군으로 사용할 수 있다.
화면내 예측부는 참조 화소 구성부, 참조 화소 필터부, 참조 화소 보간부, 예측 모드 결정부, 예측 블록 생성부, 예측 모드 부호화부를 포함할 수 있다. 참조 화소 구성부는 대상 블록을 중심으로 이웃한 블록에 속하고 대상 블록과 인접한 화소를 화면내 예측을 위한 참조 화소로 구성할 수 있다. 부호화 설정에 따라 최인접한 하나의 참조 화소 라인을 참조 화소로 구성하거나 또는 그 외의 인접한 하나의 참조 화소 라인을 참조 화소로 구성할 수 있고, 복수의 참조 화소 라인을 참조 화소로 구성할 수 있다. 만약 참조 화소의 일부가 이용가능하지 않을 경우 이용가능한 참조 화소를 사용하여 참조 화소를 생성할 수 있고, 전부가 이용가능하지 않을 경우에는 기설정된 값(예를 들어, 비트 심도에 의해 표현되는 화소값 범위의 중앙값 등)을 사용하여 참조 화소를 생성할 수 있다.
화면내 예측부의 참조 화소 필터부는 부호화 과정을 통해 남아있는 열화를 줄여주기 위한 목적으로 참조 화소에 필터링을 수행할 수 있다. 이때, 사용되는 필터는 3-tap 필터 [1/4, 1/2, 1/4], 5-tap 필터 [2/16, 3/16, 6/16, 3/16, 2/16] 등과 같은 저역 통과 필터(Low-pass Filter)일 수 있다. 부호화 정보(예를 들어, 블록의 크기, 형태, 예측 모드 등)에 따라 필터링의 적용 유무, 필터링 종류가 결정될 수 있다.
화면내 예측부의 참조 화소 보간부는 예측 모드에 따라 참조 화소의 선형 보간 과정을 통해 소수 단위의 화소를 생성할 수 있으며, 부호화 정보에 따라 적용되는 보간 필터가 결정될 수 있다. 이때, 사용되는 보간 필터는 4-tap 큐빅(Cubic) 필터, 4-tap 가우시안(Gaussian) 필터, 6-tap 위너(Wiener) 필터, 8-tap 칼만(Kalman) 필터 등이 포함될 수 있다. 저역 통과 필터를 수행하는 과정과 별도로 보간이 수행되는 것이 일반적이지만 두 과정에 적용되는 필터를 하나로 통합하여 필터링 과정을 수행할 수도 있다.
화면내 예측부의 예측 모드 결정부는 부호화 비용을 고려하여 예측 모드 후보군 중 적어도 하나의 최적의 예측 모드를 선정할 수 있으며, 예측 블록 생성부는 해당 예측 모드를 사용하여 예측 블록을 생성할 수 있다. 예측 모드 부호화부에서 상기 최적의 예측 모드를 예측값에 기반하여 부호화할 수 있다. 이때, 예측값이 들어맞는 경우와 들어맞지 않는 경우에 따라 적응적으로 예측 정보를 부호화할 수 있다.
화면내 예측부에서 상기 예측값을 MPM(Most Probable Mode)이라고 하며 예측 모드 후보군에 속하는 전체 모드 중에서 일부 모드를 MPM 후보군으로 구성할 수 있다. MPM 후보군에는 기설정된 예측 모드(예를 들어, DC, Planar, 수직, 수평, 대각선 모드 등) 또는 공간적으로 인접한 블록(예를 들어, 좌, 상, 좌상, 우상, 좌하 블록 등)의 예측 모드 등이 포함될 수 있다. 또한, MPM 후보군에 기 포함된 모드로부터 유도되는 모드(방향성 모드의 경우 +1, -1 등의 차이)를 MPM 후보군으로 구성할 수 있다.
MPM 후보군 구성을 위한 예측 모드의 우선 순위가 존재할 수 있다. 상기 우선 순위에 따라 MPM 후보군에 포함되는 순서가 정해질 수 있으며, 상기 우선 순위에 따라 MPM 후보군의 개수(예측 모드 후보군 개수에 따라 정해짐)만큼 채워지면 MPM 후보군 구성을 완료할 수 있다. 이때, 공간적으로 인접한 블록의 예측 모드, 기설정된 예측 모드, MPM 후보군에 먼저 포함된 예측 모드로부터 유도되는 모드 순서로 우선 순위가 정해질 수 있으나, 그 외의 변형 또한 가능하다.
예를 들어, 공간적으로 인접한 블록 중에서는 좌 - 상 - 좌하 - 우상 - 좌상 블록 등의 순서로 후보군에 포함할 수 있고, 기설정된 예측 모드 중에서는 DC - Planar - 수직 - 수평 모드 등의 순서로 후보군에 포함할 수 있고, 기 포함된 모드에서 +1, -1 등을 가산하여 획득된 모드를 후보군에 포함하여 총 6개의 모드를 후보군으로 구성할 수 있다. 또는, 좌 - 상 - DC - Planar - 좌하 - 우상 - 좌상 - (좌+1) - (좌-1) - (상+1) 등의 하나의 우선 순위로 후보군에 포함하여 총 7개의 모드를 후보군으로 구성할 수 있다.
감산부(205)는 대상 블록에서 예측 블록을 감산하여 잔차 블록(residual block)을 생성할 수 있다. 다시 말해, 감산부(205)는 부호화하고자 하는 대상 블록의 각 화소의 화소값과 예측부를 통해 생성된 예측 블록의 각 화소의 예측 화소값의 차이를 계산하여 블록 형태의 잔차 신호(residual signal)인 잔차 블록을 생성할 수 있다. 또한, 감산부(205)는 후술하는 블록 분할부를 통해 획득된 블록 단위 이외의 단위에 따라 잔차 블록을 생성할 수도 있다.
변환부(210)는 공간 영역에 속하는 신호를 주파수 영역에 속하는 신호로 변환할 수 있으며, 변환 과정을 거쳐 획득되는 신호를 변환 계수(Transformed Coeffcient)라고 한다. 예를 들어, 감산부로부터 전달받은 잔차 신호를 갖는 잔차 블록을 변환하여 변환 계수를 갖는 변환 블록을 획득할 수 있는데, 입력 받은 신호는 부호화 설정에 따라 결정되며 이는 잔차 신호에 한정되지 않는다.
변환부는 잔차 블록을 하다마드 변환(Hadamard Transform), 이산 사인 변환(DST Based-Transform: Discrete Sine Transform), 이산 코사인 변환(DCT Based-Transform: Discrete Cosine Transform) 등과 같은 변환 기법을 사용하여 변환할 수 있으며, 이에 한정되지 않고 이를 개량 및 변형한 다양한 변환 기법이 사용될 수 있다.
상기 변환 기법 중 적어도 하나의 변환 기법이 지원될 수 있으며, 각 변환 기법에서 적어도 하나의 세부 변환 기법이 지원될 수 있다. 이때, 상기 세부 변한 기법은 각 변환 기법에서 기저 벡터의 일부가 달리 구성되는 변환 기법일 수 있다.
예를 들어, DCT의 경우 DCT-1 내지 DCT-8 중 하나 이상의 세부 변환 기법이 지원될 수 있고, DST의 경우 DST-1 내지 DST-8 중 하나 이상의 세부 변환 기법이 지원될 수 있다. 상기 세부 변환 기법의 일부를 구성하여 변환 기법 후보군을 구성할 수 있다. 일 예로, DCT-2, DCT-8, DST-7를 변환 기법 후보군으로 구성하여 변환을 수행할 수 있다.
변환은 수평/수직 방향으로 수행될 수 있다. 예를 들어, DCT-2의 변환 기법을 사용하여 수평 방향으로 1차원 변환을 수행하고, DST-7의 변환 기법을 사용하여 수직 방향으로 1차원 변환을 수행하여 총 2차원 변환을 수행함으로써 공간 영역의 화소값을 주파수 영역으로 변환할 수 있다.
고정적인 하나의 변환 기법을 사용하여 변환을 수행할 수 있거나 부호화 설정에 따라 변환 기법을 적응적으로 선택하여 변환을 수행할 수 있다. 이때, 적응적인 경우에는 명시적 또는 묵시적인 방법을 사용하여 변환 기법을 선택할 수 있다. 명시적인 경우에는 수평, 수직 방향에 적용되는 각각의 변환 기법 선택 정보 또는 변환 기법 세트 선택 정보가 블록 등의 단위에서 발생할 수 있다. 묵시적인 경우는 영상 타입(I/P/B), 컬러 성분, 블록의 크기/형태/위치, 화면내 예측 모드 등에 따라 부호화 설정이 정의될 수 있으며, 이에 따라 소정의 변환 기법이 선택될 수 있다.
또한, 부호화 설정에 따라 상기 일부 변환이 생략되는 경우가 가능할 수 있다. 즉, 명시적 또는 묵시적으로 수평/수직 단위 중 하나 이상을 생략할 수 있음을 의미한다.
또한, 변환부는 변환 블록을 생성하는데 필요한 정보를 부호화부로 전달하여 이를 부호화하도록 할 수 있고, 그에 따른 정보를 비트스트림에 수록하여 이를 복호화기에 전송하고, 복호화기의 복호화부는 이에 대한 정보를 파싱하여 역변환 과정에 사용할 수 있다.
양자화부(215)는 입력 받은 신호를 양자화할 수 있으며, 이때 양자화 과정을 거쳐 획득되는 신호를 양자화 계수(Quantized Coefficient)라고 한다. 예를 들어, 변환부로부터 전달받은 잔차 변환 계수를 갖는 잔차 블록을 양자화하여 양자화 계수를 갖는 양자화 블록을 획득할 수 있는데, 입력 받은 신호는 부호화 설정에 따라 결정되며 이는 잔차 변환 계수에 한정되지 않는다.
양자화부는 변환된 잔차 블록을 데드존 균일 경계 양자화(Dead Zone Uniform Threshold Quantization), 양자화 가중치 매트릭스(Quantization Weighted Matrix) 등과 같은 양자화 기법을 사용하여 양자화할 수 있으며, 이에 한정되지 않고 이를 개량 및 변형한 다양한 양자화 기법이 사용될 수 있다.
부호화 설정에 따라 양자화 과정은 생략할 수 있다. 예를 들어, 부호화 설정(예를 들어, 양자화 파라미터가 0. 즉, 무손실 압축 환경)에 따라 양자화 과정을 생략(역과정도 포함)할 수 있다. 다른 예로, 영상의 특성에 따라 양자화를 통한 압축 성능이 발휘되지 않는 경우에는 양자화 과정을 생략할 수 있다. 이때, 양자화 블록(M x N) 중 양자화 과정이 생략되는 영역은 전체 영역이거나 또는 일부 영역(M/2 x N/2, M x N/2, M/2 x N 등)일 수 있으며, 양자화 생략 선택 정보는 묵시적 또는 명시적으로 정해질 수 있다.
양자화부는 양자화 블록을 생성하는데 필요한 정보를 부호화부로 전달하여 이를 부호화하도록 할 수 있고, 그에 따른 정보를 비트스트림에 수록하여 이를 복호화기에 전송하고, 복호화기의 복호화부는 이에 대한 정보를 파싱하여 이를 역양자화 과정에 사용할 수 있다.
상기 예에서는 변환부와 양자화부를 통해 잔차 블록을 변환하고 양자화하는 가정 하에 설명하였지만, 잔차 블록을 잔차 신호를 변환하여 변환 계수를 갖는 잔차 블록을 생성하고 양자화 과정을 수행하지 않을 수 있으며, 잔차 블록의 잔차 신호를 변환 계수로 변환하지 않고 양자화 과정만을 수행할 수 있을 뿐만 아니라, 변환과 양자화 과정 모두 수행하지 않을 수 있다. 이는 부호화기 설정에 따라 결정될 수 있다.
역양자화부(220)는 양자화부(215)에 의해 양자화된 잔차 블록을 역 양자화한다. 즉, 역양자화부(220)는 양자화 주파수 계수열을 역양자화하여 주파수 계수를 갖는 잔차 블록을 생성한다.
역변환부(225)는 역양자화부(220)에 의해 역양자화된 잔차 블록을 역변환한다. 즉, 역변환부(225)는 역양자화된 잔차 블록의 주파수 계수들을 역변환하여 화소값을 갖는 잔차 블록, 즉 복원된 잔차 블록을 생성한다. 여기서, 역변환부(225)는 변환부(210)에서 사용한 변환한 방식을 역으로 사용하여 역변환을 수행할 수 있다.
가산부(230)는 예측부(200)에서 예측된 예측 블록과 역변환부(225)에 의해 복원된 잔차 블록을 가산하여 대상 블록을 복원한다. 복원된 대상 블록은 부호화 픽쳐 버퍼(240)에 참조 픽쳐(또는 참조 블록)로서 저장되어 대상 블록의 다음 블록이나 향후 다른 블록, 다른 픽쳐를 부호화할 때 참조 픽쳐로서 사용될 수 있다.
필터부(235)는 디블록킹 필터, SAO(Sample Adaptive Offset), ALF(Adaptive Loop Filter) 등의 하나 이상의 후처리 필터 과정을 포함할 수 있다. 디블록킹 필터는 복원된 픽쳐에서 블록 간의 경계에 생긴 블록 왜곡을 제거할 수 있다. ALF는 디블록킹 필터를 통해 블록이 필터링된 후 복원된 영상과 원래의 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. SAO는 디블록킹 필터가 적용된 잔차 블록에 대하여, 화소 단위로 원본 영상과의 오프셋 차이를 복원할 수 있다. 이와 같은 후처리 필터는 복원된 픽쳐 또는 블록에 적용될 수 있다.
부호화 픽쳐 버퍼(240)는 필터부(235)를 통해 복원된 블록 또는 픽쳐를 저장할 수 있다. 부호화 픽쳐 버퍼(240)에 저장된 복원 블록 또는 픽쳐는 화면내 예측 또는 화면간 예측을 수행하는 예측부(200)에 제공될 수 있다.
엔트로피 부호화부(245)는 생성된 양자화 주파수 계수열을 다양한 스캔 방식에 따라 스캔하여 양자화 계수열을 생성하고, 이를 엔트로피 부호화 기법 등을 이용하여 부호화 함으로써 출력한다. 스캔 패턴은 지그재그, 대각선, 래스터(raster) 등 다양한 패턴들 중 하나로 설정할 수 있다. 또한, 각 구성부로부터 전달되는 부호화 정보를 포함하는 부호화 데이터를 생성하여 비트스트림으로 출력할 수 있다.
도 3은 본 발명의 일 실시예에 따른 영상 복호화 장치에 대한 블록 구성도이다.
도 3을 참조하면, 영상 복호화 장치(30)는 엔트로피 복호화부(305), 예측부(310), 역양자화부(315), 역변환부(320), 가감산기(325), 필터(330) 및 복호화 픽쳐 버퍼(335)를 포함하여 구성될 수 있다.
또한, 예측부(310)는 다시 화면내 예측 모듈 및 화면간 예측 모듈을 포함하여 구성될 수 있다.
먼저, 영상 부호화 장치(20)로부터 전달된 영상 비트스트림이 수신되면, 엔트로피 복호화부(305)로 전달될 수 있다.
엔트로피 복호화부(305)는 비트스트림을 복호화하여 양자화된 계수들과 각 구성부로 전달되는 복호화 정보를 포함하는 복호화 데이터를 복호화할 수 있다.
예측부(310)는 엔트로피 복호화부(305)로부터 전달된 데이터들에 기초하여 예측 블록을 생성할 수 있다. 이때, 복호화된 픽쳐 버퍼(335)에 저장된 참조 영상에 기초하여, 디폴트(default) 구성 기법을 이용한 참조 픽쳐 리스트를 구성할 수도 있다.
화면내 예측부는 참조 화소 구성부, 참조 화소 필터부, 참조 화소 보간부, 예측 블록 생성부, 예측 모드 복호화부를 포함할 수 있고, 일부는 부호화기와 동일한 과정을 수행하고 일부는 역으로 유도하는 과정을 수행할 수 있다.
역양자화부(315)는 비트스트림으로 제공되어 엔트로피 복호화부(305)에 의해 복호화된 양자화된 변환 계수들을 역양자화할 수 있다.
역변환부(320)는 역 DCT, 역 정수 변환 또는 그와 유사한 개념의 역변환 기법들을 변환 계수에 적용하여 잔차 블록을 생성할 수 있다.
이때, 역양자화부(315), 역변환부(320)는 앞서 설명한 영상 부호화 장치(20)의 변환부(210) 및 양자화부(215)에서 수행한 과정을 역으로 수행하며 다양한 방법으로 구현될 수 있다. 예를 들어, 변환부(210) 및 양자화부(215)와 공유하는 동일한 과정 및 역변환을 사용할 수도 있고, 영상 부호화 장치(20)로부터 변환 및 양자화 과정에 관한 정보(예를 들면, 변환 크기, 변환 모양, 양자화 타입 등)를 이용하여 변환 및 양자화 과정을 역으로 수행할 수 있다.
역양자화 및 역변환 과정을 거친 잔차 블록은 예측부(310)에 의해 도출된 예측 블록과 가산되어 복원된 영상 블록이 생성될 수 있다. 이러한 가산은 가감산기(325)에 의해 이루어 질 수 있다.
필터(330)는 복원된 영상 블록에 대하여, 필요에 따라 블록킹(blocking) 현상을 제거하기 위하여 디블록킹 필터를 적용할 수도 있고, 상기 복호화 과정 전 후에 다른 루프 필터들을 비디오 품질을 향상시키기 위해 추가로 사용할 수도 있다.
복원 및 필터를 거친 영상 블록은 복호화 픽쳐 버퍼(335)에 저장될 수 있다.
도면에 도시하지 않았지만 영상 부호화/복호화 장치에 블록 분할부를 더 포함할 수 있다.
블록 분할부를 통해 다양한 단위과 크기의 블록으로 분할할 수 있다. 기본 부호화 단위(또는 최대 부호화 단위. Coding Tree Unit. CTU)는 영상 부호화 과정에서 예측, 변환, 양자화 등에 대한 기본(또는 시작) 단위를 의미할 수 있다. 이때, 기본 부호화 단위는 컬러 포맷(본 예에서 YCbCr)에 따라 하나의 휘도 기본 부호화 블록(또는, 최대 부호화 블록. Coding Tree Block. CTB)과 두 개의 기본 색차 부호화 블록으로 구성될 수 있으며, 컬러 포맷에 따라 각 블록의 크기가 정해질 수 있다. 그리고 분할 과정에 따라 부호화 블록(Coding Block. CB)이 획득될 수 있다. 부호화 블록은 일정한 제한에 따라 더 이상의 부호화 블록으로 분할되지 않은 단위로 이해할 수 있으며, 하위 단위로의 분할의 시작 단위로 설정될 수 있다. 본 발명에서 블록은 사각형 형태에만 제한하지 않고 삼각형, 원형 등의 다양한 형태를 포함하는 넓은 개념으로 이해할 수 있다.
후술하는 내용은 하나의 컬러 성분을 대상으로 하지만 컬러 포맷에 따른 비율(예를 들어, YCbCr 4:2:0의 경우 휘도 성분과 색차 성분의 가로 및 세로 길이 비율은 2:1)에 비례하여 다른 컬러 성분에 변경 적용될 수 있음을 이해하여야 한다. 또한, 다른 컬러 성분에 의존적인 블록 분할(예를 들어, Cb/Cr에서 Y의 블록 분할 결과에 의존적인 경우)이 가능할 수 있지만, 각 컬러 성분에 독립적인 블록 분할이 가능할 수 있음을 이해하여야 한다. 또한, 공통되는 하나의 블록 분할 설정(길이 비율에 비례하는 것은 고려)을 사용할 수 있지만, 컬러 성분에 따라 개별적인 블록 분할 설정이 사용되는 것 또한 고려하여 이해할 필요가 있다.
블록 분할부에서 블록은 M × N으로 표현될 수 있으며, 각 블록의 최대값과 최소값이 범위 내에서 획득될 수 있다. 예를 들어, 블록의 최대값을 256×256, 최소값을 4×4로 정할 경우, 2m×2n 크기의 블록(본 예에서 m과 n은 2부터 8까지의 정수) 또는 2m × 2m 크기의 블록(본 예에서 m과 n은 2부터 128까지의 정수) 또는 m × m 크기의 블록(본 예에서 m과 n은 4부터 256까지의 정수)을 획득할 수 있다. 여기서, m과 n은 동일하거나 동일하지 않을 수 있으며, 상기 최대값과 최소값 등의 블록이 지원되는 범위는 하나 이상 발생할 수 있다.
예를 들어, 블록의 최대 크기 및 최소 크기 등에 관한 정보가 발생할 수 있고, 일부 분할 설정에서의 블록의 최대 크기 및 최소 크기 등에 관한 정보가 발생할 수 있다. 여기서 전자의 경우 영상 내에서 발생 가능한 최대 및 최소 크기에 대한 범위 정보일 수 있고, 후자의 경우 일부 분할 설정에 따라 발생 가능한 최대 및 최소 크기에 대한 정보일 수 있다. 여기서 상기 분할 설정은 영상 타입(I/P/B), 컬러 성분(YCbCr 등), 블록 종류(부호화/예측/변환/양자화 등), 분할 종류(Index or Type), 분할 방식(Tree 방식에서 QT, BT, TT 등, Index 방식에서 SI2, SI3, SI4 등) 등에 의해 정의될 수 있다.
또한, 블록이 가질 수 있는 가로/세로 길이 비율(블록의 형태)에 대한 제한이 존재할 수 있으며, 이에 대한 경계값 조건이 설정될 수 있다. 이때, 임의의 경계값(k) 이하/미만의 블록만 지원될 수 있으며, k는 A/B(A는 가로, 세로 중 길거나 같은 값, B는 그 나머지 값)와 같은 가로와 세로의 길이 비율에 따라 정의될 수 있고, 1.5, 2, 3, 4 등과 같은 1 이상의 실수일 수 있다. 상기 예에서와 같이 영상에서의 하나의 블록의 형태에 관한 제한 조건이 지원되거나 또는 분할 설정에 따라 하나 이상의 제한 조건이 지원될 수 있다.
정리하면, 상기 설명과 같은 범위 및 조건과 후술하는 분할 설정 등에 의해 블록 분할의 지원 여부가 정해질 수 있다. 예를 들어, 블록(부모 블록)의 분할에 따른 후보(자식 블록)가 지원되는 블록 조건에 만족할 경우 해당 분할은 지원될 수 있고, 만족하지 않을 경우 해당 분할은 지원되지 않을 수 있다.
블록 분할부는 영상 부호화 장치 및 복호화 장치의 각 구성부에 관계되어 설정될 수 있으며, 이 과정을 통해 블록의 크기와 형태가 정해질 수 있다. 이때, 설정되는 블록은 구성부에 따라 달리 정의될 수 있으며, 예측부의 경우 예측 블록(Prediction Block), 변환부의 경우 변환 블록(Transform Block), 양자화부의 경우 양자화 블록(Quantization Block) 등이 이에 해당할 수 있다. 다만, 이에 한정되지 않고 다른 구성부에 따른 블록 단위가 추가로 정의될 수 있다. 본 발명에서는 각 구성부에서 입력과 출력이 직사각형 형태인 경우를 중심으로 설명하지만, 일부 구성부에서는 다른 형태(예를 들어, 직각 삼각형 등)의 입/출력이 가능할 수도 있다.
블록 분할부의 초기(또는 시작) 블록의 크기 및 형태는 상위 단위로부터 결정될 수 있다. 상기 초기 블록은 더 작은 크기의 블록으로 분할될 수 있으며, 블록의 분할에 따른 최적의 크기 및 형태가 결정되면 그 블록은 하위 단위의 초기 블록으로 결정될 수 있다. 여기서, 상위 단위는 부호화 블록, 하위 단위는 예측 블록 또는 변환 블록일 수 있으나, 이에 한정되지 않으며 다양한 변형의 예가 가능할 수 있다. 상기 예와 같이 하위 단위의 초기 블록이 정해지면 상위 단위와 같이 최적의 크기 및 형태의 블록을 찾기 위한 분할 과정이 수행될 수 있다.
정리하면, 블록 분할부는 기본 부호화 블록(또는 최대 부호화 블록)을 적어도 하나의 부호화 블록으로 분할을 수행할 수 있고, 부호화 블록은 적어도 하나의 예측 블록/변환 블록/양자화 블록으로 분할을 수행할 수 있다. 또한, 예측 블록은 적어도 하나의 변환 블록/양자화 블록으로 분할을 수행할 수 있고, 변환 블록은 적어도 하나의 양자화 블록으로 분할을 수행할 수 있다. 여기서, 일부 블록은 다른 블록과 종속적인 관계(즉, 상위 단위와 하위 단위에 의해 정의)일 수 있거나 독립적인 관계를 가질 수 있다. 일 예로, 예측 블록은 변환 블록의 상위 단위일 수 있거나 또는 변환 블록과 독립적인 단위일 수 있으며, 블록의 종류에 따라 다양한 관계 설정이 가능할 수도 있다.
부호화 설정에 따라 상위 단위와 하위 단위의 결합 여부가 정해질 수 있다. 여기서 단위 간의 결합은 상위 단위에서 하위 단위로의 분할을 수행하지 않고, 상위 단위의 블록(크기 및 형태)으로 하위 단위의 부호화 과정(예를 들어, 예측부, 변환부, 역변환부 등)을 수행함을 의미한다. 즉, 복수의 단위에서의 분할 과정이 공유되고 분할 정보는 그 중 하나의 단위(예를 들어, 상위 단위)에서 발생함을 의미할 수 있다.
일 예로, (부호화 블록이 예측 블록, 변환 블록과 결합될 경우) 부호화 블록에서 예측 과정, 변환 및 역변환 과정을 수행할 수 있다.
일 예로, (부호화 블록이 예측 블록과 결합될 경우) 부호화 블록에서 예측 과정을 수행할 수 있고, 부호화 블록과 동일하거나 더 작은 변환 블록에서 변환 및 역변환 과정을 수행할 수 있다.
일 예로, (부호화 블록이 변환 블록과 결합될 경우) 부호화 블록과 동일하거나 더 작은 예측 블록에서 예측 과정을 수행할 수 있고, 부호화 블록에서 변환 및 역변환 과정을 수행할 수 있다.
일 예로, (예측 블록이 변환 블록과 결합된 경우) 부호화 블록과 동일하거나 더 작은 예측 블록에서 예측 과정을 수행할 수 있고, 예측 블록에서 변환 및 역변환 과정을 수행할 수 있다.
일 예로, (어떤 블록에서도 결합되지 않은 경우) 부호화 블록과 동일하거나 더 작은 예측 블록에서 예측 과정을, 부호화 블록과 동일하거나 더 작은 변환 블록에서 변환 및 역변환 과정을 수행할 수 있다.
상기 예에서 부호화, 예측, 변환 블록에 관한 다양한 경우를 설명하였으나, 이에 한정하지 않는다.
상기 단위 간의 결합은 영상에서 고정적인 설정이 지원될 수 있거나 또는 다양한 부호화 요소를 고려하여 적응적인 설정이 지원될 수 있다. 여기서 상기 부호화 요소는 영상 타입, 컬러 성분, 부호화 모드(Intra/Inter), 분할 설정, 블록의 크기/형태/위치, 가로/세로의 길이 비, 예측 관련 정보(예를 들어, 화면내 예측 모드, 화면간 예측 모드 등), 변환 관련 정보(예를 들어, 변환 기법 선택 정보 등), 양자화 관련 정보(예를 들어, 양자화 영역 선택 정보, 양자화된 변환 계수 부호화 정보 등) 등을 포함할 수 있다.
상술한 바와 같이 최적의 크기 및 형태의 블록을 찾은 경우, 이에 대한 모드 정보(예를 들어, 분할 정보 등)가 생성될 수 있다. 모드 정보는 블록이 속하는 구성부에서 발생하는 정보(예를 들어, 예측 관련 정보 및 변환 관련 정보 등)과 함께 비트스트림에 수록되어 복호화기로 전송될 수 있고, 복호화기에서 동일 수준의 단위로 파싱되어 영상 복호화 과정에서 사용될 수 있다.
이하에서는 분할 방식에 대한 설명할 것이며, 설명의 편의를 위해 초기 블록이 정사각 형태인 것을 가정하지만, 초기 블록이 직사각 형태인 경우에도 동일하거나 유사하게 적용할 수 있으므로, 이에 한정되는 것은 아니다.
블록 분할부는 다양한 종류의 분할을 지원할 수 있다. 예를 들어, 트리 기반의 분할 또는 인덱스 기반의 분할을 지원할 수 있고, 그 외의 방법이 지원될 수 있다. 트리 기반의 분할은 다양한 종류의 정보(예를 들어, 분할 여부, 트리 종류, 분할 방향 등)로 분할 형태를 결정할 수 있고, 인덱스 기반의 분할은 소정의 인덱스 정보로 분할 형태를 결정할 수 있다.
도 4는 본 발명의 블록 분할부에서 획득할 수 있는 다양한 분할 형태를 나타낸 예시도이다. 본 예에서는 한 번의 분할 수행(또는 과정)을 통해 도 4와 같은 분할 형태를 획득하는 경우를 가정하지만, 이에 한정되지 않고 복수의 분할 동작을 통해 획득되는 경우 또한 가능할 수 있다. 또한, 도 4에 도시되지 않은 추가적인 분할 형태가 가능할 수 있다.
(트리 기반의 분할)
본 발명의 트리 기반의 분할에서 쿼드 트리(Quad Tree. QT), 바이너리 트리(Binary Tree. BT), 터너리 트리(Ternary Tree. TT) 등이 지원될 수 있다. 하나의 트리 방식이 지원되는 경우는 단일 트리 분할, 둘 이상의 트리 방식이 지원되는 경우는 다중 트리 분할이라 지칭할 수 있다.
QT의 경우 블록이 수평와 수직 방향으로 각각 2분할(즉, 4분할)되는 방식(n)을 의미하고, BT의 경우 블록이 수평 또는 수직 중 한 방향으로 2분할되는 방식(b 내지 g)을 의미하고, TT의 경우 블록이 수평 또는 수직 중 한 방향으로 3분할되는 방식(h 내지 m)을 의미한다.
여기서, QT의 경우 분할 방향을 수평과 수직 중 하나에 한정하여 4분할하는 방식(o, p)을 지원할 수도 있다. 또한, BT의 경우 균등한 크기를 갖는 방식(b, c)만 지원하거나 또는 비균등 크기를 갖는 방식(d 내지 g)만 지원하거나 또는 두 방식을 혼합 지원할 수 있다. 또한, TT의 경우 분할이 특정 방향에 치우치는 배치(좌 -> 우 또는 상 -> 하 방향으로 1:1:2, 2:1:1 등)를 갖는 방식(h, j, k, m)만 지원하거나 또는 중앙에 배치(1:2:1 등)되는 방식(i, l)만 지원하거나 또는 두 방식을 혼합 지원할 수 있다. 또한, 분할 방향을 수평과 수직 방향으로 각각 4분할(즉, 16분할)되는 방식(q) 또한 지원할 수 있다.
그리고 상기 트리 방식 중 수평 분할 방향에 한정하여 z분할하는 방식(b, d, e, h, i, j, o)을 지원하거나 또는 수직 분할 방향에 한정하여 z 분할하는 방식(c, f, g, k, l, m, p)을 지원하거나 또는 두 방식을 혼합 지원할 수 있다. 여기서, z는 2, 3, 4와 같은 2 이상 정수일 수 있다.
본 발명에서 QT는 n, BT는 b와 c, TT는 i와 l을 지원하는 경우를 가정하여 설명한다.
부호화 설정에 따라 상기 트리 분할 중 하나 이상의 방식이 지원될 수 있다. 예를 들어, QT를 지원할 수 있거나 QT/BT를 지원할 수 있거나 QT/BT/TT를 지원할 수 있다.
상기 예는 기본 트리 분할이 QT이며 기타 트리 지원 여부에 따라 BT와 TT가 추가 분할 방식에 포함되는 경우에 대한 예이지만, 다양한 변형이 가능할 수 있다. 이때, 기타 트리 지원 여부에 대한 정보(bt_enabled_flag, tt_enabled_flag, bt_tt_enabled_flag 등. 0 또는 1의 값을 가질 수 있고, 0이면 지원하지 않고 1이면 지원)는 부호화 설정에 따라 묵시적으로 정해지거나 또는 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭 등의 단위로 명시적으로 결정될 수 있다.
분할 정보는 분할 여부에 대한 정보(tree_part_flag. 또는, qt_part_flag, bt_part_flag, tt_part_flag, bt_tt_part_flag. 0 또는 1의 값을 가질 수 있고, 0이면 분할되지 않고 1이면 분할)가 포함될 수 있다. 또한, 분할 방식(BT와 TT)에 따라 분할 방향(dir_part_flag. 또는, bt_dir_part_flag, tt_dir_part_flag, bt_tt_dir_part_flag. 0 또는 1의 값을 가질 수 있고, 0이면 <가로/수평>이고 1이면 <세로/수직>)에 대한 정보가 추가될 수 있으며, 이는 분할이 수행되는 경우에 발생 가능한 정보일 수 있다.
복수의 트리 분할이 지원되는 경우에는 다양한 분할 정보 구성이 가능할 수 있다. 다음은 하나의 깊이(Depth) 수준(즉, 지원되는 분할 깊이가 하나 이상으로 설정되어 재귀적인 분할이 가능할 수도 있지만 설명의 편의를 위한 목적)에서 분할 정보가 어떻게 구성되어 있는지에 대한 예로 가정하여 설명한다.
일 예(1)로, 분할 여부에 대한 정보를 확인한다. 이때, 분할이 수행되지 않는 경우라면 분할이 종료된다.
만약 분할이 수행되는 경우라면 분할 종류에 대한 선택 정보(예를 들어, tree_idx. 0이면 QT, 1이면 BT, 2이면 TT)를 확인한다. 이때, 선택되는 분할 종류에 따라 분할 방향 정보를 추가로 확인하고 다음 단계(분할 깊이가 최대에 도달하지 않은 경우 등의 이유로 추가 분할이 가능하다면 다시 처음부터 시작하고, 분할이 불가한 경우라면 분할 종료)로 넘어간다.
일 예(2)로, 일부 트리 방식(QT)에 대한 분할 여부에 대한 정보를 확인하고 다음 단계로 넘어간다. 이때, 분할이 수행되지 않는 경우라면 일부 트리 방식(BT)의 분할 여부에 대한 정보를 확인한다. 이때, 분할이 수행되지 않는 경우라면 일부 트리 방식(TT)의 분할 여부에 대한 정보를 확인한다. 이때, 분할이 수행되지 않는 경우라면 분할이 종료된다.
만약 일부 트리 방식(QT)의 분할이 수행되는 경우라면 다음 단계로 넘어간다. 또한, 만약 일부 트리 방식(BT)의 분할이 수행되는 경우라면 분할 방향 정보를 확인하고 다음 단계로 넘어간다. 또한, 만약 일부 트리 분할 방식(TT)의 분할이 수행되는 경우라면 분할 방향 정보를 확인하고 다음 단계로 넘어간다.
일 예(3)로, 일부 트리 방식(QT)에 대한 분할 여부에 대한 정보를 확인한다. 이때, 분할이 수행되지 않는 경우라면 일부 트리 방식(BT와 TT)의 분할 여부에 대한 정보를 확인한다. 이때, 분할이 수행되지 않는 경우라면 분할이 종료된다.
만약 일부 트리 방식(QT)의 분할이 수행되는 경우라면 다음 단계로 넘어간다. 또한, 만약 일부 트리 방식(BT와 TT)의 분할이 수행되는 경우라면 분할 방향 정보를 확인하고 다음 단계로 넘어간다.
상기 예는 트리 분할의 우선 순위가 존재(2번과 3번 예)하거나 존재하지 않는 경우(1번 예)일 수 있으나, 다양한 변형의 예가 가능할 수 있다. 또한, 상기 예에서 현재 단계의 분할은 이전 단계의 분할 결과와는 무관한 경우를 설명하는 예이지만, 현재 단계의 분할이 이전 단계의 분할 결과에 의존적인 설정 또한 가능할 수 있다.
예를 들어, 1 내지 3번 예의 경우 이전 단계에서 일부 트리 방식의 분할(QT)이 수행되어 현재 단계로 넘어온 경우라면 현재 단계에서도 동일 트리 방식(QT)의 분할이 지원될 수 있다.
반면, 이전 단계에서 일부 트리 방식의 분할(QT)이 수행되지 않고 다른 트리 방식의 분할(BT 또는 TT)이 수행되어 현재 단계로 넘어온 경우라면 일부 트리 방식의 분할(QT)을 제외하고 일부 트리 방식의 분할(BT와 TT)이 현재 단계를 포함한 후속 단계에 지원되는 설정 또한 가능할 수 있다.
위와 같은 경우에는 블록 분할에 지원되는 트리 구성이 적응적일 수 있다는 것을 의미하므로, 전술한 분할 정보 구성 또한 달리 구성될 수 있음을 의미한다. (후술하는 예는 3번 예로 가정) 즉, 상기 예에서 일부 트리 방식(QT)의 분할이 이전 단계에서 수행되지 않았을 경우, 현재 단계에서는 일부 트리 방식(QT)은 고려하지 않고 분할 과정이 수행될 수 있다. 또한, 관련 트리 방식에 관한 분할 정보(예를 들어, 분할 여부에 대한 정보, 분할 방향 정보 등. 본 예<QT>에서는 분할 여부에 대한 정보)는 제거하여 구성될 수 있다.
상기 예는 블록 분할이 허용되는 경우(예를 들어, 블록 크기가 최대값과 최소값 사이의 범위 내에 존재, 각 트리 방식의 분할 깊이가 최대 깊이<허용 깊이>에 도달하지 않음 등)에 대한 적응적인 분할 정보 구성에 관한 경우이며, 블록 분할이 제한되는 경우(예를 들어, 블록 크기가 최대값과 최소값 사이의 범위에 존재하지 않음, 각 트리 방식의 분할 깊이가 최대 깊이에 도달함 등)에도 적응적인 분할 정보 구성이 가능할 수 있다.
이미 언급한 것과 같이 본 발명에서 트리 기반의 분할은 재귀적인 방식을 사용하여 수행될 수 있다. 예를 들어, 분할 깊이가 k인 부호화 블록의 분할 플래그가 0인 경우 부호화 블록의 부호화는 분할 깊이가 k인 부호화 블록에서 수행되며, 분할 깊이가 k인 부호화 블록의 분할 플래그가 1인 경우 부호화 블록의 부호화는 분할 방식에 따라 분할 깊이가 k+1인 N개의 서브 부호화 블록(이때, N은 2, 3, 4와 같은 2 이상의 정수)에서 수행된다.
상기 서브 부호화 블록은 다시 부호화 블록(k+1)으로 설정되어 상기 과정을 거쳐 서브 부호화 블록(k+2)으로 분할될 수 있으며, 이러한 계층적 분할 방식은 분할 범위 및 분할 허용 깊이 등의 분할 설정에 따라 결정될 수 있다.
이때, 분할 정보를 표현하기 위한 비트스트림 구조는 하나 이상의 스캔 방법 중 선택할 수 있다. 예를 들어, 분할 깊이 순서 기준으로 분할 정보의 비트스트림을 구성할 수 있거나 분할 여부 기준으로 분할 정보의 비트스트림을 구성할 수 있다.
예를 들어, 분할 깊이 순서 기준의 경우 최초 블록 기준으로 현 수준의 깊이에서의 분할 정보를 획득한 후 다음 수준의 깊이에서의 분할 정보를 획득하는 방법이며, 분할 여부 기준의 경우 최초 블록 기준으로 분할된 블록에서의 추가 분할 정보를 우선적으로 획득하는 방법을 의미하며, 다른 추가적인 스캔 방법이 고려될 수 있다.
최대 블록의 크기와 최소 블록의 크기는 트리 종류에 상관없이(또는 모든 트리) 공통되는 설정을 가질 수 있거나 또는 각 트리에 따라 개별적인 설정을 가질 수 있거나 또는 둘 이상의 트리에 대한 공통되는 설정을 가질 수 있다. 이때 최대 블록의 크기는 최대 부호화 블록과 같거나 작게 설정될 수 있다. 만약 소정의 제 1 트리에 따른 최대 블록의 크기가 최대 부호화 블록과 동일하지 않다면, 제 1 트리의 최대 블록 크기에 도달할 때까지 소정의 제 2 트리 방식을 사용하여 묵시적으로 분할을 수행한다.
그리고 트리 종류에 상관없이 공통되는 분할 깊이가 지원될 수 있거나 또는 각 트리에 따라 개별적인 분할 깊이가 지원될 수 있거나 또는 둘 이상의 트리에 대한 공통되는 분할 깊이가 지원될 수 있다. 또는, 일부 트리에는 분할 깊이가 지원되고, 일부 트리에는 분할 깊이가 지원되지 않을 수 있다.
상기 설정 정보에 대한 명시적인 구문 요소가 지원될 수 있으며, 일부 설정 정보는 묵시적으로 정해질 수도 있다.
(인덱스 기반의 분할)
본 발명의 인덱스 기반의 분할에서 CSI(Constant Split Index) 방식과 VSI(Variable Split Index) 방식 등이 지원될 수 있다.
CSI 방식은 소정의 방향의 분할을 통해 k개의 서브 블록이 획득되는 방식일 수 있으며, k는 2, 3, 4 등 2 이상의 정수일 수 있다. 상세하게는, 블록의 크기 및 형태에 관계없이 상기 k값에 기반하여 서브 블록의 크기 및 형태가 정해지는 구성의 분할 방식일 수 있다. 여기서, 소정의 방향은 수평, 수직, 대각선(좌상 -> 우하 방향. 또는, 좌하 -> 우상 방향 등) 방향 중 하나 또는 둘 이상의 방향이 결합될 수 있다.
본 발명의 인덱스 기반의 CSI 분할 방식은 수평 또는 수직 중 한 방향으로 z개로 분할되는 후보를 포함할 수 있다. 이때, z는 2, 3, 4와 같은 2 이상 정수일 수 있으며, 각 서브 블록의 가로 또는 세로 길이 중 하나는 동일하고 다른 하나는 동일하거나 상이할 수 있다. 상기 서브 블록의 가로 또는 세로 길이의 비는 A1:A2:...: AZ로 A1 내지 AZ는 1, 2, 3과 같은 1 이상의 정수일 수 있다.
또한, 수평과 수직 방향으로 각각 x, y개로 분할되는 후보를 포함할 수 있다. 이때, x와 y는 1, 2, 3, 4와 같은 1 이상의 정수일 수 있지만, x와 y가 동시에 1인 경우(a가 이미 존재하므로)는 제한할 수 있다. 도 4의 경우 각 서브 블록의 가로 또는 세로 길이의 비율이 동일한 경우를 도시하고 있지만, 상이한 경우를 포함하는 후보를 포함할 수도 있다.
또한, 일부 대각선 방향(좌상 -> 우하 방향) 또는 일부 대각선 방향(좌하 -> 우상 방향) 중 한 방향으로 w개 분할되는 후보를 포함할 수 있으며, w는 2, 3과 같은 2 이상의 정수일 수 있다.
도 4를 참조하면, 각 서브 블록의 길이 비율에 따라 대칭적인 분할 형태(b)와 비대칭적인 분할 형태(d, e)로 구분할 수 있고, 특정 방향에 치우친 분할 형태(k, m)와 중앙에 배치되는 분할 형태(k)로 구분할 수 있다. 서브 블록의 길이 비율뿐만 아니라 서브 블록의 형태 등을 포함하는 다양한 부호화 요소에 의해 분할 형태를 정의할 수 있는데, 부호화 설정에 따라 지원되는 분할 형태가 묵시적으로 또는 명시적으로 정해질 수 있다. 그리하여 지원되는 분할 형태에 기반하여 인덱스 기반의 분할 방식에서의 후보군이 정해질 수 있다.
한편, VSI 방식은 서브 블록의 너비(w) 또는 높이(h)가 고정된 채로 소정의 방향의 분할을 통해 하나 이상의 서브 블록이 획득되는 방식일 수 있으며, w와 h는 1, 2, 4, 8 등과 같은 1 이상의 정수일 수 있다. 상세하게는, 블록의 크기 및 형태와 상기 w 또는 n값에 기반하여 서브 블록의 개수가 정해지는 구성의 분할 방식일 수 있다.
본 발명의 인덱스 기반의 VSI 분할 방식은 서브 블록의 가로 또는 세로 길이 중 하나를 고정하여 분할되는 후보를 포함할 수 있다. 또는, 서브 블록의 가로와 세로 길이를 고정하여 분할되는 후보를 포함할 수 있다. 서브 블록의 가로 또는 세로 길이가 고정되기 때문에 수평 또는 수직 방향으로 균등 분할을 허용하는 특징을 가질 수 있지만, 이에 한정되지 않는다.
분할 전 블록이 M x N이고 서브 블록의 가로 길이가 고정(w)되거나 또는 세로 길이가 고정(h)되거나 또는 가로와 세로 길이가 고정(w, h)되는 경우, 획득되는 서브 블록의 개수는 각각 (M*N)/w, (M*N)/h, (M*N)/w/h 일 수 있다.
부호화 설정에 따라 CSI 방식만 지원되거나 또는 VSI 방식만 지원될 수 있고 두 방식 모두 지원할 수도 있으며, 지원되는 방식에 대한 정보가 묵시적 또는 명시적으로 정해질 수 있다.
본 발명에서는 CSI 방식이 지원되는 경우를 가정하여 설명한다.
부호화 설정에 따라 상기 인덱스 분할 중 둘 이상의 후보를 포함하여 후보군을 구성할 수 있다.
예를 들어, {a, b, c}, {a, b, c, n}, {a 내지 g, n}과 같은 후보군을 구성할 수 있는데, 수평 또는 수직 방향으로 2분할되거나 수평과 수직 방향으로 각각 2분할되는 블록 형태처럼 일반적인 통계적인 특성에 기초하여 많이 발생할 것이라 예측되는 블록 형태를 후보군으로 구성하는 예일 수 있다.
또는, {a, b}, {a, o}, {a, b, o} 또는 {a, c}, {a, p}, {a, c, p}와 같은 후보군을 구성할 수 있는데, 각각 수평과 수직 방향으로 2, 4분할되는 후보를 포함한다. 이는 특정 방향의 분할이 많이 발생할 것이라 예측되는 블록 형태를 후보군으로 구성하는 예일 수 있다.
또는, {a, o, p} 또는 {a, n, q}와 같은 후보군을 구성할 수 있는데, 분할 전 블록보다 더 작은 크기를 갖는 분할이 많이 발생할 것이라 예측되는 블록 형태를 후보군으로 구성하는 예일 수 있다.
또는, {a, r, s}와 같은 후보군을 구성할 수 있는데, 분할 전 블록에서 다른 방식(트리 방식)을 통해 직사각 형태로 얻을 수 있는 최적의 분할 결과를 얻었을 것이라 판단하고 비사각 형태의 분할 형태를 후보군으로 구성하는 예일 수 있다.
상기 예와 같이 다양한 후보군 구성이 가능할 수 있으며, 하나 이상의 후보군 구성이 다양한 부호화 요소를 고려하여 지원될 수 있다.
상기 후보군 구성이 완료되면 다양한 분할 정보 구성이 가능할 수 있다.
예를 들어, 분할되지 않는 후보(a)와 분할되는 후보(b 내지 s)를 포함하여 구성되는 후보군에서 인덱스 선택 정보가 발생할 수 있다.
또는, 분할 여부를 나타내는 정보(분할 형태가 a인지 아닌지)가 발생할 수 있고, 분할이 수행되는 경우(a가 아닌 경우)에 분할되는 후보(b 내지 s)로 구성되는 후보군에서 인덱스 선택 정보가 발생할 수 있다.
상기 설명 외의 다양한 방식의 분할 정보 구성이 가능할 수 있으며, 상기 분할 여부를 나타내는 정보를 제외하고는 후보군에서 각 후보의 인덱스에 고정 길이 이진화, 가변 길이 이진화 등의 다양한 방법을 통해 이진 비트가 할당될 수 있다. 만약 후보군의 개수가 2개인 경우 인덱스 선택 정보에 1비트가 할당될 수 있고, 3개 이상인 경우 인덱스 선택 정보에 1비트 이상이 할당될 수 있다.
트리 기반의 분할 방식과 달리 인덱스 기반의 분할 방식은 많이 발생할 것이라 예측되는 분할 형태를 선별적으로 후보군에 구성하는 방식일 수 있다.
그리고 지원되는 후보군의 개수에 따라 인덱스 정보를 표현하기 위한 비트량이 증가할 수 있기 때문에, 트리 기반의 방식의 계층적 분할(재귀적인 분할)이 아닌 단일 계층 분할(예를 들어, 분할 깊이가 0으로 한정)에 적합한 방식일 수 있다. 즉, 한 번의 분할 동작을 지원하는 방식일 수 있으며, 인덱스 기반의 분할을 통해 획득된 서브 블록은 더 이상의 추가 분할은 불가능한 방식일 수 있다.
이때, 더 작은 크기를 갖는 동일한 종류의 블록으로의 추가 분할이 불가능한 경우(예를 들어, 인덱스 분할 방식을 통해 획득된 부호화 블록은 부호화 블록으로의 추가 분할이 불가)를 의미할 수 있으나, 다른 종류의 블록으로의 추가 분할이 불가능한 설정(예를 들어, 부호화 블록에서 부호화 블록뿐만 아니라 예측 블록으로의 분할도 불가) 또한 가능할 수 있다. 물론, 상기 예에 제한되지 않으며, 다른 변형의 예가 가능할 수도 있다.
다음은 부호화 요소 중 블록의 종류를 중심으로 블록 분할 설정이 정해지는 경우를 살펴본다.
우선, 분할 과정을 통해 부호화 블록이 획득될 수 있다. 여기서, 분할 과정은 트리 기반의 분할 방식이 사용될 수 있고, 트리 종류에 따라 도 4의 a(no split), n(QT), b, c(BT), i, l(TT) 등의 분할 형태 결과가 나올 수 있다. 부호화 설정에 따라 QT/QT+BT/QT+BT+TT 등과 같은 각 트리 종류의 다양한 조합이 가능할 수 있다.
후술하는 예는 상기 과정을 통해 획득된 부호화 블록을 기초로 예측 블록과 변환 블록이 최종 구획되는 과정을 나타내고, 각 구획된 크기에 기반하여 예측과 변환 및 역변환 과정이 수행되는 경우를 가정한다.
일 예(1)로, 부호화 블록의 크기 그대로 예측 블록이 설정되어 예측 과정을 수행할 수 있고, 부호화 블록(또는 예측 블록)의 크기 그대로 변환 블록이 설정되어 변환 및 역변환 과정을 수행할 수 있다. 예측 블록과 변환 블록의 경우 부호화 블록에 기반하여 설정되었기 때문에 따로 발생하는 분할 정보는 존재하지 않는다.
일 예(2)로, 부호화 블록의 크기 그대로 예측 블록이 설정되어 예측 과정을 수행할 수 있다. 변환 블록의 경우 부호화 블록(또는 예측 블록)을 기초로 분할 과정을 통해 변환 블록이 획득될 수 있고, 획득된 크기에 기반하여 변환 및 역변환 과정을 수행할 수 있다.
여기서, 분할 과정은 트리 기반의 분할 방식이 사용될 수 있고, 트리 종류에 따라 도 4의 a(no split), b, c(BT), i, l(TT), n(QT) 등의 분할 형태 결과가 나올 수 있다. 부호화 설정에 따라 QT/BT/QT+BT/QT+BT+TT 등과 같은 각 트리 종류의 다양한 조합이 가능할 수 있다.
여기서, 분할 과정은 인덱스 기반의 분할 방식이 사용될 수 있고, 인덱스 종류에 따라 도 4의 a(no split), b, c, d 등의 분할 형태 결과가 나올 수 있다. 부호화 설정에 따라 {a, b, c}, {a, b, c, d} 등과 같은 다양한 후보군 구성이 가능할 수 있다.
일 예(3)로, 예측 블록의 경우 부호화 블록을 기초로 분할 과정을 수행하여 예측 블록이 획득될 수 있고, 획득된 크기에 기반하여 예측 과정을 수행할 수 있다. 변환 블록의 경우 부호화 블록의 크기 그대로 설정되어 변환 및 역변환 과정을 수행할 수 있다. 본 예는 예측 블록과 변환 블록이 서로 독립적인 관계를 갖는 경우에 해당할 수 있다.
여기서, 분할 과정은 인덱스 기반의 분할 방식이 사용될 수 있고, 인덱스 종류에 따라 도 4의 a(no split), b 내지 g, n, r, s 등의 분할 형태 결과가 나올 수 있다. 부호화 설정에 따라 {a, b, c, n}, {a 내지 g, n}, {a, r, s} 등과 같은 다양한 후보군 구성이 가능할 수 있다.
일 예(4)로, 예측 블록의 경우 부호화 블록을 기초로 분할 과정을 수행하여 예측 블록이 획득될 수 있고, 획득된 크기에 기반하여 예측 과정을 수행할 수 있다. 변환 블록의 경우 예측 블록의 크기 그대로 설정되어 변환 및 역변환 과정을 수행할 수 있다. 본 예는 획득된 예측 블록 크기 그대로 변환 블록이 설정되는 경우일 수 있거나 또는 그 반대의 경우(변환 블록 크기 그대로 예측 블록이 설정)일 수 있다.
여기서, 분할 과정은 트리 기반의 분할 방식이 사용될 수 있고, 트리 종류에 따라 도 4의 a(no split), b, c(BT), n(QT) 등의 분할 형태가 나올 수 있다. 부호화 설정에 따라 QT/BT/QT+BT 등과 같은 각 트리 종류의 다양한 조합이 가능할 수 있다.
여기서, 분할 과정은 인덱스 기반의 분할 방식이 사용될 수 있고, 인덱스 종류에 따라 도 4의 a(no split), b, c, n, o, p 등의 분할 형태가 나올 수 있다. 부호화 설정에 따라 {a, b}, {a, c}, {a, n}, {a, o}, {a, p}, {a, b, c}, {a, o, p}, {a, b, c, n}, {a, b, c, n, p} 등과 같은 다양한 후보군 구성이 가능할 수 있다. 또한, 인덱스 기반의 분할 방식 중 VSI 방식이 단독으로 또는 상기 CSI 방식과 혼합되어 후보군이 구성될 수도 있다.
일 예(5)로, 예측 블록의 경우 부호화 블록을 기초로 분할 과정을 수행하여 예측 블록이 획득될 수 있고, 획득된 크기에 기반하여 예측 과정을 수행할 수 있다. 또한, 변환 블록의 경우도 부호화 블록을 기초로 분할 과정을 수행하여 예측 블록이 획득될 수 있고, 획득된 크기에 기반하여 변환 및 역변환 과정을 수행할 수 있다. 본 예는 부호화 블록을 기초로 예측 블록과 변환 블록 각각의 분할을 수행하는 경우일 수 있다.
여기서, 분할 과정은 트리 기반의 분할 방식과 인덱스 기반의 분할 방식이 사용될 수 있으며, 4번 예와 동일하거나 비슷하게 후보군이 구성될 수 있다.
상기 예는 각 종류의 블록의 분할 과정이 공유되는지 여부 등에 따라 발생 가능한 일부 경우를 설명하고 있지만, 이에 한정되지 않고 다양한 변형의 예가 가능할 수 있다. 또한, 블록의 종류뿐만 아니라 다양한 부호화 요소가 고려되어 블록 분할 설정이 정해질 수 있다.
이때, 부호화 요소는 영상 타입(I/P/B), 컬러 성분(YCbCr), 블록의 크기/형태/위치, 블록의 가로/세로 길이 비, 블록의 종류(부호화 블록, 예측 블록, 변환 블록, 양자화 블록 등), 분할 상태, 부호화 모드(Intra/Inter), 예측 관련 정보(화면내 예측 모드, 화면간 예측 모드 등), 변환 관련 정보(변환 기법 선택 정보 등), 양자화 관련 정보(양자화 영역 선택 정보, 양쟈화된 변환 계수 부호화 정보 등) 등이 포함될 수 있다.
(블록 간의 관계에 관한 설명)
도 5는 한 집안의 구성원과 그 혈연관계에 있는 인물들의 유전적 특성을 설명하기 위한 가계도의 일 예를 나타낸다. 설명의 편의를 위해 특정 성별(남)에 따른 수평적 및 수직적인 관계를 나타내기로 한다.
도 5를 참조하면, 대상 인물(본인)은 형, 제(동생)과 함께 수평적인 관계(a)를 가질 수 있고, 조부(할아버지), 부(아버지. 이상 조상), 자(아들), 손자(이상 후손)와 함께 수직적인 관계(b)를 가질 수 있다. 이때, 수평적인 관계에 놓인 인물들은 외모, 체격, 성격 등의 유전적인 요인이 유사한 경우가 존재할 수 있다. 또는, 일부 요소에는 유사하고 일부 요소에는 유사하지 않는 경우가 존재할 수 있다. 위와 같은 유전적인 요소의 전부 또는 일부의 유사성 여부는 다양한 환경 요인(어머니 포함) 등에 의해 결정될 수 있다.
상기 설명은 수직적인 관계에도 동일하거나 비슷한 적용이 가능할 수 있다. 예를 들어, 대상 인물의 유전적인 요소(외모, 체격, 성격)가 아버지와 유사한 경우가 존재할 수 있다. 또는, 대상 인물의 일부 유전적인 요소(외모, 체격)는 아버지와 유사하지만, 일부 유전적인 요소(성격)는 (어머니와 유사하고) 아버지와 유사하지 않을 수 있다.
다른 예로, 대상 인물은 할아버지(또는 손자)와 유전적으로 유사하고 할아버지는 손자와 유전적으로 유사할 수 있으나, 각 인물 간의 유사성 정도는 각 인물 간의 관계에 기반하여 결정될 수도 있다. 즉, 할아버지와 대상 인물 간의 유사성(2대 차이)은 높을 수 있고, 할아버지와 손자 간의 유사성(4대 차이)은 낮을 수 있다.
일반적으로 대상 인물의 특성 파악을 위해서는 직접적인 분석이 최우선일 수 있으나, 대상 인물의 부재가 발생하는 경우에는 직접적인 분석이 불가능하다. 이때, 상기 예와 같은 다양한 관계에 놓인 인물들의 간접적인 분석을 통해 대상 인물에 대한 특성에 대한 대략적인 파악이 가능할 수 있다. 물론, 대상 인물과 유사성이 높은 인물들에 대한 분석이 요구될 수 있다.
상기 예를 통해 다양한 혈연관계에 기반한 인물 간의 관계에 대해 설명하였는데, 이는 영상 압축을 위한 부호화에도 동일하거나 비슷한 적용이 가능할 수 있다. 여기서, 블록 기반의 부호화를 그 예로 들 것이다. 소정의 블록(대상 블록)의 부호화를 위해 대상 블록과 다양한 관계에 놓인 블록(상대 블록. Relative Block)의 정보를 사용/참조/참고할 수 있다.
여기서, 상대 블록의 정보는 화소값에 기반한 데이터일 수 있고, 부호화 과정에 사용되는 모드 정보에 기반한 데이터일 수 있고, 부호화 과정에 사용되는 설정 정보에 기반한 데이터일 수 있다. 예를 들어, 상대 블록의 공간 영역에서의 화소값 또는 주파수 영역에서의 계수값(또는 양자화된 계수)일 수 있다. 또는, 상대 블록의 부호화 과정에서 발생하는 모드 정보일 수 있다. 또는, 상대 블록의 부호화 과정에서 사용된 참조 설정에 관한 정보(참조 후보군 등)일 수 있다. 여기서, 화소값에 기반한 데이터 또는 모드 정보에 기반한 데이터가 참조 설정을 구성하는 정보일 수 있다.
본 발명에서 블록 간의 관계(대상 블록과 상대 블록. 대상 블록을 중심으로 설명)를 다음과 같이 정의할 수 있다.
- 수평적인 관계: 대상 블록은 상대 블록과 중복되는 영역이 존재하지 않은 경우(블록 간의 독립적인 관계)
- 수직적인 관계: 대상 블록은 상대 블록보다 크고 상대 블록을 포함하는 경우. 또는, 상대 블록보다 작으며 상대 블록에 포함되는 경우(블록 간의 종속적인 관계)
여기서, 수평적인 관계를 갖는 경우 상대 블록은 대상 블록이 속한 공간에 관계없이 위치할 수 있다. 즉, 상대 블록은 대상 블록과 시간적으로 동일한 공간에 속할 수 있고, 대상 블록과 시간적으로 다른 공간에 속할 수도 있다.
여기서, 수직적인 관계를 갖는 경우 상대 블록은 대상 블록이 속한 공간에 위치할 수 있다. 즉, 상대 블록은 대상 블록과 시간적으로 다른 공간에 속하지 않으나, 부호화 설정에 따라 시간적으로 다른 공간 내에서 대상 블록과 대응되는 영역에 기반하여 수직적인 관계를 갖는 상대 블록의 개념이 지원되는 경우 또한 가능할 수 있다.
도 6은 대상 블록과 수평적인 관계인 상대 블록의 다양한 배치 예를 나타낸다. 도 6을 참조하면, 대상 블록과 수평적인 관계에 놓인 블록은 시간적으로 동일한 공간(Curr)과 동일하지 않는 공간(Diff)에 속하는 블록으로 분류할 수 있다.
여기서, 상대 블록이 대상 블록(X)과 다른 컬러 성분에 속하더라도 시간적으로 동일한 공간에 속하는 것으로 간주하되, 수평적인 관계에 대한 일부 정의의 변경이 발생함(대상 블록과 동일한 크기, 위치를 갖는 상대 블록이 존재)을 이해하여야 한다. 여기서, 동일한 공간에 속하는 블록은 대상 블록과 인접한 (또는 최인접한) 블록(UL, U, UR, L, DL)과 인접하지 않은 (또는 멀리 인접한) 블록(F0, F1, F2)으로 분류할 수 있다.
동일한 공간에 속하는 블록 중 대상 블록과 인접한 블록은 좌, 상, 좌상, 우상, 좌하 방향 등에 최인접한 블록일 수 있으며, 이는 래스터 스캔(또는 Z-스캔. 2 x 2 기준으로 좌상 -> 우상 -> 좌하 -> 우하) 순서를 고려하여 이미 부호화가 완료된 블록을 대상으로 할 수 있다. 즉, 소정의 스캔 순서에 따라 인접한 블록의 위치가 결정될 수 있으며, 스캔 순서의 종류(inverse Z scan<우하 -> 좌하 -> 우상 -> 좌상>, clock-wise scan<좌상 -> 우상 -> 우하 -> 좌하>, counter clock-wise scan<좌상 -> 좌하 -> 우하 -> 우상> 등)에 따라 상기 위치의 블록 제거 또는 새로운 위치(우, 하, 우하 방향 등)의 블록 추가 등의 변경이 발생할 수도 있다.
또한, 대상 블록과 인접하지 않은 블록은 이미 부호화가 완료된 블록을 대상으로 할 수 있다. 이때, 대상 블록과 동일한 블록 단위(최대 부호화 블록 등)에 속할 수도 있고, 동일한 분할 단위(슬라이스, 타일 등)에 속할 수도 있다. 즉, 인접하지 않지만 상대 블록으로 포함될 수 있는 영역에 대한 범위(대상 블록 기준으로 수평, 수직 방향으로 x_offset, y_offset의 범위 내에 존재)를 두는 등의 제한적인 설정이 지원될 수도 있다. 본 발명에서 대상 블록과 수평적인 관계인 블록은 이미 부호화가 완료된 경우를 가정하지만, 이에 한정하지 않는다.
대상 블록의 부호화를 위해 수평적인 관계에 있는 상대 블록의 부호화 정보/참조 설정 등을 사용(참고)할 수 있다.
일 예로, 대상 블록의 예측값 생성을 위해 상대 블록의 화소값이 사용될 수 있다. 상세하게는, 화면내 예측에서 상대 블록의 화소값을 외삽, 내삽, 평균 등의 방법 또는 블록 매칭, 템플릿 매칭 등의 방법을 적용하여 대상 블록의 예측값을 획득할 수 있다. 또한, 화면간 예측에서 상대 블록의 화소값을 블록 매칭, 템플릿 매칭 등의 방법을 사용하여 대상 블록의 예측값을 획득할 수 있다. 이때, 블록 매칭 또는 템플릿 매칭은 동일한 공간에서 예측값을 찾는다는 측면에서 화면내 예측(Mode_Intra)으로 정의될 수 있거나 예측 방법에 따라 화면간 예측(Mode_Inter)으로 정의할 수 있으며, 추가 정의되는 다른 부호화 모드로 분류될 수도 있다.
여기서, 공간 영역에서의 화소값만을 대상으로 하였으나, 상대 블록의 주파수 영역에서의 계수값 중 전부 또는 일부를 대상 블록의 예측값(즉, 주파수 성분에 대한 예측에 사용)으로 사용할 수도 있다.
일 예로, 대상 블록의 모드 정보 부호화를 위해 상대 블록의 모드 정보가 사용될 수 있다. 상세하게는, 화면내 예측에서 상대 블록의 예측 정보(방향성 모드, 비방향성 모드, 움직임 벡터 등)가 대상 블록의 예측 정보의 부호화(MPM, non-MPM 등)에 사용될 수 있다. 또한, 화면간 예측에서 상대 블록의 예측 정보(움직임 벡터, 참조 픽쳐 등)가 대상 블록의 예측 정보의 부호화에 사용될 수 있다.
여기서, 화면내 예측의 예측 방법에 따라 대상 블록과 시간적으로 동일한 공간 및 동일한 컬러 성분에 속하는 상대 블록을 대상(외삽, 내삽, 평균 등을 사용하는 예측 모드)으로 할뿐만 아니라, 대상 블록과 시간적으로 동일한 공간 및 다른 컬러 성분에 속하는 상대 블록을 대상(다른 컬러 성분의 데이터를 복사하는 예측 모드)으로 할 수도 있다.
여기서, 화면간 예측의 경우 예측 정보에 대한 예시로 움직임 벡터, 참조 픽쳐를 대상으로 하였으나, 움직임 정보 부호화 모드, 움직임 예측 방향, 움직임 모델 등의 다양한 정보를 포함할 수 있다.
일 예로, 대상 블록의 참조 설정을 위해 상대 블록의 참조 설정을 사용할 수 있다. 상세하게는, 화면내 예측에서 상대 블록의 MPM 후보군을 대상 블록의 MPM 후보군으로 사용할 수 있다. 또한, 화면간 예측에서 상대 블록의 움직임 예측 후보군을 대상 블록의 움직임 예측 후보군으로 사용할 수 있다. 즉, 상기 후보군을 상대 블록에 기반하여 구성하였다 할지라도 대상 블록에서 따로 후보군 구성을 통하지 않고 상대 블록의 후보군을 그대로 사용할 수 있음을 의미한다.
상기 예를 통해 상대 블록은 대상 블록과 수평적인 관계를 갖는 하나의 블록임을 가정하여 설명하였지만 영상 내에 수많은 상대 블록이 존재할 수 있으며, 대상 블록의 부호화에 사용하기 위한 하나 이상의 상대 블록을 특정해야 한다. 다음의 case 구분은 하나의 예시일 뿐, 이에 한정되지 않고 다양한 case 구성 및 정의가 가능함을 이해할 필요가 있다.
여기서, 동일한 공간에 속하고 대상 블록에 인접한 블록을 상대 블록으로 특정할 수 있다(case 1). 또는, 동일한 공간에 속하고 대상 블록에 인접하지 않은 블록을 상대 블록으로 특정할 수 있다(case 2). 또는, 동일하지 않는 공간에 속하는 블록을 상대 블록으로 특정할 수 있다(case 3). 또는, (case 1) ~ (case 3)의 전부 또는 일부에 속하는 블록을 상대 블록으로 특정할 수 있다.
여기서, (case 1)의 경우 대상 블록과 인접한 좌, 상, 좌상, 우상 좌하 블록(L, U, UL, UR, DL)의 전부 또는 일부를 상대 블록으로 특정할 수 있다. (case 2)의 경우 대상 블록과 인접하지 않은 블록 중 하나 이상을 상대 블록으로 특정할 수 있다. (case 3)의 경우 대상 블록과 인접한 중앙, 좌, 우, 상, 하, 좌상, 우상, 좌하, 우하 블록(C, L, R, U, D, UL, UR, DL, DR)의 전부 또는 일부, 그리고 대상 블록과 인접하지 않는 블록 중 하나 이상을 상대 블록으로 특정할 수 있다.
상대 블록으로 특정하기 위해서는 다양한 확인 방법이 존재하는데, 우선 대상 블록을 기준으로 소정의 위치의 좌표를 포함하는 블록을 상대 블록으로 특정할 수 있다. 우선, 대상 블록(m x n)은 (a, b)의 좌상측 좌표를 기준으로 (a + m - 1, b + n - 1)의 범위를 갖는다 가정한다.
(case 1 or case 3) C 블록은 대상 블록과 각 픽쳐 내 위치가 동일한 경우를 가정하여 설명한다. 그러므로 동일한 영상(Curr)과 동일하지 않는 영상(Diff)에서 동일한 알파벳을 갖는 블록에 대한 설명이 공통될 수 있다. 단, (case 3의 경우) C 블록의 위치가 대상 블록과 픽쳐 내 위치가 동일하지 않는 경우 또한 가능하며, 후술하는 예(즉, Diff에 속하는 블록)는 C 블록의 위치에 따라 화소 위치가 변경될 수 있음을 이해하여야 한다.
C 블록은 (a, b), (a, b + n - 1), (a + m - 1, b), (a + m - 1, b + n - 1), (a + m/2 - 1, b + n/2 - 1), (a + m/2 + 1, b + n/2 - 1), (a + m/2 - 1, b + n/2 + 1), (a + m/2 + 1, b + n/2 + 1) 등 대상 블록의 내부 화소 중 소정의 위치의 화소를 포함하는 블록을 의미한다. 그리고 L 블록은 (a - 1, b), (a - 1, b + n - 1) 등 대상 블록의 왼쪽 경계 너머에 화소 중 소정의 위치의 화소를 포함하는 블록을 의미하고, U 블록은 (a, b - 1), (a + m - 1, b - 1) 등의 대상 블록의 위쪽 경계 너머에 화소 중 소정의 위치의 화소를 포함하는 블록을 의미한다. 또한, UL 블록은 (a - 1, b - 1) 등 대상 블록의 왼쪽 위 경계 너머에 화소 중 소정의 위치의 화소를 포함하는 블록을 의미하고, UR 블록은 (a + m, b - 1) 등 대상 블록의 오른쪽 위 경계 너머에 화소 중 소정의 위치의 화소를 포함하는 블록을 의미하며, DL 블록은 (a - 1, b + n) 등 대상 블록의 왼쪽 아래 경계 너머에 화소 중 소정의 위치의 화소를 포함하는 블록을 의미한다. 우, 하, 우하 방향의 경우 상기 설명에서 유도 가능하므로 생략한다.
상기 설명에서 각 방향의 블록에 존재하는 화소 중 하나의 위치의 화소를 포함하는 블록을 상대 블록으로 특정하는 예를 들었으나, 전부 또는 일부 방향에서 둘 이상의 상대 블록을 특정할 수도 있으며 이를 위한 둘 이상의 화소 위치가 정의될 수도 있다.
(case 2) Fk 블록(k는 0 ~ 2)은 (a - off_x, b), (a, b - off_y), (a - off_x, b - off_y) 등과 같이 수평/수직/대각선 등의 소정의 방향으로 소정의 길이(off_x, off_y 등)만큼 떨어진 화소를 포함하는 블록을 의미할 수 있다. 여기서, 상기 소정의 길이는 4, 8, 16 등과 같은 1 이상의 정수일 수 있으며, 대상 블록의 가로, 세로 길이에 기반하여 설정될 수도 있다. 또는, 최대 부호화 블록의 가로, 세로 길이에 기반하여 설정될 수도 있으며, 이에 관한 다양한 변형의 예가 가능할 수 있다. 소정의 길이는 상기 예와 같은 묵시적으로 설정될 수 있거나 또는 명시적인 값으로 관련 구문 요소가 발생할 수도 있다.
상대 블록을 특정하는 또 다른 방법으로, 대상 블록의 부호화 정보와 동일성/유사성을 갖는 모드 정보를 갖는 블록을 상대 블록으로 특정할 수 있다. 이때, 모드 정보는 현재 단계에서 부호화(또는, 사용/예측, 후보군 구성 등)를 하고자 하는 정보가 아닌 이미 부호화가 완료되거나 이미 결정된 다른 성질/의미를 갖는 정보를 의미한다. 상기 결정된 정보란 모드 결정 과정에서 이전 단계에서 결정된 정보 또는 복호화 과정에서 이전 단계에서 복원된 정보일 수 있다.
예를 들어, 대상 블록이 이동 외 움직임 모델을 사용하여 화면간 예측을 수행할 때, 이전에 부호화된 블록 중 이동 외 움직임 모델을 사용하여 부호화된 블록을 상대 블록으로 특정할 수 있다. 이때, 특정된 상대 블록의 이동 외 움직임 모델에 따른 움직임 벡터 정보가 대상 블록의 이동 외 움직임 모델에 따른 움직임 벡터 예측을 위한 후보군 구성에 사용될 수 있다.
상기 예에서 움직임 모델 정보가 대상 블록과 동일성/유사성을 확인하기 위해 사용된 다른 성질/의미를 갖는 정보를 의미하고, 상대 블록의 움직임 모델(이동 외 움직임 모델)에 따른 움직임 벡터가 대상 블록의 움직임 모델에 따른 움직임 벡터 예측 후보군 구성에 사용되는 정보일 수 있다. 이때, 상대 블록은 대상 블록에 인접할 수 있거나 인접하지 않을 수 있다. 대상 블록과 동일성/유사성을 갖는 모드가 적게 발생하는 경우에 대상 블록과 인접하지 않는 영역의 블록도 상대 블록으로 특정하여 사용/참조하고자 할 때 유용할 수 있다.
대상 블록의 부호화를 위해 사용/참조되는 상대 블록은 다음과 같은 사항을 고려하여 결정될 수 있다.
대상 블록의 부호화에 사용/참조하고자 하는 정보에 기반하여 상대 블록이 정해질 수 있다. 여기서, 대상 블록의 부호화에 사용/참조하고자 하는 정보는 예측을 위한 화소값 정보와 예측/변환/양자화/인루프 필터/엔트로피 부호화 등과 관련된 모드 정보, 그리고 예측/변환/양자화/인루프 필터/엔트로피 부호화 등에 관련된 참조 후보군 정보가 그 대상이 될 수 있다.
또한, 대상 블록의 상태 정보, 대상 블록이 속한 영상 정보 등에 기반하여 상대 블록이 결정될 수 있다. 여기서, 대상 블록의 상태 정보는 블록의 크기, 형태, 가로/세로 길이 비, 픽쳐/분할 단위(슬라이스, 타일 등)/최대 부호화 블록 등의 단위에서의 위치 등에 기반하여 정의될 수 있다. 여기서, 대상 블록이 속한 영상 정보는 영상 타입(I/P/B), 컬러 성분(Y/Cb/Cr) 등에 기반하여 정의될 수 있다.
또한, 대상 블록의 부호화 정보에 기반하여 상대 블록이 결정될 수 있다. 상세하게는, 대상 블록과 동일성/유사성이 존재하는 정보를 갖고 있는지에 기반하여 상대 블록이 결정될 수도 있다. 여기서, 동일성/유사성 확인을 위해 참조되는 정보는 예측/변환/양자화/인루프 필터/엔트로피 부호화 등과 관련된 모드 정보가 그 대상이 될 수 있다.
상기 예에서 언급된 전부 또는 일부 요소를 고려하여 상대 블록의 카테고리(전술한 case), 개수, 위치 등이 결정될 수 있다. 상세하게는, 어떤 카테고리가 선택되는지 결정될 수 있고, 선택된 카테고리에서 지원되는 상대 블록의 개수 및 위치가 결정될 수 있다. 이때, 각 카테고리에서 지원되는 블록의 개수는 m, n, o개 일 수 있으며, 이들은 0, 1, 2, 3, 5 등과 같은 0 이상의 정수일 수 있다.
상대 블록(블록 위치)은 대상 블록(또는 대상 블록이 속한 영상과 시간적으로 다른 영상에서 대상 블록과 대응되는 블록)을 중심으로 좌, 우, 상, 하, 좌상, 우상, 좌하, 우하, 중앙 등의 방향에서 정해질 수 있다. 예를 들어, 상기 방향으로 최인접한 블록에서 상대 블록이 정해질 수 있다. 또는, 상기 방향과 일정 범위/조건을 추가로 만족하는 블록 중에 상대 블록이 정해질 수 있다. 대상 블록이 속한 최대 부호화 블록과 다른 최대 부호화 블록에 속하거나 대상 블록의 가로, 세로 길이에 기반한 차이를 갖는 위치의 블록(예로, 좌, 상, 좌상 방향)일 수 있다.
또한, 상대 블록은 부호화 순서에 기반하여 정해질 수 있으며, 이때 부호화 순서는 래스터 스캔, z-스캔 등의 다양한 스캔 방식에 의해 정의될 수 있다. 일 예로, (부호화 순서가 가까운 것을 기준) 소정의 개수만큼의 블록을 상대 블록으로 포함할 수 있으며, 이때 소정의 개수는 0, 1, 2, 3 등과 같은 0 이상의 정수일 수 있다. 즉, 부호화 순서에 따라 FIFO(First-in, First-out) 등과 같은 메모리 관리 방식으로 상대 블록이 관리될 수 있으며, (case 2)에 발생 가능한 상대 블록을 결정(후보군에 포함하기 위한 결정)하는 예일 수 있다.
상대 블록이 하나가 지원되는 경우는 해당 블록의 정보만을 사용/참조할 수 있다는 것을 의미할 수 있다. 또한, 상대 블록이 복수 개가 지원되더라도 부호화 설정에 따라 복수 개의 상대 블록에 기반하여 하나의 정보가 유도될 수 있다. 일 예로, 화면간 예측에서 움직임 벡터 예측을 위해 좌, 상, 우상 블록과 같은 3개의 상대 블록이 특정되어 3개의 움직임 벡터가 지원될 수 있으나, 부호화 설정에 따라 3개 블록의 움직임 벡터의 중앙값(또는 평균) 등의 방법을 통해 하나의 움직임 벡터가 유도되어 대상 블록의 움직임 벡터 예측값으로 사용될 수도 있다.
상기 예의 경우 2개 이상의 후보를 지원함으로써 발생하는 최적의 후보 선택 정보 등이 발생하는 것을 줄일 수 있는 부호화 설정일 수 있으나, 대상 블록의 부호화 정보와 높은 상관성을 가진 하나의 후보가 유도되는 것을 기대하기는 어려울 수 있다. 그렇기 때문에 복수의 후보로 후보군을 구성하는 방법이 더 효율적일 수 있다. 물론, 후보군에 포함된 후보의 개수가 증가할수록 이를 표현하기 위한 정보량이 증가할 수도 있기 때문에, 효율적인 후보군을 구성하는 것이 중요하다.
그래서 전술한 다양한 예와 같은 상대 블록이 지원될 수 있으나, 일반적인 영상 특성 등을 고려하여 최적의 상대 블록을 특정하고 그에 기반하여 후보군을 구성하는 것이 필요할 수 있다. 본 발명에서는 하나 이상의 상대 블록에서 둘 이상의 정보를 통해 후보를 구성하는 경우를 가정하여 설명한다.
다음은 대상 블록과 수평적인 관계를 갖는 블록에 기반한 후보군 구성 및 부호화/복호화 과정을 나타낸다.
대상 블록의 부호화 정보를 위해 참조되는 블록을 특정한다(1). 특정된 블록의 부호화 정보를 소정의 순서에 따라 후보군을 구성한다(2). 대상 블록의 부호화 정보에 기반하여 후보군 중 하나를 선택한다(3). 선택된 후보에 기반하여 영상 부호화/복호화 과정을 수행한다(4).
(1)에서는 대상 블록의 부호화 정보에 관한 후보군 구성을 위해 사용되는 상대 블록을 특정한다. 이때, 상대 블록은 대상 블록과 수평적인 관계를 갖는 블록일 수 있다. 전술한 것과 같은 다양한 카테고리의 상대 블록이 포함될 수 있으며, 대상 블록의 부호화 정보 외에 대상 블록의 상태 정보 등의 다양한 정보를 고려하여 상대 블록을 특정할 수 있음을 이미 전술하였다.
(2)에서는 상기 과정을 통해 특정되는 상대 블록의 부호화 정보를 소정의 순서에 따라 후보군을 구성한다. 여기서, 하나의 상대 블록의 부호화 정보에 기반하여 획득된 정보가 후보군에 포함될 수 있고, 복수의 상대 블록의 부호화 정보에 기반하여 획득된 정보가 후보군에 포함될 수도 있다. 이때, 후보군 구성 순서는 고정적인 순서가 지원될 수 있거나 또는 다양한 부호화 요소(상대 블록을 특정할 때 고려하는 요소 등)에 기반한 적응적인 순서가 지원될 수도 있다.
(3)에서는 대상 블록의 부호화 정보에 기반하여 후보군 중 하나를 선택하며, (4)에서는 이에 기반하여 영상 부호화/복호화 과정을 수행할 수 있다.
상기 순서도는 블록 단위에서 확인 및 수행되는 과정일 수 있다. 여기서, 일부 순서(1, 2)의 경우 부호화 초기 단계에서 확인 및 수행되는 과정일 수도 있다. 상기 (1) 내지 (4)에서 언급되지 않은 내용이라 할지라도 전술한 다양한 실시예를 통해 유도 가능하므로, 이에 대한 상세한 설명은 생략한다. 일반적으로 수평적인 관계를 갖는 블록 중 어떤 블록이 대상 블록과의 높은 상관성을 갖는지 미리 확인하기에는 어려운 점이 존재한다. 수평적인 관계를 갖는 블록 중 대상 블록과 어떤 상관성을 갖는지를 미리 확인할 수 있는 방법에 관하여 후술한다. 또한, (3)에서 후보군 중 하나의 정보가 선택되는 경우를 설명하고 있으나, 부호화 정보의 종류, 부호화 설정 등에 따라 둘 이상의 정보가 선택되는 경우 또한 가능할 수 있으며, 이는 본 발명의 공통으로 적용 가능한 설명일 수 있다.
대상 블록과 상대 블록은 부호화/예측/변환/양자화/인루프 필터 등의 단위 중에 하나일 수 있으며, 대상 블록과 상대 블록은 동일한 단위로 설정될 수 있다. 예를 들어, 대상 블록이 부호화 블록일 경우 상대 블록 또한 부호화 블록일 수 있으며, 부호화 설정에 따라 다른 단위로 설정되는 변형 또한 가능할 수 있다.
도 7은 대상 블록과 수직적인 관계인 상대 블록의 다양한 배치 예를 나타낸다.
도 7은 재귀적인 트리 기반의 분할(QT)이 수행되는 경우이며, X와 A 내지 C 블록을 중심으로 설명한다. 분할 깊이가 0인 기본 부호화 블록(CTU. C 블록)에서 시작하여 분할 깊이가 증가함에 따라 B(1), X(2), A(3) 블록이 획득될 수 있다. 여기서 대상 블록과 수직적인 관계에 놓인 블록은 상위 블록(또는 조상 블록)과 하위 블록(또는 후손 블록)으로 분류할 수 있다. 이때, 대상 블록(X)의 상위 블록은 B, C 블록일 수 있고, 하위 블록은 A 블록일 수 있다. 여기서, 대상 블록과 상대 블록은 각각 상위 블록과 하위 블록으로 설정될 수 있거나 또는 각각 하위 블록과 상위 블록으로 설정될 수 있다.
예를 들어, 본 예에서는 대상 블록의 분할 깊이(k)를 기준으로 더 큰 값을 갖는 경우 상대 블록은 자(k+1), 손자(k+2) 블록일 수 있고, 더 작은 값을 갖는 경우 상대 블록은 부(k-1), 조부(k-2) 블록일 수 있다. 즉, 기존의 블록 간의 수직적인 관계를 정의하는 것에 추가로 상기 분할 깊이 등을 통해 블록 간의 세부적인 관계를 확인할 수 있다.
여기서, 상기 예와 같이 하나의 트리 방식이 지원되어 공통된 분할 깊이를 통한 비교가 가능할 수 있지만, 복수의 트리 방식이 지원되어 각 트리 방식에 따른 하나 이상의 분할 깊이가 지원되는 경우 상기 예와 같은 단순 분류가 아닌 분할 횟수, 각 분할 깊이 등을 고려하여 세부적인 관계를 확인할 수 있다.
예를 들어, 4M x 4N인 블록에서 QT가 1번이 수행되는 경우 2M x 2N 블록이 (QT) 분할 깊이 1에서 획득될 수 있지만, BT는 2번 수행되는 경우 2M x 2N 블록이 획득될 수 있지만, (BT) 분할 깊이는 2에서 획득될 수 있는 것과 같다. 이때, 4M x 4N 블록은 2M x 2N 블록 기준으로 부(QT) 또는 조부(BT) 블록일 수 있고, 반대로 자(QT) 또는 손자(BT) 블록일 수 있으며, 이는 블록 분할 결과에 기반하여 세부적인 관계가 정해질 수 있다.
상기 예의 경우 분할의 시작 단위가 최대 부호화 단위(최고 조상 블록, 블록이 가질 수 있는 최대 크기. 여기서는 부호화 단위 또는 블록임을 가정하지만 블록이 예측, 변환 등의 단위일 경우에는 최대 예측 블록, 최대 변환 블록 등으로 이해할 수도 있음)로 최대 부호화 단위를 벗어나는 수직적인 관계를 갖는 경우가 불가능한 제한이 발생하지만, 최대 부호화 단위와 같은 블록 분할 설정과 별개로 부호화 설정에 따라 수직적인 관계를 갖는 블록 구역을 자유롭게 지정할 수 있다. 본 발명에서는 최대 부호화 단위를 벗어나지 않는 수직적인 관계에 관한 경우를 가정한다. 또한, 트리 기반의 분할 방식을 중심으로 블록 간의 관계를 후술할 것이지만, 인덱스 기반의 분할 방식에도 동일하거나 비슷한 적용이 가능할 수 있음을 미리 언급한다.
대상 블록의 부호화를 위해 수직적인 관계에 있는 상대 블록의 부호화 정보/참조 설정 등을 사용할 수 있다. 설명의 편의를 위해 대상 블록은 상대 블록의 하위 블록인 경우를 가정한다. 이때, 상위 블록은 부호화, 예측, 변환 등을 수행하는 독립적인 단위가 아니며, 복수의 하위 블록들로 인해 구성되는 임시 단위일 수 있다. 즉, 부호화를 수행하는 독립적인 단위(즉, 더 이상 분할이 수행되지 않는 부호화/예측/변환 블록 등)를 획득하기 위한 블록 분할 과정의 시작 단위 또는 중간 단위임을 이해할 필요가 있다.
일 예로, 대상 블록의 예측값 생성을 위해 상대 블록의 참조 화소가 사용될 수 있다. 상세하게는, 화면내 예측에서 상대 블록의 참조 화소를 외삽, 내삽, 평균 등의 방법 또는 템플릿 매칭 등의 방법을 적용하여 대상 블록의 예측값을 획득할 수 있다. 또한, 화면간 예측에서 상대 블록의 참조 화소를 템플릿 매칭 등의 방법을 사용하여 대상 블록의 예측값을 획득할 수 있다.
여기서, 상대 블록의 참조 화소란 상대 블록 내에 위치하는 화소가 아니며, 상대 블록이 화면내 예측/화면간 예측을 수행하는 단위임을 가정하여 획득된 화소를 의미한다. 즉, 상대 블록(상위 블록)에 수평적인 관계에 위치한 블록(예로, 좌, 상, 좌상, 우상, 좌하 방향에 최인접)의 화소를 대상 블록(하위 블록)의 화면내 예측/화면간 예측에 사용함을 의미한다.
일 예로, 대상 블록의 참조 설정을 위해 상대 블록의 참조 설정을 사용할 수 있다. 상세하게는, 화면내 예측에서 상대 블록의 MPM 후보군을 대상 블록의 MPM 후보군으로 사용할 수 있다. 또한, 화면간 예측에서 상대 블록의 움직임 예측 후보군을 대상 블록의 움직임 예측 후보군으로 사용할 수 있다. 즉, 상기 후보군을 상대 블록에 기반하여 구성하였다 할지라도 대상 블록에서 따로 후보군 구성을 통하지 않고 상대 블록의 후보군을 그대로 사용할 수 있음을 의미한다.
상기 예는 대상 블록이 아닌 상대 블록을 중심으로 예측값 및 참조 설정이 정해지는 것이므로, 대상 블록과는 상관성이 떨어지는 정보를 사용하여 부호화를 수행하는 문제점이 발생할 수 있다. 다만, 공간적으로 완전 동떨어진 영역에서 관련 정보가 획득되는 것은 아니기 때문에 어느 정도의 상관성은 존재할 가능성이 높으며, 각 하위 블록 단위로 수행되어야 하는 과정을 상위 블록에서 공통되는 하나의 과정으로 통합하는 것과 동일하여 복잡도가 감소될 수 있다. 또한, 상위 블록에 속한 하위 블록의 병렬 처리가 가능할 수도 있다.
상기 예를 통해 상대 블록은 대상 블록과 수직적인 관계를 갖는 하나의 블록임을 가정하여 설명하였지만 영상 내 수많은 상대 블록이 존재할 수 있으며, 대상 블록의 부호화에 사용하기 위한 하나 이상의 상대 블록을 특정해야 한다.
다음은 수직적인 관계를 갖는 블록이 가질 수 있는 지원 조건/범위에 대한 설명을 나타내며, 후술하는 예에서 언급된 전부 또는 일부 요소에 기초하여 정해질 수 있다.
(case 1) 상위 블록은 소정의 제 1 문턱크기보다 작거나 같을 수 있다. 여기서, 제 1 문턱크기는 상위 블록이 가질 수 있는 최대 크기를 의미할 수 있다. 여기서, 제 1 문턱크기는 너비(W), 높이(H), W x H, W*H 등으로 표현될 수 있으며, W와 H는 8, 16, 32, 64 또는 그 이상의 정수일 수 있다. 여기서, 제 1 문턱크기를 갖는 블록은 최대 부호화 블록, 최대 예측 블록, 최대 변환 블록 등의 크기에 기반하여 설정될 수도 있다.
(case 2) 하위 블록은 소정의 제 2 문턱크기보다 크거나 같을 수 있다. 여기서, 제 2 문턱크기는 하위 블록이 가질 수 있는 최소 크기를 의미할 수 있다. 여기서, 제 2 문턱크기는 너비(W), 높이(H), W x H, W*H 등으로 표현될 수 있으며, W와 H는 4, 8, 16, 32 또는 그 이상의 정수일 수 있다. 단, 제 2 문턱크기는 제 1 문턱크기보다 작거나 같도록 설정될 수 있다. 여기서, 제 2 문턱크기를 갖는 블록은 최소 부호화 블록, 최소 예측 블록, 최소 변환 블록 등의 크기에 기반하여 설정될 수도 있다.
(case 3) 상위 블록의 크기에 기반하여 하위 블록의 최소 크기가 정해질 수 있다. 여기서, 상위 블록의 너비(W), 높이(H)를 기준으로 소정의 나눔값(p) 또는 쉬프트 연산값(q. 오른쪽 쉬프트 연산) 등이 너비와 높이 중 최소 하나에 적용되어 하위 블록의 최소 크기(예로, W%p 또는 H>>q 등)가 정해질 수 있다. 여기서, 나눔값은 2, 4, 8 또는 그 이상의 정수일 수 있고, 쉬프트 연산값(q)은 1, 2, 3 또는 그 이상의 정수일 수 있다.
(case 4) 하위 블록의 크기에 기반하여 상위 블록의 최대 크기가 정해질 수 있다. 여기서, 하위 블록의 너비(W), 높이(H)를 기준으로 소정의 곱셈값(r) 또는 쉬프트 연산값(s. 왼쪽 쉬프트 연산) 등이 너비와 높이 중 최소 하나에 적용되어 상위 블록의 최대 크기(예로, W*r 또는 H<<s 등)가 정해질 수 있다. 여기서, 곱셈값은 2, 4, 8 또는 그 이상의 정수일 수 있고, 쉬프트 연산값(s)은 1, 2, 3 또는 그 이상의 정수일 수 있다.
(case 5) 상위 블록의 크기와 분할 설정을 고려하여 하위 블록의 최소 크기가 정해질 수 있다. 여기서, 분할 설정은 분할 종류(트리 종류), 분할 깊이(공통 깊이, 트리별 개별 깊이) 등에 의해 정해질 수 있다. 예를 들어, 상위 블록에서 QT가 지원되는 경우에는 분할이 m번 수행되는 블록의 크기가 하위 블록의 최소 크기로 정해질 수 있고, BT(또는 TT)가 지원되는 경우에는 n번 분할이 수행되는 블록의 크기가 하위 블록의 최소 크기로 정해질 수 있으며, QT와 BT(또는 TT)가 지원되는 경우에는 l번 분할이 수행되는 블록의 크기가 하위 블록의 최소 크기로 정해질 수 있다. 여기서, m 내지 l은 1, 2, 3 또는 그 이상의 정수일 수 있으며, (한 번의 분할 동작으로 인해) 더 작은 블록으로 분할(또는 더 많은 개수로 분할)되는 트리의 분할 깊이(m)가 그렇지 않은 트리의 분할 깊이(n)보다 작거나 같도록 설정될 수 있다. 그리고 트리 분할이 혼합되는 경우의 분할 깊이(l)는 더 작은 블록으로 분할되는 트리의 분할 깊이(m)보다 크거나 같고, 그렇지 않은 트리의 분할 깊이(n)보다 작거나 같도록 설정될 수 있다.
또는, 하위 블록의 크기와 분할 설정을 고려하여 상위 블록의 최대 크기가 정해질 수도 있다. 이에 관한 설명에서 상기 예로부터 역으로 유도될 수 있으며 상세한 설명은 생략한다.
대상 블록의 부호화를 위해 사용/참조되는 상대 블록은 다음과 같은 사항을 고려하여 결정될 수 있다.
대상 블록의 부호화에 사용/참조하고자 하는 정보에 기반하여 상대 블록이 정해질 수 있다. 여기서, 대상 블록의 부호화에 사용/참조하고자 하는 정보는 예측을 위한 화소값 정보와 예측/변환/양자화/인루프 필터/엔트로피 부호화 등에 관련된 참조 후보군 정보가 그 대상이 될 수 있다.
또한, 대상 블록의 상태 정보, 대상 블록이 속한 영상 정보 등에 기반하여 상대 블록이 결정될 수 있다. 여기서, 대상 블록의 상태 정보는 블록의 크기, 형태, 가로/세로 길이 비, 픽쳐/분할 단위(슬라이스, 타일 등)/최대 부호화 블록 등의 단위에서의 위치 등에 기반하여 정의될 수 있다. 여기서, 대상 블록이 속한 영상 정보는 영상 타입(I/P/B), 컬러 성분(Y/Cb/Cr) 등에 기반하여 정의될 수 있다.
상기 예에서 언급된 전부 또는 일부 요소를 고려하여 상대 블록의 개수, 크기, 위치 등이 결정될 수 있다. 상세하게는, 수직적인 관계를 갖는 블록의 정보를 대상 블록의 부호화에 사용/참고할 지 결정할 수 있고, (사용/참고하는 경우) 상대 블록의 위치와 크기가 결정될 수 있다. 여기서, 상대 블록의 위치는 블록 내 소정의 좌표(예로, 좌상측 좌표)로 표현할 수 있고, 상대 블록의 크기는 너비(W)와 높이(H)로 표현할 수 있어, 이를 조합하여 상대 블록을 특정할 수 있다.
예를 들어, 하위 블록에 대한 특별한 범위 제한이 없는 경우 상대 블록에 속하는 모든 하위 블록(대상 블록)이 상대 블록의 부호화 정보를 사용/참조할 수 있다. 또는, 하위 블록에 대한 범위가 제한된다면, 상대 블록에 속하며 하위 블록에 대한 크기보다 큰 경우라면 상대 블록의 부호화 정보를 사용/참조할 수 있다. 또한, 상대 블록이 2개 이상 지원되는 경우라면, 상대 블록의 선택 정보가 추가로 발생할 수 있다.
다음은 대상 블록과 수직적인 관계를 갖는 블록에 기반한 후보군 구성 및 부호화/복호화 과정을 나타낸다.
참조되는 블록을 특정하기 위한 기준 블록을 결정한다(1). 결정된 기준 블록을 중심으로 대상 블록의 부호화 정보를 위해 참조되는 블록을 특정한다(2). 특정된 블록의 부호화 정보를 소정의 순서에 따라 후보군을 구성한다(3). 대상 블록의 부호화 정보에 기반하여 후보군 중 하나를 선택한다(4). 선택된 후보에 기반하여 영상 부호화/복호화 과정을 수행한다(5).
(1)에서 대상 블록의 부호화 정보에 관한 후보군 구성을 위해 기준이 되는 블록(기준 블록)을 대상 블록 또는 제 1 상대 블록 중에서 결정한다. 여기서, 제 1 상대 블록은 대상 블록과 수직적인 관계를 갖는 블록(여기서, 상위 블록)일 수 있다.
(2)에서는 상기 과정을 통해 기준 블록이 결정되면 대상 블록의 부호화 정보에 관한 후보군 구성을 위해 사용되는 제 2 상대 블록을 특정한다. 여기서, 제 2 상대 블록은 기준 블록과 수평적인 관계를 갖는 블록일 수 있다. (3)에서는 상기 과정을 통해 특정되는 제 2 상대 블록의 부호화 정보를 소정의 순서에 따라 후보군을 구성한다. 수평적인 관계를 갖는 블록에 대한 설명은 수평적인 관계를 갖는 블록에 기반한 후보군 구성 및 부호화/복호화 과정뿐만 아니라 전술한 다양한 실시예를 통해 유도 가능하므로 상세한 설명은 생략한다.
(4)에서는 대상 블록의 부호화 정보에 기반하여 후보군 중 하나를 선택하며, (5)에서 이에 기반하여 영상 부호화/복호화 과정을 수행할 수 있다.
이때, 블록 간의 수직적인 관계 설정에 기반하여 상위 블록과 하위 블록이 결정되면, 상위 블록에 기반한 후보군 구성 과정은 1번만 수행되기 때문에 하위 블록은 이를 사용/차용할 수 있다. 즉, 상기 순서도는 첫번째로 부호화/복호화가 수행되는 블록에서 발생 가능한 구성일 수 있다. 이미 상위 블록에 기반한 후보군 구성이 완료되었고 일부 순서(2, 3)에서 기준 블록이 상대 블록으로 결정된 경우라면 이미 구성된 후보군을 단순 사용/차용할 수 있다는 내용이 추가될 수도 있다.
상기 예에서는 상위 블록에 기반하여 후보군이 구성되면 하위 블록에서는 이를 단순 사용/차용하는 구성으로 설명되어 있으나, 이에 한정되지 않는다.
예를 들어, 상위 블록에 기반하여 후보군이 구성되더라도 일부 후보는 하위 블록에 상관없이 고정적일 수 있고, 일부 후보는 하위 블록에 기반하여 적응적일 수 있다. 즉, 하위 블록에 기반하여 일부 후보는 삭제/추가/변경될 수 있음을 의미한다. 이때, 하위 블록의 상위 블록 내 위치, 크기 등에 기반하여 상기 삭제/추가/변경이 수행될 수 있다.
즉, 일부 순서(2, 3)에서 기준 블록이 상대 블록으로 결정되었다 할지라도 이미 구성된 후보군에 전부 또는 일부 후보에 대한 변형이 반영된 후보군을 구성할 수 있다.
대상 블록과 상대 블록은 부호화/예측/변환/양자화/인루프 필터 등의 단위 중에 하나일 수 있으며, 대상 블록은 상대 블록과 동일한 단위이거나 또는 상위 단위일 수 있다. 예를 들어, 대상 블록이 부호화 블록일 경우 상대 블록은 부호화 블록일 수 있고, 대상 블록이 부호화 블록일 경우 상대 블록은 예측 블록 또는 변환 블록일 수 있다.
도 8은 대상 블록과 수직적인 관계와 수평적인 관계인 상대 블록의 다양한 배치 예를 나타낸다.
도 8은 재귀적인 트리 기반의 분할(쿼트 트리)이 수행되는 경우이며, X와 A 내지 G, p 내지 t 블록을 중심으로 설명한다. 분할 깊이가 0인 기본 부호화 블록(CTU)에서 시작하여 분할 깊이가 증가함에 q/r/t(1), p/D/E/F/s(2), A/B/C/G/X(3) 블록이 획득될 수 있다. 여기서 대상 블록과 수직적인 관계와 수평적인 관계에 놓인 블록으로 구분할 수 있다. 이때, 대상 블록(X)의 수직적인 관계를 갖는 상대 블록(상위 블록)은 p, q 블록(CTU 제외)일 수 있고, 수평적인 관계를 갖는 상대 블록은 A 내지 G 블록일 수 있다.
여기서, 일부 상대 블록의 경우 대상 블록의 분할 깊이(k)를 기준으로 더 작은 값을 갖는 블록뿐만 아니라 더 큰 값을 갖는 블록이 다수 존재하지만, 본 예에서는 상기 언급된 블록을 대상으로 하며, 대상 블록이 가장 분할 깊이가 큰 경우(즉, 더 이상 분할되지 않는 경우)를 가정한다.
블록 분할은 영상의 특성에 따라 분할 결과가 정해지며, 배경과 같은 평탄한 부분 또는 시간적인 변화가 거의 없는 영역에서는 블록 분할은 최소한으로 이뤄질 수 있고, 복잡한 패턴을 갖고 있는 부분 또는 시간적인 변화가 급격한 영역에서는 블록 분할은 많이 수행될 수 있다.
본 발명의 전술한 예를 통해 많은 수평적인 관계 또는 수직적인 관계를 갖는 블록을 대상 블록의 부호화에 사용/참조할 수 있음을 언급하였다. 후술하는 예를 통해 대상 블록을 중심으로 수평적인 관계를 갖는 블록과 수직적인 관계를 갖는 블록을 함께 고려하여 대상 블록의 부호화에 더 효율적으로 사용하는 방법에 대한 다양한 예시를 제시할 것이다. 그렇기 때문에 전술한 수평 및 수직적인 관계에 관한 설명이 후술하는 내용에 동일하거나 비슷하게 적용될 수 있음을 전제한다.
다음은 블록 분할의 종류(방식)에 따라 수평적인 관계에 놓인 블록 간의 상관성에 대한 다양한 경우를 살펴본다. 이때, 분할 방식은 QT, BT, TT가 지원되며, BT는 대칭 분할(SBT)되고, TT는 1:2:1 비율로 분할됨을 가정한다. 그리고 일반적인 수평 관계에 놓인 블록은 서로 상관성이 높거나 낮을 수 있음(일반적인 관계)을 전제한다. 그리고 각 경우에는 설명되는 하나의 트리 방식만 지원되는 경우를 전제한다.
도 9는 트리 종류에 따라 획득되는 블록 분할에 관한 예시도이다. 여기서, p 내지 r은 QT, BT, TT의 블록 분할 예시를 나타낸다. 블록 내 일부 영역의 특성이 달라 블록 자체의 부호화가 효율적이지 않는 경우에 블록 분할이 수행된다고 가정한다.
QT(p)의 경우 수평과 수직 방향으로 각각 2 분할되는데, 4개의 서브 블록 중 최소 하나의 서브 블록은 다른 특성을 갖는 것을 알 수 있다. 근데 서브 블록이 4개가 획득되어 어떤 특정 서브 블록이 다른 특징을 갖는 것인지 알 수가 없다.
예를 들어, A 내지 D 블록이 모두 다른 특성을 가질 수 있고, A 내지 D 블록 중 하나만 다른 특성을 갖고 나머지는 동일한 특성을 가질 수 있고, A와 B 블록이 동일한 특성을 갖고 C와 D 블록이 동일한 특성을 가질 수 있고, A와 C 블록이 동일한 특성을 갖고 B와 D 블록이 동일한 특성을 가질 수 있다.
만약 A와 B 블록, C와 D 블록이 각각 동일한 특성을 갖고 BT도 지원되는 경우라면 BT 중 수평 분할이 수행될 수 있지만, p와 같이 QT로 분할된 경우라면 A와 B 블록, C와 D 블록은 서로 다른 특성인 것을 알 수 있다. 단, 본 예에서는 QT만 지원되는 경우를 가정하기 때문에 상기 블록 간의 상관성을 정확히 파악할 수가 없다.
대상 블록(상기 서브 블록 중 하나)을 중심으로 분할 깊이가 1 차이인 상위 블록에서 QT만이 지원되어 분할된 경우라면, 대상 블록과 상대 블록(상기 서브 블록 중 대상 블록 외 블록)의 상관성은 높을 수 있거나 낮을 수 있다.
BT(q)의 경우 수평 또는 수직 방향 중 하나로 2분할되는데, 2개의 서브 블록(E와 F 블록)은 서로 다른 특성을 갖는 것임을 알 수 있다. 서브 블록 간의 특성이 동일하거나 비슷한 경우였다면 분할되지 않았을 것이라는 가정 하에 상기 정의로 유도될 수 있다. 대상 블록을 중심으로 분할 깊이가 1 차이인 상위 블록에서 BT만이 지원되어 분할된 경우라면, 대상 블록과 상대 블록의 상관성은 낮을 수 있다.
TT(r)의 경우 수평 또는 수직 방향 중 하나로 3분할되는데, 3개의 서브 블록의 중 최소 하나의 서브 블록은 다른 특성을 갖는 것임을 알 수 있다. 근데 3개의 서브 블록이 획득되어 어떤 특정 서브 블록이 다른 특징을 갖는 것인지 알 수가 없다.
예를 들어, G 내지 I 블록이 모두 다른 특성을 가질 수 있고, G와 H 블록이 동일한 특성을 갖고 I 블록은 다른 특성을 가질 수 있고, H와 I 블록은 동일한 특성을 갖고 G 블록은 다른 특성을 가질 수 있다.
만약 G와 H 블록이 동일한 특성을 갖고 I 블록은 다른 특성을 갖고 BT(비대칭)도 지원되는 경우라면 BT 중 수직 분할(3:1)이 수행될 수 있지만, r과 같이 TT로 분할된 경우라면 G와 H, I 블록은 서로 다른 특성인 것을 알 수 있다. 단, 본 예에서는 TT만 지원되는 경우를 가정하기 때문에 상기 블록 간의 상관성을 정확히 파악할 수가 없다. 대상 블록을 중심으로 분할 깊이가 1 차이인 상위 블록에서 TT만이 지원되어 분할된 경우라면, 대상 블록과 상대 블록의 상관성은 높을 수 있거나 낮을 수 있다.
상기 분할 방식 중 QT와 TT의 경우 블록 간의 상관성이 높거나 낮을 수 있다고 전술하였다. 만약 상기 분할 방식(예로, QT)만 지원되고, 하나를 제외한 나머지의 서브 블록의 부호화 정보를 알고 있는 경우(예로, D 블록)를 가정하자. D 블록을 제외한 나머지 서브 블록(A 내지 C)의 부호화 정보가 동일하거나 비슷할 경우에는 D 블록의 특성이 다르기 때문에 QT로 분할된 경우일 수 있다. 이와 같이 상위 블록에 속하는 하위 블록의 부호화 정보를 확인하여 상관성 정보를 파악하는 것 또한 가능하지만, 발생 확률이 적고 복잡한 경우일 수 있기 때문에 이에 관한 설명은 가능성만 언급하고 상세한 설명은 생략한다. 참고로, 상기의 경우 D 블록은 수평적인 관계의 블록과의 상관성이 낮기 때문에 D 블록의 상위 블록(A와 D를 포함하는 블록)의 후보군 구성 정보를 참조하는 수직적인 관계를 갖는 블록의 부호화 정보를 사용/참조할 수도 있다.
상기 예에서 상위 블록에서 하나의 트리 분할이 지원되는 경우에 서브 블록 간의 상관성에 관하여 설명하였다. 즉, 대상 블록의 부호화를 위해 수평적인 관계를 갖는 블록의 부호화 정보를 사용/참조할 때, 대상 블록과 상대 블록 간의 분할 상태(경로) 등을 확인함으로써 더욱 효율적으로 상대 블록의 부호화 정보를 사용/참조할 수 있다. 예를 들어, 후보군을 구성할 때 상관성이 낮다고 판단되는 블록의 정보는 제외하거나 낮은 우선 순위를 할당할 수 있다. 또는, 수직적인 관계를 갖는 블록의 정보, 참조 설정을 사용할 수 있다.
이때, 하나의 트리 분할이 지원되는 경우란 블록 분할에 하나의 트리 방식만 지원되는 경우를 포함할 수 있고, 복수의 트리 분할이 지원되더라도 각 트리 방식에 따른 블록의 최대값, 최소값, 최대 분할 깊이 등과 이전 분할 깊이에서 분할이 허용되지 않은 트리는 이후 분할 깊이에서 지원되지 않는 블록 분할 설정에 의해 하나의 트리 분할만 지원되는 경우 또한 포함할 수 있다. 즉, QT만 지원되어 QT를 사용하여 분할될 수 있고, QT/BT/TT가 지원되지만 해당 단계에서는 BT만 가능하여 BT를 사용하여 분할될 수 있다.
다음은 복수의 트리 분할이 지원되는 경우에 각 블록 간의 상관관계를 확인하는 경우를 살펴본다.
도 10은 QT, BT, TT로 인해 획득되는 분할 분할에 관한 예시도이다. 본 예에서 최대 부호화 블록은 64 x 64, 최소 부호화 블록은 8 x 8인 경우를 가정한다. 또한, QT가 지원되는 블록의 최대값은 64 x 64, 최소값은 16 x 16이고, BT가 지원되는 블록의 최대값은 32 x 32, 최소값은 블록의 가로/세로 길이 중 하나가 4이고 최대 분할 깊이가 3인 경우를 가정한다. 이때, TT는 BT와 함께 분할 설정이 정해지는 경우(묶여서 사용되는 경우)를 가정한다. 상측 블록(A 내지 M)에는 QT와 BT(QT, BT)가 지원되고, 좌하측 블록(N 내지 P)에는 비대칭 BT(ABT)가 추가 지원(QT, BT<또는, SBT>, ABT)되고, 우하측 블록(Q 내지 S)에는 TT가 추가 지원(QT, SBT, ABT, TT)되는 경우를 가정한다.
(기준 블록: B, C, D, E 을 포함하는 블록)
B 내지 E 블록은 QT(1번 분할)를 통해 획득될 수 있는 서브 블록일 수 있고, BT(1번 수직 분할 + 2번 수평 분할. 또는 1번 수평 분할 + 2번 수직 분할. 분할 횟수 3회)을 통해 획득될 수 있는 서브 블록일 수 있다.
QT가 지원되는 최대 블록크기가 16 x 16이기 때문에 B 내지 E 블록은 QT를 통해 획득 불가능하고, BT를 통해 분할된 서브 블록일 수 있다. 본 예에서는 BT 중 수평 분할이 수행(B+C/D+E)되고, 각 영역에서 수직 분할이 각각 수행(B/C/D/E)된 경우이다. 그렇기 때문에 전술한 것과 같이 동일한 상위 블록(부모 블록. 분할 깊이 1 차이)에서 BT로 획득된 B와 C 블록, D와 E 블록은 각각 상관성이 낮을 수 있다.
또한, B와 D 블록, C와 E 블록이 묶여서 분할이 수행된 것도 아니기 때문에 B와 D 블록, C와 E 블록은 각각 상관성이 낮을 수 있다. 만약 상관성이 높았다면 BT 중 수직 분할만 수행되고, 각 영역에서 분할을 수행하지 않을 수 있기 때문이다.
전술한 예를 통해 BT로 획득된 서브 블록 간의 상관성은 낮다고 언급하였으나 이는 동일한 상위 블록(부모 블록. 분할 깊이 1 차이)에 속하는 서브 블록에 한정되었으나, 본 예에서는 동일한 상위 블록(조부모 블록. 분할 깊이 2 차이)로 확장되어 블록 간의 상관성을 확인하는 경우일 수 있다.
(기준 블록: J, K, L, M 을 포함하는 블록)
J 내지 M 블록은 QT를 통해 획득될 수 있는 서브 블록일 수 있고, BT를 통해 획득될 수 있는 서브 블록일 수 있다.
QT와 BT 둘다 지원 가능한 범위이기 때문에 최적의 분할 형태로 트리 방식이 선택될 수 있다. 본 예에서는 QT가 수행된 경우이다. 전술한 예를 통해 QT를 통해 획득된 서브 블록 간의 상관성은 높거나 낮을 수 있다고 언급하였다. 하지만, 본 예에서는 서브 블록 간의 상관성이 달리 판단될 수 있는데, 이는 복수의 트리 분할이 지원되는 경우이기 때문이다.
J와 K 블록, L과 M 블록은 각각 상관성이 낮을 수 있고, J와 L 블록, K와 M 블록은 각각 상관성이 낮을 수 있다. 만약 J 내지 M 블록 중 수평, 수직 방향에 인접한 블록 간의 상관성이 높았다면, QT가 수행되지 않고 BT가 수행되더라도 상관성이 높은 영역은 분할되지 않을 수 있기 때문이다.
전술한 예를 통해 QT로 획득된 서브 블록 간의 상관성은 높거나 낮을 수 있다고 언급하였으나 이는 단일의 트리 방식이 지원되는 경우였으며, 본 예에서는 복수의 트리 방식이 지원될 경우 블록 분할에 관한 다양한 경우의 수에 기반하여 블록 간의 상관성을 확인하는 경우일 수 있다.
(기준 블록: N, O, P를 포함하는 블록)
N 내지 P 블록은 BT(1번 수평 분할 + 1번 수평 분할)를 통해 획득되는 서브 블록(2:1:1 비율)일 수 있다.
(대칭 BT<SBT>만 지원되는 경우) N와 O 블록은 상관성이 높을 수도 있고 낮을 수도 있다. N 블록의 경우 상위 블록에서 BT를 통해 획득되었기 때문에 O와 P 블록을 묶인 영역과는 상관성이 낮을 수 있다. 하지만, N 블록은 O와 P 블록과의 상관성까지 낮다고 할 수 없다. 물론, N 블록은 O와 P 블록과 상관성이 낮을 수 있다. 또는, N 블록은 O 블록과 상관성이 높고 P 블록과는 상관성이 낮을 수 있고, 그 반대의 경우가 가능할 수 있다.
본 예에서는 비대칭 BT<ABT>이 지원되는 경우일 수 있는데, N과 O 블록이 상관성이 높았다면 N과 O 블록의 영역이 묶여서 3:1 비율의 비대칭 BT의 수평 분할이 수행될 수 있다. 하지만, BT(SBT)가 2번 수행된 경우이기 때문에 N과 O 블록의 상관성이 낮을 수 있다.
(기준 블록: Q, R, S를 포함하는 블록)
Q 내지 S 블록은 TT(1번 수평 분할)를 통해 획득되는 서브 블록일 수 있다.
(TT만 지원되는 경우) Q와 S 블록은 상관성이 높을 수도 있고 낮을 수도 있다. 본 예에서는 비대칭 BT가 지원되는 경우일 수 있는데, Q와 R 블록이 상관성이 높았다면 Q와 R 블록의 영역이 묶여서 3:1 비율의 비대칭 BT 수평 분할이 수행될 수 있다. 하지만, TT가 수행된 경우이기 때문에 Q와 R 블록은 상관성이 낮을 수 있다.
상기 예와 같이 지원되는 분할 방식, 분할 설정 등에 기반하여 대상 블록과 수평적인 관계에 있는 상대 블록과의 상관성을 가늠할 수 있다. 다음을 통해 블록 간의 상관성 관계에 관한 다양한 경우를 살펴보자.
도 11은 분할 방식, 분할 설정에 기반하여 블록 간의 상관성 확인을 위한 예시 그림이다.
(a) 내지 (c)는 각각 QT, BT, TT가 수행된 경우이며, 상위 블록에서 각각 QT, BT, TT만 지원 가능한 경우일 수 있다. 전술한 것과 같이 QT와 TT의 경우 수평 또는 수직 방향으로 인접한 블록(A와 B 또는 A와 C) 간의 상관성이 높거나 낮을 수 있다. 이를 일반 관계라고 지칭한다. 한편, BT의 경우 수평 또는 수직 방향으로 인접한 블록(A와 B) 간의 상관성이 낮을 수 있다. 이를 특수 관계라 지칭한다.
(d)는 QT가 수행된 경우이며 QT와 BT가 지원 가능한 경우일 수 있다. 본 예에서 수평 또는 수직 방향으로 인접한 블록(A와 B 또는 A와 C) 간의 상관성은 낮은 특수 관계일 수 있다. 만약 상관성이 높다면 QT 대신 BT가 적용되었을 수 있다.
(e)는 BT가 수행된 경우(1번 수직 분할 + 1번 수평 분할)이며 QT와 BT가 지원 가능한 경우일 수 있다. A와 B의 경우 동일한 상위 블록에서 BT를 통해 분할된 경우이기 때문에 상관성이 낮은 특수 관계일 수 있다. A와 C의 경우 A와 C의 아래쪽 영역이 상관성이 높다면 함께 묶여서 분할이 수행될 수도 있지만, 부호화 비용 상 C로 분할된 경우일 수 있다. 물론, 그 외의 경우일 수도 있기 때문에 A와 C는 상관성이 높거나 낮은 일반 관계일 수 있다.
(f)는 BT가 수행된 경우(1번 수직 분할 + 1번 수직 분할)이며 BT와 TT가 지원 가능한 경우일 수 있다. A와 C의 경우 동일한 상위 블록에서 BT를 통해 분할된 경우이기 때문에 상관성이 낮은 특수 관계일 수 있다. A와 B의 경우 A와 B가 함께 묶여서 분할이 수행되는 경우(TT의 1:2:1 영역 중 2에 해당하는 부분)는 존재하지만, TT로 인해 왼쪽 영역의 추가 분할이 발생한다. 상기 경우 정확한 상관성 파악은 어렵기 때문에 A와 B는 상관성이 높거나 낮은 일반 관계일 수 있다.
(g)는 TT가 수행된 경우(1번 수직 분할)이며 BT(또는 SBT)와 ABT, TT가 지원 가능한 경우일 수 있다. 본 예에서 수평 또는 수직 방향으로 인접한 블록(A와 B 또는 A와 C) 간의 상관성은 낮은 특수 관계일 수 있다. 만약 상관성이 높다면 TT 대신 ABT가 적용되었을 수 있다.
(h)는 QT와 BT가 수행된 경우(BT는 2번 수직 분할)이며 QT와 BT가 지원 가능<1>하며 추가로 TT가 지원 가능<2>한 경우일 수 있다. A와 B의 경우 <1>의 상황에서는 A와 B가 묶여서 분할 가능한 경우는 존재하지 않기 때문에 상관성이 높거나 낮은 일반 관계일 수 있다. 하지만, <2>의 상황에서는 A와 B가 묶여서 분할 가능한 경우(BT 수평 분할 후. 상측은 BT 수직 분할, 하측은 TT 수직 분할)가 존재하지만, 그럼에도 불구하고 QT와 BT를 사용하여 분할된 것이기 때문에 상관성이 낮은 특수 관계일 수 있다. 본 예는 블록 간의 관계 확인을 위해 분할 깊이가 1 이상의 차이를 갖는 동일한 상위 블록(본 예에서 2 차이)에서 획득 가능한 블록 분할에 관한 경우의 수를 확인하는 경우일 수 있다.
전술한 다양한 예를 통해 대상 블록과 수평적인 관계를 갖는 상대 블록을 사용/참조하기 위해 블록 간의 상관관계를 가늠하는 경우를 확인하였다. 이때, 대상 블록과 동일한 공간에 속하고 인접한 상대 블록을 대상으로 할 수 있다. 특히, 대상 블록과 상대 블록은 수평 또는 수직 방향으로 인접한 블록일 수 있다.
블록 간의 상관관계는 다양한 정보에 기반하여 파악/가늠할 수 있다. 예를 들어, 대상 블록과 상대 블록의 상태 정보(블록의 크기, 형태, 위치 등)에 기반하여 블록 간의 상관관계를 확인할 수 있다.
여기서, 블록의 크기에 기반하여 상관관계를 파악하는 예로, 대상 블록과 맞닿은 경계(수평 또는 수직)에 인접한 상대 블록의 소정의 길이(가로 길이 또는 세로 길이)가 대상 블록의 소정의 길이보다 크거나 같으면 블록 간의 상관성이 많이 높거나 다소 낮을 수 있으며, 이를 일반 관계 A라 지칭한다. 만약 상대 블록의 소정의 길이가 대상 블록의 소정의 길이보다 작으면 블록 간의 상관성이 다소 높거나 많이 낮을 수 있으며, 이를 일반 관계 B라 지칭한다. 이때, 수평 경계를 맞닿은 경우(상측의 블록) 각 블록의 가로 길이, 수직 경계를 맞닿은 경우(좌측의 블록) 각 블록의 세로 길이가 비교될 수 있다.
여기서, 블록의 형태에 기반하여 상관관계를 파악하는 예로, 대상 블록이 직사각 형태일 때 가로/세로 길이 중 긴 쪽의 경계에 인접한 상대 블록과의 상관관계는 일반 관계 A이며, 짧은 쪽의 경계에 인접한 상대 블록과의 상관관계는 일반 관계 B일 수 있다.
상기 설명은 블록의 상태 정보에 기반하여 블록 간의 상관관계를 파악하는 일부 예시일 수 있으며, 다양한 변형의 예가 가능할 수 있다. 블록의 상태 정보뿐만 아니라 다양한 정보에 기반하여 블록 간의 상관관계를 파악하는 것이 가능할 수 있다.
다음은 대상 블록과 수평적인 관계를 갖는 상대 블록과의 상관관계를 확인하기 위한 과정을 설명한다.
(영상 내 블록 분할 설정 확인)
<1> 영상 내 블록 분할에 관한 다양한 설정 정보를 확인할 수 있다. 부호화/예측/변환 등의 단위(본 예에서 대상 블록은 부호화 단위라 가정)의 최대 블록 크기, 최소 블록 크기 등의 지원되는 범위 정보를 확인한다. 일 예로, 최대 부호화 블록은 128 x 128, 최소 부호화 블록은 8 x 8임을 확인할 수 있다.
<2> 지원되는 분할 방식을 확인하고, 각 분할 방식이 지원되는 최대 블록 크기, 최소 블록 크기, 최대 분할 깊이 등의 조건을 확인한다. 일 예로, QT가 지원되는 블록의 최대 크기는 128 x 128, 최소 크기는 16 x 16일 수 있고, BT와 TT가 지원되는 블록의 최대 크기는 각각 128 x 128, 64 x 64이고 최소 크기는 공통의 4 x 4이며 최대 분할 깊이는 4일 수 있다.
<3> 분할 방식에 할당되는 우선 순위와 같은 설정을 확인한다. 일 예로, QT로 분할이 되면 그 하위 블록(서브 블록)에서 또 QT가 지원될 수 있고, QT로 분할되지 않고 다른 방식으로 분할이 되면 그 하위 블록에서는 QT가 지원되지 않을 수 있다.
<4> 복수의 분할 방식이 지원되는 경우 분할 방식에 따라 중복되는 결과를 피하기 위해 일부 분할이 금지되는 조건을 확인할 수 있다. 일 예로, TT가 수행된 후 가운데 영역에 대해서는 BT의 수직 분할은 금지할 수 있다. 즉, 각 분할 방식에 따라 발생 가능한 중복되는 분할 결과를 막기 위해 사전에 금지되는 분할이 금지되는 설정 정보를 확인한다.
<1> 내지 <4>의 전부 또는 일부, 그리고 추가적인 다른 설정 정보를 확인하여, 영상 내 획득 가능한 블록 후보를 확인할 수 있다. 이는 후술하는 대상 블록과 상대 블록에 따라 획득 가능한 블록 후보를 확인하는데 참조될 수 있다.
(블록의 정보 확인)
대상 블록과 상대 블록의 크기, 형태, 위치 등의 상태 정보를 확인할 수 있다. 여기서, 블록의 위치가 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭, 블록 등의 단위의 경계 위치하는지 또는 내부에 위치하는지 확인한다.
상기 단위 중 블록은 최대 부호화 블록으로 설정할 수 있는데, 최대 부호화 블록은 대상 블록의 상위 블록(최고 조상 블록)일 수 있으나 영상의 특성에 따라 획득되는 형태가 아닌 픽쳐 단위에서 일괄적으로 구획된 단위이다. 그렇기 때문에 대상 블록이 속한 최대 부호화 블록과 다른 최대 부호화 블록에 속한다면 블록 간의 상관관계는 확인할 수 없기 때문에 경계에 속하는지 확인하는 과정이 필요하다.
또한, 픽쳐, 슬라이스 등의 다른 단위는 최대 부호화 블록의 정수배로 구성되거나 또는 참조가 불가능한 설정을 가지고 있기 때문에, 경계가 아닌 경우에만 상관관계를 확인하는 과정이 수행될 수 있다. 즉, 경계가 아닌 경우에만 상관관계를 확인할 수 있다.
대상 블록과 상대 블록의 크기, 형태, 위치는 각 블록의 분할 상태 또는 각 블록이 획득된 분할 경로를 확인하는데 사용될 수 있다. 이에 관한 상세한 설명은 후술한다.
(분할 상태 확인 및 공통되는 상위 블록 확인)
대상 블록과 상대 블록의 분할 상태를 확인할 수 있다. 여기서 분할 상태는 각 블록이 획득된 분할 경로를 의미할 수 있다. 분할 상태 확인을 통해 각 블록의 상위 블록을 확인하는 과정이 수행될 수 있는데, 여기서 상위 블록이란 각 블록의 수직적인 관계를 갖는 블록을 의미할 수 있다. 각 블록의 크기, 형태, 위치 등의 상태 정보와 분할 경로에 기반하여 획득되는 상위 블록을 확인하는 과정이 수행된다.
일 예로, 대상 블록은 위치(좌상측 기준)가 (32, 32), 너비와 높이는 8 x 8, 분할 깊이는 p, 분할 경로는 (QT/1 - BT/h/0 - BT/v/1)과 같은 상태 정보가 획득될 수 있다. 상대 블록은 위치가 (24, 32), 너비와 높이는 8 x 8, 분할 깊이는 q, 분할 경로는 (QT/1 - BT/h/0 - BT/v/0)과 같은 상태 정보를 확인할 수 있다. 여기서, 분할 경로는 분할 방식/분할 방향(h는 수평, v는 수직. 없으면 생략)/분할 위치(QT의 경우 0 ~ 3, BT의 경우 0 ~ 1 등)로 표현될 수 있다.
본 예에서 대상 블록의 상위 블록(부모 블록, 분할 깊이 1 차이)은 (24, 32), 너비와 높이는 16 x 8, 분할 깊이는 p-1, 분할 경로는 (QT/1 - BT/h/0)과 같은 상태 정보가 획득될 수 있다. 본 예에서 상대 블록의 상위 블록(분할 깊이 q - 1)은 대상 블록의 상위 블록과 동일한 경우일 수 있다.
일 예로, 대상 블록은 위치가 (128, 64), 너비와 높이는 16 x 32, 분할 깊이는 p, 분할 경로는 (QT/3 - QT/2 - BT/v/1)과 같은 상태 정보가 획득될 수 있다. 상대 블록은 위치가 (120, 64), 너비와 높이는 8 x 32, 분할 깊이는 q, 분할 경로는 (QT/3 - QT/2 - BT/v/0 - BT/v/1)과 같은 상태 정보가 획득될 수 있다.
본 예에서 대상 블록의 상위 블록(부모 블록, 분할 깊이 1 차이)은 (112, 64), 너비와 높이는 32 x 32, 분할 깊이는 p - 1, 분할 경로는 (QT/3 - QT/2)와 같은 상태 정보가 획득될 수 있다.
반면, 상대 블록의 상위 블록(부모 블록, 분할 깊이 1 차이)은 (112, 64), 너비와 높이는 16 x 32, 분할 깊이는 q - 1, 분할 경로는 (QT/3 - QT/2 - BT/v/0)와 같은 상태 정보가 획득될 수 있다. 상대 블록의 상위 블록(조부모 블록, 분할 깊이 2 차이)은 (112, 64), 너비와 높이는 32 x 32, 분할 깊이 q - 2, 분할 경로는 (QT/3 - QT/2)와 같은 상태 정보가 획득될 수 있는데, 이는 대상 블록의 상위 블록(부모 블록)과 동일한 상위 블록임을 알 수 있다.
상기 예와 같이 분할 상태에 기반하여 각 블록의 상위 블록을 확인하는 과정이 수행될 수 있고, 공통의 상위 블록을 확인하는 과정이 수행될 수 있다.
정리하면, 대상 블록과 상대 블록을 기준으로 분할 깊이 차이가 1 이상인 상위 블록을 확인할 수 있다. 일 예로, 대상 블록과 분할 깊이 차이가 c인 상위 블록과 상대 블록과 분할 깊이 차이가 d인 상위 블록은 서로 동일할 수 있다. 이때, c와 d는 1, 2 또는 그 이상의 정수일 수 있고, c와 d는 동일하거나 동일하지 않을 수 있다.
여기서, 분할 깊이 차이가 큰 상위 블록을 확인하는 것은 복잡도나 상관관계 파악이 어려운 경우라 불필요할 수 있다. 예를 들어, 상위 블록이 최대 부호화 블록에서 공통되는 경우에는 블록 간의 상관성을 확인하기 어려운 상황일 수 있다.
이를 위해 상기 c와 d에 대한 소정의 제 1문턱값(최대값)이 존재할 수 있으며, 제 1문턱값은 1, 2 또는 그 이상의 정수일 수 있다. 또는, c와 d의 합에 관한 소정의 제 2문턱값이 존재할 수 있으며, 제 2문턱값은 2, 3 또는 그 이상의 정수일 수 있다. 즉, 상기 문턱값 조건을 벗어나는 경우에는 블록 간의 상관관계를 확인하지 않는다.
대상 블록과 상대 블록의 상위 블록이 동일한지 확인하기 위한 다양한 방법이 존재할 수 있다. 예를 들어, 상위 블록의 소정의 위치 또는 블록의 너비와 높이 정보로 확인할 수 있다. 상세하게는, 상위 블록의 좌상측 좌표와 블록의 너비와 높이 정보를 통해 동일한 상위 블록인지 여부를 확인할 수 있다.
(획득 가능한 후보 확인)
대상 블록과 상대 블록의 공통되는 상위 블록을 획득하면, 해당 상위 블록에서 획득 가능한 다양한 블록 분할의 경우의 수를 확인할 수 있다. 이는 블록 분할 설정과 상기 상위 블록의 분할 상태에 기반하여 확인할 수 있으며, 이에 대해서 전술한 다양한 예를 통해 언급하였으므로 상세한 설명은 생략한다.
(상관관계 확인)
블록 간의 상관관계를 확인하기 위하여 본 예에서는 다음과 같은 사항을 확인할 수 있다. 본 예에서는 각 블록에서 분할 깊이 차이의 최대값이 2인 경우를 가정한다.
<1> 상위 블록이 대상 블록과 상대 블록을 기준으로 분할 깊이 1의 차이가 나는 경우에는 지원 가능한 분할 방식을 확인한다.
하나의 분할 방식만 가능한 경우에는 분할 방식에 따라 상관관계를 결정할 수 있다. 만약 QT나 TT인 경우에는 일반 관계(상관성이 높거나 낮을 수 있음)로 설정하고, BT인 경우에는 특수 관계로 설정할 수 있다.
복수의 분할 방식이 가능한 경우에 대상 블록과 상대 블록이 묶여서 분할되는 경우가 존재하는지 확인한다. 만약 존재하면 특수 관계로 설정하고, 존재하지 않는다면 일반 관계로 설정한다.
<2> 상위 블록이 대상 블록과 상대 블록을 기준으로 최소 하나가 분할 깊이 2의 차이가 나는 경우에 지원 가능한 분할 방식을 확인한다.
하나의 분할 방식만 가능한 경우에는 분할 방식과 상관없이 일반 관계로 설정할 수 있다.
복수의 분할 방식이 가능한 경우에는 대상 블록과 상대 블록이 묶여서 분할되는 경우가 존재하는지 확인한다. 만약 존재하면 특수 관계로 설정하고, 존재하지 않는다면 일반 관계로 설정한다.
상기 예는 블록 간의 상관관계 확인을 위한 일부 경우이며, 이에 한정되지 않고 다양한 변형 및 추가되는 구성이 가능할 수 있다. 상기 과정을 통해 확인한 블록 간의 상관관계를 참조하여 대상 블록의 부호화에 사용/참조할 수 있다.
정리하면, 대상 블록과 상대 블록의 상관관계를 파악하기 위해 (영상 내 블록 분할 확인), (블록의 정보 확인), (분할 상태 확인 및 공통되는 상위 블록 확인), (획득 가능한 후보 확인), (상관관계 확인) 등의 과정 전부 또는 일부를 사용할 수 있으며, 상기 나열된 순서가 아닌 다양한 순서로 상관관계를 파악하는 과정이 수행될 수 있다. 또한, 상기 언급된 것에 한정되지 않고 일부 구성의 변경 또는 추가적인 구성 등의 결합을 통해 상관관계를 파악할 수 있다. 또는, 다른 구성의 상관관계 파악 과정이 수행될 수도 있으며, 상기 과정을 통해 파악한 블록 간의 상관관계에 기반하여 대상 블록의 부호화에 상대 블록의 정보를 사용/참조할 수 있다.
상기 과정을 통해 파악한 상관관계는 블록 간의 특성에 관한 절대적인 사실이 아닐 수 있으며, 블록 분할 등을 고려하여 블록 간의 상관관계를 가늠한 예측 정보일 수 있다. 따라서, 대상 블록의 부호화 정보를 위한 후보군 구성 등에 참고되는 정보일 수 있기 때문에, 상관성이 낮다고 판단되는 상대 블록을 후보군 포함에 제외할 수 있고, 확인된 상관관계가 정확하지 않을 가능성을 고려하여 후보군 구성에 관한 우선 순위를 후순위로 두거나 수직적인 관계를 갖는 상위 블록의 후보군 정보를 차용하는 등의 설정이 가능할 수 있다. 또한, 상기 예에서는 블록 간의 상관관계가 2가지로 분류되는 경우를 가정하였지만, 2, 3 또는 그 이상의 분류 카테고리가 지원될 수 있다.
블록 간의 상관관계를 대상 블록의 부호화(후보군 구성 등)에 사용/참조할 지 여부는 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭, 블록 등의 단위에서 명시적으로 정해질 수 있거나 또는 부호화 설정에 기반하여 묵시적으로 정해질 수 있다. 다음은 상기 부호화 설정을 구성하는 다양한 정보에 대한 예시를 살펴본다.
여기서, 대상 블록의 부호화에 사용/참조하고자 하는 정보에 따라 블록 간의 상관관계 참조여부가 정해질 수 있다. 예를 들어, 화면내 예측 모드 후보군 구성을 위해 블록 간의 상관관계를 고려할 수 있고, 화면간 예측 중 이동 외 움직임 모델을 표현하는 움직임 벡터 예측을 위해 후보군 구성을 위해 블록 간의 상관관계는 고려하지 않을 수 있다.
여기서, 대상 블록의 상태 정보, 대상 블록이 속한 영상 정보 등에 기반하여 블록 간의 상관관계 참조여부가 정해질 수 있다. 여기서, 대상 블록의 상태 정보는 블록의 크기, 형태, 가로/세로 길이 비, 픽쳐/분할 단위(슬라이스, 타일 등)/최대 부호화 블록 등의 단위에서의 위치 등에 기반하여 정의될 수 있다. 여기서, 대상 블록이 속한 영상 정보는 영상 타입(I/P/B), 컬러 성분(Y/Cb/Cr) 등에 기반하여 정의될 수 있다. 예를 들어, 소정의 범위에 속하는 블록의 크기를 갖는 경우에만 블록 간의 상관관계를 참조할 수 있고, 소정의 범위를 벗어나는 경우에는 블록 간의 상관관계를 참조할 수 없다. 이때, 소정의 범위는 제 1 문턱크기(최소값)과 제 2 문턱크기(최대값)에 의해 정의될 수 있고, 각 문턱크기는 너비(W)와 높이(H)로 W, H, W x H, W*H로 표현될 수 있으며, W와 H는 4, 8, 16 등의 1 이상의 정수일 수 있다.
여기서, 상대 블록의 카테고리(수평적인 관계를 갖는 상대 블록의 위치 관련 설명에서 유도 가능)에 따라 블록 간의 상관관계 참조여부가 정해질 수 있다. 예를 들어, 상대 블록은 대상 블록과 동일한 공간에 속하고 인접한 블록일 수 있다. 만약 대상 블록과 동일한 공간에 속하더라도 인접하지 않는 상대 블록인 경우에는 상관 관계를 참조하지 않을 수 있다.
상기 예에서 언급된 전부 또는 일부 요소를 고려하여 부호화 설정이 정의될 수 있으며, 이에 따라 묵시적으로 블록 간의 상관관계 참조여부를 결정할 수 있다.
다음은 대상 블록과 수평적인 관계를 갖는 블록에 기반한 후보군 구성 및 부호화/복호화 과정을 나타낸다.
대상 블록과 참조 가능성이 존재하는 블록 간의 상관관계를 확인한다(1). 대상 블록의 부호화 정보를 위해 참조되는 블록을 상관관계에 기반하여 특정한다(2). 특정된 부호화 정보를 소정의 순서에 따라 후보군을 구성한다(3). 대상 블록의 부호화 정보에 기반하여 후보군 중 하나를 선택한다(4). 선택된 후보에 기반하여 영상 부호화/복호화 과정을 수행한다(5).
(1)에서는 대상 블록과 상대 블록으로 고려될 가능성이 존재하는 블록 간의 상관관계를 확인한다. (2)에서는 대상 블록의 부호화 정보에 관한 후보군 구성을 위해 사용되는 블록을 (1)을 통해 확인된 상관관계에 기반하여 특정한다. 즉, 확인된 상관관계 결과에 기반하여 상대 블록으로 포함할지 여부를 결정하는 것을 의미할 수 있다. 물론, 전술한 수평적인 관계를 갖는 상대 블록의 특정을 설명한 내용이 본 예에서 함께 고려될 수 있다.
(3)에서는 상기 과정을 통해 특정되는 상대 블록의 부호화 정보를 소정의 순서에 따라 후보군을 구성한다. 이때, 소정의 순서는 (2)를 통해 포함되거나 포함되지 않는 상대 블록을 고려한 적응적인 순서가 지원될 수 있다. (4)에서는 대상 블록의 부호화 정보에 기반하여 후보군 중 하나를 선택하며, (5)에서는 이에 기반하여 영상 부호화/복호화 과정을 수행할 수 있다.
상기 순서도는 상관관계에 기반하여 상관성이 낮다고 판단되는 블록은 상대 블록으로 포함하지 않는 경우일 수 있다.
다음은 대상 블록과 수평적인 관계를 갖는 블록에 기반한 후보군 구성 및 부호화/복호화 과정의 다른 예를 나타낸다.
대상 블록의 부호화 정보를 위해 참조되는 블록을 특정한다(1). 대상 블록과 특정된 블록 간의 상관관계를 확인한다(2). 대상 블록의 부호화 정보와 (2)를 통해 확인된 상관관계에 기반하여 소정의 순서를 결정하고 이에 따라 후보군을 구성한다(3). 대상 블록의 부호화 정보에 기반하여 후보군 중 하나를 선택한다(4). 선택된 후보에 기반하여 영상 부호화/복호화 과정을 수행한다(5).
(1)에서는 대상 블록의 부호화 정보에 관한 후보군 구성을 위해 사용되는 상대 블록을 특정한다. (2)에서는 대상 블록과 상대 블록 간의 상관관계를 확인한다. (3)에서는 (2)를 통해 확인된 상관관계에 기반하여 후보군 포함 순서를 결정할 수 있다.
예를 들어, 상관성이 높거나 낮을 경우에는 기 정의된 순서를 따를 수 있고, 상관성이 높을 경우에는 해당 상대 블록을 선수위로 두는 순서에 따를 수 있고, 상관성이 낮을 경우에는 해당 상대 블록을 후순위로 두는 순서를 따를 수 있다.
이어서, (3)에서는 상기 과정을 통해 후보군 구성 순서가 정해지면 그 순서에 따라 후보군을 구성할 수 있다. (4)에서는 대상 블록의 부호화 정보에 기반하여 후보군 중 하나를 선택하며, (5)에서는 이에 기반하여 영상 부호화/복호화 과정을 수행할 수 있다.
상기 순서도는 상관관계에 기반하여 후보군 포함 순서를 적응적으로 설정하는 경우일 수 있다.
다음은 대상 블록과 수평적인 또는 수직적인 관계를 갖는 블록에 기반한 후보군 구성 및 부호화/복호화 과정의 예를 나타낸다. 여기서, 참조되는 블록을 특정하기 위한 기준 블록은 대상 블록으로 설정되어 시작됨을 가정한다.
대상 블록과 참조 가능성이 존재하는 블록 간의 상관관계를 확인한다(1).
(대상 블록과 상관성이 낮다고 판단되는 블록이 소정의 개수 미만/이하)
대상 블록의 부호화 정보를 위해 참조되는 블록을 상관관계에 기반하여 특정한다(2A). 특정된 부호화 정보를 소정의 순서에 따라 후보군을 구성한다(3A).
(대상 블록과 상관성이 낮다고 판단되는 블록이 소정의 개수 초과/이상)
참조되는 블록을 특정하기 위한 기준 블록을 소정의 상위 블록으로 변경한다(2B). 변경된 기준 블록을 중심으로 대상 블록의 부호화 정보를 위해 참조되는 블록을 특정한다(3B). 특정된 블록의 부호화 정보를 소정의 순서에 따라 후보군을 구성한다(4B).
대상 블록의 부호화 정보에 기반하여 후보군 중 하나를 선택한다(5). 선택된 후보군에 기반하여 영상 부호화/복호화 과정을 수행한다(6)
상기 순서도는 상관관계 판단 결과에 따라 1 - 2A - 3A - 5 - 6의 순서(P) 또는 1 - 2B - 3B - 4 - 5 - 6의 순서(Q) 중 하나로 결정되는 구성일 수 있다. 상세하게는, 대상 블록과 상관성이 낮다고 판단되는 블록이 적을 경우에는 해당 블록을 제외한 나머지 블록을 상대 블록으로 특정하는 경우이고, 대상 블록과 상관성이 낮다고 판단되는 블록이 많을 경우에는 후보군 구성의 기준 블록을 대상 블록보다 상위 블록으로 변경하여 상위 블록의 수평적인 관계를 갖는 블록을 상대 블록으로 특정하는 경우이다.
P 순서의 경우 상관성이 낮다고 판단되는 블록을 상대 블록에 포함시키지 않는 전술한 일부 순서도 구성과 동일하므로 상세한 설명은 생략한다. Q의 순서는 수직적인 관계를 갖는 블록에 기반한 후보군 구성과 결합된 구성일 수 있는데, 대상 블록과 인접한 블록은 상관성이 낮은 블록으로 구성되어 있는 경우에 후보군 구성에 기준이 되는 블록 단위를 변경하여 후보군을 구성하는 예시일 수 있다. 다음 설명에서 이전과 중복적인 설명은 생략하고, 차이나는 부분에 집중한다.
(2B)에서 후보군 기준이 되는 블록을 제 1 상대 블록으로 변경한다. 여기서, 제 1 상대 블록은 대상 블록과 수직적인 관계를 갖는 블록(여기서, 상위 블록)일 수 있다.
(3B)에서 대상 블록의 부호화 정보에 관한 후보군 구성을 위해 사용되는 제 2 상대 블록을 특정한다. 여기서, 제 2 상대 블록은 기준 블록과 수평적인 관계를 갖는 블록일 수 있으며, 기준 블록은 상위 블록이다. (4B)에서는 상기 과정을 통해 특정되는 제 2 상대 블록의 부호화 정보를 소정의 순서에 따라 후보군을 구성한다.
여기서, 대상 블록과 상관성이 낮다고 판단되는 기준은 상기 순서도에서는 블록의 개수로 구분하는 경우를 설명하지만, 다양한 판단되는 기준의 설정이 가능할 수 있다.
상기 다양한 예를 통해 블록 간의 다양한 관계를 살펴보았고, 이를 이용하여 부호화/복호화가 수행되는 경우에 대해 살펴보았다. 후술하는 다양한 부호화/복호화 과정에서 전술한 블록 간의 관계에 기반한 알고리즘을 설명할 때, 상세한 설명을 덧붙이지 않더라도 전술한 다양한 실시예를 통해 제시한 설정 등이 동일하거나 비슷하게 적용될 수 있음을 이해하여야 한다.
(화면간 예측)
본 발명의 일 실시예에 따른 영상 부호화 방법에서 화면간 예측은 다음과 같이 구성될 수 있다. 예측부의 화면간 예측은 참조 픽쳐 구성 단계, 움직임 추정 단계, 움직임 보상 단계, 움직임 정보 결정 단계 및 움직임 정보 부호화 단계를 포함할 수 있다. 또한, 영상 부호화 장치는 참조 픽쳐 구성 단계, 움직임 추정 단계, 움직임 보상 단계, 움직임 정보 결정 단계 및 움직임 정보 부호화 단계를 구현하는 참조 픽쳐 구성부, 움직임 추정부, 움직임 보상부, 움직임 정보 결정부 및 움직임 정보 부호화부를 포함하도록 구성할 수 있다. 전술한 과정의 일부는 생략될 수 있거나 다른 과정이 추가될 수 있고, 상기 기재된 순서가 아닌 다른 순서로 변경될 수 있다.
본 발명의 일 실시예에 따른 영상 복호화 방법에서 화면간 예측은 다음과 같이 구성될 수 있다. 예측부의 화면간 예측은 움직임 정보 복호화 단계, 참조 픽쳐 구성 단계, 움직임 보상 단계를 포함할 수 있다. 또한, 영상 복호화 장치는 움직임 정보 복호화 단계, 참조 픽쳐 구성 단계, 움직임 보상 단계를 구현하는 움직임 정보 복호화부, 참조 픽쳐 구성부, 움직임 보상부를 포함하도록 구성할 수 있다. 전술한 과정의 일부는 생략될 수 있거나 다른 과정이 추가될 수 있고, 상기 기재된 순서가 아닌 다른 순서로 변경될 수 있다.
영상 복호화 장치의 참조 픽쳐 구성부, 움직임 보상부는 영상 부호화 장치의 대응되는 구성과 동일한 역할을 수행하므로 상세한 설명은 생략하며, 움직임 정보 복호화부는 움직임 정보 부호화부에서 사용한 방식을 역으로 사용하여 수행될 수 있다. 여기서, 움직임 보상부를 통해 생성되는 예측 블록은 가산부로 송신할 수 있다.
도 12는 화면간 예측을 통해 예측 블록을 획득하는 다양한 경우를 나타내는 예시도이다.
도 12를 참조하면, 단방향 예측은 이전에 부호화된 참조 픽쳐(T-1, T-2)로부터 예측 블록(A. 전방향 예측)을 획득할 수 있거나 이후에 부호화된 참조 픽쳐(T+1, T+2)로부터 예측 블록(B. 후방향 예측)을 획득할 수 있다. 양방향 예측은 이전에 부호화된 복수의 참조 픽쳐(T-2 내지 T+2)로부터 예측 블록(C, D)을 생성할 수 있다. 일반적으로 P 영상 타입은 단방향, B 영상 타입은 양방향 예측을 지원할 수 있다.
상기 예와 같이 현재 픽쳐의 부호화에 참조되는 픽쳐는 메모리로부터 획득될 수 있으며 현재 픽쳐(T)를 기준으로 시간 순서 또는 디스플레이 순서(Display Order)가 현재 픽쳐 이전의 참조 픽쳐와 이후의 참조 픽쳐를 포함하여 참조 픽쳐 리스트를 구성할 수 있다.
현재 영상을 기준으로 이전 또는 이후 영상뿐만 아니라 현재 영상에서 화면간 예측(E)을 수행할 수 있다. 현재 영상에서 화면간 예측을 수행하는 것을 무방향 예측(Non-directional Prediction)이라 지칭할 수 있다. 이는 I 영상 타입에서 지원되거나 또는 P/B 영상 타입에서 지원될 수 있으며, 부호화 설정에 따라 지원되는 영상 타입이 정해질 수 있다. 현재 영상에서 화면간 예측을 수행하는 것은 공간적 상관성을 이용하여 예측 블록을 생성하는 것으로 시간적 상관성을 이용하기 위한 목적으로 다른 영상에서 화면간 예측을 수행하는 것이 다를 뿐 예측 방법(예를 들어, 참조 영상, 움직임 벡터 등)은 동일할 수 있다.
여기서, 화면간 예측을 수행할 수 있는 영상 타입으로 P와 B 픽쳐인 경우를 가정하였으나, 그 외의 추가 또는 대체되는 다양한 영상 타입에도 적용가능할 수 있다. 예를 들어, 소정의 영상 타입은 화면내 예측은 지원하지 않고 오직 화면간 예측만을 지원할 수 있고, 소정의 방향(후방향)의 화면간 예측만 지원할 수 있고, 소정의 방향의 화면간 예측만 지원할 수 있다.
참조 픽쳐 구성부에서는 참조 픽쳐 리스트를 통해 현재 픽쳐의 부호화에 사용되는 참조 픽쳐를 구성하고 관리할 수 있다. 부호화 설정(예를 들어, 영상 타입, 예측 방향 등)에 따라 적어도 하나의 참조 픽쳐 리스트를 구성할 수 있으며, 참조 픽쳐 리스트에 포함된 참조 픽쳐로부터 예측 블록을 생성할 수 있다.
단방향 예측의 경우 참조 픽쳐 리스트 0(L0) 또는 참조 픽쳐 리스트 1(L1)에 포함된 적어도 하나의 참조 픽쳐에서 화면간 예측을 수행할 수 있다. 또한, 양방향 예측의 경우 L0와 L1을 결합하여 생성되는 복합 리스트(LC)에 포함된 적어도 하나의 참조 픽쳐에서 화면간 예측을 수행할 수 있다.
예를 들어, 단방향 예측은 전방향 참조 픽쳐 리스트(L0)를 사용한 전방향 예측(Pred_L0)와 후방향 참조 픽쳐 리스트(L1)를 사용한 후방향 예측(Pred_L1)으로 구분할 수 있다. 양방향 예측(Pred_BI)는 전방향 참조 픽쳐 리스트(L0)와 후방향 참조 픽쳐 리스트(L1)을 모두 사용할 수 있다.
또는, 전방향 참조 픽쳐 리스트(L0)를 후방향 참조 픽쳐 리스트(L1)에 복사하여, 2개 이상의 전방향 예측을 수행하는 것도 양방향 예측에 포함될 수 있고, 후방향 참조 픽쳐 리스트(L1)를 전방향 참조 픽쳐 리스트(L0)에 복사하여, 2개 이상의 후방향 예측을 수행하는 것도 양방향 예측에 포함될 수 있다.
상기 예측 방향은 해당 방향을 지시하는 플래그 정보(예를 들어, inter_pred_idc. 이 값은 predFlagL0, predFlagL1, predFlagBI에 의해서 조정 가능하다고 가정)에 의해 나타낼 수 있다. predFlagL0는 전방향 예측 여부를 나타내고, predFlagL1은 후방향 예측 여부를 나타낸다. 양방향 예측은 predFlagBI를 통해 예측 여부를 나타내거나 predFlagL0와 predFlagL1이 동시에 활성화함(예를 들어, 각 플래그가 1일 경우)으로써 나타낼 수 있다.
본 발명에서는 전방향 참조 픽쳐 리스트를 사용하는 전방향 예측이자 단방향 예측인 경우를 중심으로 설명하지만, 상기 다른 경우에도 동일하거나 변경 적용이 가능할 수 있다.
일반적으로 부호화하는 픽쳐에 대한 최적의 참조 픽쳐를 부호화기에서 결정하고, 해당 참조 픽쳐에 대한 정보를 복호화기로 명시적으로 전송하는 방법을 사용할 수 있다. 이를 위해 참조 픽쳐 구성부는 현재 픽쳐의 화면간 예측에 참조되는 픽쳐 리스트에 대한 관리를 수행할 수 있으며, 제한적인 메모리 크기를 고려하여 참조 픽쳐 관리를 위한 규칙을 설정할 수 있다.
상기 전송되는 정보를 RPS(Reference Picture Set)라 정의할 수 있으며, RPS에 선택된 픽쳐는 참조 픽쳐로 구분되어 메모리(또는 DPB)에 저장되고, RPS에 선택되지 않은 픽쳐들은 비 참조 픽쳐로 구분되어 일정 시간 후에 메모리에서 제거될 수 있다. 메모리에는 기 설정된 수의 픽쳐(예를 들어, 14, 15, 16개 픽쳐 또는 그 이상)를 저장할 수 있으며, 레벨과 영상의 해상도에 따라 메모리의 크기가 설정될 수 있다.
도 13은 본 발명의 일 실시예에 따른 참조 픽쳐 리스트를 구성하는 예시도이다.
도 13을 참조하면, 일반적으로 현재 픽쳐 이전에 존재하는 참조 픽쳐(T-1, T-2)는 L0에 할당되고 현재 픽쳐 이후에 존재하는 참조 픽쳐(T+1, T+2)는 L1에 할당되어 관리될 수 있다. L0를 구성할 때, L0의 참조 픽쳐 허용 개수까지 채우지 못할 경우 L1의 참조 픽쳐를 할당할 수 있다. 이와 비슷하게 L1을 구성할 때, L1의 참조 픽쳐 허용 개수까지 채우지 못할 경우 L0의 참조 픽쳐를 할당할 수 있다.
또한, 현재 픽쳐를 적어도 하나의 참조 픽쳐 리스트에 포함할 수 있다. 예를 들어, L0 또는 L1에 현재 픽쳐를 포함할 수 있으며, 현재 픽쳐 이전의 참조 픽쳐에 시간적 순서가 T인 참조 픽쳐(또는 현재 픽쳐)를 추가하여 L0를 구성할 수 있고, 현재 픽쳐 이후의 참조 픽쳐에 시간적 순서가 T인 참조 픽쳐를 추가하여 L1을 구성할 수 있다.
참조 픽쳐 리스트 구성은 부호화 설정에 따라 정해질 수 있다.
현재 픽쳐를 참조 픽쳐 리스트에 포함하지 않고, 참조 픽쳐 리스트와 구분되는 개별적인 메모리를 통해 관리할 수 있거나 또는 현재 픽쳐를 적어도 하나의 참조 픽쳐 리스트에 포함하여 관리할 수 있다.
예를 들어, 현재 픽쳐의 참조 픽쳐 리스트 포함 여부를 지시하는 신호(curr_pic_ref_enabled_flag)에 의해 결정될 수 있다. 여기서, 상기 신호는 묵시적으로 결정되거나 명시적으로 발생하는 정보일 수 있다.
상세하게는, 상기 신호가 비활성화된 경우(예를 들어, curr_pic_ref_enabled_flag = 0)에는 어떤 참조 픽쳐 리스트에도 현재 픽쳐를 참조 픽쳐로 포함하지 않고, 상기 신호가 활성화된 경우(예를 들어, curr_pic_ref_enabled_flag = 1)에는 소정의 참조 픽쳐 리스트에 현재 픽쳐를 포함할 지 여부가 묵시적(예를 들어, L0에만 추가, L1에만 추가, L0와 L1에 동시에 추가 가능)으로 정해지거나 또는 명시적으로 관련 신호(예를 들어, curr_pic_ref_from_l0_flag, curr_pic_ref_from_l1_flag)가 생성되어 결정될 수 있다. 상기 신호는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭 등의 단위에서 지원될 수 있다.
여기서, 현재 픽쳐는 도 13과 같이 참조 픽쳐 리스트의 첫 번째 또는 마지막 순서에 위치할 수 있으며, 부호화 설정(예를 들어, 영상의 타입 정보 등)에 따라 리스트 내의 배치 순서가 정해질 수 있다. 예를 들어, I 타입에는 첫 번째에 위치할 수 있고 P/B 타입에는 마지막에 위치할 수 있으며, 이에 한정되지 않고 다른 변형의 예가 가능할 수 있다.
또는, 현재 픽쳐에서 블록 매칭(또는 템플릿 매칭)을 지원 여부를 지시하는 신호(ibc_enabled_flag)에 따라 개별적인 참조 픽쳐 메모리를 지원할 수 있다. 여기서, 상기 신호는 묵시적으로 결정되거나 명시적으로 발생하는 정보일 수 있다.
상세하게는, 상기 신호가 비활성화된 경우(예를 들어, ibc_enabled_flag = 0)에는 현재 픽쳐에서 블록 매칭을 지원하지 않는다는 것을 의미하고, 상기 신호가 활성화된 경우(예를 들어, ibc_enabled_flag = 1)에는 현재 픽쳐에서 블록 매칭을 지원하며 이를 위한 참조 픽쳐 메모리를 지원할 수 있다. 본 예에서는 추가적인 메모리를 제공하는 것을 가정하였지만, 추가적인 메모리를 제공하지 않고 현재 픽쳐를 위해 지원되는 기존 메모리에서 직접 블록 매칭을 지원하는 설정 또한 가능할 수 있다.
참조 픽쳐 구성부는 참조 픽쳐 보간부를 포함할 수 있으며, 화면간 예측의 보간 정밀도에 따라 소수 단위의 화소를 위한 보간 과정의 수행 여부가 결정될 수 있다. 예를 들어, 정수 단위의 보간 정밀도를 갖는 경우에는 참조 픽쳐 보간 과정은 생략되고, 소수 단위의 보간 정밀도를 갖는 경우에는 참조 픽쳐 보간 과정을 수행할 수 있다.
참조 픽쳐 보간 과정에 사용되는 보간 필터의 경우 부호화 설정에 따라 정해질 수 있으며, 기 설정된 하나의 보간 필터{예를 들어, DCT-IF(Discrete Cosine Transform Based Interpolation Filter) 등}를 사용할 수 있거나 또는 복수의 보간 필터 중 하나를 사용할 수 있으며, 전자의 경우 보간 필터에 대한 선택 정보는 묵시적으로 생략될 수 있으며 후자의 경우 보간 필터에 대한 선택 정보가 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭, 블록 등의 단위에서 포함될 수 있다. 후자의 경우 보간 필터에 대한 정보(예를 들어, 필터 계수 정보 등) 또한 명시적으로 발생 가능한 정보일 수 있다.
보간 위치(예를 들어, 1/2, 1/4, 1/8과 같은 소수 단위)에 따라 동일한 종류의 필터가 사용(예를 들어, 하나의 필터 수식으로부터 보간 위치에 따라 필터 계수 정보가 획득되는 경우)되거나 또는 보간 위치에 따라 다른 종류의 보간 필터가 사용될 수 있다. 예를 들어, 1/2 단위에는 6-tap 위너 필터, 1/4 단위에는 8-tap 칼만 필터, 1/8 단위에는 선형 필터가 적용될 수 있다.
보간 정밀도(보간이 수행되는 최대 정밀도)는 부호화 설정에 따라 정해질 수 있으며, 정수 단위와 소수 단위(예를 들어, 1/2, 1/4, 1/8, 1/16, 1/32 등) 중 하나의 정밀도일 수 있다. 여기서, 보간 정밀도는 영상 타입, 참조 픽쳐 설정, 지원되는 화면간 예측 방법 등에 따라 정해질 수 있다.
예를 들어, I 영상 타입에서는 보간 정밀도가 정수 단위로 설정되고 P/B 영상 타입에서는 소수 단위로 설정될 수 있다. 또는, 참조 픽쳐에 현재 픽쳐가 포함되어 있는 경우에는 참조되는 픽쳐에 따라 정수 또는 소수 단위 중에 하나로 설정될 수 있다. 또는, 현재 픽쳐에 블록 매칭 또는 템플릿 매칭이 지원되는 경우에는 정수 또는 소수 단위 중에 하나로 설정되고, 그렇지 않은 경우에는 소수 단위로 설정될 수 있다.
또는, 복수의 보간 정밀도 중 하나를 선택하여 보간 과정이 수행될 수 있으며, 적응적인 보간 정밀도에 따른 보간 과정이 지원되는 경우(예를 들어, adaptive_ref_resolution_enabled_flag. 0이면 기 설정된 보간 정밀도를 사용하고, 1이면 복수의 보간 정밀도 중 하나를 사용)에는 정밀도 선택 정보(예를 들어, ref_resolution_idx)가 생성될 수 있다.
상기 보간 정밀도 관련 설정 및 정보(예를 들어, 적응적인 보간 정밀도 지원 여부, 정밀도 선택 정보 등)는 묵시적으로 정해지거나 명시적으로 생성될 수 있으며, 상기 설정 및 정보는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭 등의 단위에서 포함될 수 있다. 또는, 영상 타입, 참조 픽쳐 설정, 지원되는 화면내 예측 방법, 지원되는 움직임 모델 등에서 하나 이상의 부호화 요소에 의해 정의되는 부호화 설정에 기반하여 적응적인 보간 정밀도 지원 여부, 정밀도 선택 정보, 정밀도 후보군 등이 정해질 수 있다.
보간 정밀도에 따라 움직임 추정 및 보상 과정이 수행될 수 있으며, 움직임 벡터에 대한 표현 단위 및 저장 단위도 보간 정밀도에 기반하여 결정될 수 있다.
예를 들어, 보간 정밀도가 1/2 단위일 경우에는 움직임 추정 및 보상 과정은 1/2 단위로 수행이 되며, 움직임 벡터는 1/2 단위로 표현되고 부호화 과정에 사용될 수 있다. 또한, 움직임 벡터는 1/2 단위로 저장되어 다른 블록의 움직임 정보 부호화 과정에 참조될 수 있다.
또는, 보간 정밀도가 1/8 단위일 경우 움직임 추정 및 보상 과정은 1/8 단위로 수행이 되며, 움직임 벡터는 1/8 단위로 표현되어 부호화 과정에 사용될 수 있고 1/8 단위로 저장될 수 있다.
또한, 움직임 추정 및 보상 과정과 움직임 벡터는 정수, 1/2, 1/4 단위 등 보간 정밀도와 다른 단위로 수행, 표현 및 저장될 수 있는데, 이는 화면간 예측 방법/설정(예를 들어, 움직임 추정/보상 방법, 움직임 모델, 움직임 정보 부호화 모드<후술하는 내용> 등)에 따라 적응적으로 결정될 수 있다.
일 예로, 보간 정밀도는 1/8 단위라 가정할 때, 이동 움직임 모델의 경우 움직임 추정 및 보상 과정은 1/4 단위에서 수행되고 움직임 벡터는 1/4 단위로 표현(본 예는 부호화 과정에서 단위를 가정)되며 1/8 단위로 저장될 수 있다. 이동 외 움직임 모델의 경우 움직임 추정 및 보상 과정은 1/8 단위에서 수행되고 움직임 벡터는 1/4 단위로 표현되며 1/8 단위로 저장될 수 있다.
일 예로, 보간 정밀도는 1/8 단위라 가정할 때, 블록 매칭의 경우 움직임 추정 및 보상 과정은 1/4 단위에서 수행되고 움직임 벡터는 1/4 단위로 표현되며 1/8 단위로 저장될 수 있다. 템플릿 매칭의 경우 움직임 추정 및 보상 과정은 1/8 단위에서 수행되고 움직임 벡터는 1/8 단위에서 표현되며 1/8 단위로 저장될 수 있다.
일 예로, 보간 정밀도는 1/16 단위라 가정할 때, 경쟁 모드의 경우 움직임 추정 및 보상 과정은 1/4 단위에서 수행되고 움직임 벡터는 1/4 단위로 표현되며 1/16 단위로 저장될 수 있다. 병합 모드의 경우 움직임 추정 및 보상 과정은 1/8 단위에서 수행되고 움직임 벡터는 1/4 단위로 표현되며 1/16 단위로 저장될 수 있다. 스킵 모드의 경우 움직임 추정 및 보상 과정은 1/16 단위로 수행되고 움직임 벡터는 1/4 단위로 표현되며 1/16 단위로 저장될 수 있다.
정리하면, 화면간 예측 방법 또는 설정, 그리고 보간 정밀도에 기반하여 움직임 추정 및 보상과 움직임 벡터 표현 및 저장 단위가 적응적으로 결정될 수 있다. 상세하게는, 화면간 예측 방법 또는 설정에 따라 움직임 추정 및 보상과 움직임 벡터 표현 단위는 적응적으로 정해질 수 있고 움직임 벡터의 저장 단위는 보간 정밀도에 따라 정해지는 것이 일반적일 수 있으나, 이에 한정하지 않고 다양한 변형의 예가 가능할 수 있다. 또한, 상기 예에서는 하나의 카테고리(예를 들어, 움직임 모델, 움직임 추정/보상 방법 등)에 따른 예시를 들었으나 둘 이상의 카데고리가 혼합되어 상기 설정이 정해지는 경우 또한 가능할 수 있다.
또한, 전술한 것과 같이 보간 정밀도 정보가 기 설정된 값을 갖거나 복수의 정밀도 중 하나로 선택되는 것에 역으로 화면간 예측 방법 또는 설정에 따라 지원되는 움직임 추정 및 보상 설정에 따라 참조 픽쳐 보간 정밀도가 정해질 수 있다. 예를 들어, 이동 움직임 모델의 경우 1/8 단위까지 지원하고 이동 외 움직임 모델의 경우 1/16 단위까지 지원할 때, 최고로 높은 정밀도를 갖는 이동 외 움직임 모델의 정밀도 단위에 맞춰 보간 과정이 수행될 수 있다.
즉, 이동 움직임 모델, 이동 외 움직임 모델, 경쟁 모드, 병합 모드, 스킵 모드 등의 지원되는 정밀도 정보에 대한 설정에 따라 참조 픽쳐 보간이 수행될 수 있다. 이 경우 상기 정밀도 정보가 묵시적 또는 명시적으로 정해질 수 있으며, 관련 정보가 명시적으로 생성되는 경우 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭 등의 단위에 포함될 수 있다.
움직임 추정부는 대상 블록이 어떤 참조 픽쳐의 어떤 블록과 상관성이 높은지를 추정(또는 탐색)하는 과정을 의미한다. 예측이 수행되는 대상 블록의 크기 및 형태(M x N)는 블록 분할부로부터 획득될 수 있다. 일 예로, 대상 블록은 4×4 내지 128×128 범위에서 결정될 수 있다. 화면간 예측은 예측 블록 단위로 수행되는 것이 일반적일 수 있으나 블록 분할부의 설정에 따라 부호화 블록, 변환 블록 등의 단위로 수행될 수 있다. 참조 영역의 추정 가능한 범위 내에서 추정을 수행하며 적어도 하나의 움직임 추정 방법을 사용할 수 있다. 움직임 추정 방법에서 화소 단위의 추정 순서 및 조건 등을 정의할 수 있다.
움직임 추정은 움직임 추정 방법에 기반하여 수행될 수 있다. 예를 들어, 움직임 추정 과정을 위해 비교하고자 하는 영역은 블록 매칭의 경우 대상 블록일 수 있고, 템플릿 매칭의 경우 기준 블록을 중심으로 설정되는 소정의 영역(템플릿)일 수 있다. 전자의 경우 대상 블록과 참조 영역의 추정 가능한 범위 내에서 최대한 상관성이 높은 블록을 찾을 수 있고, 후자의 경우 부호화 설정에 따라 정의되는 템플릿과 참조 영역의 추정 가능한 범위 내에서 최대한 상관성이 높은 영역을 찾을 수 있다.
여기서, 상기 템플릿은 기준 블록을 중심으로 좌, 상, 좌상, 우상, 좌하 블록 등의 인접한 블록 중 하나 이상에서 설정될 수 있다. 상기 인접한 블록은 부호화가 완료된 블록일 수 있다. 일 예로, 기준 블록이 M x N이면, 기준 블록의 상측과 좌측에서 각각 M x h, v x N을 템플릿으로 구성할 수 있다. 이때, 템플릿은 기 정의된 하나의 고정적인 영역(상기 예는 좌, 상 블록) 및 길이(w, h) 등의 설정을 가질 수 있거나 또는 부호화 설정에 의해 적응적인 설정을 가질 수 있다. 이때, 부호화 설정은 기준 블록의 크기, 형태, 위치, 가로/세로 길이비, 영상 타입, 컬러 성분 등에 의해 정의될 수 있다. 또는, 상기 템플릿 영역, 길이 등에 관한 정보는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭 등의 단위에서 명시적으로 발생할 수 있고, 부호화 설정에 따라 묵시적으로 정해질 수 있다.
여기서, 블록 매칭의 경우 움직임 정보의 전부 또는 일부를 명시적으로 생성하는 방법 중 하나일 수 있고, 템플릿 매칭의 경우 움직임 정보의 전부 또는 일부를 묵시적으로 획득하는 방법 중 하나일 수 있다. 상기 움직임 추정 방법에서 명시적 또는 묵시적으로 생성 또는 획득되는 움직임 정보(또는 움직임 정보 종류)는 화면간 예측 설정에 의해 결정될 수 있으며, 움직임 모델, 움직임 정보 부호화 모드 등에 의해 화면간 예측 설정이 정의될 수 있다. 이때, 템플릿 매칭에 추정 시작 위치, 최종 추정 완료된 움직임 벡터의 보정 정보(x, y 벡터 관련) 등에 기반한 정보가 묵시적으로 정해질 수 있지만, 명시적으로 관련 정보가 생성될 수도 있다.
템플릿 매칭의 지원 가능한 범위에 대한 정보는 부호화 설정에 따라 명시적으로 발생하거나 묵시적으로 정해질 수 있다. 여기서, 상기 부호화 설정은 대상 블록의 크기, 형태, 위치, 영상 타입, 컬러 성분 등에서 하나 이상의 요소에 의해 정의될 수 있다. 일 예로, 템플릿 매칭은 A x B 내지 C x D 범위에서 지원되며, A 내지 D는 4, 8, 16, 32, 64 또는 그 이상의 정수일 수 있고 A와 B는 각각 C와 D보다 작거나 같다. 또한, 템플릿 매칭의 지원 범위는 블록 매칭의 지원 범위에 속하는 구성일 수 있거나 또는 예외 구성(예로, 최소 블록 크기는 더 작은 경우)이 가능할 수 있다.
복수의 움직임 추정 방법이 지원되는 경우(예를 들어, adaptive_motion_comp_enabled_flag. 0이면 기 설정된 하나의 움직임 추정 방법을 사용하고, 1이면 복수의 움직임 추정 방법 중 하나를 사용)에는 움직임 추정 방법 선택 정보(예로, 픽쳐, 슬라이스 등의 소정의 분할 단위에서 motion_comp_idx가 0이면 블록 매칭만 지원, 1이면 블록 매칭과 템플릿 매칭을 지원. 또는, 블록 단위에서 0이면 블록 매칭, 1이면 템플릿 매칭. 위와 같이 적용되는 단위에 따라 복수의 관련 선택 정보가 생성될 수 있고, 해당 정보가 갖는 후보가 다른 의미를 가질 수 있음)가 생성될 수 있으며, 이는 블록 단위에서 포함할 수 있다.
상기 예는 블록 단위에서 움직임 추정 방법의 구분(선택)이 선행되는 구성일 수 있다. 일 예로, 템플릿 매칭이 선택되는 경우에는 추가로 확인할 정보가 없거나 또는 움직임 정보 부호화 모드로 병합, 경쟁 모드가 후보로 지원될 수 있다. 이때, 병합 모드가 선택되는 경우에는 최종 추정 완료된 움직임 벡터를 대상 블록의 움직임 벡터로 설정할 수 있고, 경쟁 모드가 선택되는 경우 최종 추정 완료된 움직임 벡터에 수평 또는 수평 방향으로 보정되는 오프셋 정보가 추가로 발생하여 이를 가산한 움직임 벡터를 대상 블록의 움직임 벡터로 설정할 수 있다.
또는, 화면간 예측의 일부 구성으로 포함되어 템플릿 매칭이 지원될 수도 있다. 일 예로, 템플릿 매칭에 관한 움직임 정보 부호화 모드가 지원될 수 있고, 소정의 움직임 정보 부호화 모드에서 구성되는 움직임 정보 예측 후보군 내 후보로 포함되어 지원될 수도 있다. 전자의 경우 움직임 정보 부호화 모드의 구분(선택)에 의해 템플릿 매칭이 수행되는 구성일 수 있고, 후자의 경우 소정의 움직임 정보 부호화 모드에서 최적의 움직임 정보를 나타내기 위한 움직임 정보 예측 후보군 중 하나의 후보를 선택하는 것에 의해 템플릿 매칭이 수행되는 구성일 수 있다.
상기 예의 템플릿은 기준 블록에 기반하여 설정될 수 있는데, 기준 블록은 부호화 블록 또는 예측 블록(또는 변환 블록)일 수 있다. 블록 분할부를 통해 부호화 블록이 결정되면 그대로 예측 블록으로 설정될 수 있고, 부호화 블록이 결정되면 둘 이상의 예측 블록으로 분할될 수 있음을 설명하였다. 여기서, 부호화 블록이 분할되지 않거나 또는 둘 이상의 예측 블록(예로, 직사각형 또는 직각 삼각형)으로 분할되어 화면간 예측을 수행하는 것을 서브 블록 단위의 화면간 예측이라 지칭한다. 즉, 기준 블록은 부호화 블록 또는 예측 블록으로 설정할 수 있고, 기준 블록에 기반하여 템플릿이 설정될 수 있다.
또한, 상기 언급된 단위 외에 템플릿 설정을 위한 기준 블록이 지원될 수 있다. 일 예로, 기준 블록과 수직적인 관계에 놓인 블록 또는 수평적인 관계에 놓인 블록이 그 대상이 될 수 있다.
상세하게는, 부호화 블록을 대상 블록으로, 부호화 블록의 수직적인 관계를 갖는 상위 블록을 상대 블록으로 가정할 수 있다<1>. 또는, 부호화 블록을 대상 블록으로, 부호화 블록의 수평적인 관계를 갖는 블록을 상대 블록으로 가정할 수 있다. 여기서, 상기 부호화 블록은 예측 블록으로 변경되어 적용 가능할 수 있다. 또한, 예측 블록을 대상 블록으로, 부호화 블록을 상대 블록으로 가정할 수 있다. 후술하는 예에서는 <1>의 경우를 가정한다.
복수의 후보 블록 중에 기준 블록을 설정하여 템플릿을 구성하는 방법은 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭, 블록 등의 단위에서 명시적으로 지원 여부에 관한 정보(0이면 지원하지 않고, 1이면 지원)에 의해 결정될 수 있으며, 해당 정보가 확인되지 않는 경우에는 기 정의된 값(0 또는 1)으로 할당될 수 있다. 또는, 묵시적으로 지원 여부가 정해질 수 있는데, 부호화 설정에 기반하여 정해질 수도 있다. 이때, 상기 부호화 설정은 블록(대상 블록)의 크기, 형태, 위치 등의 상태 정보, 영상 타입(I/P/B), 컬러 성분, 서브 블록 단위의 화면간 예측이 적용되는지 여부 등에서 하나 이상의 요소에 의해 정의될 수 있다.
예를 들어, 대상 블록의 크기가 소정의 제 1 문턱크기보다 크거나 같을 때 복수의 후보 블록 중에 기준 블록을 설정하는 방법이 지원될 수 있다. 또는, 대상 블록의 크기가 소정의 제 2 문턱크기보다 작거나 같을 때 상기 방법이 지원될 수 있다. 여기서, 문턱크기는 너비(W)와 높이(H)를 통해 W, H, W x H, W*H로 표현될 수 있으며, 부호화/복호화 장치에서 기 약속된 값으로, W와 H는 4, 8, 16과 같은 1 이상의 정수일 수 있다. 너비와 높이의 합으로 표현되는 경우에는 W*H는 16, 32, 64 또는 그 이상의 정수일 수 있다. 제 1 문턱크기는 제 2 문턱크기보다 작거나 같다. 여기서, 상기 방법이 지원되지 않는 경우는 기준 블록이 기 정의된 블록(대상 블록)으로 설정됨을 의미한다.
만약 복수의 후보 블록이 지원되는 경우 후보 블록(상대 블록)은 다양한 정의가 가능할 수 있다. (부호화 블록이 대상 블록인 경우) 상대 블록(예로, 상위 블록)은 부호화 블록의 분할 깊이보다 1 이상 적은 분할 깊이를 갖는 블록일 수 있다. 또는, 소정의 좌상측 좌표(예로, 대상 블록의 좌상측 좌표보다 왼쪽 또는 위쪽에 위치)에 소정의 너비(C)와 높이(D)를 가진 블록일 수 있다. 여기서, C와 D는 8, 16, 32 또는 그 이상의 정수일 수 있으며, 대상 블록의 너비와 높이보다 크거나 같을 수 있다. 또한, C와 D는 블록 크기에 관한 정보(예를 들어, 최대 변환 블록의 크기, 최대 부호화 블록의 크기 등)에 기초하여 결정될 수도 있다.
만약 복수의 후보 블록이 지원되는 경우 후보 선택 정보가 명시적으로 발생할 수 있고, 해당 후보 블록이 기준 블록으로 설정될 수 있다. 또는, 묵시적으로 기준 블록이 정해질 수 있는데, 이는 부호화 설정에 기반할 수 있다.
예를 들어, 부호화 설정에 의해 복수의 후보 블록이 지원되는 경우(제 1 카테고리)로 판단되면 상대 블록을 기준 블록으로 설정하고, 그렇지 않은 경우(제 2 카테고리)에는 대상 블록을 기준 블록으로 설정할 수 있다.
또는, 부호화 설정에 의해 제 1 카테고리에 속하는 경우에는 대상 블록을 기준 블록으로 설정하고, 제 2 카테고리에 속하는 경우에는 제 1 상대 블록(예로, 상위 블록)을 기준 블록으로 설정하고, 제 3 카테고리에 속하는 경우에는 제 2 상대 블록(예로, 인접한 블록)을 기준 블록으로 설정할 수 있다. 또한, 상기 일부 카테고리 중 일부를 대체 또는 추가하는 경우에는 대상 블록과 상대 블록 중 하나를 선택하는 정보가 발생할 수 있다.
상기 부호화 설정은 대상 블록의 크기, 형태, 가로/세로 길이비, 위치 등과 같은 상태 정보, 영상 타입, 컬러 성분, 서브 블록 단위의 화면간 예측이 적용되는지 여부 등에서 하나 이상의 요소에 의해 정의될 수 있다.
정리하면, 기준 블록은 대상 블록을 포함하여 다양한 후보 블록에서 설정될 수 있고, 이는 명시적 또는 묵시적으로 정해질 수 있다. 상기 예는 템플릿 설정을 위한 기준 블록이 다양하게 설정될 수 있음을 설명하고 있지만, 이는 화면간 예측의 다양한 경우에 적용될 수 있는 내용일 수 있다. 즉, 후술하는 화면간 예측에서 움직임 정보 예측 후보군 구성 등을 위한 기준 블록의 설정에 상기 설명이 동일하거나 비슷하게 적용될 수 있다. 단, 상기 예에서의 기준 블록 정의 또는 지원 범위 등이 동일하거나 동일하지 않게 설정될 수 있음을 이해하여야 한다.
움직임 추정은 움직임 모델(Motion Model)에 기반하여 수행될 수 있다. 평행 이동만을 고려하는 이동 움직임 모델(Translation Motion Model) 외에 추가적인 움직임 모델을 사용하여 움직임 추정, 보상을 수행할 수 있다. 예를 들어, 평행 이동뿐만 아니라 회전, 원근, 줌 인/아웃(Zoom-in/out) 등과 같은 움직임을 고려하는 움직임 모델을 사용하여 움직임 추정, 보상을 수행할 수 있다. 이는 영상의 지역적 특성에 따라 발생하는 상기의 다양한 종류의 움직임을 반영하여 예측 블록을 생성함으로써 부호화 성능을 향상시키기 위해 지원될 수 있다.
도 14는 본 발명의 일 실시예에 따른 이동 외 움직임 모델을 나타내는 개념도이다. 도 14를 참조하면, 어파인 모델(Affine Model)의 일부 예시로 소정의 위치의 움직임 벡터 V0와 V1에 기반하여 움직임 정보를 표현하는 예를 나타내고 있다. 복수의 움직임 벡터에 기반하여 움직임을 표현할 수 있기 때문에 정확한 움직임 추정 및 보상이 가능할 수 있다.
상기 예와 같이 기 정의되는 움직임 모델에 기반하여 화면간 예측을 수행하되 추가적인 움직임 모델에 기반한 화면간 예측 또한 지원될 수 있다. 여기서, 기 정의되는 움직임 모델은 이동 움직임 모델, 추가적인 움직임 모델은 어파인 모델인 경우를 가정하지만, 이에 한정되지 않고 다양한 변형이 가능하다.
이동 움직임 모델의 경우 하나의 움직임 벡터에 기반하여 움직임 정보(단방향 예측을 가정)를 표현할 수 있으며, 움직임 정보를 나타내기 위한 제어점(기준점)은 좌상측 좌표인 경우를 가정하지만 이에 한정하지 않는다.
이동 외 움직임 모델의 경우 다양한 구성의 움직임 정보로 표현할 수 있다. 본 예에서는 하나의 움직임 벡터(좌상측 좌표 기준)에 추가 정보로 표현되는 구성을 가정한다. 후술하는 예를 통해 언급되는 일부 움직임 추정 및 보상은 블록 단위로 수행되지 않을 수 있으며, 소정의 서브 블록 단위로 수행될 수 있다. 이때, 소정의 서브 블록의 크기 및 위치는 각 움직임 모델에 기반하여 정해질 수 있다.
도 15는 본 발명의 일 실시예에 따른 서브 블록 단위의 움직임 추정을 나타내는 예시도이다. 상세하게는, 어파인 모델(움직임 벡터 2개)에 따른 서브 블록 단위의 움직임 추정을 나타낸다.
이동 움직임 모델의 경우 대상 블록에 포함되는 화소 단위의 움직임 벡터는 동일할 수 있다. 즉, 화소 단위에 일괄적으로 적용되는 움직임 벡터를 가질 수 있으며, 하나의 움직임 벡터(V0)를 사용하여 움직임 추정, 보상을 수행할 수 있다.
이동 외 움직임 모델(어파인 모델)의 경우 대상 블록에 포함되는 화소 단위의 움직임 벡터는 동일하지 않을 수 있으며, 화소 단위의 개별적인 움직임 벡터가 필요할 수 있다. 이때, 대상 블록의 소정의 제어점 위치의 움직임 벡터(V0, V1)에 기반하여 화소 단위 또는 서브 블록 단위의 움직임 벡터를 유도할 수 있으며, 유도된 움직임 벡터를 사용하여 움직임 추정, 보상을 수행할 수 있다.
예를 들어, 대상 블록 내의 서브 블록 또는 화소 단위의 움직임 벡터{예로, (Vx,Vy)}는 Vx = (V1x - V0x) × x / M - (V1y - V0y) × y / N + V0x , Vy = (V1y - V0y) × x / M + (V1x - V0x) × y / N + V0y 에 따른 수식으로 도출될 수 있다. 상기 수식에서 V0{본 예에서 (V0x,V0y)}는 대상 블록의 좌측 상단의 움직임 벡터이고, V1{본 예에서 (V1x,V1y)}는 대상 블록의 우측 상단의 움직임 벡터를 의미한다. 복잡도를 고려하여 이동 외 움직임 모델의 움직임 추정, 움직임 보상은 서브 블록 단위로 수행할 수 있다.
여기서, 상기 서브 블록(M x N)의 크기는 부호화 설정에 따라 정해질 수 있으며, 고정적인 크기를 갖거나 또는 적응적인 크기로 설정될 수 있다. 여기서, M과 N은 2, 4, 8, 16 또는 그 이상의 정수일 수 있고, M과 N은 동일하거나 동일하지 않을 수 있다. 상기 서브 블록의 크기는 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭 등의 단위에서 명시적으로 발생할 수 있다. 또는, 묵시적으로 부호화기와 복호화기의 공통된 약속에 의해 정해질 수 있거나 또는 부호화 설정에 의해 정해질 수도 있다.
여기서, 부호화 설정은 대상 블록의 크기, 형태, 위치 등의 상태 정보, 영상 타입, 컬러 성분, 화면간 예측 설정 정보(움직임 정보 부호화 모드, 참조 픽쳐 정보, 보간 정밀도, 움직임 모델<종류> 등) 등에서 하나 이상의 요소에 의해 정의될 수 있다.
상기 예는 일부 이동 외 움직임 모델에 따른 서브 블록의 크기를 유도하고, 그에 기반하여 움직임 추정 및 보상을 수행하는 과정을 설명하였다. 상기 예와 같이 움직임 모델에 따른 서브 블록 또는 화소 단위의 움직임 추정 및 보상을 수행할 수 있으며, 이에 관한 상세한 설명은 생략한다.
다음은 움직임 모델에 따라 구성되는 움직임 정보에 관한 다양한 예를 살펴본다.
일 예로, 회전 움직임을 표현하는 움직임 모델의 경우 하나의 움직임 벡터로 블록의 이동 움직임을 표현하고, 회전 각도 정보로 회전 움직임을 표현할 수 있다. 회전 각도 정보는 소정의 위치(예로, 좌상측 좌표)를 기준(0도)으로 측정될 수 있고, 소정의 각도 범위(예로, -90도 내지 90도 사이)에서 소정의 간격(예로, 각도 차분치가 0도, 11.25도, 22.25도 등)을 갖는 k개의 후보(k는 1, 2, 3 또는 그 이상의 정수)로 표현될 수 있다.
여기서, 회전 각도 정보는 움직임 정보 부호화 과정에서 그 자체로 부호화될 수 있거나 또는 인접한 블록의 움직임 정보(예로, 움직임 벡터, 회전 각도 정보)에 기반하여 부호화(예로, 예측 + 차분치 정보)될 수 있다.
또는, 하나의 움직임 벡터로 블록의 이동 움직임을 표현하고, 하나 이상의 추가 움직임 벡터로 블록의 회전 움직임을 표현할 수 있다. 이때, 추가 움직임 벡터의 개수는 1, 2 또는 그 이상의 정수일 수 있고, 추가 움직임 벡터의 제어점은 우상측, 좌하측, 우하측 좌표 중에서 결정될 수 있거나 또는 그 외의 블록 내 좌표를 제어점으로 설정할 수 있다.
여기서, 추가 움직임 벡터는 움직임 정보 부호화 과정에서 그 자체로 부호화될 수 있거나 또는 인접한 블록의 움직임 정보(예로, 이동 움직임 모델 또는 이동 외 움직임 모델에 따른 움직임 벡터)에 기반하여 부호화(예로, 예측 + 차분치 정보)될 수 있거나 또는 회전 움직임을 표현하는 블록 내 다른 움직임 벡터에 기반하여 부호화(예로, 예측 + 차분치 정보)될 수 있다.
일 예로, 줌 인/아웃 상황과 같은 크기 조정 또는 스케일링(Scaling) 움직임을 표현하는 움직임 모델의 경우 하나의 움직임 벡터로 블록의 이동 움직임을 표현하고, 스케일링 정보로 크기 조정 움직임을 표현할 수 있다. 스케일링 정보는 소정의 위치(예로, 좌상측 좌표)를 기준으로 수평 또는 수직 방향의 확장 또는 축소를 나타내는 스케일링 정보로 표현될 수 있다.
여기서, 수평 또는 수직 중 적어도 하나의 방향에 스케일링이 적용될 수 있다. 또한, 수평 또는 수직 방향으로 적용되는 개별적인 스케일링 정보가 지원될 수 있거나 또는 공통으로 적용되는 스케일링 정보가 지원될 수 있다. 소정의 위치(좌상측 좌표)에 상기 스케일링 적용된 블록의 너비와 높이가 가산되어 움직임 추정 및 보상할 위치가 정해질 수 있다.
여기서, 스케일링 정보는 움직임 정보 부호화 과정에서 그 자체로 부호화될 수 있거나 또는 인접한 블록의 움직임 정보(예로, 움직임 벡터, 스케일링 정보)에 기반하여 부호화(예로, 예측 + 차분치 정보)될 수 있다.
또는, 하나의 움직임 벡터로 블록의 이동 움직임을 표현하고, 하나 이상의 추가 움직임 벡터로 블록의 크기 조정을 표현할 수 있다. 이때, 추가 움직임 벡터의 개수는 1, 2개 또는 그 이상의 정수일 수 있고, 추가 움직임 벡터의 제어점은 우상측, 좌하측, 우하측 좌표 중에서 결정될 수 있거나 또는 그 외의 블록 내 좌표를 제어점으로 설정할 수 있다.
여기서, 추가 움직임 벡터는 움직임 정보 부호화 과정에서 그 자체로 부호화될 수 있거나 또는 인접한 블록의 움직임 정보(예로, 이동 움직임 모델 또는 이동 외 움직임 모델에 따른 움직임 벡터)에 기반하여 부호화(예로, 예측 + 차분치 정보)될 수 있거나 또는 블록 내 소정의 좌표(예로, 우하측 좌표)에 기반하여 부호화(예로, 예측 + 차분치)될 수 있다.
상기 예에서 일부 움직임을 나타내기 위한 표현에 관한 경우를 설명하였으며, 복수의 움직임을 표현하기 위한 움직임 정보로 표현될 수도 있다.
예를 들어, 다양하거나 복합적인 움직임을 표현하는 움직임 모델의 경우 하나의 움직임 벡터로 블록의 이동 움직임을 표현하고, 회전 각도 정보로 회전 움직임을 표현하고, 스케일링 정보로 크기 조정을 표현할 수 있다. 각 움직임에 관한 설명은 전술한 예를 통해 유도할 수 있으므로 상세한 설명은 생략한다.
또는, 하나의 움직임 벡터로 블록의 이동 움직임을 표현하고, 하나 이상의 추가 움직임 벡터로 블록의 그 외의 움직임을 표현할 수 있다. 이때, 추가 움직임 벡터의 개수는 1, 2개 또는 그 이상의 정수일 수 있고, 추가 움직임 벡터의 제어점은 우상측, 좌하측, 우하측 좌표 중에서 결정될 수 있거나 또는 그 외의 블록 내 좌표를 제어점으로 설정할 수 있다.
여기서, 추가 움직임 벡터는 움직임 정보 부호화 과정에서 그 자체로 부호화될 수 있거나 또는 인접한 블록의 움직임 정보(예로, 이동 움직임 모델 또는 이동 외 움직임 모델에 따른 움직임 벡터)에 기반하여 부호화(예로, 예측 + 차분치 정보)될 수 있거나 또는 다양한 움직임을 표현하는 블록 내 다른 움직임 벡터에 기반하여 부호화(예로, 예측 + 차분치 정보)될 수 있다.
상기 설명은 어파인 모델에 관한 내용일 수 있으며, 추가 움직임 벡터가 1개 또는 2개인 경우를 중심으로 설명한다. 정리하면, 움직임 모델에 따른 움직임 벡터의 사용 개수는 1, 2, 3개일 수 있으며, 움직임 정보를 표현하기 위해 사용되는 움직임 벡터 개수에 따라 개별적인 움직임 모델로 간주할 수 있음을 가정한다. 또한, 움직임 벡터가 1개인 경우는 기 정의된 움직임 모델임을 가정한다.
화면간 예측을 위한 복수의 움직임 모델이 지원될 수 있으며, 추가적인 움직임 모델의 지원을 지시하는 신호(예를 들어, adaptive_motion_mode_enabled_flag)에 의해 결정될 수 있다. 여기서, 상기 신호가 0이면 기 정의된 움직임 모델이 지원되고, 1이면 복수의 움직임 모델이 지원될 수 있다. 상기 신호는 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭, 블록 등의 단위에서 발생할 수 있으나, 따로 확인이 불가한 경우에는 기 정의된 설정에 따라 신호의 값이 할당될 수 있다. 또는, 부호화 설정에 기반하여 묵시적으로 지원 여부가 결정될 수 있다. 또는, 부호화 설정에 따라 묵시적이거나 명시적인 경우가 결정될 수도 있다. 여기서, 부호화 설정은 영상 타입, 영상 종류(예로, 0이면 일반 영상, 1이면 360도 영상), 컬러 성분 등에서 하나 이상의 요소에 의해 정의될 수 있다.
상기 과정을 통해 복수의 움직임 모델의 지원 여부가 정해질 수 있다. 다음은 추가로 지원되는 움직임 모델이 2개 이상인 경우를 가정하며, 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭 등의 단위에서 복수의 움직임 모델이 지원되는 경우로 결정되었음을 가정하지만, 일부 예외되는 구성이 존재할 수도 있다. 후술하는 예에서는 움직임 모델 A, B, C가 지원 가능하며, A는 기본으로 지원되는 움직임 모델이고, B와 C는 추가로 지원 가능한 움직임 모델임을 가정한다.
지원되는 움직임 모델에 대한 구성 정보가 상기 단위에서 발생할 수 있다. 즉, {A, B}, {A, C}, {A, B, C}와 같은 지원되는 움직임 모델 구성이 가능할 수 있다.
예를 들어, 상기 구성의 후보에 인덱스(0 ~ 2)를 할당하여 이를 선택할 수 있다. 만약 인덱스 2가 선택되면 {A, C}, 인덱스 3이 선택되면 {A, B, C}가 지원되는 움직임 모델 구성이 결정될 수 있다.
또는, 소정의 움직임 모델의 지원 여부를 나타내는 정보가 개별적으로 지원될 수 있다. 즉, B의 지원 여부 플래그, C의 지원 여부 플래그가 발생할 수 있다. 만약 두 플래그가 모두 0이면 A만 지원 가능한 경우일 수 있다. 본 예는 복수의 움직임 모델의 지원 여부를 나타내는 정보가 발생하지 않고 처리되는 예일 수도 있다.
상기 예와 같이 지원되는 움직임 모델의 후보군이 구성되면, 블록 단위에서 후보군 중 하나의 움직임 모델을 명시적으로 결정하여 사용하거나 묵시적으로 사용할 수 있다.
일반적으로 움직임 추정부는 부호화 장치에 존재하는 구성일 수 있으나 예측 방식(예를 들어, 템플릿 매칭 등)에 따라 복호화 장치에도 포함될 수 있는 구성일 수 있다. 예를 들어, 템플릿 매칭의 경우 복호화기에서 대상 블록의 인접한 템플릿을 통해 움직임 추정을 수행하여 대상 블록의 움직임 정보를 획득할 수 있기 때문이다. 이때, 움직임 추정 관련 정보(예를 들어, 움직임 추정 범위, 움직임 추정 방법<스캔 순서> 등)는 묵시적으로 정해질 수 있거나 명시적으로 생성되어 비디오, 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭 등의 단위에 포함될 수 있다.
움직임 보상부는 움직임 추정 과정을 통해 결정된 일부 참조 픽쳐의 일부 블록의 데이터를 대상 블록의 예측 블록으로 획득하기 위한 과정을 의미한다. 상세하게는, 움직임 추정 과정을 통해 획득된 움직임 정보(예를 들어, 참조 픽쳐 정보, 움직임 벡터 정보 등)에 기반하여 적어도 하나의 참조 픽쳐의 적어도 하나의 영역(또는 블록)으로부터 대상 블록의 예측 블록을 생성할 수 있다.
다음과 같이 움직임 보상 방법에 기반하여 움직임 보상이 수행될 수 있다.
블록 매칭의 경우 참조 픽쳐에서 명시적으로 획득되는 대상 블록(M x N)의 움직임 벡터(Vx,Vy)와 대상 블록의 좌측 상단 좌표(Px,Py)를 통해 획득되는 좌표인 (Px+Vx, Py+Vy)를 기준으로 오른쪽으로 M만큼, 아래쪽으로 N만큼 해당하는 영역의 데이터를 대상 블록의 예측 블록으로 보상할 수 있다.
템플릿 매칭의 경우 참조 픽쳐에서 묵시적으로 획득되는 대상 블록(M x N)의 움직임 벡터(Vx,Vy)와 대상 블록의 좌측 상단 좌표(Px,Py)를 통해 획득되는 좌표인 (Px+Vx, Py+Vy)를 기준으로 오른쪽으로 M만큼, 아래쪽으로 N만큼 해당하는 영역의 데이터를 대상 블록의 예측 블록으로 보상할 수 있다.
또한, 다음과 같이 움직임 모델에 기반하여 움직임 보상이 수행될 수 있다.
이동 움직임 모델의 경우 참조 픽쳐에서 명시적으로 획득되는 대상 블록(M x N)의 하나의 움직임 벡터(Vx,Vy)와 대상 블록의 좌측 상단 좌표(Px,Py)를 통해 획득되는 좌표인 (Px+Vx, Py+Vy)를 기준으로 오른쪽으로 M만큼, 아래쪽으로 N만큼 해당하는 영역의 데이터를 대상 블록의 예측 블록으로 보상할 수 있다.
이동 외 움직임 모델의 경우 참조 픽쳐에서 명시적으로 획득되는 대상 블록(M x N)의 복수 개의 움직임 벡터(V0x, V0y), (V1x, V1y)를 통해 묵시적으로 획득되는 m x n 개의 서브 블록의 움직임 벡터(Vmx,Vny)와 각 서브 블록의 좌측 상단 좌표(Pmx, Pny)를 통해 획득되는 좌표인 (Pmx,+Vnx, Pmy,+Vny)를 기준으로 오른쪽으로 M/m만큼, 아래쪽으로 N/n만큼 해당하는 영역의 데이터를 서브 블록의 예측 블록으로 보상할 수 있다. 즉, 상기 서브 블록의 예측 블록을 모아 대상 블록의 예측 블록으로 보상할 수 있다.
움직임 정보 결정부에서 대상 블록의 최적의 움직임 정보를 선정하기 위한 과정이 수행될 수 있다. 일반적으로 블록의 왜곡{예를 들어, 대상 블록과 복원 블록의 Distortion. SAD(Sum of Absolute Difference), SSD(Sum of Square Difference) 등}과 해당 움직임 정보에 따른 발생 비트량이 고려되는 율-왜곡(Rate-Distortion) 기법을 이용하여 부호화 비용 측면에서 최적인 움직임 정보를 결정할 수 있다. 상기 과정을 통해 결정되는 움직임 정보에 기반하여 생성되는 예측 블록을 감산부와 가산부로 송신할 수 있다. 또한, 일부 예측 방식(예를 들어, 템플릿 매칭 등)에 따라 복호화 장치에도 포함될 수 있는 구성일 수 있으며, 이 경우 블록의 왜곡에 기반하여 결정될 수 있다.
상기 움직임 정보 결정부에 움직임 보상 방법, 움직임 모델 등과 같은 화면간 예측 관련 설정 정보가 고려될 수 있다. 예를 들어, 복수의 움직임 보상 방법이 지원되는 경우 움직임 보상 방법 선택 정보와 그에 따른 움직임 벡터, 참조 픽쳐 정보 등이 최적의 움직임 정보일 수 있다. 또는, 복수의 움직임 모델이 지원되는 경우 움직임 모델 선택 정보와 그에 따른 움직임 벡터, 참조 픽쳐 정보 등이 최적의 움직임 정보일 수 있다.
움직임 정보 부호화부에서 상기 움직임 정보 결정 과정을 통해 획득된 대상 블록의 움직임 정보를 부호화할 수 있다. 이때, 움직임 정보는 대상 블록의 예측을 위해 참조한 영상과 영역에 대한 정보로 구성이 될 수 있다. 상세하게는, 참조한 영상에 대한 정보(예를 들어, 참조 영상 정보 등)와 참조한 영역에 대한 정보(예를 들어, 움직임 벡터 정보 등)로 구성될 수 있다.
또한, 화면간 예측 관련 설정 정보(또는, 선택 정보 등. 예를 들어, 움직임 추정/보상 방법, 움직임 모델의 선택 정보 등)도 대상 블록의 움직임 정보에 포함되어 구성될 수 있다. 화면간 예측 관련 설정에 기반하여 상기 참조 영상과 영역에 대한 정보(예를 들어, 움직임 벡터 개수 등)가 구성될 수 있다.
참조 영상과 참조 영역에 대한 정보를 하나의 조합으로 구성하여 움직임 정보를 부호화할 수 있으며, 참조 영상과 참조 영역에 대한 정보의 조합을 움직임 정보 부호화 모드로 구성할 수 있다.
여기서, 참조 영상과 참조 영역에 관한 정보는 인접한 블록 또는 소정의 정보(예로, 현재 픽쳐 기준으로 이전 또는 이후에 부호화된 영상, 제로 움직임 벡터 등)에 기반하여 획득될 수 있으며, 인접한 블록은 기준 블록과 수평적인 관계를 갖는 블록(상대 블록)일 수 있다. 즉, 기준 블록과 동일한 공간에 속하고 대상 블록에 최인접한 블록<inter_blk_A>, 기준 블록과 동일한 공간에 속하고 멀리 인접한 블록<inter_blk_B>, 기준 블록과 동일하지 않은 공간에 속하는 블록<inter_blk_C>으로 카테고리를 구분한다고 하면, 이 중 하나 이상의 카테고리에 속하는 블록을 상대 블록으로 특정할 수 있다.
예를 들어, 상대 블록의 움직임 정보 또는 참조 픽쳐 정보에 기반하여 대상 블록의 움직임 정보를 부호화할 수 있고, 상대 블록의 움직임 정보 또는 참조 픽쳐 정보로부터 유도되는 정보(또는 중간값, 변환 과정 등을 거친 정보)에 기반하여 대상 블록의 움직임 정보를 부호화할 수 있다. 즉, 대상 블록의 움직임 정보를 이웃 블록으로부터 예측을 수행하여 그에 관한 정보를 부호화할 수 있다.
대상 블록의 움직임 정보를 예측하여 부호화할 수 있거나 그대로의 움직임 정보를 부호화할 수 있으며, 이는 움직임 정보의 예측 수행 여부를 지시하는 신호(예로, mvp_enabled_flag. 0이면 움직임 정보 그대로를 부호화, 1이면 움직임 정보 예측하여 부호화. 즉, 1이어야 후술하는 스킵, 병함, 경쟁 모드 등의 움직임 정보 부호화 모드가 사용 가능함)에 기반할 수 있다. 본 발명에서는 상기 신호가 1인 경우를 가정하여 설명한다. 즉, 후술하는 예에서는 대상 블록의 움직임 정보의 전부 또는 일부가 예측에 기반하여 부호화됨을 전제한다.
상기 설명에서 기준 블록은 대상 블록을 포함하여 대상 블록과 수평적인 관계를 갖는 블록 또는 수직적인 관계를 갖는 블록 중에서 설정될 수도 있다. 상세하게는, 대상 블록의 움직임 정보를 상대 블록의 참조 픽쳐 정보 또는 움직임 정보에 기반(예측)하여 부호화할 때 기준이 되는 블록을 다양하게 설정할 수 있음을 의미한다. 이에 관한 내용은 전술한 다양한 예를 통해 유도 가능하므로 상세한 설명은 생략한다.
정리하면, 대상 블록은 부호화하고자 하는 움직임 정보를 갖고 있는 이해당사자인 블록일 수 있고, 기준 블록은 움직임 정보 예측 후보군 구성을 할 때 기준이 되는 블록(예로, 좌, 상 방향의 인접한 블록을 특정할 때 기준이 되는 블록)일 수 있다. 여기서, 기준 블록은 대상 블록으로 설정될 수 있거나 상대 블록(수직/수평적인 관계의 블록)으로 설정될 수도 있다. 후술하는 예에서 언급되는 기준 블록은 본 예를 포함하여 본 발명의 전술한 다양한 예로부터 유도 설명이 가능하다.
본 발명에서 대상 블록의 움직임 정보는 하나 이상의 움직임 정보 부호화 모드에 기반하여 부호화될 수 있다. 여기서, 움직임 정보 부호화 모드는 다양한 정의가 가능한데, 스킵 모드(Skip mode), 병합 모드(Merge mode), 경쟁 모드(Comp mode) 등에서 하나 이상을 포함할 수 있다.
전술한 템플릿 매칭(tmp)에 기반하여 상기 움직임 정보 부호화 모드와 결합되거나 또는 별개의 움직임 정보 부호화 모드로 지원되거나 또는 상기 움직임 정보 부호화 모드 중 전부 또는 일부의 세부 구성에 포함될 수 있다. 이는 상위 단위(예로, 픽쳐, 슬라이스 등)에서 템플릿 매칭을 지원하는 것으로 정해진 경우를 전제하지만, 지원 여부에 관한 플래그가 화면간 예측 설정에 일부 요소로 고려될 수 있다.
전술한 현재 픽쳐에서 블록 매칭을 수행하는 방법(ibc)에 기반하여 상기 움직임 정보 부호화 모드와 결합되거나 또는 별개의 움직임 정보 부호화 모드로 지원되거나 또는 상기 움직임 정보 부호화 모드 중 전부 또는 일부의 세부 구성에 포함될 수 있다. 이는 상위 단위에서 현재 픽쳐 내에서 블록 매칭하는 것을 지원하는 것으로 정해진 경우를 전제하지만, 지원 여부에 관한 플래그가 화면간 예측 설정에 일부 요소로 고려될 수 있다.
전술한 움직임 모델(affine)에 기반하여 상기 움직임 정보 부호화 모드와 결합되거나 또는 별개의 움직임 정보 부호화 모드로 지원되거나 또는 상기 움직임 정보 부호화 모드 중 전부 또는 일부의 세부 구성에 포함될 수 있다. 이는 상위 단위에서 이동 외 움직임 모델을 지원하는 것으로 정해진 경우를 전제하지만, 지원 여부에 관한 플래그가 화면간 예측 설정에 일부 요소로 고려될 수 있다.
예를 들어, temp_inter, temp_tmp, temp_ibc, temp_affine과 같은 개별적인 움직임 정보 부호화 모드가 지원될 수 있다. 또는, temp_inter_tmp, temp_inter_ibc, temp_inter_affine, temp_inter_tmp_ibc 등과 같은 결합되는 움직임 정보 부호화 모드가 지원될 수 있다. 또는, temp를 구성하는 움직임 정보 예측 후보군 중 템플릿 기반의 후보, 현재 픽쳐 내에서 블록 매칭을 수행하는 방법 기반의 후보, 어파인 기반의 후보가 포함되어 구성될 수 있다.
여기서, temp는 스킵 모드(skip), 병합 모드(merge), 경쟁 모드(comp)를 의미할 수 있다. 일 예로, 스킵 모드인 경우에는 skip_inter, skip_tmp, skip_ibc, skip_affine, 병합 모드인 경우에는 merge_inter, merge_tmp, merge_ibc, merge_affine, 경쟁 모드인 경우에는 comp_inter, comp_tmp, comp_ibc, comp_affine 등의 움직임 정보 부호화 모드가 지원되는 것과 같다.
만약 스킵 모드, 병합 모드, 경쟁 모드가 지원되고 각 모드의 움직임 정보 예측 후보군에 상기 요소를 고려한 후보가 포함되는 경우에는 스킵 모드, 병합 모드, 경쟁 모드를 구분하는 플래그에 의해 하나의 모드가 선택될 수 있다. 일 예로, 스킵 모드인지 여부를 나타내는 플래그가 지원되고 1의 값을 가지면 스킵 모드가 선택되고, 0의 값을 가지면 병합 모드인지 여부를 나타내는 플래그가 지원되어 1의 값을 가지면 병합 모드가 선택되고, 0의 값을 가지면 경쟁 모드가 선택될 수 있다. 그리고 각 모드의 움직임 정보 예측 후보군에 inter, tmp, ibc, affine에 기반한 후보가 포함될 수 있다.
또는, 하나의 공통되는 모드 하에 복수 개의 움직임 정보 부호화 모드가 지원되는 경우에는 스킵 모드, 병합 모드, 경쟁 모드 중에 하나를 선택하기 위한 플래그 외에 선택된 모드의 세부 모드를 구분하는 추가적인 플래그가 지원될 수도 있다. 일 예로, 병합 모드(merge mode)가 선택되면, 병합 모드에 관한 세부 모드인 merge_inter, merge_tmp, merge_ibc, merge_affine 등에서 선택할 수 있는 플래그가 추가로 지원됨을 의미한다. 또는, merge_inter인지 여부를 나타내는 플래그가 지원되고, merge_inter가 아닌 경우에는 merge_tmp, merge_ibc, merge_affine 등에서 선택할 수 있는 플래그가 추가로 지원될 수도 있다.
부호화 설정에 따라 상기 움직임 정보 부호화 모드 후보 중 전부 또는 일부를 지원할 수 있다. 여기서, 부호화 설정은 기준 블록(예로, 대상 블록)의 크기, 형태, 가로/세로 길이비, 위치 등의 상태 정보, 영상 타입, 영상 종류, 컬러 성분, 화면간 예측 지원 설정(예로, 템플릿 매칭 지원 여부, 현재 픽쳐에서 블록 매칭 지원 여부, 이동 외 움직임 모델 지원 요소 등) 등에서 하나 이상의 요소에 의해 정의될 수 있다.
일 예로, 블록의 크기에 따라 지원되는 움직임 정보 부호화 모드가 정해질 수 있다. 이때, 블록의 크기는 제 1 문턱크기(최소값) 또는 제 2 문턱크기(최대값)에 의해 지원 범위가 정해질 수 있고, 각 문턱크기는 블록의 너비(W)와 높이(H)로 W, H, W x H, W*H로 표현될 수 있다. 제 1 문턱크기의 경우 W와 H는 4, 8, 16 또는 그 이상의 정수일 수 있고, W*H는 16, 32, 64 또는 그 이상의 정수일 수 있다. 제 2 문턱크기의 경우 W와 H는 16, 32, 64 또는 그 이상의 정수일 수 있고, W*H는 64, 128, 256 또는 그 이상의 정수일 수 있다. 상기 범위는 제 1 문턱크기 또는 제 2 문턱크기 중 하나에 의해 정해지거나 또는 둘 모두를 사용하여 정해질 수 있다.
이때, 상기 문턱크기는 고정적이거나 영상(예로, 영상 타입 등)에 따라 적응적일 수 있다. 이때, 상기 제 1 문턱크기는 최소 부호화 블록, 최소 예측 블록, 최소 변환 블록 등의 크기에 기반하여 설정될 수 있고, 상기 제 2 문턱크기는 최대 부호화 블록, 최대 예측 블록, 최대 변환 블록 등의 크기에 기반하여 설정될 수도 있다.
일 예로, 영상 타입에 따라 지원되는 움직임 정보 부호화 모드가 정해질 수 있다. 이때, I 영상 타입에는 스킵 모드, 병합 모드, 경쟁 모드 중 적어도 하나를 포함할 수 있다. 이때, 현재 픽쳐에서 블록 매칭(또는 템플릿 매칭)을 수행하는 방법, 어파인 모델(이하 요소라는 용어로 지칭)에 관한 개별적인 움직임 정보 부호화 모드가 지원될 수 있거나 또는 둘 이상의 요소가 결합되어 움직임 정보 부호화 모드가 지원될 수 있다. 또는, 소정의 움직임 정보 부호화 모드에 다른 요소가 움직임 정보 예측 후보군으로 구성될 수 있다.
P/B 영상 타입에는 스킵 모드, 병합 모드, 경쟁 모드 중에서 적어도 하나를 포함할 수 있다. 이때, 일반적인 화면간 예측, 템플릿 매칭, 현재 픽쳐에서 블록 매칭을 수행, 어파인 모델(이하 요소라는 용어로 지칭)에 관한 개별적인 움직임 정보 부호화 모드가 지원될 수 있거나 또는 둘 이상의 요소가 결합되어 움직임 정보 부호화 모드가 지원될 수 있다. 또는, 소정의 움직임 정보 부호화 모드에 다른 요소가 움직임 정보 예측 후보군으로 구성될 수 있다.
다음은 움직임 정보 부호화 모드에 따른 정의 및 구성을 설명한다.
스킵 모드, 병합 모드, 경쟁 모드는 대상 블록의 움직임 정보 부호화를 위해 기준 블록에 기반하여 설정된 상대 블록(후보 블록)의 움직임 정보를 사용/참조할 수 있다. 즉, 상대 블록으로부터 움직임 정보(예로, 참조 영상 또는 참조 영역)를 유도할 수 있고, 이에 기반하여 획득되는 움직임 정보(예측 움직임 정보)를 대상 블록의 움직임 정보로 예측할 수 있다.
여기서, 스킵 모드와 병합 모드에서 대상 블록의 움직임 벡터와 예측 움직임 벡터 간의 차분 정보는 발생하지 않고, 경쟁 모드에서는 차분 정보가 발생할 수 있다. 즉, 스킵 모드와 병합 모드에서 예측 움직임 벡터가 대상 블록의 움직임 벡터로 그대로 사용되는 것을 의미할 수 있으나, 병합 모드는 차분 정보가 발생하는 변형이 가능할 수도 있다.
여기서, 스킵 모드와 병합 모드에서 대상 블록의 참조 영상에 관한 정보는 예측 참조 영상 정보로 그대로 사용될 수 있고, 경쟁 모드에서는 대상 블록의 참조 영상에 관한 정보는 예측 없이 참조 영상 정보를 부호화할 수 있거나 또는 예측 참조 영상 정보에 기반(예로, 예측 후 차분치를 부호화)하여 부호화할 수 있다.
여기서, 스킵 모드에서 대상 블록의 잔차 성분이 발생하지 않고, 병합 모드와 경쟁 모드에서는 대상 블록의 잔차 성분이 발생할 수 있다. 즉, 병합 모드와 경쟁 모드에서 잔차 성분이 발생하여 이에 관한 처리 과정(변환, 양자화, 그 역과정)이 수행될 수 있음(예로, coded_block_flag와 같이 블록 내 잔차 신호 유무를 확인하여 수행을 안 할 수도 있음)을 의미하지만, 병합 모드는 잔차 성분이 발생하지 않는 변형이 가능할 수도 있다.
상기 움직임 정보 부호화 모드의 움직임 정보 예측 후보군은 다양한 구성이 가능할 수 있다. 일 예로, 스킵 모드와 병합 모드는 공통으로 후보군을 구성할 수 있고, 경쟁 모드는 개별적인 후보군을 구성할 수 있다. 움직임 정보 부호화 모드에 기반하여 후보군 구성 설정이 정해질 수 있다.
여기서, 후보군 구성 설정은 후보군 개수, 후보 블록(상대 블록)의 카테고리 및 위치, 후보 구성 방법 등에 의해 정의될 수 있다.
상기 후보군 개수는 k개 일 수 있고, k는 1 내지 6개 또는 그 이상의 정수일 수 있다. 이때, 후보군 개수가 1개인 경우에는 후보군 선택 정보가 발생하지 않고 기 정의된 후보 블록의 움직임 정보가 예측 움직임 정보로 설정됨을 의미하고, 2개 이상인 경우에는 후보군 선택 정보가 발생할 수 있다.
상기 후보 블록의 카테고리는 inter_blk_A, inter_blk_B, inter_blk_C 중에서 하나 이상일 수 있다. 이때, inter_blk_A가 기본으로 포함되는 카테고리일 수 있고, 다른 카테고리가 추가로 지원되는 카테고리일 수 있으나 이에 한정하지 않는다.
상기 후보 블록의 위치는 inter_blk_A 또는 inter_blk_C의 경우 기준 블록의 좌, 상, 좌상, 우상, 좌하 방향에 인접할 수 있으며, 도 6에 관한 설명에서 유도될 수 있다. inter_blk_B의 경우 대상 블록의 부호화 정보와 동일성/유사성을 갖는 모드 정보를 갖는 블록으로 특정할 수 있고, 전술한 수평적인 관계를 갖는 블록을 특정하는 부분에서 관련 설명을 유도할 수 있다. 일 예로, 움직임 모델에 기반한 움직임 정보 부호화 모드에서 움직임 정보 예측 후보군 구성을 할 때 동일한 모드를 갖는 블록의 움직임 정보를 후보군에 포함할 수 있다.
상기 설명과 같이 움직임 정보 예측 후보군 구성을 위해 참조되는 후보 블록의 위치를 알아보았다. 다음을 통해 해당 후보 블록에 기반하여 예측 움직임 정보를 획득하는 방법을 설명한다.
화면간 예측을 위한 움직임 정보 예측 후보군 구성에 사용되는 후보 블록은 전술한 블록 간의 관계에서의 상대 블록을 의미할 수 있다. 즉, 기준 블록을 중심으로 수많은 상대 블록 중에 특정된 블록을 후보 블록이라 지칭할 수 있고, 후보 블록의 움직임 정보 등에 기반하여 움직임 정보 예측 후보군이 구성될 수 있다. 후술하는 예에서 후보 블록은 상대 블록을 의미할 수 있음을 이해하여야 한다.
도 16은 본 발명의 일 실시예에 따른 기준 블록에 공간적 또는 시간적으로 인접한 블록의 배치에 관한 예시도이다. 상세하게는, inter_blk_A와 inter_blk_C의 카테고리에 속하는 기준 블록과 수평적인 관계를 갖는 블록(상대 블록 또는 후보 블록)의 배치에 관한 예시도일 수 있다. 후술하는 예에서는 inter_blk_A에 속하는 블록을 공간적 후보, inter_blk_C에 속하는 블록을 시간적 후보라 지칭한다.
도 16을 참조하면, 기준 블록을 중심으로 좌, 상, 좌상, 우상, 좌하 방향 등에 인접한 블록, 그리고 시간적으로 동일하지 않은 공간(Col_Pic)에 기준 블록과 대응되는 블록을 중심으로 중앙, 좌, 우, 상, 하, 좌상, 우상, 좌하, 우하 방향 등에 인접한 블록이 대상 블록의 움직임 정보의 예측을 위한 후보 블록으로 구성될 수 있다.
또한, 상기 방향에 인접한 블록은 하나 이상의 서브 블록 단위(예로, 좌 방향의 L 블록은 l0, l1, l2, l3의 서브 블록으로 구획 가능)로 구획(구분)될 수 있으며, 도 16은 각 방향으로 인접한 블록은 4개의 서브 블록으로 구성(대응되는 블록의 중앙은 16개로 구성)되는 예시이지만 이에 한정되지 않고 p개의 다양한 서브 블록의 개수로 구획될 수 있다. 여기서, p는 1, 2, 3, 4 또는 그 이상의 정수일 수 있다. 또한, p는 인접한 블록의 위치(방향)에 기반하여 적응적으로 정해질 수도 있다.
여기서, Col_Pic는 현재 영상을 기준으로 이전 또는 이후에 인접한 영상(예로, 영상 간의 간격이 1인 경우)일 수 있고, 대응되는 블록은 기준 블록과 영상 내 위치가 동일하게 설정될 수 있다.
또는, Col_Pic는 현재 영상을 기준으로 영상 간의 간격이 기 정의된 영상(예로, 영상 간의 간격이 z. z는 1, 2, 3의 정수)일 수 있고, 대응되는 블록은 기준 블록의 소정의 좌표(예로, 좌상측)에서 소정의 변이 벡터(Disparity Vector)만큼 이동한 위치로 설정될 수 있는데, 기 정의된 값으로 변이 벡터가 설정될 수 있다.
또는, Col_Pic는 인접한 블록의 움직임 정보(예로, 참조 영상)에 기초하여 설정될 수 있고, 상기 변이 벡터는 인접한 블록의 움직임 정보(예로, 움직임 벡터)에 기초하여 설정되어 대응되는 블록의 위치가 정해질 수 있다.
이때, k개의 인접한 블록이 참조될 수 있는데, k는 1, 2 또는 그 이상의 정수일 수 있다. 만약 k가 2 이상인 경우 인접한 블록의 움직임 정보(예로, 참조 영상 또는 움직임 벡터)의 최대값, 최소값, 중간값, 가중 평균값 등의 연산에 기초하여 Col_Pic과 변이 벡터가 획득될 수 있다. 예를 들어, 상기 변이 벡터는 좌측 또는 상측 블록의 움직임 벡터로 설정될 수 있고, 좌측과 좌하측 블록의 움직임 벡터의 중간값 또는 평균값으로 설정될 수 있다.
시간적 후보의 상기 설정은 움직임 정보 구성 설정 등에 기반하여 정해질 수 있다. 예를 들어, 블록 단위의 움직임 정보 또는 서브 블록 단위의 움직임 정보를 움직임 정보 예측 후보군에 포함하고자 하는 움직임 정보가 블록 단위 또는 서브 블록 단위로 구성되는지 여부 등에 따라 Col_Pic의 위치, 대응되는 블록의 위치 등이 정해질 수 있다. 일 예로, 서브 블록 단위의 움직임 정보가 획득되는 경우에는 소정의 변이 벡터만큼 이동한 위치의 블록이 대응되는 블록의 위치로 설정될 수 있다.
상기 예는 Col_Pic과 대응되는 블록의 위치에 관한 정보가 묵시적으로 정해지는 경우를 나타내며, 명시적으로 관련 정보가 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭 등의 단위에서 발생할 수도 있다.
전술한 공간적 또는 시간적으로 인접한 블록(또는 후보 블록)의 움직임 정보(각각 공간적 후보, 시간적 후보)가 움직임 정보 부호화 모드에 따른 움직임 정보 예측 후보군에 포함될 수 있다.
일 예(1)로, 단수의 움직임 정보는 그대로 후보군에 포함될 수 있다. 즉, 단수의 움직임 벡터, 참조 픽쳐, 예측 방향 등의 전부 또는 일부가 그대로 대상 블록의 움직임 벡터, 참조 픽쳐, 예측 방향 등의 전부 또는 일부의 예측값으로 사용될 수 있다.
이때, 단수의 움직임 정보는 하나의 후보 블록에서 획득될 수 있고, 공간적 후보 또는 시간적 후보일 수 있다. 후술하는 예에서는 본 예를 통해 획득되는 후보를 공간적 후보인 경우로 가정한다. 또한, 스킵 모드, 병합 모드, 경쟁 모드 중 전부에 적용되는 경우일 수 있다.
일 예(2)로, 단수의 움직임 정보는 조정(또는 변환) 과정을 거친 후에 후보군에 포함될 수 있다. 본 예도 하나의 후보 블록에서 단수의 움직임 정보가 획득된 경우를 가정한다. 상세하게는, 현재 픽쳐와 참조 픽쳐의 거리 간격, 그리고 후보 블록이 속한 픽쳐와 후보 블록의 참조 픽쳐와의 거리 간격에 기반하여 후보 블록의 움직임 정보(예로, 움직임 벡터)에 관한 조정 과정이 수행될 수 있다.
즉, 현재 픽쳐와 참조 픽쳐의 거리 간격에 기반한 스케일링 과정을 통해 후보 블록의 움직임 벡터를 조정할 수 있다. 그리고 후보 블록의 조정된 움직임 벡터를 후보군에 포함할 수 있다. 참조 픽쳐 또는 예측 방향 등의 움직임 정보는 후보 블록의 참조 픽쳐 또는 예측 방향 정보가 그대로 후보군에 포함될 수 있거나 상기 참조 픽쳐의 거리 간격 등에 기반하여 후보군에 포함될 수 있다. 또는 기 정의된 정보(예로, 참조 픽쳐는 현재 픽쳐의 이전 또는 이후의 픽쳐<참조 픽쳐 인덱스가 0>, 예측 방향은 전방향, 후방향, 양방향 중 하나 등) 또는 대상 블록의 참조 픽쳐 또는 예측 방향 정보에 기반하여 설정된 정보가 후보군에 포함될 수 있다.
이때, 단수의 움직임 정보는 시간적 후보일 수 있다. 후술하는 예에서는 본 예를 통해 획득되는 후보를 시간적 후보인 경우로 가정한다. 또한, 스킵 모드, 병합 모드, 경쟁 모드 중 전부 또는 일부에 적용되는 경우일 수 있다. 예를 들어, 스킵 모드, 병합 모드, 경쟁 모드에 적용될 수 있거나 또는 스킵 모드와 병합 모드에는 적용되지 않고 경쟁 모드에 적용될 수 있다.
일 예(3)로, 복수의 움직임 정보는 조합 과정을 거친 후에 후보군에 포함될 수 있다. 상기 조합 과정은 움직임 벡터, 참조 영상, 예측 방향 중 전부 또는 일부에 수행될 수 있다. 상기 조합 과정은 움직임 정보의 중간값, 가중 평균값 등의 과정을 의미한다. 상세하게는, p개의 움직임 정보의 중간값, 가중 평균값 등에 기반하여 획득된 q개의 움직임 정보를 후보군에 포함할 수 있다. 여기서, p는 2, 3, 4 또는 그 이상의 정수일 수 있고, q는 1, 2 또는 그 이상의 정수일 수 있다. 일 예로, p와 q는 각각 2, 1일 수 있다. 여기서, 상기 평균값은 움직임 정보에 동일 가중치(예로, 1:1, 1:1:1 등)가 적용될 수 있거나, 동일하지 않은 가중치(예로, 1:2, 1:3, 2:3, 1:1:2, 1:2:3 등)가 적용될 수 있다.
상기 복수의 움직임 정보는 복수의 후보 블록에서 획득될 수 있다. 이때, 하나의 움직임 정보는 하나의 후보 블록에서 획득되는 경우를 가정하지만, 이에 한정하지 않는다. 후보 블록의 움직임 정보(조합 과정의 입력값)는 (1) 또는 (2) 중에 하나로 제한되거나 또는 (1), (2) 모두에 속하는 정보일 수 있다.
또한, 복수의 움직임 정보는 공간적 후보 또는 시간적 후보 중 어느 하나에서 유도될 수 있고, 공간적 후보와 시간적 후보 모두에서 유도될 수 있다. 예를 들어, 공간적 후보를 사용하여 조합 과정을 수행할 수 있거나 또는 시간적 후보를 사용하여 조합 과정을 수행할 수 있다. 또는, 하나 이상의 공간적 후보와 하나 이상의 시간적 후보를 사용하여 조합 과정을 수행할 수 있다.
상기 복수의 움직임 정보는 후보군의 기 포함된 후보에서 획득될 수 있다. 즉, 후보군 구성 과정에서 앞서 포함된 복수의 후보 움직임 정보(예로, 공간적 후보 또는 시간적 후보)를 조합 과정의 입력값으로 사용할 수 있다. 이때, 상기 조합 과정에 입력값으로 사용되는 후보 움직임 정보는 공간적 후보 또는 시간적 후보 중 어느 하나에서 유도될 수 있고, 공간적 후보와 시간적 후보 모두에서 유도될 수 있다.
상기 설명은 스킵 모드, 병합 모드, 경쟁 모드 중 전부 또는 일부에 적용되는 경우일 수 있다. 예를 들어, 스킵 모드, 병합 모드, 경쟁 모드에 적용될 수 있거나 또는 스킵 모드와 병합 모드에는 적용되고 경쟁 모드에는 적용되지 않을 수 있다.
상기 조합 과정을 통해 획득되는 움직임 정보가 공간적 후보, 시간적 후보에서 유도되는 움직임 정보를 공간 유도 후보, 시간 유도 후보라 지칭하고, 공간적 후보와 시간적 후보에서 유도되는 움직임 정보를 공간 및 시간 유도 후보라 지칭한다. 다음의 예를 통해 상기 후보의 유도 과정을 살펴본다.
공간 유도 후보에 대한 예로, 기준 블록의 좌, 상, 좌상, 우상, 좌하 방향의 블록 중 전부 또는 일부의 움직임 벡터에 가중 평균값 또는 중간값 획득 과정을 적용하여 공간 유도 후보를 획득할 수 있다. 또는, 이미 후보군에 포함된 공간적 후보 중 전부 또는 일부에 가중 평균값 또는 중간값 획득 과정을 적용하여 공간 유도 후보로 획득할 수 있다. 다음은 도 16의 Curr_Pic에서 l3, t3, tl, tr, bl의 움직임 벡터가 가중 평균값 또는 중간값 획득 과정의 입력값으로 고려되는 경우를 가정한다.
예를 들어, 움직임 벡터의 x 성분은 avg(l3_x, t3_x, tl_x, tr_x, bl_x), y 성분은 avg(l3_y, t3_y, tl_y, tr_y, bl_y)으로 유도될 수 있으며, avg는 괄호 안의 움직임 벡터의 평균을 계산하는 함수라 가정한다. 또는, 움직임 벡터의 x 성분은 median(l3_x, t3_x, tl_x, tr_x, bl_x), y 성분은 median(l3_y, t3_y, tl_y, tr_y, bl_y)으로 유도될 수 있으며, median는 괄호 안의 움직임 벡터 중간값을 계산하는 함수라 가정한다.
시간 유도 후보에 대한 예로, 기준 블록과 대응되는 블록의 좌, 우, 상, 하, 좌상, 우상, 좌하, 우하, 중앙 방향의 블록 중 전부 또는 일부의 움직임 벡터에 가중 평균값 또는 중간값 획득 과정을 적용하여 시간 유도 후보를 획득할 수 있다. 또는, 이미 후보군에 포함된 시간적 후보 중 전부 또는 일부에 가중 평균값 또는 중간값 획득 과정을 적용하여 시간 유도 후보를 획득할 수 있다. 다음은 도 16의 Col_Pic에서 br, r2, b2의 움직임 벡터가 가중 평균값 또는 중간값 획득 과정의 입력값으로 고려되는 경우를 가정한다.
예를 들어, 움직임 벡터의 x 성분은 avg(br_x, r2_x, b2_x), y 성분은 avg(br_y, r2_y, b2_y)으로 유도될 수 있다. 또는, 움직임 벡터의 x 성분은 median(br_x, r2_x, b2_x), y 성분은 median(br_y, r2_y, b2_y)으로 유도될 수 있다.
공간 및 시간 유도 후보에 대한 예로, 기준 블록의 공간적으로 인접한 블록과 대응되는 블록의 블록 중 전부 또는 일부의 움직임 벡터에 가중 평균값 또는 중간값 획득 과정을 적용하여 공간 및 시간 유도 후보를 획득할 수 있다. 또는, 이미 후보군에 포함된 공간적 또는 시간적 후보 중 전부 또는 일부에 가중 평균값 또는 중간값 획득 과정을 적용하여 공간 및 시간 유도 후보를 획득할 수 있다. 이에 관한 예시는 생략한다.
상기 과정을 통해 획득된 움직임 정보를 대상 블록의 움직임 정보 예측 후보군에 추가(포함)할 수 있다.
상기 (1) 내지 (3)의 실시예는 움직임 정보 예측 후보군에 공간적 후보 또는 시간적 후보를 그대로 포함하거나 또는 복수의 공간적 또는 시간적 후보에 기반하여 공간 유도 후보, 시간 유도 후보, 공간 및 시간 유도 후보를 획득하여 포함하는 예시를 나타내었다. 즉, (1), (2)의 실시예는 공간적 또는 시간적 후보에 관한 설명일 수 있고, (3)의 실시예는 공간 유도 후보, 시간 유도 후보, 공간 및 시간 유도 후보에 관한 설명일 수 있다.
전술한 예는 대상 블록에서 화소 단위의 움직임 벡터가 동일한 경우일 수 있다. 대상 블록에 화소 단위 또는 서브 블록 단위의 움직임 벡터가 동일하지 않는 경우에 대한 예로 어파인 모델을 전술하였다. 후술하는 예에서는 대상 블록 내의 서브 블록 단위의 움직임 벡터의 부분적인 변화가 존재하지만, 이를 공간적 또는 시간적 상관성에 기반한 후보로 표현하는 경우에 대한 예시를 살펴본다.
다음의 하나 이상의 움직임 정보에 기반하여 서브 블록 단위로 움직임 정보의 예측값을 획득하는 경우를 설명한다. 이는 복수의 움직임 정보에 기반하여 움직임 정보를 획득하는 (3)과 비슷한 과정을 거치되, 획득되는 움직임 정보가 서브 블록 단위로 획득되는 예(4)일 수 있다. (4)의 과정을 통해 획득된 움직임 정보는 움직임 정보 예측 후보군에 포함될 수 있다. 이를 상기 예에서 사용한 용어인 공간 유도 후보, 시간 유도 후보, 공간 및 시간 유도 후보를 사용하여 실시예 (4)를 후술한다.
서브 블록 단위의 움직임 정보의 예측값을 획득하는 경우에 기준 블록은 대상 블록에 제한되는 경우일 수 있다. 또한, 상기 서브 블록 단위의 움직임 정보와 블록 단위의 움직임 정보가 혼합 구성되어 후보군이 구성되는 경우에는 기준 블록이 대상 블록으로 한정되는 경우임을 가정한다.
공간 유도 후보에 대한 예로, 대상 블록(본 예에서 4개의 서브 블록<도 16의 Curr_Pic에서 c0 + c1 + c4 + c5 / c2 + c3 + c6 + c7 / c8 + c9 + c12 + c13 / c10 + c11 + c14 + c1를 각각 D0, D1, D2, D3라고 지칭>으로 구성) 내 서브 블록을 기준으로 획득되는 공간적으로 인접한 블록(본 예에서 도 16의 Curr_Pic 내 다양한 블록. 본 예에서 사용되는 블록은 서브 블록을 중심으로 대상 블록에 인접한 좌, 상, 우상 위치)의 하나의 움직임 정보를 공간 유도 후보로 획득하거나 또는 복수의 움직임 정보에 가중 평균값 또는 중간값 등을 통해 공간 유도 후보를 획득하여 대상 블록의 움직임 정보 예측 후보군에 추가할 수 있다.
예를 들어, 서브 블록 D0는 l1, t1, t2(서브 블록을 중심으로 좌 블록의 아래 영역, 상 블록의 오른쪽 영역, 좌상 블록), 서브 블록 D1은 l1, t3, tr, 서브 블록 D2는 l3, t1, t2, 서브 블록 D3는 l3, t3, tr이 해당 서브 블록의 공간적으로 인접한 블록일 수 있다. 이때, 대상 블록의 움직임 정보 예측 후보군에 추가되는 것은 공간 유도 후보(본 예에서 한 개를 지원한다고 가정)지만, 이로부터 유도되는 움직임 정보는 각 서브 블록 단위로 유도(본 예에서 서브 블록의 개수인 4개 만큼)될 수 있다. 즉, 복호화기에서 공간 유도 후보가 선택된 정보를 파싱하는 경우 위의 과정과 같이 각 서브 블록의 움직임 정보 예측값을 획득할 수 있다.
시간 유도 후보에 대한 예로, 대상 블록 내 서브 블록을 기준으로 획득되는 시간적으로 인접한 블록(본 예에서 도 16의 Col_Pic 내 다양한 블록. 본 예에서 사용되는 블록은 대응되는 서브 블록에 인접한 중앙, 우하, 우, 하 위치)의 하나의 움직임 정보를 시간 유도 후보로 획득하거나 또는 복수의 움직임 정보에 가중 평균값 또는 중간값 등을 통해 시간 유도 후보를 획득하여 대상 블록의 움직임 정보 예측 후보군에 추가할 수 있다.
예를 들어, 서브 블록 D0는 c10, c6, c9(대응 되는 서브 블록을 중심으로 좌하 블록, 우 블록의 아래 영역, 하 블록의 오른쪽 영역), 서브 블록 D1은 r2, r1, c11, 서브 블록 D2는 b2, c14, b1, 서브 블록 D3는 br, r3, b3이 해당 서브 블록의 시간적으로 인접한 블록일 수 있다. 상기 예와 같이 추가되는 것은 시간 유도 후보지만, 그로 인해 유도되는 움직임 정보는 각 서브 블록 단위로 유도될 수 있다.
공간 및 시간 유도 후보에 대한 예로, 대상 블록 내 서브 블록을 기준으로 획득되는 공간적 또는 시간적으로 인접한 블록(본 예에서 사용되는 블록은 서브 블록을 중심으로 공간적으로 인접한 좌, 상 위치와 시간적으로 인접한 우하 위치)의 움직임 정보의 가중 평균값 또는 중간값 등을 공간 및 시간 유도 후보로 획득하여 대상 블록의 움직임 정보 예측 후보군에 추가할 수 있다.
예를 들어, 서브 블록 D0는 l1, t1, c10, 서브 블록 D1은 l1, t3, r2, 서브 블록 D2는 l3, t1, b2, 서브 블록 D3는 l3, t3, br이 해당 서브 블록의 인접한 블록일 수 있다.
정리하면, 실시예 (4)에서 하나 이상의 움직임 정보에 기반하여 획득된 움직임 정보를 후보군에 포함할 수 있다. 상세하게는, p개의 움직임 정보의 중간값, 가중 평균값 등에 기반하여 획득된 q개의 움직임 정보를 후보군에 포함할 수 있다. 여기서, p는 1, 2, 3 또는 그 이상의 정수일 수 있고, q는 1, 2 또는 그 이상의 정수일 수 있다. 여기서, 상기 평균값은 움직임 정보에 동일 가중치(예로, 1:1, 1:1:1 등)가 적용될 수 있거나, 동일하지 않은 가중치(예로, 1:2, 1:3, 2:3, 1:1:2, 1:2:3 등)가 적용될 수 있다. 상기 과정의 입력값은 (1) 또는 (2) 중에 하나로 제한되거나 또는 (1), (2)에 모두에 속하는 정보일 수 있다.
상기 서브 블록의 크기는 m x n일 수 있고, m과 n은 4, 8, 16 또는 그 이상의 정수일 수 있으며 m과 n은 동일하거나 동일하지 않을 수 있다. 상기 서브 블록의 크기는 고정적인 값을 갖거나 또는 대상 블록의 크기에 기반하여 적응적으로 설정될 수 있다. 또한, 상기 서브 블록의 크기는 부호화 설정에 따라 묵시적으로 정해질 수 있거나 또는 명시적으로 관련 정보가 다양한 단위에서 발생할 수도 있다. 여기서, 부호화 설정의 정의는 전술한 다양한 예로부터 참조할 수 있다.
상기 설명은 스킵 모드, 병합 모드, 경쟁 모드 중 전부 또는 일부에 적용되는 경우일 수 있다. 예를 들어, 스킵 모드, 병합 모드, 경쟁 모드에 적용될 수 있거나 또는 스킵 모드와 병합 모드에는 적용되고 경쟁 모드에는 적용되지 않을 수 있다.
상기 (3), (4) 실시예의 지원 여부는 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭 등의 단위에서 명시적으로 관련 정보가 발생할 수 있다. 또는, 부호화 설정에 기반하여 지원 여부가 정해질 수 있다. 여기서, 부호화 설정은 기준 블록(예로, 대상 블록)의 크기, 형태, 가로/세로 길이비, 위치 등의 상태 정보, 영상 타입, 영상 종류, 컬러 성분, 화면간 예측 관련 설정(예로, 움직임 정보 부호화 모드, 템플릿 매칭 지원 여부, 현재 픽쳐에서 블록 매칭 지원 여부, 이동 외 움직임 모델 지원 요소 등) 등에서 하나 이상의 요소에 의해 정의될 수 있다.
예를 들어, 블록의 크기에 따라 (3) 또는 (4) 실시예의 후보군의 지원 여부가 정해질 수 있다. 이때, 블록의 크기는 제 1 문턱크기(최소값) 또는 제 2 문턱크기(최대값)에 의해 지원 범위가 정해질 수 있고, 각 문턱크기는 블록의 너비(W)와 높이(H)로 W, H, W x H, W*H로 표현될 수 있다. 제 1 문턱크기의 경우 W와 H는 4, 8, 16 또는 그 이상의 정수일 수 있고, W*H는 16, 32, 64 또는 그 이상의 정수일 수 있다. 제 2 문턱크기의 경우 W와 H는 16, 32, 64 또는 그 이상의 정수일 수 있고, W*H는 64, 128, 256 또는 그 이상의 정수일 수 있다. 상기 범위는 제 1 문턱크기 또는 제 2 문턱크기 중 하나에 의해 정해지거나 또는 둘 모두를 사용하여 정해질 수 있다.
이때, 상기 문턱크기는 고정적이거나 영상(예로, 영상 타입 등)에 따라 적응적일 수 있다. 이때, 상기 제 1 문턱크기는 최소 부호화 블록, 최소 예측 블록, 최소 변환 블록 등의 크기에 기반하여 설정될 수 있고, 상기 제 2 문턱크기는 최대 부호화 블록, 최대 예측 블록, 최대 변환 블록 등의 크기에 기반하여 설정될 수도 있다.
어파인 모델의 경우 공간적 또는 시간적으로 인접한 블록(후보 블록)의 움직임 정보가 움직임 정보 부호화 모드에 다른 움직임 정보 예측 후보군에 포함될 수 있다. 여기서 공간적 또는 시간적으로 인접한 블록의 위치는 이전 실시예와 동일하거나 비슷할 수 있다.
여기서, 후보 블록의 움직임 모델에 따라 후보군 구성이 정해질 수 있다.
예를 들어, 후보 블록의 움직임 모델이 어파인 모델인 경우 후보 블록의 움직임 벡터 세트 구성을 그대로 후보군에 포함할 수 있다.
또는, 후보 블록의 움직임 모델이 이동 움직임 모델인 경우 대상 블록의 상대적인 위치에 기반하여 제어점 위치의 움직임 벡터의 일개 후보로 포함될 수 있다. 일 예로, 좌상측, 우상측, 좌하측 좌표를 제어점으로 삼는 경우, 좌상측의 제어점의 움직임 벡터는 기준 대상 블록의 좌, 상, 좌상 블록의 움직임 벡터(예로, 이동 움직임 모델인 경우)에 기반하여 예측되고, 우상측의 제어점의 움직임 벡터는 기준 블록의 상, 우상측 블록의 움직임 벡터(예로, 이동 움직임 모델의 경우)에 기반하여 예측되고, 좌하측의 제어점의 움직임 벡터는 기준 블록의 좌, 좌하 블록의 움직임 벡터에 기반하여 예측될 수 있다.
정리하면, 후보 블록의 움직임 모델이 어파인 모델인 경우에는 해당 블록의 움직임 벡터 세트를 후보군에 포함(A)할 수 있고, 후보 블록의 움직임 모델이 이동 움직임 모델인 경우에는 대상 블록의 소정의 제어점의 움직임 벡터의 후보로 고려되어 각 제어점의 조합에 따라 획득되는 움직임 벡터 세트를 후보군에 포함(B)할 수 있다.
이때, A 또는 B 방법 중에 하나만 사용하여 후보군을 구성할 수 있거나 또는 A와 B 방법을 모두 사용하여 후보군에 구성할 수 있다. 그리고 A 방법이 먼저 구성되고 B 방법이 뒤에 구성될 수 있으나, 이에 한정하지 않는다.
다음은 움직임 정보 부호화 모드에 따라 움직임 정보 예측 후보군을 구성하는 방법에 관하여 설명한다.
설명의 편의를 위해 스킵 모드는 병합 모드의 후보군 구성과 동일한 경우를 가정하여 병합 모드와 경쟁 모드에 관하여 설명하지만, 스킵 모드의 후보군 구성의 일부 요소는 병합 모드와 동일하지 않을 수도 있다.
(Merge_inter 모드)
병합 모드를 위한 움직임 정보 예측 후보군(이하 병합 모드 후보군)은 k개의 후보를 포함할 수 있으며, k는 2, 3, 4, 5, 6 또는 그 이상의 정수일 수 있다. 병합 모드 후보군은 공간적 후보 또는 시간적 후보 중 적어도 하나를 포함할 수 있다.
공간적 후보는 기준 블록을 중심으로 좌, 상, 좌상, 우상, 좌하 방향 등에 인접한 블록 중 적어도 하나에서 유도될 수 있다. 후보군 구성을 위한 우선 순위가 존재할 수 있으며, 좌 - 상 - 좌하 - 우상 - 좌상, 좌 - 상 - 우상 - 좌하 - 좌상, 상 - 좌 - 좌하 - 좌상 - 우상 등의 우선 순위가 설정될 수 있다. 일 예로, 도 16의 Curr_Pic에서 l3 - t3 - bl - tr - tl의 순서로 설정될 수 있다.
상기 우선 순위와 각 후보 블록의 사용 가능성(예로, 부호화 모드, 블록 위치 등에 기반하여 판단), 그리고 공간적 후보의 최대 허용 개수(p개. 1 내지 병합 모드 후보군 개수 사이의 정수)에 기반하여 상기 후보 중 전부 또는 일부가 후보군에 포함될 수 있다. 상기 최대 허용 개수와 사용 가능성에 따라 tl - tr - bl - t3 - l3의 순서로 후보군에 포함되지 않을 수 있으며, 만약 최대 허용 개수가 4개이고 후보 블록의 사용 가능성이 모두 참이라면 tl의 움직임 정보는 후보군에 포함되지 않고, 일부 후보 블록의 사용 가능성이 거짓이라면 tl의 움직임 정보는 후보군에 포함될 수 있다.
시간적 후보는 기준 블록에 대응되는 블록을 중심으로 중앙 및 좌, 우, 상, 하, 좌상, 우상, 좌하, 우하 방향 등에 인접한 블록 중 적어도 하나에서 유도될 수 있다. 후보군 구성을 위한 우선 순위가 존재할 수 있으며, 중앙 - 좌하 - 우 - 하, 좌하 - 중앙 - 좌상 등의 우선 순위가 설정될 수 있다. 일 예로, 도 16의 Col_Pic에서 c10 - br 의 순서로 설정될 수 있다.
상기 우선 순위와 각 후보 블록의 사용 가능성, 그리고 시간적 후보의 최대 허용 개수(q개. 1 내지 병합 모드 후보군 개수 사이의 정수)에 기반하여 상기 후보 중 전부 또는 일부가 후보군에 포함될 수 있다. 만약 최대 허용 개수가 1개이고 c10의 사용 가능성이 참이라면 c10의 움직임 정보가 후보군에 포함될 수 있고, c10의 사용 가능성이 거짓이라면 br의 움직임 정보는 후보군에 포함될 수 있다.
여기서, 시간적 후보의 움직임 벡터는 후보 블록의 움직임 벡터에 기반하여 획득될 수 있고, 시간적 후보의 참조 영상은 후보 블록의 참조 영상에 기반하여 획득되거나 또는 기 정의된 참조 영상(예로, 참조 픽쳐 인덱스가 0)으로 획득될 수 있다.
병합 모드 후보군에 포함되는 우선 순위는 공간적 후보 - 시간적 후보 또는 그 반대의 설정이 가능할 수 있으며, 공간적 후보와 시간적 후보가 혼합 구성되는 우선 순위가 지원될 수도 있다. 본 예에서는 공간적 후보 - 시간적 후보인 경우를 가정한다.
또한, 동일한 공간에 속하며 멀리 인접한 블록의 움직임 정보(통계적 후보) 또는 블록 단위의 유도 후보(공간 유도 후보, 시간 유도 후보, 공간 및 시간 유도 후보)를 병합 모드 후보군에 더 포함할 수 있다. 통계적 후보와 블록 단위의 유도 후보는 공간적 후보와 시간적 후보 뒤에 구성될 수 있으나, 이에 한정되지 않고 다양한 우선 순위가 가능할 수 있다. 본 발명에서는 통계적 후보 - 블록 단위의 유도 후보 순서로 후보군을 구성하는 경우를 가정하나. 이에 한정되지 않고 반대의 경우가 가능할 수도 있다. 여기서, 블록 단위의 유도 후보는 공간 유도 후보 또는 시간 유도 후보 또는 공간 및 시간 유도 후보 중 어느 하나만 이용하거나 또는 모두를 이용할 수 있다. 본 예에서는 공간 유도 후보를 이용하는 경우를 가정한다.
본 예에서의 통계적 후보는 기준 블록에 멀리 떨어진 블록(또는 최인접하지 않은 블록)의 움직임 정보로, 대상 블록과 동일한 부호화 모드를 갖는 블록에 한정될 수 있다. 또한, 블록 단위의 움직임 정보(서브 블록 단위의 움직임 정보가 아닌 경우)를 갖는 블록에 한정될 수 있다.
통계적 후보는 FIFO와 같은 방식으로 최대 n개의 움직임 정보가 관리될 수 있으며, 이 중 z개의 움직임 정보가 통계적 후보로 병합 모드 후보군에 포함될 수 있다. z는 병합 모드 후보군에 이미 포함된 후보 구성에 따라 가변적일 수 있으며, 0, 1, 2 또는 그 이상의 정수일 수 있으며, n보다 작거나 같을 수 있다.
블록 단위의 유도 후보는 병합 모드 후보군 내 이미 포함된 n개의 후보를 조합하여 유도될 수 있으며, n은 2, 3, 4 또는 그 이상의 정수일 수 있다. 상기 조합 후보 개수(n)는 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 브릭, 블록 등의 단위에서 명시적으로 발생하는 정보일 수 있다. 또는, 부호화 설정에 따라 묵시적으로 정해질 수 있다. 이때, 부호화 설정은 기준 블록의 크기, 형태, 위치, 영상 타입, 컬러 성분 등에서 하나 이상의 요인에 기반하여 정의될 수 있다.
또한, 상기 조합 후보 개수는 병합 모드 후보군에 채우지 못한 후보의 개수에 기반하여 정해질 수 있다. 이때, 병합 모드 후보군에 채우지 못한 후보의 개수는 병합 모드 후보군의 개수와 이미 채워진 후보의 개수와의 차분값일 수 있다. 즉, 이미 병합 모드 후보군 구성이 완료된 경우라면 블록 단위의 유도 후보는 추가되지 않을 수 있다. 병합 모드 후보군 구성이 완료되지 않았다면 블록 단위의 유도 후보는 추가될 수 있으나, 병합 모드 후보군에 채워진 후보가 1개 이하인 경우 블록 단위의 유도 후보는 추가되지 않는다.
만약 채우지 못한 후보 개수가 1개일 경우 2개의 후보에 기반하여 블록 단위의 유도 후보가 추가될 수 있고, 채우지 못한 후보 개수가 2개 이상일 경우 3개 또는 그 이상의 후보에 기반하여 블록 단위의 유도 후보가 추가될 수 있다.
상기 n개의 조합 후보 위치는 병합 모드 후보군에서 기 설정된 위치일 수 있다. 예를 들어, 병합 모드 후보군에 속한 후보 별로 인덱스(예로, 0 내지 <k-1>)가 할당될 수 있다. 여기서, k는 병합 모드 후보군의 개수를 의미한다. 이때, n개의 조합 후보 위치는 병합 모드 후보군에서 인덱스 0 내지 인덱스(n-1)에 대응될 수 있다. 일 예로, (0, 1) - (0, 2) - (1, 2) - (0, 3) 의 인덱스 조합에 따라 블록 단위의 유도 후보를 획득할 수 있다.
또는, 상기 n개의 조합 후보는 병합 모드 후보군에 속한 각 후보의 예측 방향을 고려하여 결정될 수 있다. 일 예로, 병합 모드 후보군에 속한 후보 중에서, 양방향 예측인 후보만 선택적으로 이용하거나, 또는 단방향 예측인 후보만을 선택적으로 이용할 수 있다.
상기 과정을 통해 병합 모드 후보군의 구성을 마칠 수 있거나 마치지 못할 수 있다. 만약 마치지 못한 경우에는 제로 움직임 벡터를 사용하여 병합 모드 후보군 구성을 완료할 수 있다.
상기 후보군 구성 과정 중 후보군에 이미 포함된 후보와 중복되는 후순위의 움직임 정보는 후보군에 포함될 수 없으나. 이에 한정되지 않고 중복되는 움직임 정보를 포함하는 예외적인 경우가 발생할 수도 있다. 또한, 상기 중복성은 움직임 벡터, 참조 픽쳐, 예측 방향이 동일함을 의미하지만, 소정의 오차 범위(예로, 움직임 벡터)를 허용하는 예외적인 구성 또한 가능할 수 있다.
또한, 블록 간의 상관관계에 기반하여 병합 모드 후보군을 구성할 수 있다. 예를 들어, 공간적 후보의 경우 기준 블록과 상관성이 낮다고 판단되는 후보 블록의 움직임 정보는 낮은 우선 순위를 할당할 수 있다.
예를 들어, 공간적 후보의 후보군 구성을 위한 우선 순위가 좌 - 상 - 좌하 - 우상 - 좌하 순서임을 가정한다. 블록 간의 상관 관계에 따라 좌 블록이 기준 블록과 상관성이 낮은 것으로 확인되면 좌 블록을 후순위로 구성하는 우선 순위의 변경이 발생할 수 있다. 일 예로, 상 - 좌하 - 우상 - 좌하 - 좌 순서로 변경될 수 있다.
또는, 블록 단위의 유도 후보의 후보군 구성을 위한 우선 순위가 (0, 1) - (0, 2) - (1, 2) - (0, 3)의 순서임을 가정한다. 후보군 내 1번 인덱스에 해당하는 후보는 좌 블록의 움직임 정보(공간적 후보)인 경우 1번 인덱스에 해당하는 후보를 후순위로 구성하는 우선 순위의 변경이 발생할 수 있다. 일 예로, (0, 2) - (0, 3) - (0, 1) - (1, 2) 순서로 변경될 수 있다.
상기 블록 간의 상관관계에 기반하여 병합 모드 후보군을 구성할 경우 효율적인 후보군 구성이 가능함으로써 부호화 성능을 향상시킬 수 있다.
(comp_inter 모드)
경쟁 모드를 위한 움직임 정보 예측 후보군(이하 경쟁 모드 후보군)은 k개의 후보를 포함할 수 있으며, k는 2, 3, 4 또는 그 이상의 정수일 수 있다. 병합 모드 후보군은 공간적 후보 또는 시간적 후보 중 적어도 하나를 포함할 수 있다.
공간적 후보는 기준 블록을 중심으로 좌, 상, 좌상, 우상, 좌하 방향 등에 인접한 블록 중 적어도 하나에서 유도될 수 있다. 또는, 좌측 방향으로 인접한 블록(좌, 좌하 블록)과 상측 방향으로 인접한 블록(좌상, 상, 우상 블록)에서 적어도 하나의 후보를 유도할 수 있으며, 본 설정을 가정하여 후술한다.
후보군 구성을 위한 둘 이상의 우선 순위가 존재할 수 있다. 좌측 방향에 인접한 영역에서는 좌하 - 좌 순서의 우선 순위가 설정될 수 있고, 상측 방향에 인접한 영역에서는 우상 - 상 - 좌상 순서의 우선 순위가 설정될 수 있다.
상기 예는 대상 블록의 참조 픽쳐가 동일한 블록에서만 공간적 후보를 유도하는 구성일 수 있는데, 대상 블록의 참조 픽쳐에 기반한 스케일링 과정(다음에서 * 표시)을 통해 공간적 후보를 유도할 수도 있다. 이 경우 좌측 방향에 인접한 영역에서는 좌 - 좌하 - 좌* - 좌하* 또는 좌 - 좌하 - 좌하* - 좌* 순서의 우선 순위가 설정될 수 있고, 상측 방향에 인접한 영역에서는 우상 - 상 - 좌상 - 우상* - 상* - 좌상* 또는 우상 - 상 - 좌상 - 좌상* - 상* - 우상* 순서의 우선 순위가 설정될 수도 있다.
시간적 후보는 기준 블록에 대응되는 블록을 중심으로 중앙 및 좌, 우, 상, 하, 좌상, 우상, 좌하, 우하 방향 등에 인접한 블록 중 적어도 하나에서 유도될 수 있다. 후보군 구성을 위한 우선 순위가 존재할 수 있으며, 중앙 - 좌하 - 우 - 하, 좌하 - 중앙 - 좌상 등의 우선 순위가 설정될 수 있다. 일 예로, 도 16의 Col_Pic에서 c10 - br 의 순서로 설정될 수 있다.
공간적 후보의 최대 허용 개수와 시간적 후보의 최대 허용 개수의 합이 경쟁 모드 후보군 개수보다 적은 설정을 가진 경우에는 공간적 후보의 후보군 구성과 상관없이 시간적 후보를 후보군에 포함할 수 있다.
상기 우선 순위와 각 후보 블록의 사용 가능성, 그리고 시간적 후보의 최대 허용 개수(q개. 1 내지 경쟁 모드 후보군 개수 사이의 정수)에 기반하여 상기 후보 중 전부 또는 일부가 후보군에 포함될 수 있다.
여기서, 공간적 후보의 최대 허용 개수가 병합 모드 후보군 개수와 동일하게 설정될 경우에는 시간적 후보는 후보군에 포함될 수 없고, 공간적 후보에서 최대 허용 개수만큼 채우지 못하였을 때 시간적 후보는 후보군에 포함될 수 있는 설정은 가질 수 있다. 본 예는 후자의 경우를 가정한다.
여기서, 시간적 후보의 움직임 벡터는 후보 블록의 움직임 벡터, 그리고 현재 영상과 대상 블록의 참조 영상 간의 거리 간격에 기반하여 획득될 수 있고, 시간적 후보의 참조 영상은 현재 영상과 대상 블록의 참조 영상의 거리 간격에 기반하여 획득되거나 또는 시간적 후보의 참조 영상에 기반하여 획득되거나 또는 기 정의된 참조 영상(예로, 참조 픽쳐 인덱스가 0)으로 획득될 수 있다.
상기 과정을 통해 경쟁 모드 후보군의 구성을 마칠 수 있거나 마치지 못할 수 있다. 만약 마치지 못한 경우에는 제로 움직임 벡터를 사용하여 경쟁 모드 후보군 구성을 완료할 수 있다.
상기 후보군 구성 과정 중 후보군에 이미 포함된 후보와 중복되는 후순위의 움직임 정보는 후보군에 포함될 수 없으나. 이에 한정되지 않고 중복되는 움직임 정보를 포함하는 예외적인 경우가 발생할 수도 있다. 또한, 상기 중복성은 움직임 벡터, 참조 픽쳐, 예측 방향이 동일함을 의미하지만, 소정의 오차 범위(예로, 움직임 벡터)를 허용하는 예외적인 구성 또한 가능할 수 있다.
또한, 블록 간의 상관관계에 기반하여 경쟁 모드 후보군을 구성할 수 있다. 예를 들어, 공간적 후보의 경우 기준 블록과 상관성이 낮다고 판단되는 후보 블록의 움직임 정보는 후보군에서 제외할 수 있다.
예를 들어, 공간적 후보의 후보군 구성을 위한 우선 순위가 좌측 방향으로 인접한 블록에서는 좌 - 좌하 - 좌* - 좌하*, 상측 방향으로 인접한 블록에서는 우상 - 상 - 좌상 - 우상* - 상* - 좌상* 순서임을 가정한다. 블록 간의 상관 관계에 따라 상 블록이 기준 블록과 상관성이 낮은 것으로 확인되면 상 블록에 관한 후보는 우선 순위에서 제거할 수 있다. 일 예로, 우상 - 좌상 - 우상* - 좌상* 순서로 변경될 수 있다.
상기 블록 간의 상관관계에 기반하여 경쟁 모드 후보군을 구성할 경우 효율적인 후보군 구성이 가능함으로써 부호화 성능을 향상시킬 수 있다.
다음은 움직임 정보 부호화 모드에 따른 화면간 예측을 수행하는 과정을 나타낸다.
대상 블록의 움직임 정보 부호화 모드를 유도한다(1). 유도된 움직임 정보 부호화 모드에 따라 참조되는 블록을 특정한다(2). 특정된 참조 블록과 움직임 정보 부호화 모드에 기반하여 획득된 움직임 정보로 움직임 정보 예측 후보군을 구성한다(3). 움직임 정보 예측 후보군에서 대상 블록의 움직임 정보를 유도한다(4). 대상 블록의 움직임 정보를 이용하여 화면간 예측을 수행한다(5).
(1)에서는 대상 블록의 움직임 정보 부호화 모드에 관한 플래그 정보가 시그날링될 수 있다. 이때, 움직임 정보 부호화 모드는 스킵 모드, 병합 모드, 경쟁 모드 중에 하나로 결정될 수 있으며, 상기 시그날링 되는 플래그는 결정된 모드에 따라 하나 또는 둘 이상의 정보로 구성될 수 있다. 또한, 결정된 모드의 세부 카테고리 중 하나를 선택하기 위한 추가 플래그 정보가 시그날링될 수도 있다.
(2)에서는 유도된 움직임 정보 부호화 모드에 따라 참조되는 블록을 특정한다. 움직임 정보 부호화 모드에 따라 참조되는 블록의 위치가 달리 구성될 수 있다. (3)에서는 특정된 참조 블록으로부터 어떠한 움직임 정보를 유도할 지가 움직임 정보 부호화 모드에 기반하여 정해질 수 있고, 유도된 움직임 정보를 후보군에 포함할 수 있다.
(4)에서는 대상 블록의 후보 선택 정보에 기반하여 후보군 내 대응되는 인덱스에 해당하는 움직임 정보를 유도할 수 있다. 이때, 움직임 정보 부호화 모드에 따라 유도되는 움직임 정보 구성이 결정될 수 있다. 일 예로, 스킵 모드 또는 병합 모드일 경우에는 움직임 벡터와 참조 영상, 그리고 예측 방향에 관한 정보가 하나의 후보 선택 정보에 기반하여 유도될 수 있다. 또는, 경쟁 모드일 경우에는 움직임 벡터에 관한 정보가 하나의 후보 선택 정보에 기반하여 유도될 수 있고, 참조 영상과 예측 방향에 대한 정보는 소정의 다른 플래그에 기반하여 유도될 수 있다. (5)에서는 대상 블록의 움직임 정보를 사용하여 화면간 예측을 수행할 수 있다.
상기 과정을 통해 획득된 움직임 정보를 이용하여 예측 블록을 생성할 수 있다. 대상 블록의 잔차 성분을 가산하여 대상 블록을 복원할 수 있다. 여기서, 잔차 성분은 비트스트림으로부터 시그날링되는 잔차 계수에 역양자화 또는 역변환 중 적어도 하나를 수행하여 유도될 수 있다.
다음은 대상 블록의 움직임 벡터와 예측 움직임 벡터의 차분치인 차분 움직임 벡터에 대한 후술하며, 이는 경쟁 모드에 해당하는 설명일 수 있다.
차분 움직임 벡터(본 예에서는 차분 움직임 벡터의 절대값 기준으로 설명)는 움직임 벡터 정밀도(본 예에서 참조 픽쳐 보간 정밀도에 따라 움직임 벡터 정밀도가 결정되는 경우라 가정. 전술한 내용<즉, 차분 움직임 벡터가 아닌 움직임 벡터 그대로를 부호화하는 예>인 움직임 벡터 정밀도가 적응적으로 결정되는 경우는 본 예에 해당되지 않음)에 따라 표현할 수 있다.
예를 들어, 움직임 벡터 정밀도가 1/4 단위이며 대상 블록의 움직임 벡터는 (2.5, -4)이며 예측 움직임 벡터는 (3.5, -1)일 경우 차분 움직임 벡터는 (-1, -3)일 수 있다.
차분 움직임 벡터 정밀도가 움직임 벡터 정밀도와 동일할 경우(즉, 1/4 단위) x 차분 성분은 4번 인덱스에 따른 코드워드와 음의 부호, y 차분 성분은 12번 인덱스에 따른 코드워드와 양의 부호가 필요할 수 있다.
또한, 움직임 벡터 정밀도 외에 차분 움직임 벡터에 대한 정밀도가 지원될 수 있다. 이때, 차분 움직임 벡터 정밀도는 움직임 벡터 정밀도보다 작거나 같은 정밀도를 후보군으로 가질 수 있다.
차분 움직임 벡터는 차분 움직임 벡터 정밀도에 따라 다양하게 표현할 수 있다.
예를 들어, 움직임 벡터 정밀도가 1/4 단위이며 대상 블록의 움직임 벡터는 (7.75, 10.25)이고 예측 움직임 벡터는 (2.75, 3.25)일 경우 차분 움직임 벡터는 (5, 7)일 수 있다.
고정적인 차분 움직임 벡터 정밀도가 지원되는 경우(즉, 차분 움직임 벡터 정밀도가 움직임 벡터 정밀도와 동일할 경우. 본 예에서 1/4 단위) x 차분 성분은 20번 인덱스에 따른 코드워드와 양의 부호가 필요할 수 있고, y 차분 성분은 28번 인덱스에 따른 코드워드와 양의 부호가 필요할 수 있다. 본 예는 고정적인 차분 움직임 벡터 정밀도에 따른 일 예일 수 있다.
적응적인 차분 움직임 벡터 정밀도가 지원되는 경우(즉, 차분 움직임 벡터 정밀도가 움직임 벡터 정밀도와 동일하거나 다른 경우. 즉, 복수의 정밀도 중 하나를 선택하는 경우. 본 예에서는 정수(1) 단위라 가정) x 차분 성분은 5번 인덱스에 따른 코드워드와 양의 부호가 필요할 수 있고, y 차분 성분은 7번 인덱스에 따른 코드워드와 양의 부호가 필요할 수 있다.
상기 예에서 정밀도와 관계없이 인덱스 순서에 동일한 코드워드가 할당되는 경우(예를 들어, 차분 움직임 벡터를 위한 이진화 방법이 동일)라 가정할 때 고정적인 차분 움직임 벡터가 지원되는 경우에는 x 차분 성분과 y 차분 성분은 20번 인덱스와 28번 인덱스에 따른 코드워드와 같은 긴 코드워드(본 예에서 작은 인덱스를 갖는 경우에는 짧은 비트, 큰 인덱스를 갖는 경우에는 긴 비트가 할당되는 경우를 가정)가 할당되는 것과 달리 적응적인 차분 움직임 벡터가 지원되는 경우에는 x 차분 성분과 y 차분 성분은 5번 인덱스와 7번 인덱스에 따른 코드워드와 같은 짧은 코드워드가 할당될 수 있다.
상기 예는 하나의 차분 움직임 벡터에 차분 움직임 벡터 정밀도가 지원되는 경우일 수 있다. 또는, 하나의 차분 움직임 벡터를 구성하는 x와 y 차분 성분에 하나의 차분 움직임 벡터 정밀도가 지원되는 경우는 다음과 같을 수 있다.
예를 들어, 차분 움직임 벡터가 (5, -1.75)이며 적응적인 차분 움직임 벡터 정밀도(본 예에서 정수(1) 단위, 1/4 단위)가 지원되는 경우에 다음과 같은 구성이 가능할 수 있다.
정수(1) 단위의 경우 x 차분 성분은 5번 인덱스에 따른 코드워드와 양의 부호가 필요할 수 있고, 1/4 단위의 경우 y 차분 성분은 7번 인덱스에 따른 코드워드와 음의 부호가 필요할 수 있다. 본 예가 최적의 경우일 수 있으며, x 차분 성분의 차분 움직임 벡터 정밀도 선택 정보는 정수 단위로 결정되고 y 차분 성분의 차분 움직임 벡터 정밀도 선택 정보는 1/4 단위로 결정될 수 있다.
상기 예와 같이 차분 움직임 벡터에 공통으로 적용되는 정밀도가 지원되거나 또는 차분 움직임 벡터의 구성 성분에 개별적으로 적용되는 정밀도가 지원될 수 있으며, 이는 부호화 설정에 따라 정해질 수 있다.
추가적으로 비트스트림 구성에 대한 설명으로, 전자의 경우 적어도 하나의 차분 성분이 0이 아닌 경우에 적응적인 차분 움직임 벡터 정밀도가 지원될 수 있다.
abs_mvd_x
if(abs_mvd_x)
mvd_sign_x
abs_mvd_y
if(abs_mvd_y)
mvd_sign_y
if( (abs_mvd_x || abs_mvd_y) && adaptive_mvd_precision_enabled_flag )
mvd_precision_flag
후자의 경우 각 차분 성분이 0이 아닌 경우에 적응적인 차분 움직임 벡터 정밀도가 지원될 수 있다.
abs_mvd_x
if(abs_mvd_x)
mvd_sign_x
abs_mvd_y
if(abs_mvd_y)
mvd_sign_y
if( abs_mvd_x && adaptive_mvd_precision_enabled_flag )
mvd_precision_flag_x
if( abs_mvd_y && adaptive_mvd_precision_enabled_flag )
mvd_precision_flag_y
정리하면, 차분 움직임 벡터 정밀도는 부호화 설정에 따라 정해질 수 있으며, 정수 단위와 소수 단위 중 하나의 정밀도일 수 있다. 기 설정된 하나의 차분 움직임 벡터 정밀도를 가질 수 있거나 또는 복수의 차분 움직임 벡터 정밀도 중 하나의 정밀도를 가질 수 있다. 전자의 경우 참조 픽쳐 보간 정밀도에 기반하여 결정되는 예일 수 있다.
복수의 차분 움직임 벡터 정밀도가 지원되는 경우(예를 들어, adaptive_mvd_precision_enabled_flag. 0이면 기 설정된 차분 움직임 벡터 정밀도를 사용하고, 1이면 복수의 차분 움직임 벡터 정밀도 중 하나를 사용)에는 차분 움직임 벡터 정밀도 선택 정보(예를 들어, mvd_precision_flag)가 생성될 수 있다. 이때, 정밀도 후보군으로 4, 2, 1, 1/2, 1/4, 1/8, 1/16 단위의 정밀도 중에 구성이 가능하다. 즉, 후보군 개수는 2, 3, 4, 5 또는 그 이상의 정수일 수 있다.
전술한 실시예 중 움직임 벡터 정밀도와 상기 예의 차분 움직임 벡터 정밀도의 경우 움직임 정보 부호화 설정에 따라 구분하여 설명하였으나, 부호화하는 움직임 정보를 대상으로 고정적이거나 적응적인 정밀도를 갖는다는 점에서는 동일하거나 비슷한 구성일 수 있다.
본 발명에서 부호화하는 움직임 벡터는 차분 움직임 벡터와 그에 대한 부호 정보로 구성된다는 가정 하에 설명한다.
상기 부호화 모드 중 스킵 모드와 병합 모드는 예측 정보를 획득하여 차분 정보가 생성되지 않은 채 바로 해당 블록의 움직임 정보로 사용하기 때문에 적응적인 차분 움직임 벡터 정밀도가 지원되지 않으며, 경쟁 모드에서 적어도 하나의 차분 움직임 벡터가 0이 아닐 경우에 적응적인 차분 움직임 벡터 정밀도 설정이 지원될 수 있다.
대상 블록의 움직임 정보를 부호화하기 위해 이웃 블록의 움직임 정보를 이용하는 것처럼 대상 블록도 부호화가 완료된 후에는 후속 블록의 움직임 정보 부호화시에 참조될 수 있기 때문에 움직임 정보를 저장한다. 이는 참조 픽쳐 보간 정밀도에 따라 움직임 벡터 저장 단위의 정밀도가 결정되는 설정 하에 설명한다. 즉, 움직임 벡터에 대한 표현 단위와 저장 단위가 달리 설정되는 경우를 가정하여 설명하며, 후술하는 예는 적응적인 차분 움직임 벡터 정밀도 설정이 지원되는 경우를 가정한다.
전술한 것과 같이 움직임 벡터를 표현하는 정밀도(1/8 단위라 가정)와 저장하는 정밀도는 동일할 수 있다. 동일하지 않는 경우 또한 전술하였지만, 설명의 편의를 위해 본 예에서는 동일한 경우를 가정하여 설명하며, 이에 대한 내용은 동일하지 않는 경우로의 확장 적용이 가능할 수 있다.
일 예로, 스킵 모드(또는 병합 모드)는 차분 성분이 발생하지 않기 때문에 기 설정된 움직임 벡터 저장 단위에 따라 움직임 벡터를 저장할 수 있다. 즉, 예측 움직임 벡터의 정밀도(이웃 블록의 저장된 움직임 벡터로 예측을 수행하므로)는 기 설정된 움직임 벡터 정밀도와 동일하므로 예측 움직임 벡터를 복원된 움직임 벡터로 보고 (대상 블록의 움직임 벡터로) 그대로 저장할 수 있다.
일 예로, 경쟁 모드는 차분 성분이 발생하여 차분 움직임 벡터 정밀도가 기 설정된 움직임 벡터 저장 단위와 동일하거나 동일하지 않을 수 있기 때문에 기 설정된 움직임 벡터 저장 단위에 따라 움직임 벡터를 저장할 수 있다. 즉, 예측 움직임 벡터의 정밀도는 차분 움직임 벡터의 정밀도와 동일할 수 있거나 동일하지 않을 수 있기 때문에 메모리에 저장하기 전에 차분 움직임 벡터의 정밀도를 예측 움직임 벡터의 정밀도에 일치시키는 과정이 수행될 수 있다.
차분 움직임 벡터 정밀도의 경우 움직임 벡터 정밀도보다 같거나 낮기 때문에 이 경우 예측 움직임 벡터의 정밀도에 일치시키는 과정(예를 들어, 곱, 나눔, 반올림/내림/올림, 쉬프트 연산 등. 본 예에서 왼쪽으로 쉬프트 연산)이 필요할 수 있다. 본 예에서 차분 움직임 벡터 정밀도의 후보로 정수(1), 1/4, 1/8 단위가 포함된다고 가정한다.
각 후보에 따라 다음과 같은 설정을 갖는다고 가정한다.
mvd_pres_idx = 0 (1/1 단위) -> mvd_shift = 3 (shift 횟수)
mvd_pres_idx = 1 (1/2 단위) -> mvd_shift = 2 (shift 횟수)
mvd_pres_idx = 2 (1/8 단위) -> mvd_shift = 0 (shift 횟수)
다음과 같은 과정을 통해 움직임 벡터가 메모리에 저장될 수 있다.
if( adaptive_mvd_precision_enabled_flag == 0 )
{
mv_x = mvp_x + mvd_x
mv_y = mvp_y + mvd_y
}
else
{
mv_x = mvp_x + (mvd_x << mvd_shift_x)
mv_y = mvp_y + (mvd_y << mvd_shift_y)
}
상기 예에서 mv는 복원 움직임 벡터, mvp는 예측 움직임 벡터, mvd는 차분 움직임 벡터를 의미한다. mvd_shift 뒤에 _x와 _y가 붙은 것은 차분 움직임 벡터 구성 성분에 개별적으로 적용되는 정밀도 설정 하에 구분하기 위한 목적으로 기재된 것이며, 차분 움직임 벡터에 공통으로 적용되는 정밀도 설정에서는 제거하여 표현할 수 있다. 또한, 고정적인 차분 움직임 벡터 정밀도 설정의 경우 예측 움직임 벡터와 차분 움직임 벡터를 가산하여 복원 움직임 벡터를 획득할 수 있다. 본 예는 움직임 추정 및 보상 과정, 움직임 벡터의 표현 단위(정밀도)와 저장 단위가 하나의 정밀도로 고정되는 경우(예를 들어, 1/4 단위로 통일되어 사용되고 차분 움직임 벡터 정밀도만 적응적으로 결정)일 수 있다.
정리하면, 적응적인 정밀도를 가진 경우 움직임 벡터 저장 전에 정밀도를 일치시키는 과정이 수행될 수 있다.
추가 설명으로, 움직임 벡터 정밀도와 저장하는 정밀도가 다를 수 있다고 전술하였으며, 그 경우 다음과 같은 과정을 통해 움직임 벡터가 메모리에 저장될 수 있다. 본 예는 움직임 추정 및 보상 과정, 움직임 벡터의 표현 단위와 저장 단위가 복수의 정밀도로 정해지는 경우(본 예에서 움직임 정보 부호화 모드에 따라 달리 설정되는 경우라 스킵 모드, 병합 모드, 경쟁 모드의 경우가 혼합 사용되는 경우를 설명)를 가정하여 설명한다.
if( cu_skip_flag || merge_flag )
{
mv_x = mvp_x
mv_y = mvp_y
}
else
{
if( adaptive_mvd_precision_enabled_flag == 0 )
{
mv_x = mvp_x + (mvd_x << diff_prec)
mv_y = mvp_y + (mvd_y << diff_prec)
}
else
{
mv_x = mvp_x + {(mvd_x << mvd_shift_x) << diff_prec}
mv_y = mvp_y + {(mvd_y << mvd_shift_y) << diff_prec}
}
}
상기 예는 스킵 모드(본 예에서 cu_skip_flag = 1)와 병합 모드(본 예에서 merge_flag = 1)는 움직임 추정 및 보정 과정의 정밀도는 1/16 단위이고 움직임 벡터 정밀도는 1/4 단위이며 저장 단위는 1/16 단위인 경우를 가정하며, 경쟁 모드는 움직임 추정 및 보정 과정의 정밀도는 1/4 단위이고 움직임 벡터 정밀도는 1/4 단위이며 저장 단위는 1/16 단위인 경우를 가정한다. 상기 예와 같이 움직임 벡터 저장 단위에 일치시키기 위한 과정이 추가로 수행될 수 있다.
상기 예에서 mvp의 경우 이웃 블록으로부터 획득한 예측 움직임 벡터로 저장된 이웃 블록의 움직임 벡터 정보를 참조하는 것이기 때문에 이미 움직임 벡터 저장 단위(1/16)로 설정이 되어 있다. mvd의 경우 대상 블록의 움직임 벡터 정밀도(본 예에서 1/4)와 차분 움직임 벡터 정밀도(본 예에서 정수 단위라 가정)를 일치시키는 과정이 수행된다고 하더라도 mvp(본 예에서 1/16)와의 정밀도 조정 과정이 남아 있을 수 있다. 즉, 움직임 벡터 저장 단위와의 정밀도 일치시키는 과정(본 예에서 diff_prec만큼 왼쪽 쉬프트 연산)이 수행될 수 있다.
상기 예는 일부 가정(예를 들어, 움직임 정보 부호화 모드의 정밀도가 다르게 설정되는 등) 하에 설명된 경우로 다양한 가정으로 변경될 경우에도 동일하거나 유사하게 상기 예를 통해 적용된 정보를 유도하여 설명할 수 있다.
또한, 보간 정밀도(또는 움직임 벡터 정밀도)에 따라 차분 움직임 벡터 정밀도 후보군이 정해질 수 있다. 예를 들어, 보간 정밀도가 정수 단위일 경우에 발생 가능한 차분 움직임 벡터는 1 이상 정수 단위로 후보군(예를 들어, 1, 2, 4 단위)을 구성할 수 있고, 소수 단위일 경우 보간 정밀도 이상의 단위로 후보군(예를 들어, 2, 1, 1/4, 1/8 단위. 본 예는 1/8이 보간 정밀도라 가정)을 구성할 수 있다.
본 발명에 따른 방법들은 다양한 컴퓨터 수단을 통해 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능 매체에 기록되는 프로그램 명령은 본 발명을 위해 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다.
컴퓨터 판독 가능 매체의 예에는 롬(ROM), 램(RAM), 플래시 메모리(flash memory) 등과 같이 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함될 수 있다. 프로그램 명령의 예에는 컴파일러(compiler)에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터(interpreter) 등을 사용해서 컴퓨터에 의해 실행될 수 있는 고급 언어 코드를 포함할 수 있다. 상술한 하드웨어 장치는 본 발명의 동작을 수행하기 위해 적어도 하나의 소프트웨어 모듈로 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
또한, 상술한 방법 또는 장치는 그 구성이나 기능의 전부 또는 일부가 결합되어 구현되거나, 분리되어 구현될 수 있다.
상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.
본 발명은 비디오 신호를 부호화/복호화하기 위해 이용될 수 있다.
Claims (7)
- 대상 블록의 움직임 정보 부호화 모드를 유도하는 단계;유도된 움직임 정보 부호화 모드에 따라 참조되는 블록을 특정하는 단계;특정된 참조 블록과 상기 움직임 정보 부호화 모드에 기초하여 획득된 움직임 정보로 움직임 정보 예측 후보군을 구성하는 단계;상기 움직임 정보 예측 후보군에서 대상 블록의 움직임 정보를 유도하는 단계;대상 블록의 움직임 정보를 이용하여 화면간 예측을 수행하는 단계를 포함하되,상기 움직임 정보 예측 후보군은 공간적 후보, 시간적 후보, 통계적 후보, 블록 단위의 유도 후보 중 적어도 하나를 포함하는 화면간 예측 방법.
- 제1항에 있어서,상기 움직임 정보 부호화 모드는 스킵 모드, 병합 모드, 경쟁 모드 중에 선택되며, 소정의 제1 플래그에 의해 결정되는 화면간 예측 방법.
- 제2항에 있어서,상기 제1 플래그는 세부 모드를 구분하는 제2 플래그를 추가로 유도하는 화면간 예측 방법.
- 제3항에 있어서,상기 제2 플래그는 상기 움직임 정보 부호화 모드가 스킵 모드 또는 병합 모드 중에서 결정된 경우에 발생하는 화면간 예측 방법.
- 제1항에 있어서,상기 블록 단위의 유도 후보는 움직임 정보 예측 후보군에 포함된 n개의 후보를 조합하여 획득되는 화면간 예측 방법.
- 제5항에 있어서,상기 블록 단위의 유도 후보는 상기 n개의 후보에 가중 평균값을 통해 획득되는 화면간 예측 방법.
- 제6항에 있어서,상기 n의 값은 2, 3, 4 중에 하나인 화면간 예측 방법.
Priority Applications (14)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411279941.3A CN118972563A (zh) | 2018-06-30 | 2019-07-01 | 图像编码/解码方法和设备 |
| KR1020217002064A KR20210016054A (ko) | 2018-06-30 | 2019-07-01 | 영상 부호화/복호화 방법 및 장치 |
| CN202411279914.6A CN118972561A (zh) | 2018-06-30 | 2019-07-01 | 图像编码/解码方法和设备 |
| CN202411279923.5A CN118972562A (zh) | 2018-06-30 | 2019-07-01 | 图像编码/解码方法和设备 |
| CN202410899614.1A CN118632026A (zh) | 2018-06-30 | 2019-07-01 | 帧间预测方法和记录介质 |
| CN202411279872.6A CN120343238A (zh) | 2018-06-30 | 2019-07-01 | 图像编码/解码方法和设备 |
| CN202410899558.1A CN118660169A (zh) | 2018-06-30 | 2019-07-01 | 帧间预测方法和记录介质 |
| CN201980044609.XA CN112369035B (zh) | 2018-06-30 | 2019-07-01 | 图像编码/解码方法和设备 |
| US17/252,019 US11758175B2 (en) | 2018-06-30 | 2019-07-01 | Image encoding/decoding method and apparatus |
| CN202410899459.3A CN118632025A (zh) | 2018-06-30 | 2019-07-01 | 帧间预测方法和记录介质 |
| CN202411279955.5A CN118972564A (zh) | 2018-06-30 | 2019-07-01 | 图像编码/解码方法和设备 |
| US18/352,620 US12096019B2 (en) | 2018-06-30 | 2023-07-14 | Image encoding/decoding method and apparatus |
| US18/778,551 US12513324B2 (en) | 2018-06-30 | 2024-07-19 | Image encoding/decoding method and apparatus |
| US19/390,807 US20260075233A1 (en) | 2018-06-30 | 2025-11-17 | Image encoding/decoding method and apparatus |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2018-0076176 | 2018-06-30 | ||
| KR20180076176 | 2018-06-30 | ||
| KR20180085681 | 2018-07-24 | ||
| KR10-2018-0085681 | 2018-07-24 |
Related Child Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US17/252,019 A-371-Of-International US11758175B2 (en) | 2018-06-30 | 2019-07-01 | Image encoding/decoding method and apparatus |
| US18/352,620 Continuation US12096019B2 (en) | 2018-06-30 | 2023-07-14 | Image encoding/decoding method and apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020005046A1 true WO2020005046A1 (ko) | 2020-01-02 |
Family
ID=68987541
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2019/007982 Ceased WO2020005046A1 (ko) | 2018-06-30 | 2019-07-01 | 영상 부호화/복호화 방법 및 장치 |
Country Status (4)
| Country | Link |
|---|---|
| US (4) | US11758175B2 (ko) |
| KR (1) | KR20210016054A (ko) |
| CN (9) | CN118632025A (ko) |
| WO (1) | WO2020005046A1 (ko) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20240024335A (ko) | 2018-11-22 | 2024-02-23 | 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 | 서브 블록 기반 인터 예측을 위한 조정 방법 |
| EP3918801A4 (en) * | 2019-01-28 | 2022-06-15 | OP Solutions, LLC | ONLINE AND OFFLINE CHOICE OF EXTENDED LONG-TERM REFERENCE IMAGE STORAGE |
| KR102808776B1 (ko) * | 2019-08-13 | 2025-05-15 | 두인 비전 컴퍼니 리미티드 | 서브 블록 기반 인터 예측의 모션 정밀도 |
| WO2021052505A1 (en) | 2019-09-22 | 2021-03-25 | Beijing Bytedance Network Technology Co., Ltd. | Reference picture resampling in video processing |
| CN113742288B (zh) * | 2020-05-29 | 2024-09-24 | 伊姆西Ip控股有限责任公司 | 用于数据索引的方法、电子设备和计算机程序产品 |
| US12587656B2 (en) * | 2021-10-01 | 2026-03-24 | Lg Electronics Inc. | Intra prediction mode derivation-based intra prediction method and device |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20130113400A (ko) * | 2011-09-16 | 2013-10-15 | 한국전자통신연구원 | 예측 움직임 벡터 유도 방법 및 이러한 방법을 사용하는 장치 |
| KR20140011477A (ko) * | 2011-01-07 | 2014-01-28 | 엘지전자 주식회사 | 영상 정보 부호화 방법 및 복호화 방법과 이를 이용한 장치 |
| KR20140018953A (ko) * | 2011-05-31 | 2014-02-13 | 파나소닉 주식회사 | 화상 부호화 방법, 화상 부호화 장치, 화상 복호 방법, 화상 복호 장치, 및, 화상 부호화 복호 장치 |
| KR20140082969A (ko) * | 2011-10-19 | 2014-07-03 | 파나소닉 주식회사 | 화상 부호화 방법, 화상 부호화 장치, 화상 복호 방법, 및, 화상 복호 장치 |
| KR20180007345A (ko) * | 2016-07-12 | 2018-01-22 | 한국전자통신연구원 | 영상 부호화/복호화 방법 및 이를 위한 기록 매체 |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TW201041404A (en) * | 2009-03-06 | 2010-11-16 | Sony Corp | Image processing device and method |
| US10536701B2 (en) * | 2011-07-01 | 2020-01-14 | Qualcomm Incorporated | Video coding using adaptive motion vector resolution |
| WO2016137149A1 (ko) * | 2015-02-24 | 2016-09-01 | 엘지전자(주) | 폴리곤 유닛 기반 영상 처리 방법 및 이를 위한 장치 |
| US11330284B2 (en) * | 2015-03-27 | 2022-05-10 | Qualcomm Incorporated | Deriving motion information for sub-blocks in video coding |
| CN106303543B (zh) * | 2015-05-15 | 2018-10-30 | 华为技术有限公司 | 视频图像编码和解码的方法、编码设备和解码设备 |
| PL3414900T3 (pl) * | 2016-03-15 | 2025-10-27 | Hfi Innovation Inc. | Sposób oraz urządzenie do kodowania wideo z afiniczną kompensacją ruchu |
| US10448010B2 (en) * | 2016-10-05 | 2019-10-15 | Qualcomm Incorporated | Motion vector prediction for affine motion models in video coding |
| KR102559063B1 (ko) * | 2017-02-24 | 2023-07-24 | 주식회사 케이티 | 비디오 신호 처리 방법 및 장치 |
-
2019
- 2019-07-01 WO PCT/KR2019/007982 patent/WO2020005046A1/ko not_active Ceased
- 2019-07-01 CN CN202410899459.3A patent/CN118632025A/zh active Pending
- 2019-07-01 CN CN202411279914.6A patent/CN118972561A/zh active Pending
- 2019-07-01 CN CN202411279872.6A patent/CN120343238A/zh active Pending
- 2019-07-01 CN CN202410899614.1A patent/CN118632026A/zh active Pending
- 2019-07-01 CN CN201980044609.XA patent/CN112369035B/zh active Active
- 2019-07-01 KR KR1020217002064A patent/KR20210016054A/ko active Pending
- 2019-07-01 CN CN202411279955.5A patent/CN118972564A/zh active Pending
- 2019-07-01 US US17/252,019 patent/US11758175B2/en active Active
- 2019-07-01 CN CN202411279923.5A patent/CN118972562A/zh active Pending
- 2019-07-01 CN CN202411279941.3A patent/CN118972563A/zh active Pending
- 2019-07-01 CN CN202410899558.1A patent/CN118660169A/zh active Pending
-
2023
- 2023-07-14 US US18/352,620 patent/US12096019B2/en active Active
-
2024
- 2024-07-19 US US18/778,551 patent/US12513324B2/en active Active
-
2025
- 2025-11-17 US US19/390,807 patent/US20260075233A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20140011477A (ko) * | 2011-01-07 | 2014-01-28 | 엘지전자 주식회사 | 영상 정보 부호화 방법 및 복호화 방법과 이를 이용한 장치 |
| KR20140018953A (ko) * | 2011-05-31 | 2014-02-13 | 파나소닉 주식회사 | 화상 부호화 방법, 화상 부호화 장치, 화상 복호 방법, 화상 복호 장치, 및, 화상 부호화 복호 장치 |
| KR20130113400A (ko) * | 2011-09-16 | 2013-10-15 | 한국전자통신연구원 | 예측 움직임 벡터 유도 방법 및 이러한 방법을 사용하는 장치 |
| KR20140082969A (ko) * | 2011-10-19 | 2014-07-03 | 파나소닉 주식회사 | 화상 부호화 방법, 화상 부호화 장치, 화상 복호 방법, 및, 화상 복호 장치 |
| KR20180007345A (ko) * | 2016-07-12 | 2018-01-22 | 한국전자통신연구원 | 영상 부호화/복호화 방법 및 이를 위한 기록 매체 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118972561A (zh) | 2024-11-15 |
| CN112369035B (zh) | 2024-10-01 |
| CN118972564A (zh) | 2024-11-15 |
| CN118632025A (zh) | 2024-09-10 |
| US12513324B2 (en) | 2025-12-30 |
| CN112369035A (zh) | 2021-02-12 |
| US20240373054A1 (en) | 2024-11-07 |
| US11758175B2 (en) | 2023-09-12 |
| CN118972563A (zh) | 2024-11-15 |
| CN118632026A (zh) | 2024-09-10 |
| CN120343238A (zh) | 2025-07-18 |
| CN118660169A (zh) | 2024-09-17 |
| US12096019B2 (en) | 2024-09-17 |
| US20230362401A1 (en) | 2023-11-09 |
| US20210258601A1 (en) | 2021-08-19 |
| US20260075233A1 (en) | 2026-03-12 |
| KR20210016054A (ko) | 2021-02-10 |
| CN118972562A (zh) | 2024-11-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020096389A1 (ko) | 영상 신호 부호화/복호화 방법 및 이를 위한 장치 | |
| WO2020004900A1 (ko) | 화면내 예측 방법 및 장치 | |
| WO2020009514A1 (ko) | 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체 | |
| WO2019190140A1 (ko) | 영상 부호화/복호화 방법 및 장치 | |
| WO2016195453A1 (ko) | 영상 부호화 및 복호화 방법과 영상 복호화 장치 | |
| WO2019009590A1 (ko) | 추가 영역을 포함하는 분할 단위를 이용한 영상 복호화 방법 및 장치 | |
| WO2016137149A1 (ko) | 폴리곤 유닛 기반 영상 처리 방법 및 이를 위한 장치 | |
| WO2020067700A1 (ko) | 영상 부호화/복호화 방법 및 장치 | |
| WO2020005046A1 (ko) | 영상 부호화/복호화 방법 및 장치 | |
| WO2018097700A1 (ko) | 필터링을 위한 방법 및 장치 | |
| WO2020184979A1 (ko) | 영상 신호 부호화/복호화 방법 및 이를 위한 장치 | |
| WO2020004902A1 (ko) | 영상 부호화/복호화 방법 및 장치 | |
| WO2019139393A1 (ko) | 색차 성분에 관한 화면내 예측 부호화/복호화 방법 및 장치 | |
| WO2020005045A1 (ko) | 머지 모드 기반의 인터 예측 방법 및 장치 | |
| WO2018174618A1 (ko) | 참조 블록을 사용하는 예측 방법 및 장치 | |
| WO2019117645A1 (ko) | 예측 네트워크를 사용하는 영상의 부호화 및 복호화를 위한 방법 및 장치 | |
| WO2021006559A1 (ko) | 크로마 성분에 대한 영상 디코딩 방법 및 그 장치 | |
| WO2020050704A1 (ko) | 영상 부호화/복호화 방법 및 장치 | |
| WO2024147679A1 (ko) | 영상 부호화/복호화를 위한 방법, 장치 및 기록 매체 | |
| WO2019147067A1 (ko) | 시간적 움직임 정보를 이용하는 영상 부호화 및 영상 복호화를 위한 방법 및 장치 | |
| WO2021006562A1 (ko) | 영상 디코딩 방법 및 그 장치 | |
| WO2020262913A1 (ko) | 크로마 양자화 파라미터 데이터에 대한 영상 디코딩 방법 및 그 장치 | |
| WO2023239220A1 (ko) | 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장하는 기록 매체 | |
| WO2023195824A1 (ko) | 영상 부호화/복호화를 위한 방법, 장치 및 기록 매체 | |
| WO2025075478A1 (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: 19826108 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 20217002064 Country of ref document: KR Kind code of ref document: A |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19826108 Country of ref document: EP Kind code of ref document: A1 |