WO2025198453A1 - Video coding method and device, and recording medium storing bitstream - Google Patents
Video coding method and device, and recording medium storing bitstreamInfo
- Publication number
- WO2025198453A1 WO2025198453A1 PCT/KR2025/099839 KR2025099839W WO2025198453A1 WO 2025198453 A1 WO2025198453 A1 WO 2025198453A1 KR 2025099839 W KR2025099839 W KR 2025099839W WO 2025198453 A1 WO2025198453 A1 WO 2025198453A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- candidate
- prediction
- block
- current block
- mode
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/105—Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/11—Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/189—Methods 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/196—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods 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.
- Video compression largely consists of intraprediction, interprediction, transform, quantization, entropy coding, and in-loop filtering.
- intraprediction refers to a technique that generates a prediction block for the current block using reconstructed pixels surrounding the current block.
- the encoder encodes the intraprediction mode used for intraprediction, and the decoder performs intraprediction by reconstructing the encoded intraprediction mode.
- a TIMD-based intra prediction method and device are provided.
- the present disclosure provides a method and device for determining a reference sample line for MIP mode.
- a method and device for implicitly signaling a MIP mode are provided.
- the video decoding method and device can construct a candidate list including multiple candidates for a current block, calculate a cost for each candidate in the candidate list, and generate a prediction block of the current block based on the cost.
- the candidate list can include at least one of a candidate derived based on a regular mode or a candidate derived based on a merge mode.
- a candidate derived based on the Regular mode can be derived based on an intra prediction mode of a neighboring block adjacent to the current block.
- the candidate derived based on the merge mode can be derived based on a surrounding block to which template-based intra mode derivation (TIMD) is applied.
- TMD template-based intra mode derivation
- the cost can be calculated based on the difference between the predicted value and the restored value of the template of the current block, and the predicted value of the template of the current block can be generated based on the intra prediction mode of each candidate.
- the top two candidates can be selected from the candidate list in ascending order of the calculated cost.
- two prediction blocks can be generated based on the intra prediction modes of the two candidates, and the prediction block of the current block can be generated based on the weighted sum of the two prediction blocks.
- the weight of the weighted sum can be derived based on the cost corresponding to the two candidates.
- the prediction block of the current block can be generated using only the candidate with the smallest cost.
- the video encoding method and device can construct a candidate list including a plurality of candidates for a current block, calculate a cost for each candidate in the candidate list, and generate a prediction block of the current block based on the cost.
- the candidate list can include at least one of a candidate derived based on a regular mode or a candidate derived based on a merge mode.
- a computer-readable recording medium can store a bitstream encoded by the image encoding method.
- the encoding/decoding complexity of TIMD an intra prediction technique, can be reduced.
- the accuracy of intra prediction can be improved by adaptively utilizing reference sample lines.
- compression performance of a decoder/sub-decoder can be improved by implicitly transmitting a MIP mode to the decoder.
- FIG. 1 is a block diagram showing an image encoding device according to the present disclosure.
- FIG. 2 is a block diagram showing an image decoding device according to the present disclosure.
- Figure 3 illustrates a TIMD-based prediction method according to the present disclosure.
- FIG. 4 is an example according to the present disclosure, showing the location of non-adjacent blocks available to the current block.
- FIG. 5 illustrates a matrix-based intra prediction method according to the present disclosure.
- the video decoding method and device can construct a candidate list including multiple candidates for a current block, calculate a cost for each candidate in the candidate list, and generate a prediction block of the current block based on the cost.
- the candidate list can include at least one of a candidate derived based on a regular mode or a candidate derived based on a merge mode.
- a candidate derived based on the Regular mode can be derived based on an intra prediction mode of a neighboring block adjacent to the current block.
- the candidate derived based on the merge mode can be derived based on a surrounding block to which template-based intra mode derivation (TIMD) is applied.
- TMD template-based intra mode derivation
- the cost can be calculated based on the difference between the predicted value and the restored value of the template of the current block, and the predicted value of the template of the current block can be generated based on the intra prediction mode of each candidate.
- the top two candidates can be selected from the candidate list in ascending order of the calculated cost.
- two prediction blocks can be generated based on the intra prediction modes of the two candidates, and the prediction block of the current block can be generated based on the weighted sum of the two prediction blocks.
- the weight of the weighted sum can be derived based on the cost corresponding to the two candidates.
- the prediction block of the current block can be generated using only the candidate with the smallest cost.
- the video encoding method and device can construct a candidate list including a plurality of candidates for a current block, calculate a cost for each candidate in the candidate list, and generate a prediction block of the current block based on the cost.
- the candidate list can include at least one of a candidate derived based on a regular mode or a candidate derived based on a merge mode.
- a computer-readable recording medium can store a bitstream encoded by the image encoding method.
- some components of the devices or some steps of the methods may be omitted. Furthermore, the order of some components of the devices or some steps of the methods may be changed. Furthermore, other components or other steps may be inserted into some components of the devices or some steps of the methods.
- each component shown in the embodiments of the present invention are independently depicted to represent different characteristic functions, and this does not mean that each component is composed of separate hardware or a single software component. 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 a single component may be divided into multiple components to perform a function. Such integrated and separate embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
- a block can be variously expressed as a unit, an area, a unit, a partition, etc.
- a sample can be variously expressed as a pixel, a pel, a pixel, etc.
- FIG. 1 is a block diagram showing an image encoding device according to the present disclosure.
- a video 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 segmentation unit (110) can segment 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 a unit that performs decoding.
- a prediction unit may be divided into at least one square or rectangular shape of the same size within a single coding unit, or may be divided such that one prediction unit among the divided prediction units within a single 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 prediction, and an intra prediction unit (125) that performs intra prediction or intra prediction. It may determine whether to use inter prediction or intra prediction for a prediction unit, and determine specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method.
- a residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130).
- prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value by the entropy encoding unit (165) and transmitted to the decoder.
- the inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous or subsequent pictures of the current picture, and in some cases, may predict a prediction unit based on information of a portion 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 less than an integer pixel from the reference picture.
- a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information less than an integer pixel in units of 1/4 pixels.
- a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information less than an integer pixel in units of 1/8 pixels.
- the motion prediction unit can perform motion prediction based on a reference picture interpolated by the 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 in units of 1/2 or 1/4 pixels 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 motion prediction methods.
- 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 has been performed and the reference pixel is a pixel on which inter prediction has been performed, the reference pixel included in the block on which inter prediction has been performed can be replaced and used with reference pixel information of the surrounding block on which intra prediction has been performed. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced and used with at least one reference pixel among the available reference pixels.
- a residual block containing residual value information which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit, 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 values converted to the frequency domain by 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 form through a coefficient scanning method.
- the rearrangement unit (160) can change the two-dimensional block-shaped coefficient into a one-dimensional vector form by scanning from the DC coefficient to the coefficient of the high-frequency region 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). Entropy encoding can use various encoding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC). In this regard, the entropy encoding unit (165) can encode residual value coefficient information of the encoding unit from the rearrangement unit (160) and the prediction units (120, 125). In addition, according to the present disclosure, 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.
- CAVLC Context-Adaptive Variable Length Coding
- CABAC Context-Adaptive Binary Arithmetic Coding
- the inverse quantization unit (140) and the inverse transformation unit (145) inversely quantize the values quantized in the quantization unit (135) and inversely transform the values transformed in the transformation unit (130).
- the residual values generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted prediction units predicted 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 the offset from the original image on a pixel-by-pixel basis for the image on which deblocking has been performed.
- a method may be used in which the pixels included in the image are divided into a certain number of regions, the regions to be offset are determined, and the offset is applied to the regions, or the offset is applied by considering edge information of each pixel.
- the 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 disclosure.
- the image decoding device (200) may include an entropy decoding unit (210), a rearrangement 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 the entropy encoding unit of the video encoder. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) can be applied in response to the method performed in the video encoder.
- various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) can be applied in response to the method performed in the video encoder.
- CAVLC Context-Adaptive Variable Length Coding
- CABAC Context-Adaptive Binary Arithmetic Coding
- the entropy decoding unit (210) can decode information related to intra prediction and inter prediction performed in the encoder.
- the reordering unit (215) can perform reordering based on the method by which the bitstream 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 by the encoder 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 encoder.
- the inverse transform can be performed based on the transmission unit determined by the image encoder.
- a transform technique e.g., DCT, DST, KLT
- a transform technique can be selectively performed according to a plurality of pieces of information, such as a prediction method, the size of the current block, and the prediction direction.
- the prediction unit (230, 235) can generate a prediction block based on the prediction block generation related information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by 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 encoder (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 image encoder. 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 within 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 image encoder.
- the intra prediction unit (235) may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter.
- the AIS filter is a unit that performs filtering on the reference pixels of the current block and can determine whether to apply the filter based on the prediction mode of the current prediction unit and apply it.
- AIS filtering can 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 image encoder. 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 from 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.
- the deblocking filter of the video decoder can receive information related to the deblocking filter provided by the video encoder, and the video decoder can perform deblocking filtering on the corresponding block.
- 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 and information on the offset value.
- ALF can be applied to the encoding unit based on information on whether ALF is applied and ALF coefficient information provided from the encoder. This 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.
- TIMD may be a method for calculating a cost for a given intra prediction mode based on a template of a current block, and deriving an optimal intra prediction mode based on the calculated cost.
- a predicted value of the template may be generated based on the given intra prediction mode, and a difference (e.g., SAD, SATD) between the predicted value of the template and a reconstructed value may be defined as the cost.
- the given intra prediction mode may be an intra prediction mode of a candidate belonging to a given candidate list, and the candidate may be derived based on one or more blocks belonging to a pre-decoded region prior to the current block.
- one or more intra prediction modes can be derived. If one intra prediction mode is derived, the prediction block of the current block can be generated based on that intra prediction mode. Alternatively, if two or more intra prediction modes are derived, two or more prediction blocks can be generated based on the two or more intra prediction modes, and the final prediction block can be generated through a weighted sum of the two or more prediction blocks.
- the left and/or top surrounding areas adjacent to the current block can be used as templates. If the left and/or top surrounding areas extend beyond the picture boundary, the surrounding areas may not be used as templates. For example, if the left surrounding area extends beyond the picture boundary but the top surrounding area does not, the top surrounding area may be used as a template. Alternatively, if the top surrounding area extends beyond the picture boundary but the left surrounding area does not, the left surrounding area may be used as a template. If the left and top surrounding areas extend beyond the picture boundary, the intra prediction mode of the current block may be set to a predefined mode (e.g., Planar mode).
- a predefined mode e.g., Planar mode
- the upper peripheral area constituting the template can be defined as a WxN area, and the left peripheral area constituting the template can be defined as a NxH area.
- W can be equal to or less than the width of the current block.
- H can be equal to or less than the height of the current block.
- the present invention is not limited thereto, and the H of the template can be set to be greater than the height of the current block.
- the size (N) of the template can be a value predefined for the encoder and decoder.
- the predefined value can be an integer of 1, 2, 3, 4, or more.
- the size (N) of the template can be variable based on the size of the current block. For example, when the width and height of the current block are less than or equal to 8, the size (N) of the template can be 2, and otherwise, the size (N) of the template can be 4.
- the upper peripheral region constituting the template may be a 4x4 region
- the left peripheral region constituting the template may be a 2x16 region.
- the upper peripheral region constituting the template may be a 16x2 region
- the left peripheral region constituting the template may be a 4x4 region.
- Figure 3 illustrates a TIMD-based prediction method according to the present disclosure.
- a candidate list including multiple candidates for the current block can be constructed (S300).
- Candidates in the candidate list according to the present disclosure can be derived based on the intra prediction modes of neighboring blocks adjacent to the current block.
- the neighboring blocks may include at least one of a left neighboring block, an upper neighboring block, an upper-left neighboring block, a lower-left neighboring block, or an upper-right neighboring block.
- the candidate list and candidates according to Embodiment 1 may also be referred to as an MPM list and an MPM candidate.
- the candidate list may consist of a minimum of 22 candidates and a maximum of 25 candidates.
- Candidates in the candidate list according to the present disclosure can be derived based on surrounding blocks to which TIMD is applied. Each candidate may have at least one of the intra prediction modes derived based on TIMD or weighting information for weighted summation between predicted blocks.
- the candidate list and candidates according to Embodiment 2 may also be referred to as a TIMD merge list and merge candidates.
- the above-mentioned neighboring blocks may include at least one of adjacent blocks or non-adjacent blocks of the current block.
- the adjacent blocks may include at least one of an upper neighboring block, a left neighboring block, a lower left neighboring block, an upper right neighboring block, or an upper left neighboring block.
- a non-adjacent block may refer to a block encoded before the current block and not adjacent to the current block.
- the positions of non-adjacent blocks available to the current block may be defined as shown in FIG. 4.
- the numbers in FIG. 4 may indicate the priority order of blocks referenced to construct a candidate list.
- a TIMD merge list can have at most N merge candidates, where N can be an integer greater than or equal to 1.
- N can be an integer greater than or equal to 1.
- a TIMD merge list can be structured as shown in Table 1 below.
- the candidate list according to the present disclosure may include candidates derived based on the Regular mode and candidates derived based on the Merge mode. This may be referred to as a combination list, and the combination list may have M candidates, where M may be an integer greater than or equal to 1.
- M may be an integer greater than or equal to 1.
- the candidate list according to the combination mode can be structured as shown in Table 2 below.
- candidates 1 to 10 may be derived based on the merge mode, and candidate 11 may be derived based on the regular mode.
- Candidate 11 may be a combination of the top two MPM candidates in ascending order of cost. That is, IPM 11,1 may represent the intra prediction mode of the first MPM candidate in ascending order of cost, and IPM 11,2 may represent the intra prediction mode of the other MPM candidate.
- the weight information of candidate 11 may be derived based on the cost of IPM 11,1 and the cost of IPM 11,2 , and for example, this may be derived as shown in Equation 2 described below.
- a candidate list according to the present disclosure may include multiple intra prediction modes for matrix-based intra prediction (MIP).
- the matrix may be a matrix trained on an arbitrary data set.
- the matrix may have a size of NxM, where N and M may each be integers greater than or equal to 1.
- the matrix for MIP may be selected explicitly or implicitly.
- the reference region for matrix operations can have a size equal to the width (Width) x N of the current block or the height (Height) x N of the current block.
- N can be an integer greater than or equal to 1.
- the number of reference sample lines (M) that constitute the reference region can be variable. M can be an integer greater than or equal to 1.
- the candidate list according to the present disclosure may include a candidate based on the aforementioned MIP mode and a candidate based on at least one of Embodiments 1 to 2.
- the encoder and decoder may define one or more TIMD modes.
- the one or more TIMD modes may include at least one of the aforementioned Regular mode, Merge mode, Combination mode 1, MIP mode, or Combination mode 2.
- the encoder may determine an optimal mode among the multiple TIMD modes and encode an index for specifying the optimal mode into the bitstream.
- the decoder may determine the TIMD mode of the current block based on the corresponding index signaled through the bitstream.
- the cost can be calculated for each candidate in the candidate list (S310).
- a prediction value for the template of the current block can be generated based on the intra prediction mode of each candidate.
- the difference e.g., SAD, SATD
- a cost can be derived based on the calculated difference.
- each candidate may have two or more intra prediction modes.
- each candidate has two intra prediction modes.
- the first difference between the predicted value of the template and the reconstructed value can be calculated based on one of the two intra prediction modes (IPM 1 ), and the second difference between the predicted value of the template and the reconstructed value can be calculated based on the other (IPM 2 ).
- the cost of the candidate can be calculated by a weighted sum of the first and second differences.
- the weights for the weighted sum can be set based on the weight information of the candidate.
- the cost of each candidate can be calculated as in the following mathematical equation (1).
- Cost (cost1 * W1) + (cost2 * W2) >> shift
- cost1 may represent the first difference between the predicted value and the restored value of the template calculated based on IPM 1.
- cost2 may represent the second difference between the predicted value and the restored value of the template calculated based on IPM 2.
- W1 is weight information stored in the candidate, and may represent the weight applied to the prediction block generated based on IPM 1.
- W2 is weight information stored in the candidate, and may represent the weight applied to the prediction block generated based on IPM 2 .
- weights can be applied to calculate costs for candidates based on merge mode, while costs for candidates based on regular mode can be calculated without weights.
- the cost for a candidate based on regular mode can be calculated as the sum of the costs calculated for each intra prediction mode.
- costs can be calculated without applying weights to both merge-mode and regular-mode candidates.
- the cost of each candidate can be calculated as the sum of the costs calculated for each intra prediction mode.
- a prediction block of the current block can be generated based on the calculated cost (S320).
- the top K candidates can be selected in ascending order of their calculated costs.
- the candidates within the candidate list can also be reordered in ascending order of their calculated costs.
- Prediction blocks can be generated based on the intra-prediction modes of the selected candidates.
- K can be an integer of 1, 2, or a larger number.
- the prediction block for the current block can be generated based on the intra prediction mode of that candidate. If the selected candidate has two intra prediction modes, two prediction blocks can be generated based on the two intra prediction modes.
- the final prediction block can also be generated by weighting the two prediction blocks based on the weight information of the selected candidate.
- two prediction blocks can be generated based on the intra prediction modes of the two candidates, and a final prediction block can be generated through a weighted sum of the two generated prediction blocks.
- the weights for the weighted sum can be derived based on the costs of the selected candidates, as shown in the following mathematical expression 2.
- the final prediction block can be generated as shown in the following mathematical expression 3.
- M1 and M2 may denote intra prediction modes corresponding to the top two candidates in ascending order of cost.
- the prediction block of the current block may be generated using only the candidate (M1) with the smallest cost.
- the cost of M1 may be determined to be significantly smaller than the cost of M2.
- a weight of 1 may be applied to the prediction block (Pred M1 ) generated based on M1
- a weight of 0 may be applied to the prediction block (Pred M2 ) generated based on M2.
- one full-RD process can be performed in the encoder using the final derived prediction block.
- one of the top two candidates in ascending order of the calculated cost can be selected, and a prediction block for the current block can be generated based on the selected candidate.
- a prediction block for the current block can be generated based on the selected candidate.
- two prediction blocks can be generated based on the two intra prediction modes (IPM 1 and IPM 2 ) of the selected candidate, and the final prediction block can be generated by weighting the two prediction blocks based on the weight information of the selected candidate.
- the encoder can select the optimal candidate among the top two candidates and encode an index to specify it into the bitstream.
- the decoder can then select one of the top two candidates based on the index signaled through the bitstream.
- the predicted block for the current block can be generated based on the candidate with the smallest cost (i.e., the first candidate) among the top two candidates in ascending order.
- the candidate list may refer to a TIMD merge list or a combination list. In this case, the signaling of an index for specifying one of the top two candidates may be omitted.
- the threshold can be derived by applying an arbitrary weight to the value of the smallest cost within the candidate list.
- the weight can be a real number greater than or equal to 1. For example, if the value of the smallest cost is assumed to be 1000, the threshold can be derived through operations such as (1000*1.2) or (1000+1.2).
- the threshold may be derived based on the costs of candidates in the MPM list.
- the threshold may be derived by applying a specific weight to the cost of the top candidate in ascending order of cost within the MPM list.
- the threshold may be derived by applying a specific weight to the average of the costs of the top two candidates in ascending order of cost within the MPM list.
- the threshold may be derived by applying a specific weight to the cost of the top one candidate in descending order of cost within the MPM list.
- the threshold may be derived by applying a specific weight to the average of the costs of the top two candidates in descending order of cost within the MPM list.
- the specific weight here may be a real number greater than or equal to 1.
- the threshold can be derived by applying a specific weight to the cost of the merge mode-based candidate without referencing the Regular mode-based candidate.
- the threshold can be derived by applying a specific weight to the cost of the first candidate in ascending cost order.
- the weight can be a real number greater than or equal to 1.
- the weight can be 1.2.
- the prediction block of the current block can be generated based on the first candidate. In this case, the signaling of the index for specifying either of the top two candidates in ascending cost order within the merge mode-based candidate list can be omitted.
- the top N candidates can be selected by sorting the MIP mode-based candidates in the candidate list in ascending order of cost.
- the top M candidates can be selected by sorting the remaining candidates in the candidate list in ascending order of cost.
- N and M can be integers greater than or equal to 1.
- N and M can be the same value or different values.
- the final prediction block of the current block can be generated by a weighted sum of the prediction blocks generated based on the top N candidates and the prediction blocks generated based on the top M candidates.
- FIG. 5 illustrates a matrix-based intra prediction method according to the present disclosure.
- Matrix-based intra prediction may be a method of generating a prediction block by applying a pre-defined matrix (or weight) to a reference region adjacent to the current block.
- the following mathematical expression 5 is an example of generating prediction samples through MIP.
- Equation 5 r(k) represents a reference sample, F(x,y) represents a matrix applied to the reference sample, and P(x,y) may represent a prediction sample.
- k may represent an index of a reference sample within the reference region.
- the reference sample may be a pre-reconstructed sample within the reference region, or may be derived through a combination of two or more pre-reconstructed samples.
- a reference region for MIP may include one or more sample lines.
- the reference region may include at least one of an adjacent sample line or a non-adjacent sample line of the current block.
- the non-adjacent sample line may be a sample line that is N samples away from the boundary of the current block. N may be an integer greater than or equal to 1, and the number of non-adjacent sample lines constituting the reference region may be 1 or more.
- a candidate list for the current block can be constructed (S500).
- the method of constructing the candidate list is as described with reference to Fig. 3.
- An extended candidate list can be generated based on the candidate list (S510).
- An extended candidate list can be generated by combining candidates (i.e., intra prediction modes) in the candidate list with two or more reference sample lines adjacent to the current block.
- the reference sample line may include at least one of a reference sample line adjacent to the current block (reference sample line 0) or K consecutive reference sample lines adjacent to reference sample line 0 (reference sample lines 1 to K). For example, all of the reference sample lines 0 to K may be used, or some of the reference sample lines 0 to K may be selectively used.
- the candidate list of the current block is structured as shown in Table 3 below, and sample lines 1, 3, 5, 7, and 12 are used to construct the extended candidate list.
- the candidate numbers in Table 3 may represent the numbers of the intra prediction modes.
- a first extended candidate list consisting of 50 combinations can be generated as shown in Table 4 below through a combination between the intra prediction mode of the candidate list and the reference sample line.
- Index Reference sample line index candidate 0 1 39 1 1 38 2 1 40 3 1 37 ... ... ... 9 1 5 10 1 39 11 1 38 12 1 40 13 1 37 ... ... ... 19 1 5 20 1 39 21 1 38 22 1 40 23 1 37 ... ... ... 29 1 5 30 1 39 31 1 38 32 1 40 33 1 37 ... ... ... 39 1 5 40 1 39 41 1 38 42 1 40 43 1 37 ... ... ... 49 1 5
- intra prediction can be performed on a given template region based on that combination to generate a predicted value for that template region.
- the cost e.g., SAD, SATD
- SAD predicted value for the template region
- SATD base-reconstructed value
- the top M combinations can be selected in ascending order of the calculated costs, and a second expanded candidate list can be generated based on the selected top M combinations.
- the top M combinations can be arranged in the second expanded candidate list in ascending order of costs.
- combinations with the same intra prediction mode can be eliminated through a redundancy check among the M combinations that make up the second extended candidate list. For example, among combinations with the same intra prediction mode, all combinations except the one with the lowest cost can be eliminated from the second extended candidate list.
- a reference area for MIP can be determined based on the extended candidate list (S520).
- An index for specifying at least one of the combinations constituting the aforementioned extended candidate list may be signaled via the bitstream.
- a reference region for MIP may be determined based on a reference sample line of the combination corresponding to the index.
- an index for specifying at least one of the 20 combinations can be encoded based on Truncated Golomb-Rice Coding.
- the index can be encoded into up to six bins to which context coding is applied.
- the binarization of the index can be defined as shown in Table 5 below.
- combinations within the first or second extended candidate list may be grouped into multiple groups. Each group may consist of one or more combinations. For example, T consecutive combinations within the first or second extended candidate list may be designated as a group. Here, T may be an integer of 2, 3, 4, 5, or more.
- the threshold can be derived based on the cost of the combination corresponding to the first index within the group (i.e., the combination with the lowest cost). For example, the threshold can be set to a value equal to 2 times the cost of the combination corresponding to the first index within the group.
- combinations of the second extended candidate list can be grouped into multiple groups, and a reference region for MIP can be determined based on any one of the multiple groups.
- a reference region for MIP can be determined based on a reference sample line of a combination belonging to any of the selected groups.
- a prediction block of the current block can be generated based on the reference area (S530).
- the template area for generating the extended candidate list may include reference sample line 0.
- the template area may include reference sample lines other than reference sample line 0.
- the template area may be composed of one or more reference sample lines.
- a template area can be set by extending from reference sample line 0 to consecutive reference sample lines.
- the area corresponding to reference sample lines 0 and 1 may be set as a template area.
- an extended candidate list may be generated based on reference sample lines 3, 5, 7, and 12.
- reference sample lines including reference sample lines 1, 3, 5, 7, and 12 can be set as template areas.
- the width and height of the current block are W and H
- the width of the top template of the current block may be less than or equal to W
- the height of the left template of the current block may be less than or equal to H.
- an extended candidate list can be generated without using the top or left template, based on the structure of the current block.
- the structure can refer to the current block's position within a picture, slice, tile, or CTU row, the shape of the current block, or the partitioning structure of the current block.
- N can be a real number greater than or equal to 1.
- N can be a real number greater than or equal to 1.
- An extended candidate list may be generated based on all or part of the configuration method of the template area described above, and a reference area for the MIP may be determined.
- the above-described prediction method can be equally applied to an image encoding device and an image decoding device.
- 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., operating systems, applications, firmware, programs, 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 executable on the device or computer.
- software or machine-executable instructions e.g., operating systems, applications, firmware, programs, 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
Description
본 발명은 비디오 신호 처리 방법 및 장치에 관한 것이다.The present invention relates to a video signal processing 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 growing, necessitating technologies capable of efficiently compressing high-resolution images. To address this market need, the ISO/IEC's Moving Picture Expert Group (MPEG) and the ITU-T's Video Coding Expert Group (VCEG) jointly formed the Joint Collaborative Team on Video Coding (JCT-VC). They completed development of the HEVC (High Efficiency Video Coding) video compression standard in January 2013 and have been actively conducting research and development on next-generation compression standards.
동영상 압축은 크게 인트라 예측, 인터 예측, 변환, 양자화, 엔트로피 부호화, 인루프 필터로 구성된다. 이 중, 인트라 예측은 현재 블록 주변에 존재하는 복원된 화소들을 이용하여 현재 블록을 위한 예측 블록을 생성하는 기술을 말한다. 부호화기는 인트라 예측에 사용된 인트라 예측 모드를 부호화하고, 복호화기는 부호화된 인트라 예측 모드를 복원하여 인트라 예측을 수행한다.Video compression largely consists of intraprediction, interprediction, transform, quantization, entropy coding, and in-loop filtering. Among these, intraprediction refers to a technique that generates a prediction block for the current block using reconstructed pixels surrounding the current block. The encoder encodes the intraprediction mode used for intraprediction, and the decoder performs intraprediction by reconstructing the encoded intraprediction mode.
본 개시에 따르면, TIMD 기반의 인트라 예측 방법 맟 장치를 제공한다.According to the present disclosure, a TIMD-based intra prediction method and device are provided.
본 개시는 MIP 모드를 위한 참조 샘플 라인의 결정 방법 및 장치를 제공한다.The present disclosure provides a method and device for determining a reference sample line for MIP mode.
본 개시에 따르면, MIP 모드를 묵시적으로 시그날링하는 방법 및 장치를 제공한다.According to the present disclosure, a method and device for implicitly signaling a MIP mode are provided.
본 개시에 따른 영상 복호화 방법 및 장치는, 현재 블록에 대해 복수의 후보를 포함한 후보 리스트를 구성하고, 상기 후보 리스트 내 각 후보에 대해 코스트를 산출하고, 상기 코스트를 기반으로 상기 현재 블록의 예측 블록을 생성할 수 있다. 여기서, 상기 후보 리스트는 Regular 모드를 기반으로 유도되는 후보 또는 머지 모드를 기반으로 유도되는 후보 중 적어도 하나를 포함할 수 있다.The video decoding method and device according to the present disclosure can construct a candidate list including multiple candidates for a current block, calculate a cost for each candidate in the candidate list, and generate a prediction block of the current block based on the cost. Here, the candidate list can include at least one of a candidate derived based on a regular mode or a candidate derived based on a merge mode.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 Regular 모드를 기반으로 유도되는 후보는, 상기 현재 블록에 인접한 주변 블록의 인트라 예측 모드를 기반으로 유도될 수 있다.In the image decoding method and device according to the present disclosure, a candidate derived based on the Regular mode can be derived based on an intra prediction mode of a neighboring block adjacent to the current block.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 머지 모드를 기반으로 유도되는 후보는, TIMD(template-based intra mode derivation)가 적용된 주변 블록을 기반으로 유도될 수 있다.In the image decoding method and device according to the present disclosure, the candidate derived based on the merge mode can be derived based on a surrounding block to which template-based intra mode derivation (TIMD) is applied.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 코스트는, 상기 현재 블록의 템플릿의 예측값과 복원값 간의 차이를 기반으로 산출될 수 있고, 상기 현재 블록의 템플릿의 예측값은, 상기 각 후보의 인트라 예측 모드를 기반으로 생성될 수 있다.In the video decoding method and device according to the present disclosure, the cost can be calculated based on the difference between the predicted value and the restored value of the template of the current block, and the predicted value of the template of the current block can be generated based on the intra prediction mode of each candidate.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 후보 리스트로부터, 상기 산출된 코스트의 오름차순으로 상위 둘의 후보가 선택될 수 있다.In the video decoding method and device according to the present disclosure, the top two candidates can be selected from the candidate list in ascending order of the calculated cost.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 둘의 후보의 인트라 예측 모드를 기반으로 둘의 예측 블록이 각각 생성될 수 있고, 상기 둘의 예측 블록의 가중합을 기반으로 상기 현재 블록의 예측 블록이 생성될 수 있다.In the video decoding method and device according to the present disclosure, two prediction blocks can be generated based on the intra prediction modes of the two candidates, and the prediction block of the current block can be generated based on the weighted sum of the two prediction blocks.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 가중합을 가중치는, 상기 둘의 후보에 대응하는 코스트를 기반으로 유도될 수 있다.In the image decoding method and device according to the present disclosure, the weight of the weighted sum can be derived based on the cost corresponding to the two candidates.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 둘의 후보 중 가장 작은 코스트를 가진 후보가 다른 후보의 코스트보다 현저히 작은 경우, 상기 가장 작은 코스트를 가진 후보만을 이용하여 상기 현재 블록의 예측 블록이 생성될 수 있다.In the video decoding method and device according to the present disclosure, if the candidate with the smallest cost among the two candidates is significantly smaller than the cost of the other candidates, the prediction block of the current block can be generated using only the candidate with the smallest cost.
본 개시에 따른 영상 부호화 방법 및 장치는, 현재 블록에 대해 복수의 후보를 포함한 후보 리스트를 구성하고, 상기 후보 리스트 내 각 후보에 대해 코스트를 산출하고, 상기 코스트를 기반으로 상기 현재 블록의 예측 블록을 생성할 수 있다. 여기서, 상기 후보 리스트는 Regular 모드를 기반으로 유도되는 후보 또는 머지 모드를 기반으로 유도되는 후보 중 적어도 하나를 포함할 수 있다.The video encoding method and device according to the present disclosure can construct a candidate list including a plurality of candidates for a current block, calculate a cost for each candidate in the candidate list, and generate a prediction block of the current block based on the cost. Here, the candidate list can include at least one of a candidate derived based on a regular mode or a candidate derived based on a merge mode.
본 개시에 따른 컴퓨터로 판독 가능한 기록 매체는, 상기 영상 부호화 방법에 의해 부호화된 비트스트림을 저장할 수 있다.A computer-readable recording medium according to the present disclosure can store a bitstream encoded by the image encoding method.
본 개시에 따르면, 인트라 예측 기술인 TIMD의 부/복호화 복잡도를 감소시킬 수 있다.According to the present disclosure, the encoding/decoding complexity of TIMD, an intra prediction technique, can be reduced.
본 개시에 따르면, MIP 기반의 예측에서, 참조 샘플 라인을 적응적으로 이용함으로써 인트라 예측의 정확도를 향상시킬 수 있다.According to the present disclosure, in MIP-based prediction, the accuracy of intra prediction can be improved by adaptively utilizing reference sample lines.
본 개시에 따르면, MIP 모드를 복호화기에 묵시적으로 전달함으로써, 부/복호화기의 압축 성능을 향상시킬 수 있다.According to the present disclosure, compression performance of a decoder/sub-decoder can be improved by implicitly transmitting a MIP mode to the decoder.
도 1은 본 개시에 따른 영상 부호화 장치를 나타낸 블록도이다.FIG. 1 is a block diagram showing an image encoding device according to the present disclosure.
도 2는 본 개시에 따른 영상 복호화 장치를 나타낸 블록도이다.FIG. 2 is a block diagram showing an image decoding device according to the present disclosure.
도 3은 본 개시에 따른 TIMD 기반의 예측 방법을 도시한 것이다.Figure 3 illustrates a TIMD-based prediction method according to the present disclosure.
도 4는 본 개시에 따른 일실시예로서, 현재 블록이 이용 가능한 비-인접 블록의 위치를 도시한 것이다.FIG. 4 is an example according to the present disclosure, showing the location of non-adjacent blocks available to the current block.
도 5는 본 개시에 따른 매트릭스 기반의 인트라 예측 방법을 도시한 것이다.FIG. 5 illustrates a matrix-based intra prediction method according to the present disclosure.
본 개시에 따른 영상 복호화 방법 및 장치는, 현재 블록에 대해 복수의 후보를 포함한 후보 리스트를 구성하고, 상기 후보 리스트 내 각 후보에 대해 코스트를 산출하고, 상기 코스트를 기반으로 상기 현재 블록의 예측 블록을 생성할 수 있다. 여기서, 상기 후보 리스트는 Regular 모드를 기반으로 유도되는 후보 또는 머지 모드를 기반으로 유도되는 후보 중 적어도 하나를 포함할 수 있다.The video decoding method and device according to the present disclosure can construct a candidate list including multiple candidates for a current block, calculate a cost for each candidate in the candidate list, and generate a prediction block of the current block based on the cost. Here, the candidate list can include at least one of a candidate derived based on a regular mode or a candidate derived based on a merge mode.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 Regular 모드를 기반으로 유도되는 후보는, 상기 현재 블록에 인접한 주변 블록의 인트라 예측 모드를 기반으로 유도될 수 있다.In the image decoding method and device according to the present disclosure, a candidate derived based on the Regular mode can be derived based on an intra prediction mode of a neighboring block adjacent to the current block.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 머지 모드를 기반으로 유도되는 후보는, TIMD(template-based intra mode derivation)가 적용된 주변 블록을 기반으로 유도될 수 있다.In the image decoding method and device according to the present disclosure, the candidate derived based on the merge mode can be derived based on a surrounding block to which template-based intra mode derivation (TIMD) is applied.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 코스트는, 상기 현재 블록의 템플릿의 예측값과 복원값 간의 차이를 기반으로 산출될 수 있고, 상기 현재 블록의 템플릿의 예측값은, 상기 각 후보의 인트라 예측 모드를 기반으로 생성될 수 있다.In the video decoding method and device according to the present disclosure, the cost can be calculated based on the difference between the predicted value and the restored value of the template of the current block, and the predicted value of the template of the current block can be generated based on the intra prediction mode of each candidate.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 후보 리스트로부터, 상기 산출된 코스트의 오름차순으로 상위 둘의 후보가 선택될 수 있다.In the video decoding method and device according to the present disclosure, the top two candidates can be selected from the candidate list in ascending order of the calculated cost.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 둘의 후보의 인트라 예측 모드를 기반으로 둘의 예측 블록이 각각 생성될 수 있고, 상기 둘의 예측 블록의 가중합을 기반으로 상기 현재 블록의 예측 블록이 생성될 수 있다.In the video decoding method and device according to the present disclosure, two prediction blocks can be generated based on the intra prediction modes of the two candidates, and the prediction block of the current block can be generated based on the weighted sum of the two prediction blocks.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 가중합을 가중치는, 상기 둘의 후보에 대응하는 코스트를 기반으로 유도될 수 있다.In the image decoding method and device according to the present disclosure, the weight of the weighted sum can be derived based on the cost corresponding to the two candidates.
본 개시에 따른 영상 복호화 방법 및 장치에 있어서, 상기 둘의 후보 중 가장 작은 코스트를 가진 후보가 다른 후보의 코스트보다 현저히 작은 경우, 상기 가장 작은 코스트를 가진 후보만을 이용하여 상기 현재 블록의 예측 블록이 생성될 수 있다.In the video decoding method and device according to the present disclosure, if the candidate with the smallest cost among the two candidates is significantly smaller than the cost of the other candidates, the prediction block of the current block can be generated using only the candidate with the smallest cost.
본 개시에 따른 영상 부호화 방법 및 장치는, 현재 블록에 대해 복수의 후보를 포함한 후보 리스트를 구성하고, 상기 후보 리스트 내 각 후보에 대해 코스트를 산출하고, 상기 코스트를 기반으로 상기 현재 블록의 예측 블록을 생성할 수 있다. 여기서, 상기 후보 리스트는 Regular 모드를 기반으로 유도되는 후보 또는 머지 모드를 기반으로 유도되는 후보 중 적어도 하나를 포함할 수 있다.The video encoding method and device according to the present disclosure can construct a candidate list including a plurality of candidates for a current block, calculate a cost for each candidate in the candidate list, and generate a prediction block of the current block based on the cost. Here, the candidate list can include at least one of a candidate derived based on a regular mode or a candidate derived based on a merge mode.
본 개시에 따른 컴퓨터로 판독 가능한 기록 매체는, 상기 영상 부호화 방법에 의해 부호화된 비트스트림을 저장할 수 있다.A computer-readable recording medium according to the present disclosure can store a bitstream encoded by the image encoding method.
본 명세서에 첨부된 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.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 implement 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 the drawings, parts irrelevant to the description have been omitted to clearly explain the present invention, and similar parts have been designated with similar 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 a part throughout this specification is said to "include" a component, this does not mean that other components are excluded, but rather that other components may be included, unless specifically stated otherwise.
또한, 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Additionally, while terms such as "first," "second," etc. may be used to describe various components, these components should not be limited by these terms. These terms are used solely to distinguish one component from another.
또한, 본 명세서에서 설명되는 장치 및 방법에 관한 실시예에 있어서, 장치의 구성 일부 또는 방법의 단계 일부는 생략될 수 있다. 또한 장치의 구성 일부 또는 방법의 단계 일부의 순서가 변경될 수 있다. 또한 장치의 구성 일부 또는 방법의 단계 일부에 다른 구성 또는 다른 단계가 삽입될 수 있다.Additionally, in the embodiments of the devices and methods described herein, some components of the devices or some steps of the methods may be omitted. Furthermore, the order of some components of the devices or some steps of the methods may be changed. Furthermore, other components or other steps may be inserted into some components of the devices or some steps of the methods.
또한, 본 발명의 제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 this does not mean that each component is composed of separate hardware or a single software component. 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 a single component may be divided into multiple components to perform a function. Such integrated and separate embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
본 명세서에서, 블록은 단위, 영역, 유닛, 파티션 등으로 다양하게 표현될 수 있고, 샘플은 화소, 펠(pel), 픽셀 등으로 다양하게 표현될 수 있다.In this specification, a block can be variously expressed as a unit, an area, a unit, a partition, etc., and a sample can be variously expressed as a pixel, a pel, a pixel, etc.
이하, 첨부한 도면들을 참조하여, 본 발명의 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 동일한 구성요소에 대해서 중복된 설명은 생략한다. Hereinafter, embodiments of the present invention will be described in more detail with reference to the attached drawings. In describing the present invention, duplicate descriptions of identical components will be omitted.
도 1은 본 개시에 따른 영상 부호화 장치를 나타낸 블록도이다. FIG. 1 is a block diagram showing an image encoding device according to the present disclosure.
도 1을 참조하면, 영상 부호화 장치(100)는 픽쳐 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.Referring to FIG. 1, a video 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 segmentation unit (110) can segment 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 embodiments of the present disclosure, the coding unit may be used to mean a unit that performs encoding or 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 a single coding unit, or may be divided such that one prediction unit among the divided prediction units within a single coding unit has a different shape and/or size from another prediction unit. When a prediction unit that performs intra prediction based on a coding unit is generated and 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 prediction, and an intra prediction unit (125) that performs intra prediction or intra prediction. It may determine whether to use inter prediction or intra prediction for a prediction unit, and determine specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. A residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130). In addition, prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value by the entropy encoding unit (165) and transmitted to the decoder.
인터 예측부(120)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽쳐 보간부, 움직임 예측부, 움직임 보상부를 포함할 수 있다.The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous or subsequent pictures of the current picture, and in some cases, may predict a prediction unit based on information of a portion 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 less than an integer pixel from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information less than an integer pixel in units of 1/4 pixels. In the case of a chrominance signal, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information less than 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 the 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 in units of 1/2 or 1/4 pixels 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 motion prediction methods.
인트라 예측부(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 has been performed and the reference pixel is a pixel on which inter prediction has been performed, the reference pixel included in the block on which inter prediction has been performed can be replaced and used with reference pixel information of the surrounding block on which intra prediction has been performed. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced and used with at least one reference pixel among the available reference pixels.
또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다. Additionally, a residual block containing residual value information, which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit, 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 values converted to the frequency domain by 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 form through a coefficient scanning method. For example, the rearrangement unit (160) can change the two-dimensional block-shaped coefficient into a one-dimensional vector form by scanning from the DC coefficient to the coefficient of the high-frequency region 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). Entropy encoding can use various encoding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC). In this regard, the entropy encoding unit (165) can encode residual value coefficient information of the encoding unit from the rearrangement unit (160) and the prediction units (120, 125). In addition, according to the present disclosure, 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)을 생성할 수 있다. The inverse quantization unit (140) and the inverse transformation unit (145) inversely quantize the values quantized in the quantization unit (135) and inversely transform the values transformed in the transformation unit (130). The residual values generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted prediction units predicted 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 the offset from the original image on a pixel-by-pixel basis for the image on which deblocking has been performed. In order to perform offset correction for a specific picture, a method may be used in which the pixels included in the image are divided into a certain number of regions, the regions to be offset are determined, and the offset is applied to the regions, or the offset is applied by considering edge information of each pixel. The ALF (Adaptive Loop Filtering) may be performed based on a value obtained by comparing the filtered restored image with the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the group is 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는 본 개시에 따른 영상 복호화 장치를 나타낸 블록도이다. FIG. 2 is a block diagram showing an image decoding device according to the present disclosure.
도 2를 참조하면, 영상 복호화 장치(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)를 포함할 수 있다.Referring to FIG. 2, the image decoding device (200) may include an entropy decoding unit (210), a rearrangement 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 to 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 the entropy encoding unit of the video encoder. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) can be applied in response to the method performed in the video encoder.
엔트로피 복호화부(210)에서는 부호화기에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.The entropy decoding unit (210) can decode information related to intra prediction and inter prediction performed in the encoder.
재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. The reordering unit (215) can perform reordering based on the method by which the bitstream 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 by the encoder 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 encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit (225) of the image decoder, 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, the size of the current block, and the prediction direction.
예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다. The prediction unit (230, 235) can generate a prediction block based on the prediction block generation related information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by the memory (245).
전술한 바와 같이 영상 부호화기에서의 동작과 동일하게 인트라 예측 또는 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수도 있다.As described above, when performing intra prediction or intra prediction in the same manner as the operation in the image encoder, if the size of the prediction unit and the size of the 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, when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are different, 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 encoder (100) does not transmit motion prediction-related information for the inter prediction, but instead transmits information indicating that motion information is to 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 encoder (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 image encoder. 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 within 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 image encoder.
인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화기에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit (235) may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a unit that performs filtering on the reference pixels of the current block and can determine whether to apply the filter based on the prediction mode of the current prediction unit and apply it. AIS filtering can 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 image encoder. 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 from 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 about whether a deblocking filter has been applied to a corresponding block or picture can be received from a video encoding device, and if a deblocking filter has been applied, information about whether a strong or weak filter has been applied. The deblocking filter of the video decoder can receive information related to the deblocking filter provided by the video encoder, and the video decoder can perform deblocking filtering on the corresponding block.
오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다. 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 and information on the offset value. ALF can be applied to the encoding unit based on information on whether ALF is applied and ALF coefficient information provided from the encoder. This 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.
본 개시는 TIMD(Template-based Intra Mode Deriation) 기반의 예측 방법에 관한 것이다. TIMD는 현재 블록의 템플릿을 기반으로 소정의 인트라 예측 모드에 대한 코스트를 산출할 수 있고, 산출된 코스트를 기반으로 최적의 인트라 예측 모드를 유도하는 방법일 수 있다. 여기서, 소정의 인트라 예측 모드를 기반으로 상기 템플릿의 예측값(predictor)를 생성할 수 있고, 템플릿의 예측값과 복원값 간의 차이(예를 들어, SAD, SATD)가 코스트로 정의될 수 있다. 상기 소정의 인트라 예측 모드는, 소정의 후보 리스트에 속한 후보의 인트라 예측 모드일 수 있고, 후보는 현재 블록 이전에 기-복호화된 영역에 속한 하나 또는 그 이상의 블록을 기반으로 유도될 수 있다.The present disclosure relates to a prediction method based on Template-based Intra Mode Deriation (TIMD). TIMD may be a method for calculating a cost for a given intra prediction mode based on a template of a current block, and deriving an optimal intra prediction mode based on the calculated cost. Here, a predicted value of the template may be generated based on the given intra prediction mode, and a difference (e.g., SAD, SATD) between the predicted value of the template and a reconstructed value may be defined as the cost. The given intra prediction mode may be an intra prediction mode of a candidate belonging to a given candidate list, and the candidate may be derived based on one or more blocks belonging to a pre-decoded region prior to the current block.
TIMD를 기반으로 하나 또는 그 이상의 인트라 예측 모드가 유도될 수 있다. 하나의 인트라 예측 모드가 유도되는 경우, 해당 인트라 예측 모드를 기반으로 현재 블록의 예측 블록을 생성할 수 있다. 또는, 둘 이상의 인트라 예측 모드가 유도되는 경우, 둘 이상의 인트라 예측 모드를 기반으로 둘 이상의 예측 블록을 각각 생성할 수 있고, 둘 이상의 예측 블록의 가중합을 통해 최종 예측 블록을 생성할 수 있다. Based on TIMD, one or more intra prediction modes can be derived. If one intra prediction mode is derived, the prediction block of the current block can be generated based on that intra prediction mode. Alternatively, if two or more intra prediction modes are derived, two or more prediction blocks can be generated based on the two or more intra prediction modes, and the final prediction block can be generated through a weighted sum of the two or more prediction blocks.
현재 블록에 인접한 좌측 및/또는 상단 주변 영역이 템플릿으로 이용될 수있다. 만일 좌측 및/또는 상단 주변 영역이 픽쳐의 경계를 벗어나는 경우, 해당 주변 영역은 템플릿으로 이용되지 않을 수 있다. 예를 들어, 좌측 주변 영역이 픽쳐의 경계를 벗어나나 상단 주변 영역이 픽쳐의 경계를 벗어나지 않는 경우, 상단 주변 영역이 템플릿으로 이용될 수 있다. 또는, 상단 주변 영역이 픽쳐의 경계를 벗어나나 좌측 주변 영역이 픽쳐의 경계를 벗어나지 않는 경우, 좌측 주변 영역이 템플릿으로 이용될 수 있다. 좌측 및 상단 주변 영역이 픽쳐의 경계를 벗어나는 경우, 현재 블록의 인트라 예측 모드는 기-정의된 모드(예를 들어, Planar 모드)로 설정될 수 있다.The left and/or top surrounding areas adjacent to the current block can be used as templates. If the left and/or top surrounding areas extend beyond the picture boundary, the surrounding areas may not be used as templates. For example, if the left surrounding area extends beyond the picture boundary but the top surrounding area does not, the top surrounding area may be used as a template. Alternatively, if the top surrounding area extends beyond the picture boundary but the left surrounding area does not, the left surrounding area may be used as a template. If the left and top surrounding areas extend beyond the picture boundary, the intra prediction mode of the current block may be set to a predefined mode (e.g., Planar mode).
템플릿을 구성하는 상단 주변 영역은 WxN 영역으로 정의될 수 있고, 템플릿을 구성하는 좌측 주변 영역은 NxH 영역으로 정의될 수 있다. 여기서, W는 현재 블록의 너비와 같거나 작을 수 있다. 다만, 이에 한정되지 아니하며, 템플릿의 W는 현재 블록의 너비보다 크게 설정될 수도 있다. H는 현재 블록의 높이와 같거나 작을 수 있다. 다만, 이에 한정되지 아니하며, 템플릿의 H는 현재 블록의 높이보다 크게 설정될 수도 있다. 템플릿의 크기(N)는 부호화기와 복호화기에 기-정의된 값일 수 있다. 예를 들어, 기-정의된 값은 1, 2, 3, 4, 또는 그 이상의 정수일 수 있다. 또는, 템플릿의 크기(N)는 현재 블록의 크기에 기초하여 가변적일 수 있다. 예를 들어, 현재 블록의 너비와 높이가 8보다 작거나 같은 경우, 템플릿의 크기(N)은 2일 수 있고, 그렇지 않은 경우, 템플릿의 크기(N)는 4일 수 있다. 또는, 현재 블록이 4x16 블록인 경우, 템플릿을 구성하는 상단 주변 영역은 4x4 영역일 수 있고, 템플릿을 구성하는 좌측 주변 영역은 2x16 영역일 수 있다. 또는, 현재 블록이 16x4 블록인 경우, 템플릿을 구성하는 상단 주변 영역은 16x2 영역일 수 있고, 템플릿을 구성하는 좌측 주변 영역은 4x4 영역일 수 있다.The upper peripheral area constituting the template can be defined as a WxN area, and the left peripheral area constituting the template can be defined as a NxH area. Here, W can be equal to or less than the width of the current block. However, the present invention is not limited thereto, and the W of the template can be set to be greater than the width of the current block. H can be equal to or less than the height of the current block. However, the present invention is not limited thereto, and the H of the template can be set to be greater than the height of the current block. The size (N) of the template can be a value predefined for the encoder and decoder. For example, the predefined value can be an integer of 1, 2, 3, 4, or more. Alternatively, the size (N) of the template can be variable based on the size of the current block. For example, when the width and height of the current block are less than or equal to 8, the size (N) of the template can be 2, and otherwise, the size (N) of the template can be 4. Alternatively, if the current block is a 4x16 block, the upper peripheral region constituting the template may be a 4x4 region, and the left peripheral region constituting the template may be a 2x16 region. Alternatively, if the current block is a 16x4 block, the upper peripheral region constituting the template may be a 16x2 region, and the left peripheral region constituting the template may be a 4x4 region.
이하, 도 3을 참조하여 후보 리스트를 구성하는 방법 및 이를 기반으로 예측 블록을 생성하는 방법에 대해서 살펴보도록 한다.Below, with reference to Fig. 3, we will examine a method for constructing a candidate list and a method for generating a prediction block based on the same.
도 3은 본 개시에 따른 TIMD 기반의 예측 방법을 도시한 것이다.Figure 3 illustrates a TIMD-based prediction method according to the present disclosure.
도 3을 참조하면, 현재 블록에 대해 복수의 후보를 포함한 후보 리스트를 구성할 수 있다(S300).Referring to FIG. 3, a candidate list including multiple candidates for the current block can be constructed (S300).
실시예 1: Regular 모드Example 1: Regular mode
본 개시에 따른 후보 리스트의 후보는, 현재 블록에 인접한 주변 블록의 인트라 예측 모드를 기반으로 유도될 수 있다. 여기서, 주변 블록은, 좌측 주변 블록, 상단 주변 블록, 좌상단 주변 블록, 좌하단 주변 블록, 또는 우상단 주변 블록 중 적어도 하나를 포함할 수 있다. 실시예 1에 따른 후보 리스트와 후보는 MPM 리스트와 MPM 후보로 지칭될 수도 있다.Candidates in the candidate list according to the present disclosure can be derived based on the intra prediction modes of neighboring blocks adjacent to the current block. Here, the neighboring blocks may include at least one of a left neighboring block, an upper neighboring block, an upper-left neighboring block, a lower-left neighboring block, or an upper-right neighboring block. The candidate list and candidates according to Embodiment 1 may also be referred to as an MPM list and an MPM candidate.
기-구성된 후보 리스트 내에 DC 모드, 수평 모드 및/또는 수직 모드가 없는 경우, 해당 모드가 후보 리스트에 추가될 수 있다. 후보 리스트는 최소 22개의 후보로 구성될 수 있고, 최대 25개의 후보로 구성될 수 있다.If the DC mode, horizontal mode, and/or vertical mode are not present in the pre-configured candidate list, these modes may be added to the candidate list. The candidate list may consist of a minimum of 22 candidates and a maximum of 25 candidates.
실시예 2: 머지 모드Example 2: Merge Mode
본 개시에 따른 후보 리스트의 후보는, TIMD가 적용된 주변 블록을 기반으로 유도될 수 있다. 각 후보는, TIMD를 기반으로 유도된 인트라 예측 모드 또는 예측 블록 간의 가중합을 위한 가중치 정보 중 적어도 하나를 가질 수 있다. 실시예 2에 따른 후보 리스트와 후보는 TIMD 머지 리스트와 머지 후보로 지칭될 수도 있다.Candidates in the candidate list according to the present disclosure can be derived based on surrounding blocks to which TIMD is applied. Each candidate may have at least one of the intra prediction modes derived based on TIMD or weighting information for weighted summation between predicted blocks. The candidate list and candidates according to Embodiment 2 may also be referred to as a TIMD merge list and merge candidates.
상기 주변 블록은 현재 블록의 인접 블록 또는 비-인접 블록 중 적어도 하나를 포함할 수 있다. 인접 블록은 상단 주변 블록, 좌측 주변 블록, 좌하단 주변 블록, 우상단 주변 블록, 또는 좌상단 주변 블록 중 적어도 하나를 포함할 수 있다. 비-인접 블록은, 현재 블록 이전에 부호화된 블록으로서, 현재 블록에 인접하지 않은 블록을 의미할 수 있다. 예를 들어, 현재 블록이 이용 가능한 비-인접 블록의 위치는 도 4와 같이 정의될 수 있다. 도 4에서의 번호는 후보 리스트를 구성하기 위해 참조되는 블록의 우선순서를 나타낼 수 있다. The above-mentioned neighboring blocks may include at least one of adjacent blocks or non-adjacent blocks of the current block. The adjacent blocks may include at least one of an upper neighboring block, a left neighboring block, a lower left neighboring block, an upper right neighboring block, or an upper left neighboring block. A non-adjacent block may refer to a block encoded before the current block and not adjacent to the current block. For example, the positions of non-adjacent blocks available to the current block may be defined as shown in FIG. 4. The numbers in FIG. 4 may indicate the priority order of blocks referenced to construct a candidate list.
TIMD 머지 리스트는 최대 N개의 머지 후보를 가질 수 있고, N은 1보다 크거나 같은 정수일 수 있다. 예를 들어, TIMD 머지 리스트는 다음 표 1과 같이 구성될 수 있다.A TIMD merge list can have at most N merge candidates, where N can be an integer greater than or equal to 1. For example, a TIMD merge list can be structured as shown in Table 1 below.
실시예 3: 조합 모드 1Example 3: Combination Mode 1
본 개시에 따른 후보 리스트는, Regular 모드를 기반으로 유도되는 후보와 머지 모드를 기반으로 유도되는 후보를 포함할 수 있다. 이는, 조합 리스트로 지칭될 수 있고, 조합 리스트는 M개의 후보를 가질 수 있고, M은 1보다 크거나 같은 정수일 수 있다. Regular 모드 기반의 후보와 머지 모드 기반의 후보는 앞서 살펴본 바와 같으며, 여기서 중복된 설명은 생략하기로 한다. The candidate list according to the present disclosure may include candidates derived based on the Regular mode and candidates derived based on the Merge mode. This may be referred to as a combination list, and the combination list may have M candidates, where M may be an integer greater than or equal to 1. The candidates based on the Regular mode and the candidates based on the Merge mode have been previously discussed, and any duplicate description will be omitted here.
예를 들어, 조합 모드에 따른 후보 리스트는 다음 표 2와 같이 구성될 수 있다.For example, the candidate list according to the combination mode can be structured as shown in Table 2 below.
표 2에서, 1 내지 10번의 후보는 머지 모드를 기반으로 유도된 후보일 수 있고, 11번의 후보는 Regular 모드를 기반으로 유도된 후보일 수 있다. 11번의 후보는, 코스트의 오름차순으로 상위 2개의 MPM 후보의 조합일 수 있다. 즉, IPM11,1는 코스트의 오름차순으로 첫번째 MPM 후보의 인트라 예측 모드를 나타낼 수 있고, IPM11,2는 다른 MPM 후보의 인트라 예측 모드를 나타낼 수 있다. 또한, 11번 후보의 가중치 정보는 IPM11,1의 코스트와 IPM11,2의 코스트를 기반으로 유도될 수 있으며, 일예로 이는 후술할 수학식 2와 같이 유도될 수 있다.In Table 2, candidates 1 to 10 may be derived based on the merge mode, and candidate 11 may be derived based on the regular mode. Candidate 11 may be a combination of the top two MPM candidates in ascending order of cost. That is, IPM 11,1 may represent the intra prediction mode of the first MPM candidate in ascending order of cost, and IPM 11,2 may represent the intra prediction mode of the other MPM candidate. In addition, the weight information of candidate 11 may be derived based on the cost of IPM 11,1 and the cost of IPM 11,2 , and for example, this may be derived as shown in Equation 2 described below.
실시예 4: MIP 모드Example 4: MIP mode
본 개시에 따른 후보 리스트는, 매트릭스 기반의 인트라 예측(matrix-based intra prediction, MIP)을 위한 복수의 인트라 예측 모드를 포함할 수 있다. 여기서, 매트릭스는, 임의의 데이터 세트를 훈련된 매트릭스일 수 있다. 매트릭스는 NxM의 크기를 가질 수 있고, N과 M은 각각 1보다 크거나 같은 정수일 수 있다. MIP를 위한 매트릭스는 명시적 또는 묵시적으로 선택될 수 있다.A candidate list according to the present disclosure may include multiple intra prediction modes for matrix-based intra prediction (MIP). Here, the matrix may be a matrix trained on an arbitrary data set. The matrix may have a size of NxM, where N and M may each be integers greater than or equal to 1. The matrix for MIP may be selected explicitly or implicitly.
매트릭스 연산을 위한 참조 영역은, 현재 블록의 너비(Width)xN 또는 현재 블록의 높이(Height)xN의 크기를 가질 수 있다. N은 1보다 크거나 같은 정수일 수 있다. 참조 영역을 구성하는 참조 샘플 라인의 개수(M)는 가변적일 수 있다. M은 1보다 크거나 같은 정수일 수 있다.The reference region for matrix operations can have a size equal to the width (Width) x N of the current block or the height (Height) x N of the current block. N can be an integer greater than or equal to 1. The number of reference sample lines (M) that constitute the reference region can be variable. M can be an integer greater than or equal to 1.
실시예 5: 조합 모드 2 Example 5: Combination Mode 2
본 개시에 따른 후보 리스트는, 전술한 MIP 모드 기반의 후보 및 실시예 1 내지 2 중 적어도 하나에 기반한 후보를 포함할 수 있다.The candidate list according to the present disclosure may include a candidate based on the aforementioned MIP mode and a candidate based on at least one of Embodiments 1 to 2.
부호화기와 복호화기에는 하나 또는 그 이상의 TIMD 모드가 정의될 수 있다. 여기서, 하나 또는 그 이상의 TIMD 모드는 전술한 Regular 모드, 머지 모드, 조합 모드 1, MIP 모드, 또는 조합 모드 2 중 적어도 하나를 포함할 수 있다. 복수의 TIMD 모드가 정의된 경우, 부호화기는 복수의 TIMD 모드 중 최적의 모드를 결정하고, 이를 특정하기 위한 인덱스를 비트스트림에 부호화할 수 있다. 복호화기는 비트스트림을 통해 시그날링되는 해당 인덱스를 기반으로 현재 블록의 TIMD 모드를 결정할 수 있다.The encoder and decoder may define one or more TIMD modes. Here, the one or more TIMD modes may include at least one of the aforementioned Regular mode, Merge mode, Combination mode 1, MIP mode, or Combination mode 2. When multiple TIMD modes are defined, the encoder may determine an optimal mode among the multiple TIMD modes and encode an index for specifying the optimal mode into the bitstream. The decoder may determine the TIMD mode of the current block based on the corresponding index signaled through the bitstream.
후보 리스트 내 각 후보에 대해 코스트를 산출할 수 있다(S310).The cost can be calculated for each candidate in the candidate list (S310).
예를 들어, 각 후보의 인트라 예측 모드를 기반으로 현재 블록의 템플릿의 예측값을 생성할 수 있다. 생성된 예측값과 템플릿의 복원값 간의 차이(예를 들어, SAD, SATD)를 산출할 수 있다. 산출된 차이를 기반으로 코스트가 유도될 수 있다.For example, a prediction value for the template of the current block can be generated based on the intra prediction mode of each candidate. The difference (e.g., SAD, SATD) between the generated prediction value and the restored value of the template can be calculated. A cost can be derived based on the calculated difference.
또는, 각 후보가 둘 이상의 인트라 예측 모드를 가질 수 있다. 설명의 편의를 위해, 각 후보가 둘의 인트라 예측 모드를 가짐을 가정한다. 이 경우, 둘의 인트라 예측 모드 중 어느 하나(IPM1)를 기반으로 템플릿의 예측값과 복원값 간의 제1 차이를 산출할 수 있고, 다른 하나(IPM2)를 기반으로 템플릿의 예측값과 복원값 간의 제2 차이를 산출할 수 있다. 제1 차이와 제2 차이의 가중합을 통해 해당 후보의 코스트가 산출될 수 있다. 여기서, 가중합을 위한 가중치는 해당 후보의 가중치 정보를 기반으로 설정될 수 있다. 예를 들어, 각 후보의 코스트(Cost)는 다음 수학식 1과 같이 산출될 수 있다.Alternatively, each candidate may have two or more intra prediction modes. For convenience of explanation, it is assumed that each candidate has two intra prediction modes. In this case, the first difference between the predicted value of the template and the reconstructed value can be calculated based on one of the two intra prediction modes (IPM 1 ), and the second difference between the predicted value of the template and the reconstructed value can be calculated based on the other (IPM 2 ). The cost of the candidate can be calculated by a weighted sum of the first and second differences. Here, the weights for the weighted sum can be set based on the weight information of the candidate. For example, the cost of each candidate can be calculated as in the following mathematical equation (1).
[수학식 1][Mathematical Formula 1]
Cost = (cost1 * W1) + (cost2 * W2) >> shiftCost = (cost1 * W1) + (cost2 * W2) >> shift
수학식 1에서, cost1은 IPM1를 기반으로 산출되는 템플릿의 예측값과 복원값 간의 제1 차이를 나타낼 수 있다. cost2는 IPM2를 기반으로 산출되는 템플릿의 예측값과 복원값 간의 제2 차이를 나타낼 수 있다. W1은 해당 후보에 저장된 가중치 정보로서, IPM1를 기반으로 생성되는 예측 블록에 적용된 가중치를 나타낼 수 있다. W2는 해당 후보에 저장된 가중치 정보로서, IPM2를 기반으로 생성되는 예측 블록에 적용된 가중치를 나타낼 수 있다.In mathematical expression 1, cost1 may represent the first difference between the predicted value and the restored value of the template calculated based on IPM 1. cost2 may represent the second difference between the predicted value and the restored value of the template calculated based on IPM 2. W1 is weight information stored in the candidate, and may represent the weight applied to the prediction block generated based on IPM 1. W2 is weight information stored in the candidate, and may represent the weight applied to the prediction block generated based on IPM 2 .
또는, 머지 모드 기반의 후보에 대해서는 가중치를 적용하여 코스트를 산출하고, Regular 모드 기반의 후보에 대해서는 가중치를 적용하지 않고 코스트를 산출할 수도 있다. 예를 들어, Regular 모드 기반의 후보에 대한 코스트는, 인트라 예측 모드 별로 산출된 코스트의 합으로 산출될 수 있다.Alternatively, weights can be applied to calculate costs for candidates based on merge mode, while costs for candidates based on regular mode can be calculated without weights. For example, the cost for a candidate based on regular mode can be calculated as the sum of the costs calculated for each intra prediction mode.
또는, 머지 모드 기반의 후보와 Regular 모드 기반의 후보 모두에 대해서 가중치를 적용하지 않고 코스트를 산출할 수도 있다. 예를 들어, 각 후보의 코스트는 인트라 예측 모드 별로 산출된 코스트의 합으로 산출될 수 있다.Alternatively, costs can be calculated without applying weights to both merge-mode and regular-mode candidates. For example, the cost of each candidate can be calculated as the sum of the costs calculated for each intra prediction mode.
산출된 코스트를 기반으로 현재 블록의 예측 블록을 생성할 수 있다(S320).A prediction block of the current block can be generated based on the calculated cost (S320).
구체적으로, 산출된 코스트의 오름차순으로 상위 K개의 후보가 선택될 수 있다. 산출된 코스트의 오름차순으로 후보 리스트 내의 후보가 재정렬될 수도 있다. 선택된 후보의 인트라 예측 모드를 기반으로 예측 블록을 생성할 수 있다. 여기서, K는 1, 2 또는 그 이상의 정수일 수 있다.Specifically, the top K candidates can be selected in ascending order of their calculated costs. The candidates within the candidate list can also be reordered in ascending order of their calculated costs. Prediction blocks can be generated based on the intra-prediction modes of the selected candidates. Here, K can be an integer of 1, 2, or a larger number.
예를 들어, 후보 리스트에서 1개의 후보가 선택된 경우, 1개 후보의 인트라 예측 모드를 기반으로 현재 블록의 예측 블록을 생성할 수 있다. 선택된 후보가 둘의 인트라 예측 모드를 가진 경우, 둘의 인트라 예측 모드를 기반으로 둘의 예측 블록을 각각 생성할 수 있다. 선택된 후보가 가진 가중치 정보를 기반으로 둘의 예측 블록을 가중합하여 최종 예측 블록을 생성할 수도 있다.For example, if one candidate is selected from the candidate list, the prediction block for the current block can be generated based on the intra prediction mode of that candidate. If the selected candidate has two intra prediction modes, two prediction blocks can be generated based on the two intra prediction modes. The final prediction block can also be generated by weighting the two prediction blocks based on the weight information of the selected candidate.
예를 들어, 후보 리스트에서 2개의 후보가 선택된 경우, 2개 후보의 인트라 예측 모드를 기반으로 2개의 예측 블록을 각각 생성할 수 있고, 생성된 2개의 예측 블록의 가중합을 통해 최종 예측 블록을 생성할 수 있다. 상기 가중합을 위한 가중치는, 선택된 후보의 코스트를 기반으로 다음 수학식 2와 같이 유도될 수 있다. 이 경우, 최종 예측 블록은 다음 수학식 3과 같이 생성될 수 있다.For example, if two candidates are selected from a candidate list, two prediction blocks can be generated based on the intra prediction modes of the two candidates, and a final prediction block can be generated through a weighted sum of the two generated prediction blocks. The weights for the weighted sum can be derived based on the costs of the selected candidates, as shown in the following mathematical expression 2. In this case, the final prediction block can be generated as shown in the following mathematical expression 3.
[수학식 2][Equation 2]
[수학식 3][Equation 3]
수학식 2와 3에서, M1과 M2는 코스트의 오름차순으로 상위 2개의 후보에 대응하는 인트라 예측 모드를 의미할 수 있다.In mathematical expressions 2 and 3, M1 and M2 may denote intra prediction modes corresponding to the top two candidates in ascending order of cost.
다만, 예외적으로 상위 2개의 후보 중 가장 작은 코스트를 가진 후보(M1)의 코스트가 다른 후보(M2)의 코스트보다 현저히 작다고 판단되는 경우, 가장 작은 코스트를 가진 후보(M1)만을 이용하여 현재 블록의 예측 블록이 생성될 수 있다. 예를 들어, 수학식 4의 조건을 만족하는 경우, M1의 코스트가 M2의 코스트보다 현저히 작다고 판단될 수 있다. 이 경우, M1을 기반으로 생성된 예측 블록(PredM1)에는 1의 가중치가 적용되고, M2를 기반으로 생성된 예측 블록(PredM2)에는 0의 가중치가 적용될 수 있다.However, if, as an exception, the cost of the candidate (M1) with the smallest cost among the top two candidates is determined to be significantly smaller than the cost of the other candidate (M2), the prediction block of the current block may be generated using only the candidate (M1) with the smallest cost. For example, if the condition of mathematical expression 4 is satisfied, the cost of M1 may be determined to be significantly smaller than the cost of M2. In this case, a weight of 1 may be applied to the prediction block (Pred M1 ) generated based on M1, and a weight of 0 may be applied to the prediction block (Pred M2 ) generated based on M2.
[수학식 4][Equation 4]
전술한 방법에 따르면, 부호화기에서는 최종 도출된 예측 블록을 사용하여 한 번의 full-RD 과정이 수행될 수 있다.According to the method described above, one full-RD process can be performed in the encoder using the final derived prediction block.
또는, 산출된 코스트의 오름차순으로 상위 2개의 후보 중 어느 하나를 선택하고, 선택된 후보를 기반으로 현재 블록의 예측 블록을 생성할 수 있다. 예를 들어, 선택된 후보가 가진 둘의 인트라 예측 모드(IPM1, IPM2)를 기반으로 둘의 예측 블록을 생성할 수 있고, 선택된 후보가 가진 가중치 정보를 기반으로 둘의 예측 블록을 가중합하여 최종 예측 블록을 생성할 수 있다.Alternatively, one of the top two candidates in ascending order of the calculated cost can be selected, and a prediction block for the current block can be generated based on the selected candidate. For example, two prediction blocks can be generated based on the two intra prediction modes (IPM 1 and IPM 2 ) of the selected candidate, and the final prediction block can be generated by weighting the two prediction blocks based on the weight information of the selected candidate.
이를 위해, 부호화기는 상위 2개의 후보 중 최적의 후보를 선택하고, 이를 특정하기 위한 인덱스를 비트스트림에 부호화할 수 있다. 복호화기는 비트스트림을 통해 시그날링되는 인덱스를 기반으로 상위 2개의 후보 중 어느 하나를 선택할 수 있다.To this end, the encoder can select the optimal candidate among the top two candidates and encode an index to specify it into the bitstream. The decoder can then select one of the top two candidates based on the index signaled through the bitstream.
또는, 후보 리스트 내에서, 코스트의 오름차순으로 두번째 후보의 코스트가 소정의 문턱값보다 큰 경우, 코스트의 오름차순으로 상위 2개의 후보 중 가장 작은 코스트를 가진 후보(즉, 첫번째 후보)를 기반으로 현재 블록의 예측 블록을 생성할 수 있다. 여기서, 후보 리스트는 TIMD 머지 리스트를 의미할 수도 있고, 조합 리스트를 의미할 수도 있다. 이 경우, 상위 2개의 후보 중 어느 하나를 특정하기 위한 인덱스의 시그날링은 생략될 수 있다.Alternatively, if the cost of the second candidate in ascending order within the candidate list is greater than a predetermined threshold, the predicted block for the current block can be generated based on the candidate with the smallest cost (i.e., the first candidate) among the top two candidates in ascending order. Here, the candidate list may refer to a TIMD merge list or a combination list. In this case, the signaling of an index for specifying one of the top two candidates may be omitted.
여기서, 문턱값은, 후보 리스트 내에서 가장 작은 코스트의 값에 임의의 가중치를 적용하여 유도될 수 있다. 이때, 가중치는 1보다 크거나 같은 실수일 수 있다. 예를 들어, 가장 작은 코스트의 값이 1000이라 가정할 경우, 문턱값은 (1000*1.2) 또는 (1000+1.2)와 같은 연산을 통해 유도될 수 있다.Here, the threshold can be derived by applying an arbitrary weight to the value of the smallest cost within the candidate list. The weight can be a real number greater than or equal to 1. For example, if the value of the smallest cost is assumed to be 1000, the threshold can be derived through operations such as (1000*1.2) or (1000+1.2).
또는, 문턱값은, MPM 리스트에 속한 후보의 코스트를 기반으로 유도될 수도 있다. 예를 들어, 문턱값은, MPM 리스트 내 코스트의 오름차순으로 상위 1개 후보의 코스트에 특정 가중치를 적용하여 유도될 수 있다. 문턱값은, MPM 리스트 내 코스트의 오름차순으로 상위 2개 후보의 코스트의 평균값에 특정 가중치를 적용하여 유도될 수 있다. 문턱값은, MPM 리스트 내 코스트의 내림차순으로 상위 1개 후보의 코스트에 특정 가중치를 적용하여 유도될 수 있다. 문턱값은, MPM 리스트 내에서 코스트의 내림차순으로 상위 2개 후보의 코스트의 평균값에 특정 가중치를 적용하여 유도될 수 있다. 여기서의 특정 가중치는 1보다 크거나 같은 실수일 수 있다.Alternatively, the threshold may be derived based on the costs of candidates in the MPM list. For example, the threshold may be derived by applying a specific weight to the cost of the top candidate in ascending order of cost within the MPM list. The threshold may be derived by applying a specific weight to the average of the costs of the top two candidates in ascending order of cost within the MPM list. The threshold may be derived by applying a specific weight to the cost of the top one candidate in descending order of cost within the MPM list. The threshold may be derived by applying a specific weight to the average of the costs of the top two candidates in descending order of cost within the MPM list. The specific weight here may be a real number greater than or equal to 1.
또는, Regular 모드 기반의 후보를 참조하지 않고, 머지 모드 기반의 후보의 코스트에 특정 가중치를 적용하여 문턱값을 유도할 수도 있다. 예를 들어, 머지 모드 기반의 후보 리스트 내에서, 코스트의 오름차순으로 첫번째 후보의 코스트에 특정 가중치를 적용하여 문턱값을 유도할 수 있다. 이때, 가중치는 1보다 크거나 같은 실수일 수 있다. 예를 들어, 가중치는 1.2일 수 있다. 후보 리스트 내에서, 코스트의 오름차순으로 두번째 후보의 코스트가 소정의 문턱값보다 큰 경우, 첫번째 후보를 기반으로 현재 블록의 예측 블록을 생성할 수 있다. 이 경우, 머지 모드 기반의 후보 리스트 내에서 코스트의 오름차순으로 상위 2개의 후보 중 어느 하나를 특정하기 위한 인덱스의 시그날링은 생략될 수 있다.Alternatively, the threshold can be derived by applying a specific weight to the cost of the merge mode-based candidate without referencing the Regular mode-based candidate. For example, within the merge mode-based candidate list, the threshold can be derived by applying a specific weight to the cost of the first candidate in ascending cost order. The weight can be a real number greater than or equal to 1. For example, the weight can be 1.2. Within the candidate list, if the cost of the second candidate in ascending cost order is greater than the predetermined threshold, the prediction block of the current block can be generated based on the first candidate. In this case, the signaling of the index for specifying either of the top two candidates in ascending cost order within the merge mode-based candidate list can be omitted.
또는, 후보 리스트에 속한 MIP 모드 기반의 후보를 코스트의 오름차순으로 정렬하여 상위 N개의 후보를 선택할 수 있다. 또한, 후보 리스트에 속한 나머지 후보를 코스트의 오름차순으로 정렬하여 상위 M개의 후보를 선택할 수 있다. 여기서, N과 M은 1보다 크거나 같은 정수일 수 있다. N과 M은 동일한 값일 수도 있고, 서로 상이한 값일 수도 있다. 이때, 상위 N개의 후보를 기반으로 생성되는 예측 블록과 상위 M개의 후보를 기반으로 생성된 예측 블록의 가중합을 통해 현재 블록의 최종 예측 블록을 생성할 수도 있다.Alternatively, the top N candidates can be selected by sorting the MIP mode-based candidates in the candidate list in ascending order of cost. Furthermore, the top M candidates can be selected by sorting the remaining candidates in the candidate list in ascending order of cost. Here, N and M can be integers greater than or equal to 1. N and M can be the same value or different values. In this case, the final prediction block of the current block can be generated by a weighted sum of the prediction blocks generated based on the top N candidates and the prediction blocks generated based on the top M candidates.
도 5는 본 개시에 따른 매트릭스 기반의 인트라 예측 방법을 도시한 것이다.FIG. 5 illustrates a matrix-based intra prediction method according to the present disclosure.
매트릭스 기반의 인트라 예측(MIP)은, 현재 블록에 인접한 참조 영역에 기-정의된 매트릭스(또는, 가중치)를 적용하여 예측 블록을 생성하는 방법일 수 있다.Matrix-based intra prediction (MIP) may be a method of generating a prediction block by applying a pre-defined matrix (or weight) to a reference region adjacent to the current block.
다음 수학식 5는 MIP를 통해 예측 샘플을 생성하는 일예이다.The following mathematical expression 5 is an example of generating prediction samples through MIP.
[수학식 5][Equation 5]
수학식 5에서, r(k)는 참조 샘플을 나타내고, F(x,y)는 참조 샘플에 적용되는 매트릭스를 나타내며, P(x,y)은 예측 샘플을 나타낼 수 있다. k는 참조 영역 내 참조 샘플의 인덱스를 나타낼 수 있다. 참조 샘플은 참조 영역 내 기-복원된 샘플일 수도 있고, 둘 이상의 기-복원된 샘플의 조합을 통해 유도될 수도 있다. MIP를 통해 현재 블록 내 일부 예측 샘플이 생성될 수 있고, 이를 기반으로 선형 보간을 수행하여 현재 블록 내 나머지 예측 샘플이 생성될 수 있다.In Equation 5, r(k) represents a reference sample, F(x,y) represents a matrix applied to the reference sample, and P(x,y) may represent a prediction sample. k may represent an index of a reference sample within the reference region. The reference sample may be a pre-reconstructed sample within the reference region, or may be derived through a combination of two or more pre-reconstructed samples. Some prediction samples within the current block can be generated through MIP, and the remaining prediction samples within the current block can be generated by performing linear interpolation based on these.
MIP를 위한 참조 영역은, 하나 또는 그 이상의 샘플 라인을 포함할 수 있다. 예를 들어, 참조 영역은, 현재 블록의 인접 샘플 라인 또는 비-인접 샘플 라인 중 적어도 하나를 포함할 수 있다. 여기서, 비-인접 샘플 라인은 현재 블록의 경계에서 N-샘플만큼 떨어진 샘플 라인일 수 있다. N은 1보다 크거나 같은 정수일 수 있고, 참조 영역을 구성하는 비-인접 샘플 라인의 개수는 1개 이상일 수 있다.A reference region for MIP may include one or more sample lines. For example, the reference region may include at least one of an adjacent sample line or a non-adjacent sample line of the current block. Here, the non-adjacent sample line may be a sample line that is N samples away from the boundary of the current block. N may be an integer greater than or equal to 1, and the number of non-adjacent sample lines constituting the reference region may be 1 or more.
현재 블록에 대한 후보 리스트를 구성할 수 있다(S500).A candidate list for the current block can be constructed (S500).
후보 리스트를 구성하는 방법은 도 3을 참조하여 살펴본 바와 같다.The method of constructing the candidate list is as described with reference to Fig. 3.
후보 리스트를 기반으로 확장된 후보 리스트를 생성할 수 있다(S510).An extended candidate list can be generated based on the candidate list (S510).
후보 리스트의 후보(즉, 인트라 예측 모드)와 현재 블록에 이웃한 둘 이상의 참조 샘플 라인 간의 조합을 통해 확장된 후보 리스트를 생성할 수 있다. 여기서, 참조 샘플 라인은, 현재 블록에 인접한 참조 샘플 라인(참조 샘플 라인 0) 또는 참조 샘플 라인 0에 이웃한 K개의 연속적인 참조 샘플 라인(참조 샘플 라인 1 내지 K) 중 적어도 하나를 포함할 수 있다. 예를 들어, 참조 샘플 라인 0 내지 K가 전부 이용될 수도 있고, 참조 샘플 라인 0 내지 K 중 일부가 선택적으로 이용될 수도 있다. An extended candidate list can be generated by combining candidates (i.e., intra prediction modes) in the candidate list with two or more reference sample lines adjacent to the current block. Here, the reference sample line may include at least one of a reference sample line adjacent to the current block (reference sample line 0) or K consecutive reference sample lines adjacent to reference sample line 0 (reference sample lines 1 to K). For example, all of the reference sample lines 0 to K may be used, or some of the reference sample lines 0 to K may be selectively used.
예를 들어, 설명의 편의를 위해, 현재 블록의 후보 리스트가 다음 표 3과 같이 구성되고 확장된 후보 리스트를 구성하기 위해 샘플 라인 1, 3, 5, 7 및 12이 이용됨을 가정한다. 표 3에서 후보의 번호는 인트라 예측 모드의 번호를 나타낼 수 있다.For example, for convenience of explanation, it is assumed that the candidate list of the current block is structured as shown in Table 3 below, and sample lines 1, 3, 5, 7, and 12 are used to construct the extended candidate list. The candidate numbers in Table 3 may represent the numbers of the intra prediction modes.
이때, 후보 리스트의 인트라 예측 모드와 참조 샘플 라인 간의 조합을 통해 다음 표 4와 같이 50개의 조합으로 구성된 제1 확장된 후보 리스트가 생성될 수 있다.At this time, a first extended candidate list consisting of 50 combinations can be generated as shown in Table 4 below through a combination between the intra prediction mode of the candidate list and the reference sample line.
제1 확장된 후보 리스트 내 50개의 조합 각각에 대해서, 소정의 템플릿 영역에 대해 해당 조합을 기반으로 인트라 예측을 수행하여 템플릿 영역의 예측값을 생성할 수 있다. 템플릿 영역의 예측값과 기-복원값 간의 차이를 기반으로 해당 조합에 대한 코스트(예를 들어, SAD, SATD)를 산출할 수 있다.For each of the 50 combinations in the first extended candidate list, intra prediction can be performed on a given template region based on that combination to generate a predicted value for that template region. The cost (e.g., SAD, SATD) for that combination can be calculated based on the difference between the predicted value for the template region and the base-reconstructed value.
50개의 조합 중에서, 산출된 코스트의 오름차순으로 상위 M개의 조합을 선택할 수 있고, 선택된 상위 M개의 조합을 기반으로 제2 확장된 후보 리스트를 생성할 수 있다. 상위 M개의 조합은 코스트의 오름차순으로 제2 확장된 후보 리스트에 배열될 수 있다. Among the 50 combinations, the top M combinations can be selected in ascending order of the calculated costs, and a second expanded candidate list can be generated based on the selected top M combinations. The top M combinations can be arranged in the second expanded candidate list in ascending order of costs.
또는, 제2 확장된 후보 리스트를 구성하는 M개의 조합에 대해서 중복성 검사를 통해 동일한 인트라 예측 모드를 가진 조합을 제거할 수도 있다. 예를 들어, 서로 동일한 인트라 예측 모드를 가진 조합들 중에서, 가장 작은 코스트를 가진 조합을 제외한 나머지 조합이 제2 확장된 후보 리스트에서 제거될 수 있다.Alternatively, combinations with the same intra prediction mode can be eliminated through a redundancy check among the M combinations that make up the second extended candidate list. For example, among combinations with the same intra prediction mode, all combinations except the one with the lowest cost can be eliminated from the second extended candidate list.
확장된 후보 리스트를 기반으로 MIP를 위한 참조 영역을 결정할 수 있다(S520).A reference area for MIP can be determined based on the extended candidate list (S520).
전술한 확장된 후보 리스트(즉, 제1 또는 제2 확장된 후보 리스트)를 구성하는 조합 중 적어도 하나를 특정하기 위한 인덱스가 비트스트림을 통해 시그날링될 수 있다. 상기 인덱스에 대응하는 조합의 참조 샘플 라인을 기반으로 MIP를 위한 참조 영역이 결정될 수 있다. An index for specifying at least one of the combinations constituting the aforementioned extended candidate list (i.e., the first or second extended candidate list) may be signaled via the bitstream. A reference region for MIP may be determined based on a reference sample line of the combination corresponding to the index.
예를 들어, 제2 확장된 후보 리스트가 20개의 조합으로 구성되는 경우, 20개의 조합 중 적어도 하나를 특정하기 위한 인덱스는 Truncated Golomb-Rice Coding을 기반으로 부호화될 수 있다. 상기 인덱스는 컨텍스트 코딩이 적용되는 최대 6개의 빈으로 부호화될 수 있다. 예를 들어, 인덱스의 이진화는 다음 표 5와 같이 정의될 수 있다.For example, if the second extended candidate list consists of 20 combinations, an index for specifying at least one of the 20 combinations can be encoded based on Truncated Golomb-Rice Coding. The index can be encoded into up to six bins to which context coding is applied. For example, the binarization of the index can be defined as shown in Table 5 below.
또는, 제1 또는 제2 확장된 후보 리스트에 속한 조합은 복수의 그룹으로 그룹핑될 수 있다. 각 그룹은 하나 또는 그 이상의 조합으로 구성될 수 있다. 예를 들어, 제1 또는 제2 확장된 후보 리스트 내에서 T개의 연속적인 조합이 하나의 그룹으로 지정될 수 있다. 여기서, T는 2, 3, 4, 5, 또는 그 이상의 정수일 수 있다.Alternatively, combinations within the first or second extended candidate list may be grouped into multiple groups. Each group may consist of one or more combinations. For example, T consecutive combinations within the first or second extended candidate list may be designated as a group. Here, T may be an integer of 2, 3, 4, 5, or more.
각 그룹에 속한 조합에 대해서, 해당 조합의 코스트가 소정의 문턱값보다 큰지 여부를 체크할 수 있다. 소정의 문턱값보다 큰 코스트를 가진 조합은 해당 그룹에서 제외될 수 있다. 제외된 조합은 다음 그룹의 첫번째 인덱스에 대응하는 조합으로 이용될 수 있다. 여기서, 문턱값은, 그룹 내 첫번째 인덱스에 대응하는 조합(즉, 가장 작은 코스트를 가진 조합)의 코스트를 기반으로 유도될 수 있다. 예를 들어, 문턱값은, 그룹 내 첫번째 인덱스에 대응하는 조합의 코스트에 2를 곱한 값으로 설정될 수 있다.For each combination in each group, it can be checked whether the cost of the combination exceeds a predetermined threshold. Combinations with a cost greater than the predetermined threshold can be excluded from the group. The excluded combination can be used as the combination corresponding to the first index of the next group. Here, the threshold can be derived based on the cost of the combination corresponding to the first index within the group (i.e., the combination with the lowest cost). For example, the threshold can be set to a value equal to 2 times the cost of the combination corresponding to the first index within the group.
전술한 방법을 통해 제2 확장된 후보 리스트의 조합은 복수의 그룹으로 그룹핑될 수 있고, 복수의 그룹 중 어느 하나를 기반으로 MIP를 위한 참조 영역이 결정될 수 있다. 예를 들어, 선택된 어느 하나의 그룹에 속한 조합의 참조 샘플 라인을 기반으로 MIP를 위한 참조 영역이 결정될 수 있다.Using the aforementioned method, combinations of the second extended candidate list can be grouped into multiple groups, and a reference region for MIP can be determined based on any one of the multiple groups. For example, a reference region for MIP can be determined based on a reference sample line of a combination belonging to any of the selected groups.
참조 영역을 기반으로 현재 블록의 예측 블록을 생성할 수 있다(S530). A prediction block of the current block can be generated based on the reference area (S530).
한편, 확장된 후보 리스트를 생성하기 위한 템플릿 영역은 참조 샘플 라인 0를 포함할 수 있다. 또는, 템플릿 영역은, 참조 샘플 라인 0을 제외한 다른 참조 샘플 라인을 포함할 수 있다. 템플릿 영역은, 하나 또는 그 이상의 참조 샘플 라인으로 구성될 수 있다.Meanwhile, the template area for generating the extended candidate list may include reference sample line 0. Alternatively, the template area may include reference sample lines other than reference sample line 0. The template area may be composed of one or more reference sample lines.
일예로, 참조 샘플 라인 0을 기준으로 연속적인 참조 샘플 라인까지 확장하여 템플릿 영역을 설정할 수 있다.For example, a template area can be set by extending from reference sample line 0 to consecutive reference sample lines.
일예로, 참조 샘플 라인 0과 1에 해당하는 영역이 템플릿 영역으로 설정될 수도 있다. 이 경우, 참조 샘플 라인 3, 5, 7 및 12를 기반으로 확장된 후보 리스트를 생성할 수도 있다.For example, the area corresponding to reference sample lines 0 and 1 may be set as a template area. In this case, an extended candidate list may be generated based on reference sample lines 3, 5, 7, and 12.
일예로, 참조 샘플 라인 1, 3, 5, 7 및 12를 포함한 복수의 참조 샘플 라인이 템플릿 영역으로 설정될 수 있다.For example, multiple reference sample lines including reference sample lines 1, 3, 5, 7, and 12 can be set as template areas.
일예로, 현재 블록의 너비와 높이를 W와 H라 할 경우, 현재 블록의 상단 템플릿의 너비는 W보다 작거나 같을 수 있고, 현재 블록의 좌측 템플릿의 높이는 H보다 작거나 같을 수 있다. 다만, 이에 한정되지 아니하며, 현재 블록의 상단 템플릿의 너비는 W보다 클 수도 있고, 현재 블록의 좌측 템플릿의 높이는 H보다 클 수도 있다.For example, if the width and height of the current block are W and H, the width of the top template of the current block may be less than or equal to W, and the height of the left template of the current block may be less than or equal to H. However, this is not limited thereto, and the width of the top template of the current block may be greater than W, and the height of the left template of the current block may be greater than H.
일예로, 현재 블록의 구조에 따라 상단 또는 좌측 템플릿을 사용하지 않고 확장된 후보 리스트를 생성할 수도 있다. 여기서, 구조는, 현재 블록의 픽쳐, 슬라이스, 타일, 또는 CTU 행 내에서의 위치, 현재 블록의 형태, 현재 블록의 분할 구조 등을 의미할 수 있다. For example, an extended candidate list can be generated without using the top or left template, based on the structure of the current block. Here, the structure can refer to the current block's position within a picture, slice, tile, or CTU row, the shape of the current block, or the partitioning structure of the current block.
일예로, 현재 블록의 너비와 높이를 W와 H라 할 경우, W가 H보다 N배 이상인 경우, 상단 템플릿만이 사용될 수 있다. N은 1보다 크거나 같은 실수일 수 있다.For example, if the width and height of the current block are W and H, and W is N times or more than H, only the top template can be used. N can be a real number greater than or equal to 1.
일예로, 현재 블록의 너비와 높이를 W와 H라 할 경우, H가 W보다 N배 이상인 경우, 좌측 템플릿만이 사용될 수 있다. N은 1보다 크거나 같은 실수일 수 있다.For example, if the width and height of the current block are W and H, and H is N times or more greater than W, only the left template can be used. N can be a real number greater than or equal to 1.
전술한 템플릿 영역의 구성 방법 전부 또는 일부를 기반으로 확장된 후보 리스트를 생성할 수도 있고, MIP를 위한 참조 영역을 결정할 수도 있다.An extended candidate list may be generated based on all or part of the configuration method of the template area described above, and a reference area for the MIP may be determined.
또한, 전술한 예측 방법은 영상 부호화 장치와 영상 복호화 장치에서 동일하게 적용될 수 있다.In addition, the above-described prediction method can be equally applied to an image encoding device and an image decoding device.
본 개시의 다양한 실시 예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시 예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.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., operating systems, applications, firmware, programs, 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 executable on the device or computer.
Claims (10)
Applications Claiming Priority (6)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2024-0040034 | 2024-03-22 | ||
| KR20240040034 | 2024-03-22 | ||
| KR10-2024-0071654 | 2024-05-31 | ||
| KR20240071653 | 2024-05-31 | ||
| KR10-2024-0071653 | 2024-05-31 | ||
| KR20240071654 | 2024-05-31 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025198453A1 true WO2025198453A1 (en) | 2025-09-25 |
Family
ID=97139621
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2025/099839 Pending WO2025198453A1 (en) | 2024-03-22 | 2025-03-18 | Video coding method and device, and recording medium storing bitstream |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2025198453A1 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20180005121A (en) * | 2016-07-05 | 2018-01-15 | 주식회사 케이티 | Method and apparatus for processing a video signal |
| KR20210057187A (en) * | 2018-10-12 | 2021-05-20 | 주식회사 윌러스표준기술연구소 | Video signal processing method and apparatus using multi-assumption prediction |
| KR20220061127A (en) * | 2019-09-19 | 2022-05-12 | 퀄컴 인코포레이티드 | Matrix Combination for Matrix-Weighted Intra Prediction in Video Coding |
| KR20230075499A (en) * | 2021-09-01 | 2023-05-31 | 텐센트 아메리카 엘엘씨 | Template matching for IBC merge candidates |
| KR20240005608A (en) * | 2022-07-05 | 2024-01-12 | 한국전자통신연구원 | Method, apparatus and recording medium for encoding/decoding image |
-
2025
- 2025-03-18 WO PCT/KR2025/099839 patent/WO2025198453A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20180005121A (en) * | 2016-07-05 | 2018-01-15 | 주식회사 케이티 | Method and apparatus for processing a video signal |
| KR20210057187A (en) * | 2018-10-12 | 2021-05-20 | 주식회사 윌러스표준기술연구소 | Video signal processing method and apparatus using multi-assumption prediction |
| KR20220061127A (en) * | 2019-09-19 | 2022-05-12 | 퀄컴 인코포레이티드 | Matrix Combination for Matrix-Weighted Intra Prediction in Video Coding |
| KR20230075499A (en) * | 2021-09-01 | 2023-05-31 | 텐센트 아메리카 엘엘씨 | Template matching for IBC merge candidates |
| KR20240005608A (en) * | 2022-07-05 | 2024-01-12 | 한국전자통신연구원 | Method, apparatus and recording medium for encoding/decoding image |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019240448A1 (en) | Video signal processing method and device on basis of reference between components | |
| WO2017039256A1 (en) | Method and device for processing video signal | |
| WO2018044088A1 (en) | Method and device for processing video signal | |
| WO2017188652A1 (en) | Method and device for encoding/decoding image | |
| WO2012023762A2 (en) | Method for decoding intra-predictions | |
| WO2019078581A1 (en) | Method, device, and recording medium storing bit stream, for encoding/decoding image | |
| WO2012023763A2 (en) | Inter prediction encoding method | |
| WO2019240449A1 (en) | Method and device for encoding/decoding residual block on basis of quantization parameter | |
| WO2017160117A1 (en) | Method and apparatus for processing intra-prediction-based video signal | |
| WO2020009419A1 (en) | Video coding method and device using merge candidate | |
| WO2013154366A1 (en) | Transform method based on block information, and apparatus using said method | |
| WO2018056702A1 (en) | Method and apparatus for processing video signal | |
| WO2016159610A1 (en) | Method and apparatus for processing video signal | |
| WO2016114583A1 (en) | Method and device for processing video signal | |
| WO2017061671A1 (en) | Method and device for coding image on basis of adaptive transformation in image coding system | |
| WO2020242145A1 (en) | Video coding method and apparatus using adaptive parameter set | |
| WO2020130477A1 (en) | Video encoding/decoding method and device | |
| WO2016122251A1 (en) | Method and apparatus for processing video signals | |
| WO2021060801A1 (en) | Image encoding/decoding method and device, and recording medium storing bitstream | |
| WO2020184936A1 (en) | Video signal encoding or decoding method and apparatus | |
| WO2023177197A1 (en) | Image encoding/decoding method and apparatus | |
| WO2023191332A1 (en) | Method and device for video coding using adaptive multiple transform selection | |
| WO2025198453A1 (en) | Video coding method and device, and recording medium storing bitstream | |
| WO2023132623A1 (en) | Video signal encoding/decoding mehod, and recording medium in which bitstream is stored | |
| WO2018174358A1 (en) | Image decoding method and device according to intra prediction 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: 25774961 Country of ref document: EP Kind code of ref document: A1 |