WO2021125752A1 - 영상 신호 부호화/복호화 방법 및 이를 위한 장치 - Google Patents

영상 신호 부호화/복호화 방법 및 이를 위한 장치 Download PDF

Info

Publication number
WO2021125752A1
WO2021125752A1 PCT/KR2020/018371 KR2020018371W WO2021125752A1 WO 2021125752 A1 WO2021125752 A1 WO 2021125752A1 KR 2020018371 W KR2020018371 W KR 2020018371W WO 2021125752 A1 WO2021125752 A1 WO 2021125752A1
Authority
WO
WIPO (PCT)
Prior art keywords
tile
slice
block
motion information
current block
Prior art date
Application number
PCT/KR2020/018371
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 EP20903142.6A priority Critical patent/EP4080883A4/en
Priority to CN202080010755.3A priority patent/CN113439439A/zh
Priority to US17/419,391 priority patent/US20220078435A1/en
Priority to JP2022535753A priority patent/JP7486586B2/ja
Publication of WO2021125752A1 publication Critical patent/WO2021125752A1/ko
Priority to ZA2021/10174A priority patent/ZA202110174B/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • 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/124Quantisation
    • 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • 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/174Methods 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 slice, e.g. a line of blocks or a group of 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/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/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Definitions

  • the present invention relates to a video signal encoding/decoding method and an apparatus therefor.
  • JCT-VC Joint Collaborative Team on Video Coding
  • An object of the present invention is to provide a method of dividing a picture into a plurality of tiles or a plurality of slices in encoding/decoding a video signal, and an apparatus for performing the method.
  • An object of the present invention is to provide a method for partitioning a slice based on a tile index when dividing a picture into a plurality of tiles, and an apparatus for performing the method.
  • An object of the present invention is to provide a method for partitioning a slice based on difference information from a previous slice when dividing a picture into a plurality of slices, and an apparatus for performing the method.
  • a video signal decoding method includes decoding a first flag indicating whether tile index difference value information exists, decoding size information on a first slice, and when the first flag is true, the Decoding the tile index difference value information for the first slice, and determining the index of the second tile positioned at the upper left of the second slice based on the tile index difference value information.
  • the tile index difference value information indicates a difference between the index of the first tile positioned at the upper left of the first slice and the index of the second tile, and whether size information on the second slice is to be decoded may be determined based on the index of the second tile in the second slice.
  • the size information includes at least one of width information and height information, and when the second tile is included in the rightmost tile column in the current picture, the second slice is Decoding of the width information for the .
  • the width of the rightmost tile column may be determined as the width of the second slice.
  • the height of the lowest tile column may be determined as the height of the second slice.
  • the first flag may be decoded only when the number of slices in the current picture is equal to or greater than a threshold value.
  • a video signal encoding method comprises the steps of determining sizes of a first slice and a second slice, encoding size information on the first slice, and tile index difference information on the first slice. encoding step.
  • the tile index difference value information indicates a difference between the index of the first tile positioned at the upper left of the first slice and the index of the second tile positioned at the upper left of the second slice, and Whether to encode the width information for the tile may be determined based on the index of the second tile.
  • encoding/decoding efficiency can be improved by dividing a picture into a plurality of tiles or slices.
  • encoding/decoding efficiency can be improved by partitioning a slice based on a tile index.
  • encoding/decoding efficiency can be improved by partitioning a slice based on difference information from a previous slice.
  • FIG. 1 is a block diagram of an image encoder (encoder) according to an embodiment of the present invention.
  • FIG. 2 is a block diagram of an image decoder (decoder) according to an embodiment of the present invention.
  • FIG. 3 is a diagram illustrating a basic coding tree unit according to an embodiment of the present invention.
  • FIG. 4 is a diagram illustrating various division forms of a coding block.
  • FIG. 5 is a diagram illustrating a splitting aspect of a coding tree unit.
  • FIG. 6 is a flowchart of an inter prediction method according to an embodiment of the present invention.
  • FIG. 7 is a diagram illustrating a non-linear movement of an object.
  • FIG. 8 is a flowchart of an inter prediction method based on affine motion according to an embodiment of the present invention.
  • FIG. 9 is a diagram illustrating an affine seed vector for each affine motion model.
  • 10 is a diagram illustrating affine vectors of sub-blocks under a 4-parameter motion model.
  • 11 is a flowchart of a process of deriving motion information of a current block under a merge mode.
  • FIG. 12 is a diagram illustrating candidate blocks used to derive a merge candidate.
  • FIG. 13 is a diagram for explaining an update aspect of a motion information table.
  • FIG. 14 is a diagram illustrating an update aspect of a motion information table.
  • 15 is a diagram illustrating an example in which indexes of pre-stored motion information candidates are updated.
  • 16 is a diagram illustrating an example in which a redundancy check is performed on only some of merge candidates.
  • 17 is a diagram illustrating an example in which a redundancy check with a specific merge candidate is omitted.
  • FIG. 18 is a diagram illustrating an example in which a candidate block included in the same merge processing area as a current block is set as unavailable as a merge candidate.
  • 19 is a diagram illustrating an example of deriving a merge candidate for the current block when the current block is included in the merge processing area.
  • 20 is a diagram illustrating a temporary motion information table.
  • 21 is a diagram illustrating an example of merging a motion information table and a temporary motion information table.
  • 22 is a flowchart of an intra prediction method according to an embodiment of the present invention.
  • FIG. 23 is a diagram illustrating intra prediction modes.
  • 24 and 25 are diagrams illustrating examples of a one-dimensional array in which reference samples are arranged in a line.
  • 26 is a diagram illustrating angles formed by directional intra prediction modes with a straight line parallel to the x-axis.
  • 27 is a diagram illustrating an aspect in which a prediction sample is obtained when the current block has a non-square shape.
  • 28 is a diagram illustrating wide-angle intra prediction modes.
  • 29 is a diagram illustrating an example of determining whether to skip transform for each sub-block.
  • FIG. 30 is a diagram illustrating an example in which sub-blocks use the same transform type.
  • 31 is a flowchart illustrating a process of determining block strength.
  • 33 is a diagram illustrating a picture division method according to an embodiment of the present invention.
  • 35 and 36 are diagrams illustrating an example in which a slice is defined based on a raster order.
  • FIG. 37 is a diagram illustrating an example in which only a rectangular slice is allowed.
  • 38 is a diagram illustrating an example of a case in which a picture consists of two slices.
  • 39 is a diagram illustrating a case in which the number of tile columns or tile rows in a picture is one.
  • Encoding and decoding of an image is performed in units of blocks.
  • encoding/decoding processing such as transform, quantization, prediction, in-loop filtering, or reconstruction may be performed on the coding block, the transform block, or the prediction block.
  • the current block may represent a coding block, a transform block, or a prediction block according to a current encoding/decoding process step.
  • the term 'unit' used in this specification indicates a basic unit for performing a specific encoding/decoding process
  • 'block' indicates a sample array of a predetermined size.
  • the terms 'block' and 'unit' may be used interchangeably.
  • a coding block and a coding unit have the same meaning.
  • FIG. 1 is a block diagram of an image encoder (encoder) according to an embodiment of the present invention.
  • the image encoding apparatus 100 includes a picture division unit 110 , prediction units 120 and 125 , a transform unit 130 , a quantization unit 135 , a rearrangement unit 160 , and an entropy encoding unit ( 165 ), an inverse quantization unit 140 , an inverse transform unit 145 , a filter unit 150 , and a memory 155 .
  • each of the constituent units shown in FIG. 1 is independently illustrated to represent different characteristic functions in the image encoding apparatus, and does not mean that each constituent unit is composed of separate hardware or one software constituent unit. That is, each component is listed as each component for convenience of description, and at least two components of each component are combined to form one component, or one component can be divided into a plurality of components to perform a function, and each Integrated embodiments and separate embodiments of components are also included in the scope of the present invention without departing from the essence of the present invention.
  • the components are not essential components for performing essential functions in the present invention, but may be optional components for merely improving performance.
  • the present invention can be implemented by including only essential components to implement the essence of the present invention, except for components used for performance improvement, and a structure including only essential components excluding optional components used for performance improvement Also included in the scope of the present invention.
  • the picture divider 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).
  • the picture splitter 110 divides one picture into a combination of a plurality of coding units, prediction units, and transformation units, and combines one coding unit, prediction unit, and transformation unit based on a predetermined criterion (eg, a cost function). can be selected to encode the picture.
  • a predetermined criterion eg, a cost function
  • one picture may be divided into a plurality of coding units.
  • a recursive tree structure such as a quad tree structure can be used.
  • a unit may be divided having as many child nodes as the number of divided coding units.
  • a coding unit that is no longer split according to certain restrictions becomes a leaf node. That is, when it is assumed that only square splitting is possible for one coding unit, one coding unit may be split into up to four different coding units.
  • a coding unit may be used as a unit for performing encoding or may be used as a meaning for a unit for performing decoding.
  • a prediction unit may be split in the form of at least one square or rectangle of the same size within one coding unit, and one prediction unit among the split prediction units within one coding unit is a prediction of another. It may be divided to have a shape and/or size different from that of the unit.
  • intra prediction may be performed without dividing the prediction unit into a plurality of prediction units NxN.
  • the prediction units 120 and 125 may include an inter prediction unit 120 performing inter prediction and an intra prediction unit 125 performing intra prediction. Whether to use inter prediction or to perform intra prediction for a prediction unit may be determined, and specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. In this case, a processing unit in which prediction is performed and a processing unit in which a prediction method and specific content are determined may be different. For example, a prediction method and a prediction mode may be determined in a prediction unit, and prediction may be performed in a transformation unit. A residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130 . In addition, prediction mode information, motion vector information, etc.
  • a specific encoding mode it is also possible to encode the original block as it is without generating the prediction block through the prediction units 120 and 125 and transmit it to the decoder.
  • the inter prediction unit 120 may predict a prediction unit based on information on at least one of a picture before or after a picture of the current picture, and in some cases, prediction based on information of a partial region in the current picture that has been encoded Units can also be predicted.
  • the inter prediction unit 120 may include a reference picture interpolator, a motion prediction unit, and a motion compensator.
  • the reference picture interpolator may receive reference picture information from the memory 155 and generate pixel information of integer pixels or less in the reference picture.
  • a DCT-based 8-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients may be used to generate pixel information of integer pixels or less in units of 1/4 pixels.
  • a DCT-based 4-tap interpolation filter in which filter coefficients are different to generate pixel information of integer pixels or less in units of 1/8 pixels may be used.
  • the motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolator.
  • various methods such as Full search-based Block Matching Algorithm (FBMA), Three Step Search (TSS), and New Three-Step Search Algorithm (NTS) may be used.
  • the motion vector may have a motion vector value of 1/2 or 1/4 pixel unit based on the interpolated pixel.
  • the motion prediction unit may predict the current prediction unit by using a different motion prediction method.
  • Various methods such as a skip method, a merge method, an AMVP (Advanced Motion Vector Prediction) method, an intra block copy method, etc., may be used as the motion prediction method.
  • the intra prediction unit 125 may generate a prediction unit based on reference pixel information around the current block, which is pixel information in the current picture.
  • reference pixel information around the current block which is pixel information in the current picture.
  • a neighboring block of the current prediction unit is a block on which inter prediction is performed, and thus a reference pixel is a pixel on which inter prediction is performed
  • a reference pixel included in the block on which inter prediction is performed is a reference pixel of the block on which intra prediction has been performed. information can be used instead. That is, when the reference pixel is not available, the unavailable reference pixel information may be replaced with at least one reference pixel among the available reference pixels.
  • the prediction mode may have a directional prediction mode in which reference pixel information is used according to a prediction direction and a non-directional mode in which directional information is not used when prediction is performed.
  • a mode for predicting luminance information and a mode for predicting chrominance information may be different, and intra prediction mode information used for predicting luminance information or predicted luminance signal information may be utilized to predict chrominance information.
  • intra prediction When intra prediction is performed, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit based on the pixel present on the left side, the pixel present on the upper left side, and the pixel present on the upper side of the prediction unit can be performed. However, when the size of the prediction unit is different from the size of the transformation unit when performing intra prediction, intra prediction may be performed using a reference pixel based on the transformation unit. In addition, intra prediction using NxN splitting may be used only for the smallest coding unit.
  • the intra prediction method may generate a prediction block after applying an adaptive intra smoothing (AIS) filter to a reference pixel according to a prediction mode.
  • AIS adaptive intra smoothing
  • the intra prediction mode of the current prediction unit may be predicted from the intra prediction mode of the prediction unit existing around the current prediction unit.
  • the prediction mode of the current prediction unit is predicted using the mode information predicted from the neighboring prediction unit, if the intra prediction mode of the current prediction unit and the neighboring prediction unit are the same, the current prediction unit and the neighboring prediction unit are used using predetermined flag information It is possible to transmit information that the prediction modes of . , and if the prediction modes of the current prediction unit and the neighboring prediction units are different from each other, entropy encoding may be performed to encode prediction mode information of the current block.
  • a residual block including residual information which is a difference value between a prediction unit and an original block of the prediction unit, in which prediction is performed based on the prediction unit generated by the prediction units 120 and 125 may be generated.
  • the generated residual block may be input to the transform unit 130 .
  • the transform unit 130 transforms the residual block including the original block and the residual information of the prediction unit generated by the prediction units 120 and 125, such as DCT (Discrete Cosine Transform) or DST (Discrete Sine Transform).
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • the DCT conversion core includes at least one of DCT2 or DCT8, and the DST conversion core includes DST7.
  • Whether to apply DCT or DST to transform the residual block may be determined based on intra prediction mode information of a prediction unit used to generate the residual block.
  • the transform for the residual block may be skipped.
  • a flag indicating whether to skip transform for the residual block may be encoded.
  • Transform skip may be allowed for residual blocks whose size is below a threshold, luma components, or chroma components under 4:4:4 format.
  • the quantizer 135 may quantize the values transformed by the transform unit 130 into the frequency domain.
  • the quantization coefficient may change according to blocks or the importance of an 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 the coefficient values on the quantized residual values.
  • the reordering unit 160 may change the two-dimensional block form coefficient into a one-dimensional vector form through a coefficient scanning method.
  • the rearranging unit 160 may use a Zig-Zag Scan method to scan from DC coefficients to coefficients in a high-frequency region and change them into a one-dimensional vector form.
  • a vertical scan that scans a two-dimensional block shape coefficient in a column direction and a horizontal scan that scans a two-dimensional block shape coefficient in a row direction may be used instead of a zig-zag scan according to a size of a transform unit and an intra prediction mode. That is, it may be determined whether any of the zig-zag scan, the vertical scan, and the horizontal scan is used according to the size of the transform unit and the intra prediction mode.
  • the entropy encoding unit 165 may perform entropy encoding based on the values calculated by the reordering unit 160 .
  • various encoding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be used.
  • the entropy encoding unit 165 receives the residual value coefficient information and block type information, prediction mode information, division unit information, prediction unit information and transmission unit information, motion of the coding unit from the reordering unit 160 and the prediction units 120 and 125 .
  • Various information such as vector information, reference frame information, interpolation information of a block, and filtering information may be encoded.
  • the entropy encoder 165 may entropy-encode the coefficient values of the coding units input from the reordering unit 160 .
  • the inverse quantizer 140 and the inverse transform unit 145 inversely quantize the values quantized by the quantizer 135 and inversely transform the values transformed by the transform unit 130 .
  • the residual values generated by the inverse quantizer 140 and the inverse transform unit 145 are combined with the prediction units predicted through the motion estimation unit, the motion compensator, and the intra prediction unit included in the prediction units 120 and 125 and restored. You can create a Reconstructed Block.
  • the filter unit 150 may include at least one of a deblocking filter, an offset correcting unit, and an adaptive loop filter (ALF).
  • a deblocking filter may include at least one of a deblocking filter, an offset correcting unit, and an adaptive loop filter (ALF).
  • ALF adaptive loop filter
  • the deblocking filter may remove block distortion caused by the boundary between blocks in the reconstructed picture.
  • it may be determined whether to apply the deblocking filter to the current block based on pixels included in several columns or rows included in the block.
  • a strong filter or a weak filter can be applied according to the required deblocking filtering strength.
  • horizontal filtering and vertical filtering may be concurrently processed when performing vertical filtering and horizontal filtering.
  • the offset corrector may correct the offset of the deblocked image with respect to the original image in units of pixels.
  • a method of dividing pixels included in an image into a certain number of regions, determining the region to be offset and applying the offset to the region, or taking edge information of each pixel into consideration can be used to apply
  • Adaptive loop filtering may be performed based on a value obtained by comparing the filtered reconstructed image and the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the corresponding group is determined, and filtering can be performed differentially for each group.
  • the luminance signal may be transmitted for each coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied may vary according to each block.
  • the ALF filter of the same type may be applied regardless of the characteristics of the target block.
  • 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 predictors 120 and 125 when inter prediction is performed.
  • FIG. 2 is a block diagram of an image decoder (decoder) according to an embodiment of the present invention.
  • the image decoder 200 includes an entropy decoding unit 210, a reordering 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 by 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 corresponding 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 corresponding 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 reordering unit 215 may perform reordering based on a method of rearranging the entropy-decoded bitstream by the entropy decoding unit 210 by the encoder. Coefficients expressed in the form of a one-dimensional vector may be restored and rearranged in the form of a two-dimensional block.
  • the reordering unit 215 may receive information related to coefficient scanning performed by the encoder and perform reordering by performing a reverse scanning method based on the scanning order performed by the corresponding encoder.
  • the inverse quantizer 220 may perform inverse quantization based on the quantization parameter provided by the encoder and the reordered coefficient values of the blocks.
  • the inverse transform unit 225 may perform inverse transform, ie, inverse DCT or inverse DST, on the transform performed by the transform unit, ie, DCT or DST, on the quantization result performed by the image encoder.
  • the DCT conversion core may include at least one of DCT2 or DCT8, and the DST conversion core may include DST7.
  • the inverse transform unit 225 may not perform the inverse transform either. Inverse transform may be performed based on a transmission unit determined by the image encoder.
  • a transformation technique (eg, DCT or DST) may be selectively performed according to a plurality of pieces of information such as a prediction method, a size of a current block, and a prediction direction.
  • the prediction units 230 and 235 may generate a prediction block based on the prediction block generation related information provided from the entropy decoding unit 210 and previously decoded block or picture information provided from the memory 245 .
  • Intra prediction is performed on a prediction unit based on a pixel, but when intra prediction is performed, when the size of the prediction unit and the size of the transformation unit are different, intra prediction is performed using the reference pixel based on the transformation unit.
  • intra prediction using NxN splitting may be used only for the smallest coding unit.
  • the prediction units 230 and 235 may include a prediction unit determiner, an inter prediction unit, and an intra prediction unit.
  • the prediction unit determining unit receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, and divides the prediction unit from the current coding unit, and predicts It may be determined whether the unit performs inter prediction or intra prediction.
  • the inter prediction unit 230 uses information necessary for inter prediction of the current prediction unit provided from the image encoder to predict the current based on information included in at least one of a picture before or after the current picture including the current prediction unit. Inter prediction may be performed on a unit. Alternatively, inter prediction may be performed based on information of a pre-restored partial region in the current picture including the current prediction unit.
  • a method of predicting motion of a prediction unit included in a corresponding coding unit based on a coding unit is a skip mode, a merge mode, a motion vector prediction mode (AMVP mode), and an intra block copy. It is possible to determine whether the method is any of the modes.
  • 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 the prediction unit provided by the image encoder.
  • the intra prediction unit 235 may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolator, and a DC filter.
  • the AIS filter is a part that performs filtering on the reference pixel of the current block, and may be applied by determining whether to apply the filter according to the prediction mode of the current prediction unit.
  • AIS filtering may be performed on the reference pixel of the current block by using the prediction mode and AIS filter information of the prediction unit provided by the image encoder.
  • 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 the reference pixel
  • the reference pixel may not be interpolated.
  • the DC filter may generate the 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 deblocking filter-related information provided from the image encoder, and the image decoder may perform deblocking filtering on the 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, information on the offset value, and the like.
  • ALF may be applied to a coding unit based on information on whether ALF is applied, ALF coefficient information, etc. provided from the encoder. Such ALF information may be provided by being included in a specific parameter set.
  • the memory 245 may store the reconstructed picture or block to be used as a reference picture or reference block, and may also provide the reconstructed picture to an output unit.
  • FIG. 3 is a diagram illustrating a basic coding tree unit according to an embodiment of the present invention.
  • a coding block of the maximum size may be defined as a coding tree block.
  • One picture is divided into a plurality of Coding Tree Units (CTUs).
  • the coding tree unit is a coding unit of the largest size, and may be referred to as a Largest Coding Unit (LCU).
  • LCU Largest Coding Unit
  • the size of the coding tree unit may be defined at a picture level or a sequence level. To this end, information indicating the size of the coding tree unit may be signaled through a picture parameter set or a sequence parameter set.
  • the size of the coding tree unit for all pictures in the sequence may be set to 128x128.
  • either 128x128 or 256x256 may be determined as the size of the coding tree unit.
  • the size of the coding tree unit may be set to 128x128, and in the second picture, the size of the coding tree unit may be set to 256x256.
  • a coding block may be generated by dividing the coding tree unit.
  • a coding block represents a basic unit for encoding/decoding processing. For example, prediction or transformation may be performed for each coding block, or a prediction coding mode may be determined for each coding block.
  • the prediction encoding mode indicates a method of generating a prediction image.
  • the prediction encoding mode includes intra prediction (Intra Prediction), inter prediction (Inter Prediction), Current Picture Referencing (CPR, or Intra Block Copy, IBC). ) or combined prediction.
  • the prediction block for the coding block may be generated by using at least one prediction coding mode of intra prediction, inter prediction, current picture reference, or complex prediction.
  • Information indicating the prediction encoding mode of the current block may be signaled through a bitstream.
  • the information may be a 1-bit flag indicating whether the prediction encoding mode is an intra mode or an inter mode. Only when the prediction encoding mode of the current block is determined to be the inter mode, the current picture reference or complex prediction may be available.
  • the current picture reference is to set the current picture as a reference picture and obtain a prediction block of the current block from an already encoded/decoded region in the current picture.
  • the current picture means a picture including the current block.
  • Information indicating whether the current picture reference is applied to the current block may be signaled through the bitstream.
  • the information may be a 1-bit flag. When the flag is true, the prediction encoding mode of the current block may be determined as the current picture reference, and when the flag is false, the prediction mode of the current block may be determined as inter prediction.
  • the prediction encoding mode of the current block may be determined based on the reference picture index. For example, when the reference picture index indicates the current picture, the prediction encoding mode of the current block may be determined as the current picture reference. When the reference picture index indicates a picture other than the current picture, the prediction encoding mode of the current block may be determined as inter prediction. That is, the current picture reference is a prediction method using information on an encoded/decoded region within the current picture, and the inter prediction is a prediction method using information of another picture that has been encoded/decoded.
  • Complex prediction indicates a coding mode in which two or more of intra prediction, inter prediction, and current picture reference are combined. For example, when complex prediction is applied, a first prediction block may be generated based on any one of intra prediction, inter prediction, or a current picture reference, and a second prediction block may be generated based on the other one. When the first prediction block and the second prediction block are generated, the final prediction block may be generated through an average operation or a weighted sum operation of the first prediction block and the second prediction block.
  • Information indicating whether complex prediction is applied may be signaled through a bitstream. The information may be a 1-bit flag.
  • FIG. 4 is a diagram illustrating various division forms of a coding block.
  • a coding block may be divided into a plurality of coding blocks based on quad tree division, binary tree division, or triple tree division.
  • the divided coding block may be further divided into a plurality of coding blocks based on quad tree division, binary tree division, or triple tree division.
  • Quad tree splitting refers to a splitting technique in which a current block is split into four blocks.
  • the current block may be split into four square partitions (refer to 'SPLIT_QT' in FIG. 4(a)).
  • Binary tree splitting refers to a splitting technique in which a current block is split into two blocks. Splitting the current block into two blocks along the vertical direction (i.e., using a vertical line crossing the current block) can be called vertical binary tree splitting, and along the horizontal direction (i.e., using a vertical line crossing the current block) Splitting the current block into two blocks may be referred to as horizontal binary tree splitting. As a result of binary tree partitioning, the current block may be partitioned into two non-square partitions.
  • 'SPLIT_BT_VER' of FIG. 4(b) indicates a result of vertical binary tree division
  • 'SPLIT_BT_HOR' of FIG. 4(c) indicates a horizontal binary tree division result.
  • Triple tree splitting refers to a splitting technique in which a current block is split into three blocks. Splitting the current block into three blocks along the vertical direction (i.e., using two vertical lines intersecting the current block) can be referred to as vertical triple tree splitting, and along the horizontal direction (i.e., using two vertical lines crossing the current block) Splitting the current block into three blocks may be referred to as horizontal triple tree splitting. As a result of the triple tree division, the current block may be divided into three non-square partitions. In this case, the width/height of the partition located in the center of the current block may be twice as large as the width/height of other partitions.
  • 'SPLIT_TT_VER' of FIG. 4 (d) shows a result of vertical triple-tree splitting
  • 'SPLIT_TT_HOR' of FIG. 4 (e) shows a horizontal triple-tree splitting result.
  • the number of divisions of the coding tree unit may be defined as a partitioning depth.
  • the maximum division depth of a coding tree unit may be determined at the sequence or picture level. Accordingly, the maximum division depth of the coding tree unit may be different for each sequence or feature.
  • the maximum splitting depth for each of the splitting techniques may be individually determined.
  • the maximum division depth allowed for quad tree division may be different from the maximum division depth allowed for binary tree division and/or triple tree division.
  • the encoder may signal information indicating at least one of a splitting form or a splitting depth of the current block through a bitstream.
  • the decoder may determine the splitting form and the splitting depth of the coding tree unit based on the information parsed from the bitstream.
  • FIG. 5 is a diagram illustrating a splitting aspect of a coding tree unit.
  • Partitioning a coding block using a partitioning technique such as quad tree partitioning, binary tree partitioning, and/or triple tree partitioning may be referred to as multi-tree partitioning.
  • Coding blocks generated by applying multi-tree partitioning to the coding block may be referred to as lower coding blocks.
  • the division depth of the coding block is k
  • the division depth of the lower coding blocks is set to k+1.
  • a coding block having a split depth of k may be referred to as a higher coding block.
  • the division type of the current coding block may be determined based on at least one of the division type of the upper coding block or the division type of the neighboring coding block.
  • the neighboring coding block is adjacent to the current coding block, and may include at least one of an upper neighboring block, a left neighboring block, or a neighboring block adjacent to an upper left corner of the current coding block.
  • the splitting type may include at least one of whether to split a quad tree, whether to split a binary tree, a binary tree splitting direction, whether to split a triple tree, or a triple tree splitting direction.
  • information indicating whether the coding block is divided may be signaled through a bitstream.
  • the information is a 1-bit flag 'split_cu_flag'. When the flag is true, it indicates that the coding block is split by the head tree splitting technique.
  • split_cu_flag When split_cu_flag is true, information indicating whether a coding block is divided into a quad tree may be signaled through a bitstream.
  • the information is a 1-bit flag split_qt_flag. When the flag is true, the coding block may be divided into 4 blocks.
  • a coding block having a split depth of 3 may be generated.
  • binary tree division is performed on the coding block by considering at least one of the size of the coding block, whether the coding block is located at a picture boundary, the maximum division depth, or the division form of a neighboring block. Alternatively, it may be determined whether to perform triple tree splitting.
  • information indicating a splitting direction may be signaled through a bitstream. The information may be a 1-bit flag mtt_split_cu_vertical_flag. Based on the flag, it may be determined whether the division direction is a vertical direction or a horizontal direction.
  • information indicating which of binary tree splitting or triple tree splitting is applied to the coding block may be signaled through the bitstream.
  • the information may be a 1-bit flag mtt_split_cu_binary_flag. Based on the flag, it may be determined whether binary tree splitting or triple tree splitting is applied to the coding block.
  • vertical binary tree splitting is applied to a coding block having a splitting depth of 1
  • vertical triple tree splitting is applied to a left coding block among the coding blocks generated as a result of the splitting, It is shown that vertical binary tree splitting is applied to the right coding block.
  • Inter prediction is a prediction encoding mode for predicting a current block by using information on a previous picture.
  • a block hereinafter, collocated block, collocated block
  • a prediction block generated based on a block at the same position as the current block will be referred to as a collocated prediction block.
  • the current block can be effectively predicted using the motion of the object.
  • the prediction block (or prediction image) of the current block may be generated in consideration of the motion information of the object.
  • a prediction block generated using motion information may be referred to as a motion prediction block.
  • a residual block may be generated by differentiating the prediction block from the current block.
  • the motion prediction block instead of the collocated prediction block, the energy of the residual block can be reduced, and thus the compression performance of the residual block can be improved.
  • generating a prediction block using motion information may be referred to as motion-compensated prediction.
  • a prediction block can be generated based on motion compensation prediction.
  • the motion information may include at least one of a motion vector, a reference picture index, a prediction direction, or a bidirectional weight index.
  • the motion vector indicates the movement direction and size of the object.
  • the reference picture index specifies a reference picture of the current block among reference pictures included in the reference picture list.
  • the prediction direction indicates any one of unidirectional L0 prediction, unidirectional L1 prediction, or bidirectional prediction (L0 prediction and L1 prediction). According to the prediction direction of the current block, at least one of movement information in the L0 direction and movement information in the L1 direction may be used.
  • the bidirectional weight index specifies a weight applied to the L0 prediction block and a weight applied to the L1 prediction block.
  • FIG. 6 is a flowchart of an inter prediction method according to an embodiment of the present invention.
  • the inter prediction method includes determining an inter prediction mode of a current block ( S601 ), obtaining motion information of the current block according to the determined inter prediction mode ( S602 ), and based on the obtained motion information
  • the step of performing motion compensation prediction on the current block (S603) is included.
  • the inter prediction mode represents various techniques for determining motion information of the current block, and may include an inter prediction mode using translation motion information and an inter prediction mode using affine motion information.
  • the inter prediction mode using translational motion information may include a merge mode and a motion vector prediction mode
  • the inter prediction mode using the affine motion information may include an affine merge mode and an affine motion vector prediction mode.
  • the motion information of the current block may be determined based on information parsed from a neighboring block or a bitstream adjacent to the current block according to the inter prediction mode.
  • FIG. 7 is a diagram illustrating a non-linear movement of an object.
  • the movement of the object in the image may not be linear.
  • non-linear movement of an object such as camera zoom-in, zoom-out, rotation, or affine transformation may occur.
  • the motion of the object cannot be effectively expressed using a translational motion vector. Accordingly, it is possible to improve encoding efficiency by using an affine motion instead of a translational motion in a portion where a non-linear motion of an object occurs.
  • FIG. 8 is a flowchart of an inter prediction method based on affine motion according to an embodiment of the present invention.
  • Whether the inter prediction technique based on the affine motion is applied to the current block may be determined based on information parsed from the bitstream. Specifically, based on at least one of a flag indicating whether the affine merge mode is applied to the current block or a flag indicating whether the affine motion vector prediction mode is applied to the current block, It can be determined whether a prediction technique is applied or not.
  • the affine motion model of the current block may be determined (S801).
  • the affine motion model may be determined as at least one of a 6-parameter affine motion model or a 4-parameter affine motion model.
  • the 6-parameter affine motion model expresses affine motion using 6 parameters
  • the 4-parameter affine motion model expresses affine motion using 4 parameters.
  • Equation 1 expresses the affine motion using 6 parameters.
  • the affine motion represents a translational motion for a predetermined region determined by the affine seed vectors.
  • affine motion When affine motion is expressed using six parameters, a complex motion can be expressed, but the number of bits required to encode each parameter increases, so that encoding efficiency may decrease. Accordingly, affine motion may be expressed using four parameters. Equation 2 expresses the affine motion using 4 parameters.
  • Information for determining the affine motion model of the current block may be encoded and signaled through a bitstream.
  • the information may be a 1-bit flag 'affine_type_flag'.
  • a value of 0 of the flag may indicate that a 4-parameter affine motion model is applied, and a value of 1 of the flag may indicate that a 6-parameter affine motion model is applied.
  • the flag may be encoded in units of slices, tiles, or blocks (eg, coding blocks or coding tree units). When the flag is signaled at the slice level, the affine motion model determined at the slice level may be applied to all blocks belonging to the slice.
  • the affine motion model of the current block may be determined based on the affine inter prediction mode of the current block. For example, when the affine merge mode is applied, the affine motion model of the current block may be determined as a 4-parameter motion model. On the other hand, when the affine motion vector prediction mode is applied, information for determining the affine motion model of the current block may be encoded and signaled through a bitstream. For example, when the affine motion vector prediction mode is applied to the current block, the affine motion model of the current block may be determined based on the 1-bit flag 'affine_type_flag'.
  • an affine seed vector of the current block may be derived ( S802 ).
  • a 4-parameter affine motion model When a 4-parameter affine motion model is selected, motion vectors at two control points of the current block can be derived.
  • a 6-parameter affine motion model when a 6-parameter affine motion model is selected, motion vectors at three control points of the current block may be derived.
  • a motion vector at the control point may be referred to as an affine seed vector.
  • 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.
  • FIG. 9 is a diagram illustrating an affine seed vector for each affine motion model.
  • affine seed vectors for two of the upper-left corner, upper-right corner, or lower-left corner can be derived.
  • an affine seed vector sv for the upper-left corner of the current block eg, upper-left sample (x1, y1)
  • An affine vector may be derived using 0 and an affine seed vector sv 1 for the upper-right corner (eg, upper-right sample (x1, y1)) of the current block. It is also possible to use the affine seed vector for the lower-left corner instead of the affine seed vector for the upper-left corner, or use the affine seed vector for the lower-left corner instead of the affine seed vector for the upper-right corner.
  • affine seed vectors for the upper-left corner, upper-right corner, and lower-left corner can be derived.
  • an affine seed vector sv for the upper-left corner of the current block eg, upper-left sample (x1, y1)
  • an affine seed vector sv 1 for the top-right corner of the current block eg, top-right sample (x1, y1)
  • an affine seed vector sv for the top-left corner of the current block eg, top-left sample (x2, y2)
  • the affine seed vectors of the upper left control point and the upper right control point will be referred to as a first affine seed vector and a second affine seed vector, respectively.
  • at least one of the first affine seed vector and the second affine seed vector is an affine seed vector (th 3 affine seed vector) or the affine seed vector of the lower right control point (fourth affine seed vector).
  • the affine seed vectors of the upper-left control point, upper-right control point, and lower-left control point are called a first affine seed vector, a second affine seed vector, and a third affine seed vector, respectively.
  • a first affine seed vector, a second affine seed vector, and a third affine seed vector respectively.
  • one of the first affine seed vector, the second affine seed vector, and the third affine seed vector At least one may be replaced with an affine seed vector (a fourth affine seed vector) of the lower right control point.
  • An affine vector may be derived for each sub-block using the affine seed vectors (S803).
  • the affine vector represents a translational motion vector derived based on the affine seed vectors.
  • An affine vector of a sub-block may be referred to as an affine sub-block motion vector or a sub-block motion vector.
  • 10 is a diagram illustrating affine vectors of sub-blocks under a 4-parameter motion model.
  • the affine vector of the sub-block may be derived based on the position of the control point, the position of the sub-block, and the affine seed vector.
  • Equation 3 shows an example of deriving an affine sub-block motion vector.
  • (x, y) represents the position of the sub-block.
  • the position of the sub-block indicates the position of the reference sample included in the sub-block.
  • the reference sample may be a sample located in the upper left corner of the sub-block or a sample having a center position of at least one of x-axis or y-axis coordinates.
  • (x 0 , y 0 ) denotes the position of the first control point
  • (sv 0x , sv 0y ) denotes the first affine seed vector.
  • (x 1 , y 1 ) denotes the position of the second control point
  • (sv 1x , sv 1y ) denotes the second affine seed vector.
  • x 1 -x 0 may be set to a value equal to the width of the current block.
  • motion compensation prediction for each subblock may be performed using the affine vector of each subblock (S804).
  • a prediction block for each sub-block may be generated.
  • Prediction blocks of sub-blocks may be set as prediction blocks of the current block.
  • An affine seed vector of the current block may be derived based on an affine seed vector of a neighboring block adjacent to the current block.
  • the affine seed vector of the merge candidate included in the merge candidate list may be determined as the affine seed vector of the current block.
  • motion information including at least one of a reference picture index, a specific direction prediction flag, or a bidirectional weight of the current block may be set to be the same as that of the merge candidate.
  • the motion information of the current block may be derived from motion information of other blocks in the current block.
  • the other block may be a block encoded/decoded by inter prediction prior to the current block.
  • Setting the motion information of the current block to be the same as the motion information of other blocks may be defined as a merge mode.
  • setting a motion vector of another block as a prediction value of the motion vector of the current block may be defined as a motion vector prediction mode.
  • 11 is a flowchart of a process of deriving motion information of a current block under a merge mode.
  • a merge candidate of the current block may be derived (S1101).
  • the merge candidate of the current block may be derived from a block encoded/decoded by inter prediction prior to the current block.
  • FIG. 12 is a diagram illustrating candidate blocks used to derive a merge candidate.
  • the candidate blocks may include at least one of neighboring blocks including a sample adjacent to the current block or non-neighboring blocks including a sample not adjacent to the current block.
  • samples for determining candidate blocks are defined as reference samples.
  • a reference sample adjacent to the current block will be referred to as a neighbor reference sample
  • a reference sample not adjacent to the current block will be referred to as a non-neighbor reference sample.
  • the neighbor reference sample may be included in a neighboring column of the leftmost column of the current block or a neighboring row of the topmost row of the current block. For example, assuming that the coordinates of the upper left sample of the current block are (0, 0), a block including a reference sample at a location (-1, H-1), and a reference sample at a location (W-1, -1) A block containing a block containing a reference sample at position (W, -1), a block containing a reference sample at position (-1, H), or a block containing a reference sample at position (-1, -1) At least one of them may be used as a candidate block. Referring to the drawing, neighboring blocks of index 0 to index 4 may be used as candidate blocks.
  • the non-neighboring reference sample indicates a sample in which at least one of an x-axis distance or a y-axis distance from a reference sample adjacent to the current block has a predefined value.
  • At least one of blocks including non-neighbor samples in which the x-axis distance and the y-axis distance are predefined values may be used as a candidate block.
  • the predefined value may be a natural number such as 4, 8, 12, or 16. Referring to the drawing, at least one of blocks of indices 5 to 26 may be used as a candidate block.
  • a sample not located on the same vertical, horizontal or diagonal line as the neighboring reference sample may be set as the non-neighboring reference sample.
  • the motion information of the merge candidate may be set to be the same as the motion information of the candidate block.
  • at least one of a motion vector, a reference picture index, a prediction direction, and a bidirectional weight index of the candidate block may be set as the motion information of the merge candidate.
  • a merge candidate list including merge candidates may be generated (S1102).
  • Indices of merge candidates in the merge candidate list may be allocated according to a predetermined order. For example, a merge candidate derived from a left neighboring block, a merge candidate derived from an upper neighboring block, a merge candidate derived from an upper right neighboring block, a merge candidate derived from a lower left neighboring block, and a merge candidate derived from an upper left neighboring block and merge candidates derived from temporal neighboring blocks in the order of indexes may be assigned.
  • At least one of the plurality of merge candidates may be selected ( S1103 ).
  • information for specifying any one of a plurality of merge candidates may be signaled through a bitstream.
  • information merge_idx indicating an index of any one of merge candidates included in the merge candidate list may be signaled through a bitstream.
  • a motion information candidate included in the motion information table may be added to the merge candidate list as a merge candidate.
  • the threshold value may be a value obtained by subtracting an offset from the maximum number of merge candidates or the maximum number of merge candidates that the merge candidate list may include.
  • the offset may be a natural number such as 1 or 2.
  • the motion information table includes motion information candidates derived from blocks encoded/decoded based on inter prediction within the current picture.
  • motion information of a motion information candidate included in the motion information table may be set to be the same as motion information of a block encoded/decoded based on inter prediction.
  • the motion information may include at least one of a motion vector, a reference picture index, a prediction direction, and a bidirectional weight index.
  • a motion information candidate included in the motion information table may be referred to as an inter-region merge candidate or a prediction region merge candidate.
  • the maximum number of motion information candidates that the motion information table can include may be predefined in the encoder and the decoder.
  • the maximum number of motion information candidates that the motion information table may include may be 1, 2, 3, 4, 5, 6, 7, 8 or more (eg, 16).
  • information indicating the maximum number of motion information candidates that the motion information table may include may be signaled through a bitstream.
  • the information may be signaled at a sequence, picture, or slice level.
  • the information may indicate the maximum number of motion information candidates that the motion information table may include.
  • the information may indicate a difference between the maximum number of motion information candidates that the motion information table may include and the maximum number of merge candidates that the merge candidate list may include.
  • the maximum number of motion information candidates that the motion information table may include may be determined according to the size of the picture, the size of the slice, or the size of the coding tree unit.
  • the motion information table may be initialized in units of pictures, slices, tiles, bricks, coding tree units, or coding tree units line (row or column). For example, when the slice is initialized, the motion information table may also be initialized, so that the motion information table may not include any motion information candidates.
  • information indicating whether to initialize the motion information table may be signaled through a bitstream.
  • the information may be signaled at the slice, tile, brick or block level.
  • a pre-configured motion information table may be used.
  • information on an initial motion information candidate may be signaled through a picture parameter set or a slice header. Even if the slice is initialized, the motion information table may include initial motion information candidates. Accordingly, the initial motion information candidate may be used even for a block that is the first encoding/decoding target in the slice.
  • the motion information candidate included in the motion information table of the previous coding tree unit may be set as the initial motion information candidate.
  • a motion information candidate having the smallest index or a motion information candidate having the largest index among motion information candidates included in the motion information table of the previous coding tree unit may be set as the initial motion information candidate.
  • Blocks are encoded/decoded according to the encoding/decoding order, and blocks encoded/decoded based on inter prediction may be sequentially set as motion information candidates according to the encoding/decoding order.
  • FIG. 13 is a diagram for explaining an update aspect of a motion information table.
  • a motion information candidate may be derived based on the current block (S1302).
  • the motion information of the motion information candidate may be set to be the same as the motion information of the current block.
  • a motion information candidate derived based on the current block may be added to the motion information table (S1304).
  • the redundancy check may be performed on the motion information of the current block (or the motion information candidate derived based on it) (S1305).
  • the redundancy check is for determining whether the motion information of the motion information candidate previously stored in the motion information table is the same as the motion information of the current block.
  • the redundancy check may be performed on all motion information candidates previously stored in the motion information table.
  • the redundancy check may be performed on motion information candidates whose index is greater than or equal to a threshold value or less than or equal to a threshold value among motion information candidates previously stored in the motion information table.
  • a redundancy check may be performed on a predefined number of motion information candidates. For example, two motion information candidates having a small index or two motion information candidates having a large index may be determined as a redundancy check target.
  • a motion information candidate derived based on the current block may be added to the motion information table (S1308). Whether the motion information candidates are the same may be determined based on whether the motion information (eg, motion vector and/or reference picture index, etc.) of the motion information candidates is the same.
  • the oldest motion information candidate is deleted (S1307), and a motion information candidate derived based on the current block is added to the motion information table It can be done (S1308).
  • the oldest motion information candidate may be a motion information candidate having the largest index or a motion information candidate having the smallest index.
  • Motion information candidates may each be identified by an index.
  • the lowest index eg, 0
  • indexes of pre-stored motion information candidates may be increased by one.
  • the motion information candidate having the largest index is removed.
  • the largest index may be assigned to the motion information candidate. For example, when the number of motion information candidates pre-stored in the motion information table is less than the maximum value, an index having the same value as the number of pre-stored motion information candidates may be assigned to the motion information candidates. Alternatively, when the number of motion information candidates previously stored in the motion information table is equal to the maximum value, an index obtained by subtracting 1 from the maximum value may be assigned to the motion information candidate. Also, the motion information candidate having the smallest index is removed, and the indexes of the remaining pre-stored motion information candidates are decreased by one.
  • FIG. 14 is a diagram illustrating an update aspect of a motion information table.
  • the motion information candidate HmvpCand[n+1] derived from the current block is added to the motion information table HmvpCandList, the motion information candidate HmvpCand[0] having the smallest index among the pre-stored motion information candidates is deleted, and the remaining motion information candidates are
  • the index can be decremented by 1.
  • the index of the motion information candidate HmvpCand[n+1] derived from the current block may be set to a maximum value (n in the example shown in FIG. 14 ).
  • the motion information candidate derived based on the current block may not be added to the motion information table (S1309).
  • the same pre-stored motion information candidate as the motion information candidate may be removed. In this case, the same effect as that the index of the pre-stored motion information candidate is newly updated is caused.
  • 15 is a diagram illustrating an example in which indexes of pre-stored motion information candidates are updated.
  • the pre-stored motion information candidate is deleted and the index of the motion information candidates whose index is greater than hIdx is decreased by 1.
  • HmvpCand[2] which is the same as mvCand, is deleted from the motion information table HvmpCandList, and the indexes from HmvpCand[3] to HmvpCand[n] are decreased by one.
  • the motion information candidate mvCand derived based on the current block may be added to the end of the motion information table.
  • the index allocated to the same pre-stored motion information candidate as the motion information candidate derived based on the current block may be updated.
  • the index of the pre-stored motion information candidate may be changed to a minimum value or a maximum value.
  • Motion information of blocks included in a predetermined region may be set not to be added to the motion information table.
  • a motion information candidate derived based on motion information of a block included in the merge processing region may not be added to the motion information table. Since the encoding/decoding order is not defined for blocks included in the merge processing region, it is inappropriate to use any one of the motion information for inter prediction of another block. Accordingly, motion information candidates derived based on blocks included in the merge processing region may not be added to the motion information table.
  • motion information of a block smaller than a preset size may be set not to be added to the motion information table.
  • motion information candidates derived based on motion information of a coding block having a width or height smaller than 4 or 8 or motion information of a coding block having a size of 4x4 may not be added to the motion information table.
  • the motion information table may not be updated based on the current block.
  • the motion information candidate may be set to include additional information in addition to the motion information. For example, at least one of block size, shape, and block partition information may be additionally stored for the motion information candidate.
  • block size, shape, and block partition information may be additionally stored for the motion information candidate.
  • the motion information candidates included in the motion information table may be added to the merge candidate list as merge candidates.
  • the addition process is performed according to the order in which the indexes of the motion information candidates are sorted in ascending or descending order. As an example, the motion information candidate having the largest index may be added to the merge candidate list of the current block.
  • a redundancy check may be performed between the motion information candidate and merge candidates previously stored in the merge candidate list. As a result of performing the redundancy check, a motion information candidate having the same motion information as a previously stored merge candidate may not be added to the merge candidate list.
  • the redundancy check may be performed only on some of the motion information candidates included in the motion information table. As an example, the redundancy check may be performed only on motion information candidates whose index is greater than or equal to a threshold value or less than or equal to a threshold value. Alternatively, the redundancy check may be performed only on the N motion information candidates having the largest index or the N motion information candidates having the smallest index.
  • the redundancy check may be performed only on some of the merge candidates previously stored in the merge candidate list.
  • the redundancy check may be performed only on a merge candidate whose index is greater than or equal to a threshold value or a merge candidate derived from a block at a specific location.
  • the specific position may include at least one of a left neighboring block, an upper neighboring block, an upper right neighboring block, or a lower left neighboring block of the current block.
  • 16 is a diagram illustrating an example in which a redundancy check is performed on only some of merge candidates.
  • a redundancy check with up to two merge candidates having the smallest index may be performed on the motion information candidate. For example, it is possible to check whether mergeCandList[0] and mergeCandList[1] are the same as HmvpCand[j].
  • the redundancy check may be performed only on a merge candidate derived from a specific position.
  • the redundancy check may be performed on at least one of a merge candidate derived from a neighboring block located at the left of the current block or a merge candidate derived from a neighboring block located at an upper end of the current block.
  • the motion information candidate may be added to the merge candidate list without redundancy check.
  • a redundancy check with the merge candidate may be performed on only some of the motion information candidates.
  • the redundancy check may be performed only on N motion information candidates having a large index or N motion information candidates having a small index among motion information candidates included in the motion information table.
  • the redundancy check may be performed only on motion information candidates having an index in which the difference between the number of motion information candidates included in the motion information table is equal to or less than a threshold value.
  • the threshold value is 2
  • the redundancy check may be performed only on three motion information candidates having the largest index value among motion information candidates included in the motion information table. Redundancy check may be omitted for motion information candidates except for the three motion information candidates.
  • the motion information candidate may be added to the merge candidate list regardless of whether it has the same motion information as the merge candidate.
  • the redundancy check may be set to be performed only on motion information candidates having an index in which the difference between the number of motion information candidates included in the motion information table is equal to or greater than a threshold value.
  • the number of motion information candidates for which the redundancy check is performed may be predefined in the encoder and the decoder.
  • the threshold may be an integer such as 0, 1 or 2.
  • the threshold may be determined based on at least one of the number of merge candidates included in the merge candidate list or the number of motion information candidates included in the motion information table.
  • the redundancy check with the same merge candidate as the first motion information candidate may be omitted when the second motion information candidate is checked for redundancy.
  • 17 is a diagram illustrating an example in which a redundancy check with a specific merge candidate is omitted.
  • a redundancy check is performed between the motion information candidate and the merge candidates previously stored in the merge candidate list.
  • the motion information candidate HmvpCand[i] is not added to the merge candidate list and the motion information candidate HmvpCand[i] whose index is i-1 -1] and a redundancy check between merge candidates can be performed.
  • the redundancy check between the motion information candidate HmvpCand[i-1] and the merge candidate mergeCandList[j] may be omitted.
  • HmvpCand[i] and mergeCandList[2] are the same. Accordingly, HmvpCand[i] is not added to the merge candidate list, and a redundancy check for HmvpCand[i-1] may be performed. In this case, the redundancy check between HvmpCand[i-1] and mergeCandList[2] may be omitted.
  • a pair-wise merge candidate means a merge candidate having, as a motion vector, an average of motion vectors of two or more merge candidates
  • a zero merge candidate means a merge candidate whose motion vector is 0.
  • a merge candidate may be added to the merge candidate list of the current block in the following order.
  • the spatial merge candidate means a merge candidate derived from at least one of a neighboring block or a non-neighboring block
  • the temporal merge candidate means a merge candidate derived from a previous reference picture.
  • the affine motion information candidate represents a motion information candidate derived from a block encoded/decoded with the affine motion model.
  • a motion information table may also be used in the motion vector prediction mode. For example, when the number of motion vector prediction candidates included in the motion vector prediction candidate list of the current block is less than a threshold value, a motion information candidate included in the motion information table may be set as a motion vector prediction candidate for the current block. Specifically, a motion vector of a motion information candidate may be set as a motion vector prediction candidate.
  • the selected candidate When any one of motion vector prediction candidates included in the motion vector prediction candidate list of the current block is selected, the selected candidate may be set as the motion vector predictor of the current block. Thereafter, after decoding the motion vector residual value of the current block, the motion vector of the current block may be obtained by summing the motion vector predictor and the motion vector residual value.
  • the motion vector prediction candidate list of the current block may be constructed in the following order.
  • a spatial motion vector prediction candidate means a motion vector prediction candidate derived from at least one of a neighboring block or a non-neighboring block
  • a temporal motion vector prediction candidate means a motion vector prediction candidate derived from a previous reference picture.
  • the affine motion information candidate represents a motion information candidate derived from a block encoded/decoded with the affine motion model.
  • a zero motion vector prediction candidate indicates a candidate whose motion vector value is 0.
  • a merge processing region having a size larger than that of the coding block may be defined.
  • Coding blocks included in the merge processing region may not be sequentially encoded/decoded, but may be processed in parallel.
  • not sequentially encoding/decoding means that the encoding/decoding order is not defined. Accordingly, the encoding/decoding process of the blocks included in the merge processing region may be independently processed.
  • blocks included in the merge processing region may share merge candidates.
  • the merge candidates may be derived based on the merge processing area.
  • the merge processing region may be referred to as a parallel processing region, a shared merge region (SMR), or a merge estimation region (MER).
  • SMR shared merge region
  • MER merge estimation region
  • the merge candidate of the current block may be derived based on the coding block. However, when the current block is included in a merge processing region having a size larger than that of the current block, a candidate block included in the same merge processing region as the current block may be set as unavailable as a merge candidate.
  • FIG. 18 is a diagram illustrating an example in which a candidate block included in the same merge processing area as a current block is set as unavailable as a merge candidate.
  • blocks including reference samples adjacent to CU5 may be set as candidate blocks.
  • candidate blocks X3 and X4 included in the same merge processing region as CU5 may be set as unavailable as merge candidates of CU5.
  • candidate blocks X0, X1, and X2 that are not included in the same merge processing region as CU5 may be set as available as merge candidates.
  • blocks including reference samples adjacent to CU8 may be set as candidate blocks.
  • candidate blocks X6, X7, and X8 included in the same merge processing region as CU8 may be set as unavailable as merge candidates.
  • candidate blocks X5 and X9 that are not included in the same merge region as CU8 may be set to be available as merge candidates.
  • a neighboring block adjacent to the current block and a neighboring block adjacent to the merge processing region may be set as candidate blocks.
  • 19 is a diagram illustrating an example of deriving a merge candidate for the current block when the current block is included in the merge processing area.
  • neighboring blocks to which the current block is adjacent may be set as candidate blocks for deriving a merge candidate of the current block.
  • a candidate block included in the same merge processing region as the current block may be set as unavailable as a merge candidate.
  • the upper neighboring block y3 and the upper right neighboring block y4 included in the same merge processing region as the coding block CU3 may be set as unavailable as merge candidates of the coding block CU3.
  • a merge candidate may be derived by scanning neighboring blocks adjacent to the current block according to a predefined order.
  • the predefined order may be the order of y1, y3, y4, y0, and y2.
  • a merge candidate for the current block may be derived using neighboring blocks adjacent to the merge processing region.
  • neighboring blocks adjacent to the merge processing region including the coding block CU3 may be set as candidate blocks for the coding block CU3.
  • the neighboring blocks adjacent to the merge processing region may include at least one of a left neighboring block x1, an upper neighboring block x3, a lower left neighboring block x0, an upper right neighboring block x4, and a left upper neighboring block x2.
  • a merge candidate may be derived by scanning neighboring blocks adjacent to the merge processing region according to a predefined order.
  • the predefined order may be the order of x1, x3, x4, x0, and x2.
  • a merge candidate for the coding block CU3 included in the merge processing region may be derived by scanning the candidate blocks according to the following scan order.
  • the scan order of the candidate blocks illustrated above is only an example of the present invention, and it is also possible to scan the candidate blocks in a different order from the example above.
  • the scan order may be adaptively determined based on at least one of the size or shape of the current block or the merge processing region.
  • the merge processing region may be square or non-square.
  • Information for determining the merge processing region may be signaled through a bitstream.
  • the information may include at least one of information indicating the shape of the merge processing region and information indicating the size of the merge processing region.
  • the merge processing region has a non-square shape, at least one of information indicating the size of the merge processing region, information indicating the width and/or height of the merge processing region, or information indicating the ratio between the width and height of the merge processing region is a bit It can be signaled through a stream.
  • the size of the merge processing region may be determined based on at least one of information signaled through the bitstream, picture resolution, slice size, and tile size.
  • a motion information candidate derived based on motion information of the block on which motion compensation prediction is performed may be added to the motion information table.
  • motion information candidate derived from a block included in the merge processing region when encoding/decoding another block in the merge processing region that is actually encoded/decoded later than the block, the block derived from the block is A case of using motion information candidates may occur. That is, there may be a case in which motion prediction compensation is performed using motion information of other blocks included in the merge processing region, despite the need to exclude dependencies between blocks during encoding/decoding of blocks included in the merge processing region. In order to solve such a problem, even if encoding/decoding of a block included in the merge processing region is completed, motion information of the encoded/decoded block may not be added to the motion information table.
  • the motion information table may be updated using only a block at a predefined position within the merge processing region.
  • the predefined positions are, in the merge processing area, a block located at the upper left, a block located at the upper right, a block located at the lower left, a block located at the lower right, a block located in the center, and a block adjacent to the right boundary Alternatively, it may include at least one of blocks adjacent to the lower boundary. For example, only motion information of a block adjacent to the lower right corner in the merge processing region may be updated in the motion information table, and motion information of other blocks may not be updated in the motion information table.
  • motion information candidates derived from the blocks may be added to the motion information table. That is, the motion information table may not be updated while blocks included in the merge processing region are encoded/decoded.
  • motion information candidates derived from the blocks may be added to the motion information table in a predefined order.
  • the predefined order may be determined according to the scan order of the coding blocks in the merge processing region or the coding tree unit.
  • the scan order may be at least one of a raster scan, a horizontal scan, a vertical scan, and a zigzag scan.
  • the predefined order may be determined based on motion information of each block or the number of blocks having the same motion information.
  • the motion information candidate including the unidirectional motion information may be added to the motion information table before the motion information candidate including the bidirectional motion information.
  • the motion information candidate including the bidirectional motion information may be added to the motion information table before the motion information candidate including the unidirectional motion information.
  • motion information candidates may be added to the motion information table according to an order of high frequency of use or an order of low frequency of use in the merge processing region or coding tree unit.
  • the motion information candidates included in the motion information table may be added to the merge candidate list.
  • a motion information candidate derived from a block included in the same merge processing region as the current block may be set not to be added to the merge candidate list of the current block.
  • the motion information candidate included in the motion information table when the current block is included in the merge processing region, it is possible to set not to use the motion information candidate included in the motion information table. That is, even when the number of merge candidates included in the merge candidate list of the current block is smaller than the maximum number, the motion information candidates included in the motion information table may not be added to the merge candidate list.
  • a motion information table for a merge processing region or a coding tree unit may be configured.
  • This motion information table serves to temporarily store motion information of blocks included in the merge processing area.
  • the motion information table for the merge processing region or the coding tree unit will be referred to as a temporary motion information table.
  • the motion information candidates stored in the temporary motion information table will be referred to as temporary motion information candidates.
  • 20 is a diagram illustrating a temporary motion information table.
  • a temporary motion information table for a coding tree unit or a merge processing region may be configured.
  • the motion information of the block may not be added to the motion information table HmvpCandList.
  • the temporary motion information candidate derived from the block may be added to the temporary motion information table HmvpMERCandList. That is, the temporary motion information candidate added to the temporary motion information table may not be added to the motion information table.
  • the motion information table may not include motion information candidates derived based on motion information of blocks included in the coding tree unit or merge processing region including the current block.
  • only motion information of some blocks among the blocks included in the head processing region may be added to the temporary motion information table.
  • only blocks of predefined positions within the merge processing region may be used to update the motion information table.
  • the predefined positions are, in the merge processing area, a block located at the upper left, a block located at the upper right, a block located at the lower left, a block located at the lower right, a block located in the center, and a block adjacent to the right boundary Alternatively, it may include at least one of blocks adjacent to the lower boundary.
  • only motion information of a block adjacent to the lower right corner in the merge processing region may be added to the temporary motion information table, and motion information of other blocks may not be added to the temporary motion information table.
  • the maximum number of temporary motion information candidates that the temporary motion information table can include may be set equal to the maximum number of motion information candidates that the motion information table can include.
  • the maximum number of temporary motion information candidates that the temporary motion information table may include may be determined according to the size of a coding tree unit or a merge processing region.
  • the maximum number of temporary motion information candidates that the temporary motion information table may include may be set to be smaller than the maximum number of motion information candidates that the motion information table may include.
  • the current block included in the coding tree unit or merge processing region may be set not to use the temporary motion information table for the coding tree unit or the merge processing region. That is, when the number of merge candidates included in the merge candidate list of the current block is less than the threshold, the motion information candidates included in the motion information table are added to the merge candidate list, and the temporary motion information candidates included in the temporary motion information table may not be added to the merge candidate list. Accordingly, motion information of the same coding tree unit as the current block or of another block included in the same merge processing region may not be used for motion compensation prediction of the current block.
  • the motion information table and the temporary motion information table may be merged.
  • 21 is a diagram illustrating an example of merging a motion information table and a temporary motion information table.
  • the temporary motion information candidates included in the temporary motion information table may be updated in the motion information table.
  • the temporary motion information candidates included in the temporary motion information table may be added to the motion information table in the order of insertion into the temporary motion information table (ie, in ascending or descending order of index values).
  • temporary motion information candidates included in the temporary motion information table may be added to the motion information table.
  • the predefined order may be determined according to the scan order of the coding blocks in the merge processing region or the coding tree unit.
  • the scan order may be at least one of a raster scan, a horizontal scan, a vertical scan, and a zigzag scan.
  • the predefined order may be determined based on motion information of each block or the number of blocks having the same motion information.
  • the temporary motion information candidate including the unidirectional motion information may be added to the motion information table before the temporary motion information candidate including the bidirectional motion information.
  • the temporary motion information candidate including the bidirectional motion information may be added to the motion information table before the temporary motion information candidate including the unidirectional motion information.
  • the temporary motion information candidates may be added to the motion information table according to an order of high frequency of use or an order of low frequency of use within the merge processing region or coding tree unit.
  • a redundancy check may be performed on the temporary motion information candidate. For example, when the same motion information candidate as the temporary motion information candidate included in the temporary motion information table is previously stored in the motion information table, the temporary motion information candidate may not be added to the motion information table. In this case, the redundancy check may be performed on some of the motion information candidates included in the motion information table. As an example, the redundancy check may be performed on motion information candidates whose index is greater than or equal to a threshold value or less than or equal to a threshold value. For example, when the temporary motion information candidate is the same as the motion information candidate having an index equal to or greater than a predefined value, the temporary motion information candidate may not be added to the motion information table.
  • the use of motion information candidates derived from the same coding tree unit as the current block or a block included in the same merge processing region may be restricted as a merge candidate of the current block.
  • the address information of the block includes the location of the block, the address of the block, the index of the block, the location of the merge processing area including the block, the address of the merge processing area including the block, the index of the merge processing area including the block, It may include at least one of the location of the included coding tree region, the address of the coding tree region including the block, or the index of the coding tree region including the block.
  • Intra prediction is to predict a current block by using a reconstructed sample that has been encoded/decoded around the current block.
  • the reconstructed sample before the in-loop filter is applied may be used for intra prediction of the current block.
  • the intra prediction technique includes a matrix-based intra prediction and a general intra prediction in consideration of a direction with respect to a neighboring reconstructed sample.
  • Information indicating the intra prediction technique of the current block may be signaled through a bitstream.
  • the information may be a 1-bit flag.
  • the intra prediction technique of the current block may be determined based on at least one of the position, size, and shape of the current block or the intra prediction technique of a neighboring block. For example, when the current block spans a picture boundary, it may be set so that intra prediction based on a metric is not applied to the current block.
  • Matrix-based intra prediction is a method of obtaining a prediction block of a current block based on a matrix product between a matrix pre-stored in the encoder and decoder and a reconstructed sample around the current block.
  • Information for specifying any one of a plurality of pre-stored matrices may be signaled through a bitstream.
  • the decoder may determine a matrix for intra prediction of the current block based on the information and the size of the current block.
  • General intra prediction is a method of obtaining a prediction block for a current block based on a non-directional intra prediction mode or a directional intra prediction mode.
  • a process for performing intra prediction based on general intra prediction will be described in more detail with reference to the drawings.
  • 22 is a flowchart of an intra prediction method according to an embodiment of the present invention.
  • a reference sample line of the current block may be determined (S2201).
  • the reference sample line refers to a set of reference samples included in a line k-th distant from the top and/or left of the current block.
  • the reference sample may be derived from a reconstructed sample that has been encoded/decoded around the current block.
  • Index information for identifying a reference sample line of a current block among a plurality of reference sample lines may be signaled through a bitstream.
  • index information intra_luma_ref_idx for specifying a reference sample line of the current block may be signaled through a bitstream.
  • the index information may be signaled in units of coding blocks.
  • the plurality of reference sample lines may include at least one of an upper and/or left first line, a second line, and a third line in the current block.
  • a reference sample line composed of a row adjacent to the top of the current block and a column adjacent to the left of the current block is called an adjacent reference sample line, and other reference sample lines are called non-adjacent reference sample lines.
  • Table 1 shows indices allocated to each of the candidate reference sample lines.
  • the reference sample line of the current block may be determined based on at least one of the position, size, and shape of the current block or the prediction encoding mode of the neighboring block. As an example, when the current block borders on a boundary of a picture, tile, slice, or coding tree unit, the adjacent reference sample line may be determined as the reference sample line of the current block.
  • the reference sample line may include upper reference samples positioned at the top of the current block and left reference samples positioned to the left of the current block.
  • the upper reference samples and the left reference samples may be derived from reconstructed samples around the current block.
  • the reconstructed samples may be in a state before the in-loop filter is applied.
  • an intra prediction mode of the current block may be determined (S2202). At least one of a non-directional intra prediction mode and a directional intra prediction mode may be determined as the intra prediction mode of the current block as the intra prediction mode of the current block.
  • the non-directional intra prediction mode includes a planar and DC, and the directional intra prediction mode includes 33 or 65 modes from the lower left diagonal direction to the upper right diagonal direction.
  • FIG. 23 is a diagram illustrating intra prediction modes.
  • FIG. 23A shows 35 intra prediction modes
  • FIG. 23B shows 67 intra prediction modes.
  • a larger number or a smaller number of intra prediction modes than shown in FIG. 23 may be defined.
  • a Most Probable Mode may be set based on the intra prediction mode of a neighboring block adjacent to the current block.
  • the neighboring block may include a left neighboring block adjacent to the left side of the current block and an upper neighboring block neighboring the upper side of the current block.
  • the number of MPMs included in the MPM list may be preset in the encoder and the decoder.
  • the number of MPMs may be 3, 4, 5, or 6 MPMs.
  • information indicating the number of MPMs may be signaled through a bitstream.
  • the number of MPMs may be determined based on at least one of the prediction encoding mode of the neighboring block, the size and shape of the current block, and the reference sample line index. For example, when the adjacent reference sample line is determined as the reference sample line of the current block, N MPMs are used, whereas when the non-adjacent reference sample line is determined as the reference sample line of the current block, M MPMs can be used. .
  • M is a natural number less than N, for example, N may be 6, M may be 5, 4, or 3. Accordingly, when the index of the reference sample line of the current block is 0 and the MPM flag is true, the intra prediction mode of the current block is determined as any one of six candidate intra prediction modes, while the index of the reference sample line of the current block is greater than 0 and the MPM flag is true, the intra prediction mode of the current block may be determined as any one of five candidate intra prediction modes.
  • a fixed number eg, 6 or 5 MPM candidates may be used irrespective of the index of the reference sample line of the current block.
  • An MPM list including a plurality of MPMs may be generated, and information indicating whether the same MPM as the intra prediction mode of the current block is included in the MPM list may be signaled through a bitstream.
  • the information is a 1-bit flag and may be referred to as an MPM flag.
  • index information for identifying one of the MPMs may be signaled through a bitstream.
  • index information mpm_idx specifying any one of a plurality of MPMs may be signaled through a bitstream.
  • the MPM specified by the index information may be set as the intra prediction mode of the current block.
  • residual mode information indicating any one of residual intra prediction modes excluding MPMs may be signaled through the bitstream.
  • the residual mode information indicates an index value corresponding to the intra prediction mode of the current block when the index is reallocated to the residual intra prediction modes except for the MPMs.
  • the decoder may sort the MPMs in an ascending order and compare residual mode information with the MPMs to determine the intra prediction mode of the current block. For example, when the residual mode information is equal to or less than the MPM, an intra prediction mode of the current block may be derived by adding 1 to the residual mode information.
  • comparison of some of the MPMs with residual mode information may be omitted. For example, among the MPMs, MPMs in the non-directional intra prediction mode may be excluded from comparison.
  • the non-directional intra prediction modes are set to MPMs, since the residual mode information clearly indicates the directional intra prediction mode, intra prediction of the current block through comparison of residual MPMs except for non-directional intra prediction modes with residual mode information mode can be induced.
  • the number of non-directional intra prediction modes may be added to the residual mode information, and the result may be compared with the residual MPMs.
  • the default mode flag may be signaled only when the MPM flag indicates that the same MPM as the current block is included in the MPM list.
  • the default mode may include at least one of a planar mode, a DC mode, a vertical mode, and a horizontal mode.
  • the default mode flag may indicate whether the intra prediction mode of the current block is the planner.
  • the default mode flag indicates that the intra prediction mode of the current block is not the default mode, one of the MPMs indicated by the index information may be set as the intra prediction mode of the current block.
  • the same intra prediction mode as the default mode may be set not to be set as the MPM.
  • the intra prediction mode of the current block may be derived by using 5 MPMs excluding the MPM corresponding to the planner.
  • index information indicating any one of the default modes may be further signaled.
  • the intra prediction mode of the current block may be set as a default mode indicated by the index information.
  • the default mode may be set not to be used.
  • a non-directional intra prediction mode such as a DC mode or a planar mode. Accordingly, when the index of the reference sample line is not 0, the default mode flag may not be signaled and the value of the default mode flag may be set to a predefined value (ie, false).
  • prediction samples for the current block may be obtained based on the determined intra prediction mode ( S2203 ).
  • prediction samples for the current block are generated based on the average value of the reference samples. Specifically, a value of all samples in the prediction block may be generated based on an average value of reference samples. The average value may be derived using at least one of upper reference samples positioned at the top of the current block and left reference samples positioned at the left of the current block.
  • the number or range of reference samples used to derive the average value may vary.
  • an average value may be calculated using only upper reference samples.
  • an average value may be calculated using only left reference samples. That is, when the width and height of the current block are different, the average value may be calculated using only reference samples adjacent to the longer length.
  • it may be determined whether to calculate the average value using only the upper reference samples or whether to calculate the average value using only the left reference samples.
  • a prediction sample may be obtained using the horizontal direction prediction sample and the vertical direction prediction sample.
  • the horizontal prediction sample is obtained based on a left reference sample and a right reference sample located on the same horizontal line as the prediction sample
  • the vertical direction prediction sample includes an upper reference sample and a lower portion located on the same vertical line as the prediction sample. It is obtained based on a reference sample.
  • the right reference sample may be generated by copying the reference sample adjacent to the upper right corner of the current block
  • the lower reference sample may be generated by copying the reference sample adjacent to the lower left corner of the current block.
  • a horizontal direction prediction sample may be obtained based on a weighted sum operation of a left reference sample and a right reference sample
  • a vertical direction prediction sample may be obtained based on a weighted sum operation of an upper reference sample and a lower reference sample.
  • the weight given to each reference sample may be determined according to the location of the prediction sample.
  • the prediction sample may be obtained based on an average operation or a weighted sum operation of the horizontal direction prediction sample and the vertical direction prediction sample. When the weighted sum operation is performed, weights given to the horizontal direction prediction sample and the vertical direction prediction sample may be determined based on the positions of the prediction samples.
  • a parameter indicating a prediction direction (or prediction angle) of the selected directional prediction mode may be determined.
  • Table 2 below shows the intra direction parameter intraPredAng for each intra prediction mode.
  • 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
  • Table 2 shows intra-direction parameters of each of the intra-prediction modes whose index is any one of 2 to 34 when 35 intra-prediction modes are defined. When more than 33 directional intra prediction modes are defined, Table 2 may be further subdivided to set intra direction parameters for each of the directional intra prediction modes.
  • a prediction sample may be obtained based on the value of the intra direction parameter.
  • the left reference samples and the upper reference samples may be arranged in a line.
  • 24 and 25 are diagrams illustrating examples of a one-dimensional array in which reference samples are arranged in a line.
  • FIGS. 24 and 25 show an example of a vertical one-dimensional array in which reference samples are arranged in a vertical direction
  • FIG. 25 shows an example of a horizontal one-dimensional array in which reference samples are arranged in a horizontal direction. Assuming that 35 intra prediction modes are defined, the embodiments of FIGS. 24 and 25 will be described.
  • the intra prediction mode index is any one of 11 to 18, a horizontal one-dimensional array in which the upper reference samples are rotated counterclockwise is applied, and when the intra prediction mode index is any one of 19 to 25, the left reference samples are A vertical one-dimensional array with a clockwise rotation can be applied.
  • the intra prediction mode angle may be considered.
  • the reference sample determination parameter may include a reference sample index for specifying a reference sample and a weight parameter for determining a weight applied to the reference sample.
  • the reference sample index iIdx and the weight parameter ifact may be obtained through the following Equations 4 and 5, respectively.
  • P ang represents an intra direction parameter.
  • the reference sample specified by the reference sample index iIdx corresponds to an integer pel.
  • At least one or more reference samples may be specified. Specifically, in consideration of the slope of the prediction mode, the position of the reference sample used to derive the prediction sample may be specified. As an example, a reference sample used to derive a prediction sample may be specified using the reference sample index iIdx.
  • a prediction sample may be generated by interpolating a plurality of reference samples.
  • the slope of the intra prediction mode is a value between the slope between the prediction sample and the first reference sample and the slope between the prediction sample and the second reference sample
  • the prediction sample is obtained by interpolating the first reference sample and the second reference sample.
  • the prediction sample can be obtained by interpolating the reference samples located adjacent to the left, right, top and bottom of the position where the angular line passes. have.
  • Equation 6 shows an example of obtaining a prediction sample based on reference samples.
  • Equation 6 P denotes a prediction sample, and Ref_1D denotes any one of the one-dimensionally arranged reference samples.
  • the position of the reference sample may be determined by the position (x, y) of the prediction sample and the reference sample index iIdx.
  • Equation 6 can be simplified as in Equation 7 below.
  • Intra prediction may be performed on the current block based on a plurality of intra prediction modes.
  • an intra prediction mode may be derived for each prediction sample, and a prediction sample may be derived based on the intra prediction mode allocated to each prediction sample.
  • an intra prediction mode may be derived for each region, and intra prediction may be performed for each region based on the intra prediction mode allocated to each region.
  • the region may include at least one sample.
  • At least one of the size and shape of the region may be adaptively determined based on at least one of the size, shape, and intra prediction mode of the current block.
  • at least one of the size or shape of a region may be predefined in the encoder and decoder independently of the size or shape of the current block.
  • 26 is a diagram illustrating angles formed by directional intra prediction modes with a straight line parallel to the x-axis.
  • the directional prediction modes may exist between the lower left diagonal direction and the upper right diagonal direction.
  • the directional prediction modes may exist between 45 degrees (lower left diagonal direction) and -135 degrees (upper right diagonal direction).
  • a reference sample farther from the prediction sample is used instead of the reference sample closer to the prediction sample among reference samples located on the angular line along the intra prediction angle
  • a case of deriving a prediction sample may occur.
  • 27 is a diagram illustrating an aspect in which a prediction sample is obtained when the current block has a non-square shape.
  • the current block has a non-square width greater than the height, and the intra prediction mode of the current block is a directional intra prediction mode having an angle between 0 and 45 degrees.
  • the intra prediction mode of the current block is a directional intra prediction mode having an angle between 0 and 45 degrees.
  • the left reference sample far from the prediction sample instead of the top reference sample T close to the prediction sample among the reference samples located on the angular mode along the angle L may be used.
  • the current block is a square with a height greater than the width
  • the intra prediction mode of the current block is a directional intra prediction mode between -90 and -135 degrees.
  • the intra prediction mode of the current block may be replaced with an intra prediction mode in the opposite direction. Accordingly, for the non-square block, directional prediction modes having a larger or smaller angle than the directional prediction modes shown in FIG. 23 may be used.
  • Such a directional intra prediction mode may be defined as a wide angle intra prediction mode.
  • the wide-angle intra prediction mode indicates a directional intra prediction mode that does not belong to a range of 45 degrees to -135 degrees.
  • 28 is a diagram illustrating wide-angle intra prediction modes.
  • intra prediction modes having an index of -1 to -14 and intra prediction modes having an index of 67 to 80 represent wide-angle intra prediction modes.
  • the length of the upper reference samples may be set to 2W+1, and the length of the left reference samples may be set to 2H+1.
  • the sample A shown in FIG. 28(a) is predicted using the reference sample T
  • the sample A shown in FIG. 28(b) is predicted using the reference sample L
  • Table 3 shows intra-direction parameters of intra prediction modes when 20 wide-angle intra prediction modes are defined.
  • the intra prediction mode of the current block may be converted into the wide-angle intra prediction mode.
  • the transformation range may be determined based on at least one of a size, a shape, and a ratio of the current block.
  • the ratio may indicate a ratio between the width and height of the current block.
  • the transform range may be set from an intra prediction mode index (eg, 66) in the upper right diagonal direction (index of the intra prediction mode in the upper right diagonal direction - N). .
  • N may be determined based on the ratio of the current block.
  • the intra prediction mode of the current block belongs to a transformation range, the intra prediction mode may be converted into a wide-angle intra prediction mode.
  • the transformation may be to subtract a value predefined for the intra prediction mode, and the predefined value may be the total number of intra prediction modes excluding wide-angle intra prediction modes (eg, 67).
  • the intra prediction modes of Nos. 66 to 53 may be converted into Wide-angle intra prediction modes of Nos. -1 to -14, respectively.
  • the transformation range may be set from the intra prediction mode index (eg, 2) in the lower left diagonal direction (index of the intra prediction mode in the lower left diagonal direction + M). .
  • M may be determined based on the ratio of the current block.
  • the intra prediction mode of the current block belongs to a transformation range, the intra prediction mode may be converted into a wide-angle intra prediction mode.
  • the transformation may be to add a predefined value to the intra prediction mode, and the predefined value may be the total number of directional intra prediction modes (eg, 65) excluding wide-angle intra prediction modes.
  • each of the intra prediction modes of Nos. 2 to 15 may be converted into Nos. 67 to No. 80 wide-angle intra prediction modes.
  • intra prediction modes belonging to the transform range will be referred to as wide-angle intra replacement prediction modes.
  • the transformation range may be determined based on the ratio of the current block.
  • Tables 4 and 5 show transformation ranges when 35 intra prediction modes are defined and 67 intra prediction modes are defined except for the wide-angle intra prediction mode, respectively.
  • the number of wide-angle intra alternative prediction modes included in the transform range may be different according to the ratio of the current block.
  • a transformation range may be set as shown in Table 6 below.
  • the wide-angle intra prediction mode is used It can be set not to. That is, even when the current block is non-square and the intra prediction mode of the current block belongs to the transform range, the intra prediction mode of the current block may not be transformed into the wide angle intra prediction mode.
  • the intra prediction mode of the current block is determined to be the wide-angle intra prediction mode
  • non-adjacent reference sample lines are set as not available as reference sample lines of the current block, or any one of a plurality of reference sample lines is selected
  • the multi-line intra prediction encoding method may be set not to be used.
  • the adjacent reference sample line may be determined as the reference sample line of the current block.
  • refW and refH may be set to the sum of nTbW and nTbH. Accordingly, except for the upper left reference sample, non-adjacent reference samples having a distance of i from the current block are (nTbW + nTbH + offsetX[i]) upper reference samples and (nTbW + nTbH + offsetY[i]) left reference samples. sample may be included. That is, a non-adjacent reference sample having a distance of i from the current block may include (2nTbW + 2nTbH + offsetX[i] + offsetY[i] + 1) reference samples.
  • the value of offsetX when the value of whRatio is greater than 1, the value of offsetX may be set to be greater than the value of offsetY. For example, the value of offsetX may be set to 1, and the value of offsetY may be set to 0.
  • the value of whRatio when the value of whRatio is less than 1, the value of offsetY may be set larger than the value of offsetX. For example, the value of offsetX may be set to 0, and the value of offsetY may be set to 1.
  • wide-angle intra-prediction modes are used in addition to the existing intra-prediction modes, resources required for encoding the wide-angle intra-prediction modes increase, and encoding efficiency may decrease. Accordingly, instead of encoding the wide-angle intra-prediction modes as they are, the encoding efficiency may be improved by encoding alternative intra-prediction modes for the wide-angle intra prediction modes.
  • No. 2 which is the wide-angle alternative intra prediction mode of No. 67
  • No. 66 may be encoded as the intra prediction mode of the current block.
  • the decoder may decode the intra prediction mode of the current block and determine whether the decoded intra prediction mode is included in a transform range.
  • the decoded intra prediction mode is the wide-angle replacement intra prediction mode
  • the intra prediction mode may be converted into the wide-angle intra prediction mode.
  • the wide-angle intra prediction mode may be encoded as it is.
  • Encoding of the intra prediction mode may be performed based on the above-described MPM list. Specifically, when the neighboring block is encoded in the wide-angle intra prediction mode, the MPM may be set based on the wide-angle alternative intra prediction mode corresponding to the wide-angle intra prediction mode.
  • a residual image derived by differentiating the prediction image from the original image may be derived.
  • the current block may be transformed in order to decompose the residual image into 2D frequency components.
  • the transformation may be performed using a transformation technique such as Discrete Cosine Transform (DCT) or Discrete Sine Transform (DST).
  • DCT decomposes (or transforms) the residual image into 2D frequency components by using cosine transform
  • DST uses sine transform to decompose (or transforms) the residual image into 2D frequency components.
  • frequency components may be expressed as a base image.
  • N 2 basic pattern components may be obtained.
  • the size of each of the basic pattern components included in the NxN size block may be obtained through transformation.
  • the size of the basic pattern component may be referred to as a DCT coefficient or a DST coefficient according to a used transformation technique.
  • Transformation technique DCT is mainly used to transform an image in which a lot of non-zero low-frequency components are distributed.
  • the transformation technique DST is mainly used for images in which high frequency components are widely distributed.
  • the residual image may be transformed using a transform technique other than DCT or DST.
  • the transform coefficient may mean a DCT coefficient or a DST coefficient.
  • the transform coefficient may mean a size of a basic pattern component generated as a result of the second transform.
  • the residual sample to which the transform skip is applied will also be referred to as a transform coefficient.
  • the transformation scheme may be determined in units of blocks.
  • the transform scheme may be determined based on at least one of a prediction encoding mode of the current block, a size of the current block, and a shape of the current block.
  • a prediction encoding mode of the current block e.g., a prediction encoding mode of the current block
  • a size of the current block e.g., a size of the current block
  • a shape of the current block e.g., a shape of the current block.
  • 2D image transformation may not be performed on some blocks of the residual image.
  • a process in which 2D image transformation is not performed may be referred to as a transform skip.
  • Transform skip indicates that the first transform and the second transform are not applied to the current block.
  • quantization may be applied to residual values to which transform is not performed.
  • Whether to allow transform skip to the current block may be determined based on at least one of a size or a shape of the current block. As an example, only when the size of the current block is smaller than the threshold, the transform skip may be applied.
  • the threshold value relates to at least one of a width, a height, or the number of samples of the current block, and may be defined as 32x32 or the like.
  • the transform skip may be allowed only for a square block. As an example, transform skip may be allowed for a square block having a size of 32x32, 16x16, 8x8, or 4x4. Alternatively, the transform skip may be allowed only when the sub-partition intra encoding method is not used.
  • the sub-partition intra encoding method when the sub-partition intra encoding method is applied to the current block, it may be determined whether transform skip is applied for each sub-partition.
  • 29 is a diagram illustrating an example of determining whether to skip transform for each sub-block.
  • Transform skip may be applied to only some of the plurality of sub-blocks. As an example, as in the example shown in FIG. 29 , it may be set such that transform skip is applied to a subblock located at the upper end of the current block, and transform skip is not allowed to a subblock located at the lower end of the current block.
  • a transform type of a subblock in which transform skip is not allowed may be determined based on information signaled from a bitstream.
  • a transformation type may be determined based on tu_mts_idx, which will be described later.
  • the transform type of the sub-block may be determined based on the size of the sub-block.
  • the horizontal direction transformation type is determined based on whether the width of the sub-block is equal to or greater than the threshold and/or less than or equal to the threshold, and whether the height of the sub-block is greater than or equal to the threshold and/or less than or equal to the threshold Based on the vertical direction transformation type may be determined.
  • the transformed current block may be transformed again.
  • a transform based on DCT or DST may be defined as a first transform
  • re-transformation of a block to which the first transform is applied may be defined as a second transform.
  • the first transform may be performed using any one of a plurality of transform core candidates.
  • the first conversion may be performed using any one of DCT2, DCT8, and DST7.
  • Different transformation cores may be used for horizontal and vertical directions.
  • Information indicating the combination of the horizontal direction conversion core and the vertical direction conversion core may be signaled through the bitstream.
  • the units of performing the first transformation and the second transformation may be different.
  • a first transform may be performed on an 8x8 block
  • a second transform may be performed on a subblock having a size of 4x4 among the transformed 8x8 blocks.
  • the second transform may be performed on transform coefficients belonging to three 4x4 sub-blocks.
  • the three sub-blocks may include a sub-block positioned at the upper left of the current block, a sub-block adjacent to the right of the sub-block, and a sub-block adjacent to the lower end of the sub-block.
  • the second transform may be performed on an 8x8 block.
  • Transform coefficients of residual regions in which the second transform is not performed may be set to zero.
  • a first transform may be performed on a 4x4 block and a second transform may be performed on an 8x8 region including the transformed 4x4 block.
  • Information indicating whether the second transformation is performed may be signaled through a bitstream. For example, a flag indicating whether the second transformation is performed or index information specifying whether the second transformation is performed and a transformation kernel used for the second transformation may be signaled. For example, when the index information is 0, it indicates that the second transformation is not performed on the current block. On the other hand, when the index information is greater than 0, a transformation kernel for performing the second transformation may be determined by the index information.
  • whether to perform the second conversion may be determined. As an example, only when the horizontal direction conversion core and the vertical direction conversion core are the same, the second conversion may be performed. Alternatively, only when the horizontal direction conversion core and the vertical direction conversion core are different, the second conversion may be performed.
  • the second transformation may be permitted only when a transformation core in which the transformation in the horizontal direction and the transformation in the vertical direction are previously defined is used.
  • the second conversion may be allowed.
  • the second transform may be allowed only when the DCT2 transform core is used for the horizontal transform and the vertical transform.
  • whether to perform the second transform may be determined based on the number of non-zero transform coefficients of the current block. For example, when the non-zero transform coefficient of the current block is less than or equal to the threshold, the second transform is set not to be used, and when the non-zero transform coefficient of the current block is greater than the threshold, the second transform is set to be used can be Only when the current block is encoded by intra prediction, it may be set to use the second transform.
  • the second transform may be determined whether to perform the second transform based on the position of the last non-zero transform coefficient of the current block. For example, when at least one of the x-axis coordinate or the y-axis coordinate of the last non-zero transform coefficient of the current block is greater than a threshold value, or the x-axis coordinate or y-axis coordinate of the sub-block to which the last non-zero transform coefficient of the current block belongs When at least one of the values is greater than the threshold, the second transformation may not be performed.
  • the threshold value may be predefined in the encoder and the decoder. Alternatively, the threshold value may be determined based on the size or shape of the current block.
  • the DC component represents the transform coefficient of the upper left position in the current block.
  • the second transform may not be performed.
  • Information indicating the transformation type of the current block may be signaled through a bitstream.
  • the information may be index information tu_mts_idx indicating one of combinations of a transform type for a horizontal direction and a transform type for a vertical direction.
  • a transform core for a vertical direction and a transform core for a horizontal direction may be determined.
  • Table 7 shows transform type combinations according to tu_mts_idx.
  • the transform type may be determined as any one of DCT2, DST7, or DCT8.
  • the transform skip may be inserted into the transform type candidate.
  • DCT2 may be applied to the horizontal direction and the vertical direction. If tu_mts_idx is 2, DCT8 may be applied to the horizontal direction and DCT7 may be applied to the vertical direction.
  • the transform core of the sub-block may be independently determined. For example, information for specifying a transform type combination candidate for each subblock may be encoded and signaled. Accordingly, the transformation core between the sub-blocks may be different.
  • sub-blocks may use the same transform type.
  • tu_mts_idx specifying a transform type combination candidate may be signaled only for the first sub-block.
  • tu_mts_idx may be signaled at the coding block level, and the transform types of sub-blocks may be determined with reference to tu_mts_idx signaled at the coding block level.
  • a transform type may be determined based on at least one of a size, a shape, or an intra prediction mode of one of the sub-blocks, and the determined transform type may be set to be used for all sub-blocks.
  • FIG. 30 is a diagram illustrating an example in which sub-blocks use the same transform type.
  • the same transform type of the sub-block (Sub-CU0) positioned at the upper end of the coding block and the sub-block (Sub-CU1) positioned at the lower end of the coding block can be set to be the same.
  • the determined transform type is also applied to the lower sub-block can do.
  • the transform types of the sub-block (Sub-CU0) positioned on the left side of the coding block and the sub-block (Sub-CU1) positioned on the right side of the coding block may be identically set.
  • the determined transform type is also applied to the right sub-block can do.
  • Whether to encode the index information may be determined based on at least one of the size and shape of the current block, the number of non-zero coefficients, whether the quadratic transformation is performed, or whether the sub-partition intra encoding method is applied. For example, when the sub-partition intra encoding method is applied to the current block, or when the number of non-zero coefficients is equal to or smaller than a threshold value, the signaling of the index information may be omitted. When signaling of index information is omitted, a default transformation type may be applied to the current block.
  • the default transform type may include at least one of DCT2 and DST7.
  • one of the plurality of default transform types is selected in consideration of at least one of the size and shape of the current block, the intra prediction mode, whether the secondary transform is performed, or whether the sub-partition intra encoding method is applied. You can choose. For example, based on whether the width of the current block belongs to a preset range, one of a plurality of transformation types is determined as a horizontal transformation type, and based on whether the height of the current block belongs to a preset range , one of the plurality of transformation types may be determined as the vertical transformation type.
  • the default mode may be determined differently according to the size and shape of the current block, whether the intra prediction mode or the quadratic transformation is performed.
  • the horizontal transform type and the vertical transform type may be set as default transform types.
  • the horizontal transform type and the vertical transform type may be set to DCT2.
  • the threshold value may be determined based on the size or shape of the current block. As an example, when the size of the current block is less than or equal to 32x32, the threshold is set to 2, and when the current block is larger than 32x32 (eg, when the current block is a coding block having a size of 32x64 or 64x32), the threshold You can set the value to 4.
  • a plurality of lookup tables may be pre-stored in the encoder/decoder. At least one of an index value allocated to the transformation type combination candidates, types of transformation type combination candidates, or the number of transformation type combination candidates may be different from the plurality of lookup tables.
  • a lookup table for the current block may be selected based on at least one of a size, a shape, a prediction encoding mode, an intra prediction mode, whether a secondary transform is applied, or whether a transform skip is applied to a neighboring block of the current block.
  • the first lookup table when the size of the current block is 4x4 or less or when the current block is encoded by inter prediction, the first lookup table is used, and when the size of the current block is greater than 4x4 or when the current block is encoded by intra prediction may use the second lookup table.
  • information indicating any one of a plurality of lookup tables may be signaled through a bitstream.
  • the decoder may select a lookup table for the current block based on the information.
  • the index assigned to the transform type combination candidate is determined based on at least one of the size, shape, prediction encoding mode, intra prediction mode, secondary transform or whether transform skip is applied to a neighboring block of the current block. can be adaptively determined. For example, when the size of the current block is 4x4, the index assigned to the transform skip may have a smaller value than the index assigned to the transform skip when the size of the current block is greater than 4x4. Specifically, when the size of the current block is 4x4, index 0 is assigned to the transform skip, and when the current block is greater than 4x4 and less than or equal to 16x16, an index greater than 0 (eg, index 1) can be assigned to the transform skip. When the current block is larger than 16x16, a maximum value (eg, 5) may be assigned to the index of the transform skip.
  • a maximum value eg, 5
  • index 0 may be assigned to the transform skip.
  • index 1 an index greater than 0 (eg, index 1) may be assigned to the transform skip.
  • index 0 may be assigned to the transform skip.
  • index 1 having a value greater than 0 may be allocated to the transform skip.
  • Transform type combination candidates different from the transform type combination candidates listed in Table 7 may be defined and used.
  • a transform type combination candidate to which a transform skip is applied to any one of a horizontal transform or a vertical transform and a transform core such as DCT2, DCT8, or DST7 is applied to the other may be used.
  • whether to use the transform skip as a transform type candidate for the horizontal or vertical direction is determined based on at least one of the size (eg, width and/or height), shape, prediction encoding mode, and intra prediction mode of the current block.
  • Information indicating whether index information for determining the transformation type of the current block is explicitly signaled may be signaled through the bitstream.
  • information sps_explicit_intra_mts_flag indicating whether explicit transformation type determination is allowed for a block encoded by intra prediction and/or information indicating whether explicit transformation type determination is allowed for a block encoded by inter prediction Information sps_explicit_inter_mts_flag may be signaled.
  • the transformation type of the current block may be determined based on index information tu_mts_idx signaled from the bitstream.
  • the size and shape of the current block, whether sub-block-unit transform is allowed, the position of the sub-block including a non-zero transform coefficient, and whether the second transform is performed may be determined based on at least one of whether the sub-partition intra encoding method is applied. For example, the horizontal transformation type of the current block may be determined based on the width of the current block, and the vertical transformation type of the current block may be determined based on the height of the current block.
  • the horizontal transformation type when the width of the current block is less than 4 or greater than 16, the horizontal transformation type may be determined to be DCT2. Otherwise, the horizontal transformation type may be determined to be DST7.
  • the transformation type in the vertical direction When the height of the current block is less than 4 or greater than 16, the transformation type in the vertical direction may be determined as DCT2. Otherwise, the transformation type in the vertical direction may be determined as DST7.
  • a threshold value compared to a width and a height may be determined based on at least one of a size, a shape, and an intra prediction mode of the current block.
  • the horizontal transformation type and the vertical transformation type are set to be the same, while when the current block is a non-square type with different heights and widths, the horizontal transformation type and the vertical direction
  • the conversion type can be set differently.
  • the horizontal transformation type may be determined as DST7
  • the vertical transformation type may be determined as DCT2.
  • the transformation type in the vertical direction may be determined as DST7 and the transformation type in the horizontal direction may be determined as DCT2.
  • the number and/or type of transform type candidates or the number and/or type of transform type combination candidates may be different depending on whether explicit transform type determination is allowed.
  • DCT2, DST7, and DCT8 may be used as transform type candidates.
  • each of the horizontal direction transformation type and the vertical direction transformation type may be set to DCT2, DST8, or DCT8.
  • DCT2 and DST7 may be used as transform type candidates.
  • each of the horizontal direction transformation type and the vertical direction transformation type may be determined as DCT2 or DST7.
  • the decoder may perform an inverse transform (a second inverse transform) of the second transform, and may perform an inverse transform (a first inverse transform) of the first transform on a result of the inverse transform.
  • a second inverse transform a second inverse transform
  • a first inverse transform a first inverse transform
  • the decoder may obtain a residual block through inverse quantization and inverse transform.
  • the decoder may obtain a reconstructed block for the current block by adding the prediction block and the residual block.
  • the in-loop filter may include at least one of a deblocking filter, a sample adaptive offset filter (SAO), and an adaptive loop filter (ALF).
  • SAO sample adaptive offset filter
  • ALF adaptive loop filter
  • the second reconstruction block may be obtained by applying at least one of a deblocking filter, SAO, and ALF to the first reconstruction block.
  • SAO or ALF may be applied after the deblocking filter is applied.
  • the deblocking filter is for alleviating image quality deterioration (blocking artifact) at the boundary of a block that occurs as quantization is performed on a block-by-block basis.
  • the block strength (Blocking Strength, BS) between the first reconstruction block and the neighboring reconstruction block may be determined.
  • 31 is a flowchart illustrating a process of determining block strength.
  • P denotes a first reconstruction block
  • Q denotes a neighboring reconstruction block.
  • the neighbor reconstruction block may be adjacent to the left or upper side of the current block.
  • whether to apply the deblocking filter may be determined. For example, when the block strength is 0, filtering may not be performed.
  • the SAO is to alleviate a ringing artifact that occurs when quantization is performed in the frequency domain.
  • SAO may be performed by adding or subtracting an offset determined in consideration of the pattern of the first reconstructed image.
  • the method of determining the offset includes an edge offset (EO) or a band offset (Band Offset).
  • EO represents a method of determining an offset of a current sample according to a pattern of surrounding pixels.
  • BO represents a method of applying a common offset to a set of pixels having similar brightness values in a region. Specifically, pixel brightness may be divided into 32 equal sections, and pixels having similar brightness values may be set as one set. For example, four adjacent bands among 32 bands may be set as one group, and the same offset value may be applied to samples belonging to the four bands.
  • ALF is a method of generating a second reconstructed image by applying a filter of a predefined size/shape to a first reconstructed image or a reconstructed image to which a deblocking filter is applied. Equation 8 below shows an example of application of ALF.
  • Any one of predefined filter candidates may be selected in units of pictures, coding tree units, coding blocks, prediction blocks, or transform blocks. Each of the filter candidates may be different in either size or shape.
  • At least one of 5x5, 7x7, or 9x9 diamond shapes may be selected.
  • chroma component only a diamond shape with a size of 5x5 can be used.
  • one picture is divided into a plurality of regions, and the plurality of regions are encoded/decoded in parallel. ways can be considered. Specifically, a picture may be divided into tiles or slices (or groups of tiles) according to processing purposes.
  • a tile represents a basic unit of parallel encoding/decoding. Each tile can be processed in parallel.
  • the tile may have a rectangular shape. Alternatively, non-rectangular shaped tiles may be accepted.
  • Information indicating whether a non-rectangular tile is permitted or whether a non-rectangular tile exists may be signaled through a bitstream.
  • data of other tiles may be set not to be used.
  • the probability table of the context adaptive binary arithmetic coding (CABAC) context may be initialized in units of tiles, and the in-loop filter may not be applied at the boundaries of tiles.
  • data in other tiles may not be used as candidates for motion vector derivation.
  • data in another tile may be set not to be used as a merge candidate, a motion vector prediction candidate (AMVP candidate), or a motion information candidate.
  • AMVP candidate motion vector prediction candidate
  • Image encoding/decoding information may be signaled through the slice header.
  • Information signaled through the slice header may be commonly applied to coding tree units or tiles included in a slice.
  • a slice may be referred to as a tile group.
  • 33 is a diagram illustrating a picture division method according to an embodiment of the present invention.
  • the processing unit may include at least one of a tile or a slice.
  • the syntax no_pic_partition_flag indicating whether the current picture is divided into a plurality of tiles or slices may be signaled through a bitstream.
  • a value of 0 of the syntax no_pic_partition_flag indicates that the current picture is divided into at least one tile or at least one slice.
  • a value of 1 in the syntax no_pic_partiton_flag indicates that the current picture is not divided into a plurality of tiles or a plurality of slices.
  • the division process of the current picture may be terminated.
  • the current picture is composed of one tile and one slice (or tile group).
  • information indicating whether a plurality of tiles exist in a picture may be signaled through a bitstream.
  • the information may include at least one of a 1-bit flag indicating whether a plurality of tiles exist in the picture or information specifying the number of tiles in the picture.
  • tile division information may be signaled through a bitstream.
  • a picture may be divided into at least one tile based on the signaled tile division information (S3320).
  • a slice may be determined by merging the plurality of tiles or dividing one tile ( S3330 ).
  • a tile may include at least one coding tree unit.
  • the boundary of the tile may be set to coincide with the boundary of the coding tree unit. That is, a split form in which one coding tree unit is split into a plurality may not be allowed.
  • the height of the adjacent tiles or the width of the adjacent tiles may be set to have the same value.
  • the heights of tiles belonging to the same tile row and/or the widths of tiles belonging to the same tile column may be set to be the same.
  • Tiles belonging to the same tile row may be referred to as a horizontal tile set, and tiles belonging to the same tile column may be referred to as a vertical tile set.
  • information indicating whether the width and/or height of a tile to be encoded/decoded is set to be the same as the width and/or height of a previous tile may be signaled.
  • Information indicating a picture division type may be signaled through a bitstream.
  • the information may be encoded and signaled through a picture parameter set, a sequence parameter set, or a slice header.
  • the information indicating the picture division type may include at least one of information indicating whether tiles are divided into equal sizes, information indicating the number of tile columns, or information indicating the number of tile rows.
  • the number of tile columns indicates the number of vertical tile sets
  • the number of tile rows indicates the number of horizontal tile sets.
  • Information indicating whether tiles are divided into equal sizes may be a 1-bit flag uniform_tile_spacing_flag. When it is determined that the picture is divided into tiles of equal size, the remaining tiles except for the tile(s) adjacent to the right and/or lower boundary of the picture may have the same size.
  • the syntax tile_cols_width_minus1 indicating the width of the tile and the syntax tile_rows_height_minus1 indicating the height of the tile may be signaled.
  • the syntax tile_cols_width_minus1 represents a value obtained by subtracting 1 from the number of coding tree unit columns included in tiles of equal size.
  • the syntax tile_rows_height_minus1 represents a value obtained by subtracting 1 from the number of coding tree unit rows included in tiles of equal size.
  • the last tile column may have a width value specified by the syntax tile_cols_width_minus1 or a smaller value.
  • the last tile row may have a height value specified by the syntax tile_rows_height_minus1 or a smaller value.
  • the index of the last tile column is m
  • a value obtained by subtracting the sum of widths of 0 to m ⁇ 1 th tile columns from the width of the current picture may be set as the width of the last tile column.
  • n a value obtained by subtracting the sum of heights of 0 to n ⁇ 1 th tile rows from the height of the current picture may be set as the height of the last tile row. That is, the width of the tile positioned at the right boundary of the current picture and/or the height of the tile positioned at the lower boundary of the current picture may be smaller than or equal to the width and/or height of each other tile.
  • each of the tiles belongs to a different column and/or row.
  • information indicating the number of tile columns and/or the number of tile rows may be signaled.
  • information num_tile_row_minus1 indicating the number of tile rows generated by dividing a picture and information num_tile_column_minus1 indicating the number of tile columns may be signaled through a bitstream.
  • the syntax num_tile_row_minus1 indicates a value obtained by subtracting 1 from the number of tile rows
  • the syntax num_tile_column_minus1 indicates a value obtained by subtracting 1 from the number of tile columns.
  • num_tile_columns_minus1 may represent 3
  • num_tile_rows_minus1 may represent 2.
  • the syntax num_tile_column_minus1 indicating the number of tile columns and/or the syntax num_tile_rows_minus1 indicating the number of tile rows may be signaled when the value of the syntax uniform_tile_spacing_flag is 0. That is, when it is determined that the current picture is not divided into tiles having equal heights and widths, a syntax num_tile_column_minus1 indicating the number of tile columns and/or a syntax num_tile_rows_minus1 indicating the number of tile rows may be signaled.
  • tile_cols_width_minus1[i] may indicate the width of the i-th tile column
  • tile_rows_height_minus[j] may indicate the height of the j-th tile row.
  • the syntax tile_cols_width_minus1[i] represents a value obtained by subtracting 1 from the number of coding tree unit columns constituting the i-th tile column. For the last tile column, signaling of the syntax tile_cols_width_minus1[i] may be omitted.
  • the width of the last tile column may be derived by dividing the width of the previous tile column from the width of the current picture.
  • the syntax tile_rows_height_minus1[j] represents a value obtained by subtracting 1 from the number of coding tree unit rows constituting the j-th tile row. For the last tile row, signaling of the syntax tile_rows_height_minus1[j] may be omitted.
  • the height of the last tile row may be derived by differentiating the heights of previous tile rows from the height of the current picture.
  • information indicating the size of the coding tree unit may be signaled through a sequence parameter set or a picture parameter set.
  • One tile may be composed of at least one coding tree unit.
  • the remaining tiles except for tiles adjacent to the right or lower boundary of the picture may be set not to include an area smaller than the coding tree unit. That is, the boundary of the tile coincides with the boundary of the coding tree unit.
  • tiles may have the same size in all areas except for the picture boundary.
  • the horizontally adjacent tiles may have the same height, or vertically adjacent tiles may have the same width.
  • Information indicating whether the current picture is divided into a plurality of tiles may be signaled through a bitstream.
  • the syntax single_tile_in_pic_flag may be signaled through the bitstream.
  • the syntax single_tile_in_pic_flag equal to 1 indicates that the current picture is not divided into a plurality of tiles.
  • single_tile_in_pic_flag is 0, it indicates that the current picture can be divided into a plurality of tiles.
  • the current picture can be divided into a plurality of tiles
  • information for determining the number of tile columns and tile rows, information indicating whether tiles are equally divided, and information for determining the sizes of tile columns and tile rows At least one of the information may be encoded.
  • a flag indicating whether a picture can be divided into a plurality of tiles or slices may be encoded and signaled.
  • the syntax no_pic_partition_flag may be encoded and signaled.
  • a value of the syntax no_pic_partition_flag equal to 1 indicates that the picture is not divided into a plurality of tiles or slices.
  • the value of no_pic_partition_flag being 0 indicates that the picture may be divided into a plurality of tiles or slices.
  • the value of the syntax no_pic_partition_flag is 0, at least one of tile partition information and slice partition information may be signaled.
  • Information for determining the size of a tile may be encoded and signaled.
  • the syntax element tile_width_minus1[i] indicating the width of the i-th tile column and the syntax element tile_height_minus1[i] indicating the height of the i-th tile row may be encoded in the bitstream.
  • the size of the current tile column or the current tile row may be derived based on the size information of the previous tile column or the previous tile row.
  • information for specifying the number of tile columns in which the width of a tile column in the current picture is explicitly signaled may be signaled through a bitstream.
  • a syntax num_exp_tile_columns_minus1 for determining the number of tile columns in which the width of a tile column is signaled may be signaled through a bitstream.
  • the syntax num_exp_tile_columns_minus1 may be a value obtained by subtracting 1 from the number of tile columns in which the width of a tile column is signaled.
  • syntax for specifying the width of a tile column may be encoded and signaled.
  • the syntax tile_width_minus1[i] indicating the width of the i-th tile column may be signaled through the bitstream.
  • the syntax tile_width_minus1[i] may be a difference of 1 from the number of coding tree unit columns included in the tile column.
  • the width of the corresponding tile column may be determined based on the syntax tile_width_minus1[i] signaled through the bitstream.
  • the width of the corresponding tile column may be determined based on the last signaled syntax tile_width_minus1[l].
  • l denotes an index of a tile column whose width is signaled last, and may be an integer smaller than j.
  • the width of the tile column j is set to the value obtained by adding 1 to the syntax tile_width_minus1[l] can be
  • the difference value obtained by subtracting the widths of the previous tile columns from the width of the current picture is the difference value of the tile column j. You can set the width.
  • Table 9 shows the process of determining the width of a tile column.
  • a variable PicWidthInCtbsY indicates the number of coding tree unit columns included in the current picture.
  • the variable PicWidthInCtbsY may be derived as in Equation 9 below.
  • variable reminingWidthInCtbsY represents a value obtained by dividing the widths of tile columns accumulated in the variable PicWidthInCtbsY.
  • remainingWidthInCtbsY may be derived by differentiating the sum of widths of tile columns from 0 to i-1 in PicWidthInCtbsY.
  • variable uniformTileColWidth can be derived by adding 1 to the last explicitly signaled width tile_column_width_minus1[num_exp_tile_columns_minus1].
  • the residual area may be divided into the size of the variable uniformTileColWidth.
  • the residual area may be set as the last tile column as it is.
  • the width of the tile column may be set to a smaller value among the variables uniformTileColWidth and remainingWidthInCtbY.
  • the width of the remaining tile columns excluding the tile columns whose width is explicitly signaled may have a value less than or equal to the width of the last tile column among the tile columns whose width is explicitly signaled.
  • information for specifying the number of tile rows in which the height of a tile row in the current picture is signaled may be signaled through a bitstream.
  • a syntax num_exp_tile_rows_minus1 for determining the number of tile rows in which the height of a tile row is signaled may be signaled through a bitstream.
  • the syntax num_exp_tile_rows_minus1 may be a value obtained by subtracting 1 from the number of tile rows in which the height of a tile row is signaled.
  • syntax for specifying the height of a tile row may be encoded and signaled.
  • the syntax tile_height_minus1[i] indicating the height of the i-th tile row may be signaled through the bitstream.
  • the syntax tile_height_minus1[i] may be obtained by subtracting 1 from the number of coding tree unit rows included in the tile row.
  • the height of the corresponding tile row may be determined based on the syntax tile_height_minus1[i] signaled through the bitstream.
  • the height of the tile row may be determined based on the last signaled syntax tile_height_minus1[l].
  • l represents an index of a tile row whose height is signaled last, and may be an integer smaller than j.
  • the height of the tile row j may be set to the value obtained by adding 1 to the syntax tile_height_minus1[l].
  • the difference value obtained by subtracting the heights of the previous tile rows from the height of the current picture is the difference value of the tile row j.
  • the height can be set.
  • Table 10 shows a process of determining the height of a tile row.
  • variable PicHeightInCtbsY indicates the number of coding tree unit rows included in the current picture.
  • the variable PicWidthInCtbsY may be derived as in Equation 10 below.
  • variable reminingHeightInCtbsY represents a value obtained by subtracting the heights of tile rows accumulated in the variable PicHeightInCtbsY.
  • remainingHeightInCtbsY may be derived from PicHeightInCtbsY by differentiating the sum of heights of tile rows from 0 to i-1.
  • variable uniformTileRowHeight may be derived by adding 1 to the height tile_row_height_minus1[num_exp_tile_rows_minus1] of the last explicitly signaled tile row.
  • the variable remainingHeightInCtbY indicating the number of residual coding tree unit rows in the current picture is equal to or greater than the variable uniformTileRowHeight, the residual area may be divided into the size of the variable uniformTileRowHeight.
  • the residual area may be set as the last tile row as it is.
  • the height of the tile row may be set to a smaller value among the variables uniformTileRowHeight and remainingHeightInCtbY.
  • the height of the remaining tile rows excluding the tile rows whose height is explicitly signaled may have a value less than or equal to the width of the last tile row among the tile rows whose height is explicitly signaled.
  • Table 11 illustrates a syntax table including a syntax indicating the number of tile columns in which the width is explicitly signaled, and a syntax indicating the number of tile rows in which the height is explicitly signaled.
  • the syntax tile_column_width_minus1 and the syntax tile_row_height_minus1 are signaled by one each.
  • the width indicated by the syntax tile_column_width_minus1[0] is the same as the width of the current picture (eg, the value of tile_column_width_minus1[0] is (PicWidthInCtbsY-1))
  • the height indicated by the syntax tile_row_height_minus1[0] is equal to the height of the current picture It can be set to have different values.
  • the value of the syntax tile_row_height_minus1[0] may be set to a value smaller than (PicHeightInCtbsY-1).
  • the value of the syntax tile_row_height_minus1[0] is set to a value smaller than (PicHeightInCtbsY-1)
  • the picture is divided into at least two or more tiles.
  • the syntax loop_filter_across_tiles_enabled_flag indicates whether it is allowed to apply the in-loop filter at the boundary of tiles in a picture referring to the picture parameter set.
  • the in-loop filter may include at least one of a deblocking filter, ALF, and SAO.
  • a value of the flag loop_filter_across_tiles_enabled_flag of 1 indicates that an in-loop filter crossing the boundary of tiles in a picture referring to the picture parameter set can be applied.
  • a value of the flag loop_filter_across_tiles_enabled_flag equal to 0 indicates that the in-loop filter is not allowed to be applied at the boundary of tiles in a picture referring to the picture parameter set.
  • the syntax loop_filter_across_slices_enabled_flag indicates whether it is allowed to apply the in-loop filter at the boundary of slices in a picture referring to the picture parameter set.
  • the in-loop filter may include at least one of a deblocking filter, ALF, and SAO.
  • a value of the flag loop_filter_across_slices_enabled_flag of 1 indicates that an in-loop filter crossing the boundary of slices in a picture referring to the picture parameter set can be applied.
  • a value of the flag loop_filter_across_slices_enabled_flag indicates that the in-loop filter is not allowed to be applied at the boundary of slices in a picture referring to the picture parameter set.
  • At least one tile or a portion of a tile may be defined as one processing unit.
  • a plurality of tiles may be defined as one slice.
  • one tile may be divided into a plurality of slices.
  • One slice may include at least one coding tree unit column.
  • information indicating the height of each slice may be signaled through a bitstream.
  • Image encoding/decoding information may be signaled through the slice header.
  • Information signaled through the slice header may be commonly applied to tiles and/or blocks belonging to a slice.
  • Information indicating the slice type may be signaled through a bitstream.
  • the information indicates a method of defining a slice in the current picture.
  • the syntax rect_slice_flag indicating the slice type may be signaled through the bitstream.
  • rect_slice_flag indicates whether a slice is defined based on a raster scan order of tiles or whether a slice is defined in a rectangular shape. For example, rect_slice_flag equal to 0 indicates that a slice is defined based on a raster scan order of tiles. On the other hand, when rect_slice_flag is 1, it indicates that a slice is defined in a rectangular shape.
  • the definition method based on the raster scan is to define at least one or more tiles according to the raster scan order, and then define the specified at least one or more tiles as a slice. If the definition method based on raster scan is followed, one or more consecutive tile(s) may be defined as a slice. In this case, consecutive tiles may be determined according to a raster scan order. When a raster scan slice is applied, a slice of a non-rectangular shape may be generated.
  • 35 and 36 are diagrams illustrating an example in which a slice is defined based on a raster order.
  • the first slice slice0 may be defined as including Tile0 to Tile2 according to the raster scan order.
  • the second slice slice1 may be defined as including Tile3 to Tile8 according to the raster scan order.
  • the last slice slice2 may include the remaining tiles Tile 9 to Tile11 according to the raster scan order.
  • information indicating the number of tiles included in each slice may be signaled.
  • signaling of information indicating the number of tiles included in the slice may be omitted.
  • the widths or heights of the tiles included in the slice may be different.
  • the height of Tile3 among the tiles included in the second slice slice1 is shown to be different from the remaining tiles.
  • the rectangular slice definition method is a division method that allows only rectangular slices. When the rectangular slice definition method is applied, tiles positioned at four corners of the slice belong to the same row or the same column.
  • FIG. 37 is a diagram illustrating an example in which only a rectangular slice is allowed.
  • the fourth slice slice3 includes Tile5, Tile6, Tile9, and Tile10.
  • a slice includes a plurality of tiles
  • a rectangle having two vertices of an upper left tile and a lower right tile constituting the slice may be defined as one slice.
  • a slice boundary may coincide with a picture boundary and/or a tile boundary.
  • a left boundary or an upper boundary of a slice may be set as a boundary of a picture, or a left boundary or an upper boundary of a slice may be set as a boundary of a tile.
  • one tile may be divided into a plurality of rectangular slices.
  • a syntax indicating the number of slices in a picture may be encoded and signaled.
  • a syntax num_slices_in_pic_minus1 indicating the number of slices in a picture may be signaled through a bitstream.
  • the syntax num_slices_in_pic_minus1 may indicate a value obtained by subtracting 1 from the number of slices in a picture. Accordingly, the decoder may determine the total number of slices by adding 1 to the value indicated by the syntax num_slices_in_pic_minus1.
  • a syntax num_slices_in_pic_minus2 indicating a value obtained by subtracting 2 from the number of slices in a picture may be coded.
  • information for identifying tiles included in each slice may be signaled in order to determine tiles included in each slice.
  • the information may be used to specify at least one of a first tile or a last tile of a slice.
  • An order number between tiles may be determined according to a predetermined scan order. For example, when the raster scan order is followed, the first tile indicates a tile located at the upper left of the slice, and the last tile indicates a tile located at the lower right of the slice.
  • Information for identifying at least one of an index of a tile positioned at an upper left end in a slice or an index of a tile positioned at a lower right end of a slice may be signaled through a bitstream.
  • Difference information between the index of the tile included in the first slice and the index of the tile included in the second slice may be encoded and signaled.
  • the first slice and the second slice are determined based on a scan order, and tiles occupied by each slice may be different.
  • the index of the second slice may be the index i of the first slice plus 1 .
  • first tile when the first tile is divided to include a plurality of slices, in the second slice or second tile including the first slice included in the first tile and the second tile that is the next tile of the first tile in the scan order. Difference information between the included second slices may be encoded. In this case, difference information may be encoded only with respect to the first slice or the last slice among the plurality of slices included in the first tile.
  • a tile used to derive difference information between the first slice and the second slice may be located at the upper left, upper right, lower right, lower left, or center of the slice.
  • the syntax tile_idx_delta[i] indicating the index difference between the upper-left tile of the i-th slice and the upper-left tile of the next slice (ie, the i+1th slice) may be signaled through the bitstream.
  • the syntax tile_idx_delta[i] may indicate an absolute value of a difference between the index of the upper-left tile of the i-th slice and the index of the upper-left tile of the i+1th slice.
  • syntax tile_idx_delta_minus1[i] derived by subtracting 1 from the absolute value of the index difference between the upper-left tile of the i-th slice and the upper-left tile of the next slice may be encoded/decoded.
  • Table 12 shows a syntax structure including the above syntax.
  • a syntax indicating a sign of a tile index difference between slices and tile_idx_delta_sign[i] may also be encoded/decoded. For example, a value of 1 in the syntax tile_idx_delta_sign[i] indicates that the sign of the difference value indicated by tile_idx_delta[i] is a positive number, and a value of 0 in the syntax tile_idx_delta_sign[i] indicates the difference value indicated by tile_idx_delta[i]. indicates that the sign of is negative.
  • encoding/decoding of the syntax tile_idx_delta_sign may be omitted.
  • the position of the upper left tile in the i+1th slice may be determined. Specifically, the index of the upper-left tile of the i+1th slice may be derived by adding the index of the upper-left tile of the i-th slice and the syntax tile_idx_delta[i].
  • the tile index difference value between the first slice (ie, the slice in which i is 0) and the second slice (ie, the slice in which i is 1) in the picture is always set to a positive number. Accordingly, with respect to the first slice in the picture, encoding/decoding of tile_idx_delta_sign[i] may be omitted and its value may be estimated to be 1.
  • the same tile index difference value is always the same as the previous slice of the last slice in the picture (eg, a slice in which i has a value obtained by subtracting 1 from num_slices_in_pic_minus1) and the last slice in the picture (eg, a slice in which i has a value indicated by num_slices_in_pic_minus1). set to a positive number. Accordingly, even in the previous slice of the last slice, encoding/decoding of tile_idx_delta_sign[i] may be omitted and its value may be estimated as 1.
  • encoding/decoding of the syntax tile_idx_delta[i] indicating a difference from the next slice may be omitted.
  • Information specifying at least one of a width or a height of a slice may be encoded/decoded.
  • at least one of the syntax slice_width_in_tiles_minus1[i] indicating the width of the i-th slice or the syntax slice_height_in_tiles_minus1[i] indicating the height of the i-th slice may be signaled through the bitstream.
  • the syntax slice_width_in_tiles_minus1[i] represents a value obtained by subtracting 1 from the number of tile columns included in the i-th slice.
  • the syntax slice_height_in_tiles_minus[i] represents a value obtained by subtracting 1 from the number of tile rows included in the i-th slice.
  • the i-th slice may be composed of a number of tile columns determined based on the syntax slice_width_in_tiles_minus1[i] and a number of tile rows determined based on the syntax slice_height_in_tiles_minus1[i].
  • the upper left tile of the i-th tile column may have an index value determined based on tile_idx_delta[i] or tile_idx_delta_minus1[i].
  • the syntax slice_height_in_tiles_minus1[i] indicating the height of the slice may be signaled only for a slice adjacent to the left boundary of the picture, and coding of the syntax slice_height_in_tiles_minus1[i] may be omitted for other slices.
  • the height of a slice in which encoding of the syntax slice_height_in_tiles_minus[i] is omitted may be set to be equal to the height of a slice in contact with the left boundary of the current picture among slices included in the same row.
  • a flag rect_slice_flag indicating a slice type may be encoded, and when the flag rect_slice_flag is 1, a syntax num_slices_in_pic_minus1 indicating the number of slices in a picture may be encoded.
  • the syntax slice_width_in_tiles_minus1[i] indicating the width of each slice and the syntax slice_height_in_tiles_minus1[i] indicating the height of each slice may be encoded and signaled.
  • a syntax tile_idx_delta[i] indicating a difference between the index of the tile included in the i-th slice and the index of the tile included in the i+1-th slice may be signaled.
  • encoding of the syntax tile_idx_delta[i] may be omitted.
  • the encoder may determine whether to encode the syntax tile_idx_delta[i] indicating the difference between tile indices, and according to the determination, encode the flag tile_idx_delta_present_flag indicating whether the syntax tile_idx_delta[i] is encoded.
  • the syntax tile_idx_delta[i] may be coded only when the value of the flag tile_idx_delta_present_flag is 1.
  • One tile may be divided into a plurality of slices.
  • a plurality of slides may be generated by dividing a tile in a horizontal direction.
  • the slice does not include a plurality of tiles
  • syntax slice_width_in_tiles_minus1[i] and the syntax slice_height_in_tiles_minus1[i] are both 0, information indicating whether a tile is divided into a plurality of slices may be signaled.
  • syntax num_slices_in_tile_minus1[i] indicating the number of slices included in the tile may be signaled.
  • the syntax num_slices_in_tile_minus1[i] represents a value obtained by subtracting 1 from the number of slices included in the i-th tile.
  • syntax num_exp_slices_in_tile[i] indicating information indicating the number of slice heights to be explicitly signaled may be signaled through the bitstream.
  • the syntax num_exp_slices_in_tile[i] may have a value equal to or smaller than the number of slices included in the tile.
  • syntax num_exp_slices_in_tile[i] When the syntax num_exp_slices_in_tile[i] is 0, it indicates that the tile is not divided into a plurality of slices.
  • the syntax num_exp_slices_in_tile[i] greater than 0 indicates that the tile can be divided into a plurality of slices.
  • Information indicating the height of a slice by the number of syntax num_exp_slices_in_tile[i] may be signaled. For example, when the syntax num_exp_slices_in_tile is greater than 1, the syntax exp_slice_height_in_ctu_minus1[j] indicating the height of the j-th slice in the tile may signal.
  • the width of the slice j may be determined based on the syntax exp_slice_height_in_ctu_minus1[j] signaled through the bitstream.
  • the index k of the slice is equal to or greater than the number of slices whose height is explicitly signaled
  • the height of the slice k may be determined based on the last signaled syntax exp_slice_height_in_ctu_minus1[l].
  • l represents the index of the slice whose height was signaled last, and may be an integer smaller than k.
  • the height of the slice k may be set to the value obtained by adding 1 to the syntax exp_slice_height_in_ctu_minus1[l].
  • the difference between the heights of the previous slices from the height of the tile is less than the value obtained by adding 1 to the syntax exp_slice_height_in_ctu_minus1[l]
  • the difference between the heights of the previous slices from the height of the tile may be set as the height of slice k. .
  • heights of the remaining slices except for slices whose heights are explicitly signaled may have a value equal to or less than the height of the last slice among the slices whose heights are explicitly signaled.
  • encoding of the syntax slice_width_in_tiles_minus1 may be omitted. Also, when the number of tile rows in the current picture is one, encoding of the syntax slice_height_in_tiles_minus1 may be omitted.
  • encoding of at least one of the information indicating the width of the slice and the information indicating the height of the slice may be omitted.
  • encoding of the syntax slice_width_in_tiles_minus1 indicating the width of a slice may be omitted, and a distance from a predetermined position tile in an adjacent slice may be set as the width of the slice.
  • the upper-left tile of the i+1th slice adjacent to the right of the i-th slice may be specified by the syntax top_left_brick_idx_delta[i].
  • the width of the i-th slice is the difference between the x-coordinate of the upper-left tile in the i-th slice (eg, the x-coordinate of the upper-left sample) and the x-coordinate of the upper-left tile in the i+1th slice (eg, the x-coordinate of the upper-left sample). can be induced.
  • encoding of the syntax slice_height_in_tiles_minus1 indicating the height of the slice may be omitted, and a distance from a predetermined position tile in an adjacent slice may be set as the width of the slice.
  • the top-left tile of the j-th slice located below the i-th slice may be specified by the syntax top_left_brick_idx_delta[j-1].
  • the height of the i-th slice can be derived as a difference between the y-coordinate of the upper-left tile in the i-th slice (e.g., the y-coordinate of the upper-left sample) and the y-coordinate of the upper-left tile in the j-th slice (e.g., the y-coordinate of the upper-left sample). .
  • tile_idx_delta_present_flag indicating whether the difference value information is used may be signaled through a bitstream.
  • a value of the syntax tile_idx_delta_present_flag of 1 indicates that the syntax indicating the difference value of the tile index is encoded and signaled.
  • the i-th slice includes the syntax slice_width_in_tiles_minus1[i] indicating the size of the slice and the syntax slice_height_in_tiles_minus1[i] for determining the position of the upper left tile or the position of the upper right tile in the slice. It may be defined by difference value information (eg, tile_idx_delta[i]).
  • the position/size of the i-th slice may be defined by the syntax slice_width_in_tiles_minus1[i] indicating the size of the slice and the syntax slice_height_in_tiles_minus1[i].
  • the slice adjacent to the right of the slice in contact with the left boundary of the current picture may be set to have the same height as the slice in contact with the left boundary.
  • information indicating the height of the slice is signaled only for a slice in contact with the left boundary of the current picture, and signaling of information indicating the height of the slice for a slice not in contact with the left boundary of the current picture can be omitted.
  • Table 13 shows a syntax structure for determining whether to signal information for determining the size of a slice based on a tile index within a slice.
  • variable SliceTopLeftTileIdx[i] indicates the index of the tile included in the i-th slice. Specifically, the index of a tile at a predefined position in the i-th slice may be set as a variable SliceTopLeftTileIdx[i]. A tile at a predefined location may represent an upper left tile.
  • the variable NumTileColumns indicates the number of tile columns included in a picture.
  • the position of the tile column to which the upper-left tile belongs may be determined based on a modulo operation (%) between the index of the upper-left tile in the i-th slice and a value obtained by subtracting 1 from the variable NumTileColums.
  • the result value n by the modulo operation indicates that the upper left tile belongs to a tile column having an index of n.
  • the slice size is signaled. In detail, based on whether the tile column to which the upper left tile of the slice belongs corresponds to the rightmost tile column in the picture, it may be determined whether information indicating the slice size is signaled.
  • the position of the tile row to which the upper-left tile belongs may be determined based on a division operation between the index of the upper-left tile in the i-th slice and the variable NumTileColumns. For example, the fact that the quotient of the division operation is m indicates that the upper left tile is included in the tile row having the index m. That is, as shown in Table 13, when the quotient is (NumTileRows-1) when the upper-left tile index SliceTopLeftTileIdx[i] of the i-th slice is divided by the variable NumTileColumn, it can be determined that the i-th slice is included in the last tile row. .
  • signaling of the syntax slice_height_in_tiles_minus[i] indicating the height of the slice may be omitted.
  • the result of the division operation is the same as a value obtained by subtracting 1 from the number of tile rows in the picture NumTileRows
  • encoding/decoding of the syntax slice_height_in_tiles_minus1[i] may be omitted.
  • the value of the syntax slice_height_in_tiles_minus1[i] may be regarded as 0.
  • both encoding/decoding of the syntax slice_width_in_tiles_minus1[i] and the syntax slice_height_in_tiles_minus1[i] may be omitted.
  • the values of both syntaxes may be regarded as 0.
  • the upper-left tile in the slice is not included in the lowermost row in the picture, at least one of whether the upper-left tile in the slice belongs to the left-most column in the picture and/or whether the difference information between tile indices is encoded. Whether to encode/decode the syntax slice_height_in_tiles_minus1[i] indicating the height may be determined.
  • the syntax may be set equal to the height slice_height_in_tiles_minus[i-1] of the previous slice.
  • Table 14 shows semantics for the syntax slice_width_in_tiles_minus1[i] and the syntax slice_height_in_tiles_minus1[i].
  • slice_width_in_tiles_minus1 [ i ] plus 1 specifies the width of the i-th rectangular slice in units of tile columns.
  • the value of slice_width_in_tiles_minus1[ i ] shall be in the range of 0 to NumTileColumns - 1, inclusive.
  • slice_width_in_tiles_minus1[ i ] is not present, the following applies:- When i is less than num_slices_in_pic_minus1 and NumTileColumns is equal to 1, or ( SliceTopLeftTileIdx[i] % NumTileColumns) is euqal to NumTileColumns-1, the value of slice_width_in_tiles_minus1[ i ] is inferred to be equal to 0.
  • slice_height_in_tiles_minus1 [ i ] plus 1 specifies the height of the i-th rectangular slice in units of tile rows.
  • the value of slice_height_in_tiles_minus1[ i ] shall be in the range of 0 to NumTileRows - 1, inclusive.
  • the syntax tile_idx_delta_present_flag indicating whether information indicating the difference of tile indexes is encoded is encoded/decoded when the number of slices included in the current picture is one or more.
  • the syntax num_exp_slices_in_tile[ i] may be additionally encoded/decoded.
  • the tile cannot be divided into a plurality of slices. Accordingly, when the height of the tile including the i-th slice is 1, encoding/decoding of the syntax num_exp_slices_in_tile[i] may be omitted and the value may be estimated as 0.
  • two slices in a rectangular shape may be generated by dividing the picture in a horizontal direction or a vertical direction.
  • 38 is a diagram illustrating an example of a case in which a picture consists of two slices.
  • Fig. 38(a) shows an example in which the picture is divided in the horizontal direction
  • Fig. 38(b) shows an example in which the picture is divided in the vertical direction.
  • each of the two slices may be distinguished only by a syntax indicating the width of the slice or a syntax indicating the height of the slice.
  • a syntax slice_width_in_tiles_minus1[0] indicating the width of a slice with index 0 and a syntax slice_height_in_tiles_minus1 indicating the height of a slice with index 0 are Based on [0], slice 0 can be specified.
  • slice 1 encoding/decoding of syntax for determining the size of a slice may be omitted, and a residual region excluding slice 0 in a picture may be set as slice 1.
  • the index of the upper left tile of slice 1 may be derived by subtracting 1 from the product of the number of tile rows and the number of tile columns included in slice 0.
  • slice 0 when a picture is vertically split, a syntax slice_width_in_tiles_minus1[0] indicating the width of a slice with index 0 and a syntax indicating the height of a slice with index 0 slice_height_in_tiles_minus1[0] Based on , slice 0 can be specified.
  • slice 1 encoding/decoding of syntax for determining the size of a slice may be omitted, and a residual region excluding slice 0 in a picture may be set as slice 1.
  • the index of the upper left tile of slice 1 may be derived to be the same as the number of tile rows included in slice 1.
  • the indexes of the upper left tile in all slices can be derived. Accordingly, when the number of slices included in the picture is two or less, encoding/decoding of the syntax tile_idx_delta_present_flag indicating whether tile index difference information is encoded/decoded may be omitted, and the value may be derived to 0. Accordingly, encoding/decoding of tile_idx_delta[i] for each slice may also be omitted.
  • Table 15 shows a syntax structure in which encoding/decoding of the syntax tile_idx_delta_present_flag is omitted when the number of slices included in the current picture is two or less.
  • the syntax tile_idx_delta_present_flag may be encoded/decoded only when the syntax num_slices_in_pic_minus1 is greater than 1.
  • the position of the upper left tile in each slice can be identified even without using tile index difference information.
  • 39 is a diagram illustrating a case in which the number of tile columns or tile rows in a picture is one.
  • FIG. 39A illustrates a case in which a picture includes one tile column
  • FIG. 39B illustrates a case in which a picture includes one tile row.
  • the index of the upper left tile of the slice may be derived based on the height of the previous slice. For example, if the first tile is divided into two slices, as in the example shown in (a) of FIG. 39 , a syntax indicating the width of the first slice slice0 among the two slices slice_width_in_tiles_minus1[0] and a syntax indicating the height slice_width_in_tiles_minus1[0] is all set to 0.
  • the second slice slice1 belongs to the same tile as the first slice slice0, encoding/decoding of the syntax slice_width_in_tiles_minus1[i] and the syntax slice_width_in_tiles_minus1[i] indicating the height may be omitted for the second slice slice1.
  • the left tile index of the third slice may be set to the number of tile rows signaled for previous slices. As an example, since it can be recognized that one tile row is organized into a slice from the syntax slice_height_in_tiles_minus1[0] signaled for slice 0, the index of the upper left tile row of slice 2 may be set to 1.
  • the index of the upper left tile row of slice 3 may be derived based on the height of the tile row of previous slices. As an example, from the syntax slice_height_in_tiles_minus1[0] signaled for slice 0 and the syntax slice_height_width_in_tiles_minus1[2] signaled for slice 2, it can be recognized that a total of three tile rows are organized into slices, so the upper left of slice 3 The index of the tile row may be set to 3.
  • the number of tile rows occupied by previous slices may be determined as the upper left tile index of the next slice.
  • the index of the upper left tile of the slice may be derived based on the width of the previous slice. For example, as in the example shown in (b) of FIG. 39 , when the first tile is set to one slice, the syntax slice_width_in_tiles_minus1[0] indicating the width of the first slice slice0 and the syntax slice_width_in_tiles_minus1[0] indicating the height are All are set to 0.
  • the left tile index of the second slice may be set to the number of tile columns signaled for the previous slice. As an example, since it can be recognized that one tile column is organized into a slice from the syntax slice_width_in_tiles_minus1[0] signaled for slice 0, the index of the upper left tile row of slice 1 may be set to 1.
  • the index of the upper left tile row of slice 2 may be derived based on the height of the tile column of previous slices. As an example, from the syntax slice_width_in_tiles_minus1[0] signaled for slice 0 and the syntax slice_width_width_in_tiles_minus1[1] signaled for slice 1, it can be recognized that a total of three tile columns are organized into slices, so the upper left of slice 2
  • the index of the tile row may be set to 3.
  • the number of tile columns occupied by previous slices may be determined as the upper left tile index of the next slice.
  • the index of the upper left tile of each slice can be specified without tile index difference information. Accordingly, when the number of tile columns or tile rows included in a picture is one, encoding/decoding of the syntax tile_idx_delta_present_flag indicating whether tile index difference information is encoded/decoded may be omitted, and the value may be derived to 0. . Accordingly, encoding/decoding of tile_idx_delta[i] for each slice may also be omitted.
  • Table 16 shows a syntax structure in which encoding/decoding of the syntax tile_idx_delta_present_flag is omitted when the number of tile columns or tile rows included in the current picture is one.
  • syntax slice_width_in_tiles_minus1[i] indicating the width of a slice and the syntax slice_height_in_tiles_minus1[i] indicating the height of a slice are 0, it indicates that a slice is composed of one tile, or that one tile is composed of a plurality of tiles. It may indicate that it is composed of slices.
  • the heights of the plurality of slices may be set to have the same value, or slices except for the last slice among the plurality of slices may be set to have the same height. In this case, height information may be signaled only for the first slice in the tile.
  • each slice can be determined only by the tile index difference between the two slices. Accordingly, when the value of the syntax tile_idx_delta_present_flag indicating that the tile index difference is encoded is 1 and the value of the syntax num_slice_in_pic_minus1 indicating the number of slices in the picture is 1, the syntax slice_width_in_tiles_minus1 indicating the width of the slice and the syntax slice_tiles_heminus1 indicating the height of the slice Encoding/decoding may be omitted. Table 17 shows an example of this.
  • the syntax slice_width_in_tiles_minus1[i] and/or the syntax slice_height_in_tiles_minus1[i] may be encoded/decoded.
  • the decoder When encoding/decoding of the syntax slice_width_in_tiles_minus1[i] and the syntax slice_height_in_tiles_minus1[i] is omitted, the decoder considers at least one of a tile index difference between two slices, the number of tile columns, or the number of tile rows, width can be derived.
  • the difference indicated by the syntax slice_width_in_tiles_minus1[i] and the syntax tile_idx_delta[i] From the value 1 can be estimated as a difference value.
  • the value of the syntax slice_height_in_tiles_minus1[i] may be estimated as a value obtained by subtracting 1 from the variable NumTileRows indicating the number of tile rows. That is, the width of the first slice in the picture may be set to the same value as the syntax tile_idx_delta[0], and the height of the first slice may be set to be equal to the number of tile columns.
  • the value of the syntax tile_idx_delta[i] indicating the tile index difference between two slices is equal to or greater than the variable NumTileColumns indicating the number of tile columns in the picture
  • the value of the syntax slice_width_in_tiles_minus1[i] and the variable indicating the number of tile columns In NumTileColumns, 1 can be estimated as a subdued value.
  • the value of the syntax slice_height_in_tiles_minus1[i] may be estimated as a value obtained by dividing the syntax tile_idx_delta[i] by the number of tile columns NumTileColumns (eg, tile_idx_delta[i]/NumTileColumn). That is, the width of the first slice in the picture is set to the same value as the number of tile columns, and the height of the first slice may be set to the same value as the quotient obtained by dividing the syntax tile_idx_delta[0] by the variable NumTileColumn.
  • syntax slice_width_in_tiles_minus1[i] indicating the size of the i-th slice and the syntax slice_height_in_tiles_minus1[i] indicating the height of the slice are all 0, information for determining the division type of the tile including the i-th slice, for example, syntax It is possible to encode/decode num_exp_slice_in_tile[i] and/or exp_slice_height_in_ctus_minus1[ j ].
  • Whether to encode/decode the syntax tile_idx_delta[i] may be determined based on the number of tiles in the picture. Table 18 shows an example for the above description.
  • a variable NumTileInPic indicates the number of slices in a picture.
  • the threshold may be a natural number such as 1, 2, or 3.
  • a threshold value of 1 is exemplified. That is, when there is one tile in the picture, it is only possible to divide one tile into a plurality of slices. Accordingly, since the syntax difference values for all slices are 0, encoding/decoding of the syntax tile_idx_delta[i] may be omitted.
  • whether to encode/decode a syntax tile_idx_delta_present_flag indicating whether to decode a tile index difference value may be determined based on the number of tiles in the picture. For example, when the number of tiles in a picture is less than or equal to a threshold, encoding/decoding of the syntax tile_idx_delta_present_flag may be omitted.
  • the threshold may be a natural number such as 1, 2, or 3.
  • a slice is defined by assigning an order number to the tiles according to the raster scan order.
  • a slice may be defined by assigning an order number to tiles along a vertical scan, a horizontal scan, or a diagonal scan.
  • each of the components (eg, unit, module, etc.) constituting the block diagram in the above-described embodiment may be implemented as a hardware device or software, or a plurality of components may be combined to form one hardware device or software. may be implemented.
  • the above-described embodiment may be implemented in the form of program instructions that can be executed through various computer components and recorded in a computer-readable recording medium.
  • the computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.
  • Examples of the computer-readable recording medium include a hard disk, a magnetic medium such as a floppy disk and a magnetic tape, an optical recording medium such as a CD-ROM, a DVD, and a magneto-optical medium such as a floppy disk. media), and hardware devices specially configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like.
  • the hardware device may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.
  • the present invention can be applied to an electronic device encoding/decoding an image.

Landscapes

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

Abstract

본 개시의 일 실시예에 의한 영상 신호 복호화 방법은, 타일 인덱스 차분값 정보가 존재하는지 여부를 나타내는 제1 플래그를 복호화하는 단계; 제1 슬라이스에 대한 크기 정보를 복호화하는 단계; 상기 제1 플래그가 참인 경우, 상기 제1 슬라이스에 대한 타일 인덱스 차분값 정보를 복호화하는 단계; 및 상기 타일 인덱스 차분값 정보에 기초하여, 제2 슬라이스의 좌상단에 위치하는 제2 타일의 인덱스를 결정하는 단계를 포함한다.

Description

영상 신호 부호화/복호화 방법 및 이를 위한 장치
본 발명은 영상 신호 부호화/복호화 방법 및 이를 위한 장치에 관한 것이다.
디스플레이 패널이 점점 더 대형화되는 추세에 따라 점점 더 높은 화질의 비디오 서비스가 요구되고 있다. 고화질 비디오 서비스의 가장 큰 문제는 데이터량이 크게 증가하는 것이며, 이러한 문제를 해결하기 위해, 비디오 압축율을 향상시키기 위한 연구가 활발하게 진행되고 있다. 대표적인 예로, 2009년에 MPEG(Motion Picture Experts Group)과 ITU-T(International Telecommunication Union-Telecommunication) 산하의 VCEG(Video Coding Experts Group)에서는 JCT-VC(Joint Collaborative Team on Video Coding)를 결성하였다. JCT-VC는 H.264/AVC에 비해 약 2배의 압축 성능을 갖는 비디오 압축 표준인 HEVC(High Efficiency Video Coding)를 제안하였으며, 2013년 1월 25일에 표준 승인되었다. 고화질 비디오 서비스의 급격한 발전에 따라 HEVC의 성능도 점차 적으로 그 한계를 드러내고 있다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 픽처를 복수의 타일들 또는 복수의 슬라이스들로 분할하는 방법 및 상기 방법을 수행하기 위한 장치를 제공하는 것을 목적으로 한다.
본 발명은 픽처를 복수의 타일들로 분할함에 있어서, 타일 인덱스를 기초로 슬라이스를 구획하는 방법 및 상기 방법을 수행하기 위한 장치를 제공하는 것을 목적으로 한다.
본 발명은 픽처를 복수의 슬라이스들로 분할함에 있어서, 이전 슬라이스와의 차분 정보를 기초로 슬라이스를 구획하는 방법 및 상기 방법을 수행하기 위한 장치를 제공하는 것을 목적으로 한다.
본 발명에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
본 발명에 따른 비디오 신호 복호화 방법은, 타일 인덱스 차분값 정보가 존재하는지 여부를 나타내는 제1 플래그를 복호화하는 단계, 제1 슬라이스에 대한 크기 정보를 복호화하는 단계, 상기 제1 플래그가 참인 경우, 상기 제1 슬라이스에 대한 타일 인덱스 차분값 정보를 복호화하는 단계, 및 상기 타일 인덱스 차분값 정보에 기초하여, 제2 슬라이스의 좌상단에 위치하는 제2 타일의 인덱스를 결정하는 단계를 포함한다. 이때, 상기 타일 인덱스 차분값 정보는, 상기 제1 슬라이스의 좌상단에 위치하는 제1 타일의 인덱스와 상기 제2 타일의 인덱스 사이의 차분을 나타내고, 상기 제2 슬라이스에 대한 크기 정보를 복호화할 것인지 여부는, 상기 제2 슬라이스 내 상기 제2 타일의 인덱스를 기초로 결정될 수 있다
본 발명에 따른 비디오 신호 복호화 방법에 있어서, 상기 크기 정보는, 너비 정보 또는 높이 정보 중 적어도 하나를 포함하고, 상기 제2 타일이 상기 현재 픽처 내 최우측 타일 열에 포함되는 경우, 상기 제2 슬라이스에 대한 상기 너비 정보의 복호화가 생략될 수 있다.
본 발명에 따른 비디오 신호 복호화 방법에 있어서, 상기 제2 슬라이스에 대해 상기 너비 정보의 복호화가 생략되는 경우, 상기 최우측 타일 열의 너비가 상기 제2 슬라이스의 너비로 결정될 수 있다.
본 발명에 따른 비디오 신호 복호화 방법에 있어서, 상기 제2 타일이 상기 현재 픽처 내 최하단 타일 행에 포함되는 경우, 상기 제2 슬라이스에 대한 상기 높이 정보의 복호화가 생략될 수 있다.
본 발명에 따른 비디오 신호 복호화 방법에 있어서, 상기 제2 슬라이스에 대해 상기 높이 정보의 복호화가 생략되는 경우, 상기 최하단 타일 열의 높이가 상기 제2 슬라이스의 높이로 결정될 수 있다.
본 발명에 따른 비디오 신호 복호화 방법에 있어서, 상기 제1 플래그는, 상기 현재 픽처 내 슬라이스의 개수가 문턱값 이상인 경우에 한하여, 복호화될 수 있다.
본 발명에 따른 비디오 신호 부호화 방법은, 제1 슬라이스 및 제2 슬라이스의 크기를 결정하는 단계, 상기 제1 슬라이스에 대한 크기 정보를 부호화하는 단계, 및 상기 제1 슬라이스에 대한 타일 인덱스 차분값 정보를 부호화하는 단계를 포함한다. 이때, 상기 타일 인덱스 차분값 정보는, 상기 제1 슬라이스의 좌상단에 위치하는 제1 타일의 인덱스와 상기 제2 슬라이스의 좌상단에 위치하는 제2 타일의 인덱스 사이의 차분을 나타내고, 상기 제2 슬라이스에 대한 너비 정보를 부호화할 것인지 여부는, 상기 제2 타일의 인덱스를 기초로 결정될 수 있다.
본 발명에 대하여 위에서 간략하게 요약된 특징들은 후술하는 본 발명의 상세한 설명의 예시적인 양상일 뿐이며, 본 발명의 범위를 제한하는 것은 아니다.
본 발명에 의하면, 픽처를 복수의 타일들 또는 슬라이스들로 분할함으로써, 부호화/복호화 효율을 향상시킬 수 있다.
본 발명에 의하면, 타일 인덱스를 기초로 슬라이스를 구획함으로써, 부호화/복호화 효율을 향상시킬 수 있다.
본 발명에 의하면, 이전 슬라이스와의 차분 정보를 기초로 슬라이스를 구획함으로써, 부호화/복호화 효율을 향상시킬 수 있다.
본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
도 1은 본 발명의 일 실시예에 따른 영상 부호화기(인코더기)의 블록도이다.
도 2는 본 발명의 일 실시예에 따른 영상 복호화기(디코더기)의 블록도이다.
도 3은 본 발명의 일 실시예에 따른 기본 코딩 트리 유닛을 도시한 도면이다.
도 4는 코딩 블록의 다양한 분할 형태를 나타낸 도면이다.
도 5는 코딩 트리 유닛의 분할 양상을 예시한 도면이다.
도 6은 본 발명의 일 실시예에 따른 인터 예측 방법의 흐름도이다.
도 7은 오브젝트의 비선형 움직임을 예시한 도면이다.
도 8은 본 발명의 일실시예 따른 어파인 모션에 기초한 인터 예측 방법의 흐름도이다.
도 9는 어파인 모션 모델 별 어파인 시드 벡터를 예시한 도면이다.
도 10은 4 파라미터 모션 모델 하에서 서브 블록들의 어파인 벡터들을 예시한 도면이다.
도 11은 머지 모드 하에서 현재 블록의 움직임 정보를 유도하는 과정의 흐름도이다.
도 12는 머지 후보를 유도하기 위해 사용되는 후보 블록들을 예시한 도면이다.
도 13은 모션 정보 테이블의 업데이트 양상을 설명하기 위한 도면이다.
도 14는 모션 정보 테이블의 업데이트 양상을 나타낸 도면이다.
도 15는 기 저장된 모션 정보 후보의 인덱스가 갱신되는 예를 나타낸 도면이다.
도 16은 머지 후보들 중 일부에 대해서만 중복성 검사가 수행되는 예를 도시한 도면이다.
도 17은 특정 머지 후보와의 중복성 검사가 생략되는 예를 나타낸 도면이다.
도 18은 현재 블록과 동일한 머지 처리 영역에 포함된 후보 블록이 머지 후보로서 이용 불가능한 것으로 설정되는 예를 나타낸 도면이다.
도 19는 현재 블록이 머지 처리 영역에 포함되어 있을 경우, 현재 블록에 대한 머지 후보를 유도하는 예를 나타낸 도면이다.
도 20은 임시 모션 정보 테이블을 나타낸 도면이다.
도 21은 모션 정보 테이블과 임시 모션 정보 테이블을 병합하는 예를 나타낸 도면이다.
도 22는 본 발명의 일 실시예에 따른, 인트라 예측 방법의 흐름도이다.
도 23은 인트라 예측 모드들을 나타낸 도면이다.
도 24 및 도 25는 참조 샘플들을 일렬로 배열하는 일차원 배열의 예시를 나타낸 도면이다.
도 26은 방향성 인트라 예측 모드들이 x축과 평행한 직선과 형성하는 각도를 예시한 도면이다.
도 27은 현재 블록이 비정방 형태인 경우, 예측 샘플이 획득되는 양상을 나타낸 도면이다.
도 28은 와이드 앵글 인트라 예측 모드들을 나타낸 도면이다.
도 29는 서브 블록 별로 변환 스킵 여부가 결정되는 예를 나타낸 도면이다.
도 30은 서브 블록들이 동일한 변환 타입을 사용하는 예를 나타낸 도면이다.
도 31은 블록 강도를 결정하는 과정을 나타낸 흐름도이다.
도 32는 기 정의된 필터 후보들을 나타낸다.
도 33은 본 발명의 일 실시예에 따른, 픽처 분할 방법을 나타낸 도면이다.
도 34는 픽처가 복수의 타일들로 분할된 예를 나타낸다.
도 35 및 도 36은 래스터 순서에 기초하여 슬라이스를 정의한 예를 나타낸 도면이다.
도 37은 사각 형태의 슬라이스만이 허용되는 예를 나타낸 도면이다.
도 38은 픽처가 2개의 슬라이스들로 구성된 경우의 예를 나타낸 도면이다.
도 39는 픽처 내 타일 열 또는 타일 행의 개수가 1개인 경우를 예시한 도면이다.
이하에서는 도면을 참조하여 본 발명의 실시예를 상세히 설명한다.
영상의 부호화 및 복호화는 블록 단위로 수행된다. 일 예로, 코딩 블록, 변환 블록, 또는 예측 블록에 대해, 변환, 양자화, 예측, 인루프 필터링, 또는 복원 등의 부호화/복호화 처리가 수행될 수 있다.
이하, 부호화/복호화 대상인 블록을 '현재 블록'이라 호칭하기로 한다. 일 예로, 현재 블록은 현재 부호화/복호화 처리 단계에 따라, 코딩 블록, 변환 블록, 또는 예측 블록을 나타낼 수 있다.
아울러, 본 명세서에서 사용되는 용어 '유닛'은 특정 부호화/복호화 프로세스를 수행하기 위한 기본 단위를 나타내고, '블록'은 소정 크기의 샘플 어레이를 나타내는 것으로 이해될 수 있다. 별도의 설명이 없는 한, '블록'과 '유닛'은 동등한 의미로 사용될 수 있다. 일 예로, 후술되는 실시예에서, 코딩 블록과 코딩 유닛은 상호 동등한 의미를 갖는 것으로 이해될 수 있다.
도 1은 본 발명의 일 실시예에 따른 영상 부호화기(인코더기)의 블록도이다.
도 1을 참조하면, 영상 부호화 장치(100)는 픽쳐 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.
도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.
또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.
픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 픽쳐 분할부(110)에서는 하나의 픽쳐에 대해 복수의 부호화 단위, 예측 단위 및 변환 단위의 조합으로 분할하고 소정의 기준(예를 들어, 비용 함수)으로 하나의 부호화 단위, 예측 단위 및 변환 단위 조합을 선택하여 픽쳐를 부호화 할 수 있다.
예를 들어, 하나의 픽쳐는 복수개의 부호화 단위로 분할될 수 있다. 픽쳐에서 부호화 단위를 분할하기 위해서는 쿼드 트리 구조(Quad Tree Structure)와 같은 재귀적인 트리 구조를 사용할 수 있는데 하나의 영상 또는 최대 크기 부호화 단위(largest coding unit)를 루트로 하여 다른 부호화 단위로 분할되는 부호화 유닛은 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 일정한 제한에 따라 더 이상 분할되지 않는 부호화 단위는 리프 노드가 된다. 즉, 하나의 코딩 유닛에 대하여 정방형 분할만이 가능하다고 가정하는 경우, 하나의 부호화 단위는 최대 4개의 다른 부호화 단위로 분할될 수 있다.
이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.
예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다.
부호화 단위를 기초로 인트라 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위 NxN 으로 분할하지 않고 인트라 예측을 수행할 수 있다.
예측부(120, 125)는 인터 예측을 수행하는 인터 예측부(120)와 인트라 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.
인터 예측부(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) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법, 인트라 블록 카피(Intra Block Copy) 방법 등 다양한 방법이 사용될 수 있다.
인트라 예측부(125)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.
인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.
인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행할 수 있다. 그러나 인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수 있다.
인트라 예측 방법은 예측 모드에 따라 참조 화소에 AIS(Adaptive Intra Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 참조 화소에 적용되는 AIS 필터의 종류는 상이할 수 있다. 인트라 예측 방법을 수행하기 위해 현재 예측 단위의 인트라 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 인트라 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 인트라 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.
또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다.
변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform) 또는 DST(Discrete Sine Transform)와 같은 변환 방법을 사용하여 변환시킬 수 있다. 여기서, DCT 변환 코어는 DCT2 또는 DCT8 중 적어도 하나를 포함하고, DST 변환 코어는 DST7을 포함한다. 잔차 블록을 변환하기 위해 DCT를 적용할지 또는 DST를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다. 잔차 블록에 대한 변환을 스킵할 수도 있다. 잔차 블록에 대한 변환을 스킵할 것인지 여부를 나타내는 플래그를 부호화할 수 있다. 변환 스킵은, 크기가 문턱값 이하인 잔차 블록, 루마 성분 또는 4:4:4 포맷 하에서의 크로마 성분에 대해 허용될 수 있다.
양자화부(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)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다.
엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다.
역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다.
필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.
디블록킹 필터는 복원된 픽쳐에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.
오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.
ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다.
메모리(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차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)에서는 부호화부에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 해당 부호화부에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다.
역양자화부(220)는 부호화기에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다.
역변환부(225)는 영상 부호화기에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT 또는 DST에 대해 역변환 즉, 역 DCT 또는 역 DST를 수행할 수 있다. 여기서, DCT 변환 코어는 DCT2 또는 DCT8 중 적어도 하나를 포함하고, DST 변환 코어는 DST7을 포함할 수 있다. 또는, 영상 부호화기에서 변환이 스킵된 경우, 역변환부(225)에서도 역변환을 수행하지 않을 수 있다. 역변환은 영상 부호화기에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화기의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT 또는 DST)이 선택적으로 수행될 수 있다.
예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다.
전술한 바와 같이 영상 부호화기에서의 동작과 동일하게 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수도 있다.
예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 인터 예측부(230)는 영상 부호화기에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.
인터 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), 모션 벡터 예측 모드(AMVP Mode), 인트라 블록 카피 모드 중 어떠한 방법인지 여부를 판단할 수 있다.
인트라 예측부(235)는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 영상 부호화기에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로 인트라 예측을 수행할 수 있다. 인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화기에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.
참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.
복원된 블록 또는 픽쳐는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.
영상 부호화기로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화기의 디블록킹 필터에서는 영상 부호화기에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화기에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다.
오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.
ALF는 부호화기로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.
메모리(245)는 복원된 픽쳐 또는 블록을 저장하여 참조 픽쳐 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽쳐를 출력부로 제공할 수 있다.
도 3은 본 발명의 일 실시예에 따른 기본 코딩 트리 유닛을 도시한 도면이다.
최대 크기의 코딩 블록을 코딩 트리 블록이라 정의할 수 있다. 하나의 픽처는 복수개의 코딩 트리 유닛(Coding Tree Unit, CTU)으로 분할된다. 코딩 트리 유닛은 최대 크기의 코딩 유닛으로, LCU (Largest Coding Unit)라 호칭될 수도 있다. 도 3은 하나의 픽처가 복수개의 코딩 트리 유닛으로 분할된 예를 나타낸 것이다.
코딩 트리 유닛의 크기는 픽처 레벨 또는 시퀀스 레벨에서 정의될 수 있다. 이를 위해, 코딩 트리 유닛의 크기를 나타내는 정보가 픽처 파라미터 세트 또는 시퀀스 파라미터 세트를 통해 시그날링될 수 있다.
일 예로, 시퀀스 내 전체 픽처에 대한 코딩 트리 유닛의 크기가 128x128로 설정될 수 있다. 또는, 픽처 레벨에서 128x128 또는 256x256 중 어느 하나를 코딩 트리 유닛의 크기로 결정할 수 있다. 일 예로, 제1 픽처에서는 코딩 트리 유닛의 크기가 128x128로 설정되고, 제2 픽처에서는 코딩 트리 유닛의 크기가 256x256으로 설정될 수 있다.
코딩 트리 유닛을 분할하여, 코딩 블록을 생성할 수 있다. 코딩 블록은 부호화/복호화 처리를 위한 기본 단위를 나타낸다. 일 예로, 코딩 블록 별로 예측 또는 변환이 수행되거나, 코딩 블록 별로 예측 부호화 모드가 결정될 수 있다. 여기서, 예측 부호화 모드는 예측 영상을 생성하는 방법을 나타낸다. 일 예로, 예측 부호화 모드는 화면 내 예측(Intra Prediction, 인트라 예측), 화면 간 예측(Inter Prediction, 인터 예측), 현재 픽처 참조(Current Picture Referencing, CPR, 또는 인트라 블록 카피(Intra Block Copy, IBC)) 또는 복합 예측(Combined Prediction)을 포함할 수 있다. 코딩 블록에 대해, 인트라 예측, 인터 예측, 현재 픽처 참조 또는 복합 예측 중 적어도 하나의 예측 부호화 모드를 이용하여, 코딩 블록에 대한 예측 블록을 생성할 수 있다.
현재 블록의 예측 부호화 모드를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 상기 정보는 예측 부호화 모드가 인트라 모드인지 또는 인터 모드인지 여부를 나타내는 1비트 플래그일 수 있다. 현재 블록의 예측 부호화 모드가 인터 모드로 결정된 경우에 한하여, 현재 픽처 참조 또는 복합 예측이 이용 가능할 수 있다.
현재 픽처 참조는 현재 픽처를 참조 픽처로 설정하고, 현재 픽처 내 이미 부호화/복호화가 완료된 영역으로부터 현재 블록의 예측 블록을 획득하기 위한 것이다. 여기서, 현재 픽처는 현재 블록을 포함하는 픽처를 의미한다. 현재 블록에 현재 픽처 참조가 적용되는지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 상기 정보는 1비트의 플래그일 수 있다. 상기 플래그가 참인 경우, 현재 블록의 예측 부호화 모드는 현재 픽처 참조로 결정되고, 상기 플래그가 거짓인 경우, 현재 블록의 예측 모드는 인터 예측으로 결정될 수 있다.
또는, 참조 픽처 인덱스를 기초로, 현재 블록의 예측 부호화 모드가 결정될 수 있다. 일 예로, 참조 픽처 인덱스가 현재 픽처를 가리키는 경우, 현재 블록의 예측 부호화 모드는 현재 픽처 참조로 결정될 수 있다. 참조 픽처 인덱스가 현재 픽처가 아닌 다른 픽처를 가리키는 경우, 현재 블록의 예측 부호화 모드는 인터 예측으로 결정될 수 있다. 즉, 현재 픽처 참조는 현재 픽처 내 부호화/복호화가 완료된 영역의 정보를 이용한 예측 방법이고, 인터 예측은 부호화/복호화가 완료된 다른 픽처의 정보를 이용한 예측 방법이다.
복합 예측은 인트라 예측, 인터 예측 및 현재 픽처 참조 중 둘 이상을 조합된 부호화 모드를 나타낸다. 일 예로, 복합 예측이 적용되는 경우, 인트라 예측, 인터 예측 또는 현재 픽처 참조 중 어느 하나를 기초로 제1 예측 블록이 생성되고, 다른 하나를 기초로 제2 예측 블록이 생성될 수 있다. 제1 예측 블록 및 제2 예측 블록이 생성되면, 제1 예측 블록 및 제2 예측 블록의 평균 연산 또는 가중합 연산을 통해 최종 예측 블록이 생성될 수 있다. 복합 예측이 적용되는지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 1비트의 플래그일 수 있다.
도 4는 코딩 블록의 다양한 분할 형태를 나타낸 도면이다.
코딩 블록은 쿼드 트리 분할, 바이너리 트리 분할 또는 트리플 트리 분할을 기초로 복수의 코딩 블록들로 분할될 수 있다. 분할된 코딩 블록도 다시 쿼드 트리 분할, 바이터리 트리 분할 또는 트리플 트리 분할을 기초로 다시 복수의 코딩 블록들로 분할될 수 있다.
쿼드 트리 분할은 현재 블록을 4개의 블록들로 분할하는 분할 기법을 나타낸다. 쿼드 트리 분할의 결과, 현재 블록은 4개의 정방 형태 파티션들로 분할될 수 있다 (도 4의 (a) 'SPLIT_QT' 참조).
바이너리 트리 분할은 현재 블록을 2개의 블록들로 분할하는 분할 기법을 나타낸다. 수직 방향을 따라(즉, 현재 블록을 가로지르는 수직선을 이용) 현재 블록을 두개의 블록들로 분할하는 것을 수직 방향 바이너리 트리 분할이라 호칭할 수 있고, 수평 방향을 따라(즉, 현재 블록을 가로지르는 수평선을 이용) 현재 블록을 두개의 블록들로 분할하는 것을 수평 방향 바이너리 트리 분할이라 호칭할 수 있다. 바이너리 트리 분할 결과, 현재 블록은 2개의 비정방 형태 파티션들로 분할될 수 있다. 도 4의 (b) 'SPLIT_BT_VER'는 수직 방향 바이너리 트리 분할 결과를 나타낸 것이고, 도 4의 (c) 'SPLIT_BT_HOR'는 수평 방향 바이너리 트리 분할 결과를 나타낸 것이다.
트리플 트리 분할은 현재 블록을 3개의 블록들로 분할하는 분할 기법을 나타낸다. 수직 방향을 따라(즉, 현재 블록을 가로지르는 두개의 수직선을 이용) 현재 블록을 세개의 블록들로 분할하는 것을 수직 방향 트리플 트리 분할이라 호칭할 수 있고, 수평 방향을 따라(즉, 현재 블록을 가로지르는 두개의 수평선을 이용) 현재 블록을 세개의 블록들로 분할하는 것을 수평 방향 트리플 트리 분할이라 호칭할 수 있다. 트리플 트리 분할 결과, 현재 블록은 3개의 비정방 형태 파티션들로 분할될 수 있다. 이때, 현재 블록의 중앙에 위치하는 파티션의 너비/높이는 다른 파티션들의 너비/높이 대비 2배일 수 있다. 도 4의 (d) 'SPLIT_TT_VER'는 수직 방향 트리플 트리 분할 결과를 나타낸 것이고, 도 4의 (e) 'SPLIT_TT_HOR'는 수평 방향 트리플 트리 분할 결과를 나타낸 것이다.
코딩 트리 유닛의 분할 횟수를 분할 깊이(Partitioning Depth)라 정의할 수 있다. 시퀀스 또는 픽처 레벨에서 코딩 트리 유닛의 최대 분할 깊이가 결정될 수 있다. 이에 따라, 시퀀스 또는 필처별로 코딩 트리 유닛의 최대 분할 깊이가 상이할 수 있다.
또는, 분할 기법들 각각에 대한 최대 분할 깊이를 개별적으로 결정할 수 있다. 일 예로, 쿼드 트리 분할이 허용되는 최대 분할 깊이는 바이너리 트리 분할 및/또는 트리플 트리 분할이 허용되는 최대 분할 깊이와 상이할 수 있다.
부호화기는 현재 블록의 분할 형태 또는 분할 깊이 중 적어도 하나를 나타내는 정보를 비트스트림을 통해 시그날링할 수 있다. 복호화기는 비트스트림으로부터 파싱되는 상기 정보에 기초하여 코딩 트리 유닛의 분할 형태 및 분할 깊이를 결정할 수 있다.
도 5는 코딩 트리 유닛의 분할 양상을 예시한 도면이다.
쿼드 트리 분할, 바이너리 트리 분할 및/또는 트리플 트리 분할 등의 분할 기법을 이용하여 코딩 블록을 분할하는 것을 멀티 트리 분할(Multi Tree Partitioning)이라 호칭할 수 있다.
코딩 블록에 멀티 트리 분할을 적용하여 생성되는 코딩 블록들을 하위 코딩 블록들이라 호칭할 수 있다. 코딩 블록의 분할 깊이가 k인 경우, 하위 코딩 블록들의 분할 깊이는 k+1로 설정된다.
반대로, 분할 깊이가 k+1인 코딩 블록들에 대해, 분할 깊이가 k인 코딩 블록을 상위 코딩 블록이라 호칭할 수 있다.
현재 코딩 블록의 분할 타입은 상위 코딩 블록의 분할 형태 또는 이웃 코딩 블록의 분할 타입 중 적어도 하나를 기초로 결정될 수 있다. 여기서, 이웃 코딩 블록은 현재 코딩 블록에 인접하는 것으로, 현재 코딩 블록의 상단 이웃 블록, 좌측 이웃 블록, 또는 좌측 상단 코너에 인접하는 이웃 블록 중 적어도 하나를 포함할 수 있다. 여기서, 분할 타입은, 쿼드 트리 분할 여부, 바이너리 트리 분할 여부, 바이너리 트리 분할 방향, 트리플 트리 분할 여부, 또는 트리플 트리 분할 방향 중 적어도 하나를 포함할 수 있다.
코딩 블록의 분할 형태를 결정하기 위해, 코딩 블록이 분할되는지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 1비트의 플래그 'split_cu_flag'로, 상기 플래그가 참인 것은, 머리 트리 분할 기법에 의해 코딩 블록이 분할됨을 나타낸다.
split_cu_flag가 참인 경우, 코딩 블록이 쿼드 트리 분할되는지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 1비트의 플래그 split_qt_flag로, 상기 플래그가 참인 경우, 코딩 블록은 4개의 블록들로 분할될 수 있다.
일 예로, 도 5에 도시된 예에서는, 코딩 트리 유닛이 쿼드 트리 분할됨에 따라, 분할 깊이가 1인 4개의 코딩 블록들이 생성되는 것으로 도시되었다. 또한, 쿼드 트리 분할 결과로 생성된 4개의 코딩 블록들 중 첫번째 코딩 블록 및 네번째 코딩 블록에 다시 쿼드 트리 분할이 적용된 것으로 도시되었다. 그 결과, 분할 깊이가 2인 4개의 코딩 블록들이 생성될 수 있다.
또한, 분할 깊이가 2인 코딩 블록에 다시 쿼드 트리 분할을 적용함으로써, 분할 깊이가 3인 코딩 블록을 생성할 수 있다.
코딩 블록에 쿼드 트리 분할이 적용되지 않는 경우, 코딩 블록의 크기, 코딩 블록이 픽처 경계에 위치하는지 여부, 최대 분할 깊이 또는 이웃 블록의 분할 형태 중 적어도 하나를 고려하여, 상기 코딩 블록에 바이너리 트리 분할 또는 트리플 트리 분할을 수행할 것인지 여부를 결정할 수 있다. 상기 코딩 블록에 바이너리 트리 분할 또는 트리플 트리 분할이 수행되는 것으로 결정된 경우, 분할 방향을 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 1비트의 플래그 mtt_split_cu_vertical_flag일 수 있다. 상기 플래그에 기초하여, 분할 방향이 수직 방향인지 또는 수평 방향인지 여부가 결정될 수 있다. 추가로, 바이너리 트리 분할 또는 트리플 트리 분할 중 어느 것이 상기 코딩 블록에 적용되는지를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 1비트의 플래그 mtt_split_cu_binary_flag일 수 있다. 상기 플래그에 기초하여, 상기 코딩 블록에 바이너리 트리 분할이 적용되는지 또는 트리플 트리 분할이 적용되는지 여부가 결정될 수 있다.
일 예로, 도 5에 도시된 예에서는, 분할 깊이 1인 코딩 블록에 수직 방향 바이너리 트리 분할이 적용되고, 상기 분할 결과로 생성된 코딩 블록들 중 좌측 코딩 블록에는 수직 방향 트리플 트리 분할이 적용되고, 우측 코딩 블록에는 수직 방향 바이너리 트리 분할이 적용된 것으로 도시되었다.
인터 예측은 이전 픽처의 정보를 이용하여, 현재 블록을 예측하는 예측 부호화 모드이다. 일 예로, 이전 픽처 내 현재 블록과 동일한 위치의 블록(이하, 콜로케이티드 블록, Collocated block)을 현재 블록의 예측 블록으로 설정할 수 있다. 이하, 현재 블록과 동일한 위치의 블록을 기초로 생성된 예측 블록을 콜로케이티드 예측 블록(Collocated Prediction Block)이라 호칭하기로 한다.
반면, 이전 픽처에 존재한 오브젝트가 현재 픽처에서는 다른 위치로 이동하였다면, 오브젝트의 움직임을 이용하여 효과적으로 현재 블록을 예측할 수 있다. 예를 들어, 이전 픽처와 현재 픽처를 비교함으로써 오브젝트의 이동 방향 및 크기를 알 수 있다면, 오브젝트의 움직임 정보를 고려하여 현재 블록의 예측 블록(또는, 예측 영상)을 생성할 수 있다. 이하, 움직임 정보를 이용하여 생성된 예측 블록을 움직임 예측 블록이라 호칭할 수 있다.
현재 블록에서 예측 블록을 차분하여, 잔차 블록(residual block)을 생성할 수 있다. 이때, 오브젝트의 움직임이 존재하는 경우라면, 콜로케이티드 예측 블록 대신 움직임 예측 블록을 이용함으로써, 잔차 블록의 에너지를 줄이고, 이에 따라, 잔차 블록의 압축 성능을 향상시킬 수 있다.
위처럼, 움직임 정보를 이용하여 예측 블록을 생성하는 것을 움직임 보상 예측이라 호칭할 수 있다. 대부분의 인터 예측에서는 움직임 보상 예측에 기초하여 예측 블록을 생성할 수 있다.
움직임 정보는 모션 벡터, 참조 픽처 인덱스, 예측 방향 또는 양방향 가중치 인덱스 중 적어도 하나를 포함할 수 있다. 모션 벡터는 오브젝트의 이동 방향 및 크기를 나타낸다. 참조 픽처 인덱스는 참조 픽처 리스트에 포함된 참조 픽처들 중 현재 블록의 참조 픽처를 특정한다. 예측 방향은 단방향 L0 예측, 단방향 L1 예측 또는 양방향 예측(L0 예측 및 L1 예측) 중 어느 하나를 가리킨다. 현재 블록의 예측 방향에 따라, L0 방향의 움직인 정보 또는 L1 방향의 움직임 정보 중 적어도 하나가 이용될 수 있다. 양방향 가중치 인덱스는 L0 예측 블록에 적용되는 가중치 및 L1 예측 블록에 적용되는 가중치를 특정한다.
도 6은 본 발명의 일 실시예에 따른 인터 예측 방법의 흐름도이다.
도 6을 참조하면, 인터 예측 방법은, 현재 블록의 인터 예측 모드를 결정하는 단계(S601), 결정된 인터 예측 모드에 따라 현재 블록의 움직임 정보를 획득하는 단계(S602) 및 획득된 움직임 정보에 기초하여, 현재 블록에 대한 움직임 보상 예측을 수행하는 단계(S603)를 포함한다.
여기서, 인터 예측 모드는 현재 블록의 움직임 정보를 결정하기 위한 다양한 기법들을 나타내는 것으로, 병진(Translation) 움직임 정보를 이용하는 인터 예측 모드와, 어파인(Affine) 움직임 정보를 이용하는 인터 예측 모드를 포함할 수 있다. 일 예로, 병진 움직임 정보를 이용하는 인터 예측 모드는, 머지 모드 및 모션 벡터 예측 모드를 포함하고, 어파인 움직임 정보를 이용하는 인터 예측 모드는 어파인 머지 모드 및 어파인 모션 벡터 예측 모드를 포함할 수 있다. 현재 블록의 움직임 정보는, 인터 예측 모드에 따라, 현재 블록에 이웃하는 이웃 블록 또는 비트스트림으로부터 파싱되는 정보를 기초로 결정될 수 있다.
이하, 어파인 움직임 정보를 이용하는 인터 예측 방법에 대해 상세히 설명하기로 한다.
도 7은 오브젝트의 비선형 움직임을 예시한 도면이다.
영상 내 물체의 움직임이 선형적이지 않은 움직임이 발생할 수 있다. 일 예로, 도 7에 도시된 예에서와 같이, 카메라 줌인(Zoom-in), 줌 아웃(Zoom-out), 회전(Rotation) 또는 어파인 변환 등 오브젝트의 비선형 움직임이 발생할 수 있다. 오브젝트의 비선형 움직임이 발생한 경우, 병진 움직임 벡터로는 오브젝트의 움직임을 효과적으로 표현할 수 없다. 이에 따라, 오브젝트의 비선형 움직임이 발생하는 부분에서는 병진 움직임 대신 어파인 움직임을 이용하여 부호화 효율을 향상시킬 수 있다.
도 8은 본 발명의 일실시예 따른 어파인 모션에 기초한 인터 예측 방법의 흐름도이다.
현재 블록에 어파인 모션에 기초한 인터 예측 기법이 적용되는지 여부는, 비트스트림으로부터 파싱되는 정보에 기초하여 결정될 수 있다. 구체적으로, 현재 블록에 어파인 머지 모드가 적용되는지 여부를 나타내는 플래그 또는 현재 블록에 어파인 모션 벡터 예측 모드가 적용되는지 여부를 나타내는 플래그 중 적어도 하나에 기초하여, 현재 블록에 어파인 모션에 기초한 인터 예측 기법이 적용되는지 여부를 결정할 수 있다.
현재 블록에 어파인 모션에 기초한 인터 예측 기법이 적용되는 경우, 현재 블록의 어파인 모션 모델을 결정할 수 있다(S801). 어파인 모션 모델은 6 파라미터 어파인 모션 모델 또는 4 파라미터 어파인 모션 모델 중 적어도 하나로 결정될 수 있다. 6 파라미터 어파인 모션 모델은 6개의 파라미터를 이용하여 어파인 모션을 표현한 것이고, 4 파라미터 어파인 모션 모델은 4개의 파라미터를 이용하여 어파인 모션을 표현한 것이다.
수학식 1은 6 파라미터를 이용하여 어파인 모션을 표현한 것이다. 어파인 모션은 어파인 시드 벡터들에 의해 결정되는 소정 영역에 대한 병진 움직임을 나타낸다.
Figure PCTKR2020018371-appb-M000001
6개의 파라미터를 이용하여 어파인 모션을 표현하는 경우, 복잡한 움직임을 표현할 수 있으나, 각 파라미터들을 부호화하는데 필요한 비트 수가 많아져 부호화 효율이 저하될 수 있다. 이에 따라, 4개의 파라미터를 이용하여 어파인 모션을 표현할 수도 있다. 수학식 2는 4 파라미터를 이용하여 어파인 모션을 표현한 것이다.
Figure PCTKR2020018371-appb-M000002
현재 블록의 어파인 모션 모델을 결정하기 위한 정보가 부호화되어 비트스트림을 통해 시그날링될 수 있다. 일 예로, 상기 정보는 1비트의 플래그 'affine_type_flag'일 수 있다. 상기 플래그의 값이 0인 것은 4 파라미터 어파인 모션 모델이 적용됨을 나타내고, 상기 플래그의 값이 1인 것은 6 파라미터 어파인 모션 모델이 적용됨을 나타낼 수 있다. 상기 플래그는, 슬라이스, 타일 또는 블록(예컨대, 코딩 블록 또는 코딩 트리 유닛) 단위로 부호화될 수 있다. 슬라이스 레벨에서 플래그가 시그날링되는 경우, 상기 슬라이스 레벨에서 결정된 어파인 모션 모델이 상기 슬라이스에 속한 블록들 모두에 적용될 수 있다.
또는, 현재 블록의 어파인 인터 예측 모드에 기초하여, 현재 블록의 어파인 모션 모델을 결정할 수 있다. 일 예로, 어파인 머지 모드가 적용되는 경우, 현재 블록의 어파인 모션 모델을 4 파라미터 모션 모델로 결정할 수 있다. 반면, 어파인 모션 벡터 예측 모드가 적용되는 경우, 현재 블록의 어파인 모션 모델을 결정하기 위한 정보를 부호화하여 비트스트림을 통해 시그날링될 수 있다. 일 예로, 현재 블록에 어파인 모션 벡터 예측 모드가 적용되는 경우, 1비트의 플래그 'affine_type_flag'에 기초하여, 현재 블록의 어파인 모션 모델을 결정할 수 있다.
다음으로, 현재 블록의 어파인 시드 벡터를 유도할 수 있다(S802). 4 파라미터 어파인 모션 모델이 선택된 경우, 현재 블록의 두 컨트롤 포인트에서의 모션 벡터들을 유도할 수 있다. 반면, 6 파라미터 어파인 모션 모델이 선택된 경우, 현재 블록의 세 컨트롤 포인트에서의 모션 벡터들이 유도될 수 있다. 컨트롤 포인트에서의 모션 벡터를 어파인 시드 벡터라 호칭할 수 있다. 컨트를 포인트는, 현재 블록의 좌상단 코너, 우상단 코너 또는 좌하단 코너 중 적어도 하나를 포함할 수 있다.
도 9는 어파인 모션 모델 별 어파인 시드 벡터를 예시한 도면이다.
4 파라미터 어파인 모션 모델에서는 좌상단 코너, 우상단 코너 또는 좌하단 코너 중 두개에 대한 어파인 시드 벡터들을 유도할 수 있다. 일 예로, 도 9의 (a)에 도시된 예에서와 같이, 4 파라미터 어파인 모션 모델이 선택된 경우, 현재 블록의 좌상단 코너(예컨대, 좌상단 샘플 (x1, y1))에 대한 어파인 시드 벡터 sv0와 현재 블록의 우상단 코너(예컨대, 우상단 샘플 (x1, y1))에 대한 어파인 시드 벡터 sv1을 이용하여 어파인 벡터를 유도할 수 있다. 좌상단 코너에 대한 어파인 시드 벡터 대신 좌하단 코너에 대한 어파인 시드 벡터를 사용하거나, 우상단 코너에 대한 어파인 시드 벡터 대신 좌하단 코너에 대한 어파인 시드 벡터를 사용하는 것도 가능하다.
6 파라미터 어파인 모션 모델에서는 좌상단 코너, 우상단 코너 및 좌하단 코너에 대한 어파인 시드 벡터들을 유도할 수 있다. 일 예로, 도 9의 (b)에 도시된 예에서와 같이, 6 파라미터 어파인 모션 모델이 선택된 경우, 현재 블록의 좌상단 코너(예컨대, 좌상단 샘플 (x1, y1))에 대한 어파인 시드 벡터 sv0, 현재 블록의 우상단 코너(예컨대, 우상단 샘플 (x1, y1))에 대한 어파인 시드 벡터 sv1 및 현재 블록의 좌상단 코너(예컨대, 좌상단 샘플 (x2, y2))에 대한 어파인 시드 벡터 sv2를 이용하여 어파인 벡터를 유도할 수 있다.
후술되는 실시예에서는, 4 파라미터 어파인 모션 모델 하에서, 좌상단 컨트롤 포인트 및 우상단 컨트롤 포인트의 어파인 시드 벡터들을 각각 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터라 호칭하기로 한다. 후술되는 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 이용하는 실시예들에서, 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터 중 적어도 하나는 좌하단 컨트롤 포인트의 어파인 시드 벡터(제3 어파인 시드 벡터) 또는 우하단 컨트롤 포인트의 어파인 시드 벡터(제4 어파인 시드 벡터)로 대체될 수 있다.
또한, 6 파라미터 어파인 모션 모델 하에서, 좌상단 컨트롤 포인트, 우상단 컨트롤 포인트 및 좌하단 컨트롤 포인트의 어파인 시드 벡터들을 각각 제1 어파인 시드 벡터, 제2 어파인 시드 벡터 및 제3 어파인 시드 벡터라 호칭하기로 한다. 후술되는 제1 어파인 시드 벡터, 제2 어파인 시드 벡터 및 제3 어파인 시드 벡터를 이용하는 실시예들에서, 제1 어파인 시드 벡터, 제2 어파인 시드 벡터 및 제3 어파인 시드 벡터 중 적어도 하나는 우하단 컨트롤 포인트의 어파인 시드 벡터(제4 어파인 시드 벡터)로 대체될 수 있다.
어파인 시드 벡터들을 이용하여 서브 블록 별로 어파인 벡터를 유도할 수 있다(S803). 여기서, 어파인 벡터는 어파인 시드 벡터들을 기초로 유도되는 병진 모션 벡터를 나타낸다. 서브 블록의 어파인 벡터를 어파인 서브 블록 모션 벡터 또는 서브 블록 모션 벡터라 호칭할 수 있다.
도 10은 4 파라미터 모션 모델 하에서 서브 블록들의 어파인 벡터들을 예시한 도면이다.
서브 블록의 어파인 벡터는 컨트롤 포인트의 위치, 서브 블록의 위치 및 어파인 시드 벡터를 기초로 유도될 수 있다. 일 예로, 수학식 3은 어파인 서브 블록 모션 벡터를 유도하는 예를 나타낸다.
Figure PCTKR2020018371-appb-M000003
상기 수학식 3에서 (x, y)는 서브 블록의 위치를 나타낸다. 여기서, 서브 블록의 위치는 서브 블록에 포함된 기준 샘플의 위치를 나타낸다. 기준 샘플은 서브 블록의 좌상단 코너에 위치하는 샘플, 또는 x축 또는 y축 좌표 중 적어도 하나가 중앙 위치인 샘플일 수 있다. (x0, y0)는 제1 컨트롤 포인트의 위치를 나타내고, (sv0x, sv0y)는 제1 어파인 시드 벡터를 나타낸다. 또한, (x1, y1)은 제2 컨트롤 포인트의 위치를 나타내고, (sv1x, sv1y)는 제2 어파인 시드 벡터를 나타낸다.
제1 컨트롤 포인트 및 제2 컨트롤 포인트가 각각 현재 블록의 좌상단 코너 및 우상단 코너에 대응하는 경우, x1-x0는 현재 블록의 너비와 동일한 값으로 설정될 수 있다.
이후, 각 서브 블록의 어파인 벡터를 이용하여, 각 서브 블록에 대한 움직임 보상 예측을 수행할 수 있다(S804). 움직임 보상 예측의 수행 결과, 각 서브 블록에 대한 예측 블록이 생성될 수 있다. 서브 블록들의 예측 블록들이, 현재 블록의 예측 블록으로 설정될 수 있다.
현재 블록의 어파인 시드 벡터는 현재 블록에 이웃하는 이웃 블록의 어파인 시드 벡터를 기초로 유도될 수 있다. 현재 블록의 인터 예측 모드가 어파인 머지 모드인 경우, 머지 후보 리스트에 포함된 머지 후보의 어파인 시드 벡터를 현재 블록의 어파인 시드 벡터로 결정할 수 있다. 또한, 현재 블록의 인터 예측 모드가 어파인 머지 모드인 경우, 현재 블록의 참조 픽처 인덱스, 특정 방향 예측 플래그 또는 양방향 가중치 중 적어도 하나를 포함하는 움직임 정보도 머지 후보와 동일하게 설정될 수 있다.
다음으로, 병진 움직임 정보를 이용하는 인터 예측 방법에 대해 상세히 설명하기로 한다.
현재 블록의 움직임 정보는 현재 블록 타 블록의 움직임 정보로부터 유도될 수 있다. 여기서, 타 블록은 현재 블록보다 앞서 인터 예측으로 부호화/복호화된 블록일 수 있다. 현재 블록의 움직임 정보를 타 블록의 움직임 정보와 동일하게 설정하는 것을 머지 모드라 정의할 수 있다. 또한, 타 블록의 움직임 벡터를 현재 블록의 움직임 벡터의 예측값으로 설정하는 것을 모션 벡터 예측 모드라 정의할 수 있다.
도 11은 머지 모드 하에서 현재 블록의 움직임 정보를 유도하는 과정의 흐름도이다.
현재 블록의 머지 후보를 유도할 수 있다(S1101). 현재 블록의 머지 후보는 현재 블록보다 앞서 인터 예측으로 부호화/복호화된 블록으로부터 유도될 수 있다.
도 12는 머지 후보를 유도하기 위해 사용되는 후보 블록들을 예시한 도면이다.
후보 블록들은, 현재 블록에 인접하는 샘플을 포함하는 이웃 블록들 또는 현재 블록에 인접하지 않는 샘플을 포함하는 비이웃 블록들 중 적어도 하나를 포함할 수 있다. 이하, 후보 블록들을 결정하는 샘플들을 기준 샘플들이라 정의한다. 또한, 현재 블록에 인접하는 기준 샘플을 이웃 기준 샘플이라 호칭하고, 현재 블록에 인접하지 않는 기준 샘플을 비이웃 기준 샘플이라 호칭하기로 한다.
이웃 기준 샘플은, 현재 블록의 최좌측 열의 이웃 열 또는 현재 블록의 최상단 행의 이웃 행에 포함될 수 있다. 일 예로, 현재 블록의 좌측 상단 샘플의 좌표를 (0, 0)이라 할 때, (-1, H-1) 위치의 기준 샘플을 포함하는 블록, (W-1, -1) 위치의 기준 샘플을 포함하는 블록, (W, -1) 위치의 기준 샘플을 포함하는 블록, (-1, H) 위치의 기준 샘플을 포함하는 블록 또는 (-1, -1) 위치의 기준 샘플을 포함하는 블록 중 적어도 하나가 후보 블록으로 이용될 수 있다. 도면을 참조하면, 인덱스 0 내지 인덱스 4의 이웃 블록들이 후보 블록들로 이용될 수 있다.
비이웃 기준 샘플은, 현재 블록에 인접하는 기준 샘플과의 x축 거리 또는 y축 거리 중 적어도 하나가 기 정의된 값을 갖는 샘플을 나타낸다. 일 예로, 좌측 기준 샘플과의 x축 거리가 기 정의된 값인 기준 샘플을 포함하는 블록, 상단 기준 샘플과의 y축 거리가 기 정의된 값인 비이웃 샘플을 포함하는 블록 또는 좌측 상단 기준 샘플과의 x축 거리 및 y축 거리가 기 정의된 값인 비이웃 샘플을 포함하는 블록 중 적어도 하나가 후보 블록으로 이용될 수 있다. 기 정의된 값은, 4, 8, 12, 16 등의 자연수 일 수 있다. 도면을 참조하면, 인덱스 5 내지 26의 블록들 중 적어도 하나가 후보 블록으로 이용될 수 있다.
이웃 기준 샘플과 동일한 수직선, 수평선 또는 대각선상에 위치하지 않는 샘플을 비이웃 기준 샘플로 설정할 수도 있다.
머지 후보의 움직임 정보는 후보 블록의 움직임 정보와 동일하게 설정될 수 있다. 일 예로, 후보 블록의 모션 벡터, 참조 픽처 인덱스, 예측 방향 또는 양방향 가중치 인덱스 중 적어도 하나를 머지 후보의 움직임 정보로 설정할 수 있다.
머지 후보를 포함하는 머지 후보 리스트를 생성할 수 있다(S1102).
머지 후보 리스트 내 머지 후보들의 인덱스는 소정 순서에 따라 할당될 수 있다. 일 예로, 좌측 이웃 블록으로부터 유도된 머지 후보, 상단 이웃 블록으로부터 유도된 머지 후보, 우측 상단 이웃 블록으로부터 유도된 머지 후보, 좌측 하단 이웃 블록으로부터 유도된 머지 후보, 좌측 상단 이웃 블록으로부터 유도된 머지 후보 및 시간적 이웃 블록으로부터 유도된 머지 후보 순으로 인덱스를 부여할 수 있다.
머지 후보에 복수의 머지 후보들이 포함된 경우, 복수의 머지 후보들 중 적어도 하나를 선택할 수 있다(S1103). 구체적으로, 복수의 머지 후보들 중 어느 하나를 특정하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 머지 후보 리스트에 포함된 머지 후보들 중 어느 하나의 인덱스를 나타내는 정보 merge_idx가 비트스트림을 통해 시그날링될 수 있다.
머지 후보 리스트에 포함된 머지 후보들의 개수가 문턱값보다 작은 경우, 모션 정보 테이블에 포함된 모션 정보 후보를 머지 후보로서 머지 후보 리스트에 추가할 수 있다. 여기서, 문턱값은 머지 후보 리스트가 포함할 수 있는 최대 머지 후보의 개수 또는 최대 머지 후보의 개수에서 오프셋을 차감한 값일 수 있다. 오프셋은, 1 또는 2 등의 자연수일 수 있다.
모션 정보 테이블은 현재 픽처 내 인터 예측을 기초로 부호화/복호화된 블록으로부터 유도되는 모션 정보 후보를 포함한다. 일 예로, 모션 정보 테이블에 포함된 모션 정보 후보의 움직임 정보는 인터 예측을 기초로 부호화/복호화된 블록의 움직임 정보와 동일하게 설정될 수 있다. 여기서, 움직임 정보는 모션 벡터, 참조 픽처 인덱스, 예측 방향 또는 양방향 가중치 인덱스 중 적어도 하나를 포함할 수 있다.
모션 정보 테이블에 포함된 모션 정보 후보를 인터 영역 머지 후보 또는 예측 영역 머지 후보라 호칭할 수도 있다.
모션 정보 테이블이 포함할 수 있는 모션 정보 후보의 최대 개수는 부호화기 및 복호화기에서 기 정의되어 있을 수 있다. 일 예로, 모션 정보 테이블이 포함할 수 있는 최대 모션 정보 후보의 개수는, 1, 2, 3, 4, 5, 6, 7, 8 또는 그 이상(예컨대, 16)일 수 있다.
또는, 모션 정보 테이블이 포함할 수 있는 모션 정보 후보의 최대 개수를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는, 시퀀스, 픽처, 또는 슬라이스 레벨에서 시그날링될 수 있다. 상기 정보는 모션 정보 테이블이 포함할 수 있는 모션 정보 후보의 최대 개수를 나타낼 수 있다. 또는, 상기 정보는 모션 정보 테이블이 포함할 수 있는 모션 정보 후보의 최대 개수와 머지 후보 리스트가 포함할 수 있는 머지 후보의 최대 개수 사이의 차분을 나타낼 수 있다.
또는, 픽처의 크기, 슬라이스의 크기 또는 코딩 트리 유닛의 크기에 따라, 모션 정보 테이블이 포함할 수 있는 모션 정보 후보의 최대 개수가 결정될 수 있다.
모션 정보 테이블은 픽처, 슬라이스, 타일, 브릭, 코딩 트리 유닛, 또는 코딩 트리 유닛 라인(행 또는 열) 단위로 초기화될 수 있다. 일 예로, 슬라이스가 초기화되는 경우, 모션 정보 테이블도 초기화되어, 모션 정보 테이블은 어떠한 모션 정보 후보도 포함하지 않을 수 있다.
또는, 모션 정보 테이블을 초기화할 것인지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수도 있다. 상기 정보는 슬라이스, 타일, 브릭 또는 블록 레벨에서 시그날링될 수 있다. 상기 정보가 모션 정보 테이블을 초기화할 것을 지시하기 전까지, 기 구성된 모션 정보 테이블이 이용될 수 있다.
또는, 픽처 파라미터 세트 또는 슬라이스 헤더를 통해 초기 모션 정보 후보에 대한 정보가 시그날링될 수 있다. 슬라이스가 초기화되더라도, 모션 정보 테이블은 초기 모션 정보 후보를 포함할 수 있다. 이에 따라, 슬라이스 내 첫번째 부호화/복호화 대상인 블록에 대해서도 초기 모션 정보 후보를 이용할 수 있다.
또는, 이전 코딩 트리 유닛의 모션 정보 테이블에 포함된 모션 정보 후보를 초기 모션 정보 후보로 설정할 수 있다. 일 예로, 이전 코딩 트리 유닛의 모션 정보 테이블에 포함된 모션 정보 후보들 중 인덱스가 가장 작은 모션 정보 후보 또는 인덱스가 가장 큰 모션 정보 후보가 초기 모션 정보 후보로 설정될 수 있다.
부호화/복호화 순서에 따라 블록들을 부호화/복호화하되, 인터 예측을 기초로 부호화/복호화된 블록들을 부호화/복호화 순서에 따라 순차적으로 모션 정보 후보로 설정할 수 있다.
도 13은 모션 정보 테이블의 업데이트 양상을 설명하기 위한 도면이다.
현재 블록에 대해, 인터 예측이 수행된 경우(S1301), 현재 블록을 기초로 모션 정보 후보를 유도할 수 있다(S1302). 모션 정보 후보의 움직임 정보는 현재 블록의 움직임 정보와 동일하게 설정될 수 있다.
모션 정보 테이블이 빈 상태인 경우(S1303), 현재 블록을 기초로 유도된 모션 정보 후보를 모션 정보 테이블에 추가할 수 있다(S1304).
모션 정보 테이블이 이미 모션 정보 후보를 포함하고 있는 경우(S1303), 현재 블록의 움직임 정보(또는, 이를 기초로 유도된 모션 정보 후보)에 대한 중복성 검사를 실시할 수 있다(S1305). 중복성 검사는 모션 정보 테이블에 기 저장된 모션 정보 후보의 움직임 정보와 현재 블록의 움직임 정보가 동일한지 여부를 결정하기 위한 것이다. 중복성 검사는 모션 정보 테이블에 기 저장된 모든 모션 정보 후보들을 대상으로 수행될 수 있다. 또는, 모션 정보 테이블에 기 저장된 모션 정보 후보들 중 인덱스가 문턱값 이상 또는 문턱값 이하인 모션 정보 후보들을 대상으로 중복성 검사를 수행할 수 있다. 또는, 기 정의된 개수의 모션 정보 후보들을 대상으로 중복성 검사가 수행될 수 있다. 일 예로, 인덱스가 작은 2개의 모션 정보 후보들 또는 인덱스가 큰 2개읨 모션 정보 후보들이 중복성 검사 대상으로 결정될 수 있다.
현재 블록의 움직임 정보와 동일한 움직임 정보를 갖는 모션 정보 후보가 포함되어 있지 않은 경우, 현재 블록을 기초로 유도된 모션 정보 후보를 모션 정보 테이블에 추가할 수 있다(S1308). 모션 정보 후보들이 동일한지 여부는, 모션 정보 후보들의 움직임 정보(예컨대, 모션 벡터 및/또는 참조 픽처 인덱스 등)가 동일한지 여부를 기초로 결정될 수 있다.
이때, 모션 정보 테이블에 이미 최대 개수의 모션 정보 후보들이 저장되어 있을 경우(S1306), 가장 오래된 모션 정보 후보를 삭제하고(S1307), 현재 블록을 기초로 유도된 모션 정보 후보를 모션 정보 테이블에 추가할 수 있다(S1308). 여기서, 가장 오래된 모션 정보 후보는 인덱스가 가장 큰 모션 정보 후보 또는 인덱스가 가장 작은 모션 정보 후보일 수 있다.
모션 정보 후보들은 각기 인덱스에 의해 식별될 수 있다. 현재 블록으로부터 유도된 모션 정보 후보가 모션 정보 테이블에 추가되는 경우, 상기 모션 정보 후보에 가장 낮은 인덱스(예컨대, 0)를 할당하고, 기 저장된 모션 정보 후보들의 인덱스를 1씩 증가시킬 수 있다. 이때, 모션 정보 테이블에 이미 최대 개수의 모션 정보 후보들이 저장되었던 경우, 인덱스가 가장 큰 모션 정보 후보가 제거된다.
또는, 현재 블록으로부터 유도된 모션 정보 후보가 모션 정보 테이블에 추가되는 경우, 상기 모션 정보 후보에 가장 큰 인덱스를 할당할 수 있다. 일 예로, 모션 정보 테이블에 기 저장된 모션 정보 후보들의 개수가 최대값보다 작은 경우, 상기 모션 정보 후보에는 기 저장된 모션 정보 후보들의 개수와 동일한 값의 인덱스가 할당될 수 있다. 또는, 모션 정보 테이블에 기 저장된 모션 정보 후보들의 개수가 최대값과 같은 경우, 상기 모션 정보 후보에는 최대값에서 1을 차감한 인덱스가 할당될 수 있다. 또한, 인덱스가 가장 작은 모션 정보 후보가 제거되고, 잔여 기 저장된 모션 정보 후보들의 인덱스들이 1씩 감소하게된다.
도 14는 모션 정보 테이블의 업데이트 양상을 나타낸 도면이다.
현재 블록으로부터 유도된 모션 정보 후보가 모션 정보 테이블에 추가되면서, 상기 모션 정보 후보에 가장 큰 인덱스가 할당되는 것으로 가정한다. 또한, 모션 정보 테이블에는 이미 최대 개수의 모션 정보 후보가 저장된 것으로 가정한다.
현재 블록으로부터 유도된 모션 정보 후보 HmvpCand[n+1]를 모션 정보 테이블 HmvpCandList에 추가하는 경우, 기 저장된 모션 정보 후보들 중 인덱스가 가장 작은 모션 정보 후보 HmvpCand[0]를 삭제하고, 잔여 모션 정보 후보들의 인덱스를 1씩 감소시킬 수 있다. 또한, 현재 블록으로부터 유도된 모션 정보 후보 HmvpCand[n+1]의 인덱스를 최대값(도 14에 도시된 예에서는 n)으로 설정할 수 있다.
현재 블록을 기초로 유도된 모션 정보 후보와 동일한 모션 정보 후보가 기 저장되어 있을 경우(S1305), 현재 블록을 기초로 유도된 모션 정보 후보를 모션 정보 테이블에 추가하지 않을 수 있다(S1309).
또는, 현재 블록을 기초로 유도된 모션 정보 후보를 모션 정보 테이블에 추가하면서, 상기 모션 정보 후보와 동일한 기 저장된 모션 정보 후보를 제거할 수도 있다. 이 경우, 기 저장된 모션 정보 후보의 인덱스가 새롭게 갱신되는 것과 동일한 효과가 야기된다.
도 15는 기 저장된 모션 정보 후보의 인덱스가 갱신되는 예를 나타낸 도면이다.
현재 블록을 기초로 유도된 모션 정보 후보 mvCand와 동일한 기 저장된 모션 정보 후보의 인덱스가 hIdx인 경우, 상기 기 저장된 모션 정보 후보를 삭제하고, 인덱스가 hIdx보다 큰 모션 정보 후보들의 인덱스를 1만큼 감소시킬 수 있다. 일 예로, 도 15에 도시된 예에서는 mvCand와 동일한 HmvpCand[2]가 모션 정보 테이블 HvmpCandList에서 삭제되고, HmvpCand[3]부터 HmvpCand[n]까지의 인덱스가 1씩 감소하는 것으로 도시되었다.
그리고, 현재 블록을 기초로 유도된 모션 정보 후보 mvCand를 모션 정보 테이블의 마지막에 추가할 수 있다.
또는, 현재 블록을 기초로 유도된 모션 정보 후보와 동일한 기 저장된 모션 정보 후보에 할당된 인덱스를 갱신할 수 있다. 예컨대, 기 저장된 모션 정보 후보의 인덱스를 최소값 또는 최대값으로 변경할 수 있다.
소정 영역에 포함된 블록들의 움직임 정보는 모션 정보 테이블에 추가되지 않도록 설정될 수 있다. 일 예로, 머지 처리 영역에 포함된 블록의 움직임 정보를 기초로 유도되는 모션 정보 후보는 모션 정보 테이블에 추가하지 않을 수 있다. 머지 처리 영역에 포함된 블록들에 대해서는 부호화/복호화 순서가 정의되어 있지 않은 바, 이들 중 어느 하나의 움직임 정보를 다른 블록의 인터 예측시에 이용하는 것은 부적절하다. 이에 따라, 머지 처리 영역에 포함된 블록들을 기초로 유도된 모션 정보 후보들은 모션 정보 테이블에 추가하지 않을 수 있다.
또는, 기 설정된 크기보다 작은 블록의 움직임 정보는 모션 정보 테이블에 추가되지 않도록 설정될 수 있다. 일 예로, 너비 또는 높이가 4 또는 8보다 작은 코딩 블록의 움직임 정보, 또는 4x4 크기의 코딩 블록의 움직임 정보를 기초로 유도되는 모션 정보 후보는 모션 정보 테이블에 추가하지 않을 수 있다.
현재 블록의 인터 예측 모드를 기초로, 현재 블록을 모션 정보 후보로 이용할 것인지 여부를 결정할 수도 있다. 일 예로, 어파인 모션 모델을 기초로 부호화/복호화된 블록은 모션 정보 후보로 이용 불가능 한 것으로 설정될 수 있다. 이에 따라, 현재 블록이 인터 예측으로 부호화/복호화되었다 하더라도, 현재 블록의 인터 예측 모드가 어파인 예측 모드인 경우에는, 현재 블록을 기초로 모션 정보 테이블을 업데이트 하지 않을 수 있다.
모션 정보 후보가 움직임 정보 이외에 추가 정보를 포함하도록 설정할 수 있다. 일 예로, 모션 정보 후보에 대해 블록의 크기, 형태 또는 블록의 파티션 정보 중 적어도 하나를 추가 저장할 수 있다. 현재 블록의 머지 후보 리스트 구성 시, 모션 정보 후보들 중 현재 블록과 크기, 형태 또는 파티션 정보가 동일 또는 유사한 모션 정보 후보만을 사용하거나, 현재 블록과 크기, 형태 또는 파티션 정보가 동일 또는 유사한 모션 정보 후보를 먼저 머지 후보 리스트에 추가할 수 있다.
현재 블록의 머지 후보 리스트에 포함된 머지 후보의 개수가 문턱값보다 작은 경우, 모션 정보 테이블에 포함된 모션 정보 후보를 머지 후보로서 머지 후보 리스트에 추가할 수 있다. 상기 추가 과정은 모션 정보 후보들의 인덱스를 오름차순 또는 내림차순으로 정렬하였을 때의 순서를 따라 수행된다. 일 예로, 인덱스가 가장 큰 모션 정보 후보부터 현재 블록의 머지 후보 리스트에 추가할 수 있다.
모션 정보 테이블에 포함된 모션 정보 후보를 머지 후보 리스트에 추가하고자 하는 경우, 모션 정보 후보와 머지 후보 리스트에 기 저장된 머지 후보들간의 중복성 검사가 수행될 수 있다. 중복성 검사 수행 결과, 기 저장된 머지 후보와 동일한 움직임 정보를 갖는 모션 정보 후보는 머지 후보 리스트에 추가되지 않을 수 있다.
중복성 검사는, 모션 정보 테이블에 포함된 모션 정보 후보들 중 일부에 대해서만 수행될 수도 있다. 일 예로, 인덱스가 문턱값 이상 또는 문턱값 이하인 모션 정보 후보에 대해서만 중복성 검사가 수행될 수 있다. 또는 인덱스가 가장 큰 N개의 모션 정보 후보 또는 인덱스가 가장 작은 N개의 모션 정보 후보에 대해서만 중복성 검사가 수행될 수 있다.
또는, 머지 후보 리스트에 기 저장된 머지 후보들 중 일부에 대해서만 중복성 검사를 수행할 수 있다. 일 예로, 인덱스가 문턱값 이상 또는 문턱값 이하인 머지 후보 또는 특정 위치의 블록으로부터 유도된 머지 후보에 대해서만 중복성 검사가 수행될 수 있다. 여기서, 특정 위치는, 현재 블록의 좌측 이웃 블록, 상단 이웃 블록, 우측 상단 이웃 블록 또는 좌측 하단 이웃 블록 중 적어도 하나를 포함할 수 있다.
도 16은 머지 후보들 중 일부에 대해서만 중복성 검사가 수행되는 예를 도시한 도면이다.
모션 정보 후보 HmvpCand[j]를 머지 후보 리스트에에 추가하고자 하는 경우, 모션 정보 후보에 대해 인덱스가 가장 큰 2개의 머지 후보들 mergeCandList[NumMerge-2] 및 mergeCandList[NumMerge-1]과의 중복성 검사를 수행할 수 있다. 여기서, NumMerge는 가용한 공간적 머지 후보 및 시간적 머지 후보의 개수를 나타낼 수 있다.
도시된 예와 달리, 모션 정보 후보 HmvpCand[j]를 머지 후보 리스트에에 추가하고자 하는 경우, 모션 정보 후보에 대해 인덱스가 가장 작은 최대 2개의 머지 후보와의 중복성 검사를 수행할 수도 있다. 예컨대, mergeCandList[0] 및 mergeCandList[1]에 대해 HmvpCand[j]와의 동일 여부를 확인할 수 있다.
또는 특정 위치에서 유도된 머지 후보에 대해서만 중복성 검사를 수행할 수 있다. 일 예로, 현재 블록의 좌측에 위치하는 주변 블록으로부터 유도된 머지 후보 또는 현재 블록의 상단에 위치하는 주변 블록으로부터 유도된 머지 후보 중 적어도 하나에 대해 중복성 검사를 수행할 수 있다. 머지 후보 리스트에 특정 위치에서 유도된 머지 후보가 존재하지 않는 경우, 중복성 검사 없이 모션 정보 후보를 머지 후보 리스트에 추가할 수 있다.
모션 정보 후보 HmvpCand[j]를 머지 후보 리스트에에 추가하고자 하는 경우, 모션 정보 후보에 대해 인덱스가 가장 큰 2개의 머지 후보들 mergeCandList[NumMerge-2] 및 mergeCandList[NumMerge-1]과의 중복성 검사를 수행할 수 있다. 여기서, NumMerge는 가용한 공간적 머지 후보 및 시간적 머지 후보의 개수를 나타낼 수 있다.
모션 정보 후보들 중 일부에 대해서만 머지 후보와의 중복성 검사를 수행할 수도 있다. 일 예로, 모션 정보 테이블에 포함된 모션 정보 후보들 중 인덱스가 큰 N개 또는 인덱스가 작은 N개의 모션 정보 후보에 대해서만 중복성 검사가 수행될 수 있다. 일 예로, 모션 정보 테이블에 포함된 모션 정보 후보들의 개수와 차분이 문턱값 이하인 인덱스를 갖는 모션 정보 후보들에 대해서만 중복성 검사가 수행될 수 있다. 문턱값이 2인 경우, 모션 정보 테이블에 포함된 모션 정보 후보들 중 인덱스 값이 가장 큰 3개의 모션 정보 후보들에 대해서만 중복성 검사가 수행될 수 있다. 상기 3개의 모션 정보 후보들을 제외한 모션 정보 후보들에 대해서는 중복성 검사가 생략될 수 있다. 중복성 검사가 생략되는 경우, 머지 후보와 동일한 움직임 정보를 갖는지 여부와 관계없이, 모션 정보 후보를 머지 후보 리스트에 추가할 수 있다.
이와 반대로, 모션 정보 테이블에 포함된 모션 정보 후보들의 개수와 차분이 문턱값 이상인 인덱스를 갖는 모션 정보 후보들에 대해서만 중복성 검사가 수행되도록 설정할 수도 있다.
중복성 검사가 수행되는 모션 정보 후보의 개수는 부호화기 및 복호화기에서 기 정의되어 있을 수 있다. 예컨대, 문턱값은 0, 1 또는 2와 같은 정수일 수 있다.
또는, 머지 후보 리스트에 포함된 머지 후보의 개수 또는 모션 정보 테이블에 포함된 모션 정보 후보들의 개수 중 적어도 하나를 기초로 문턱값을 결정할 수 있다.
제1 모션 정보 후보와 동일한 머지 후보가 발견된 경우, 제2 모션 정보 후보에 대한 중복성 검사시 상기 제1 모션 정보 후보와 동일한 머지 후보와의 중복성 검사를 생략할 수 있다.
도 17은 특정 머지 후보와의 중복성 검사가 생략되는 예를 나타낸 도면이다.
인덱스가 i인 모션 정보 후보 HmvpCand[i]를 머지 후보 리스트에 추가하고자 하는 경우, 상기 모션 정보 후보와 머지 후보 리스트에 기 저장된 머지 후보들 사이의 중복성 검사가 수행된 다. 이때, 모션 정보 후보 HmvpCand[i]와 동일한 머지 후보 mergeCandList[j]가 발견된 경우, 모션 정보 후보 HmvpCand[i]를 머지 후보 리스트에 추가하지 않고, 인덱스가 i-1인 모션 정보 후보 HmvpCand[i-1]와 머지 후보들 간의 중복성 검사를 수행할 수 있다. 이때, 모션 정보 후보 HmvpCand[i-1]과 머지 후보 mergeCandList[j] 사이의 중복성 검사는 생략할 수 있다.
일 예로, 도 17에 도시된 예에서는, HmvpCand[i]와 mergeCandList[2]가 동일한 것으로 결정되었다. 이에 따라, HmvpCand[i]는 머지 후보 리스트에 추가되지 않고, HmvpCand[i-1]에 대한 중복성 검사가 수행될 수 있다. 이때, HvmpCand[i-1]과 mergeCandList[2] 사이의 중복성 검사는 생략될 수 있다.
현재 블록의 머지 후보 리스트에 포함된 머지 후보의 개수가 문턱값보다 작은 경우, 모션 정보 후보 이외에도, 페어 와이즈 머지 후보 또는 제로 머지 후보 중 적어도 하나가 더 포함될 수도 있다. 페어 와이즈 머지 후보는 둘 이상의 머지 후보들의 움직임 벡터들을 평균한 값을 움직임 벡터로 갖는 머지 후보를 의미하고, 제로 머지 후보는 모션 벡터가 0인 머지 후보를 의미한다.
현재 블록의 머지 후보 리스트는 다음의 순서를 따라, 머지 후보가 추가될 수 있다.
공간적 머지 후보 - 시간적 머지 후보 - 모션 정보 후보 - (어파인 모션 정보 후보) - 페어 와이즈 머지 후보 - 제로 머지 후보
공간적 머지 후보는 이웃 블록 또는 비이웃 블록 중 적어도 하나로부터 유도되는 머지 후보를 의미하고, 시간적 머지 후보는 이전 참조 픽처에서 유도되는 머지 후보를 의미한다. 어파인 모션 정보 후보는 어파인 모션 모델로 부호화/복호화된 블록으로부터 유도된 모션 정보 후보를 나타낸다.
모션 벡터 예측 모드에서도 모션 정보 테이블이 이용될 수 있다. 일 예로, 현재 블록의 움직임 벡터 예측 후보 리스트에 포함된 움직임 벡터 예측 후보의 개수가 문턱값보다 작은 경우, 모션 정보 테이블에 포함된 모션 정보 후보를 현재 블록에 대한 움직임 벡터 예측 후보로 설정할 수 있다. 구체적으로, 모션 정보 후보의 움직임 벡터를 움직임 벡터 예측 후보로 설정할 수 있다.
현재 블록의 움직임 벡터 예측 후보 리스트에 포함된 움직임 벡터 예측 후보들 중 어느 하나가 선택되면, 선택된 후보를 현재 블록의 움직임 벡터 예측자로 설정할 수 있다. 이후, 현재 블록의 움직임 벡터 잔차값을 복호화한 뒤, 움직임 벡터 예측자와 움직임 벡터 잔차값을 합하여 현재 블록의 움직임 벡터를 획득할 수 있다.
현재 블록의 움직임 벡터 예측 후보 리스트는 다음의 순서를 따라, 구성될 수 있다.
공간적 모션 벡터 예측 후보 - 시간적 모션 벡터 예측 후보 - 모션 정보 후보 - (어파인 모션 정보 후보) - 제로 모션 벡터 예측 후보
공간적 모션 벡터 예측 후보는 이웃 블록 또는 비이웃 블록 중 적어도 하나로부터 유도되는 모션 벡터 예측 후보를 의미하고, 시간적 모션 벡터 예측 후보는 이전 참조 픽처에서 유도되는 모션 벡터 예측 후보를 의미한다. 어파인 모션 정보 후보는 어파인 모션 모델로 부호화/복호화된 블록으로부터 유도된 모션 정보 후보를 나타낸다. 제로 모션 벡터 예측 후보는 움직임 벡터의 값이 0인 후보를 나타낸다.
코딩 블록보다 더 큰 크기의 머지 처리 영역이 정의될 수 있다. 머지 처리 영역에 포함된 코딩 블록들은 순차적으로 부호화/복호화되지 않고, 병렬 처리될 수 있다. 여기서, 순차적으로 부호화/복호화되지 않는다는 것은, 부호화/복호화 순서가 정의되어 있지 않음을 의미한다. 이에 따라, 머지 처리 영역에 포함된 블록들의 부호화/복호화 과정은 독립적으로 처리될 수 있다. 또는, 머지 처리 영역에 포함된 블록들은 머지 후보들을 공유할 수 있다. 여기서, 머지 후보들은 머지 처리 영역을 기준으로 유도될 수 있다.
상술한 특징에 따라, 머지 처리 영역을 병렬 처리 영역, 머지 공유 영역(Shared Merge Region, SMR) 또는 MER (Merge Estimation Region)이라 호칭할 수도 있다.
현재 블록의 머지 후보는 코딩 블록을 기준으로 유도될 수 있다. 다만, 현재 블록이 현재 블록보다 더 큰 크기의 머지 처리 영역에 포함된 경우, 현재 블록과 동일한 머지 처리 영역에 포함된 후보 블록은 머지 후보로서 이용 불가능한 것으로 설정될 수 있다.
도 18은 현재 블록과 동일한 머지 처리 영역에 포함된 후보 블록이 머지 후보로서 이용 불가능한 것으로 설정되는 예를 나타낸 도면이다.
도 18의 좌측에 도시된 예에서, CU5의 부호화/복호화시, CU5에 인접한 기준 샘플들을 포함하는 블록들이 후보 블록들로 설정될 수 있다. 이때, CU5와 동일한 머지 처리 영역에 포함된 후보 블록 X3 및 X4는 CU5의 머지 후보로서 이용 불가능한 것으로 설정될 수 있다. 반면, CU5와 동일한 머지 처리 영역에 포함되어 있지 않은 후보 블록 X0, X1 및 X2는 머지 후보로서 이용 가능한 것으로 설정될 수 있다.
도 18의 우측에 도시된 예에서, CU8의 부호화/복호화시, CU8에 인접한 기준 샘플들을 포함하는 블록들이 후보 블록들로 설정될 수 있다. 이때, CU8과 동일한 머지 처리 영역에 포함된 후보 블록 X6, X7 및 X8은 머지 후보로서 비가용한 것으로 설정될 수 있다. 반면, CU8과 동일한 머지 영역에 포함되어 있지 않은 후보 블록 X5 및 X9는 머지 후보로서 이용 가능한 것으로 설정될 수 있다.
또는, 현재 블록이 머지 처리 영역에 포함된 경우, 현재 블록에 인접하는 이웃 블록 및 머지 처리 영역에 인접하는 이웃 블록이 후보 블록으로 설정될 수 있다.
도 19는 현재 블록이 머지 처리 영역에 포함되어 있을 경우, 현재 블록에 대한 머지 후보를 유도하는 예를 나타낸 도면이다.
도 19의 (a)에 도시된 예에서와 같이, 현재 블록이 인접하는 이웃 블록들이 현재 블록의 머지 후보를 유도하기 위한 후보 블록들로 설정될 수 있다. 이때, 현재 블록과 동일한 머지 처리 영역에 포함된 후보 블록은 머지 후보로서 비가용한 것으로 설정될 수 있다. 일 예로, 코딩 블록 CU3에 대한 머지 후보 유도시, 코딩 블록 CU3과 동일한 머지 처리 영역에 포함된 상단 이웃 블록 y3 및 우측 상단 이웃 블록 y4는 코딩 블록 CU3의 머지 후보로서 이용 불가능한 것으로 설정될 수 있다.
현재 블록에 인접하는 이웃 블록들을 기 정의된 순서에 따라 스캔하여, 머지 후보를 유도할 수 있다. 일 예로, 기 정의된 순서는, y1, y3, y4, y0 및 y2의 순서일 수 있다.
현재 블록에 인접하는 이웃 블록들로부터 유도할 수 있는 머지 후보들의 개수가 머지 후보의 최대 개수 또는 상기 최대 개수에서 오프셋을 차감한 값보다 작은 경우, 도 19의 (b)에 도시된 예에서와 같이, 머지 처리 영역에 인접하는 이웃 블록들을 이용하여 현재 블록에 대한 머지 후보를 유도할 수 있다. 일 예로, 코딩 블록 CU3을 포함하는 머지 처리 영역에 인접하는 이웃 블록들을, 코딩 블록 CU3에 대한 후보 블록들로 설정할 수 있다. 여기서, 머지 처리 영역에 인접하는 이웃 블록들은 좌측 이웃 블록 x1, 상단 이웃 블록 x3, 좌측 하단 이웃 블록 x0, 우측 상단 이웃 블록 x4 또는 좌측 상단 이웃 블록 x2 중 적어도 하나를 포함할 수 있다.
머지 처리 영역에 인접하는 이웃 블록들을 기 정의된 순서에 따라 스캔하여, 머지 후보를 유도할 수 있다. 일 예로, 기 정의된 순서는, x1, x3, x4, x0 및 x2의 순서일 수 있다.
요약하면, 머지 처리 영역에 포함된 코딩 블록 CU3에 대한 머지 후보는 다음의 스캔 순서에 따라 후보 블록들을 스캔하여 유도될 수 있다.
(y1, y3, y4, y0, y2, x1, x3, x4, x0, x2)
다만, 위 예시된 후보 블록들의 스캔 순서는 본 발명의 일 예시를 나타낸 것에 불과하며, 위 예시와 상이한 순서를 따라 후보 블록들을 스캔하는 것도 가능하다. 또는, 현재 블록 또는 머지 처리 영역의 크기 또는 형태 중 적어도 하나에 기초하여, 스캔 순서를 적응적으로 결정할 수도 있다.
머지 처리 영역은 정방형 또는 비정방형일 수 있다. 머지 처리 영역을 결정하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 머지 처리 영역의 형태를 나타내는 정보 또는 머지 처리 영역의 크기를 나타내는 정보 중 적어도 하나를 포함할 수 있다. 머지 처리 영역이 비정방 형태인 경우, 머지 처리 영역의 크기를 나타내는 정보, 머지 처리 영역의 너비 및/또는 높이를 나타내는 정보 또는 머지 처리 영역의 너비와 높이 사이의 비율을 나타내는 정보 중 적어도 하나가 비트스트림을 통해 시그날링될 수 있다.
머지 처리 영역의 크기는 비트스트림을 통해 시그날링되는 정보, 픽처 해상도, 슬라이스의 크기 또는 타일 크기 중 적어도 하나를 기초로 결정될 수 있다.
머지 처리 영역에 포함된 블록에 대해 움직임 보상 예측이 수행되면, 움직임 보상 예측이 수행된 블록의 움직임 정보를 기초로 유도된 모션 정보 후보를 모션 정보 테이블에 추가할 수 있다.
다만, 머지 처리 영역에 포함된 블록으로부터 유도된 모션 정보 후보를 모션 정보 테이블에 추가할 경우, 상기 블록보다 실제로 부호화/복호화가 늦은 머지 처리 영역 내 타 블록의 부호화/복호화시, 상기 블록으로부터 유도된 모션 정보 후보를 사용하는 경우가 발생할 수 있다. 즉, 머지 처리 영역에 포함된 블록들의 부호화/복호화시 블록들간 의존성을 배제하여야 함에도 불구하고, 머지 처리 영역에 포함된 타 블록의 움직임 정보를 이용하여 움직임 예측 보상이 수행되는 경우가 발생할 수 있다. 이와 같은 문제점을 해소하기 위해, 머지 처리 영역에 포함된 블록의 부호화/복호화가 완료되더라도, 부호화/복호화가 완료된 블록의 움직임 정보를 모션 정보 테이블에 추가하지 않을 수 있다.
또는, 머지 처리 영역 내 기 정의된 위치의 블록만을 이용하여, 모션 정보 테이블을 업데이트할 수 있다. 기 정의된 위치는, 머지 처리 영역 내 좌측 상단에 위치하는 블록, 우측 상단에 위치하는 블록, 좌측 하단에 위치하는 블록, 우측 하단에 위치하는 블록, 중앙에 위치하는 블록, 우측 경계에 인접하는 블록 또는 하단 경계에 인접하는 블록 중 적어도 하나를 포함할 수 있다. 일 예로, 머지 처리 영역 내 우측 하단 코너에 인접하는 블록의 움직임 정보만을 모션 정보 테이블에 업데이트하고, 다른 블록들의 움직임 정보는 모션 정보 테이블에 업데이트하지 않을 수 있다.
또는, 머지 처리 영역에 포함된 모든 블록들의 복호화가 완료된 이후, 상기 블록들로부터 유도된 모션 정보 후보를 모션 정보 테이블에 추가할 수 있다. 즉, 머지 처리 영역에 포함된 블록들이 부호화/복호화되는 동안에는 모션 정보 테이블이 업데이트되지 않을 수 있다.
일 예로, 머지 처리 영역에 포함된 블록들에 대해 움직임 보상 예측이 수행되면, 상기 블록들로부터 유도된 모션 정보 후보를 기 정의된 순서로 모션 정보 테이블에 추가할 수 있다. 여기서, 기 정의된 순서는 머지 처리 영역 또는 코딩 트리 유닛 내 코딩 블록들의 스캔 순서에 따라 결정될 수 있다. 상기 스캔 순서는, 래스터 스캔, 수평 스캔, 수직 스캔 또는 지그재그 스캔 중 적어도 하나일 수 있다. 또는, 기 정의된 순서는 각 블록들의 움직임 정보 또는 동일한 움직임 정보를 갖는 블록들의 개수를 기초로 결정될 수 있다.
또는, 단방향 모션 정보를 포함하는 모션 정보 후보를 양방향 모션 정보를 포함하는 모션 정보 후보보다 먼저 모션 정보 테이블에 추가할 수 있다. 이와 반대로, 양방향 모션 정보를 포함하는 모션 정보 후보를 단방향 모션 정보를 포함하는 모션 정보 후보보다 먼저 모션 정보 테이블에 추가할 수도 있다.
또는, 머지 처리 영역 또는 코딩 트리 유닛 내 사용 빈도가 높은 순서 또는 사용 빈도가 낮은 순서를 따라 모션 정보 후보를 모션 정보 테이블에 추가할 수 있다.
현재 블록이 머지 처리 영역에 포함되어 있고, 현재 블록의 머지 후보 리스트에 포함된 머지 후보들의 개수가 최대 개수보다 작은 경우, 모션 정보 테이블에 포함된 모션 정보 후보를 머지 후보 리스트에 추가할 수 있다. 이때, 현재 블록과 동일한 머지 처리 영역에 포함된 블록으로부터 유도된 모션 정보 후보는 현재 블록의 머지 후보 리스트에 추가되지 않도록 설정될 수 있다.
또는, 현재 블록이 머지 처리 영역에 포함된 경우, 모션 정보 테이블에 포함된 모션 정보 후보를 사용하지 않도록 설정할 수 있다. 즉, 현재 블록의 머지 후보 리스트에 포함된 머지 후보들의 개수가 최대 개수보다 작은 경우라 하더라도, 모션 정보 테이블에 포함된 모션 정보 후보를 머지 후보 리스트에 추가하지 않을 수 있다.
다른 예로, 머지 처리 영역 또는 코딩 트리 유닛에 대한 모션 정보 테이블을 구성할 수 있다. 이 모션 정보 테이블은 머지 처리 영역에 포함된 블록들의 모션 정보를 임시로 저장하는 역할을 수행한다. 일반적인 모션 정보 테이블과 머지 처리 영역 또는 코딩 트리 유닛을 위한 모션 정보 테이블을 구별하기 위해, 머지 처리 영역 또는 코딩 트리 유닛을 위한 모션 정보 테이블을 임시 모션 정보 테이블이라 호칭하기로 한다. 아울러, 임시 모션 정보 테이블에 저장된 모션 정보 후보를 임시 모션 정보 후보라 호칭하기로 한다.
도 20은 임시 모션 정보 테이블을 나타낸 도면이다.
코딩 트리 유닛 또는 머지 처리 영역을 위한 임시 모션 정보 테이블을 구성할 수 있다. 코딩 트리 유닛 또는 머지 처리 영역에 포함된 현재 블록에 대해 움직임 보상 예측이 수행된 경우, 상기 블록의 움직임 정보는 모션 정보 테이블 HmvpCandList에 추가하지 않을 수 있다. 대신, 상기 블록으로부터 유도된 임시 모션 정보 후보를 임시 모션 정보 테이블 HmvpMERCandList에 추가할 수 있다. 즉, 임시 모션 정보 테이블에 추가된 임시 모션 정보 후보는 모션 정보 테이블에 추가되지 않을 수 있다. 이에 따라, 모션 정보 테이블은 현재 블록을 포함하는 코딩 트리 유닛 또는 머지 처리 영역에 포함된 블록들의 모션 정보를 기초로 유도된 모션 정보 후보를 포함하지 않을 수 있다.
또는, 머리 처리 영역에 포함된 블록들 중 일부 블록들의 움직임 정보만을 임시 모션 정보 테이블에 추가할 수 있다. 일 예로, 머지 처리 영역 내 기 정의된 위치의 블록들만을 모션 정보 테이블을 업데이트하는데 이용할 수 있다. 기 정의된 위치는, 머지 처리 영역 내 좌측 상단에 위치하는 블록, 우측 상단에 위치하는 블록, 좌측 하단에 위치하는 블록, 우측 하단에 위치하는 블록, 중앙에 위치하는 블록, 우측 경계에 인접하는 블록 또는 하단 경계에 인접하는 블록 중 적어도 하나를 포함할 수 있다. 일 예로, 머지 처리 영역 내 우측 하단 코너에 인접하는 블록의 움직임 정보만을 임시 모션 정보 테이블에 추가하고, 다른 블록들의 움직임 정보는 임시 모션 정보 테이블에 추가하지 않을 수 있다.
임시 모션 정보 테이블이 포함할 수 있는 임시 모션 정보 후보의 최대 개수는 모션 정보 테이블이 포함할 수 있는 모션 정보 후보의 최대 개수와 동일하게 설정될 수 있다. 또는, 임시 모션 정보 테이블이 포함할 수 있는 임시 모션 정보 후보의 최대 개수는 코딩 트리 유닛 또는 머지 처리 영역의 크기에 따라 결정될 수 있다. 또는, 임시 모션 정보 테이블이 포함할 수 있는 임시 모션 정보 후보의 최대 개수를 모션 정보 테이블이 포함할 수 있는 모션 정보 후보의 최대 개수보다 작게 설정할 수 있다.
코딩 트리 유닛 또는 머지 처리 영역에 포함된 현재 블록은 해당 코딩 트리 유닛 또는 해당 머지 처리 영역에 대한 임시 모션 정보 테이블을 이용하지 않도록 설정할 수 있다. 즉, 현재 블록의 머지 후보 리스트에 포함된 머지 후보의 개수가 문턱값보다 작은 경우, 모션 정보 테이블에 포함된 모션 정보 후보를 머지 후보 리스트에 추가하고, 임시 모션 정보 테이블에 포함된 임시 모션 정보 후보는 머지 후보 리스트에 추가하지 않을 수 있다. 이에 따라, 현재 블록과 동일한 코딩 트리 유닛 또는 동일한 머지 처리 영역에 포함된 타 블록의 움직임 정보를 현재 블록의 움직임 보상 예측에 이용하지 않을 수 있다.
코딩 트리 유닛 또는 머지 처리 영역에 포함된 모든 블록들의 부호화/복호화가 완료되면, 모션 정보 테이블과 임시 모션 정보 테이블을 병합할 수 있다.
도 21은 모션 정보 테이블과 임시 모션 정보 테이블을 병합하는 예를 나타낸 도면이다.
코딩 트리 유닛 또는 머지 처리 영역에 포함된 모든 블록들의 부호화/복호화가 완료되면, 도 21에 도시된 예에서와 같이, 임시 모션 정보 테이블에 포함된 임시 모션 정보 후보를 모션 정보 테이블에 업데이트할 수 있다.
이때, 임시 모션 정보 테이블에 포함된 임시 모션 정보 후보들은, 임시 모션 정보 테이블에 삽입된 순서(즉, 인덱스 값의 오름차순 또는 내림차순)대로 모션 정보 테이블에 추가될 수 있다.
다른 예로, 기 정의된 순서에 따라, 임시 모션 정보 테이블에 포함된 임시 모션 정보 후보들을 모션 정보 테이블에 추가할 수 있다. 여기서, 기 정의된 순서는 머지 처리 영역 또는 코딩 트리 유닛 내 코딩 블록들의 스캔 순서에 따라 결정될 수 있다. 상기 스캔 순서는, 래스터 스캔, 수평 스캔, 수직 스캔 또는 지그재그 스캔 중 적어도 하나일 수 있다. 또는, 기 정의된 순서는 각 블록들의 움직임 정보 또는 동일한 움직임 정보를 갖는 블록들의 개수를 기초로 결정될 수 있다.
또는, 단방향 모션 정보를 포함하는 임시 모션 정보 후보를 양방향 모션 정보를 포함하는 임시 모션 정보 후보보다 먼저 모션 정보 테이블에 추가할 수 있다. 이와 반대로, 양방향 모션 정보를 포함하는 임시 모션 정보 후보를 단방향 모션 정보를 포함하는 임시 모션 정보 후보보다 먼저 모션 정보 테이블에 추가할 수도 있다.
또는, 머지 처리 영역 또는 코딩 트리 유닛 내 사용 빈도가 높은 순서 또는 사용 빈도가 낮은 순서를 따라 임시 모션 정보 후보를 모션 정보 테이블에 추가할 수 있다.
임시 모션 정보 테이블에 포함된 임시 모션 정보 후보를 모션 정보 테이블에 추가하는 경우에 있어서, 임시 모션 정보 후보에 대한 중복성 검사를 수행할 수 있다. 일 예로, 임시 모션 정보 테이블에 포함된 임시 모션 정보 후보와 동일한 모션 정보 후보가 모션 정보 테이블에 기 저장되어 있을 경우, 상기 임시 모션 정보 후보를 모션 정보 테이블에 추가하지 않을 수 있다. 이때, 중복성 검사는 모션 정보 테이블에 포함된 모션 정보 후보들 중 일부를 대상으로 수행될 수 있다. 일 예로, 인덱스가 문턱값 이상 또는 문턱값 이하인 모션 정보 후보들을 대상으로 중복성 검사가 수행될 수 있다. 일 예로, 임시 모션 정보 후보가 기 정의된 값 이상인 인덱스를 갖는 모션 정보 후보와 동일한 경우에는, 상기 임시 모션 정보 후보를 모션 정보 테이블에 추가하지 않을 수 있다.
현재 블록과 동일한 코딩 트리 유닛 또는 동일한 머지 처리 영역에 포함된 블록으로부터 유도된 모션 정보 후보가 현재 블록의 머지 후보로 이용되는 것을 제한할 수 있다. 이를 위해, 모션 정보 후보에 대해 블록의 주소 정보를 추가 저장할 수 있다. 블록의 주소 정보는, 블록의 위치, 블록의 주소, 블록의 인덱스, 블록이 포함된 머지 처리 영역의 위치, 블록이 포함된 머지 처리 영역의 주소, 블록이 포함된 머지 처리 영역의 인덱스, 블록이 포함된 코딩 트리 영역의 위치, 블록이 포함된 코딩 트리 영역의 주소 또는 블록이 포함된 코딩 트리 영역의 인덱스 중 적어도 하나를 포함할 수 있다.
인트라 예측은 현재 블록 주변에 부호화/복호화가 완료된 복원 샘플을 이용하여, 현재 블록을 예측하는 것이다. 이때, 현재 블록의 인트라 예측에는, 인루프 필터가 적용되기 전의 복원 샘플이 이용될 수 있다.
인트라 예측 기법은 매트릭스(Matrix)에 기반한 인트라 예측 및 주변 복원 샘플과의 방향성을 고려한 일반 인트라 예측을 포함한다. 현재 블록의 인트라 예측 기법을 지시하는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 1비트의 플래그일 수 있다. 또는, 현재 블록의 위치, 크기, 형태 또는 이웃 블록의 인트라 예측 기법 중 적어도 하나에 기초하여, 현재 블록의 인트라 예측 기법을 결정할 수 있다. 일 예로, 현재 블록이 픽처 바운더리를 걸쳐 존재하는 경우, 현재 블록에는 매트릭트에 기반한 인트라 예측이 적용되지 않도록 설정될 수 있다.
매트릭스에 기반한 인트라 예측은, 부호화기 및 복호화기에서 기 저장된 매트릭스와, 현재 블록 주변의 복원 샘플 사이의 행렬 곱에 기반하여, 현재 블록의 예측 블록을 획득하는 방법이다. 기 저장된 복수개의 매트릭스들 중 어느 하나를 특정하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다. 복호화기는 상기 정보 및 현재 블록의 크기에 기초하여, 현재 블록의 인트라 예측을 위한 매트릭스를 결정할 수 있다.
일반 인트라 예측은, 비방향성 인트라 예측 모드 또는 방향성 인트라 예측 모드에 기초하여, 현재 블록에 대한 예측 블록을 획득하는 방법이다. 이하, 도면을 참조하여, 일반 인트라 예측에 기초한 인트라 예측 수행 과정에 대해 보다 상세히 살펴보기로 한다.
도 22는 본 발명의 일 실시예에 따른, 인트라 예측 방법의 흐름도이다.
현재 블록의 참조 샘플 라인을 결정할 수 있다(S2201). 참조 샘플 라인은 현재 블록의 상단 및/또는 좌측으로부터 k번째 떨어진 라인에 포함된 참조 샘플들의 집합을 의미한다. 참조 샘플은 현재 블록 주변 부호화/복호화가 완료된 복원 샘플로부터 유도될 수 있다.
복수의 참조 샘플 라인들 중 현재 블록의 참조 샘플 라인을 식별하는 인덱스 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 현재 블록의 참조 샘플 라인을 특정하기 위한 인덱스 정보 intra_luma_ref_idx가 비트스트림을 통해 시그날링될 수 있다. 상기 인덱스 정보는 코딩 블록 단위로 시그날링될 수 있다.
복수의 참조 샘플 라인들은, 현재 블록에 상단 및/또는 좌측 1번째 라인, 2번째 라인, 3번째 라인 중 적어도 하나를 포함할 수 있다. 복수개의 참조 샘플 라인들 중 현재 블록의 상단에 인접하는 행 및 현재 블록의 좌측에 인접하는 열로 구성된 참조 샘플 라인을 인접 참조 샘플 라인이라 호칭하고, 그 이외의 참조 샘플 라인을 비인접 참조 샘플 라인이라 호칭할 수도 있다.
표 1은 후보 참조 샘플 라인들 각각에 할당되는 인덱스를 나타낸 것이다.
인덱스 (intra_luma_ref_idx) 참조 샘플 라인
0 인접 참조 샘플 라인
1 제1 비인접 참조 샘플 라인
2 제2 비인접 참조 샘플 라인
현재 블록의 위치, 크기, 형태 또는 이웃 블록의 예측 부호화 모드 중 적어도 하나에 기초하여, 현재 블록의 참조 샘플 라인을 결정할 수도 있다. 일 예로, 현재 블록이 픽처, 타일, 슬라이스 또는 코딩 트리 유닛의 경계에 접하는 경우, 인접 참조 샘플 라인을 현재 블록의 참조 샘플 라인으로 결정할 수 있다.
참조 샘플 라인은 현재 블록의 상단에 위치하는 상단 참조 샘플들 및 현재 블록의 좌측에 위치하는 좌측 참조 샘플들을 포함할 수 있다. 상단 참조 샘플들 및 좌측 참조 샘플들은 현재 블록 주변의 복원 샘플들로부터 유도될 수 있다. 상기 복원 샘플들은 인루프 필터가 적용되기 이전 상태일 수 있다.
다음으로, 현재 블록의 인트라 예측 모드를 결정할 수 있다(S2202). 현재 블록의 인트라 예측 모드는 비방향성 인트라 예측 모드 또는 방향성 인트라 예측 모드 중 적어도 하나가 현재 블록의 인트라 예측 모드로 결정될 수 있다. 비방향성 인트라 예측 모드는, 플래너 및 DC를 포함하고, 방향성 인트라 예측 모드는 좌하단 대각 방향부터 우상단 대각 방향까지 33개 또는 65개의 모드들을 포함한다.
도 23은 인트라 예측 모드들을 나타낸 도면이다.
도 23의 (a)는 35개의 인트라 예측 모드를 나타낸 것이고, 도 23의 (b)는 67개의 인트라 예측 모드들을 나타낸 것이다.
도 23에 도시된 것보다 더 많은 수 혹은 더 적은 수의 인트라 예측 모드들이 정의될 수도 있다.
현재 블록에 인접하는 이웃 블록의 인트라 예측 모드를 기초로, MPM(Most Probable Mode)을 설정할 수 있다. 여기서, 이웃 블록은, 현재 블록의 좌측에 인접하는 좌측 이웃 블록 및 현재 블록의 상단에 이웃하는 상단 이웃 블록을 포함할 수 있다.
MPM 리스트에 포함되는 MPM의 개수는 부호화기 및 복호화기에서 기 설정될 수 있다. 일 예로, MPM의 개수는, 3개, 4개, 5개 혹은 6개일 수 있다. 또는, MPM의 개수를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 또는, 이웃 블록의 예측 부호화 모드, 현재 블록의 크기, 형태 또는 참조 샘플 라인 인덱스 중 적어도 하나에 기초하여 MPM의 개수가 결정될 수 있다. 일 예로, 인접 참조 샘플 라인이 현재 블록의 참조 샘플 라인으로 결정된 경우에는 N개의 MPM들이 이용되는 반면, 비인접 참조 샘플 라인이 현재 블록의 참조 샘플 라인으로 결정된 경우에는 M개의 MPM들이 이용될 수 있다. M은 N보다 작은 자연수로, 일 예로, N은 6이고, M은 5, 4 또는 3일 수 있다. 이에 따라, 현재 블록의 참조 샘플 라인의 인덱스가 0이고, MPM 플래그가 참인 경우, 현재 블록의 인트라 예측 모드는 6개의 후보 인트라 예측 모드들 중 어느 하나로 결정되는 반면, 현재 블록의 참조 샘플 라인의 인덱스가 0보다 크고, MPM 플래그가 참인 경우, 현재 블록의 인트라 예측 모드는 5개의 후보 인트라 예측 모드들 중 어느 하나로 결정될 수 있다.
또는, 현재 블록의 참조 샘플 라인의 인덱스와 무관하게 고정된 개수(예컨대, 6개 또는 5개)의 MPM 후보를 사용할 수도 있다.
복수의 MPM을 포함하는 MPM 리스트를 생성하고, 현재 블록의 인트라 예측 모드와 동일한 MPM이 MPM 리스트에 포함되어 있는지 여부를 나타내는 정보를 비트스트림을 통해 시그날링할 수 있다. 상기 정보는 1비트의 플래그로 MPM 플래그라 호칭될 수 있다. 상기 MPM 플래그가 현재 블록과 동일한 MPM이 MPM 리스트에 포함되어 있음을 나타내는 경우, MPM들 중 하나를 식별하는 인덱스 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 복수의 MPM들 중 어느 하나를 특정하는 인덱스 정보 mpm_idx가 비트스트림을 통해 시그날링될 수 있다. 상기 인덱스 정보에 의해 특정된 MPM이 현재 블록의 인트라 예측 모드로 설정될 수 있다. 상기 MPM 플래그가 현재 블록과 동일한 MPM이 MPM 리스트에 포함되어 있지 않음을 나타내는 경우, MPM들을 제외한 잔여 인트라 예측 모드들 중 어느 하나를 지시하는 잔여 모드 정보가 비트스트림을 통해 시그날링될 수 있다. 잔여 모드 정보는 MPM들을 제외한 잔여 인트라 예측 모드들에 인덱스를 재할당하였을 때, 현재 블록의 인트라 예측 모드에 대응되는 인덱스 값을 가리킨다. 복호화기에서는 MPM들을 오름차순으로 정렬하고, 잔여 모드 정보를 MPM들과 비교하여 현재 블록의 인트라 예측 모드를 결정할 수 있다. 일 예로, 잔여 모드 정보가 MPM과 같거나 작은 경우, 잔여 모드 정보에 1을 가산하여 현재 블록의 인트라 예측 모드를 유도할 수 있다.
현재 블록의 인트라 예측 모드 유도 시, MPM들 중 일부와 잔여 모드 정보에 대한 비교는 생략될 수 있다. 일 예로, MPM들 중 비방향성 인트라 예측 모드인 MPM 들은 비교 대상에서 제외될 수 있다. 비방향성 인트라 예측 모드들이 MPM들로 설정된 경우, 잔여 모드 정보는 방향성 인트라 예측 모드를 가리킴이 명확하므로, 비방향성 인트라 예측 모드들을 제외한 잔여 MPM들과 잔여 모드 정보와의 비교를 통해 현재 블록의 인트라 예측 모드를 유도할 수 있다. 비방향성 인트라 예측 모드들을 비교 대상으로 제외하는 대신, 잔여 모드 정보에 비방향성 인트라 예측 모드들의 개수를 가산한 뒤, 그 결과값을 잔여 MPM들과 비교할 수 있다.
디폴트 모드를 MPM으로 설정하는 대신, 현재 블록의 인트라 예측 모드가 디폴트 모드인지 여부를 나타내는 정보를 비트스트림을 통해 시그날링할 수 있다. 상기 정보는 1비트의 플래그이고, 상기 플래그를 디폴트 모드 플래그라 호칭할 수 있다. 상기 디폴트 모드 플래그는 MPM 플래그가 현재 블록과 동일한 MPM이 MPM 리스트에 포함되어 있음을 나타내는 경우에 한하여 시그날링될 수 있다. 상술한 바와 같이, 디폴트 모드는, 플래너, DC, 수직 방향 모드 또는 수평 방향 모드 중 적어도 하나를 포함할 수 있다. 일 예로, 플래너가 디폴트 모드로 설정된 경우, 디폴트 모드 플래그는 현재 블록의 인트라 예측 모드가 플래너인지 여부를 지시할 수 있다. 디폴트 모드 플래그가 현재 블록의 인트라 예측 모드가 디폴트 모드가 아님을 가리키는 경우, 인덱스 정보에 의해 지시되는 MPM들 중 하나를 현재 블록의 인트라 예측 모드로 설정할 수 있다.
디폴트 모드 플래그가 이용되는 경우, 디폴트 모드와 동일한 인트라 예측 모드는 MPM으로 설정되지 않도록 설정될 수 있다. 일 예로, 디폴트 모드 플래그가 현재 블록의 인트라 예측 모드가 플래너인지 여부를 지시하는 경우, 플래너에 해당하는 MPM을 제외한 5개의 MPM들을 이용하여, 현재 블록의 인트라 예측 모드를 유도할 수 있다.
복수개의 인트라 예측 모드들이 디폴트 모드들로 설정된 경우, 디폴트 모드들 중 어느 하나를 지시하는 인덱스 정보가 더 시그날링될 수 있다. 현재 블록의 인트라 예측 모드는 상기 인덱스 정보가 가리키는 디폴트 모드로 설정될 수 있다.
현재 블록의 참조 샘플 라인의 인덱스가 0이 아닌 경우에는 디폴트 모드를 이용하지 못하도록 설정할 수 있다. 일 예로, 비인접 참조 샘플 라인이 현재 블록의 참조 샘플 라인으로 결정된 경우, DC 모드 또는 플래너 모드와 같은 비방향성 인트라 예측 모드를 사용하지 않도록 설정할 수 있다. 이에 따라, 참조 샘플 라인의 인덱스가 0이 아닌 경우에는 디폴트 모드 플래그를 시그날링하지 않고, 상기 디폴트 모드 플래그의 값을 기 정의된 값(즉, 거짓)으로 설정할 수 있다.
현재 블록의 인트라 예측 모드가 결정되면, 결정된 인트라 예측 모드를 기초로, 현재 블록에 대한 예측 샘플들을 획득할 수 있다(S2203).
DC 모드가 선택된 경우, 참조 샘플들의 평균값을 기초로, 현재 블록에 대한 예측 샘플들이 생성된다. 구체적으로, 예측 블록 내 전체 샘플들의 값은 참조 샘플들의 평균값을 기초로 생성될 수 있다. 평균값은, 현재 블록의 상단에 위치하는 상단 참조 샘플들 및 현재 블록의 좌측에 위치하는 좌측 참조 샘플들 중 적어도 하나를 이용하여 유도될 수 있다.
현재 블록의 형태에 따라, 평균값을 유도하는데 이용되는 참조 샘플들의 개수 또는 범위가 달라질 수 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방형 블록인 경우, 상단 참조 샘플들만을 이용하여 평균값을 계산할 수 있다. 반면, 현재 블록이 너비가 높이보다 작은 비정방형 블록인 경우, 좌측 참조 샘플들만을 이용하여 평균값을 계산할 수 있다. 즉, 현재 블록의 너비 및 높이가 상이한 경우, 길이가 더 긴 쪽에 인접하는 참조 샘플들만을 이용하여 평균값을 계산할 수 있다. 또는, 현재 블록의 너비와 높이 비율에 기초하여, 상단 참조 샘플들만을 이용하여 평균값을 계산할 것인지 여부 또는 좌측 참조 샘플들만을 이용하여 평균값을 계산할 것인지 여부를 결정할 수 있다.
플래너 모드가 선택된 경우, 수평 방향 예측 샘플과 수직 방향 예측 샘플을 이용하여, 예측 샘플을 획득할 수 있다. 여기서, 수평 방향 예측 샘플은, 예측 샘플과 동일한 수평선상에 위치하는 좌측 참조 샘플 및 우측 참조 샘플을 기초로 획득되고, 수직 방향 예측 샘플은, 예측 샘플과 동일한 수직선상에 위치하는 상단 참조 샘플 및 하단 참조 샘플을 기초로 획득된다. 여기서, 우측 참조 샘플은, 현재 블록의 우측 상단 코너에 인접하는 참조 샘플을 복사하여 생성되고, 하단 참조 샘플은, 현재 블록의 좌측 하단 코너에 인접하는 참조 샘플을 복사하여 생성될 수 있다. 수평 방향 예측 샘플은 좌측 참조 샘플 및 우측 참조 샘플의 가중합 연산을 기초로 획득되고, 수직 방향 예측 샘플은 상단 참조 샘플 및 하단 참조 샘플의 가중합 연산을 기초로 획득될 수 있다. 이때, 각 참조 샘플에 부여되는 가중치는 예측 샘플의 위치에 따라 결정될 수 있다. 예측 샘플은 수평 방향 예측 샘플 및 수직 방향 예측 샘플의 평균 연산 또는 가중합 연산을 기초로 획득될 수 있다. 가중합 연산이 수행되는 경우, 예측 샘플의 위치에 기초하여 수평 방향 예측 샘플 및 수직 방향 예측 샘플에 부여되는 가중치를 결정할 수 있다.
방향성 예측 모드가 선택되는 경우, 선택된 방향성 예측 모드의 예측 방향(또는 예측 각도)을 나타내는 파라미터를 결정할 수 있다. 하기 표 2는 인트라 예측 모드 별 인트라 방향 파라미터 intraPredAng를 나타낸 것이다.
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
표 2는 35개의 인트라 예측 모드가 정의되어 있을 때, 인덱스가 2 내지 34 중 어느 하나인 인트라 예측 모드들 각각의 인트라 방향 파라미터를 나타낸다. 33개보다 더 많은 방향성 인트라 예측 모드가 정의되어 있는 경우, 표 2를 보다 세분화하여, 방향성 인트라 예측 모드 각각의 인트라 방향 파라미터를 설정할 수 있다.
현재 블록의 상단 참조 샘플들 및 좌측 참조 샘플들을 일렬로 배열한 뒤, 인트라 방향 파라미터의 값을 기초로, 예측 샘플을 획득할 수 있다. 이때, 인트라 방향 파라미터의 값이 음수인 경우, 좌측 참조 샘플들과 상단 참조 샘플들을 일렬로 배열할 수 있다.
도 24 및 도 25는 참조 샘플들을 일렬로 배열하는 일차원 배열의 예시를 나타낸 도면이다.
도 24는 참조 샘플들을 수직 방향으로 배열하는 수직 방향 일차원 배열의 예시를 나타낸 것이고, 도 25는 참조 샘플들을 수평 방향으로 배열하는 수평 방향 일차원 배열의 예시를 나타낸 것이다. 35개의 인트라 예측 모드가 정의된 경우를 가정하여, 도 24 및 도 25의 실시예를 설명한다.
인트라 예측 모드 인덱스가 11 내지 18 중 어느 하나인 경우, 상단 참조 샘플들을 반시계 방향으로 회전한 수평 방향 일차원 배열을 적용하고, 인트라 예측 모드 인덱스가 19 내지 25 중 어느 하나인 경우, 좌측 참조 샘플들을 시계 방향으로 회전한 수직 방향 일차원 배열을 적용할 수 있다. 참조 샘플들을 일렬로 배열함에 있어서, 인트라 예측 모드 각도를 고려할 수 있다.
인트라 방향 파라미터에 기초하여, 참조 샘플 결정 파라미터를 결정할 수 있다. 참조 샘플 결정 파라미터는 참조 샘플을 특정하기 위한 참조 샘플 인덱스 및 참조 샘플에 적용되는 가중치를 결정하기 위한 가중치 파라미터를 포함할 수 있다.
참조 샘플 인덱스 iIdx 및 가중치 파라미터 ifact는 각각 다음의 수학식 4 및 5를 통해 획득될 수 있다.
Figure PCTKR2020018371-appb-M000004
Figure PCTKR2020018371-appb-M000005
수학식 4 및 5에서 Pang는 인트라 방향 파라미터를 나타낸다. 참조 샘플 인덱스 iIdx에 의해 특정되는 참조 샘플은 정수 펠(Integer pel)에 해당한다.
예측 샘플을 유도하기 위해, 적어도 하나 이상의 참조 샘플을 특정할 수 있다. 구체적으로, 예측 모드의 기울기를 고려하여, 예측 샘플을 유도하는데 이용되는 참조 샘플의 위치를 특정할 수 있다. 일 예로, 참조 샘플 인덱스 iIdx를 이용하여, 예측 샘플을 유도하는데 이용되는 참조 샘플을 특정할 수 있다.
이때, 인트라 예측 모드의 기울기가 하나의 참조 샘플로는 표현되지 않는 경우, 복수의 참조 샘플들을 보간하여 예측 샘플을 생성할 수 있다. 일 예로, 인트라 예측 모드의 기울기가 예측 샘플과 제1 참조 샘플 사이의 기울기 및 예측 샘플과 제2 참조 샘플 사이의 기울기 사이의 값인 경우, 제1 참조 샘플 및 제2 참조 샘플을 보간하여 예측 샘플을 획득할 수 있다. 즉, 인트라 예측 각도를 따르는 앵귤러 라인(Angular Line)이 정수 펠에 위치한 참조 샘플을 지나지 않는 경우, 상기 앵귤러 라인이 지나는 위치의 좌우 또는 상하에 인접 위치하는 참조 샘플들을 보간하여 예측 샘플을 획득할 수 있다.
하기 수학식 6은 참조 샘플들을 기초로, 예측 샘플을 획득하는 예를 나타낸 것이다.
Figure PCTKR2020018371-appb-M000006
수학식 6에서, P는 예측 샘플을 나타내고, Ref_1D은 일차원 배열된 참조 샘플들 중 어느 하나를 나타낸다. 이때, 참조 샘플의 위치는 예측 샘플의 위치 (x, y) 및 참조 샘플 인덱스 iIdx에 의해 결정될 수 있다.
인트라 예측 모드의 기울기가 하나의 참조 샘플로 표현 가능한 경우, 가중치 파라미터 ifact는 0으로 설정된다. 이에 따라, 수학식 6은 다음 수학식 7와 같이 간소화될 수 있다.
Figure PCTKR2020018371-appb-M000007
복수의 인트라 예측 모드에 기초하여 현재 블록에 대한 인트라 예측을 수행할 수도 있다. 일 예로, 예측 샘플별로 인트라 예측 모드를 유도하고, 각각의 예측 샘플에 할당된 인트라 예측 모드에 기초하여 예측 샘플을 유도할 수 있다.
또는, 영역 별로 인트라 예측 모드를 유도하고, 각각의 영역에 할당된 인트라 예측 모드에 기초하여 각 영역에 대한 인트라 예측을 수행할 수 있다. 여기서, 상기 영역은 적어도 하나의 샘플을 포함할 수 있다. 상기 영역의 크기 또는 형태 중 적어도 하나는 현재 블록의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여 적응적으로 결정될 수 있다. 또는, 부호화기 및 복호화기에서 현재 블록의 크기 또는 형태와는 독립적으로 영역의 크기 또는 형태 중 적어도 하나가 기 정의되어 있을 수 있다.
도 26은 방향성 인트라 예측 모드들이 x축과 평행한 직선과 형성하는 각도를 예시한 도면이다.
도 26에 나타난 예에서와 같이, 방향성 예측 모드들은 좌측 하단 대각 방향부터 우측 상단 대각 방향 사이에 존재할 수 있다. x축과 방향성 예측 모드가 형성하는 각도로 설명하면, 방향성 예측 모드들은, 45도 (좌측 하단 대각 방향) 부터, -135도 (우측 상단 대각 방향) 사이에 존재할 수 있다.
현재 블록이 비정방 형태인 경우, 현재 블록의 인트라 예측 모드에 따라, 인트라 예측 각도를 따르는 앵귤러 라인 상에 위치하는 참조 샘플들 중 예측 샘플에 보다 가까운 참조 샘플 대신 예측 샘플에 보다 먼 참조 샘플을 이용하여 예측 샘플을 유도하는 경우가 발생할 수 있다.
도 27은 현재 블록이 비정방 형태인 경우, 예측 샘플이 획득되는 양상을 나타낸 도면이다.
일 예로, 도 27의 (a)에 도시된 예에서와 같이, 현재 블록이 너비가 높이보다 큰 비정방형이고, 현재 블록의 인트라 예측 모드가 0도부터 45도 사이의 각도를 갖는 방향성 인트라 예측 모드인 것으로 가정한다. 위 경우, 현재 블록의 우측 열 부근의 예측 샘플 A를 유도할 때, 상기 각도를 따르는 앵귤러 모드 상에 위치하는 참조 샘플들 중 상기 예측 샘플과 가까운 상단 참조 샘플 T 대신 상기 예측 샘플과 먼 좌측 참조 샘플 L을 이용하는 경우가 발생할 수 있다.
다른 예로, 도 27의 (b)에 도시된 예에서와 같이, 현재 블록이 높이가 너비보다 큰 비정방형이고, 현재 블록의 인트라 예측 모드가 -90 도부터 -135도 사이인 방향성 인트라 예측 모드인 것으로 가정한다. 위 경우, 현재 블록의 하단 행 부근의 예측 샘플 A를 유도할 때, 상기 각도를 따르는 앵귤러 모드 상에 위치하는 참조 샘플들 중 상기 예측 샘플과 가까운 좌측 참조 샘플 L 대신 상기 예측 샘플과 먼 상단 참조 샘플 T를 이용하는 경우가 발생할 수 있다.
위와 같은 문제점을 해소하기 위해, 현재 블록이 비정방형인 경우, 현재 블록의 인트라 예측 모드를 반대 방향의 인트라 예측 모드로 치환할 수 있다. 이에 따라, 비정방형 블록에 대해서는 도 23에 도시된 방향성 예측 모드들 보다 더 큰 혹은 더 작은 각도를 갖는 방향성 예측 모드들을 사용할 수 있다. 이와 같은, 방향성 인트라 예측 모드를 와이드 앵글 인트라 예측 모드라 정의할 수 있다. 와이드 앵글 인트라 예측 모드는 45도 내지 -135도 범위에 속하지 않는 방향성 인트라 예측 모드를 나타낸다.
도 28은 와이드 앵글 인트라 예측 모드들을 나타낸 도면이다.
도 28에 도시된 예에서, 인덱스가 -1 부터 -14인 인트라 예측 모드들 및 인덱스가 67 부터 80 사이인 인트라 예측 모드들이 와이드 앵글 인트라 예측 모드들을 나타낸다.
도 28에서는 각도가 45도 보다 큰 14개의 와이드 앵글 인트라 예측 모드들(-1 부터 -14) 및 각도가 -135도 보다 작은 14개의 와이드 앵글 인트라 예측 모드들(67 부터 80)을 예시하였으나, 이보다 더 많은 수 또는 더 적은 수의 와이드 앵글 인트라 예측 모드들이 정의될 수 있다.
와이드 앵글 인트라 예측 모드가 사용되는 경우, 상단 참조 샘플들의 길이는 2W+1로 설정되고, 좌측 참조 샘플들의 길이는 2H+1로 설정될 수 있다.
와이드 앵글 인트라 예측 모드를 사용함에 따라, 도 28의 (a)에 도시된 샘플 A는 참조 샘플 T를 이용하여 예측되고, 도 28의 (b)에 도시된 샘플 A는 참조 샘플 L을 이용하여 예측될 수 있다.
기존 인트라 예측 모드들과 N개의 와이드 앵글 인트라 예측 모드들을 더해, 총 67 + N개의 인트라 예측 모드들을 사용할 수 있다. 일 예로, 표 3은 20개의 와이드 앵글 인트라 예측 모드가 정의된 경우, 인트라 예측 모드들의 인트라 방향 파라미터를 나타낸 것이다.
PredModeIntra -10 -9 -8 -7 -6 -5 -4 -3 -2
intraPredAngle 114 93 79 68 60 54 49 45 39
PredModeIntra -1 2 3 4 5 6 7 8 9
intraPredAngle 35 32 29 26 23 21 19 17 15
PredModeIntra 10 11 12 13 14 15 16 17 18
intraPredAngle 13 11 9 7 5 3 2 1 0
PredModeIntra 19 20 21 22 23 24 25 26 27
intraPredAngle -1 -2 -3 -5 -7 -9 -11 -13 -15
PredModeIntra 28 29 30 31 32 33 34 35 36
intraPredAngle -17 -19 -21 -23 -26 -29 -32 -29 -26
PredModeIntra 37 38 39 40 41 42 43 44 45
intraPredAngle -23 -21 -19 -17 -15 -13 -11 -9 -7
PredModeIntra 46 47 48 49 50 51 52 53 54
intraPredAngle -5 -3 -2 -1 0 1 2 3 5
PredModeIntra 55 56 57 58 59 60 61 62 63
intraPredAngle 7 9 11 13 15 17 19 21 23
PredModeIntra 64 65 66 67 68 69 70 71 72
intraPredAngle 26 29 32 35 39 45 49 54 60
PredModeIntra 73 74 75 76
intraPredAngle 68 79 93 114
현재 블록이 비정방형이고, S2502 단계에서 획득된 현재 블록의 인트라 예측 모드가 변환 범위에 속하는 경우, 현재 블록의 인트라 예측 모드를 와이드 앵글 인트라 예측 모드로 변환할 수 있다. 상기 변환 범위는 현재 블록의 크기, 형태 또는 비율 중 적어도 하나를 기초로 결정될 수 있다. 여기서, 상기 비율은 현재 블록의 너비 및 높이 사이의 비율을 나타낼 수 있다.
현재 블록이 너비가 높이보다 큰 비정방형인 경우, 변환 범위는 우측 상단 대각 방향의 인트라 예측 모드 인덱스(예컨대, 66)부터 (우측 상단 대각 방향인 인트라 예측 모드의 인덱스 - N)로 설정될 수 있다. 여기서, N은 현재 블록의 비율을 기초로 결정될 수 있다. 현재 블록의 인트라 예측 모드가 변환 범위에 속하는 경우, 상기 인트라 예측 모드를 와이드 앵글 인트라 예측 모드로 변환할 수 있다. 상기 변환은 상기 인트라 예측 모드에 기 정의된 값을 차감하는 것일 수 있고, 기 정의된 값은 와이드 앵글 인트라 예측 모드들을 제외한 인트라 예측 모드들의 총 개수 (예컨대, 67)일 수 있다.
상기 실시예에 의해, 66번부터 53번 사이의 인트라 예측 모드들은, 각각 -1번부터 -14번 사이의 와이드 앵글 인트라 예측 모드들로 변환될 수 있다.
현재 블록이 높이가 너비보다 큰 비정방형인 경우, 변환 범위는 좌측 하단 대각 방향의 인트라 예측 모드 인덱스(예컨대, 2) 부터 (좌측 하단 대각 방향의 인트라 예측 모드의 인덱스 + M)으로 설정될 수 있다. 여기서, M은 현재 블록의 비율을 기초로 결정될 수 있다. 현재 블록의 인트라 예측 모드가 변환 범위에 속하는 경우, 상기 인트라 예측 모드를 와이드 앵글 인트라 예측 모드로 변환할 수 있다. 상기 변환은 상기 인트라 예측 모드에 기 정의된 값을 가산하는 것일 수 있고, 기 정의된 값은 와이드 앵글 인트라 예측 모드들을 제외한 방향성 인트라 예측 모드들의 총 개수(예컨대, 65)일 수 있다.
상기 실시예에 의해, 2번부터 15번 사이의 인트라 예측 모드들 각각은 67번부터 80번 사이의 와이드 앵글 인트라 예측 모드들로 변환될 수 있다.
이하, 변환 범위에 속하는 인트라 예측 모드들을 와이드 앵글 인트라 대체 예측 모드로 호칭하기로 한다.
변환 범위는 현재 블록의 비율에 기초하여 결정될 수 있다. 일 예로, 표 4 및 표 5는 각각 와이드 앵글 인트라 예측 모드 제외 35개의 인트라 예측 모드가 정의된 경우와 67개의 인트라 예측 모드가 정의된 경우, 변환 범위를 나타낸다.
Condition Replaced Intra Prediction Modes
W/H = 2 Modes 2, 3, 4
W/H > 2 Modes 2, 3, 4, 5, 6
W/H = 1 None
H/W = 1/2 Modes 32, 33, 34
H/W < 1/2 Modes 30, 31, 32, 33, 34
Condition Replaced Intra Prediction Modes
W/H = 2 Modes 2, 3, 4, 5, 6, 7
W/H > 2 Modes 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
W/H = 1 None
H/W = 1/2 Modes 61, 62, 63, 64, 65, 66
H/W < 1/2 Modes 57, 58, 59, 60, 61, 62, 63, 64, 65, 66
표 4 및 표 5에 나타난 예에서와 같이, 현재 블록의 비율에 따라, 변환 범위에 포함되는 와이드 앵글 인트라 대체 예측 모드들의 개수가 상이할 수 있다.
현재 블록의 비율을 보다 세분화하여, 다음 표 6과 같이 변환 범위를 설정할 수도 있다.
Condition 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
H/W = 2 Modes 2, 3, 4, 5, 6, 7
H/W = 1 None
W/H = 1/2 Modes 61, 62, 63, 64, 65, 66
W/H = 1/4 Modes 57, 58, 59, 60, 61, 62, 63, 64, 65, 66
W/H = 1/8 Modes 55, 56
H/W = 1/16 Modes 53, 54, 55, 56
비인접 참조 샘플 라인이 현재 블록의 참조 샘플 라인으로 결정된 경우, 또는, 복수의 참조 샘플 라인들 중 어느 하나를 선택하는 멀티 라인 인트라 예측 부호화 방법이 사용된 경우에 있어서, 와이드 앵글 인트라 예측 모드가 사용되지 않도록 설정될 수 있다. 즉, 현재 블록이 비정방형이고, 현재 블록의 인트라 예측 모드가 변환 범위에 속하는 경우라 하더라도, 현재 블록의 인트라 예측 모드를 와이드 앵글 인트라 예측 모드로 변환하지 않을 수 있다.
또는, 현재 블록의 인트라 예측 모드가 와이드 앵글 인트라 예측 모드로 결정된 경우, 비인접 참조 샘플 라인들을 현재 블록의 참조 샘플 라인으로 이용 가능하지 않은 것으로 설정하거나, 복수의 참조 샘플 라인들 중 어느 하나를 선택하는 멀티 라인 인트라 예측 부호화 방법이 사용되지 않도록 설정할 수 있다. 멀티 라인 인트라 예측 부호화 방법이 사용되지 않는 경우, 인접 참조 샘플 라인이 현재 블록의 참조 샘플 라인으로 결정될 수 있다.
와이드 앵글 인트라 예측 모드가 사용되지 않는 경우, refW 및 refH를 nTbW 와 nTbH의 합으로 설정할 수 있다. 이에 따라, 좌측 상단 참조 샘플 제외, 현재 블록과의 거리가 i인 비인접 레퍼런스 샘플은 (nTbW + nTbH + offsetX[i])개의 상단 참조 샘플과 (nTbW + nTbH + offsetY[i])개의 좌측 참조 샘플을 포함할 수 있다. 즉, 현재 블록과의 거리가 i인 비인접 레퍼런스 샘플은 (2nTbW + 2nTbH + offsetX[i] + offsetY[i] + 1)개의 참조 샘플들을 포함할 수 있다. 예를 들어, whRatio의 값이 1보다 큰 경우에는 offsetX의 값을 offsetY의 값보다 크게 설정할 수 있다. 일 예로, offsetX의 값은 1로 설정되고, offsetY의 값은 0으로 설정될 수 있다. 반면, whRatio의 값이 1보다 작은 경우에는 offsetX의 값보다 offsetY의 값을 더 크게 설정할 수 있다. 일 예로, offsetX의 값은 0으로 설정되고, offsetY의 값은 1로 설정될 수 있다.
기존의 인트라 예측 모드들에 추가로 와이드 앵글 인트라 예측 모드들이 사용됨에 따라, 와이드 앵글 인트라 예측 모드들을 부호화하는데 필요한 리소스가 증가하여, 부호화 효율이 낮아질 수 있다. 이에 따라, 와이드 앵글 인트라 예측 모드들을 그대로 부호화하는 대신, 와이드 앵글 인트라 예측 모드들에 대한 대체 인트라 예측 모드들을 부호화하여, 부호화 효율을 향상시킬 수 있다.
일 예로, 현재 블록이 67번의 와이드 앵글 인트라 예측 모드를 이용하여 부호화된 경우, 67번의 와이드 앵글 대체 인트라 예측 모드인 2번을 현재 블록의 인트라 예측 모드로 부호화할 수 있다. 또한, 현재 블록이 -1번의 와이드 앵글 인트라 예측 모드로 부호화된 경우, -1번의 와이드 앵글 대체 인트라 예측 모드인 66번을 현재 블록의 인트라 예측 모드로 부호화할 수 있다.
복호화기에서는 현재 블록의 인트라 예측 모드를 복호화하고, 복호화된 인트라 예측 모드가 변환 범위에 포함되는지 여부를 판단할 수 있다. 복호화된 인트라 예측 모드가 와이드 앵글 대체 인트라 예측 모드인 경우, 인트라 예측 모드를 와이드 앵글 인트라 예측 모드로 변환할 수 있다.
또는, 현재 블록이 와이드 앵글 인트라 예측 모드로 부호화된 경우, 와이드 앵글 인트라 예측 모드를 그대로 부호화할 수도 있다.
인트라 예측 모드의 부호화는 상술한 MPM 리스트를 기초로 이루어질 수 있다. 구체적으로, 이웃 블록이 와이드 앵글 인트라 예측 모드로 부호화된 경우, 상기 와이드 앵글 인트라 예측 모드에 대응하는 와이드 앵글 대체 인트라 예측 모드를 기초로, MPM을 설정할 수 있다.
원본 영상에서 예측 영상을 차분하여 유도된 잔차 영상을 유도할 수 있다. 이때, 잔차 영상을 주파수 도메인으로 변경하였을 때, 주파수 성분들 중 고주파 성분들을 제거하더라도, 영상의 주관적 화질은 크게 떨어지지 않는다. 이에 따라, 고주파 성분들의 값을 작게 변환하거나, 고주파 성분들의 값을 0으로 설정한다면, 시각적 왜곡이 크게 발생하지 않으면서도 압축 효율을 증가시킬 수 있는 효과가 있다. 위 특성을 반영하여, 잔차 영상을 2차원 주파수 성분들로 분해하기 위해 현재 블록을 변환할 수 있다. 상기 변환은 DCT(Discrete Cosine Transform) 또는 DST(Discrete Sine Tranform) 등의 변환 기법을 이용하여 수행될 수 있다.
DCT는 코사인 변환을 이용하여, 잔차 영상을 2차원 주파수 성분으로 분해(또는 변환)하는 것이고, DST는 사인 변환을 이용하여, 잔차 영상을 2차원 주파수 성분으로 분해(또는 변환)하는 것이다. 잔차 영상의 변환 결과, 주파수 성분들은 기저 영상으로 표현될 수 있다. 일 예로, NxN 크기의 블록에 대해 DCT 변환을 수행하는 경우, N2 개의 기본 패턴 성분이 획득될 수 있다. 변환을 통해 NxN 크기 블록에 포함된 기본 패턴 성분들 각각의 크기가 획득될 수 있다. 이용된 변환 기법에 따라, 기본 패턴 성분의 크기를 DCT 계수 또는 DST 계수라 호칭할 수 있다.
변환 기법 DCT는 0이 아닌 저주파 성분들이 많이 분포하는 영상을 변환하는데 주로 이용된다. 변환 기법 DST는 고주파 성분들이 많이 분포하는 영상에 주로 이용된다.
DCT 또는 DST 이외의 변환 기법을 사용하여 잔차 영상을 변환할 수도 있다.
이하, 잔차 영상을 2차원 주파수 성분들로 변환하는 것을 2차원 영상 변환이라 호칭하기로 한다. 아울러, 변환 결과 획득된 기본 패턴 성분들의 크기를 변환 계수라 호칭하기로 한다. 일 예로, 변환 계수는 DCT 계수 또는 DST 계수를 의미할 수 있다. 후술될 제1 변환 및 제2 변환이 모두 적용된 경우, 변환 계수는 제2 변환의 결과로 생성된 기본 패턴 성분의 크기를 의미할 수 있다. 또한, 변환 스킵이 적용된 잔차 샘플 역시 변환 계수라 호칭하기로 한다.
변환 기법은 블록 단위로 결정될 수 있다. 변환 기법은 현재 블록의 예측 부호화 모드, 현재 블록의 크기 또는 현재 블록의 형태 중 적어도 하나를 기초로 결정될 수 있다. 일 예로, 현재 블록이 인트라 예측 모드로 부호화되고, 현재 블록의 크기가 NxN보다 작은 경우에는 변환 기법 DST를 사용하여 변환이 수행될 수 있다. 반면, 상기 조건을 만족하지 않는 경우, 변환 기법 DCT를 사용하여 변환이 수행될 수 있다.
잔차 영상 중 일부 블록에 대해서는 2차원 영상 변환이 수행되지 않을 수도 있다. 2차원 영상 변환을 수행하지 않는 것을 변환 스킵(Transform Skip)이라 호칭할 수 있다. 변환 스킵은, 현재 블록에 제1 변환 및 제2 변환이 적용되지 않음을 나타낸다. 변환 스킵이 적용된 경우, 변환이 수행되지 않는 잔차값들을 대상으로 양자화가 적용될 수 있다.
현재 블록에 변환 스킵을 허용할 것인지 여부는, 현재 블록의 크기 또는 형태 중 적어도 하나에 기초하여 결정될 수 있다. 일 예로, 현재 블록의 크기가 문턱값보다 작은 경우에 한하여, 변환 스킵이 적용될 수 있다. 문턱값은 현재 블록의 너비, 높이 또는 샘플 개수 중 적어도 하나와 관한 것으로 32x32 등으로 정의될 수 있다. 또는, 정방형 블록에 대해서만 변환 스킵을 허용할 수 있다. 일 예로, 32x32, 16x16, 8x8 또는 4x4 크기의 정방형 블록에 대해 변환 스킵이 허용될 수 있다. 또는, 서브 파티션 인트라 부호화 방법이 사용되지 않은 경우에만, 변환 스킵을 허용할 수 있다.
또는, 현재 블록에 서브 파티션 인트라 부호화 방법이 적용된 경우, 서브 파티션 별로 변환 스킵이 적용되는지 여부를 결정할 수 있다.
도 29는 서브 블록 별로 변환 스킵 여부가 결정되는 예를 나타낸 도면이다.
복수의 서브 블록들 중 일부에 대해서만 변환 스킵을 적용할 수 있다. 일 예로, 도 29에 도시된 예에서와 같이, 현재 블록의 상단에 위치하는 서브 블록에는 변환 스킵을 적용하고, 하단에 위치하는 서브 블록에는 변환 스킵이 허용되지 않도록 설정될 수 있다.
변환 스킵이 허용되지 않는 서브 블록의 변환 타입은 비트스트림으로부터 시그날링되는 정보에 기초하여 결정될 수 있다. 일 예로, 후술될 tu_mts_idx에 기초하여, 변환 타입이 결정될 수 있다.
또는, 서브 블록의 크기에 기초하여, 서브 블록의 변환 타입을 결정할 수 있다. 일 예로, 서브 블록의 너비가 문턱값 이상인지 및/또는 문턱값 이하인지 여부를 기초로, 수평 방향 변환 타입을 결정하고, 서브 블록의 높이가 문턱값 이상인지 및/또는 문턱값 이하인지 여부를 기초로, 수직 방향 변환 타입을 결정할 수 있다.
DCT 또는 DST를 이용하여 현재 블록을 변환한 뒤, 변환된 현재 블록을 다시 변환할 수 있다. 이때, DCT 또는 DST에 기초한 변환을 제1 변환이라 정의하고, 제1 변환이 적용된 블록을 다시 변환하는 것을 제2 변환이라 정의할 수 있다.
제1 변환은 복수개의 변환 코어 후보들 중 어느 하나를 이용하여 수행될 수 있다. 일 예로, DCT2, DCT8 또는 DST7 중 어느 하나를 이용하여 제1 변환이 수행될 수 있다.
수평 방향 및 수직 방향에 대해 상이한 변환 코어가 사용될 수도 있다. 수평 방향의 변환 코어 및 수직 방향의 변환 코어의 조합을 나타내는 정보가 비트스트림을 통해 시그날링될 수도 있다.
제1 변환 및 제2 변환의 수행 단위가 상이할 수 있다. 일 예로, 8x8 블록에 대해 제1 변환을 수행하고, 변환된 8x8 블록 중 4x4 크기의 서브 블록에 대해 제2 변환을 수행할 수 있다. 또는, 4x4 크기의 서브 블록들 3개에 속한 변환 계수들에 대해 제2 변환을 수행할 수 있다. 상기 3개의 서브 블록들은, 현재 블록의 좌상단에 위치하는 서브 블록, 상기 서브 블록의 우측에 이웃하는 서브 블록 및 상기 서브 블록의 하단에 이웃하는 서브 블록을 포함할 수 있다. 또는, 8x8 크기의 블록에 대해 제2 변환을 수행할 수도 있다.
제2 변환이 수행되지 않는 잔여 영역들의 변환 계수는 0으로 설정될 수도 있다.
또는, 4x4 블록에 대해 제1 변환을 수행하고, 변환된 4x4 블록을 포함하는 8x8 크기의 영역에 대해 제2 변환을 수행할 수도 있다.
제2 변환의 수행 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 제2 변환의 수행 여부를 나타내는 플래그 또는, 제2 변환의 수행 여부 및 제2 변환에 이용되는 변환 커널을 특정하는 인덱스 정보가 시그날링될 수 있다. 일 예로, 상기 인덱스 정보가 0인 것은 현재 블록에 제2 변환이 수행되지 않음을 나타낸다. 반면, 상기 인덱스 정보가 0보다 큰 경우, 상기 인덱스 정보에 의해, 제2 변환을 수행하기 위한 변환 커널이 결정될 수 있다.
또는, 수평 방향 변환 코어와 수직 방향 변환 코어가 동일한지 여부에 기초하여, 제2 변환의 수행여부가 결정될 수 있다. 일 예로, 수평 방향 변환 코어와 수직 방향 변환 코어가 동일한 경우에만, 제2 변환이 수행될 수 있다. 또는, 수평 방향 변환 코어와 수직 방향 변환 코어가 상이한 경우에만, 제2 변환이 수행될 수 있다.
또는, 수평 방향의 변환 및 수직 방향의 변환이 기 정의된 변환 코어를 이용된 경우에 한하여, 제2 변환이 허용될 수 있다. 일 예로, 수평 방향의 변환 및 수직 방향의 변환에 DCT2 변환 코어가 사용된 경우에, 제2 변환이 허용될 수 있다. 또는, 현재 블록에 서브 파티션 인트라 부호화 방법이 적용된 경우에는, 수평 방향의 변환 및 수직 방향의 변환에 DCT2 변환 코어가 사용된 경우에 한하여 제2 변환이 허용될 수 있다.
또는, 현재 블록의 논 제로 변환 계수의 개수를 기초로 제2 변환의 수행 여부를 결정할 수 있다. 일 예로, 현재 블록의 논 제로 변환 계수가 문턱값보다 작거나 같은 경우, 제2 변환을 사용하지 않도록 설정하고, 현재 블록의 논 제로 변환 계수가 문턱값보다 큰 경우, 제2 변환을 사용하도록 설정될 수 있다. 현재 블록이 인트라 예측으로 부호화된 경우에 한하여, 제2 변환을 사용하도록 설정될 수도 있다.
또는, 현재 블록의 마지막 논 제로 변환 계수의 위치를 기초로 제2 변환의 수행 여부를 결정할 수 있다. 일 예로, 현재 블록의 마지막 논 제로 변환 계수의 x축 좌표 또는 y축 좌표 중 적어도 하나가 문턱값보다 큰 경우, 또는 현재 블록의 마지막 논 제로 변환 계수가 속한 서브 블록의 x축 좌표 또는 y축 좌표 중 적어도 하나가 문턱값보다 큰 경우, 제2 변환을 수행하지 않을 수 있다. 여기서, 문턱값은 부호화기 및 복호화기에서 기 정의되어 있을 수 있다. 또는, 현재 블록의 크기 또는 형태를 기초로 문턱값이 결정될 수 있다.
또는, 현재 블록에 DC 성분의 변환 계수만이 존재하는 경우, 제2 변환을 수행하지 않도록 설정할 수 있다. 여기서, DC 성분은 현재 블록 내 좌상단 위치의 변환 계수를 나타낸다.
또는, 현재 블록에 매트릭스 기반 인트라 예측이 적용된 경우, 제2 변환이 수행되지 않도록 설정될 수 있다.
현재 블록의 변환 타입을 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 수평 방향에 대한 변환 타입 및 수직 방향에 대한 변환 타입의 조합들 중 하나를 나타내는 인덱스 정보 tu_mts_idx일 수 있다.
인덱스 정보 tu_mts_idx에 의해 특정되는 변환 타입 후보들에 기초하여, 수직 방향에 대한 변환 코어 및 수평 방향에 대한 변환 코어가 결정될 수 있다. 표 7은 tu_mts_idx에 따른 변환 타입 조합들을 나타낸 것이다.
tu_mts_idx transform type
horizontal vertical
0 DCT-II DCT-II
1 DST-VII DST-VII
2 DCT-VIII DST-VII
3 DST-VII DCT-VIII
4 DCT-VIII DCT-VIII
변환 타입은 DCT2, DST7 또는 DCT8 중 어느 하나로 결정될 수 있다. 또는, 변환 스킵을 변환 타입 후보에 삽입할 수도 있다.
표 7이 이용되는 경우, tu_mts_idx가 0이면, 수평 방향과 수직 방향에 DCT2가 적용될 수 있다. tu_mts_idx가 2이면 수평 방향에 DCT8을 적용하고, 수직 방향에 DCT7을 적용할 수 있다.
서브 파티션 인트라 부호화 방법이 적용된 경우, 서브 블록의 변환 코어가 독립적으로 결정될 수 있다. 일 예로, 서브 블록 마다 변환 타입 조합 후보를 특정하기 위한 정보가 부호화되어 시그날링될 수 있다. 이에 따라, 서브 블록들 간 변환 코어가 상이할 수 있다.
또는, 서브 블록들이 동일한 변환 타입을 사용할 수도 있다. 이 경우, 변환 타입 조합 후보를 특정하는 tu_mts_idx는 첫번째 서브 블록에 대해서만 시그날링될 수 있다. 또는, 코딩 블록 레벨에서 tu_mts_idx를 시그날링하고, 서브 블록들의 변환 타입은 코딩 블록 레벨에서 시그날링되는 tu_mts_idx를 참조하여 결정될 수 있다. 또는, 서브 블록들 중 하나의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여, 변환 타입을 결정하고, 결정된 변환 타입이 모든 서브 블록을 위해 사용되도록 설정할 수도 있다.
도 30은 서브 블록들이 동일한 변환 타입을 사용하는 예를 나타낸 도면이다.
코딩 블록이 수평 방향으로 분할된 경우, 코딩 블록의 상단에 위치하는 서브 블록 (Sub-CU0) 및 하단에 위치하는 서브 블록(Sub-CU1)의 변환 타입을 동일하게 설정할 수 있다. 일 예로, 도 30의 (a)에 도시된 예에서와 같이, 상단 서브 블록에 대해 시그날링되는 tu_mts_idx를 기초로, 수평 방향 타입 및 수직 변환 타입이 결정되면, 결정된 변환 타입을 하단 서브 블록에도 적용할 수 있다.
코딩 블록이 수직 방향으로 분할된 경우, 코딩 블록의 좌측에 위치하는 서브 블록 (Sub-CU0) 및 우측에 위치하는 서브 블록(Sub-CU1)의 변환 타입을 동일하게 설정할 수 있다. 일 예로, 도 30의 (b)에 도시된 예에서와 같이, 좌측 서브 블록에 대해 시그날링되는 tu_mts_idx를 기초로, 수평 방향 타입 및 수직 변환 타입이 결정되면, 결정된 변환 타입을 우측 서브 블록에도 적용할 수 있다.
현재 블록의 크기, 형태, 논 제로 계수의 개수, 2차 변환의 수행 여부 또는 서브 파티션 인트라 부호화 방법의 적용 여부 중 적어도 하나에 기초하여 인덱스 정보의 부호화 여부를 결정할 수 있다. 일 예로, 현재 블록에 서브 파티션 인트라 부호화 방법이 적용된 경우, 또는 논 제로 계수의 수가 문턱값과 같거나 작은 경우, 인덱스 정보의 시그날링이 생략될 수 있다. 인덱스 정보의 시그날링이 생략된 경우, 현재 블록에는 디폴트 변환 타입이 적용될 수 있다.
디폴트 변환 타입은 DCT2 또는 DST7 중 적어도 하나를 포함할 수 있다. 디폴트 변환 타입이 복수인 경우, 현재 블록의 크기, 형태, 인트라 예측 모드, 2차 변환의 수행 여부 또는 서브 파티션 인트라 부호화 방법의 적용 여부 중 적어도 하나를 고려하여, 복수의 디폴트 변환 타입들 중 하나를 선택할 수 있다. 일 예로, 현재 블록의 너비가 기 설정된 범위에 속하는지 여부에 기초하여, 복수의 변환 타입들 중 하나를 수평 방향 변환 타입으로 결정하고, 현재 블록의 높이가 기 설정된 범위에 속하는지 여부에 기초하여, 복수의 변환 타입들 중 하나를 수직 방향 변환 타입으로 결정할 수 있다. 또는, 현재 블록의 크기, 형태, 인트라 예측 모드 또는 2차 변환이 수행되었는지 여부에 따라 디폴트 모드가 상이하게 결정될 수 있다.
또는, 현재 블록에 DC 성분의 변환 계수만이 존재할 경우, 수평 방향 변환 타입 및 수직 방향 변환 타입을 디폴트 변환 타입으로 설정할 수 있다. 일 예로, 현재 블록에 DC 성분의 변환 계수만이 존재할 경우, 수평 방향 변환 타입 및 수직 방향 변환 타입은 DCT2로 설정될 수 있다.
문턱값은 현재 블록의 크기 또는 형태에 기초하여 결정될 수 있다. 일 예로, 현재 블록의 크기가 32x32 보다 작거나 같은 경우에는 문턱값을 2로 설정하고, 현재 블록이 32x32 보다 큰 경우에는(예컨대, 현재 블록이, 32x64 또는 64x32 크기의 코딩 블록인 경우), 문턱값을 4로 설정할 수 있다.
복수개의 룩업 테이블이 부호화기/복호화기에 기 저장될 수 있다. 복수개의 룩업 테이블은 변환 타입 조합 후보들에 할당되는 인덱스 값, 변환 타입 조합 후보들의 종류 또는 변환 타입 조합 후보들의 개수 중 적어도 하나가 상이할 수 있다.
현재 블록의 크기, 형태, 예측 부호화 모드, 인트라 예측 모드, 2차 변환의 적용 여부 또는 이웃 블록에 변환 스킵이 적용되었는지 여부 중 적어도 하나에 기초하여, 현재 블록에 대한 룩업 테이블을 선택할 수 있다.
일 예로, 현재 블록의 크기가 4x4 이하인 경우 또는 현재 블록이 인터 예측으로 부호화된 경우에는, 제1 룩업 테이블을 이용하고, 현재 블록의 크기가 4x4 보다 큰 경우 또는 현재 블록이 인트라 예측으로 부호화된 경우에는 제2 룩업 테이블을 이용할 수 있다.
또는, 복수의 룩업 테이블 중 어느 하나를 가리키는 정보가 비트스트림을 통해 시그날링될 수 있다. 복호화기는 상기 정보에 기초하여 현재 블록에 대한 룩업 테이블을 선택할 수 있다.
다른 예로, 현재 블록의 크기, 형태, 예측 부호화 모드, 인트라 예측 모드, 2차 변환의 적용 여부 또는 이웃 블록에 변환 스킵이 적용되었는지 여부 중 적어도 하나에 기초하여, 변환 타입 조합 후보에 할당되는 인덱스가 적응적으로 결정될 수 있다. 일 예로, 현재 블록의 크기가 4x4 인 경우 변환 스킵에 할당되는 인덱스가 현재 블록의 크기가 4x4 보다 큰 경우 변환 스킵에 할당되는 인덱스보다 더 작은 값을 가질 수 있다. 구체적으로, 현재 블록의 크기가 4x4인 경우, 변환 스킵에 인덱스 0을 할당하고, 현재 블록이 4x4 보다 크고 16x16 이하인 경우, 변환 스킵에 0보다 큰 인덱스(예컨대, 인덱스 1)를 할당할 수 있다. 현재 블록이 16x16 보다 큰 경우, 변환 스킵의 인덱스에 최대값(예컨대, 5)를 할당할 수 있다.
또는, 현재 블록이 인터 예측으로 부호화된 경우, 변환 스킵에 인덱스 0을 할당할 수 있다. 현재 블록이 인트라 예측으로 부호화된 경우, 변환 스킵에 0보다 큰 인덱스(예컨대, 인덱스 1)를 할당할 수 있다.
또는, 현재 블록이 인터 예측으로 부호화된 4x4 크기의 블록인 경우, 변환 스킵에 인덱스 0을 할당할 수 있다. 반면, 현재 블록이 인터 예측으로 부호화되지 않았거나, 현재 블록이 4x4 보다 큰 경우, 변환 스킵에 0보다 큰 값의 인덱스(예컨대, 인덱스 1)를 할당할 수 있다.
표 7에 열거된 변환 타입 조합 후보들과 상이한 변환 타입 조합 후보들이 정의되어 사용될 수도 있다. 일 예로, 수평 방향 변환 또는 수직 방향 변환 중 어느 하나에 변환 스킵을 적용하고, 다른 하나에는 DCT2, DCT8 또는 DST7 등의 변환 코어가 적용되는 변환 타입 조합 후보가 이용될 수 있다. 이때, 현재 블록의 크기(예컨대, 너비 및/또는 높이), 형태, 예측 부호화 모드 또는 인트라 예측 모드 중 적어도 하나에 기초하여 수평 방향 또는 수직 방향에 대한 변환 타입 후보로 변환 스킵을 사용할 것인지 여부가 결정될 수 있다.
현재 블록의 변환 타입을 결정하기 위한 인덱스 정보가 명시적으로 시그날링되는지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 시퀀스 레벨에서, 인트라 예측으로 부호화된 블록에 대해 명시적인 변환 타입 결정이 허용되는지 여부를 나타내는 정보 sps_explicit_intra_mts_flag 및/또는 인터 예측으로 부호화된 블록에 대해 명시적인 변환 타입 결정이 허용되는지 여부를 나타내는 정보 sps_explicit_inter_mts_flag가 시그날링될 수 있다.
명시적인 변환 타입 결정이 허용되는 경우, 비트스트림으로부터 시그날링되는 인덱스 정보 tu_mts_idx에 기초하여 현재 블록의 변환 타입을 결정할 수 있다. 반면, 명시적인 변환 타입 결정이 허용되지 않는 경우, 현재 블록의 크기, 형태, 서브 블록 단위의 변환이 허용되는지 여부, 0이 아닌 변환 계수를 포함하는 서브 블록의 위치, 제2 변환이 수행되는지 여부 또는 서브 파티션 인트라 부호화 방법의 적용 여부 중 적어도 하나를 기초로 변환 타입이 결정될 수 있다. 일 예로, 현재 블록의 수평 방향 변환 타입은 현재 블록의 너비를 기초로 결정되고, 현재 블록의 수직 방향 변환 타입은 현재 블록의 높이를 기초로 결정될 수 있다. 예컨대, 현재 블록의 너비가 4 보다 작거나 16보다 큰 경우, 수평 방향의 변환 타입은 DCT2로 결정될 수 있다. 그렇지 않은 경우, 수평 방향의 변환 타입은 DST7로 결정될 수 있다. 현재 블록의 높이가 4보다 작거나 16보다 큰 경우, 수직 방향의 변환 타입은 DCT2로 결정될 수 있다. 그렇지 않은 경우, 수직 방향의 변환 타입은 DST7로 결정될 수 있다. 여기서, 수평 방향의 변환 타입 및 수직 방향의 변환 타입을 결정하기 위해, 너비 및 높이와 비교되는 문턱값은 현재 블록의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여 결정될 수 있다.
또는, 현재 블록이 높이와 너비가 동일한 정방형인 경우, 수평 방향 변환 타입 및 수직 방향 변환 타입을 동일하게 설정하는 한편, 현재 블록이 높이와 너비가 상이한 비정방형인 경우, 수평 방향 변환 타입 및 수직 방향 변환 타입을 상이하게 설정할 수 있다. 일 예로, 현재 블록의 너비가 높이보다 큰 경우에는, 수평 방향의 변환 타입을 DST7로 결정하고, 수직 방향의 변환 타입을 DCT2로 결정할 수 있다. 현재 블록의 높이가 너비보다 큰 경우에는, 수직 방향의 변환 타입을 DST7으로 결정하고, 수평 방향의 변환 타입을 DCT2로 결정할 수 있다.
변환 타입 후보들의 개수 및/또는 종류 또는 변환 타입 조합 후보들의 개수 및/또는 종류는 명시적인 변환 타입 결정이 허용되는지 여부에 따라 상이할 수 있다. 일 예로, 명시적인 변환 타입 결정이 허용되는 경우, DCT2, DST7 및 DCT8가 변환 타입 후보들로서 이용될 수 있다. 이에 따라, 수평 방향 변환 타입 및 수직 방향 변환 타입 각각은 DCT2, DST8 또는 DCT8로 설정될 수 있다. 명시적인 변환 타입 결정이 허용되지 않는 경우, DCT2 및 DST7만 변환 타입 후보로서 이용될 수 있다. 이에 따라, 수평 방향 변환 타입 및 수직 방향 변환 타입 각각은 DCT2 또는 DST7으로 결정될 수 있다.
복호화기에서는 제2 변환의 역변환(제2 역변환)을 수행하고, 그 수행 결과에 제1 변환의 역변환(제1 역변환)을 수행할 수 있다. 상기 제2 역변환 및 제1 역변환의 수행 결과, 현재 블록에 대한 잔차 신호들이 획득될 수 있다.
부호화기에서 변환 및 양자화를 수행하면, 복호화기는 역양자화 및 역변환을 통해 잔차 블록을 획득할 수 있다. 복호화기에서는 예측 블록과 잔차 블록을 더하여, 현재 블록에 대한 복원 블록을 획득할 수 있다.
현재 블록의 복원 블록이 획득되면, 인루프 필터링(In-loop filtering)을 통해 양자화 및 부호화 과정에서 발생하는 정보의 손실을 줄일 수 있다. 인루프 필터는 디블록킹 필터(Deblocking filter), 샘플 적응적 오프셋 필터(Sample Adaptive Offset filter, SAO) 또는 적응적 루프 필터(Adaptive Loop Filter, ALF) 중 적어도 하나를 포함할 수 있다. 이하, 인루프 필터가 적용되기 전의 복원 블록을 제1 복원 블록이라 호칭하고, 인루프 필터가 적용된 이후의 복원 블록을 제2 복원 블록이라 호칭하기로 한다.
제1 복원 블록에 디블록킹 필터, SAO 또는 ALF 중 적어도 하나를 적용하여 제2 복원 블록을 획득할 수 있다. 이때, SAO 또는 ALF는 디블록킹 필터가 적용된 이후에 적용될 수 있다.
디블록킹 필터는 블록 단위로 양자화를 수행함에 따라 발생하는 블록의 경계에서의 화질 열화(Blocking Artifact)를 완화시키기 위한 것이다. 디블록킹 필터를 적용하기 위해, 제1 복원 블록과 이웃 복원 블록 사이의 블록 강도(Blocking Strength, BS)를 결정할 수 있다.
도 31은 블록 강도를 결정하는 과정을 나타낸 흐름도이다.
도 31에 도시된 예에서, P는 제1 복원 블록을 나타내고, Q는 이웃 복원 블록을 나타낸다. 여기서, 이웃 복원 블록은 현재 블록의 좌측 또는 상단에 이웃하는 것일 수 있다.
도 31에 도시된 예에서는, P 및 Q의 예측 부호화 모드, 0이 아닌 변환 계수가 포함되어 있는지 여부, 동일한 참조 픽처를 이용하여 인터 예측되었는지 여부 또는 움직임 벡터들의 차분값이 문턱값 이상인지 여부를 고려하여 블록 강도가 결정되는 것으로 도시되었다.
블록 강도에 기초하여, 디블록킹 필터의 적용 여부가 결정될 수 있다. 일 예로, 블록 강도가 0인 경우에는 필터링이 수행되지 않을 수 있다.
SAO는 주파수 영역에서 양자화를 수행함에 따라 발생하는 링잉 현상(Ringing Artifact)를 완화시키기 위한 것이다. SAO는 제1 복원 영상의 패턴을 고려하여 결정되는 오프셋을 가산 또는 감산함으로써 수행될 수 있다. 오프셋의 결정 방법은 에지 오프셋(Edge Offset, EO) 또는 밴드 오프셋(Band Offset)을 포함한다. EO는 주변 화소들의 패턴에 따라, 현재 샘플의 오프셋을 결정하는 방법을 나타낸다. BO는 영역 내 비슷한 밝기 값을 갖는 화소들의 집합에 대해 공통의 오프셋을 적용하는 방법을 나타낸다. 구체적으로, 화소 밝기를 32개의 균등한 구간으로 나누고, 유사한 밝기 값을 갖는 화소들을 하나의 집합으로 설정할 수 있다. 일 예로, 32개의 밴드들 중 인접한 4개의 밴드를 하나의 그룹으로 설정하고, 4개 밴드에 속한 샘플들에는 동일한 오프셋 값을 적용할 수 있다.
ALF는 제1 복원 영상 또는 디블록킹 필터가 적용된 복원 영상에 기 정의된 크기/모양의 필터를 적용하여 제2 복원 영상을 생성하는 방법이다. 하기 수학식 8은 ALF의 적용 예를 나타낸다.
Figure PCTKR2020018371-appb-M000008
픽처, 코딩 트리 유닛, 코딩 블록, 예측 블록 또는 변환 블록 단위로, 기 정의된 필터 후보들 중 어느 하나를 선택할 수 있다. 각각의 필터 후보들은 크기 또는 모양 중 어느 하나가 상이할 수 있다.
도 32는 기 정의된 필터 후보들을 나타낸다.
도 32에 도시된 예에서와 같이, 5x5, 7x7 또는 9x9 크기의 다이아몬드 형태 중 적어도 하나를 선택할 수 있다.
크로마 성분에 대해서는 5x5 크기의 다이아몬드 형태만이 사용될 수 있다.
파노라믹 비디오, 360도 비디오 또는 4K/8K UHD(Ultra High Definition) 영상 등 고해상도 영상의 실시간 또는 저지연 부호화를 위해 하나의 픽처를 복수개의 영역으로 나누고, 복수개의 영역을 병렬로 부호화/복호화하는 방안을 고려할 수 있다. 구체적으로, 처리 목적에 따라, 픽처를 타일 또는 슬라이스(또는 타일 그룹)으로 분할할 수 있다.
타일은 병렬 부호화/복호화의 기본 단위를 나타낸다. 각 타일은 병렬 처리될 수 있다. 타일은 직사각형 형태를 가질 수 있다. 또는, 비-직사각형 형태의 타일을 허용할 수도 있다.
비-직사각형 형태의 타일의 허용 여부 또는 비-직사각형 형태의 타일이 존재하는지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다.
타일의 부호화/복호화시, 다른 타일의 데이터는 이용하지 않도록 설정될 수 있다. 타일 간 부호화/복호화 종속성을 제거하여, 타일들의 병렬 처리를 지원할 수 있다. 구체적으로, 타일 단위로 CABAC(Context adaptive Binary Arithmetic Coding) 컨텍스트의 확률 테이블을 초기화 할 수 있으며, 타일들의 경계에서는 인루프 필터가 적용되지 않도록 설정할 수 있다. 또한, 다른 타일에 있는 데이터를 움직임 벡터 유도를 위한 후보로 사용하지 않을 수 있다. 예컨대, 타 타일에 있는 데이터는 머지 후보, 움직임 벡터 예측 후보(AMVP 후보) 또는 모션 정보 후보로 이용되지 않도록 설정될 수 있다. 또한, 다른 타일에 있는 데이터를 심볼의 컨텍스트 계산에 이용하지 않도록 설정할 수 있다.
슬라이스 헤더를 통해서는 영상 부호화/복호화 정보가 시그날링될 수 있다. 슬라이스 헤더를 통해 시그날링되는 정보들은 슬라이스에 포함된 코딩 트리 유닛들 또는 타일들에 공통 적용될 수 있다. 슬라이스를 타일 그룹이라 호칭할 수도 있다.
도 33은 본 발명의 일 실시예에 따른, 픽처 분할 방법을 나타낸 도면이다.
먼저, 현재 픽처를 복수의 처리 단위로 분할할 것인지 여부를 결정할 수 있다(S3310). 여기서, 처리 단위는 타일 또는 슬라이스 중 적어도 하나를 포함할 수 있다. 일 예로, 현재 픽처가 복수의 타일들 또는 슬라이스들로 분할되는지 여부를 나타내는 신택스 no_pic_partition_flag가 비트스트림을통해 시그날링될 수 있다. 신택스 no_pic_partition_flag의 값이 0인 것은, 현재 픽처가 적어도 하나의 타일 또는 적어도 하나의 슬라이스로 분할됨을 나타낸다. 반면, 신택스 no_pic_partiton_flag의 값이 1인 것은, 현재 픽처가 복수의 타일 또는 복수의 슬라이스로 분할되지 않음을 나타낸다.
현재 픽처가 복수의 처리 단위들로 분할되지 않는 것으로 결정되는 경우, 현재 픽처의 분할 과정을 종료할 수 있다. 이 경우, 현재 픽처는 하나의 타일 및 하나의 슬라이스(또는 타일 그룹)로 구성된 것으로 이해될 수 있다.
또는, 픽처에 복수의 타일이 존재하는지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수도 있다. 상기 정보는 픽처에 복수의 타일이 존재하는지 여부를 나타내는 1비트의 플래그 또는 픽처 내 타일의 개수를 특정하는 정보 중 적어도 하나를 포함할 수 있다.
현재 픽처가 복수의 처리 단위들로 분할되는 것으로 결정되는 경우, 비트스트림을 통해 타일 분할 정보를 시그날링할 수 있다. 상기 시그날링된 타일 분할 정보를 기초로, 픽처를 적어도 하나의 타일로 분할할 수 있다(S3320).
현재 픽처가 복수의 타일들로 분할된 경우, 복수의 타일들을 병합하거나, 하나의 타일을 분할하여, 슬라이스를 결정할 수 있다(S3330).
이하, 본 발명에 따른, 타일 분할 방법 및 슬라이스 결정 방법에 대해 상세히 살펴보기로 한다.
도 34는 픽처가 복수의 타일들로 분할된 예를 나타낸다.
타일은 적어도 하나의 코딩 트리 유닛을 포함할 수 있다. 타일의 경계는 코딩 트리 유닛의 경계와 일치하도록 설정될 수 있다. 즉, 하나의 코딩 트리 유닛이 복수개로 분할되는 분할 형태는 허용되지 않을 수 있다.
픽처를 복수개의 타일들로 분할할 때, 인접하는 타일들의 높이 또는 인접하는 타일들의 너비가 같은 값을 갖도록 설정할 수 있다.
일 예로, 도 34에 도시된 예에서와 같이, 동일한 타일 행에 속한 타일들의 높이 및/또는 동일한 타일 열에 속한 타일들의 너비는 동일하게 설정될 수 있다. 동일한 타일 행에 속한 타일들을 수평 방향 타일 세트라 호칭하고, 동일한 타일 열에 속한 타일들을 수직 방향 타일 세트라 호칭할 수도 있다.
또는, 부호화/복호화 하고자 하는 타일의 너비 및/또는 높이가 이전 타일의 너비 및/또는 높이와 동일하게 설정되는지 여부를 나타내는 정보가 시그날링될 수도 있다.
픽처의 분할 형태를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 픽처 파라미터 세트, 시퀀스 파라미터 세트 또는 슬라이스 헤더를 통해 부호화되어 시그날링될 수 있다.
픽처의 분할 형태를 나타내는 정보는 정보는 타일들이 균등한 크기로 분할되는지 여부를 나타내는 정보, 타일 열의 개수를 나타낸 정보 또는 타일 행의 개수를 나타내는 정보 중 적어도 하나를 포함할 수 있다. 여기서, 타일 열의 개수는, 수직 방향 타일 세트의 개수를 나타내고, 타일 행의 개수는, 수평 방향 타일 세트들의 개수를 나타낸다.
타일들이 균등한 크기로 분할되는지 여부를 나타내는 정보는 1비트의 플래그 uniform_tile_spacing_flag일 수 있다. 픽처가 균등한 크기의 타일들로 분할되는 것으로 결정된 경우, 픽처의 우측 및/또는 하단 경계에 인접하는 타일(들)을 제외한 잔여 타일들은 동등한 크기를 가질 수 있다.
타일들이 균등한 크기로 분할되는 것으로 결정되는 경우, 타일의 너비를 나타내는 신택스 tile_cols_width_minus1 및 타일의 높이를 나타내는 신택스 tile_rows_height_minus1이 시그날링될 수 있다.
신택스 tile_cols_width_minus1은 균등 크기의 타일이 포함하는 코딩 트리 유닛 열의 개수에서 1을 차분한 값을 나타낸다. 신택스 tile_rows_height_minus1은 균등 크기의 타일이 포함하는 코딩 트리 유닛 행의 개수에서 1을 차분한 값을 나타낸다.
마지막 타일 열은 신택스 tile_cols_width_minus1에 의해 특정되는 너비 값 또는 이보다 작은 값을 가질 수 있다. 또한, 마지막 타일 행은 신택스 tile_rows_height_minus1에 의해 특정되는 높이 값 또는 이보다 작은 값을 가질 수 있다. 일 예로, 마지막 타일 열의 인덱스가 m이라 할 때, 현재 픽처의 너비에서 0부터 m-1번째 타일 열들의 너비의 합을 차분한 값이 마지막 타일 열의 너비로 설정될 수 있다. 일 예로, 마지막 타일 행의 인덱스가 n이라 할 때, 현재 픽처의 높이에서 0 부터 n-1번째 타일 행들의 높이의 합을 차분한 값이 마지막 타일 행의 높이로 설정될 수 있다. 즉, 현재 픽처의 우측 경계에 위치하는 타일의 너비 및/또는 현재 픽처의 하단 경계에 위치하는 타일의 높이는, 각각 다른 타일의 너비 및/또는 높이보다 작거나 같을 수 있다.
픽처를 가로지르는 수직선 또는 수평선 중 적어도 하나를 이용하여 픽처를 분할함에 따라, 타일들 각각은 상이한 열(Column) 및/또는 행(Row)에 속한다. 픽처의 분할 형태를 결정하기 위해, 타일 열의 개수 및/또는 타일 행의 개수를 나타내는 정보가 시그날링될 수 있다. 일 예로, 픽처를 분할함에 따라 생성되는 타일 행들의 개수를 나타내는 정보 num_tile_row_minus1 및 타일 열들의 개수를 나타내는 정보 num_tile_column_minus1가 비트스트림을 통해 시그날링될 수 있다. 신택스 num_tile_row_minus1은 타일 행들의 개수에서 1을 차분한 값을 나타내고, 신택스 num_tile_column_minus1은 타일 열들의 개수에서 1을 차분한 값을 나타낸다.
도 34에 도시된 예에서, 타일 열의 개수는 4개이고, 타일 행의 개수는 3개이다. 이에 따라, num_tile_columns_minus1은 3을 나타내고, num_tile_rows_minus1은 2를 나타낼 수 있다.
타일 열의 개수를 나타내는 신택스 num_tile_column_minus1 및/또는 타일 행의 개수를 나타내는 신택스 num_tile_rows_minus1은 신택스 uniform_tile_spacing_flag의 값이 0인 경우, 시그날링될 수 있다. 즉, 현재 픽처가 높이 및 너비가 균등한 타일들로 분할되지 않는 것으로 결정된 경우에, 타일 열의 개수를 나타내는 신택스 num_tile_column_minus1 및/또는 타일 행의 개수를 나타내는 신택스 num_tile_rows_minus1이 시그날링될 수 있다.
각 타일 열의 너비 나타내는 신택스 및 각 타일 행의 높이를 나타내는 신택스가 비트스트림을 통해 시그날링될 수 있다. 일 예로, tile_cols_width_minus1[i]는 i번째 타일 열의 너비를 나타내고, tile_rows_height_minus[j]는 j번째 타일 행의 높이를 나타낼 수 있다.
신택스 tile_cols_width_minus1[i]는 i번째 타일 열을 구성하는 코딩 트리 유닛 열의 개수에서 1을 차분한 값을 나타낸다. 마지막 타일 열에 대해서는 신택스 tile_cols_width_minus1[i]의 시그날링이 생략될 수 있다. 마지막 타일 열의 너비는 현재 픽처의 너비에서 이전 타일 열들의 너비를 차분하여 유도될 수 있다.
신택스 tile_rows_height_minus1[j]는 j번째 타일 행을 구성하는 코딩 트리 유닛 행의 개수에서 1을 차분한 값을 나타낸다. 마지막 타일 행에 대해서는 신택스 tile_rows_height_minus1[j]의 시그날링이 생략될 수 있다. 마지막 타일 행의 높이는 현재 픽처의 높이에서 이전 타일 행들의 높이를 차분하여 유도될 수 있다.
한편, 코딩 트리 유닛의 크기를 나타내는 정보는 시퀀스 파라미터 세트 또는 픽처 파라미터 세트를 통해 시그날링될 수 있다.
하나의 타일은 적어도 하나의 코딩 트리 유닛으로 구성될 수 있다. 픽처 우측 또는 하단 경계에 인접하는 타일을 제외한 잔여 타일들은 코딩 트리 유닛보다 작은 영역을 포함하여 구성되지 않도록 설정할 수 있다. 즉, 타일의 경계는 코딩 트리 유닛의 경계와 일치한다.
픽처의 분할 형태에 따라, 픽처 바운더리를 제외한 모든 영역에서 타일들이 동일한 크기를 가질 수 있다. 또는, 수평 방향으로 인접하는 타일들의 높이가 동일하게 설정되거나, 수직 방향으로 인접하는 타일들의 너비가 동일하게 설정될 수 있다.
현재 픽처가 복수의 타일들로 분할되는지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 비트스트림을 통해 신택스 single_tile_in_pic_flag가 시그날링될 수 있다. 신택스 single_tile_in_pic_flag가 1인 것은, 현재 픽처가 복수의 타일들로 분할되지 않음을 나타낸다. 반면, single_tile_in_pic_flag가 0인 것은, 현재 픽처가 복수의 타일들로 분할될 수 있음을 나타낸다.
현재 픽처가 복수의 타일들로 분할될 수 있는 것으로 결정되는 경우, 타일 열 및 타일 행의 개수를 결정하기 위한 정보, 타일들의 균등 분할 여부를 나타내는 정보 및 타일 열 및 타일 행의 크기를 결정하기 위한 정보 중 적어도 하나가 부호화될 수 있다.
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)
}
또는, 픽처가 복수개의 타일들 또는 슬라이스들로 분할 가능한지 여부를 나타내는 플래그가 부호화되어 시그날링될 수 있다. 일 예로, 신택스 no_pic_partition_flag가 부호화되어 시그날링될 수 있다. 신택스 no_pic_partition_flag의 값이 1인 것은, 픽처가 복수개의 타일들 또는 슬라이스들로 분할되지 않음을 나타낸다. 반면, no_pic_partition_flag의 값이 0인 것은, 픽처가 복수개의 타일들 또는 슬라이스들로 분할될 수도 있음을 나타낸다. 신택스 no_pic_partition_flag의 값이 0인 경우, 타일 분할 정보 또는 슬라이스 분할 정보 중 적어도 하나가 시그날링될 수 있다.
타일의 크기를 결정하기 위한 정보가 부호화되어 시그날링될 수 있다. 일 예로, i번째 타일 열의 너비를 나타내는 신택스 요소 tile_width_minus1[i] 및 i번째 타일 행의 높이를 나타내는 신택스 요소 tile_height_minus1[i]가 비트스트림에 부호화될 수 있다.
각 타일 열 또는 각 타일 행의 크기 정보를 시그날링하는 대신, 이전 타일 열 또는 이전 타일 행의 크기 정보를 바탕으로, 현재 타일 열 또는 현재 타일 행의 크기를 유도할 수도 있다.
이를 위해, 현재 픽처 내 타일 열의 너비가 명시적으로 시그날링되는 타일 열의 개수를 특정하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 타일 열의 너비가 시그날링되는 타일 열의 개수를 결정하기 위한 신택스 num_exp_tile_columns_minus1이 비트스트림을 통해 시그날링될 수 있다. 신택스 num_exp_tile_columns_minus1은 타일 열의 너비가 시그날링되는 타일 열의 개수에서 1을 차분한 값일 수 있다.
신택스 num_exp_tile_columns_minus1을 기초로 결정된 개수 만큼, 타일 열의 너비를 특정하기 위한 신택스가 부호화되어 시그날링될 수 있다. 일 예로, i번째 타일 열의 너비를 나타내는 신택스 tile_width_minus1[i]가 비트스트림을 통해 시그날링될 수 있다. 신택스 tile_width_minus1[i]는 타일 열이 포함하는 코딩 트리 유닛 열의 개수에서 1을 차분한 것일 수 있다.
타일 열의 인덱스 i가 너비가 명시적으로 시그날링되는 타일 열의 개수보다 작은 경우, 해당 타일 열의 너비는 비트스트림을 통해 시그날링되는 신택스 tile_width_minus1[i]에 기초하여 결정될 수 있다.
반면, 타일 열의 인덱스 j가 너비가 명시적으로 시그날링되는 타일 열의 개수 이상인 경우, 해당 타일 열의 너비는 가장 마지막으로 시그날링된 신택스 tile_width_minus1[l]을 기초로 결정될 수 있다. 여기서, l은 마지막으로 너비가 시그날링된 타일 열의 인덱스를 나타내고, j보다 작은 정수일 수 있다. 일 예로, 현재 픽처의 너비에서 이전 타일 열들의 너비를 차분한 값이 신택스 tile_width_minus1[l]에 1을 가산한 값 이상일 경우, 타일 열 j의 너비는 신택스 tile_width_minus1[l]에 1을 가산한 값으로 설정될 수 있다. 반면, 현재 픽처의 너비에서 이전 타일 열들의 너비를 차분한 값이 신택스 tile_width_minus1[l]에 1을 가산한 값보다 작을 경우, 현재 픽처의 너비에서 이전 타일 열들의 너비를 차분한 차분 값을 타일 열 j의 너비로 설정할 수 있다.
표 9는 타일 열의 너비를 결정하는 과정을 나타낸 것이다.
remainingWidthInCtbsY = PicWidthInCtbsYfor( i = 0; i <= num_exp_tile_columns_minus1; i++ ) { colWidth[ i ] = tile_column_width_minus1[ i ] + 1 remainingWidthInCtbsY -= colWidth[ i ]}uniformTileColWidth = tile_column_width_minus1[ num_exp_tile_columns_minus1 ] + 1 while( remainingWidthInCtbsY >= uniformTileColWidth ) { colWidth[ i++ ] = uniformTileColWidth remainingWidthInCtbsY -= uniformTileColWidth}if( remainingWidthInCtbsY > 0 ) colWidth[ i++ ] = remainingWidthInCtbsYNumTileColumns = i
표 9에서, 변수 PicWidthInCtbsY는 현재 픽처가 포함하는 코딩 트리 유닛 열들의 개수를 나타낸다. 일 예로, 변수 PicWidthInCtbsY는 다음 수학식 9와 같이 유도될 수 있다.
Figure PCTKR2020018371-appb-M000009
변수 reminingWidthInCtbsY는 변수 PicWidthInCtbsY에서 누적된 타일 열들의 너비를 차분한 값을 나타낸다. 일 예로, 인덱스가 i인 타일 열에 대해, remainingWidthInCtbsY는 PicWidthInCtbsY에서, 0번부터 i-1번 까지 타일 열들의 너비를 합산한 값을 차분하여 유도될 수 있다.
표 9에 나타난 예에서와 같이, 변수 uniformTileColWidth는 마지막으로 명시적으로 시그날링된 타일 열의 너비 tile_column_width_minus1[num_exp_tile_columns_minus1]에 1을 가산하여 유도될 수 있다. 이때, 현재 픽처 내 잔여 코딩 트리 유닛 열들의 개수를 나타내는 변수 remainingWidthInCtbY가 변수 uniformTileColWidth 이상이라면, 잔여 영역은 변수 uniformTileColWidth의 크기로 분할될 수 있다.
반면, 현재 픽처 내 잔여 코딩 트리 유닛 열들의 개수를 나타내는 변수 remainingWidthInCtbY가 변수 uniformTileColWidth보다 작다면, 잔여 영역이 그대로 마지막 타일 열로 설정될 수 있다.
반면, 타일 열의 인덱스 j가 너비가 명시적으로 시그날링되는 타일 열의 개수 이상인 경우, 해당 타일 열의 너비는 변수 uniformTileColWidth 및 remainingWidthInCtbY 중 작은 값으로 설정될 수 있다.
즉, 너비가 명시적으로 시그날링되는 타일 열들을 제외한 잔여 타일 열들의 너비는, 너비가 명시적으로 시그날링되는 타일 열들 중 마지막 타일 열의 너비보다 작거나 같은 값을 가질 수 있다.
또는, 현재 픽처 내 타일 행의 높이가 시그날링되는 타일 행의 개수를 특정하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 타일 행의 높이가 시그날링되는 타일 행의 개수를 결정하기 위한 신택스 num_exp_tile_rows_minus1이 비트스트림을 통해 시그날링될 수 있다. 신택스 num_exp_tile_rows_minus1은 타일 행의 높이가 시그날링되는 타일 행의 개수에서 1을 차분한 값일 수 있다.
신택스 num_exp_tile_rows_minus1을 기초로 결정된 개수 만큼, 타일 행의 높이를 특정하기 위한 신택스가 부호화되어 시그날링될 수 있다. 일 예로, i번째 타일 행의 높이를 나타내는 신택스 tile_height_minus1[i]가 비트스트림을 통해 시그날링될 수 있다. 신택스 tile_height_minus1[i]는 타일 행이 포함하는 코딩 트리 유닛 행의 개수에서 1을 차분한 것일 수 있다.
타일 행의 인덱스 i가 높이가 명시적으로 시그날링되는 타일 행의 개수보다 작은 경우, 해당 타일 행의 높이는 비트스트림을 통해 시그날링되는 신택스 tile_height_minus1[i]에 기초하여 결정될 수 있다.
반면, 타일 행의 인덱스 j가 높이가 명시적으로 시그날링되는 타일 행의 개수 이상인 경우, 해당 타일 행의 높이는 가장 마지막으로 시그날링된 신택스 tile_height_minus1[l]을 기초로 결정될 수 있다. 여기서, l은 마지막으로 높이가 시그날링된 타일 행의 인덱스를 나타내고, j보다 작은 정수일 수 있다.
일 예로, 현재 픽처의 높이에서 이전 타일 행들의 높이를 차분한 값이 신택스 tile_height_minus1[l]에 1을 가산한 값 이상일 경우, 타일 행 j의 높이는 신택스 tile_height_minus1[l]에 1을 가산한 값으로 설정될 수 있다. 반면, 현재 픽처의 높이에서 이전 타일 행들의 높이를 차분한 값이 신택스 tile_height_minus1[l]에 1을 가산한 값보다 작을 경우, 현재 픽처의 높이에서 이전 타일 행들의 높이를 차분한 차분 값을 타일 행 j의 높이로 설정할 수 있다.
표 10은 타일 행의 높이를 결정하는 과정을 나타낸 것이다.
remainingHeightInCtbsY = PicHeightInCtbsYfor( j = 0; j < num_exp_tile_rows_minus1; j++ ) { RowHeight[ j ] = tile_row_height_minus1[ j ] + 1 remainingHeightInCtbsY -= RowHeight[ j ]}uniformTileRowHeight = tile_row_height_minus1[ num_exp_tile_rows_minus1 ] + 1 while( remainingHeightInCtbsY >= uniformTileRowHeight ) { RowHeight[ j++ ] = uniformTileRowHeight remainingHeightInCtbsY -= uniformTileRowHeight}if( remainingHeightInCtbsY > 0 ) RowHeight[ j++ ] = remainingHeightInCtbsYNumTileRows = j
표 10에서, 변수 PicHeightInCtbsY는 현재 픽처가 포함하는 코딩 트리 유닛 행들의 개수를 나타낸다. 일 예로, 변수 PicWidthInCtbsY는 다음 수학식 10과 같이 유도될 수 있다.
Figure PCTKR2020018371-appb-M000010
변수 reminingHeightInCtbsY는 변수 PicHeightInCtbsY에서 누적된 타일 행들의 높이를 차분한 값을 나타낸다. 일 예로, 인덱스가 i인 타일 행에 대해, remainingHeightInCtbsY는 PicHeightInCtbsY에서, 0번부터 i-1번 까지 타일 행들의 높이를 합산한 값을 차분하여 유도될 수 있다.
표 10에 나타난 예에서와 같이, 변수 uniformTileRowHeight는 마지막으로 명시적으로 시그날링된 타일 행의 높이 tile_row_height_minus1[num_exp_tile_rows_minus1]에 1을 가산하여 유도될 수 있다. 이때, 현재 픽처 내 잔여 코딩 트리 유닛 행들의 개수를 나타내는 변수 remainingHeightInCtbY가 변수 uniformTileRowHeight 이상이라면, 잔여 영역은 변수 uniformTileRowHeight의 크기로 분할될 수 있다.
반면, 현재 픽처 내 잔여 코딩 트리 유닛 행들의 개수를 나타내는 변수 remainingHeightInCtbY가 변수 uniformTileRowHeight보다 작다면, 잔여 영역이 그대로 마지막 타일 행으로 설정될 수 있다.
반면, 타일 행의 인덱스 j가 높이가 명시적으로 시그날링되는 타일 행의 개수 이상인 경우, 해당 타일 행의 높이는 변수 uniformTileRowHeight 및 remainingHeightInCtbY 중 작은 값으로 설정될 수 있다.
즉, 높이가 명시적으로 시그날링되는 타일 행들을 제외한 잔여 타일 행들의 높이는, 높이가 명시적으로 시그날링되는 타일 행들 중 마지막 타일 행의 너비보다 작거나 같은 값을 가질 수 있다.
표 11은 너비가 명시적으로 시그날링되는 타일 열들의 개수를 나타내는 신택스 및 높이가 명시적으로 시그날링되는 타일 행들의 개수를 나타내는 신택스를 포함하는 신택스 테이블을 예시한 것이다.
pic_parameter_set_rbsp( ) { Descriptor
...
no_pic_partition_flag u(1)
if( ! no_pic_partition_flag ) {
log2_pps_ctu_size_minus5 u(2)
num_exp_tile_columns_minus1 ue(v)
num_exp_tile_rows_minus1 ue(v)
for( i = 0; i <= num_exp_tile_columns_minus1; i++ )
tile_column_width_minus1[ i ] ue(v)
for( i = 0; i <= num_exp_tile_rows_minus1; i++ )
tile_row_height_minus1[ i ] ue(v)
신택스 num_exp_tile_columns_minus1 및 신택스 num_exp_tile_row_minus1의 값이 모두 0인 경우, 신택스 tile_column_width_minus1 및 신택스 tile_row_height_minus1이 각각 1개씩 시그날링된다. 이때, 신택스 tile_column_width_minus1[0]이 가리키는 너비가 현재 픽처의 너비와 동일한 경우(예컨대, tile_column_width_minus1[0]의 값이 (PicWidthInCtbsY-1)인 경우), 신택스 tile_row_height_minus1[0]이 가리키는 높이는 현재 픽처의 높이와 상이한 값을 갖도록 설정할 수 있다. 즉, 신택스 tile_row_height_minus1[0]의 값은 (PicHeightInCtbsY-1) 보다 작은 값으로 설정될 수 있다. 신택스 tile_row_height_minus1[0]의 값을 (PicHeightInCtbsY-1)보다 작은 값으로 설정함에 따라, 픽처는 적어도 둘 이상의 타일들로 분할된다.
한편, 신택스 loop_filter_across_tiles_enabled_flag는 픽처 파라미터 세트를 참조하는 픽처 내 타일들의 경계에서 인루프 필터를 적용하는 것이 허용되는지 여부를 나타낸다. 여기서, 인루프 필터는 디블로킹 필터, ALF 또는 SAO 중 적어도 하나를 포함할 수 있다. 플래그 loop_filter_across_tiles_enabled_flag의 값이 1인 것은, 픽처 파라미터 세트를 참조 하는 픽처 내 타일들의 경계를 가로지르는 인루프 필터가 적용될 수 있음을 나타낸다. 반면, 플래그 loop_filter_across_tiles_enabled_flag의 값이 0인 것은, 픽처 파라미터 세트를 참조하는 픽처 내 타일들의 경계에서 인루프 필터를 적용하는 것이 허용되지 않음을 나타낸다.
신택스 loop_filter_across_slices_enabled_flag는 픽처 파라미터 세트를 참조하는 픽처 내 슬라이스들의 경계에서 인루프 필터를 적용하는 것이 허용되는지 여부를 나타낸다. 여기서, 인루프 필터는 디블로킹 필터, ALF 또는 SAO 중 적어도 하나를 포함할 수 있다. 플래그 loop_filter_across_slices_enabled_flag의 값이 1인 것은, 픽처 파라미터 세트를 참조 하는 픽처 내 슬라이스들의 경계를 가로지르는 인루프 필터가 적용될 수 있음을 나타낸다. 반면, 플래그 loop_filter_across_slices_enabled_flag의 값이 0인 것은, 픽처 파라미터 세트를 참조하는 픽처 내 슬라이스들의 경계에서 인루프 필터를 적용하는 것이 허용되지 않음을 나타낸다.
적어도 하나 이상의 타일 또는 타일의 일부를 하나의 처리 단위로 정의할 수 있다. 일 예로, 복수개의 타일들을 하나의 슬라이스로 정의할 수 있다.
또는, 하나의 타일을 복수개의 슬라이스들로 분할할 수도 있다.
하나의 슬라이스는 적어도 하나의 코딩 트리 유닛 열을 포함할 수 있다. 하나의 타일이 복수의 슬라이스들로 분할되는 경우, 각 슬라이스의 높이를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다.
슬라이스 헤더를 통해 영상 부호화/복호화 정보가 시그날링될 수 있다. 슬라이스 헤더를 통해 시그날링되는 정보들은 슬라이스에 속한 타일 및/또는 블록들에 공통적으로 적용될 수 있다.
슬라이스 타입을 나타내는 정보를, 비트스트림을 통해 시그날링할 수 있다. 상기 정보는, 현재 픽처 내 슬라이스의 정의 방법을 나타낸다. 일 예로, 비트스트림을 통해 슬라이스 타입을 나타내는 신택스 rect_slice_flag가 시그날링될 수 있다.
신택스 rect_slice_flag는 타일들의 래스터 스캔 순서에 기초하여 슬라이스가 정의되는지 여부 또는 사각 형태로 슬라이스가 정의되는지 여부를 나타낸다. 일 예로, rect_slice_flag가 0인 것은 타일들의 래스터 스캔 순서에 기초하여 슬라이스가 정의됨을 나타낸다. 반면, rect_slice_flag가 1인 것은, 사각 형태로 슬라이스가 정의됨을 나타낸다.
이하, 슬라이스를 결정하기 위한 위 두 방법에 대해 상세히 살펴보기로 한다.
래스터 스캔에 기초한 정의 방법은, 래스터 스캔 순서를 따라, 적어도 하나 이상의 타일을 특정한 뒤, 특정된 적어도 하나 이상의 타일을 슬라이스로 정의하기 위한 것이다. 래스터 스캔에 기초한 정의 방법을 따르는 경우, 하나 이상의 연속된 타일(들)이 슬라이스로 정의될 수 있다. 이때, 연속된 타일들은 래스터 스캔 순서를 따라 결정될 수 있다. 래스터 스캔 슬라이스가 적용되는 경우, 비-사각 형태의 슬라이스가 생성될 수도 있다.
도 35 및 도 36은 래스터 순서에 기초하여 슬라이스를 정의한 예를 나타낸 도면이다.
일 예로, 도 35에 도시된 예에서, 첫번째 슬라이스 slice0이 3개의 타일들을 포함한다고 가정하였을 때, 첫번째 슬라이스 slice0은 래스터 스캔 순서에 따라, Tile0 내지 Tile2를 포함하는 것으로 정의될 수 있다. 두번째 슬라이스 slice1이 6개의 타일들을 포함한다고 가정하였을 때, 두번째 슬라이스 slice1은 래스터 스캔 순서에 따라, Tile3 내지 Tile 8을 포함하는 것으로 정의될 수 있다. 마지막 슬라이스 slice2은 래스터 스캔 순서에 따라, 잔여 타일들 Tile 9 내지 Tile11을 포함할 수 있다.
래스터 스캔 순서를 기초로, 슬라이스를 정의하는 경우, 각 슬라이스가 포함하는 타일의 개수를 나타내는 정보가 시그날링될 수 있다. 마지막 슬라이스에 대해서는 슬라이스가 포함하는 타일의 개수를 나타내는 정보의 시그날링이 생략될 수 있다.
슬라이스가 복수의 타일들을 포함할 경우, 슬라이스에 포함된 타일들의 너비 또는 높이는 상이할 수 있다. 일 예로, 두번째 슬라이스 slice1이 포함하는 타일들 중 Tile3의 높이는 잔여 타일들과 상이한 것으로 도시되었다.
사각 형태 슬라이스 정의 방법은, 직사각형 형태의 슬라이스만을 허용하는 분할 방법이다. 사각 형태 슬라이스 정의 방법이 적용되는 경우, 슬라이스의 네 모서리에 위치하는 타일들이 같은 행 또는 같은 열에 속하게 된다.
도 37은 사각 형태의 슬라이스만이 허용되는 예를 나타낸 도면이다.
도 37에 도시된 예에서와 같이, 네번째 슬라이스 slice3는 Tile5, Tile6, Tile9 및 Tile10를 포함한다. 도시된 예에서와 같이, 슬라이스가 복수의 타일들을 포함하는 경우, 슬라이스를 구성하는 좌측 상단 타일 및 우측 하단 타일을 두 꼭지점으로 하는 직사각형을 하나의 슬라이스로 정의할 수 있다.
슬라이스의 경계는 픽처 경계 및/또는 타일의 경계와 일치할 수 있다. 일 예로, 슬라이스의 좌측 경계 또는 상단 경계가 픽처의 경계로 설정되거나, 슬라이스의 좌측 경계 또는 상단 경계가 타일의 경계로 설정될 수 있다.
또는, 사각 형태의 슬라이스 정의 방법이 적용되는 경우, 하나의 타일을 복수개의 사각 형태 슬라이스들로 분할할 수도 있다.
사각 형태 슬라이스 정의 방법이 적용되는 경우, 픽처 내 슬라이스의 개수를 나타내는 신택스가 부호화되어 시그날링될 수 있다. 일 예로, 비트스트림을 통해, 픽처 내 슬라이스의 개수를 나타내는 신택스 num_slices_in_pic_minus1이 시그날링될 수 있다. 신택스 num_slices_in_pic_minus1은 픽처 내 슬라이스들의 개수에서 1을 차분한 값을 나타낼 수 있다. 이에 따라, 복호화기는 신택스 num_slices_in_pic_minus1이 가리키는 값에 1을 더하여, 슬라이스의 총 개수를 결정할 수 있다.
신택스 num_slices_in_pic_minus1 대신, 픽처 내 슬라이스의 개수에서 2를 차분한 값을 나타내는 신택스 num_slices_in_pic_minus2를 부호화할 수도 있다.
사각 형태의 슬라이스 정의 방법이 적용되는 경우, 각 슬라이스가 포함하는 타일들을 결정하기 위해, 각 슬라이스가 포함하는 타일들을 식별하기 위한 정보가 시그날링될 수 있다. 상기 정보는 슬라이스의 첫번째 타일 또는 마지막 타일 중 적어도 하나를 특정하는 것에 이용될 수 있다. 타일들 간의 순번은, 소정 스캔 순서에 따라 결정될 수 있다. 일 예로, 래스터 스캔 순서를 따르는 경우, 첫번째 타일은 슬라이스의 좌상단에 위치하는 타일을 가리키고, 마지막 타일은 슬라이스의 우하단에 위치하는 타일을 가리킨다.
슬라이스 내 좌상단에 위치하는 타일의 인덱스 또는 슬라이스의 우하단에 위치하는 타일의 인덱스 중 적어도 하나를 식별하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다.
제1 슬라이스가 포함하는 타일의 인덱스와 제2 슬라이스가 포함하는 타일의 인덱스 사이의 차분 정보를 부호화하여 시그날링할 수도 있다. 여기서, 제1 슬라이스 및 제2 슬라이스는 스캔 순서를 기초로 결정되고, 각 슬라이스가 점유하는 타일은 상이할 수 있다.
일 예로, 제1 슬라이스를 구성하는 타일과 제2 슬라이스를 구성하는 타일이 상이한 경우, 제2 슬라이스의 인덱스는 제1 슬라이스의 인덱스 i에 1을 가산한 것일 수 있다.
또는, 제1 타일이 복수의 슬라이스들을 포함하도록 분할된 경우, 제1 타일에 포함된 제1 슬라이스와 스캔 순서상 제1 타일의 다음 타일인 제2 타일을 포함하는 제2 슬라이스 또는 제2 타일에 포함된 제2 슬라이스 사이의 차분 정보가 부호화될 수 있다. 이때, 제1 타일에 포함된 복수의 슬라이스들 중 첫번째 슬라이스 또는 마지막 슬라이스에 대해서만 차분 정보가 부호화될 수 있다.
제1 슬라이스 및 제2 슬라이스 사이의 차분 정보를 유도하는데 이용되는 타일은, 슬라이스의 좌상단, 우상단, 우하단, 좌하단 또는 중앙에 위치하는 것일 수 있다.
일 예로, i번째 슬라이스의 좌상단 타일과 다음 슬라이스(즉, i+1번째 슬라이스)의 좌상단 타일 사이의 인덱스 차분을 나타내는 신택스 tile_idx_delta[i]가 비트스트림을 통해 시그날링될 수 있다. 신택스 tile_idx_delta[i]는 i번째 슬라이스의 좌상단 타일의 인덱스 및 i+1번째 슬라이스의 좌상단 타일의 인덱스 간 차분의 절대값을 나타낼 수 있다.
또는, i번째 슬라이스의 좌상단 타일과 다음 슬라이스의 좌상단 타일 사이의 인덱스 차분의 절대값에 1을 차분하여 유도되는 신택스 tile_idx_delta_minus1[i]를 부호화/복호화할 수도 있다. 표 12는 위 신택스를 포함하는 신택스 구조를 나타낸 것이다.
pic_parameter_set_rbsp( ) { Descriptor
no_pic_partition_flag u(1)
if( ! no_pic_partition_flag ) {
log2_pps_ctu_size_minus5 u(2)
num_exp_tile_columns_minus1 ue(v)
num_exp_tile_rows_minus1 ue(v)
for( i = 0; i <= num_exp_tile_columns_minus1; i++ )
tile_column_width_minus1[ i ] ue(v)
for( i = 0; i <= num_exp_tile_rows_minus1; i++ )
tile_row_height_minus1[ i ] ue(v)
rect_slice_flag u(1)
if( rect_slice_flag )
single_slice_per_subpic_flag u(1)
if( rect_slice_flag && !single_slice_per_subpic_flag ) {
num_slices_in_pic_minus1 ue(v)
tile_idx_delta_present_flag u(1)
for( i = 0; i < num_slices_in_pic_minus1; i++ ) {
slice_width_in_tiles_minus1[ i ] ue(v)
slice_height_in_tiles_minus1[ i ] ue(v)
if( slice_width_in_tiles_minus1[ i ] == 0 && slice_height_in_tiles_minus1[ i ] == 0 ) {
num_slices_in_tile_minus1[ i ] ue(v)
numSlicesInTileMinus1 = num_slices_in_tile_minus1[ i ]
for( j = 0; j < numSlicesInTileMinus1; j++ )
slice_height_in_ctu_minus1[i][j] ue(v)
}
if( tile_idx_delta_present_flag && i < num_slices_in_pic_minus1 ){
tile_idx_delta_minus1[ i ] ue(v)
if (i>0)
tile_idx_delta_sign[i] u(1)
}
}
}
}
}
슬라이스들 간의 타일 인덱스 차분값의 부호를 나타내는 신택스도 tile_idx_delta_sign[i]도 부호화/복호화될 수 있다. 일 예로, 신택스 tile_idx_delta_sign[i]의 값이 1인 것은, tile_idx_delta[i]가 가리키는 차분값의 부호가 양수임을 나타내고, 신택스 tile_idx_delta_sign[i]의 값이 0인 것은, tile_idx_delta[i]가 가리키는 차분값의 부호가 음수임을 나타낸다.
i가 0인 슬라이스에 대해서는, 신택스 tile_idx_delta_sign의 부호화/복호화가 생략될 수 있다.
차분 정보에 기초하여, i+1번째 슬라이스 내 좌상단 타일의 위치가 결정될 수 있다. 구체적으로, i+1번째 슬라이스의 좌상단 타일의 인덱스는 i번째 슬라이스의 좌상단 타일 인덱스와 신택스 tile_idx_delta[i]를 더하여 유도할 수 있다.
픽처 내 첫번째 슬라이스(즉, i가 0인 슬라이스) 및 두번째 슬라이스(즉, i가 1인 슬라이스) 간 타일 인덱스 차분값은 상시 양수로 설정된다. 이에 따라, 픽처 내 첫번째 슬라이스에 대해서는, tile_idx_delta_sign[i]의 부호화/복호화를 생략하고, 그 값을 1로 추정할 수 있다.
또한, 픽처 내 마지막 슬라이스의 이전 슬라이스(예컨대, i가 num_slices_in_pic_minus1에서 1을 차분한 값을 갖는 슬라이스) 및 픽처 내 마지막 슬라이스(예컨대, i가 num_slices_in_pic_minus1이 지시하는 값을 갖는 슬라이스) 같 타일 인덱스 차분값도 상시 양수로 설정된다. 이에 따라, 마지막 슬라이스의 이전 슬라이스에 대해서도, tile_idx_delta_sign[i]의 부호화/복호화를 생략하고, 그 값을 1로 추정할 수 있다.
마지막 슬라이스에 대해서는, 다음 슬라이스와의 차분을 나타내는 신택스 tile_idx_delta[i]의 부호화/복호화를 생략할 수 있다.
슬라이스의 너비 또는 높이 중 적어도 하나를 특정하는 정보를 부호화/복호화할 수 있다. 일 예로, i번째 슬라이스를 너비를 나타내는 신택스 slice_width_in_tiles_minus1[i] 또는 i번째 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1[i] 중 적어도 하나가 비트스트림을 통해 시그날링될 수 있다.
신택스 slice_width_in_tiles_minus1[i]는 i번째 슬라이스에 포함된 타일 열들의 개수에서 1을 차분한 값을 나타낸다. 신택스 slice_height_in_tiles_minus[i]는 i번째 슬라이스에 포함된 타일 행들의 개수에서 1을 차분한 값을 나타낸다.
i번째 슬라이스는, 신택스 slice_width_in_tiles_minus1[i]를 기초로 결정되는 개수 만큼의 타일 열 및 신택스 slice_height_in_tiles_minus1[i]를 기초로 결정되는 개수 만큼의 타일 행들로 구성될 수 있다. 이때, i번째 타일 열의 좌상단 타일은, tile_idx_delta[i] 또는 tile_idx_delta_minus1[i]를 기초로 결정되는 인덱스 값을 가질 수 있다.
또는, 픽처의 좌측 경계에 인접하는 슬라이스에 대해서만, 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1[i]을 시그날링하고, 그 이외의 슬라이스에 대해서는 신택스 slice_height_in_tiles_minus1[i]의 부호화를 생략할 수 있다. 신택스 slice_height_in_tiles_minus[i]의 부호화가 생략되는 슬라이스의 높이는, 동일한 행에 포함된 슬라이스들 중 현재 픽처의 좌측 경계에 접하는 슬라이스의 높이와 동일하게 설정될 수 있다.
슬라이스 타입을 나타내는 플래그 rect_slice_flag를 부호화하고, 플래그 rect_slice_flag가 1인 경우, 픽처 내 슬라이스의 개수를 나타내는 신택스 num_slices_in_pic_minus1을 부호화할 수 있다.
픽처가 복수개의 슬라이스들을 포함하는 것으로 결정된 경우, 각 슬라이스의 너비를 나타내는 신택스 slice_width_in_tiles_minus1[i] 및 각 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1[i]를 부호화하여 시그날링할 수 있다.
또한, i번째 슬라이스에 포함된 타일의 인덱스와 i+1번째 슬라이스에 포함된 타일의 인덱스 사이의 차분을 나타내는 신택스 tile_idx_delta[i]를 시그날링할 수도 있다. 마지막 타일에 대해서는, 신택스 tile_idx_delta[i]의 부호화가 생략될 수 있다.
부호화기는 타일 인덱스의 차분을 나타내는 신택스 tile_idx_delta[i]의 부호화 여부를 결정하고, 상기 결정에 따라, 신택스 tile_idx_delta[i] 가 부호화되었는지 여부를 나타내는 플래그 tile_idx_delta_present_flag를 부호화할 수 있다. 신택스 tile_idx_delta[i]는 플래그 tile_idx_delta_present_flag의 값이 1인 경우에 한하여 부호화될 수 있다.
하나의 타일을 복수개의 슬라이스로 분할할 수도 있다. 일 예로, 타일을 수평 방향으로 타일을 분할하여, 복수개의 슬라이드들을 생성할 수 있다.
슬라이스가 복수개의 타일을 포함하지 않는 것으로 결정된 경우, 타일을 복수개의 슬라이스로 분할할 것인지 여부가 결정될 수 있다. 일 예로, 신택스 slice_width_in_tiles_minus1[i] 및 신택스 slice_height_in_tiles_minus1[i]가 모두 0인 것은, 슬라이스가 하나의 타일만으로 구성되거나, 하나의 타일이 복수의 슬라이스들로 분할됨을 나타낸다.
신택스 slice_width_in_tiles_minus1[i] 및 신택스 slice_height_in_tiles_minus1[i]가 모두 0인 경우, 타일이 복수의 슬라이스로 분할되는지 여부를 나타내는 정보가 시그날링될 수 있다.
일 예로, 타일이 포함하는 슬라이스의 개수를 나타내는 신택스 num_slices_in_tile_minus1[i]가 시그날링될 수 있다. 신택스 num_slices_in_tile_minus1[i]는 i번째 타일이 포함하는 슬라이스의 개수에서 1을 차분한 값을 나타낸다.
또는, 명시적으로 시그날링되어야 하는 슬라이스 높이의 개수를 나타내는 정보를 나타내는 신택스 num_exp_slices_in_tile[i]가 비트스트림을 통해 시그날링될 수 있다. 신택스 num_exp_slices_in_tile[i]는 타일이 포함하는 슬라이스의 개수와 동일 또는 작은 값을 가질 수 있다.
신택스 num_exp_slices_in_tile[i]가 0인 것은, 타일이 복수개의 슬라이스들로 분할되지 않음을 나타낸다. 신택스 num_exp_slices_in_tile[i]가 0보다 큰 것은, 타일이 복수개의 슬라이스들로 분할될 수 있음을 나타낸다.
신택스 num_exp_slices_in_tile[i] 개수 만큼 슬라이스의 높이를 나타내는 정보가 시그날링될 수 있다. 일 예로, 신택스 num_exp_slices_in_tile이 1보다 큰 경우, 타일 내 j번째 슬라이스의 높이를 나타내는 신택스 exp_slice_height_in_ctu_minus1[j]가 시그날링할 수 있다.
슬라이스의 인덱스 j가 높이가 명시적으로 시그날링되는 슬라이스의 개수보다 작은 경우, 슬라이스 j의 너비는 비트스트림을 통해 시그날링되는 신택스 exp_slice_height_in_ctu_minus1[j]를 기초로 결정될 수 있다. 반면, 슬라이스의 인덱스 k가 높이가 명시적으로 시그날링되는 슬라이스의 개수 이상인 경우, 슬라이스 k의 높이는 가장 마지막으로 시그날링된 신택스 exp_slice_height_in_ctu_minus1[l]를 기초로 결정될 수 있다. 여기서, l은 마지막으로 높이가 시그날링된 슬라이스의 인덱스를 나타내고, k보다 작은 정수일 수 있다.
일 예로, 타일의 높이에서 이전 슬라이스들의 높이를 차분한 값이 신택스 exp_slice_height_in_ctu_minus1[l]에 1을 가산한 값 이상일 경우, 슬라이스 k의 높이는 신택스 exp_slice_height_in_ctu_minus1[l]에 1을 가산한 값으로 설정될 수 있다. 반면, 타일의 높이에서 이전 슬라이스들의 높이를 차분한 값이 신택스 exp_slice_height_in_ctu_minus1[l]에 1을 가산한 값보다 작을 경우, 타일의 높이에서 이전 슬라이스들의 높이를 차분한 차분 값을 슬라이스 k의 높이로 설정할 수 있다.
즉, 높이가 명시적으로 시그날링되는 슬라이스들을 제외한 잔여 슬라이스들의 높이는, 높이가 명시적으로 시그날링되는 슬라이스들 중 마지막 슬라이스의 높이보다 작거나 같은 값을 가질 수 있다.
현재 픽처 내 타일 열의 개수가 1개인 경우 신택스 slice_width_in_tiles_minus1의 부호화가 생략될 수 있다. 또한, 현재 픽처 내 타일 행의 개수가 1개인 경우 신택스 slice_height_in_tiles_minus1의 부호화가 생략될 수 있다.
또는, 슬라이스의 너비를 나타내는 정보 또는 슬라이스의 높이를 나타내는 정보 중 적어도 하나의 부호화를 생략할 수 있다.
일 예로, 슬라이스의 너비를 나타내는 신택스 slice_width_in_tiles_minus1의 부호화를 생략하고, 인접 슬라이스 내 소정 위치 타일과의 거리를 슬라이스의 너비로 설정할 수 있다. 구체적으로, 신택스 top_left_brick_idx_delta[i]에 의해, i번째 슬라이스의 우측에 인접하는 i+1번째 슬라이스의 좌상단 타일이 특정될 수 있다. i번째 슬라이스의 너비는 i번째 슬라이스 내 좌상단 타일의 x좌표(예컨대, 좌상단 샘플의 x좌표)와, i+1번째 슬라이스 내 좌상단 타일의 x좌표(예컨대, 좌상단 샘플의 x좌표) 사이의 차분으로 유도될 수 있다.
또는, 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1의 부호화를 생략하고, 인접 슬라이스 내 소정 위치 타일과의 거리를 슬라이스의 너비로 설정할 수 있다. 구체적을, 신택스 top_left_brick_idx_delta[j-1]에 의해, i번째 슬라이스의 하단에 위치하는 j번째 슬라이스의 좌상단 타일이 특정될 수 있다. i번째 슬라이스의 높이는 i번째 슬라이스 내 좌상단 타일의 y좌표(예컨대, 좌상단 샘플의 y좌표)와 j번째 슬라이스 내 좌상단 타일의 y좌표(예컨대, 좌상단 샘플의 y좌표) 사이의 차분으로 유도될 수 있다.
또는, 사각 형태의 슬라이스를 정의하는데 있어서, 차분값 정보가 이용되는지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 차분값 정보의 이용 여부를 나타내는 tile_idx_delta_present_flag가 비트스트림을 통해 시그날링될 수 있다. 신택스 tile_idx_delta_present_flag의 값이 1인 것은 타일 인덱스의 차분값을 나타내는 신택스가 부호화되어 시그날링됨을 나타낸다. 일 예로, 신택스 tile_idx_delta_present_flag의 값이 1인 경우, i번째 슬라이스는 슬라이스의 크기를 나타내는 신택스 slice_width_in_tiles_minus1[i] 및 신택스 slice_height_in_tiles_minus1[i]과 슬라이스 내 좌측 상단 타일의 위치 또는 우측 상단 타일의 위치를 결정하기 위한 차분값 정보(예컨대, tile_idx_delta[i])에 의해 정의될 수 있다.
신택스 tile_idx_delta_present_flag의 값이 0인 경우, i번째 슬라이스의 위치/크기는 슬라이스의 크기를 나타내는 신택스 slice_width_in_tiles_minus1[i] 및 신택스 slice_height_in_tiles_minus1[i]에 의해 정의될 수 있다. 신택스 tile_idx_delta_prsent_flag의 값이 0인 경우, 현재 픽처의 좌측 경계에 접하는 슬라이스의 우측에 인접하는 슬라이스는, 좌측 경계에 접하는 슬라이스와 동일한 높이를 갖도록 설정될 수 있다. 이에 따라, 현재 픽처의 좌측 경계에 접하는 슬라이스에 대해서만 슬라이스의 높이를 나타내는 정보를 시그날링하고, 현재 픽처의 좌측 경계에 접하지 않는 슬라이스에 대해서는 슬라이스의 높이를 나타내는 정보의 시그날링을 생략할 수 있다.
슬라이스 내 타일의 인덱스에 기초하여, 슬라이스의 크기를 나타내는 정보의 시그날링 여부를 결정할 수 있다. 일 예로, 표 13은 슬라이스 내 타일 인덱스에 기초하여, 슬라이스의 크기를 결정하는 정보의 시그날링 여부가 결정되는 신택스 구조를 나타낸 것이다.
pic_parameter_set_rbsp( ) { Descriptor
if( NumTilesInPic > 1 )
rect_slice_flag u(1)
if( rect_slice_flag )
single_slice_per_subpic_flag u(1)
if( rect_slice_flag && !single_slice_per_subpic_flag ) {
num_slices_in_pic_minus1 ue(v)
if( num_slices_in_pic_minus1 > 0 )
tile_idx_delta_present_flag u(1)
for( i = 0; i < num_slices_in_pic_minus1; i++ ) {
if( NumTileColumns > 1 && (SliceTopLeftTileIdx[ i ] % NumTileColumns) != ((NumTileColumns -1 )))
slice_width_in_tiles_minus1[ i ] ue(v)
if( NumTileRows > 1 && (SliceTopLeftTileIdx[ i ] / NumTileColumns != NumTileRows-1) && ( tile_idx_delta_present_flag | | tileIdx % NumTileColumns = = 0 ) )
slice_height_in_tiles_minus1[ i ] ue(v)
if( slice_width_in_tiles_minus1[ i ] = = 0 && slice_height_in_tiles_minus1[ i ] = = 0 && RowHeight[ SliceTopLeftTileIdx[ i ] / NumTileColumns ] > 1 ) {
num_exp_slices_in_tile[ i ] ue(v)
numExpSlicesInTile = num_exp_slices_in_tile[ i ]
for( j = 0; j < numExpSlicesInTile; j++ )
exp_slice_height_in_ctus_minus1[ j ] ue(v)
i += NumSlicesInTile[ i ]
}
if( tile_idx_delta_present_flag && i < num_slices_in_pic_minus1 )
tile_idx_delta[ i ] se(v)
}
}
표 13에서, 변수 SliceTopLeftTileIdx[i]는 i번째 슬라이스가 포함하는 타일의 인덱스를 나타낸다. 구체적으로, i번째 슬라이스 내 기 정의된 위치의 타일의 인덱스를 변수 SliceTopLeftTileIdx[i]로 설정할 수 있다. 기 정의된 위치의 타일은, 좌상단 타일을 나타낼 수 있다.
변수 NumTileColumns은 픽처가 포함하는 타일 열들의 개수를 나타낸다. 일 예로, i번째 슬라이스 내 좌상단 타일의 인덱스와 변수 NumTileColums에서 1을 차분한 값 사이의 모듈로 연산(%)에 기초하여, 좌상단 타일이 속하는 타일 열의 위치가 결정될 수 있다. 일 예로, 상기 모듈로 연산에 의한 결과값 n은 좌상단 타일이 인덱스가 n인 타일 열에 속함을 나타낸다. 즉, i번째 슬라이스의 좌상단 타일 인덱스 SliceTopLeftTileIdx[i]를 변수 NumTileColumn으로 나누었을 때, 나머지의 값이 (NumTileColumns-1)인 경우, i번째 슬라이스가 마지막 타일 열에 포함된 것으로 판단할 수 있다.
슬라이스의 좌상단 타일의 위치에 기초하여, 슬라이스 크기를 나타내는 정보의 시그날링 여부를 결정할 수 있다. 구체적으로, 슬라이스의 좌상단 타일이 속한 타일 열이 픽처 내 최우측 타일 열에 해당하는지 여부에 기초하여, 슬라이스 크기를 나타내는 정보의 시그날링 여부를 결정할 수 있다.
일 예로, 슬라이스 내 좌상단 타일이 픽처 내 최우측 타일 열에 소속된 경우, 슬라이스의 너비를 나타내는 신택스 slice_width_in_tiles_minus1[i]의 시그날링이 생략될 수 있다. 일 예로, 표 13과 같이 i번째 슬라이스의 좌상단 타일 인덱스 SliceTopLeftTileIdx[i]를 변수 NumTileColumn으로 모듈로 연산을 수행한 결과가 가 픽처 내 타일 열의 개수 NumTileColumns에서 1을 차분한 값과 동일한 경우, 신택스 slice_width_in_tiles_minus1[i]의 부호화/복호화가 생략될 수 있다. 이 경우, 신택스 slice_width_in_tiles_minus1[i]의 값은 0으로 간주될 수 있다.
i번째 슬라이스 내 좌상단 타일의 인덱스와 변수 NumTileColumns 사이의 나눗셈 연산에 기초하여, 좌상단 타일이 속하는 타일 행의 위치가 결정될 수 있다. 일 예로, 나눗셈 연산의 몫이 m인 것은, 좌상단 타일이 인덱스 m인 타일 행에 포함됨을 나타낸다. 즉, 표 13과 같이 i번째 슬라이스의 좌상단 타일 인덱스 SliceTopLeftTileIdx[i]를 변수 NumTileColumn으로 나누었을 때, 몫이 (NumTileRows-1)인 경우, i번째 슬라이스가 마지막 타일 행에 포함된 것으로 판단할 수 있다.
슬라이스 내 좌상단 타일이 픽처 내 최하단 타일 행에 소속된 경우, 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus[i]의 시그날링이 생략될 수 있다. 일 예로, 나눗셈 연산의 결과가 픽처 내 타일 행의 개수 NumTileRows에서 1을 차분한 값과 동일한 경우, 신택스 slice_height_in_tiles_minus1[i]의 부호화/복호화가 생략될 수 있다. 이 경우, 신택스 slice_height_in_tiles_minus1[i]의 값은 0으로 간주될 수 있다.
슬라이스 내 좌상단 타일이 픽처 내 최우측 열에 속하는 동시에 최하단 행에 속하는 경우, 신택스 slice_width_in_tiles_minus1[i] 및 신택스 slice_height_in_tiles_minus1[i]의 부호화/복호화가 모두 생략될 수 있다. 이 경우, 두 신택스들의 값은 모두 0으로 간주될 수 있다.
슬라이스 내 좌상단 타일이 픽처 내 최하단 행에 포함되어 있지 않은 경우, 슬라이스 내 좌상단 타일이 픽처 내 최좌측 열에 소속되었는지 여부 및/또는 타일 인덱스간 차분 정보가 부호화되었는지 여부 중 적어도 하나를 고려하여, 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1[i]의 부호화/복호화 여부가 결정될 수 있다.
일 예로, 슬라이스 내 좌상단 타일이 픽처 내 최하단 행에 포함되지 않았더라도, 타일 인덱스 차분이 부호화된 경우(예컨대, tile_idx_delta_present_flag가 1인 경우) 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1[i]의 부호화/복호화가 생략될 수 있다.
또는, 슬라이스 내 좌상단 타일이 픽처 내 최하단 행에 속하지 않았더라도, 좌상단 타일이 슬라이스 내 최좌측 열에 속하지 않은 경우, 신택스 slice_height_in_tiles_minus1[i]의 부호화/복호화가 생략될 수 있다.
슬라이스 내 좌상단 타일이 픽처 내 최하단 행에 속하지 않았지만, 신택스 slice_height_in_tiles_minus1[i]의 부호화/복호화가 생략된 경우, 상기 신택스는 이전 슬라이스의 높이 slice_height_in_tiles_minus[i-1]과 동일하게 설정될 수 있다.
표 14는 신택스 slice_width_in_tiles_minus1[i] 및 신택스 slice_height_in_tiles_minus1[i]에 대한 시맨틱스(semantics)를 나타낸다.
slice_width_in_tiles_minus1[ i ] plus 1 specifies the width of the i-th rectangular slice in units of tile columns. The value of slice_width_in_tiles_minus1[ i ] shall be in the range of 0 to NumTileColumns - 1, inclusive.When slice_width_in_tiles_minus1[ i ] is not present, the following applies:- When i is less than num_slices_in_pic_minus1 and NumTileColumns is equal to 1, or (SliceTopLeftTileIdx[i] % NumTileColumns) is euqal to NumTileColumns-1, the value of slice_width_in_tiles_minus1[ i ] is inferred to be equal to 0. slice_height_in_tiles_minus1[ i ] plus 1 specifies the height of the i-th rectangular slice in units of tile rows. The value of slice_height_in_tiles_minus1[ i ] shall be in the range of 0 to NumTileRows - 1, inclusive.When slice_height_in_tiles_minus1[ i ] is not present, the following applies:- If SliceTopLeftTileIdx[i] / NumTilColumns is equal to NumTileRows-1, it is inferred to be equal to 0.- Otherwise, if i is less than num_slices_in_pic_minus1 and slice_height_in_tiles_minus1[ i ] is not present, it is inferred to be equal to NumTileRows = = 1 ? 0 : slice_height_in_tiles_minus1[ i - 1 ].
표 14의 예에서, 타일 인덱스의 차분을 나타내는 정보가 부호화되었는지 여부를 나타내는 신택스 tile_idx_delta_present_flag는 현재 픽처에 포함된 슬라이스의 개수가 1개 이상인 경우에 부호화/복호화되는 것으로 예시되었다.
i번째 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1[i] 및 i번째 슬라이스의 너비를 나타내는 신택스 slice_width_in_tiles_minus1[i]의 값이 모두 0인 경우, i번째 슬라이스를 포함하는 타일의 분할 형태를 결정하기 위한 신택스 num_exp_slices_in_tile[i]가 추가 부호화/복호화될 수 있다. 단, i번째 슬라이스를 포함하는 타일의 높이가 1인 경우, 타일은 복수개의 슬라이스들로 분할될 수 없다. 이에 따라, i번째 슬라이스를 포함한는 타일의 높이가 1인 경우, 신택스 num_exp_slices_in_tile[i]의 부호화/복호화를 생략하고, 그 값을 0으로 추정할 수 있다.
픽처 내 슬라이스의 개수가 2개인 경우, 픽처를 수평 방향 또는 수직 방향으로 분할함으로써, 직사각형 형태의 슬라이스 2개를 생성할 수 있다.
도 38은 픽처가 2개의 슬라이스들로 구성된 경우의 예를 나타낸 도면이다.
도 38의 (a)는 픽처가 수평 방향으로 분할된 예를 나타내고, 도 38의 (b)는 픽처가 수직 방향으로 분할된 예를 나타낸다.
도시된 예에서와 같이, 픽처가 2개의 슬라이스들만을 포함하는 경우, 슬라이스의 너비를 나타내는 신택스 또는 슬라이스의 높이를 나타내는 신택스로만 2개의 슬라이스들 각각을 구분할 수 있다.
일 예로, 도 38의 (a)에 도시된 예에서와 같이, 픽처를 수평 방향으로 분할하는 경우, 인덱스 0인 슬라이스의 너비를 나타내는 신택스 slice_width_in_tiles_minus1[0] 및 인덱스 0인 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1[0]에 기초하여, 슬라이스 0를 특정할 수 있다. 슬라이스 1에 대해서는, 슬라이스의 크기를 결정하기 위한 신택스의 부호화/복호화를 생략하고, 픽처 내 슬라이스 0를 제외한 잔여 영역을 슬라이스 1로 설정할 수 있다. 또한, 슬라이스 1의 좌상단 타일의 인덱스는, 슬라이스 0에 포함된 타일 행의 개수와 타일 열의 개수의 곱에 1을 차분하여 유도할 수 있다.
도 38의 (b)에 도시된 예에서와 같이, 픽처를 수직 방향으로 분할하는 경우, 인덱스 0인 슬라이스의 너비를 나타내는 신택스 slice_width_in_tiles_minus1[0] 및 인덱스 0인 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1[0]에 기초하여, 슬라이스 0를 특정할 수 있다. 슬라이스 1에 대해서는, 슬라이스의 크기를 결정하기 위한 신택스의 부호화/복호화를 생략하고, 픽처 내 슬라이스 0를 제외한 잔여 영역을 슬라이스 1로 설정할 수 있다. 또한, 슬라이스 1의 좌상단 타일의 인덱스는, 슬라이스 1에 포함된 타일 행의 개수와 동일하게 유도할 수 있다.
위와 같이, 픽처에 2개의 슬라이스들만이 포함된 경우, 타일 인덱스의 차분을 나타내는 정보의 부호화를 생략하더라도, 모든 슬라이스 내 좌상단 타일의 인덱스가 유도될 수 있다. 이에 따라, 픽처에 포함되는 슬라이스들의 개수가 2개 이하인 경우, 타일 인덱스 차분 정보의 부호화/복호화 여부를 나타내는 신택스 tile_idx_delta_present_flag의 부호화/복호화를 생략하고, 그 값을 0으로 유도할 수 있다. 이에 따라, 슬라이스 별 tile_idx_delta[i]의 부호화/복호화도 생략될 수 있다.
표 15는 현재 픽처가 포함하는 슬라이스의 개수가 2개 이하인 경우, 신택스 tile_idx_delta_present_flag의 부호화/복호화가 생략되는 신택스 구조를 나타낸다.
pic_parameter_set_rbsp( ) { Descriptor
if( NumTilesInPic > 1 )
rect_slice_flag u(1)
if( rect_slice_flag )
single_slice_per_subpic_flag u(1)
if( rect_slice_flag && !single_slice_per_subpic_flag ) {
num_slices_in_pic_minus1 ue(v)
if( num_slices_in_pic_minus1 > 1 )
tile_idx_delta_present_flag u(1)
for( i = 0; i < num_slices_in_pic_minus1; i++ ) {
if( NumTileColumns > 1)
slice_width_in_tiles_minus1[ i ] ue(v)
if( NumTileRows > 1 && ( tile_idx_delta_present_flag | | SliceTopLeftTileIdx[i] % NumTileColumns = = 0 ) )
slice_height_in_tiles_minus1[ i ] ue(v)
if( slice_width_in_tiles_minus1[ i ] = = 0 && slice_height_in_tiles_minus1[ i ] = = 0 && RowHeight[ SliceTopLeftTileIdx[ i ] / NumTileColumns ] > 1 ) {
num_exp_slices_in_tile[ i ] ue(v)
numExpSlicesInTile = num_exp_slices_in_tile[ i ]
for( j = 0; j < numExpSlicesInTile; j++ )
exp_slice_height_in_ctus_minus1[ j ] ue(v)
i += NumSlicesInTile[ i ]
}
if( tile_idx_delta_present_flag && i < num_slices_in_pic_minus1 )
tile_idx_delta[ i ] se(v)
}
}
표 15의 예에서와 같이, 신택스 tile_idx_delta_present_flag는 신택스 num_slices_in_pic_minus1이 1보다 큰 경우에 한하여 부호화/복호화될 수 있다.
픽처 내 타일 열의 개수가 1개인 경우 또는 타일 행의 개수가 1개인 경우에도, 타일 인덱스 차분 정보를 이용하지 않더라도, 각 슬라이스 내 좌상단 타일 위치를 식별할 수 있다.
도 39는 픽처 내 타일 열 또는 타일 행의 개수가 1개인 경우를 예시한 도면이다.
도 39의 (a)는 픽처가 1개의 타일 열을 포함하는 경우를 예시한 것이고, 도 39의 (b)는 픽처가 1개의 타일 행을 포함하는 경우를 예시한 것이다.
픽처가 1개의 타일 열을 포함하는 경우, 슬라이스의 좌상단 타일의 인덱스는 이전 슬라이스의 높이를 기초로 유도될 수 있다. 일 예로, 도 39의 (a)에 도시된 예에서와 같이, 첫번째 타일이 2개의 슬라이스들로 분할되었다면, 2개의 슬라이스 중 첫번째 슬라이스 slice0에 대한 너비를 나타내는 신택스 slice_width_in_tiles_minus1[0] 및 높이를 나타내는 신택스 slice_width_in_tiles_minus1[0]는 모두 0으로 설정된다. 두번째 슬라이스 slice1는 첫번째 슬라이스 slice0와 동일한 타일에 속하므로, 두번째 슬라이스 slice1에 대해서는, 신택스 slice_width_in_tiles_minus1[i] 및 높이를 나타내는 신택스 slice_width_in_tiles_minus1[i]의 부호화/복호화가 생략될 수 있다.
세번째 슬라이스의 좌측 타일 인덱스는 이전 슬라이스들에 대해 시그날링된 타일 행의 개수들로 설정될 수 있다. 일 예로, 슬라이스 0에 대해 시그날링되는 신택스 slice_height_in_tiles_minus1[0]로부터, 1개의 타일 행이 슬라이스로 편성됨을 인지할 수 있으므로, 슬라이스 2의 좌상단 타일 행의 인덱스는 1로 설정될 수 있다.
슬라이스 3의 좌상단 타일 행의 인덱스는 이전 슬라이스들의 타일 행의 높이를 기초로 유도될 수 있다. 일 예로, 슬라이스 0에 대해 시그날링되는 신택스 slice_height_in_tiles_minus1[0] 및 슬라이스 2에 대해 시그날링되는 신택스 slice_height_width_in_tiles_minus1[2]로부터, 총 3개의 타일 행이 슬라이스들로 편성됨을 인지할 수 있으므로, 슬라이스 3의 좌상단 타일 행의 인덱스는 3으로 설정될 수 있다.
즉, 픽처가 1개의 타일 열을 포함하는 경우, 이전 슬라이스들이 점유하는 타일 행의 개수가 다음 슬라이스의 좌상단 타일 인덱스로 결정될 수 있다.
픽처가 1개의 타일 행을 포함하는 경우, 슬라이스의 좌상단 타일의 인덱스는 이전 슬라이스의 너비를 기초로 유도될 수 있다. 일 예로, 도 39의 (b)에 도시된 예에서와 같이, 첫번째 타일이 1개의 슬라이스로 설정된 경우, 첫번째 슬라이스 slice0에 대한 너비를 나타내는 신택스 slice_width_in_tiles_minus1[0] 및 높이를 나타내는 신택스 slice_width_in_tiles_minus1[0]는 모두 0으로 설정된다.
두번째 슬라이스의 좌측 타일 인덱스는 이전 슬라이스에 대해 시그날링된 타일 열의 개수들로 설정될 수 있다. 일 예로, 슬라이스 0에 대해 시그날링되는 신택스 slice_width_in_tiles_minus1[0]로부터, 1개의 타일 열이 슬라이스로 편성됨을 인지할 수 있으므로, 슬라이스 1의 좌상단 타일 행의 인덱스는 1로 설정될 수 있다.
슬라이스 2의 좌상단 타일 행의 인덱스는 이전 슬라이스들의 타일 열의 높이를 기초로 유도될 수 있다. 일 예로, 슬라이스 0에 대해 시그날링되는 신택스 slice_width_in_tiles_minus1[0] 및 슬라이스 1에 대해 시그날링되는 신택스 slice_width_width_in_tiles_minus1[1]로부터, 총 3개의 타일 열이 슬라이스들로 편성됨을 인지할 수 있으므로, 슬라이스 2의 좌상단 타일 행의 인덱스는 3으로 설정될 수 있다.
즉, 픽처가 1개의 타일 행을 포함하는 경우, 이전 슬라이스들이 점유하는 타일 열의 개수가 다음 슬라이스의 좌상단 타일 인덱스로 결정될 수 있다.
위와 같이, 픽처가 1개의 타일 열 또는 1개의 타일 행만으로 구성된 경우, 타일 인덱스 차분 정보 없이도, 각 슬라이스의 좌상단 타일의 인덱스를 특정할 수 있다. 이에 따라, 픽처에 포함되는 타일 열 또는 타일 행의 개수가 1개인 경우, 타일 인덱스 차분 정보의 부호화/복호화 여부를 나태는 신택스 tile_idx_delta_present_flag의 부호화/복호화를 생략하고, 그 값을 0으로 유도할 수 있다. 이에 따라, 슬라이스 별 tile_idx_delta[i]의 부호화/복호화도 생략될 수 있다.
표 16은 현재 픽처가 포함하는 타일 열 또는 타일 행의 개수가 1개인 경우, 신택스 tile_idx_delta_present_flag의 부호화/복호화가 생략되는 신택스 구조를 나타낸다.
pic_parameter_set_rbsp( ) { Descriptor
...
if( !no_pic_partition_flag ) {
...
if( NumTilesInPic > 1 )
rect_slice_flag u(1)
if( rect_slice_flag )
single_slice_per_subpic_flag u(1)
if( rect_slice_flag && !single_slice_per_subpic_flag ) {
num_slices_in_pic_minus1 ue(v)
if( num_slices_in_pic_minus1 > 0 && NumTileColumns > 1 && NumTileRows > 1)
tile_idx_delta_present_flag u(1)
...
}
앞서 설명한 바와 같이, 슬라이스의 너비를 나타내는 신택스 slice_width_in_tiles_minus1[i] 및 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1[i]가 0인 것은, 슬라이스가 하나의 타일로 구성되어 있음을 나타내거나, 하나의 타일이 복수의 슬라이스들로 구성됨을 나타낼 수 있다.
하나의 타일이 복수개의 슬라이스들로 구성된 경우, 상기 복수개의 슬라이스들의 높이는 동일한 값을 갖거나, 상기 복수개의 슬라이스들 중 가장 마지막 슬라이스를 제외한 슬라이스들이 동일한 높이를 갖도록 설정할 수 있다. 이 경우, 타일 내 첫번째 슬라이스에 대해서만 높이 정보를 시그날링할 수 있다.
픽처 내 슬라이스들의 개수가 2개인 경우, 두 슬라이스들 사이의 타일 인덱스 차분만으로도 각 슬라이스의 크기 및 위치가 결졍될 수 있다. 이에 따라, 타일 인덱스 차분이 부호화되었음을 나타내는 신택스 tile_idx_delta_present_flag의 값이 1이고, 픽처 내 슬라이스들의 개수를 나타내는 신택스 num_slice_in_pic_minus1의 값이 1인 경우, 슬라이스의 너비를 나타내는 신택스 slice_width_in_tiles_minus1 및 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1의 부호화/복호화가 생략될 수 있다. 표 17은 이에 대한 예시를 나타낸다.
pic_parameter_set_rbsp( ) { Descriptor
if( NumTilesInPic > 1 )
rect_slice_flag u(1)
if( rect_slice_flag )
single_slice_per_subpic_flag u(1)
if( rect_slice_flag && !single_slice_per_subpic_flag ) {
num_slices_in_pic_minus1 ue(v)
if( num_slices_in_pic_minus1 > 0 )
tile_idx_delta_present_flag u(1)
for( i = 0; i < num_slices_in_pic_minus1; i++ ) {
if( NumTileColumns > 1 || ! (tile_idx_delta_present_flag && num_slices_in_pic_minus1 ==1))
slice_width_in_tiles_minus1[ i ] ue(v)
if( NumTileRows > 1 && ( tile_idx_delta_present_flag | | SliceTopLeftTileIdx[ i ] % NumTileColumns = = 0 ) || ! (tile_idx_delta_present_flag && num_slices_in_pic_minus1 ==1)
slice_height_in_tiles_minus1[ i ] ue(v)
if( slice_width_in_tiles_minus1[ i ] = = 0 && slice_height_in_tiles_minus1[ i ] = = 0 && RowHeight[ SliceTopLeftTileIdx[ i ] / NumTileColumns ] > 1 ) {
num_exp_slices_in_tile[ i ] ue(v)
numExpSlicesInTile = num_exp_slices_in_tile[ i ]
for( j = 0; j < numExpSlicesInTile; j++ )
exp_slice_height_in_ctus_minus1[ j ] ue(v)
i += NumSlicesInTile[ i ]
}
if( tile_idx_delta_present_flag && i < num_slices_in_pic_minus1 )
tile_idx_delta[ i ] se(v)
}
}
}
표 17에 예시된 바와 같이, 신택스 tile_idx_delta_present_flag의값이 1이고, num_slices_in_pic_minus1이 1인 경우, 신택스 slice_width_in_tiles_minus1[i] 및 신택스 slice_height_in_tiles_minus1[i]의 부호화/복호화가 생략될 수 있다.
즉, 신택스 tile_idx_delta_present_flag의 값이 0인 경우, 또는 num_slices_in_pic_minus1의 값이 1이 아닌 경우, 신택스 slice_width_in_tiles_minus1[i] 및/또는 신택스 slice_height_in_tiles_minus1[i]가 부호화/복호화될 수 있다.
신택스 slice_width_in_tiles_minus1[i] 및 신택스 slice_height_in_tiles_minus1[i]의 부호화/복호화가 생략된 경우, 복호화기는 두 슬라이스들 간 타일 인덱스 차분, 타일 열의 개수 또는 타일 행의 개수 중 적어도 하나를 고려하여, 각 슬라이스의 높이 또는 너비를 유도할 수 있다.
일 예로, 두 슬라이스들 간 타일 인덱스 차분을 나타내는 신택스 tile_idx_delta[i]의 값이 픽처 내 타일 열의 개수를 나타내는 변수 NumTileColumns보다 작은 경우, 신택스 slice_width_in_tiles_minus1[i]의 값을, 신택스 tile_idx_delta[i]가 가리키는 차분값에서 1을 차분한 값으로 추정할 수 있다. 또한, 신택스 slice_height_in_tiles_minus1[i]의 값을, 타일 행의 개수를 나타내는 변수 NumTileRows에서 1을 차분한 값으로 추정할 수 있다. 즉, 픽처 내 첫번째 슬라이스의 너비는 신택스 tile_idx_delta[0]와 동일한 값으로 설정되고, 첫번째 슬라이스의 높이는 타일 열의 개수와 동일하게 설정될 수 있다.
일 예로, 두 슬라이스들 간 타일 인덱스 차분을 나타내는 신택스 tile_idx_delta[i]의 값이 픽처 내 타일 열의 개수를 나타내는 변수 NumTileColumns와 같거나 큰 경우, 신택스 slice_width_in_tiles_minus1[i]의 값을, 타일 열의 개수를 나타내는 변수 NumTileColumns에서 1을 차분한 값으로 추정할 수 있다. 또한, 신택스 slice_height_in_tiles_minus1[i]의 값을 신택스 tile_idx_delta[i]를 타일 열의 개수 NumTileColumns으로 나눈 값(예컨대, tile_idx_delta[i]/NumTileColumn)으로 추정할 수 있다. 즉, 픽처 내 첫번째 슬라이스의 너비는 타일 열의 개수와 동일한 값으로 설정되고, 첫번째 슬라이스의 높이는 신택스 tile_idx_delta[0]를 변수 NumTileColumn으로 나누어 획득되는 몫과 동일한 값으로 설정될 수 있다.
i번째 슬라이스의 크기를 나타내는 신택스 slice_width_in_tiles_minus1[i] 및 슬라이스의 높이를 나타내는 신택스 slice_height_in_tiles_minus1[i]의 값이 모두 0인 경우, i번째 슬라이스를 포함하는 타일의 분할 형태를 결정하기 위한 정보, 예컨대, 신택스 num_exp_slice_in_tile[i] 및/또는 exp_slice_height_in_ctus_minus1[ j ]를 부호화/복호화할 수 있다.
이때, 타일 행의 높이에 기초하여, 타일의 분할 형태를 결정하기 위한 정보의 부호화/복호화 여부를 결정할 수 있다.
픽처 내 타일들의 개수에 기초하여, 신택스 tile_idx_delta[i]의 부호화/복호화 여부를 결정할 수 있다. 표 18은, 위 설명에 대한 예시를 나타낸다.
pic_parameter_set_rbsp( ) { Descriptor
if( NumTilesInPic > 1 )
rect_slice_flag u(1)
if( rect_slice_flag )
single_slice_per_subpic_flag u(1)
if( rect_slice_flag && !single_slice_per_subpic_flag ) {
num_slices_in_pic_minus1 ue(v)
if( num_slices_in_pic_minus1 > 1 )
tile_idx_delta_present_flag u(1)
for( i = 0; i < num_slices_in_pic_minus1; i++ ) {
if( SliceTopLeftTileIdx[ i ] % NumTileColumns != NumTileColumns - 1 )
slice_width_in_tiles_minus1[ i ] ue(v)
if( SliceTopLeftTileIdx[ i ] / NumTileColumns != NumTileRows - 1 && ( pps_tile_idx_delta_present_flag | | SliceTopLeftTileIdx[ i ] % NumTileColumns = = 0 ) )
slice_height_in_tiles_minus1[ i ] ue(v)
if( SliceTopLeftTileIdx[ i ] / NumTileColumns != NumTileRows - 1 && ( pps_tile_idx_delta_present_flag | | SliceTopLeftTileIdx[ i ] % NumTileColumns = = 0 ) )
num_exp_slices_in_tile[ i ] ue(v)
numExpSlicesInTile = num_exp_slices_in_tile[ i ]
for( j = 0; j < numExpSlicesInTile; j++ )
exp_slice_height_in_ctus_minus1[i] [ j ] ue(v)
i += NumSlicesInTile[ i ]
}
if( tile_idx_delta_present_flag && i < num_slices_in_pic_minus1 && NumTileInPic >1 )
tile_idx_delta[ i ] se(v)
}
}
}
표 18에서, 변수 NumTileInPic는 픽처 내 슬라이스의 개수를 나타낸다. 픽처 내 타일들의 개수가 문턱값 이하인 경우, 타일 인덱스 차분값을 나타내는 신택스 tile_idx_delta[i]의 부호화/복호화를 생략할 수 있다. 문턱값은, 1, 2 또는 3과 같은 자연수일 수 있다. 표 18에서는, 문턱값이 1인 것으로 예시되었다. 즉, 픽처 내 타일이 1개인 경우에는, 하나의 타일을 복수개의 슬라이스로 분할하는 것만이 가능하다. 이에 따라, 모든 슬라이스에 대한 신택스 차분값이 0이므로, 신택스 tile_idx_delta[i]의 부호화/복호화를 생략할 수 있다.
다른 예로, 픽처 내 타일의 개수에 기초하여, 타일 인덱스 차분값의 복호화 여부를 나타내는 신택스 tile_idx_delta_present_flag의 부호화/복호화 여부를 결정할 수도 있다. 일 예로, 픽처 내 타일들의 개수가 문턱값 이하인 경우, 신택스 tile_idx_delta_present_flag의 부호화/복호화가 생략될 수 있다. 문턱값은 1, 2, 또는 3과 같은 자연수일 수 있다. 신택스 tile_idx_delta_present_flag의 부호화/복호화가 생략된 경우, 상기 신택스의 값이 0인 것으로 추정할 수 있다. 이에 따라, 타일 인덱스 차분값을 나타내는 신택스 tile_idx_delta[i]도 부호화/복호화되지 않을 수 있다.
상술한 실시예들에서, 타일의 인덱스 대신 코딩 트리 유닛의 인덱스에 기초하여 슬라이스를 정의하는 것도 가능하다.
상술한 예에서는 래스터 스캔 순서를 따라 타일들에 순번을 부여하여, 슬라이스가 정의되는 것으로 가정하였다. 다른 예로, 수직 스캔, 수평 스캔 또는 대각 스캔을 따라 타일들에 순번을 부여하여, 슬라이스를 정의할 수도 있다.
복호화 과정 또는 부호화 과정을 중심으로 설명된 실시예들을, 부호화 과정 또는 복호화 과정에 적용하는 것은, 본 발명의 범주에 포함되는 것이다. 소정의 순서로 설명된 실시예들을, 설명된 것과 상이한 순서로 변경하는 것 역시, 본 발명의 범주에 포함되는 것이다.
상술한 실시예는 일련의 단계 또는 순서도를 기초로 설명되고 있으나, 이는 발명의 시계열적 순서를 한정한 것은 아니며, 필요에 따라 동시에 수행되거나 다른 순서로 수행될 수 있다. 또한, 상술한 실시예에서 블록도를 구성하는 구성요소(예를 들어, 유닛, 모듈 등) 각각은 하드웨어 장치 또는 소프트웨어로 구현될 수도 있고, 복수의 구성요소가 결합하여 하나의 하드웨어 장치 또는 소프트웨어로 구현될 수도 있다. 상술한 실시예는 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
본 발명은 영상을 부호화/복호화하는 전자 장치에 적용될 수 있다.

Claims (11)

  1. 타일 인덱스 차분값 정보가 존재하는지 여부를 나타내는 제1 플래그를 복호화하는 단계;
    제1 슬라이스에 대한 크기 정보를 복호화하는 단계;
    상기 제1 플래그가 참인 경우, 상기 제1 슬라이스에 대한 타일 인덱스 차분값 정보를 복호화하는 단계; 및
    상기 타일 인덱스 차분값 정보에 기초하여, 제2 슬라이스의 좌상단에 위치하는 제2 타일의 인덱스를 결정하는 단계를 포함하되,
    상기 타일 인덱스 차분값 정보는, 상기 제1 슬라이스의 좌상단에 위치하는 제1 타일의 인덱스와 상기 제2 타일의 인덱스 사이의 차분을 나타내고,
    상기 제2 슬라이스에 대한 크기 정보를 복호화할 것인지 여부는, 상기 제2 슬라이스 내 상기 제2 타일의 인덱스를 기초로 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  2. 제1 항에 있어서,
    상기 크기 정보는, 너비 정보 또는 높이 정보 중 적어도 하나를 포함하고,
    상기 제2 타일이 상기 현재 픽처 내 최우측 타일 열에 포함되는 경우, 상기 제2 슬라이스에 대한 상기 너비 정보의 복호화가 생략되는 것을 특징으로 하는, 영상 복호화 방법.
  3. 제2 항에 있어서,
    상기 제2 슬라이스에 대해 상기 너비 정보의 복호화가 생략되는 경우, 상기 최우측 타일 열의 너비가 상기 제2 슬라이스의 너비로 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  4. 제2 항에 있어서,
    상기 제2 타일이 상기 현재 픽처 내 최하단 타일 행에 포함되는 경우, 상기 제2 슬라이스에 대한 상기 높이 정보의 복호화가 생략되는 것을 특징으로 하는, 영상 복호화 방법.
  5. 제4 항에 있어서,
    상기 제2 슬라이스에 대해 상기 높이 정보의 복호화가 생략되는 경우, 상기 최하단 타일 열의 높이가 상기 제2 슬라이스의 높이로 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  6. 제1 항에 있어서,
    상기 제1 플래그는, 상기 현재 픽처 내 슬라이스의 개수가 문턱값 이상인 경우에 한하여, 복호화되는 것을 특징으로 하는, 영상 복호화 방법.
  7. 제1 슬라이스 및 제2 슬라이스의 크기를 결정하는 단계;
    상기 제1 슬라이스에 대한 크기 정보를 부호화하는 단계; 및
    상기 제1 슬라이스에 대한 타일 인덱스 차분값 정보를 부호화하는 단계를 포함하되,
    상기 타일 인덱스 차분값 정보는, 상기 제1 슬라이스의 좌상단에 위치하는 제1 타일의 인덱스와 상기 제2 슬라이스의 좌상단에 위치하는 제2 타일의 인덱스 사이의 차분을 나타내고,
    상기 제2 슬라이스에 대한 너비 정보를 부호화할 것인지 여부는, 상기 제2 타일의 인덱스를 기초로 결정되는 것을 특징으로 하는, 영상 부호화 방법.
  8. 제7 항에 있어서,
    상기 크기 정보는, 너비 정보 또는 높이 정보 중 적어도 하나를 포함하고, 상기 제2 타일이 상기 현재 픽처 내 최우측 타일 열에 포함되는 경우, 상기 제2 슬라이스에 대한 상기 너비 정보의 부호화가 생략되는 것을 특징으로 하는, 영상 부호화 방법.
  9. 제8 항에 있어서,
    상기 제2 타일이 상기 현재 픽처 내 최하단 타일 행에 포함되는 경우, 상기 제2 슬라이스에 대한 상기 높이 정보의 부호화가 생략되는 것을 특징으로 하는, 영상 부호화 방법.
  10. 제7 항에 있어서,
    상기 타일 인덱스 차분값 정보가 존재하는지 여부를 나타내는 제1 플래그를 부호화하는 단계를 더 포함하는, 영상 부호화 방법.
  11. 제7 항에 있어서,
    상기 타일 인덱스 차분값 정보는, 상기 현재 픽처 내 슬라이스들의 개수가 문턱값 이상인 경우에 부호화되는 것을 특징으로 하는, 영상 복호화 방법.
PCT/KR2020/018371 2019-12-17 2020-12-15 영상 신호 부호화/복호화 방법 및 이를 위한 장치 WO2021125752A1 (ko)

Priority Applications (5)

Application Number Priority Date Filing Date Title
EP20903142.6A EP4080883A4 (en) 2019-12-17 2020-12-15 METHOD FOR IMAGE SIGNAL CODING/DECODING AND DEVICE THEREFOR
CN202080010755.3A CN113439439A (zh) 2019-12-17 2020-12-15 用于对图像信号进行编码/解码的方法及其装置
US17/419,391 US20220078435A1 (en) 2019-12-17 2020-12-15 Method for encoding/decoding image signal, and device for same
JP2022535753A JP7486586B2 (ja) 2019-12-17 2020-12-15 画像信号の符号化/復号方法およびそのための装置
ZA2021/10174A ZA202110174B (en) 2019-12-17 2021-12-08 Method for encoding/decoding image signal, and device for same

Applications Claiming Priority (10)

Application Number Priority Date Filing Date Title
KR20190168586 2019-12-17
KR10-2019-0168586 2019-12-17
KR10-2020-0020366 2020-02-19
KR20200020366 2020-02-19
KR10-2020-0038866 2020-03-31
KR20200038866 2020-03-31
KR10-2020-0040600 2020-04-02
KR20200040600 2020-04-02
KR10-2020-0040852 2020-04-03
KR20200040852 2020-04-03

Publications (1)

Publication Number Publication Date
WO2021125752A1 true WO2021125752A1 (ko) 2021-06-24

Family

ID=76477613

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2020/018371 WO2021125752A1 (ko) 2019-12-17 2020-12-15 영상 신호 부호화/복호화 방법 및 이를 위한 장치

Country Status (7)

Country Link
US (1) US20220078435A1 (ko)
EP (1) EP4080883A4 (ko)
JP (1) JP7486586B2 (ko)
KR (1) KR20210077625A (ko)
CN (1) CN113439439A (ko)
WO (1) WO2021125752A1 (ko)
ZA (1) ZA202110174B (ko)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114982248A (zh) * 2020-02-17 2022-08-30 英特尔公司 使用基于卷积神经网络(cnn)的滤波器来增强360度视频
EP4120681A4 (en) 2020-03-09 2024-03-06 Lg Electronics Inc IMAGE CODING/DECODING METHOD AND APPARATUS FOR SELECTIVE ENCODING SIZE INFORMATION RECTANGULAR SLICE AND METHOD FOR TRANSMITTING A BIT STREAM

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160198157A1 (en) * 2011-03-10 2016-07-07 Sharp Kabushiki Kaisha Video decoder for slices
KR20180097106A (ko) * 2017-02-22 2018-08-30 에스케이텔레콤 주식회사 영상 복호화 방법 및 장치
KR20190118125A (ko) * 2018-04-09 2019-10-17 에스케이텔레콤 주식회사 병렬 또는 분산 처리를 위한 화면 분할 정보를 제공하는 방법 및 이를 이용한 장치

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11509937B2 (en) * 2018-04-09 2022-11-22 Sk Telecom Co., Ltd. Method and apparatus for encoding/decoding video
CN112740680A (zh) * 2018-09-19 2021-04-30 韩国电子通信研究院 图像编码/解码方法和设备以及存储比特流的记录介质
CN111083484A (zh) * 2018-10-22 2020-04-28 北京字节跳动网络技术有限公司 基于子块的预测
BR112021005443A2 (pt) * 2018-12-07 2021-06-15 Panasonic Intellectual Property Corporation Of America codificador, decodificador, método de codificação, e método de decodificação
CN112930683A (zh) 2019-06-20 2021-06-08 株式会社 Xris 用于对图像信号进行编码/解码的方法及其设备
EP4020984A4 (en) * 2019-08-20 2023-07-19 Apple Inc. IMAGE SIGNAL ENCODING/DECODING METHOD AND RELATED DEVICE
US11930208B2 (en) * 2020-01-10 2024-03-12 Tencent America LLC Method and apparatus for signaling skip mode flag
EP4120681A4 (en) * 2020-03-09 2024-03-06 Lg Electronics Inc IMAGE CODING/DECODING METHOD AND APPARATUS FOR SELECTIVE ENCODING SIZE INFORMATION RECTANGULAR SLICE AND METHOD FOR TRANSMITTING A BIT STREAM

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160198157A1 (en) * 2011-03-10 2016-07-07 Sharp Kabushiki Kaisha Video decoder for slices
KR20180097106A (ko) * 2017-02-22 2018-08-30 에스케이텔레콤 주식회사 영상 복호화 방법 및 장치
KR20190118125A (ko) * 2018-04-09 2019-10-17 에스케이텔레콤 주식회사 병렬 또는 분산 처리를 위한 화면 분할 정보를 제공하는 방법 및 이를 이용한 장치

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JIHOON DO , DOHYEON PARK , YONG-UK YOON , JAE-GON KIM: "AHG12: On signalling of tile partitioning", 16. JVET MEETING; 20191001 - 20191011; GENEVA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-P0308, 24 September 2019 (2019-09-24), Geneva, pages 1 - 7, XP030216889 *
MISKA M HANNUKSELA: "AHG12: On signalling of tile and brick partitioning", 16. JVET MEETING; 20191001 - 20191011; GENEVA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-P0096, 25 September 2019 (2019-09-25), Geneva, pages 1 - 5, XP030216234 *
See also references of EP4080883A4 *

Also Published As

Publication number Publication date
EP4080883A1 (en) 2022-10-26
US20220078435A1 (en) 2022-03-10
JP7486586B2 (ja) 2024-05-17
CN113439439A (zh) 2021-09-24
EP4080883A4 (en) 2023-12-06
ZA202110174B (en) 2023-02-22
KR20210077625A (ko) 2021-06-25
JP2023509347A (ja) 2023-03-08

Similar Documents

Publication Publication Date Title
WO2020185022A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020159198A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020096389A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020076125A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020111785A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2017176030A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020256442A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2018026219A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020076116A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2020222617A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020256413A1 (ko) 적응적 루프내 필터링 방법 및 장치
WO2020213963A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020096388A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019182292A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020060184A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2020096428A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019050292A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020060328A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2021040321A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020060327A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020060329A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020197290A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2020184979A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020096426A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2021049890A1 (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: 20903142

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022535753

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020903142

Country of ref document: EP

Effective date: 20220718