WO2020197290A1 - 영상 부호화/복호화 방법 및 장치 - Google Patents

영상 부호화/복호화 방법 및 장치 Download PDF

Info

Publication number
WO2020197290A1
WO2020197290A1 PCT/KR2020/004136 KR2020004136W WO2020197290A1 WO 2020197290 A1 WO2020197290 A1 WO 2020197290A1 KR 2020004136 W KR2020004136 W KR 2020004136W WO 2020197290 A1 WO2020197290 A1 WO 2020197290A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
tile
current block
prediction
motion information
Prior art date
Application number
PCT/KR2020/004136
Other languages
English (en)
French (fr)
Inventor
이배근
Original Assignee
인텔렉추얼디스커버리 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 인텔렉추얼디스커버리 주식회사 filed Critical 인텔렉추얼디스커버리 주식회사
Priority to US17/440,248 priority Critical patent/US20220174287A1/en
Publication of WO2020197290A1 publication Critical patent/WO2020197290A1/ko

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/53Multi-resolution motion estimation; Hierarchical motion estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present invention relates to a video signal processing method and apparatus.
  • Video compression is largely composed of intra prediction (or intra prediction), inter prediction (or inter prediction), transformation, quantization, entropy coding encoding, and in-loop filter.
  • intra prediction or intra prediction
  • inter prediction or inter prediction
  • transformation or quantization
  • quantization or quantization
  • entropy coding encoding and in-loop filter.
  • Discussion is underway on a video compression technique for effectively providing 3D image content of high resolution and ultra high resolution.
  • An object of the present invention is to provide an image encoding/decoding method and apparatus with improved efficiency.
  • An object of the present invention is to provide a prediction method and apparatus for each inter mode.
  • An object of the present invention is to provide a multi-type based conversion method and apparatus.
  • An object of the present invention is to provide a computer-readable recording medium storing a bitstream generated by a video encoding method and apparatus.
  • An image encoding/decoding method and apparatus generates a prediction block of a current block based on a pre-defined prediction mode, generates a residual block of the current block based on a predetermined transformation type, and the The current block may be reconstructed based on the prediction block and the residual block.
  • the prediction block of the current block when the prediction mode of the current block is an intra mode, the prediction block of the current block may be generated using a predetermined intra reference sample and an intra prediction mode.
  • the intra reference sample is derived from any one of a plurality of intra reference lines, and the intra prediction mode may be determined in consideration of the shape of the current block.
  • generating the prediction block comprises: generating a merge candidate list of the current block, the merge candidate It may include inducing motion information of the current block based on a list and performing motion compensation of the current block based on the derived motion information.
  • the merge candidate list includes at least one of a spatial merge candidate, a temporal merge candidate, or a merge candidate of a motion information list, and the motion information list is before the current block. It may consist of the decoded motion information of one or more previous blocks.
  • the spatial merge candidate is determined in consideration of a predetermined parallel merge region, and the parallel merge regions are a plurality of coding blocks that are encoded/decoded independently or in parallel with each other. It may mean an area composed of.
  • a merge candidate of the motion information list may not overlap with a spatial merge candidate pre-added to a merge candidate list.
  • one or more coding blocks belonging to the parallel merge region may share one and the same motion information list.
  • the method may further include updating the motion information list based on motion information of the current block.
  • the update may be performed only when the current block is a block having the last decoding order in the parallel merge region.
  • the motion information of the current block may include at least one of a motion vector, a reference picture index, and prediction direction information.
  • the performing of motion compensation of the current block includes correcting a motion vector of the current block based on a predetermined differential motion vector (MVD), and , The motion compensation may be performed using a corrected motion vector.
  • VMD differential motion vector
  • the differential motion vector includes a differential motion vector in a first direction (MVD L0 ) and a differential motion vector in a second direction (MVD L1 ), and the second The direction difference motion vector may be set to a vector having the same magnitude as the difference motion vector in the first direction and opposite in direction.
  • the motion vector is corrected based on an encoding parameter of the current block, and the encoding parameter is one of a prediction mode, motion information, or size of the current block. It may include at least one.
  • the method and apparatus for encoding an image according to the present invention may determine a transformation type of a current block based on a table pre-defined in the encoding apparatus and encode information indicating the determined transformation type.
  • the method and apparatus for decoding an image according to the present invention may determine a transformation type of a current block based on information explicitly signaled from the encoding device and a table pre-defined in the decoding device.
  • the pre-defined table may define at least one of a transformation type in a horizontal direction or a transformation type in a vertical direction that can be used for each of the encoded information.
  • the transform type may be implicitly derived based on at least one of a size, a shape, an intra prediction mode, and a component type of the current block.
  • the computer-readable recording medium may store a bitstream generated according to the above-described video encoding method/apparatus or a bitstream decoded by the above-described video decoding method/apparatus.
  • the present invention can improve the coding efficiency of inter prediction by using various types of merge candidates.
  • the present invention can improve the accuracy of inter prediction through correction of motion information.
  • the present invention can improve encoding efficiency of residual samples by performing multi-type-based transformation as well as additional transformation.
  • a computer-readable recording medium for storing a bitstream generated by an image encoding method/apparatus according to the present invention.
  • FIG. 1 is a block diagram showing an image encoding apparatus according to the present invention.
  • FIG. 2 is a block diagram showing an image decoding apparatus according to the present invention.
  • 3 to 5 illustrate a method of dividing a picture into a plurality of blocks in an embodiment to which the present invention is applied.
  • FIG. 6 schematically illustrates a process of restoring a current block according to an embodiment to which the present invention is applied.
  • FIGS. 7 to 16 are diagrams illustrating an intra prediction method as an embodiment to which the present invention is applied.
  • FIG 17 illustrates an inter prediction method according to an embodiment to which the present invention is applied.
  • 31 illustrates an inter prediction method based on a merge mode as an embodiment to which the present invention is applied.
  • 32 to 33 illustrate neighboring blocks that can be used as spatial merge candidates according to an embodiment to which the present invention is applied.
  • 34 to 40 are diagrams illustrating a method of configuring and updating a motion information list according to an embodiment to which the present invention is applied.
  • 41 to 43 are diagrams illustrating a method of configuring and updating a motion information list in a parallel merge area according to an embodiment to which the present invention is applied.
  • 45 and 46 are diagrams illustrating a transformation method in an encoding/decoding apparatus according to an embodiment to which the present invention is applied.
  • 47 and 48 illustrate a method of applying an in-loop filter to a reconstruction block as an embodiment to which the present invention is applied.
  • 49 to 55 illustrate a method of dividing one picture into various types of fragment regions according to an embodiment to which the present invention is applied.
  • An image encoding/decoding method and apparatus generates a prediction block of a current block based on a pre-defined prediction mode, generates a residual block of the current block based on a predetermined transformation type, and the The current block may be reconstructed based on the prediction block and the residual block.
  • the prediction block of the current block when the prediction mode of the current block is an intra mode, the prediction block of the current block may be generated using a predetermined intra reference sample and an intra prediction mode.
  • the intra reference sample is derived from any one of a plurality of intra reference lines, and the intra prediction mode may be determined in consideration of the shape of the current block.
  • generating the prediction block comprises: generating a merge candidate list of the current block, the merge candidate It may include inducing motion information of the current block based on a list and performing motion compensation of the current block based on the derived motion information.
  • the merge candidate list includes at least one of a spatial merge candidate, a temporal merge candidate, or a merge candidate of a motion information list, and the motion information list is before the current block. It may consist of the decoded motion information of one or more previous blocks.
  • the spatial merge candidate is determined in consideration of a predetermined parallel merge region, and the parallel merge regions are a plurality of coding blocks that are encoded/decoded independently or in parallel with each other. It may mean an area composed of.
  • a merge candidate of the motion information list may not overlap with a spatial merge candidate pre-added to a merge candidate list.
  • one or more coding blocks belonging to the parallel merge region may share one and the same motion information list.
  • the method may further include updating the motion information list based on motion information of the current block.
  • the update may be performed only when the current block is a block having the last decoding order in the parallel merge region.
  • the motion information of the current block may include at least one of a motion vector, a reference picture index, and prediction direction information.
  • the performing of motion compensation of the current block includes correcting a motion vector of the current block based on a predetermined differential motion vector (MVD), and , The motion compensation may be performed using a corrected motion vector.
  • VMD differential motion vector
  • the differential motion vector includes a differential motion vector in a first direction (MVD L0 ) and a differential motion vector in a second direction (MVD L1 ), and the second The direction difference motion vector may be set to a vector having the same magnitude as the difference motion vector in the first direction and opposite in direction.
  • the motion vector is corrected based on an encoding parameter of the current block, and the encoding parameter is one of a prediction mode, motion information, or size of the current block. It may include at least one.
  • the method and apparatus for encoding an image according to the present invention may determine a transformation type of a current block based on a table pre-defined in the encoding apparatus and encode information indicating the determined transformation type.
  • the method and apparatus for decoding an image according to the present invention may determine a transformation type of a current block based on information explicitly signaled from the encoding device and a table pre-defined in the decoding device.
  • the pre-defined table may define at least one of a transformation type in a horizontal direction or a transformation type in a vertical direction that can be used for each of the encoded information.
  • the transform type may be implicitly derived based on at least one of a size, a shape, an intra prediction mode, and a component type of the current block.
  • the computer-readable recording medium may store a bitstream generated according to the above-described video encoding method/apparatus or a bitstream decoded by the above-described video decoding method/apparatus.
  • first and second may be used to describe various elements, but the elements should not be limited by the terms. These terms are used only for the purpose of distinguishing one component from another component.
  • a part of the configuration of the apparatus or a part of the method may be omitted.
  • the order of part of the configuration of the device or part of the steps of the method may be changed.
  • other components or other steps may be inserted into a part of the configuration of the device or part of the step of the method.
  • components shown in the embodiments of the present invention are independently shown to represent different characteristic functions, and it does not mean that each component is formed of separate hardware or a single software component. That is, each constituent unit is described as being listed as a respective constituent unit for convenience of explanation, and at least two constituent units of each constituent unit are combined to form a single constituent unit, or one constituent unit may be divided into a plurality of constituent units to perform a function. Integrated embodiments and separate embodiments of each of these components are also included in the scope of the present invention unless departing from the essence of the present invention.
  • a block may be variously expressed as a unit, a region, a unit, a partition, and the like, and a sample may be variously expressed as a pixel, a pel, or a pixel.
  • FIG. 1 is a block diagram showing an image encoding apparatus according to the present invention.
  • a conventional video encoding apparatus 100 includes a picture splitter 110, a prediction unit 120, 125, a transform unit 130, a quantization unit 135, a rearrangement unit 160, and an entropy encoder. (165), an inverse quantization unit 140, an inverse transform unit 145, a filter unit 150, and a memory 155 may be included.
  • the picture dividing unit 110 may divide the input picture into at least one processing unit.
  • the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU).
  • a coding unit may be used as a unit that performs encoding or a unit that performs decoding.
  • the prediction unit may be divided in a shape such as at least one square or rectangle of the same size within one coding unit, or one prediction unit among the prediction units split within one coding unit is another prediction. It may be divided to have a shape and/or size different from the unit.
  • intra prediction may be performed without dividing into a plurality of prediction units NxN.
  • the prediction units 120 and 125 may include an inter prediction unit 120 that performs inter prediction or inter prediction, and an intra prediction unit 125 that performs intra prediction or intra prediction. It is possible to determine whether to use inter prediction or to perform intra prediction for the prediction unit, and determine specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method.
  • a residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130.
  • prediction mode information, motion vector information, etc. used for prediction may be encoded by the entropy encoder 165 together with a residual value and transmitted to a decoder.
  • the inter prediction unit 120 may predict a prediction unit based on information of at least one picture of a previous picture or a subsequent picture of the current picture. In some cases, the prediction unit may be predicted based on information of a partial region in the current picture that has been encoded. You can also predict the unit.
  • the inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
  • the reference picture interpolation unit may receive reference picture information from the memory 155 and generate pixel information of an integer number of pixels or less from the reference picture.
  • a DCT-based interpolation filter with different filter coefficients may be used to generate pixel information of an integer pixel or less in units of 1/4 pixels.
  • a DCT-based interpolation filter with different filter coefficients may be used to generate pixel information of an integer pixel or less in units of 1/8 pixels.
  • the motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit.
  • Various methods such as a full search-based block matching algorithm (FBMA), three step search (TSS), and a new three-step search algorithm (NTS), can be used as a method for calculating a motion vector.
  • the motion vector may have a motion vector value in units of 1/2 or 1/4 pixels based on the interpolated pixels.
  • the motion prediction unit may predict the current prediction unit by differently predicting the motion.
  • Various methods such as a skip mode, a merge mode, an AMVP mode, an intra block copy mode, and an affine mode may be used as a motion prediction method.
  • the intra predictor 125 may generate a prediction unit based on reference pixel information around a current block, which is pixel information in the current picture.
  • the neighboring block of the current prediction unit is a block that has performed inter prediction and the reference pixel is a pixel that has performed inter prediction
  • the reference pixel included in the block that has performed inter prediction is a reference pixel of the block that has performed intra prediction Can be used in place of information. That is, when the reference pixel is not available, information on the reference pixel that is not available may be replaced with at least one reference pixel among the available reference pixels.
  • a residual block including a prediction unit that performs prediction based on a prediction unit generated by the prediction units 120 and 125 and residual information that is a difference value from the original block of the prediction unit may be generated.
  • the generated residual block may be input to the transform unit 130.
  • the original block and the residual block including residual information of the prediction unit generated through the prediction units 120 and 125 are converted to DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), and KLT. You can convert it using the same conversion method. Whether to apply DCT, DST, or KLT to transform the residual block may be determined based on intra prediction mode information of a prediction unit used to generate the residual block.
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • KLT Discrete Sine Transform
  • the quantization unit 135 may quantize values converted into the frequency domain by the transform unit 130. Quantization coefficients may vary depending on the block or the importance of the image. The value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160.
  • the rearrangement unit 160 may rearrange coefficient values on the quantized residual values.
  • the rearrangement unit 160 may change the two-dimensional block shape coefficients into a one-dimensional vector shape through a coefficient scanning method. For example, the rearrangement unit 160 may scan from a DC coefficient to a coefficient in a high frequency region using a Zig-Zag Scan method, and change it into a one-dimensional vector form.
  • a vertical scan that scans two-dimensional block shape coefficients in a column direction and a horizontal scan that scans two-dimensional block shape coefficients in a row direction may be used. That is, according to the size of the transformation unit and the intra prediction mode, it is possible to determine which scan method is used among zig-zag scan, vertical direction scan, and horizontal direction scan.
  • the entropy encoding unit 165 may perform entropy encoding based on values calculated by the rearrangement unit 160. Entropy coding may use various coding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC). In relation to this, the entropy encoder 165 may encode residual value coefficient information of a coding unit from the rearrangement unit 160 and the prediction units 120 and 125. In addition, according to the present invention, it is possible to signal and transmit information indicating that motion information is derived from the side of the decoder and used, and information on a technique used to induce motion information.
  • CAVLC Context-Adaptive Variable Length Coding
  • CABAC Context-Adaptive Binary Arithmetic Coding
  • the inverse quantization unit 140 and the inverse transform unit 145 inverse quantize values quantized by the quantization unit 135 and inverse transform the values transformed by the transform unit 130.
  • the residual value generated by the inverse quantization unit 140 and the inverse transform unit 145 is reconstructed by being combined with the prediction units predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction units 120 and 125 Blocks (Reconstructed Block) can be created.
  • the filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • the deblocking filter can remove block distortion caused by the boundary between blocks in the reconstructed picture.
  • the offset correction unit may correct an offset from the original image for the deblocking image in pixel units. In order to perform offset correction for a specific picture, the pixels included in the image are divided into a certain number of areas, and then the area to be offset is determined and the offset is applied to the area, or offset by considering the edge information of each pixel. You can use the method of applying.
  • Adaptive Loop Filtering ALF
  • ALF Adaptive Loop Filtering
  • the memory 155 may store the reconstructed block or picture calculated through the filter unit 150, and the stored reconstructed block or picture may be provided to the prediction units 120 and 125 when performing inter prediction.
  • FIG. 2 is a block diagram showing an image decoding apparatus according to the present invention.
  • the image decoder 200 includes an entropy decoding unit 210, a rearrangement unit 215, an inverse quantization unit 220, an inverse transform unit 225, prediction units 230 and 235, and a filter unit ( 240) and a memory 245 may be included.
  • the input bitstream may be decoded in a procedure opposite to that of the image encoder.
  • the entropy decoding unit 210 may perform entropy decoding in a procedure opposite to that performed by the entropy encoding unit of the image encoder. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied in response to the method performed by the image encoder.
  • various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied in response to the method performed by the image encoder.
  • CAVLC Context-Adaptive Variable Length Coding
  • CABAC Context-Adaptive Binary Arithmetic Coding
  • the entropy decoder 210 may decode information related to intra prediction and inter prediction performed by the encoder.
  • the rearrangement unit 215 may perform rearrangement based on a method in which the bitstream entropy-decoded by the entropy decoder 210 is rearranged by the encoder.
  • the coefficients expressed in the form of a one-dimensional vector may be reconstructed into coefficients in the form of a two-dimensional block and rearranged.
  • the inverse quantization unit 220 may perform inverse quantization based on a quantization parameter provided by an encoder and a coefficient value of a rearranged block.
  • the inverse transform unit 225 may perform an inverse transform, that is, an inverse DCT, an inverse DST, and an inverse KLT, for transforms, that is, DCT, DST, and KLT, performed by the transform unit on the quantization result performed by the image encoder.
  • the inverse transformation may be performed based on a transmission unit determined by an image encoder.
  • the inverse transform unit 225 of the image decoder may selectively perform a transformation technique (eg, DCT, DST, KLT) according to a plurality of pieces of information such as a prediction method, a size of a current block, and a prediction direction.
  • a transformation technique eg, DCT, DST, KLT
  • the prediction units 230 and 235 may generate a prediction block based on information related to generation of a prediction block provided from the entropy decoder 210 and information on a previously decoded block or picture provided from the memory 245.
  • Intra prediction for the prediction unit is performed based on the pixel present at the top, but when the size of the prediction unit and the size of the transformation unit are different when performing intra prediction, the intra prediction is performed using a reference pixel based on the transformation unit. You can make predictions.
  • intra prediction using NxN splitting for only the smallest coding unit may be used.
  • the prediction units 230 and 235 may include a prediction unit determining unit, an inter prediction unit, and an intra prediction unit.
  • the prediction unit discrimination unit receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, motion prediction related information of the inter prediction method, and divides the prediction unit from the current coding unit, and predicts It can be determined whether the unit performs inter prediction or intra prediction.
  • the encoder 100 does not transmit motion prediction-related information for the inter prediction, instead, information indicating that motion information is derived from the side of the decoder and used, and information about a technique used for deriving motion information are transmitted.
  • the prediction unit determining unit determines the prediction performance of the inter prediction unit 230 based on information transmitted from the encoder 100.
  • the inter prediction unit 230 uses information necessary for inter prediction of the current prediction unit provided by the video encoder to predict the current based on information included in at least one picture of a previous picture or a subsequent picture of the current picture including the current prediction unit. Inter prediction for a unit can be performed.
  • the motion prediction method of the prediction unit included in the corresponding coding unit based on the coding unit is a skip mode, a merge mode, an AMVP mode, and an intra block copy mode ( Intra block copy mode) or affine mode can be determined.
  • the intra prediction unit 235 may generate a prediction block based on pixel information in the current picture.
  • intra prediction may be performed based on intra prediction mode information of a prediction unit provided from an image encoder.
  • the intra prediction unit 235 may include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter.
  • the AIS filter is a part that performs filtering on a reference pixel of the current block, and may determine whether to apply the filter according to the prediction mode of the current prediction unit and apply it.
  • AIS filtering may be performed on a reference pixel of a current block by using the prediction mode and AIS filter information of the prediction unit provided by the image encoder. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.
  • the reference pixel interpolator may interpolate the reference pixel to generate a reference pixel of a pixel unit having an integer value or less.
  • the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating a reference pixel
  • the reference pixel may not be interpolated.
  • the DC filter may generate a prediction block through filtering when the prediction mode of the current block is the DC mode.
  • the reconstructed block or picture may be provided to the filter unit 240.
  • the filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
  • the deblocking filter of the image decoder may receive information related to the deblocking filter provided from the image encoder, and the image decoder may perform deblocking filtering on a corresponding block.
  • the offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding and information on the offset value.
  • the ALF may be applied to a coding unit based on information on whether to apply ALF and information on ALF coefficients provided from the encoder. Such ALF information may be included in a specific parameter set and provided.
  • the memory 245 can store the reconstructed picture or block so that it can be used as a reference picture or a reference block, and can provide the reconstructed picture to an output unit.
  • 3 to 5 illustrate a method of dividing a picture into a plurality of blocks in an embodiment to which the present invention is applied.
  • a picture is divided into a plurality of basic coding units (Coding Tree Units, hereinafter, CTU).
  • CTU Coding Tree Unit
  • the size of the CTU can be specified in units of picture or video sequence, and each CTU is configured not to overlap with other CTUs. For example, in the entire sequence, the CTU size can be set to 128x128, and any one of 128x128 to 256x256 can be selected and used in picture units.
  • a coding block/coding unit may be generated by hierarchically dividing the CTU. Prediction and transformation can be performed in units of coding units, and become a basic unit for determining a prediction mode.
  • the prediction mode represents a method of generating a predicted image, and may include intra prediction (hereinafter, intra prediction), inter prediction (hereinafter, inter prediction), or combined prediction. .
  • a prediction block may be generated by using at least one of intra prediction, inter prediction, and complex prediction in units of coding units.
  • the inter prediction mode when the reference picture indicates the current picture, a prediction block may be generated based on an area within the current picture that has already been decoded.
  • Intra prediction is a method of generating a prediction block using information of the current picture
  • inter prediction is a method of generating a prediction block using information of another picture that has already been decoded
  • composite prediction is a method of mixing inter prediction and intra prediction. This is how to use.
  • some regions of a plurality of sub-regions constituting one coding block may be encoded/decoded by inter prediction, and the remaining regions may be encoded/decoded by intra prediction.
  • inter prediction may be performed primarily on a plurality of sub-regions, and intra prediction may be performed secondarily.
  • the prediction value of the coding block may be derived by a weighted average of a prediction value according to inter prediction and a prediction value according to intra prediction.
  • the number of sub-regions constituting one coding block may be 2, 3, 4 or more, and the shape of the sub-region may be a rectangle, a triangle, or other polygons.
  • the CTU may be divided (partitioned) into a quad tree, binary tree, or triple tree.
  • the divided block may be further divided into a quad tree, binary tree, or triple tree.
  • the method of dividing the current block into 4 square partitions is called quad-tree partitioning
  • the method of dividing the current block into 2 square or non-square partitions is called binary tree partitioning
  • the method of dividing the current block into 3 partitions is called binary.
  • tree partitioning We define it as tree partitioning.
  • Binary partitioning in the vertical direction (SPLIT_BT_VER in FIG. 4) is called vertical binary tree partitioning, and binary tree partitioning in the horizontal direction (SPLIT_BT_HOR in FIG. 4) is defined as horizontal binary tree partitioning.
  • Triple partitioning in the vertical direction (SPLIT_TT_VER in FIG. 4) is called vertical triple tree partitioning, and triple-tree partitioning in the horizontal direction (SPLIT_TT_HOR in FIG. 4) is defined as horizontal triple tree partitioning.
  • the number of divisions is called the partitioning depth, and the maximum value of the partitioning depth can be set differently for each sequence, picture, subpicture, slice, or tile. It can be set to have a different partitioning depth, and a syntax indicating this can be signaled.
  • the divided coding units are further divided to form the coding unit of the leaf node, or the leaf node is It is also possible to configure a coding unit.
  • a coding unit may be configured by hierarchically dividing one CTU, and a coding unit may be divided using at least one of binary tree partitioning, quad tree partitioning/triple tree partitioning. This method is defined as multi tree partitioning.
  • a coding unit generated by dividing an arbitrary coding unit having a partitioning depth of k is referred to as a lower coding unit, and the partitioning depth is (k+1).
  • a coding unit having a partitioning depth k including a lower coding unit having a partitioning depth (k+1) is referred to as an upper coding unit.
  • the partitioning type of the current coding unit may be limited according to the partitioning type of the upper coding unit and/or the partitioning type of the coding units surrounding the current coding unit.
  • the partitioning type represents an indicator indicating which partitioning is used among binary tree partitioning, quad tree partitioning/triple tree partitioning.
  • FIG. 6 schematically illustrates a process of restoring a current block according to an embodiment to which the present invention is applied.
  • a prediction block of a current block may be generated based on a prediction mode pre-defined in an encoding/decoding apparatus (S600).
  • a predicted image can be generated by a plurality of methods, and a method of generating a predicted image is called a prediction mode.
  • the prediction mode may include an intra prediction mode, an inter prediction mode, a current picture reference coding mode, a combined prediction mode, and the like.
  • the inter prediction mode is called a prediction mode in which a prediction block (prediction image) of the current block is generated by using information of a previous picture
  • the intra prediction mode is called a prediction mode in which a prediction block is generated using samples adjacent to the current block.
  • a prediction block may be generated using an image that has already been reconstructed of the current picture, and this is defined as a current picture reference mode or an intra block copy mode.
  • a prediction block may be generated using at least two or more of an inter prediction mode, an intra prediction mode, or a current picture reference mode, and this is defined as a combined prediction mode.
  • the intra prediction mode will be described in detail with reference to FIGS. 13 to 24.
  • the inter prediction mode will be described in detail with reference to FIGS. 7 to 12.
  • a residual block of a current block may be generated (S610).
  • the encoding apparatus may generate a residual block through a difference between the original block and the prediction block of the current block.
  • a residual coefficient may be generated by performing at least one of transformation or quantization on residual data of the residual block, and the generated residual coefficient may be encoded.
  • the decoding apparatus may reconstruct the residual block by decoding the residual coefficient encoded from the bitstream and performing at least one of inverse quantization or inverse transformation on the decoded residual coefficient.
  • the transform or inverse transform may be performed based on at least one of n transform types pre-defined in the encoding/decoding apparatus.
  • n may be an integer of 1, 2, 3, 4, or more.
  • the conversion type may include at least one of DCT-2, DCT-8, DST-7, or a conversion skip mode. Only one and the same transform type may be applied to the vertical/horizontal directions of one block, or different transform types may be applied to each of the vertical/horizontal directions. To this end, a flag indicating whether one and the same transformation type is applied may be used. The flag may be signaled by the encoding device.
  • the transform type of the current block may be determined by selectively using either a method determined based on information explicitly signaled by an encoding device or a method implicitly determined by a decoding device.
  • the selection may be performed based on a flag indicating whether information specifying the transformation type is explicitly signaled. That is, when the flag is the first value, it may indicate that information specifying the conversion type is explicitly signaled, otherwise, it may indicate that the conversion type is implicitly determined.
  • the flag may be signaled at at least one level of sequence, picture, slice, CTU, CU, or TU. Alternatively, the flag may be derived based on a predetermined encoding parameter.
  • the encoding parameter may mean at least one of the size and shape of a block, an intra prediction mode, or a component type (e.g., luminance, and color difference).
  • the size of the block may be expressed as a width, height, a ratio of a width and a height, a product of a width and a height, and the sum/difference of a width and a height.
  • the flag when the size of the current block is larger than a predetermined threshold size, the flag may be derived as a first value, otherwise, the flag may be derived as a second value.
  • the current block means a transform block corresponding to the current block, and the size may mean a maximum value or a minimum value of a width and a height.
  • the threshold size is a value pre-committed to the encoding/decoding apparatus and may be 16, 32, 64 or more.
  • the transform type may be determined based on at least one of information (mts_idx) explicitly signaled by the encoding device or a table pre-defined in the decoding device.
  • mts_idx may specify at least one of whether or not the transformation types in the vertical/horizontal directions are the same or a transformation type applied to the vertical/horizontal directions.
  • the table may be defined as shown in Table 1 below.
  • trTypeHor may indicate a horizontal direction conversion type
  • trTypeVer may indicate a vertical direction conversion type.
  • trTypeHor is 0, this means that DCT-2 is used as the conversion type in the horizontal direction
  • trTypeHor is 1
  • DSCT-7 is used as the conversion type in the horizontal direction
  • trTypeHor is 3
  • TrTypeVer can also be defined in the same way as trTypeHor.
  • the transform type may be determined based on the above-described encoding parameter. For example, when the size of the current block is larger than a predetermined threshold, the conversion type is determined as the first conversion type (eg, DST-7), otherwise, the conversion type is the second conversion type (eg, DCT). It can be determined as -2).
  • the first conversion type eg, DST-7
  • the second conversion type eg, DCT
  • the transformation type may be determined for a vertical direction and a horizontal direction, respectively. That is, a transformation type in the horizontal direction may be determined through a comparison between the width of the current block and the threshold value, and a transformation type in the vertical direction may be determined through a comparison between the height of the current block and the threshold value.
  • the threshold value may be an integer of 0, 4, 8, 16, 32 or higher.
  • a current block may be reconstructed based on a prediction block and a residual block (S620).
  • the current block may be reconstructed by adding the pre-generated prediction block and the residual block.
  • a predetermined in-loop filter may be applied to the restored current block.
  • the in-loop filter may include at least one of a deblocking filter, a sample adaptive offset (SAO) filter, or an adaptive loop filter (ALF), and will be described with reference to FIGS. 47 and 48.
  • FIGS. 7 to 16 are diagrams illustrating an intra prediction method as an embodiment to which the present invention is applied.
  • intra prediction uses an already coded/decoded boundary sample around a current block, and this is defined as an intra reference sample.
  • the average value of the intra reference sample is predicted and the value of all samples in the block is set (DC mode), or the horizontal direction prediction sample generated by weighted prediction of the horizontal direction reference sample and the vertical direction prediction sample generated by weighted prediction of the vertical direction reference sample are used.
  • a prediction sample may be generated by weighted prediction (Planar mode), or intra prediction may be performed using a directional intra prediction mode.
  • intra prediction may be performed using 33 directional modes and 2 non-directional modes (ie, Planar mode and DC mode) as shown in the left figure, and see FIG. 8(b). It is also possible to use 65 directional modes and 2 non-directional modes.
  • an intra reference sample reference sample
  • intra prediction may be performed using this.
  • An intra reference sample on the left side of the coding unit is called a left intra reference sample, and an intra reference sample on the top side of the coding unit is called an upper intra reference sample.
  • an intra direction parameter (intraPredAng), which is a parameter indicating a prediction direction (or a prediction angle), may be set according to the intra prediction mode.
  • Table 2 is only an example based on a directional mode having a value of 2 to 34 out of 35 intra prediction modes. It goes without saying that the prediction directions (or prediction angles) of the directional modes are further subdivided so that more than 33 directional modes can be used.
  • PredModeIntra One 2 3 4 5 6 7 IntraPredAng - 32 26 21 17 13 9 PredModeIntra 8 9 10 11 12 13 14 IntraPredAng 5 2 0 -2 -5 -9 -13 PredModeIntra 15 16 17 18 19 20 21 IntraPredAng -17 -21 -26 -32 -26 -21 -17 PredModeIntra 22 23 24 25 26 27 28 IntraPredAng -13 -9 -5 -2 0 2 5 PredModeIntra 29 30 31 32 33 34 IntraPredAng 9 13 17 21 26 32
  • intraPredAng is negative (for example, when the intra prediction mode index is between 11 and 25), as shown in FIG. 9, the left intra reference sample and the upper intra reference sample are configured in 1D according to the angle of the intra prediction mode. It can be reconstructed as a one-dimensional reference sample Ref_1D.
  • a one-dimensional reference sample may be generated in a counterclockwise direction from an intra reference sample located at the upper right of the current block to an intra reference sample located at the lower left as shown in FIG. 10.
  • a one-dimensional reference sample may be generated using only the upper intra reference sample or the left intra reference sample.
  • a one-dimensional reference sample may be generated in a clockwise direction from an intra reference sample located at the lower left of the current block to an intra reference sample located at the upper right as shown in FIG. 11.
  • a reference sample determination index (iIdx) and a weight-related parameter (ifact) applied to at least one reference sample determined based on iIdx may be derived as shown in Equation (1).
  • iIdx and ifact are variably determined according to the slope of the directional intra prediction mode, and a reference sample specified by iIdx may correspond to an integer pel.
  • the prediction image may be derived by specifying at least one one-dimensional reference sample for each prediction sample. For example, a position of a one-dimensional reference sample that can be used to generate a prediction sample may be specified in consideration of a slope value of a directional mode. Each prediction sample may have a different directional mode.
  • a plurality of intra prediction modes may be used for one prediction block. The plurality of intra prediction modes may be expressed as a combination of a plurality of non-directional modes, may be expressed as a combination of one non-directional mode and at least one directional mode, or may be expressed as a combination of a plurality of directional modes. .
  • a different intra prediction mode may be applied for each predetermined sample group in one prediction block.
  • a predetermined sample group may consist of at least one sample. The number of sample groups may be variably determined according to the size/number of samples of the current prediction block, or may be a fixed number pre-set in the encoder/decoder independently of the size/number of samples of the prediction block.
  • the position of the one-dimensional reference sample may be specified using the reference sample determination index iIdx.
  • a first prediction image may be generated by interpolating adjacent one-dimensional reference samples as shown in Equation 2 below.
  • the first prediction image may be generated by interpolating the reference sample adjacent to the left/right or above/below the corresponding angular line.
  • the filter coefficient of the interpolation filter used at this time may be determined based on ifact. For example, the filter coefficient of the interpolation filter may be derived based on a distance between a fractional pel located on an angular line and a reference sample located on the integer pel.
  • the first prediction image may be generated as shown in Equation (3).
  • the prediction angle of the directional mode may be set between 45 and -135 as shown in FIG. 12.
  • a disadvantage of predicting a current sample from an intra reference sample far from the current sample instead of an intra reference sample close to the current sample may occur due to a pre-defined prediction angle.
  • a coding unit (hereinafter, a horizontal coding unit) having a width of the coding unit larger than the height of the coding unit
  • intra prediction is performed using a long distance L instead of a close sample T.
  • a sample T having a long distance is used instead of a sample L having a close distance.
  • Intra prediction can be performed.
  • intra prediction may be performed at a prediction angle wider than a pre-defined prediction angle, which is defined as a wide angle intra prediction mode.
  • the wide-angle intra prediction mode may have a prediction angle of (45+ ⁇ ) to (-135- ⁇ ), and a prediction angle that deviates from the angle used in the existing intra prediction mode is defined as a wide angle angle.
  • sample A in a coding unit having a width greater than a height can be predicted using an intra reference sample T using a wide angle intra prediction mode.
  • sample A in a coding unit having a width smaller than a height can be predicted using an intra reference sample L using a wide angle intra prediction mode.
  • N+M intra prediction modes may be defined by adding M wide angle angles to N existing intra prediction modes. Specifically, as shown in Table 3, a total of 95 intra prediction modes may be defined by adding 28 wide angle angles to 67 intra modes.
  • the intra prediction mode that the current block can use may be determined according to the shape of the current block. For example, 65 directional intra prediction modes may be selected from among 95 directional intra prediction modes based on at least one of a size of a current block, an aspect ratio (eg, a ratio of width and height), and a reference line index.
  • 65 directional intra prediction modes may be selected from among 95 directional intra prediction modes based on at least one of a size of a current block, an aspect ratio (eg, a ratio of width and height), and a reference line index.
  • the angle of the intra prediction mode shown in Table 3 may be adaptively determined based on at least one of a shape of a current block and a reference line index.
  • the intraPredAngle of Mode 15 may be set to have a larger value when the current block is a square than when the current block is a non-square.
  • the intraPredAngle of Mode 75 may be set to have a larger value when a non-adjacent reference line is selected than when an adjacent reference line is selected.
  • the length of the upper intra reference sample may be set to (2W+1), and the length of the left intra reference sample may be set to (2H+1).
  • the wide-angle intra prediction mode can be encoded by replacing the existing intra prediction mode that is not used in the wide-angle intra prediction mode, and the replaced prediction mode is called a wide-angle replacement mode.
  • the wide angle replacement mode may be an intra prediction mode in a direction opposite to the wide angle intra prediction mode.
  • the wide-angle intra prediction mode 35 when 35 intra predictions are used, the wide-angle intra prediction mode 35 may be encoded with the wide-angle replacement mode intra prediction mode 2, and the wide-angle intra prediction mode 36 is the wide-angle replacement. It can be encoded in intra prediction mode 3, which is a mode. Accordingly, in the decoding apparatus, when the current block is of an amorphous shape, the pre-derived intra prediction mode may be replaced with the wide-angle replacement mode. To this end, a wide angle replacement mode may be determined by adding or subtracting a predetermined offset to the pre-derived intra prediction mode, and this may be used as the final intra prediction mode of the current block.
  • the shape of the coding block or the height of the coding block and The type and number of alternative modes may be differently set according to at least one of the ratios of the widths.
  • Table 4 shows intra prediction modes used according to the ratio of the width and height of a coding block.
  • the intra prediction image may be updated for each sample based on the sample position, which is defined as a sample position-based intra-weighted prediction method (Position dependent prediction combination, PDPC).
  • PDPC partition dependent prediction combination
  • intra prediction may be performed by selectively using at least one of a plurality of intra reference lines, which is referred to as a multi-line intra prediction method.
  • Intra prediction may be performed by selecting any one of a plurality of intra reference lines composed of an adjacent intra parallel line and a non-adjacent intra reference line.
  • the non-adjacent intra reference line is a first non-adjacent intra reference line (non-adjacent reference line index 1), a second non-adjacent intra reference line (non-adjacent reference line index 2), or a third non-adjacent intra reference line (non-adjacent reference line). It may consist of at least one of index 3). Only some of the aforementioned non-adjacent intra reference lines may be used.
  • the non-adjacent intra reference line may be composed of only a first non-adjacent intra reference line and a second non-adjacent intra reference line, or may be composed of only a first non-adjacent intra reference line and a third non-adjacent intra reference line. have.
  • intra reference line index (intra_luma_ref_idx), a syntax specifying a reference line used for intra prediction, may be signaled in units of coding units.
  • intra_luma_ref_idx when using the adjacent intra reference line, the first non-adjacent intra reference line, and the third non-adjacent intra reference line, intra_luma_ref_idx may be defined as shown in Table 5 below.
  • Adjacent intra reference line One First non-adjacent reference line 2 3rd non-adjacent reference line
  • a non-adjacent intra reference line When a non-adjacent intra reference line is used, it may be set not to use a non-directional intra prediction mode. That is, when a non-adjacent intra reference line is used, it may be restricted not to use the DC mode or the planar mode.
  • the number of samples belonging to the non-adjacent intra reference line may be set to be larger than the number of samples of the adjacent intra parallel line. Also, the number of samples of the (i+1)th non-adjacent intra reference line may be set to be greater than the number of samples of the i-th non-adjacent intra reference line.
  • the difference between the number of upper samples of the i-th non-adjacent intra reference line and the number of upper samples of the (i-1)th non-adjacent intra reference line may be represented by the reference sample number offset offsetX[i].
  • offsetX[1] represents a difference value between the number of upper samples of the first non-adjacent intra reference line and the number of upper samples of the adjacent intra reference line.
  • the difference between the number of left samples of the i-th non-adjacent intra reference line and the number of left samples of the (i-1)th non-adjacent intra reference line may be expressed as a reference sample number offset offsetY[i].
  • OffsetY[1] represents a difference between the number of left samples of the first non-adjacent intra reference line and the number of left samples of the adjacent intra reference line.
  • Non-adjacent intra reference lines with an intra reference line index of i include an upper non-adjacent reference line (refW + offsetX[i]), a left non-adjacent reference line (refH + offsetY[i]), and one or more samples ( k), and the number of samples belonging to the non-adjacent intra reference line may be (refW + refH + offsetX[i] + offsetY[i] + k).
  • refW and refH may be defined as in Equation 4 below.
  • nTbW indicates the width of the coding unit
  • nTbH indicates the height of the coding unit
  • whRatio may be defined as in Equation 5 below.
  • the coding unit may be interpreted as a transform unit corresponding to the coding unit.
  • the wide-angle intra mode when a non-adjacent intra reference line is used, the wide-angle intra mode may be set not to be used.
  • the most probable mode (MPM) of the current coding unit is a wide-angle intra mode, the multi-line intra prediction coding method may be set not to be used.
  • the non-adjacent intra reference line whose intra reference line index is i is the upper non-adjacent reference line (W + H + offsetX[i]) and the left non-adjacent reference line (H + W + offsetY[i]), and one or more. It may be composed of the upper left sample (k), and the number of samples belonging to the non-adjacent intra reference line may be composed of (2W + 2H + offsetX[i] + offsetY[i] + k), depending on the whRatio value. The values of offsetX[i] and offsetY[i] can be different.
  • the offsetX[i] value can be set to 1 and the offsetY[i] value can be set to 0. If the whRatio value is less than 1, the offsetX[i] value can be set to 0, offsetY[ i] You can also set the value to 1.
  • FIG 17 illustrates an inter prediction method according to an embodiment to which the present invention is applied.
  • a method of generating a prediction block (prediction image) of a block in a current picture by using information of a previous picture is called an inter prediction mode.
  • a prediction block may be generated from a specific block in a previous picture of the current block.
  • the block with the smallest reconstruction error among the blocks in the previous picture can be selected by searching around a collocated block, and the x-axis difference and y-axis difference between the upper left sample of the current block and the upper left sample of the selected block Is defined as a motion vector, and can be signaled by transmitting it to a bitstream.
  • a block generated through interpolation from a specific block of a reference picture specified by a motion vector is called a motion compensated predictor block.
  • the collocated block represents a block of a corresponding picture having the same location and size of the current block and the upper left sample.
  • the picture may be specified from a syntax such as a reference picture reference.
  • a prediction block may be generated in consideration of the motion of an object. For example, if you know how and in which direction the object in the previous picture moved in the current picture, you can generate a prediction block (prediction image) by differentiating a block considering motion from the current block, and this is defined as a motion prediction block. .
  • a residual block may be generated by differentiating a motion prediction block or a corresponding prediction block from the current block.
  • motion compensation prediction This method of using a motion prediction block is called motion compensation prediction, and most inter prediction uses motion compensation prediction.
  • a value indicating in which direction and to what extent the object in the previous picture has moved in the current picture is called a motion vector.
  • motion vectors having different pixel precisions may be used in units of sequences, groups of tiles, or blocks.
  • the pixel precision of a motion vector in a specific block may be at least one of octor-pel, quarter-pel, half-pel, integer pel, and 4-integer pel.
  • an inter prediction method using translaton motion and an affine inter prediction method using affine motion may be selectively used.
  • Affine motion can be expressed as Equation 6 below.
  • affine motion using a total of six parameters is effective for images with complex motion, but encoding efficiency may be degraded due to the large number of bits used to encode affine motion parameters.
  • affine motion can be simplified and expressed with four parameters, and this is defined as a 4-parameter Arte motion model. Equation 7 expresses Bennette motion with four parameters.
  • a four-parameter affine motion model can contain motion vectors at two control points of the current block.
  • the control point may include at least one of an upper left corner, an upper right corner, or a lower left corner of the current block.
  • the 4-parameter affine motion model is based on the motion vector sv0 in the upper left sample (x0,y0) of the coding unit and the motion vector sv1 in the upper right sample (x1,y1) of the coding unit as shown in the left figure of FIG. It can be determined by, and sv 0 and sv 1 are defined as affine seed vectors.
  • an affine seed vector sv 0 located in the upper left corner is a first affine seed vector
  • an affine seed vector sv 1 located in the upper right corner is a second affine seed vector.
  • the 4-parameter affine motion model it is possible to replace one of the first and second affine seed vectors with the affine seed vector located at the lower left.
  • the 6-parameter affine motion model is an Accele motion in which the motion vector sv 2 of the residual control point (e.g., sample (x2,y2) in the lower left corner) is added to the 4-parameter affine motion model as shown in the right figure of FIG. It is a model.
  • the affine seed vector sv 0 located at the upper left is the first affine seed vector
  • the affine seed vector sv 1 located at the upper right is the second affine seed vector
  • the affine seed vector located at the lower left Assume that sv 2 is the third affine seed vector.
  • Information on the number of parameters for expressing Rane motion may be signaled through a bitstream.
  • a flag indicating whether a 6-parameter is used and a flag indicating whether a 4-parameter is used may be encoded in at least one unit of a video sequence, a picture, a slice, a tile group, a tile, a coding unit, or a CTU.
  • one of a 4-parameter affine motion model or a 6-parameter affine motion model may be selectively used in units of video sequences, pictures, slices, tile groups, coding units, or CTUs.
  • a motion vector can be derived for each sub-block of the coding unit using the affine seed vector, which is defined as an affine sub-block vector.
  • the affine subblock vector may be derived as in Equation 8 below.
  • the reference sample position (x,y) of the sub-block may be a sample located at a corner of the block (eg, an upper left sample), or a sample (eg, a center sample) in which at least one of the x-axis or y-axis is centered. .
  • Motion compensation may be performed in units of coding units or sub-blocks within the coding unit by using the Bennette sub-block vector, and this is defined as an Matte inter prediction mode.
  • (x 1 -x 0 ) may be the same as the width of the coding unit and w of the unit, or may be set to w/2 or w/4.
  • the affine seed vector and the reference picture list of the current coding unit can be derived by using the Matte motion vector (afine sub-block vector or Rane seed vector) of the neighboring block of the current coding unit, which is called an Matte merge mode. Call.
  • At least one of the neighboring blocks of the current coding unit is an Matte mode (afine inter prediction mode or Matte merge mode).
  • the affine seed vector of the current block may be derived from the affine motion vector of the neighboring block.
  • a block encoded in the affine mode among neighboring blocks is called an affine neighboring block.
  • the search order of the neighboring blocks follows a predefined order such as A --> B --> C --> D --> E, and the seed vector, which is the affine of the current block from the neighboring block, which is the first affine in the search order.
  • a neighboring block which is an affine of one of the neighboring blocks, may be selected and the index of the selected neighboring block may be encoded.
  • affine seed vectors may be derived from neighboring blocks A0, A1, B0, B1, and B2 of the current coding unit.
  • an affine seed vector may be derived from any one of ⁇ A0, A1 ⁇ among neighboring blocks of FIG. 22, and another affine seed vector may be derived from ⁇ B0, B1, B2 ⁇ , This is called affine merge mode.
  • a third seed vector of an affine neighboring block may be derived.
  • the seed vector of the current block may be derived using the first affine seed vector, the second affine seed vector, and the third seed vector of the neighboring block as shown in Equations 10 and 11 below.
  • the seed vector of the current block may be derived using two of the first affine seed vector, the second affine seed vector, and the third seed vector of the neighboring block.
  • At least one of the first seed vector, the second seed vector, and the third seed vector of the neighboring block may be replaced with a motion vector of a sub-block located at the bottom of the sub-block of the affine neighboring block.
  • the lower left sub-block or the lower center sub-block (hereinafter, the fourth affine sub-block) among the blocks surrounding the affine, and the lower-right sub-block or the lower center sub-block (hereinafter, 5 Affine sub-block) can be used to specify a specific sample location, and an affine seed vector can be derived using a specific sample location. This specific sample position is called the position of the affine reference sample.
  • the positions of the fourth affine sub-block and the fifth affine sub-block may be set differently depending on whether the target block is in an upper CTU of the current block. For example, if the target block exists in the upper CTU of the current block (the upper CTU of the CTU to which the current block belongs), the fourth affine sub-block is set as the lower center sub-block, and the fifth affine sub The block can also be set as a lower-right sub-block.
  • the difference between the fourth affine reference sample (the reference sample of the fourth affine sub-block) and the fifth affine reference sample (the reference sample of the fifth affine sub-block) may be set to be a power series (2 n ). .
  • it may be set to be nbW/2.
  • nbW can also be set as the width of the surrounding block.
  • At least one of the first seed vector, the second seed vector, and the third seed vector of the neighboring block may be replaced with a motion vector of a sub-block located at the bottom of the sub-block of the affine neighboring block.
  • 5 Affine sub-block can be used to specify a specific sample location, and an affine seed vector can be derived using a specific sample location. This specific sample position is called the position of the affine reference sample.
  • the positions of the fourth affine sub-block and the fifth affine sub-block may be set differently depending on whether the target block is in an upper CTU of the current block. For example, if the target block exists in the upper CTU of the current block (the upper CTU of the CTU to which the current block belongs), the fourth affine sub-block is set as the lower center sub-block, and the fifth affine sub The block can also be set as a lower-right sub-block.
  • the difference between the fourth affine reference sample (the reference sample of the fourth affine sub-block) and the fifth affine reference sample (the reference sample of the fifth affine sub-block) may be set to be a power series (2 n ). For example, it can be set to be nbW/2.
  • nbW can also be set as the width of the surrounding block.
  • the fourth affine subblock is set as the lower left subblock
  • the fifth affine subblock is set as the lower right subblock. May be.
  • the fourth affine sub-block is set as the lower left sub-block as shown in FIG.
  • the in sub-block can also be set as the lower center sub-block.
  • the difference between the fourth affine reference sample (the reference sample of the fourth affine sub-block) and the fifth affine reference sample (the reference sample of the fifth affine sub-block) may be set to be a power series (2 n ).
  • nbW can also be set as the width of the surrounding block.
  • the affine reference sample position may be set to the upper left block or the lower right block of the sub-block, or may be set to a sample located at the center.
  • the fourth affine sub-block and the fifth affine sub-block may be set to have different affine reference sample positions. Specifically, for example, as shown in the left figure of FIG.
  • the affine reference sample position of the fourth affine sub-block (hereinafter, the fourth affine reference sample position) may be set as the upper left sample within the sub-block, and the fifth affine The affine reference sample position (hereinafter, the fifth affine reference sample position) of the in sub-block may be set to the right sample (x i +1, y i ) of the upper right sample (x i , y i ) in the sub-block.
  • the reference position of the fifth affine sub-block may be set to a right sample of the upper right sample, and the motion vector of the fifth affine sub-block may be set as a motion vector of the upper-right sample.
  • the motion vector of the right sample of the upper right sample may be set as the motion vector of the fifth affine sub-block.
  • the position of the fourth affine reference sample is the left sample (x i -1,y i ) of the upper right sample (x i ,y i ) in the fourth affine subblock.
  • the reference position of the fourth affine sub-block may be set as the left sample of the upper left sample
  • the motion vector of the fourth affine sub-block may be set as the motion vector of the upper left sample.
  • the motion vector of the left sample of the upper left sample may be set as the motion vector of the fourth affine sub-block.
  • the fourth affine reference sample position may be set as the lower left sample in the subblock
  • the fifth affine reference sample position is the lower right sample in the subblock (x j , y It can be set to the right sample (x j +1, y j ) of j ).
  • the reference position of the fifth affine sub-block may be a right sample of the lower-right sample
  • the motion vector of the fifth affine sub-block may be set as a motion vector of the lower-right sample.
  • the motion vector of the right sample of the lower right sample may be set as the motion vector of the fifth affine sub-block.
  • the fourth affine reference sample position may be set to the left sample (x j -1, y j ) of the lower left sample (x j , y j ) in the subblock, and ,
  • the fifth affine reference sample position may be set as the lower right sample within the sub-block.
  • the reference position of the fifth affine sub-block may be a left sample of the lower left sample, and the motion vector of the fifth affine sub-block may be set as a motion vector of the lower left sample.
  • the motion vector of the left sample of the lower left sample may be set as the motion vector of the fifth affine sub-block.
  • the fourth affine reference sample position may be set as a sample (hereinafter, left middle sample) between the upper left sample and the lower left sample in the subblock
  • the fifth affine reference The sample position may be set as a right sample (x k +1, y k ) of a sample (hereinafter, right middle sample) (x k , y k ) between the upper right sample and the lower right sample in the sub-block.
  • the reference position of the fifth affine sub-block is a right sample of the right middle sample, but the motion vector of the fifth affine sub-block may be set as a motion vector of the right middle sample.
  • the motion vector of the right sample of the right middle sample may be set as the motion vector of the fifth affine sub-block.
  • the fourth affine reference sample position may be set to the left sample (x k -1, y k ) of the left middle sample (x k , y k ), and the fifth The affine reference sample position can be set to the right middle sample.
  • the first affine seed vector and the second affine seed vector of the current block may be derived as shown in Equations 14 and 15 by using the fourth affine seed vector and the fifth affine seed vector.
  • x n4 -x n3 may be set as a W seed .
  • W seed is called the subseed vector width.
  • the subseed vector width W seed can be set to be a power series of 2 (2 n ).
  • Equations 14 and 15 may be applied after adding a specific offset so that W seed is the power series of 2, and a bit shift operation is used instead of a division operation. You can also replace it.
  • the affine seed vector is not derived as shown in Equations 12 and 13, and the translation motion vector information at the fourth affine reference sample position is set as the fourth affine seed vector, and the fifth affine
  • the translation motion vector information located at the phosphorus reference sample position may be set as the fifth affine seed vector.
  • translation motion vector information at the position of the i-th affine reference sample may be set as the i-th affine seed vector.
  • the range of i can be set to 1 to 5.
  • the translation motion vector information at the fourth affine reference sample position may be set as the first affine seed vector
  • the translation motion vector information at the fifth affine reference sample position may be set as the second affine seed vector.
  • motion vector information may be derived from the sample of the affine neighboring block closest to the affine reference sample, and this is called a modified affine merge vector derivation method.
  • the left boundary sample of the fifth affine reference sample (that is, (X n4- The translation motion vector information of the block including 1, y n4 )) may be set as the fifth affine seed vector.
  • 31 illustrates an inter prediction method based on a merge mode as an embodiment to which the present invention is applied.
  • Motion information (motion vector, reference picture index, etc.) of the current coding unit is not encoded, and can be derived from motion information of neighboring blocks. Motion information of any one of the neighboring blocks can be set as motion information of the current coding unit, and this is defined as a merge mode.
  • a merge candidate list of a current block may be configured (S3100).
  • the merge candidate list may include one or a plurality of merge candidates available to derive motion information of the current block.
  • the size of the merge candidate list may be variably determined based on information indicating the maximum number of merge candidates constituting the merge candidate list (hereinafter, size information).
  • size information may be a fixed value (eg, 2, 3, 4, 5, 6 or more integers) encoded and signaled by the encoding device or pre-committed to the decoding device.
  • the plurality of merge candidates belonging to the merge candidate list may include at least one of a spatial merge candidate or a temporal merge candidate.
  • the spatial merge candidate may mean a neighboring block spatially adjacent to the current block or motion information of the neighboring block.
  • the neighboring block may include at least one of a lower left block A0, a left block A1, an upper right block B0, an upper block B1, or an upper left block B2 of the current block.
  • available neighboring blocks among the neighboring blocks may be sequentially added to the merge candidate list.
  • the priority is B1->A1->B0->A1->B2, A1->B1->A0->B1->B2, A1->B1->B0->A0->B2, etc. It may be defined as, but is not limited thereto.
  • the parallel merge region may include one or more coding blocks, and a plurality of coding blocks belonging to one parallel merge region may be independently or parallelly encoded/decoded.
  • the parallel merge region may mean a region in which a spatial merge candidate of each coding block is derived without dependency between a plurality of coding blocks belonging to the parallel merge region.
  • the independent or parallel encoding/decoding process may include at least one of intra prediction, inter prediction, transformation (inverse transformation), quantization (inverse quantization), or in-loop filtering.
  • Information indicating the size of the parallel merge region is signaled by the encoding apparatus, and the size of the parallel merge region may be variably determined based on the signaled information.
  • the information may be signaled at at least one level of a video sequence, a picture, or a slice.
  • the spatial merge candidate may further include neighboring blocks that are not adjacent to the current block, which will be described with reference to FIGS. 32 and 33.
  • the temporal merge candidate may mean one or more co-located blocks belonging to a co-located picture or motion information of the collocated block.
  • the collocated picture is any one of a plurality of reference pictures included in the reference picture list, and may be a picture different from the picture to which the current block belongs.
  • the collocated picture may be the first picture or the last picture in the reference picture list.
  • the collocated picture may be specified based on an index coded to indicate the collocated picture.
  • the collocated block may include at least one of a block C1 including a center position of the current block or a neighboring block C0 adjacent to the lower right corner of the current block.
  • an available block of C0 and C1 may be sequentially added to the merge candidate list.
  • C0 may have a higher priority than C1.
  • the present invention is not limited thereto, and C1 may have a higher priority than C0.
  • the encoding/decoding apparatus may include a buffer that stores motion information of one or more blocks (hereinafter, referred to as previous blocks) for which encoding/decoding has been completed before the current block.
  • the buffer may store a list consisting of motion information of a previous block (hereinafter, a motion information list).
  • the motion information list may be initialized in units of any one of a picture, a slice, a tile, a CTU row, or a CTU.
  • Initialization may mean a state in which the motion information list is empty.
  • Motion information of the previous block is sequentially added to the motion information list according to the encoding/decoding order of the previous block, but the motion information list is updated in a first-in first-out (FIFO) method in consideration of the size of the motion information list.
  • FIFO first-in first-out
  • motion information identical to the latest motion information may be removed from the motion information list, and the latest motion information may be added to the motion information list.
  • the latest motion information may be added to the last position of the motion information list or may be added to the position of the removed motion information.
  • the previous block may include at least one of one or more neighboring blocks spatially adjacent to the current block or one or more neighboring blocks not spatially adjacent to the current block.
  • the merge candidate list may further include motion information of a previous block or a previous block belonging to the buffer or motion information list as a merge candidate.
  • a redundancy check between the motion information list and the merge candidate list may be performed.
  • the redundancy check may be performed on all or part of the merge candidates belonging to the merge candidate list and all or part of the previous block in the motion information list.
  • the redundancy check of the present invention is performed on a part of a merge candidate belonging to a merge candidate list and a part of a previous block in the motion information list.
  • some merge candidates in the merge candidate list may include at least one of a left block or an upper block among spatial merge candidates.
  • the present invention is not limited thereto, and may be limited to any one block among spatial merge candidates.
  • the some merge candidates may further include at least one of a lower left block, an upper right block, an upper left block, or a temporal merge candidate.
  • Some previous blocks of the motion information list may mean K previous blocks recently added to the motion information list.
  • K may be 1, 2, 3 or more, and may be a fixed value pre-committed to the encoding/decoding device.
  • the corresponding previous block may be added to the merge candidate list.
  • the previous block of the motion information list may not be added to the merge candidate list.
  • all or part of the previous block of the motion information list may be added to the last position of the merge candidate list. In this case, it may be added to the merge candidate list in the order of the previous blocks recently added to the motion information list (ie, in the order of the largest index to the smallest).
  • the previous block most recently added to the motion information list may be restricted so that it is not added to the merge candidate list.
  • the addition of the previous block may be performed in consideration of the size of the merge candidate list. For example, it is assumed that the merge candidate list has at most T merge candidates according to the size information of the merge candidate list described above. In this case, the addition of the previous block may be limited to be performed only until the number of merge candidates included in the merge candidate list (T-n) is reached.
  • n may be an integer of 1, 2 or more.
  • the addition of the previous block may be repeatedly performed until the number of merge candidates belonging to the merge candidate list reaches T.
  • motion information of a current block may be derived based on a merge candidate list and a merge index (merge_idx) (S3110).
  • the merge index may specify any one of a plurality of merge candidates belonging to the merge candidate list.
  • the motion information of the current block may be set as motion information of the merge candidate specified by the merge index.
  • motion compensation of a current block may be performed based on the induced motion information (S3120).
  • the pre-derived motion information (in particular, a motion vector) may be corrected based on a predetermined differential motion vector (MVD). Motion compensation may be performed using the corrected motion vector.
  • MVD differential motion vector
  • the motion information list may be updated based on pre-derived motion information for the current block.
  • the motion information list is updated, otherwise, the motion information list may not be updated.
  • the block having the last encoding/decoding order may mean a block located at the bottom right of the parallel merge area.
  • the motion vector added to the motion information list may be a motion vector after correction or may be limited to a motion vector before correction. All blocks belonging to the same parallel merge area can share the same motion information list.
  • the updated motion information list may be used to generate a merge candidate list of coding blocks in the parallel merge region that are encoded/decoded after the current parallel merge region. This will be described in detail with reference to FIGS. 41 to 43.
  • 32 to 33 illustrate neighboring blocks that can be used as spatial merge candidates according to an embodiment to which the present invention is applied.
  • the neighboring blocks used in the merge mode may be blocks adjacent to the current coding unit (blocks in contact with the boundary of the current coding unit) as shown in merge candidate indexes 0 to 4 of FIG. 32, or merge candidate indexes 5 to 26 of FIG. It may be a non-adjacent block. If the distance of the merge candidate to the current block exceeds a predefined threshold, it may be set as not available.
  • a pre-defined threshold may be set to the height of the CTU (ctu_height) or (ctu_height+N), and this is defined as a merge candidate available threshold. I.e., y-axis coordinates of the remaining candidate (y i) and the difference (i.e., y i - y 0) of the y-coordinate (y 0) of the current top-left sample of the coding unit (hereinafter referred to as reference sample for the current coded unit) is the remaining candidate If it is greater than the available threshold, the merge candidate may be set as not available.
  • N is a predefined offset value. Specifically, for example, N may be set to 16 or ctu_height may be set.
  • merge candidates existing above the coding unit (hereinafter, upper merge candidates) may be set as small as possible, and merge candidates existing at the left and lower sides of the coding unit (hereinafter, lower left merge candidates) may be set as many as possible.
  • the difference between the y-axis coordinate of the current coding unit reference sample and the y-axis coordinate of the upper merge candidate may be set so as not to exceed twice the height of the coding unit. It may be set so that the difference between the x-axis coordinate of the current coding unit reference sample and the x-axis coordinate of the lower left merge candidate does not exceed twice the width of the coding unit.
  • a merge candidate adjacent to the current coding unit is referred to as a neighbor merge candidate, and a merge candidate not adjacent to the current coding unit is defined as a non-adjacent merge candidate.
  • a flag (isAdjacentMergeflag) indicating whether a merge candidate of the current coding unit is an adjacent merge candidate may be signaled. If the IsAdjacentMergeflag value is 1, motion information of the current coding unit may be derived from an adjacent merge candidate, and if the isAdjacentMergeflag value is 0, motion information of the current coding unit may be derived from a non-adjacent merge candidate.
  • 34 to 40 are diagrams illustrating a method of configuring and updating a motion information list according to an embodiment to which the present invention is applied.
  • Motion information (including at least one of motion vector, reference picture index, or prediction direction information) of a coding unit that is already encoded by inter prediction in the current picture can be stored in a list having a predefined size, and this is an inter-region motion information list Or, it is defined as a motion information list. Motion information in the inter-region motion information list is called an inter-region merge candidate.
  • the inter-region merge candidate can be used as a merge candidate of the current coding unit, and this method is defined as an inter-region merge method.
  • the inter-region motion information list When the tile group is initialized, the inter-region motion information list is empty, and when a partial region of a picture is encoded/decoded, it can be added to the inter-region motion information list.
  • the initial inter-region merge candidate of the inter-region motion information list may be signaled through the tile group header.
  • motion information of the coding unit may be updated in the inter-region motion information list as shown in FIG. 34.
  • the number of inter-region merge candidates in the inter-region motion information list reaches a predetermined maximum, the value with the smallest index in the inter-region motion information list (motion information added to the inter-region motion information list first) is selected.
  • the motion information of the inter-region, which has been removed and most recently encoded/decoded, may be added to the inter-region motion information list.
  • the motion vector mvCand of the decoded coding unit may be updated in the inter-region motion information list HmvpCandList. At this time, if the motion information of the decoded coding unit is the same as any one of the motion information in the inter-region motion information list (when both the motion vector and the reference index are the same), the inter-region motion information list is not updated, or as shown in FIG.
  • the motion vector mvCand of the coding unit decoded together may be stored at the end of the inter-region motion information list.
  • HMVPCandList[i] may be set to HVMPCandList[i-1] for all i larger than hIdx as shown in FIG. 36.
  • motion information of the representative sub-block in the coding unit may be stored in the inter-region motion information list.
  • the sub-block merge candidate may mean a method in which one coding block is divided into a plurality of sub-blocks and motion information is derived in units of sub-blocks.
  • the representative sub-block in the coding unit may be set as an upper left sub-block in the coding unit or as a middle sub-block in the coding unit as shown in FIG. 35.
  • a total of NumHmvp motion information can be stored in the inter-region motion information list, and NumHmvp is defined as the size of the inter-region motion information list.
  • the size of the inter-region motion information list may use a pre-defined value.
  • the size of the inter-region motion information list may be signaled in the tile group header.
  • the size of the inter-region motion information list may be defined as 16, may be defined as 6, or may be defined as 5.
  • a coding unit that is inter prediction and has an affine motion vector it may be limited not to have an inter-region motion information list.
  • the affine sub-block vector may be added to the inter-region motion information list.
  • the position of the sub-block may be set to an upper left, an upper right, or a center sub-block.
  • the average motion vector value of each control point may be added to the inter-region merge candidate list.
  • MV0 may not be added to the inter-region motion information list.
  • an existing inter-region merge candidate having the same motion vector as MV0 may be deleted, and the index allocated to MV0 may be updated by newly including MV0 as a decoding region merge candidate.
  • an inter-region motion information long term list HmvpLTList may be configured.
  • the inter-region motion information long term list size may be set to be the same as the inter-region motion information list size, or may be set to a different value.
  • the inter-region motion information long term list may be composed of inter-region merge candidates initially added to the tile group start position. After the inter-region motion information long term list is configured with all available values, the inter-region motion information list may be configured, or motion information in the inter-region motion information list may be set as motion information of the inter-region motion information long term list.
  • the inter-region motion information long-term list configured once may be updated again when no update is performed, the decoded region of the tile group is more than half of all tile groups, or may be set to be updated every m CTU lines.
  • the inter-region motion information list may be updated whenever the inter-region is decoded, or may be set to be updated in units of CTU lines.
  • the motion information and partition information or type of the coding unit may be stored in the inter-region motion information list.
  • the inter-region merge method may be performed using only inter-region merge candidates having a similar partition information and shape as the current coding unit.
  • an inter-region merge candidate list may be individually configured according to the block type.
  • one of a plurality of inter-region merge candidate lists may be selected and used according to the shape of the current block.
  • the decoded coding unit When the decoded coding unit is in the Bennette inter or Matte merge mode, the first affine seed vector and the second affine seed vector may be stored in the inter-region Matte motion information list HmvpAfCandList. Motion information in the inter-region affine merge candidate list is called an inter-region Matte merge candidate.
  • the merge candidates usable in the current coding unit may be configured as follows, and some of them may be omitted. It can have the same search order as the configuration order below.
  • Spatial merge candidate (coding block adjacent merge candidate and coding block non-adjacent merge candidate)
  • Temporal merge candidate (merge candidate derived from previous reference picture)
  • the mvCand may be stored in the inter-region quarterpel motion information list HmvpQPCandList, and the decoded motion vector mvCand has an integer pel resolution.
  • MvCand can be stored in the inter-domain half-pel motion information list HmvpIPCandList, and when the decoded motion vector mvCand has 4-integer pel resolution, the mvCand can be stored in the inter-domain integrated motion information list Hmvp4IPCandList.
  • motion information mvCand of the coding unit may not be stored in HmvpCandList, but may be stored in the inter-region merge offset motion information list HmvpMMVDCandList.
  • the merge candidate list mergeCandList may be composed of a spatial merge candidate and a temporal merge candidate.
  • the number of available spatial merge candidates and temporal merge candidates is defined as the number of available merge candidates (NumMergeCand).
  • an inter-region merge candidate may be added to the merge candidate list mergeCandList.
  • the merge candidate list mergeCandList When adding the inter-region motion information list HmvpCandList to the merge candidate list mergeCandList, it may be checked whether motion information of the inter-region merge candidate in the inter-region motion information list is the same as the motion information of the existing merge list mergeCandList. If the motion information is the same, the merge list may not be added to the mergeCandList, and if the motion information is not the same, the inter-region merge candidate may be added to the merge list mergeCandList.
  • one having a large index may be added to the merge candidate list mergeCandList, or one having a small index may be added to the merge candidate list mergeCandList.
  • the sub-block unit merge candidate can be derived as follows.
  • An initial shift vector can be derived from a motion vector of a merge candidate block adjacent to the current block.
  • an initial shift vector may be added to the upper left sample (xSb, ySb) of the subblock in the coding unit to induce a shift subblock having the upper left sample position (xColSb, yColSb).
  • the motion vector of the collocated block corresponding to the center position of the sub-block containing (xColSb, yColSb) can be derived as the motion vector of the sub-block containing the upper left sample (xSb,ySb).
  • motion information of a plurality of representative sub-blocks in the coding unit may be stored in the inter-region sub-block motion information list HSubMVPCandList.
  • a plurality of representative sub-blocks are the upper left sub-block (hereinafter, the first representative sub-block) of the coding unit, the upper-right sub-block (hereinafter, the second representative sub-block), and the lower left sub-block (hereinafter, referred to as , A third representative sub-block).
  • the number of inter-region sub-block motion information lists may be set to a predefined value, and may generally be set less than the number of inter-region motion information lists.
  • the motion vector of the first representative sub-block is referred to as the first representative sub-block motion vector
  • the motion vector of the second representative sub-block is referred to as the second representative sub-block motion vector
  • the motion vector of the third representative sub-block is referred to as the third representative. It is called a sub-block motion vector.
  • a sub-block motion vector in the inter-region sub-block motion information list HSubMVPList may be used as an affine seed vector.
  • a first representative sub-block motion vector of a sub-block motion candidate in the inter-region sub-block motion information list HSubMVPList is a first affine seed vector
  • a second representative sub-block motion vector is a second affine seed vector
  • the third representative sub-block motion vector may be set as a third affine seed vector.
  • the first representative sub-block motion vector in the inter-region sub-block motion information list HSubMVPList may be used as a fourth affine seed vector
  • the second representative sub-block motion vector may be used as a fifth affine seed vector.
  • the motion vector in the inter-region motion information list HMvpCandList may be used as one of the affine seed vectors.
  • a motion vector in HMvpCandList may be used as a value of any one of a first affine seed vector to a fifth affine seed vector.
  • the inter-region motion candidate can be used as a motion vector predictor (MVP) candidate of the current coding unit, and this method is defined as an inter-region motion information prediction method.
  • MVP motion vector predictor
  • the inter-region affine motion candidate can be used as a motion vector predictor (MVP) candidate of the current coding unit, and this method is defined as an inter-region motion information affine prediction method.
  • MVP motion vector predictor
  • Motion information predictor candidates usable in the current coding unit may be configured as follows, and may have the same search order as the configuration order.
  • Spatial motion predictor candidate (same as coding block adjacent merge candidate and coding block non-adjacent merge candidate)
  • Temporal predictor candidate motion predictor candidate derived from the previous reference picture
  • 41 to 43 are diagrams illustrating a method of configuring and updating a motion information list in a parallel merge area according to an embodiment to which the present invention is applied.
  • a merge candidate can be derived in units of coding units, but neighboring blocks in a reference region (hereinafter, referred to as parallel merge region, MER) larger than a unit of coding unit for parallel encoding/decoding as shown in FIG. 41 are unavailable merge candidates. Can also be set as candidates).
  • the spatial merge candidate of the coding unit CU5 sets spatial merge candidates x3 and x4 in the parallel merge area as unusable merge candidates, and spatial merge candidates x0 to x0 outside the parallel merge area.
  • x3 can be set as an available merge candidate.
  • the spatial merge candidate of the coding unit CU9 sets spatial merge candidates x6, x7, and x8 in the parallel merge area as unusable merge candidates, and the spatial merge candidate outside the parallel merge area.
  • x5 and x9 can be set as available merge candidates.
  • the parallel merge region may have a square shape or a non-square shape.
  • Information indicating the shape of the parallel merge region may be signaled through a bitstream.
  • a non-square shape at least one of information indicating the number of samples of the parallel merge area and the width/height of the parallel merge area may be signaled.
  • the size of the parallel merge region may be determined based on at least one of information signaled through a bitstream, a picture resolution, and a slice or tile size.
  • all or part of motion information of the CUs on which the encoding/decoding has been completed may be added to the motion information list.
  • some CUs may be blocks (eg, lower-right blocks) having the last encoding/decoding order in the parallel merge region.
  • motion information of CUs existing in the parallel merge area can be added to the motion information list HmvpcandList in a pre-defined order.
  • the pre-defined order may be determined based on at least one of a scan order of CUs in the current CTU or MER, motion information of each CU, or the number of CUs having the same motion information.
  • motion information of each CU may be added to the motion information list HmvpcandList according to the order of raster scan, vertical scan, horizontal scan, or zigzag scan in the current CTU or MER.
  • motion information of the CU which is unidirectional prediction
  • motion information of the CU may be added to the motion information list before (or later) motion information of the CU, which is bidirectional prediction.
  • motion information may be added to the motion information list in the order of frequency of use within the current CTU or MER (or the reverse order thereof).
  • the inter-region merge candidate When the inter-region merge candidate is in the parallel merge region and is used as a merge candidate of the current coding unit, parallel encoding and decoding cannot be performed in the parallel merge region.
  • a parallel merge area When a parallel merge area is used, it may be restricted not to use an inter-area merge candidate.
  • the motion information list may be configured in units of MERs or units of CTUs.
  • an inter-region MER merge list HmvpMERCandList may be configured in units of CTU or MER regions.
  • the inter-region merge candidate added to the inter-region MER merge list may not be updated in the motion information list (HmvpCandList).
  • Motion information mvCand in the current CTU or MER area may be added to HmvpMERCandList.
  • the size of the inter-region MER merge list may be set to be the same as the size of the motion information list. Alternatively, the size of the inter-region MER merge list may be determined according to the size of the current CTU or MER.
  • CUs in the current CTU or MER area may limit the use of inter-area MER merge candidates included in the inter-area MER merge list for the current CTU or MER area. Through this, it may be restricted to use motion information of a CU belonging to the same CTU or MER region as the current CU as a merge candidate.
  • HmvpcandList is used and HmvpMERCandList is not used, since the merge candidate of the current coding unit does not use motion information in the current CTU or MER, parallel encoding and decoding can be performed in the parallel merge region.
  • the motion information list and the inter-region MER merge list can be merged.
  • HmvpcandList can be updated from HmvpMerCandList and previous HmvpcandList.
  • Inter-region MER merge candidates included in the inter-region MER merge list may be added to the motion information list according to the order of insertion into the inter-region MER merge list.
  • the inter-region MER merge candidates included in the inter-region MER merge list HmvpMerCandList may be added to the motion information list HmvpcandList in a pre-defined order.
  • the pre-defined order may be determined based on at least one of a scan order of CUs in the current CTU or MER, motion information of each CU, or the number of CUs having the same motion information.
  • inter-region MER merge candidates may be added to the motion information list HmvpcandList according to the current CTU or raster scan order within the MER.
  • inter-region MER merge candidates which are unidirectional prediction, may be added to the motion information list before (or later) than inter-region MER merge candidates, which are bi-prediction.
  • inter-region MER merge candidates may be added to the motion information list in the order of frequency of use within the current CTU or MER (or the reverse order thereof).
  • the inter-region MER merge candidate in the inter-region MER merge list may add HmvpMERCand as an inter-region merge candidate in the HmvpCandList.
  • HmvpMERCand when HmvpMERCand is the same as any one of HmvpCands, it may be set not to be added to HmvpCandList.
  • HmvpMERCand when HmvpMERCand is the same as HmvpCand having an index equal to or greater than a predefined value, HmvpMERCand may not be added to HmvpCandList.
  • a symmetric MVD of a motion vector difference (MVD) of a motion vector used in L0 may be set as the MVD of L1, and this is a symmetric MVD encoding/decoding method. It is called this.
  • the MV can be derived as in Equation 17 below.
  • a flag (sym_mvd_flag) indicating whether to use symmetric MVD in units of coding units may be signaled through a bitstream. If the sym_mvd_flag value is 1, the coding unit may use symmetric MVD, otherwise, the coding unit may not use symmetric MVD.
  • the flag may be implicitly derived based on the encoding parameter of the current block.
  • the encoding parameter may include at least one of a prediction mode, motion information, size, or shape of the current block. For example, symmetric MVD may be used only when the current block is encoded in the merge mode. A symmetric MVD may be used only when the current block is not coded in the composite prediction mode.
  • a symmetric MVD may be used only when the current block performs bidirectional prediction (that is, when both the first prediction direction information (predFlagL0) and the second prediction direction information (predFlagL1) are 1).
  • a symmetric MVD may be used only when the temporal distance between the current picture and the first reference picture and the temporal distance between the current picture and the second reference picture are the same.
  • the current picture refers to a picture to which the current block belongs
  • the first and second reference pictures may refer to pictures respectively selected by reference picture indexes (refIdxL0 and refIdxL1) of the current block.
  • a symmetric MVD may be used only when the first reference picture and the second reference picture have the same picture type.
  • the picture type may mean a short term reference picture or a long term reference picture.
  • symmetric MVD may be used only when picture types of the first reference picture and the second reference picture are short-term reference pictures.
  • a symmetric MVD can be used only when the current block size is greater than or equal to a predetermined threshold size.
  • the size of the current block may be expressed as at least one of width or height, a maximum or minimum value of a width and a height, a sum of a width and a height, a product of a width and a height, and the like.
  • the current block may mean a coding block, a subblock constituting the coding block, or a transform block.
  • the threshold size is a value pre-committed to the encoding/decoding device and may be 8, 16, 32, 64, 128 or more.
  • the first unidirectional reference picture has a smaller POC (picture order count, picture output order) than the current picture in the first unidirectional reference picture list (RefPicList0), and the picture closest to the current picture (hereinafter, left Minimum distance picture), and the first unidirectional reference picture index (refIdxL0) can be set as a reference picture index of the left minimum distance picture.
  • the nearest picture means a reference picture having the smallest difference between the POC of the current picture and the POC of the reference picture.
  • the first unidirectional reference picture may be set to RefPicList0[0].
  • symmetric MVD may be used only when the temporal distance between the current picture and the first unidirectional reference picture of the current picture is close (e.g., when the reference picture is a short-term reference picture).
  • the second unidirectional reference picture can be set as a picture having a larger POC than the current picture in the second unidirectional reference picture list (RefPicList1) and the closest to the current picture (hereinafter, the right minimum distance picture),
  • the second unidirectional reference picture index (refIdxL1) may be set as a reference picture index of the right minimum distance picture.
  • the second unidirectional reference picture may be set to RefPicList1[1].
  • symmetric MVD may be used only when the temporal distance between the second unidirectional reference picture of the current picture and the current picture is close.
  • a picture having a larger POC than the current picture in the first unidirectional reference picture list and closest to the current picture may be set as the first unidirectional reference picture.
  • a picture with a smaller POC than the current picture in the second unidirectional reference picture list and closest to the current picture may be set as the second unidirectional reference picture.
  • the POC of the first unidirectional reference picture and the POC of the second unidirectional reference picture are smaller than the POC of the current picture, and the POC of the first unidirectional reference picture and the POC of the second unidirectional reference picture are the same, it may be set not to use symmetric MVD. have. Specifically, a syntax table as shown in Table 6 may be used.
  • Equation 18 the scale value may be defined as in Equation 19.
  • POC_Curr represents the POC value of the current picture
  • POC_L0 represents the POC value of the first unidirectional reference picture
  • POC_L1 represents the POC value of the second unidirectional reference picture.
  • symmetric MVD may not be used. have.
  • symmetric MVD is used. I can't.
  • 45 and 46 are diagrams illustrating a transformation method in an encoding/decoding apparatus according to an embodiment to which the present invention is applied.
  • An image obtained by subtracting the predicted image from the original image is called a residual image.
  • the residual image may be transformed into a frequency component by applying a 2D transform such as a discrete cosine transform (DCT) to the residual image.
  • a 2D transform such as a discrete cosine transform (DCT)
  • DCT discrete cosine transform
  • Discrete sine transform may be used according to the block size or prediction mode. Specifically, for example, when the current block is encoded in the intra prediction mode and the size of the block is smaller than NxN, the DST transform may be used, and otherwise, the DCT may be used.
  • the block may mean a coding block, a prediction block, or a transform block.
  • the N may be 8, 16, 32 or more.
  • DCT is a process that decomposes (transforms) an image into 2D frequency components using a cosine transform, and the frequency components at that time are expressed as a base image. For example, if DCT transformation is performed in an NxN block, N 2 basic pattern components can be obtained. Performing DCT transformation is to obtain the size of each of the basic pattern components included in the original pixel block. The size of each basic pattern component is defined as a DCT coefficient.
  • a discrete cosine transform is mainly used in an image in which many non-zero components are distributed in a low frequency
  • a Discrete Sine Transform may be used in an image in which a large number of high-frequency components are distributed.
  • DST represents a process of decomposing (converting) an image into 2D frequency components using sin transformation.
  • a 2D image can be decomposed (transformed) into 2D frequency components using a transformation method other than DCT or DST transformation, and this is defined as 2D image transformation.
  • a 2D image transformation may not be performed in a specific block among residual images, and this is defined as transform skip.
  • Quantization can be applied after the transform skip. Whether to allow the transform skip may be determined based on at least one of the size or shape of the coding unit. As an example, the transform skip may be limited to be used only in coding units of a specific size or less. For example, it is possible to set the transform skip to be used only in blocks smaller than 32x32. Alternatively, it is also possible to restrict the use of transform skip to only a square block. Specifically, for example, transformation skip may be applied in units of 32x32, 16x16, 8x8, and 4x4 blocks.
  • transform skip may be selectively applied in units of sub-partitions. Specifically, for example, as shown in FIG. 45, transform skip may be used in the upper sub-partition, DST7 in the horizontal direction and DCT8 (tu_mts_idx 3) in the vertical direction may be performed in the lower sub-partition.
  • DCT, DST, or 2D image transformation may be applied to an arbitrary block in the 2D image, and the transformation used in this case is defined as a first transformation. After performing the first transformation, transformation may be performed again in a partial region of the transformation block, and this is defined as a second transformation.
  • the first transformation may use one of a plurality of transformation cores. Specifically, for example, one of DCT2, DCT8, or DST7 may be selected and used in the transform block.
  • the transform cores of the horizontal direction transformation and the vertical direction transformation of the transformation block may be individually determined. Accordingly, the horizontal direction transformation and the vertical direction transformation may be the same or different. Different transform cores may be used in horizontal and vertical transforms, and this is defined as a multiple transform core encoding method (Multiple Transform Selection, MTS).
  • MTS Multiple Transform Selection
  • Block units for performing the first transformation and the second transformation may be set differently. Specifically, for example, after performing a first transform in an 8x8 block of the residual image, a second transform is performed for each 4x4 sub-block, but the second transform may be performed for all or a part of the 8x8 block.
  • the partial area may mean an 8x4 area including an upper left 4x4 block, an upper left 4x4 block, and an upper right 4x4 block within an 8x8 block, or a 4x8 area including an upper 4x4 block and a lower left 4x4 block.
  • some regions may be defined as remaining regions excluding the lower right 4x4 block. Any one of the partial regions may be selectively used, and the partial regions may be determined based on the above-described encoding parameter.
  • the second transform may be performed in each of the 8x8 blocks.
  • the residual image to which the first transform is applied is defined as a first transform residual image.
  • Transformation according to a predetermined transform type may be performed on the first transform residual image, and the transform used in this case is defined as a second transform.
  • the second transformation may include at least one of DCT, DST, 2D image transformation, or transformation skip.
  • the 2D image to which the second transformation is applied is defined as a second transformation residual image.
  • a sample value in the block after performing the first transformation and/or the second transformation or the sample value in the block after performing the transformation skip is defined as a transform coefficient.
  • Quantization refers to the process of dividing a transform coefficient by a predefined value to reduce the energy of a block.
  • a value defined to apply quantization to a transform coefficient is defined as a quantization parameter.
  • Pre-defined quantization parameters may be applied in units of sequences or blocks.
  • a quantization parameter can be defined with a value between 1 and 63.
  • inverse quantization and inverse transformation may be performed to generate a residual reconstructed image.
  • a first reconstructed image may be generated by adding a predicted image to the residual reconstructed image.
  • Index information'tu_mts_idx' indicating the transformation type of the current block may be signaled through a bitstream.
  • tu_mts_idx indicates one of a plurality of transformation type candidates, and each transformation type candidate may be configured by a combination of a vertical direction transformation type and a horizontal direction transformation type.
  • tu_mts_idx On the basis of the transformation type candidate specified by tu_mts_idx, whether to skip the vertical direction transformation and the horizontal direction transformation, or at least one of a vertical direction transformation core and a horizontal direction transformation core may be determined.
  • the conversion core may include at least one of DCT-2, DCT-8, and DST-7. Alternatively, a transform skip mode may be further included in the transform core.
  • a different set of transform cores may be used for each sub-partition, or the same set of transform cores may be used for each coding unit.
  • only the first sub-partition may signal tu_mts_idx through the bitstream.
  • DST-7 may be used as the horizontal direction transform core and DCT-8 may be used as the vertical direction transform core in all sub-partitions in the coding unit.
  • DCT-8 may be used as a horizontal direction transform core and DST-8 may be used as a vertical direction transform core in all sub-partitions in the coding unit as shown in the right figure of FIG. 46.
  • 47 and 48 illustrate a method of applying an in-loop filter to a reconstruction block as an embodiment to which the present invention is applied.
  • In-loop filtering is a technique that adaptively performs filtering on a decoded image in order to reduce the loss of information that occurs during quantization and encoding.
  • a deblocking filter, a sample adaptive offset filter (SAO), and an adaptive loop filter (ALF) are examples of in-loop filtering.
  • a second reconstructed image may be generated by performing at least one of a deblocking filter, a sample adaptive offset (SAO), or an adaptive loop filter (ALF) on the first reconstructed image.
  • a deblocking filter e.g., a sample adaptive offset (SAO), or an adaptive loop filter (ALF)
  • SAO and ALF may be applied.
  • transformation and quantization are performed in units of blocks.
  • a loss occurs during the quantization process, and a discontinuity occurs at the boundary of the reconstructed image.
  • Discontinuous images appearing at the boundary of a block are defined as blocking artifacts.
  • the deblocking filter is a method of mitigating block quality deterioration (blocking artifact) occurring at a block boundary of a first image and improving encoding performance.
  • Block quality deterioration can be alleviated by performing filtering at the block boundary, and whether the block is encoded in the intra prediction mode as shown in FIG. 47, or whether the difference between the absolute values of the motion vectors of the neighboring blocks is greater than a predetermined threshold value.
  • a block filter strength (BS) value may be determined based on at least one of whether or not reference pictures of neighboring blocks are identical to each other. When the BS value is 0, filtering is not performed, and when the BS value is 1 or 2, filtering may be performed at a block boundary.
  • SAO can effectively reduce the ringing phenomenon by adding or subtracting a specific offset in units of blocks in consideration of the pattern of the first reconstructed image.
  • SAO is composed of an edge offset (hereinafter referred to as EO) and a band offset (BO) according to characteristics of a reconstructed image.
  • EO edge offset
  • BO band offset
  • the edge offset is a method of adding an offset to the current sample differently according to the surrounding pixel sample pattern.
  • Band offset is to reduce coding errors by adding a certain value to a set of pixels with similar pixel brightness values in a region. By dividing the pixel brightness into 32 uniform bands, pixels having similar brightness values can be made into one set. For example, four adjacent bands can be grouped into one category. One category can be set to use the same offset value.
  • ALF Adaptive Loop Filter
  • the filter can be selected in units of pictures or units of CTU.
  • any one of a 5x5, 7x7, or 9x9 diamond shape may be selected.
  • it may be limited to use only the 5x5 diamond shape.
  • 49 to 55 illustrate a method of dividing one picture into various types of fragment regions according to an embodiment to which the present invention is applied.
  • High-resolution images are used in immersive media applications such as panoramic video, 360 degree video or 4K/8K Ultra High Definition (UHD).
  • Parallelization is required for real-time or low-delay encoding of high-resolution images.
  • certain regions of a picture must be capable of encoding/decoding independently of each other.
  • the encoding/decoding apparatus may define various types of fragment regions.
  • the type of the pre-defined fragment region may include at least one of a subpicture, a slice, a tile, or a subtile.
  • One picture may be divided into one or more subpictures, and the subpicture may mean a basic unit in which independent encoding/decoding is allowed, such as a picture.
  • a slice and/or tile may mean a mood unit in which parallel encoding/decoding is allowed.
  • a slice may be composed of a plurality of CTUs according to a raster scan (hereinafter, referred to as a first type), or may be defined as a square or non-square region covering a plurality of CTUs (hereinafter, referred to as a second type).
  • a tile may mean an area partitioned by a vertical and/or horizontal line crossing one picture.
  • One slice may consist of one or more tiles. However, one slice completely covers a plurality of tiles, and it may not be allowed when one tile is divided to span a plurality of slices.
  • One slice may consist of one or more subpictures. However, one slice completely covers a plurality of subpictures, and it may not be allowed when one subpicture is divided to span a plurality of slices.
  • One subpicture may always be limited to be greater than or equal to one slice. When a slice is divided into a first type, division into subpictures is not allowed, and when a slice is divided into a second type, division into subpictures may be allowed. Alternatively, when division into subpictures is allowed, the slice may be limited to be divided into only the second type.
  • One tile may consist of one or more subpictures.
  • the subpicture may also mean a subtile.
  • one tile may be composed of one or more slices.
  • the slice may mean a subtile.
  • subpicture information Information for specifying a subpicture
  • the subpicture information includes information on the number of subpictures constituting one picture, information indicating whether intra/inter prediction or in-loop filtering across a boundary of a subpicture is allowed, information on a position/size of a subpicture, or sub It may include at least one of the picture identifiers (IDs).
  • IDs picture identifiers
  • the location information of the subpicture may be expressed as location information of a specific CTU in the subpicture.
  • the specific CTU may mean an upper left CTU or a lower right CTU in a subpicture.
  • the subpicture information includes at least one of information indicating whether to process a subpicture as a single picture or information specifying a position or unit (eg, video sequence, picture, etc.) at which the above-described subpicture information is signaled. It may contain more. However, the information indicating whether to process a subpicture as one picture may be signaled dependently on information indicating whether intra/inter prediction or in-loop filtering across the boundary of the subpicture is allowed.
  • tile information information specifying a tile
  • slice information information specifying a slice
  • the tile information and the slice information may be signaled only when the current picture is divided based on at least one of a plurality of types pre-defined in the encoding/decoding apparatus.
  • a flag indicating whether the current picture is divided by at least one of a slice or a tile may be used.
  • the aforementioned subpicture information may also be signaled only when the current picture is divided based on at least one of a plurality of types according to the flag.
  • the tile information may include at least one of information on the number of tiles divided in a vertical direction, information on the number of tiles divided in a horizontal direction, and size information of each tile.
  • the slice information may include first information indicating whether a plurality of tiles belonging to one slice have a raster scan order or cover a rectangular area. When a plurality of tiles belonging to one slice have a raster scan order according to the first information, additional slice information may not be signaled. Additional slice information may be signaled only when a plurality of tiles belonging to one slice cover a rectangular area.
  • the additional slice information may include at least one of information indicating whether a subpicture is composed of one slice, information on the number of slices belonging to a picture or subpicture, or size/position information of each slice.
  • Slice size information may be encoded in units of tiles or CTUs. Based on the slice size information, it is possible to identify whether a plurality of slices are included in one tile. If it is identified that one tile includes a plurality of slices, information on the number and size of slices belonging to one tile may be signaled.
  • the slice may be generated by dividing the tile only in the horizontal direction, and in this case, only information indicating the height of the slice may be signaled as size information.
  • the slice may be generated by dividing the tile only in the vertical direction, and in this case, only information indicating the width of the slice as size information may be signaled.
  • the slice may be generated by dividing the tile in vertical and horizontal directions, and in this case, information indicating the height and width of the slice may be signaled as size information.
  • the location information of the slice may be encoded as a difference between the first tile index in the i-th slice and the first tile index in the (i+1)-th slice. That is, the location of the (i+1)-th slice may be determined based on location information of the i-th slice and an encoded difference.
  • the present invention is not limited thereto, and the location information of a slice may be encoded as a difference between last tile indexes in both slices. Position information on the first slice or the last slice in one picture may be omitted.
  • a tile is a tool for supporting parallelization of video.
  • the tile may have a rectangular shape.
  • non-rectangular shaped tiles can be allowed.
  • Information indicating whether a non-rectangular shape tile exists may be encoded.
  • Information necessary for video encoding/decoding is not derived from data in other tiles.
  • a probability table of a context adaptive binary arithmetric coding (CABAC) context may be initialized for each tile unit. You can disable the in-loop filter at the tile boundary (the boundary between two neighboring tiles). Alternatively, information indicating whether to use an in-loop filter at the tile boundary may be encoded.
  • CABAC context adaptive binary arithmetric coding
  • the tiles adjacent to the left or the right may have the same height (hereinafter, a horizontal tile set), or the tiles adjacent to the top or bottom may have the same width (hereinafter, a vertical tile set).
  • a horizontal tile set the tiles adjacent to the top or bottom may have the same width
  • a vertical tile set the tiles adjacent to the top or bottom may have the same width
  • a syntax num_tile_columns_minus1 indicating how many vertical tile sets in the picture are in the picture parameter set, sequence parameter set, or slice header may be signaled.
  • the number of vertical tile sets is 4, and a value of the syntax num_tile_columns_minus1 indicating this may be set to 3.
  • a syntax column_width_minus1 indicating the width of each vertical tile set may be signaled.
  • a syntax num_tile_rows_minus1 indicating how many horizontal tile sets are in the picture may be signaled in the picture parameter set, sequence parameter set, or slice header.
  • the number of horizontal tile sets is 3, and a value of the syntax num_tile_rows_minus1 indicating this may be set to 2.
  • the syntax row_height_minus1 indicating the height of each horizontal tile set may be signaled.
  • uniform_tile_spacing_flag is a flag indicating whether the width and height of each tile in the picture are evenly divided
  • loop_filter_across_tiles_enabled_flag is a flag indicating whether to disable the in-loop filter at the tile boundary (the boundary of two neighboring tiles).
  • a syntax table as shown in Table 7 may be used.
  • the uniform_tile_spacing_flag is a flag indicating whether each tile in the picture is equally divided
  • the loop_filter_across_tiles_enabled_flag is a flag indicating whether to disable the in-loop filter at the tile boundary (the boundary of two neighboring tiles).
  • the size of the tile may be determined based on the number of horizontal tiles num_tile_columns_minus1 and the number of vertical tiles num_tile_rows_minus1.
  • uniform_tile_spacing_flag When the value of uniform_tile_spacing_flag is 1, information indicating the width and height of each tile may be encoded. For example, column_width_minus1[i] representing the width of the i-th tile and row_height_minus1[i] representing the height of the i-th tile may be encoded. Alternatively, the difference between the width/height between the tiles may be encoded.
  • a tile having the smallest width among tiles belonging to a horizontal tile set is called a minimum width tile.
  • the syntax min_column_width_minus1 value indicating the width of the minimum-width tile can be signaled, and the width of the minimum-width tile can be set to a value of min_column_width_minus1+1.
  • the tile with the smallest height among tiles belonging to the vertical tile set is called the minimum height tile.
  • the syntax min_row_height_minus1 value indicating the height of the minimum height tile may be signaled, and the height of the minimum height tile may be set to a value min_row_height_minus1+1.
  • the height of the horizontal tile set can be derived as in Equation 21 below.
  • column_width_minus[1] min_columnn_width_minus1 + diff_column_width[i]
  • the tile height of the vertical tile set can be derived as in Equation 22 below.
  • row_height_minus[1] min_row_height_minus1 + diff_row_height[i]
  • a width difference value or a height difference value between the i-th tile and the i-1th tile may be encoded.
  • the same-size tile flag uniform_tile_spacing_flag may be signaled through a bitstream. If the uniform_tile_spacing_flag value is 1, it indicates that the width of each tile in the picture is equally divided, and the height of each tile is equally divided. When the uniform_tile_spacing_flag value is 0, the syntax tile_column_width_minus1 indicating the width of each tile and the syntax tile_row_height_minus1 indicating the width of each tile may be signaled.
  • a tile group including at least one tile may be defined.
  • Information on the configuration of a tile group in a picture may be encoded.
  • Information on the tile group configuration includes a flag indicating whether a picture is composed of one tile (eg, single_tile_in_pic_flag), a flag indicating whether each tile group is composed of only one tile (eg, single_tile_per_tile_group_flag), and a tile group.
  • a flag indicating whether this is a square (eg, rect_tile_group_flag), information indicating the number of tile groups in a picture (eg, num_tile_groups_in_pic_minus1), information indicating the horizontal number of tile groups (eg, num_tile_columns_minus1), and the number of vertical directions of the tile group. It may include at least one of the indicated information (eg, num_tile_rows_minus1).
  • a syntax indicating whether the width/height of tiles included in each tile group is equally divided may be encoded.
  • a syntax uniform_tile_spacing_inTG[i] indicating whether the widths of each tile in tile group i are equally divided may be signaled through a bitstream. If the uniform_tile_spacing_inTG[i] value is 1, it indicates that the widths of the tiles in the i-th tile group are evenly divided. Show.
  • uniform_tile_spacing_inTG[i] can be signaled only when the uniform_tile_spacing_flag value is 0, and when the uniform_tile_spacing_flag value is not signaled, the value can be set to 0.
  • whether to encode uniform_tile_spacing_inTG[i] may be determined according to the shape of the tile group. For example, uniform_tile_spacing_inTG[i] may be encoded only when the tile group is a square. If the tile group has a non-rectangular shape, encoding of uniform_tile_spacing_inTG[i] may be omitted.
  • a syntax column_width_minus1 indicating the width of a vertical tile set may be signaled.
  • a syntax num_tile_rows_minus1 indicating the number of horizontal direction tile sets for each tile group may be signaled.
  • the syntax tile_column_width_minus1 indicating the width of the tile and the syntax tile_row_height_minus1 indicating the height may be signaled.
  • a tile group may be defined as a plurality of tiles as shown in FIG. 50.
  • tile_group_index may be signaled through a bitstream, and a syntax numTotalTileGruop_minus1 indicating the total number of tile groups in a sequence or picture may be signaled. It is possible to signal a CTU address or a Tile address of a location where TileGroup starts.
  • the width and height of tiles in each tile group may be set differently.
  • the heights of Tile3 and Tile4 belonging to tile group1 are set differently.
  • tiles having different heights may be set to be included in different tile groups.
  • the proximity between tiles may be determined based on a spatial location or a scan order. For example, when the raster scan order is followed, Tile 3 and Tile 4 of FIG. 51 may be determined to be adjacent to each other. As shown in FIG. 51, when the heights of Tile3 and Tile4 are different, they may be set to belong to different tile groups.
  • the tile group can also be configured in a square shape, and this is called a square tile group.
  • a syntax rect_tile_group_flag indicating whether a tile group is configured in a square shape in the picture parameter set may be transmitted through a bitstream. If the rect_tile_group_flag value is 1, it indicates that the tile group can be configured in a rectangular shape.
  • an ID of a tile located at the upper left of the tile group (hereinafter, top_left_tile_idx) and an ID of a tile located at the upper right (hereinafter, bottom_right_tile_idx) may be transmitted through a bitstream.
  • the flag isMultipleTileInTileG_flag indicating whether a plurality of tiles in the Tile group is present may be signaled.
  • isMultipleTileInTileG_flag value 1
  • isMultipleTileInTileG_flag value 0
  • top_left_tile_idx to bottom_right_tile_idx may be omitted without signaling.
  • the total number of tile groups is 4, when the positions and sizes of tile group0, tile group1, and tile group2 are set (top_left_tile_idx and bottom_right_tile_idx for each tile group are signaled to The location and size of group0, tile group1, and tile group2 can be set.
  • the size of tile group3, which is the last tile group of a picture, can be set to an area other than tile group0, tile group1, or tile group2. Among these areas, the ID of the top left tile is derived as the value of top_left_tile_idx, and the ID of the bottom right tile is derived. It can be derived from the bottom_right_tile_idx value.
  • one Tile may be composed of a plurality of CTUs.
  • the tile except for tiles adjacent to the right/lower boundary of the picture, the tile cannot include an area having a size smaller than the CTU. That is, the tile boundary may be set equal to the CTU boundary.
  • Tiles adjacent to the right and left borders of the picture may include an area having a size smaller than that of the CTU.
  • the right boundary of the first tile may be set as the right boundary of the third CTU column (CTU 2, CTU 9).
  • the sizes of each tile are different.
  • the size of the first tile is different from the tile adjacent to the right side of the picture and the tile adjacent to the lower side of the picture.
  • Tiles can also be divided into smaller units of subtiles. For example, as in Tile8 of FIG. 53, a specific tile may be divided into subtiles. Subtiles can be divided in vertical and horizontal directions like Tile8, or can be divided only in horizontal directions.
  • the CABAC state may be initialized in the first subtile of the tile. That is, the cabac state may not be initialized in the second subtile.
  • a syntax sub_tile_present_flag indicating whether at least one subtile exists in the current picture may be signaled through a bitstream. If the value of sub_tile_present_flag is 1, it indicates that at least one subtile exists in the picture, and if the value of sub_tile_present_flag is 0, it indicates that there is no subtile in the picture.
  • a syntax uniform_subtile_spacing_flag[i] indicating whether the width and/or height of the subtile are equally divided may be signaled through a bitstream.
  • uniform_subtile_spacing_flag[i] indicates that the width and/or height of the subtiles in the tile group i or tile i are equally divided.
  • a flag num_subtile_row_minus1 indicating the number of subtiles may be signaled through a bitstream.
  • subtile_rows_height_minus1 indicating the height of the subtiles to be divided equally may be signaled. For example, if subtile_row_height_minus1 is 7, this indicates that a tile group or subtile within a tile can be equally divided so that the height of the subtile is 8.
  • a flag sub_tile_split_flag[j] indicating whether each tile is divided into subtiles may be signaled. If the value of sub_tile_split_flag[j] is 1, it indicates that a tile having a tile index of j (hereinafter, a j-th tile) is divided into subtiles.
  • the height of the subtiles adjacent to the left or right within the tile may be the same (hereinafter, a horizontal subtile set), or the width of the subtiles adjacent to the upper or lower direction may be the same (hereinafter, a vertical subtile set )You may.
  • a syntax sub_tile_column_width_minus1 indicating the width of the vertical subtile set may be signaled.
  • a syntax sub_tile_num_tile_rows_minus1 indicating the number of horizontal tile sets for each tile may be signaled.
  • Tile and subtile information may be signaled using a syntax table as shown in Tables 11 to 12 below.
  • a value of num_subtile_row_minus1 may be derived as in Equation 23.
  • num_subtile_row_minus1 (TileWidth / subtile_rows_height_minus1)
  • the flags top_left_brick_idx and bottom_right_brick_idx indicating the position of the subtile may be signaled through a bitstream.
  • top_left_tile_idx[i] may be derived as bottom_right_subtile_idx[j-1]+1.
  • the width of the vertical subtile set of the current tile may be set smaller than the width of the vertical tile set to which the current tile belongs. That is, the width of the vertical subtile set of the current tile cannot be set to be equal to or greater than the width of the vertical tile set to which the current tile belongs.
  • the width of the horizontal subtile set of the current tile may be set smaller than the width of the horizontal tile set to which the current tile belongs. That is, the width of the horizontal subtile set of the current tile cannot be set to be equal to or greater than the width of the horizontal tile set to which the current tile belongs.
  • all tiles in a tile group may have subtiles.
  • the syntax isAll_subtile_flag indicating whether all tiles in the tile group have subtiles may be signaled through a bitstream. If the isAll_subtile_flag value is 1, it indicates that subtiles exist in all tiles in the tile group. If the isAll_subtile_flag value is 0, it indicates that at least one tile in which a subtile does not exist exists in the tile group.
  • Tile and subtile information can be signaled using a syntax table as shown in Table 17 below.
  • one Tile may be composed of a plurality of CTUs.
  • the tile except for tiles adjacent to the right/lower boundary of the picture, the tile cannot include an area having a size smaller than the CTU. That is, the tile boundary may be set equal to the CTU boundary.
  • Tiles adjacent to the right and left borders of the picture may include an area having a size smaller than that of the CTU.
  • the right boundary of the first tile may be set as the right boundary of the third CTU column (CTU 2, CTU 9).
  • the sizes of each tile are different.
  • the size of the first tile is different from the tile adjacent to the right side of the picture and the tile adjacent to the lower side of the picture.
  • the size of each tile can be adjusted to become more even. This is defined as a flexible size tile.
  • a region smaller than the CTU may be partitioned to belong to the tile.
  • An area smaller than the CTU belonging to a tile is called a minimum unit tile area.
  • the subtile within the tile can be set to be greater than or equal to the CTU.
  • a subtile smaller than the CTU may be used.
  • various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof.
  • one or more ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs Field Programmable Gate Arrays
  • general purpose It may be implemented by a processor (general processor), a controller, a microcontroller, a microprocessor, or the like.
  • the scope of the present disclosure is software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that allow an operation according to a method of various embodiments to be executed on a device or computer, and such software or It includes a non-transitory computer-readable medium (non-transitory computer-readable medium) which stores instructions and the like and is executable on a device or computer.
  • software or machine-executable instructions e.g., operating systems, applications, firmware, programs, etc.
  • the present invention can be used to encode/decode video.

Landscapes

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

Abstract

본 발명에 따른 영상 부호화/복호화 방법 및 장치는 기-정의된 예측 모드를 기반으로, 현재 블록의 예측 블록을 생성하고, 소정의 변환 타입에 기초하여 상기 현재 블록의 잔차 블록을 생성하며, 상기 예측 블록과 상기 잔차 블록을 기반으로 상기 현재 블록을 복원할 수 있다.

Description

영상 부호화/복호화 방법 및 장치
본 발명은 비디오 신호 처리 방법 및 장치에 관한 것이다.
고해상도 비디오에 대한 시장의 수요가 증가하고 있으며, 이에 따라 고해상도 영상을 효율적으로 압축할 수 있는 기술이 필요하다. 이러한 시장의 요구에 따라 ISO/IEC의 MPEG (Moving Picture Expert Group)과 ITU-T의 VCEG (Video Coding Expert Group)이 공동으로 JCT-VC (Joint Collaborative Team on Video Coding)를 결성하여, HEVC (High Efficiency Video Coding) 비디오 압축 표준을 2013년 1월에 개발을 완료했으며, 차세대 압축 표준에 대한 연구 및 개발을 활발히 진행해오고 있다.
동영상 압축은 크게 화면 내 예측 (또는 인트라 예측), 화면 간 예측(또는 인터 예측), 변환, 양자화, 엔트로피(Entropy coding) 부호화, 인루프 필터(In-loop filter)로 구성된다. 한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 컨텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.
본 발명은 효율이 향상된 영상 부호화/복호화 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명은 인터 모드 별 예측 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명은 멀티 타입 기반의 변환 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명은 영상 부호화 방법 및 장치에 의해 생성된 비트스트림을 저장하는 컴퓨터 판독 가능한 기록 매체를 제공하는 것을 목적으로 한다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 기-정의된 예측 모드를 기반으로, 현재 블록의 예측 블록을 생성하고, 소정의 변환 타입에 기초하여 상기 현재 블록의 잔차 블록을 생성하며, 상기 예측 블록과 상기 잔차 블록을 기반으로 상기 현재 블록을 복원할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 예측 모드가 인트라 모드인 경우, 상기 현재 블록의 예측 블록은 소정의 인트라 레퍼런스 샘플과 인트라 예측 모드를 이용하여 생성될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 인트라 레퍼런스 샘플은 복수의 인트라 레퍼런스 라인 중 어느 하나로부터 유도되고, 상기 인트라 예측 모드는 상기 현재 블록의 형태를 고려하여 결정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 예측 모드가 머지 모드인 경우, 상기 예측 블록을 생성하는 단계는, 상기 현재 블록의 머지 후보 리스트를 생성하는 단계, 상기 머지 후보 리스트에 기초하여 상기 현재 블록의 모션 정보를 유도하는 단계 및 상기 유도된 모션 정보를 기반으로, 상기 현재 블록의 모션 보상을 수행하는 단계를 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 머지 후보 리스트는 공간적 머지 후보, 시간적 머지 후보 또는 모션 정보 리스트의 머지 후보 중 적어도 하나를 포함하고, 상기 모션 정보 리스트는 상기 현재 블록 이전에 복호화된 하나 또는 그 이상의 이전 블록의 모션 정보로 구성될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 공간적 머지 후보는 소정의 병렬 머지 영역을 고려하여 결정되고, 상기 병렬 머지 영역은 서로 독립적으로 또는 병렬적으로 부호화/복호화되는 복수의 코딩 블록으로 구성된 영역을 의미할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 모션 정보 리스트의 머지 후보는 머지 후보 리스트에 기-추가된 공간적 머지 후보와 중복되지 않을 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 병렬 머지 영역에 속한 하나 또는 그 이상의 코딩 블록은 하나의 동일한 모션 정보 리스트를 공유할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 모션 정보를 기반으로, 상기 모션 정보 리스트를 업데이트하는 단계를 더 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 업데이트는, 상기 현재 블록이 상기 병렬 머지 영역 내에서 가장 마지막 복호화 순서를 가진 블록인 경우에 한하여 수행될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 모션 정보는 모션 벡터, 참조 픽쳐 인덱스 또는 예측 방향 정보 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 모션 보상을 수행하는 단계는, 소정의 차분 모션 벡터(MVD)를 기반으로 상기 현재 블록의 모션 벡터를 보정하는 단계를 포함하고, 상기 모션 보상은 보정된 모션 벡터를 이용하여 수행될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 차분 모션 벡터는, 제1 방향의 차분 모션 벡터(MVDL0)와 제2 방향의 차분 모션 벡터(MVDL1)를 포함하고, 상기 제2 방향의 차분 모션 벡터는, 상기 제1 방향의 차분 모션 벡터와 크기는 동일하고 방향이 반대인 벡터로 설정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 모션 벡터의 보정은, 상기 현재 블록의 부호화 파라미터에 기초하여 수행되고, 상기 부호화 파라미터는, 상기 현재 블록의 예측 모드, 모션 정보 또는 크기 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 영상 부호화 방법 및 장치는, 부호화 장치에 기-정의된 테이블에 기초하여, 현재 블록의 변환 타입을 결정하고, 결정된 변환 타입을 나타내는 정보를 부호화할 수 있다.
본 발명에 따른 영상 복호화 방법 및 장치는, 부호화 장치로부터 명시적으로 시그날링되는 정보 및 복호화 장치에 기-정의된 테이블에 기초하여, 현재 블록의 변환 타입을 결정할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 기-정의된 테이블은 상기 부호화되는 정보 별로 이용 가능한 수평 방향의 변환 타입 또는 수직 방향의 변환 타입 중 적어도 하나를 정의할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 변환 타입은 상기 현재 블록의 크기, 형태, 인트라 예측 모드 또는 성분 타입 중 적어도 하나에 기초하여 묵시적으로 유도될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체는, 전술한 영상 부호화 방법/장치에 따라 생성된 비트스트림 또는 전술한 영상 복호화 방법/장치에 의해 복호화되는 비트스트림을 저장할 수 있다.
본 발명은 다양한 유형의 머지 후보를 이용하여 인터 예측의 부호화 효율을 향상시킬 수 있다.
본 발명은 모션 정보의 보정을 통해 인터 예측의 정확도를 향상시킬 수 있다.
본 발명은 멀티 타입 기반의 변환 뿐만 아니라 추가적인 변환을 수행함으로써, 잔차 샘플의 부호화 효율을 향싱시킬 수 있다.
본 발명에 따르면, 본 발명에 따른 영상 부호화 방법/장치에 의해 생성된 비트스트림을 저장하는 컴퓨터 판독 가능한 기록 매체가 제공될 수 있다.
도 1은 본 발명에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 본 발명에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 3 내지 도 5는 본 발명이 적용되는 일실시예로서, 픽쳐를 복수의 블록으로 분할하는 방법을 도시한 것이다.
도 6은 본 발명이 적용되는 일실시예로서, 현재 블록을 복원하는 과정을 개략적으로 도시한 것이다.
도 7 내지 도 16은 본 발명이 적용되는 일실시예로서, 인트라 예측 방법을 도시한 것이다.
도 17은 본 발명이 적용되는 일실시예로서, 인터 예측 방법을 도시한 것이다.
도 18 내지 도 30은 본 발명이 적용되는 일실시예로서, 어파인 인터 예측 방법을 도시한 것이다.
도 31은 본 발명이 적용되는 일실시예로서, 머지 모드 기반의 인터 예측 방법을 도시한 것이다.
도 32 내지 도 33은 본 발명이 적용되는 일실시예로서, 공간적 머지 후보로 이용 가능한 주변 블록을 도시한 것이다.
도 34 내지 도 40은 본 발명이 적용되는 일실시예로서, 모션 정보 리스트의 구성 및 업데이트 방법을 도시한 것이다.
도 41 내지 도 43은 본 발명이 적용되는 일실시예로서, 병렬 머지 영역에서의 모션 정보 리스트의 구성 및 업데이트 방법을 도시한 것이다.
도 44는, 본 발명이 적용되는 일실시예로서, 차분 모션 벡터를 기반으로, 모션 벡터를 보정하는 방법을 도시한 것이다.
도 45 및 도 46은 본 발명이 적용되는 일실시예로서, 부호화/복호화 장치에서의 변환 방법을 도시한 것이다.
도 47 및 도 48은 본 발명이 적용되는 일실시예로서, 복원 블록에 인루프 필터를 적용하는 방법을 도시한 것이다.
도 49 내지 도 55는 본 발명이 적용되는 일실시예로서, 하나의 픽쳐를 다양한 유형의 조각 영역으로 분할하는 방법을 도시한 것이다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 기-정의된 예측 모드를 기반으로, 현재 블록의 예측 블록을 생성하고, 소정의 변환 타입에 기초하여 상기 현재 블록의 잔차 블록을 생성하며, 상기 예측 블록과 상기 잔차 블록을 기반으로 상기 현재 블록을 복원할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 예측 모드가 인트라 모드인 경우, 상기 현재 블록의 예측 블록은 소정의 인트라 레퍼런스 샘플과 인트라 예측 모드를 이용하여 생성될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 인트라 레퍼런스 샘플은 복수의 인트라 레퍼런스 라인 중 어느 하나로부터 유도되고, 상기 인트라 예측 모드는 상기 현재 블록의 형태를 고려하여 결정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 예측 모드가 머지 모드인 경우, 상기 예측 블록을 생성하는 단계는, 상기 현재 블록의 머지 후보 리스트를 생성하는 단계, 상기 머지 후보 리스트에 기초하여 상기 현재 블록의 모션 정보를 유도하는 단계 및 상기 유도된 모션 정보를 기반으로, 상기 현재 블록의 모션 보상을 수행하는 단계를 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 머지 후보 리스트는 공간적 머지 후보, 시간적 머지 후보 또는 모션 정보 리스트의 머지 후보 중 적어도 하나를 포함하고, 상기 모션 정보 리스트는 상기 현재 블록 이전에 복호화된 하나 또는 그 이상의 이전 블록의 모션 정보로 구성될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 공간적 머지 후보는 소정의 병렬 머지 영역을 고려하여 결정되고, 상기 병렬 머지 영역은 서로 독립적으로 또는 병렬적으로 부호화/복호화되는 복수의 코딩 블록으로 구성된 영역을 의미할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 모션 정보 리스트의 머지 후보는 머지 후보 리스트에 기-추가된 공간적 머지 후보와 중복되지 않을 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 병렬 머지 영역에 속한 하나 또는 그 이상의 코딩 블록은 하나의 동일한 모션 정보 리스트를 공유할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 모션 정보를 기반으로, 상기 모션 정보 리스트를 업데이트하는 단계를 더 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 업데이트는, 상기 현재 블록이 상기 병렬 머지 영역 내에서 가장 마지막 복호화 순서를 가진 블록인 경우에 한하여 수행될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 모션 정보는 모션 벡터, 참조 픽쳐 인덱스 또는 예측 방향 정보 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 모션 보상을 수행하는 단계는, 소정의 차분 모션 벡터(MVD)를 기반으로 상기 현재 블록의 모션 벡터를 보정하는 단계를 포함하고, 상기 모션 보상은 보정된 모션 벡터를 이용하여 수행될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 차분 모션 벡터는, 제1 방향의 차분 모션 벡터(MVDL0)와 제2 방향의 차분 모션 벡터(MVDL1)를 포함하고, 상기 제2 방향의 차분 모션 벡터는, 상기 제1 방향의 차분 모션 벡터와 크기는 동일하고 방향이 반대인 벡터로 설정될 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 모션 벡터의 보정은, 상기 현재 블록의 부호화 파라미터에 기초하여 수행되고, 상기 부호화 파라미터는, 상기 현재 블록의 예측 모드, 모션 정보 또는 크기 중 적어도 하나를 포함할 수 있다.
본 발명에 따른 영상 부호화 방법 및 장치는, 부호화 장치에 기-정의된 테이블에 기초하여, 현재 블록의 변환 타입을 결정하고, 결정된 변환 타입을 나타내는 정보를 부호화할 수 있다.
본 발명에 따른 영상 복호화 방법 및 장치는, 부호화 장치로부터 명시적으로 시그날링되는 정보 및 복호화 장치에 기-정의된 테이블에 기초하여, 현재 블록의 변환 타입을 결정할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 기-정의된 테이블은 상기 부호화되는 정보 별로 이용 가능한 수평 방향의 변환 타입 또는 수직 방향의 변환 타입 중 적어도 하나를 정의할 수 있다.
본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 변환 타입은 상기 현재 블록의 크기, 형태, 인트라 예측 모드 또는 성분 타입 중 적어도 하나에 기초하여 묵시적으로 유도될 수 있다.
본 발명에 따른 컴퓨터로 판독가능한 기록 매체는, 전술한 영상 부호화 방법/장치에 따라 생성된 비트스트림 또는 전술한 영상 복호화 방법/장치에 의해 복호화되는 비트스트림을 저장할 수 있다.
본 명세서에 첨부된 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.
본 명세서 전체에서, 어떤 부분이 다른 부분과 '연결'되어 있다고 할 때, 이는 직접적으로 연결되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 전기적으로 연결되어 있는 경우도 포함한다.
또한, 본 명세서 전체에서 어떤 부분이 어떤 구성요소를 '포함'한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것을 의미한다.
또한, 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.
또한, 본 명세서에서 설명되는 장치 및 방법에 관한 실시예에 있어서, 장치의 구성 일부 또는 방법의 단계 일부는 생략될 수 있다. 또한 장치의 구성 일부 또는 방법의 단계 일부의 순서가 변경될 수 있다. 또한 장치의 구성 일부 또는 방법의 단계 일부에 다른 구성 또는 다른 단계가 삽입될 수 있다.
또한, 본 발명의 제1 실시예의 일부 구성 또는 일부 단계는 본 발명의 제2 실시예에 부가되거나, 제2 실시예의 일부 구성 또는 일부 단계를 대체할 수 있다.
덧붙여, 본 발명의 실시예에 나타나는 구성부들은 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시되는 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 기술되고, 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수 개의 구성부로 나뉘어져 기능을 수행할 수 있다. 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리 범위에 포함된다.
본 명세서에서, 블록은 단위, 영역, 유닛, 파티션 등으로 다양하게 표현될 수 있고, 샘플은 화소, 펠(pel), 픽셀 등으로 다양하게 표현될 수 있다.
이하, 첨부한 도면들을 참조하여, 본 발명의 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 동일한 구성요소에 대해서 중복된 설명은 생략한다.
도 1은 본 발명에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 1을 참조하면, 종래 영상 부호화 장치(100)는 픽쳐 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.
픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.
예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다. 부호화 단위를 기초로 인트라 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위 NxN 으로 분할하지 않고 인트라 예측을 수행할 수 있다.
예측부(120, 125)는 인터 예측 또는 화면 간 예측을 수행하는 인터 예측부(120)와 인트라 예측 또는 화면 내 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화기에 전달될 수 있다.
인터 예측부(120)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽쳐 보간부, 모션 예측부, 모션 보상부를 포함할 수 있다.
참조 픽쳐 보간부에서는 메모리(155)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.
모션 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터값을 가질 수 있다. 모션 예측부에서는 모션 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 모션 예측 방법으로 스킵 모드(Skip Mode), 병합 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피(Intra Block Copy) 모드, 어파인 모드(Affine mode) 등 다양한 방법이 사용될 수 있다.
인트라 예측부(125)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.
또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다.
변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지, DST를 적용할지 또는 KLT를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다.
양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.
재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.
재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.
엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다. 관련하여, 엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보를 부호화 할 수 있다. 또한, 본 발명에 따라 모션 정보를 디코더 측면에서 유도하여 사용함을 지시하는 정보 및 모션 정보 유도에 사용된 기법에 대한 정보를 시그널링(signaling)하여 전송하는 것이 가능하다.
역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 모션 추정부, 모션 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다.
필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다. 디블록킹 필터는 복원된 픽쳐에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다. ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다.
메모리(155)는 필터부(150)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 인터 예측을 수행 시 예측부(120, 125)에 제공될 수 있다.
도 2는 본 발명에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 2를 참조하면, 영상 복호화기(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)가 포함될 수 있다.
영상 부호화기에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화기와 반대의 절차로 복호화될 수 있다.
엔트로피 복호화부(210)는 영상 부호화기의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다.
엔트로피 복호화부(210)에서는 부호화기에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.
재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다.
역양자화부(220)는 부호화기에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다.
역변환부(225)는 영상 부호화기에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT, DST, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 부호화기에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화기의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.
예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다.
전술한 바와 같이 영상 부호화기에서의 동작과 동일하게 인트라 예측 또는 화면 내 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수도 있다.
예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 반면, 만약 부호화기(100)에서 상기 인터 예측을 위한 모션 예측 관련 정보를 전송하지 않고, 대신 모션 정보를 디코더 측면에서 유도하여 사용함을 지시하는 정보 및 모션 정보 유도에 사용된 기법에 대한 정보를 전송하는 경우에는, 상기 예측 단위 판별부는 부호화기(100)로부터 전송된 정보를 기초로 하여, 인터 예측부(230)의 예측 수행을 판별하게 된다.
인터 예측부(230)는 영상 부호화기에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 인터 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 병합 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피 모드(Intra block copy mode), 어파인 모드(Affine mode) 중 어떠한 방법인지 여부를 판단할 수 있다.
인트라 예측부(235)는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 영상 부호화기에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로 인트라 예측을 수행할 수 있다.
인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화기에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.
참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.
복원된 블록 또는 픽쳐는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.
영상 부호화기로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화기의 디블록킹 필터에서는 영상 부호화기에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화기에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다.
오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다. ALF는 부호화기로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.
메모리(245)는 복원된 픽쳐 또는 블록을 저장하여 참조 픽쳐 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽쳐를 출력부로 제공할 수 있다.
도 3 내지 도 5는 본 발명이 적용되는 일실시예로서, 픽쳐를 복수의 블록으로 분할하는 방법을 도시한 것이다.
도 3을 참조하면, 픽쳐는 복수개의 기본 코딩 유닛(Coding Tree Unit, 이하, CTU)으로 나누어진다.
픽쳐 또는 비디오 시퀀스 단위로 CTU의 크기를 규정할 수 있으며, 각 CTU는 다른 CTU와 겹치지 않도록 구성되어 있다. 예를 들어, 전체 시퀀스에서 CTU 사이즈를 128x128로 설정할 수 있고, 픽쳐 단위로 128x128 내지 256x256 중 어느 하나를 선택해서 사용할 수도 있다.
CTU를 계층적으로 분할하여 코딩 블록/코딩 유닛(Coding Unit, 이하 CU)을 생성할 수 있다. 코딩 유닛 단위로 예측 및 변환을 수행할 수 있으며, 예측 모드를 결정하는 기본 단위가 된다. 예측 모드는 예측 영상을 생성하는 방법을 나타내며, 화면 내 예측 (intra prediction, 이하, 인트라 예측), 화면 간 예측(inter prediction, 이하, 인터 예측) 또는 복합 예측(combined prediction) 등을 예로 들 수 있다. 구체적으로 예를 들어, 코딩 유닛 단위로 인트라 예측, 인터 예측 또는 복합 예측 중 적어도 어느 하나의 예측 모드를 이용하여 예측 블록(prediction block)을 생성할 수 있다. 화면 간 예측 모드에서 참조 픽쳐가 현재 픽쳐를 가리키는 경우에는 이미 복호화된 현재 픽쳐 내 영역을 기반으로 예측 블록을 생성할 수 있다. 이는, 참조 픽쳐 인덱스와 모션 벡터를 이용하여 예측 블록을 생성하기 때문에 화면 간 예측에 포함될 수 있다. 인트라 예측은 현재 픽쳐의 정보를 이용하여 예측 블록을 생성하는 방법이고, 인터 예측은 이미 복호화된 다른 픽쳐의 정보를 이용하여 예측 블록을 생성하는 방법이며, 복합 예측은 인터 예측과 인트라 예측을 혼합하여 사용하는 방법이다. 복합 예측은, 하나의 코딩 블록을 구성하는 복수의 서브 영역 중 일부 영역은 인터 예측으로 부호화/복호화하고, 나머지 영역은 인트라 예측으로 부호화/복호화할 수 있다. 또는, 복합 예측은, 복수의 서브 영역에 대해서 1차적으로 인터 예측을 수행하고, 2차적으로 인트라 예측을 수행할 수 있다. 이 경우, 코딩 블록의 예측값은, 인터 예측에 따른 예측값과 인트라 예측에 따른 예측값을 가중 평균하여 유도될 수 있다. 하나의 코딩 블록을 구성하는 서브 영역의 개수는, 2개, 3개, 4개 또는 그 이상일 수 있고, 서브 영역의 형태는, 사각형, 삼각형, 기타 다각형일 수 있다.
도 4를 참조하면, CTU는 쿼드 트리, 바이너리 트리 또는 트리플 트리 형태로 분할 (파티셔닝)될 수 있다. 분할된 블록은 다시 쿼드 트리, 바이너리 트리 또는 트리플 트리 형태로 추가 분할될 수 있다. 현재 블록을 4개의 정방 형태 파티션으로 나누는 방법을 쿼드 트리 파티셔닝이라고 부르고, 현재 블록을 2개의 정방 또는 비정방 형태 파티션으로 나누는 방법을 바이너리 트리 파티셔닝이라고 부르며, 현재 블록을 3개의 파티션으로 나누는 방법을 바이너리 트리 파티셔닝이라고 정의한다.
수직 방향으로 바이너리 파티셔닝(도 4의 SPLIT_BT_VER)을 수직 바이너리 트리 파티셔닝이라고 부르며, 수평 방향으로 바이너리 트리 파티셔닝 (도 4의 SPLIT_BT_HOR)을 수평 바이너리 트리 파티셔닝이라고 정의한다.
수직 방향으로 트리플 파티셔닝 (도 4의 SPLIT_TT_VER)을 수직 트리플 트리 파티셔닝이라고 부르며, 수평 방향으로 트리플 트리 파티셔닝 (도 4의 SPLIT_TT_HOR)을 수평 트리플 트리 파티셔닝이라고 정의한다.
분할 횟수를 파티셔닝 뎁스(partitioning depth)라고 부르며, 시퀀스, 픽쳐, 서브 픽쳐, 슬라이스 또는 타일 별로 파티셔닝 뎁스의 최대치를 서로 다르게 설정할 수도 있으며, 파티셔닝 트리 형태(쿼드 트리/바이너리 트리/트리플 트리)에 따라 서로 다른 파티셔닝 뎁스를 가지도록 설정할 수 있으며, 이를 나타내는 신택스를 시그날링할 수도 있다.
쿼드 트리 파티션닝, 바이너리 트리 파니셔닝 또는 트리플 트리 파티셔닝과 같은 방법으로, 분할된 코딩 유닛을 추가로 분할하여 리프 노드(leaf node)의 코딩 유닛을 구성하거나, 추가 분할 없이 리프 노드(leaf node)의 코딩 유닛을 구성할 수도 있다.
도 5를 참조하면, 하나의 CTU를 계층적으로 분할하여 코딩 유닛을 설정할 수 있으며, 바이너리 트리 파티셔닝, 쿼드 트리 파티셔닝/트리플 트리 파티셔닝 중 적어도 어느 하나를 이용하여 코딩 유닛을 분할할 수 있다. 이와 같은 방법을 멀티 트리 파티셔닝(Multi tree partitioning)이라고 정의한다.
파티셔닝 뎁스가 k인 임의의 코딩 유닛을 분할하여 생성된 코딩 유닛을 하위 코딩 유닛이라 하며, 파티셔닝 뎁스는 (k+1)이 된다. 파티셔닝 뎁스 (k+1)인 하위 코딩 유닛을 포함하고 있는 파티셔닝 뎁스 k인 코딩 유닛을 상위 코딩 유닛이라 한다.
상위 코딩 유닛의 파티셔닝 타입 및/또는 현재 코딩 유닛의 주변에 있는 코딩 유닛의 파티셔닝 타입에 따라 현재 코딩 유닛의 파티셔닝 타입이 제한될 수도 있다.
여기서, 파티셔닝 타입은 바이너리 트리 파티셔닝, 쿼드 트리 파티셔닝/트리플 트리 파티셔닝 중 어느 파티셔닝을 사용했는지를 알려주는 지시자를 나타낸다.
도 6은 본 발명이 적용되는 일실시예로서, 현재 블록을 복원하는 과정을 개략적으로 도시한 것이다.
도 6을 참조하면, 부호화/복호화 장치에 기-정의된 예측 모드를 기반으로 현재 블록의 예측 블록을 생성할 수 있다(S600).
비디오 부호화/복호화에서 예측 영상은 복수 개의 방법으로 생성할 수 있으며, 예측 영상을 생성하는 방법을 예측 모드라고 한다. 예측 모드는 인트라 예측 모드, 인터 예측 모드, 현재 픽쳐 레퍼런스 부호화 모드 또는 결합 부호화 모드(combined prediction) 등으로 구성될 수 있다.
인터 예측 모드는 이전 픽쳐의 정보를 이용하여 현재 블록의 예측 블록(예측 영상)을 생성하는 예측 모드라고 하고, 인트라 예측 모드는 현재 블록과 이웃한 샘플을 이용하여 예측 블록을 생성하는 예측 모드라 한다. 현재 픽쳐의 이미 복원된 영상을 이용하여 예측 블록을 생성할 수도 있으며, 이를 현재 픽쳐 레퍼런스 모드 또는 인트라 블록 카피 모드라고 정의한다. 인터 예측 모드, 인트라 예측 모드 또는 현재 픽쳐 레퍼런스 모드 중 적어도 2개 이상의 예측 모드를 사용하여 예측 블록을 생성할 수도 있으며, 이를 결합 예측 모드(Combined prediction mode)이라고 정의한다.
인트라 예측 모드에 대해서는 도 13 내지 도 24를 참조하여 자세히 살펴보도록 한다. 인터 예측 모드에 대해서는 도 7 내지 도 12를 참조하여 자세히 살펴보도록 한다.
도 6을 참조하면, 현재 블록의 잔차 블록을 생성할 수 있다(S610).
부호화 장치는, 현재 블록의 원본 블록과 예측 블록 간의 차분을 통해 잔차 블록을 생성할 수 있다. 잔차 블록의 잔차 데이터(residual data)에 변환 또는 양자화 중 적어도 하나를 수행하여 잔차 계수를 생성하고, 생성된 잔차 계수는 부호화될 수 있다. 역으로, 복호화 장치는, 비트스트림으로부터 부호화된 잔차 계수를 복호화하고, 복호화된 잔차 계수에 역양자화 또는 역변환 중 적어도 하나를 수행하여 잔차 블록을 복원할 수 있다.
여기서, 변환 또는 역변환은, 부호화/복호화 장치에 기-정의된 n개의 변환 타입 중 적어도 하나에 기초하여 수행될 수 있다. n은 1, 2, 3, 4, 또는 그 이상의 정수일 수 있다. 일예로, 변환 타입은, DCT-2, DCT-8, DST-7 또는 변환 스킵 모드 중 적어도 하나를 포함할 수 있다. 하나의 블록의 수직/수평 방향에 대해서 하나의 동일한 변환 타입만이 적용될 수도 있고, 수직/수평 방향 각각에 대해서 상이한 변환 타입이 적용될 수도 있다. 이를 위해, 하나의 동일한 변환 타입이 적용되는지 여부를 나타내는 플래그가 이용될 수 있다. 상기 플래그는 부호화 장치에서 시그날링될 수 있다.
현재 블록의 변환 타입은, 부호화 장치에서 명시적으로 시그날링되는 정보에 기초하여 결정되는 방법 또는 복호화 장치에서 묵시적으로 결정되는 방법 중 어느 하나를 선택적으로 이용하여 결정될 수 있다. 여기서, 선택은 변환 타입을 특정하는 정보가 명시적으로 시그날링되는지 여부를 나타내는 플래그에 기초하여 수행될 수 있다. 즉, 상기 플래그가 제1 값인 경우, 변환 타입을 특정하는 정보가 명시적으로 시그날링됨을 나타내고, 그렇지 않은 경우, 변환 타입이 묵시적으로 결정됨을 나타낼 수 있다. 상기 플래그는 시퀀스, 픽쳐, 슬라이스, CTU, CU 또는 TU 중 적어도 하나의 레벨에서 시그날링될 수 있다. 또는, 상기 플래그는, 소정의 부호화 파라미터에 기초하여 유도될 수 있다. 여기서, 부호화 파라미터는, 블록의 크기, 형태, 인트라 예측 모드 또는 성분 타입(e.g., 휘도, 색차) 중 적어도 하나를 의미할 수 있다. 블록의 크기는, 너비, 높이, 너비와 높이의 비, 너비와 높이의 곱, 너비와 높이의 합/차 등으로 표현될 수 있다. 일예로, 현재 블록의 크기가 소정의 문턱크기보다 큰 경우, 상기 플래그는 제1 값으로 유도되고, 그렇지 않은 경우, 상기 플래그는 제2 값으로 유도될 수 있다. 여기서, 현재 블록은 현재 블록에 대응하는 변환 블록을 의미하고, 크기는 너비와 높이 중 최대값 또는 최소값을 의미할 수 있다. 또한, 문턱크기는 부호화/복호화 장치에 기-약속된 값으로서, 16, 32, 64 또는 그 이상일 수 있다.
구체적으로, 상기 픞래그가 제1 값인 경우, 변환 타입은 부호화 장치에서 명시적으로 시그날링되는 정보(mts_idx) 또는 복호화 장치에 기-정의된 테이블 중 적어도 하나에 기초하여 결정될 수 있다. mts_idx는 수직/수평 방향의 변환 타입이 서로 동일한지 여부 또는 수직/수평 방향에 적용되는 변환 타입 중 적어도 하나를 특정할 수 있다. 상기 테이블은 다음 표 1과 같이 정의될 수 있다.
mts_idx 0 1 2 3 4
trTypeHor 0 1 2 1 2
trTypeVer 0 1 1 2 2
표 1에서 trTypeHor은 수평 방향의 변환 타입을, trTypeVer은 수직 방향의 변환 타입을 각각 의미할 수 있다. trTypeHor이 0인 경우, 이는 수평 방향의 변환 타입으로 DCT-2가 이용됨을 의미하고, trTypeHor이 1인 경우, 이는 수평 방향의 변환 타입으로 DSCT-7가 이용됨을 의미하고, trTypeHor이 3인 경우, 이는 수평 방향의 변환 타입으로 DCT-8가 이용됨을 의미할 수 있다. TrTypeVer도 trTypeHor와 동일하게 정의될 수 있다.
상기 플래그가 제2 값인 경우, 변환 타입은 전술한 부호화 파라미터에 기초하여 결정될 수 있다. 예를 들어, 현재 블록의 크기가 소정의 문턱값보다 큰 경우, 변환 타입은 제1 변환 타입(e.g., DST-7)으로 결정되고, 그렇지 않은 경우, 변환 타입은 제2 변환 타입(e.g., DCT-2)으로 결정될 수 있다.
여기서, 변환 타입은 수직 방향과 수평 방향에 대해서 각각 결정될 수도 있다. 즉, 현재 블록의 너비와 상기 문턱값 간의 비교를 통해 수평 방향의 변환 타입이 결정되고, 현재 블록의 높이와 상기 문턱값 간의 비교를 통해 수직 방향의 변환 타입이 결정될 수 있다. 상기 문턱값은, 0, 4, 8, 16, 32 또는 그 이상의 정수일 수 있다. 전술한 변환 및 역변환에 대해서는 도 45 및 도 46을 참조하여 살펴보기로 한다.
도 6을 참조하면, 예측 블록과 잔차 블록을 기반으로, 현재 블록을 복원할 수 있다(S620).
기-생성된 예측 블록과 잔차 블록을 가산하여 현재 블록을 복원할 수 있다. 복원된 현재 블록에 대해서 소정의 인-루프 필터가 적용될 수 있다. 인-루프 필터는, 디블록킹 필터, SAO(sample adaptive offset) 필터 또는 ALF(adaptive loop filter) 중 적어도 하나를 포함할 수 있으며, 도 47 및 도 48을 참조하여 살펴보기로 한다.
도 7 내지 도 16은 본 발명이 적용되는 일실시예로서, 인트라 예측 방법을 도시한 것이다.
도 7을 참조하면, 인트라 예측은 현재 블록 주변에 있는 이미 부호화/복호화된 경계 샘플을 사용하며, 이를 인트라 레퍼런스 샘플이라고 정의한다.
인트라 레퍼런스 샘플의 평균값을 예측 블록 전체 샘플의 값을 설정하거나 (DC 모드), 수평 방향 레퍼런스 샘플을 가중 예측하여 생성한 수평 방향 예측 샘플과 수직 방향 레퍼런스 샘플을 가중 예측하여 생성한 수직 방향 예측 샘플을 가중 예측하여 예측 샘플을 생성하거나(Planar 모드), 방향성 인트라 예측 모드 등을 이용하여 인트라 예측을 수행할 수 있다.
도 8(a)를 참조하면, 왼쪽 그림과 같이 33개의 방향성 모드 및 2개의 비방향성 모드(즉, Planar mode 및 DC mode)를사용하여 인트라 예측을 수행할 수 있고, 도 8(b)를 참조하면 65개의 방향성 모드 및 2개의 비방향성 모드를 사용할 수도 있다. 방향성 인트라 예측을 사용하는 경우에는 인트라 예측 모드의 방향성을 고려하여 인트라 레퍼런스 샘플(참조 샘플)을 생성하고, 이를 이용하여 인트라 예측을 수행할 수 있다.
코딩 유닛의 좌측에 있는 인트라 레퍼런스 샘플을 좌측 인트라 레퍼런스 샘플이라 하고, 코딩 유닛의 상측에 있는 인트라 레퍼런스 샘플을 상측 인트라 레퍼런스 샘플이라 한다.
방향성 인트라 예측을 수행하는 경우에는 표 2와 같이 인트라 예측 모드에 따라 예측 방향(또는 예측 각도)을 나타내는 파라미터인 인트라 방향 파라미터(intraPredAng)를 설정할 수 있다. 표 2는 35개 인트라 예측 모드 중 2 내지 34의 값을 가지는 방향성 모드를 기반으로 하는 일예에 불과하다. 방향성 모드의 예측 방향(또는 예측 각도)은 더 세분화되어 33개보다 많은 개수의 방향성 모드가 이용될 수 있음은 물론이다.
PredModeIntra 1 2 3 4 5 6 7
IntraPredAng - 32 26 21 17 13 9
PredModeIntra 8 9 10 11 12 13 14
IntraPredAng 5 2 0 -2 -5 -9 -13
PredModeIntra 15 16 17 18 19 20 21
IntraPredAng -17 -21 -26 -32 -26 -21 -17
PredModeIntra 22 23 24 25 26 27 28
IntraPredAng -13 -9 -5 -2 0 2 5
PredModeIntra 29 30 31 32 33 34
IntraPredAng 9 13 17 21 26 32
intraPredAng이 음수인 경우(예를 들어, 인트라 예측 모드 인덱스가 11과 25 사이인 경우)에는 도 9와 같이 현재 블록에 좌측 인트라 레퍼런스 샘플과 상측 인트라 레퍼런스 샘플을 인트라 예측 모드의 각도에 따라 1D로 구성된 일차원 레퍼런스 샘플(Ref_1D)로 재구성할 수 있다.
인트라 예측 모드 인덱스가 11과 18 사이인 경우에는 도 10과 같이 현재 블록의 우상단에 위치한 인트라 레퍼런스 샘플부터 좌하단에 위치한 인트라 레퍼런스 샘플까지 반시계 방향으로 일차원 레퍼런스 샘플을 생성할 수 있다. 그 외의 모드에서는 상단 인트라 레퍼런스 샘플 또는 좌측 인트라 레퍼런스 샘플만 이용하여 일차원 레퍼런스 샘플을 생성할 수 있다.
인트라 예측 모드 인덱스가 19 와 25 사이인 경우에는 도 11과 같이 현재 블록의 좌하단에 위치한 인트라 레퍼런스 샘플부터 우상단에 위치한 인트라 레퍼런스 샘플까지 시계 방향으로 일차원 레퍼런스 샘플을 생성할 수 있다.
참조 샘플 결정 인덱스(iIdx)와 iIdx에 기초하여 결정되는 적어도 하나의 참조 샘플에 적용되는 가중치 관련 파라미터(ifact)를 수학식 1과 같이 유도할 수 있다. iIdx와 ifact는 방향성 인트라 예측 모드의 기울기에 따라 가변적으로 결정되며, iIdx에 의해 특정되는 참조 샘플은 정수 펠(integer pel)에 해당할 수 있다.
[수학식 1]
iIdx = (y+1) * Pang / 32
ifact = [ (y+1) * Pang ] & 31
예측 샘플 별로 적어도 하나 이상의 일차원 레퍼런스 샘플을 특정하여 예측 영상을 유도 할 수도 있다. 예를 들어, 방향성 모드의 기울기 값을 고려하여 예측 샘플 생성에 사용할 수 있는 일차원 레퍼런스 샘플의 위치를 특정할 수 있다. 예측 샘플 별로 상이한 방향성 모드를 가질 수도 있다. 하나의 예측 블록에 대해 복수의 인트라 예측 모드가 이용될 수도 있다. 복수의 인트라 예측 모드는 복수의 비방향성 모드의 조합으로 표현될 수도 있고, 하나의 비방향성 모드와 적어도 하나의 방향성 모드의 조합으로 표현될 수도 있고, 또는 복수의 방향성 모드의 조합으로 표현될 수도 있다. 하나의 예측 블록 내의 소정의 샘플 그룹 별로 상이한 인트라 예측 모드가 적용될 수 있다. 소정의 샘플 그룹은 적어도 하나의 샘플로 구성될 수 있다. 샘플 그룹의 개수는 현재 예측 블록의 크기/샘플 개수에 따라 가변적으로 결정될 수도 있고, 예측 블록의 크기/샘플 개수와는 독립적으로 부호화기/복호화기에 기-설정된 고정된 개수일 수도 있다.
구체적으로 예를 들어, 참조 샘플 결정 인덱스(iIdx)를 이용하여 일차원 레퍼런스 샘플의 위치를 특정할 수 있다.
인트라 예측 모드의 기울기에 따라 하나의 일차원 레퍼런스 샘플만으로는 인트라 예측 모드의 기울기를 표현할 수 없을 때는 수학식 2와 같이 인접한 일차원 레퍼런스 샘플을 보간하여 제1 예측 영상을 생성할 수 있다. 인트라 예측 모드의 기울기/각도에 따른 angular line이 정수 펠에 위치한 레퍼런스 샘플을 지나가지 않는 경우, 해당 angular line에 좌/우 또는 상/하에 인접한 레퍼런스 샘플을 보간하여 제1 예측 영상을 생성할 수 있다. 이때 이용되는 보간 필터의 필터 계수는 ifact에 기초하여 결정될 수 있다. 예를 들어, 보간 필터의 필터 계수는 angular line 상에 위치한 소수 펠과 상기 정수 펠에 위치한 레퍼런스 샘플 간의 거리에 기초하여 유도될 수 있다.
[수학식 2]
P(x,y) = ((32-ifact)/32) * Ref_1D(x+iIdx+1) + (ifact/32) * Ref_1D(x+iIdx+2)
하나의 일차원 레퍼런스 샘플만으로 인트라 예측 모드의 기울기를 표현할 수 있을 때(즉, ifact 값이 0일 때)는 수학식 3과 같이 제1 예측 영상을 생성할 수 있다.
[수학식 3]
P(x,y) = Ref_1D(x+iIdx+1)
방향성 모드의 예측 각도는 도 12와 같이 45 내지 -135 사이로 설정될 수 있다.
비정방 형태의 코딩 유닛에서 인트라 예측 모드를 수행하는 경우, 기-정의된 예측 각도 때문에 현재 샘플과 가까운 인트라 레퍼런스 샘플 대신 현재 샘플과 거리가 먼 인트라 레퍼런스 샘플에서 현재 샘플을 예측하는 단점이 발생할 수 있다.
예를 들어, 도 13의 왼쪽 그림과 같이 코딩 유닛의 너비가 코딩 유닛의 높이보다 큰 코딩 유닛(이하, 수평 방향 코딩 유닛)에서는 거리가 가까운 샘플 T 대신에 거리가 먼 L을 이용하여 인트라 예측을 수행할 수 있다. 또 다른 예를 들어, 도 13의 오른쪽 그림과 같이 코딩 유닛의 높이가 코딩 유닛의 너비보다 큰 코딩 유닛(이하, 수직 방향 코딩 유닛)에서는 거리가 가까운 샘플 L 대신에 거리가 먼 샘플 T을 이용하여 인트라 예측을 수행할 수 있다.
비정방 형태의 코딩 유닛에서는 기-정의된 예측 각도보다 더 넓은 예측 각도에서 인트라 예측을 수행할 수도 있으며, 이를 와이드 앵글 인트라 예측 모드라고 정의한다.
와이드 앵글 인트라 예측 모드는 (45+α) 내지 (-135-β)의 예측 각도를 가질 수 있으며, 기존 인트라 예측 모드에서 사용된 각도를 벗어나는 예측 각도를 와이드 앵글 각도라고 정의한다.
도 13의 좌측 그림에서, 너비가 높이보다 큰 코딩 유닛에 있는 샘플 A는 와이드 앵글 인트라 예측 모드를 사용하여 인트라 레퍼런스 샘플 T를 이용하여 예측할 수 있다.
도 13의 우측 그림에서, 너비가 높이보다 작은 코딩 유닛에 있는 샘플 A는 와이드 앵글 인트라 예측 모드를 사용하여 인트라 레퍼런스 샘플 L을 이용하여 예측할 수 있다.
기존 인트라 예측 모드 N개에 M개의 와이드 앵글 각도를 더해 (N+M)개의 인트라 예측 모드가 정의될 수 있다. 구체적으로 예를 들어, 표 3과 같이 67개 인트라 모드에 28개 와이드 앵글 각도를 더해 총 95개 인트라 예측 모드가 정의될 수 있다.
현재 블록이 이용할 수 있는 인트라 예측 모드는 현재 블록의 형태에 따라 결정될 수 있다. 일 예로, 현재 블록의 크기, 종횡비(예컨대, 너비와 높이의 비율), 레퍼런스 라인 인덱스 중 적어도 하나에 기초하여, 95개의 방향성 인트라 예측 모드 중 65개의 방향성 인트라 예측 모드를 선택할 수 있다.
predModeIntra -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 2 3 4
intraPredAngle 512 341 256 171 128 102 86 73 64 57 51 45 39 35 32 29 26
predModeIntra 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
intraPredAngle 23 20 18 16 14 12 10 8 6 4 3 2 1 0 -1 -2 -3
predModeIntra 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
intraPredAngle -4 -6 -8 -10 -12 -14 -16 -18 -20 -23 -26 -29 -32 -29 -26 -23 -20
predModeIntra 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
intraPredAngle -18 -16 -14 -12 -10 -8 -6 -4 -3 -2 -1 0 1 2 3 4 6
predModeIntra 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
intraPredAngle 8 10 12 14 16 18 20 23 26 29 32 35 39 45 51 57 64
predModeIntra 73 74 75 76 77 78 79 80
intraPredAngle 73 86 102 128 171 256 341 512
표 3에 나타난 인트라 예측 모드의 각도는, 현재 블록의 형태, 레퍼런스 라인 인덱스 중 적어도 하나에 기초하여 적응적으로 결정될 수 있다. 일 예로, Mode 15의 intraPredAngle은 현재 블록이 비정방형인 경우보다 현재 블록이 정방형인 경우에 더 큰 값을 갖도록 설정될 수 있다. 또는, Mode 75의 intraPredAngle은 인접 레퍼런스 라인이 선택된 경우보다 비인접 레퍼런스 라인이 선택된 경우 더 큰 값을 갖도록 설정될 수 있다.
와이드 앵글 인트라 예측 모드를 사용하는 경우 도 14와 같이 상측 인트라 레퍼런스 샘플의 길이를 (2W+1)로 설정하고, 좌측 인트라 레퍼런스 샘플의 길이를 (2H+1)로 설정할 수 있다.
와이드 앵글 인트라 예측을 사용하는 경우에 와이드 앵글 인트라 예측 모드의 인트라 예측 모드를 부호화하는 경우에는 인트라 예측 모드의 개수가 많아져서 부호화 효율이 낮아질 수 있다. 와이드 앵글 인트라 예측 모드는 와이드 앵글 인트라에서 사용되지 않는 기존 인트라 예측 모드로 대체하여 부호화할 수 있으며, 대체되는 예측 모드를 와이드 앵글 대체 모드라고 한다. 와이드 앵글 대체 모드는 와이드 앵글 인트라 예측 모드와 반대 방향인 인트라 예측 모드일 수 있다.
구체적으로 예를 들어, 도 15와 같이 35개 인트라 예측을 사용하는 경우 와이드 앵글 인트라 예측 모드 35는 와이드 앵글 대체 모드인 인트라 예측 모드 2로 부호화할 수 있고, 와이드 앵글 인트라 예측 모드 36은 와이드 앵글 대체 모드인 인트라 예측 모드 3으로 부호화할 수 있다. 따라서, 복호화 장치에서는, 현재 블록이 비정방형인 경우, 기-유도된 인트라 예측 모드를 와이드 앵글 대체 모드로 대체할 수 있다. 이를 위해, 기-유도된 인트라 예측 모드에 소정의 오프셋을 가산하거나 감산하여 와이드 앵글 대체 모드를 결정하고, 이를 현재 블록의 최종 인트라 예측 모드로 이용할 수 있다.코딩 블록의 형태 또는 코딩 블록의 높이와 너비의 비(ratio) 중 적어도 하나에 따라, 대체하는 모드의 종류와 개수를 다르게 설정할 수 있다. 구체적으로 예를 들어, 표 4는 코딩 블록의 너비와 높이의 비에 따라 사용되는 인트라 예측 모드를 나타낸다.
Aspect ratio Replaced intra prediction modes
W / H == 16 Modes 12, 13,14,15
W / H == 8 Modes 12, 13
W / H == 4 Modes 2,3,4,5,6,7,8,9,10,11
W / H == 2 Modes 2,3,4,5,6,7,
W / H == 1 None
W / H == 1/2 Modes 61,62,63,64,65,66
W / H == 1/4 Mode 57,58,59,60,61,62,63,64,65,66
W / H == 1/8 Modes 55, 56
W / H == 1/16 Modes 53, 54, 55, 56
인트라 예측 영상을 생성 한 후, 샘플 포지션에 기초하여 각 샘플 별로 인트라 예측 영상을 업데이트 할수 있으며, 이를 샘플 포지션 기반 인트라 가중 예측 방법 (Position dependent prediction combination, PDPC )라고 정의한다.
도 16을 참조하면, 복수 개의 인트라 레퍼런스 라인 중 적어도 하나를 선택적으로 이용하여 인트라 예측을 수행할 수도 있으며, 이를 멀티 라인 인트라 예측 방법이라고 한다.
인접한 인트라 페러런스 라인과 비인접 인트라 레퍼런스 라인으로 구성된 복수개의 인트라 레퍼런스 라인 중 어느 하나를 선택해서 인트라 예측을 수행할 수 있다. 비인접 인트라 레퍼런스 라인은 제1 비인접 인트라 레퍼런스 라인(비인접 레퍼런스 라인 인덱스 1), 제2 비인접 인트라 레퍼런스 라인(비인접 레퍼런스 라인 인덱스 2) 또는 제3 비인접 인트라 레퍼런스 라인(비인접 레퍼런스 라인 인덱스 3) 중 적어도 하나로 구성될 수 있다. 전술한 비인접 인트라 레퍼런스 라인 중 일부만 사용할 수도 있다. 일예로, 비인접 인트라 레퍼런스 라인은, 제1 비인접 인트라 레퍼런스 라인과 제2 비인접 인트라 레퍼런스 라인만으로 구성될 수도 있고, 제1 비인접 인트라 레퍼런스 라인과 제3 비인접 인트라 레퍼런스 라인만으로 구성될 수도 있다.
인트라 예측에 사용된 레퍼런스 라인을 특정하는 신택스인 인트라 레퍼런스 라인 인덱스(intra_luma_ref_idx)를 코딩 유닛 단위로 시그날링할 수 있다.
구체적으로 인접 인트라 레퍼런스 라인, 제1 비인접 인트라 레퍼런스 라인, 제3 비인접 인트라 레퍼런스 라인을 사용하는 경우에 다음 표 5와 같이 intra_luma_ref_idx를 정의할 수도 있다.
intra_luma_ref_idx[ x0 ][ y0 ] 인트라 예측에 사용된 레퍼런스 라인
0 인접 인트라 레퍼런스 라인
1 제 1 비인접 레퍼런스 라인
2 제 3 비인접 레퍼런스 라인
비인접 인트라 레퍼런스 라인을 사용하는 경우에는 비방향성 인트라 예측 모드를 사용하지 않도록 설정할 수도 있다. 즉, 비인접 인트라 레퍼런스 라인을 사용하는 경우에는 DC 모드 또는 플래너 모드(Planar mode)를 사용하지 않도록 제한할 수도 있다.
비인접 인트라 레퍼런스 라인에 속한 샘플의 개수는 인접 인트라 페러런스 라인의 샘플 개수보다 크게 설정할 수 있다. 또한, 제i 비인접 인트라 레퍼런스 라인의 샘플 개수보다 제(i+1) 비인접 인트라 레퍼런스 라인의 샘플 개수가 더 많게 설정할 수도 있다. 제i 비인접 인트라 레퍼런스 라인의 상측 샘플 개수와 제(i-1) 비인접 인트라 레퍼런스 라인의 상측 샘플 개수의 차이는 레퍼런스 샘플 개수 오프셋 offsetX[i]로 나타낼 수 있다.
offsetX[1]은 제1 비인접 인트라 레퍼런스 라인의 상측 샘플 개수와 인접 인트라 레퍼런스 라인의 상측 샘플 개수의 차분 값을 나타낸다. 제i 비인접 인트라 레퍼런스 라인의 좌측샘플 개수와 제(i-1) 비인접 인트라 레퍼런스 라인의 좌측 샘플 개수의 차이는 레퍼런스 샘플 개수 오프셋 offsetY[i]로 나타낼 수 있다. offsetY[1]은 제1 비인접 인트라 레퍼런스 라인의 좌측 샘플 개수와 인접 인트라 레퍼런스 라인의 좌측 샘플 개수의 차분 값을 나타낸다.
인트라 레퍼런스 라인 인덱스가 i인 비인접 인트라 레퍼런스 라인은 상측 비인접 레퍼런스 라인(refW + offsetX[i])과 좌측 비인접 레퍼런스 라인(refH + offsetY[i]) 및 좌상단에 위치한 하나 또는 그 이상의 샘플(k)로 구성될 수 있으며, 비인접 인트라 레퍼런스 라인에 속한 샘플의 개수는 (refW + refH + offsetX[i] + offsetY[i] + k)일 수 있다. 여기서, refW와 refH는 다음 수학식 4와 같이 정의될 수 있다.
[수학식 4]
refW = 2 * nTbW
refH = 2 * nTbH
수학식 4에서 nTbW는 코딩 유닛의 너비를 나타내고, nTbH는 코딩 유닛의 높이를 나타내며, whRatio는 다음 수학식 5와 같이 정의될 수 있다. 여기서, 코딩 유닛은 코딩 유닛에 대응하는 변환 유닛으로 해석될 수도 있다.
[수학식 5]
whRatio = log2(nTbW/nTbH)
멀티 라인 인트라 예측 부호화 방법에서는 비인접 인트라 레퍼런스 라인을 사용하는 경우에는 와이드 앵글 인트라 모드는 사용하지 않도록 설정할 수도 있다. 또는 현재 코딩 유닛의 MPM(most probable mode)이 와이드 앵글 인트라 모드이면 멀티 라인 인트라 예측 부호화 방법을 사용하지 않도록 설정할 수도 있다.
이 경우 인트라 레퍼런스 라인 인덱스가 i인 비인접 인트라 레퍼런스 라인은 상측 비인접 레퍼런스 라인(W + H + offsetX[i])와 좌측 비인접 레퍼런스 라인(H + W + offsetY[i]) 그리고 하나 또는 그 이상의 좌상단 샘플(k)로 구성될 수 있으며, 비인접 인트라 레퍼런스 라인에 속한 샘플의 개수는 (2W + 2H + offsetX[i] + offsetY[i] + k) 로 구성될 수 있으며, whRatio 값에 따라서 offsetX[i]와 offsetY[i] 값이 달라질 수 있다.
예를 들어, whRatio 값이 1 보다 큰 경우에는 offsetX[i] 값을 1, offsetY[i] 값을 0 으로 설정할 수 있고, whRatio 값이 1 보다 작은 경우에는 offsetX[i] 값을 0, offsetY[i] 값을 1로 설정할 수도 있다.
도 17은 본 발명이 적용되는 일실시예로서, 인터 예측 방법을 도시한 것이다.
이전 픽쳐의 정보를 이용하여 현재 픽쳐에 있는 블록의 예측 블록(예측 영상)을 생성하는 방법을 인터 예측 모드라고 한다. 현재 블록의 이전 픽쳐 내에 있는 특정 블록으로부터 예측 블록을 생성할 수도 있다. 부호화 단계에서 이전 픽쳐 내 블록 중 복원 에러가 가장 작은 블록을 콜 블록(collocated block)을 중심으로 탐색하여 선택할 수 있으며, 현재 블록의 좌상단 샘플과 선택된 블록의 좌상단 샘플 사이의 x축 차분 및 y축 차분을 모션 벡터(motion vector)라 정의하고, 이를 비트스트림에 전송하여 시그날링할 수 있다. 모션 벡터가 특정하는 참조 픽쳐의 특정 블록에서 인터폴레이션 등을 통해 생성한 블록을 모션 보상 예측 블록(motion compensated predictor block)이라 한다.
콜 블록은 도 17과 같이 현재 블록과 좌상단 샘플의 위치 및 크기가 같은 해당 픽쳐의 블록을 나타낸다. 해당 픽쳐는 참조 픽쳐 레퍼런스와 같은 신택스로부터 특정될 수 있다.
인터 예측 모드에서는 오브젝트의 모션을 고려하여 예측 블록을 생성할 수 있다. 예를 들어, 이전 픽쳐에 있는 오브젝트가 현재 픽쳐에서 어느 방향으로 어느 정도 움직였는지 알면 현재 블록에서 모션을 고려한 블록을 차분하여 예측 블록(예측 영상)을 생성할 수 있으며, 이를 모션 예측 블록이라고 정의한다.
현재 블록에서 모션 예측 블록 또는 해당 예측 블록을 차분하여 잔차 블록을 생성할 수 있다. 오브젝트에 모션이 발생하면, 해당 예측 블록보다 모션 예측 블록을 사용하면 잔차 블록의 에너지가 작아져서 압축 성능이 좋아질 수 있다. 이와 같이 모션 예측 블록을 이용하는 방법을 모션 보상 예측이라고 부르며, 대부분의 인터 예측에서는 모션 보상 예측을 사용한다.
이전 픽쳐에 있는 오브젝트가 현재 픽쳐에서 어느 방향으로, 어느 정도 움직였는지를 나타내는 값을 모션 벡터라고 한다. 모션 벡터는 시퀀스 단위 또는 타일 그룹 단위 또는 블록 단위로 서로 다른 화소 정밀도를 갖는 모션벡터를 사용할 수 있다. 예를 들어, 특정 블록에서 모션 벡터의 화소 정밀도는 octor-pel, Quarter-Pel, Half-Pel, Integer pel, 4-Integer pel 중 적어도 어느 하나일 수 있다.
인터 예측 모드는 translaton 모션을 이용한 인터 예측 방법과 affine 모션을 이용한 affine 인터 예측 방법이 선택적으로 사용될 수도 있다.
도 18 내지 도 30은 본 발명이 적용되는 일실시예로서, 어파인 인터 예측 방법을 도시한 것이다.
비디오에서 특정 물체(object)의 모션이 선형적으로 나타나지 않는 경우가 많이 발생한다. 예를 들어, 도 18과 같이 카메라 줌인 (Zoom-in), 줌 아웃(Zoom-out), 회전(roation), 임의 형태로 변환을 가능하게 하는 affine 변환 등의 affine motion이 사용된 영상에서는 오브젝트의 모션을 translation 모션 벡터만 사용하는 경우 물체의 모션을 효과적으로 표현할 수 없으며, 부호화 성능이 낮아질 수 있다.
어파인 모션은 다음 수학식 6과 같이 표현할 수 있다.
Figure PCTKR2020004136-appb-M000001
어파인 모션을 총 6개의 파라미터를 사용하여 표현하는 것은 복잡한 모션이 있는 영상에 효과적이지만, 어파인 모션 파라미터를 부호화하는데 사용하는 비트가 많아서 부호화 효율이 떨어질 수도 있다.
이에, 4개의 파라미터로 어파인 모션을 간략화하여 표현할 수 있으며, 이를 4-파라미터 어파인 모션 모델이라고 정의한다. 수학식 7은 4개의 파라미터로 어파인 모션을 표현한 것이다.
Figure PCTKR2020004136-appb-M000002
4-파라미터 어파인 모션 모델은 현재 블록의 두 컨트롤 포인트에서의 모션 벡터를 포함할 수 있다. 컨트롤 포인트는 현재 블록의 좌상단 코너, 우상단 코너 또는 좌하단 코너 중 적어도 하나를 포함할 수 있다. 일예로, 4-파라미터 어파인 모션 모델은 도 19의 좌측 그림과 같이 코딩 유닛의 좌상단 샘플 (x0,y0)에서의 모션 벡터 sv0 와 코딩 유닛의 우상단 샘플 (x1,y1)에서의 모션 벡터 sv1에 의해서 결정될 수 있으며, sv0와 sv1을 어파인 시드 벡터라고 정의한다. 이하, 좌상단에 위치한 어파인 시드 벡터 sv0를 제1 어파인 시드 벡터라 가정하고, 우상단에 위치한 어파인 시드 벡터 sv1를 제2 어파인 시드 벡터라 가정하기로 한다. 4파라미터 어파인 모션 모델에서 제1 및 제2 어파인 시드 벡터 중 하나를 좌하단에 위치한 어파인 시드 벡터로 교체하여 사용하는 것도 가능하다.
6-파라미터 어파인 모션 모델은 도 19의 우측 그림과 같이 4-파라미터 어파인 모션 모델에 잔여 컨트롤 포인트(예컨대, 좌하단에 샘플 (x2,y2))의 모션 벡터 sv2가 추가된 어파인 모션 모델이다. 이하, 좌상단에 위치한 어파인 시드 벡터 sv0를 제1 어파인 시드 벡터라 가정하고, 우상단에 위치한 어파인 시드 벡터 sv1를 제2 어파인 시드 벡터라 가정하고, 좌하단에 위치한 어파인 시드 벡터 sv2를 제3 어파인 시드 벡터라 가정한다.
어파인 모션을 표현하기 위한 파라미터의 개수에 관한 정보가 비트스트림을 통해 시그날링될 수 있다. 예컨대, 6-파라미터의 사용 여부를 나타내는 플래그, 4-파라미터의 사용 여부를 나타내는 플래그가 비디오 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 타일, 코딩 유닛 또는 CTU 중 적어도 하나의 단위에서 부호화될 수 있다. 이에 따라, 비디오 시퀀스, 픽쳐, 슬라이스, 타일 그룹, 코딩 유닛 또는 CTU 단위로 4-파라미터 어파인 모션 모델 또는 6-파라미터 어파인 모션 모델 중 어느 하나를 선택적으로 사용할 수도 있다.
어파인 시드 벡터를 이용하여 도 20과 같이 코딩 유닛의 서브 블록 별로 모션 벡터를 유도할 수 있으며, 이를 어파인 서브 블록 벡터라고 정의한다.
어파인 서브 블록 벡터는 다음 수학식 8과 같이 유도할 수도 있다. 여기서 서브 블록의 기준 샘플 위치(x,y)는 블록의 코너에 위치한 샘플(예컨대, 좌상단 샘플)일 수도 있고, x축 또는 y축 중 적어도 하나가 중앙인 샘플(예컨대, 중앙 샘플)일 수도 있다.
Figure PCTKR2020004136-appb-M000003
어파인 서브 블록 벡터를 이용하여 코딩 유닛 단위 내지 코딩 유닛 내 서브 블록 단위로 모션 보상을 수행할 수 있으며, 이를 어파인 인터 예측 모드라고 정의한다. 수학식 8에서 (x1-x0)는 코딩 유닛의 너비와 유닛의 너비 w와 같은 값이거나, w/2 또는 w/4로 설정할 수도 있다.
현재 코딩 유닛의 주변 블록의 어파인 모션 벡터(어파인 서브 블록 벡터 내지 어파인 시드 벡터)를 이용하여 현재 코딩 유닛의 어파인 시드 벡터 및 참조 픽쳐 리스트를 유도할 수 있으며, 이를 어파인 머지 모드라고 부른다.
어파인 머지 모드는 현재 코딩 유닛의 주변 블록 (예를 들어, 도 21의 A, B, C, D, E) 중 적어도 어느 하나가 어파인 모드(어파인 인터 예측 모드 내지 어파인 머지 모드)로 부호화된 경우에 주변 블록의 어파인 모션 벡터로부터 현재 블록의 어파인 시드 벡터를 유도할 수 있다. 주변 블록 중 어파인 모드로 부호화된 블록을 어파인 주변 블록이라고 부른다.
주변 블록의 탐색 순서는 A --> B --> C --> D --> E와 같이 기-정의된 순서를 따르며, 탐색 순서 중 가장 첫번째 어파인 주변 블록에서 현재 블록의 어파인 시드 벡터를 유도할 수 있다. 또는 주변 블록 중 어느 하나의 어파인 주변 블록을 선택하고, 선택된 주변 블록의 인덱스를 부호화할 수도 있다.
또는 현재 코딩 유닛의 주변 블록 A0, A1, B0, B1, B2 에서 최대 2개의 어파인 시드 벡터를 유도할 수도 있다. 일 예로, 도 22의 주변 블록 중 {A0, A1} 중 어느 하나의 주변 블록에서 어파인 시드 벡터를 유도하고, {B0, B1, B2} 중에서 또 하나의 어파인 시드 벡터를 유도할 수 있으며, 이를 어파인 머지 모드라고 한다.
도 23과 같이 어파인 주변 블록의 시드 벡터 nv0 = (nv0x, nv0y) 및 nv1 = (nv1x, nv1y)에서 제3 시드 벡터 nv2= (nv2x, nv2y)를 유도할 수 있다.
다음 수학식 9와 같이 어파인 주변 블록의 제3 시드 벡터를 유도할 수 있다.
Figure PCTKR2020004136-appb-M000004
다음 수학식 10 및 11과 같이 주변 블록의 제1 어파인 시드 벡터, 제2 어파인 시드 벡터 및 제3 시드 벡터를 이용하여 현재 블록의 시드 벡터를 유도할 수 있다.
Figure PCTKR2020004136-appb-M000005
Figure PCTKR2020004136-appb-M000006
또는, 주변 블록의 제1 어파인 시드 벡터, 제2 어파인 시드 벡터 및 제3 시드 벡터 중 2개를 이용하여 현재 블록의 시드 벡터를 유도할 수도 있다.
주변 블록의 제1 시드 벡터, 제2 시드 벡터 또는 제3 시드 벡터 중 적어도 하나를 어파인 주변 블록의 서브 블록 중 최하단에 위치한 서브 블록의 모션 벡터로 치환할 수 있다. 일 예로, 도 24와 같이 어파인 주변 블록 중 좌하단 서브 블록 또는 하단 중앙 서브 블록 (이하, 제4 어파인 서브 블록)과 어파인 주변 블록 중 우하단 서브 블록 또는 하단 중앙 서브 블록(이하, 제5 어파인 서브 블록)을 기준으로 특정 샘플 위치를 특정할 수 있고, 특정 샘플 위치를 이용하여 어파인 시드 벡터를 유도할 수도 있다. 이 특정 샘플 위치를 어파인 기준 샘플의 위치라고 부른다.
제4 어파인 서브 블록 및 제5 어파인 서브 블록의 위치는 대상 블록이 현재 블록의 상위 CTU에 존재하는지 여부에 따라 서로 다르게 설정할 수도 있다. 예를 들어, 대상 블록이 현재 블록의 상위 CTU(현재 블록이 속한 CTU의 상측 CTU)에 존재하면, 도 25와 같이 제4 어파인 서브 블록은 하단 중앙 서브 블록으로 설정하고, 제5 어파인 서브 블록은 우하단 서브 블록으로 설정할 수도 있다. 이 때 제4 어파인 기준 샘플(제4 어파인 서브 블록의 기준 샘플)과 제5 어파인 기준 샘플(제5 어파인 서브 블록의 기준 샘플)의 차이는 멱급수(2n)이 되도록 설정할 수 있다. 예컨대, nbW/2이 되도록 설정할 수도 있다. 여기서 nbW는 주변 블록의 너비로 설정할 수도 있다.
주변 블록의 제1 시드 벡터, 제2 시드 벡터 또는 제3 시드 벡터 중 적어도 하나를 어파인 주변 블록의 서브 블록 중 최하단에 위치한 서브 블록의 모션 벡터로 치환할 수 있다. 일 예로, 도 24와 같이 어파인 주변 블록 중 좌하단 서브 블록 또는 하단 중앙 서브 블록 (이하, 제4 어파인 서브 블록 )과 어파인 주변 블록 중 우하단 서브 블록 또는 하단 중앙 서브 블록(이하, 제5 어파인 서브 블록)을 기준으로 특정 샘플 위치를 특정할 수 있고, 특정 샘플 위치를 이용하여 어파인 시드 벡터를 유도할 수도 있다. 이 특정 샘플 위치를 어파인 기준 샘플의 위치라고 부른다.
제4 어파인 서브 블록 및 제5 어파인 서브 블록의 위치는 대상 블록이 현재 블록의 상위 CTU에 존재하는지 여부에 따라 서로 다르게 설정할 수도 있다. 예를 들어, 대상 블록이 현재 블록의 상위 CTU(현재 블록이 속한 CTU의 상측 CTU)에 존재하면, 도 25와 같이 제4 어파인 서브 블록은 하단 중앙 서브 블록으로 설정하고, 제5 어파인 서브 블록은 우하단 서브 블록으로 설정할 수도 있다. 이 때 제4 어파인 기준 샘플(제4 어파인 서브 블록의 기준 샘플)과 제5 어파인 기준 샘플(제5 어파인 서브 블록의 기준 샘플)의 차이는 멱급수(2n)이 되도록 설정할 수 있다.예컨대, nbW/2이 되도록 설정할 수도 있다. 여기서 nbW는 주변 블록의 너비로 설정할 수도 있다.
대상 블록이 현재 블록의 좌측 CTU에 존재하면(현재 블록이 속한 CTU의 좌측 CTU), 제4 어파인 서브 블록은 좌하단 서브 블록으로 설정하고, 제5 어파인 서브 블록은 우하단 서브 블록으로 설정할 수도 있다.
또 다른 예를 들어, 대상 블록이 현재 블록의 상위 CTU(현재 블록이 속한 CTU의 상측 CTU)에 존재하면, 도 26과 같이 제4 어파인 서브 블록은 좌하단 서브 블록으로 설정하고, 제5 어파인 서브 블록은 하단 중앙 서브 블록으로 설정할 수도 있다. 이 때 제4 어파인 기준 샘플 (제4 어파인 서브 블록의 기준 샘플)과 제5 어파인 기준 샘플(제5 어파인 서브 블록의 기준 샘플)의 차이는 멱급수(2n)이 되도록 설정할 수 있다. 예컨대, nbW/2이 되도록 설정할 수도 있다. 여기서 nbW는 주변 블록의 너비로 설정할 수도 있다.
어파인 기준 샘플 위치는 서브 블록의 좌상단 블록이나 우하단 블록으로 설정하거나, 중앙에 위치한 샘플로 설정할 수도 있다. 또는 제4 어파인 서브 블록과 제5 어파인 서브 블록이 서로 다른 어파인 기준 샘플 위치를 갖도록 설정할 수도 있다. 구체적으로 예를 들어, 도 27의 왼쪽 그림과 같이 제4 어파인 서브 블록의 어파인 기준 샘플 위치(이하, 제4 어파인 기준 샘플 위치) 는 서브 블록 내 좌상단 샘플로 설정할 수 있고, 제5 어파인 서브 블록의 어파인 기준 샘플 위치(이하, 제5 어파인 기준 샘플 위치)는 서브 블록내 우상단 샘플 (xi, yi)의 우측 샘플 (xi+1, yi)로 설정할 수 있다.
이때, 제5 어파인 서브 블록의 기준 위치는 우상단 샘플의 우측 샘플을 사용하되, 제5 어파인 서브 블록의 모션 벡터는 우상단 샘플의 모션 벡터로 설정될 수 있다. 또는, 우상단 샘플의 우측 샘플의 모션 벡터를 제5 어파인 서브 블록의 모션 벡터로 설정할 수 있다.
또 다른 예를 들어, 도 27의 오른쪽 그림과 같이 제4 어파인 기준 샘플 위치는 제4 어파인 서브 블록 내 우상단 샘플 (xi,yi)의 좌측 샘플 (xi-1,yi)로 설정할 수 있다. 이 때, 제4 어파인 서브 블록의 기준 위치는 좌상단 샘플의 좌측 샘플을 사용하되, 제4 어파인 서브 블록의 모션 벡터는 좌상단 샘플의모션 벡터로 설정될 수 있다. 또는, 좌상단 샘플의 좌측 샘플의 모션 벡터를 제4 어파인 서브 블록의 모션 벡터로 설정할 수 있다.
다른 예를 들어, 도 28의 좌측 그림과 같이 제4 어파인 기준 샘플 위치는 서브 블록 내 좌하단 샘플로 설정할 수 있고, 제5 어파인 기준 샘플 위치는 서브 블록내 우하단 샘플 (xj, yj)의 우측 샘플 (xj+1, yj)로 설정할 수 있다. 이때, 제5 어파인 서브 블록의 기준 위치는 우하단 샘플의 우측 샘플을 사용하되, 제5 어파인 서브 블록의 모션 벡터는 우하단 샘플의 모션 벡터로 설정될 수 있다. 또는, 우하단 샘플의 우측 샘플의 모션 벡터를 제5 어파인 서브 블록의 모션 벡터로 설정할 수 있다.
또 다른 예를 들어, 도 28의 좌측 그림과 같이 제4 어파인 기준 샘플 위치는 서브 블록 내 좌하단 샘플 (xj, yj)의 좌측 샘플 (xj-1, yj)로 설정할 수 있고, 제5 어파인 기준 샘플 위치는 서브 블록내 우하단 샘플로 설정할 수 있다.
이때, 제5 어파인 서브 블록의 기준 위치는 좌하단 샘플의 좌측 샘플을 사용하되, 제5 어파인 서브 블록의 모션 벡터는 좌하단 샘플의 모션 벡터로 설정될 수 있다. 또는, 좌하단 샘플의 좌측 샘플의 모션 벡터를 제5 어파인 서브 블록의 모션 벡터로 설정할 수 있다.
다른 예를 들어, 도 29의 좌측 그림과 같이 제4 어파인 기준 샘플 위치는 서브 블록 내 좌상단 샘플과 좌하단 샘플 사이에 있는 샘플(이하, 좌 중간 샘플) 로 설정할 수 있고, 제5 어파인 기준 샘플 위치는 서브 블록내 우상단 샘플과 우하단 샘플 사이에 있는 샘플 (이하, 우 중간 샘플) (xk, yk)의 우측 샘플 (xk+1, yk)로 설정할 수 있다. 이때, 제5 어파인 서브 블록의 기준 위치는 우 중간 샘플의 우측 샘플을 사용하되, 제5 어파인 서브 블록의 모션 벡터는 우 중간 샘플의 모션 벡터로 설정될 수 있다. 또는, 우 중간 샘플의 우측 샘플의 모션 벡터를 제5 어파인 서브 블록의 모션 벡터로 설정할 수 있다.
또 다른 예를 들어, 도 29의 우측 그림과 같이 제4 어파인 기준 샘플 위치는 좌 중간 샘플 (xk, yk)의 좌측 샘플 (xk-1, yk)로 설정할 수 있고, 제5 어파인 기준 샘플 위치는 우 중간 샘플로 설정할 수 있다.
또는 수학식 12 및 13과 같이 어파인 주변 블록의 제1 시드 벡터와 제2 시드 벡터로부터 제4 어파인 서브 블록 또는 제5 어파인 서브 블록 중 적어도 하나의 어파인 모션 벡터를 유도할 수 있으며, 이를 각각 제4 어파인 시드 벡터 nv3=(nv3x, nv3y) 및 제5 어파인 시드 벡터 nv4=(nv4x, nv4y)라 부른다.
Figure PCTKR2020004136-appb-M000007
Figure PCTKR2020004136-appb-M000008
제4 어파인 시드 벡터 및 제5 어파인 시드 벡터를 이용하여 수학식 14 및 15와 같이 현재 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 유도할 수 있다.
Figure PCTKR2020004136-appb-M000009
Figure PCTKR2020004136-appb-M000010
수학식 14 및 15에서 xn4-xn3을 Wseed로 설정할 수 있다. Wseed를 서브 시드 벡터 너비라고 부른다. 서브 시드 벡터 너비 Wseed는 2의 멱급수(2n)가 되도록 설정할 수 있다.
서브 시드 벡터 너비 Wseed가 2의 멱급수(2n)가 아닌 경우에는 Wseed가 2의 멱급수가 되도록 특정 오프셋을 더한 후에 수학식 14 및 15를 적용할 수도 있고, 나누기 연산 대신에 비트 쉬프트 연산으로 대체할 수도 있다.
LCU boundary에 존재하는 경우에 수학식 12 및 13과 같이 어파인 시드 벡터를 유도하지 않고, 제4 어파인 기준 샘플 위치에 있는 translation 모션 벡터 정보를 제4 어파인 시드 벡터로 설정하고, 제5 어파인 기준 샘플 위치에 있는 translation 모션 벡터 정보를 제5 어파인 시드 벡터로 설정할 수도 있다.
LCU boundary에 존재하는지 여부에 관계없이 제i 어파인 기준 샘플 위치에 있는 translation 모션 벡터 정보를 제i 어파인 시드 벡터로 설정할 수 있다. 여기서 i의 범위는 1 내지 5로 설정할 수 있다.
또는 제4 어파인 기준 샘플 위치에 있는 translation 모션 벡터 정보를 제1 어파인 시드 벡터로 설정할 수도 있고, 제5 어파인 기준 샘플 위치에 있는 translation 모션 벡터 정보를 제2 어파인 시드 벡터로 설정할 수도 있다.
또는 어파인 기준 샘플이 어파인 주변 블록에 속하지 않는 경우에는 어파인 기준 샘플과 가장 가까운 어파인 주변 블록의 샘플에서 모션 벡터 정보를 유도할 수도 있으며, 이를 변형 어파인 머지 벡터 유도 방법이라고 부른다.
구체적으로 예를 들어, 도 30 과 같이 제5 어파인 기준 샘플 (Xn4, yn4)이 어파인 주변 블록에 속하지 않는 경우에는 제5 어파인 기준 샘플의 좌측 경계 샘플 (즉, (Xn4-1, yn4) )을 포함하는 블록의 translation 모션 벡터 정보를 제5 어파인 시드 벡터로 설정할 수도 있다.
도 31은 본 발명이 적용되는 일실시예로서, 머지 모드 기반의 인터 예측 방법을 도시한 것이다.
현재 코딩 유닛의 모션 정보(모션 벡터, 참조 픽쳐 인덱스 등)를 부호화 하지 않고, 주변 블록의 모션 정보로부터 유도할 수 있다. 주변 블록 중 어느 하나의 모션 정보를 현재 코딩 유닛의 모션 정보로 설정할 수 있으며, 이를 머지 모드(merge mode)라고 정의한다.
도 31을 참조하면, 현재 블록의 머지 후보 리스트를 구성할 수 있다(S3100).
머지 후보 리스트는, 현재 블록의 모션 정보를 유도하기 위해 이용 가능한 하나 또는 복수의 머지 후보를 포함할 수 있다. 머지 후보 리스트의 크기는, 머지 후보 리스트를 구성하는 머지 후보의 최대 개수를 지시하는 정보(이하, 크기 정보)에 기초하여 가변적으로 결정될 수 있다. 상기 크기 정보는, 부호화 장치에서 부호화되어 시그날링되거나, 복호화 장치에 기-약속된 고정된 값(예를 들어, 2, 3, 4, 5, 6 또는 그 이상의 정수)일 수도 있다.
머지 후보 리스트에 속한 복수의 머지 후보는, 공간적 머지 후보 또는 시간적 머지 후보 중 적어도 하나를 포함할 수 있다.
공간적 머지 후보는, 현재 블록에 공간적으로 인접한 주변 블록 또는 상기 주변 블록의 모션 정보를 의미할 수 있다. 여기서, 주변 블록은, 현재 블록의 좌하단 블록(A0), 좌측 블록(A1), 우상단 블록(B0), 상단 블록(B1) 또는 좌상단 블록(B2) 중 적어도 하나를 포함할 수 있다. 소정의 우선순서에 따라, 상기 주변 블록 중 가용한 주변 블록이 순차적으로 머지 후보 리스트에 추가될 수 있다. 예를 들어, 우선순위는, B1->A1->B0->A1->B2, A1->B1->A0->B1->B2, A1->B1->B0->A0->B2 등으로 정의될 수 있으며, 다만 이에 한정되지 아니한다.
다만, 현재 블록과 동일한 병렬 머지 영역에 속한 주변 블록은 현재 블록의 공간적 머지 후보에서 제외될 수 있다. 일예로, 현재 블록과 동일한 병렬 머지 영역에 속한 주변 블록은, 현재 블록의 공간적 머지 후보로 비가용한 것으로 결정될 수 있다. 병렬 머지 영역은 하나 또는 그 이상의 코딩 블록을 포함할 수 있고, 하나의 병렬 머지 영역에 속한 복수의 코딩 블록은 독립적 혹은 병렬적으로 부호화/복호화가 가능할 수 있다. 병렬 머지 영역은, 병렬 머지 영역에 속한 복수의 코딩 블록 간의 종속성없이, 각 코딩 블록의 공간적 머지 후보가 유도되는 영역을 의미할 수 있다. 여기서, 독립적 혹은 병렬적 부호화/복호화 과정은, 인트라 예측, 인터 예측, 변환(역변환), 양자화(역양자화) 또는 인-루프 필터링 중 적어도 하나를 포함할 수 있다. 병렬 머지 영역의 크기를 나타내는 정보가 부호화 장치로부터 시그날링되며, 시그날링되는 정보에 기초하여 병렬 머지 영역의 크기가 가변적으로 결정될 수 있다. 여기서, 정보는, 비디오 시퀀스, 픽쳐 또는 슬라이스 중 적어도 하나의 레벨에서 시그날링될 수 있다.
한편, 공간적 머지 후보는 현재 블록에 인접하지 않은 주변 블록을 더 포함할 수 있으며, 이에 대해서는 도 32 및 도 33을 참조하여 살펴 보기로 한다.
시간적 머지 후보는, 콜 픽쳐(co-located picture)에 속한 하나 또는 그 이상의 콜 블록(co-located block) 또는 상기 콜 블록의 모션 정보를 의미할 수 있다. 여기서, 콜 픽쳐는, 참조 픽쳐 리스트에 속한 복수의 참조 픽쳐 중 어느 하나이며, 이는 현재 블록이 속한 픽쳐와 다른 픽쳐일 수 있다. 콜 픽쳐는 참조 픽쳐 리스트에서 가장 처음에 위치한 픽쳐이거나 가장 마지막에 위치한 픽쳐일 수 있다. 또는, 콜 픽쳐는 콜 픽쳐를 지시하기 위해 부호화된 인덱스에 기초하여 특정될 수도 있다. 콜 블록은, 현재 블록의 중앙 위치를 포함하는 블록(C1) 또는 현재 블록의 우하단 코너에 인접한 주변 블록(C0) 중 적어도 하나를 포함할 수 있다. 소정의 우선순서에 따라, 상기 C0와 C1 중 가용한 블록이 순차적으로 머지 후보 리스트에 추가될 수 있다. 예를 들어, C0는 C1보다 높은 우선순위를 가질 수 있다. 다만, 이에 한정되지 아니하며, C1은 C0보다 높은 우선순위를 가질 수도 있다.
부호화/복호화 장치는, 현재 블록 이전에 부호화/복호화가 완료된 하나 이상의 블록(이하, 이전 블록)의 모션 정보를 저장하는 버퍼를 포함할 수 있다. 다시 말해, 버퍼는, 이전 블록의 모션 정보로 구성된 리스트(이하, 모션 정보 리스트)를 저장할 수 있다.
상기 모션 정보 리스트는, 픽쳐, 슬라이스, 타일, CTU 행 또는 CTU 중 어느 하나의 단위로 초기화될 수 있다. 초기화는 모션 정보 리스트가 비어있는 상태를 의미할 수 있다. 이전 블록의 부호화/복호화 순서에 따라 순차적으로 해당 이전 블록의 모션 정보가 모션 정보 리스트에 추가되되, 모션 정보 리스트는 모션 정보 리스트의 크기를 고려하여 FIFO(first-in first-out) 방식으로 업데이트될 수 있다. 예를 들어, 가장 최근에 부호화/복호화된 모션 정보(이하, 최근 모션 정보)가 모션 정보 리스트에 기-추가된 모션 정보와 동일한 경우, 최근 모션 정보는 모션 정보 리스트에 추가되지 않을 수 있다. 또는, 최근 모션 정보와 동일한 모션 정보를 모션 정보 리스트에서 제거하고, 최근 모션 정보를 모션 정보 리스트에 추가할 수도 있다. 이때, 최근 모션 정보는, 모션 정보 리스트의 가장 마지막 위치에 추가되거나, 제거된 모션 정보의 위치에 추가될 수 있다. 모션 정보 리스트의 구성 및 업데이트 방법에 대해서는 도 34 내지 도 40을 참조하여 살펴보기로 한다.
이전 블록은, 현재 블록에 공간적으로 인접한 하나 또는 그 이상의 주변 블록 또는 현재 블록에 공간적으로 인접하지 않은 하나 또는 그 이상의 주변 블록 중 적어도 하나를 포함할 수 있다.
머지 후보 리스트는, 버퍼 또는 모션 정보 리스트에 속한 이전 블록 또는 이전 블록의 모션 정보를 머지 후보로 더 포함할 수도 있다.
이를 위해, 모션 정보 리스트와 머지 후보 리스트 간의 중복성 체크가 수행될 수 있다. 중복성 체크는, 머지 후보 리스트에 속한 머지 후보 전부 또는 일부와 모션 정보 리스트에 이전 블록 전부 또는 일부에 대해서 수행될 수 있다. 다만, 설명의 편의를 위해, 본 발명의 중복성 체크는, 머지 후보 리스트에 속한 머지 후보 일부와 모션 정보 리스트에 이전 블록 일부에 대해서 수행됨을 가정한다. 여기서, 머지 후보 리스트의 일부 머지 후보는, 공간적 머지 후보 중 좌측 블록 또는 상단 블록 중 적어도 하나를 포함할 수 있다. 다만, 이에 한정되지 아니하며, 공간적 머지 후보 중 어느 하나의 블록으로 제한될 수도 있다. 예를 들어, 상기 일부 머지 후보는, 좌하단 블록, 우상단 블록, 좌상단 블록 또는 시간적 머지 후보 중 적어도 하나를 더 포함할 수도 있다. 모션 정보 리스트의 일부 이전 블록은, 모션 정보 리스트에 최근에 추가된 K개의 이전 블록을 의미할 수 있다. 여기서, K는 1, 2, 3 또는 그 이상이고, 부호화/복호화 장치에 기-약속된 고정된 값일 수 있다.
예를 들어, 모션 정보 리스트에 5개의 이전 블록(또는 이전 블록의 모션 정보)가 저장되어 있고, 각 이전 블록에 1 내지 5의 인덱스가 할당되어 있다고 가정한다. 인덱스가 클수록 최근에 저장된 이전 블록을 의미한다. 이때, 인덱스 5, 4 및 3을 가진 이전 블록과 머지 후보 리스트의 일부 머지 후보 간의 모션 정보의 중복성을 체크할 수 있다. 또는, 인덱스 5 및 4를 가진 이전 블록과 머지 후보 리스트의 일부 머지 후보 간의 중복성을 체크할 수도 있다. 또는, 가장 최근에 추가된 인덱스 5의 이전 블록을 제외하고, 인덱스 4 및 3을 가진 이전 블록과 머지 후보 리스트의 일부 머지 후보 간의 중복성을 체크할 수도 있다.
중복성 체크 결과, 동일하지 않은 모션 정보를 가진 이전 블록이 하나라도 존재하는 경우, 해당 이전 블록은 머지 후보 리스트에 추가될 수 있다. 또는, 동일한 모션 정보를 가진 이전 블록이 하나라도 존재하는 경우, 모션 정보 리스트의 이전 블록은 머지 후보 리스트에 추가되지 않을 수 있다. 반면 동일한 모션 정보를 가진 이전 블록이 존재하지 않는 경우, 모션 정보 리스트의 이전 블록 전부 또는 일부는 머지 후보 리스트의 마지막 위치에 추가될 수 있다. 이때, 모션 정보 리스트에 최근에 추가된 이전 블록의 순서(즉, 인덱스가 큰 순서부터 작은 순서로)로 머지 후보 리스트에 추가될 수 있다. 다만, 모션 정보 리스트에 가장 최근에 추가된 이전 블록(즉, 가장 큰 인덱스를 가진 이전 블록)는 머지 후보 리스트에 추가되지 않도록 제한될 수도 있다. 상기 이전 블록의 추가는, 머지 후보 리스트의 크기를 고려하여 수행될 수 있다. 예를 들어, 전술한 머지 후보 리스트의 크기 정보에 따라, 머지 후보 리스트가 최대 T개의 머지 후보를 가지는 경우를 가정한다. 이 경우, 이전 블록의 추가는, 머지 후보 리스트에 속한 머지 후보의 개수 (T-n)개가 될 때까지만 수행되도록 제한될 수 있다. 여기서, n은 1, 2 또는 그 이상의 정수일 수 있다. 또는, 이전 블록의 추가는, 머지 후보 리스트에 속한 머지 후보의 개수 T개가 될 때까지 반복적으로 수행될 수도 있다.
도 31을 참조하면, 머지 후보 리스트와 머지 인덱스(merge_idx)를 기반으로, 현재 블록의 모션 정보를 유도할 수 있다(S3110).
머지 인덱스는, 머지 후보 리스트에 속한 복수의 머지 후보 중 어느 하나를 특정할 수 있다. 현재 블록의 모션 정보는, 머지 인덱스에 의해 특정된 머지 후보의 모션 정보로 설정될 수 있다.
도 31을 참조하면, 유도된 모션 정보를 기반으로 현재 블록의 모션 보상을 수행할 수 있다(S3120).
기-유도된 모션 정보(특히, 모션 벡터)는, 소정의 차분 모션 벡터(MVD)에 기반하여 보정될 수 있다. 보정된 모션 벡터를 이용하여 모션 보상이 수행될 수도 있다. MVD에 기반한 모션 벡터 보정 방법에 대해서는 도 44를 참조하여 살펴보기로 한다.
한편, 현재 블록에 대해서 기-유도된 모션 정보를 기반으로, 상기 모션 정보 리스트가 업데이트될 수 있다. 다만, 현재 블록이 병렬 머지 영역 내에서 가장 마지막 부호화/복호화 순서를 가진 경우, 상기 모션 정보 리스트의 업데이트는 수행되고, 그렇지 않은 경우, 상기 모션 정보 리스트의 업데이트는 수행되지 않을 수 있다. 가장 마지막 부호화/복호화 순서를 가진 블록은, 병렬 머지 영역 내에서 우하단에 위치한 블록을 의미할 수 있다. 모션 정보 리스트에 추가되는 모션 벡터는 보정 후 모션 벡터일 수도 있고, 보정 전 모션 벡터로 제한될 수도 있다. 동일한 병렬 머지 영역에 속한 모든 블록은 동일한 모션 정보 리스트를 공유할 수 있다. 상기 업데이트된 모션 정보 리스트는, 현재 병렬 머지 영역 이후에 부호화/복호화되는 병렬 머지 영역 내 코딩 블록의 머지 후보 리스트를 생성하기 위해 이용될 수 있다. 이에 대해서는 도 41 내지 도 43을 참조하여 자세히 살펴보도록 한다.
도 32 내지 도 33은 본 발명이 적용되는 일실시예로서, 공간적 머지 후보로 이용 가능한 주변 블록을 도시한 것이다.
머지 모드에 사용되는 주변 블록은 도 32의 머지 후보 인덱스 0 내지 4와 같이 현재 코딩 유닛과 인접한 블록(현재 코딩 유닛의 경계와 맞닿은 블록)일 수도 있고, 도 32의 머지 후보 인덱스 5 내지 26과 같이 인접하지 않은 블록일 수도 있다. 머지 후보가 현재 블록과의 거리가 기정의된 임계값을 넘어가면 가용(available)하지 않은 것으로 설정할 수 있다.
예를 들어, 기-정의된 임계값을 CTU의 높이(ctu_height) 또는 (ctu_height+N)으로 설정할 수도 있으며, 이를 머지 후보 가용 임계값이라고 정의한다. 즉 머지 후보의 y축 좌표(yi)와 현재 코딩 유닛의 좌상단 샘플(이하, 현재 코딩 유닛의 기준 샘플)의 y축 좌표(y0)의 차분(즉, yi - y0)이 머지 후보 가용 임계값보다 큰 경우에는 머지 후보를 가용(Available)하지 않은 것으로 설정할 수 있다. 여기서 N은 기 정의된 오프셋 값이다. 구체적으로 예를 들어, N을 16으로 설정할 수도 있고, ctu_height으로 설정할 수도 있다.
CTU 경계(CTU boundary)를 넘어가는 머지 후보가 많은 경우에는 비가용 머지 후보가 많이 발생하여, 부호화 효율이 낮아질 수도 있다. 코딩 유닛의 위쪽에 존재하는 머지 후보(이하, 상측 머지 후보)는 가능한 작게 설정하고, 코딩 유닛의 좌측 및 하단(이하, 좌하단 머지 후보)에 존재하는 머지 후보는 가능한 많게 설정할 수도 있다.
도 33과 같이 현재 코딩 유닛 기준 샘플의 y축 좌표와 상측 머지 후보의 y축 좌표의 차이가 코딩 유닛 높이의 2배가 넘지 않도록 설정할 수도 있다. 현재 코딩 유닛 기준 샘플의 x축 좌표와 좌하단 머지 후보의 x축 좌표의 차이가 코딩 유닛 너비의 2배가 넘지 않도록 설정할 수도 있다.
현재 코딩 유닛과 인접한 머지 후보를 인접 머지 후보라고 부르고, 현재 코딩 유닛과 인접하지 않은 머지 후보를 비인접 머지 후보라고 정의한다. 현재 코딩 유닛의 머지 후보가 인접 머지 후보인지 여부를 나타내는 플래그(isAdjacentMergeflag)를 시그날링할 수 있다. IsAdjacentMergeflag 값이 1이면 현재 코딩 유닛의 모션 정보는 인접 머지 후보에서 유도되고, isAdjacentMergeflag 값이 0이면 현재 코딩 유닛의 모션 정보는 비인접 머지 후보에서 유도될 수 있다.
도 34 내지 도 40은 본 발명이 적용되는 일실시예로서, 모션 정보 리스트의 구성 및 업데이트 방법을 도시한 것이다.
현재 픽쳐에서 이미 인터 예측으로 부호화된 코딩 유닛의 모션 정보(모션 벡터, 참조 픽쳐 인덱스 또는 예측 방향 정보 중 적어도 하나를 포함)를 기-정의된 크기의 리스트에 저장할 수 있으며, 이를 인터 영역 모션 정보 리스트 또는 모션 정보 리스트라고 정의한다. 인터 영역 모션 정보 리스트에 있는 모션 정보를 인터 영역 머지 후보라고 한다. 인터 영역 머지 후보를 현재 코딩 유닛의 머지 후보로 사용할 수 있으며, 이런 방법을 인터 영역 머지 방법이라고 정의한다.
타일 그룹이 초기화 되면 인터 영역 모션 정보 리스트는 비어 있으며, 픽쳐의 일부 영역을 부호화/복호화되면 인터 영역 모션 정보 리스트에 추가할 수 있다. 타일 그룹 헤더를 통해 인터 영역 모션 정보 리스트의 초기 인터 영역 머지 후보를 시그널링할 수도 있다.
코딩 유닛이 인터 예측으로 부호화/복호화 되면 도 34과 같이 상기 코딩 유닛의 모션 정보를 인터 영역 모션 정보 리스트에 업데이트할 수 있다. 인터 영역 모션 정보 리스트에 있는 인터 영역 머지 후보의 개수가 소정의 최대개수에 도달한 경우에는, 인터 영역 모션 정보 리스트에서 인덱스가 가장 작은 값(가장 먼저 인터 영역 모션 정보 리스트에 추가된 모션 정보)을 제거하고, 가장 최근에 부호화/복호화된 인터 영역의 모션 정보를 인터 영역 모션 정보 리스트에 추가할 수 있다.
디코딩된 코딩 유닛의 모션 벡터 mvCand를 인터 영역 모션 정보 리스트 HmvpCandList에 업데이트할 수 있다. 이 때 디코딩된 코딩 유닛의 모션 정보가 인터 영역 모션 정보 리스트에 있는 모션 정보 중 어느 하나와 같은 경우(모션 벡터와 레퍼런스 인덱스가 모두 같은 경우)에는 인터 영역 모션 정보 리스트를 업데이트하지 않거나, 도 36과 같이 디코딩된 코딩 유닛의 모션 벡터 mvCand을 인터 영역 모션 정보 리스트의 제일 마지막에 저장할 수 있다. 이 때 mvCand과 같은 모션 정보를 가지고 있는 HmvpCandList의 인덱스를 hIdx이면, 도 36과 같이 hIdx 보다 큰 모든 i에 대해 HMVPCandList[i]를 HVMPCandList[i-1]로 설정할 수도 있다. 현재 디코딩된 코딩 유닛에서 서브 블록 머지 후보(sub-block merge candidates)가 사용된 경우에는 코딩 유닛 내 대표 서브 블록의 모션 정보를 인터 영역 모션 정보 리스트에 저장할 수도 있다. 서브 블록 머지 후보라 함은, 하나의 코딩 블록이 복수의 서브 블록으로 분할되고, 서브 블록의 단위로 모션 정보가 유도되는 방법을 의미할 수 있다.
일 예로, 코딩 유닛 내 대표 서블 블록은 도 35와 같이 코딩 유닛 내 좌상단 서브 블록으로 설정하거나, 코딩 유닛 내 중간 서브 블록으로 설정할 수도 있다.
인터 영역 모션 정보 리스트에 총 NumHmvp 개의 모션 정보를 저장할 수 있으며, NumHmvp을 인터 영역 모션 정보 리스트의 크기라고 정의한다.
인터 영역 모션 정보 리스트의 크기는 기-정의된 값을 사용할 수 있다. 타일 그룹 헤더에 인터 영역 모션 정보 리스트의 크기를 시그날링할 수도 있다. 일 예로, 인터 영역 모션 정보 리스트의 크기는 16으로 정의할 수도 있고, 6으로 정의하거나 5로 정의할 수도 있다.
인터 예측이면서 어파인 모션 벡터를 갖는 코딩 유닛에서는 인터 영역 모션 정보 리스트를 갖지 않도록 한정할 수도 있다. 또는, 인터 예측이면서 어파인 모션 벡터를 갖는 경우에는 어파인 서브 블록 벡터를 인터 영역 모션 정보 리스트에 추가할 수도 있다. 여기서, 서브 블록의 위치는 좌상단, 우상단 또는 중앙 서브 블록 등으로 설정할 수도 있다. 또는, 각 컨트롤 포인트의 모션 벡터 평균값을 인터 영역 머지 후보 리스트에 추가할 수도 있다.
특정 코딩 유닛을 부호화/복호화를 수행해서 유도한 모션 벡터 MV0가 인터 영역 머지 후보 중 어느 하나와 동일한 경우에는 MV0를 인터 영역 모션 정보 리스트에 추가하지 않을 수 있다. 또는, MV0와 동일한 모션 벡터를 갖는 기존의 인터 영역 머지 후보를 삭제하고, MV0를 새롭게 복호화 영역 머지 후보에 포함시켜, MV0에 할당되는 인덱스를 갱신할 수 있다.
인터 영역 모션 정보 리스트 이외에 인터 영역 모션 정보 롱텀 리스트 HmvpLTList를 구성할 수도 있다. 인터 영역 모션 정보 롱텀 리스트 크기는 인터 영역 모션 정보 리스트 크기와 같게 설정하거나, 상이한 값으로 설정할 수 있다.
인터 영역 모션 정보 롱텀 리스트는 타일 그룹 시작 위치에 처음 추가한 인터 영역 머지 후보로 구성될 수 있다. 인터 영역 모션 정보 롱텀 리스트가 모두 가용한 값으로 구성된 이후에 인터 영역 모션 정보 리스트를 구성하거나, 인터 영역 모션 정보 리스트 내 모션 정보를 인터 영역 모션 정보 롱텀 리스트의 모션 정보로 설정할 수도 있다.
이 때 한 번 구성된 인터 영역 모션 정보 롱텀 리스트는 업데이트를 수행하지 않거나, 타일 그룹 중 복호화된 영역이 전체 타일 그룹의 반 이상일 때 다시 업데이트 하거나, m개 CTU 라인마다 업데이트하도록 설정할 수도 있다. 인터 영역 모션 정보 리스트는 인터 영역으로 복호화될 때마다 업데이트하거나, CTU 라인 단위로 업데이트하도록 설정할 수 있다.
인터 영역 모션 정보 리스트에 모션 정보와 코딩 유닛의 파티션 정보 또는 형태를 저장할 수도 있다. 현재 코딩 유닛과 파티션 정보 및 형태가 유사한 인터 영역 머지 후보만 사용하여 인터 영역 머지 방법을 수행할 수도 있다.
또는, 블록 형태에 따라 개별적으로 인터 영역 머지 후보 리스트을 구성할 수도 있다. 이 경우, 현재 블록의 형태에 따라, 복수의 인터 영역 머지 후보 리스트 중 하나를 선택하여 사용할 수 있다.
도 37과 같이 인터 영역 어파인 모션 정보 리스트와 인터 영역 모션 정보 리스트로 구성할 수도 있다. 복호화된 코딩 유닛이 어파인 인터 또는 어파인 머지 모드인 경우에는 인터 영역 어파인 모션 정보 리스트 HmvpAfCandList에 제1 어파인 시드 벡터와 제2 어파인 시드 벡터를 저장할 수도 있다. 인터 영역 어파인 머지 후보 리스트에 있는 모션 정보를 인터 영역 어파인 머지 후보라고 한다.
현재 코딩 유닛에서 사용 가능한 머지 후보는 다음과 같이 구성될 수 있고, 이 중 일부 머지 후보는 생략될 수 있음은 물론이다. 아래 구성 순서와 같은 탐색 순서를 가질 수 있다.
1. 공간적 머지 후보 (코딩 블록 인접 머지 후보 및 코딩 블록 비인접 머지 후보)
2. 시간적 머지 후보 (이전 참조 픽쳐에서 유도한 머지 후보)
3. 인터 영역 머지 후보
4. 인터 영역 어파인 머지 후보
5. Zero motion 머지 후보
디코딩된 모션 벡터의 해상도에 따라 서로 다른 인터 영역 모션 정보 리스트에 저장할 수 있다. 예를 들어, 도 38와 같이 디코딩된 모션 벡터 mvCand가 1/4 pel 해상도를 갖는 경우에는 인터 영역 쿼터펠 모션 정보 리스트 HmvpQPCandList에 mvCand를 저장할 수 있고, 디코딩된 모션 벡터 mvCand가 integer pel 해상도를 갖는 경우에는 인터 영역 하프펠 모션 정보 리스트 HmvpIPCandList에 mvCand를 저장할 수 있으며, 디코딩된 모션 벡터 mvCand가 4-integer pel 해상도를 갖는 경우에는 인터 영역 인티저펠 모션 정보 리스트 Hmvp4IPCandList에 mvCand를 저장할 수 있다.
도 39와 같이 코딩 유닛이 머지 오프셋 벡터 부호화 방법을 사용한 경우에는 코딩 유닛의 모션 정보 mvCand를 HmvpCandList에 저장하지 않고 인터 영역 머지 오프셋 모션 정보 리스트 HmvpMMVDCandList에 저장할 수 있다.
먼저 머지 후보 리스트는 mergeCandList는 공간적 머지 후보 및 시간적 머지 후보로 구성할 수 있다. 가용한 공간적 머지 후보 및 시간적 머지 후보의 개수를 가용 머지 후보 개수(NumMergeCand)라고 정의한다. 가용 머지 후보 개수가 머지 최대 허용 개수보다 작은 경우에는 인터 영역 머지 후보를 머지 후보 리스트 mergeCandList에 추가할 수 있다.
인터 영역 모션 정보 리스트 HmvpCandList를 머지 후보 리스트 mergeCandList에 추가할 때는 인터 영역 모션 정보 리스트 내 인터 영역 머지 후보의 모션 정보가 기존 머지 리스트 mergeCandList의 모션 정보와 동일한지 여부를 체크할 수 있다. 모션 정보가 동일한 경우에는 머지 리스트 mergeCandList에 추가하지 않고, 모션 정보가 동일하지 않은 경우에는 머지 리스트 mergeCandList에 인터 영역 머지 후보를 추가할 수 있다.
인터 영역 머지 후보 중 인덱스가 큰 것부터 머지 후보 리스트 mergeCandList에 추가하거나 인덱스가 작은 것부터 머지 후보 리스트 mergeCandList에 추가할 수 있다.
서브 블록 단위 머지 후보는 다음 프로세스와 같이 유도할 수 있다.
1. 현재 블록의 주변 머지 후보 블록의 모션 벡터로 부터 초기 쉬프트 벡터 (shVector)를 유도할 수 있다.
2. 수학식 16과 같이 코딩 유닛 내 서브 블록의 좌상단 샘플 (xSb,ySb)에 초기 쉬프트 벡터를 가산하여 좌상단 샘플의 위치가 (xColSb, yColSb)인 쉬프트 서브 블록을 유도할 수 있다.
[수학식 16]
(xColSb, yColSb) = (xSb + shVector[0]>> 4, ySb+shVector[1]>> 4)
3. (xColSb, yColSb)를 포함하고 있는 서브 블록의 센터 포지션과 대응되는 collocated block의 모션 벡터를 좌상단 샘플 (xSb,ySb)를 포함하고 있는 서브 블록의 모션 벡터로 유도할 수 있다.
또는 현재 디코딩된 코딩 유닛에서 서브 블록 머지 후보(sub-block merge candidates)가 사용된 경우에는 코딩 유닛 내 복수 개의 대표 서브 블록의 모션 정보를 인터 영역 서브 블록 모션 정보 리스트 HSubMVPCandList에 저장할 수도 있다. 예를 들어, 복수개의 대표 서브 블록은 도 40과 같이 코딩 유닛의 좌상단 서브 블록(이하, 제1 대표 서브 블록), 우상단 서브 블록(이하, 제2 대표 서브 블록), 그리고 좌하단 서브 블록(이하, 제3 대표 서브 블록)으로 구성할 수도 있다. 인터 영역 서브 블록 모션 정보 리스트의 개수는 기 정의된 값으로 설정할 수 있으며, 통상 인터 영역 모션 정보 리스트의 개수보다 적게 설정할 수 있다. 제1 대표 서브 블록의 모션 벡터를 제1 대표 서브 블록 모션 벡터라 하고, 제2 대표 서브 블록의 모션 벡터를 제2 대표 서브 블록 모션 벡터라 하며, 제3 대표 서브 블록의 모션 벡터를 제3 대표 서브 블록 모션 벡터라 한다.
인터 영역 서브 블록 모션 정보 리스트 HSubMVPList에 있는 서브 블록 모션 벡터를 어파인 시드 벡터로 사용할 수도 있다. 구체적으로 예를 들어, 인터 영역 서브 블록 모션 정보 리스트 HSubMVPList에 있는 서브 블록 모션 후보의 제1 대표 서브 블록 모션 벡터를 제1 어파인 시드 벡터, 제2 대표 서브 블록 모션 벡터를 제2 어파인 시드 벡터, 그리고 제3 대표 서브 블록 모션 벡터를 제3 어파인 시드 벡터로 설정할 수도 있다. 또 다른 예를 들어, 인터 영역 서브 블록 모션 정보 리스트 HSubMVPList에 있는 제1 대표 서브 블록 모션 벡터를 제4 어파인 시드 벡터, 제2 대표 서브 블록 모션 벡터는 제5 어파인 시드 벡터로 사용할 수도 있다.
인터 영역 모션 정보 리스트 HMvpCandList에 있는 모션 벡터를 어파인 시드 벡터 중 어느 하나로 사용할 수도 있다. 예를 들어, HMvpCandList에 있는 모션 벡터를 제1 어파인 시드 벡터 내지 제5 어파인 시드 벡터 중 어느 하나의 값으로 사용할 수 있다.
인터 영역 모션 후보를 현재 코딩 유닛의 모션 정보 예측자 (Motion vector predictor, MVP) 후보로 사용할 수 있으며, 이런 방법을 인터 영역 모션 정보 예측 방법이라고 정의한다.
인터 영역 어파인 모션 후보를 현재 코딩 유닛의 모션 정보 예측자 (Motion vector predictor, MVP) 후보로 사용할 수 있으며, 이런 방법을 인터 영역 모션 정보 어파인 예측 방법이라고 정의한다.
현재 코딩 유닛에서 사용 가능한 모션 정보 예측자 후보는 다음과 같이 구성할 수 있으며, 구성 순서와 같은 탐색 순서를 가질 수 있다.
1. 공간적 모션 예측자 후보 (코딩 블록 인접 머지 후보 및 코딩 블록 비인접 머지 후보와 동일)
2. 시간적 예측자 후보 (이전 참조 픽쳐에서 유도한 모션 예측자 후보)
3. 인터 영역 예측자 후보
4. 인터 영역 어파인 예측자 후보
5. Zero motion 모션 예측자 후보
도 41 내지 도 43은 본 발명이 적용되는 일실시예로서, 병렬 머지 영역에서의 모션 정보 리스트의 구성 및 업데이트 방법을 도시한 것이다.
코딩 유닛 단위로 머지 후보를 유도할 수 있으나, 도 41과 같이 병렬 부호화/복호화를 위해 코딩 유닛 단위 보다 큰 기준 영역(이하, 병렬 머지 영역, MER) 안에 있는 주변 블록은 비가용 머지 후보(unavaialble merge candidates)로 설정할 수도 있다. 구체적으로 예를 들어, 도 41의 왼쪽 그림에서 코딩 유닛 CU5의 공간적 머지 후보는 병렬 머지 영역 내에 있는 공간적 머지 후보 x3 와 x4를 비가용 머지 후보로 설정하고, 병렬 머지 영역 밖에 있는 공간적 머지 후보 x0 내지 x3는 가용 머지 후보로 설정할 수 있다.
또 다른 예를 들어, 도 41의 오른쪽 그림에서 코딩 유닛 CU9의 공간적 머지 후보는 병렬 머지 영역 내에 있는 공간적 머지 후보 x6, x7, x8을 비가용 머지 후보로 설정하고, 병렬 머지 영역 밖에 있는 공간적 머지 후보 x5 와 x9는 가용 머지 후보로 설정할 수 있다.
병렬 머지 영역은 정방 형태일 수도 있고, 비정방 형태일 수도 있다. 병렬 머지 영역의 형태를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 비 정방 형태일 경우, 병렬 머지 영역의 샘플의 개수, 병렬 머지 영역의 너비/높이를 나타내는 정보 중 적어도 하나가 시그날링될 수도 있다. 병렬 머지 영역의 크기는 비트스트림을 통해 시그널링되는 정보, 픽처 해상도, 슬라이스 또는 타일 크기 중 적어도 하나를 기초로 결정될 수 있다.
병렬 머지 영역에 존재하는 복수의 CU의 부호화/복호화가 완료되면, 부호화/복호화가 완료된 CU의 모션 정보 전부 또는 일부를 모션 정보 리스트에 추가할 수 있다. 여기서, 일부 CU는 병렬 머지 영역 내 가장 마지막 부호화/복호화 순서를 가진 블록(예를 들어, 우하단 블록)일 수 있다.
다만, 병렬 머지 영역에 존재하는 복수의 CU는 동시에(병렬로) 예측을 수행하기 때문에, 부호화/복호화의 선후 관계를 결정하기 어려운 문제점이 있다. 이에 따라, 병렬 머지 영역에 존재하는 CU들의 모션 정보를 기-정의된 순서로 모션 정보 리스트 HmvpcandList에 추가할 수 있다. 여기서, 기-정의된 순서는 현재 CTU 또는 MER 내 CU의 스캔 순서, 각 CU의 모션 정보 또는 동일한 모션 정보를 갖는 CU의 개수 중 적어도 하나를 기초로 결정될 수 있다. 일 예로, 현재 CTU 또는 MER 내 래스터 스캔, 수직 스캔, 수평 스캔 또는 지그재그 스캔 순서에 따라, 각 CU의 모션 정보를 모션 정보 리스트 HmvpcandList에 추가할 수 있다. 또는, 단방향 예측인 CU의 모션 정보를 양방향 예측인 CU의 모션 정보보다 먼저(또는 나중에) 모션 정보 리스트에 추가할 수 있다. 또는, 현재 CTU 또는 MER 내 사용 빈도 순(또는 이의 역순)으로 모션 정보를 모션 정보 리스트에 추가할 수 있다.
인터 영역 머지 후보가 병렬 머지 영역 내에 있고, 현재 코딩 유닛의 머지 후보로 사용되는 경우에는, 병렬 머지 영역에서 병렬 부호화 및 복호화를 수행할 수 없다. 병렬 머지 영역이 사용되는 경우에, 인터 영역 머지 후보를 사용하지 않도록 제한할 수도 있다.
모션 정보 리스트를 MER 단위 또는 CTU 단위로 구성할 수도 있다. 예를 들어, 도 42과 같이 CTU 또는 MER 영역 단위로 인터 영역 MER 머지 리스트 HmvpMERCandList를 구성할 수 있다. 인터 영역 MER 머지 리스트에 추가된 인터 영역 머지 후보는 모션 정보 리스트(HmvpCandList)에 업데이트하지 않을 수 있다. 현재 CTU 또는 MER 영역내 모션 정보 mvCand는 HmvpMERCandList에 추가될 수 있다. 인터 영역 MER 머지 리스트의 크기는 모션 정보 리스트의 크기와 같도록 설정할 수도 있다. 또는, 현재 CTU 또는 MER의 크기에 따라, 인터 영역 MER 머지 리스트의 크기를 결정할 수도 있다.
현재 CTU 또는 MER 영역내 CU는 현재 CTU 또는 MER 영역에 대한 인터 영역 MER 머지 리스트에 포함된 인터 영역 MER 머지 후보를 이용하지 못하도록 제한할 수 있다. 이를 통해, 현재 CU와 동일한 CTU 또는 MER 영역에 속하는 CU의 모션 정보를 머지 후보로 이용하는 것이 제한될 수 있다. HmvpcandList만 사용하고, HmvpMERCandList는 사용하지 않는 경우에, 현재 코딩 유닛의 머지 후보는 현재 CTU 또는 MER 내의 모션 정보를 이용하지 않기 때문에, 병렬 머지 영역에서 병렬 부호화 및 복호화를 수행할 수 있다.
CTU 또는 MER에 포함된 모든 CU의 부호화/복호화가 끝나면 모션 정보 리스트와 인터 영역 MER 머지 리스트를 병합할 수 있다. 구체적으로, 도 43와 같이 HmvpcandList는 HmvpMerCandList와 이전 HmvpcandList에서 업데이트 할 수 있다. 인터 영역 MER 머지 리스트가 포함하는 인터 영역 MER 머지 후보들은 인터 영역 MER 머지 리스트에 삽입된 순서에 따라, 모션 정보 리스트에 추가될 수 있다.
다른 예로, 인터 영역 MER 머지 리스트 HmvpMerCandList에 포함된 인터 영역 MER 머지 후보는 기-정의된 순서로 모션 정보 리스트 HmvpcandList에 추가될 수 있다. 여기서, 기-정의된 순서는 현재 CTU 또는 MER 내 CU의 스캔 순서, 각 CU의 모션 정보 또는 동일한 모션 정보를 갖는 CU의 개수 중 적어도 하나를 기초로 결정될 수 있다. 일 예로, 현재 CTU 또는 MER 내 래스터 스캔 순서에 따라, 인터 영역 MER 머지 후보들을 모션 정보 리스트 HmvpcandList에 추가할 수 있다. 또는, 단방향 예측인 인터 영역 MER 머지 후보들을 양방향 예측인 인터 영역 MER 머지 후보들보다 먼저(또는 나중에) 모션 정보 리스트에 추가할 수 있다. 또는, 현재 CTU 또는 MER 내 사용 빈도 순(또는 이의 역순)으로 인터 영역 MER 머지 후보들을 모션 정보 리스트에 추가할 수 있다.
인터 영역 MER 머지 리스트 내 인터 영역 MER 머지 후보는 HmvpMERCand를 HmvpCandList내 인터 영역 머지 후보로 추가할 수 있다. 이 때, HmvpMERCand이 HmvpCand 중 어느 하나와 같은 경우에 HmvpCandList에 추가하지 않도록 설정할 수도 있다. 또는, HmvpMERCand가 기 정의된 값 이상의 인덱스를 갖는 HmvpCand와 동일한 경우에 HmvpMERCand가 HmvpCandList에 추가되지 않을 수 있다.
도 44는, 본 발명이 적용되는 일실시예로서, 차분 모션 벡터를 기반으로, 모션 벡터를 보정하는 방법을 도시한 것이다.
도 44를 참조하면, L0에서 사용한 모션 벡터의 MVD(Motion vector difference)의 symmetric MVD(벡터의 크기는 같고, 방향이 반대인 MVD)를 L1의 MVD로 설정할 수도 있으며, 이를 symmetric MVD 부호화/복호화 방법이라 한다. Symmetric MVD를 사용하는 경우 다음 수학식 17과 같이 MV를 유도할 수 있다.
[수학식 17]
(mvx0, mvy0) = (mvp_x0 + mvd_x0 , mvpy0 + mvdy0)
(mvx0, mvy0) = (mvp_x0 - mvd_x0 , mvpy0 - mvdy0)
코딩 유닛 단위로 symmetric MVD를 사용하는지 여부를 나타내는 플래그(sym_mvd_flag)를 비트스트림을 통해 시그날링할 수 있다. sym_mvd_flag 값이 1이면, 코딩 유닛에서 symmetric MVD를 사용하고, 그렇지 않은 경우, 코딩 유닛에서 symmetric MVD를 사용하지 않을 수 있다. 또는, 상기 플래그는 현재 블록의 부호화 파라미터에 기초하여 묵시적으로 유도될 수도 있다. 여기서, 부호화 파라미터는, 현재 블록의 예측 모드, 모션 정보, 크기 또는 형태 중 적어도 하나를 포함할 수 있다. 예를 들어, 현재 블록이 머지 모드로 부호화된 경우에 한하여 symmetric MVD가 사용될 수 있다. 현재 블록이 복합 예측 모드로 부호화되지 않은 경우에 한하여 symmetric MVD가 사용될 수 있다. 현재 블록이 양방향 예측을 수행하는 경우(즉, 제1 예측 방향 정보(predFlagL0)와 제2 예측 방향 정보(predFlagL1) 모두 1인 경우)에 한하여, symmetric MVD가 사용될 수 있다. 현재 픽쳐와 제1 참조 픽쳐 간의 시간적 거리와 현재 픽쳐와 제2 참조 픽쳐 간의 시간적 거리가 서로 동일한 경우에 한하여 symmetric MVD가 사용될 수 있다. 여기서, 현재 픽쳐는 현재 블록이 속한 픽쳐를 의미하고, 제1 및 제2 참조 픽쳐는 현재 블록의 참조 픽쳐 인덱스(refIdxL0, refIdxL1)에 의해서 각각 선택된 픽쳐를 의미할 수 있다. 상기 제1 참조 픽쳐와 제2 참조 픽쳐의 픽쳐 타입이 동일한 경우에 한하여 symmetric MVD가 사용될 수 있다. 여기서, 픽쳐 타입은 숏텀 참조 픽쳐 또는 롱텀 참조 픽쳐를 의미할 수 있다. 또는, 제1 참조 픽쳐와 제2 참조 픽쳐의 픽쳐 타입이 숏텀 참조 픽쳐인 경우에 한하여 symmetric MVD가 사용될 수 있다. 현재 블록의 크기가 소정의 문턱크기보다 크거나 같은 경우에 한하여 symmetric MVD가 사용될 수 있다. 여기서, 현재 블록의 크기는, 너비 또는 높이 중 적어도 하나, 너비와 높이의 최대값 또는 최소값, 너비와 높이의 합, 너비와 높이의 곱 등으로 표현될 수 있다. 현재 블록은 코딩 블록, 코딩 블록을 구성하는 서브블록 또는 변환 블록을 의미할 수 있다. symmetric MVD의 사용 여부를 결정하기 위해서, 현재 블록에 인접한 주변 블록의 부호화 파라미터가 이용될 수도 있다. 문턱크기는 부호화/복호화 장치에 기-약속된 값으로서, 8, 16, 32, 64, 128 또는 그 이상일 수 있다.
Symmetric MVD를 사용하는 경우, 제1 단방향 참조 픽쳐는 제1 단방향 참조 픽쳐 리스트(RefPicList0) 중 현재 픽쳐보다 POC(Picture order count, 픽쳐 아웃풋 순서)가 작으면서, 현재 픽쳐와 가장 가까운 픽쳐(이하, 좌측 최소 거리 픽쳐)로 설정할 수 있으며, 제1 단방향 참조 픽쳐 인덱스(refIdxL0)는 좌측 최소 거리 픽쳐의 참조 픽쳐 인덱스로 설정할 수 있다. 여기서 가장 가까운 픽쳐라 함은 현재 픽쳐의 POC와 참조 픽쳐의 POC 간의 차분이 가장 작은 참조 픽쳐를 의미한다. 또는, 제1 단방향 참조 픽쳐는 RefPicList0[0]로 설정할 수도 있다. 역으로, 현재 픽쳐의 제1 단방향 참조 픽쳐와 현재 픽쳐 간의 시간적 거리가 가까운 경우(e.g., 참조 픽쳐가 숏텀 참조 픽쳐인 경우)에 한하여 symmetric MVD가 사용될 수도 있다.
Symmetric MVD를 사용하는 경우, 제2 단방향 참조 픽쳐는 제2 단방향 참조 픽쳐 리스트(RefPicList1) 중 현재 픽쳐보다 POC가 크면서, 현재 픽쳐와 가장 가까운 픽쳐(이하, 우측 최소 거리 픽쳐)로 설정할 수 있으며, 제2 단방향 참조 픽쳐 인덱스(refIdxL1)는 우측 최소 거리 픽쳐의 참조 픽쳐 인덱스로 설정할 수 있다. 또는, 제2 단방향 참조 픽쳐는 RefPicList1[1]로 설정할 수도 있다. 역으로, 현재 픽쳐의 제2 단방향 참조 픽쳐와 현재 픽쳐 간의 시간적 거리가 가까운 경우에 한하여 symmetric MVD가 사용될 수도 있다.
제1 단방향 참조 픽쳐 리스트에서 현재 픽쳐보다 POC가 작은 픽쳐가 존재하지 않는 경우, 제1 단방향 참조 픽쳐 리스트 중 현재 픽쳐보다 POC가 크고 현재 픽쳐와 가장 가까운 픽쳐를 제1 단방향 참조 픽쳐로 설정할 수도 있다.
제2 단방향 참조 픽쳐 리스트에서 현재 픽쳐보다 POC가 큰 픽쳐가 존재하지 않는 경우, 제2 단방향 참조 픽쳐 리스트 중 현재 픽쳐보다 POC가 작고 현재 픽쳐와 가장 가까운 픽쳐를 제2 단방향 참조 픽쳐로 설정할 수도 있다.
제1 단방향 참조 픽쳐의 POC와 제2 단방향 참조 픽쳐의 POC가 현재 픽쳐의 POC보다 작고, 제1 단방향 참조 픽쳐의 POC와 제2 단방향 참조 픽쳐의 POC가 같은 경우에는 symmetric MVD를 사용하지 않도록 설정할 수도 있다. 구체적으로 표 6과 같은 신택스 테이블을 사용할 수도 있다.
coding_unit( x0, y0, cbWidth, cbHeight, treeType ) { Descriptor
...
if( CuPredMode[ x0 ][ y0 ] = = MODE_INTRA ) {
... ae(v)
}
} else if( treeType != DUAL_TREE_CHROMA ) { /* MODE_INTER or MODE_IBC */
if( cu_skip_flag[ x0 ][ y0 ] = = 0 )
merge_flag[ x0 ][ y0 ] ae(v)
if( merge_flag[ x0 ][ y0 ] ) {
merge_data( x0, y0, cbWidth, cbHeight )
} else if ( CuPredMode[ x0 ][ y0 ] = = MODE_IBC ) {
mvd_coding( x0, y0, 0, 0 )
mvp_l0_flag[ x0 ][ y0 ] ae(v)
if( sps_amvr_enabled_flag && ( MvdL0[ x0 ][ y0 ][ 0 ] != 0 | | MvdL0[ x0 ][ y0 ][ 1 ] != 0 ) ) {
amvr_precision_flag[ x0 ][ y0 ] ae(v)
}
} else {
if( tile_group_type = = B )
inter_pred_idc[ x0 ][ y0 ] ae(v)
if( sps_affine_enabled_flag && cbWidth >= 16 && cbHeight >= 16 ) {
inter_affine_flag[ x0 ][ y0 ] ae(v)
if( sps_affine_type_flag && inter_affine_flag[ x0 ][ y0 ] )
cu_affine_type_flag[ x0 ][ y0 ] ae(v)
}
if( inter_pred_idc[ x0 ][ y0 ] = = PRED_BI && !inter_affine_flag[ x0 ][ y0 ] && RefIdxSymL0 > -1 && RefIdxSymL1 > -1&& POC_L0 ! =POC_L1 )
sym_mvd_flag[ x0 ][ y0 ] ae(v)
if( inter_pred_idc[ x0 ][ y0 ] != PRED_L1 ) {
MvdL0[ x0 ][ y0 ][ 1 ] = 0
}
if( inter_pred_idc[ x0 ][ y0 ] != PRED_L0 ) {
if( num_ref_idx_l1_active_minus1 > 0 && !sym_mvd_flag[ x0 ][ y0 ] )
ref_idx_l1[ x0 ][ y0 ] ae(v)
if( mvd_l1_zero_flag && inter_pred_idc[ x0 ][ y0 ] = = PRED_BI ) {
...
} else {
if( sym_mvd_flag[ x0 ][ y0 ] ) {
MvdL1[ x0 ][ y0 ][ 0 ] = -MvdL0[ x0 ][ y0 ][ 0 ]
MvdL1[ x0 ][ y0 ][ 1 ] = -MvdL0[ x0 ][ y0 ][ 1 ]
} else
mvd_coding( x0, y0, 1, 0 )
}
if( MotionModelIdc[ x0 ][ y0 ] > 0 )
mvd_coding( x0, y0, 1, 1 )
if(MotionModelIdc[ x0 ][ y0 ] > 1 )
mvd_coding( x0, y0, 1, 2 )
mvp_l1_flag[ x0 ][ y0 ] ae(v)
} else {
MvdL1[ x0 ][ y0 ][ 0 ] = 0
MvdL1[ x0 ][ y0 ][ 1 ] = 0
}
...
}
...
}
}
제1 단방향 참조 픽쳐와 제2 단방향 참조 픽쳐가 현재 픽쳐를 기준으로 모두 좌측(또는 L0 방향)에 있거나, 모두 우측(또는 L1 방향)에 있는 경우, symmetric MVD 대신에 다음 수학식 18과 같이 L1의 MVD를 스케일링하여 사용할 수도 있다.
[수학식 18]
(mvx0, mvy0) = (mvp_x0 + mvd_x0 , mvpy0 + mvdy0)
(mvx0, mvy0) = (mvp_x0 + scale*mvd_x0 , mvpy0 - mvdy0)
수학식 18에서 scale값은 수학식 19와 같이 정의될 수 있다.
[수학식 19]
scale = abs(POC_Curr - POC_L0) / abs(POC_Curr - POC_L1)
scale = abs(POC_Curr - POC_L1) / abs(POC_Curr - POC_L0)
수학식 19에서 POC_Curr은 현재 픽쳐의 POC 값을 나타내고, POC_L0은 제1 단방향 참조 픽쳐의 POC 값을 나타내며, POC_L1은 제2 단방향 참조 픽쳐의 POC 값을 나타낸다.
제2 단방향 참조 픽쳐 리스트 중 현재 픽쳐보다 POC 값이 큰 참조 픽쳐가 존재하고, 제1 단방향 참조 픽쳐 리스트 중 현재 픽쳐보다 POC 값이 작은 픽쳐가 적어도 하나 이상 존재하는 경우, symmetric MVD를 사용하지 않을 수 있다.
또는 제1 단방향 참조 픽쳐 리스트 중 현재 픽쳐보다 POC 값이 작은 참조 픽쳐가 존재하지 않고, 제2 단방향 참조 픽쳐 리스트 중 현재 픽쳐보다 POC 값이 큰 참조 픽쳐가 적어도 하나 이상 존재하는 경우, symmetric MVD를 사용하지 않을 수 있다.
도 45 및 도 46은 본 발명이 적용되는 일실시예로서, 부호화/복호화 장치에서의 변환 방법을 도시한 것이다.
원본 영상에서 예측 영상을 차분한 영상을 잔차 영상(residual)이라 한다.
잔차 영상에 DCT(Discrete cosine transform)와 같은 2차원 변환(Transform)을 적용하여 잔차 영상을 주파수 성분으로 변환할 수 있다. 영상에서 고주파 성분을 제거해도 시각적으로 왜곡이 크게 발생하지 않는 특성이 있다. 고주파에 해당하는 값을 작게 하거나 0으로 설정하면 시각적 왜곡이 크지 않으면서도 압축 효율을 크게 할 수 있다.
블록의 크기나 예측 모드에 따라 DST(Discrete sine transform)을 사용할 수도 있다. 구체적으로 예를 들어, 현재 블록이 인트라 예측 모드로 부호화되고, 블록의 크기가 NxN 보다 작은 크기인 경우에는 DST 변환을 사용하도록 설정하고, 그렇지 않은 경우에는 DCT를 사용하도록 설정할 수도 있다. 여기서, 블록은 코딩 블록, 예측 블록 또는 변환 블록을 의미할 수 있다. 상기 N은 8, 16, 32 또는 그 이상일 수 있다.
DCT는 영상을 코사인(cosine) 변환을 이용하여 2차원 주파수 성분으로 분해(변환)하는 처리이고, 그 때의 주파수 성분들은 기저 영상으로 표현된다. 예를 들어, NxN 블록에서 DCT 변환을 수행하면 N2 개의 기본 패턴 성분을 얻을 수 있다. DCT 변환을 수행한다는 것은 원화소 블록에 포함된 기본 패턴 성분들 각각의 크기를 구하는 것이다. 각 기본 패턴 성분들의 크기는 DCT 계수라고 정의 한다.
대체적으로 저주파에 0이 아닌 성분들이 많이 분포하는 영상에서는 이산 여현 변환(Discrete Cosine Transform, DCT)을 주로 사용하고, 고주파 성분이 많이 분포하는 영상에서는 DST(Discrete Sine Transform)을 사용할 수도 있다.
DST는 영상을 sin 변환을 이용하여 2차원 주파수 성분으로 분해(변환)하는 처리를 나타낸다. DCT 또는 DST 변환 이외의 변환 방법을 사용하여 2차원 영상을 2차원 주파수 성분으로 분해(변환)할 수 있으며, 이를 2차원 영상 변환이라고 정의한다.
잔차 영상 중 특정 블록에서는 2차원 영상 변환을 수행하지 않을 수 있으며, 이를 변환 스킵(transform skip)이라고 정의한다. 변환 스킵 이후에 양자화를 적용할 수 있다. 변환 스킵의 허용 여부는, 코딩 유닛의 크기 또는 형태 중 적어도 하나에 기초하여 결정될 수 있다. 일 예로, 변환 스킵은 특정 크기 이하의 코딩 유닛에서만 사용하도록 제한할 수도 있다. 예를 들어, 32x32보다 작은 블록에서만 변환 스킵을 사용하도록 설정할 수도 있다. 또는, 정방형태 블록에서만 변환 스킵을 사용하도록 제한할 수도 있다. 구체적으로 예를 들어, 32x32, 16x16, 8x8, 4x4 블록 단위로 변환 스킵을 적용할 수도 있다.
또는 서브 파티션 기반의 인트라 예측 방법을 사용하는 경우 서브 파티션 단위로 변환 스킵을 선택적으로 적용할 수도 있다. 구체적으로 예를 들어, 도 45과 같이 상측 서브 파티션에서는 변환 스킵을 사용할 수도 있고, 하측 서브 파티션에서는 수평 방향으로 DST7, 수직 방향으로 DCT8(tu_mts_idx 3)을 수행할 수도 있다.
2차원 영상 내에 있는 임의의 블록을 DCT 또는 DST 또는 2차원 영상 변환을 적용할 수 있으며, 이 때 사용된 변환을 제1 변환이라고 정의 한다. 제1 변환을 수행 후 변환 블록의 일부 영역에서 변환을 다시 수행할 수 있으며, 이를 제2 변환이라고 정의한다.
제1 변환은 복수개의 변환 코어 중 하나를 사용할 수 있다. 구체적으로 예를 들어, 변환 블록에서 DCT2 , DCT8 또는 DST7 중 어느 하나를 선택하여 사용할 수 있다. 또는 변환 블록의 수평 방향 변환과 수직 방향 변환의 변환 코어를 개별적으로 결정할 수 있다. 이에 따라, 수평 방향 변환 및 수직 방향 변환은 상호 동일할 수도 있고, 상이할 수도 있다. 수평 방향 변환과 수직 방향 변환에서 서로 다른 변환 코어를 사용할 수도 있으며, 이를 복수 변환 코어 부호화 방법(Multiple Transform Selection, MTS)이라 정의한다.
제1 변환과 제2 변환을 수행하는 블록 단위가 서로 다르게 설정할 수도 있다. 구체적으로 예를 들어, 잔차 영상의 8x8 블록에서 제1 변환을 수행한 후, 4x4 서브 블록 별로 제2 변환을 각각 수행하되, 제2 변환은 8x8 블록 전부 또는 일부 영역에 대해서만 수행될 수도 있다. 여기서, 일부 영역은, 8x8 블록 내 좌상단 4x4 블록, 좌상단 4x4 블록 및 우상단 4x4 블록을 포함한 8x4 영역 또는 상단 4x4 블록 및 좌하단 4x4 블록을 포함한 4x8 영역을 의미할 수 있다. 또는, 일부 영역은 우하단 4x4 블록을 제외한 나머지 영역으로 정의될 수도 있다. 상기 일부 영역 중 어느 하나가 선택적으로 이용될 수도 있으며, 일부 영역은 전술한 부호화 파라미터에 기초하여 결정될 수 있다. 또 다른 예를 들어, 각 4x4 블록에서 제1 변환을 수행한 후, 8x8 크기의 블록에서 제2 변환을 각각 수행할 수도 있다.
제1 변환이 적용된 잔차 영상을 제1 변환 잔차 영상이라고 정의한다.
제1 변환 잔차 영상에 소정의 변환 타입에 따른 변환을 수행할 수 있으며, 이 때 사용된 변환을 제2 변환이라고 정의한다. 제2 변환은 DCT, DST, 2차원 영상 변환 또는 변환 스킵 중 적어도 하나를 포함할 수 있다. 제2 변환이 적용된 2차원 영상을 제2 변환 잔차 영상이라고 정의한다. 제1 변환 및/또는 제2 변환을 수행한 후의 블록 내 샘플 값 또는 변환 스킵을 수행한 후 블록 내 샘플 값을 변환 계수라고 정의한다. 양자화는 블록의 에너지를 줄이기 위해 변환 계수를 기 정의된 값으로 나누는 과정을 말한다. 변환 계수에 양자화를 적용하기 위해 정의된 값을 양자화 파라미터라고 정의한다.
시퀀스 단위 또는 블록 단위로 기-정의된 양자화 파라미터를 적용할 수 있다. 통상적으로 1에서 63 사이의 값으로 양자화 파라미터를 정의할 수 있다.
변환 및 양자화를 수행한 후에, 역양자화 및 역변환을 수행하여 잔차 복원 영상을 생성할 수 있다. 잔차 복원 영상에 예측 영상을 더해서 제1 복원 영상을 생성할 수 있다.
현재 블록의 변환 타입을 나타내는 인덱스 정보 'tu_mts_idx'를 비트스트림을 통해 시그날링할 수 있다. tu_mts_idx는 복수의 변환 타입 후보 중 하나를 지시하고, 각 변환 타입 후보는 수직 방향 변환 타입 및 수평 방향 변환 타입의 조합으로 구성될 수 있다. tu_mts_idx에 의해 특정되는 변환 타입 후보에 기초하여, 수직 방향 변환 및 수평 방향 변환의 스킵 여부 또는 수직 방향 변환 코어 및 수평 방향 변환 코어 중 적어도 하나가 결정될 수 있다. 변환 코어는, DCT-2, DCT-8, 또는 DST-7 중 적어도 하나를 포함할 수 있다. 또는, 변환 코어에 변환 스킵 모드가 더 포함될 수도 있다. 서브 파티션 부호화 방법을 사용하는 경우 각 서브 파티션 별로 서로 다른 변환 코어 세트를 사용할 수도 있고, 코딩 유닛 단위로 서로 같은 변환 코어 세트를 사용하도록 설정할 수도 있다. 이 때, 첫번째 서브 파티션에서만 tu_mts_idx를 비트스트림을 통해 시그날링할 수 있다.
구체적으로 예를 들어, 도 46의 좌측 그림과 같이 코딩 유닛 내에 있는 모든 서브 파티션에서 수평 방향 변환 코어로 DST-7을 사용하고, 수직 방향 변환 코어로 DCT-8을 사용할 수도 있다. 또 다른 예를 들어, 도 46의 우측 그림과 같이 코딩 유닛 내에 있는 모든 서브 파티션에서 수평 방향 변환 코어로 DCT-8을 사용하고, 수직 방향 변환 코어로 DST-8을 사용할 수도 있다.
도 47 및 도 48은 본 발명이 적용되는 일실시예로서, 복원 블록에 인루프 필터를 적용하는 방법을 도시한 것이다.
인루프 필터링(In-loop filtering)은 양자화 및 부호화 과정에서 발생하는 정보의 손실을 줄이기 위해 복호화 된 영상에 적응적으로 필터링을 수행하는 기술이다. 디블록킹 필터(Deblocking filter), 샘플 적응적 오프셋 필터(sample adaptive offset filter, SAO), 적응적 루프 필터(adaptive loop filter, ALF)는 인루프 필터링의 한 예이다.
제1 복원 영상에 디블록킹 필터 , 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 또는 적응적 루프 필터(adaptive loop filter, ALF) 중 적어도 어느 하나를 수행하여 제2 복원 영상을 생성할 수 있다.
복원 영상에 디블록킹 필터를 적용한 후, SAO 및 ALF를 적용할 수 있다.
비디오 부호화 과정에서 블록 단위로 변환과 양자화를 수행한다. 양자화 과정에서 발생한 손실이 발생하고, 이를 복원한 영상의 경계에서는 불연속이 발생한다. 블록 경계에 나타난 불연속 영상을 블록 화질 열화(blocking artifact)라고 정의 한다.
Deblocking filter는 제1 영상의 블록 경계에서 발생하는 블록 화질 열화(blocking artifact)를 완화시키고, 부호화 성능을 높여주는 방법이다.
블록 경계에서 필터링을 수행하여 블록 화질 열화를 완화 시킬수 있으며, 도 47과 같이 블록이 인트라 예측 모드로 부호화 되었는지 여부, 또는 이웃한 블록의 모션 벡터 절대값의 차이가 기 정의된 소정의 문턱값 보다 큰지 여부, 이웃한 블록의 참조 픽쳐가 서로 동일한 지 여부 중 적어도 어느 하나에 기초하여 블록 필터 강도(blocking strength, 이하 BS) 값을 결정할 수 있다. BS 값이 0이면 필터링을 수행하지 않으며, BS 값이 1 또는 2인 경우에 블록 경계에서 필터링을 수행할 수 있다.
변환 계수에 양자화를 수행하므로 주파수 영역에서 양자화를 수행하기 때문에, 물체 가장 자리에 링이 현상(ringing artifact)를 발생시키거나, 화소 값이 원본에 비해 일정한 값만큼 커지거나 작아기게 된다. SAO는 제1 복원 영상의 패턴을 고려하여 블록 단위로 특정 오프셋을 더하거나 빼는 방법으로 링잉 현상을 효과적으로 줄일 수 있다. SAO는 복원 영상의 특징에 따라 에지 오프셋(Edge offset, 이하 EO)과 밴드 오프셋(Band offset, BO)으로 구성된다. 에지 오프셋은 주변 화소 샘플 패턴에 따라 현재 샘플에 오프셋을 다르게 더해주는 방법이다. 밴드 오프셋은 영역 안의 비슷한 화소 밝기 값을 가진 화소 집합에 대해 일정 값을 더해 부호화 오류를 줄이는 것이다. 화소 밝기를 32개의 균일한 밴드로 나눠 비슷한 밝기 값을 가지는 화소를 하나의 집합이 되도록 할 수 있다. 예를 들어, 인접한 4개의 밴드를 하나의 범주로 묶을 수 있다. 하나의 범주에서는 동일한 오프셋 값을 사용하도록 설정할 수 있다.
ALF (Adaptive Loop Filter)는 수학식 20과 같이 제1 복원 영상 또는 제1 복원 영상에 deblocking filtering을 수행한 복원 영상에 기 정의된 필터 중 어느 하나를 사용하여 제2 복원 영상을 생성하는 방법이다.
[수학식 20]
Figure PCTKR2020004136-appb-I000001
이 때 필터는 픽쳐 단위 또는 CTU 단위로 선택할 수 있다.
Luma 성분에서는 다음 도 48와 같이 5x5, 7x7 또는 9x9 다이아몬드 형태 중 어느 하나를 선택할 수 있다. Chroma 성분에서는 5x5 다이아몬드 형태만 사용할 수 있도록 제한할 수도 있다.
도 49 내지 도 55는 본 발명이 적용되는 일실시예로서, 하나의 픽쳐를 다양한 유형의 조각 영역으로 분할하는 방법을 도시한 것이다.
파노라믹 비디오나 360도 비디오 내지 4K/8K UHD(Ultra High Definition)과 같은 실감 미디어 어플리케이션에서는 고해상도 영상을 사용한다. 고해상도 영상을 실시간 내지 저지연 부호화를 위해서 병렬화가 필요하다. 병렬화를 위해서는 픽쳐의 일정 영역이 서로 독립적으로 부호화/복호화할 수 있어야 한다. 이를 위해 부호화/복호화 장치는 다양한 유형의 조각 영역을 정의할 수 있다. 기-정의된 조각 영역의 유형은, 서브픽쳐, 슬라이스, 타일 또는 서브타일 중 적어도 하나를 포함할 수 있다. 하나의 픽쳐는 하나 또는 그 이상의 서브픽쳐로 분할될 수 있고, 서브픽쳐는 픽쳐와 같이 독립적인 부호화/복호화가 허용되는 기본 단위를 의미할 수 있다. 슬라이스 및/또는 타일은, 병렬적인 부호화/복호화가 허용되는 기분 단위를 의미할 수 있다. 슬라이스는 래스터 스캔(raster scan)에 따른 복수의 CTU로 구성될 수도 있고(이하, 제1 타입), 복수의 CTU를 커버하는 정방형 혹은 비정방형의 영역으로 정의될 수도 있다(이하, 제2 타입). 타일은, 하나의 픽쳐를 가로지르는 수직 및/또는 수평 라인에 의해 구획된 영역을 의미할 수 있다.
하나의 슬라이스는 하나 또는 그 이상의 타일로 구성될 수 있다. 다만, 하나의 슬라이스는 복수의 타일을 완전히 커버하며, 하나의 타일이 복수의 슬라이스에 걸치도록 분할되는 경우는 허용되지 않을 수 있다. 하나의 슬라이스는 하나 또는 그 이상의 서브픽쳐로 구성될 수 있다. 다만, 하나의 슬라이스는 복수의 서브픽쳐를 완전히 커버하며, 하나의 서브픽쳐가 복수의 슬라이스에 걸치도록 분할되는 경우는 허용되지 않을 수 있다. 하나의 서브픽쳐는 항상 하나의 슬라이스보다 크거나 같도록 제한될 수도 있다. 슬라이스가 제1 타입으로 구획되는 경우, 서브픽쳐로의 분할이 허용되지 않고, 슬라이스가 제2 타입으로 구획되는 경우, 서브픽쳐로의 분할이 허용될 수 있다. 또는, 서브픽쳐로의 분할이 허용되는 경우, 슬라이스는 제2 타입으로만 구획되도록 제한될 수도 있다.
하나의 타일은 하나 또는 그 이상의 서브픽쳐로 구성될 수도 있다. 여기서, 서브픽쳐는 서브타일을 의미할 수도 있다. 하나의 타일은 복수의 서브픽쳐를 완전히 커버하며, 하나의 서브픽쳐가 복수의 타일에 걸치도록 분할되는 경우는 허용되지 않을 수 있다. 또는, 하나의 타일은 하나 또는 그 이상의 슬라이스로 구성될 수도 있다. 여기서, 슬라이스는 서브타일을 의미할 수도 있다. 하나의 타일은 복수의 슬라이스를 완전히 커버하며, 하나의 슬라이스가 복수의 타일에 걸치도록 분할되는 경우는 허용되지 않을 수 있다.
서브픽쳐를 특정하기 위한 정보(이하, 서브픽쳐 정보)가 시그날링될 수 있다. 서브픽쳐 정보는, 하나의 픽쳐를 구성하는 서브픽쳐의 개수 정보, 서브픽쳐의 경계를 가로지르는 인트라/인터 예측 또는 인-루프 필터링이 허용되는지 여부를 나타내는 정보, 서브픽쳐의 위치/크기 정보 또는 서브픽쳐의 식별자(ID) 중 적어도 하나를 포함할 수 있다. 서브픽쳐의 위치 정보는 서브픽쳐 내 특정 CTU의 위치 정보로 표현될 수 있다. 여기서, 특정 CTU는 서브픽쳐 내 좌상단 CTU 또는 우하단 CTU를 의미할 수 있다. 또한, 서브픽쳐 정보는, 서브픽쳐를 하나의 픽쳐로 처리할지 여부를 나타내는 정보 또는 전술한 서브픽쳐 정보가 시그날링되는 위치 또는 단위(e.g., 비디오 시퀀스, 픽쳐 등)를 특정하는 정보 중 적어도 하나를 더 포함할 수 있다. 다만, 서브픽쳐를 하나의 픽쳐로 처리할지 여부를 나타내는 정보는, 서브픽쳐의 경계를 가로지르는 인트라/인터 예측 또는 인-루프 필터링이 허용되는지 여부를 나타내는 정보에 종속적으로 시그날링될 수 있다.
타일을 특정하는 정보(이하, 타일 정보)와 슬라이스를 특정하는 정보(이하, 슬라이스 정보)가 각각 시그날링될 수 있다. 다만, 타일 정보와 슬라이스 정보는, 현재 픽쳐가 부호화/복호화 장치에 기-정의된 복수의 유형 중 적어도 하나에 기초하여 분할되는 경우에 한하여 시그날링될 수 있다. 이를 위해, 현재 픽쳐가 슬라이스 또는 타일 중 적어도 하나에 의해 분할되는지 여부를 나타내는 플래그가 이용될 수 있다. 전술한 서브픽쳐 정보 또한 상기 플래그에 따라 현재 픽쳐가 복수의 유형 중 적어도 하나에 기초하여 분할되는 경우에 한하여 시그날링될 수도 있다.
타일 정보는, 수직 방향으로 분할되는 타일의 개수 정보, 수평 방향으로 분할되는 타일의 개수 정보 또는 각 타일의 크기 정보 중 적어도 하나를 포함할 수 있다.
슬라이스 정보는, 하나의 슬라이스에 속한 복수의 타일이 래스터 스캔 순서를 가지는지 아니면 사각 영역을 커버하는지를 나타내는 제1 정보를 포함할 수 있다. 상기 제1 정보에 따라 하나의 슬라이스에 속한 복수의 타일이 래스터 스캔 순서를 가지는 경우, 추가적인 슬라이스 정보가 시그날링되지 않을 수 있다. 하나의 슬라이스에 속한 복수의 타일이 사각 영역을 커버하는 경우에 한하여 추가적인 슬라이스 정보가 시그날링될 수 있다.
추가적인 슬라이스 정보는, 서브픽쳐가 하나의 슬라이스로 구성되는지 여부를 나타내는 정보, 픽쳐 또는 서브픽쳐에 속한 슬라이스의 개수 정보 또는 각 슬라이스의 크기/위치 정보 중 적어도 하나를 포함할 수 있다. 슬라이스의 크기 정보는, 타일 또는 CTU 단위로 부호화될 수 있다. 슬라이스의 크기 정보에 기초하여, 하나의 타일에 복수의 슬라이스가 포함되는지 여부를 식별할 수 있다. 만일 하나의 타일에 복수의 슬라이스가 포함된 것으로 식별된 경우, 하나의 타일에 속한 슬라이스의 개수 정보 및 크기 정보가 시그날링될 수 있다. 여기서, 슬라이스는 타일을 수평 방향으로만 분할하여 생성될 수 있고, 이 경우 크기 정보로 슬라이스의 높이를 나타내는 정보만이 시그날링될 수 있다. 다만, 이에 한정되지 아니하며, 슬라이스는 타일을 수직 방향으로만 분할하여 생성될 수도 있고, 이 경우 크기 정보로 슬라이스의 너비를 나타내는 정보만이 시그날링될 수 있다. 또는, 슬라이스는 타일을 수직 및 수평 방향으로 분할하여 생성될 수도 있고, 이 경우 크기 정보로 슬라이스의 높이 및 너비를 나타내는 정보가 각각 시그날링될 수 있다. 상기 슬라이스의 위치 정보는, i번째 슬라이스 내 첫번째 타일 인덱스와 (i+1)번째 슬라이스 내 첫번째 타일 인덱스 간의 차이로 부호화될 수 있다. 즉, (i+1)번째 슬라이스의 위치는, i번째 슬라이스의 위치 정보와 부호화된 차이에 기초하여 결정될 수 있다. 다만, 이에 한정되지 아니하며, 슬라이스의 위치 정보는 양 슬라이스 내 마지막 타일 인덱스 간의 차이로 부호화될 수 있다. 하나의 픽쳐 내 첫번째 슬라이스 또는 마지막 슬라이스에 대한 위치 정보는 생략될 수도 있다.
타일(tile)은 비디오의 병렬화를 지원하기 위한 하나의 도구이다. 타일은 직사각형(rectangular) 형태를 가질 수 있다. 또는, 비직사각형 형태의 타일을 허용할 수 있다. 비직사각형 형태의 타일이 존재하는지 여부를 나타내는 정보가 부호화될 수 있다. 다른 타일에 있는 데이터에서 영상 부호화/복호화에 필요한 정보를 유도하지 않는다. 각 타일 단위로 CABAC(Context adaptive Binary Arithmetric Coding) 컨텍스트의 확률 테이블을 초기화할 수 있다. 타일 바운더리(이웃한 두 타일의 경계 부분)에서 in-loop filter를 사용하지 않도록 설정할 수 있다. 또는, 타일 바운더리에서 in-loop filter 사용 여부를 나타내는 정보가 부호화될 수 있다.
도 49와 같이 좌측 또는 우측으로 인접한 타일의 높이는 서로 같도록 구성(이하, 가로 방향 타일 세트)할 수도 있고, 위쪽 또는 아래쪽으로 인접한 타일의 너비가 같도록 구성(이하, 세로 방향 타일 세트)할 수도 있으며, 픽쳐 내에서 픽쳐 바운더리에 인접한 타일들 제외한 모든 타일들이 모두 동일한 크기를 갖도록 제한할 수도 있다.
픽쳐 파라미터 세트 또는 시퀀스 파라미터 세트 또는 슬라이스 헤더에 픽쳐 내에 세로 방향 타일 세트의 개수가 몇개인지를 나타내는 신택스 num_tile_columns_minus1을 시그날링할 수 있다. 도 49의 예시에서는 세로 방향 타일 세트의 개수는 4이며, 이를 나타내는 신택스 num_tile_columns_minus1 값은 3으로 설정할 수 있다. 각 세로 방향 타일 세트의 너비를 나타내는 신택스 column_width_minus1을 시그날링할 수 있다.
픽쳐 파라미터 세트 또는 시퀀스 파라미터 세트 또는 슬라이스 헤더에 픽쳐 내에 가로 방향 타일 세트의 개수가 몇개인지를 나타내는 신택스 num_tile_rows_minus1을 시그날링할 수 있다. 도 49의 예시에서는 가로 방향 타일 세트의 개수는 3이며, 이를 나타내는 신택스 num_tile_rows_minus1 값은 2으로 설정할 수 있다. 각 가로 방향 타일 세트의 높이를 나타내는 신택스 row_height_minus1을 시그날링할 수 있다.
다음 uniform_tile_spacing_flag은 픽쳐 내에 있는 각 타일의 너비 및 높이가 균등하게 나누어져 있는지를 나타내는 플래그이고, loop_filter_across_tiles_enabled_flag은 타일 바운더리(이웃한 두 타일의 경계 부분)에서 in-loop filter를 사용하지 않도록 설정하는지를 나타내는 플래그이다. 일예로, 표 7과 같은 신택스 테이블을 사용할 수도 있다.
...
if ( tile_enabled_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_tile_spacing_flag u(1)
if ( !uniform_tile_spacing_flag ) {
for ( i=0; i < num_tile_columns_minus1: i++ )
column_width_minus1[i] ue(v)
for ( i=0; i < num_tile_rows_minus1: i++ )
row_height_minus1[i] ue(v)
}
loop_filter_across_tiles_enabled_flag u(1)
}
...
uniform_tile_spacing_flag은 픽쳐 내에 있는 각 타일이 균등하게 나누어져 있는지를 나타내는 플래그이고, loop_filter_across_tiles_enabled_flag은 타일 바운더리(이웃한 두 타일의 경계 부분)에서 in-loop filter를 사용하지 않도록 설정하는지를 나타내는 플래그이다.
uniform_tile_spacing_flag의 값이 1인 경우, 가로 방향 타일 개수 num_tile_columns_minus1과 세로 방향 타일 개수 num_tile_rows_minus1를 기초로, 타일의 크기가 결정될 수 있다.
uniform_tile_spacing_flag의 값이 1인 경우, 각 타일의 너비 및 높이를 나타내는 정보가 부호화될 수 있다. 일 예로, i번째 타일의 너비를 나타내는 column_width_minus1[i] 및 i번째 타일의 높이를 나타내는 row_height_minus1[i]이 부호화될 수 있다. 또는, 타일들 간의 너비/높이의 차분값을 부호화할 수 있다.
구체적으로, 가로 방향 타일 세트에 속하는 타일 중 타일의 너비가 가장 작은 타일을 최소 너비 타일이라고 한다. 최소 너비 타일의 너비를 나타내는 신택스 min_column_width_minus1 값을 시그날링할 수 있으며, 최소 너비 타일의 너비는 min_column_width_minus1+1 값으로 설정할 수 있다.
세로 방향 타일 세트에 속하는 타일 중 타일의 높이가 가장 작은 타일을 최소 높이 타일이라고 한다. 최소 높이 타일의 높이를 나타내는 신택스 min_row_height_minus1값을 시그날링할 수 있으며, 최소 높이 타일의 높이는 min_row_height_minus1+1 값으로 설정할 수 있다.
표 8과 같이, 최소 너비 타일과 i번째 타일의 너비 사이의 차분값을 나타내는 정보 diff_column_width[i] 및 최소 높이 타일과 i번째 타일의 높이 사이의 차분값을 나타내는 정보 diff_row_height[i]를 부호화할 수 있다.
...
if ( tile_enabled_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_tile_spacing_flag u(1)
if ( !uniform_tile_spacing_flag ) {
min_column_width_minus1
min_row_height_minus1
for ( i=0; i < num_tile_columns_minus1: i++ )
diff_column_width[i] ue(v)
for ( i=0; i < num_tile_rows_minus1: i++ )
diff_row_height[i] ue(v)
}
loop_filter_across_tiles_enabled_flag u(1)
}
...
가로 방향 타일 세트의 높이는 다음 수학식 21과 같이 유도할 수 있다.
[수학식 21]
column_width_minus[1] = min_columnn_width_minus1 + diff_column_width[i]
세로 방향 타일 세트의 타일 높이는 다음 수학식 22와 같이 유도할 수 있다.
[수학식 22]
row_height_minus[1] = min_row_height_minus1 + diff_row_height[i]
또는, i번째 타일과 i-1번째 타일 사이의 너비 차분값 또는 높이 차분값을 부호화할 수 있다.
표 9와 같이 동일 크기 타일 플래그 uniform_tile_spacing_flag를 비트스트림을 통해 시그날링할 수 있다. Uniform_tile_spacing_flag 값이 1이면 픽쳐 내에 있는 각 타일의 너비가 균등하게 나누어 져 있으며, 각 타일의 높이도 균등하게 나누어져 있음을 나타낸다. Uniform_tile_spacing_flag 값이 0인 경우에 한정하여 각 타일의 너비를 나타내는 신택스 tile_column_width_minus1과 각 티일의 너비를 나타내는 신택스 tile_row_height_minus1를 시그날링 할 수 있다.
pic_parameter_set_rbsp( ) { Descriptor
pps_pic_parameter_set_id ue(v)
pps_seq_parameter_set_id ue(v)
transform_skip_enabled_flag u(1)
single_tile_in_pic_flag u(1)
if( !single_tile_in_pic_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_tile_spacing_flag u(1)
if( !uniform_tile_spacing_flag ) {
for( i = 0; i < num_tile_columns_minus1; i++ )
tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_tile_rows_minus1; i++ )
tile_row_height_minus1[ i ] ue(v)
}
single_tile_per_tile_group_flag u(1)
if(!single_tile_per_tile_group_flag )
rect_tile_group_flag u(1)
if( rect_tile_group_flag && !single_tile_per_tile_group_flag ) {
num_tile_groups_in_pic_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ) {
if( i > 0)
top_left_tile_idx[ i ] u(v)
bottom_right_tile_idx[ i ] u(v)
}
}
loop_filter_across_tiles_enabled_flag u(1)
}
if( rect_tile_group_flag ) {
signalled_tile_group_id_flag u(1)
if( signalled_tile_group_id_flag ) {
signalled_tile_group_id_length_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ )
tile_group_id[ i ] u(v)
}
rbsp_trailing_bits( )
}
적어도 하나 이상의 타일을 포함하는 타일 그룹을 정의할 수 있다. 픽처 내 타일 그룹 구성에 관한 정보가 부호화될 수 있다. 타일 그룹 구성에 관한 정보는, 픽처가 하나의 타일로 구성되어 있는지 여부를 나타내는 플래그(e.g., single_tile_in_pic_flag), 각 타일 그룹이 하나의 타일만으로 구성되어 있는지 여부를 나타내는 플래그(e.g., single_tile_per_tile_group_flag), 타일 그룹이 사각형인지 여부를 나타내는 플래그(e.g., rect_tile_group_flag), 픽처 내 타일 그룹의 개수를 나타내는 정보(e.g., num_tile_groups_in_pic_minus1), 타일 그룹의 가로 방향 개수를 나타내는 정보(e.g., num_tile_columns_minus1), 타일 그룹의 세로 방향 개수를 나타내는 정보(e.g., num_tile_rows_minus1) 중 적어도 하나를 포함할 수 있다.
타일 그룹 별로 각 타일 그룹에 포함된 타일들의 너비/높이가 균등하게 나누어져 있는지를 나타내는 신택스를 부호화할 수 있다. 표 11과 같이 타일 그룹 i에 있는 각 타일의 너비가 균등하게 나누어져 있는지를 나타내는 신택스 uniform_tile_spacing_inTG[i]를 비트스트림을 통해 시그날링할 수 있다. uniform_tile_spacing_inTG[i] 값이 1 이면, i 번째 타일 그룹 내에 있는 타일의 너비가 균등하게 나뉘어져 있음을 나타내고, uniform_tile_spacing_inTG[i] 값이 1 이면, i 번째 타일 그룹 내에 있는 타일의 너비가 균등하게 나뉘어져 있음을 나타낸다.
uniform_tile_spacing_inTG[i]는 uniform_tile_spacing_flag 값이 0인 경우에만 시그날링될 수 있으며, 시그날링되지 않은 경우에는 그 값을 0으로 설정할 수 있다. 또는, 타일 그룹의 형태에 따라, uniform_tile_spacing_inTG[i]의 부호화 여부가 결정될 수 있다. 일 예로, 타일 그룹이 사각형인 경우에 한하여 uniform_tile_spacing_inTG[i]가 부호화될 수 있다. 타일 그룹이 비-사각 형태인 경우, uniform_tile_spacing_inTG[i]의 부호화는 생략될 수 있다.
각 타일 그룹 별로 세로 방향 타일 세트의 너비를 나타내는 신택스 column_width_minus1을 시그날링할 수 있다. 각 타일 그룹 별로 가로 방향 타일 세트의 개수를 나타내는 신택스 num_tile_rows_minus1을 시그날링할 수 있다.
uniform_tile_spacing_inTG[i] 값이 0인 경우에 한정하여 타일의 너비를 나타내는 신택스 tile_column_width_minus1 및 높이를 나타내는 신택스 tile_row_height_minus1를 시그날링할 수 있다.
pic_parameter_set_rbsp( ) { Descriptor
pps_pic_parameter_set_id ue(v)
pps_seq_parameter_set_id ue(v)
transform_skip_enabled_flag u(1)
single_tile_in_pic_flag u(1)
single_tile_per_tile_group_flag u(1)
if(!single_tile_per_tile_group_flag )
rect_tile_group_flag u(1)
if( rect_tile_group_flag && !single_tile_per_tile_group_flag ) {
num_tile_groups_in_pic_minus1 ue(v)
if( !single_tile_in_pic_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
}
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ) {
if( i > 0)
top_left_tile_idx[ i ] u(v)
bottom_right_tile_idx[ i ] u(v)
num_tile_columns_minus_inTG[i]
num_tile_rows_minus1_inTG[i]
if (!uniform_tile_spacing_flag){
uniform_tile_spacing_inTG[i]
if (!uniform_tile_spacing_inTG[i]){
for( j = 0; j < num_tile_columns_minus1_inTG[i]; j++ )
tile_column_width_minus1[ i ][j] ue(v)
for( j = 0; j < num_tile_rows_minus1_inTG[i]; j++ )
tile_row_height_minus1[ i ][j] ue(v)
}
}
}
}
loop_filter_across_tiles_enabled_flag u(1)
}
if( rect_tile_group_flag ) {
signalled_tile_group_id_flag u(1)
if( signalled_tile_group_id_flag ) {
signalled_tile_group_id_length_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ )
tile_group_id[ i ] u(v)
}
rbsp_trailing_bits( )
}
타일 그룹(Tile group)은 도 50과 같이 복수 개의 타일로 정의할 수 있다. 타일 그룹을 특정하기 위해 tile_group_index를 비트스트림을 통해 시그날링할 수 있으며, 시퀀스 또는 픽쳐 내에 총 타일 그룹의 개수를 나타내는 신택스 numTotalTileGruop_minus1을 시그날링할 수 있다. TileGroup이 시작하는 위치의 CTU 주소 (CTU address ) 내지 Tile 주소 (Tile address)를 시그날링할 수 있다.
각 타일 그룹 내 타일의 너비 및 높이는 서로 다르게 설정할 수도 있다. 일 예로, 도 50에서 tile group1에 속한 Tile3와 Tile4의 높이는 서로 다르게 설정되어 있다.
인접하는 타일들의 높이가 상이한 경우, 높이가 상이한 타일들은 서로 다른 타일 그룹에 포함되도록 설정할 수 있다. 여기서, 타일간의 인접성은, 공간적 위치 또는 스캔 순서를 기초로 결정될 수 있다. 일 예로, raster scan order를 따를 경우, 도 51의 Tile 3과 Tile 4는 상호 인접한 것으로 결정될 수 있다. 도 51과 같이 Tile3와 Tile4의 높이가 서로 다른 경우에는 다른 tile group에 속하도록 설정할 수도 있다.
Tile group은 사각 형태로 구성할 수도 있으며, 이를 사각 타일 그룹이라 한다. 픽쳐 파라미터 세트에 tile group이 사각 형태로 구성되어 있는지를 나타내는 신택스 rect_tile_group_flag을 비트스트림을 통해 전송할 수 있다. rect_tile_group_flag 값이 1이면, tile group이 사각 형태로 구성될 수 있음을 나타낸다.
사각 타일 그룹인 경우, 타일 그룹의 좌상단에 위치한 타일의 아이디(이하, top_left_tile_idx) 및 우상단에 위치한 타일의 아이디(이하, bottom_right_tile_idx)를 비트스트림을 통해 전송할 수 있다.
Tile group 내 복수 개의 타일을 갖는지를 나타내는 플래그 isMultipleTileInTileG_flag을 시그날링 할 수도 있다.
isMultipleTileInTileG_flag 값이 1 이면, Tile group 내 적어도 2개 이상의 타일이 존재함을 나타내고, isMultipleTileInTileG_flag 값이 0이면, 픽쳐 내 모든 Tile group에서 1개의 타일만 존재함을 나타낸다.
사각 타일 그룹이면서 맨 마지막 타일 그룹인 경우에는 top_left_tile_idx 내지 bottom_right_tile_idx 중 적어도 하나를 시그날링하지 않고, 생략할 수 있다. 구체적으로 예를 들어, 도 52의 예와 같이 전체 타일 그룹의 개수는 4개인 경우, tile group0, tile group1, tile group2의 위치와 크기가 설정된 경우(각 타일 그룹 별 top_left_tile_idx 및 bottom_right_tile_idx를 시그날링하여 tile group0, tile group1, tile group2의 위치와 크기가 설정할 수 있다.
픽쳐의 맨 마지막 타일 그룹인 tile group3의 크기는 tile group0, tile group1, tile group2이 아닌 영역으로 설정할 수 있으며, 이 영역 중 가장 좌상단 타일의 아이디를 top_left_tile_idx값으로 유도하고, 가장 우하단 타일의 아이디를 bottom_right_tile_idx값으로 유도할 수 있다.
통상 하나의 Tile은 복수개의 CTU로 구성될 수 있다. 이때, 픽처 우측/하단 바운더리에 인접하는 타일을 제외하고는, 타일은 CTU 보다 작은 크기의 영역을 포함할 수 없다. 즉, 타일의 경계는 CTU의 경계와 동일하게 설정될 수 있다. 픽처의 우측 및 좌측 경계에 인접하는 타일들에서는 예외적으로 CTU보다 작은 크기의 영역을 포함할 수 있다.
예를 들어, uniform_tile_spacing_flag이 1인 경우에 첫번째 타일의 우측 경계는 3번째 CTU column(CTU 2, CTU 9)의 우측 경계로 설정될 수 있다.
다만, 이 경우, 각 타일의 크기가 상이해지는 문제가 발생한다. 일 예로, 도 53의 좌측 그림에서, 첫번째 타일의 크기는, 픽처의 우측에 인접하는 타일 및 픽처의 하단에 인접하는 타일과 상이하다.
타일을 더 작은 단위의 서브타일로 분할할 수도 있다. 예를 들어, 도 53의 Tile8과 같이, 특정 타일이 서브타일로 분할될 수도 있다. 서브타일은 Tile8과 같이 수직 및 수평 방향으로 분할할 수도 있고, 수평 방향으로만 분할할 수도 있다. 타일의 첫번째 서브타일에서 CABAC state를 초기화할 수도 있다. 즉 두번째 서브타일에서는 cabac state를 초기화하지 않을 수도 있다.
현재 픽쳐에 적어도 하나의 서브타일이 존재하는지를 나타내는 신택스 sub_tile_present_flag를 비트스트림을 통해 시그날링할 수 있다. sub_tile_present_flag 값이 1이면, 픽쳐 내 적어도 하나의 서브타일이 존재함을 나타내고, sub_tile_present_flag 값이 0이면, 픽쳐 내 서브타일이 존재하지 않음을 나타낸다.
타일 그룹 i에 있는 타일 중 서브타일이 사용되는 경우, 서브타일의 너비 및/또는 높이가 균등하게 나누어져 있는지를 나타내는 신택스 uniform_subtile_spacing_flag[i]를 비트스트림을 통해 시그날링할 수 있다.
uniform_subtile_spacing_flag[i] 가 1이면 타일 그룹 i 또는 타일 i에 있는 서브타일의 너비 및/또는 높이가 균등하게 나누어져 있음을 나타낸다.
서브타일의 개수를 나타내는 플래그 num_subtile_row_minus1를 비트스트림을 통해 시그날링할 수 있다.
uniform_subtile_spacing_flag[i]가 1일 때, 타일을 균등하게 나눌 서브타일의 높이를 나타내는 신택스 subtile_rows_height_minus1를 시그날링할 수 있다. 예를 들어, subtile_row_height_minus1이 7이면 타일 그룹 또는 타일 내 서브타일의 높이가 8이 되도록 균등하게 분할할 수 있음을 나타낸다.
각 타일 별로 서브타일로 분할하는지를 나타내는 플래그 sub_tile_split_flag[j]를 시그날링할 수 있다. sub_tile_split_flag[j] 값이 1이면, 타일 인덱스가 j인 타일(이하, j번째 타일)이 서브타일로 분할됨을 나타낸다.
uniform_subtile_spacing_flag[i]가 0이고 sub_tile_split_flag[j] 값이 1이면, j번째 타일 내 서브타일의 가로 방향 개수를 나타내는 신택스 num_sub_tile_columns_minus1[j] 및 세로 방향 개수를 나타내는 신택스 num_sub_tile_rows_minus1[ j ]를 비트스트림으로 전송할 수 있다.
타일 내에서 좌측 또는 우측으로 인접한 서브타일의 높이는 서로 같도록 구성(이하, 가로 방향 서브타일 세트)할 수도 있고, 위쪽 또는 아래쪽으로 인접한 서브타일의 너비가 같도록 구성(이하, 세로 방향 서브타일 세트)할 수도 있다.
각 타일 별로 세로 방향 서브타일 세트의 너비를 나타내는 신택스 sub_tile_column_width_minus1을 시그날링할 수 있다. 각 타일 별로 가로 방향 타일 세트의 개수를 나타내는 신택스 sub_tile_num_tile_rows_minus1을 시그날링할 수 있다.
다음 표 11 내지 표 12와 같은 신택스 테이블을 이용하여 타일 및 서브타일의 정보를 시그날링할 수 있다.
pic_parameter_set_rbsp( ) { Descriptor
pps_pic_parameter_set_id ue(v)
pps_seq_parameter_set_id ue(v)
single_tile_in_pic_flag u(1)
if( !single_tile_in_pic_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_tile_spacing_flag u(1)
if( !uniform_tile_spacing_flag ) {
for( i = 0; i < num_tile_columns_minus1; i++ )
tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_tile_rows_minus1; i++ )
tile_row_height_minus1[ i ] ue(v)
}
single_tile_per_tile_group_flag u(1)
if( !single_tile_per_tile_group_flag ){
rect_tile_group_flag u(1)
sub_tile_present_flag u(1)
}
if( rect_tile_group_flag && !single_tile_per_tile_group_flag ) {
num_tile_groups_in_pic_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ) {
if( i > 0 )
top_left_tile_idx[ i ] u(v)
bottom_right_tile_idx[ i ] u(v)
}
}
loop_filter_across_tiles_enabled_flag u(1)
if( loop_filter_across_tiles_enabled_flag )
loop_filter_across_tile_groups_enabled_flag u(1)
}
if( rect_tile_group_flag ) {
signalled_tile_group_id_flag u(1)
if( signalled_tile_group_id_flag ) {
signalled_tile_group_id_length_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ){
tile_group_id[ i ] u(v)
if (sub_tile_present_flag)
uniform_subtile_spacing_flag[i]
}
}
}
for( j = 0; sub_tile_present_flag && j < NumofTiles; i++ ) {
sub_tile_split_flag[ji ] u(1)
if( sub_tile_split_flag && !uniform_subtile_spacing_flag) {
num_sub_tile_columns_minus1[ j ] ue(v)
num_sub_tile_rows_minus1[ j ] ue(v)
for( i = 0; i < num_sub_tile_columns_minus1; i++ )
sub_tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_sub_tile_rows_minus1; i++ )
sub _tile_row_height_minus1[ i ] ue(v)
}
}
}
...
}
pic_parameter_set_rbsp( ) { Descriptor
pps_pic_parameter_set_id ue(v)
pps_seq_parameter_set_id ue(v)
single_tile_in_pic_flag u(1)
if( !single_tile_in_pic_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_tile_spacing_flag u(1)
if( !uniform_tile_spacing_flag ) {
for( i = 0; i < num_tile_columns_minus1; i++ )
tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_tile_rows_minus1; i++ )
tile_row_height_minus1[ i ] ue(v)
}
sub_tile_present_flag u(1)
if (sub_tile_present_flag)
uniform_subtile_spacing_flag[i] u(1)
for( j = 0; sub_tile_present_flag && j < NumofTiles; i++ ) {
sub_tile_split_flag[ji ] u(1)
num_subtile_row_minus1 ue(v)
if (uniform_subtile_spacing_flag)
subtile_rows_height_minus1 ue(v)
if( sub_tile_split_flag && !uniform_subtile_spacing_flag) {
num_sub_tile_columns_minus1[ j ] ue(v)
num_sub_tile_rows_minus1[ j ] ue(v)
for( i = 0; i < num_sub_tile_columns_minus1; i++ )
sub_tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_sub_tile_rows_minus1; i++ )
sub _tile_row_height_minus1[ i ] ue(v)
}
}
single_tile_per_tile_group_flag u(1)
if( !single_tile_per_tile_group_flag ){
rect_tile_group_flag u(1)
}
if( rect_tile_group_flag && !single_tile_per_tile_group_flag ) {
num_tile_groups_in_pic_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ) {
if( i > 0 )
top_left_tile_idx[ i ] u(v)
bottom_right_tile_idx[ i ] u(v)
}
}
loop_filter_across_tiles_enabled_flag u(1)
if( loop_filter_across_tiles_enabled_flag )
loop_filter_across_tile_groups_enabled_flag u(1)
}
if( rect_tile_group_flag ) {
signalled_tile_group_id_flag u(1)
if( signalled_tile_group_id_flag ) {
signalled_tile_group_id_length_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ){
tile_group_id[ i ] u(v)
}
}
}
...
}
표 13과 같이 uniform_subtile_spacing_flag 값이 1이면, 서브타일의 개수를 나타내는 플래그 num_subtile_row_minus1를 시그날링하지 않을 수 있다. 이때 num_subtile_row_minus1는 subtile_rows_height_minus1로부터 유도할 수 있다.
pic_parameter_set_rbsp( ) { Descriptor
pps_pic_parameter_set_id ue(v)
pps_seq_parameter_set_id ue(v)
single_tile_in_pic_flag u(1)
if( !single_tile_in_pic_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_tile_spacing_flag u(1)
if( !uniform_tile_spacing_flag ) {
for( i = 0; i < num_tile_columns_minus1; i++ )
tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_tile_rows_minus1; i++ )
tile_row_height_minus1[ i ] ue(v)
}
sub_tile_present_flag u(1)
if (sub_tile_present_flag)
uniform_subtile_spacing_flag[i] u(1)
for( j = 0; sub_tile_present_flag && j < NumofTiles; i++ ) {
sub_tile_split_flag[ji ] u(1)
if (sub_tile_split_flag && uniform_subtile_spacing_flag)
subtile_rows_height_minus1 ue(v)
if( sub_tile_split_flag && !uniform_subtile_spacing_flag) {
num_subtile_row_minus1
num_sub_tile_columns_minus1[ j ] ue(v)
num_sub_tile_rows_minus1[ j ] ue(v)
for( i = 0; i < num_sub_tile_columns_minus1; i++ )
sub_tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_sub_tile_rows_minus1; i++ )
sub _tile_row_height_minus1[ i ] ue(v)
}
}
single_tile_per_tile_group_flag u(1)
if( !single_tile_per_tile_group_flag ){
rect_tile_group_flag u(1)
}
if( rect_tile_group_flag && !single_tile_per_tile_group_flag ) {
num_tile_groups_in_pic_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ) {
if( i > 0 )
top_left_tile_idx[ i ] u(v)
bottom_right_tile_idx[ i ] u(v)
}
}
loop_filter_across_tiles_enabled_flag u(1)
if( loop_filter_across_tiles_enabled_flag )
loop_filter_across_tile_groups_enabled_flag u(1)
}
if( rect_tile_group_flag ) {
signalled_tile_group_id_flag u(1)
if( signalled_tile_group_id_flag ) {
signalled_tile_group_id_length_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ){
tile_group_id[ i ] u(v)
}
}
}
...
}
구체적으로 예를 들어, 수학식 23과 같이 num_subtile_row_minus1 값을 유도할 수 있다.
[수학식 23]
num_subtile_row_minus1 = (TileWidth / subtile_rows_height_minus1)
표 14와 같이 서브타일의 위치 를 나타내는 플래그 top_left_brick_idx 및 bottom_right_brick_idx를 비트스트림을 통해 시그날링할 수도 있다.
pic_parameter_set_rbsp( ) { Descriptor
pps_pic_parameter_set_id ue(v)
pps_seq_parameter_set_id ue(v)
single_tile_in_pic_flag u(1)
if( !single_tile_in_pic_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_tile_spacing_flag u(1)
if( !uniform_tile_spacing_flag ) {
for( i = 0; i < num_tile_columns_minus1; i++ )
tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_tile_rows_minus1; i++ )
tile_row_height_minus1[ i ] ue(v)
}
sub_tile_present_flag u(1)
if (sub_tile_present_flag)
uniform_subtile_spacing_flag[i] u(1)
for( j = 0; sub_tile_present_flag && j < NumofTiles; i++ ) {
sub_tile_split_flag[ji ] u(1)
if (sub_tile_split_flag && uniform_subtile_spacing_flag)
subtile_rows_height_minus1 ue(v)
if( sub_tile_split_flag && !uniform_subtile_spacing_flag) {
num_subtile_row_minus1
num_sub_tile_columns_minus1[ j ] ue(v)
num_sub_tile_rows_minus1[ j ] ue(v)
for( i = 0; i < num_sub_tile_columns_minus1; i++ )
sub_tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_sub_tile_rows_minus1; i++ )
sub _tile_row_height_minus1[ i ] ue(v)
}
}
single_tile_per_tile_group_flag u(1)
if( !single_tile_per_tile_group_flag ){
rect_tile_group_flag u(1)
}
if( rect_tile_group_flag && !single_tile_per_tile_group_flag ) {
num_tile_groups_in_pic_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ) {
if( i > 0 )
top_left_tile_idx[ i ] u(v)
bottom_right_tile_idx[ i ] u(v)
for ( j= 0 ; j <= num_subtile_inTile; j++){
if (j>0)
top_left_subtile_idx[j] u(v)
if (i != num_tile_groups_in_pic_minus1)
bottom_right_subtile_idx[j] u(v)
}
}
}
loop_filter_across_tiles_enabled_flag u(1)
if( loop_filter_across_tiles_enabled_flag )
loop_filter_across_tile_groups_enabled_flag u(1)
}
if( rect_tile_group_flag ) {
signalled_tile_group_id_flag u(1)
if( signalled_tile_group_id_flag ) {
signalled_tile_group_id_length_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ){
tile_group_id[ i ] u(v)
}
}
}
...
}
다음 표 15와 같이 사각 타일 그룹에 속한 서브 그룹에 속하고, uniform_subtile_spacing_flag 값이 1이면, top_left_brick_idx 및 bottom_right_brick_idx를 중 적어도 어느하나를 시그날링하지 않을 수도 있다.
pic_parameter_set_rbsp( ) { Descriptor
pps_pic_parameter_set_id ue(v)
pps_seq_parameter_set_id ue(v)
single_tile_in_pic_flag u(1)
if( !single_tile_in_pic_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_tile_spacing_flag u(1)
if( !uniform_tile_spacing_flag ) {
for( i = 0; i < num_tile_columns_minus1; i++ )
tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_tile_rows_minus1; i++ )
tile_row_height_minus1[ i ] ue(v)
}
sub_tile_present_flag u(1)
if (sub_tile_present_flag)
uniform_subtile_spacing_flag[i] u(1)
for( j = 0; sub_tile_present_flag && j < NumofTiles; i++ ) {
sub_tile_split_flag[ji ] u(1)
if (sub_tile_split_flag && uniform_subtile_spacing_flag)
subtile_rows_height_minus1 ue(v)
if( sub_tile_split_flag && !uniform_subtile_spacing_flag) {
num_subtile_row_minus1
num_sub_tile_columns_minus1[ j ] ue(v)
num_sub_tile_rows_minus1[ j ] ue(v)
for( i = 0; i < num_sub_tile_columns_minus1; i++ )
sub_tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_sub_tile_rows_minus1; i++ )
sub _tile_row_height_minus1[ i ] ue(v)
}
}
single_tile_per_tile_group_flag u(1)
if( !single_tile_per_tile_group_flag ){
rect_tile_group_flag u(1)
}
if( rect_tile_group_flag && !single_tile_per_tile_group_flag ) {
num_tile_groups_in_pic_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ) {
if( i > 0 )
top_left_tile_idx[ i ] u(v)
bottom_right_tile_idx[ i ] u(v)
if (!uniform_subtile_spacing_flag){
for ( j= 0 ; j <= num_subtile_inTile; j++){
if (j>0)
top_left_subtile_idx[j] u(v)
if (i != num_tile_groups_in_pic_minus1)
bottom_right_subtile_idx[j] u(v)
}
}
}
}
loop_filter_across_tiles_enabled_flag u(1)
if( loop_filter_across_tiles_enabled_flag )
loop_filter_across_tile_groups_enabled_flag u(1)
}
if( rect_tile_group_flag ) {
signalled_tile_group_id_flag u(1)
if( signalled_tile_group_id_flag ) {
signalled_tile_group_id_length_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ){
tile_group_id[ i ] u(v)
}
}
}
...
}
다음 표 16과 같이 사각 타일 그룹에 속한 서브 그룹에 속하고, uniform_subtile_spacing_flag 값이 0이면, top_left_brick_idx 또는 bottom_right_brick_idx를 중 적어도 어느 하나를 시그날링하지 않을 수도 있다.
이 때, top_left_tile_idx[i] 값은 bottom_right_subtile_idx[j-1]+1로 유도할 수도 있다.
pic_parameter_set_rbsp( ) { Descriptor
pps_pic_parameter_set_id ue(v)
pps_seq_parameter_set_id ue(v)
single_tile_in_pic_flag u(1)
if( !single_tile_in_pic_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_tile_spacing_flag u(1)
if( !uniform_tile_spacing_flag ) {
for( i = 0; i < num_tile_columns_minus1; i++ )
tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_tile_rows_minus1; i++ )
tile_row_height_minus1[ i ] ue(v)
}
sub_tile_present_flag u(1)
if (sub_tile_present_flag)
uniform_subtile_spacing_flag[i] u(1)
for( j = 0; sub_tile_present_flag && j < NumofTiles; i++ ) {
sub_tile_split_flag[ji ] u(1)
if (sub_tile_split_flag && uniform_subtile_spacing_flag)
subtile_rows_height_minus1 ue(v)
if( sub_tile_split_flag && !uniform_subtile_spacing_flag) {
num_subtile_row_minus1
num_sub_tile_columns_minus1[ j ] ue(v)
num_sub_tile_rows_minus1[ j ] ue(v)
for( i = 0; i < num_sub_tile_columns_minus1; i++ )
sub_tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_sub_tile_rows_minus1; i++ )
sub _tile_row_height_minus1[ i ] ue(v)
}
}
single_tile_per_tile_group_flag u(1)
if( !single_tile_per_tile_group_flag ){
rect_tile_group_flag u(1)
}
if( rect_tile_group_flag && !single_tile_per_tile_group_flag ) {
num_tile_groups_in_pic_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ) {
if( i > 0 )
top_left_tile_idx[ i ] u(v)
bottom_right_tile_idx[ i ] u(v)
if (!uniform_subtile_spacing_flag){
for ( j= 0 ; j <= num_subtile_inTile; j++){
if (i != num_tile_groups_in_pic_minus1)
bottom_right_subtile_idx[j] u(v)
}
}
}
}
loop_filter_across_tiles_enabled_flag u(1)
if( loop_filter_across_tiles_enabled_flag )
loop_filter_across_tile_groups_enabled_flag u(1)
}
if( rect_tile_group_flag ) {
signalled_tile_group_id_flag u(1)
if( signalled_tile_group_id_flag ) {
signalled_tile_group_id_length_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ){
tile_group_id[ i ] u(v)
}
}
}
...
}
현재 타일의 세로 방향 서브타일 세트의 너비는 현재 타일이 속한 세로 방향 타일 세트의 너비보다 작게 설정할 수 있다. 즉, 현재 타일의 세로 방향 서브타일 세트의 너비는 현재 타일이 속한 세로 방향 타일 세트의 너비보다 같거나 크도록 설정할 수 없다.
또한 현재 타일의 가로 방향 서브타일 세트의 너비는 현재 타일이 속한 가로 방향 타일 세트의 너비보다 작게 설정할 수 있다. 즉, 현재 타일의 가로방향 서브타일 세트의 너비는 현재 타일이 속한 가로 방향 타일 세트의 너비보다 같거나 크도록 설정할 수 없다.
도 54와 같이 타일 그룹 내 모든 타일이 서브타일을 가질 수도 있다. 타일 그룹 내 모든 타일이 서브타일을 갖는지를 나타내는 신택스 isAll_subtile_flag을 비트스트림을 통해 시그날링할 수도 있다. isAll_subtile_flag 값이 1이면 타일 그룹 내 모든 타일이 서브타일이 존재함을 나타낸다. isAll_subtile_flag 값이 0이면 서브타일이 존재하지 않는 타일이 타일 그룹 내에 적어도 하나 존재함을 나타낸다. 다음 표 17과 같은 신택스 테이블을 이용하여 타일 및 서브타일의 정보를 시그날링할 수 있다.
pic_parameter_set_rbsp( ) { Descriptor
pps_pic_parameter_set_id ue(v)
pps_seq_parameter_set_id ue(v)
single_tile_in_pic_flag u(1)
if( !single_tile_in_pic_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_tile_spacing_flag u(1)
if( !uniform_tile_spacing_flag ) {
for( i = 0; i < num_tile_columns_minus1; i++ )
tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_tile_rows_minus1; i++ )
tile_row_height_minus1[ i ] ue(v)
}
single_tile_per_tile_group_flag u(1)
if( !single_tile_per_tile_group_flag ){
rect_tile_group_flag u(1)
sub_tile_present_flag u(1)
sub_tile_present_inTG_flag u(1)
}
if( rect_tile_group_flag && !single_tile_per_tile_group_flag ) {
num_tile_groups_in_pic_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ) {
if( i > 0 )
top_left_tile_idx[ i ] u(v)
bottom_right_tile_idx[ i ] u(v)
}
}
loop_filter_across_tiles_enabled_flag u(1)
if( loop_filter_across_tiles_enabled_flag )
loop_filter_across_tile_groups_enabled_flag u(1)
}
if( rect_tile_group_flag ) {
signalled_tile_group_id_flag u(1)
if( signalled_tile_group_id_flag ) {
signalled_tile_group_id_length_minus1 ue(v)
for( i = 0; i <= num_tile_groups_in_pic_minus1; i++ ){
tile_group_id[ i ] u(v)
if (sub_tile_present_inTG_flag){
uniform_subtile_spacing_flag[i] u(v)
isAll_subtile_flag u(v)
}
}
}
}
for( j = 0; sub_tile_present_inTG_flag && j < NumofTiles; i++ ) {
if (!isAll_subtile_flag)
sub_tile_split_flag[ji ] u(1)
if( sub_tile_split_flag || isAll_subtile_flag) {
num_sub_tile_columns_minus1[ j ] ue(v)
num_sub_tile_rows_minus1[ j ] ue(v)
for( i = 0; !uniform_subtile_spacing_flag && i < num_sub_tile_columns_minus1; i++ )
sub_tile_column_width_minus1[ i ] ue(v)
for( i = 0; i < num_sub_tile_rows_minus1; i++ )
sub _tile_row_height_minus1[ i ] ue(v)
}
}
}
...
}
통상 하나의 Tile은 복수개의 CTU로 구성될 수 있다. 이때, 픽처 우측/하단 바운더리에 인접하는 타일을 제외하고는, 타일은 CTU 보다 작은 크기의 영역을 포함할 수 없다. 즉, 타일의 경계는 CTU의 경계와 동일하게 설정될 수 있다. 픽처의 우측 및 좌측 경계에 인접하는 타일들에서는 예외적으로 CTU보다 작은 크기의 영역을 포함할 수 있다.
예를 들어, uniform_tile_spacing_flag이 1인 경우에 첫번째 타일의 우측 경계는 3번째 CTU column(CTU 2, CTU 9)의 우측 경계로 설정될 수 있다.
다만, 이 경우, 각 타일의 크기가 상이해지는 문제가 발생한다. 일 예로, 도 55의 좌측 그림에서, 첫번째 타일의 크기는, 픽처의 우측에 인접하는 타일 및 픽처의 하단에 인접하는 타일과 상이하다.
이에, CTU 크기 보다 작은 tile을 허용하여, 각 타일의 크기가 보다 균등해지도록 조절할 수 있다. 이를, 플렉서블 사이즈 타일이라고 정의한다.
예를 들어, uniform_tile_spacing_flag 이 1 인 경우에 도 55의 우측 그림 처럼 CTU보다 작은 영역이 타일에 속하도록 파티셔닝할 수 있다. 타일에 속하는 CTU보다 작은 영역을 최소 단위 타일 영역이라 한다. 타일 내 서브타일은 CTU 보다 크거나 같도록 설정할 수 있다. 플렉서블 사이즈 타일을 사용하는 경우에는 CTU보다 작은 서브타일을 사용할 수도 있다.
본 개시의 다양한 실시 예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시 예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.
또한, 본 개시의 다양한 실시 예는 하드웨어, 펌웨어(firmware), 소프트웨어, 또는 그들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 범용 프로세서(general processor), 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다.
본 개시의 범위는 다양한 실시 예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.
본 발명은 비디오를 부호화/복호화하기 위해 이용될 수 있다.

Claims (10)

  1. 기-정의된 예측 모드를 기반으로, 현재 블록의 예측 블록을 생성하는 단계;
    소정의 변환 타입에 기초하여, 상기 현재 블록의 잔차 블록을 생성하는 단계; 및
    상기 예측 블록과 상기 잔차 블록을 기반으로, 상기 현재 블록을 복원하는 단계를 포함하되,
    상기 현재 블록의 예측 모드가 머지 모드인 경우, 상기 예측 블록을 생성하는 단계는,
    상기 현재 블록의 머지 후보 리스트를 생성하는 단계;
    상기 머지 후보 리스트와 상기 현재 블록의 머지 인덱스를 기반으로, 상기 현재 블록의 모션 정보를 유도하는 단계; 및
    상기 유도된 모션 정보를 기반으로, 상기 현재 블록의 모션 보상을 수행하는 단계를 포함하고,
    상기 머지 후보 리스트는 공간적 머지 후보, 시간적 머지 후보 또는 모션 정보 리스트의 머지 후보 중 적어도 하나를 포함하고,
    상기 모션 정보 리스트는 상기 현재 블록 이전에 복호화된 하나 또는 그 이상의 이전 블록의 모션 정보로 구성되는, 영상 복호화 방법.
  2. 제1항에 있어서,
    상기 현재 블록의 모션 정보를 기반으로, 상기 모션 정보 리스트를 업데이트하는 단계를 더 포함하는, 영상 복호화 방법.
  3. 제2항에 있어서,
    상기 업데이트는, 상기 현재 블록이 병렬 머지 영역 내에서 가장 마지막 복호화 순서를 가진 블록인 경우에 한하여 수행되고,
    상기 병렬 머지 영역은 서로 독립적으로 복호화되는 복수의 코딩 블록으로 구성된 영역을 의미하는, 영상 복호화 방법.
  4. 제1항에 있어서,
    상기 현재 블록의 모션 정보는 모션 벡터, 참조 픽쳐 인덱스 또는 예측 방향 정보 중 적어도 하나를 포함하고,
    상기 현재 블록의 모션 보상을 수행하는 단계는,
    소정의 차분 모션 벡터(MVD)를 기반으로 상기 현재 블록의 모션 벡터를 보정하는 단계를 포함하는, 영상 복호화 방법.
  5. 제4항에 있어서,
    상기 차분 모션 벡터는, 제1 방향의 차분 모션 벡터(MVDL0)와 제2 방향의 차분 모션 벡터(MVDL1)를 포함하고,
    상기 제2 방향의 차분 모션 벡터는, 상기 제1 방향의 차분 모션 벡터와 크기는 동일하고 방향이 반대인 벡터로 설정되는, 영상 복호화 방법.
  6. 제4항에 있어서,
    상기 모션 벡터의 보정은, 상기 현재 블록의 부호화 파라미터에 기초하여 수행되고,
    상기 부호화 파라미터는, 상기 현재 블록의 예측 모드, 모션 정보 또는 크기 중 적어도 하나를 포함하는, 영상 복호화 방법.
  7. 제1항에 있어서,
    상기 변환 타입은 부호화 장치로부터 명시적으로 시그날링되는 정보 및 복호화 장치에 기-정의된 테이블에 기초하여 결정되는, 영상 복호화 방법.
  8. 제1항에 있어서,
    상기 변환 타입은 상기 현재 블록의 크기, 형태, 인트라 예측 모드 또는 성분 타입 중 적어도 하나에 기초하여 묵시적으로 유도되는, 영상 복호화 방법.
  9. 기-정의된 예측 모드를 기반으로, 현재 블록의 예측 블록을 생성하는 단계;
    상기 현재 블록의 원본 블록과 상기 예측 블록 간의 차분을 통해, 상기 현재 블록의 잔차 블록을 생성하는 단계; 및
    상기 잔차 블록의 잔치 데이터를 부호화하는 단계를 포함하되,
    상기 현재 블록의 예측 모드가 머지 모드인 경우, 상기 예측 블록을 생성하는 단계는,
    상기 현재 블록의 머지 후보 리스트를 생성하는 단계;
    상기 머지 후보 리스트로부터 상기 현재 블록의 모션 정보를 결정하는 단계; 및
    상기 결정된 모션 정보를 기반으로, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함하고,
    상기 머지 후보 리스트는 공간적 머지 후보, 시간적 머지 후보 또는 모션 정보 리스트의 머지 후보 중 적어도 하나를 포함하고,
    상기 모션 정보 리스트는 상기 현재 블록 이전에 부호화된 하나 또는 그 이상의 이전 블록의 모션 정보로 구성되는, 영상 부호화 방법.
  10. 영상 신호 복호화 방법에 의해 복호화되는 비트스트림을 저장하는 컴퓨터로 판독가능한 기록 매체에 있어서,
    상기 영상 신호 복호화 방법은,
    기-정의된 예측 모드를 기반으로, 현재 블록의 예측 블록을 생성하는 단계;
    소정의 변환 타입에 기초하여, 상기 현재 블록의 잔차 블록을 생성하는 단계; 및
    상기 예측 블록과 상기 잔차 블록을 기반으로, 상기 현재 블록을 복원하는 단계를 포함하되,
    상기 현재 블록의 예측 모드가 머지 모드인 경우, 상기 예측 블록을 생성하는 단계는,
    상기 현재 블록의 머지 후보 리스트를 생성하는 단계;
    상기 머지 후보 리스트와 상기 현재 블록의 머지 인덱스를 기반으로, 상기 현재 블록의 모션 정보를 유도하는 단계; 및
    상기 유도된 모션 정보를 기반으로, 상기 현재 블록의 모션 보상을 수행하는 단계를 포함하고,
    상기 머지 후보 리스트는 공간적 머지 후보, 시간적 머지 후보 또는 모션 정보 리스트의 머지 후보 중 적어도 하나를 포함하고,
    상기 모션 정보 리스트는 상기 현재 블록 이전에 복호화된 하나 또는 그 이상의 이전 블록의 모션 정보로 구성되는, 컴퓨터로 판독가능한 기록 매체.
PCT/KR2020/004136 2019-03-26 2020-03-26 영상 부호화/복호화 방법 및 장치 WO2020197290A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/440,248 US20220174287A1 (en) 2019-03-26 2020-03-26 Image encoding/decoding method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20190034020 2019-03-26
KR10-2019-0034020 2019-03-26

Publications (1)

Publication Number Publication Date
WO2020197290A1 true WO2020197290A1 (ko) 2020-10-01

Family

ID=72610618

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2020/004136 WO2020197290A1 (ko) 2019-03-26 2020-03-26 영상 부호화/복호화 방법 및 장치

Country Status (3)

Country Link
US (1) US20220174287A1 (ko)
KR (1) KR20200115322A (ko)
WO (1) WO2020197290A1 (ko)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2020116630A1 (ja) * 2018-12-07 2021-10-07 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 復号装置及び復号方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115398917A (zh) * 2020-04-02 2022-11-25 夏普株式会社 运动图像解码装置及运动图像解码方法
CN115443653A (zh) * 2020-04-07 2022-12-06 抖音视界有限公司 高级别语法中的帧间预测的信令通知
KR20240117573A (ko) * 2022-01-04 2024-08-01 엘지전자 주식회사 영상 인코딩/디코딩 방법 및 장치, 그리고 비트스트림을 저장한 기록 매체
CN118648280A (zh) * 2022-01-09 2024-09-13 Lg电子株式会社 图像编码/解码方法和装置及存储有比特流的记录介质
WO2023182781A1 (ko) * 2022-03-21 2023-09-28 주식회사 윌러스표준기술연구소 템플릿 매칭에 기초한 비디오 신호 처리 방법 및 이를 위한 장치
WO2024035659A1 (en) * 2022-08-06 2024-02-15 Beijing Dajia Internet Information Technology Co., Ltd. Fraction transform for video coding

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150145688A (ko) * 2014-06-20 2015-12-30 성균관대학교산학협력단 영상의 부호화/복호화 방법 및 이를 이용하는 장치
KR20160132952A (ko) * 2014-03-11 2016-11-21 에이치에프아이 이노베이션 인크. 비디오 코딩에 대한 단일 샘플 모드의 방법 및 장치
WO2018175720A1 (en) * 2017-03-22 2018-09-27 Qualcomm Incorporated Constraining motion vector information derived by decoder-side motion vector derivation
WO2018231700A1 (en) * 2017-06-13 2018-12-20 Qualcomm Incorporated Motion vector prediction

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9918105B2 (en) * 2014-10-07 2018-03-13 Qualcomm Incorporated Intra BC and inter unification
WO2020056798A1 (zh) * 2018-09-21 2020-03-26 华为技术有限公司 一种视频编解码的方法与装置
WO2020133518A1 (zh) * 2018-12-29 2020-07-02 深圳市大疆创新科技有限公司 视频处理方法和设备
WO2020180166A1 (ko) * 2019-03-07 2020-09-10 디지털인사이트주식회사 영상 부호화/복호화 방법 및 장치
KR20200113346A (ko) * 2019-03-25 2020-10-07 주식회사 엑스리스 비디오 신호 처리 방법 및 장치

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160132952A (ko) * 2014-03-11 2016-11-21 에이치에프아이 이노베이션 인크. 비디오 코딩에 대한 단일 샘플 모드의 방법 및 장치
KR20150145688A (ko) * 2014-06-20 2015-12-30 성균관대학교산학협력단 영상의 부호화/복호화 방법 및 이를 이용하는 장치
WO2018175720A1 (en) * 2017-03-22 2018-09-27 Qualcomm Incorporated Constraining motion vector information derived by decoder-side motion vector derivation
WO2018231700A1 (en) * 2017-06-13 2018-12-20 Qualcomm Incorporated Motion vector prediction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
PARK, NAERI ET AL.: "CE4-related : Candidates optimization on MMVD. JVET-M0307-v2", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11. 13TH MEETING, 12 January 2019 (2019-01-12), Marrakech, MA., Retrieved from the Internet <URL:http://phenix.it-sudparis.eu/jvetfctoc_end_user/cunem_document.php?id=5114> [retrieved on 20200609] *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2020116630A1 (ja) * 2018-12-07 2021-10-07 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 復号装置及び復号方法

Also Published As

Publication number Publication date
KR20200115322A (ko) 2020-10-07
US20220174287A1 (en) 2022-06-02

Similar Documents

Publication Publication Date Title
WO2020185022A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020076116A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2020096389A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020159198A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020197290A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2017176030A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020111785A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020076125A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020256442A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019083334A1 (ko) 비대칭 서브 블록 기반 영상 부호화/복호화 방법 및 장치
WO2017039117A1 (ko) 영상의 부호화/복호화 방법 및 이를 위한 장치
WO2020222617A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020096388A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2016137149A1 (ko) 폴리곤 유닛 기반 영상 처리 방법 및 이를 위한 장치
WO2019182292A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020060329A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020184979A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2021015581A1 (ko) 기하학적 분할을 사용하는 영상 부호화/복호화를 위한 방법, 장치 및 기록 매체
WO2021040321A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020096426A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020213963A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020060327A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2021049890A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020004978A1 (ko) 비디오 신호 처리 방법 및 장치
WO2015133838A1 (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: 20779319

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20779319

Country of ref document: EP

Kind code of ref document: A1