[go: up one dir, main page]

WO2024258146A1 - Method and apparatus for processing video signal - Google Patents

Method and apparatus for processing video signal Download PDF

Info

Publication number
WO2024258146A1
WO2024258146A1 PCT/KR2024/007962 KR2024007962W WO2024258146A1 WO 2024258146 A1 WO2024258146 A1 WO 2024258146A1 KR 2024007962 W KR2024007962 W KR 2024007962W WO 2024258146 A1 WO2024258146 A1 WO 2024258146A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
prediction
unit
mask
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/KR2024/007962
Other languages
French (fr)
Korean (ko)
Inventor
이종석
김민섭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Intellectual Discovery Co Ltd
Original Assignee
Intellectual Discovery Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Intellectual Discovery Co Ltd filed Critical Intellectual Discovery Co Ltd
Priority to CN202480039130.8A priority Critical patent/CN121312137A/en
Publication of WO2024258146A1 publication Critical patent/WO2024258146A1/en
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/196Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • 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

Definitions

  • the present invention relates to a video signal processing method and device, and more specifically, to a video encoding and decoding method and device.
  • the market demand for high-resolution video is increasing, and technology that can efficiently compress high-resolution images is required.
  • the ISO/IEC's MPEG (Moving Picture Expert Group) and the ITU-T's VCEG (Video Coding Expert Group) jointly formed the JCT-VC (Joint Collaborative Team on Video Coding), completed the development of the HEVC (High Efficiency Video Coding) video compression standard in January 2013, and are actively conducting research and development on next-generation compression standards.
  • Video compression is largely composed of intra-prediction, inter-prediction, transformation, quantization, entropy coding, and in-loop filtering. Meanwhile, as the demand for high-resolution images increases, the demand for stereoscopic image content as a new image service is also increasing. Discussions are underway on video compression technology to effectively provide high-resolution and ultra-high-resolution stereoscopic image content.
  • the purpose of the present invention is to provide a method and device for processing a video signal.
  • the video decoding method and device can generate at least two prediction blocks for a current block, and generate a final prediction block of the current block by weighting the at least two prediction blocks based on a predetermined mask.
  • each of the at least two prediction blocks is a unidirectional or bidirectional prediction block, and the bidirectional prediction block can be generated based on a weighted sum of an L0 prediction block and an L1 prediction block.
  • the mask can be determined based on geometric segmentation information.
  • the geometric segmentation information can specify any one of a plurality of mask candidates pre-defined in the image decoding device.
  • the geometric segmentation information may include a flag indicating whether an inverted mask is used.
  • the mask can be generated based on a differential block between the at least two prediction blocks.
  • the mask may be generated based on a ratio block between the at least two prediction blocks.
  • the ratio block may be derived by dividing a sample value belonging to one of the at least two prediction blocks by a sample value at the same position belonging to the other one.
  • each of the at least two prediction blocks can be generated based on any one of an inter mode, an intra mode, or an intra block copy mode.
  • the weight for the weighted sum can be determined based on at least one of the ratio of surrounding blocks to which the intra mode is applied or the POC difference between the current picture to which the current block belongs and the reference picture.
  • the video encoding method and device can generate at least two prediction blocks for a current block, and generate a final prediction block of the current block by weighting and combining the at least two prediction blocks based on a predetermined mask.
  • each of the at least two prediction blocks is a unidirectional or bidirectional prediction block, and the bidirectional prediction block can be generated based on a weighted sum of an L0 prediction block and an L1 prediction block.
  • a computer-readable digital storage medium having stored thereon video/image information causing a method of decrypting a message according to the present disclosure to be performed.
  • a computer-readable digital storage medium storing video/image information generated by a method for encoding a message according to the present disclosure is provided.
  • a method and device for transmitting video/image information generated by a mesh encoding method according to the present disclosure are provided.
  • the prediction performance of a final prediction block can be improved by using an adaptive mask on the texture of a current block.
  • prediction performance can be improved by utilizing parameters based on the correlation between a current template and a reference template.
  • Figure 1 is a block diagram showing an image encoding device according to the present invention.
  • FIG. 2 is a block diagram showing an image decoding device according to the present invention.
  • FIG. 3 illustrates a prediction method performed by an image encoding/decoding device as an embodiment according to the present disclosure.
  • FIG. 4 illustrates a mask-based blending method for multiple prediction blocks as an embodiment according to the present disclosure.
  • Figures 5 to 7 illustrate a mask generating method according to the present disclosure.
  • FIG. 8 illustrates a parameter-based prediction method as an example according to the present disclosure.
  • FIG. 9 illustrates a parameter-based prediction method in color inter-prediction of intra prediction as an embodiment according to the present disclosure.
  • FIG. 10 illustrates a parameter-based prediction method in intra block copy (IBC) mode as an embodiment according to the present disclosure.
  • Figure 11 illustrates a parameter-based prediction method in inter prediction mode.
  • FIG. 12 is an example according to the present disclosure, illustrating a relationship between two different areas.
  • FIG. 13 is an example according to the present disclosure, illustrating multiple associations for two different areas.
  • FIG. 14 is an example according to the present disclosure, showing nonlinear correlations for two different domains.
  • some of the components of the device or some of the steps of the method may be omitted. Also, the order of some of the components of the device or some of the steps of the method may be changed. Also, other components or other steps may be inserted into some of the components of the device or some of the steps of the method.
  • each component shown in the embodiments of the present invention are independently depicted to represent different characteristic functions, and do not mean that each component is formed as a separate hardware or software configuration unit. That is, each component is described by listing each component for convenience of explanation, and at least two components among each component may be combined to form a single component, or one component may be divided into multiple components to perform a function. Such integrated embodiments and separate embodiments of each component are also included in the scope of the rights of the present invention as long as they do not deviate from the essence of the present invention.
  • the video decoding apparatus described below may be a device included in a server terminal such as a civilian security camera, a civilian security system, a military security camera, a military security system, a personal computer (PC), a laptop computer, a portable multimedia player (PMP), a wireless communication terminal, a smart phone, a TV application server and a service server, and may refer to various devices including user terminals such as various devices, communication devices such as a communication modem for communicating with a wired or wireless communication network, a memory for storing various programs and data for decoding a video or for inter- or intra-predicting for decoding, and a microprocessor for executing a program and performing calculations and controls.
  • a server terminal such as a civilian security camera, a civilian security system, a military security camera, a military security system, a personal computer (PC), a laptop computer, a portable multimedia player (PMP), a wireless communication terminal, a smart phone, a TV application server and a service server
  • various devices including user terminals such as various
  • an image encoded into a bitstream by an image encoding device may be transmitted to an image decoding device through wired or wireless communication networks such as the Internet, a local area network, a wireless LAN, a WiBro network, a mobile communication network, etc. in real time or non-real time, or through various communication interfaces such as a cable, a universal serial bus (USB), etc., and may be decoded, restored into an image, and played back.
  • the bitstream generated by the image encoding device may be stored in memory.
  • the memory may include both volatile memory and non-volatile memory. In this specification, the memory may be expressed as a recording medium storing a bitstream.
  • a video may be composed of a series of pictures, and each picture may be divided into coding units such as blocks.
  • picture described below may be replaced with other terms having equivalent meanings, such as image, frame, etc.
  • coding unit may be replaced with other terms having equivalent meanings, such as unit block, block, etc.
  • Figure 1 is a block diagram showing an image encoding device according to the present invention.
  • a conventional image encoding device may include a picture segmentation unit (110), a prediction unit (120, 125), a transformation unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse transformation unit (145), a filter unit (150), and a memory (155).
  • the picture splitting unit (110) can split the input picture into at least one processing unit.
  • the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU).
  • the coding unit may be used to mean a unit that performs encoding, or may be used to mean a unit that performs decoding.
  • a prediction unit may be divided into at least one square or rectangular shape of the same size within one coding unit, or may be divided such that one prediction unit among the prediction units divided within one coding unit has a different shape and/or size from another prediction unit.
  • intra prediction can be performed without being divided into a plurality of NxN prediction units.
  • the prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction or inter-screen prediction, and an intra prediction unit (125) that performs intra prediction or intra-screen prediction. It may be determined whether to use inter prediction or intra prediction for a prediction unit, and specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. A residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130). In addition, prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value by an entropy encoding unit (165) and transmitted to an image decoding device.
  • an entropy encoding unit (165) may be encoded together with the residual value by an entropy encoding unit (165) and transmitted to an image decoding device.
  • the inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of a part of an encoded region within the current picture.
  • the inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
  • the reference picture interpolation unit can receive reference picture information from the memory (155) and generate pixel information below an integer pixel from the reference picture.
  • a DCT-based 8-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients can be used to generate pixel information below an integer pixel in units of 1/4 pixels.
  • a DCT-based 4-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients can be used to generate pixel information below an integer pixel in units of 1/8 pixels.
  • the motion prediction unit can perform motion prediction based on a reference picture interpolated by a reference picture interpolation unit.
  • Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used to derive a motion vector.
  • the motion vector can have a motion vector value of 1/2 or 1/4 pixel unit based on the interpolated pixel.
  • the motion prediction unit can predict the current prediction unit by using different motion prediction methods.
  • Various methods such as Skip Mode, Merge Mode, AMVP Mode, Intra Block Copy Mode, and Affine Mode can be used as the motion prediction method.
  • the intra prediction unit (125) can generate a prediction unit based on reference pixel information surrounding the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block on which inter prediction is performed and the reference pixel is a pixel on which inter prediction is performed, the reference pixel included in the block on which inter prediction is performed can be used as a replacement for the reference pixel information of the surrounding block on which intra prediction is performed. That is, if the reference pixel is not available, the unavailable reference pixel information can be used as a replacement for at least one reference pixel among the available reference pixels.
  • a residual block including residual value information which is a difference value between the prediction unit that performed the prediction and the original block of the prediction unit based on the prediction unit generated in the prediction unit (120, 125), can be generated.
  • the generated residual block can be input to the transformation unit (130).
  • the residual block including the residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra prediction mode information of the prediction unit used to generate the residual block.
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • KLT Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra prediction mode information of the prediction unit used to generate the residual block.
  • the quantization unit (135) can quantize the values converted to the frequency domain in the transformation unit (130).
  • the quantization coefficients can vary depending on the block or the importance of the image.
  • the values produced by the quantization unit (135) can be provided to the dequantization unit (140) and the reordering unit (160).
  • the rearrangement unit (160) can perform rearrangement of coefficient values for quantized residual values.
  • the rearrangement unit (160) can change a two-dimensional block-shaped coefficient into a one-dimensional vector shape by using a coefficient scanning method.
  • the rearrangement unit (160) can change the two-dimensional block-shaped coefficient into a one-dimensional vector shape by scanning from the DC coefficient to the coefficient of the high-frequency region by using a zig-zag scan method.
  • a vertical scan that scans the two-dimensional block-shaped coefficient in the column direction or a horizontal scan that scans the two-dimensional block-shaped coefficient in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, it is possible to determine which scan method among the zig-zag scan, the vertical scan, and the horizontal scan is to be used.
  • the entropy encoding unit (165) can perform entropy encoding based on the values produced by the rearrangement unit (160) to generate a bitstream.
  • the entropy encoding can use various encoding methods such as, for example, Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding).
  • the entropy encoding unit (165) can encode residual value coefficient information of an encoding unit from the rearrangement unit (160) and the prediction unit (120, 125).
  • the values quantized in the quantization unit (135) are inversely quantized and the values transformed in the transformation unit (130) are inversely transformed.
  • the residual values generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted prediction units through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.
  • the filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).
  • the deblocking filter may remove block distortion caused by boundaries between blocks in a restored picture.
  • the offset correction unit may correct an offset from an original image on a pixel basis for an image on which deblocking has been performed. In order to perform offset correction for a specific picture, a method may be used in which pixels included in the image are divided into a certain number of regions, and then regions to be offset-performed are determined and offsets are applied to the regions, or a method may be used in which an offset is applied by considering edge information of each pixel.
  • ALF Adaptive Loop Filtering
  • ALF Adaptive Loop Filtering
  • the memory (155) can store a restored block or picture produced through the filter unit (150), and the stored restored block or picture can be provided to the prediction unit (120, 125) when performing inter prediction.
  • FIG. 2 is a block diagram showing an image decoding device according to the present invention.
  • the video image decoding device (200) may include an entropy decoding unit (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).
  • the input bitstream can be decoded in the opposite procedure to that of the video encoding device.
  • the entropy decoding unit (210) can perform entropy decoding in a procedure opposite to that of performing entropy encoding in the entropy encoding unit of the video image encoding device.
  • various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in response to the method performed in the video image encoding device.
  • the entropy decoding unit (210) can decode information related to intra prediction and inter prediction performed in the image encoding device.
  • the reordering unit (215) can perform reordering based on the method in which the bitstream that has been entropy decoded by the entropy decoding unit (210) is reordered by the encoding unit.
  • the coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them back to coefficients in the form of a two-dimensional block.
  • the inverse quantization unit (220) can perform inverse quantization based on the quantization parameters provided from the image encoding device and the coefficient values of the rearranged block.
  • the inverse transform unit (225) can perform inverse transform, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms performed by the transform unit, i.e., DCT, DST, and KLT, on the quantization result performed by the image image encoding device.
  • the inverse transform can be performed based on the transmission unit determined by the image image encoding device.
  • a transform technique e.g., DCT, DST, KLT
  • a plurality of pieces of information such as a prediction method, a size of a current block, and a prediction direction.
  • the prediction unit (230, 235) can generate a prediction block based on prediction block generation related information provided from the entropy decoding unit (210) and previously decoded block or picture information provided from the memory (245).
  • intra prediction for the prediction unit is performed based on the pixels on the left side of the prediction unit, the pixels on the upper left side, and the pixels on the upper side.
  • intra prediction can be performed using reference pixels based on the transformation unit.
  • intra prediction using NxN division only for the minimum coding unit can be used.
  • the prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit.
  • the prediction unit determination unit may receive 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, and may distinguish a prediction unit from a current encoding unit and determine whether the prediction unit performs inter prediction or intra prediction.
  • the prediction unit determination unit determines whether the inter prediction unit (230) performs prediction based on the information transmitted from the video encoding device (100).
  • the inter prediction unit (230) can perform inter prediction on the current prediction unit based on information included in at least one picture among the previous picture or the subsequent picture of the current picture including the current prediction unit, using information required for inter prediction of the current prediction unit provided by the video image encoding device. In order to perform inter prediction, it can be determined based on the encoding unit whether the motion prediction method of the prediction unit included in the corresponding encoding unit is one of Skip Mode, Merge Mode, AMVP Mode, Intra block copy mode, and Affine mode.
  • the intra prediction unit (235) can generate a prediction block based on pixel information in the current picture. If the prediction unit is a prediction unit that has performed intra prediction, intra prediction can be performed based on intra prediction mode information of the prediction unit provided by the video image encoding device.
  • the intra prediction unit (235) may include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter.
  • the AIS filter is a unit that performs filtering on the reference pixels of the current block and may determine whether to apply the filter according to the prediction mode of the current prediction unit and apply it.
  • the AIS filter may be performed on the reference pixels of the current block using the prediction mode and AIS filter information of the prediction unit provided by the video image encoding device. If 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 can interpolate the reference pixel to generate a reference pixel of a pixel unit less than an integer value when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value interpolated by the reference pixel.
  • the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel
  • the reference pixel may not be interpolated.
  • the DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.
  • the restored block or picture may be provided to a filter unit (240).
  • the filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.
  • a deblocking filter of a video decoding device can receive information related to a deblocking filter provided from a video encoding device and perform deblocking filtering on a corresponding block in a video decoding device.
  • the offset correction unit can perform offset correction on the restored image based on the type of offset correction applied to the image during encoding, information on the offset value, etc.
  • ALF can be applied to the encoding unit based on information on whether ALF is applied, ALF coefficient information, etc. provided from the image encoding device. Such ALF information can be provided by being included in a specific parameter set.
  • the memory (245) can store a restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to an output unit.
  • FIG. 3 illustrates a prediction method performed by an image encoding/decoding device as an embodiment according to the present disclosure.
  • At least two prediction blocks can be generated for the current block (S300).
  • At least two prediction blocks can be generated for a current block.
  • the current block can be divided into at least two partitions.
  • a prediction block can be generated from a reference picture of the corresponding partition.
  • the division can be performed based on geometric division.
  • the prediction based on geometric division according to the present disclosure can be any one of the inter modes pre-defined in the image encoding/decoding apparatus.
  • the prediction block can be a unidirectional prediction block or a bidirectional prediction block.
  • the unidirectional prediction block can mean a prediction block in the L0 or L1 direction.
  • the bidirectional prediction block can be generated through a weighted sum of the L0 and L1 prediction blocks. Through this, at least two prediction blocks can be generated for the current block.
  • blending may be performed on at least two prediction blocks based on a predetermined mask to generate a final prediction block of the current block (S310).
  • the above mask has the same size as the current block and can define weights for each sample location within the prediction block.
  • the above mask can be defined for each of the at least two prediction blocks. The method of generating/determining the above mask will be described in detail with reference to FIGS. 4 to 7.
  • FIG. 4 illustrates a mask-based blending method for multiple prediction blocks as an embodiment according to the present disclosure.
  • blending can be performed based on a predetermined mask to generate a final prediction block of the current block.
  • the mask may be determined based on geometric segmentation information.
  • the geometric segmentation information may be information related to one or more segmentation lines for dividing the current block into at least two partitions.
  • the geometric segmentation information may include at least one of a distance between the segmentation line and the center of the current block or an angle of a line segment orthogonal to the segmentation line.
  • the geometric segmentation information may be signaled through a bitstream.
  • the weight of the mask can be calculated based on at least one of the angles or distances mentioned above.
  • the angles and/or distances can be quantized and defined in the form of indices. For example, for the use of functions such as cos() and sin(), pre-determined values according to the indices can be used based on a table.
  • the geometric segmentation information may be an index. Based on the index, an identically pre-defined mask may be used in the image encoding/decoding device.
  • the image encoding/decoding device may define a plurality of mask candidates, and any one of the plurality of mask candidates may be selectively used based on the index.
  • the above geometric segmentation information may include a flag indicating whether an inverted mask is used. For example, if the flag is a first value, this may indicate that an inverted mask is used. In this case, a mask derived by inverting a mask selected by the index (i.e., an inverted mask) may be used. On the other hand, if the flag is a second value, this may indicate that an inverted mask is not used. In this case, a mask selected by the index may be used.
  • the flag may be encoded in a bitstream based on a determination of whether a current block uses an inverted mask, and the encoded flag may be signaled to an image decoding device through the bitstream.
  • an adaptive mask for the texture of the current block, the prediction performance of the final prediction block can be improved.
  • an optimal mask is determined/generated in an image encoding device, and information specifying this is transmitted to an image decoding device, so that the same mask can be used in the image encoding/decoding device.
  • the mask can be generated based on at least two prediction blocks.
  • a mask may be generated based on a differential block between at least two prediction blocks.
  • at least two weights for blending may be derived based on the differential sample value(s) in the differential block.
  • the at least two weights may be different values or the same values.
  • a table defining weights corresponding to each differential sample value may be used. That is, weights corresponding to differential sample values in the differential block may be derived from the table.
  • the weights may include at least two weights applied to at least two prediction blocks.
  • the at least two weights may be derived based on a mapping function according to the differential sample values.
  • the mask can be generated based on a ratio block between at least two prediction blocks.
  • a ratio block can be derived by dividing a prediction sample value in one of at least two prediction blocks by a prediction sample value at the same location in the other prediction block. At least two weights for blending can be derived based on the sample value(s) in the ratio block.
  • FIG. 5 illustrates a method for generating a mask according to the present disclosure.
  • a plurality of prediction blocks may be used to generate a final prediction block for a current block.
  • Each of the prediction blocks may be generated based on one of the inter mode, the intra mode, or the intra block copy (IBC) mode.
  • the plurality of prediction blocks may be generated through the same prediction method (i.e., one of the inter mode, the intra mode, or the intra block copy mode).
  • one of the plurality of prediction blocks may be generated based on the inter mode, and the other may be generated based on one of the intra mode or the intra block copy mode.
  • one of the plurality of prediction blocks may be generated based on the intra mode, and the other may be generated based on one of the inter mode or the intra block copy mode.
  • Multiple prediction blocks for the current block can be weighted to generate a final prediction block.
  • the weights for the above weighted sum may be determined based on at least one of a ratio of neighboring blocks to which the intra mode is applied among neighboring blocks adjacent to the current block or a difference between the POC (picture order count) of the current picture to which the current block belongs and the POC of the reference picture.
  • a final prediction block can be generated using multiple prediction block-specific masks.
  • the above mask can be derived based on information signaled in predetermined units as described above.
  • the predetermined unit can be a picture, a slice, a coding tree unit row (CTU row), a CTU, or a coding block.
  • the mask may be derived based on the differential block between the at least two prediction blocks described above. For example, if the differential sample value in the differential block is 0, the weight of the corresponding sample position may be derived as the average weight. On the other hand, a larger weight may be used as the differential sample value in the differential block is larger. In this case, one of the at least two prediction blocks may be selected according to the sign of the differential sample value. A flag for the selection may be separately signaled. The differential sample value may be replaced with the absolute value of the differential sample value, and this may be equally applied in the embodiments described below.
  • a value mapped to the differential sample value may be derived based on a linear function, and a mask may be derived based on the derived value.
  • the linear function according to the present disclosure may be defined as at least one of a weight multiplied by the differential sample value or an offset added/subtracted to/from the differential sample value. That is, the derivation of the linear function may mean the derivation of at least one of the weight or the offset. This may be applied to the embodiments described below in the same sense.
  • the differential sample value when the differential sample value is greater than a predetermined threshold, the differential sample value may be clipped based on a value based on the bit depth of the mask.
  • the mapping may be performed based on a linear function different from the previous linear function.
  • each linear function may be identically pre-defined in the image encoding/decoding device.
  • the image encoding device can transmit linear function information to the image decoding device in predetermined units.
  • the predetermined units are as described above.
  • a linear function may be derived based on the prediction block(s) for the surrounding block(s) of the current block, and a mask may be derived based on this.
  • the surrounding block uses two prediction blocks
  • one or more linear functions may be obtained for the current block based on the reconstructed surrounding block and the two prediction blocks.
  • a value mapped to a differential sample value for the current block may be derived based on the obtained linear function, and a mask may be derived based on this.
  • a predetermined representative value may be derived from the prediction block of the current block, and a linear function may be derived based on the derived representative value.
  • a linear function may be derived based on an average value of any one of at least two prediction blocks for the current block. Based on an average value of any one of at least two prediction blocks for the current block, any one of a plurality of linear function candidates may be selected.
  • the average value may be defined as an average of all or part of the prediction sample values belonging to the prediction block.
  • a linear function can be derived based on the representative values of the pre-restored sample values around the current block.
  • One of a plurality of linear function candidates can be selected based on the representative values of the pre-restored sample values around the current block.
  • Figure 6 illustrates a mask generation method according to the present disclosure.
  • At least two prediction blocks according to the present disclosure may be generated based on an intra mode.
  • the present invention is not limited thereto, and as described above, the at least two prediction blocks may be generated based on different prediction methods.
  • Each prediction block may be generated based on a non-directional mode (e.g., planar mode, DC mode), a directional mode, IBC, or Intra-Template Matching Prediction (IntraTMP).
  • a non-directional mode e.g., planar mode, DC mode
  • a directional mode e.g., IBC
  • Intra-Template Matching Prediction e.g., Intra-Template Matching Prediction
  • the prediction samples of each prediction block may have position-based intra prediction sample filtering (PDPC) applied.
  • PDPC position-based intra prediction sample filtering
  • a mask can be derived based on differential sample value(s) within a differential block for a current block, and the final predicted block can be generated by applying the mask to at least two predicted blocks for the current block.
  • a linear function i.e., a weight and/or an offset of the linear function
  • a linear function can be derived based on at least one of the maximum or minimum values among the differential sample values and the bit depth of the mask.
  • the sign of the weight and/or an offset of the linear function can be signaled in a predetermined unit.
  • the sign of the weight of a linear function can be predicted based on the previously restored reference sample value(s) for the current block, and the predicted sign can be used as is.
  • the sign of the gradient of the linear function can be derived based on the reconstructed sample value(s) around the current block and the predicted block of the current block.
  • the sign of the gradient of the linear function can be derived based on the first derivative in the horizontal or vertical direction.
  • the sign of the gradient of the linear function can be derived based on the continuity between the pre-reconstructed sample value(s) around the current block and the prediction block of the current block.
  • the continuity can be judged based on the difference between the prediction sample located at the boundary of the current block and the pre-reconstructed surrounding samples. That is, according to the sign of the gradient, more prediction candidates can be generated than the existing intra prediction, and high encoding efficiency can be provided by adaptively using a more appropriate prediction block.
  • Figure 7 illustrates a mask generation method according to the present disclosure.
  • differential sample value(s) can be calculated for some areas within at least two prediction blocks for a current block, and a mask can be generated based on the differential sample value(s).
  • a final prediction block can be generated by blending at least two prediction blocks based on the generated mask.
  • differential sample values can be calculated only for some areas (Difference areas) within the two prediction blocks (Predictor 0, Predictor 1).
  • the above-mentioned some areas (Difference areas) can be determined based on one or more straight lines.
  • difference areas some areas where differential sample values are calculated will be called difference areas.
  • the information about the straight line can be signaled in a given unit.
  • the given unit can be a picture, a slice, a coding tree unit row (CTU row), a CTU, or a coding block.
  • the information about the straight line can include at least one of a weight (or a slope) or an offset (or an intercept) representing a linear function.
  • the information about the straight line can include at least one of a slope or a distance from the center of the current block.
  • the information about the straight line can be an index indicating one straight line parameter from a table defining a plurality of straight line parameters.
  • a first area (1 st area) and a second area (2 nd area) can be distinguished as shown in Fig. 7.
  • a flag can be additionally signaled to induce masks for the two areas.
  • a mask when the value of the flag is 0, a mask may be derived that causes the first region to use the first prediction block (Predictor 0), and a mask may be derived that causes the second region to use the second prediction block (Predictor 1). Conversely, when the value of the flag is 1, a mask may be derived that causes the first region to use the second prediction block, and a mask may be derived that causes the second region to use the first prediction block.
  • the same prediction block can be used for both regions, and blending can be performed only on the difference region to generate the final prediction block.
  • a specific flag can be used to determine which prediction block to use for the two regions.
  • a mask when the value of the flag is 0, a mask may be derived that uses the first prediction block in the first region and the second region, and a mask based on the differential sample value may be derived in the difference region. Conversely, when the value of the flag is 1, a mask may be derived that uses the second prediction block in the first region and the second region, and a mask based on the differential sample value may be derived for the difference region.
  • the slope of the linear function can be determined based on at least one of the features of the first region and the difference region or the features of the second region and the difference region.
  • the features of the first region and the difference region can mean continuity between the first region and the difference region.
  • the features of the second region and the difference region can be continuity between the second region and the difference region. The meaning of continuity is as described above.
  • FIG. 8 illustrates a parameter-based prediction method as an example according to the present disclosure.
  • the prediction mode of the current block can be determined (S800).
  • the prediction mode of the current block can be determined as one of a plurality of prediction modes pre-defined in the video encoding device and the video decoding device.
  • the plurality of prediction modes can include at least one of an intra mode, an inter-color prediction mode, an inter mode, or an IBC mode.
  • parameters can be derived based on the prediction mode of the current block (S810).
  • the parameters according to the present disclosure may mean parameters of a mapping function, offset parameters, parameters of a filter, or parameters for illumination compensation.
  • a method of deriving parameters according to a prediction mode will be described in detail with reference to FIGS. 9 to 11.
  • a prediction block of the current block can be generated based on the reference block and parameters of the current block (S820).
  • the reference block according to the present disclosure may be a block of a different component type from the current block.
  • the reference block may be a luminance component block corresponding to the current block.
  • the reference block may be a Cb component block corresponding to the current block.
  • the reference block may belong to a previously restored region within the current picture to which the current block belongs.
  • the reference block may belong to a different picture from the current block.
  • the above parameters can be applied to samples of the above reference block to derive prediction samples of the current block.
  • the above parameters can be applied to all samples belonging to the reference block, or can be applied to only some samples within the reference block.
  • the above reference block can be divided into at least two regions, and different parameters can be applied to each region.
  • FIG. 9 illustrates a parameter-based prediction method in color inter-prediction of intra prediction as an embodiment according to the present disclosure.
  • the color inter-prediction according to the present disclosure can predict at least one of a second block or a third block based on a pre-reconstructed or pre-predicted first block, as illustrated in FIG. 9.
  • the third block can be predicted based on a pre-reconstructed or pre-predicted second block.
  • a mapping function having color correlation may be used to generate a prediction block for the second block and/or the third block.
  • the parameters of the mapping function used for the current block may be transmitted from the image encoding device to the image decoding device.
  • the parameters of the mapping function may include at least one of a weight multiplied by the sample value of the first block or one or more offsets added/subtracted from the sample of the first block. It may be interpreted in the same sense in the embodiment described below.
  • any one of a plurality of mapping functions stored in the form of a pre-defined table or list in the image encoding device and the image decoding device may be selectively used.
  • the parameters of the mapping function may be derived based on the correlation between the pre-restored sample value(s) around the first block and the pre-restored sample value(s) around the second block, and prediction may be performed based on the derived parameters of the mapping function.
  • the parameters of the mapping function may be derived based on the correlation between the pre-restored sample value(s) around the first block and the pre-restored sample value(s) around the third block, and prediction may be performed based on the derived parameters. The correlation will be examined in detail with reference to FIGS. 12 to 14.
  • FIG. 10 illustrates a parameter-based prediction method in intra block copy (IBC) mode as an embodiment according to the present disclosure.
  • the IBC mode can derive a prediction block of the current block based on a reference block at a position moved by a predetermined block vector (BV) from the current block, as illustrated in Fig. 10.
  • BV block vector
  • a reference block specified by a block vector may be derived as a prediction block of the current block, or a corrected reference block may be derived as a prediction block of the current block.
  • the IBC mode can be used.
  • the illumination may be different depending on the location when the image is acquired, and in this case, the prediction performance can be improved by using the reference block by correcting it through a mapping function, illumination offset, or filtering.
  • parameters of the mapping function, illumination offset, or filter can be derived from the image encoding device and transmitted to the image decoding device.
  • an index specifying one or more parameters from a table defining a plurality of pre-defined parameters may be encoded in the image encoding device and transmitted to the image decoding device.
  • parameters can be derived based on the correlation between the pre-reconstructed sample(s) around the current block and the pre-reconstructed sample(s) around the reference block. This correlation will be examined in more detail with reference to FIGS. 12 to 14.
  • Figure 11 illustrates a parameter-based prediction method in inter mode.
  • Inter mode is a mode that derives a prediction block of a current block based on a reference block at a position that is moved by a motion vector (MV) from a block at the same position as the current block within a reference picture, as illustrated in Fig. 11.
  • MV motion vector
  • an interpolation filter can be applied to samples at integer positions within the reference block to derive a prediction block.
  • the interpolation filter can be determined based on a position according to the accuracy of the MV.
  • a reference block with the smallest error is selected, but errors due to illumination changes between pictures may still remain. Therefore, by additionally performing illumination compensation on a prediction block derived through interpolation, prediction performance can be improved.
  • mapping function For the above lighting compensation, a mapping function, an offset, a filter, etc. may be used.
  • the parameters of the mapping function, the offset, or the filter are calculated in the image encoding device and can be transmitted to the image decoding device.
  • an index specifying one or more parameters from a table defining a plurality of pre-defined parameters may be encoded in the image encoding device and transmitted to the image decoding device.
  • parameters can be derived based on the correlation between the pre-reconstructed sample(s) around the current block and the pre-reconstructed sample(s) around the reference block. This correlation will be examined in more detail with reference to FIGS. 12 to 14.
  • FIG. 12 is an example according to the present disclosure, illustrating a relationship between two different areas.
  • the correlation between the pre-restored sample(s) around the current block and the pre-restored sample(s) around the reference block can be expressed as a two-dimensional dot graph as shown in Fig. 12, and this can be approximated by a linear straight line.
  • a set of pre-reconstructed samples around a current block is called a current template
  • a set of pre-reconstructed samples around a reference block is called a reference template.
  • a dot graph can be derived using sample values belonging to each of the current template and the reference template.
  • the relationship between the current template and the reference template can be expressed as a linear line as in Fig. 12.
  • the first component can mean the reference template
  • the second component can mean the current template.
  • a linear mapping function can be derived to express the association using the sample values of the current and reference templates.
  • the linear mapping function can be expressed by parameters such as a slope and an intercept, and the slope and intercept can be derived using the sample values of the two templates.
  • At least one of the slope or intercept of the linear mapping function can be derived via ordinary regression analysis.
  • parameters can be derived based on the minimum value of the first component and the corresponding sample value of the second component, and the maximum value of the first component and the corresponding sample value of the second component.
  • the parameters may be derived based on the average of relatively small sample values of the first component and the corresponding average of sample values of the second component, and the average of relatively large sample values of the first component and the corresponding average of sample values of the second component.
  • FIG. 13 is an example according to the present disclosure, illustrating multiple associations for two different areas.
  • the correlation between the pre-restored sample(s) around the current block and the pre-restored sample(s) around the reference block can be expressed as a two-dimensional dot graph as shown in Fig. 13, and can be classified into multiple groups based on the characteristics of the samples.
  • mapping function e.g., offset, or filter that represents a separate association for each group may be used.
  • the K-mean algorithm can be used to classify the above samples.
  • the samples can be classified into two groups based on the average value of the first component. For example, samples smaller than the average value of the first component can be classified into the first group, and samples larger than or equal to the average value of the first component can be classified into the second group.
  • the samples can be classified into two groups based on the average value of the second component.
  • the samples can be classified into two groups based on the weighted average value of the first component or the second component.
  • Parameters can be derived for each group using a linear regression algorithm, and predictions can be made based on the parameters.
  • FIG. 14 is an example according to the present disclosure, showing nonlinear correlations for two different domains.
  • the correlation between the pre-restored sample(s) around the current block and the pre-restored sample(s) around the reference block can be expressed as a two-dimensional dot graph as shown in Fig. 14, and this can be approximated as a curve.
  • the above curve can be expressed as a polynomial with the term "Cf(x)" added to the existing linear function.
  • parameters can be derived through polynomial regression analysis, and prediction can be performed based on the parameters.
  • C is a parameter derived through polynomial regression analysis
  • f(x) can be a predefined function according to x.
  • f(x) could be a function that squares x.
  • f(x) can be a function that squares x and divides it by the maximum value of the current bit depth.
  • f(x) may mean a new value derived based on the value of x and the surrounding sample(s). For example, it may mean the first derivative in the horizontal direction. That is, since the curve changes according to the first derivative in the horizontal direction, it may be approximated by various curves, and adaptively mapped according to the texture of the image.
  • f(x) may mean the first derivative in the vertical direction.
  • f(x) may mean the first derivative in the diagonal direction.
  • f(x) may mean the sum of the first derivatives in the horizontal and vertical directions.
  • f(x) may mean activity such as the sum of the first derivatives in the horizontal, vertical, and diagonal directions.
  • the derivative may use a method such as the Sobel operation or the difference.
  • f(x) may mean directionality derived based on the first derivatives in the horizontal and vertical directions.
  • f(x) can mean the sum of directionality and activity derived based on the various differential values mentioned above.
  • various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof.
  • the embodiments may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.
  • ASICs Application Specific Integrated Circuits
  • DSPs Digital Signal Processors
  • DSPDs Digital Signal Processing Devices
  • PLDs Programmable Logic Devices
  • FPGAs Field Programmable Gate Arrays
  • general processors controllers, microcontrollers, microprocessors, etc.
  • the scope of the present disclosure includes software or machine-executable instructions (e.g., an operating system, an application, firmware, a program, etc.) that cause operations according to the methods of various embodiments to be executed on a device or a computer, and a non-transitory computer-readable medium having such software or instructions stored thereon and being executable on the device or the computer.
  • software or machine-executable instructions e.g., an operating system, an application, firmware, a program, etc.

Landscapes

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

Abstract

An image decoding method and apparatus according to the present disclosure may generate at least two prediction blocks for a current block, and generate a final prediction block of the current block by blending the at least two prediction blocks on the basis of a prescribed mask.

Description

비디오 신호 처리 방법 및 장치Video signal processing method and device

본 발명은 비디오 신호 처리 방법 및 장치에 관한 것으로, 보다 상세하게는, 비디오 부호화 및 복호화 방법 및 장치에 관한 것이다.The present invention relates to a video signal processing method and device, and more specifically, to a video encoding and decoding method and device.

고해상도 비디오에 대한 시장의 수요가 증가하고 있으며, 이에 따라 고해상도 영상을 효율적으로 압축할 수 있는 기술이 필요하다. 이러한 시장의 요구에 따라 ISO/IEC의 MPEG (Moving Picture Expert Group)과 ITU-T의 VCEG (Video Coding Expert Group)이 공동으로 JCT-VC (Joint Collaborative Team on Video Coding)를 결성하여, HEVC (High Efficiency Video Coding) 비디오 압축 표준을 2013년 1월에 개발을 완료했으며, 차세대 압축 표준에 대한 연구 및 개발을 활발히 진행해오고 있다.The market demand for high-resolution video is increasing, and technology that can efficiently compress high-resolution images is required. In response to this market demand, the ISO/IEC's MPEG (Moving Picture Expert Group) and the ITU-T's VCEG (Video Coding Expert Group) jointly formed the JCT-VC (Joint Collaborative Team on Video Coding), completed the development of the HEVC (High Efficiency Video Coding) video compression standard in January 2013, and are actively conducting research and development on next-generation compression standards.

동영상 압축은 크게 화면 내 예측 (또는 인트라 예측), 화면 간 예측(또는 인터 예측), 변환, 양자화, 엔트로피(Entropy coding) 부호화, 인루프 필터(In-loop filter)로 구성된다. 한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 컨텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.Video compression is largely composed of intra-prediction, inter-prediction, transformation, quantization, entropy coding, and in-loop filtering. Meanwhile, as the demand for high-resolution images increases, the demand for stereoscopic image content as a new image service is also increasing. Discussions are underway on video compression technology to effectively provide high-resolution and ultra-high-resolution stereoscopic image content.

본 발명은 비디오 신호 처리 방법 및 장치를 제공하는데 목적이 있다.The purpose of the present invention is to provide a method and device for processing a video signal.

본 개시에 따른 영상 복호화 방법 및 장치는, 현재 블록에 대해 적어도 둘의 예측 블록들을 생성하고, 소정의 마스크를 기반으로 상기 적어도 둘의 예측 블록들을 가중합하여 상기 현재 블록의 최종 예측 블록을 생성할 수 있다. 여기서, 상기 적어도 둘의 예측 블록들 각각은 단방향 또는 양방향 예측 블록이고, 상기 양방향 예측 블록은, L0 예측 블록과 L1 예측 블록의 가중합에 기반하여 생성될 수 있다.The video decoding method and device according to the present disclosure can generate at least two prediction blocks for a current block, and generate a final prediction block of the current block by weighting the at least two prediction blocks based on a predetermined mask. Here, each of the at least two prediction blocks is a unidirectional or bidirectional prediction block, and the bidirectional prediction block can be generated based on a weighted sum of an L0 prediction block and an L1 prediction block.

본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 마스크는, 기하학적 분할 정보에 기초하여 결정될 수 있다.In the image decoding method and device according to the present disclosure, the mask can be determined based on geometric segmentation information.

본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 기하학적 분할 정보는, 영상 복호화 장치에 기-정의된 복수의 마스크 후보들 중 어느 하나를 특정할 수 있다.In the image decoding method and device according to the present disclosure, the geometric segmentation information can specify any one of a plurality of mask candidates pre-defined in the image decoding device.

본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 기하학적 분할 정보는, 반전된 마스크의 사용 여부를 나타내는 플래그를 포함할 수 있다.In the image decoding method and device according to the present disclosure, the geometric segmentation information may include a flag indicating whether an inverted mask is used.

본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 마스크는, 상기 적어도 둘의 예측 블록들 간 차분 블록을 기반으로 생성될 수 있다.In the image decoding method and device according to the present disclosure, the mask can be generated based on a differential block between the at least two prediction blocks.

본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 마스크는, 상기 적어도 둘의 예측 블록들 간의 비율 블록을 기반으로 생성될 수 있다. 여기서, 상기 비율 블록은 상기 적어도 둘의 예측 블록들 중 어느 하나에 속한 샘플 값을 다른 하나에 속한 동일 위치의 샘플 값으로 나누어서 유도될 수 있다.In the image decoding method and device according to the present disclosure, the mask may be generated based on a ratio block between the at least two prediction blocks. Here, the ratio block may be derived by dividing a sample value belonging to one of the at least two prediction blocks by a sample value at the same position belonging to the other one.

본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 적어도 둘의 예측 블록들 각각은, 인터 모드, 인트라 모드, 또는 인트라 블록 카피 모드 중 어느 하나를 기반으로 생성될 수 있다.In the video decoding method and device according to the present disclosure, each of the at least two prediction blocks can be generated based on any one of an inter mode, an intra mode, or an intra block copy mode.

본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 가중합을 위한 가중치는, 인트라 모드가 적용된 주변 블록들의 비율 또는 현재 블록이 속한 현재 픽쳐와 참조 픽쳐 간의 POC 차이 중 적어도 하나에 기반하여 결정될 수 있다.In the video decoding method and device according to the present disclosure, the weight for the weighted sum can be determined based on at least one of the ratio of surrounding blocks to which the intra mode is applied or the POC difference between the current picture to which the current block belongs and the reference picture.

본 개시에 따른 영상 부호화 방법 및 장치는, 현재 블록에 대해 적어도 둘의 예측 블록들을 생성하고, 소정의 마스크를 기반으로 상기 적어도 둘의 예측 블록들을 가중합하여 상기 현재 블록의 최종 예측 블록을 생성할 수 있다. 여기서, 상기 적어도 둘의 예측 블록들 각각은 단방향 또는 양방향 예측 블록이고, 상기 양방향 예측 블록은, L0 예측 블록과 L1 예측 블록의 가중합에 기반하여 생성될 수 있다.The video encoding method and device according to the present disclosure can generate at least two prediction blocks for a current block, and generate a final prediction block of the current block by weighting and combining the at least two prediction blocks based on a predetermined mask. Here, each of the at least two prediction blocks is a unidirectional or bidirectional prediction block, and the bidirectional prediction block can be generated based on a weighted sum of an L0 prediction block and an L1 prediction block.

본 개시에 따른 메시 복호화 방법을 수행하도록 야기하는 비디오/영상 정보가 저장된 컴퓨터 판독 가능한 디지털 저장 매체가 제공된다.A computer-readable digital storage medium is provided having stored thereon video/image information causing a method of decrypting a message according to the present disclosure to be performed.

본 개시에 따른 메시 부호화 방법에 따라 생성된 비디오/영상 정보가 저장된 컴퓨터 판독 가능한 디지털 저장 매체가 제공된다.A computer-readable digital storage medium storing video/image information generated by a method for encoding a message according to the present disclosure is provided.

본 개시에 따른 메시 부호화 방법에 따라 생성된 비디오/영상 정보를 전송하는 방법 및 장치가 제공된다.A method and device for transmitting video/image information generated by a mesh encoding method according to the present disclosure are provided.

본 개시에 따르면 현재 블록의 텍스쳐에 적응적인 마스크를 사용함으로써, 최종 예측 블록의 예측 성능을 향상시킬 수 있다.According to the present disclosure, the prediction performance of a final prediction block can be improved by using an adaptive mask on the texture of a current block.

본 개시에 따르면 현재 템플릿과 참조 템플릿 간의 연관성에 기반한 파라미터를 이용함으로써, 예측 성능을 향상시킬 수 있다.According to the present disclosure, prediction performance can be improved by utilizing parameters based on the correlation between a current template and a reference template.

도 1은 본 발명에 따른 영상 부호화 장치를 나타낸 블록도이다.Figure 1 is a block diagram showing an image encoding device according to the present invention.

도 2는 본 발명에 따른 영상 복호화 장치를 나타낸 블록도이다.Figure 2 is a block diagram showing an image decoding device according to the present invention.

도 3은 본 개시에 따른 일실시예로서, 영상 부호화/복호화 장치에 의해 수행되는 예측 방법을 도시한 것이다.FIG. 3 illustrates a prediction method performed by an image encoding/decoding device as an embodiment according to the present disclosure.

도 4는 본 개시에 따른 일실시예로서, 복수의 예측 블록에 대한 마스크 기반의 블렌딩 방법을 도시한 것이다.FIG. 4 illustrates a mask-based blending method for multiple prediction blocks as an embodiment according to the present disclosure.

도 5 내지 도 7은 본 개시에 따른 마스크 생성 방법을 도시한 것이다.Figures 5 to 7 illustrate a mask generating method according to the present disclosure.

도 8은 본 개시에 따른 일실시예로서, 파라미터 기반의 예측 방법을 도시한 것이다.FIG. 8 illustrates a parameter-based prediction method as an example according to the present disclosure.

도 9는 본 개시에 따른 일실시예로서, 인트라 예측의 색상 간 예측에서 파라미터 기반의 예측 방법을 도시한 것이다.FIG. 9 illustrates a parameter-based prediction method in color inter-prediction of intra prediction as an embodiment according to the present disclosure.

도 10은 본 개시에 따른 일실시예로서, 인트라 블록 카피(IBC) 모드에서 파라미터 기반의 예측 방법을 도시한 것이다.FIG. 10 illustrates a parameter-based prediction method in intra block copy (IBC) mode as an embodiment according to the present disclosure.

도 11은 인터 예측 모드에서 파라미터 기반의 예측 방법을 도시한 것이다.Figure 11 illustrates a parameter-based prediction method in inter prediction mode.

도 12는 본 개시에 따른 일실시예로서, 서로 다른 두 영역 간의 연관성을 도시한 것이다.FIG. 12 is an example according to the present disclosure, illustrating a relationship between two different areas.

도 13은 본 개시에 따른 일실시예로서, 서로 다른 두 영역에 대한 복수의 연관성을 도시한 것이다.FIG. 13 is an example according to the present disclosure, illustrating multiple associations for two different areas.

도 14는 본 개시에 따른 일실시예로서, 서로 다른 두 영역에 대한 비선형 연관성을 도시한 것이다.FIG. 14 is an example according to the present disclosure, showing nonlinear correlations for two different domains.

본 명세서에 첨부된 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings attached to this specification so that those skilled in the art can easily practice the present invention. However, the present invention may be implemented in various different forms and is not limited to the embodiments described herein. In addition, in order to clearly describe the present invention in the drawings, parts that are not related to the description are omitted, and similar parts are assigned similar drawing reference numerals throughout the specification.

본 명세서 전체에서, 어떤 부분이 다른 부분과 '연결'되어 있다고 할 때, 이는 직접적으로 연결되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 전기적으로 연결되어 있는 경우도 포함한다.Throughout this specification, when a part is said to be 'connected' to another part, this includes not only cases where they are directly connected, but also cases where they are electrically connected with another element in between.

또한, 본 명세서 전체에서 어떤 부분이 어떤 구성요소를 '포함'한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것을 의미한다.Additionally, whenever it is said throughout this specification that a part "includes" a component, this does not exclude other components, unless otherwise specifically stated, but rather means that other components may be included.

또한, 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Additionally, while the terms first, second, etc. may be used to describe various components, the components should not be limited by the terms. The terms are used only to distinguish one component from another.

또한, 본 명세서에서 설명되는 장치 및 방법에 관한 실시예에 있어서, 장치의 구성 일부 또는 방법의 단계 일부는 생략될 수 있다. 또한 장치의 구성 일부 또는 방법의 단계 일부의 순서가 변경될 수 있다. 또한 장치의 구성 일부 또는 방법의 단계 일부에 다른 구성 또는 다른 단계가 삽입될 수 있다.In addition, in the embodiments of the device and method described herein, some of the components of the device or some of the steps of the method may be omitted. Also, the order of some of the components of the device or some of the steps of the method may be changed. Also, other components or other steps may be inserted into some of the components of the device or some of the steps of the method.

또한, 본 발명의 제1 실시예의 일부 구성 또는 일부 단계는 본 발명의 제2 실시예에 부가되거나, 제2 실시예의 일부 구성 또는 일부 단계를 대체할 수 있다.Additionally, some components or some steps of the first embodiment of the present invention may be added to the second embodiment of the present invention, or some components or some steps of the second embodiment may be replaced.

덧붙여, 본 발명의 실시예에 나타나는 구성부들은 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시되는 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 기술되고, 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수 개의 구성부로 나뉘어져 기능을 수행할 수 있다. 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리 범위에 포함된다.In addition, the components shown in the embodiments of the present invention are independently depicted to represent different characteristic functions, and do not mean that each component is formed as a separate hardware or software configuration unit. That is, each component is described by listing each component for convenience of explanation, and at least two components among each component may be combined to form a single component, or one component may be divided into multiple components to perform a function. Such integrated embodiments and separate embodiments of each component are also included in the scope of the rights of the present invention as long as they do not deviate from the essence of the present invention.

먼저, 본 출원에서 사용되는 용어를 간략히 설명하면 다음과 같다.First, the terms used in this application are briefly explained as follows.

이하에서 후술할 복호화 장치(Video Decoding Apparatus)는 민간 보안 카메라, 민간 보안 시스템, 군용 보안 카메라, 군용 보안 시스템, 개인용 컴퓨터(PC, Personal Computer), 노트북 컴퓨터, 휴대형 멀티미디어 플레이어(PMP, Portable MultimediaPlayer), 무선 통신 단말기(Wireless Communication Terminal), 스마트 폰(Smart Phone), TV 응용 서버와 서비스 서버 등 서버 단말기에 포함된 장치일 수 있으며, 각종 기기 등과 같은 사용자 단말기, 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 복호화하거나 복호화를 위해 인터 또는 인트라 예측하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리, 프로그램을 실행하여 연산 및 제어하기 위한 마이크로프로세서 등을 구비하는 다양한 장치를 의미할 수 있다.The video decoding apparatus described below may be a device included in a server terminal such as a civilian security camera, a civilian security system, a military security camera, a military security system, a personal computer (PC), a laptop computer, a portable multimedia player (PMP), a wireless communication terminal, a smart phone, a TV application server and a service server, and may refer to various devices including user terminals such as various devices, communication devices such as a communication modem for communicating with a wired or wireless communication network, a memory for storing various programs and data for decoding a video or for inter- or intra-predicting for decoding, and a microprocessor for executing a program and performing calculations and controls.

또한, 영상 부호화 장치에 의해 비트스트림(bitstream)으로 부호화된 영상은 실시간 또는 비실시간으로 인터넷, 근거리 무선 통신망, 무선랜망, 와이브로망, 이동통신망 등의 유무선 통신망 등을 통하거나 케이블, 범용 직렬 버스(USB, Universal Serial Bus)등과 같은 다양한 통신 인터페이스를 통해 영상 복호화 장치로 전송되어 복호화되어 영상으로 복원되고 재생될 수 있다. 또는 영상 부호화 장치에 의해 생성된 비트스트림은 메모리에 저장될 수 있다. 상기 메모리는 휘발성 메모리와 비휘발성 메모리를 모두 포함할 수 있다. 본 명세서에서 메모리는 비트스트림을 저장한 기록 매체로 표현될 수 있다.In addition, an image encoded into a bitstream by an image encoding device may be transmitted to an image decoding device through wired or wireless communication networks such as the Internet, a local area network, a wireless LAN, a WiBro network, a mobile communication network, etc. in real time or non-real time, or through various communication interfaces such as a cable, a universal serial bus (USB), etc., and may be decoded, restored into an image, and played back. Alternatively, the bitstream generated by the image encoding device may be stored in memory. The memory may include both volatile memory and non-volatile memory. In this specification, the memory may be expressed as a recording medium storing a bitstream.

통상적으로 동영상은 일련의 픽쳐(Picture)들로 구성될 수 있으며, 각 픽쳐들은 블록(Block)과 같은 코딩 유닛(coding unit)으로 분할될 수 있다. 또한, 이하에 기재된 픽쳐라는 용어는 영상(Image), 프레임(Frame) 등과 같은 동등한 의미를 갖는 다른 용어로 대치되어 사용될 수 있음을 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 이해할 수 있을 것이다. 그리고 코딩 유닛이라는 용어는 단위 블록, 블록 등과 같은 동등한 의미를 갖는 다른 용어로 대치되어 사용될 수 있음을 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 이해할 수 있을 것이다.Typically, a video may be composed of a series of pictures, and each picture may be divided into coding units such as blocks. In addition, those skilled in the art to which this embodiment pertains will understand that the term picture described below may be replaced with other terms having equivalent meanings, such as image, frame, etc. In addition, those skilled in the art to which this embodiment pertains will understand that the term coding unit may be replaced with other terms having equivalent meanings, such as unit block, block, etc.

이하, 첨부한 도면들을 참조하여, 본 발명의 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, with reference to the attached drawings, embodiments of the present invention will be described in more detail. In describing the present invention, duplicate descriptions of identical components will be omitted.

도 1은 본 발명에 따른 영상 부호화 장치를 나타낸 블록도이다. Figure 1 is a block diagram showing an image encoding device according to the present invention.

도 1을 참조하면, 종래 영상 부호화 장치(100)는 픽쳐 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.Referring to FIG. 1, a conventional image encoding device (100) may include a picture segmentation unit (110), a prediction unit (120, 125), a transformation unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse transformation unit (145), a filter unit (150), and a memory (155).

픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.The picture splitting unit (110) can split the input picture into at least one processing unit. At this time, the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). Hereinafter, in the embodiment of the present invention, the coding unit may be used to mean a unit that performs encoding, or may be used to mean a unit that performs decoding.

예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다. 부호화 단위를 기초로 인트라 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위 NxN 으로 분할하지 않고 인트라 예측을 수행할 수 있다.A prediction unit may be divided into at least one square or rectangular shape of the same size within one coding unit, or may be divided such that one prediction unit among the prediction units divided within one coding unit has a different shape and/or size from another prediction unit. When generating a prediction unit that performs intra prediction based on a coding unit, if it is not the minimum coding unit, intra prediction can be performed without being divided into a plurality of NxN prediction units.

예측부(120, 125)는 인터 예측 또는 화면 간 예측을 수행하는 인터 예측부(120)와 인트라 예측 또는 화면 내 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 움직임 벡터, 참조 픽쳐 등)를 결정할 수 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 움직임 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 영상 복호화 장치에 전달될 수 있다.The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction or inter-screen prediction, and an intra prediction unit (125) that performs intra prediction or intra-screen prediction. It may be determined whether to use inter prediction or intra prediction for a prediction unit, and specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. A residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130). In addition, prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value by an entropy encoding unit (165) and transmitted to an image decoding device.

인터 예측부(120)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽쳐 보간부, 움직임 예측부, 움직임 보상부를 포함할 수 있다.The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of a part of an encoded region within the current picture. The inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

참조 픽쳐 보간부에서는 메모리(155)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.The reference picture interpolation unit can receive reference picture information from the memory (155) and generate pixel information below an integer pixel from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients can be used to generate pixel information below an integer pixel in units of 1/4 pixels. In the case of a chrominance signal, a DCT-based 4-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients can be used to generate pixel information below an integer pixel in units of 1/8 pixels.

움직임 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 움직임 예측을 수행할 수 있다. 움직임 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 움직임 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 움직임 벡터값을 가질 수 있다. 움직임 예측부에서는 움직임 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 움직임 예측 방법으로 스킵 모드(Skip Mode), 병합 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피(Intra Block Copy) 모드, 어파인 모드(Affine mode) 등 다양한 방법이 사용될 수 있다. The motion prediction unit can perform motion prediction based on a reference picture interpolated by a reference picture interpolation unit. Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used to derive a motion vector. The motion vector can have a motion vector value of 1/2 or 1/4 pixel unit based on the interpolated pixel. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various methods such as Skip Mode, Merge Mode, AMVP Mode, Intra Block Copy Mode, and Affine Mode can be used as the motion prediction method.

인트라 예측부(125)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra prediction unit (125) can generate a prediction unit based on reference pixel information surrounding the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block on which inter prediction is performed and the reference pixel is a pixel on which inter prediction is performed, the reference pixel included in the block on which inter prediction is performed can be used as a replacement for the reference pixel information of the surrounding block on which intra prediction is performed. That is, if the reference pixel is not available, the unavailable reference pixel information can be used as a replacement for at least one reference pixel among the available reference pixels.

또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다. In addition, a residual block including residual value information, which is a difference value between the prediction unit that performed the prediction and the original block of the prediction unit based on the prediction unit generated in the prediction unit (120, 125), can be generated. The generated residual block can be input to the transformation unit (130).

변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지, DST를 적용할지 또는 KLT를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다. In the transformation unit (130), the residual block including the residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra prediction mode information of the prediction unit used to generate the residual block.

양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.The quantization unit (135) can quantize the values converted to the frequency domain in the transformation unit (130). The quantization coefficients can vary depending on the block or the importance of the image. The values produced by the quantization unit (135) can be provided to the dequantization unit (140) and the reordering unit (160).

재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.The rearrangement unit (160) can perform rearrangement of coefficient values for quantized residual values.

재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.The rearrangement unit (160) can change a two-dimensional block-shaped coefficient into a one-dimensional vector shape by using a coefficient scanning method. For example, the rearrangement unit (160) can change the two-dimensional block-shaped coefficient into a one-dimensional vector shape by scanning from the DC coefficient to the coefficient of the high-frequency region by using a zig-zag scan method. Depending on the size of the transformation unit and the intra prediction mode, a vertical scan that scans the two-dimensional block-shaped coefficient in the column direction or a horizontal scan that scans the two-dimensional block-shaped coefficient in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, it is possible to determine which scan method among the zig-zag scan, the vertical scan, and the horizontal scan is to be used.

엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행하여 비트스트림을 생성할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다. 관련하여, 엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보를 부호화 할 수 있다. 또한, 본 발명에 따라 움직임 정보를 디코더 측면에서 유도하여 사용함을 지시하는 정보 및 움직임 정보 유도에 사용된 기법에 대한 정보를 시그널링(signaling)하여 전송하는 것이 가능하다. The entropy encoding unit (165) can perform entropy encoding based on the values produced by the rearrangement unit (160) to generate a bitstream. The entropy encoding can use various encoding methods such as, for example, Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding). In this regard, the entropy encoding unit (165) can encode residual value coefficient information of an encoding unit from the rearrangement unit (160) and the prediction unit (120, 125). In addition, according to the present invention, it is possible to signal and transmit information indicating that motion information is derived and used on the decoder side and information on a technique used to derive motion information.

역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. In the inverse quantization unit (140) and the inverse transformation unit (145), the values quantized in the quantization unit (135) are inversely quantized and the values transformed in the transformation unit (130) are inversely transformed. The residual values generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted prediction units through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.

필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다. 디블록킹 필터는 복원된 픽쳐에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다. ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. The filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter). The deblocking filter may remove block distortion caused by boundaries between blocks in a restored picture. The offset correction unit may correct an offset from an original image on a pixel basis for an image on which deblocking has been performed. In order to perform offset correction for a specific picture, a method may be used in which pixels included in the image are divided into a certain number of regions, and then regions to be offset-performed are determined and offsets are applied to the regions, or a method may be used in which an offset is applied by considering edge information of each pixel. ALF (Adaptive Loop Filtering) may be performed based on a value obtained by comparing a filtered restored image with an original image. After dividing pixels included in the image into a predetermined group, one filter to be applied to the group may be determined, and filtering may be performed differentially for each group.

메모리(155)는 필터부(150)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 인터 예측을 수행 시 예측부(120, 125)에 제공될 수 있다.The memory (155) can store a restored block or picture produced through the filter unit (150), and the stored restored block or picture can be provided to the prediction unit (120, 125) when performing inter prediction.

도 2는 본 발명에 따른 영상 복호화 장치를 나타낸 블록도이다. Figure 2 is a block diagram showing an image decoding device according to the present invention.

도 2를 참조하면, 영상 영상 복호화 장치(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)가 포함될 수 있다.Referring to FIG. 2, the video image decoding device (200) may include an entropy decoding unit (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).

영상 영상 부호화 장치에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 영상 부호화 장치와 반대의 절차로 복호화될 수 있다.When a video bitstream is input into a video encoding device, the input bitstream can be decoded in the opposite procedure to that of the video encoding device.

엔트로피 복호화부(210)는 영상 영상 부호화 장치의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 영상 부호화 장치에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. The entropy decoding unit (210) can perform entropy decoding in a procedure opposite to that of performing entropy encoding in the entropy encoding unit of the video image encoding device. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in response to the method performed in the video image encoding device.

엔트로피 복호화부(210)에서는 영상 부호화 장치에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.The entropy decoding unit (210) can decode information related to intra prediction and inter prediction performed in the image encoding device.

재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. The reordering unit (215) can perform reordering based on the method in which the bitstream that has been entropy decoded by the entropy decoding unit (210) is reordered by the encoding unit. The coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them back to coefficients in the form of a two-dimensional block.

역양자화부(220)는 영상 부호화 장치에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit (220) can perform inverse quantization based on the quantization parameters provided from the image encoding device and the coefficient values of the rearranged block.

역변환부(225)는 영상 영상 부호화 장치에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT, DST, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 영상 부호화 장치에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 영상 복호화 장치의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.The inverse transform unit (225) can perform inverse transform, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms performed by the transform unit, i.e., DCT, DST, and KLT, on the quantization result performed by the image image encoding device. The inverse transform can be performed based on the transmission unit determined by the image image encoding device. In the inverse transform unit (225) of the image image decoding device, a transform technique (e.g., DCT, DST, KLT) can be selectively performed according to a plurality of pieces of information, such as a prediction method, a size of a current block, and a prediction direction.

예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다. The prediction unit (230, 235) can generate a prediction block based on prediction block generation related information provided from the entropy decoding unit (210) and previously decoded block or picture information provided from the memory (245).

전술한 바와 같이 영상 영상 부호화 장치에서의 동작과 동일하게 인트라 예측 또는 화면 내 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수도 있다.As described above, when performing intra prediction or intra-screen prediction in the same manner as the operation in a video image encoding device, if the size of a prediction unit and the size of a transformation unit are the same, intra prediction for the prediction unit is performed based on the pixels on the left side of the prediction unit, the pixels on the upper left side, and the pixels on the upper side. However, if the sizes of the prediction unit and the transformation unit are different when performing intra prediction, intra prediction can be performed using reference pixels based on the transformation unit. In addition, intra prediction using NxN division only for the minimum coding unit can be used.

예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 움직임 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 반면, 만약 영상 부호화 장치(100)에서 상기 인터 예측을 위한 움직임 예측 관련 정보를 전송하지 않고, 대신 움직임 정보를 디코더 측면에서 유도하여 사용함을 지시하는 정보 및 움직임 정보 유도에 사용된 기법에 대한 정보를 전송하는 경우에는, 상기 예측 단위 판별부는 영상 부호화 장치(100)로부터 전송된 정보를 기초로 하여, 인터 예측부(230)의 예측 수행을 판별하게 된다.The prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit. The prediction unit determination unit may receive 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, and may distinguish a prediction unit from a current encoding unit and determine whether the prediction unit performs inter prediction or intra prediction. On the other hand, if the video encoding device (100) does not transmit motion prediction-related information for the inter prediction, but instead transmits information instructing that motion information be derived and used on the decoder side and information on a technique used to derive motion information, the prediction unit determination unit determines whether the inter prediction unit (230) performs prediction based on the information transmitted from the video encoding device (100).

인터 예측부(230)는 영상 영상 부호화 장치에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 인터 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 움직임 예측 방법이 스킵 모드(Skip Mode), 병합 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피 모드(Intra block copy mode), 어파인 모드(Affine mode) 중 어떠한 방법인지 여부를 판단할 수 있다. The inter prediction unit (230) can perform inter prediction on the current prediction unit based on information included in at least one picture among the previous picture or the subsequent picture of the current picture including the current prediction unit, using information required for inter prediction of the current prediction unit provided by the video image encoding device. In order to perform inter prediction, it can be determined based on the encoding unit whether the motion prediction method of the prediction unit included in the corresponding encoding unit is one of Skip Mode, Merge Mode, AMVP Mode, Intra block copy mode, and Affine mode.

인트라 예측부(235)는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 영상 영상 부호화 장치에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로 인트라 예측을 수행할 수 있다. The intra prediction unit (235) can generate a prediction block based on pixel information in the current picture. If the prediction unit is a prediction unit that has performed intra prediction, intra prediction can be performed based on intra prediction mode information of the prediction unit provided by the video image encoding device.

인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 영상 부호화 장치에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit (235) may include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a unit that performs filtering on the reference pixels of the current block and may determine whether to apply the filter according to the prediction mode of the current prediction unit and apply it. The AIS filter may be performed on the reference pixels of the current block using the prediction mode and AIS filter information of the prediction unit provided by the video image encoding device. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.

참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.The reference pixel interpolation unit can interpolate the reference pixel to generate a reference pixel of a pixel unit less than an integer value when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value interpolated by the reference pixel. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.

복원된 블록 또는 픽쳐는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The restored block or picture may be provided to a filter unit (240). The filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.

영상 영상 부호화 장치로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 영상 복호화 장치의 디블록킹 필터에서는 영상 영상 부호화 장치에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 영상 복호화 장치에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. Information on whether a deblocking filter has been applied to a corresponding block or picture from a video encoding device and, if a deblocking filter has been applied, information on whether a strong filter or a weak filter has been applied can be provided. A deblocking filter of a video decoding device can receive information related to a deblocking filter provided from a video encoding device and perform deblocking filtering on a corresponding block in a video decoding device.

오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다. ALF는 영상 부호화 장치로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.The offset correction unit can perform offset correction on the restored image based on the type of offset correction applied to the image during encoding, information on the offset value, etc. ALF can be applied to the encoding unit based on information on whether ALF is applied, ALF coefficient information, etc. provided from the image encoding device. Such ALF information can be provided by being included in a specific parameter set.

메모리(245)는 복원된 픽쳐 또는 블록을 저장하여 참조 픽쳐 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽쳐를 출력부로 제공할 수 있다.The memory (245) can store a restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to an output unit.

도 3은 본 개시에 따른 일실시예로서, 영상 부호화/복호화 장치에 의해 수행되는 예측 방법을 도시한 것이다.FIG. 3 illustrates a prediction method performed by an image encoding/decoding device as an embodiment according to the present disclosure.

도 3을 참조하면, 현재 블록에 대해 적어도 둘의 예측 블록을 생성할 수 있다(S300).Referring to FIG. 3, at least two prediction blocks can be generated for the current block (S300).

현재 블록에 대해서 적어도 둘의 예측 블록이 생성될 수 있다. 일예로, 현재 블록은 적어도 둘의 파티션으로 분할될 수 있다. 상기 적어도 둘의 파티션 각각에 대해서, 해당 파티션의 참조 픽쳐로부터 예측 블록이 생성될 수 있다. 상기 분할은 기하학적 분할을 기반으로 수행될 수 있다. 본 개시에 따른 기하학적 분할 기반의 예측은, 영상 부호화/복호화 장치에 기-정의된 인터 모드 중 어느 하나일 수 있다. 여기서, 예측 블록은, 단방향 예측 블록일 수도 있고, 양방향 예측 블록일 수도 있다. 단방향 예측 블록은, L0 또는 L1 방향의 예측 블록을 의미할 수 있다. 양방향 예측 블록은 L0 및 L1 예측 블록의 가중합을 통해 생성된 것일 수 있다. 이를 통해, 현재 블록에 대해서 적어도 둘의 예측 블록이 생성될 수 있다.At least two prediction blocks can be generated for a current block. For example, the current block can be divided into at least two partitions. For each of the at least two partitions, a prediction block can be generated from a reference picture of the corresponding partition. The division can be performed based on geometric division. The prediction based on geometric division according to the present disclosure can be any one of the inter modes pre-defined in the image encoding/decoding apparatus. Here, the prediction block can be a unidirectional prediction block or a bidirectional prediction block. The unidirectional prediction block can mean a prediction block in the L0 or L1 direction. The bidirectional prediction block can be generated through a weighted sum of the L0 and L1 prediction blocks. Through this, at least two prediction blocks can be generated for the current block.

도 3을 참조하면, 상기 적어도 둘의 예측 블록에 대하여 소정의 마스크를 기반으로 블렌딩을 수행하여 현재 블록의 최종 예측 블록을 생성할 수 있다(S310).Referring to FIG. 3, blending may be performed on at least two prediction blocks based on a predetermined mask to generate a final prediction block of the current block (S310).

상기 마스크는, 현재 블록과 동일한 크기를 가진 것으로서, 예측 블록 내 샘플 위치 별 가중치를 정의할 수 있다. 상기 마스크는, 상기 적어도 둘의 예측 블록 각각에 대해서 정의될 수 있다. 상기 마스크의 생성/결정 방법에 대해서는 도 4 내지 도 7을 참조하여 자세한 살펴보기로 한다.The above mask has the same size as the current block and can define weights for each sample location within the prediction block. The above mask can be defined for each of the at least two prediction blocks. The method of generating/determining the above mask will be described in detail with reference to FIGS. 4 to 7.

도 4는 본 개시에 따른 일실시예로서, 복수의 예측 블록에 대한 마스크 기반의 블렌딩 방법을 도시한 것이다.FIG. 4 illustrates a mask-based blending method for multiple prediction blocks as an embodiment according to the present disclosure.

현재 블록에 대한 적어도 둘의 예측 블록에 대하여, 소정의 마스크(mask)를 기반으로 블렌딩(blending)을 수행하여 현재 블록의 최종 예측 블록을 생성할 수 있다.For at least two prediction blocks for the current block, blending can be performed based on a predetermined mask to generate a final prediction block of the current block.

상기 마스크는, 기하학적 분할 정보에 기초하여 결정될 수 있다. 기하학적 분할 정보는 현재 블록을 적어도 둘의 파티션으로 분할하기 위한 하나 또는 그 이상의 분할선에 관련된 정보일 수 있다. 일예로, 기하학적 분할 정보는 분할선과 현재 블록의 중심과의 거리 또는 분할 직선과 직교하는 선분의 각도 중 적어도 하나를 포함할 수 있다. 상기 기하학적 분할 정보는 비트스트림을 통해 시그날링될 수 있다.The mask may be determined based on geometric segmentation information. The geometric segmentation information may be information related to one or more segmentation lines for dividing the current block into at least two partitions. For example, the geometric segmentation information may include at least one of a distance between the segmentation line and the center of the current block or an angle of a line segment orthogonal to the segmentation line. The geometric segmentation information may be signaled through a bitstream.

마스크의 가중치는 전술한 각도 또는 거리 중 적어도 하나를 기반으로 산출될 수 있다. 이때, 각도 및/또는 거리는 양자화되어 인덱스의 형태로 정의될 수 있다. 일예로, cos(), sin()과 같은 함수의 사용을 위하여 테이블을 기반으로 인덱스에 따른 기-정해진 값들이 사용될 수 있다.The weight of the mask can be calculated based on at least one of the angles or distances mentioned above. In this case, the angles and/or distances can be quantized and defined in the form of indices. For example, for the use of functions such as cos() and sin(), pre-determined values according to the indices can be used based on a table.

또는, 기하학적 분할 정보는 하나의 인덱스일 수 있다. 인덱스에 기초하여 영상 부호화/복호화 장치에 동일하게 기-정의된 마스크가 사용될 수 있다. 영상 부호화/복호화 장치는 복수의 마스크 후보를 정의할 수 있고, 상기 인덱스에 기초하여 복수의 마스크 후보 중 어느 하나가 선택적으로 사용될 수 있다. Alternatively, the geometric segmentation information may be an index. Based on the index, an identically pre-defined mask may be used in the image encoding/decoding device. The image encoding/decoding device may define a plurality of mask candidates, and any one of the plurality of mask candidates may be selectively used based on the index.

상기 기하학적 분할 정보는, 반전된 마스크의 사용 여부를 나타내는 플래그를 포함할 수 있다. 일예로, 상기 플래그가 제1 값인 경우, 이는 반전된 마스크가 사용됨을 나타낼 수 있다. 이 경우, 상기 인덱스에 의해 선택된 마스크를 반전하여 유도되는 마스크(즉, 반전된 마스크)가 사용될 수 있다. 반면, 상기 플래그가 제2 값인 경우, 이는 반전된 마스크가 사용되지 않음을 나타낼 수 있다. 이 경우, 상기 인덱스에 의해 선택된 마스크가 사용될 수 있다. 상기 플래그는, 현재 블록이 반전된 마스크를 사용하는지 여부에 대한 결정에 기초하여 비트스트림에 부호화될 수 있고, 부호화된 플래그는 비트스트림을 통해 영상 복호화 장치로 시그날링될 수 있다.The above geometric segmentation information may include a flag indicating whether an inverted mask is used. For example, if the flag is a first value, this may indicate that an inverted mask is used. In this case, a mask derived by inverting a mask selected by the index (i.e., an inverted mask) may be used. On the other hand, if the flag is a second value, this may indicate that an inverted mask is not used. In this case, a mask selected by the index may be used. The flag may be encoded in a bitstream based on a determination of whether a current block uses an inverted mask, and the encoded flag may be signaled to an image decoding device through the bitstream.

도 4를 참조하면, 원본 블록(Original)과 같이 블록 내부에 곡선의 에지(edge)가 존재할 수 있다. 이 경우, 최종 예측 블록(Predictor)의 블렌딩 영역에서 많은 오차가 발생할 수 있다. 따라서, 현재 블록의 텍스쳐에 적응적인 마스크를 사용함으로써, 최종 예측 블록의 예측 성능을 향상시킬 수 있다. 적응적인 마스크의 사용을 위해, 영상 부호화 장치에서 최적의 마스크를 결정/생성하고, 이를 특정하는 정보를 영상 복호화 장치로 전송함으로써, 영상 부호화/복호화 장치에서 동일한 마스크를 사용할 수 있다.Referring to Fig. 4, there may be a curved edge inside the block, such as the original block. In this case, a large amount of error may occur in the blending area of the final prediction block. Therefore, by using an adaptive mask for the texture of the current block, the prediction performance of the final prediction block can be improved. To use the adaptive mask, an optimal mask is determined/generated in an image encoding device, and information specifying this is transmitted to an image decoding device, so that the same mask can be used in the image encoding/decoding device.

또는, 적어도 둘의 예측 블록을 기반으로 마스크가 생성될 수 있다.Alternatively, the mask can be generated based on at least two prediction blocks.

일예로, 적어도 둘의 예측 블록 간 차분 블록을 기반으로 마스크가 생성될 수 있다. 이때, 차분 블록 내 차분 샘플 값(들)을 기반으로 블렌딩을 위한 적어도 둘의 가중치를 유도할 수 있다. 여기서, 적어도 둘의 가중치는 서로 다른 값이거나 서로 동일한 값일 수도 있다. 이를 위해, 차분 샘플 값 별로 이에 대응하는 가중치를 정의한 테이블이 이용될 수 있다. 즉, 상기 테이블로부터 차분 블록 내 차분 샘플 값에 대응하는 가중치가 유도될 수 있다. 여기서, 가중치는, 적어도 둘의 예측 블록에 적용되는 적어도 둘의 가중치를 포함할 수 있다. 또는, 상기 적어도 둘의 가중치는, 차분 샘플 값에 따른 매핑 함수를 기반으로 유도될 수도 있다. For example, a mask may be generated based on a differential block between at least two prediction blocks. At this time, at least two weights for blending may be derived based on the differential sample value(s) in the differential block. Here, the at least two weights may be different values or the same values. To this end, a table defining weights corresponding to each differential sample value may be used. That is, weights corresponding to differential sample values in the differential block may be derived from the table. Here, the weights may include at least two weights applied to at least two prediction blocks. Alternatively, the at least two weights may be derived based on a mapping function according to the differential sample values.

또는, 적어도 둘의 예측 블록 간의 비율 블록을 기반으로 마스크가 생성될 수 있다. Alternatively, the mask can be generated based on a ratio block between at least two prediction blocks.

비율 블록은, 적어도 둘의 예측 블록 중 어느 하나의 예측 블록 내 예측 샘플 값을 다른 하나의 예측 블록 내 동일 위치의 예측 샘플 값으로 나누어서 유도될 수 있다. 상기 비율 블록 내 샘플 값(들)을 기반으로 블렌딩을 위한 적어도 둘의 가중치를 유도할 수 있다.A ratio block can be derived by dividing a prediction sample value in one of at least two prediction blocks by a prediction sample value at the same location in the other prediction block. At least two weights for blending can be derived based on the sample value(s) in the ratio block.

도 5는 본 개시에 따른 마스크 생성 방법을 도시한 것이다.FIG. 5 illustrates a method for generating a mask according to the present disclosure.

현재 블록에 대한 최종 예측 블록을 생성하기 위하여 복수의 예측 블록을 사용할 수 있다. 이때, 각각의 예측 블록은 인터 모드, 인트라 모드, 또는 인트라 블록 카피(intra block copy, IBC) 모드 중 어느 하나를 기반으로 생성된 것일 수 있다. 일예로, 복수의 예측 블록은 동일한 예측 방법(즉, 인터 모드, 인트라 모드, 또는 인트라 블록 카피 모드 중 어느 하나)을 통해 생성될 수 있다. 또는, 복수의 예측 블록 중 어느 하나는 인터 모드를 기반으로 생성되고, 다른 하나는 인트라 모드 또는 인트라 블록 카피 모드 중 어느 하나를 기반으로 생성될 수 있다. 또는, 복수의 예측 블록 중 어느 하나는 인트라 모드를 기반으로 생성되고, 다른 하나는 인터 모드 또는 인트라 블록 카피 모드 중 어느 하나를 기반으로 생성될 수 있다.A plurality of prediction blocks may be used to generate a final prediction block for a current block. Each of the prediction blocks may be generated based on one of the inter mode, the intra mode, or the intra block copy (IBC) mode. For example, the plurality of prediction blocks may be generated through the same prediction method (i.e., one of the inter mode, the intra mode, or the intra block copy mode). Alternatively, one of the plurality of prediction blocks may be generated based on the inter mode, and the other may be generated based on one of the intra mode or the intra block copy mode. Alternatively, one of the plurality of prediction blocks may be generated based on the intra mode, and the other may be generated based on one of the inter mode or the intra block copy mode.

현재 블록에 대한 복수의 예측 블록을 가중합하여 최종 예측 블록을 생성할 수 있다.Multiple prediction blocks for the current block can be weighted to generate a final prediction block.

상기 가중합을 위한 가중치는, 현재 블록에 인접한 주변 블록들 중에서 인트라 모드가 적용된 주변 블록의 비율 또는 현재 블록이 속한 현재 픽쳐의 POC(picture order count)와 참조 픽쳐의 POC의 차이 중 적어도 하나에 기반하여 결정될 수 있다.The weights for the above weighted sum may be determined based on at least one of a ratio of neighboring blocks to which the intra mode is applied among neighboring blocks adjacent to the current block or a difference between the POC (picture order count) of the current picture to which the current block belongs and the POC of the reference picture.

복수의 예측 블록 별 마스크를 이용하여 최종 예측 블록이 생성될 수 있다. A final prediction block can be generated using multiple prediction block-specific masks.

상기 마스크는 전술한 바와 같이 소정의 단위로 시그날링되는 정보를 기반으로 유도될 수 있다. 여기서, 소정의 단위는, 픽쳐, 슬라이스, 코딩 트리 유닛 행(CTU row), CTU, 또는 코딩 블록일 수 있다. The above mask can be derived based on information signaled in predetermined units as described above. Here, the predetermined unit can be a picture, a slice, a coding tree unit row (CTU row), a CTU, or a coding block.

또는, 전술한 적어도 둘의 예측 블록 간 차분 블록에 기반하여 마스크가 유도될 수 있다. 일예로, 차분 블록 내 차분 샘플 값이 0인 경우, 해당 샘플 위치의 가중치는 평균 가중치로 유도될 수 있다. 반면, 차분 블록 내 차분 샘플 값이 클수록 큰 가중치가 이용될 수 있다. 이때, 차분 샘플 값의 부호(sign)에 따라서 적어도 둘의 예측 블록 중 어느 하나를 선택할 수 있다. 상기 선택을 위한 플래그가 별도로 시그날링될 수 있다. 상기 차분 샘플 값은 차분 샘플 값의 절대값으로 대체될 수 있으며, 이는 후술하는 실시예에서도 동일하게 적용될 수 있다.Alternatively, the mask may be derived based on the differential block between the at least two prediction blocks described above. For example, if the differential sample value in the differential block is 0, the weight of the corresponding sample position may be derived as the average weight. On the other hand, a larger weight may be used as the differential sample value in the differential block is larger. In this case, one of the at least two prediction blocks may be selected according to the sign of the differential sample value. A flag for the selection may be separately signaled. The differential sample value may be replaced with the absolute value of the differential sample value, and this may be equally applied in the embodiments described below.

또는, 선형 함수를 기반으로 상기 차분 샘플 값에 매핑되는 값을 유도하고, 상기 유도된 값을 기반으로 마스크가 유도될 수 있다. 본 개시에 따른 선형 함수는, 상기 차분 샘플 값에 곱해지는 가중치 또는 상기 차분 샘플 값에 가산/감산되는 오프셋 중 적어도 하나로 정의될 수 있다. 즉, 선형 함수의 유도는, 상기 가중치 또는 오프셋 중 적어도 하나의 유도를 의미할 수 있다. 이는 후술하는 실시예에도 동일한 의미로 적용될 수 있다. 이때, 차분 샘플 값이 소정의 문턱값보다 큰 경우, 마스크의 비트 뎁스에 기반한 값으로 차분 샘플 값이 클리핑될 수 있다. 반면, 차분 샘플 값이 상기 문턱값보다 작거나 같은 경우, 이전 선형 함수와는 다른 선형 함수를 기반으로 매핑이 수행될 수 있다. 이때, 각각의 선형 함수는 영상 부호화/복호화 장치에 동일하게 기-정의된 것일 수 있다. Alternatively, a value mapped to the differential sample value may be derived based on a linear function, and a mask may be derived based on the derived value. The linear function according to the present disclosure may be defined as at least one of a weight multiplied by the differential sample value or an offset added/subtracted to/from the differential sample value. That is, the derivation of the linear function may mean the derivation of at least one of the weight or the offset. This may be applied to the embodiments described below in the same sense. At this time, when the differential sample value is greater than a predetermined threshold, the differential sample value may be clipped based on a value based on the bit depth of the mask. On the other hand, when the differential sample value is less than or equal to the threshold, the mapping may be performed based on a linear function different from the previous linear function. At this time, each linear function may be identically pre-defined in the image encoding/decoding device.

영상 부호화 장치는, 소정의 단위로 선형 함수 정보를 영상 복호화 장치로 전송할 수 있다. 여기서, 소정의 단위는 전술한 바와 같다. The image encoding device can transmit linear function information to the image decoding device in predetermined units. Here, the predetermined units are as described above.

또는, 현재 블록의 주변 블록(들)에 대한 예측 블록(들)을 기반으로 선형 함수를 유도하고, 이를 기반으로 마스크가 유도될 수 있다. 일예로, 주변 블록이 둘의 예측 블록을 사용한 경우, 복원된 주변 블록과 둘의 예측 블록을 기반으로 현재 블록에 대해 하나 또는 그 이상의 선형 함수를 획득할 수 있다. 상기 획득된 선형 함수를 기반으로 현재 블록에 대한 차분 샘플 값에 매핑되는 값을 유도하고, 이를 기반으로 마스크를 유도할 수 있다.Alternatively, a linear function may be derived based on the prediction block(s) for the surrounding block(s) of the current block, and a mask may be derived based on this. For example, if the surrounding block uses two prediction blocks, one or more linear functions may be obtained for the current block based on the reconstructed surrounding block and the two prediction blocks. A value mapped to a differential sample value for the current block may be derived based on the obtained linear function, and a mask may be derived based on this.

또는, 현재 블록의 예측 블록으로부터 소정의 대표 값을 산출하고, 산출된 대표 값에 기반하여 선형 함수가 유도될 수 있다. 일예로, 현재 블록에 대한 적어도 둘의 예측 블록 중 어느 하나에 대한 평균 값에 기초하여 선형 함수가 유도될 수 있다. 현재 블록에 대한 적어도 둘의 예측 블록 중 어느 하나에 대한 평균 값에 기초하여, 복수의 선형 함수 후보 중 어느 하나가 선택될 수 있다. 상기 평균 값은, 예측 블록에 속한 예측 샘플 값 전부 또는 일부의 평균으로 정의될 수 있다. Alternatively, a predetermined representative value may be derived from the prediction block of the current block, and a linear function may be derived based on the derived representative value. For example, a linear function may be derived based on an average value of any one of at least two prediction blocks for the current block. Based on an average value of any one of at least two prediction blocks for the current block, any one of a plurality of linear function candidates may be selected. The average value may be defined as an average of all or part of the prediction sample values belonging to the prediction block.

또는, 현재 블록 주변에 기-복원된 샘플 값들의 대표 값에 기초하여 선형 함수가 유도될 수 있다. 현재 블록 주변에 기-복원된 샘플 값들의 대표 값에 기초하여 복수의 선형 함수 후보 중 어느 하나가 선택될 수 있다.Alternatively, a linear function can be derived based on the representative values of the pre-restored sample values around the current block. One of a plurality of linear function candidates can be selected based on the representative values of the pre-restored sample values around the current block.

도 6은 본 개시에 따른 마스크 생성 방법을 도시한 것이다.Figure 6 illustrates a mask generation method according to the present disclosure.

본 개시에 따른 적어도 둘의 예측 블록은 인트라 모드를 기반으로 생성된 것일 수 있다. 다만, 이에 한정되지 아니하며, 전술한 바와 같이 적어도 둘의 예측 블록은 서로 상이한 예측 방법에 기초하여 생성된 것일 수도 있다. At least two prediction blocks according to the present disclosure may be generated based on an intra mode. However, the present invention is not limited thereto, and as described above, the at least two prediction blocks may be generated based on different prediction methods.

각 예측 블록은 비방향성 모드(예를 들어, 플래너 모드, DC 모드), 방향성 모드, IBC, 또는 IntraTMP(Intra-Template Matching Prediction)를 기반으로 생성된 것일 수 있다. 또는, 각 예측 블록의 예측 샘플은, 위치 기반의 인트라 예측 샘플 필터링(PDPC)이 적용된 것일 수 있다.Each prediction block may be generated based on a non-directional mode (e.g., planar mode, DC mode), a directional mode, IBC, or Intra-Template Matching Prediction (IntraTMP). Alternatively, the prediction samples of each prediction block may have position-based intra prediction sample filtering (PDPC) applied.

현재 블록에 대한 차분 블록 내 차분 샘플 값(들)을 기반으로 마스크를 유도하고, 현재 블록에 대한 적어도 둘의 예측 블록에 상기 마스크를 적용하여 최종 예측 블록을 생성할 수 있다. A mask can be derived based on differential sample value(s) within a differential block for a current block, and the final predicted block can be generated by applying the mask to at least two predicted blocks for the current block.

이때, 상기 차분 샘플 값들 중 최대 값 또는 최소 값 중 적어도 하나와 마스크의 비트 뎁스를 기반으로 선형 함수(즉, 선형 함수의 가중치 및/또는 오프셋)가 유도될 수 있다. 선형 함수의 가중치 및/또는 오프셋의 부호는 소정의 단위로 시그날링될 수 있다. At this time, a linear function (i.e., a weight and/or an offset of the linear function) can be derived based on at least one of the maximum or minimum values among the differential sample values and the bit depth of the mask. The sign of the weight and/or an offset of the linear function can be signaled in a predetermined unit.

현재 블록에 대한 기-복원된 참조 샘플 값(들)을 기반으로 선형 함수의 가중치의 부호를 예측하고, 예측된 부호를 그대로 사용할 수 있다.The sign of the weight of a linear function can be predicted based on the previously restored reference sample value(s) for the current block, and the predicted sign can be used as is.

또는, 현재 블록 주변의 기-복원된 샘플 값(들)과 현재 블록의 예측 블록을 기반으로 선형 함수의 기울기의 부호를 유도할 수 있다. 일예로, 가로 또는 세로 방향의 1차 미분치를 기반으로 선형 함수의 기울기의 부호가 유도될 수 있다.Alternatively, the sign of the gradient of the linear function can be derived based on the reconstructed sample value(s) around the current block and the predicted block of the current block. For example, the sign of the gradient of the linear function can be derived based on the first derivative in the horizontal or vertical direction.

또는, 현재 블록 주변의 기-복원된 샘플 값(들)과 현재 블록의 예측 블록 간의 연속성에 기초하여 선형 함수의 기울기의 부호가 유도될 수 있다. 여기서, 연속성은 현재 블록의 경계에 위치한 예측 샘플과 기-복원된 주변 샘플 간의 차이에 기초하여 판단될 수 있다. 즉, 기울기의 부호에 따라서 기존 인트라 예측보다 더 많은 예측 후보를 생성할 수 있고, 보다 적절한 예측 블록을 적응적으로 사용함으로써 높은 부호화 효율을 제공할 수 있다.Alternatively, the sign of the gradient of the linear function can be derived based on the continuity between the pre-reconstructed sample value(s) around the current block and the prediction block of the current block. Here, the continuity can be judged based on the difference between the prediction sample located at the boundary of the current block and the pre-reconstructed surrounding samples. That is, according to the sign of the gradient, more prediction candidates can be generated than the existing intra prediction, and high encoding efficiency can be provided by adaptively using a more appropriate prediction block.

도 7은 본 개시에 따른 마스크 생성 방법을 도시한 것이다.Figure 7 illustrates a mask generation method according to the present disclosure.

도 7에 따르면, 현재 블록에 대한 적어도 둘의 예측 블록 내 일부 영역에 대해 차분 샘플 값(들)을 산출하고, 이에 기반하여 마스크를 생성할 수 있다. 생성된 마스크를 기반으로 적어도 둘의 예측 블록을 블렌딩하여 최종 예측 블록을 생성할 수 있다.According to FIG. 7, differential sample value(s) can be calculated for some areas within at least two prediction blocks for a current block, and a mask can be generated based on the differential sample value(s). A final prediction block can be generated by blending at least two prediction blocks based on the generated mask.

도 7을 참조하면, 둘의 예측 블록(Predictor 0, Predictor 1) 내 일부 영역(Difference area)에 대해서만 차분 샘플 값을 산출할 수 있다. 상기 일부 영역 (Difference area)은 하나 또는 그 이상의 직선에 기반하여 결정될 수 있다. 이하, 차분 샘플 값이 산출되는 일부 영역을 차이 영역이라 부르기로 한다. Referring to Fig. 7, differential sample values can be calculated only for some areas (Difference areas) within the two prediction blocks (Predictor 0, Predictor 1). The above-mentioned some areas (Difference areas) can be determined based on one or more straight lines. Hereinafter, some areas where differential sample values are calculated will be called difference areas.

여기서, 직선에 대한 정보는 소정의 단위로 시그날링될 수 있다. 소정의 단위는, 픽쳐, 슬라이스, 코딩 트리 유닛 행(CTU row), CTU, 또는 코딩 블록일 수 있다. 직선에 대한 정보는 선형 함수를 표현하는 가중치(또는, 기울기) 또는 오프셋(또는, 절편) 중 적어도 하나를 포함할 수 있다. 또는, 직선에 대한 정보는 기울기 또는 현재 블록의 중심으로부터의 거리 중 적어도 하나를 포함할 수 있다. 또는, 직선에 대한 정보는, 복수의 직선 파라미터를 정의하는 테이블로부터 어느 하나의 직선 파라미터를 지시하는 인덱스일 수 있다.Here, the information about the straight line can be signaled in a given unit. The given unit can be a picture, a slice, a coding tree unit row (CTU row), a CTU, or a coding block. The information about the straight line can include at least one of a weight (or a slope) or an offset (or an intercept) representing a linear function. Alternatively, the information about the straight line can include at least one of a slope or a distance from the center of the current block. Alternatively, the information about the straight line can be an index indicating one straight line parameter from a table defining a plurality of straight line parameters.

차이 영역이 직선에 기반한 영역인 경우, 도 7에 도시된 바와 같이 제1 영역(1st area)과 제2 영역(2nd area)이 구분될 수 있다. 두 영역에 대한 마스크의 유도를 위하여 플래그가 추가적으로 시그날링될 수 있다. When the difference area is a straight-line-based area, a first area (1 st area) and a second area (2 nd area) can be distinguished as shown in Fig. 7. A flag can be additionally signaled to induce masks for the two areas.

일예로, 플래그의 값이 0인 경우, 제1 영역은 제1 예측 블록(Predictor 0)을 사용하도록 하는 마스크가 유도되고, 제2 영역은 제2 예측 블록(Predictor 1)을 사용하도록 하는 마스크가 유도될 수 있다. 반대로, 플래그의 값이 1인 경우, 제1 영역은 제2 예측 블록을 사용하도록 하는 마스크가 유도되고, 제2 영역은 제1 예측 블록을 사용하도록 하는 마스크가 유도될 수 있다.For example, when the value of the flag is 0, a mask may be derived that causes the first region to use the first prediction block (Predictor 0), and a mask may be derived that causes the second region to use the second prediction block (Predictor 1). Conversely, when the value of the flag is 1, a mask may be derived that causes the first region to use the second prediction block, and a mask may be derived that causes the second region to use the first prediction block.

또는, 두 영역에 대해 동일한 예측 블록을 사용할 수 있고, 차이 영역에 대해서만 블렌딩을 수행하여 최종 예측 블록을 생성할 수 있다. 이 경우, 특정 플래그를 기반으로 두 영역에 대해서 어떤 예측 블록을 사용할지를 결정할 수 있다. Alternatively, the same prediction block can be used for both regions, and blending can be performed only on the difference region to generate the final prediction block. In this case, a specific flag can be used to determine which prediction block to use for the two regions.

일예로, 플래그의 값이 0인 경우, 제1 영역 및 제2 영역에서 제1 예측 블록을 사용하도록 하는 마스크가 유도되고, 차이 영역에서는 차분 샘플 값에 기반한 마스크가 유도될 수 있다. 반대로, 플래그의 값이 1인 경우, 제1 영역 및 제2 영역에서 제2 예측 블록을 사용하도록 하는 마스크가 유도되고, 차이 영역에 대해서는 차분 샘플 값에 기반한 마스크가 유도될 수 있다. For example, when the value of the flag is 0, a mask may be derived that uses the first prediction block in the first region and the second region, and a mask based on the differential sample value may be derived in the difference region. Conversely, when the value of the flag is 1, a mask may be derived that uses the second prediction block in the first region and the second region, and a mask based on the differential sample value may be derived for the difference region.

차이 영역에 대한 마스크에 있어서, 선형 함수의 기울기는 제1 영역과 차이 영역의 특징 또는 제2 영역과 차이 영역의 특징 중 적어도 하나에 기반하여 결정될 수 있다. 여기서, 제1 영역과 차이 영역의 특징은 제1 영역과 차이 영역의 연속성을 의미할 수 있다. 마찬가지로, 제2 영역과 차이 영역의 특징은 제2 영역과 차이 영역의 연속성일 수 있다. 연속성의 의미는 전술한 바와 같다.In the mask for the difference region, the slope of the linear function can be determined based on at least one of the features of the first region and the difference region or the features of the second region and the difference region. Here, the features of the first region and the difference region can mean continuity between the first region and the difference region. Similarly, the features of the second region and the difference region can be continuity between the second region and the difference region. The meaning of continuity is as described above.

도 8은 본 개시에 따른 일실시예로서, 파라미터 기반의 예측 방법을 도시한 것이다.FIG. 8 illustrates a parameter-based prediction method as an example according to the present disclosure.

도 8을 참조하면, 현재 블록의 예측 모드를 결정할 수 있다(S800).Referring to Fig. 8, the prediction mode of the current block can be determined (S800).

현재 블록의 예측 모드는, 영상 부호화 장치와 영상 복호화 장치에 기-정의된 복수의 예측 모드 중 어느 하나로 결정될 수 있다. 상기 복수의 예측 모드는, 인트라 모드, 색상 간 예측 모드, 인터 모드, 또는 IBC 모드 중 적어도 하나를 포함할 수 있다.The prediction mode of the current block can be determined as one of a plurality of prediction modes pre-defined in the video encoding device and the video decoding device. The plurality of prediction modes can include at least one of an intra mode, an inter-color prediction mode, an inter mode, or an IBC mode.

도 8을 참조하면, 현재 블록의 예측 모드에 기반하여 파라미터를 유도할 수 있다(S810).Referring to Fig. 8, parameters can be derived based on the prediction mode of the current block (S810).

본 개시에 따른 파라미터는, 매핑 함수의 파라미터, 오프셋 파라미터, 필터의 파라미터, 또는 조명 보상을 위한 파라미터를 의미할 수 있다. 예측 모드에 따른 파라미터의 유도 방법은 도 9 내지 도 11을 참조하여 자세히 살펴보도록 한다.The parameters according to the present disclosure may mean parameters of a mapping function, offset parameters, parameters of a filter, or parameters for illumination compensation. A method of deriving parameters according to a prediction mode will be described in detail with reference to FIGS. 9 to 11.

도 8을 참조하면, 현재 블록의 참조 블록과 파라미터를 기반으로 현재 블록의 예측 블록을 생성할 수 있다(S820).Referring to FIG. 8, a prediction block of the current block can be generated based on the reference block and parameters of the current block (S820).

본 개시에 따른 참조 블록은, 현재 블록과는 다른 성분 타입의 블록일 수 있다. 일예로, 현재 블록이 색차 성분 블록인 경우, 참조 블록은 현재 블록에 대응하는 휘도 성분 블록일 수 있다. 현재 블록이 Cr 성분 블록인 경우, 참조 블록은 현재 블록에 대응하는 Cb 성분 블록일 수 있다.The reference block according to the present disclosure may be a block of a different component type from the current block. For example, if the current block is a chrominance component block, the reference block may be a luminance component block corresponding to the current block. If the current block is a Cr component block, the reference block may be a Cb component block corresponding to the current block.

또는, 참조 블록은 현재 블록이 속한 현재 픽쳐 내에서 기-복원된 영역에 속한 것일 수 있다. 또는, 참조 블록은 현재 블록과 다른 픽쳐에 속한 것일 수 있다.Alternatively, the reference block may belong to a previously restored region within the current picture to which the current block belongs. Alternatively, the reference block may belong to a different picture from the current block.

상기 참조 블록의 샘플에 상기 파라미터를 적용하여 현재 블록의 예측 샘플을 유도할 수 있다. 상기 파라미터는, 참조 블록에 속한 모든 샘플에 적용될 수도 있고, 참조 블록 내 일부 샘플에만 적용될 수도 있다. 상기 참조 블록은 적어도 둘의 영역으로 구분될 수 있고, 각 영역 별로 서로 상이한 파라미터가 적용될 수도 있다. The above parameters can be applied to samples of the above reference block to derive prediction samples of the current block. The above parameters can be applied to all samples belonging to the reference block, or can be applied to only some samples within the reference block. The above reference block can be divided into at least two regions, and different parameters can be applied to each region.

도 9는 본 개시에 따른 일실시예로서, 인트라 예측의 색상 간 예측에서 파라미터 기반의 예측 방법을 도시한 것이다.FIG. 9 illustrates a parameter-based prediction method in color inter-prediction of intra prediction as an embodiment according to the present disclosure.

본 개시에 따른 색상 간 예측은, 도 9에 도시된 바와 같이, 기-복원된 또는 기-예측된 제1 블록을 기반으로 제2 블록 또는 제3 블록 중 적어도 하나를 예측할 수 있다. 또는, 기-복원된 또는 기-예측된 제2 블록을 기반으로 제3 블록을 예측할 수도 있다.The color inter-prediction according to the present disclosure can predict at least one of a second block or a third block based on a pre-reconstructed or pre-predicted first block, as illustrated in FIG. 9. Alternatively, the third block can be predicted based on a pre-reconstructed or pre-predicted second block.

제2 블록 및/또는 제3 블록에 대한 예측 블록을 생성하기 위하여 색상 간 연관성을 가지는 매핑 함수가 사용될 수 있다. 현재 블록에 사용되는 매핑 함수의 파라미터는 영상 부호화 장치에서 영상 복호화 장치로 전송될 수 있다. 여기서, 매핑 함수의 파라미터는, 제1 블록의 샘플 값에 곱해지는 가중치 또는 제1 블록의 샘플에 가산/감산되는 하나 또는 그 이상의 오프셋 중 적어도 하나를 포함할 수 있다. 후술하는 실시예에서도 동일한 의미로 해석될 수 있다.A mapping function having color correlation may be used to generate a prediction block for the second block and/or the third block. The parameters of the mapping function used for the current block may be transmitted from the image encoding device to the image decoding device. Here, the parameters of the mapping function may include at least one of a weight multiplied by the sample value of the first block or one or more offsets added/subtracted from the sample of the first block. It may be interpreted in the same sense in the embodiment described below.

또는, 영상 부호화 장치 및 영상 복호화 장치에서 기-정의된 테이블 또는 리스트의 형식으로 저장된 복수의 매핑 함수 중 어느 하나가 선택적으로 사용될 수 있다. Alternatively, any one of a plurality of mapping functions stored in the form of a pre-defined table or list in the image encoding device and the image decoding device may be selectively used.

또는, 제1 블록 주변의 기-복원된 샘플 값(들)과 제2 블록 주변의 기-복원된 샘플 값(들) 사이의 연관성을 기반으로 매핑 함수의 파라미터를 유도하고, 이를 기반으로 예측이 수행될 수 있다. 그리고, 제1 블록 주변의 기-복원된 샘플 값(들)과 제3 블록 주변의 기-복원된 샘플 값(들) 사이의 연관성을 기반으로 매핑 함수의 파라미터를 유도하고, 이를 기반으로 예측이 수행될 수 있다. 상기 연관성은 도 12 내 도 14를 참조하여 자세히 살펴보기로 한다.Alternatively, the parameters of the mapping function may be derived based on the correlation between the pre-restored sample value(s) around the first block and the pre-restored sample value(s) around the second block, and prediction may be performed based on the derived parameters of the mapping function. In addition, the parameters of the mapping function may be derived based on the correlation between the pre-restored sample value(s) around the first block and the pre-restored sample value(s) around the third block, and prediction may be performed based on the derived parameters. The correlation will be examined in detail with reference to FIGS. 12 to 14.

도 10은 본 개시에 따른 일실시예로서, 인트라 블록 카피(IBC) 모드에서 파라미터 기반의 예측 방법을 도시한 것이다.FIG. 10 illustrates a parameter-based prediction method in intra block copy (IBC) mode as an embodiment according to the present disclosure.

IBC 모드는 도 10에 도시된 바와 같이 현재 블록에서 소정의 블록 벡터(BV) 만큼 이동한 위치의 참조 블록을 기반으로 현재 블록의 예측 블록을 유도할 수 있다.The IBC mode can derive a prediction block of the current block based on a reference block at a position moved by a predetermined block vector (BV) from the current block, as illustrated in Fig. 10.

블록 벡터에 의해 특정된 참조 블록이 현재 블록의 예측 블록으로 유도될 수도 있고, 보정된 참조 블록이 현재 블록의 예측 블록으로 유도될 수도 있다.A reference block specified by a block vector may be derived as a prediction block of the current block, or a corrected reference block may be derived as a prediction block of the current block.

일예로, 참조 블록과 현재 블록 내부에 동일한 패턴이 있는 경우, IBC 모드가 이용될 수 있다. 이때, 영상 획득 시 위치 따라 조명이 다를 수 있으며, 이 경우 매핑 함수, 조명 오프셋, 또는 필터링을 통해 참조 블록을 보정하여 사용할 경우 예측 성능을 향상시킬 수 있다. For example, if there is an identical pattern inside the reference block and the current block, the IBC mode can be used. In this case, the illumination may be different depending on the location when the image is acquired, and in this case, the prediction performance can be improved by using the reference block by correcting it through a mapping function, illumination offset, or filtering.

여기서, 매핑 함수, 조명 오프셋, 또는 필터의 파라미터는 영상 부호화 장치에서 산출되어 영상 복호화 장치로 전송될 수 있다. Here, parameters of the mapping function, illumination offset, or filter can be derived from the image encoding device and transmitted to the image decoding device.

또는, 기-정의된 복수의 파라미터를 정의한 테이블로부터 하나 또는 그 이상의 파라미터를 특정하는 인덱스가 영상 부호화 장치에서 부호화되고, 이는 영상 복호화 장치로 전송될 수 있다. Alternatively, an index specifying one or more parameters from a table defining a plurality of pre-defined parameters may be encoded in the image encoding device and transmitted to the image decoding device.

또는, 현재 블록 주변의 기-복원된 샘플(들)과 참조 블록 주변의 기-복원된 샘플(들) 사이의 연관성을 기반으로 파라미터를 유도할 수도 있다. 상기 연관성은 도 12 내 도 14를 참조하여 자세히 살펴보기로 한다.Alternatively, parameters can be derived based on the correlation between the pre-reconstructed sample(s) around the current block and the pre-reconstructed sample(s) around the reference block. This correlation will be examined in more detail with reference to FIGS. 12 to 14.

도 11은 인터 모드에서 파라미터 기반의 예측 방법을 도시한 것이다.Figure 11 illustrates a parameter-based prediction method in inter mode.

인터 모드는 도 11에 도시된 바와 같이 참조 픽쳐 내에서 현재 블록과 동일 위치의 블록에서 움직임 벡터(MV)만큼 이동한 위치의 참조 블록을 기반으로 현재 블록의 예측 블록을 유도하는 모드이다. 이때, MV의 정확도(또는, 정밀도)가 정수 단위보다 작은 경우, 참조 블록 내 정수 위치의 샘플들에 보간 필터를 적용하여 예측 블록을 유도할 수 있다. 여기서, 보간 필터는, MV의 정확도에 따른 위치에 기초하여 결정될 수 있다.Inter mode is a mode that derives a prediction block of a current block based on a reference block at a position that is moved by a motion vector (MV) from a block at the same position as the current block within a reference picture, as illustrated in Fig. 11. At this time, if the accuracy (or precision) of the MV is smaller than an integer unit, an interpolation filter can be applied to samples at integer positions within the reference block to derive a prediction block. Here, the interpolation filter can be determined based on a position according to the accuracy of the MV.

영상 부호화 장치에서 오차가 가장 작은 참조 블록이 선택되나, 픽쳐 간 조명 변화에 따른 오차가 여전히 남아있을 수 있다. 따라서, 보간을 통해 유도된 예측 블록에 대하여 추가적으로 조명 보상을 수행함으로써, 예측 성능을 향상시킬 수 있다. In a video encoding device, a reference block with the smallest error is selected, but errors due to illumination changes between pictures may still remain. Therefore, by additionally performing illumination compensation on a prediction block derived through interpolation, prediction performance can be improved.

상기 조명 보상을 위해 매핑 함수, 오프셋, 필터 등이 사용될 수 있다. 매핑 함수, 오프셋, 또는 필터의 파라미터는 영상 부호화 장치에서 산출되고, 이는 영상 복호화 장치로 전송할 수 있다. For the above lighting compensation, a mapping function, an offset, a filter, etc. may be used. The parameters of the mapping function, the offset, or the filter are calculated in the image encoding device and can be transmitted to the image decoding device.

또는, 기-정의된 복수의 파라미터를 정의한 테이블로부터 하나 또는 그 이상의 파라미터를 특정하는 인덱스가 영상 부호화 장치에서 부호화되고, 이는 영상 복호화 장치로 전송될 수 있다. Alternatively, an index specifying one or more parameters from a table defining a plurality of pre-defined parameters may be encoded in the image encoding device and transmitted to the image decoding device.

또는, 현재 블록 주변의 기-복원된 샘플(들)과 참조 블록 주변의 기-복원된 샘플(들) 사이의 연관성을 기반으로 파라미터를 유도할 수도 있다. 상기 연관성은 도 12 내 도 14를 참조하여 자세히 살펴보기로 한다.Alternatively, parameters can be derived based on the correlation between the pre-reconstructed sample(s) around the current block and the pre-reconstructed sample(s) around the reference block. This correlation will be examined in more detail with reference to FIGS. 12 to 14.

도 12는 본 개시에 따른 일실시예로서, 서로 다른 두 영역 간의 연관성을 도시한 것이다.FIG. 12 is an example according to the present disclosure, illustrating a relationship between two different areas.

현재 블록 주변의 기-복원된 샘플(들)과 참조 블록 주변의 기-복원된 샘플(들) 사이의 연관성은 도 12와 같이 2차원 상의 점 그래프로 표현될 수 있고, 이는 선형 직선으로 근사화될 수 있다.The correlation between the pre-restored sample(s) around the current block and the pre-restored sample(s) around the reference block can be expressed as a two-dimensional dot graph as shown in Fig. 12, and this can be approximated by a linear straight line.

일예로, 현재 블록 주변의 기-복원된 샘플들의 집합을 현재 템플릿이라 부르고, 참조 블록 주변의 기-복원된 샘플들의 집합을 참조 템플릿이라 부르기로 한다. 현재 템플릿과 참조 템플릿 각각에 속한 샘플 값을 이용하여 점 그래프가 도출될 수 있다.For example, a set of pre-reconstructed samples around a current block is called a current template, and a set of pre-reconstructed samples around a reference block is called a reference template. A dot graph can be derived using sample values belonging to each of the current template and the reference template.

특정 블록에 있어서, 현재 템플릿과 참조 템플릿 간의 연관성은 도 12와 같은 선형 직선으로 표현될 수 있다. 도 12에서 제1 성분은 참조 템플릿을 의미할 수 있고, 제2 성분은 현재 템플릿을 의미할 수 있다. In a specific block, the relationship between the current template and the reference template can be expressed as a linear line as in Fig. 12. In Fig. 12, the first component can mean the reference template, and the second component can mean the current template.

이 경우, 현재 및 참조 템플릿의 샘플 값들을 이용하여 연관성을 표현하기 위한 선형 매핑 함수가 유도될 수 있다. 여기서, 선형 매핑 함수는 기울기와 절편과 같은 파라미터로 표현될 수 있으며, 두 템플릿의 샘플 값들을 이용하여 기울기와 절편을 유도할 수 있다.In this case, a linear mapping function can be derived to express the association using the sample values of the current and reference templates. Here, the linear mapping function can be expressed by parameters such as a slope and an intercept, and the slope and intercept can be derived using the sample values of the two templates.

선형 매핑 함수의 기울기 또는 절편 중 적어도 하나는 일반적인 회귀 분석을 통해 유도될 수 있다.At least one of the slope or intercept of the linear mapping function can be derived via ordinary regression analysis.

또는, 제1 성분의 최소값 및 이에 대응하는 제2 성분의 샘플 값, 그리고 제1 성분의 최대값 및 이에 대응하는 제2 성분의 샘플 값을 기반으로 파라미터가 유도될 수 있다. Alternatively, parameters can be derived based on the minimum value of the first component and the corresponding sample value of the second component, and the maximum value of the first component and the corresponding sample value of the second component.

또는, 제1 성분 중 상대적으로 작은 샘플 값들의 평균 및 이에 대응하는 제2 성분의 샘플 값들의 평균, 그리고 제1 성분 중 상대적으로 큰 샘플 값들의 평균 및 이에 대응하는 제2 성분의 샘플 값들의 평균을 기반으로 파라미터가 유도될 수 있다.Alternatively, the parameters may be derived based on the average of relatively small sample values of the first component and the corresponding average of sample values of the second component, and the average of relatively large sample values of the first component and the corresponding average of sample values of the second component.

도 13은 본 개시에 따른 일실시예로서, 서로 다른 두 영역에 대한 복수의 연관성을 도시한 것이다.FIG. 13 is an example according to the present disclosure, illustrating multiple associations for two different areas.

현재 블록 주변의 기-복원된 샘플(들)과 참조 블록 주변의 기-복원된 샘플(들) 사이의 연관성은 도 13과 같이 2차원 상의 점 그래프로 표현될 수 있고, 이는 샘플들의 특징을 기준으로 복수의 그룹으로 분류될 수 있다. The correlation between the pre-restored sample(s) around the current block and the pre-restored sample(s) around the reference block can be expressed as a two-dimensional dot graph as shown in Fig. 13, and can be classified into multiple groups based on the characteristics of the samples.

일예로, 도 13에 도시된 바와 같이 현재 템플릿과 참조 템플릿의 샘플들이 2개의 그룹으로 분류되는 경우, 각 그룹 별로 별도의 연관성을 나타내는 매핑 함수, 오프셋, 또는 필터가 사용될 수 있다.For example, when samples of the current template and the reference template are classified into two groups as illustrated in FIG. 13, a mapping function, offset, or filter that represents a separate association for each group may be used.

상기 샘플들을 분류하기 위하여 K-mean 알고리즘이 사용될 수 있다. 또는, 제1 성분의 평균 값을 기준으로 2개의 그룹으로 분류될 수 있다. 일예로, 제1 성분의 평균 값보다 작은 샘플들을 제1 그룹으로 분류하고, 제1 성분의 평균 값보다 크거나 같은 샘플들을 제2 그룹으로 분류할 수 있다. 또는, 제2 성분의 평균 값을 기준으로 2개의 그룹으로 분류될 수 있다. 또는, 제1 성분 또는 제2 성분의 가중 평균 값을 기준으로 2개의 그룹으로 분류될 수 있다. The K-mean algorithm can be used to classify the above samples. Alternatively, the samples can be classified into two groups based on the average value of the first component. For example, samples smaller than the average value of the first component can be classified into the first group, and samples larger than or equal to the average value of the first component can be classified into the second group. Alternatively, the samples can be classified into two groups based on the average value of the second component. Alternatively, the samples can be classified into two groups based on the weighted average value of the first component or the second component.

선형 회귀 알고리즘을 이용하여 상기 그룹 별로 파라미터를 유도할 수 있고, 해당 파라미터를 기반으로 예측이 수행될 수 있다.Parameters can be derived for each group using a linear regression algorithm, and predictions can be made based on the parameters.

도 14는 본 개시에 따른 일실시예로서, 서로 다른 두 영역에 대한 비선형 연관성을 도시한 것이다.FIG. 14 is an example according to the present disclosure, showing nonlinear correlations for two different domains.

현재 블록 주변의 기-복원된 샘플(들)과 참조 블록 주변의 기-복원된 샘플(들) 사이의 연관성은 도 14와 같이 2차원 상의 점 그래프로 표현될 수 있고, 이는 곡선으로 근사화될 수 있다.The correlation between the pre-restored sample(s) around the current block and the pre-restored sample(s) around the reference block can be expressed as a two-dimensional dot graph as shown in Fig. 14, and this can be approximated as a curve.

상기 곡선은 기존 선형 함수에서 "Cf(x)" 항이 추가된 다항식으로 표현될 수 있다. 이 경우, 다항 회귀 분석을 통해 파라미터를 유도할 수 있고, 해당 파라미터를 기반으로 예측이 수행될 수 있다. 여기서, C는 다항 회귀 분석을 통해 유도되는 파라미터이고, f(x)는 x에 따른 기-정의된 함수일 수 있다. The above curve can be expressed as a polynomial with the term "Cf(x)" added to the existing linear function. In this case, parameters can be derived through polynomial regression analysis, and prediction can be performed based on the parameters. Here, C is a parameter derived through polynomial regression analysis, and f(x) can be a predefined function according to x.

일예로, f(x)는 x를 제곱하는 함수일 수 있다.For example, f(x) could be a function that squares x.

또는, f(x)는 x를 제곱하고 현재 비트 뎁스의 최대값으로 나누는 함수일 수 있다. Alternatively, f(x) can be a function that squares x and divides it by the maximum value of the current bit depth.

또는, f(x)는 x의 값과 해당 주변 샘플(들)을 기반으로 유도되는 새로운 값을 의미할 수 있다. 일예로, 가로 방향의 1차 미분치를 의미할 수 있다. 즉, 가로 방향의 1차 미분치에 따라서 곡선이 변하기 때문에, 다양한 형태의 곡선으로 근사화될 수 있으며, 이미지의 텍스쳐에 따라 적응적으로 매핑이 가능해진다. 또는, f(x)는 세로 방향의 1차 미분치를 의미할 수 있다. 또는, f(x)는 대각선 방향의 1차 미분치를 의미할 수 있다. 또는, f(x)는 가로 방향 및 세로 방향의 1차 미분치의 합을 의미할 수 있다. 또는, f(x)는 가로, 세로, 대각선 방향의 1차 미분치의 합과 같은 활동성을 의미할 수 있다. 여기서, 미분치는 sobel 연산 또는 차분과 같은 방법이 사용될 수 있다. 또는, f(x)는 가로 방향 및 세로 방향의 미분치를 기반으로 유도되는 방향성을 의미할 수 있다. 또는, f(x)는 전술한 각종 미분치를 기반으로 유도되는 방향성과 활동성의 합을 의미할 수 있다.Alternatively, f(x) may mean a new value derived based on the value of x and the surrounding sample(s). For example, it may mean the first derivative in the horizontal direction. That is, since the curve changes according to the first derivative in the horizontal direction, it may be approximated by various curves, and adaptively mapped according to the texture of the image. Alternatively, f(x) may mean the first derivative in the vertical direction. Alternatively, f(x) may mean the first derivative in the diagonal direction. Alternatively, f(x) may mean the sum of the first derivatives in the horizontal and vertical directions. Alternatively, f(x) may mean activity such as the sum of the first derivatives in the horizontal, vertical, and diagonal directions. Here, the derivative may use a method such as the Sobel operation or the difference. Alternatively, f(x) may mean directionality derived based on the first derivatives in the horizontal and vertical directions. Alternatively, f(x) can mean the sum of directionality and activity derived based on the various differential values mentioned above.

본 개시의 다양한 실시 예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시 예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.The various embodiments of the present disclosure are not intended to list all possible combinations but rather to illustrate representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combinations of two or more.

또한, 본 개시의 다양한 실시 예는 하드웨어, 펌웨어(firmware), 소프트웨어, 또는 그들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 범용 프로세서(general processor), 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다. Additionally, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, the embodiments may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.

본 개시의 범위는 다양한 실시 예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.The scope of the present disclosure includes software or machine-executable instructions (e.g., an operating system, an application, firmware, a program, etc.) that cause operations according to the methods of various embodiments to be executed on a device or a computer, and a non-transitory computer-readable medium having such software or instructions stored thereon and being executable on the device or the computer.

Claims (10)

현재 블록에 대해 적어도 둘의 예측 블록들을 생성하는 단계; 및A step of generating at least two prediction blocks for the current block; and 소정의 마스크를 기반으로 상기 적어도 둘의 예측 블록들을 가중합하여 상기 현재 블록의 최종 예측 블록을 생성하는 단계를 포함하되,A step of generating a final prediction block of the current block by weighting at least two prediction blocks based on a predetermined mask, 상기 적어도 둘의 예측 블록들 각각은 단방향 또는 양방향 예측 블록이고,Each of the above at least two prediction blocks is a unidirectional or bidirectional prediction block, 상기 양방향 예측 블록은, L0 예측 블록과 L1 예측 블록의 가중합에 기반하여 생성된 것인, 영상 복호화 방법.A method for decoding an image, wherein the above bidirectional prediction block is generated based on a weighted sum of an L0 prediction block and an L1 prediction block. 제1항에 있어서,In the first paragraph, 상기 마스크는, 기하학적 분할 정보에 기초하여 결정되는, 영상 복호화 방법.An image decoding method, wherein the above mask is determined based on geometric segmentation information. 제2항에 있어서,In the second paragraph, 상기 기하학적 분할 정보는, 영상 복호화 장치에 기-정의된 복수의 마스크 후보들 중 어느 하나를 특정하는, 영상 복호화 방법.An image decoding method, wherein the above geometric segmentation information specifies one of a plurality of mask candidates pre-defined in an image decoding device. 제2항에 있어서,In the second paragraph, 상기 기하학적 분할 정보는, 반전된 마스크의 사용 여부를 나타내는 플래그를 포함하는, 영상 복호화 방법.An image decoding method, wherein the geometric segmentation information includes a flag indicating whether an inverted mask is used. 제1항에 있어서,In the first paragraph, 상기 마스크는, 상기 적어도 둘의 예측 블록들 간 차분 블록을 기반으로 생성되는, 영상 복호화 방법.A method for decoding an image, wherein the mask is generated based on a differential block between at least two prediction blocks. 제1항에 있어서,In the first paragraph, 상기 마스크는, 상기 적어도 둘의 예측 블록들 간의 비율 블록을 기반으로 생성되고,The above mask is generated based on a ratio block between the at least two prediction blocks, 상기 비율 블록은 상기 적어도 둘의 예측 블록들 중 어느 하나에 속한 샘플 값을 다른 하나에 속한 동일 위치의 샘플 값으로 나누어서 유도되는, 영상 복호화 방법.A method for decoding an image, wherein the ratio block is derived by dividing a sample value belonging to one of the at least two prediction blocks by a sample value at the same position belonging to the other one. 제1항에 있어서,In the first paragraph, 상기 적어도 둘의 예측 블록들 각각은, 인터 모드, 인트라 모드, 또는 인트라 블록 카피 모드 중 어느 하나를 기반으로 생성되는, 영상 복호화 방법.A method for decoding an image, wherein each of the at least two prediction blocks is generated based on one of inter mode, intra mode, or intra block copy mode. 제7항에 있어서,In Article 7, 상기 가중합을 위한 가중치는, 인트라 모드가 적용된 주변 블록들의 비율 또는 현재 블록이 속한 현재 픽쳐와 참조 픽쳐 간의 POC 차이 중 적어도 하나에 기반하여 결정되는, 영상 복호화 방법.A method for decoding an image, wherein the weights for the above weighted sum are determined based on at least one of the ratio of surrounding blocks to which the intra mode is applied or the POC difference between the current picture to which the current block belongs and the reference picture. 현재 블록에 대해 적어도 둘의 예측 블록들을 생성하는 단계; 및A step of generating at least two prediction blocks for the current block; and 소정의 마스크를 기반으로 상기 적어도 둘의 예측 블록들을 가중합하여 상기 현재 블록의 최종 예측 블록을 생성하는 단계를 포함하되,A step of generating a final prediction block of the current block by weighting at least two prediction blocks based on a predetermined mask, 상기 적어도 둘의 예측 블록들 각각은 단방향 또는 양방향 예측 블록이고,Each of the above at least two prediction blocks is a unidirectional or bidirectional prediction block, 상기 양방향 예측 블록은, L0 예측 블록과 L1 예측 블록의 가중합에 기반하여 생성된 것인, 영상 부호화 방법.A method for encoding an image, wherein the above bidirectional prediction block is generated based on a weighted sum of an L0 prediction block and an L1 prediction block. 현재 블록에 대해 적어도 둘의 예측 블록들을 생성하는 단계;A step of generating at least two prediction blocks for the current block; 소정의 마스크를 기반으로 상기 적어도 둘의 예측 블록들을 가중합하여 상기 현재 블록의 최종 예측 블록을 생성하는 단계;A step of generating a final prediction block of the current block by weighting the at least two prediction blocks based on a predetermined mask; 상기 최종 예측 블록을 기반으로 상기 현재 블록의 잔차 블록을 유도하는 단계;A step of deriving a residual block of the current block based on the final prediction block; 상기 잔차 블록을 부호화하여 비트스트림을 생성하는 단계; 및A step of generating a bitstream by encoding the residual block; and 상기 비트스트림을 전송하는 단계를 포함하되,Including the step of transmitting the above bitstream, 상기 적어도 둘의 예측 블록들 각각은 단방향 또는 양방향 예측 블록이고,Each of the above at least two prediction blocks is a unidirectional or bidirectional prediction block, 상기 양방향 예측 블록은, L0 예측 블록과 L1 예측 블록의 가중합에 기반하여 생성된 것인, 비트스트림 전송 방법.A bitstream transmission method, wherein the above bidirectional prediction block is generated based on a weighted sum of an L0 prediction block and an L1 prediction block.
PCT/KR2024/007962 2023-06-12 2024-06-11 Method and apparatus for processing video signal Pending WO2024258146A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202480039130.8A CN121312137A (en) 2023-06-12 2024-06-11 Method and apparatus for processing video signals

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR20230075006 2023-06-12
KR10-2023-0075006 2023-06-12
KR10-2023-0075724 2023-06-13
KR20230075724 2023-06-13

Publications (1)

Publication Number Publication Date
WO2024258146A1 true WO2024258146A1 (en) 2024-12-19

Family

ID=93852425

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2024/007962 Pending WO2024258146A1 (en) 2023-06-12 2024-06-11 Method and apparatus for processing video signal

Country Status (2)

Country Link
CN (1) CN121312137A (en)
WO (1) WO2024258146A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170084055A (en) * 2014-11-06 2017-07-19 삼성전자주식회사 Video encoding method and apparatus, video decoding method and apparatus
KR101788626B1 (en) * 2014-03-18 2017-10-20 라이브2디 인크. Image processing device, image processing method and program
KR20180008445A (en) * 2015-06-10 2018-01-24 삼성전자주식회사 Method and apparatus for encoding or decoding an image using syntax signaling for adaptive weight prediction
KR20220053567A (en) * 2019-09-01 2022-04-29 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 Prediction weight alignment in video coding
WO2023040993A1 (en) * 2021-09-16 2023-03-23 Beijing Bytedance Network Technology Co., Ltd. Method, device, and medium for video processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101788626B1 (en) * 2014-03-18 2017-10-20 라이브2디 인크. Image processing device, image processing method and program
KR20170084055A (en) * 2014-11-06 2017-07-19 삼성전자주식회사 Video encoding method and apparatus, video decoding method and apparatus
KR20180008445A (en) * 2015-06-10 2018-01-24 삼성전자주식회사 Method and apparatus for encoding or decoding an image using syntax signaling for adaptive weight prediction
KR20220053567A (en) * 2019-09-01 2022-04-29 베이징 바이트댄스 네트워크 테크놀로지 컴퍼니, 리미티드 Prediction weight alignment in video coding
WO2023040993A1 (en) * 2021-09-16 2023-03-23 Beijing Bytedance Network Technology Co., Ltd. Method, device, and medium for video processing

Also Published As

Publication number Publication date
CN121312137A (en) 2026-01-09

Similar Documents

Publication Publication Date Title
WO2019078581A1 (en) Method, device, and recording medium storing bit stream, for encoding/decoding image
WO2020071829A1 (en) History-based image coding method, and apparatus thereof
WO2017039256A1 (en) Method and device for processing video signal
WO2019240448A1 (en) Video signal processing method and device on basis of reference between components
WO2017188652A1 (en) Method and device for encoding/decoding image
WO2020009419A1 (en) Video coding method and device using merge candidate
WO2017164645A2 (en) Method and apparatus for encoding/decoding video signal
WO2016175550A1 (en) Method for processing video signal and device for same
WO2018021585A1 (en) Method and apparatus for intra-prediction in image coding system
WO2013154366A1 (en) Transform method based on block information, and apparatus using said method
WO2020004979A1 (en) Image encoding/decoding method and apparatus
WO2018212569A1 (en) Image processing method on basis of intra prediction mode and apparatus therefor
WO2018216862A1 (en) Method and device for decoding image according to intra prediction in image coding system
WO2016114583A1 (en) Method and device for processing video signal
WO2020013609A1 (en) Intra-frame prediction-based video coding method and device
WO2019182329A1 (en) Image decoding method/apparatus, image encoding method/apparatus, and recording medium storing bitstream
WO2020180100A1 (en) Intra block coding-based video or image coding
WO2020242145A1 (en) Video coding method and apparatus using adaptive parameter set
WO2020141833A1 (en) Image decoding method, image encoding method, image decoding device, image encoding device, and computer-readable recording medium
WO2018128228A1 (en) Image decoding method and device in image coding system
WO2021060801A1 (en) Image encoding/decoding method and device, and recording medium storing bitstream
WO2020197031A1 (en) Intra prediction method and apparatus based on multi-reference line in image coding system
WO2024258146A1 (en) Method and apparatus for processing video signal
WO2020005042A1 (en) Video coding method and device using motion compensation of decoder side
WO2017069591A1 (en) Method and device for filtering image in image coding system

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

Country of ref document: EP

Kind code of ref document: A1