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

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

Info

Publication number
WO2020060327A1
WO2020060327A1 PCT/KR2019/012290 KR2019012290W WO2020060327A1 WO 2020060327 A1 WO2020060327 A1 WO 2020060327A1 KR 2019012290 W KR2019012290 W KR 2019012290W WO 2020060327 A1 WO2020060327 A1 WO 2020060327A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
affine
current block
affine seed
tile
Prior art date
Application number
PCT/KR2019/012290
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
Priority to EP23178806.8A priority Critical patent/EP4224850B1/en
Priority to JP2021515161A priority patent/JP7449279B2/ja
Application filed by 주식회사 엑스리스 filed Critical 주식회사 엑스리스
Priority to CN202110443353.9A priority patent/CN113225560B/zh
Priority to EP23178535.3A priority patent/EP4224848A1/en
Priority to PL19861535.3T priority patent/PL3840376T3/pl
Priority to CN201980054695.2A priority patent/CN112840647A/zh
Priority to MX2021003325A priority patent/MX2021003325A/es
Priority to EP23178807.6A priority patent/EP4224851A1/en
Priority to EP23178805.0A priority patent/EP4224849B1/en
Priority to ES19861535T priority patent/ES2955040T3/es
Priority to IL281622A priority patent/IL281622B2/en
Priority to BR112021004922-3A priority patent/BR112021004922A2/pt
Priority to IL304953A priority patent/IL304953A/en
Priority to SG11202102788YA priority patent/SG11202102788YA/en
Priority to CA3113054A priority patent/CA3113054A1/en
Priority to EP19861535.3A priority patent/EP3840376B1/en
Priority to AU2019344978A priority patent/AU2019344978B2/en
Publication of WO2020060327A1 publication Critical patent/WO2020060327A1/ko
Priority to US17/204,306 priority patent/US11223845B2/en
Priority to PH12021550627A priority patent/PH12021550627A1/en
Priority to ZA2021/01846A priority patent/ZA202101846B/en
Priority to US17/541,922 priority patent/US11758176B2/en
Priority to US18/219,824 priority patent/US20230421799A1/en
Priority to JP2024029968A priority patent/JP2024063128A/ja

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/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness
    • 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/94Vector quantisation
    • 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 High Efficiency Video Coding
  • An object of the present invention is to provide an inter prediction method using an affine model and an apparatus for the method in encoding / decoding a video signal.
  • An object of the present invention is to provide a method and apparatus for deriving an affine seed vector using a translation motion vector of a sub-block in encoding / decoding a video signal.
  • An object of the present invention is to provide a method and apparatus for deriving an affine seed vector by converting a distance between a neighboring block and a current block into a power of 2 in encoding / decoding a video signal.
  • the video signal decoding / coding method includes: generating a merge candidate list in a current block, specifying any one of a plurality of merge candidates included in the merge candidate list, and first of the specified merge candidates Deriving a first affine seed vector and a second affine seed vector of the current block based on the affine seed vector and the second affine seed vector, the first affine seed vector and the second of the current block And using the affine seed vector, deriving an affine vector for a sub-block in the current block, and performing motion compensation prediction for the sub-block based on the affine vector.
  • the sub-block is an area smaller than the current block.
  • the first affine seed vector and the second affine seed vector of the merge candidate may be derived based on motion information of neighboring blocks adjacent to the current block.
  • the first affine seed vector and the second affine seed vector of the merge candidate are: It may be derived based on motion vectors of the lower left subblock and the lower right subblock of the neighboring block.
  • the lower left sub-block includes a lower left reference sample located in the lower left corner of the neighboring block, and the lower right sub block is the lower left corner of the neighboring block. It may include a reference sample at the bottom right.
  • the first affine seed vector and the second affine seed vector of the merge candidate are the difference values of motion vectors of the lower left sub-block and the lower right sub-block. It is derived based on a value obtained based on a bit shift operation using a scaling factor, and the scaling factor can be derived based on a value obtained by adding a horizontal distance and an offset between the lower left reference sample and the lower right reference sample. have.
  • the first affine seed vector and the second affine seed vector of the merge candidate are the difference values of motion vectors of the lower left sub-block and the lower right sub-block. It is derived based on a value obtained based on a bit shift operation using a scaling factor, and the scaling factor can be derived based on a distance between a neighboring sample adjacent to the right of the lower right reference sample and the lower left reference sample. have.
  • the merge candidate list is a first merge derived based on an upper neighboring block determined to be available first among upper neighboring blocks located at the top of the current block. It may include a candidate and a second merge candidate derived based on a left neighboring block determined to be available first among the left neighboring blocks located to the left of the current block.
  • the first affine seed vector and the second affine seed vector of the merge candidate are: It can be derived based on the first affine seed vector and the second affine seed vector of the neighboring block.
  • the present invention by encoding the distance between the neighboring block and the current block to a power of 2 to derive an affine seed vector, there is an effect of improving the coding efficiency. .
  • 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 showing various division types 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 diagram showing neighboring blocks that can be used to derive merge candidates.
  • FIG. 12 is a diagram illustrating an example of deriving an affine seed vector of the current block based on the affine seed vector of the affine neighboring block.
  • FIG. 13 is a diagram illustrating an example of setting a motion vector of a sub-block to an affine seed vector of an affine neighboring block.
  • 14 to 16 are views showing the location of the reference sample.
  • 17 is a diagram illustrating an example in which a modified affine merge vector derivation method is applied.
  • 18 is a diagram illustrating an example of deriving an affine seed vector of a current block based on a non-affine neighboring block.
  • 19 is a view showing an example of replacing a neighboring block with another neighboring block.
  • 20 and 21 are flowcharts illustrating a method for predicting motion compensation using multiple merge candidates.
  • 22 is a flowchart of an intra prediction method according to an embodiment of the present invention.
  • 23 is a view showing reference samples included in each reference sample line.
  • 24 is a diagram showing intra prediction modes.
  • 25 and 26 are views illustrating an example of a one-dimensional array in which reference samples are arranged in a line.
  • 27 is a diagram illustrating an angle in which directional intra prediction modes form a straight line parallel to the x-axis.
  • 28 is a diagram illustrating an aspect in which a prediction sample is obtained when the current block is in a non-square form.
  • 29 is a diagram illustrating wide angle intra prediction modes.
  • 30 is a flowchart illustrating a process for determining block strength.
  • 33 is a diagram illustrating a split mode of a picture according to the flexible tile technique.
  • 34 is a diagram illustrating an example in which tile IDs are assigned to each coding tree unit.
  • 35 illustrates an example in which whether to apply an in-loop filter for each tile is selectively determined.
  • Encoding and decoding of an image is performed in block units.
  • encoding / decoding processing such as transformation, quantization, prediction, in-loop filtering, or reconstruction may be performed on a coding block, a transform block, or a prediction block.
  • a block to be encoded / decoded will be referred to as a 'current block'.
  • the current block may represent a coding block, a transform block, or a prediction block according to the current encoding / decoding process step.
  • 'unit' as used herein may be understood to indicate a basic unit for performing a specific encoding / decoding process, and 'block' indicating a sample array of a predetermined size. Unless otherwise specified, 'block' and 'unit' may be used interchangeably. For example, in the embodiments described below, it may be understood that the coding block and the coding unit have mutually equivalent meanings.
  • 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 splitter 110, a prediction unit 120, 125, a transform unit 130, a quantization unit 135, a reordering unit 160, and an entropy coding unit ( 165), an inverse quantization unit 140, an inverse conversion unit 145, a filter unit 150 and a memory 155.
  • each component shown in FIG. 1 is independently illustrated to represent different characteristic functions in the image encoding apparatus, and does not mean that each component is composed of separate hardware or a single software component. That is, for convenience of description, each component is listed and included as each component, and at least two components of each component are combined to form one component, or one component is divided into a plurality of components to perform functions. The integrated and separated embodiments of the 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 improving performance.
  • the present invention can be implemented by including only components essential for realizing the essence of the present invention, except components used for performance improvement, and structures including only essential components excluding optional components used for performance improvement. Also included in the scope of the present invention.
  • the picture division unit 110 may divide the input picture into at least one processing unit.
  • the processing unit may be a prediction unit (PU), a transformation unit (TU), or a coding unit (CU).
  • the picture division unit 110 divides a single 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 with a predetermined criterion (for example, a cost function). You can code a picture by selecting.
  • a predetermined criterion for example, 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.
  • One image or a coding that is split into another coding unit using a largest coding unit as a root The unit may be divided into as many child nodes as the number of divided coding units.
  • a coding unit that is no longer split is a leaf node. That is, when it is assumed that only square division is possible for one coding unit, one coding unit may be divided into up to four different coding units.
  • a coding unit may be used as a meaning of a unit that performs coding or may be used as a meaning of a unit that performs decoding.
  • the prediction unit may be divided into at least one square or rectangular shape having the same size within one coding unit, and one prediction unit among the prediction units split within one coding unit may be another prediction unit. It may be divided into units having different shapes and / or sizes.
  • intra prediction may be performed without splitting 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. It is determined whether to use inter prediction or intra prediction for a prediction unit, and specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method can be determined. At this time, the processing unit for which prediction is performed and the processing unit for which the prediction method and specific content are determined may be different. For example, a method of prediction, a prediction mode, and the like are determined in a prediction unit, and prediction performance may be performed in a transformation unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transform unit 130.
  • specific information eg, intra prediction mode, motion vector, reference picture, etc.
  • prediction mode information, motion vector information, and the like used for prediction may be encoded by the entropy encoding unit 165 together with the residual value and transmitted to the decoder.
  • a specific coding mode it is also possible to encode the original block as it is and transmit it to the decoder without generating a prediction block through the prediction units 120 and 125.
  • the inter-prediction unit 120 may predict a prediction unit based on information of at least one of a previous picture or a subsequent picture of the current picture, and in some cases, prediction based on information of some regions where encoding in the current picture is completed. Units can also be predicted.
  • the inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
  • 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) having different filter coefficients may be used to generate pixel information of integer pixels or less in units of 1/4 pixels.
  • a DCT-based interpolation filter (DCT-based interpolation filter) having different filter coefficients may be used to generate pixel information of an integer pixel or less in units of 1/8 pixels.
  • the motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit.
  • various methods such as Full Search-based Block Matching Algorithm (FBMA), Three Step Search (TSS), and New Three-Step Search Algorithm (NTS) can be used.
  • the motion vector may have a motion vector value in units of 1/2 or 1/4 pixels based on the interpolated pixels.
  • the motion prediction unit may predict the current prediction unit by differently using a motion prediction method.
  • various methods such as a skip method, a merge method, an AMVP (Advanced Motion Vector Prediction) method, and an intra block copy method may be used.
  • AMVP Advanced Motion Vector Prediction
  • the intra prediction unit 125 may generate a prediction unit based on reference pixel information around a current block, which is pixel information in a current picture. If the neighboring block of the current prediction unit is a block that has undergone inter prediction, and the reference pixel is a pixel that has undergone inter prediction, the reference pixel included in the block that has undergone inter prediction is a reference pixel of the block that has performed intra prediction around it. It can be used as a substitute for information. That is, when the reference pixel is not available, the available 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 that uses reference pixel information according to a prediction direction and a non-directional mode that does not use directional information when performing prediction.
  • a mode for predicting luminance information and a mode for predicting color difference information may be different, and intra prediction mode information or predicted luminance signal information used for predicting luminance information may be used to predict color difference information.
  • intra prediction when performing the intra prediction, 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 located on the left of the prediction unit, the pixel on the top left, and the pixel on the top of the prediction unit You can do
  • intra prediction may be performed using a reference pixel based on the transformation unit.
  • intra prediction using NxN splitting can be used only for a minimum coding unit.
  • the intra prediction method may generate a prediction block after applying an adaptive intra smoothing (AIS) filter to the reference pixel according to the prediction mode.
  • AIS adaptive intra smoothing
  • the type of AIS filter applied to the reference pixel may be different.
  • 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 using predetermined flag information It is possible to transmit the information that the prediction mode of is the same, and if the prediction mode of the current prediction unit and the neighboring prediction unit are different, entropy encoding may be performed to encode the prediction mode information of the current block.
  • a residual block including prediction unit performing prediction based on the prediction unit generated by the prediction units 120 and 125 and residual information that is a difference value from the original block of the prediction unit may be generated.
  • the generated residual block may be input to the conversion unit 130.
  • the transform unit 130 skips the residual block including the residual information of the original block and the prediction unit generated by the predictors 120 and 125 in DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or transform skip It can be converted using the following conversion method. Whether DCT, DST, or KLT is applied to transform the residual block may be determined based on intra prediction mode information of a prediction unit used to generate the residual block.
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • transform skip It can be converted using the following conversion method. Whether DCT, DST, or KLT is applied 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 quantization unit 135 may quantize the values converted from the conversion unit 130 to the frequency domain.
  • the quantization coefficient may vary depending on the block or the importance of the image.
  • the value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the rearrangement unit 160.
  • the rearrangement unit 160 may rearrange the coefficient values with respect to the quantized residual value.
  • the reordering unit 160 may change the block shape coefficient of the 2D into a vector form of the 1D through a coefficient scanning method.
  • the rearrangement unit 160 may scan a DC coefficient to a coefficient in a high-frequency region using a Zig-Zag Scan method and change it into a one-dimensional vector form.
  • a vertical scan in which two-dimensional block shape coefficients are scanned in a column direction and a horizontal scan in which two-dimensional block shape coefficients are scanned in a row direction may be used instead of a zig-zag scan. That is, depending on the size of the transform unit and the intra prediction mode, it is possible to determine whether a scan method is used among a zigzag scan, a vertical scan, and a horizontal scan.
  • the entropy encoding unit 165 may perform entropy encoding based on values calculated by the reordering unit 160.
  • various encoding methods such as exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be used.
  • the entropy encoding unit 165 includes residual value coefficient information of the coding unit and block type information, prediction mode information, split unit information, prediction unit information and transmission unit information, motion from the reordering unit 160 and the prediction units 120 and 125 Various information such as vector information, reference frame information, block interpolation information, and filtering information can be encoded.
  • the entropy encoding unit 165 may entropy encode the coefficient value of the coding unit input from the reordering unit 160.
  • the inverse quantization unit 140 and the inverse transformation unit 145 inverse quantize the values quantized by the quantization unit 135 and inversely transform the values converted by the conversion unit 130.
  • the residual values generated by the inverse quantization unit 140 and the inverse transformation unit 145 are restored by being combined with the prediction units predicted through the motion estimation unit, the motion compensation unit, and the intra prediction unit included in the prediction units 120 and 125 You can create a Reconstructed Block.
  • the filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • a deblocking filter may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • ALF adaptive loop filter
  • the deblocking filter can remove block distortion caused by boundary between blocks in the reconstructed picture.
  • it may be determined whether to apply a deblocking filter to the current block based on pixels included in a few columns or rows included in the block.
  • a strong filter or a weak filter may be applied according to the required deblocking filtering strength.
  • horizontal filtering and vertical filtering may be processed in parallel.
  • the offset correction unit may correct an offset from the original image in units of pixels for the deblocking image.
  • the offset correction unit may correct an offset from the original image in units of pixels for the deblocking image. In order to perform offset correction for a specific picture, after dividing the pixels included in the image into a certain number of regions, determining the region to perform the offset and applying the offset to the region, or offset by considering the edge information of each pixel You can use the method of applying.
  • ALF Adaptive Loop Filtering
  • one filter to be applied to the corresponding group may be determined to perform filtering differently for each group.
  • the luminance signal may be transmitted for each coding unit (CU), and the shape and filter coefficient of the ALF filter to be applied may be changed according to each block.
  • the ALF filter of the same form may be applied regardless of the characteristics of the block to be applied.
  • the memory 155 may store reconstructed blocks or pictures calculated through the filter unit 150, and the stored reconstructed blocks or pictures may be provided to the predictors 120 and 125 when performing inter prediction.
  • 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, a prediction unit 230, 235, and a filter unit ( 240), a memory 245 may be included.
  • the input bitstream may be decoded in a procedure opposite to that of the image encoder.
  • the entropy decoding unit 210 may perform entropy decoding in a procedure opposite to that performed by entropy encoding in the entropy encoding unit of the image encoder. For example, various methods such as Exponential Golomb (CAVLC), Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied to the method performed in the image encoder.
  • CAVLC Exponential Golomb
  • CAVLC Context-Adaptive Variable Length Coding
  • CABAC Context-Adaptive Binary Arithmetic Coding
  • the entropy decoding unit 210 may decode information related to intra prediction and inter prediction performed by the encoder.
  • the rearrangement unit 215 may rearrange the bitstream entropy-decoded by the entropy decoding unit 210 based on a method of rearranging the bitstream.
  • the coefficients expressed in the form of a one-dimensional vector can be reconstructed into coefficients in a two-dimensional block form and rearranged.
  • the reordering unit 215 may receive information related to coefficient scanning performed by the encoding unit and perform reordering through a reverse scanning method based on a scanning order performed by the encoding unit.
  • the inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoder and the coefficient values of the rearranged blocks.
  • the inverse transform unit 225 may perform inverse transform, that is, inverse DCT, inverse DST, and inverse KLT, for transforms performed by the transform unit for the quantization results performed by the image encoder, that is, DCT, DST, and KLT.
  • the inverse transform may be performed based on the transmission unit determined by the image encoder.
  • a transform method for example, DCT, DST, KLT
  • a plurality of information such as a prediction method, a current block size, and a prediction direction.
  • the prediction units 230 and 235 may generate a prediction block based on prediction block generation related information provided by the entropy decoding unit 210 and previously decoded block or picture information provided by the memory 245.
  • intra prediction when the intra prediction is performed in the same manner as in the image encoder, when the size of the prediction unit and the size of the transformation unit are the same, the pixels located on the left side of the prediction unit, the pixels located on the upper left, and the top level are present. Intra prediction of the prediction unit is performed based on the pixel, but when the size of the prediction unit and the size of the transformation unit are different when performing the intra prediction, intra prediction is performed using the reference pixel based on the transformation unit. You can. In addition, 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 determination unit, an inter prediction unit, and an intra prediction unit.
  • the prediction unit discrimination unit receives various information such as prediction unit information input from the entropy decoding unit 210, prediction mode information of an intra prediction method, and motion prediction related information of an inter prediction method, classifies the prediction unit from the current coding unit, and predicts the prediction unit. It is possible to determine whether the unit performs inter prediction or intra prediction.
  • the inter prediction unit 230 uses the information necessary for inter prediction of the current prediction unit provided by the image encoder to predict the current based on information included in at least one of a previous picture or a subsequent picture of the current picture including the current prediction unit. Inter prediction for a unit may be performed. Alternatively, inter-prediction may be performed based on information of some regions pre-restored in the current picture including the current prediction unit.
  • a motion prediction method 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 can be determined whether it 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 a prediction unit provided by an image encoder.
  • the intra prediction unit 235 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter.
  • the AIS filter is a part that performs filtering on the reference pixel of the current block and can 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 a reference pixel of a current block by using prediction mode and AIS filter information of a prediction unit provided by an image encoder. When the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
  • the reference pixel interpolation unit may interpolate the reference pixel to generate a pixel reference pixel in an integer value or less. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating a reference pixel, the reference pixel may not be interpolated.
  • the DC filter may generate a prediction block through filtering when the prediction mode of the current block is the DC mode.
  • the reconstructed block or picture may be provided to the filter unit 240.
  • the filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
  • Information about whether a deblocking filter is applied to a corresponding block or picture and information about whether a strong filter is applied or a weak filter is applied may be provided from a video encoder.
  • information related to the deblocking filter provided by the video encoder may be provided, and the video 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 and offset value information applied to the image during encoding.
  • ALF may be applied to a coding unit based on ALF application information provided by an encoder, ALF coefficient information, and the like. Such ALF information may be provided by being included in a specific parameter set.
  • the memory 245 may store the restored picture or block so that it can be used as a reference picture or a reference block, and may also provide the restored 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 maximum sized coding block can 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 having the largest size, and may be called a large coding unit (LCU).
  • LCU large coding unit
  • 3 shows an example in which one picture is divided into a plurality of coding tree units.
  • the size of the coding tree unit can 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 a coding tree unit for all pictures in a sequence may be set to 128x128.
  • one of 128x128 or 256x256 may be determined as a size of a coding tree unit at a picture level.
  • the size of the coding tree unit may be set to 128x128 in the first picture, and the size of the coding tree unit may be set to 256x256 in the second picture.
  • the 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 represents a method for generating a prediction image.
  • the prediction encoding mode includes intra prediction (Intra Prediction), inter prediction (Inter Prediction), current picture reference (Current Picture Referencing, CPR, or Intra Block Copy (IBC)).
  • IBC Intra Block Copy
  • a prediction block for a coding block may be generated using at least one prediction coding mode among intra prediction, inter prediction, current picture reference, or complex prediction.
  • Information indicating a prediction encoding mode of a current block may be signaled through a bitstream.
  • the information may be a 1-bit flag indicating whether the prediction encoding mode is intra mode or inter mode. As long as the prediction encoding mode of the current block is determined as the inter mode, the current picture reference or composite prediction may be available.
  • the current picture reference is for setting a current picture as a reference picture and obtaining a prediction block of a current block from a region in which encoding / decoding has already been completed in the current picture.
  • the current picture means a picture including the current block.
  • Information indicating whether a current picture reference is applied to a current block may be signaled through a bitstream.
  • the information may be a flag of 1 bit. When the flag is true, the prediction encoding mode of the current block is determined as a reference to the current picture, and when the flag is false, the prediction mode of the current block may be determined as inter prediction.
  • the prediction coding 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 coding mode of the current block may be determined as the current picture reference. When the reference picture index points to a picture other than the current picture, the prediction coding mode of the current block may be determined as inter prediction. That is, the current picture reference is a prediction method using information of a region in which encoding / decoding is completed in the current picture, and inter prediction is a prediction method using information of another picture in which encoding / decoding is completed.
  • the composite prediction represents a coding mode combining two or more of intra prediction, inter prediction, and current picture reference.
  • a first prediction block may be generated based on one of intra prediction, inter prediction, or current picture reference, and a second prediction block may be generated based on the other.
  • a 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 the composite prediction is applied may be signaled through the bitstream. The information may be a flag of 1 bit.
  • FIG. 4 is a diagram showing various division types of a coding block.
  • the coding block may be divided into a plurality of coding blocks based on quad tree splitting, binary tree splitting, or triple tree splitting.
  • the divided coding block may be further divided into a plurality of coding blocks based on quad tree splitting, binary tree splitting, or triple tree splitting.
  • Quad tree splitting represents a splitting technique that splits the current block into four blocks.
  • the current block can be divided into four square partitions (see (a) 'SPLIT_QT' in FIG. 4).
  • Binary tree splitting represents a splitting technique that splits the current block into two blocks. Dividing the current block into two blocks along a vertical direction (ie, using a vertical line across the current block) may be referred to as a vertical binary tree partition, and along a horizontal direction (ie, traversing the current block). Dividing the current block into two blocks using a horizontal line may be referred to as horizontal binary tree partitioning. As a result of dividing the binary tree, the current block can be divided into two non-square partitions.
  • FIG. 4 (b) 'SPLIT_BT_VER' shows the vertical binary tree splitting result
  • FIG. 4 (c) 'SPLIT_BT_HOR' shows the horizontal binary tree splitting result.
  • Triple tree splitting represents a splitting technique that splits the current block into three blocks. Dividing the current block into three blocks along a vertical direction (ie, using two vertical lines across the current block) may be referred to as a vertical triple tree split, and along a horizontal direction (ie, the current block). Splitting the current block into three blocks using two horizontal horizontal lines) can be referred to as horizontal triple tree splitting. As a result of the triple tree partition, the current block may be divided into three non-square partitions. At this time, the width / height of the partition located in the center of the current block may be twice the width / height of the other partitions.
  • FIG. 4 (d) 'SPLIT_TT_VER' shows the result of vertical triple tree splitting
  • FIG. 4 (e) 'SPLIT_TT_HOR' shows the horizontal triple tree splitting result.
  • the number of splitting of the coding tree unit may be defined as a partitioning depth. At the sequence or picture level, the maximum split depth of the coding tree unit can be determined. Accordingly, the maximum splitting depth of the coding tree unit may be different for each sequence or feature.
  • the maximum splitting depth for each of the splitting techniques can be individually determined.
  • the maximum splitting depth allowed for quad tree splitting may be different from the maximum splitting depth allowed for binary tree splitting and / or triple tree splitting.
  • the encoder may signal information indicating at least one of a split type or a split depth of a current block through a bitstream.
  • the decoder can determine the division type and division 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.
  • Splitting a coding block using a splitting technique such as quad tree splitting, binary tree splitting, and / or triple tree splitting may be referred to as multi-tree partitioning.
  • Coding blocks generated by applying multi-tree partitioning to coding blocks 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 an upper coding block.
  • the division type of the current coding block may be determined based on at least one of a division type of an upper coding block or a division type of a 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 the upper left corner of the current coding block.
  • the split type may include at least one of quad tree splitting, binary tree splitting, binary tree splitting, triple tree splitting, or triple tree splitting.
  • information indicating whether a coding block is divided may be signaled through a bitstream.
  • the information is a 1-bit flag 'split_cu_flag', and the flag is true 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 quad-tree split may be signaled through a bitstream.
  • the information is a 1-bit flag split_qt_flag, and when the flag is true, a coding block may be divided into 4 blocks.
  • the coding tree unit is quad-tree split
  • four coding blocks having a split depth of 1 are shown.
  • quad-tree splitting is again applied to the first coding block and the fourth coding block among the four coding blocks generated as a result of the quad-tree splitting.
  • four coding blocks having a split depth of 2 can be generated.
  • a coding block having a split depth of 3 may be generated.
  • quad-tree splitting is not applied to a coding block
  • binary tree splitting is performed on the coding block by considering at least one of a size of a coding block, whether a coding block is located at a picture boundary, a maximum splitting depth, or a splitting form of neighboring blocks.
  • information indicating a split 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 dividing direction is a vertical direction or a horizontal direction.
  • information indicating whether binary tree splitting or triple tree splitting is applied to the coding block may be signaled through a 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 split depth of 1
  • vertical triple tree splitting is applied to a left coding block among coding blocks generated as a result of the splitting
  • the right coding block is illustrated with vertical binary tree partitioning applied.
  • Inter prediction is a prediction encoding mode that predicts a current block using information of a previous picture.
  • a block having the same position as the current block in the previous picture (hereinafter, a collocated block) may be set as a prediction block of the current 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.
  • a prediction block (or a 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 a prediction block from the current block. At this time, if there is an object motion, the energy of the residual block can be reduced by using the motion prediction block instead of the collocated prediction block, and accordingly, the compression performance of the residual block can be improved.
  • generating a prediction block using motion information may be referred to as motion compensation 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 direction and size of movement 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 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 motion information in the L0 direction or motion information in the L1 direction may be used.
  • the bidirectional weight index specifies the weight applied to the L0 prediction block and the 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 is based on determining the inter prediction mode of the current block (S601), obtaining motion information of the current block according to the determined inter prediction mode (S602), and obtained motion information In step S603, motion compensation prediction for the current block is performed.
  • the inter prediction mode represents various techniques for determining motion information of a 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 affine motion information may include affine merge mode and affine motion vector prediction mode.
  • Motion information of the current block may be determined based on information parsed from a neighboring block or a bitstream neighboring the current block according to the inter prediction mode.
  • FIG. 7 is a diagram illustrating a non-linear movement of an object.
  • Motions in which the motion of an object in an image is not linear may occur.
  • nonlinear movement of an object such as camera zoom-in, zoom-out, rotation or affine transformation may occur.
  • affine motion instead of translational motion in a portion where a nonlinear motion of the 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 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, the inter based on affine motion in the current block It is possible to decide whether a prediction technique is applied.
  • 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 six-parameter affine motion model or a four-parameter affine motion model.
  • the six-parameter affine motion model expresses affine motion using six parameters
  • the four-parameter affine motion model expresses affine motion using four parameters.
  • Equation 1 expresses affine motion using 6 parameters.
  • Affine motion represents translational motion for a given region determined by affine seed vectors.
  • affine motion In the case of expressing affine motion using six parameters, a complex motion may be expressed, but the number of bits required to encode each parameter may increase, thereby reducing encoding efficiency. Accordingly, affine motion may be expressed using four parameters. Equation 2 expresses 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 for the flag indicates that a 4-parameter affine motion model is applied, and a value of 1 for the flag indicates that a 6-parameter affine motion model is applied.
  • the flag may be coded 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 four-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'.
  • the affine seed vector of the current block may be derived (S802).
  • a 4-parameter affine motion model motion vectors at two control points of the current block can be derived.
  • a 6-parameter affine motion model motion vectors at three control points of the current block may be derived.
  • the motion vector at the control point can be called an affine seed vector.
  • the control point may include at least one of a top left corner, a top right corner, or a bottom 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.
  • the affine seed vector sv for the upper left corner eg, upper left sample (x1, y1)
  • the affine vector can be derived using the affine seed vector sv 1 for 0 and the top right corner of the current block (eg, the top right sample (x1, y1)). It is also possible to use the affine seed vector for the bottom left corner instead of the apein seed vector for the top left corner, or the affine seed vector for the bottom left corner instead of the apein seed vector for the top right corner.
  • affine seed vectors for the upper left corner, upper right corner, and lower left corner can be derived.
  • the affine seed vector sv for the upper left corner eg, upper left sample (x1, y1)
  • the upper right corner of the current block e.g., the upper right samples (x1, y1)
  • the upper left corner e.g., upper left samples (x2, y2)
  • the upper left corner e.g., upper left samples (x2, y2)
  • the affine seed vectors of the upper left control point and the upper right control point are referred to as a first affine seed vector and a second affine seed vector, respectively, under a four-parameter affine motion model.
  • at least one of the first affine seed vector and the second affine seed vector includes an affine seed vector of the lower left control point (zero 3 affine seed vector) or the affine seed vector of the lower right control point (four affine seed vector).
  • the affine seed vectors of the upper left control point, the upper right control point, and the lower left control point are referred to as a first affine seed vector, a second affine seed vector, and a third affine seed vector, respectively. Let's call it title.
  • a first affine seed vector, a second affine seed vector, and a third affine seed vector described below among the first affine seed vector, the second affine seed vector, and the third affine seed vector
  • At least one of the lower right control points may be replaced with an affine seed vector (fourth affine seed vector).
  • the 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 affine seed vectors.
  • the affine vector of the sub-block may be called 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 can 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 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 in which at least one of the x-axis or y-axis coordinates is a central position.
  • (x 0 , y 0 ) represents the position of the first control point
  • (sv 0x , sv 0y ) represents the first affine seed vector.
  • (x 1 , y 1 ) represents the position of the second control point
  • (sv 1x , sv 1y ) represents the second affine seed vector.
  • x 1 -x 0 may be set to the same value as the width of the current block.
  • motion compensation prediction for each sub-block may be performed using the affine vector of each sub-block (S804).
  • prediction blocks for each sub-block may be generated. Prediction blocks of sub-blocks may be set as prediction blocks of the current block.
  • the affine seed vector of the current block may be derived based on the affine seed vector of neighboring blocks neighboring 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 the merge candidate.
  • Merge candidates may be derived based on neighboring blocks of the current block.
  • the neighboring block may include at least one of a spatial neighboring block spatially adjacent to the current block and a temporal neighboring block included in a picture different from the current picture.
  • 11 is a diagram showing neighboring blocks that can be used to derive merge candidates.
  • the neighboring block of the current block includes a neighboring block (A) adjacent to the left side of the current block, a neighboring block (B) neighboring to the top of the current block, and a neighboring block (C) adjacent to the upper right corner of the current block, the current block It may include at least one of a neighboring block (D) adjacent to the lower left corner or a neighboring block adjacent to the upper left corner of the current block.
  • the left neighboring block A includes the sample at (x0-1, y0 + H-1) position
  • the upper neighboring block B is (x0 + W- 1, y0-1) Include the sample at position.
  • W and H indicate the width and height of the current block, respectively.
  • the upper right neighboring block C includes samples at the (x0 + W, y0-1) position
  • the lower left neighboring block D includes samples at the (x0-1, y0 + H) position
  • the upper left neighboring block E contains samples at (x0-1, y0-1) positions.
  • the affine seed vector of the merge candidate may be derived based on the affine seed vector of the neighboring block.
  • a neighboring block encoded in the affine inter prediction mode will be referred to as an affine neighboring block.
  • Neighbor blocks may be searched in a predefined scan order to generate merge candidates for the current block.
  • the scan order may be predefined in the encoder and decoder. For example, neighboring blocks may be searched in the order of A, B, C, D, and E.
  • merge candidates may be sequentially derived from the neighboring blocks that are found.
  • the scan order may be adaptively determined based on at least one of the size, shape, or affine motion model of the current block. That is, the scan order for blocks in which at least one of the size, shape, or affine motion model is different may be different from each other.
  • neighboring blocks located at the top of the current block include at least one of neighboring block E, neighboring block B, or neighboring block C, and blocks located to the left of the current block have at least one of block A or block D. It can contain. At this time, it is also possible to classify neighboring blocks E as blocks located to the left of the current block.
  • merge candidates may be derived from temporal neighboring blocks of the current block.
  • the temporal neighboring block may include a block co-located with a current block in a collocated picture or a block adjacent thereto.
  • the merge candidate can be derived based on the affine seed vector of the temporal merge candidate.
  • a merge candidate list including merge candidates may be generated, and an affine seed vector of one of the merge candidates included in the merge candidate list may be determined as an affine seed vector of the current block.
  • index information identifying one of the merge candidates may be encoded and transmitted through a bitstream.
  • the affine seed vector of the current block may be derived from the affine seed vector of the first affine neighboring block.
  • the affine seed vector of the current block may be derived using the affine seed vector of the neighboring block.
  • the affine seed vector of the motion vector prediction candidate included in the motion vector prediction candidate list may be determined as the affine seed vector prediction value of the current block.
  • the affine seed vector difference value may be added to the affine seed vector prediction value to derive the affine seed vector of the current block.
  • the affine seed vector prediction candidate may be derived based on neighboring blocks of the current block. Specifically, neighboring blocks located at the top of the current block may be searched according to a predetermined scan order, and a first affine seed vector prediction candidate may be derived from the first found affine neighboring block. Also, neighbor blocks located on the left side of the current block may be searched according to a predetermined scan order, and a second affine seed vector prediction candidate may be derived from the first affine neighbor block.
  • Information for determining an affine seed vector difference value may be encoded and transmitted through a bitstream.
  • the information may include size information indicating the magnitude of the affine seed vector difference value and code information indicating the sign of the affine seed vector difference value.
  • the affine seed vector difference value for each control point may be set to the same value. Alternatively, the affine sheet vector difference value may be set differently for each control point.
  • the affine seed vector of the merge candidate or the affine seed vector prediction candidate is derived from the affine seed vector of the affine neighboring block, and the affine seed vector of the derived merge candidate or the affine seed vector prediction candidate is derived.
  • an affine seed vector of the current block may be derived from the affine seed vector of the first found affine neighboring block after searching for the neighboring blocks according to a predetermined scan order.
  • deriving the affine seed vector of the current block may also be understood as deriving the affine seed vector of the merge candidate or deriving the affine seed vector of the affine seed vector prediction candidate.
  • FIG. 12 is a diagram illustrating an example of deriving an affine seed vector of the current block based on the affine seed vector of the affine neighboring block.
  • Equation 4 shows an example of deriving a third affine seed vector.
  • Equation 4 (nv 0x , nv 0y ) is a first affine seed vector nv 0 , (nv 1x , nv 1y ) is a second affine seed vector nv 1 , (nv 2x , nv 2y ) is The third affine seed vector nv 2 is shown.
  • (x n0 , x n0 ) indicates the position of the first control point
  • (x n1 , x n1 ) indicates the position of the second control point
  • (x n2 , x n2 ) indicates the position of the third control point.
  • the affine seed vector of the current block may be derived using the first affine seed vector, the second affine seed vector, and the third affine seed vector.
  • Equation 5 shows an example of deriving the first affine seed vector v 0 of the current block
  • Equation 6 shows an example of deriving the second affine seed vector v 1 of the current block.
  • Equations 5 and 6 (v 0x , v 0y ) represents the first affine seed vector sv 0 of the current block, and (v 1x , v 1y ) the second affine seed vector sv 1 of the current block Indicates.
  • (x 0 , y 0 ) represents the position of the first control point
  • (x 1 , y 1 ) represents the position of the second control point.
  • the first control point represents the upper left corner of the current block
  • the second control point represents the upper right corner of the current block.
  • the affine seed vectors of the current block are derived by using three affine seed vectors for the affine neighboring block.
  • only two of the affine seed vectors of the affine neighboring block may be used to derive the affine seed vectors of the current block.
  • the first affine seed vector in the upper left corner for the affine neighboring block, the second affine seed vector in the upper right corner or the third affine seed vector in the lower left corner instead of the fourth affine seed vector for the lower right corner.
  • the seed vectors of the current block may be derived using the seed vectors.
  • the upper control point of the upper neighbor block (hereinafter referred to as the upper upper neighbor block) adjacent to the upper edge of the current block, and the upper border of the current block is adjacent to the upper edge of the current block (eg, upper left corner or If you want to use the affine seed vectors for the top right corner), you have to store them in memory in advance, which can cause a problem that the number of line buffers increases.
  • the lower control point eg, lower left corner or lower right corner
  • the upper seed vector of the upper control point it can be configured to use the affine seed vector of.
  • the affine seed vectors of the current block may be derived by using a third affine seed vector for the lower left corner and a fourth affine seed vector for the lower right corner of the upper affine neighboring block.
  • the affine seed vector for the bottom corner may be copied from the affine seed vector for the top corner, or may be derived from affine seed vectors for the top corners.
  • a first affine seed vector, a second affine seed vector, or a third affine seed vector may be converted / substituted into a fourth affine seed vector for the lower right corner.
  • Equations 7 and 8 use the third affine seed vector for the lower left control point of the neighboring affine vector and the fourth affine seed vector for the lower right control point, for the first affine seed of the current block. It shows an example of deriving a vector and a second affine seed vector.
  • Equations 7 and 8 (x n2 , y n2 ) represents the coordinates of the lower left control point of the affine neighboring block, and (x n3 , y n3 ) represents the coordinates of the lower right control point of the affine neighboring block. . (x 0 , y 0 ) represents the coordinates of the upper left control point of the current block, and (x 1 , y 1 ) represents the coordinates of the upper right control point of the current block.
  • (nv 2x , nv 2y ) represents the affine seed vector (ie, the third affine seed vector) of the lower left control point of the affine neighboring block, and (nv 3x , nv 3y ) is the lower right of the affine neighboring block It represents the affine seed vector of the control point (ie, the fourth affine seed vector).
  • (v 0x , v 0y ) represents the affine seed vector of the upper left control point of the current block (ie, the first affine seed vector), and (v 1x , v 1y ) is the apache of the upper right control point of the current block In-seed vector (ie, second affine seed vector).
  • the division operation included in Equations 7 and 8 can also be changed to a bit shift operation.
  • the bit shift operation may be performed based on a value derived by the width (ie, (x n3 -x n2 )) between the lower left control point and the lower right control point.
  • the affine seed vectors of the current block may be derived from the affine seed vectors of the affine neighboring block in which encoding / decoding is completed.
  • the affine seed vectors of the affine neighbor block in which encoding / decoding is completed must be stored in the memory.
  • the affine seed vectors of the affine neighbor block are stored in memory, thereby increasing memory usage. have.
  • the affine seed vector of the current block may be derived by using a motion vector of a subblock adjacent to the control point of the affine neighboring block. That is, the motion vector of the sub-block adjacent to the control point of the affine neighboring block may be set as the affine seed vector of the affine neighboring block.
  • the sub-block is a block having a predefined size / shape in the encoder and decoder, and may be a block having a basic size / shape in which motion vectors are stored.
  • the sub-block may be a 4x4 square block.
  • the motion vector for a specific sample position may be set as the affine seed vector of the affine neighboring block.
  • FIG. 13 is a diagram illustrating an example of setting a motion vector of a sub-block to an affine seed vector of an affine neighboring block.
  • a motion vector of a sub-block adjacent to a control point may be set as an affine seed vector of the corresponding control point.
  • the motion vector (nv 4x , nv 4y ) of a sub-block (lower left sub-block) adjacent to the lower left corner of an affine neighboring block is an affine seed vector of the lower left control point.
  • the lower left sub-block means a sub-block including a sample adjacent to the lower left control point (x n2 , y n2 ) in a neighboring affine block (eg, a sample at (x n2 , y n2 -1)).
  • the lower right sub-block is a block including a sample adjacent to a lower right control point (x n3 , y n3 ) in a neighboring affine block (eg, a sample at (x n3 -1, y n3 -1)).
  • the third affine seed vector of the affine neighboring block is replaced with the motion vector of the lower left subblock, and the fourth affine seed The vector may be replaced with the motion vector of the lower right sub-block.
  • affine sub-block used as an affine seed vector of an affine neighboring block will be referred to as an affine sub-block.
  • an affine sub-block may be determined based on a sample at a specific location.
  • a sub-block including a sample at a specific location may be set as an affine sub-block.
  • a sample at a specific location will be referred to as an affine reference sample.
  • the reference sample used to determine the affine sub-block of the lower left control point is called the lower left reference sample
  • the reference sample used to determine the affine sub-block of the lower right control point is called the lower right reference sample. I will do it.
  • the lower left reference sample and the lower right reference sample may be selected from samples included in an affine neighboring block. For example, at least one of the upper left sample, lower left sample, upper right sample, or lower left sample of the lower left sub block is set as the lower left reference sample, and the upper left sample, lower left sample, upper right sample, or lower left of the lower right sub block is set. At least one of the samples may be set as a lower right reference sample. Accordingly, the motion vectors of the lower left sub-block including the lower left reference sample and the lower right sub-block including the lower right reference sample are the affine seed vector for the lower left control point and the affine seed for the lower right point, respectively. Can be set as a vector.
  • At least one of the lower left reference sample or the lower right reference sample may be set as a sample located outside of an awkward neighboring block. This will be described in detail with reference to FIGS. 14 to 16.
  • 14 to 16 are views showing the location of the reference sample.
  • the upper left sample of the lower left sub block may be set as a reference sample (x n4 , y n4 ). Accordingly, the lower left subblock including the reference sample (x n4 , y n4 ) may be set as an affine subblock for the lower left control point.
  • the sample located to the right of the upper right sample of the lower right subblock can be set as a reference sample (x n5 , y n5 ). Accordingly, a sub-block adjacent to the right side of the lower right sub-block including the reference sample (x n5 , y n5 ) may be set as an affine sub-block for the lower right control point.
  • a sample located to the left of the upper left sample of the lower left subblock may be set as a reference sample (x n4 , y n4 ). Accordingly, a sub-block adjacent to the left of the lower left sub-block including the reference sample (x n4 , y n4 ) may be set as an affine sub-block for the lower left control point.
  • the upper right sample of the lower right subblock can be set as a reference sample (x n5 , y n5 ). Accordingly, the lower right sub-block including the reference sample (x n5 , y n5 ) may be set as an affine sub-block for the lower right control point.
  • the lower left sample of the lower left sub block may be set as a reference sample (x n4 , y n4 ). Accordingly, the lower left subblock including the reference sample (x n4 , y n4 ) may be set as an affine subblock for the lower left control point.
  • the sample located to the right of the lower right sample of the lower right subblock can be set as a reference sample (x n5 , y n5 ). Accordingly, a sub-block adjacent to the right side of the lower right sub-block including the reference sample (x n5 , y n5 ) may be set as an affine sub-block for the lower right control point.
  • a sample located to the left of the lower left sample of the lower left subblock may be set as a reference sample (x n4 , y n4 ).
  • a sub-block adjacent to the left of the lower left sub-block including the reference sample (x n4 , y n4 ) may be set as an affine sub-block for the lower left control point.
  • the lower right sample of the lower right subblock can be set as a reference sample (x n5 , y n5 ). Accordingly, the lower right sub-block including the reference sample (x n5 , y n5 ) may be set as an affine sub-block for the lower right control point.
  • a sample eg, a middle left sample positioned between the upper left sample and the lower left sample of the lower left subblock is a reference sample (x n4). , y n4 ). Accordingly, the lower left subblock including the reference sample (x n4 , y n4 ) may be set as an affine subblock for the lower left control point.
  • a sample located on the right side of a sample (for example, a right middle sample) positioned between the upper right sample and the lower right sample of the lower right subblock may be set as a reference sample (x n5 , y n5 ). Accordingly, a sub-block adjacent to the right side of the lower right sub-block including the reference sample (x n5 , y n5 ) may be set as an affine sub-block for the lower right control point.
  • the sample located at the left of the sample located between the upper left sample and the lower left sample of the lower left subblock is a reference sample (x n4 , y n4 ). Accordingly, a sub-block adjacent to the left of the lower left sub-block including the reference sample (x n4 , y n4 ) may be set as an affine sub-block for the lower left control point.
  • the sample located between the upper right sample and the lower right sample of the lower right subblock may be set as a reference sample (x n5 , y n5 ). Accordingly, the lower right sub-block including the reference sample (x n5 , y n5 ) may be set as an affine sub-block for the lower right control point.
  • the third affine seed vector of the affine neighboring block is replaced with the motion vector of the affine subblock for the lower left control point
  • the fourth affine seed vector may be replaced with a motion vector of the affine sub-block for the lower right control point.
  • the position of the lower left control point may be replaced with the position of the lower left reference sample
  • the position of the lower right control point may be replaced with the position of the lower right reference sample.
  • a sub-block including a sample adjacent to a reference sample may be set as an affine sub-block.
  • a sample located outside the affine neighbor subblock may be set as a reference sample
  • a subblock included in the affine neighbor block may be set as an affine subblock.
  • the sample located on the right side of the upper right sample of the lower right sub-block is set as the reference sample (x n5 , y n5 ), but the lower right sub-block is the lower right corner. It can be set as an affine sub-block for.
  • the sample located on the left of the upper left sample of the lower left sub block is set as a reference sample (x n4 , y n4 ), but the lower left sub block is placed in the lower left corner. It can be set as an affine subblock for.
  • FIGS. 15 and 16 may be equally applied. That is, in the example shown in FIG. 15 (a) or FIG. 16 (a), the sample located at the right of the lower right sample or the lower right sample of the lower right sub-block is referred to as the reference sample (x n5 , y n5 ). Set, but the lower right sub-block can be set as an affine sub-block for the lower right corner. Alternatively, in the example shown in FIG. 15 (b) or FIG. 16 (b), the sample located at the left of the lower left sample or the left middle sample of the lower left subblock is referred to as the reference sample (x n4 , y n4 ). Set, but the lower left sub-block can be set as an affine sub-block for the lower left corner.
  • the affine seed vector of the affine neighboring block may be derived using the motion vector of the affine sub-block.
  • a motion vector may be stored in units of sub-blocks.
  • a motion vector of the affine sub-block may be derived using the stored affine seed vectors.
  • Equations 9 and 10 show an example of deriving a motion vector of an affine sub-block using affine seed vectors of the affine neighboring block.
  • Equation 9 (nv 4x , nv 4y ) represents the motion vector of the affine subblock for the lower left control point, and (nv 5x , nv 5y ) is the affine sub for the lower right control point. Represents the motion vector of a block.
  • (x n4 , y n4 ) indicates the position of the reference sample in the lower left subblock.
  • the center position of the lower left sub-block or the position of the lower left control point may be used instead.
  • (x n5 , y n5 ) indicates the position of the reference sample in the lower right sub-block.
  • the center position of the lower right sub-block or the position of the lower right control point may be used instead.
  • Equations 9 and 10 can be applied when the current block does not touch the boundary of the coding tree unit.
  • the translation motion vector of the affine sub-block determined based on the lower left reference sample is set as the third affine seed vector
  • the translation motion vector of the affine sub-block determined based on the lower right reference sample may be set as a fourth affine seed vector.
  • (x n3 -x n2 ) represents the width between the lower left control point and the lower right control point.
  • x n3 may be replaced with the position x n5 of the lower right reference sample
  • x n2 may be replaced with the position x n4 of the lower left reference sample.
  • a value eg, (x n5 -x n4 )
  • W seed a value obtained by substituting (x n3 -x n2 ) or the position of the above formula with the position of the reference samples.
  • the sub-seed vector width is not a power of 2 (eg, 2 n ).
  • the width of the sub seed vector is not a multiple of two.
  • the width of the sub-seed vector may be converted to a power of 2.
  • the transformation may include adding / subtracting an offset to a sub seed vector width, or using a location of a sample neighboring the reference sample instead of a location of the reference sample.
  • the converted sub-seed vector width may be derived by adding 1 to the width between the lower left reference sample and the lower right reference sample.
  • a width between a neighboring reference sample adjacent to the right side of the lower right reference sample and a lower left reference sample may be set as the converted sub seed vector width.
  • the transformed sub-seed vector width may be applied to Equations 7 and 8 to derive the affine seed vector of the current block.
  • the division operation included in Equations 7 and 8 can also be changed to a bit shift operation.
  • the bit shift operation can be performed based on a value derived by the transformed sub-seed vector width (ie, a value represented by a power of 2).
  • the affine seed vector of the affine neighboring block is based on a sample adjacent to the reference sample among samples included in the affine neighboring block.
  • a translation motion vector of a sub-block including a sample adjacent to the reference sample (hereinafter referred to as a neighbor reference sample) in an affine neighbor block may be set as an affine seed vector of the affine neighbor block.
  • a method for deriving an affine seed vector using a neighboring reference sample may be defined as a modified affine merge vector derivation method.
  • 17 is a diagram illustrating an example in which a modified affine merge vector derivation method is applied.
  • a sample adjacent to the left of the lower right reference sample (x n5) among the samples included in the affine neighboring block Affine seed vectors can be derived based on -1, y n5 ).
  • the translation motion vector of the sub-block including the neighbor reference sample (x n5 -1, y n5 ) can be set as the affine seed vector of the lower right control point.
  • the sample neighboring to the right of the upper right sample of the lower right sub-block is shown as the lower right reference sample.
  • Samples adjacent to the left side of the neighboring reference sample, even if samples adjacent to the right side of the lower right sample of the lower right subblock or samples adjacent to the right side of the lower right subblock are set as the lower right reference sample
  • On the basis of the affine seed vector can be derived.
  • the affine seed vector may be derived based on the sample adjacent to the right lower left reference sample.
  • the width of the sub-seed vector can be set to a power of two.
  • a neighbor candidate that is not encoded in the affine inter mode around the current block may be used to derive a merge candidate, an affine seed vector prediction candidate, or an affine seed vector of the current block.
  • blocks that are not encoded in the affine inter mode may be combined, and combinations thereof may be set as merge candidates or affine seed vector prediction candidates.
  • a motion vector of any one of the neighboring blocks adjacent to the upper left corner of the current block a motion vector of one of the neighboring blocks adjacent to the upper right corner of the current block, or a neighboring left bottom corner of the current block.
  • a combination of at least one of the motion vectors of neighboring blocks may be set as a merge candidate or an affine seed vector prediction candidate.
  • the motion vector of the neighboring block adjacent to the upper left corner, the motion vector of the neighboring block adjacent to the upper right corner and the motion vector of the neighboring block adjacent to the lower left corner are respectively the first affine seed for the upper left control point. It can be set as a vector, a second affine seed vector for the upper right control point and a third affine seed vector for the lower left control point.
  • a neighbor candidate that is not encoded in affine inter mode may be used to derive a merge candidate, affine seed vector prediction candidate, or affine seed vector of the current block. You can.
  • neighboring blocks that are not encoded in the affine inter mode will be referred to as non-affine neighboring blocks.
  • 18 is a diagram illustrating an example of deriving an affine seed vector of a current block based on a non-affine neighboring block.
  • a lower left reference sample and a lower right reference sample for A may be set.
  • a sample neighboring to the left of the lower left sample of block A may be set as a lower left reference sample
  • a lower right sample of block A may be set as a lower right reference sample. Since the lower left reference sample is out of block A, the motion vector of the sub-block including the sample adjacent to the right side of the lower left reference sample may be set as the third affine seed vector of block A.
  • the motion vector of the sub-block including the lower right reference sample may be set as the fourth affine seed vector of block A. Then, based on Equations 9 and 10, a first affine seed vector and a second affine seed vector for the current block may be derived from block A.
  • a method of deriving an affine seed vector from a non-affine neighboring block may be used only when motion compensation prediction for a non-affine neighboring block is performed in units of sub-blocks.
  • the prediction technique for performing motion compensation prediction on a sub-block basis includes at least one of STMVP, ATMVP, Bi-Directional Optical Flow (BIO), Overlapped Block Motion Compensation (OBMC), or Decoder side Motion Vector Refinement (DMVR). You can.
  • the third upper seed vector and the lower right control point of the lower left control point of the affine neighboring block located at the top of the current block is derived.
  • the current block belongs to the coding tree unit to which the current block belongs.
  • a merge candidate, an affine seed vector prediction candidate, or an affine seed vector of the current block may be derived using the neighboring block closest to the neighboring block among the included blocks.
  • an affine seed vector of the current block may be derived by using block F adjacent to block E among blocks included in the coding tree unit to which the current block belongs.
  • affine seed vectors of a plurality of blocks may be used. For example, a plurality of merge candidates may be selected from the merge candidate list, and an affine seed vector or a sub block vector for the current block may be derived based on the affine seed vectors of the selected merge candidates. Encoding / decoding a current block using affine seed vectors of multiple blocks may be referred to as a multiple affine merge encoding method.
  • Information indicating whether a plurality of affine merge encoding methods are applied to a current block may be encoded and transmitted through a bitstream. Or, based on at least one of the number of neighboring blocks that are affine among neighboring blocks adjacent to the current block, the number of merge candidates included in the merge candidate list, or the affine motion model of the current block, multiple affine merges in the current block Whether or not to apply the encoding method can be determined.
  • 20 and 21 are flowcharts illustrating a method for predicting motion compensation using multiple merge candidates.
  • 20 shows an example of deriving affine seed vectors of a current block using affine seed vectors of a plurality of merge candidates.
  • 21 is a diagram illustrating an example of deriving a motion vector of each sub-block using affine seed vectors of a plurality of merge candidates.
  • the affine seed vector of the current block may be generated based on the sum, difference, average, or weighted sum operation of the affine seed vector of two merge candidates.
  • Equations 11 and 12 show an example in which the affine seed vector of the current block is derived by summing the affine seed vectors of merge candidates.
  • sv 4 represents a seed vector that is the first affine of the current block
  • sv 0 represents a seed vector that is the first affine of the first merge candidate
  • sv 2 is the first affine of the second merge candidate Represents an in seed vector
  • sv 5 represents the second affine seed vector of the current block
  • sv 1 represents the second affine seed vector of the first merge candidate
  • sv 3 represents the second affine seed vector of the second merge candidate .
  • equations 13 and 14 show an example in which the affine seed vector of the current block is derived through weighted operation of the affine seed vectors of merge candidates.
  • a first sub-block motion vector and a second sub-block motion vector for each sub-block in the current block respectively, based on the affine seed vectors of the first merge candidate and the affine seed vectors of the second merge candidate.
  • a final sub-block motion vector may be generated based on the sum, difference, average, or weighted sum operation of the first sub-block motion vector and the second sub-block motion vector.
  • Equation 15 shows an example of deriving the final sub-block motion vector through the summation of the first sub-block motion vector and the second sub-block motion vector.
  • V0 represents a first sub-block motion vector
  • V1 represents a second sub-block motion vector
  • V2 represents a final sub-block motion vector
  • Equation 16 shows an example in which the final sub-block motion vector is derived through weighted operation of the first sub-block motion vector and the second sub-block motion vector.
  • Intra prediction is to predict a current block by using a reconstructed sample that has been encoded / decoded around the current block. At this time, for intra prediction of the current block, a reconstructed sample before the in-loop filter is applied may be used.
  • the intra prediction technique includes matrix-based intra prediction and general intra prediction considering directionality with a surrounding reconstructed sample.
  • Information indicating the intra prediction technique of the current block may be signaled through a bitstream.
  • the information may be a flag of 1 bit.
  • the intra prediction technique of the current block may be determined based on at least one of the location, size, shape of the current block, or intra prediction technique of the neighboring block. For example, when a current block exists across a picture boundary, it may be set so that intra-prediction based on a matrix 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 previously stored in an encoder and a decoder and reconstructed samples 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 of 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.
  • the reference sample line of the current block may be determined (S2201).
  • the reference sample line means a set of reference samples included in a line k-th from the top and / or left of the current block.
  • the reference sample may be derived from a reconstructed sample in which encoding / decoding of a current block is completed.
  • Index information identifying a reference sample line of a current block among a plurality of reference sample lines may be signaled through a bitstream.
  • the plurality of reference sample lines may include at least one of a top line and / or a left first line, a second line, a third line, or a fourth line in the current block.
  • Table 1 shows an index assigned to each of the reference sample lines. In Table 1, it is assumed that the first line, the second line, and the fourth line are used as reference sample line candidates.
  • a reference sample line of the current block may be determined based on at least one of a position, size, shape of the current block, or a prediction coding mode of a neighboring block. For example, when the current block touches a boundary of a picture, tile, slice, or coding tree unit, the first reference sample line may be determined as the reference sample line of the current block.
  • the reference sample line may include upper reference samples located at the top of the current block and left reference samples located at the left of the current block.
  • Upper reference samples and left reference samples may be derived from reconstructed samples around the current block.
  • the reconstructed samples may be in a state before an in-loop filter is applied.
  • 23 is a view showing reference samples included in each reference sample line.
  • a prediction sample may be obtained using at least one of the reference samples belonging to the reference sample line.
  • the intra prediction mode of the current block may be determined (S2202).
  • the intra prediction mode of the current block at least one of the non-directional intra prediction mode or the directional intra prediction mode may be determined as the intra prediction mode of the current block.
  • the non-directional intra prediction mode includes a planner 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.
  • 24 is a diagram showing intra prediction modes.
  • FIG. 24 (a) shows 35 intra prediction modes
  • FIG. 24 (b) shows 67 intra prediction modes.
  • More or fewer intra prediction modes than shown in FIG. 24 may be defined.
  • a MPM Motion Probable Mode
  • 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 top of the current block.
  • the left neighboring block is (-1, 0), (-1, H-1) or (-1, (H-1) / 2) It may include a sample of the location.
  • H represents the height of the current block.
  • the upper neighboring block may include samples at positions (0, -1), (W-1, -1) or ((W-1) / 2, -1).
  • W represents the width of the current block.
  • MPM may be derived based on the intra prediction mode of the neighboring block. Specifically, the intra prediction mode of the left neighboring block may be set to the variable candIntraPredModeA, and the intra prediction mode of the upper neighboring block may be set to the variable candIntraPredModeB.
  • the neighboring block when the neighboring block is unavailable (eg, when the neighboring block has not yet been encoded / decoded or when the position of the neighboring block is outside the picture boundary), when the neighboring block is encoded with matrix-based intra prediction, the neighboring block is The variable candIntraPredModeX (where X is A or B), which is derived based on the intra prediction mode of the neighboring block, is coded as the default mode when it is encoded with inter prediction or when a neighboring block is included in a coding tree unit different from the current block. Can be set.
  • the default mode may include at least one of a planner, DC, vertical direction mode, or horizontal direction mode.
  • an intra prediction mode corresponding to an index value for specifying any one of the matrices may be set to candIntraPredModeX.
  • a lookup table representing a mapping relationship between index values for specifying a matrix and intra prediction modes may be pre-stored in the encoder and decoder.
  • MPMs can be derived.
  • the number of MPMs included in the MPM list may be preset in the encoder and decoder. For example, the number of MPMs may be 3, 4, 5, or 6. Alternatively, information indicating the number of MPMs may be signaled through a bitstream. Alternatively, the number of MPMs may be determined based on at least one of a prediction coding mode of a neighboring block and a size or shape of a current block.
  • the number of MPMs is three, and three MPMs are referred to as MPM [0], MPM [1], and MPM [2]. If the number of MPMs is more than three, the MPMs may be configured to include three MPMs described in the embodiments described below.
  • MPM [0] and MPM [1] may be set to planner and DC mode, respectively.
  • MPM [2] may be set to a vertical intra prediction mode, a horizontal intra prediction mode, or a diagonal intra prediction mode.
  • the diagonal intra prediction mode may be a lower left diagonal intra prediction mode, an upper left intra prediction mode, or an upper right intra prediction mode.
  • MPM [0] may be set to be the same as candIntraPredA.
  • MPM [1] and MPM [2] can be set to intra prediction modes similar to candIntraPredA.
  • An intra prediction mode similar to candIntraPredA may be an intra prediction mode in which an index difference value between candIntraPredA is ⁇ 1 or ⁇ 2. Modular computation (%) and offset can be used to derive an intra prediction mode similar to candIntraPredA.
  • MPM [0] may be set equal to candIntraPredA
  • MPM [1] may be set equal to candIntraPredB.
  • MPM [2] may be set to a vertical vertical intra prediction mode, a horizontal intra prediction mode, or a diagonal intra prediction mode.
  • MPM [2] is set to an intra prediction mode derived by adding or subtracting an offset to a planner, DC, or a larger one of candIntraPredA or candIntraPredB. You can.
  • the offset may be 1 or 2.
  • 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 may be called an MPM flag with a flag of 1 bit.
  • index information identifying one of the MPMs may be signaled through the bitstream.
  • the MPM specified by the index information may be set as an intra prediction mode of the current block.
  • residual mode information indicating any one of the remaining 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 reassigned to the remaining intra prediction modes excluding MPMs.
  • the decoder can sort the MPMs in ascending order and compare the 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, the intra prediction mode of the current block may be derived by adding 1 to the residual mode information.
  • 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 planner, DC, vertical direction mode, or horizontal direction 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.
  • index information indicating 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 index of the reference sample line of the current block is not 0, it can be set to not use the default mode. Accordingly, when the index of the reference sample line is not 0, the default mode flag is not signaled and the default mode flag value can 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, the values of all samples in the prediction block may be generated based on the average value of the reference samples. The average value may be derived using at least one of the top reference samples located at the top of the current block and the left reference samples located at the left of the current block.
  • the number or range of reference samples used to derive the average value may vary. For example, if the current block is a non-square block having a width greater than a height, an average value may be calculated using only the top reference samples. On the other hand, if the current block is a non-square block whose width is smaller than the height, the average value can be calculated using only the left reference samples. That is, when the width and height of the current block are different, the average value can be calculated using only reference samples adjacent to the longer side. Alternatively, based on the width and height ratio of the current block, it may be determined whether to calculate the average value using only the top reference samples or whether to calculate the average value using only the left reference samples.
  • a prediction sample may be obtained using a horizontal prediction sample and a vertical prediction sample.
  • the horizontal prediction sample is obtained based on the left reference sample and the right reference sample located on the same horizontal line as the prediction sample
  • the vertical prediction sample is a top reference sample and a bottom 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 a reference sample adjacent to the upper right corner of the current block
  • the lower reference sample may be generated by copying a reference sample adjacent to the lower left corner of the current block.
  • the horizontal prediction sample may be obtained based on the weighted sum operation of the left reference sample and the right reference sample, and the vertical prediction sample may be obtained based on the weighted sum operation of the upper reference sample and the lower reference sample.
  • the weight assigned 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 prediction sample and the vertical prediction sample. When a weighted sum operation is performed, it is possible to determine a weight given to the horizontal prediction sample and the vertical prediction sample based on the position of the prediction sample.
  • a parameter indicating a prediction direction (or prediction angle) of the selected directional prediction mode may be determined.
  • Table 2 below shows intra direction parameters intraPredAng for each intra prediction mode.
  • PredModeIntraIntraPredAng One- 232 326 421 517 613 79 PredModeIntraIntraPredAng 85 92 100 11-2 12-5 13-9 14-13 PredModeIntraIntraPredAng 15-17 16-21 17-26 18-32 19-26 20-21 21-17 PredModeIntraIntraPredAng 22-13 23-9 24-5 25-2 260 272 285 PredModeIntraIntraPredAng 299 3013 3117 3221 3326 3432
  • Table 2 shows the 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. If more than 33 directional intra prediction modes are defined, Table 2 may be further subdivided to set intra directional parameters of each of the directional intra prediction modes.
  • a prediction sample may be obtained based on the value of the intra direction parameter.
  • the value of the intra-direction parameter is negative, left reference samples and upper reference samples may be arranged in a line.
  • 25 and 26 are views illustrating an example of a one-dimensional array in which reference samples are arranged in a line.
  • FIG. 25 shows an example of a vertical one-dimensional arrangement of reference samples in a vertical direction
  • FIG. 26 shows an example of a horizontal one-dimensional arrangement of reference samples in a horizontal direction. Assuming that 35 intra prediction modes are defined, the embodiments of FIGS. 25 and 26 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 of 19 to 25, the left reference samples are A vertical one-dimensional array rotated clockwise can be applied. In arranging the reference samples in a line, the intra prediction mode angle can 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 can be obtained through the following equations 17 and 18, 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 reference sample can be specified. Specifically, considering the slope of the prediction mode, it is possible to specify the location of the reference sample used to derive the prediction sample.
  • 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 predicted sample can be obtained by interpolating reference samples located adjacent to the left or right or top and bottom of the position where the angular line passes. have.
  • Equation 19 shows an example of obtaining a prediction sample based on reference samples.
  • Equation 19 P denotes a prediction sample, and Ref_1D denotes one of one-dimensionally arranged reference samples.
  • the location of the reference sample may be determined by the location (x, y) of the prediction sample and the reference sample index iIdx.
  • Equation 19 may be simplified as Equation 20 below.
  • 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.
  • intra prediction modes 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 or shape of the region may be adaptively determined based on at least one of the size, shape, or intra prediction mode of the current block.
  • at least one of the size or shape of the region may be previously defined independently of the size or shape of the current block in the encoder and decoder.
  • intra prediction may be performed based on each of the plurality of intra predictions, and a final prediction sample may be derived based on an average operation or a weighted sum operation of a plurality of prediction samples obtained through multiple intra predictions.
  • the first prediction sample may be obtained by performing intra prediction based on the first intra prediction mode
  • the second prediction sample may be obtained by performing intra prediction based on the second intra prediction mode. Thereafter, based on an average operation or a weighted sum operation between the first prediction sample and the second prediction sample, a final prediction sample may be obtained.
  • the weight assigned to each of the first prediction sample and the second prediction sample is whether the first intra prediction mode is a non-directional / directional prediction mode, whether the second intra prediction mode is a non-directional / directional prediction mode, or a neighboring block It may be determined by considering at least one of the intra prediction modes of.
  • the plurality of intra prediction modes may be a combination of a non-directional intra prediction mode and a directional prediction mode, a combination of directional prediction modes, or a combination of non-directional prediction modes.
  • 27 is a diagram illustrating an angle in which directional intra prediction modes form 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. Described by the angle formed by the x-axis and the directional prediction mode, the directional prediction modes may exist between 45 degrees (lower left diagonal direction) and -135 degrees (right upper diagonal direction).
  • a reference sample farther to the prediction sample is used instead of the reference sample closer to the prediction sample among the reference samples located on the angular line along the intra prediction angle Therefore, a case may be derived in which a prediction sample is derived.
  • 28 is a diagram illustrating an aspect in which a prediction sample is obtained when the current block is in a non-square form.
  • the current block is non-square with a width greater than the height, and the intra prediction mode of the current block has an angle between 0 and 45 degrees.
  • the intra prediction mode of the current block has an angle between 0 and 45 degrees.
  • the current block is a non-square with a height greater than the width
  • the intra prediction mode of the current block is a directional intra prediction mode with a range of -90 to -135 degrees. It is assumed. In the above case, when deriving the prediction sample A near the bottom row of the current block, among the reference samples located on the angular mode along the angle, instead of the left reference sample L closest to the prediction sample, the prediction sample farther away from the prediction sample The use of T may occur.
  • the intra prediction mode of the current block may be replaced with the 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 illustrated in FIG. 24 may be used.
  • Such a directional intra prediction mode can be defined as a wide angle intra prediction mode.
  • the wide angle intra prediction mode represents a directional intra prediction mode that does not fall within a range of 45 degrees to -135 degrees.
  • 29 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
  • the length of the left reference samples may be set to 2H + 1.
  • sample A shown in FIG. 28 (a) is predicted using the reference sample T
  • sample A shown in FIG. 28 (b) is predicted using the reference sample L Can be.
  • 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 a wide angle intra prediction mode.
  • the conversion range may be determined based on at least one of the size, shape, or 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 in the upper right diagonal direction (eg, 66) to (index of N in an 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 falls within a transform range, the intra prediction mode may be converted into a wide angle intra prediction mode.
  • the transform may be to subtract a predefined value for the intra prediction mode, and the predefined value may be a total number of intra prediction modes (eg, 67) excluding wide angle intra prediction modes.
  • intra prediction modes 66 to 53 may be converted into wide angle intra prediction modes -1 to -14, respectively.
  • the transform range may be set from an index of the intra prediction mode in the lower left diagonal direction (eg, 2) to an index of the 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 falls within a transform range, the intra prediction mode may be converted into a wide angle intra prediction mode.
  • the transform may be to add a predefined value to the intra prediction mode, and the predefined value may be a total number of directional intra prediction modes (eg, 65) excluding wide angle intra prediction modes.
  • each of the intra prediction modes 2 to 15 may be converted into wide angle intra prediction modes between 67 and 80 times.
  • intra prediction modes belonging to the transform range will be referred to as wide angle intra alternative prediction modes.
  • the conversion range can be determined based on the ratio of the current block.
  • Table 4 and Table 5 show a transform range when 35 intra prediction modes and 67 intra prediction modes are defined, respectively, excluding the wide angle intra prediction mode.
  • the number of wide-angle intra-alternate prediction modes included in the transform range may be different.
  • wide-angle intra-prediction modes are used in addition to the existing intra-prediction modes, a resource required for encoding the wide-angle intra-prediction modes increases, so that encoding efficiency may be lowered. Accordingly, instead of encoding wide-angle intra prediction modes as it is, encoding efficiency can be improved by encoding alternative intra-prediction modes for the wide-angle intra prediction modes.
  • the second wide-angle alternative intra-prediction mode 67 can be encoded as the intra-block prediction mode of the current block.
  • the -1 wide-angle alternative intra-prediction mode # 66 can be encoded into the current block's intra-prediction mode.
  • the decoder can decode the intra prediction mode of the current block and determine whether the decoded intra prediction mode is included in the transform range.
  • the decoded intra prediction mode is a wide angle alternative intra prediction mode
  • the intra prediction mode may be converted into a wide angle intra prediction mode.
  • the wide-angle intra prediction mode may be encoded as it is.
  • the intra prediction mode may be coded based on the MPM list described above.
  • a method of configuring the MPM list will be described in detail.
  • 10 wide angle intra prediction modes having an angle greater than 45 degrees (-1 to -10) and 10 wide angle intra prediction modes having an angle less than -135 degrees are defined from 67 to 76. Is assumed.
  • MPM may be set based on a wide angle alternative intra prediction mode corresponding to the wide angle intra prediction mode.
  • the variable candIntraPredX (X is A or B) may be set as a wide angle alternative intra prediction mode.
  • the MPM induction method may be determined according to the shape of the current block. For example, if the current block is a square having the same width and height, candIntraPredX may be set as a wide-angle alternative intra prediction mode. On the other hand, if the current block is non-square, candIntraPredX can be set to a wide-angle intra prediction mode.
  • the wide-angle intra prediction mode having a smaller index than the intra-left diagonal intra prediction mode is set to candIntraPredX as it is, but the index is higher than the intra prediction mode in the upper right diagonal direction.
  • the corresponding wide-angle alternative intra prediction mode is set to candIntraPredX.
  • the neighboring block encoded in the wide-angle intra-prediction mode has the same / similar form to the current block, whether to derive the MPM using the wide-angle intra-prediction mode as it is, or the wide-angle alternative intra-prediction mode Therefore, it may be determined whether to induce MPM.
  • the wide-angle intra prediction mode of the neighboring block may be set to candIntraPredX regardless of the shape of the current block.
  • candIntraPredX may be set to a wide-angle intra prediction mode of a neighboring block or a wide-angle alternative intra prediction mode.
  • MPM can be derived based on candIntraPredA and candIntraPredB. At this time, the MPM may be derived with an intra prediction mode similar to candIntraPredA or candIntraPredB. An intra prediction mode similar to candIntraPredA or candIntraPredB can be derived based on modulo operation and offset. In this case, constants and offsets used for modulo calculation may be differently determined according to the shape of the current block.
  • Table 6 shows an example of deriving MPM according to the shape of the current block.
  • candIntraPredA and candIntraPredB are the same, and candIntraPredA is a directional intra prediction mode.
  • an intra prediction mode similar to candIntraPredA can be obtained based on a modular operation based on a value obtained by subtracting 1 from the total number of directional intra prediction modes excluding wide angle intra prediction modes. For example, if the number of directional intra prediction modes other than the wide angle intra prediction modes is 65, MPM may be derived based on a value derived based on candIntraPredA and a modulo operation of 64.
  • an intra prediction mode similar to candIntraPredA can be obtained based on a modular operation based on a value obtained by subtracting 1 from the total number of directional intra prediction modes including wide angle intra prediction modes.
  • MPM may be derived based on a value derived based on candIntrapredA and a modulo operation of 84.
  • the wide-angle intra prediction mode can be set to a directional intra prediction mode similar to candIntraPredA.
  • the wide-angle intra prediction mode cannot be set to a directional intra prediction mode similar to candIntraPredA
  • the wide-angle intra prediction mode is directional intra prediction mode similar to candIntraPredA.
  • MPM may be derived by considering the shape of the current block and whether candIntraPredA is a wide-angle intra prediction mode.
  • Table 7 shows an example of deriving MPM according to the shape of the current block.
  • candIntraPredModeB is equal to candIntraPredModeA
  • candIntraPredA> 0 && candIntraPredModeA ⁇ 67
  • MPMs may be set as default modes.
  • MPM [0], MPM [1], and MPM [2] may be set to planner, DC, and vertical intra prediction modes, respectively.
  • candIntraPredA and a similar directional intra prediction mode may be set as MPMs.
  • MPM [0] may be set to candIntraPredA
  • MPM [1] and MPM [2] may be set to a directional intra prediction mode similar to candIntraPredA.
  • candIntraPredA and a similar directional intra prediction mode may be set as MPMs.
  • MPM [0] may be set to candIntraPredA
  • MPM [1] and MPM [2] may be set to a directional intra prediction mode similar to candIntrapredA.
  • a directional intra prediction mode similar to candIntraPredA can be derived using modulo computation and offset.
  • the constant used for modulo operation may be different depending on the shape of the current block.
  • an offset used to derive a directional intra prediction mode similar to candIntraPredA can be set differently. For example, if the current block is non-square having a width greater than a height, a directional intra prediction mode similar to candIntraPredA may be derived using offset 2. On the other hand, if the current block is non-square with a height higher than the width, a directional intra prediction mode similar to candIntraPredA can be derived using offsets 2 and -8.
  • MPMs may be derived by considering whether candIntraPredX is a wide-angle intra prediction mode having the largest or smallest index.
  • Table 8 shows an example of deriving the MPM considering the wide-angle intra prediction mode index.
  • candIntraPredModeB is equal to candIntraPredModeA
  • candIntraPredA and candIntraPredB are the same.
  • wide-angle intra prediction modes having an index value smaller than the intra-prediction mode in the lower left diagonal direction are referred to as lower-angle wide-angle intra prediction modes, and the index value is larger than the intra prediction mode in the upper right diagonal direction.
  • the angle intra prediction modes are referred to as right-angle wide angle intra prediction modes.
  • candIntraPredA When candIntraPredA is a lower-direction wide-angle intra-prediction mode, candIntraPredA and a similar directional intra-prediction mode may be set as MPMs.
  • candIntraPredA when candIntraPredA is a lower-direction wide-angle intra-prediction mode having the smallest value, a lower-direction wide-angle intra-prediction mode having a predefined index value may be set to MPM.
  • the predefined index may be an index having the largest value among the lower-angle wide-angle intra prediction modes. For example, when candIntraPredA is -10, MPM [0], MPM [1], and MPM [2] may be set to -10, -1, and -9, respectively.
  • candIntraPredA When candIntraPredA is a right-angle wide-angle intra prediction mode, candIntraPredA and a similar directional intra prediction mode may be set as MPMs.
  • candIntraPredA when candIntraPredA is a right-side wide-angle intra prediction mode having the largest value, a right-side wide-angle intra prediction mode having a predefined index value may be set to MPM.
  • the predefined index may be an index having the smallest value among the right-side wide-angle intra prediction modes. For example, when candIntraPredA is 77, MPM [0], MPM [1], and MPM [2] may be 77, 76, and 67, respectively.
  • the default mode may be set to MPM.
  • the default mode may include at least one of a planner, DC, vertical intra prediction mode, horizontal intra prediction mode, or diagonal intra prediction mode.
  • the intra prediction mode opposite to candIntraPredA or the intra opposite to the opposite direction can be set to MPM.
  • MPM candidates may be derived by considering the shape of the current block and the shape of the neighboring block.
  • the MPM derivation method may be different when both the current block and the neighboring block are non-square and the current block is square or the neighboring block is non-square.
  • MPMs in the MPM list may be rearranged (or reordered).
  • the reordering represents reassigning the index assigned to each of the MPMs. For example, a smaller index may be allocated to the same MPM as the intra prediction mode of the neighboring block having the same size or the same shape as the current block.
  • the intra prediction mode candIntraPredA of the left neighboring block and the intra prediction mode candIntraPredB of the upper neighboring block are set to MPM [0] and MPM [1], respectively.
  • MPMs may be rearranged such that the intra prediction mode candIntraPredB of the upper neighboring block has a smaller index. That is, candIntraPredB can be rearranged to MPM [0] and candIntraPredA can be rearranged to MPM [1].
  • the MPMs may be rearranged such that the intra prediction mode candIntraPredB of the upper neighboring block has a smaller index. That is, candIntraPredB can be rearranged to MPM [0] and candIntraPredA can be rearranged to MPM [1].
  • the MPMs may be rearranged such that the intra prediction mode candIntraPredB of the upper neighboring block has a smaller index. That is, candIntraPredB can be rearranged to MPM [0] and candIntraPredA can be rearranged to MPM [1].
  • At least one of a size of a current block, a shape of a current block, a size of a neighboring block, or a shape of a neighboring block may be considered.
  • MPMs may be rearranged based on the size or shape of the current block. For example, if the current block is non-square with a width greater than a height, MPMs may be rearranged in descending order. On the other hand, if the current block is non-square with a height greater than the width, MPMs may be rearranged in ascending order.
  • the derived residual image may be derived by differentiating the predicted image from the original image.
  • the residual image is changed to the frequency domain, even if high frequency components are removed from the frequency components, the subjective image quality of the image does not drop significantly. Accordingly, if the value of the high-frequency components is converted to a small value, or if the value of the high-frequency components is set to 0, there is an effect that the compression efficiency can be increased without causing a large amount of visual distortion.
  • the current block can be transformed to decompose the residual image into two-dimensional frequency components.
  • the transformation may be performed using a transformation technique such as DCT (Discrete Cosine Transform) or DST (Discrete Sine Tranform).
  • DCT decomposes (or transforms) the residual image into two-dimensional frequency components using cosine transform
  • DST decomposes (or transforms) the residual image into two-dimensional frequency components using sine transform.
  • frequency components may be expressed as a base image.
  • N2 basic pattern components may be obtained.
  • the size of each of the basic pattern components included in the NxN size block can be obtained.
  • the size of the basic pattern component can be referred to as a DCT coefficient or a DST coefficient.
  • the conversion technique DCT is mainly used to convert an image in which low-frequency non-zero components are distributed.
  • the conversion technique DST is mainly used for an image in which high-frequency components are widely distributed.
  • the residual image may be converted using a conversion technique other than DCT or DST.
  • the transform coefficient may mean a DCT coefficient or a DST coefficient.
  • the transform coefficient may mean the size of the basic pattern component generated as a result of the second transform.
  • the conversion technique can be determined on a block-by-block basis.
  • the transform technique may be determined based on at least one of a prediction coding mode of a current block, a size of a current block, or a size of a current block. For example, if the current block is coded in the intra prediction mode, and the size of the current block is smaller than NxN, the transformation may be performed using the transformation technique DST. On the other hand, if the above conditions are not satisfied, the conversion may be performed using the conversion technique DCT.
  • a 2D image transformation may not be performed on some blocks of the residual image.
  • the one that does not perform 2D image transformation may be referred to as transform skip.
  • transform skip When transform skip is applied, quantization may be applied to residual values for which transform is not performed.
  • the converted current block may be converted again.
  • a transformation based on DCT or DST may be defined as a first transformation
  • a transformation in which a block to which the first transformation is applied is defined as a second transformation.
  • the first transform may be performed using any one of a plurality of transform core candidates.
  • the first transformation may be performed using any one of DCT2, DCT8, or DCT7.
  • Different conversion cores may be used for the horizontal and vertical directions.
  • Information indicating a combination of a horizontal transform core and a vertical transform core may be signaled through a bitstream.
  • the execution units of 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 4x4 subblock of the converted 8x8 blocks.
  • the transform coefficients of the remaining regions in which the second transform is not performed may be set to 0.
  • a first transform may be performed on a 4x4 block, and a second transform may be performed on an 8x8-sized region including the transformed 4x4 block.
  • Information indicating whether to perform the second transform may be signaled through a bitstream.
  • the decoder may perform an inverse transform (second inverse transform) of the second transform, and perform an inverse transform (first inverse transform) of the first transform on the execution result.
  • second inverse transform an inverse transform
  • first inverse transform an inverse transform of the first transform
  • Quantization is to reduce the energy of a block, and the quantization process includes dividing a transform coefficient by a specific constant value.
  • the constant value may be derived by a quantization parameter, and the quantization parameter may be defined as a value between 1 and 63.
  • the decoder can obtain a residual block through inverse quantization and inverse transform.
  • a prediction block and a residual block may be added to obtain a reconstructed block for the current block.
  • the in-loop filter may include at least one of a deblocking filter, a sample adaptive offset filter (SAO), or an adaptive loop filter (ALF).
  • a reconstruction block before the in-loop filter is applied will be referred to as a first reconstruction block
  • a reconstruction block after the in-loop filter is applied will be referred to as a second reconstruction block.
  • a second reconstruction block may be obtained by applying at least one of a deblocking filter, SAO, or 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 a result of performing quantization in block units.
  • a blocking strength (BS) between a first reconstructed block and a neighbor reconstructed block may be determined.
  • 30 is a flowchart illustrating a process for determining block strength.
  • P denotes a first reconstruction block
  • Q denotes a neighbor reconstruction block
  • the neighbor reconstruction block may be a neighbor to the left or top of the current block.
  • the prediction encoding modes of P and Q whether non-zero transform coefficients are included, whether inter prediction is performed using the same reference picture, or whether the difference values of motion vectors are greater than or equal to a threshold value It is shown that the block strength is determined in consideration.
  • whether to apply a deblocking filter can be determined. For example, if the block strength is 0, filtering may not be performed.
  • the SAO is intended to mitigate ringing artifacts that occur as a result of quantization in the frequency domain.
  • the 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.
  • the pixel brightness may be divided into 32 equal sections, and pixels having similar brightness values may be set as one set.
  • 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 predefined size / shape filter to a first reconstructed image or a reconstructed image to which a deblocking filter is applied. Equation 21 below shows an application example of ALF.
  • any one of the predefined filter candidates may be selected.
  • Each of the filter candidates may be different in size or shape.
  • At least one of diamond shapes having a size of 5x5, 7x7, or 9x9 may be selected.
  • chroma component only a 5x5 diamond shape can be used.
  • one picture is divided into multiple areas, and multiple areas are encoded / decoded in parallel. You can consider options. To this end, a picture may be divided into tiles that are basic units of parallel encoding / decoding, and each tile may be processed in parallel.
  • Tiles may be limited to have a rectangular shape. In encoding / decoding a tile, data of another tile is not used.
  • the probability table of the context adaptive binary arithmetic coding (CABAC) context can be initialized in units of tiles, and an in-loop filter can be set not to be applied at the boundary of tiles.
  • CABAC context adaptive binary arithmetic coding
  • the tile includes at least one coding tree unit, and the boundary of the tile coincides with the boundary of the coding tree unit.
  • a picture may be divided into a plurality of tile sets.
  • Information for dividing a picture into a plurality of tile sets may be signaled through a bitstream.
  • Tiles may have the same size in all regions except for the picture boundary, depending on the split type of the picture.
  • a picture may be divided so that adjacent tiles in the horizontal direction have a height, or a picture may be divided so that adjacent tiles in the vertical direction have a width.
  • each of the tiles belongs to a different column and / or row.
  • the column to which the tile belongs is referred to as a tile column
  • the row to which the tile belongs is referred to as a tile row.
  • Information for determining an aspect in which a picture is divided into tiles may be signaled through a bitstream.
  • the information may be encoded and signaled through a picture parameter set or a sequence parameter set.
  • the information is for determining the number of tiles in a picture, and may include information indicating the number of tile rows and information indicating the number of tile columns.
  • the syntax element num_tile_columns_minus1 represents a value obtained by subtracting 1 from the number of tile columns
  • the syntax element num_tile_rows_minus1 represents a value obtained by subtracting 1 from the number of tile rows.
  • num_tile_columns_minus1 may represent 3
  • num_tile_rows_minus1 may represent 2.
  • information indicating the size of the tiles may be signaled through a bitstream.
  • information indicating the width of each tile column is signaled through a bitstream
  • information indicating the height of each tile row is a bit. It can be signaled through the stream.
  • the syntax element column_width_minus1 indicating the width of the tile column for each tile column may be encoded and signaled
  • the syntax element row_height_minus1 indicating the height of the tile row for each tile row may be encoded and signaled.
  • column_width_minus1 represents a value obtained by subtracting 1 from the width of a tile column
  • row_height_minus1 represents a value obtained by subtracting 1 from the height of a tile row.
  • the encoding of column_width_minus1 may be omitted for the last tile column, and the encoding of row_height_minus1 may be omitted for the last tile row.
  • the width of the last tile column and the height of the last row can be derived by considering the picture size.
  • the decoder can determine the size of a tile based on column_width_minus1 and row_height_minus1.
  • Table 9 shows a syntax table for dividing a picture into tiles.
  • the syntax element num_tile_columns_minus1 indicating the number of tile rows and the syntax element num_tile_rows_minus1 indicating the number of tile rows may be signaled.
  • uniform_spacing_flag indicating whether a picture is divided into tiles of equal size may be signaled.
  • uniform_spacing_flag indicating whether a picture is divided into tiles of equal size
  • syntax element column_width_minus1 indicating the width of each tile column and syntax element row_height_minus1 indicating the height of each tile row may be signaled.
  • loop_filter_across_tiles_enabled_flag indicates whether it is allowed to use the loop filter at the tile boundary.
  • a tile column having the smallest width among tile columns may be referred to as a minimum width tile
  • a tile row having a smallest height among tile rows may be referred to as a minimum height tile.
  • Information indicating the width of the minimum width tile and information indicating the height of the minimum height tile may be signaled through a bitstream.
  • the syntax element min_column_width_minus1 represents a value obtained by subtracting 1 from the width of a minimum width tile
  • the syntax element min_row_height_minus1 represents a value obtained by subtracting 1 from the height of a minimum height tile.
  • the syntax element diff_column_width represents the difference in width between the current tile column and the minimum tile column.
  • the width difference value may be expressed as a difference value of the number of coding tree unit columns.
  • the decoder can derive the width of the current tile by adding the width difference value derived based on the diff_column_width and the width of the minimum width tile derived based on the min_column_width_minus1.
  • the syntax element diff_row_height represents the height difference value between the current tile row and the minimum tile row.
  • the height difference value may be expressed as a difference value of the number of coding tree unit rows.
  • the decoder can derive the height of the current tile by adding the height difference value derived based on diff_row_height and the height of the minimum height tile derived based on min_row_height_minus1.
  • Table 10 shows a syntax table including size difference information.
  • the picture may be split so that the heights of adjacent tiles are different from each other, or the picture may be split so that the widths of adjacent tiles are different from each other.
  • the above picture splitting method may be referred to as a flexible tile splitting technique, and the tiles divided through the flexible tile splitting technique may be referred to as a flexible tile.
  • 33 is a diagram illustrating a split mode of a picture according to the flexible tile technique.
  • a search order between tiles generated by dividing a picture may follow a predetermined scan order. Also, an index may be assigned to each tile according to a predetermined scan order.
  • the scan order of tiles may be any of a raster scan, a diagonal scan, a vertical scan, or a horizontal scan.
  • 33A to 33D show examples in which an index is assigned to each tile according to raster scan, diagonal scan, vertical scan, and horizontal scan, respectively.
  • the next scan order may be determined. For example, if the height of the current tile and the height of a neighboring tile to the right of the current tile are different (eg, when the height of the right neighboring tile is greater than the height of the current tile), the same as the neighboring tile at the bottom of the current tile.
  • the leftmost of the tiles placed on the vertical line may be determined as a scan target after the current tile.
  • the scan order of tiles may be determined on a picture or sequence basis.
  • the scan order of tiles may be determined in consideration of the size of the first tile in the picture. For example, when the width of the first tile is greater than the height, the scan order of tiles may be set as a horizontal scan. When the height of the first tile is greater than the width, the scan order of the tiles can be set to vertical scan. When the width of the first tile is equal to the height, the scan order of the tiles can be set to raster scan or diagonal scan.
  • Information indicating the total number of tiles may be signaled through the bitstream.
  • the syntax element number_of_tiles_in_picture_minus2 derived by subtracting 2 from the total number of tiles in a picture may be signaled.
  • the decoding apparatus may recognize the number of tiles included in the current picture based on number_of_tiles_in_picture_minus2.
  • Table 11 shows a syntax table including tile number information.
  • the sub-tile is a basic unit constituting the tile, and each tile may include at least one sub-tile.
  • the sub-tile may include one or more coding tree units.
  • the syntax element subtile_width_minus1 represents a value obtained by subtracting 1 from the width of the sub-tile.
  • the syntax element subtile_height_minus1 represents a value obtained by subtracting 1 from the height of the sub-tile.
  • the syntax element use_previous_tile_size_flag indicates whether the size of the current tile is the same as the size of the previous tile. If use_previous_tile_size_flag is true, it indicates that the size of the current tile is the same as that of the previous tile. If use_previous_tile_size_flag is false, information indicating the size of the current tile may be encoded and signaled. For the first tile, encoding of use_previous_tile_size_flag may be omitted, and the value of the flag may be set to false.
  • the information indicating the tile size may include a syntax element tile_width_minus1 [i] indicating the width of the i-th tile and a syntax element tile_height_minus1 [i] indicating the height of the i-th tile.
  • Information indicating the tile size may indicate a difference value from the size of the sub-tile.
  • the width tileWidth of the i-th tile may be derived based on the following Equation 22, and the height tileHeight of the i-th tile may be derived based on the following Equation 23.
  • the encoding of the sub-tile size information may be omitted, and the size of the i-th tile may be encoded as the tile size information.
  • the size information of the sub-tiles may be selectively coded.
  • Information indicating whether the size information of the sub-tile is encoded may be signaled through a video parameter set, a sequence parameter set, or a picture parameter set.
  • the information related to the tile size may be coded and signaled to indicate the number of coding tree units.
  • column_width_minus1, min_column_width_minus1, subtile_width_minus1 or tile_width_minus1, etc. may indicate the number of coding tree unit columns included in the tile.
  • diff_column_width may indicate a difference between the number of coding tree unit columns included in the minimum width tile and the number of coding tree unit columns included in the current tile.
  • row_height_minus1, min_row_height_minus1, subtile_height_minus1, tile_height_minus1, etc. may indicate the number of coding tree unit rows included in the tile.
  • diff_row_height may indicate a difference between the number of coding tree unit rows included in the minimum height tile and the number of coding tree unit rows included in the current tile.
  • the decoder may determine a tile size based on the number of coding tree unit columns and / or the number of coding tree unit rows and the size of the coding tree unit derived based on the syntax elements.
  • the width of the i-th tile is set to (tile_width_minus1 [i] +1) * (width of the coding tree unit)
  • the height of the i-th tile is (tile_height_minus1 [i] +1) * (height of the coding tree unit) Can be set to
  • information indicating the size of a coding tree unit may be signaled through a sequence parameter set or a picture parameter set.
  • Table 11 describes that the syntax element use_previous_tile_size_flag indicating whether the size of the current tile is the same as the previous tile is used.
  • information indicating whether the width of the current tile is equal to the width of the previous tile or information indicating whether the height of the current tile is equal to the height of the previous tile may be encoded and signaled.
  • Table 12 shows a syntax table including information indicating whether the width of the current tile is equal to the width of the previous tile.
  • the syntax element use_previous_tile_width_flag indicates whether the width of the current tile is the same as the previous tile.
  • the width of the current tile may be set equal to the width of the previous tile. In this case, encoding of information indicating the width of the current tile is omitted, and the width of the current tile can be derived from the width of the previous tile.
  • tile_width_minus1 [i] may represent a value obtained by subtracting 1 from the width of the i-th tile.
  • the syntax element use_previous_tile_width_flag may be encoded and signaled only when it is determined that the size of the current tile is different from that of the previous tile (eg, when the use_previous_tile_size_flag value is 0).
  • tile_width_minus1 [i] may be obtained by subtracting 1 from the number of coding tree unit columns included in the i-th tile.
  • the decoder can calculate the tile width by adding 1 to tile_width_minus1 [i], deriving the number of coding tree unit columns belonging to the i-th tile, and multiplying the derived value by the width of the coding tree unit.
  • Table 13 shows a syntax table further including information indicating whether the height of the current tile is equal to the height of the previous tile.
  • the syntax element use_previous_tile_height_flag indicates whether the height of the current tile is the same as the previous tile.
  • the height of the current tile may be set equal to the height of the previous tile. In this case, encoding of information indicating the height of the current tile can be omitted, and the height of the current tile can be derived from the height of the previous tile.
  • tile_height_minus1 [i] may represent a value obtained by subtracting 1 from the height of the i-th tile.
  • the syntax element use_previous_tile_height_flag may be encoded and signaled only when the size of the current tile is determined to be different from the size of the previous tile (eg, when the use_previous_tile_size_flag value is 0).
  • the syntax element use_previous_tile_height_flag can be signaled only when use_previous_tile_width_flag is false.
  • Table 12 shows an example where use_previous_tile_width_flag is used
  • Table 13 shows an example when use_previous_tile_width_flag and use_previous_tile_height_flag are used.
  • Use_previous_tile_height_flag and use_previous_tile_size_flag may be determined based on at least one of a tile scan order, a width / height of the first tile, or a width / height of the previous tile. For example, use_previous_tile_height_flag may be used when the tile scan order is vertical, while use_previous_tile_width_flag may be used when the tile scan order is horizontal. Alternatively, use_previous_tile_width_flag may be used when the first tile or the previous tile is non-square having a width greater than height, while use_previous_tile_height_flag may be used when the first tile or the previous tile is non-square having a height greater than the width.
  • Table 14 shows an example in which encoding of tile size information for the last tile is omitted.
  • the remaining area in the picture may be set as the last tile.
  • tile ID For each coding tree unit, an identifier (hereinafter referred to as tile ID, TileID) for identifying a tile to which the coding tree unit belongs may be assigned.
  • 34 is a diagram illustrating an example in which tile IDs are assigned to each coding tree unit.
  • the same tile ID may be assigned to coding tree units belonging to the same tile.
  • N tileIDs may be allocated to coding tree units belonging to Tile N.
  • variables x and y indicating the location of a coding tree unit in a picture may be determined.
  • x represents a value obtained by dividing the x-axis coordinates by the width of the coding tree unit among the positions (x0, y0) of the upper left sample of the coding tree unit
  • y is the location of the upper left sample of the coding tree unit (x0, y0).
  • the y-axis coordinate is divided by the height of the coding tree unit.
  • x and y can be derived by the following equations 24 and 25.
  • Assigning tile IDs to each coding tree unit may be performed through the following process.
  • the tile ID of each coding tree unit may be initialized to a value obtained by subtracting 1 from the number of tiles in the picture.
  • information indicating whether an in-loop filter is allowed for each tile may be encoded and signaled.
  • 35 illustrates an example in which whether to apply an in-loop filter for each tile is selectively determined.
  • whether to allow an in-loop filter eg, deblocking filter, SAO and / or ALF
  • SAO deblocking filter
  • Table 17 shows an example in which information indicating whether an in-loop filter is allowed is encoded for each tile.
  • loop_filter_across_tiles_flag [i] indicates whether it is allowed to apply an in-loop filter to the i-th tile.
  • a value of loop_filter_across_tile_flag [i] of 1 indicates that an in-loop filter can be used in horizontal and vertical boundaries of a tile having a tile ID of i.
  • a value of 0 for loop_filter_across_tiles_flag [i] indicates that an in-loop filter cannot be used in horizontal and vertical boundaries of a tile with tile ID i.
  • Information indicating whether an in-loop filter is allowed may be encoded for each of the horizontal direction and the vertical direction.
  • Table 18 shows an example in which information indicating whether an in-loop filter is allowed is individually coded in the horizontal direction and the vertical direction.
  • the syntax element loop_filter_hor_across_tiles_flag [i] indicates whether it is allowed to apply an in-loop filter across the horizontal direction for the i-th tile.
  • the syntax element loop_filter_ver_across_tiles_flag [i] indicates whether it is allowed to apply an in-loop filter across the vertical direction for the i-th tile.
  • a value of loop_filter_hor_across_tile_flag [i] of 1 indicates that an in-loop filter can be used in a horizontal boundary of a tile having a tile ID of i.
  • a value of 0 for loop_filter_hor_across_tile_flag [i] indicates that an in-loop filter cannot be used in a horizontal boundary of a tile having a tile ID of i.
  • a value of 1 for loop_filter_ver_across_tile_flag [i] indicates that an in-loop filter can be used in a vertical boundary of a tile with i
  • a value of 0 for loop_filter_ver_across_tile_flag [i] is a vertical boundary of a tile with tile ID i. Indicates that the in-loop filter cannot be used.
  • information indicating whether an in-loop filter is allowed for a tile group including a plurality of tiles may be encoded and signaled. Whether to allow the in-loop filter for a plurality of tiles included in the tile group may be determined by the above information.
  • At least one of the number of tiles belonging to the tile group, the size of the tile group, or the segmentation information of the picture may be signaled through a bitstream.
  • a region of a size previously defined in the encoder and the decoder may be set as a tile group.
  • the encoding of information indicating whether the in-loop filter is allowed is omitted, and whether the in-loop filter is allowed may be determined based on at least one of the number of coding tree units included in the tile, the width of the tile, or the height of the tile. For example, if the tile width is smaller than the reference value, an in-loop filter for the horizontal direction may be allowed, and if the tile height is smaller than a comfort level, an in-loop filter for the vertical direction may be allowed.
  • reconstruction data outside the tile may be generated based on data included in the tile.
  • the reconstructed image outside the tile may be obtained by padding or interpolating data included in the tile.
  • an in-loop filter may be applied using the reconstructed data outside the tile.
  • each component for example, a unit, a module, etc.
  • each component constituting a block diagram may be implemented as a hardware device or software, and a plurality of components are combined to form a single hardware device or software. It may be implemented.
  • the above-described embodiment is implemented in the form of program instructions that can be executed through various computer components and can be recorded in a computer-readable recording medium.
  • the computer-readable recording medium may include program instructions, data files, data structures, or the like alone or in combination.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs, DVDs, and magneto-optical media such as floptical disks. media), and hardware devices specifically 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 that encodes / decodes an image.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Reduction Or Emphasis Of Bandwidth Of Signals (AREA)

Abstract

본 발명에 따른 영상 복호화 방법은, 현재 블록에 머지 후보 리스트를 생성하는 단계, 상기 머지 후보 리스트에 포함된 복수의 머지 후보들 중 어느 하나를 특정하는 단계, 상기 특정된 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 기초로, 상기 현재 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 유도하는 단계, 상기 현재 블록의 제1 어파인 시드 벡터 및 제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의 성능도 점차 적으로 그 한계를 드러내고 있다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 어파인 모델을 이용한 인터 예측 방법 및 상기 방법을 위한 장치를 제공하는 것을 목적으로 한다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 서브 블록의 병진 움직임 벡터를 이용하여, 어파인 시드 벡터를 유도하는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 이웃 블록과 현재 블록의 거리를 2의 멱급수로 변환하여 어파인 시드 벡터를 유도하는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
본 발명에 따른 비디오 신호 복호화/부호화 방법은, 현재 블록에 머지 후보 리스트를 생성하는 단계, 상기 머지 후보 리스트에 포함된 복수의 머지 후보들 중 어느 하나를 특정하는 단계, 상기 특정된 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 기초로, 상기 현재 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 유도하는 단계, 상기 현재 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 이용하여, 상기 현재 블록 내 서브 블록에 대한 어파인 벡터를 유도하는 단계, 및 상기 어파인 벡터를 기초로, 상기 서브 블록에 대한 움직임 보상 예측을 수행하는 단계를 포함한다. 이때, 상기 서브 블록은 상기 현재 블록 보다 작은 크기의 영역이다. 또한, 상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 현재 블록 주변에 인접하는 이웃 블록의 움직임 정보를 기초로 유도될 수 있다.
본 발명에 따른 비디오 신호 복호화/부호화 방법에 있어서, 상기 이웃 블록이 상기 현재 블록과 상이한 코딩 트리 유닛에 포함된 경우, 상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 이웃 블록의 좌측 하단 서브 블록 및 우측 하단 서브 블록의 움직임 벡터들을 기초로 유도될 수 있다.
본 발명에 따른 비디오 신호 복호화/부호화 방법에 있어서, 상기 좌측 하단 서브 블록은 상기 이웃 블록 내 좌측 하단 코너에 위치하는 좌측 하단 기준 샘플을 포함하고, 상기 우측 하단 서브 블록은 상기 이웃 블록 내 좌측 하단 코너에 위치하는 우측 하단 기준 샘플을 포함할 수 있다.
본 발명에 따른 비디오 신호 복호화/부호화 방법에 있어서, 상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 좌측 하단 서브 블록 및 상기 우측 하단 서브 블록의 모션 벡터들의 차분 값을 스케일링 팩터를 이용한 비트 시프트 연산을 기초로 획득된 값을 기초로 유도되고, 상기 스케일링 팩터는 상기 좌측 하단 기준 샘플 및 상기 우측 하단 기준 샘플 사이의 수평 거리 및 오프셋을 가산한 값을 기초로 유도될 수 있다.
본 발명에 따른 비디오 신호 복호화/부호화 방법에 있어서, 상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 좌측 하단 서브 블록 및 상기 우측 하단 서브 블록의 모션 벡터들의 차분 값을 스케일링 팩터를 이용한 비트 시프트 연산을 기초로 획득된 값을 기초로 유도되고,상기 스케일링 팩터는 상기 우측 하단 기준 샘플의 우측에 이웃하는 이웃 샘플과 상기 좌측 하단 기준 샘플 사이의 거리를 기초로 유도될 수 있다.
본 발명에 따른 비디오 신호 복호화/부호화 방법에 있어서, 상기 머지 후보 리스트는, 상기 현재 블록의 상단에 위치하는 상단 이웃 블록들 중 첫번째로 가용한 것으로 판단되는 상단 이웃 블록을 기초로 유도되는 제1 머지 후보, 및 상기 현재 블록의 좌측에 위치하는 좌측 이웃 블록들 중 첫번째로 가용한 것으로 판단되는 좌측 이웃 블록을 기초로 유도되는 제2 머지 후보를 포함할 수 있다.
본 발명에 따른 비디오 신호 복호화/부호화 방법에 있어서, 상기 이웃 블록이 상기 현재 블록과 동일한 코딩 트리 유닛에 포함된 경우, 상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 이웃 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 기초로 유도될 수 있다.
본 발명에 대하여 위에서 간략하게 요약된 특징들은 후술하는 본 발명의 상세한 설명의 예시적인 양상일 뿐이며, 본 발명의 범위를 제한하는 것은 아니다.
본 발명에 의하면, 어파인 모델을 이용한 인터 예측 방법을 통해 예측 효율을 향상시킬 수 있는 효과가 있다.
본 발명에 의하면, 서브 블록의 병진 움직임 벡터를 이용하여, 어파인 시드 벡터를 유도함으로써, 부호화 효율을 높일 수 있는 효과가 있다.
본 발명에 의하면, 이웃 블록과 현재 블록의 거리를 2의 멱급수로 변환하여 어파인 시드 벡터를 유도함으로써, 부호화 효율을 높일 수 있는 효과가 있다. .
본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
도 1은 본 발명의 일 실시예에 따른 영상 부호화기(인코더기)의 블록도이다.
도 2는 본 발명의 일 실시예에 따른 영상 복호화기(디코더기)의 블록도이다.
도 3은 본 발명의 일 실시예에 따른 기본 코딩 트리 유닛을 도시한 도면이다.
도 4는 코딩 블록의 다양한 분할 형태를 나타낸 도면이다.
도 5는 코딩 트리 유닛의 분할 양상을 예시한 도면이다.
도 6은 본 발명의 일 실시예에 따른 인터 예측 방법의 흐름도이다.
도 7은 오브젝트의 비선형 움직임을 예시한 도면이다.
도 8은 본 발명의 일실시예 따른 어파인 모션에 기초한 인터 예측 방법의 흐름도이다.
도 9는 어파인 모션 모델 별 어파인 시드 벡터를 예시한 도면이다.
도 10은 4 파라미터 모션 모델 하에서 서브 블록들의 어파인 벡터들을 예시한 도면이다.
도 11은 머지 후보를 유도하는데 이용될 수 있는 이웃 블록을 도시한 도면이다.
도 12는 어파인 이웃 블록의 어파인 시드 벡터에 기초하여 현재 블록의 어파인 시드 벡터를 유도하는 예를 나타낸 도면이다.
도 13은 서브 블록의 모션 벡터를 어파인 이웃 블록의 어파인 시드 벡터로 설정하는 예를 나타낸 도면이다.
도 14 내지 도 16은 기준 샘플의 위치를 나타낸 도면이다.
도 17은 변형된 어파인 머지 벡터 유도 방법이 적용된 일 예를 나타낸 도면이다.
도 18은 논 어파인 이웃 블록을 기초로 현재 블록의 어파인 시드 벡터를 유도하는 예를 나타낸 도면이다.
도 19는 이웃 블록을 다른 이웃 블록으로 대체하는 예를 나타낸 도면이다.
도 20 및 도 21은 복수 머지 후보들을 이용한 움직임 보상 예측 방법을 나타낸 흐름도이다.
도 22는 본 발명의 일 실시예에 따른, 인트라 예측 방법의 흐름도이다.
도 23은 각 참조 샘플 라인이 포함하는 참조 샘플들을 나타낸 도면이다.
도 24는 인트라 예측 모드들을 나타낸 도면이다.
도 25 및 도 26은 참조 샘플들을 일렬로 배열하는 일차원 배열의 예시를 나타낸 도면이다.
도 27은 방향성 인트라 예측 모드들이 x축과 평행한 직선과 형성하는 각도를 예시한 도면이다.
도 28은 현재 블록이 비정방 형태인 경우, 예측 샘플이 획득되는 양상을 나타낸 도면이다.
도 29는 와이드 앵글 인트라 예측 모드들을 나타낸 도면이다.
도 30은 블록 강도를 결정하는 과정을 나타낸 흐름도이다.
도 31은 기 정의된 필터 후보들을 나타낸다.
도 32는 픽처가 복수의 타일들로 분할된 예를 나타낸다.
도 33은 플렉서블 타일 기법에 따른 픽처의 분할 양상을 나타낸 도면이다.
도 34는 각 코딩 트리 유닛에 타일 아이디가 할당되는 예를 나타낸 도면이다.
도 35는 타일별로 인루프 필터의 적용 여부가 선택적으로 결정되는 예를 도시한 것이다.
이하에서는 도면을 참조하여 본 발명의 실시예를 상세히 설명한다.
영상의 부호화 및 복호화는 블록 단위로 수행된다. 일 예로, 코딩 블록, 변환 블록, 또는 예측 블록에 대해, 변환, 양자화, 예측, 인루프 필터링, 또는 복원 등의 부호화/복호화 처리가 수행될 수 있다.
이하, 부호화/복호화 대상인 블록을 '현재 블록'이라 호칭하기로 한다. 일 예로, 현재 블록은 현재 부호화/복호화 처리 단계에 따라, 코딩 블록, 변환 블록, 또는 예측 블록을 나타낼 수 있다.
아울러, 본 명세서에서 사용되는 용어 '유닛'은 특정 부호화/복호화 프로세스를 수행하기 위한 기본 단위를 나타내고, '블록'은 소정 크기의 샘플 어레이를 나타내는 것으로 이해될 수 있다. 별도의 설명이 없는 한, '블록'과 '유닛'은 동등한 의미로 사용될 수 있다. 일 예로, 후술되는 실시예에서, 코딩 블록과 코딩 유닛은 상호 동등한 의미를 갖는 것으로 이해될 수 있다.
도 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를 적용할지, DST를 적용할지 또는 KLT를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다.
양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.
재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.
재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.
엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.
엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다.
엔트로피 부호화부(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, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 부호화기에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화기의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.
예측부(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 PCTKR2019012290-appb-M000001
6개의 파라미터를 이용하여 어파인 모션을 표현하는 경우, 복잡한 움직임을 표현할 수 있으나, 각 파라미터들을 부호화하는데 필요한 비트 수가 많아져 부호화 효율이 저하될 수 있다. 이에 따라, 4개의 파라미터를 이용하여 어파인 모션을 표현할 수도 있다. 수학식 2는 4 파라미터를 이용하여 어파인 모션을 표현한 것이다.
Figure PCTKR2019012290-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 PCTKR2019012290-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은 머지 후보를 유도하는데 이용될 수 있는 이웃 블록을 도시한 도면이다.
현재 블록의 이웃 블록은, 현재 블록의 좌측에 인접하는 이웃 블록(A), 현재 블록의 상단에 이웃하는 이웃 블록(B), 현재 블록의 우측 상단 코너에 인접하는 이웃 블록(C), 현재 블록의 좌측 하단 코너에 인접하는 이웃 블록(D) 또는 현재 블록의 좌측 상단 코너에 인접하는 이웃 블록 중 적어도 하나를 포함할 수 있다. 현재 블록의 좌측 상단 샘플의 좌표가 (x0, y0)인 경우, 좌측 이웃 블록 A는 (x0-1, y0+H-1) 위치의 샘플을 포함하고, 상단 이웃 블록 B는 (x0+W-1, y0-1) 위치의 샘플을 포함한다. 여기서, W 및 H는 각각 현재 블록의 너비 및 높이를 나타낸다. 우측 상단 이웃 블록 C는 (x0+W, y0-1) 위치의 샘플을 포함하고, 좌측 하단 이웃 블록 D는 (x0-1, y0+H) 위치의 샘플을 포함한다. 좌측 상단 이웃 블록 E는 (x0-1, y0-1) 위치의 샘플을 포함한다.
이웃 블록이 어파인 인터 예측 모드로 부호화된 경우, 해당 이웃 블록의 어파인 시드 벡터를 기초로, 머지 후보의 어파인 시드 벡터를 유도할 수 있다. 이하, 어파인 인터 예측 모드로 부호화된 이웃 블록을 어파인 이웃 블록이라 호칭하기로 한다.
이웃 블록들을 기 정의된 스캔 순서로 탐색하여, 현재 블록에 대한 머지 후보를 생성할 수 있다. 상기 스캔 순서는 부호화기 및 복호화기에서 기 정의되어 있을 수 있다. 일 예로, A, B, C, D, E 순서로 이웃 블록을 탐색할 수 있다. 그리고, 탐색된 어파인 이웃 블록들로부터 순차적으로 머지 후보를 유도할 수 있다. 또는, 스캔 순서는 현재 블록의 크기, 형태 또는 어파인 모션 모델 중 적어도 하나에 기초하여 적응적으로 결정될 수 있다. 즉, 크기, 형태 또는 어파인 모션 모델 중 적어도 하나가 상이한 블록들에 대한 스캔 순서는 서로 상이할 수 있다.
또는, 현재 블록의 상단에 위치하는 블록들을 순차적으로 탐색하여, 첫번째로 발견된 어파인 이웃 블록으로부터 하나의 머지 후보를 유도하고, 현재 블록의 좌측에 위치하는 블록들을 순차적으로 탐색하여, 첫번째로 발견된 어파인 이웃 블록으로부터 하나의 머지 후보를 유도할 수 있다. 여기서, 현재 블록의 상단에 위치하는 이웃 블록들은, 이웃 블록 E, 이웃 블록 B 또는 이웃 블록 C 중 적어도 하나를 포함하고, 현재 블록의 좌측에 위치하는 블록들은, 블록 A 또는 블록 D 중 적어도 하나를 포함할 수 있다. 이때, 이웃 블록 E를 현재 블록의 좌측에 위치하는 블록으로 분류하는 것도 가능하다.
도시되지는 않았지만, 현재 블록의 시간적 이웃 블록으로부터 머지 후보를 유도할 수도 있다. 여기서, 시간적 이웃 블록은, 콜로케이티드 픽처 내 현재 블록과 동일 위치의 블록 또는 이에 인접하는 블록을 포함할 수 있다. 구체적으로, 현재 블록의 시간적 이웃 블록이 어파인 인터 예측 모드로 부호화되었다면, 시간적 머지 후보의 어파인 시드 벡터에 기초하여, 머지 후보를 유도할 수 있다.
머지 후보들을 포함하는 머지 후보 리스트를 생성하고, 머지 후보 리스트에 포함된 머지 후보들 중 하나의 어파인 시드 벡터를 현재 블록의 어파인 시드 벡터로 결정할 수 있다. 이를 위해, 머지 후보들 중 어느 하나를 식별하는 인덱스 정보가 부호화되어 비트스트림을 통해 전송될 수 있다.
다른 예로, 이웃 블록들을 스캔 순서에 따라 탐색하되, 첫번째로 발견된 어파인 이웃 블록의 어파인 시드 벡터로부터 현재 블록의 어파인 시드 벡터를 유도할 수도 있다.
위와 같이, 어파인 머지 모드 하에서, 현재 블록의 어파인 시드 벡터는 이웃 블록의 어파인 시드 벡터를 이용하여 유도될 수 있다.
현재 블록의 인터 예측 모드가 어파인 모션 벡터 예측 모드인 경우, 모션 벡터 예측 후보 리스트에 포함된 모션 벡터 예측 후보의 어파인 시드 벡터를 현재 블록의 어파인 시드 벡터 예측값으로 결정할 수 있다. 상기 어파인 시드 벡터 예측값에 어파인 시드 벡터 차분값을 더하여, 현재 블록의 어파인 시드 벡터를 유도할 수 있다.
어파인 시드 벡터 예측 후보는 현재 블록의 이웃 블록을 기초로 유도될 수 있다. 구체적으로, 현재 블록의 상단에 위치하는 이웃 블록들을 소정 스캔 순서에 따라 탐색하고, 첫번째로 발견된 어파인 이웃 블록으로부터 제1 어파인 시드 벡터 예측 후보를 유도할 수 있다. 또한, 현재 블록의 좌측에 위치하는 이웃 블록들을 소정 스캔 순서에 따라 탐색하고, 첫번째로 발견된 어파인 이웃 블록으로부터 제2 어파인 시드 벡터 예측 후보를 유도할 수 있다.
어파인 시드 벡터 차분값을 결정하기 위한 정보가 부호화되어 비트스트림을 통해 전송될 수 있다. 상기 정보는 어파인 시드 벡터 차분값의 크기를 나타내는 크기 정보 및 어파인 시드 벡터 차분값의 부호를 나타내는 부호 정보를 포함할 수 있다. 각 컨트롤 포인에 대한 어파인 시드 벡터 차분값은 동일한 값으로 설정될 수 있다. 또는, 컨트롤 포인트 별로 어파인 시트 벡터 차분값이 상이하게 설정될 수 있다.
상술한 바와 같이, 어파인 이웃 블록의 어파인 시드 벡터로부터 머지 후보 또는 어파인 시드 벡터 예측 후보의 어파인 시드 벡터를 유도하고, 유도된 머지 후보 또는 어파인 시드 벡터 예측 후보의 어파인 시드 벡터를 이용하여, 현재 블록의 어파인 시드 벡터를 유도할 수 있다. 또는, 어파인 이웃 블록들을 소정의 스캔 순서에 따라 탐색한 뒤, 첫번째로 발견된 어파인 이웃 블록의 어파인 시드 벡터로부터 현재 블록의 어파인 시드 벡터를 유도할 수도 있다.
이하, 어파인 이웃 블록의 어파인 시드 벡터로부터 현재 블록, 머지 후보 또는 어파인 시드 벡터 예측 후보의 어파인 시드 벡터를 유도하는 방법에 대해 상세히 설명하기로 한다. 후술되는 실시예들에서, 현재 블록의 어파인 시드 벡터를 유도하는 것은, 머지 후보의 어파인 시드 벡터 유도하는 것 또는 어파인 시드 벡터 예측 후보의 어파인 시드 벡터를 유도하는 것으로도 이해될 수 있다.
도 12는 어파인 이웃 블록의 어파인 시드 벡터에 기초하여 현재 블록의 어파인 시드 벡터를 유도하는 예를 나타낸 도면이다.
어파인 이웃 블록에 대해 좌상단 컨트롤 포인트에 대한 제1 어파인 시드 벡터 nv0 및 우상단 컨트롤 포인트에 대한 제2 어파인 시드 벡터 nv1가 저장되어 있다면, 상기 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 기초로, 어파인 이웃 블록의 좌하단 컨트롤 포인트에 대한 제3 어파인 시드 벡터 nv2를 유도할 수 있다. 수학식 4는 제3 어파인 시드 벡터를 유도하는 예를 나타낸다.
Figure PCTKR2019012290-appb-M000004
상기 수학식 4에서, (nv0x, nv0y)은 제1 어파인 시드 벡터 nv0를, (nv1x, nv1y)는 제2 어파인 시드 벡터 nv1를, (nv2x, nv2y)는 제3 어파인 시드 벡터 nv2를 나타낸다. 또한, (xn0, xn0)은 제1 컨트롤 포인트의 위치, (xn1, xn1)는 제2 컨트롤 포인트의 위치를, (xn2, xn2)는 제3 컨트롤 포인트의 위치를 나타낸다.
이후, 제1 어파인 시드 벡터, 제2 어파인 시드 벡터 및 제3 어파인 시드 벡터를 이용하여, 현재 블록의 어파인 시드 벡터를 유도할 수 있다. 수학식 5는 현재 블록의 제1 어파인 시드 벡터 v0를 유도하는 예를 나타내고, 수학식 6은 현재 블록의 제2 어파인 시드 벡터 v1를 유도하는 예를 나타낸다.
Figure PCTKR2019012290-appb-M000005
Figure PCTKR2019012290-appb-M000006
수학식 5 및 수학식 6에서, (v0x, v0y)은 현재 블록의 제1 어파인 시드 벡터 sv0를 나타내고, (v1x, v1y)는 현재 블록의 제2 어파인 시드 벡터 sv1를 나타낸다. 또한, (x0, y0)은 제1 컨트롤 포인트의 위치를 나타내고, (x1, y1)는 제2 컨트롤 포인트의 위치를 나타낸다. 일 예로, 제1 컨트롤 포인트는 현재 블록의 좌측 상단 코너를 나타내고, 제2 컨트롤 포인트는 현재 블록의 우측 상단 코너를 나타낸다.
상술한 예에서는 어파인 이웃 블록에 대한 3개의 어파인 시드 벡터들을 이용하여, 현재 블록의 어파인 시드 벡터들이 유도되는 것으로 설명하였다. 다른 예로, 어파인 이웃 블록의 어파인 시드 벡터들 중 2개만을 이용하여, 현재 블록의 어파인 시드 벡터들을 유도할 수 있다.
또는, 어파인 이웃 블록에 대한 좌측 상단 코너의 제1 어파인 시드 벡터, 우측 상단 코너의 제2 어파인 시드 벡터 또는 좌측 하단 코너의 제3 어파인 시드 벡터 대신 우측 하단 코너에 대한 제4 어파인 시드 벡터를 이용하여 현재 블록의 어파인 시드 벡터들을 유도할 수 있다.
특히, 현재 블록의 상단 경계가 코딩 트리 유닛의 상단 경계와 접하고, 현재 블록의 상단에 이웃하는 어파인 이웃 블록(이하, 상단 어파인 이웃 블록이라 함)의 상단 컨트롤 포인트(예컨대, 좌측 상단 코너 또는 우측 상단 코너)에 대한 어파인 시드 벡터를 이용하고자 하는 경우, 이들을 미리 메모리에 저장해야 하는 바, 라인 버퍼의 개수가 증가하는 문제가 발생할 수 있다. 이에 따라, 현재 블록의 상단 경계가 코딩 트리 유닛의 상단 경계에 접하는 경우, 상단 어파인 이웃 블록에 대해서는, 상단 컨트롤 포인트의 어파인 시드 벡터 대신 하단 컨트롤 포인트(예컨대, 좌측 하단 코너 또는 우측 하단 코너)의 어파인 시드 벡터를 이용하도록 설정할 수 있다. 일 예로, 상단 어파인 이웃 블록의 좌측 하단 코너에 대한 제3 어파인 시드 벡터 및 우측 하단 코너에 대한 제4 어파인 시드 벡터를 이용하여, 현재 블록의 어파인 시드 벡터들을 유도할 수 있다. 이때, 하단 코너에 대한 어파인 시드 벡터는 상단 코너에 대한 어파인 시드 벡터를 복사하거나, 상단 코너들에 대한 어파인 시드 벡터들로부터 유도될 수 있다. 일 예로, 제1 어파인 시드 벡터, 제2 어파인 시드 벡터 또는 제3 어파인 시드 벡터를 우측 하단 코너에 대한 제4 어파인 시드 벡터로 변환/치환하여 사용할 수 있다.
수학식 7 및 수학식 8은 이웃 어파인 벡터의 좌측 하단 컨트롤 포인트에 대한 제3 어파인 시드 벡터 및 우측 하단 컨트롤 포인트에 대한 제4 어파인 시드 벡터를 이용하여, 현재 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 유도하는 예를 나타낸 것이다.
Figure PCTKR2019012290-appb-M000007
Figure PCTKR2019012290-appb-M000008
수학식 7 및 8에서, (xn2, yn2)는 어파인 이웃 블록의 좌측 하단 컨트롤 포인트의 좌표를 나타내고, (xn3, yn3)는 어파인 이웃 블록의 우측 하단 컨트롤 포인트의 좌표를 나타낸다. (x0, y0)는 현재 블록의 좌측 상단 컨트롤 포인트의 좌표를 나타내고, (x1, y1)은 현재 블록의 우측 상단 컨트롤 포인트의 좌표를 나타낸다. (nv2x, nv2y)는 어파인 이웃 블록의 좌측 하단 컨트롤 포인트의 어파인 시드 벡터(즉, 제3 어파인 시드 벡터)를 나타내고, (nv3x, nv3y)는 어파인 이웃 블록의 우측 하단 컨트롤 포인트의 어파인 시드 벡터(즉, 제4 어파인 시드 벡터)를 나타낸다. (v0x, v0y)는 현재 블록의 좌측 상단 컨트롤 포인트의 어파인 시드 벡터(즉, 제1 어파인 시드 벡터)를 나타내고, (v1x, v1y)는 현재 블록의 우측 상단 컨트롤 포인트의 어파인 시드 벡터(즉, 제2 어파인 시드 벡터)를 나타낸다.
수학식 7 및 수학식 8에 포함된 나누기 연산을 비트 시프트 연산으로 변경할 수도 있다. 비트 시프트 연산은 좌측 하단 컨트롤 포인트 및 우측 하단 컨트롤 포인트 사이의 너비(즉, (xn3-xn2))에 의해 유도되는 값을 기초로 수행될 수 있다.
상술한 예에서와 같이, 현재 블록의 어파인 시드 벡터들은 부호화/복호화가 완료된 어파인 이웃 블록의 어파인 시드 벡터들로부터 유도될 수 있다. 이를 위해, 부호화/복호화가 완료된 어파인 이웃 블록의 어파인 시드 벡터들을 메모리에 저장해야 한다. 다만, 어파인 이웃 블록에 포함된 서브 블록들의 병진 모션 벡터들(즉, 어파인 벡터들)에 더하여 어파인 이웃 블록의 어파인 시드 벡터들을 메모리에 저장하게됨에 따라, 메모리 사용량이 증가하는 문제점이 있다. 이와 같은 문제점을 해소하기 위해, 어파인 이웃 블록의 어파인 시드 벡터 대신, 어파인 이웃 블록의 컨트롤 포인트에 인접한 서브 블록의 모션 벡터를 이용하여 현재 블록의 어파인 시드 벡터를 유도할 수 있다. 즉, 어파인 이웃 블록의 컨트롤 포인트에 인접한 서브 블록의 움직임 벡터를 어파인 이웃 블록의 어파인 시드 벡터로 설정할 수 있다. 여기서, 서브 블록은 부호화기 및 복호화기에서 기 정의된 크기/형태를 갖는 블록으로, 모션 벡터가 저장되는 기본 크기/형태를 갖는 블록일 수 있다. 일 예로, 서브 블록은 4x4 크기의 정방형 블록일 수 있다. 또는, 특정 샘플 위치에 대한 모션 벡터를 어파인 이웃 블록의 어파인 시드 벡터로 설정할 수 있다.
도 13은 서브 블록의 모션 벡터를 어파인 이웃 블록의 어파인 시드 벡터로 설정하는 예를 나타낸 도면이다.
컨트롤 포인트에 인접하는 서브 블록의 움직임 벡터를 해당 컨트롤 포인트의 어파인 시드 벡터로 설정할 수 있다. 일 예로, 도 13에 도시된 예에서, 어파인 이웃 블록의 좌측 하단 코너에 인접하는 서브 블록(좌측 하단 서브 블록)의 움직임 벡터 (nv4x, nv4y)를 좌측 하단 컨트롤 포인트의 어파인 시드 벡터 (nv2x, nv2x)로 설정하고, 우측 하단 코너에 인접하는 서브 블록(우측 하단 서브 블록)의 움직임 벡터(nv5x, nv5y)를 우측 하단 코너의 컨트롤 포인트의 어파인 시드 벡터 (nv3x, nv3y)으로 설정할 수 있다. 여기서, 좌측 하단 서브 블록은 이웃 어파인 블록 내 좌측 하단 컨트롤 포인트 (xn2, yn2)에 인접하는 샘플(예컨대, (xn2, yn2-1) 위치의 샘플)을 포함하는 서브 블록을 의미하고, 우측 하단 서브 블록은 이웃 어파인 블록 내 우측 하단 컨트롤 포인트 (xn3, yn3)에 인접하는 샘플(예컨대, (xn3-1, yn3-1)) 위치의 샘플)을 포함하는 블록을 의미할 수 있다. 수학식 7 및 수학식 8을 기초로 현재 블록의 어파인 시드 벡터들을 유도하는 경우, 어파인 이웃 블록의 제3 어파인 시드 벡터는 좌측 하단 서브 블록의 모션 벡터로 대체되고, 제4 어파인 시드 벡터는 우측 하단 서브 블록의 모션 벡터로 대체될 수 있다.
이하, 후술되는 실시예에서는, 어파인 이웃 블록의 어파인 시드 벡터로 이용되는 서브 블록을, 어파인 서브 블록이라 호칭하기로 한다.
본 발명의 일 실시예에 따르면, 특정 위치의 샘플을 기준으로 어파인 서브 블록을 결정할 수 있다. 일 예로, 특정 위치의 샘플을 포함하는 서브 블록을 어파인 서브 블록으로 설정할 수도 있다. 이하, 특정 위치의 샘플을 어파인 기준 샘플이라 호칭하기로 한다. 아울러, 좌측 하단 컨트롤 포인트의 어파인 서브 블록을 결정하는데 이용되는 기준 샘플을 좌측 하단 기준 샘플이라 호칭하고, 우측 하단 컨트롤 포인트의 어파인 서브 블록을 결정하는데 이용되는 기준 샘플을 우측 하단 기준 샘플이라 호칭하기로 한다.
좌측 하단 기준 샘플 및 우측 하단 기준 샘플은 어파인 이웃 블록에 포함된 샘플들로부터 선택될 수 있다. 일 예로, 좌측 하단 서브 블록의 좌상단 샘플, 좌하단 샘플, 우상단 샘플 또는 좌하단 샘플 중 적어도 하나를 좌측 하단 기준 샘플로 설정하고, 우측 하단 서브 블록의 좌상단 샘플, 좌하단 샘플, 우상단 샘플 또는 좌하단 샘플 중 적어도 하나를 우측 하단 기준 샘플로 설정할 수 있다. 이에 따라, 좌측 하단 기준 샘플을 포함하는 좌측 하단 서브 블록 및 우측 하단 기준 샘플을 포함하는 우측 하단 서브 블록의 모션 벡터들이 각각 좌측 하단 컨트롤 포인트에 대한 어파인 시드 벡터 및 우측 하단 포인트에 대한 어파인 시드 벡터로 설정될 수 있다.
다른 예로, 좌측 하단 기준 샘플 또는 우측 하단 기준 샘플 중 적어도 하나가 어파인 이웃 블록의 바깥에 위치하는 샘플로 설정될 수 있다. 이에 대해서는, 도 14 내지 도 16을 참조하여 상세히 설명하기로 한다.
도 14 내지 도 16은 기준 샘플의 위치를 나타낸 도면이다.
도 14의 (a)에 도시된 예에서와 같이, 좌측 하단 컨트롤 포인트에 대해서는 좌측 하단 서브 블록의 좌상단 샘플을 기준 샘플 (xn4, yn4)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn4, yn4)를 포함하는 좌측 하단 서브 블록이 좌측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
우측 하단 컨트롤 포인트에 대해서는 우측 하단 서브 블록의 우상단 샘플의 우측에 위치하는 샘플을 기준 샘플 (xn5, yn5)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn5, yn5)를 포함하는 우측 하단 서브 블록의 우측에 이웃하는 서브 블록이 우측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
또는, 도 14의 (b)에 도시된 예에서와 같이, 좌측 하단 컨트롤 포인트에 대해서는 좌측 하단 서브 블록의 좌상단 샘플의 좌측에 위치하는 샘플을 기준 샘플 (xn4, yn4)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn4, yn4)를 포함하는 좌측 하단 서브 블록의 좌측에 이웃하는 서브 블록이 좌측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
우측 하단 컨트롤 포인트에 대해서는 우측 하단 서브 블록의 우상단 샘플을 기준 샘플 (xn5, yn5)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn5, yn5)를 포함하는 우측 하단 서브 블록이 우측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
또는, 도 15의 (a)에 도시된 예에서와 같이, 좌측 하단 컨트롤 포인트에 대해서는 좌측 하단 서브 블록의 좌하단 샘플을 기준 샘플 (xn4, yn4)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn4, yn4)를 포함하는 좌측 하단 서브 블록이 좌측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
우측 하단 컨트롤 포인트에 대해서는 우측 하단 서브 블록의 우하단 샘플의 우측에 위치하는 샘플을 기준 샘플 (xn5, yn5)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn5, yn5)를 포함하는 우측 하단 서브 블록의 우측에 이웃하는 서브 블록이 우측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
또는, 도 15의 (b)에 도시된 예에서와 같이, 좌측 하단 컨트롤 포인트에 대해서는 좌측 하단 서브 블록의 좌하단 샘플의 좌측에 위치하는 샘플을 기준 샘플 (xn4, yn4)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn4, yn4)를 포함하는 좌측 하단 서브 블록의 좌측에 이웃하는 서브 블록이 좌측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
우측 하단 컨트롤 포인트에 대해서는 우측 하단 서브 블록의 우하단 샘플을 기준 샘플 (xn5, yn5)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn5, yn5)를 포함하는 우측 하단 서브 블록이 우측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
또는, 도 16의 (a)에 도시된 예에서와 같이, 좌측 하단 컨트롤 포인트에 대해서는 좌측 하단 서브 블록의 좌상단 샘플 및 좌하단 샘플 사이에 위치하는 샘플(예컨대, 좌중간 샘플)을 기준 샘플 (xn4, yn4)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn4, yn4)를 포함하는 좌측 하단 서브 블록이 좌측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
우측 하단 컨트롤 포인트에 대해서는 우측 하단 서브 블록의 우상단 샘플과 우하단 샘플 사이에 위치하는 샘플(예컨대, 우중간 샘플)의 우측에 위치하는 샘플을 기준 샘플 (xn5, yn5)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn5, yn5)를 포함하는 우측 하단 서브 블록의 우측에 이웃하는 서브 블록이 우측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
또는, 도 16의 (b)에 도시된 예에서와 같이, 좌측 하단 컨트롤 포인트에 대해서는 좌측 하단 서브 블록의 좌상단 샘플 및 좌하단 샘플 사이에 위치하는 샘플의 좌측에 위치하는 샘플을 기준 샘플 (xn4, yn4)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn4, yn4)를 포함하는 좌측 하단 서브 블록의 좌측에 이웃하는 서브 블록이 좌측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
우측 하단 컨트롤 포인트에 대해서는 우측 하단 서브 블록의 우상단 샘플 및 우하단 샘플 사이에 위치하는 샘플을 기준 샘플 (xn5, yn5)로 설정할 수 있다. 이에 따라, 상기 기준 샘플 (xn5, yn5)를 포함하는 우측 하단 서브 블록이 우측 하단 컨트롤 포인트에 대한 어파인 서브 블록으로 설정될 수 있다.
수학식 7 및 수학식 8을 기초로 현재 블록의 어파인 시드 벡터들을 유도하는 경우, 어파인 이웃 블록의 제3 어파인 시드 벡터는 좌측 하단 컨트롤 포인트에 대한 어파인 서브 블록의 모션 벡터로 대체되고, 제4 어파인 시드 벡터는 우측 하단 컨트롤 포인트에 대한 어파인 서브 블록의 모션 벡터로 대체될 수 있다. 또한, 좌측 하단 컨트롤 포인트의 위치를 좌측 하단 기준 샘플의 위치로 대체하고, 우측 하단 컨트롤 포인트의 위치를 우측 하단 기준 샘플의 위치로 대체할 수 있다.
도 14 내지 도 16을 통해 설명한 바와 달리, 기준 샘플에 인접하는 샘플을 포함하는 서브 블록을 어파인 서브 블록으로 설정할 수도 있다. 구체적으로, 어파인 이웃 서브 블록의 바깥에 위치하는 샘플을 기준 샘플로 설정하되, 어파인 이웃 블록에 포함된 서브 블록을 어파인 서브 블록으로 설정할 수 있다. 일 예로, 도 14의 (a)에 도시된 예에서, 우측 하단 서브 블록의 우상단 샘플의 우측에 위치하는 샘플을 기준 샘플 (xn5, yn5)로 설정하되, 우측 하단 서브 블록을 우측 하단 코너에 대한 어파인 서브 블록으로 설정할 수 있다. 또는, 도 14의 (b)에 도시된 예에서, 좌측 하단 서브 블록의 좌상단 샘플의 좌측에 위치하는 샘플을 기준 샘플 (xn4, yn4)로 설정하되, 좌측 하단 서브 블록을 좌측 하단 코너에 대한 어파인 서브 블록으로 설정할 수 있다.
도 15 및 도 16에도 설명한 실시예가 동일하게 적용될 수 있다. 즉, 도 15의 (a) 또는 도 16의 (a)에 도시된 예에서, 우측 하단 서브 블록의 우하단 샘플 또는 우중단 샘플의 우측에 위치하는 샘플을 기준 샘플 (xn5, yn5)로 설정하되, 우측 하단 서브 블록을 우측 하단 코너에 대한 어파인 서브 블록으로 설정할 수 있다. 또는, 도 15의 (b) 또는 도 16의 (b)에 도시된 예에서, 좌측 하단 서브 블록의 좌하단 샘플 또는 좌중단 샘플의 좌측에 위치하는 샘플을 기준 샘플 (xn4, yn4)로 설정하되, 좌측 하단 서브 블록을 좌측 하단 코너에 대한 어파인 서브 블록으로 설정할 수 있다.
상술한 예에서와 같이, 어파인 서브 블록의 모션 벡터를 이용하여, 어파인 이웃 블록의 어파인 시드 벡터를 유도할 수 있다. 이를 위해, 부호화/복호화가 완료된 블록의 경우, 서브 블록 단위로 모션 벡터를 저장할 수 있다.
다른 예로, 어파인 이웃 블록에 대해 최소 개수의 어파인 시드 벡터들을 저장한 뒤, 저장된 어파인 시드 벡터들을 이용하여 어파인 서브 블록의 모션 벡터를 유도할 수도 있다.
수학식 9 및 수학식 10은 어파인 이웃 블록의 어파인 시드 벡터들을 이용하여, 어파인 서브 블록의 모션 벡터를 유도하는 예를 나타낸 것이다.
Figure PCTKR2019012290-appb-M000009
Figure PCTKR2019012290-appb-M000010
수학식 9 및 수학식 10에서, (nv4x, nv4y)는 좌측 하단 컨트롤 포인트에 대한 어파인 서브 블록의 모션 벡터를 나타내고, (nv5x, nv5y)는 우측 하단 컨트롤 포인트에 대한 어파인 서브 블록의 모션 벡터를 나타낸다. 어파인 서브 블록의 모션 벡터와 컨트롤 포인트의 어파인 시드 벡터가 동일하게 설정되므로, (nv4x, nv4y)를 좌측 하단 컨프롤 포인트에 대한 어파인 시드 벡터 (nv2x, nv2y)로 치환하거나, (nv5x, nv5y)를 우측 하단 컨트롤 포인트에 대한 어파인 시드 벡터 (nv3x, nv3y)로 치환할 수 있다.
(xn4, yn4)는 좌측 하단 서브 블록에 대한 기준 샘플의 위치를 가리킨다. 또는, 이 대신 좌측 하단 서브 블록의 중심 위치 또는 좌측 하단 컨트롤 포인트의 위치를 사용할 수도 있다. (xn5, yn5)는 우측 하단 서브 블록에 대한 기준 샘플의 위치를 가리킨다. 또는, 이 대신 우측 하단 서브 블록의 중심 위치 또는 우측 하단 컨트롤 포인트의 위치를 사용할 수 있다.
수학식 9 및 수학식 10은 현재 블록이 코딩 트리 유닛의 경계와 접하지 않는 경우에 적용될 수 있다. 현재 블록이 코딩 트리 유닛의 상단 경계에 접하는 경우에는 수학식 9 및 수학식 10을 이용하는 대신, 좌측 하단 기준 샘플을 기초로 결정되는 어파인 서브 블록의 병진 모션 벡터를 제3 어파인 시드 벡터로 설정하고, 우측 하단 기준 샘플을 기초로 결정되는 어파인 서브 블록의 병진 모션 벡터를 제4 어파인 시드 벡터로 설정할 수 있다.
수학식 7 및 수학식 8에서, (xn3-xn2)는 좌측 하단 컨트롤 포인트와 우측 하단 컨트롤 포인트 사이의 너비를 나타낸다. 상술한 바와 같이, xn3를 우측 하단 기준 샘플의 위치 xn5로 치환하고, xn2를 좌측 하단 기준 샘플의 위치 xn4로 치환할 수 있다. 이하, (xn3-xn2) 또는 위 수식의 위치를 기준 샘플들의 위치로 치환함으로써 획득되는 값(예컨대, (xn5-xn4))을 변수 Wseed라 정의하고, 상기 변수를 서브 시드 벡터 너비라 호칭하기로 한다.
기준 샘플들의 위치에 따라, 서브 시드 벡터 너비가 2의 멱급수(예컨대, 2n)가 아닌 경우가 발생할 수 있다. 일 예로, 좌측 하단 서브 블록의 좌하단 샘플이 좌측 하단 기준 샘플로 설정되고, 우측 하단 서브 블록의 우하단 샘플이 우측 하단 기준 샘플로 설정된 경우, 서브 시드 벡터의 너비는 2의 배수가 아니다. 이처럼, 서브 시드 벡터 너비가 2의 멱급수가 아닌 경우, 2의 멱급수가 되도록 서브 시드 벡터 너비를 변환할 수 있다. 상기 변환은 서브 시드 벡터 너비에 오프셋을 가산/감산하는 것, 또는 기준 샘플의 위치 대신 상기 기준 샘플에 이웃하는 샘플의 위치를 이용하는 것을 포함할 수 있다. 일 예로, 좌측 하단 기준 샘플 및 우측 하단 기준 샘플 사이의 너비에 1을 가산하여 변환된 서브 시드 벡터 너비를 유도할 수 있다. 또는, 우측 하단 기준 샘플의 우측에 이웃한 이웃 기준 샘플과 좌측 하단 참조 샘플 사이의 너비를 변환된 서브 시드 벡터 너비로 설정할 수 있다. 이후, 변환된 서브 시드 벡터 너비를 수학식 7 및 수학식 8에 적용하여, 현재 블록의 어파인 시드 벡터를 유도할 수 있다.
수학식 7 및 수학식 8에 포함된 나누기 연산을 비트 시프트 연산으로 변경할 수도 있다. 비트 시프트 연산은 변환된 서브 시드 벡터 너비(즉, 2의 멱급수로 표현되는 값)에 의해 유도되는 값을 기초로 수행될 수 있다.
어파인 서브 블록을 결정하는데 이용되는 기준 샘플이 어파인 이웃 블록에 속하지 않는 경우, 어파인 이웃 블록에 포함된 샘플들 중 기준 샘플에 인접하는 샘플을 기초로, 어파인 이웃 블록의 어파인 시드 벡터를 유도할 수 있다. 구체적으로, 어파인 이웃 블록 내에서 상기 기준 샘플에 인접하는 샘플(이하, 이웃 기준 샘플이라 함)을 포함하는 서브 블록의 병진 모션 벡터를 어파인 이웃 블록의 어파인 시드 벡터로 설정할 수 있다. 이와 같이, 이웃 기준 샘플을 이용한 어파인 시드 벡터의 유도 방법을, 변형된 어파인 머지 벡터 유도 방법이라 정의할 수 있다.
도 17은 변형된 어파인 머지 벡터 유도 방법이 적용된 일 예를 나타낸 도면이다.
어파인 이웃 블록 E의 우측 하단 기준 샘플 (xn5, yn5)가 어파인 주변 블록에 속하지 않는 경우, 어파인 이웃 블록에 포함된 샘플들 중 우측 하단 기준 샘플의 좌측에 인접하는 샘플 (xn5-1, yn5)를 기초로 어파인 시드 벡터를 유도할 수 있다. 구체적으로, 이웃 기준 샘플 (xn5-1, yn5)를 포함하는 서브 블록의 병진 모션 벡터를 우측 하단 컨트롤 포인트의 어파인 시드 벡터로 설정할 수 있다.
도 17에 도시된 예에서는, 우측 하단 서브 블록의 우상단 샘플의 우측에 이웃하는 샘플이 우측 하단 기준 샘플인 것으로 도시하였다. 우측 하단 서브 블록의 우하단 샘플의 우측에 이웃하는 샘플 또는 우측 하단 서브 블록의 우중단 샘플의 우측에 이웃하는 샘플이 우측 하단 기준 샘플로 설정된 경우에도, 상기 이웃 기준 샘플의 좌측에 인접하는 샘플을 기초로 어파인 시드 벡터가 유도될 수 있다.
또한, 좌측 하단 기준 샘플이 어파인 이웃 블록에 속하지 않는 경우에도, 설명한 실시예에 따라, 좌측 하단 기준 샘플이 우측에 인접하는 샘플을 기초로 어파인 시드 벡터를 유도할 수 있다.
기준 샘플의 위치와 어파인 시드 벡터를 유도하기 위한 서브 블록을 상이하게 설정함으로써, 서브 시드 벡터 너비를 2의 멱급수로 설정할 수 있다.
현재 블록 주변에 어파인 인터 모드로 부호화되지 않은 이웃 블록을 이용하여, 머지 후보, 어파인 시드 벡터 예측 후보 또는 현재 블록의 어파인 시드 벡터를 유도할 수 있다. 구체적으로, 어파인 인터 모드로 부호화되지 않은 블록들을 조합하고, 이들의 조합을 머지 후보 또는 어파인 시드 벡터 예측 후보로 설정할 수 있다. 일 예로, 현재 블록의 좌측 상단 코너에 인접하는 이웃 블록들 중 어느 하나의 모션 벡터, 현재 블록의 우측 상단 코너에 인접하는 이웃 블록들 중 어느 하나의 모션 벡터 또는 현재 블록의 좌측 하단 코너에 인접하는 이웃 블록들 중 어느 하나의 모션 벡터 중 적어도 하나의 조합을 머지 후보 또는 어파인 시드 벡터 예측 후보로 설정할 수 있다. 이때, 좌측 상단 코너에 인접하는 이웃 블록의 모션 벡터, 우측 상단 코너에 인접하는 이웃 블록의 모션 벡터 및 좌측 하단 코너에 인접하는 이웃 블록의 모션 벡터는 각각 좌측 상단 컨트롤 포인트에 대한 제1 어파인 시드 벡터, 우측 상단 컨트롤 포인트에 대한 제2 어파인 시드 벡터 및 좌측 하단 컨트롤 포인트에 대한 제3 어파인 시드 벡터로 설정될 수 있다.
또는, 상술한 변형된 어파인 머지 벡터 유도 방법을 이용하여, 어파인 인터 모드로 부호화되지 않은 이웃 블록을 이용하여, 머지 후보, 어파인 시드 벡터 예측 후보 또는 현재 블록의 어파인 시드 벡터를 유도할 수 있다. 이하, 어파인 인터 모드로 부호화되지 않은 이웃 블록을 논 어파인 이웃 블록이라 호칭하기로 한다.
도 18은 논 어파인 이웃 블록을 기초로 현재 블록의 어파인 시드 벡터를 유도하는 예를 나타낸 도면이다.
도 18에 도시된 예에서, 현재 블록에 이웃하는 이웃 블록들 모두가 논 어파인 주변 블록인 것으로 가정한다.
현재 블록에 이웃하는 이웃 블록들 중 논 어파인 주변 블록 A로부터 현재 블록의 어파인 시드 벡터를 유도하고자 하는 경우, A에 대한 좌측 하단 기준 샘플 및 우측 하단 기준 샘플을 설정할 수 있다. 일 예로, 블록 A의 좌측 하단 샘플의 왼쪽에 이웃하는 샘플을 좌측 하단 기준 샘플로 설정하고, 블록 A의 우측 하단 샘플을 우측 하단 기준 샘플로 설정할 수 있다. 좌측 하단 기준 샘플은 블록 A를 벗어나므로, 상기 좌측 하단 기준 샘플의 우측에 인접하는 샘플을 포함하는 서브 블록의 모션 벡터를 블록 A의 제3 어파인 시드 벡터로 설정할 수 있다. 또한, 우측 하단 기준 샘플을 포함하는 서브 블록의 모션 벡터를 블록 A의 제4 어파인 시드 벡터로 설정할 수 있다. 이후, 수학식 9 및 10에 기초하여, 블록 A로부터 현재 블록에 대한 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 유도할 수 있다.
논 어파인 주변 블록에 대한 움직임 보상 예측이 서브 블록 단위로 수행된 경우에 한하여, 논 어파인 주변 블록으로부터 어파인 시드 벡터를 유도하는 방법이 이용될 수 있다. 여기서, 서브 블록 단위로 움직임 보상 예측을 수행하는 예측 기법은 STMVP, ATMVP, BIO (Bi-Directional Optical Flow), OBMC (Overlapped Block Motion Compensation) 또는 DMVR (Decoder side Motion Vector Refinement) 중 적어도 하나를 포함할 수 있다.
상술한 실시예에서는, 현재 블록의 상단 경계가 코딩 트리 유닛의 경계에 접하면, 현재 블록의 상단에 위치하는 어파인 이웃 블록의 좌측 하단 컨트롤 포인트에 대한 제3 어파인 시드 벡터 및 우측 하단 컨트롤 포인트에 대한 제4 어파인 시드 벡터를 이용하여, 머지 후보, 어파인 시드 벡터 예측 후보 또는 현재 블록의 어파인 시드 벡터가 유도되는 것으로 설명하였다.
다른 예로, 현재 블록의 상단 경계가 코딩 트리 유닛의 경계에 접하고, 현재 블록의 상단에 위치한 이웃 블록이 현재 블록과 상이한 코딩 트리 유닛에 속하면, 상기 이웃 블록 대신, 현재 블록이 속한 코딩 트리 유닛에 포함된 블록들 중 상기 이웃 블록과 가장 가까운 이웃 블록을 이용하여, 머지 후보, 어파인 시드 벡터 예측 후보 또는 현재 블록의 어파인 시드 벡터를 유도할 수 있다.
도 19에 도시된 예에서는, 현재 블록이 코딩 트리 유닛의 상단 경계에 접하고, 현재 블록 상단에 위치한 블록들, B, C 및 E는 현재 블록과 상이한 코딩 트리 유닛에 속하는 것으로 도시되었다. 이에 따라, 블록 E를 이용하는 대신, 현재 블록이 속한 코딩 트리 유닛에 포함된 블록들 중 블록 E에 인접하는 블록 F를 이용하여, 현재 블록의 어파인 시드 벡터를 유도할 수 있다.
현재 블록의 움직임 보상 예측을 위해, 복수 블록들의 어파인 시드 벡터들이 이용될 수 있다. 일 예로, 머지 후보 리스트로부터 복수개의 머지 후보들을 선택하고, 선택된 머지 후보들의 어파인 시드 벡터들을 기초로, 현재 블록에 대한 어파인 시드 벡터 또는 서브 블록 벡터를 유도할 수 있다. 복수 블록들의 어파인 시드 벡터들을 이용하여, 현재 블록을 부호화/복호화하는 것을 복수 어파인 머지 부호화 방법이라 호칭할 수 있다.
현재 블록에 복수 어파인 머지 부호화 방법이 적용되는지 여부를 나타내는 정보가 부호화되어 비트스트림을 통해 전송될 수 있다. 또는, 현재 블록에 인접하는 이웃 블록들 중 어파인 이웃 블록의 개수, 머지 후보 리스트에 포함된 머지 후보의 개수 또는 현재 블록의 어파인 모션 모델 중 적어도 하나에 기초하여, 현재 블록에 복수 어파인 머지 부호화 방법을 적용할 것인지 여부가 결정될 수 있다.
도 20 및 도 21은 복수 머지 후보들을 이용한 움직임 보상 예측 방법을 나타낸 흐름도이다.
도 20은 복수 머지 후보들의 어파인 시드 벡터들을 이용하여, 현재 블록의 어파인 시드 벡터들을 유도하는 예를 나타낸 것이다. 도 21은 복수 머지 후보들의 어파인 시드 벡터들을 이용하여, 각 서브 블록의 모션 벡터를 유도하는 예를 나타낸 도면이다.
현재 블록의 어파인 시드 벡터는 두 머지 후보들의 어파인 시드 벡터의 합, 차분, 평균 또는 가중합 연산에 기초하여 생성될 수 있다.
다음의 수학식 11 및 12는 머지 후보들의 어파인 시드 벡터들의 합산을 통해 현재 블록의 어파인 시드 벡터가 유도되는 예를 나타낸 것이다.
Figure PCTKR2019012290-appb-M000011
Figure PCTKR2019012290-appb-M000012
수학식 11 및 12에서, sv4는 현재 블록의 제1 어파인 시드 벡터를 나타내고, sv0는 제1 머지 후보의 제1 어파인 시드 벡터를 나타내며, sv2는 제2 머지 후보의 제1 어파인 시드 벡터를 나타낸다. 또한, sv5는 현재 블록의 제2 어파인 시드 벡터를 나타내고, sv1는 제1 머지 후보의 제2 어파인 시드 벡터를 나타내며, sv3는 제2 머지 후보의 제2 어파인 시드 벡터를 나타낸다.
또한, 다음 수학식 13 및 14는 머지 후보들의 어파인 시드 벡터들의 가중합 연산을 통해 현재 블록의 어파인 시드 벡터가 유도되는 예를 나타낸 것이다.
Figure PCTKR2019012290-appb-M000013
Figure PCTKR2019012290-appb-M000014
다른 예로, 제1 머지 후보의 어파인 시드 벡터들 및 제2 머지 후보의 어파인 시드 벡터들을 기초로, 각각 현재 블록 내 각각의 서브 블록에 대한 제1 서브 블록 모션 벡터 및 제2 서브 블록 모션 벡터를 생성할 수 있다. 이후, 제1 서브 블록 모션 벡터 및 제2 서브 블록 모션 벡터의 합, 차분, 평균 또는 가중합 연산에 기초하여 최종 서브 블록 모션 벡터를 생성할 수 있다.
다음의 수학식 15는 제1 서브 블록 모션 벡터 및 제2 서브 블록 모션 벡터의 합산을 통해 최종 서브 블록 모션 벡터를 유도하는 예를 나타낸 것이다.
Figure PCTKR2019012290-appb-M000015
수학식 15에서, V0는 제1 서브 블록 모션 벡터를 나타내고, V1은 제2 서브 블록 모션 벡터를 나타내며, V2는 최종 서브 블록 모션 벡터를 나타낸다.
또한, 다음 수학식 16은 제1 서브 블록 모션 벡터 및 제2 서브 블록 모션 벡터의 가중합 연산을 통해 최종 서브 블록 모션 벡터가 유도되는 예를 나타낸 것이다.
Figure PCTKR2019012290-appb-M000016
인트라 예측은 현재 블록 주변에 부호화/복호화가 완료된 복원 샘플을 이용하여, 현재 블록을 예측하는 것이다. 이때, 현재 블록의 인트라 예측에는, 인루프 필터가 적용되기 전의 복원 샘플이 이용될 수 있다.
인트라 예측 기법은 매트릭스(Matrix)에 기반한 인트라 예측 및 주변 복원 샘플과의 방향성을 고려한 일반 인트라 예측을 포함한다. 현재 블록의 인트라 예측 기법을 지시하는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 1비트의 플래그일 수 있다. 또는, 현재 블록의 위치, 크기, 형태 또는 이웃 블록의 인트라 예측 기법 중 적어도 하나에 기초하여, 현재 블록의 인트라 예측 기법을 결정할 수 있다. 일 예로, 현재 블록이 픽처 바운더리를 걸쳐 존재하는 경우, 현재 블록에는 매트릭트에 기반한 인트라 예측이 적용되지 않도록 설정될 수 있다.
매트릭스에 기반한 인트라 예측은, 부호화기 및 복호화기에서 기 저장된 매트릭스와, 현재 블록 주변의 복원 샘플 사이의 행렬 곱에 기반하여, 현재 블록의 예측 블록을 획득하는 방법이다. 기 저장된 복수개의 매트릭스들 중 어느 하나를 특정하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다. 복호화기는 상기 정보 및 현재 블록의 크기에 기초하여, 현재 블록의 인트라 예측을 위한 매트릭스를 결정할 수 있다.
일반 인트라 예측은, 비방향성 인트라 예측 모드 또는 방향성 인트라 예측 모드에 기초하여, 현재 블록에 대한 예측 블록을 획득하는 방법이다. 이하, 도면을 참조하여, 일반 인트라 예측에 기초한 인트라 예측 수행 과정에 대해 보다 상세히 살펴보기로 한다.
도 22는 본 발명의 일 실시예에 따른, 인트라 예측 방법의 흐름도이다.
현재 블록의 참조 샘플 라인을 결정할 수 있다(S2201). 참조 샘플 라인은 현재 블록의 상단 및/또는 좌측으로부터 k번째 떨어진 라인에 포함된 참조 샘플들의 집합을 의미한다. 참조 샘플은 현재 블록 주변 부호화/복호화가 완료된 복원 샘플로부터 유도될 수 있다.
복수의 참조 샘플 라인들 중 현재 블록의 참조 샘플 라인을 식별하는 인덱스 정보가 비트스트림을 통해 시그날링될 수 있다. 복수의 참조 샘플 라인들은, 현재 블록에 상단 및/또는 좌측 1번째 라인, 2번째 라인, 3번째 라인 또는 4번째 라인 중 적어도 하나를 포함할 수 있다. 표 1은 참조 샘플 라인들 각각에 할당되는 인덱스를 나타낸 것이다. 표 1에서는 1번째 라인, 2번쨰 라인 및 4번째 라인이 참조 샘플 라인 후보로 이용됨을 가정하였다.
인덱스 참조 샘플 라인
0 1번째 참조 샘플 라인
1 2번째 참조 샘플 라인
2 4번째 참조 샘플 라인
현재 블록의 위치, 크기, 형태 또는 이웃 블록의 예측 부호화 모드 중 적어도 하나에 기초하여, 현재 블록의 참조 샘플 라인을 결정할 수도 있다. 일 예로, 현재 블록이 픽처, 타일, 슬라이스 또는 코딩 트리 유닛의 경계에 접하는 경우, 첫번째 참조 샘플 라인을 현재 블록의 참조 샘플 라인으로 결정할 수 있다.
참조 샘플 라인에는 현재 블록의 상단에 위치하는 상단 참조 샘플들 및 현재 블록의 좌측에 위치하는 좌측 참조 샘플들을 포함할 수 있다. 상단 참조 샘플들 및 좌측 참조 샘플들은 현재 블록 주변의 복원 샘플들로부터 유도될 수 있다. 상기 복원 샘플들은 인루프 필터가 적용되기 이전 상태일 수 있다.
도 23은 각 참조 샘플 라인이 포함하는 참조 샘플들을 나타낸 도면이다.
현재 블록의 인트라 예측 모드에 따라, 참조 샘플 라인에 속한 참조 샘플들 중 적어도 하나를 이용하여, 예측 샘플을 획득할 수 있다.
다음으로, 현재 블록의 인트라 예측 모드를 결정할 수 있다(S2202). 현재 블록의 인트라 예측 모드는 비방향성 인트라 예측 모드 또는 방향성 인트라 예측 모드 중 적어도 하나가 현재 블록의 인트라 예측 모드로 결정될 수 있다. 비방향성 인트라 예측 모드는, 플래너 및 DC를 포함하고, 방향성 인트라 예측 모드는 좌하단 대각 방향부터 우상단 대각 방향까지 33개 또는 65개의 모드들을 포함한다.
도 24는 인트라 예측 모드들을 나타낸 도면이다.
도 24의 (a)는 35개의 인트라 예측 모드를 나타낸 것이고, 도 24의 (b)는 67개의 인트라 예측 모드들을 나타낸 것이다.
도 24에 도시된 것보다 더 많은 수 혹은 더 적은 수의 인트라 예측 모드들이 정의될 수도 있다.
현재 블록에 인접하는 이웃 블록의 인트라 예측 모드를 기초로, MPM(Most Probable Mode)을 설정할 수 있다. 여기서, 이웃 블록은, 현재 블록의 좌측에 인접하는 좌측 이웃 블록 및 현재 블록의 상단에 이웃하는 상단 이웃 블록을 포함할 수 있다. 현재 블록의 좌측 상단 샘플의 좌표를 (0, 0)이라 할 때, 좌측 이웃 블록은 (-1, 0), (-1, H-1) 또는 (-1, (H-1)/2) 위치의 샘플을 포함할 수 있다. 여기서, H는 현재 블록의 높이를 나타낸다. 상단 이웃 블록은 (0, -1), (W-1, -1) 또는 ((W-1)/2, -1) 위치의 샘플을 포함할 수 있다. 여기서, W는 현재 블록의 너비를 나타낸다.
이웃 블록이 일반 인트라 예측으로 부호화된 경우, 이웃 블록의 인트라 예측 모드에 기초하여 MPM을 유도할 수 있다. 구체적으로, 좌측 이웃 블록의 인트라 예측 모드를 변수 candIntraPredModeA로 설정하고, 상단 이웃 블록의 인트라 예측 모드를 변수 candIntraPredModeB로 설정할 수 있다.
이때, 이웃 블록이 이용 불가능한 경우(예컨대, 이웃 블록이 아직 부호화/복호화되지 않은 경우 또는 이웃 블록의 위치가 픽처 경계를 벗어난 경우), 이웃 블록이 매트릭스에 기반한 인트라 예측으로 부호화된 경우, 이웃 블록이 인터 예측으로 부호화된 경우 또는 이웃 블록이 현재 블록과 상이한 코딩 트리 유닛에 포함된 경우에 있어서, 이웃 블록의 인트라 예측 모드를 기초로 유도되는 변수 candIntraPredModeX (여기서, X는 A 또는 B)를 디폴트 모드로 설정할 수 있다. 여기서, 디폴트 모드는 플래너, DC, 수직 방향 모드 또는 수평 방향 모드 중 적어도 하나를 포함할 수 있다.
또는, 이웃 블록이 매트릭스에 기반한 인트라 예측으로 부호화된 경우, 매트릭스들 중 어느 하나를 특정하기 위한 인덱스 값에 대응하는 인트라 예측 모드를 candIntraPredModeX로 설정할 수 있다. 이를 위해, 매트릭스를 특정하기 위한 인덱스 값들과 인트라 예측 모드들의 매핑 관계를 나타내는 룩업 테이블이 부호화기 및 복호화기에 기 저장될 수 있다.
변수 candIntraPredModeA 및 변수 candIntraPredModeB에 기초하여, MPM들을 유도할 수 있다. MPM 리스트에 포함되는 MPM의 개수는 부호화기 및 복호화기에서 기 설정될 수 있다. 일 예로, MPM의 개수는, 3개, 4개, 5개 혹은 6개일 수 있다. 또는, MPM의 개수를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 또는, 이웃 블록의 예측 부호화 모드, 현재 블록의 크기 또는 형태 중 적어도 하나에 기초하여 MPM의 개수가 결정될 수 있다.
후술되는 실시예들에서는 MPM의 개수가 3개인 것으로 가정하고, 3개의 MPM들을 MPM[0], MPM[1] 및 MPM[2]라 호칭하기로 한다. MPM들의 개수가 3개보다 많은 경우, MPM들은 후술되는 실시예들에서 설명하는 3개의 MPM을 포함하도록 구성될 수 있다.
candIntraPredA와 candIntraPredB가 동일하고, candIntraPredA가 플래너 또는 DC 모드인 경우, MPM[0] 및 MPM[1]는 각각 플래너 및 DC 모드로 설정될 수 있다. MPM[2]는 수직 방향 인트라 예측 모드, 수평 방향 인트라 예측 모드 또는 대각 방향 인트라 예측 모드로 설정될 수 있다. 대각 방향 인트라 예측 모드는, 좌측 하단 대각 방향 인트라 예측 모드, 좌측 상단 방향 인트라 예측 모드 또는 우측 상단 방향 인트라 예측 모드일 수 있다.
candIntraPredA와 candIntraPredB가 동일하고, candIntraPredA가 방향성 인트라 예측 모드인 경우, MPM[0]는 candIntraPredA와 동일하게 설정될 수 있다. MPM[1] 및 MPM[2]는 candIntraPredA와 유사한 인트라 예측 모드들로 설정될 수 있다. candIntraPredA와 유사한 인트라 예측 모드는 candIntraPredA와 인덱스 차분값이 ±1 또는 ±2인 인트라 예측 모드일 수 있다. candIntraPredA와 유사한 인트라 예측 모드를 유도하기 위해 모듈로 연산(%) 및 오프셋이 이용될 수 있다.
candIntraPredA와 candIntraPredB가 상이한 경우, MPM[0]는 candIntraPredA와 동일하게 설정되고, MPM[1]은 candIntraPredB와 동일하게 설정될 수 있다. 이때, candIntraPredA와 candIntraPredB가 모두 비방향성 인트라 예측 모드인 경우, MPM[2]는 수직 방향 수직 방향 인트라 예측 모드, 수평 방향 인트라 예측 모드 또는 대각 방향 인트라 예측 모드로 설정될 수 있다. 또는, candIntraPredA와 candIntraPredB 중 적어도 하나가 방향성 인트라 예측 모드인 경우, MPM[2]는 플래너, DC, 또는 candIntraPredA 또는 candIntraPredB 중 더 큰 값을 갖는 것에 오프셋을 가산 또는 감산함으로써 유도되는 인트라 예측 모드로 설정될 수 있다. 여기서, 오프셋은 1 또는 2 일 수 있다.
복수의 MPM을 포함하는 MPM 리스트를 생성하고, 현재 블록의 인트라 예측 모드와 동일한 MPM이 MPM 리스트에 포함되어 있는지 여부를 나타내는 정보를 비트스트림을 통해 시그날링할 수 있다. 상기 정보는 1비트의 플래그로 MPM 플래그라 호칭될 수 있다. 상기 MPM 플래그가 현재 블록과 동일한 MPM이 MPM 리스트에 포함되어 있음을 나타내는 경우, MPM들 중 하나를 식별하는 인덱스 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 인덱스 정보에 의해 특정된 MPM이 현재 블록의 인트라 예측 모드로 설정될 수 있다. 상기 MPM 플래그가 현재 블록과 동일한 MPM이 MPM 리스트에 포함되어 있지 않음을 나타내는 경우, MPM들을 제외한 잔여 인트라 예측 모드들 중 어느 하나를 지시하는 잔여 모드 정보가 비트스트림을 통해 시그날링될 수 있다. 잔여 모드 정보는 MPM들을 제외한 잔여 인트라 예측 모드들에 인덱스를 재할당하였을 때, 현재 블록의 인트라 예측 모드에 대응되는 인덱스 값을 가리킨다. 복호화기에서는 MPM들을 오름차순으로 정렬하고, 잔여 모드 정보를 MPM들과 비교하여 현재 블록의 인트라 예측 모드를 결정할 수 있다. 일 예로, 잔여 모드 정보가 MPM과 같거나 작은 경우, 잔여 모드 정보에 1을 가산하여 현재 블록의 인트라 예측 모드를 유도할 수 있다.
디폴트 모드를 MPM으로 설정하는 대신, 현재 블록의 인트라 예측 모드가 디폴트 모드인지 여부를 나타내는 정보를 비트스트림을 통해 시그날링할 수 있다. 상기 정보는 1비트의 플래그이고, 상기 플래그를 디폴트 모드 플래그라 호칭할 수 있다. 상기 디폴트 모드 플래그는 MPM 플래그가 현재 블록과 동일한 MPM이 MPM 리스트에 포함되어 있음을 나타내는 경우에 한하여 시그날링될 수 있다. 상술한 바와 같이, 디폴트 모드는, 플래너, DC, 수직 방향 모드 또는 수평 방향 모드 중 적어도 하나를 포함할 수 있다. 일 예로, 플래너가 디폴트 모드로 설정된 경우, 디폴트 모드 플래그는 현재 블록의 인트라 예측 모드가 플래너인지 여부를 지시할 수 있다. 디폴트 모드 플래그가 현재 블록의 인트라 예측 모드가 디폴트 모드가 아님을 가리키는 경우, 인덱스 정보에 의해 지시되는 MPM들 중 하나를 현재 블록의 인트라 예측 모드로 설정할 수 있다.
복수개의 인트라 예측 모드들이 디폴트 모드들로 설정된 경우, 디폴트 모드들 중 어느 하나를 지시하는 인덱스 정보가 더 시그날링될 수 있다. 현재 블록의 인트라 예측 모드는 상기 인덱스 정보가 가리키는 디폴트 모드로 설정될 수 있다.
현재 블록의 참조 샘플 라인의 인덱스가 0이 아닌 경우에는 디폴트 모드를 이용하지 못하도록 설정할 수 있다. 이에 따라, 참조 샘플 라인의 인덱스가 0이 아닌 경우에는 디폴트 모드 플래그를 시그날링하지 않고, 상기 디폴트 모드 플래그의 값을 기 정의된 값(즉, 거짓)으로 설정할 수 있다.
현재 블록의 인트라 예측 모드가 결정되면, 결정된 인트라 예측 모드를 기초로, 현재 블록에 대한 예측 샘플들을 획득할 수 있다(S2203).
DC 모드가 선택된 경우, 참조 샘플들의 평균값을 기초로, 현재 블록에 대한 예측 샘플들이 생성된다. 구체적으로, 예측 블록 내 전체 샘플들의 값은 참조 샘플들의 평균값을 기초로 생성될 수 있다. 평균값은, 현재 블록의 상단에 위치하는 상단 참조 샘플들 및 현재 블록의 좌측에 위치하는 좌측 참조 샘플들 중 적어도 하나를 이용하여 유도될 수 있다.
현재 블록의 형태에 따라, 평균값을 유도하는데 이용되는 참조 샘플들의 개수 또는 범위가 달라질 수 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방형 블록인 경우, 상단 참조 샘플들만을 이용하여 평균값을 계산할 수 있다. 반면, 현재 블록이 너비가 높이보다 작은 비정방형 블록인 경우, 좌측 참조 샘플들만을 이용하여 평균값을 계산할 수 있다. 즉, 현재 블록의 너비 및 높이가 상이한 경우, 길이가 더 긴 쪽에 인접하는 참조 샘플들만을 이용하여 평균값을 계산할 수 있다. 또는, 현재 블록의 너비와 높이 비율에 기초하여, 상단 참조 샘플들만을 이용하여 평균값을 계산할 것인지 여부 또는 좌측 참조 샘플들만을 이용하여 평균값을 계산할 것인지 여부를 결정할 수 있다.
플래너 모드가 선택된 경우, 수평 방향 예측 샘플과 수직 방향 예측 샘플을 이용하여, 예측 샘플을 획득할 수 있다. 여기서, 수평 방향 예측 샘플은, 예측 샘플과 동일한 수평선상에 위치하는 좌측 참조 샘플 및 우측 참조 샘플을 기초로 획득되고, 수직 방향 예측 샘플은, 예측 샘플과 동일한 수직선상에 위치하는 상단 참조 샘플 및 하단 참조 샘플을 기초로 획득된다. 여기서, 우측 참조 샘플은, 현재 블록의 우측 상단 코너에 인접하는 참조 샘플을 복사하여 생성되고, 하단 참조 샘플은, 현재 블록의 좌측 하단 코너에 인접하는 참조 샘플을 복사하여 생성될 수 있다. 수평 방향 예측 샘플은 좌측 참조 샘플 및 우측 참조 샘플의 가중합 연산을 기초로 획득되고, 수직 방향 예측 샘플은 상단 참조 샘플 및 하단 참조 샘플의 가중합 연산을 기초로 획득될 수 있다. 이때, 각 참조 샘플에 부여되는 가중치는 예측 샘플의 위치에 따라 결정될 수 있다. 예측 샘플은 수평 방향 예측 샘플 및 수직 방향 예측 샘플의 평균 연산 또는 가중합 연산을 기초로 획득될 수 있다. 가중합 연산이 수행되는 경우, 예측 샘플의 위치에 기초하여 수평 방향 예측 샘플 및 수직 방향 예측 샘플에 부여되는 가중치를 결정할 수 있다.
방향성 예측 모드가 선택되는 경우, 선택된 방향성 예측 모드의 예측 방향(또는 예측 각도)을 나타내는 파라미터를 결정할 수 있다. 하기 표 2는 인트라 예측 모드 별 인트라 방향 파라미터 intraPredAng를 나타낸 것이다.
PredModeIntraIntraPredAng 1- 232 326 421 517 613 79
PredModeIntraIntraPredAng 85 92 100 11-2 12-5 13-9 14-13
PredModeIntraIntraPredAng 15-17 16-21 17-26 18-32 19-26 20-21 21-17
PredModeIntraIntraPredAng 22-13 23-9 24-5 25-2 260 272 285
PredModeIntraIntraPredAng 299 3013 3117 3221 3326 3432
표 2는 35개의 인트라 예측 모드가 정의되어 있을 때, 인덱스가 2 내지 34 중 어느 하나인 인트라 예측 모드들 각각의 인트라 방향 파라미터를 나타낸다. 33개보다 더 많은 방향성 인트라 예측 모드가 정의되어 있는 경우, 표 2를 보다 세분화하여, 방향성 인트라 예측 모드 각각의 인트라 방향 파라미터를 설정할 수 있다.
현재 블록의 상단 참조 샘플들 및 좌측 참조 샘플들을 일렬로 배열한 뒤, 인트라 방향 파라미터의 값을 기초로, 예측 샘플을 획득할 수 있다. 이때, 인트라 방향 파라미터의 값이 음수인 경우, 좌측 참조 샘플들과 상단 참조 샘플들을 일렬로 배열할 수 있다.
도 25 및 도 26은 참조 샘플들을 일렬로 배열하는 일차원 배열의 예시를 나타낸 도면이다.
도 25는 참조 샘플들을 수직 방향으로 배열하는 수직 방향 일차원 배열의 예시를 나타낸 것이고, 도 26은 참조 샘플들을 수평 방향으로 배열하는 수평 방향 일차원 배열의 예시를 나타낸 것이다. 35개의 인트라 예측 모드가 정의된 경우를 가정하여, 도 25 및 도 26의 실시예를 설명한다.
인트라 예측 모드 인덱스가 11 내지 18 중 어느 하나인 경우, 상단 참조 샘플들을 반시계 방향으로 회전한 수평 방향 일차원 배열을 적용하고, 인트라 예측 모드 인덱스가 19 내지 25 중 어느 하나인 경우, 좌측 참조 샘플들을 시계 방향으로 회전한 수직 방향 일차원 배열을 적용할 수 있다. 참조 샘플들을 일렬로 배열함에 있어서, 인트라 예측 모드 각도를 고려할 수 있다.
인트라 방향 파라미터에 기초하여, 참조 샘플 결정 파라미터를 결정할 수 있다. 참조 샘플 결정 파라미터는 참조 샘플을 특정하기 위한 참조 샘플 인덱스 및 참조 샘플에 적용되는 가중치를 결정하기 위한 가중치 파라미터를 포함할 수 있다.
참조 샘플 인덱스 iIdx 및 가중치 파라미터 ifact는 각각 다음의 수학식 17 및 18을 통해 획득될 수 있다.
Figure PCTKR2019012290-appb-M000017
Figure PCTKR2019012290-appb-M000018
수학식 17 및 18에서 Pang는 인트라 방향 파라미터를 나타낸다. 참조 샘플 인덱스 iIdx에 의해 특정되는 참조 샘플은 정수 펠(Integer pel)에 해당한다.
예측 샘플을 유도하기 위해, 적어도 하나 이상의 참조 샘플을 특정할 수 있다. 구체적으로, 예측 모드의 기울기를 고려하여, 예측 샘플을 유도하는데 이용되는 참조 샘플의 위치를 특정할 수 있다. 일 예로, 참조 샘플 인덱스 iIdx를 이용하여, 예측 샘플을 유도하는데 이용되는 참조 샘플을 특정할 수 있다.
이때, 인트라 예측 모드의 기울기가 하나의 참조 샘플로는 표현되지 않는 경우, 복수의 참조 샘플들을 보간하여 예측 샘플을 생성할 수 있다. 일 예로, 인트라 예측 모드의 기울기가 예측 샘플과 제1 참조 샘플 사이의 기울기 및 예측 샘플과 제2 참조 샘플 사이의 기울기 사이의 값인 경우, 제1 참조 샘플 및 제2 참조 샘플을 보간하여 예측 샘플을 획득할 수 있다. 즉, 인트라 예측 각도를 따르는 앵귤러 라인(Angular Line)이 정수 펠에 위치한 참조 샘플을 지나지 않는 경우, 상기 앵귤러 라인이 지나는 위치의 좌우 또는 상하에 인접 위치하는 참조 샘플들을 보간하여 예측 샘플을 획득할 수 있다.
하기 수학식 19는 참조 샘플들을 기초로, 예측 샘플을 획득하는 예를 나타낸 것이다.
Figure PCTKR2019012290-appb-M000019
수학식 19에서, P는 예측 샘플을 나타내고, Ref_1D은 일차원 배열된 참조 샘플들 중 어느 하나를 나타낸다. 이때, 참조 샘플의 위치는 예측 샘플의 위치 (x, y) 및 참조 샘플 인덱스 iIdx에 의해 결정될 수 있다.
인트라 예측 모드의 기울기가 하나의 참조 샘플로 표현 가능한 경우, 가중치 파라미터 ifact는 0으로 설정된다. 이에 따라, 수학식 19는 다음 수학식 20과 같이 간소화될 수 있다.
Figure PCTKR2019012290-appb-M000020
복수의 인트라 예측 모드에 기초하여 현재 블록에 대한 인트라 예측을 수행할 수도 있다. 일 예로, 예측 샘플별로 인트라 예측 모드를 유도하고, 각각의 예측 샘플에 할당된 인트라 예측 모드에 기초하여 예측 샘플을 유도할 수 있다.
또는, 영역 별로 인트라 예측 모드를 유도하고, 각각의 영역에 할당된 인트라 에측 모드에 기초하여 각 영역에 대한 인트라 예측을 수행할 수 있다. 여기서, 상기 영역은 적어도 하나의 샘플을 포함할 수 있다. 상기 영역의 크기 또는 형태 중 적어도 하나는 현재 블록의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여 적응적으로 결정될 수 있다. 또는, 부호화기 및 복호화기에서 현재 블록의 크기 또는 형태와는 독립적으로 영역의 크기 또는 형태 중 적어도 하나가 기 정의되어 있을 수 있다.
또는, 복수의 인트라 예측 각각을 기초로 인트라 예측을 수행하고, 복수회의 인트라 예측을 통해 획득된 복수의 예측 샘플들의 평균 연산 또는 가중합 연산을 기초로 최종 예측 샘플을 유도할 수 있다. 일 예로, 제1 인트라 예측 모드를 기초로 인트라 예측을 수행하여 제1 예측 샘플을 획득하고, 제2 인트라 예측 모드를 기초로 인트라 예측을 수행하여 제2 예측 샘플을 획득할 수 있다. 이후, 제1 예측 샘플 및 제2 예측 샘플 사이의 평균 연산 또는 가중합 연산을 기초로, 최종 예측 샘플을 획득할 수 있다. 이때, 제1 예측 샘플 및 제2 에측 샘플 각각에 할당되는 가중치는, 제1 인트라 예측 모드가 비방향성/방향성 예측 모드인지 여부, 제2 인트라 예측 모드가 비방향성/방향성 예측 모드인지 여부 또는 이웃 블록의 인트라 예측 모드 중 적어도 하나를 고려하여 결정될 수 있다.
복수의 인트라 예측 모드들은 비방향성 인트라 예측 모드와 방향성 예측 모드의 조합, 방향성 예측 모드들의 조합 또는 비방향성 예측 모드들의 조합일 수 있다.
도 27은 방향성 인트라 예측 모드들이 x축과 평행한 직선과 형성하는 각도를 예시한 도면이다.
도 27에 나타난 예에서와 같이, 방향성 예측 모드들은 좌측 하단 대각 방향부터 우측 상단 대각 방향 사이에 존재할 수 있다. x축과 방향성 예측 모드가 형성하는 각도로 설명하면, 방향성 예측 모드들은, 45도 (좌측 하단 대각 방향) 부터, -135도 (우측 상단 대각 방향) 사이에 존재할 수 있다.
현재 블록이 비정방 형태인 경우, 현재 블록의 인트라 예측 모드에 따라, 인트라 예측 각도를 따르는 앵귤러 라인 상에 위치하는 참조 샘플들 중 예측 샘플에 보다 가까운 참조 샘플 대신 예측 샘플에 보다 먼 참조 샘플을 이용하여 예측 샘플을 유도하는 경우가 발생할 수 있다.
도 28은 현재 블록이 비정방 형태인 경우, 예측 샘플이 획득되는 양상을 나타낸 도면이다.
일 예로, 도 28의 (a)에 도시된 예에서와 같이, 현재 블록이 너비가 높이보다 큰 비정방형이고, 현재 블록의 인트라 예측 모드가 0도부터 45도 사이의 각도를 갖는 방향성 인트라 예측 모드인 것으로 가정한다. 위 경우, 현재 블록의 우측 열 부근의 예측 샘플 A를 유도할 때, 상기 각도를 따르는 앵귤러 모드 상에 위치하는 참조 샘플들 중 상기 예측 샘플과 가까운 상단 참조 샘플 T 대신 상기 예측 샘플과 먼 좌측 참조 샘플 L을 이용하는 경우가 발생할 수 있다.
다른 예로, 도 28의 (b)에 도시된 예에서와 같이, 현재 블록이 높이가 너비보다 큰 비정방형이고, 현재 블록의 인트라 예측 모드가 -90 도부터 -135도 사이인 방향성 인트라 예측 모드인 것으로 가정한다. 위 경우, 현재 블록의 하단 행 부근의 예측 샘플 A를 유도할 때, 상기 각도를 따르는 앵귤러 모드 상에 위치하는 참조 샘플들 중 상기 예측 샘플과 가까운 좌측 참조 샘플 L 대신 상기 예측 샘플과 먼 상단 참조 샘플 T를 이용하는 경우가 발생할 수 있다.
위와 같은 문제점을 해소하기 위해, 현재 블록이 비정방형인 경우, 현재 블록의 인트라 예측 모드를 반대 방향의 인트라 예측 모드로 치환할 수 있다. 이에 따라, 비정방형 블록에 대해서는 도 24에 도시된 방향성 예측 모드들 보다 더 큰 혹은 더 작은 각도를 갖는 방향성 예측 모드들을 사용할 수 있다. 이와 같은, 방향성 인트라 예측 모드를 와이드 앵글 인트라 예측 모드라 정의할 수 있다. 와이드 앵글 인트라 예측 모드는 45도 내지 -135도 범위에 속하지 않는 방향성 인트라 예측 모드를 나타낸다.
도 29는 와이드 앵글 인트라 예측 모드들을 나타낸 도면이다.
도 29에 도시된 예에서, 인덱스가 -1 부터 -14인 인트라 예측 모드들 및 인덱스가 67 부터 80 사이인 인트라 예측 모드들이 와이드 앵글 인트라 예측 모드들을 나타낸다.
도 29에서는 각도가 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
현재 블록이 비정방형이고, S2202 단계에서 획득된 현재 블록의 인트라 예측 모드가 변환 범위에 속하는 경우, 현재 블록의 인트라 예측 모드를 와이드 앵글 인트라 예측 모드로 변환할 수 있다. 상기 변환 범위는 현재 블록의 크기, 형태 또는 비율 중 적어도 하나를 기초로 결정될 수 있다. 여기서, 상기 비율은 현재 블록의 너비 및 높이 사이의 비율을 나타낼 수 있다.
현재 블록이 너비가 높이보다 큰 비정방형인 경우, 변환 범위는 우측 상단 대각 방향의 인트라 예측 모드 인덱스(예컨대, 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에 나타난 예에서와 같이, 현재 블록의 비율에 따라, 변환 범위에 포함되는 와이드 앵글 인트라 대체 예측 모드들의 개수가 상이할 수 있다.
기존의 인트라 예측 모드들에 추가로 와이드 앵글 인트라 예측 모드들이 사용됨에 따라, 와이드 앵글 인트라 예측 모드들을 부호화하는데 필요한 리소스가 증가하여, 부호화 효율이 낮아질 수 있다. 이에 따라, 와이드 앵글 인트라 예측 모드들을 그대로 부호화하는 대신, 와이드 앵글 인트라 예측 모드들에 대한 대체 인트라 예측 모드들을 부호화하여, 부호화 효율을 향상시킬 수 있다.
일 예로, 현재 블록이 67번의 와이드 앵글 인트라 예측 모드를 이용하여 부호화된 경우, 67번의 와이드 앵글 대체 인트라 예측 모드인 2번을 현재 블록의 인트라 예측 모드로 부호화할 수 있다. 또한, 현재 블록이 -1번의 와이드 앵글 인트라 예측 모드로 부호화된 경우, -1번의 와이드 앵글 대체 인트라 예측 모드인 66번을 현재 블록의 인트라 예측 모드로 부호화할 수 있다.
복호화기에서는 현재 블록의 인트라 예측 모드를 복호화하고, 복호화된 인트라 예측 모드가 변환 범위에 포함되는지 여부를 판단할 수 있다. 복호화된 인트라 예측 모드가 와이드 앵글 대체 인트라 예측 모드인 경우, 인트라 예측 모드를 와이드 앵글 인트라 예측 모드로 변환할 수 있다.
또는, 현재 블록이 와이드 앵글 인트라 예측 모드로 부호화된 경우, 와이드 앵글 인트라 예측 모드를 그대로 부호화할 수도 있다.
인트라 예측 모드의 부호화는 상술한 MPM 리스트를 기초로 이루어질 수 있다. 이하, MPM 리스트의 구성 방법에 대해 상세히 살펴보기로 한다. 후술되는 실시예들에서는 각도가 45도 보다 큰 10개의 와이드 앵글 인트라 예측 모드들(-1부터 -10) 및 각도가 -135도보다 작은 10개의 와이드 앵글 인트라 예측 모드들(67부터 76)이 정의된 것으로 가정한다.
이웃 블록이 와이드 앵글 인트라 예측 모드로 부호화된 경우, 상기 와이드 앵글 인트라 예측 모드에 대응하는 와이드 앵글 대체 인트라 예측 모드를 기초로, MPM을 설정할 수 있다. 일 예로, 이웃 블록이 와이드 앵글 인트라 예측 모드로 부호화된 경우, 변수 candIntraPredX(X는 A 또는 B)를 와이드 앵글 대체 인트라 예측 모드로 설정할 수 있다.
또는, 현재 블록의 형태에 따라, MPM 유도 방법을 결정할 수 있다. 일 예로, 현재 블록이 너비와 높이가 동일한 정방형인 경우, candIntraPredX를 와이드 앵글 대체 인트라 예측 모드로 설정할 수 있다. 반면, 현재 블록이 비정방형인 경우, candIntraPredX를 와이드 앵글 인트라 예측 모드로 설정할 수 있다.
또는, 이웃 블록의 와이드 앵글 인트라 예측 모드가 현재 블록에 적용 가능한 것인지 여부에 기초하여 candIntraPredX를 와이드 앵글 인트라 예측 모드로 설정할 것인지 여부가 결정될 수 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방형인 경우에는, 우측 상단 대각 방향의 인트라 예측 모드보다 인덱스가 큰 와이드 앵글 인트라 예측 모드는 그대로 candIntraPredX로 설정되나, 좌측 하단 대각 방향의 인트라 예측 모드보다 인덱스가 작은 와이드 앵글 인트라 예측 모드에 대해서는 이에 대응하는 와이드 앵글 대체 인트라 예측 모드가 candIntraPredX로 설정된다. 반면, 현재 블록이 높이가 너비보다 큰 비정방형인 경우에는, 좌측 하단 대각 방향의 인트라 예측 모드보다 인덱스가 작은 와이드 앵글 인트라 예측 모드는 그대로 candIntraPredX로 설정되나, 우측 상단 대각 방향의 인트라 예측 모드보다 인덱스가 큰 와이드 앵글 인트라 예측 모드에 대해서는 이에 대응하는 와이드 앵글 대체 인트라 예측 모드가 candIntraPredX로 설정된다.
즉, 와이드 앵글 인트라 예측 모드로 부호화된 이웃 블록이 현재 블록과 동일/유사한 형태를 갖는지 여부에 따라, 와이드 앵글 인트라 예측 모드를 그대로 이용하여 MPM을 유도할 것인지 여부 또는 와이드 앵글 대체 인트라 예측 모드를 이용하여 MPM을 유도할 것인지 여부가 결정될 수 있다.
또는, 현재 블록의 형태와 무관하게 이웃 블록의 와이드 앵글 인트라 예측 모드를 candIntraPredX로 설정할 수도 있다.
요약하면, candIntraPredX는 이웃 블록의 와이드 앵글 인트라 예측 모드 또는 와이드 앵글 대체 인트라 예측 모드로 설정될 수 있다.
candIntraPredA 및 candIntraPredB를 기초로 MPM을 유도할 수 있다. 이때, MPM은 candIntraPredA 또는 candIntraPredB와 유사한 인트라 예측 모드로 유도될 수 있다. candIntraPredA 또는 candIntraPredB와 유사한 인트라 예측 모드는 모듈로 연산과 오프셋을 기초로 유도될 수 있다. 이때, 모듈로 연산에 이용되는 상수와 오프셋은 현재 블록의 형태에 따라 상이하게 결정될 수 있다.
표 6은 현재 블록의 형태에 따른 MPM을 유도하는 예를 나타낸 것이다.
i) If cuWidth is equal to cuHeightcandModeList[0] = candIntraPredModeAcandModeList[1] = 2 + ((candIntraPredModeA + 61) % 64)candModeList[2] = 2 + ((candIntraPredModeA - 1) % 64)ii) otherwise (i.e., cuWidth is not equal to cuHeight)candModeList[0] = candIntraPredModeAcandModeList[1] = 2 + ((candIntraPredModeA + 81) % 84)candModeList[2] = 2 + ((candIntraPredModeA - 1) % 84)
candIntraPredA 및 candIntraPredB가 동일하고, candIntraPredA는 방향성 인트라 예측 모드인 것으로 가정한다. 현재 블록이 정방형인 경우, candIntraPredA와 유사한 인트라 예측 모드는 와이드 앵글 인트라 예측 모드들을 제외한 방향성 인트라 예측 모드들의 총 개수에서 1을 차감한 값에 기초한 모듈러 연산을 기초로 획득될 수 있다. 일 예로, 와이드 앵글 인트라 예측 모드들 이외의 방향성 인트라 에측 모드들의 개수가 65개인 경우, candIntraPredA를 기초로 유도된 값과 64의 모듈로 연산에 기초하여 MPM을 유도할 수 있다. 반면, 현재 블록이 비정방형인 경우, candIntraPredA와 유사한 인트라 예측 모드는 와이드 앵글 인트라 예측 모드들을 포함한 방향성 인트라 예측 모드들의 총 개수에서 1을 차감한 값에 기초한 모듈러 연산을 기초로 획득될 수 있다. 일 예로, 와이드 앵글 인트라 예측 모드들의 개수가 20개인 경우, candIntrapredA를 기초로 유도된 값과 84의 모듈로 연산에 기초하여 MPM을 유도할 수 있다.
현재 블록의 형태에 따라 모듈로 연산에 이용되는 상수를 상이하게 설정함에 따라, 와이드 앵글 인트라 예측 모드가 candIntraPredA와 유사한 방향성 인트라 예측 모드로 설정될 수 있는지 여부가 결정될 수 있다. 일 예로, 64를 이용한 모듈로 연산에서는 와이드 앵글 인트라 예측 모드가 candIntraPredA와 유사한 방향성 인트라 예측 모드로 설정될 수 없는 반면, 84를 이용한 모듈로 연산에서는 와이드 앵글 인트라 예측 모드가 candIntraPredA와 유사한 방향성 인트라 예측 모드로 설정될 수 있다.
또는, candIntraPredA와 candIntraPredB가 동일한 경우, 현재 블록의 형태 및 candIntraPredA가 와이드 앵글 인트라 예측 모드인지 여부를 고려하여 MPM을 유도할 수 있다.
표 7은 현재 블록의 형태에 따른 MPM을 유도하는 예를 나타낸 것이다.
- If candIntraPredModeB is equal to candIntraPredModeA, the following applies:-- If candIntraPredModeA is less than 2 (i.e., equal to INTRA_PLANAR or INTRA_DC), candModeList[x] with x = 0...2 is derived as follows:candModeList[0] = INTRA_PLANARcandModeList[1] = INTRA_DCcandModeList[2] = INTRA_ANGULAR50-- otherwise candModeList[x] with x = 0..2 is derived as follows:i) If cuWidth is equal to cuHeight1. if candIntrapredA is smaller than 0 or candIntraPredModeA is greater than 66candModeList[0] = INTRA_PLANARcandModeList[1] = INTRA_DCcandModeList[2] = INTRA_ANGULAR502. otherwise if candIntraPredA >= 0 && candIntraPredModeA < 67)candModeList[0] = candIntraPredModeAcandModeList[1] = 2 + ((candIntraPredModeA + 61) % 64)candModeList[2] = 2 + ((candIntraPredModeA - 1) % 64)ii) otherwise if cuWidth is greater than cuHeightcandModeList[0] = candIntraPredModeAcandModeList[1] = 2 + ((candIntraPredModeA + 81) % 84)candModeList[2] = 2 + ((candIntraPredModeA - 1) % 84)iii) otherwise (i.e., cuWidth is greater than cuHeight)candModeList[0] = candIntraPredModeAcandModeList[1] = 2 + ((candIntraPredModeA + 81) % 84)candModeList[2] = -8 + ((candIntraPredModeA - 1) % 84)- Otherwise (candIntraPredModeB is not equal to candIntraPredModeA), the following applies:-- candModeList[0] and candModeList[1] are derived as follows:candModeList[0] = candIntraPredModeAcandModeList[1] = candIntraPredModeB-- If neither of candModeList[0] and candModeList[1] is equal to INTRA_PLANAR, candModeList[2] is set to INTRA_PLANAR-- Otherwise, if neither of candModeList[0] and candModeList[1] is equal to INTRA_DC, candModeList[2] is set equal to INTRA_DC,-- Otherwise, candModeList[2] is set to INTRA_ANGULAR 50.
candIntraPredA와 candIntraPredB는 동일한 것으로 가정한다.
현재 블록이 정방형이고, candIntraPredA가 와이드 앵글 인트라 예측 모드인 경우, MPM들을 디폴트 모드들로 설정할 수 있다. 일 예로, MPM[0], MPM[1] 및 MPM[2]를 각각 플래너, DC 및 수직 방향 인트라 예측 모드로 설정할 수 있다.
현재 블록이 정방형이고, candIntraPredA가 와이드 앵글 인트라 예측 모드가 아닌 방향성 인트라 예측 모드인 경우, candIntraPredA와 이에 유사한 방향성 인트라 예측 모드를 MPM들로 설정할 수 있다. 일 예로, MPM[0]를 candIntraPredA로 설정하고, MPM[1] 및 MPM[2]를 candIntraPredA와 유사한 방향성 인트라 예측 모드로 설정할 수 있다.
현재 블록이 비정방형이고, candIntraPredA가 방향성 인트라 예측 모드인 경우, candIntraPredA와 이에 유사한 방향성 인트라 예측 모드를 MPM들로 설정할 수 있다. 일 예로, MPM[0]를 candIntraPredA로 설정하고, MPM[1] 및 MPM[2]를 candIntrapredA와 유사한 방향성 인트라 예측 모드로 설정할 수 있다.
candIntraPredA와 유사한 방향성 인트라 예측 모드는 모듈로 연산 및 오프셋을 이용하여 유도될 수 있다. 이때, 모듈로 연산에 이용되는 상수는 현재 블록의 형태에 따라 상이할 수 있다. 또한, 현재 블록의 형태에 따라, candIntraPredA와 유사한 방향성 인트라 예측 모드를 유도하는데 이용되는 오프셋을 상이하게 설정할 수 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방형인 경우, 오프셋 2를 이용하여 candIntraPredA와 유사한 방향성 인트라 예측 모드를 유도할 수 있다. 반면, 현재 블록이 높이가 너비보다 큰 비정방형인 경우, 오프셋 2 및 -8을 이용하여 candIntraPredA와 유사한 방향성 인트라 예측 모드를 유도할 수 있다.
또는, candIntraPredX가 가장 큰 혹은 가장 작은 인덱스를 갖는 와이드 앵글 인트라 예측 모드인지 여부를 고려하여, MPM들을 유도할 수 있다.
표 8은 와이드 앵글 인트라 예측 모드 인덱스를 고려하여 MPM을 유도하는 일 예를 나타낸 것이다.
- If candIntraPredModeB is equal to candIntraPredModeA, the following applies:-- If candIntraPredModeA is less than 2 (i.e., equal to INTRA_PLANAR or INTRA_DC), candModeList[x] with x = 0...2 is derived as follows:candModeList[0] = INTRA_PLANARcandModeList[1] = INTRA_DCcandModeList[2] = INTRA_ANGULAR50-- otherwise candModeList[x] with x = 0..2 is derived as follows:i) If (candIntraPredModeA < 0 && candIntraPredModeA != -10)candModeList[0] = candIntraPredModeAcandModeList[1] = 2 + ((candIntraPredModeA - 3) % 84)candModeList[2] = 2 + ((candIntraPredModeA - 1) % 84)ii) otherwise, if (candIntraPredModeA = -10)candModeList[0] = candIntraPredModeAcandModeList[1] = -1candModeList[2] = -9iii) otherwise, if (candIntraPredModeA > 67 && candIntraPredModeA < 76)candModeList[0] = candIntraPredModeAcandModeList[1] = 2 + ((candIntraPredModeA + 81) % 84)candModeList[2] = 2 + ((candIntraPredModeA - 1) % 84)iv) otherwise, candIntraPredModeA is equal to 67candModeList[0] = candIntraPredModeAcandModeList[1] = 66candModeList[2] = 68v) otherwise, candIntraPredModeA is equal to 77candModeList[0] = candIntraPredModeAcandModeList[1] = 76candModeList[2] = 67vi) otherwise, if (candIntraPredModeA >= 0 && candIntraPredModeA < 67)candModeList[0] = candIntraPredModeAcandModeList[1] = 2 + ((candIntraPredModeA + 61) % 64)candModeList[2] = 2 + ((candIntraPredModeA - 1) % 64)- Otherwise (candIntraPredModeB is not equal to candIntraPredModeA), the following applies:-- candModeList[0] and candModeList[1] are derived as follows:candModeList[0] = candIntraPredModeAcandModeList[1] = candIntraPredModeB-- If neither of candModeList[0] and candModeList[1] is equal to INTRA_PLANAR, candModeList[2] is set to INTRA_PLANAR-- Otherwise, if neither of candModeList[0] and candModeList[1] is equal to INTRA_DC, candModeList[2] is set equal to INTRA_DC,-- Otherwise, candModeList[2] is set to INTRA_ANGULAR 50.
candIntraPredA와 candIntraPredB는 동일한 것으로 가정한다. 설명의 편의를 위해, 좌측 하단 대각 방향의 인트라 예측 모드보다 인덱스 값이 작은 와이드 앵글 인트라 예측 모드들을 하단 방향 와이드 앵글 인트라 예측 모드들이라 호칭하고, 우측 상단 대각 방향의 인트라 예측 모드보다 인덱스 값이 큰 와이드 앵글 인트라 예측 모드들을 우측 방향 와이드 앵글 인트라 예측 모드들이라 호칭하기로 한다
candIntraPredA가 하단 방향 와이드 앵글 인트라 예측 모드인 경우, candIntraPredA와 이에 유사한 방향성 인트라 예측 모드를 MPM들로 설정할 수 있다. 이때, candIntraPredA가 가장 작은 값을 갖는 하단 방향 와이드 앵글 인트라 예측 모드인 경우, 기 정의된 인덱스 값을 갖는 하단 방향 와이드 앵글 인트라 예측 모드를 MPM으로 설정할 수 있다. 여기서, 기 정의된 인덱스는 하단 방향 와이드 앵글 인트라 예측 모드들 중 값이 가장 큰 인덱스 일 수 있다. 일 예로, candIntraPredA가 -10인 경우, MPM[0], MPM[1] 및 MPM[2]는 각각 -10, -1, -9로 설정될 수 있다.
candIntraPredA가 우측 방향 와이드 앵글 인트라 예측 모드인 경우, candIntraPredA와 이에 유사한 방향성 인트라 예측 모드를 MPM들로 설정할 수 있다. 이때, candIntraPredA가 가장 큰 값을 갖는 우측 방향 와이드 앵글 인트라 예측 모드인 경우, 기 정의된 인덱스 값을 갖는 우측 방향 와이드 앵글 인트라 예측 모드를 MPM으로 설정할 수 있다. 여기서, 기 정의된 인덱스는 우측 방향 와이드 앵글 인트라 에측 모드들 중 값이 가장 작은 인덱스일 수 있다. 일 예로, candIntraPredA가 77인 경우, MPM[0], MPM[1] 및 MPM[2]는 각각 77, 76, 67일 수 있다.
또는, candIntraPredA의 인덱스에 1을 차분 또는 가산하여 유도된 인덱스가 인트라 예측 모드들의 인덱스 중 가장 작은값보다 작은 경우 또는 가장 큰 값보다 큰 경우, 디폴트 모드를 MPM으로 설정할 수 있다. 여기서, 디폴트 모드는 플래너, DC, 수직 방향 인트라 예측 모드, 수평 방향 인트라 예측 모드 또는 대각 방향 인트라 예측 모드 중 적어도 하나를 포함할 수 있다.
또는, candIntraPredA의 인덱스에 1을 차분 또는 가산하여 유도된 인덱스가 인트라 예측 모드들의 인덱스 중 가장 작은값보다 작은 경우 또는 가장 큰 값보다 큰 경우, candIntraPredA와 반대 방향인 인트라 예측 모드 또는 상기 반대 방향인 인트라 예측 모드에 유사한 인트라 예측 모드를 MPM으로 설정할 수 있다.
또는, 현재 블록의 형태와 주변 블록의 형태를 고려하여, MPM 후보를 유도할 수 있다. 일 예로, 현재 블록과 이웃 블록이 모두 비정방형인 경우와 현재 블록은 정방형이나 이웃 블록은 비정방형인 경우의 MPM 유도 방법은 상이할 수 있다.
현재 블록의 크기, 현재 블록의 형태, 이웃 블록의 크기 또는 이웃 블록의 형태 중 적어도 하나를 고려하여, MPM 리스트 내 MPM들을 재정렬(또는 리오더링)할 수 있다. 여기서, 재정렬은 MPM들 각각에 할당된 인덱스를 재할당하는 것을 내타낸다. 일 예로, 현재 블록과 동일한 크기 또는 동일한 형태인 이웃 블록의 인트라 예측 모드와 동일한 MPM에 더 작은 인덱스를 할당할 수 있다.
좌측 이웃 블록의 인트라 예측 모드 candIntraPredA 및 상단 이웃 블록의 인트라 예측 모드 candIntraPredB가 각각 MPM[0] 및 MPM[1]로 설정되는 것으로 가정한다.
현재 블록 및 상단 이웃 블록이 너비가 높이보다 큰 비정방형인 경우, 상단 이웃 블록의 인트라 예측 모드 candIntraPredB가 더 작은 인덱스를 갖도록 MPM들을 재정렬할 수 있다. 즉, candIntraPredB를 MPM[0]로 재정렬하고, candIntraPredA를 MPM[1]로 재정렬할 수 있다.
또는, 현재 블록 및 상단 이웃 블록이 높이가 너비보다 큰 비정방형인 경우, 상단 이웃 블록의 인트라 예측 모드 candIntraPredB가 더 작은 인덱스를 갖도록 MPM들을 재정렬할 수 있다. 즉, candIntraPredB를 MPM[0]로 재정렬하고, candIntraPredA를 MPM[1]로 재정렬할 수 있다.
또는, 현재 블록 및 상단 이웃 블록이 정방형인 경우, 상단 이웃 블록의 인트라 예측 모드 candIntraPredB가 더 작은 인덱스를 갖도록 MPM들을 재정렬할 수 있다. 즉, candIntraPredB를 MPM[0]로 재정렬하고, candIntraPredA를 MPM[1]로 재정렬할 수 있다.
MPM들을 재정렬하는 대신, 최초 candIntraPredX를 MPM에 할당할 때, 현재 블록의 크기, 현재 블록의 형태, 이웃 블록의 크기 또는 이웃 블록의 형태 중 적어도 하나를 고려할 수도 있다.
현재 블록의 크기 또는 형태에 기초하여, MPM들을 재정렬할 수도 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방형인 경우, 내림 차순으로 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)이라 호칭할 수 있다. 변환 스킵이 적용된 경우, 변환이 수행되지 않는 잔차값들을 대상으로 양자화가 적용될 수 있다.
DCT 또는 DST를 이용하여 현재 블록을 변환한 뒤, 변환된 현재 블록을 다시 변환할 수 있다. 이때, DCT 또는 DST에 기초한 변환을 제1 변환이라 정의하고, 제1 변환이 적용된 블록을 다시 변환하는 것을 제2 변환이라 정의할 수 있다.
제1 변환은 복수개의 변환 코어 후보들 중 어느 하나를 이용하여 수행될 수 있다. 일 예로, DCT2, DCT8 또는 DCT7 중 어느 하나를 이용하여 제1 변환이 수행될 수 있다.
수평 방향 및 수직 방향에 대해 상이한 변환 코어가 사용될 수도 있다. 수평 방향의 변환 코어 및 수직 방향의 변환 코어의 조합을 나타내는 정보가 비트스트림을 통해 시그날링될 수도 있다.
제1 변환 및 제2 변환의 수행 단위가 상이할 수 있다. 일 예로, 8x8 블록에 대해 제1 변환을 수행하고, 변환된 8x8 블록 중 4x4 크기의 서브 블록에 대해 제2 변환을 수행할 수 있다. 이때, 제2 변환이 수행되지 않는 잔여 영역들의 변환 계수를 0으로 설정할 수도 있다.
또는, 4x4 블록에 대해 제1 변환을 수행하고, 변환된 4x4 블록을 포함하는 8x8 크기의 영역에 대해 제2 변환을 수행할 수도 있다.
제2 변환의 수행 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다.
복호화기에서는 제2 변환의 역변환(제2 역변환)을 수행하고, 그 수행 결과에 제1 변환의 역변환(제1 역변환)을 수행할 수 있다. 상기 제2 역변환 및 제1 역변환의 수행 결과, 현재 블록에 대한 잔차 신호들이 획득될 수 있다.
양자화는 블록의 에너지를 줄이기 위한 것으로, 양자화 과정은 변환 계수를 특정 상수값으로 나누는 과정을 포함한다. 상기 상수값은 양자화 파라미터에 의해 유도될 수 있고, 양자화 파라미터는 1부터 63사이의 값으로 정의될 수 있다.
부호화기에서 변환 및 양자화를 수행하면, 복호화기는 역양자화 및 역변환을 통해 잔차 블록을 획득할 수 있다. 복호화기에서는 예측 블록과 잔차 블록을 더하여, 현재 블록에 대한 복원 블록을 획득할 수 있다.
현재 블록의 복원 블록이 획득되면, 인루프 필터링(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)를 결정할 수 있다.
도 30은 블록 강도를 결정하는 과정을 나타낸 흐름도이다.
도 30에 도시된 예에서, P는 제1 복원 블록을 나타내고, Q는 이웃 복원 블록을 나타낸다. 여기서, 이웃 복원 블록은 현재 블록의 좌측 또는 상단에 이웃하는 것일 수 있다.
도 30에 도시된 예에서는, P 및 Q의 예측 부호화 모드, 0이 아닌 변환 계수가 포함되어 있는지 여부, 동일한 참조 픽처를 이용하여 인터 예측되었는지 여부 또는 움직임 벡터들의 차분값이 문턱값 이상인지 여부를 고려하여 블록 강도가 결정되는 것으로 도시되었다.
블록 강도에 기초하여, 디블록킹 필터의 적용 여부가 결정될 수 있다. 일 예로, 블록 강도가 0인 경우에는 필터링이 수행되지 않을 수 있다.
SAO는 주파수 영역에서 양자화를 수행함에 따라 발생하는 링잉 현상(Ringing Artifact)를 완화시키기 위한 것이다. SAO는 제1 복원 영상의 패턴을 고려하여 결정되는 오프셋을 가산 또는 감산함으로써 수행될 수 있다. 오프셋의 결정 방법은 에지 오프셋(Edge Offset, EO) 또는 밴드 오프셋(Band Offset)을 포함한다. EO는 주변 화소들의 패턴에 따라, 현재 샘플의 오프셋을 결정하는 방법을 나타낸다. BO는 영역 내 비슷한 밝기 값을 갖는 화소들의 집합에 대해 공통의 오프셋을 적용하는 방법을 나타낸다. 구체적으로, 화소 밝기를 32개의 균등한 구간으로 나누고, 유사한 밝기 값을 갖는 화소들을 하나의 집합으로 설정할 수 있다. 일 예로, 32개의 밴드들 중 인접한 4개의 밴드를 하나의 그룹으로 설정하고, 4개 밴드에 속한 샘플들에는 동일한 오프셋 값을 적용할 수 있다.
ALF는 제1 복원 영상 또는 디블록킹 필터가 적용된 복원 영상에 기 정의된 크기/모양의 필터를 적용하여 제2 복원 영상을 생성하는 방법이다. 하기 수학식 21은 ALF의 적용 예를 나타낸다.
Figure PCTKR2019012290-appb-M000021
픽처, 코딩 트리 유닛, 코딩 블록, 예측 블록 또는 변환 블록 단위로, 기 정의된 필터 후보들 중 어느 하나를 선택할 수 있다. 각각의 필터 후보들은 크기 또는 모양 중 어느 하나가 상이할 수 있다.
도 31은 기 정의된 필터 후보들을 나타낸다.
도 31에 도시된 예에서와 같이, 5x5, 7x7 또는 9x9 크기의 다이아몬드 형태 중 적어도 하나를 선택할 수 있다.
크로마 성분에 대해서는 5x5 크기의 다이아몬드 형태만이 사용될 수 있다.
파노라믹 비디오, 360도 비디오 또는 4K/8K UHD(Ultra High Definition) 영상 등 고해상도 영상의 실시간 또는 저지연 부호화를 위해 하나의 픽처를 복수개의 영역으로 나누고, 복수개의 영역을 병렬로 부호화/복호화하는 방안을 고려할 수 있다. 이를 위해, 픽처를 병렬 부호화/복호화의 기본 단위인 타일들로 분할하고, 타일들 각각을 병렬처리할 수 있다.
타일은 직사각형 형태를 갖도록 제한될 수 있다. 타일을 부호화/복호화함에 있어서, 다른 타일의 데이터는 이용하지 않는다. 타일 단위로 CABAC(Context adaptive Binary Arithmetic Coding) 컨텍스트의 확률 테이블을 초기화 할 수 있으며, 타일들의 경계에서는 인루프 필터가 적용되지 않도록 설정할 수 있다.
도 32는 픽처가 복수의 타일들로 분할된 예를 나타낸다.
타일은 적어도 하나의 코딩 트리 유닛을 포함하고, 타일의 경계는 코딩 트리 유닛의 경계와 일치한다.
도 32에 도시된 예에서와 같이, 픽처를 복수개의 타일 세트로 분할할 수 있다. 픽처를 복수개의 타일 세트로 분할하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다.
픽처의 분할 형태에 따라, 픽처 바운더리를 제외한 모든 영역에서 타일들이 동일한 크기를 가질 수 있다.
또는, 수평 방향으로 인접하는 타일들이 갖은 높이를 갖도록 픽처를 분할하거나, 수직 방향으로 인접하는 타일들이 갖은 너비를 갖도록 픽처를 분할할 수 있다.
픽처를 가로지르는 수직선 또는 수평선 중 적어도 하나를 이용하여 픽처를 분할함에 따라, 타일들 각각은 상이한 열(Column) 및/또는 행(Row)에 속한다. 후술되는 실시예에서는, 타일이 속한 열을 타일 열이라 호칭하고, 타일이 속한 행을 타일 행이라 호칭하기로 한다.
픽처가 타일로 분할되는 양상을 결정하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 픽처 파라미터 세트 또는 시퀀스 파라미터 세트를 통해 부호화되어 시그날링될 수 있다. 상기 정보는 픽처 내 타일의 개수를 결정하기 위한 것으로서, 타일 행의 개수를 나타내는 정보 및 타일 열의 개수를 나타내는 정보를 포함할 수 있다. 일 예로, 신택스 요소 num_tile_columns_minus1은 타일 열의 개수에서 1을 차감한 값을 나타내고, 신택스 요소 num_tile_rows_minus1은 타일 행의 개수에서 1을 차감한 값을 나타낸다.
도 32에 도시된 예에서, 타일 열의 개수는 4개이고, 타일 행의 개수는 3개 이므로, num_tile_columns_minus1은 3을 나타내고, num_tile_rows_minus1은 2를 나타낼 수 있다.
픽처가 복수의 타일들로 분할되는 경우, 타일의 크기를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 픽처가 복수의 타일 열로 분할되는 경우, 각 타일 열의 너비를 나타내는 정보가 비트스트림을 통해 시그날링되고, 픽처가 복수의 타일 행으로 분할되는 경우, 각 타일 행의 높이를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 각 타일 열에 대해 타일 열의 너비를 나타내는 신택스 요소 column_width_minus1이 부호화되어 시그날링되고, 각 타일 행에 대해 타일 행의 높이를 나타내는 신택스 요소 row_height_minus1이 부호화되어 시그날링될 수 있다.
column_width_minus1은 타일 열의 너비에서 1을 차감한 값을 나타내고, row_height_minus1은 타일 행의 높이에서 1을 차감한 값을 나타낼 수 있다.
마지막 타일 열에 대해서는 column_width_minus1의 부호화가 생략되고, 마지막 타일 행에 대해서는 row_height_minus1의 부호화가 생략될 수 있다. 마지막 타일 열의 너비 및 마지막 행의 높이는 픽처 크기를 고려하여 유도될 수 있다.
복호화기는 column_width_minus1 및 row_height_minus1을 기초로, 타일의 크기를 결정할 수 있다.
표 9는 픽처를 타일들로 분할하기 위한 신택스 테이블을 나타낸 것이다.
if ( tile_enabled_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_spacing_flag u(1)
if ( !uniform_spacing_flag ) {
for ( i=0; i < num_tile_columns_minus1: i++ )
column_width_minus1[i] ue(v)
for ( i=0; i < num_tile_rows_minus1: i++ )
row_height_minus1[i] ue(v)
}
loop_filter_across_tiles_enabled_flag u(1)
}
표 9를 살펴보면, 타일 열의 개수를 나타내는 신택스 요소 num_tile_columns_minus1 및 타일 행의 개수를 나타내는 신택스 요소 num_tile_rows_minus1이 시그날링될 수 있다.
다음으로, 픽처가 균등한 크기의 타일들로 분할되는지 여부를 나타내는 신택스 요소 uniform_spacing_flag가 시그날링될 수 있다. uniform_spacing_flag가 참인 경우, 픽처 경계를 제외한 잔여 영역에서 타일들은 균등한 크기로 분할될 수 있다.
uniform_spacing_flag가 거짓인 경우, 각 타일 열의 너비를 나타내는 신택스 요소 column_width_minus1 및 각 타일 행의 높이를 나타내는 신택스 요소 row_height_minus1이 시그날링될 수 있다.
신택스 요소 loop_filter_across_tiles_enabled_flag는 타일 경계에서 루프 필터를 사용하는 것이 허용되는지 여부를 나타낸다.
타일 열들 중 너비가 가장 작은 타일 열을 최소 너비 타일이라 호칭하고, 타일 행들 중 높이가 가장 작은 타일 행을 최소 높이 타일이라 호칭할 수 있다. 최소 너비 타일의 너비를 나타내는 정보 및 최소 높이 타일의 높이를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 신택스 요소 min_column_width_minus1은 최소 너비 타일의 너비에서 1을 차감한 값을 나타내고, 신택스 요소 min_row_height_minus1은 최소 높이 타일의 높이에 1을 차감한 값을 나타낸다.
타일 열 별로, 최소 타일 너비와의 차분값을 나타내는 정보가 시그날링될 수 있다. 일 예로, 신택스 요소 diff_column_width는 현재 타일 열과 최소 타일 열 사이의 너비 차분값을 나타낸다. 상기 너비 차분값은 코딩 트리 유닛 열 개수의 차분값으로 표현될 수도 있다. 복호화기는 min_column_width_minus1을 기초로 유도된 최소 너비 타일의 너비와 diff_column_width를 기초로 유도된 너비 차분값을 더하여 현재 타일의 너비를 유도할 수 있다.
또한, 타일 행 별로, 최소 타일 높이와의 차분값을 나타내는 정보가 시그날링될 수 있다. 일 예로, 신택스 요소 diff_row_height는 현재 타일 행과 최소 타일 행 사이의 높이 차분값을 나타낸다. 상기 높이 차분값은 코딩 트리 유닛 행 개수의 차분값으로 표현될 수도 있다. 복호화기는 min_row_height_minus1을 기초로 유도된 최소 높이 타일의 높이와 diff_row_height를 기초로 유도된 높이 차분값을 더하여 현재 타일의 높이를 유도할 수 있다.
표 10은 크기 차분 정보를 포함하는 신택스 테이블을 나타낸 것이다.
if ( tile_enabled_flag ) {
num_tile_columns_minus1 ue(v)
num_tile_rows_minus1 ue(v)
uniform_spacing_flag u(1)
if ( !uniform_spacing_flag ) {
min_column_width_minus1
min_row_height_minus1
for ( i=0; i < num_tile_columns_minus1: i++ )
diff_column_width[i] ue(v)
for ( i=0; i < num_tile_rows_minus1: i++ )
diff_row_height[i] ue(v)
}
loop_filter_across_tiles_enabled_flag u(1)
}
좌우로 인접하는 타일들의 높이가 상이하도록 픽처를 분할하거나, 상하로 인접하는 타일들의 너비가 상이하도록 픽처를 분할할 수 있다. 위와 같은 픽처 분할 방식을 플렉서블 타일(Flexible Tile) 분할 기법이라 호칭할 수 잇고, 플렉서블 타일 분할 기법을 통해 분할된 타일들을 플렉서블 타일이라 호칭할 수 있다.
도 33은 플렉서블 타일 기법에 따른 픽처의 분할 양상을 나타낸 도면이다.
픽처를 분할하여 생성된 타일들 간의 탐색 순서는 소정의 스캔 순서를 따를 수 있다. 또한, 소정의 스캔 순서에 따라 타일들 각각에 인덱스가 할당될 수 있다.
타일들의 스캔 순서는 래스터 스캔(Raster Scan), 대각 스캔(Diagonal Scan), 수직 방향 스캔 또는 수평 방향 스캔 중 어느 하나일 수 있다. 도 33의 (a) 내지 (d)는 각각 래스터 스캔, 대각 스캔, 수직 방향 스캔 및 수평 방향 스캔에 따라 타일들 각각에 인덱스가 할당된 예를 나타낸다.
현재 타일의 크기 또는 위치에 따라, 다음 스캔 순서를 결정할 수도 있다. 일 예로, 현재 타일의 높이와 현재 타일의 우측에 이웃하는 타일의 높이가 상이한 경우(예컨대, 우측 이웃 타일의 높이가 현재 타일의 높이보다 더 큰 경우), 현재 타일의 하단에 이웃하는 타일과 동일한 수직 선상에 놓인 타일들 중 최좌측에 위치하는 것을 현재 타일 다음의 스캔 대상으로 결정할 수 있다.
타일들의 스캔 순서는 픽처 또는 시퀀스 단위로 결정될 수 있다.
또는, 픽처 내 첫번째 타일의 크기를 고려하여 타일들의 스캔 순서를 결정할 수 있다. 일 예로, 첫번째 타일의 너비가 높이보다 큰 경우, 타일들의 스캔 순서를 수평 스캔으로 설정할 수 있다. 첫번째 타일의 높이가 너비보다 큰 경우, 타일들의 스캔 순서를 수직 스캔으로 설정할 수 있다. 첫번째 타일의 너비가 높이와 동일한 경우, 타일들의 스캔 순서를 래스터 스캔 또는 대각 스캔으로 설정할 수 있다.
비트스트림을 통해 타일의 총 개수를 나타내는 정보가 시그날링될 수 있다. 일 예로, 플렉서블 타일 기법이 적용되는 경우, 픽처 내 타일들의 총 개수에 2를 차감하여 유도되는 신택스 요소 number_of_tiles_in_picture_minus2를 시그날링할 수 있다. 복호화 장치는 number_of_tiles_in_picture_minus2를 기초로, 현재 픽처에 포함된 타일들의 개수를 인식할 수 있다.
표 11은 타일 개수 정보를 포함하는 신택스 테이블을 나타낸 것이다.
pic_parameter_set_rbsp( ) { Descriptor
...
tiles_enabled_flag u(1)
...
if( tiles_enabled_flag ) {
number_of_tiles_in_picture_minus2 ue(v)
subtile_width_minus1 ue(v)
subtile_height_minus1 ue(v)
for ( i=0; i < number_of_tiles_in_picture_minus2+2 ; i++ ) {
if ( i > 0 )
use_previous_tile_size_flag u(1)
if ( use_previous_tile_size_flag == 0) {
tile_width_minus1[ i ] ue(v)
tile_height_minus1[ i ] ue(v)
}
}
loop_filter_across_tiles_enabled_flag u(1)
}
...
타일의 크기를 부호화하는데 필요한 비트수를 줄이기 위해, 서브 타일의 크기를 나타내는 정보를 부호화하여 시그날링할 수 있다. 서브 타일은 타일을 구성하는 기본 단위로, 각 타일은 적어도 하나의 서브 타일을 포함하여 구성될 수 있다. 서브 타일은 하나 이상의 코딩 트리 유닛을 포함할 수 있다.
일 예로, 신택스 요소 subtile_width_minus1은 서브 타일의 너비에 1을 차감한 값을 나타낸다. 신택스 요소 subtile_height_minus1은 서브 타일의 높이에 1을 차감한 값을 나타낸다.
첫번째 타일을 제외한 잔여 타일에 대해, 이전 타일과 동일한 크기를 갖는지 여부를 나타내는 정보를 부호화하여 시그날링할 수 있다. 일 예로, 신택스 요소 use_previous_tile_size_flag는 현재 타일의 크기가 이전 타일의 크기와 동일한지 여부를 나타낸다. use_previous_tile_size_flag가 참인 것은 현재 타일의 크기가 이전 타일의 크기가 동일함을 나타낸다. use_previous_tile_size_flag가 거짓인 경우, 현재 타일의 크기를 나타내는 정보를 부호화하여 시그날링할 수 있다. 첫번째 타일에 대해서는 use_previous_tile_size_flag의 부호화를 생략하고, 상기 플래그의 값을 거짓으로 설정할 수 있다.
타일 크기를 나타내는 정보는, i번째 타일의 너비를 나타내는 신택스 요소 tile_width_minus1[i] 및 i번째 타일의 높이를 나타내는 신택스 요소 tile_height_minus1[i]를 포함할 수 있다.
타일 크기를 나타내는 정보는 서브 타일의 크기와의 차분값을 나타낼 수 있다. 서브 타일의 크기 정보를 이용함으로써, 각 타일의 크기를 부호화하는데 필요한 비트 수를 줄여 부호화/복호화 효율을 증가시킬 수 있다. 일 예로, i번째 타일의 너비 tileWidth는 다음의 수학식 22를 기초로 유도되고, i번째 타일의 높이 tileHeight는 다음의 수학식 23을 기초로 유도될 수 있다.
Figure PCTKR2019012290-appb-M000022
Figure PCTKR2019012290-appb-M000023
또는, 서브 타일 크기 정보의 부호화를 생략하고, i번째 타일의 크기를 그대로 타일 크기 정보로 부호화할 수도 있다. 서브 타일의 크기 정보는 선택적(Optional)으로 부호화될 수 있다. 서브 타일의 크기 정보가 부호화되었는지 여부를 나타내는 정보가 비디오 파라미터 세트, 시퀀스 파라미터 세트 또는 픽처 파라미터 세트를 통해 시그날링될 수 있다.
상술한 타일 크기와 관련된 정보들을 코딩 트리 유닛의 개수를 나타내는 것으로 부호화하여 시그날링할 수도 있다. 일 예로, column_width_minus1, min_column_width_minus1, subtile_width_minus1 또는 tile_width_minus1 등은 타일에 포함된 코딩 트리 유닛 열의 개수를 나타낼 수 있다. 아울러, diff_column_width은 최소 너비 타일에 포함된 코딩 트리 유닛 열의 개수와 현재 타일에 포함된 코딩 트리 유닛 열의 개수와의 차분값을 나타낼 수 있다.
또한, row_height_minus1, min_row_height_minus1, subtile_height_minus1 또는 tile_height_minus1 등은 타일에 포함된 코딩 트리 유닛 행의 개수를 나타낼 수 있다. 아울러, diff_row_height은 최소 높이 타일에 포함된 코딩 트리 유닛 행의 개수와 현재 타일에 포함된 코딩 트리 유닛 행의 개수와의 차분값을 나타낼 수 있다.
복호화기는 상기 신택스 요소들을 기초로 유도된 코딩 트리 유닛 열의 개수 및/또는 코딩 트리 유닛 행의 개수와 코딩 트리 유닛의 크기를 기초로, 타일의 크기를 결정할 수 있다. 일 예로, i번째 타일의 너비는 (tile_width_minus1[i]+1)*(코딩 트리 유닛의 너비)로 설정되고, i번째 타일의 높이는 (tile_height_minus1[i]+1)*(코딩 트리 유닛의 높이)로 설정될 수 있다.
한편, 코딩 트리 유닛의 크기를 나타내는 정보는 시퀀스 파라미터 세트 또는 픽처 파라미터 세트를 통해 시그날링될 수 있다.
표 11에서는 현재 타일의 크기가 이전 타일과 동일한지 여부를 나타내는 신택스 요소 use_previous_tile_size_flag가 이용되는 것으로 설명하였다. 다른 예로, 현재 타일의 너비가 이전 타일의 너비와 동일한지 여부를 나타내는 정보 또는 현재 타일의 높이가 이전 타일의 높이와 동일한지 여부를 나타내는 정보를 부호화하여 시그날링할 수도 있다.
표 12는 현재 타일의 너비가 이전 타일의 너비와 동일한지 여부를 나타내는 정보를 포함하는 신택스 테이블을 나타낸 것이다.
pic_parameter_set_rbsp( ) { Descriptor
...
tiles_enabled_flag u(1)
...
CoveredWidthByTile = 0;
CoveredHeightByTile = 0 ;
PrevWidthByTile = 0;
PrevHeightByTile = 0 ;
if( tiles_enabled_flag ) {
number_of_tiles_in_picture_minus2 ue(v)
for ( i=0; i < number_of_tiles_in_picture_minus2+2 ; i++ ) {
if ( i > 0 )
use_previous_tile_size_flag u(1)
if ( use_previous_tile_size_flag == 0) {
use_previous_tile_width _flag ue(v)
if ( use_previous_tile_width_flag == 0) { ue(v)
tile_width_minus1[ i ] ue(v)
tile_height_minus1[ i ] ue(v)
} else {
tile_height_minus1[ i ] ue(v)
}
}
loop_filter_across_tiles_enabled_flag u(1)
}
...
신택스 요소 use_previous_tile_width_flag는 현재 타일의 너비가 이전 타일과 동일한지 여부를 나타낸다. use_previous_tile_width_flag가 참인 경우, 현재 타일의 너비는 이전 타일의 너비와 동일하게 설정될 수 있다. 이 경우, 현재 타일의 너비를 나타내는 정보의 부호화를 생략하고, 이전 타일의 너비로부터 현재 타일의 너비를 유도할 수 있다.
use_previous_tile_width_flag가 거짓인 경우, 현재 타일의 너비를 나타내는 정보를 시그날링할 수 있다. 일 예로, tile_width_minus1[i]는 i번째 타일의 너비에 1을 차감한 값을 나타낼 수 있다.
현재 타일의 크기가 이전 타일의 크기가 상이한 것으로 결정된 경우(예컨대, use_previous_tile_size_flag 값이 0인 경우)에 한하여, 신택스 요소 use_previous_tile_width_flag가 부호화되어 시그날링될 수도 있다.
tile_width_minus1[i]는 i번째 타일에 포함된 코딩 트리 유닛 열의 개수에 1을 차분한 것일 수 있다. 복호화기에서는 tile_width_minus1[i]에 1을 더하여, i번째 타일에 속한 코딩 트리 유닛 열의 개수를 유도하고, 유도된 값에 코딩 트리 유닛의 너비를 곱하여 타일 너비를 계산할 수 있다.
표 13은 현재 타일의 높이가 이전 타일의 높이와 동일한지 여부를 나타내는 정보가 더 포함된 신택스 테이블을 나타낸 것이다.
pic_parameter_set_rbsp( ) { Descriptor
...
tiles_enabled_flag u(1)
...
CoveredWidthByTile = 0;
CoveredHeightByTile = 0 ;
PrevWidthByTile = 0;
PrevHeightByTile = 0 ;
if( tiles_enabled_flag ) {
number_of_tiles_in_picture_minus2 ue(v)
for ( i=0; i < number_of_tiles_in_picture_minus2+2 ; i++ ) {
if ( i > 0 )
use_previous_tile_size_flag u(1)
if ( use_previous_tile_size_flag == 0) {
use_previous_tile_width _flag ue(v)
if ( use_previous_tile_width_flag == 0) { ue(v)
tile_width_minus1[ i ] ue(v)
tile_width_minus1[i] +=1;
use_previous_tile_height _flag
if (use_previous_tile_height_flag ==0){
tile_height_minus1[ i ] ue(v)
tile_height_minus1[i] +=1;
}
} else {
use_previous_tile_height _flag
if (use_previous_tile_height_flag ==0){
tile_height_minus1[ i ] ue(v)
tile_height +=1;
}
}
}
loop_filter_across_tiles_enabled_flag u(1)
}
...
신택스 요소 use_previous_tile_height_flag는 현재 타일의 높이가 이전 타일과 동일한지 여부를 나타낸다. use_previous_tile_height_flag가 참인 경우, 현재 타일의 높이는 이전 타일의 높이와 동일하게 설정될 수 있다. 이 경우, 현재 타일의 높이를 나타내는 정보의 부호화를 생략하고, 이전 타일의 높이로부터 현재 타일의 높이를 유도할 수 있다.
use_previous_tile_height_flag가 거짓인 경우, 현재 타일의 높이를 나타내는 정보를 시그날링할 수 있다. 일 예로, tile_height_minus1[i]는 i번째 타일의 높이에 1을 차감한 값을 나타낼 수 있다.
현재 타일의 크기가 이전 타일의 크기가 상이한 것으로 결정된 경우(예컨대, use_previous_tile_size_flag 값이 0인 경우)에 한하여, 신택스 요소 use_previous_tile_height_flag가 부호화되어 시그날링될 수도 있다. 또한, 신택스 요소 use_previous_tile_height_flag는 use_previous_tile_width_flag가 거짓인 경우에 한하여 시그날링될 수 있다.
표 12는 use_previous_tile_width_flag가 이용되는 경우의 예를 나타내고, 표 13은 use_previous_tile_width_flag 및 use_previous_tile_height_flag가 이용되는 경우의 예를 나타낸다. 상기 표들에 나타나지는 않았지만, use_previous_tile_width_flag의 부호화를 생략하고, use_previous_tile_height_flag만을 사용할 수도 있다.
use_previous_tile_height_flag 및 use_previous_tile_size_flag 중 어느 것을 사용할 것인지는 타일 스캔 순서, 첫 번째 타일의 너비/높이 또는 이전 타일의 너비/높이 중 적어도 하나를 기초로 결정될 수 있다. 일 예로, 타일 스캔 순서가 수직 방향인 경우에는 use_previous_tile_height_flag를 사용하는 한편, 타일 스캔 순서가, 수평 방향인 경우에는 use_previous_tile_width_flag를 사용할 수 있다. 또는, 첫 번째 타일 또는 이전 타일이 너비가 높이보다 큰 비정방형인 경우, use_previous_tile_width_flag를 사용하는 한편, 첫번쨰 타일 또는 이전 타일이 높이가 너비보다 큰 비정방형인 경우, use_previous_tile_height_flag를 사용할 수 있다.
픽처에 포함된 타일들의 개수를 시그날링하는 한편, 마지막 타일에 대해서는 타일 크기와 관련된 정보의 부호화를 생략할 수 있다.
표 14는 마지막 타일에 대한 타일 크기 정보의 부호화가 생략되는 예를 나타낸 것이다.
pic_parameter_set_rbsp( ) { Descriptor
...
tiles_enabled_flag u(1)
...
if( tiles_enabled_flag ) {
number_of_tiles_in_picture_minus2 ue(v)
subtile_width_minus1 ue(v)
subtile_height_minus1 ue(v)
for ( i=0; i < number_of_tiles_in_picture_minus2+1 ; i++ ) {
if ( i > 0 )
use_previous_tile_size_flag u(1)
if ( use_previous_tile_size_flag == 0) {
tile_width_minus1[ i ] ue(v)
tile_height_minus1[ i ] ue(v)
}
}
loop_filter_across_tiles_enabled_flag u(1)
}
...
마지막 타일을 제외한 타일들의 크기가 특정되면, 픽처 내 잔여 영역을 마지막 타일로 설정할 수 있다.
각각의 코딩 트리 유닛에 대해, 코딩 트리 유닛이 속하는 타일을 식별하기 위한 식별자(이하, 타일 아이디, TileID라 함)를 할당할 수 있다.
도 34는 각 코딩 트리 유닛에 타일 아이디가 할당되는 예를 나타낸 도면이다.
동일한 타일에 속하는 코딩 트리 유닛들에는 동일한 타일 아이디가 할당될 수 있다. 구체적으로, Tile N에 속한 코딩 트리 유닛 들에는 N번의 TileID가 할당될 수 있다.
각 코딩 트리 유닛에 할당되는 타일 아이디를 결정하기 위해, 픽처 내 코딩 트리 유닛의 위치를 나타내는 변수 x와 y를 결정할 수 있다. 여기서, x는 코딩 트리 유닛의 좌측 상단 샘플의 위치 (x0, y0) 중 x축 좌표를 코딩 트리 유닛의 너비로 나눈 값을 나타내고, y는 코딩 트리 유닛의 좌측 상단 샘플의 위치 (x0, y0) 중 y축 좌표를 코딩 트리 유닛의 높이로 나눈 값을 나타낸다. 구체적으로, x 및 y는 다음의 수학식 24 및 25에 의해 유도될 수 있다.
Figure PCTKR2019012290-appb-M000024
Figure PCTKR2019012290-appb-M000025
각 코딩 트리 유닛에 타일 아이디를 할당하는 것은 다음의 과정을 거쳐 수행될 수 있다.
i) 타일 아이디 초기화
각 코딩 트리 유닛의 타일 아이디를 픽처 내 타일들의 개수에 1을 차분한 값으로 초기화할 수 있다.
If tiles_enabled_flag is equal to 1, the value of the variable tile_id and the value of the two-dimentional array TileId are specified as follows:tile_id = 0for (y=0; y<PicHeightInCtbsY; y++)- for (x=0; x<PicWidthInCtbsY; x++)-- TileId[x][y] = number_of_tiles_in_picture_minus2+1tile_height_minus1[number_of_tiles_in_picture_minus2+1] = 0tile_width_minus1[number_of_tiles_in_picture_minus2+1] = 0
ii) 타일 아이디 유도
The value of the variable tile_id and the value of the two-dimentional array CTU_tile assignment are derived as follows:for(ctu_y=0; ctu_y < (tile_height_minus1[i]+1)*(subtile_height_minus1+1) && (tile_coordinate_y+ctu_y) < PicHeightInCtbsY; ctu_y++)- for(ctu_x=0; ctu_x < (tile_width_minus1[i]+1)*(subtile_width_minus1+1) && (tile_coordinate_x+ctu_x) < PicWidthInCtbsY; ctu_x++)-- TileId[tile_coordinate_x + ctu_x] [tile_coordinate_y + ctu_y] = tile_idtile_id++
상술한 실시예에서는, 타일들의 경계에서 인루프 필터를 적용하는 것이 허용되는지 여부를 나타내는 플래그가 픽처 파라미터 세트를 통해 시그날링되는 것으로 설명하였다. 다만, 모든 타일 경계에서 인루프 필터를 사용하지 않도록 설정하는 경우, 주관적 화질이 감소하고 부호화 효율이 떨어지는 문제가 발생할 수 있다.
이에, 타일별로 인루프 필터 허용 여부를 나타내는 정보를 부호화하여 시그날링할 수 있다.
도 35는 타일별로 인루프 필터의 적용 여부가 선택적으로 결정되는 예를 도시한 것이다.
도 35에 도시된 예에서와 같이, 수평 경계 또는 수직 경계에서 인루프 필터(예컨대, 디블록킹 필터, SAO 및/또는 ALF)를 허용할 것인지 여부가 타일별로 결정될 수 있다.
표 17은 인루프 필터의 허용 여부를 나타내는 정보가 타일 별로 부호화되는 예를 나타낸 것이다.
pic_parameter_set_rbsp( ) { Descriptor
...
tiles_enabled_flag u(1)
...
if( tiles_enabled_flag ) {
number_of_tiles_in_picture_minus2 ue(v)
subtile_width_minus1 ue(v)
subtile_height_minus1 ue(v)
for ( i=0; i < number_of_tiles_in_picture_minus2+1 ; i++ ) {
if ( i > 0 )
use_previous_tile_size_flag u(1)
if ( use_previous_tile_size_flag == 0) {
tile_width_minus1[ i ] ue(v)
tile_height_minus1[ i ] ue(v)
}
loop_filter_across_tiles_flag[i] u(1)
}
}
...
표 17의 예에서, 신택스 요소 loop_filter_across_tiles_flag[i]는 i번째 타일에 대해 인루프 필터를 적용하는 것이 허용되는지 여부를 나타낸다. loop_filter_across_tile_flag[i]의 값이 1인 것은 타일 아이디가 i인 타일의 수평 및 수직 바운더리에서 인루프 필터를 사용할 수 있음을 나타낸다. loop_filter_across_tiles_flag[i]의 값이 0인 것은 타일 아이디가 i인 타일의 수평 및 수직 바운더리에서 인루프 필터를 사용할 수 없음을 나타낸다.
수평 방향 및 수직 방향 각각에 대해 인루프 필터의 허용 여부를 나타내는 정보를 부호화할 수도 있다.
표 18은 인루프 필터의 허용 여부를 나타내는 정보가 수평 방향 및 수직 방향에 대해 개별적으로 부호화되는 예를 나타낸 것이다.
pic_parameter_set_rbsp( ) { Descriptor
...
tiles_enabled_flag u(1)
...
if( tiles_enabled_flag ) {
number_of_tiles_in_picture_minus2 ue(v)
subtile_width_minus1 ue(v)
subtile_height_minus1 ue(v)
for ( i=0; i < number_of_tiles_in_picture_minus2+1 ; i++ ) {
if ( i > 0 )
use_previous_tile_size_flag u(1)
if ( use_previous_tile_size_flag == 0) {
tile_width_minus1[ i ] ue(v)
tile_height_minus1[ i ] ue(v)
}
loop_filter_hor_across_tiles_flag[i] u(1)
loop_filter_ver_across_tiles_flag[i] u(1)
}
}
...
표 18의 예에서, 신택스 요소 loop_filter_hor_across_tiles_flag[i]는 i번째 타일에 대해 수평 방향을 가로지르는 인루프 필터를 적용하는 것이 허용되는지 여부를 나타낸다. 신택스 요소 loop_filter_ver_across_tiles_flag[i]는 i번째 타일에 대해 수직 방향을 가로지르는 인루프 필터를 적용하는 것이 허용되는지 여부를 나타낸다.
loop_filter_hor_across_tile_flag[i]의 값이 1인 것은 타일 아이디가 i인 타일의 수평 바운더리에서 인루프 필터를 사용할 수 있음을 나타낸다. loop_filter_hor_across_tile_flag[i]의 값이 0인 것은 타일 아이디가 i인 타일의 수평 바운더리에서 인루프 필터를 사용할 수 없음을 나타낸다.
loop_filter_ver_across_tile_flag[i]의 값이 1인 것은 타일 아이디가 i인 타 일의 수직 바운더리에서 인루프 필터를 사용할 수 있음을 나타내고, loop_filter_ver_across_tile_flag[i]의 값이 0인 것은 타일 아이디가 i인 타일의 수직 바운더리에서 인루프 필터를 사용할 수 없음을 나타낸다.
또는, 복수의 타일들을 포함하는 타일 그룹에 대해 인루프 필터가 허용되는지 여부를 나타내는 정보를 부호화하여 시그날링될 수도 있다. 타일 그룹에 포함된 복수의 타일들에 대한 인루프 필터의 허용 여부는 상기 정보에 의해 결정될 수 있다.
타일 그룹을 결정하기 위해, 타일 그룹에 속한 타일의 개수, 타일 그룹의 크기 또는 픽처의 분할 정보 중 적어도 하나가 비트스트림을 통해 시그날링될 수 있다. 또는, 부호화기 및 복호화기에서 기 정의된 크기의 영역이 타일 그룹으로 설정될 수 있다.
인루프 필터가 허용되는지 여부를 나타내는 정보의 부호화를 생략하고, 타일에 포함된 코딩 트리 유닛의 개수, 타일의 너비 또는 타일의 높이 중 적어도 하나를 기초로 인루프 필터의 허용 여부를 결정할 수 있다. 일 예로, 타일 너비가 기준값보다 작은 경우, 수평 방향에 대한 인루프 필터를 허용하고, 타일 높이가 기분갑보다 작은 경우, 수직 방향에 대한 인루프 필터를 허용할 수 있다.
타일 경계에서 인루프 필터가 사용되는 경우, 타일에 포함된 데이터를 기초로 타일 외부의 복원 데이터를 생성할 수 있다. 이때, 타일 외부의 복원 영상은 타일에 포함된 데이터를 패딩 또는 보간하여 획득될 수 있다. 이후, 타일 외부의 복원 데이터를 이용하여, 인루프 필터를 적용할 수 있다.
복호화 과정 또는 부호화 과정을 중심으로 설명된 실시예들을, 부호화 과정 또는 복호화 과정에 적용하는 것은, 본 발명의 범주에 포함되는 것이다. 소정의 순서로 설명된 실시예들을, 설명된 것과 상이한 순서로 변경하는 것 역시, 본 발명의 범주에 포함되는 것이다.
상술한 실시예는 일련의 단계 또는 순서도를 기초로 설명되고 있으나, 이는 발명의 시계열적 순서를 한정한 것은 아니며, 필요에 따라 동시에 수행되거나 다른 순서로 수행될 수 있다. 또한, 상술한 실시예에서 블록도를 구성하는 구성요소(예를 들어, 유닛, 모듈 등) 각각은 하드웨어 장치 또는 소프트웨어로 구현될 수도 있고, 복수의 구성요소가 결합하여 하나의 하드웨어 장치 또는 소프트웨어로 구현될 수도 있다. 상술한 실시예는 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
본 발명은 영상을 부호화/복호화하는 전자 장치에 적용될 수 있다.

Claims (14)

  1. 현재 블록에 머지 후보 리스트를 생성하는 단계;
    상기 머지 후보 리스트에 포함된 복수의 머지 후보들 중 어느 하나를 특정하는 단계;
    상기 특정된 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 기초로, 상기 현재 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 유도하는 단계;
    상기 현재 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 이용하여, 상기 현재 블록 내 서브 블록에 대한 어파인 벡터를 유도하는 단계, 상기 서브 블록은 상기 현재 블록 보다 작은 크기의 영역임; 및
    상기 어파인 벡터를 기초로, 상기 서브 블록에 대한 움직임 보상 예측을 수행하는 단계를 포함하되,
    상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 현재 블록 주변에 인접하는 이웃 블록의 움직임 정보를 기초로 유도되는 것을 특징으로 하는, 영상 복호화 방법.
  2. 제1 항에 있어서,
    상기 이웃 블록이 상기 현재 블록과 상이한 코딩 트리 유닛에 포함된 경우, 상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 이웃 블록의 좌측 하단 서브 블록 및 우측 하단 서브 블록의 움직임 벡터들을 기초로 유도되는 것을 특징으로 하는, 영상 복호화 방법.
  3. 제2 항에 있어서,
    상기 좌측 하단 서브 블록은 상기 이웃 블록 내 좌측 하단 코너에 위치하는 좌측 하단 기준 샘플을 포함하고, 상기 우측 하단 서브 블록은 상기 이웃 블록 내 좌측 하단 코너에 위치하는 우측 하단 기준 샘플을 포함하는, 영상 복호화 방법.
  4. 제3 항에 있어서,
    상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 좌측 하단 서브 블록 및 상기 우측 하단 서브 블록의 모션 벡터들의 차분 값을 스케일링 팩터를 이용한 비트 시프트 연산을 기초로 획득된 값을 기초로 유도되고,
    상기 스케일링 팩터는 상기 좌측 하단 기준 샘플 및 상기 우측 하단 기준 샘플 사이의 수평 거리 및 오프셋을 가산한 값을 기초로 유도되는 것을 특징으로 하는, 영상 복호화 방법.
  5. 제3 항에 있어서,
    상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 좌측 하단 서브 블록 및 상기 우측 하단 서브 블록의 모션 벡터들의 차분 값을 스케일링 팩터를 이용한 비트 시프트 연산을 기초로 획득된 값을 기초로 유도되고,상기 스케일링 팩터는 상기 우측 하단 기준 샘플의 우측에 이웃하는 이웃 샘플과 상기 좌측 하단 기준 샘플 사이의 거리를 기초로 유도되는 것을 특징으로 하는, 영상 복호화 방법.
  6. 제1 항에 있어서,
    상기 머지 후보 리스트는, 상기 현재 블록의 상단에 위치하는 상단 이웃 블록들 중 첫번째로 가용한 것으로 판단되는 상단 이웃 블록을 기초로 유도되는 제1 머지 후보, 및 상기 현재 블록의 좌측에 위치하는 좌측 이웃 블록들 중 첫번째로 가용한 것으로 판단되는 좌측 이웃 블록을 기초로 유도되는 제2 머지 후보를 포함하는, 영상 복호화 방법.
  7. 제1 항에 있어서,
    상기 이웃 블록이 상기 현재 블록과 동일한 코딩 트리 유닛에 포함된 경우,
    상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 이웃 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 기초로 유도되는 것을 특징으로 하는, 영상 복호화 방법.
  8. 현재 블록에 머지 후보 리스트를 생성하는 단계;
    상기 머지 후보 리스트에 포함된 복수의 머지 후보들 중 어느 하나를 특정하는 단계;
    상기 특정된 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 기초로, 상기 현재 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 유도하는 단계;
    상기 현재 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 이용하여, 상기 현재 블록 내 서브 블록에 대한 어파인 벡터를 유도하는 단계, 상기 서브 블록은 상기 현재 블록 보다 작은 크기의 영역임; 및
    상기 어파인 벡터를 기초로, 상기 서브 블록에 대한 움직임 보상 예측을 수행하는 단계를 포함하되,
    상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 현재 블록 주변에 인접하는 이웃 블록의 움직임 정보를 기초로 유도되는 것을 특징으로 하는, 영상 부호화 방법.
  9. 제8 항에 있어서,
    상기 이웃 블록이 상기 현재 블록과 상이한 코딩 트리 유닛에 포함된 경우, 상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 이웃 블록의 좌측 하단 서브 블록 및 우측 하단 서브 블록의 움직임 벡터들을 기초로 유도되는 것을 특징으로 하는, 영상 부호화 방법.
  10. 제9 항에 있어서,
    상기 좌측 하단 서브 블록은 상기 이웃 블록 내 좌측 하단 코너에 위치하는 좌측 하단 기준 샘플을 포함하고, 상기 우측 하단 서브 블록은 상기 이웃 블록 내 좌측 하단 코너에 위치하는 우측 하단 기준 샘플을 포함하는, 영상 부호화 방법.
  11. 제10 항에 있어서,
    상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 좌측 하단 서브 블록 및 상기 우측 하단 서브 블록의 모션 벡터들의 차분 값을 스케일링 팩터를 이용한 비트 시프트 연산을 기초로 획득된 값을 기초로 유도되고,
    상기 스케일링 팩터는 상기 좌측 하단 기준 샘플 및 상기 우측 하단 기준 샘플 사이의 수평 거리 및 오프셋을 가산한 값을 기초로 유도되는 것을 특징으로 하는, 영상 부호화 방법.
  12. 제10 항에 있어서,
    상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 좌측 하단 서브 블록 및 상기 우측 하단 서브 블록의 모션 벡터들의 차분 값을 스케일링 팩터를 이용한 비트 시프트 연산을 기초로 획득된 값을 기초로 유도되고,
    상기 스케일링 팩터는 상기 우측 하단 기준 샘플의 우측에 이웃하는 이웃 샘플과 상기 좌측 하단 기준 샘플 사이의 거리를 기초로 유도되는 것을 특징으로 하는, 영상 부호화 방법.
  13. 제8 항에 있어서,
    상기 머지 후보 리스트는, 상기 현재 블록의 상단에 위치하는 상단 이웃 블록들 중 첫번째로 가용한 것으로 판단되는 상단 이웃 블록을 기초로 유도되는 제1 머지 후보, 및 상기 현재 블록의 좌측에 위치하는 좌측 이웃 블록들 중 첫번째로 가용한 것으로 판단되는 좌측 이웃 블록을 기초로 유도되는 제2 머지 후보를 포함하는, 영상 부호화 방법.
  14. 제8 항에 있어서,
    상기 이웃 블록이 상기 현재 블록과 동일한 코딩 트리 유닛에 포함된 경우,
    상기 머지 후보의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터는, 상기 이웃 블록의 제1 어파인 시드 벡터 및 제2 어파인 시드 벡터를 기초로 유도되는 것을 특징으로 하는, 영상 부호화 방법.
PCT/KR2019/012290 2018-09-21 2019-09-20 영상 신호 부호화/복호화 방법 및 이를 위한 장치 WO2020060327A1 (ko)

Priority Applications (23)

Application Number Priority Date Filing Date Title
IL304953A IL304953A (en) 2018-09-21 2019-09-20 A method of encoding/decoding image signals and a device therefor
BR112021004922-3A BR112021004922A2 (pt) 2018-09-21 2019-09-20 método de decodificação de vídeo, decodificador de vídeo, codificador de vídeo, e mídia legível por computador não transitório
CN202110443353.9A CN113225560B (zh) 2018-09-21 2019-09-20 视频编码/解码方法、视频编码/解码装置和存储介质
JP2021515161A JP7449279B2 (ja) 2018-09-21 2019-09-20 ビデオ信号符号化/復号化方法及びそのための機器
PL19861535.3T PL3840376T3 (pl) 2018-09-21 2019-09-20 Sposób i urządzenie do kodowania/dekodowania sygnału obrazu
CN201980054695.2A CN112840647A (zh) 2018-09-21 2019-09-20 视频信号编码/解码方法以及用于所述方法的设备
SG11202102788YA SG11202102788YA (en) 2018-09-21 2019-09-20 Image signal encoding/decoding method and device therefor
EP23178807.6A EP4224851A1 (en) 2018-09-21 2019-09-20 Video signal encoding and decoding method, and apparatus therefor
EP23178805.0A EP4224849B1 (en) 2018-09-21 2019-09-20 Video signal encoding and decoding method, and apparatus therefor
ES19861535T ES2955040T3 (es) 2018-09-21 2019-09-20 Método de codificación/descodificación de señales de imagen y dispositivo para el mismo
IL281622A IL281622B2 (en) 2018-09-21 2019-09-20 A method of encoding/decoding image signals and a device therefor
EP23178806.8A EP4224850B1 (en) 2018-09-21 2019-09-20 Video signal encoding and decoding method, and apparatus therefor
EP23178535.3A EP4224848A1 (en) 2018-09-21 2019-09-20 Video signal encoding and decoding method, and apparatus therefor
MX2021003325A MX2021003325A (es) 2018-09-21 2019-09-20 Metodo de codificacion/decodificacion de se?ales de imagen y dispositivo para lo mismo.
CA3113054A CA3113054A1 (en) 2018-09-21 2019-09-20 Image signal encoding/decoding method and device therefor
EP19861535.3A EP3840376B1 (en) 2018-09-21 2019-09-20 Image signal encoding/decoding method and device therefor
AU2019344978A AU2019344978B2 (en) 2018-09-21 2019-09-20 Image signal encoding/decoding method and device therefor
US17/204,306 US11223845B2 (en) 2018-09-21 2021-03-17 Image signal encoding/decoding method based on an affine model and non-transitory computer-readable medium
PH12021550627A PH12021550627A1 (en) 2018-09-21 2021-03-18 Image signal encoding/decoding method and device therefor
ZA2021/01846A ZA202101846B (en) 2018-09-21 2021-03-18 Image signal encoding/decoding method and device therefor
US17/541,922 US11758176B2 (en) 2018-09-21 2021-12-03 Image signal encoding/decoding method and non-transitory computer-readable medium
US18/219,824 US20230421799A1 (en) 2018-09-21 2023-07-10 Image signal encoding/decoding method and non-transitory computer-readable medium
JP2024029968A JP2024063128A (ja) 2018-09-21 2024-02-29 ビデオ信号符号化/復号化方法及びそのための機器

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
KR20180114343 2018-09-21
KR10-2018-0114344 2018-09-21
KR10-2018-0114342 2018-09-21
KR10-2018-0114343 2018-09-21
KR20180114342 2018-09-21
KR20180114344 2018-09-21

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/204,306 Continuation US11223845B2 (en) 2018-09-21 2021-03-17 Image signal encoding/decoding method based on an affine model and non-transitory computer-readable medium

Publications (1)

Publication Number Publication Date
WO2020060327A1 true WO2020060327A1 (ko) 2020-03-26

Family

ID=69887728

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/012290 WO2020060327A1 (ko) 2018-09-21 2019-09-20 영상 신호 부호화/복호화 방법 및 이를 위한 장치

Country Status (17)

Country Link
US (3) US11223845B2 (ko)
EP (5) EP4224850B1 (ko)
JP (2) JP7449279B2 (ko)
KR (1) KR20200034644A (ko)
CN (2) CN113225560B (ko)
AU (1) AU2019344978B2 (ko)
BR (1) BR112021004922A2 (ko)
CA (1) CA3113054A1 (ko)
CL (1) CL2021000671A1 (ko)
ES (1) ES2955040T3 (ko)
IL (2) IL281622B2 (ko)
MX (1) MX2021003325A (ko)
PH (1) PH12021550627A1 (ko)
PL (1) PL3840376T3 (ko)
SG (1) SG11202102788YA (ko)
WO (1) WO2020060327A1 (ko)
ZA (1) ZA202101846B (ko)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190134521A (ko) * 2018-05-24 2019-12-04 주식회사 케이티 비디오 신호 처리 방법 및 장치
KR20240027856A (ko) * 2018-07-11 2024-03-04 후아웨이 테크놀러지 컴퍼니 리미티드 비디오 인코더, 비디오 디코더, 및 대응하는 방법
CN116320418A (zh) 2018-09-21 2023-06-23 Oppo广东移动通信有限公司 视频信号编码/解码方法及其设备
EP3893509A4 (en) 2018-12-07 2022-10-26 Samsung Electronics Co., Ltd. VIDEO DECODING METHOD AND DEVICE AND VIDEO ENCODING METHOD AND DEVICE
CN116456081A (zh) 2018-12-25 2023-07-18 Oppo广东移动通信有限公司 解码预测方法、装置及计算机存储介质
CN112236998A (zh) * 2019-01-02 2021-01-15 株式会社 Xris 用于对视频信号进行编码/解码的方法及其装置
WO2023220970A1 (zh) * 2022-05-18 2023-11-23 Oppo广东移动通信有限公司 视频编码方法、装置、设备、***、及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140120253A (ko) * 2011-12-15 2014-10-13 타지반 투 엘엘씨 화상 부호화 방법, 화상 복호 방법, 화상 부호화 장치, 화상 복호 장치, 화상 부호화 복호 장치
WO2018061563A1 (ja) * 2016-09-27 2018-04-05 シャープ株式会社 アフィン動きベクトル導出装置、予測画像生成装置、動画像復号装置、および動画像符号化装置
US20180098063A1 (en) * 2016-10-05 2018-04-05 Qualcomm Incorporated Motion vector prediction for affine motion models in video coding
US20180192069A1 (en) * 2016-12-29 2018-07-05 Qualcomm Incorporated Motion vector generation for affine motion model for video coding
KR20180085526A (ko) * 2017-01-19 2018-07-27 가온미디어 주식회사 효율적 변환을 처리하는 영상 복호화 및 부호화 방법

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7730406B2 (en) * 2004-10-20 2010-06-01 Hewlett-Packard Development Company, L.P. Image processing system and method
JP2011217044A (ja) * 2010-03-31 2011-10-27 Sony Corp 画像処理装置、画像処理方法および画像処理プログラム
CN104661031B (zh) * 2015-02-16 2017-12-22 华为技术有限公司 用于视频图像编码和解码的方法、编码设备和解码设备
CN108886619A (zh) * 2016-01-07 2018-11-23 联发科技股份有限公司 用于视频编解码***的仿射合并模式预测的方法及装置
US10798403B2 (en) 2016-01-29 2020-10-06 Sharp Kabushiki Kaisha Prediction image generation device, video decoding device, and video coding device
CN109804630A (zh) * 2016-10-10 2019-05-24 夏普株式会社 对视频数据编码执行运动补偿的***以及方法
EP3516871A1 (en) * 2016-10-14 2019-07-31 Huawei Technologies Co., Ltd. Devices and methods for video coding
US10555006B2 (en) * 2016-12-22 2020-02-04 Qualcomm Incorporated Deriving bilateral filter information based on a prediction mode in video coding
WO2018135885A1 (ko) 2017-01-19 2018-07-26 가온미디어 주식회사 변환 처리를 제공하는 영상 복호화 및 부호화 방법
KR20180098158A (ko) * 2017-02-24 2018-09-03 주식회사 케이티 비디오 신호 처리 방법 및 장치
US10701390B2 (en) * 2017-03-14 2020-06-30 Qualcomm Incorporated Affine motion information derivation
US11877001B2 (en) * 2017-10-10 2024-01-16 Qualcomm Incorporated Affine prediction in video coding
MX2020014114A (es) 2018-06-30 2021-05-31 Guangdong Oppo Mobile Telecommunications Corp Ltd Método y aparato de interpredicción en base al modo de fusión.
KR20200028856A (ko) 2018-09-07 2020-03-17 김기백 인트라 예측을 이용한 영상 부호화/복호화 방법 및 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140120253A (ko) * 2011-12-15 2014-10-13 타지반 투 엘엘씨 화상 부호화 방법, 화상 복호 방법, 화상 부호화 장치, 화상 복호 장치, 화상 부호화 복호 장치
WO2018061563A1 (ja) * 2016-09-27 2018-04-05 シャープ株式会社 アフィン動きベクトル導出装置、予測画像生成装置、動画像復号装置、および動画像符号化装置
US20180098063A1 (en) * 2016-10-05 2018-04-05 Qualcomm Incorporated Motion vector prediction for affine motion models in video coding
US20180192069A1 (en) * 2016-12-29 2018-07-05 Qualcomm Incorporated Motion vector generation for affine motion model for video coding
KR20180085526A (ko) * 2017-01-19 2018-07-27 가온미디어 주식회사 효율적 변환을 처리하는 영상 복호화 및 부호화 방법

Also Published As

Publication number Publication date
IL304953A (en) 2023-10-01
BR112021004922A2 (pt) 2021-06-08
EP4224849B1 (en) 2024-06-12
AU2019344978A1 (en) 2021-04-15
EP3840376B1 (en) 2023-07-05
CN113225560B (zh) 2023-05-23
ZA202101846B (en) 2022-07-27
SG11202102788YA (en) 2021-04-29
KR20200034644A (ko) 2020-03-31
EP3840376A4 (en) 2021-07-07
US11223845B2 (en) 2022-01-11
EP3840376A1 (en) 2021-06-23
IL281622B1 (en) 2023-09-01
IL281622B2 (en) 2024-01-01
EP4224851A1 (en) 2023-08-09
EP4224848A1 (en) 2023-08-09
CA3113054A1 (en) 2020-03-26
CN112840647A (zh) 2021-05-25
JP7449279B2 (ja) 2024-03-13
JP2024063128A (ja) 2024-05-10
EP4224850A1 (en) 2023-08-09
ES2955040T3 (es) 2023-11-28
US20220094964A1 (en) 2022-03-24
CL2021000671A1 (es) 2021-09-03
AU2019344978B2 (en) 2024-07-11
PH12021550627A1 (en) 2022-02-14
IL281622A (en) 2021-05-31
JP2022502899A (ja) 2022-01-11
PL3840376T3 (pl) 2023-12-11
CN113225560A (zh) 2021-08-06
US20230421799A1 (en) 2023-12-28
EP4224849A1 (en) 2023-08-09
US11758176B2 (en) 2023-09-12
MX2021003325A (es) 2021-05-14
US20210203977A1 (en) 2021-07-01
EP4224850B1 (en) 2024-06-12

Similar Documents

Publication Publication Date Title
WO2020096389A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020159198A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020185022A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020076125A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020111785A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2017176030A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020256442A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2018026219A1 (ko) 비디오 신호 처리 방법 및 장치
WO2017171370A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020096388A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020076116A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2020222617A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020060328A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019083334A1 (ko) 비대칭 서브 블록 기반 영상 부호화/복호화 방법 및 장치
WO2020060327A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019182292A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020096428A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019050292A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020213963A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020060329A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020197290A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2020096426A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2021040321A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020184979A1 (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: 19861535

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3113054

Country of ref document: CA

ENP Entry into the national phase

Ref document number: 2021515161

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: 2019861535

Country of ref document: EP

Effective date: 20210316

ENP Entry into the national phase

Ref document number: 2019344978

Country of ref document: AU

Date of ref document: 20190920

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112021004922

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 112021004922

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20210316