WO2025009857A1 - Image encoding/decoding method, and recording medium for storing bitstream - Google Patents
Image encoding/decoding method, and recording medium for storing bitstream Download PDFInfo
- Publication number
- WO2025009857A1 WO2025009857A1 PCT/KR2024/009324 KR2024009324W WO2025009857A1 WO 2025009857 A1 WO2025009857 A1 WO 2025009857A1 KR 2024009324 W KR2024009324 W KR 2024009324W WO 2025009857 A1 WO2025009857 A1 WO 2025009857A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- reference line
- intra prediction
- neighboring
- block
- sample
- 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
Images
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/117—Filters, e.g. for pre-processing or post-processing
-
- 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/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/132—Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
-
- 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/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 disclosure relates to a method and device for processing an image signal.
- HD High Definition
- UHD Ultra High Definition
- inter-picture prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture
- intra-picture prediction technology that predicts pixel values included in the current picture using pixel information in the current picture
- entropy coding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance, etc.
- the present disclosure aims to provide a method for filtering reference samples for performing intra prediction and a device for performing the same.
- the present disclosure aims to provide a method for adaptively determining a filter type to be applied to a reference sample according to an intra prediction mode and a device for performing the same.
- a video encoding/decoding method may include: a step of determining a reference line of a current block; a step of determining an intra prediction mode of the current block; a step of filtering reference samples included in the reference line; and a step of obtaining a prediction block of the current block based on the filtered reference samples and the intra prediction mode.
- the filtering may be performed by at least one of a first filter type or a second filter type, and the first filter type may use a neighboring reference sample included in the reference line, and the second filter type may use an angular neighboring reference sample included in a neighboring reference line adjacent to the reference line.
- one of the first filter type or the second filter type may be selected based on the intra prediction mode of the current block.
- the reference samples when the intra prediction mode is a non-directional mode, the reference samples may be filtered based on the first filter type, and when the intra prediction mode is a directional mode, the reference samples may be filtered based on the second filter type.
- the angular neighboring reference sample may exist at a position projected to the neighboring reference line, according to the directionality of the intra prediction mode, from a reference sample including the reference line.
- the angular neighboring reference sample can be derived by interpolating two integer position reference samples located on both sides of the projected position within the neighboring reference line.
- an integer position reference sample closest to the projected position within the neighboring reference sample line may be set as the angular neighboring reference sample.
- the neighboring reference line may be a reference line having an index that is 1 larger or smaller than the reference line.
- the neighboring reference line when the index of the reference line is not the maximum value, the neighboring reference line may have an index that is 1 larger than the reference line, and when the index of the reference line is the maximum value, the neighboring reference line may have an index that is 1 smaller than the reference line.
- the filtered reference sample can be obtained by weighting the reference sample within the reference line and the angular reference sample within the neighboring reference line.
- the weight assigned to the reference sample may have a larger value than the weight assigned to the angular reference sample.
- the filtered reference sample can be obtained by weighting a reference sample within the reference line, a first angular reference sample within a first neighboring reference line adjacent to the reference line, and a second angular reference sample within a second neighboring reference line adjacent to the reference line.
- the reference line may exist between the first neighboring reference line and the second neighboring reference line.
- a computer-readable recording medium storing a bitstream encoded by an image encoding method according to the present disclosure can be provided.
- FIG. 1 is a block diagram illustrating an image encoding device according to an embodiment of the present disclosure.
- FIG. 2 is a block diagram illustrating an image decoding device according to an embodiment of the present disclosure.
- FIG. 3 illustrates an image encoding/decoding method performed by an image encoding/decoding device according to the present disclosure.
- FIGS. 4 and 5 illustrate examples of multiple intra prediction modes according to the present disclosure.
- FIG. 6 illustrates an intra prediction method based on a planar mode according to the present disclosure.
- FIG. 7 illustrates an intra prediction method based on DC mode according to the present disclosure.
- FIG. 8 illustrates an intra prediction method based on a directional mode according to the present disclosure.
- Figure 9 illustrates a method for deriving samples of fractional positions.
- Figures 10 and 11 illustrate that the tangent value for angle is scaled by a factor of 32 for each intra prediction mode.
- Figure 12 is a diagram illustrating an intra prediction aspect when the directional mode is one of modes 34 to 49.
- Figure 13 is a diagram illustrating an example of generating an upper reference sample by interpolating left reference samples.
- Figure 14 shows an example in which intra prediction is performed using reference samples arranged in a 1D array.
- Figure 15 is a diagram explaining the encoding/decoding order when a single tree structure is used.
- Figure 16 is a diagram explaining the order of encoding/decoding when a dual tree structure is used.
- Figure 17 is a flowchart illustrating a method for predicting a chroma block using a restored luma block.
- Figures 18 to 20 illustrate examples of downsampling a luma block.
- Figure 21 is a drawing to explain an example related to the location where down sampling is applied.
- Figure 22 is a diagram illustrating an example of filtering reference samples.
- Figure 23 is a diagram illustrating an example of filtering reference samples.
- Figure 24 illustrates directional modes to which angular filters are applied.
- first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are only used to distinguish one component from another.
- the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.
- the term and/or includes a combination of a plurality of related described items or any one of a plurality of related described items.
- FIG. 1 is a block diagram showing an image encoding device according to an embodiment of the present invention.
- 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).
- each component shown in FIG. 1 is independently depicted to indicate different characteristic functions in the image encoding device, and does not mean that each component is composed of separate hardware or a single software configuration unit. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or one component may be divided into multiple components to perform a function, and such integrated and separated 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.
- some components may not be essential components that perform essential functions in the present invention, but may be optional components that are merely used to improve performance.
- the present invention may be implemented by including only essential components for implementing the essence of the present invention, excluding components that are merely used to improve performance, and a structure that includes only essential components, excluding optional components that are merely used to improve performance, is also included in the scope of the present invention.
- the picture splitting unit (110) can split an input picture into at least one processing unit.
- the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU).
- the picture splitting unit (110) can split one picture into a combination of multiple coding units, prediction units, and transform units, and select one combination of coding units, prediction units, and transform units based on a predetermined criterion (e.g., a cost function) to encode the picture.
- a predetermined criterion e.g., a cost function
- a picture can be split into multiple coding units.
- a recursive tree structure such as a quad tree structure can be used.
- a coding unit that is split into other coding units with one image or the largest coding unit as the root can be split with as many child nodes as the number of split coding units.
- a coding unit that cannot be split any further according to a certain restriction becomes a leaf node. That is, if it is assumed that only a square split is possible for a coding unit, a coding unit can be split into at most four different coding units.
- the encoding unit may be used to mean a unit that performs encoding, or may be used to mean a unit that performs decoding.
- a prediction unit may be divided into at least one square or rectangular shape of the same size within one coding unit, or may be divided such that one prediction unit among the divided prediction units within one coding unit has a different shape and/or size from another prediction unit.
- intra prediction When generating a prediction unit that performs intra prediction based on a coding unit, if it is not the minimum coding unit, intra prediction can be performed without dividing it into multiple prediction units NxN.
- the prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction and an intra prediction unit (125) that performs intra prediction. It may be determined whether to use inter prediction or intra prediction for a prediction unit, and specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. At this time, the processing unit where the prediction is performed and the processing unit where the prediction method and specific contents are determined may be different. For example, the prediction method and prediction mode, etc. may be determined in the prediction unit, and the prediction may be performed in the transformation unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130). In addition, the prediction mode information, motion vector information, etc.
- specific information e.g., intra prediction mode, motion vector, reference picture, etc.
- the prediction unit (165) used for the prediction may be encoded together with the residual value in the entropy encoding unit (165) and transmitted to the decoding device.
- the inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of a part of an encoded region within the current picture.
- the inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
- the reference picture interpolation unit can receive reference picture information from the memory (155) and generate pixel information below an integer pixel from the reference picture.
- a DCT-based 8-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients can be used to generate pixel information below an integer pixel in units of 1/4 pixels.
- a DCT-based 4-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients can be used to generate pixel information below an integer pixel in units of 1/8 pixels.
- the motion prediction unit can perform motion prediction based on a reference picture interpolated by 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 of 1/2 or 1/4 pixel units based on the interpolated pixel.
- the motion prediction unit can predict the current prediction unit by using a different motion prediction method.
- Various methods such as the Skip method, the Merge method, the AMVP (Advanced Motion Vector Prediction) method, and the Intra Block Copy method can be used as the motion prediction method.
- the intra prediction unit (125) can generate a prediction unit based on reference pixel information surrounding the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block on which inter prediction is performed and the reference pixel is a pixel on which inter prediction is performed, the reference pixel included in the block on which inter prediction is performed can be used as a replacement for the reference pixel information of the surrounding block on which intra prediction is performed. That is, if the reference pixel is not available, the unavailable reference pixel information can be used as a replacement for at least one reference pixel among the available reference pixels.
- the prediction mode can have a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use directional information when performing prediction.
- the mode for predicting luminance information and the mode for predicting chrominance information can be different, and the intra prediction mode information used for predicting luminance information or the predicted luminance signal information can be utilized to predict chrominance information.
- intra prediction when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit can be 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 sizes of the prediction unit and 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 can be used only for the minimum coding unit.
- the intra prediction method can generate a prediction block after applying an AIS (Adaptive Intra Smoothing) filter to a reference pixel according to a prediction mode.
- the type of AIS filter applied to the reference pixel may be different.
- the intra prediction mode of a current prediction unit can be predicted from the intra prediction modes of prediction units existing in the vicinity of the current prediction unit.
- the prediction mode of the current prediction unit is predicted using mode information predicted from the surrounding prediction units
- the intra prediction modes of the current prediction unit and the surrounding prediction units are the same
- information that the prediction modes of the current prediction unit and the surrounding prediction units are the same can be transmitted using predetermined flag information, and if the prediction modes of the current prediction unit and the surrounding prediction units are different, entropy encoding can be performed to encode the prediction mode information of the current block.
- a residual block including residual value information which is a difference value between the prediction unit that performed the prediction and the original block of the prediction unit based on the prediction unit generated in the prediction unit (120, 125), can be generated.
- the generated residual block can be input to the transformation unit (130).
- the residual block including the residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra prediction mode information of the prediction unit used to generate the residual block.
- DCT Discrete Cosine Transform
- DST Discrete Sine Transform
- KLT Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra prediction mode information of the prediction unit used to generate the residual block.
- the quantization unit (135) can quantize the values converted to the frequency domain in the transformation unit (130).
- the quantization coefficients can vary depending on the block or the importance of the image.
- the values produced by the quantization unit (135) can be provided to the dequantization unit (140) and the reordering unit (160).
- the rearrangement unit (160) can perform rearrangement of coefficient values for quantized residual values.
- the rearrangement unit (160) can change a two-dimensional block-shaped coefficient into a one-dimensional vector shape by using a coefficient scanning method.
- the rearrangement unit (160) can change the two-dimensional block-shaped coefficient into a one-dimensional vector shape by scanning from the DC coefficient to the coefficient of the high-frequency region by using a zig-zag scan method.
- a vertical scan that scans the two-dimensional block-shaped coefficient in the column direction or a horizontal scan that scans the two-dimensional block-shaped coefficient in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, it is possible to determine which scan method among the zig-zag scan, the vertical scan, and the horizontal scan is to be used.
- the entropy encoding unit (165) can perform entropy encoding based on the values produced by the rearrangement unit (160). Entropy encoding can use various encoding methods such as, for example, Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding).
- the entropy encoding unit (165) can encode various information such as residual value coefficient information of an encoding unit, block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information from the rearrangement unit (160) and the prediction unit (120, 125).
- the entropy encoding unit (165) can entropy encode the coefficient values of the encoding unit input from the rearrangement unit (160).
- the values quantized in the quantization unit (135) are inversely quantized and the values transformed in the transformation unit (130) are inversely transformed.
- the residual values generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted prediction units through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.
- the filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).
- a deblocking filter may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).
- ALF Adaptive Loop Filter
- a deblocking filter can remove block distortion caused by boundaries between blocks in a restored picture.
- a strong filter or a weak filter can be applied depending on the required deblocking filtering strength.
- horizontal filtering and vertical filtering can be processed in parallel when performing vertical filtering and horizontal filtering.
- the offset correction unit can correct the offset from the original image on a pixel basis for the image on which deblocking has been performed.
- a method can 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 a method can be used in which the offset is applied by considering the edge information of each pixel.
- Adaptive Loop Filtering can be performed based on the value compared between the filtered restored image and 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 can be performed differentially for each group. Information related to whether to apply ALF can be transmitted by luminance signal for each coding unit (CU), and the shape and filter coefficient of the ALF filter to be applied can be different for each block. In addition, the same shape (fixed shape) of the ALF filter can be applied regardless of the characteristics of the target block.
- 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 an embodiment of the present invention.
- the image decoding device (200) may include an entropy decoding unit (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).
- the input bitstream can be decoded in the opposite procedure to that of the video encoding device.
- the entropy decoding unit (210) can perform entropy decoding in a procedure opposite to that of performing entropy encoding in the entropy encoding unit of the video encoding device.
- various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in response to the method performed in the video encoding device.
- the entropy decoding unit (210) can decode information related to intra prediction and inter prediction performed in the encoding device.
- the reordering unit (215) can perform reordering based on the method in which the bitstream that has been entropy-decoded by the entropy decoding unit (210) is reordered by the encoding unit.
- the coefficients expressed in the form of a one-dimensional vector can be re-restored into coefficients in the form of a two-dimensional block and reordered.
- the reordering unit (215) can perform reordering by receiving information related to the coefficient scanning performed by the encoding unit and performing reverse scanning based on the scanning order performed by the corresponding encoding unit.
- the inverse quantization unit (220) can perform inverse quantization based on the quantization parameters provided from the encoding device and the coefficient values of the rearranged block.
- the inverse transform unit (225) can perform inverse transform, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms performed by the transform unit, i.e., DCT, DST, and KLT, on the quantization result performed by the image encoding device.
- the inverse transform can be performed based on the transmission unit determined by the image encoding device.
- a transform technique e.g., DCT, DST, KLT
- 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 prediction block generation related information provided from the entropy decoding unit (210) and previously decoded block or picture information provided from the memory (245).
- intra prediction for the prediction unit is performed based on the pixels on the left side of the prediction unit, the pixels on the upper left side, and the pixels on the upper side.
- intra prediction can be performed using reference pixels based on the transformation unit.
- intra prediction using NxN division only for the minimum coding unit can be used.
- the prediction unit (230, 235) may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit.
- the prediction unit determination unit may receive various information such as prediction unit information input from the entropy decoding unit (210), prediction mode information of an intra prediction method, and motion prediction-related information of an inter prediction method, and may distinguish a prediction unit from a current encoding unit and determine whether the prediction unit performs inter prediction or intra prediction.
- the inter prediction unit (230) may perform inter prediction on the current prediction unit based on information included in at least one of a previous picture or a subsequent picture of the current picture including the current prediction unit, by using information necessary for inter prediction of the current prediction unit provided from the image encoding device. Alternatively, inter prediction may be performed based on information on a portion of a pre-restored area within the current picture including the current prediction unit.
- the motion prediction method of the prediction unit included in the encoding unit is Skip Mode, Merge Mode, AMVP Mode, or Intra Block Copy Mode based on the encoding unit.
- the intra prediction unit (235) can generate a prediction block based on pixel information in the current picture. If the prediction unit is a prediction unit that has performed intra prediction, the intra prediction can be performed based on intra prediction mode information of the prediction unit provided by the image encoding device.
- the intra prediction unit (235) can include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter.
- the AIS filter is a part that performs filtering on the reference pixels of the current block and can determine whether to apply the filter according to the prediction mode of the current prediction unit and apply it.
- the AIS filter 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 encoding device. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
- the reference pixel interpolation unit can interpolate the reference pixel to generate a reference pixel of a pixel unit less than an integer value when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value interpolated by the reference pixel.
- the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel
- the reference pixel may not be interpolated.
- the DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.
- the restored block or picture may be provided to a filter unit (240).
- the filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.
- a deblocking filter of a video decoding device can receive information related to a deblocking filter provided from a video encoding device and perform deblocking filtering on a corresponding block in the video decoding device.
- the offset correction unit can perform offset correction on the restored image based on information such as the type of offset correction applied to the image during encoding and the offset value.
- ALF can be applied to an encoding unit based on ALF application information provided from an encoding device, ALF coefficient information, etc. 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.
- the term coding unit is used as an encoding unit, but it may also be a unit that performs not only encoding but also decoding.
- the current block represents a block to be encoded/decoded, and may represent a coding tree block (or coding tree unit), an encoding block (or encoding unit), a transform block (or transform unit), or a prediction block (or prediction unit), depending on the encoding/decoding step.
- a 'unit' represents a basic unit for performing a specific encoding/decoding process
- a 'block' may represent a pixel array of a predetermined size.
- 'block' and 'unit' may be used with the same meaning.
- an encoding block (coding block) and an encoding unit (coding unit) may be understood to have the same meaning.
- FIG. 3 illustrates an image encoding/decoding method performed by an image encoding/decoding device according to the present disclosure.
- a reference line for intra prediction of the current block can be determined (S300).
- the current block can use one or more of a plurality of pre-defined reference line candidates in the video encoding/decoding device as reference lines for intra prediction.
- the plurality of pre-defined reference line candidates can include neighboring reference lines adjacent to the current block to be decoded and N non-neighboring reference lines that are 1 to N samples away from the boundary of the current block.
- N can be 1, 2, 3, or an integer greater than or equal to 1.
- the plurality of reference line candidates available to the current block are composed of neighboring reference line candidates and three non-neighboring reference line candidates, but the present invention is not limited thereto. That is, it goes without saying that the plurality of reference line candidates available to the current block can include four or more non-neighboring reference line candidates.
- the video encoding device can determine an optimal reference line candidate from among a plurality of reference line candidates and encode an index for specifying the optimal reference line candidate.
- the video decoding device can determine a reference line of a current block based on an index signaled through a bitstream.
- the index can specify one of the plurality of reference line candidates.
- the reference line candidate specified by the index can be used as a reference line of the current block.
- the number of indexes signaled to determine the reference line of the current block may be 1, 2 or more.
- the current block can perform intra prediction using only a single reference line candidate specified by the signaled index among the plurality of reference line candidates.
- the current block can perform intra prediction using a plurality of reference line candidates specified by a plurality of indexes among the plurality of reference line candidates.
- the intra prediction mode of the current block can be determined (S310).
- the intra prediction mode of the current block can be determined from among a plurality of intra prediction modes pre-defined in the video encoding/decoding device.
- the pre-defined plurality of intra prediction modes will be examined with reference to FIGS. 4 and 5.
- FIG. 4 illustrates an example of multiple intra prediction modes according to the present disclosure.
- a plurality of intra prediction modes pre-defined in the video encoding/decoding device may be composed of a non-directional mode and a directional mode.
- the non-directional mode may include at least one of a planar mode or a DC mode.
- the directional mode may include directional modes 2 to 66.
- the directional mode can be further extended than that shown in Fig. 4.
- Fig. 5 shows an example in which the directional mode is extended.
- modes -1 to -14 and modes 67 to 80 are added. These directional modes may be referred to as wide-angle intra prediction modes. Whether to use the wide-angle intra prediction mode may be determined depending on the shape of the current block. For example, if the current block is a non-square block whose width is greater than its height, some directional modes (e.g., modes 2 to 15) may be converted to wide-angle intra prediction modes between modes 67 to 80. On the other hand, if the current block is a non-square block whose height is greater than its width, some directional modes (e.g., modes 53 to 66) may be converted to wide-angle intra prediction modes between modes -1 to -14.
- some directional modes e.g., modes 53 to 66
- the range of available wide-angle intra prediction modes can be adaptively determined according to the width and height ratio of the current block.
- Table 1 shows the range of available wide-angle intra prediction modes according to the width and height ratio of the current block.
- K candidate modes (most probable modes, MPMs) can be selected.
- a candidate list including the selected candidate modes can be generated.
- An index indicating one of the candidate modes belonging to the candidate list can be signaled.
- the intra prediction mode of the current block can be determined based on the candidate mode indicated by the index.
- the candidate mode indicated by the index can be set as the intra prediction mode of the current block.
- the intra prediction mode of the current block can be determined based on a value of the candidate mode indicated by the index and a predetermined differential value.
- the differential value can be defined as a difference between a value of the intra prediction mode of the current block and a value of the candidate mode indicated by the index.
- the differential value can be signaled through a bitstream.
- the difference value may be a pre-defined value in the video encoding/decoding device.
- the intra prediction mode of the current block may be determined based on a flag indicating whether a mode identical to the intra prediction mode of the current block exists in the candidate list. For example, if the flag is a first value, the intra prediction mode of the current block may be determined from the candidate list. In this case, an index indicating any one of a plurality of candidate modes belonging to the candidate list may be signaled. The candidate mode indicated by the index may be set as the intra prediction mode of the current block. On the other hand, if the flag is a second value, any one of the remaining intra prediction modes may be set as the intra prediction mode of the current block.
- the remaining intra prediction mode may mean a mode excluding a candidate mode belonging to the candidate list among the pre-defined plurality of intra prediction modes. If the flag is a second value, an index indicating any one of the remaining intra prediction modes may be signaled. An intra prediction mode indicated by a signaled index can be set as the intra prediction mode of the current block.
- the intra prediction mode of the chroma block can be selected from intra prediction mode candidates of a plurality of chroma blocks. For this purpose, index information indicating one of the intra prediction mode candidates of the chroma block can be explicitly encoded and signaled through the bitstream. Table 2 illustrates intra prediction mode candidates of the chroma block.
- Luma Mode 0 Luma Mode: 50 Lumamode:18 Lumamode:1 Other 0 66 0 0 0 1 50 66 50 50 50 2 18 18 66 18 18 3 1 1 1 66 1 4 DM
- DM Direct Mode
- the intra prediction mode of the luma block existing at the same position as the chroma block can be determined based on the position of the upper left sample or the position of the center sample of the chroma block. For example, if the intra prediction mode (luma mode) of the luma block is 0 (planar mode) and the index points to 2, the intra prediction mode of the chroma block can be determined as the horizontal mode (18). For example, if the intra prediction mode (luma mode) of the luma block is 1 (DC mode) and the index points to 0, the intra prediction mode of the chroma block can be determined as the planar mode (0).
- the intra prediction mode of the chroma block may also be set to one of the intra prediction modes illustrated in FIG. 4 or FIG. 5.
- the intra prediction mode of the current block may also be used to determine the reference line of the current block, in which case step S310 may be performed before step S300.
- intra prediction can be performed for the current block based on the reference line and intra prediction mode of the current block (S320).
- FIG. 6 illustrates an intra prediction method based on a planar mode according to the present disclosure.
- T represents a reference sample located at the upper right corner of the current block
- L represents a reference sample located at the lower left corner of the current block.
- P1 can be generated through horizontal interpolation.
- P1 can be generated by interpolating T with a reference sample located on the same horizontal line as P1.
- P2 can be generated through vertical interpolation.
- P2 can be generated by interpolating L with a reference sample located on the same vertical line as P2.
- the current sample in the current block can be predicted through a weighted sum of P1 and P2, as in the following mathematical expression 1.
- the weights ⁇ and ⁇ can be determined by considering the width and height of the current block. Depending on the width and height of the current block, the weights ⁇ and ⁇ may have the same value or different values. If the width and height of the current block are the same, the weights ⁇ and ⁇ can be set to the same value, and the prediction sample of the current sample can be set to the average value of P1 and P2. If the width and height of the current block are not the same, the weights ⁇ and ⁇ can have different values. For example, if the width is larger than the height, a smaller value can be set for the weight corresponding to the width of the current block, and a larger value can be set for the weight corresponding to the height of the current block.
- the weight corresponding to the width of the current block can mean ⁇
- the weight corresponding to the height of the current block can mean ⁇ .
- FIG. 7 illustrates an intra prediction method based on DC mode according to the present disclosure.
- the average value of the surrounding samples adjacent to the current block can be calculated, and the calculated average value can be set as the predicted value of all samples in the current block.
- the surrounding samples can include the upper reference sample and the left reference sample of the current block.
- the average value can be calculated using only the upper reference sample or the left reference sample. For example, if the width of the current block is greater than the height, the average value can be calculated using only the upper reference sample of the current block. Alternatively, if the ratio of the width and height of the current block is greater than or equal to a predetermined threshold, the average value can be calculated using only the upper reference sample of the current block.
- the average value can be calculated using only the upper reference sample of the current block.
- the width of the current block is less than the height
- the average value can be calculated using only the left reference sample of the current block.
- the ratio of the width and height of the current block is less than or equal to a predetermined threshold
- the average value can be calculated using only the left reference sample of the current block.
- the ratio of the width to height of the current block is greater than or equal to a predetermined threshold, the average value can be calculated using only the left reference sample of the current block.
- FIG. 8 illustrates an intra prediction method based on a directional mode according to the present disclosure.
- the intra prediction mode of the current block is a directional mode
- projection can be performed as a reference line according to the angle of the directional mode.
- a reference sample exists at the projected position
- the reference sample can be set as a prediction sample of the current sample.
- a sample corresponding to the projected position can be generated using one or more neighboring samples neighboring the projected position. For example, a sample corresponding to the projected position can be generated by performing interpolation based on two or more neighboring samples neighboring in both directions with respect to the projected position.
- one neighboring sample neighboring the projected position can be set as a sample corresponding to the projected position. In this case, among a plurality of neighboring samples neighboring the projected position, a neighboring sample closest to the projected position can be used.
- the sample corresponding to the projected position can be set as a prediction sample of the current sample.
- a reference sample exists at the projected position (i.e., a reference sample at an integer position, R3).
- the reference sample at the projected position can be set as a prediction sample of the current sample B.
- a reference sample i.e., a reference sample at an integer position
- a sample (r) at a fractional position can be generated by performing interpolation based on neighboring samples (e.g., R2 and R3) adjacent to the projected position.
- the generated sample (r) at the fractional position can be set as a prediction sample of the current sample A.
- Figure 9 illustrates a method for deriving samples of fractional positions.
- variable h represents the vertical distance (i.e., vertical distance) between the position of the prediction sample A and the reference line
- variable w represents the horizontal distance (i.e., horizontal distance) between the position of the prediction sample A and the fractional position sample
- variable ⁇ represents a predefined angle according to the directionality of the intra prediction mode
- variable x represents the fractional position.
- variable w can be derived as shown in the following mathematical expression 2.
- the fractional position sample can be generated by interpolating adjacent integer position reference samples.
- the fractional position reference sample at the x position can be generated by interpolating the integer position reference sample R2 and the integer position reference sample R3.
- a scaling factor can be used to avoid real number operations.
- the scaling factor f is set to 32
- the distance between neighboring integer reference samples can be set to 32 instead of 1, as in the example shown in (b) of Fig. 8.
- the tangent value for angle ⁇ which is determined by the directionality of the intra prediction mode, can also be scaled up using the same scaling factor (e.g., 32).
- Figures 10 and 11 illustrate that the tangent value for angle is scaled by a factor of 32 for each intra prediction mode.
- Figure 10 shows the scaled results of tangent values for the non-wide angle intra prediction mode
- Figure 11 shows the scaled results of tangent values for the wide angle intra prediction mode.
- intra prediction can be performed using only one of the reference samples belonging to the upper line of the current block (i.e., upper reference samples) or the reference samples belonging to the left line of the current block (i.e., left reference samples).
- the tangent value for the angle value of the intra prediction mode is negative, both the reference samples located at the upper side and the reference samples located at the left side are used.
- the reference samples may be arranged in a 1D array form by projecting the left reference samples upward or the upper reference samples to the left, and intra prediction may be performed using the reference samples in the 1D array form.
- Figure 12 is a diagram illustrating the intra prediction aspect when the directional mode is one of modes 34 to 49.
- intra prediction mode of the current block is one of modes 34 to 49
- intra prediction is performed using not only the upper reference samples of the current block but also the left reference samples.
- the reference sample located on the left side of the current block can be copied to the position of the upper line, or the reference samples located on the left can be interpolated to generate the reference sample of the upper line.
- projection can be performed from position A of the top line to the left line of the current block, considering the directionality of the intra prediction mode of the current block.
- the projected position is a
- a value corresponding to position a can be copied, or a fractional position value corresponding to a can be generated and set as the value of position A.
- position a is an integer position
- the value of position A can be generated by copying the integer position reference sample.
- position a is a fractional position
- the reference sample located above position a and the reference sample located below position a can be interpolated, and the interpolated value can be set as the value of position A.
- the direction projected from position A at the top of the current block to the left line of the current block can be parallel to and opposite to the direction of the intra prediction mode of the current block.
- Figure 13 is a diagram illustrating an example of generating an upper reference sample by interpolating left reference samples.
- variable h represents the horizontal distance between position A of the upper line and position a of the left line.
- variable w represents the vertical distance between position A of the upper line and position a of the left line.
- variable ⁇ represents a predefined angle according to the directionality of the intra prediction mode, and variable x represents a fractional position.
- variable h can be derived as shown in the following mathematical expression 3.
- the fractional position can be finally derived.
- a scaling factor can be used to avoid real number operations.
- the tangent value for variable ⁇ can be scaled using the scaling factor f1.
- the scaled tangent value shown in Figs. 10 and 11 can also be used.
- Equation 3 When the scaling factor f1 is applied, Equation 3 can be transformed and used as Equation 4 below.
- a 1D reference sample array can be constructed using only the reference samples belonging to the upper line.
- intra prediction for the current block can be performed using only the upper reference samples constructed as a 1D array.
- Figure 14 shows an example in which intra prediction is performed using reference samples arranged in a 1D array.
- prediction samples of the current block can be obtained using only the reference samples belonging to the upper line.
- the upper reference sample may be projected onto the left line, thereby constructing a 1D reference sample array using only the reference samples belonging to the left line.
- the reference samples belonging to the upper line may be projected onto the left line, thereby generating the left reference sample.
- a picture can be encoded/decoded in block units.
- a picture can be divided into blocks of a predetermined size.
- a block of a predetermined size can be called a coding tree block (or coding tree unit) or a reference block.
- Information indicating the size of the reference block can be signaled through a bitstream.
- information indicating the size of the coding tree block can be encoded through a sequence parameter set or a picture header.
- the reference block can be added into blocks of various sizes. Then, pre/decode processing such as prediction, transformation, quantization, and/or entropy encoding can be performed on each of the divided blocks.
- pre/decode processing such as prediction, transformation, quantization, and/or entropy encoding can be performed on each of the divided blocks.
- Each of the divided blocks can be a coding block, a prediction block, or a transformation block.
- luma pictures and chroma pictures are encoded/decoded respectively.
- a chroma picture it is common for it to have similar characteristics to a luma picture. That is, there is a tendency for the characteristics of chroma samples in a chroma picture to be similar to the characteristics of luma samples in the same position in a luma picture.
- the division structure for the reference block can be independently determined only for one reference component among the color components, and the tree structure determined in the existing component can be identically applied to the other components. In this way, a division structure in which the tree division structure of the reference component is applied as it is to the other components can be called a single tree structure.
- the reference component is a luma component. That is, it is assumed that a tree partitioning structure is independently applied to the luma component, while the tree partitioning structure of the luma component is applied as is to the chroma component.
- Information about the tree partition structure in the reference component can be explicitly encoded and signaled.
- the tree partition structure information for the luma reference block can be encoded and signaled.
- encoding/decoding of the tree partition structure information can be omitted, and the tree partition structure information in the luma reference block can be used in the same manner.
- Figure 15 is a diagram explaining the encoding/decoding order when a single tree structure is used.
- the tree partitioning structure for the luma reference block can be applied as is to the chroma reference block. Accordingly, the partitioning form for the chroma reference block is the same as the partitioning form for the luma reference block.
- encoding/decoding can be performed in an alternating order of luma components and chroma components.
- the numbers written in each leaf node block indicate the encoding/decoding order.
- a partition structure in which the tree structure for each color component is independently determined may be referred to as a dual tree structure.
- information on the tree partition structure for the luma component and information on the tree partition structure for the chroma component may be independently encoded and signaled.
- Figure 16 is a diagram explaining the order of encoding/decoding when a dual tree structure is used.
- encoding/decoding a chroma component picture can be performed.
- the order of encoding/decoding between components can be set on a per-reference block basis. For example, after encoding/decoding for a luma component reference block is completed, encoding/decoding for a chroma component reference block can be performed.
- the numbers written within the blocks indicate the encoding/decoding order.
- the reference block of the luma component is encoded/decoded before the reference block of the chroma component.
- prediction can be performed on the chroma block.
- the prediction model using different color components such as the above, can be called a cross-component linear model (CCLM).
- CCLM cross-component linear model
- the process of deriving the intra prediction mode of the chroma block based on the intra prediction mode of the luma block can be omitted.
- Figure 17 is a flowchart illustrating a method for predicting a chroma block using a restored luma block.
- prediction parameters can be derived (S1710).
- the prediction parameters can be derived in different ways depending on the image format of the picture.
- the image format indicates a chroma subsampling rate and can be determined as one of 4:4:4, 4:2:2, or 4:2:0.
- the luma block is downsampled to the same size as the chroma block.
- Figures 18 to 20 illustrate examples of downsampling a luma block.
- the video format is assumed to be 4:2:0.
- the size of the chroma block corresponding to the 4x4 sized luma block is 2x2, as in the example illustrated in Fig. 18.
- the 4x4 sized luma block can be reduced to 2x2.
- the following mathematical expression 5 shows how the down-sampling filter is applied.
- Downsampled_Luma means a sample value in a down-sampled luma block
- Luma means a value of a luma sample before down-sampling.
- Luma[0][0] can represent the position of the upper left sample in a luma block before down-sampling. Since the size of the down-sampled luma block is 2x2, the variables w and h representing the coordinates of the sample can have values ranging from 0 to 1, respectively.
- the value of the down-sampled luma sample can be obtained by applying a cross-shaped down-sampling filter to the luma samples.
- the value of the down-sampled luma sample at the (0, 0) position can be obtained by applying a down-sampling filter to the luma sample at the (0, 0) position, the upper luma sample at the (0, 0) position, the left luma sample at the (0, 0) position, the lower luma sample at the (0, 0) position, and the right luma sample at the (0, 0) position.
- a downsampling filter of a different form than that illustrated in Fig. 19 may also be applied.
- a 1D filter, a rectangular or square filter may be applied to obtain a downsampled luma sample.
- the 1D filter may have a size of 1x3 or 3x1
- the rectangular filter may have a size of 2x3 or 3x2
- the square filter may have a size of 2x2 or 3x2.
- the shape of the filter may be predefined in the encoder and decoder.
- the shape of the filter can be adaptively determined based on at least one of the size/shape of the current block, the intra prediction mode applied to the luma block, whether the positions of the chroma samples match the positions of the luma samples, or the image format.
- information indicating one of multiple filter candidates may be encoded and signaled.
- the filter type may be different depending on the downsampling location. For example, a 1D filter or a rectangular filter may be applied to luma samples located at the boundary of a luma block, while a cross-shaped filter may be applied to luma samples not located at the boundary of a luma block.
- a downsampling filter can be applied to positions where both the x-axis coordinate and the y-axis coordinate are even numbers.
- the application position of the down-sampling filter may also be set differently from that shown in Fig. 19.
- Fig. 20 shows various examples of the application position of the down-sampling filter.
- one of the multiple candidates can be selected. For example, after defining the examples of (a) to (d) of Fig. 20 as multiple candidates, index information indicating one of the multiple examples can be encoded and signaled.
- one of the multiple candidates may be selected based on whether the location of the chroma sample matches the location of the luma sample.
- a downsampling filter can also be applied to reference samples around the luma block.
- the reference sample can represent a previously restored sample.
- a downsampling filter can be applied to at least one of an upper reference region adjacent to the upper side of the luma block or a left reference region adjacent to the left side, to obtain a downsampled luma reference sample.
- a number of downsampled luma reference samples equal to the number of reference samples included in the reference area of the chroma block can be obtained.
- the reference area of the luma block can be called a luma reference area
- the reference area of the chroma block can be called a chroma reference area
- the inter-component prediction mode can be classified into an upper inter-component prediction mode, a left inter-component prediction mode, and an upper and left inter-component prediction mode, depending on the configuration of the reference region.
- the upper inter-component prediction mode is selected, the reference region of each of the luma block and the chroma block consists of only the upper reference region.
- the left inter-component prediction mode is selected, the reference region of each of the luma block and the chroma block consists of only the left reference region.
- the reference region of each of the luma block and the chroma block can consist of an upper reference region and a left reference region.
- Information indicating which of the upper inter-component prediction mode, the left inter-component prediction mode, and the upper and left inter-component prediction modes is applied to the current block can be explicitly encoded and signaled.
- index information indicating the type of the inter-component prediction mode can be encoded and signaled.
- one of the top inter-component prediction mode, the left inter-component prediction mode, and the top and left inter-component prediction mode may be selected based on at least one of the size/shape of the current block, whether the current block touches a CTU or picture boundary, or an intra prediction mode applied to the luma block.
- each of the luma block and the chroma block include an upper reference area and a left reference area.
- the shape of the down-sampling filter applied to the reference area of the luma block may be the same as the down-sampling filter applied to the luma block.
- the shape of the down-sampling filter applied to the reference area of the luma block may be different from the down-sampling filter applied to the luma block.
- the shape of the down-sampling filter applied to the upper reference area of the luma block may be different from the shape of the down-sampling filter applied to the left reference area of the luma block.
- the location where downsampling is applied within the reference region may be predefined in the encoder and decoder.
- a decoder in the same way as the encoder, it may decide on its own where in the reference region downsampling is applied.
- Figure 21 is a drawing to explain an example related to the location where down sampling is applied.
- a 1x1 sized chroma block corresponds to a 2x2 sized luma block. Accordingly, a down-sampling filter can be applied to one of the four luma reference samples to derive a down-sampled luma reference sample corresponding to the chroma reference sample.
- the cost for a specific position can be derived based on the sum of the differences between the down-sampled luma reference sample obtained by applying a down-sampling filter centered on the position and the chroma reference sample corresponding to the position, or the sum of the absolute values of the differences.
- SAD Sud of Difference
- the location with the lowest cost is determined as the optimal location, and the prediction parameter derivation process described below can be performed using the downsampled luma samples at the optimal location.
- information indicating one of the multiple positions to which the down-sampling filter can be applied can be encoded and signaled.
- an index indicating one of positions A to D can be encoded and signaled.
- the encoder can obtain prediction parameters for each of the multiple positions to which the down-sampling filter can be applied, and encode and signal an index indicating a position used to derive an optimal prediction parameter among the multiple prediction parameters.
- the optimal prediction parameter can be derived by a cost or RDO (Rate Distortion Optimization) of each of the prediction parameters.
- determining the optimal down-sampling application location within the upper reference area may be independent of determining the optimal down-sampling application location within the left reference area.
- the optimal down-sampling application location within the upper reference area and the optimal down-sampling application location within the left reference area may be different.
- prediction parameters for the chroma block can be derived.
- the prediction parameters can include weights ⁇ and offsets ⁇ .
- the prediction parameters can be derived using the least square method, etc.
- the weight ⁇ offset ⁇ can be derived based on the linearity of the maximum and minimum values of the downsampled luma reference samples and the maximum and minimum values of the chroma reference samples.
- prediction parameters can be derived only by using chroma reference samples at predefined locations and corresponding down-sampled luma reference samples.
- the process of deriving prediction parameters can be simplified, and the complexity in the encoder and decoder can be reduced.
- prediction parameters can be derived by using chroma reference samples at locations exemplified in the following mathematical expression 6.
- W and H represent the width and height of the chroma block, respectively.
- prediction parameters can be derived using four chroma reference samples and four corresponding down-sampled luma reference samples.
- Prediction parameters can also be obtained using reference samples at different locations from the above example.
- the locations of reference samples can be determined as in the following mathematical expressions 7 and 8.
- one of the multiple candidates can be selected. For example, each of the examples of mathematical expressions 6 to 8 listed above is set as a location candidate, and then reference samples can be selected according to one of the multiple location candidates.
- Information for selecting one of the multiple location candidates can be encoded and signaled.
- an index pointing to one of the multiple location candidates can be encoded and signaled.
- one of the plurality of location candidates can be adaptively selected based on at least one of the size/shape of the current block, the color format, or whether the location of the chroma sample matches the location of the luma sample.
- the prediction parameter can be derived using the location candidate of Equation 6.
- the prediction parameter can be derived using the location candidate of Equation 7 or Equation 8.
- the location candidate of Equation 7 can be used, and if the current block is a non-square shape with a height greater than its width, the location candidate of Equation 8 can be used.
- a prediction sample of a chroma block can be obtained based on the downsampled luma sample (S1720).
- a prediction sample of a chroma block can be obtained according to the following mathematical expression 9.
- PredChroma represents a prediction sample of a chroma block
- Downsampled_Luma represents a downsampled luma sample at a location corresponding to the chroma prediction sample.
- the above-described down sampling process can be omitted. That is, when the video format is 4:4:4, the process of performing down sampling on the restored samples in the luma block and the process of performing down sampling on the reference samples of the luma block can be omitted.
- the reference region of the luma block may not be subjected to a downsampling filter. That is, instead of using the minimum and maximum values of the downsampled luma reference samples, the minimum and maximum values of the luma reference samples may be used when deriving the prediction parameters.
- Reference samples for in-screen prediction can be filtered, and prediction samples of the current block can be derived using the filtered reference samples.
- the preset condition can be related to at least one of the index of the reference line, the size of the current block, the color component, or the intra prediction mode of the current block.
- filtering of reference samples can be performed only when the index of the reference line of the current block is 0, i.e., only when the reference line of the current block is an adjacent reference line.
- the reference line may also be referred to as a reference sample line.
- filtering the reference sample may be performed only if the size of the current block is greater than or equal to a threshold.
- the size of the current block may indicate at least one of whether the width of the current block, the height, or the number of samples in the current block (i.e., the product of the width and the height) is greater than or equal to the threshold.
- filtering the reference sample can only be performed if the predicted color component is a luma component.
- filtering a reference sample can be performed only if the intra prediction mode of the current block is one of the predefined intra prediction modes.
- filtering can be performed for each of the reference samples using adjacent reference samples.
- Figure 22 is a diagram illustrating an example of filtering reference samples.
- the number of reference samples is assumed to be (2W + 2H + 1), where W and H represent the width and height of the current block, respectively.
- reference sample filtering may not be performed on the rightmost reference sample among the upper reference samples (i.e., position e) and the bottommost reference sample among the left reference samples (i.e., position a).
- Reference samples can be filtered using adjacent reference samples adjacent to the reference sample.
- left reference samples i.e., reference samples included in region b
- Equation 10 shows an example in which the left reference sample is filtered.
- the upper reference samples (i.e., the reference samples included in the d region) can be filtered using the reference samples adjacent to the right and the reference samples adjacent to the left.
- mathematical expression 11 shows an example in which the upper reference samples are filtered.
- the upper left reference sample (i.e., location c) can be filtered using the reference samples adjacent to the bottom and the reference samples adjacent to the right.
- Equation 12 shows an example in which the upper left reference sample is filtered.
- whether filtering is performed and the filter type can be determined depending on the location of the reference sample.
- a filter type that filters a reference sample by using reference samples belonging to the same reference line as the reference sample may be referred to as a single line filter.
- whether to perform filtering on the current block or at least one of the filter types may be adaptively determined based on the intra prediction mode of the current block.
- Figure 23 is a diagram illustrating an example of filtering reference samples.
- reference samples can be filtered based on a single line filter according to the embodiment described with reference to FIG. 22 (i.e., mathematical expressions 10 to 12). That is, when the intra prediction mode of the current block is the planar mode or the DC mode, reference samples can be filtered based on at least one adjacent reference sample belonging to the same reference line.
- reference samples can be filtered using an angular filter, as in the example illustrated in Fig. 23. That is, if the intra prediction mode of the current block is a directional mode, reference samples can be filtered using reference samples belonging to neighboring reference lines.
- the angular filter may filter reference samples belonging to the current reference line by using reference samples belonging to neighboring reference lines adjacent to the current reference line.
- the current reference line may mean a reference line selected by a reference line index of the current block.
- a reference sample belonging to a neighboring reference line can be selected according to the directionality according to the intra prediction mode of the current block.
- the selected reference sample may be called an angular neighboring reference sample or a directional neighboring reference sample. That is, the angular neighboring reference sample may be located on an angular line according to the intra prediction mode from the reference sample belonging to the current reference line.
- a filtered reference sample By inputting the reference sample belonging to the current reference line and the angular neighboring reference sample into the filter, a filtered reference sample can be obtained.
- the filtered reference sample can be obtained by a weighted sum operation of the reference sample belonging to the current reference line and the angular neighboring reference sample.
- a fractional position reference sample can be generated, and the generated fractional position reference sample can be set as an angular neighboring reference sample.
- the fractional position reference sample can be obtained by interpolating integer position reference samples located on both sides of the projected position within the neighboring reference line.
- the angular filter can be set to apply only for certain directional modes where the positions indicated by the angular lines are integer positions rather than fractional positions.
- Figure 24 illustrates directional modes to which angular filters are applied.
- an angular filter can be applied to at least one directional mode among the lower left 45 degree direction (a), the horizontal direction (b), the upper left 45 degree direction (c), the vertical direction (d), or the upper right 45 degree direction (e).
- the integer position reference pixel closest to the projected position within the neighboring reference line can be set as the angular neighboring reference sample. That is, the integer position reference sample closest to the projected position can be set as the angular reference sample without interpolating the reference samples.
- the intra prediction mode of the current block is a directional mode
- one of the examples shown in (a) to (e) of Fig. 24 may be used to filter reference samples.
- quantization may be required to determine the filtering direction for each directional mode.
- filtering based on an angular filter may be performed in the lower left 45 degree diagonal direction (i.e., (a) of FIG. 24).
- filtering based on an angular filter may be performed in the horizontal direction (i.e., (b) of FIG. 24).
- filtering based on an angular filter may be performed in the upper left 45 degree diagonal direction (i.e., (c) of FIG. 24).
- filtering based on an angular filter may be performed in the vertical direction (i.e., (d) of FIG. 24).
- filtering based on an angular filter can be performed in the upper right diagonal direction (i.e., (e) of Fig. 24).
- the directional modes can be divided into modes existing to the left of the reference mode (i.e., directional modes less than 34) and modes existing above the reference mode (i.e., directional modes greater than 34).
- filtering based on an angular filter may be performed in the horizontal direction (i.e., (b) of Fig. 24) for the modes existing to the left of the reference mode
- filtering based on an angular filter may be performed in the vertical direction (i.e., (d) of Fig. 24) for the modes existing above the reference mode.
- filtering based on angular filters can be performed only if the intra prediction mode of the current block is one of the predefined directional modes.
- the number or range of directional prediction modes in which filtering based on the angular filter is performed can be set differently depending on the size of the current block.
- the weight assigned to the reference sample at the filtering position may be set to have a value equal to or greater than the weight assigned to the angular neighboring reference sample.
- the set of the weight assigned to the reference sample at the position to be filtered and the weight assigned to the angular neighboring reference sample may be ⁇ 1/2, 1/2 ⁇ or ⁇ 3/4, 1/4 ⁇ .
- the weights assigned to the reference samples at the positions to be filtered and the weights assigned to the angular neighboring reference samples can be adaptively determined based on at least one of the index of the reference line or the intra prediction mode.
- information indicating the set of weights to be assigned to reference samples at the locations to be filtered and the set of weights to be assigned to angular neighboring reference samples may be encoded and signaled.
- filtering is performed on reference samples when the reference line of the current block is an adjacent reference line (i.e., a reference line with index 0).
- filtering may be set to be performed only when the reference line of the current block is an adjacent reference line.
- the adjacent reference line adjacent to the current block may be a reference line whose index is 1 greater than that of the reference line of the current block.
- either a single-line filter or an angular filter may be applied to filter the reference samples.
- the reference samples may be filtered based on a single-line filter
- the intra prediction mode of the current block is a directional mode
- the reference samples may be filtered based on an angular filter.
- the reference samples may be filtered based on the angular filter.
- the neighboring reference line may be a reference line whose index is 1 greater than that of the current reference line.
- the neighboring reference line may be a reference line whose index is 1 less than that of the current reference line.
- reference sample filtering may be set not to be applied to the current block.
- the neighboring reference line can be a reference line whose index is 1 less than that of the current reference line. If the index of the current reference line is the minimum (i.e., 0), the neighboring reference line can be a reference line whose index is 1 greater than that of the current reference line. Alternatively, if the index of the current reference line is the minimum, reference sample filtering can be set not to be applied to the current block.
- the reference samples can be filtered using a single line filter, and if the reference line is not an adjacent reference line (i.e., a reference line with an index greater than 0), the reference samples can be filtered based on an angular filter.
- Reference samples can also be filtered using multiple neighboring reference lines. For example, a first angular neighboring reference sample can be selected from a first reference line whose index is 1 greater than that of the current reference line, and a second angular neighboring reference sample can be selected from a second reference line whose index is 1 less than that of the current reference line. Then, by inputting the reference sample at the position to be filtered within the current reference line, the first angular neighboring reference sample, and the second angular neighboring reference sample into the filter, a filtered reference sample can be obtained.
- a first angular neighboring reference sample may be selected from a first reference line whose index is 1 greater than that of the current reference line, and a second angular neighboring reference sample may be selected from a second reference line whose index is 2 greater than that of the current reference line.
- a first angular neighboring reference sample may be selected from a first reference line whose index is 1 less than that of the current reference line, and a second angular neighboring reference sample may be selected from a second reference line whose index is 2 less than that of the current reference line.
- the weight assigned to the reference sample at the position to be filtered may have a value greater than the weight assigned to each of the first angular neighboring reference sample and the second angular neighboring reference sample.
- the weight assigned to each of the reference sample at the position to be filtered, the first angular neighboring reference sample, and the second angular neighboring reference sample may be ⁇ 1/2, 1/4, 1/4 ⁇ .
- At least one of the number or positions of neighboring reference lines for angular filtering may be different. For example, if the index of the reference line of the current block indicates a minimum value (i.e., 0, i.e., an adjacent reference line) or a maximum value, filtering based on the angular filter can be performed using one adjacent reference line adjacent to the current reference line. On the other hand, if the index of the reference line of the current block belongs to a predetermined range (e.g., a value excluding the minimum value and the maximum value), filtering based on the angular filter can be performed using two adjacent reference lines adjacent to the current reference line.
- a predetermined range e.g., a value excluding the minimum value and the maximum value
- the index of the current reference line is the minimum, filtering based on an angular filter can be performed using two neighboring reference lines having indices greater than those of the current reference line.
- the index of the current reference line is the maximum, filtering based on an angular filter can be performed using two neighboring reference lines having indices less than those of the current reference line. If the index of the current reference line is not the minimum or maximum, the current reference line can exist between the first neighboring reference line and the second neighboring reference line.
- information can be encoded and signaled to the decoder indicating what type of filtering to use.
- each of the components (e.g., units, modules, etc.) constituting the block diagram in the above-described disclosure may be implemented as a hardware device or software, or a plurality of components may be combined to be implemented as a single hardware device or software.
- the hardware device may include at least one of a processor for performing a calculation, a memory for storing data, a transmitter for transmitting data, and a receiver for receiving data.
- the above-described disclosure may be implemented in the form of program commands that can be executed through various computer components and recorded on a computer-readable recording medium.
- the computer-readable recording medium may include program commands, data files, data structures, etc., singly or in combination.
- a computer-readable recording medium storing a bitstream generated by the above-described encoding method.
- the bitstream can be transmitted by an encoding device, and a decoding device can receive the bitstream and decode an image.
- Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs, DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions such as ROMs, RAMs, flash memories, and the like.
- the hardware devices may be configured to operate as one or more software modules to perform processing according to the present disclosure, and vice versa.
- Embodiments of the present disclosure can be applied to electronic devices that encode or decode images.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
본 개시는 영상 신호 처리 방법 및 장치에 관한 것이다.The present disclosure relates to a method and device for processing an image signal.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 고효율의 영상 압축 기술들이 활용될 수 있다.Recently, the demand for high-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images is increasing in various application fields. As the image data becomes higher in resolution and quality, the amount of data increases relatively compared to existing image data. Therefore, when transmitting the image data using media such as existing wired and wireless broadband lines or storing it using existing storage media, the transmission and storage costs increase. In order to solve these problems that occur as image data becomes higher in resolution and quality, high-efficiency image compression technologies can be utilized.
영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 화면 간 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 화면 내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.There are various technologies such as inter-picture prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture, intra-picture prediction technology that predicts pixel values included in the current picture using pixel information in the current picture, and entropy coding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance, etc., and using these image compression technologies, image data can be effectively compressed and transmitted or stored.
한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 컨텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.Meanwhile, as the demand for high-resolution images increases, the demand for stereoscopic image content as a new image service is also increasing. Discussions are underway on video compression technology to effectively provide high-resolution and ultra-high-resolution stereoscopic image content.
본 개시는 인트라 예측을 수행하기 위한 참조 샘플들을 필터링하는 방법 및 이를 수행하기 위한 장치를 제공하는 것을 목적으로 한다.The present disclosure aims to provide a method for filtering reference samples for performing intra prediction and a device for performing the same.
본 개시는 인트라 예측 모드에 따라, 참조 샘플에 적용되는 필터 타입을 적응적으로 결정하는 방법 및 이를 수행하기 위한 장치를 제공하는 것을 목적으로 한다.The present disclosure aims to provide a method for adaptively determining a filter type to be applied to a reference sample according to an intra prediction mode and a device for performing the same.
본 개시에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The technical problems to be achieved in the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by a person having ordinary skill in the technical field to which the present invention belongs from the description below.
본 발명에 따른 영상 부호화/복호화 방법은, 현재 블록의 참조 라인을 결정하는 단계; 현재 블록의 인트라 예측 모드를 결정하는 단계; 상기 참조 라인에 포함된 참조 샘플들을 필터링하는 단계; 및 필터링된 참조 샘플들 및 상기 인트라 예측 모드를 기초로, 상기 현재 블록의 예측 블록을 획득하는 단계를 포함할 수 있다. 이때, 상기 필터링은, 제1 필터 타입 또는 제2 필터 타입 중 적어도 하나에 의해 수행되고, 상기 제1 필터 타입은, 상기 참조 라인에 포함된 이웃 참조 샘플을 이용하는 것이고, 상기 제2 필터 타입은, 상기 참조 라인에 인접하는 이웃 참조 라인에 포함된 앵귤러 이웃 참조 샘플을 이용하는 것일 수 있다.A video encoding/decoding method according to the present invention may include: a step of determining a reference line of a current block; a step of determining an intra prediction mode of the current block; a step of filtering reference samples included in the reference line; and a step of obtaining a prediction block of the current block based on the filtered reference samples and the intra prediction mode. In this case, the filtering may be performed by at least one of a first filter type or a second filter type, and the first filter type may use a neighboring reference sample included in the reference line, and the second filter type may use an angular neighboring reference sample included in a neighboring reference line adjacent to the reference line.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 현재 블록의 상기 인트라 예측 모드에 기초하여, 상기 제1 필터 타입 또는 상기 제2 필터 타입 중 하나가 선택될 수 있다.In the image decoding/encoding method according to the present disclosure, one of the first filter type or the second filter type may be selected based on the intra prediction mode of the current block.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 인트라 예측 모드가 비방향성 모드인 경우, 상기 제1 필터 타입에 기초하여 상기 참조 샘플들이 필터링되고, 상기 인트라 예측 모드가 방향성 모드인 경우, 상기 제2 필터 타입에 기초하여 상기 참조 샘플들이 필터링될 수 있다.In the video decoding/encoding method according to the present disclosure, when the intra prediction mode is a non-directional mode, the reference samples may be filtered based on the first filter type, and when the intra prediction mode is a directional mode, the reference samples may be filtered based on the second filter type.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 앵귤러 이웃 참조 샘플은, 상기 참조 라인이 포함된 참조 샘플로부터, 상기 인트라 예측 모드의 방향성에 따라, 상기 이웃 참조 라인에 프로젝션된 위치에 존재할 수 있다.In the image decoding/encoding method according to the present disclosure, the angular neighboring reference sample may exist at a position projected to the neighboring reference line, according to the directionality of the intra prediction mode, from a reference sample including the reference line.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 프로젝션된 위치가 분수 위치를 가리키는 경우, 상기 이웃 참조 라인 내 상기 프로젝션된 위치 양쪽에 위치하는 두 정수 위치 참조 샘플들을 보간하여, 상기 앵귤러 이웃 참조 샘플을 유도할 수 있다.In the image decoding/encoding method according to the present disclosure, when the projected position indicates a fractional position, the angular neighboring reference sample can be derived by interpolating two integer position reference samples located on both sides of the projected position within the neighboring reference line.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 프로젝션된 위치가 분수 위치를 가리키는 경우, 상기 이웃 참조 샘플 라인 내 상기 프로젝션된 위치에 가장 가까운 정수 위치 참조 샘플이 상기 앵귤러 이웃 참조 샘플로 설정될 수 있다.In the image decoding/encoding method according to the present disclosure, when the projected position indicates a fractional position, an integer position reference sample closest to the projected position within the neighboring reference sample line may be set as the angular neighboring reference sample.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 이웃 참조 라인은, 상기 참조 라인 보다 인덱스가 1 만큼 큰 또는 작은 참조 라인일 수 있다.In the image decoding/encoding method according to the present disclosure, the neighboring reference line may be a reference line having an index that is 1 larger or smaller than the reference line.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 참조 라인의 인덱스가 최대값이 아닌 경우, 상기 이웃 참조 라인은, 상기 참조 라인보다 인덱스가 1만큼 크고, 상기 참조 라인의 인덱스가 최대값인 경우, 상기 이웃 참조 라인은, 상기 참조 라인보다 인덱스가 1만큼 작을 수 있다.In the image decoding/encoding method according to the present disclosure, when the index of the reference line is not the maximum value, the neighboring reference line may have an index that is 1 larger than the reference line, and when the index of the reference line is the maximum value, the neighboring reference line may have an index that is 1 smaller than the reference line.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 필터링된 참조 샘플은, 상기 참조 라인 내 참조 샘플 및 상기 이웃 참조 라인 내 앵귤러 참조 샘플을 가중합하여 획득될 수 있다.In the image decoding/encoding method according to the present disclosure, the filtered reference sample can be obtained by weighting the reference sample within the reference line and the angular reference sample within the neighboring reference line.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 참조 샘플에 할당되는 가중치는, 상기 앵귤러 참조 샘플에 할당되는 가중치보다 큰 값을 가질 수 있다. In the image decoding/encoding method according to the present disclosure, the weight assigned to the reference sample may have a larger value than the weight assigned to the angular reference sample.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 필터링된 참조 샘플은, 상기 참조 라인 내 참조 샘플, 상기 참조 라인에 인접하는 제1 이웃 참조 라인 내 제1 앵귤러 참조 샘플 및 상기 참조 라인에 인접하는 제2 이웃 참조 라인 내 제2 앵귤러 참조 샘플을 가중합하여 획득될 수 있다.In the image decoding/encoding method according to the present disclosure, the filtered reference sample can be obtained by weighting a reference sample within the reference line, a first angular reference sample within a first neighboring reference line adjacent to the reference line, and a second angular reference sample within a second neighboring reference line adjacent to the reference line.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 참조 라인은, 상기 제1 이웃 참조 라인 및 상기 제2 이웃 참조 라인 사이에 존재할 수 있다.In the image decoding/encoding method according to the present disclosure, the reference line may exist between the first neighboring reference line and the second neighboring reference line.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 제2 필터 타입에 따른 필터링을 수행함에 있어서, 복수의 이웃 참조 라인들이 이용되는지 여부는, 상기 참조 라인의 인덱스를 기초로 결정될 수 있다.In the image decoding/encoding method according to the present disclosure, when performing filtering according to the second filter type, whether a plurality of neighboring reference lines are used can be determined based on the index of the reference line.
본 개시에 따른 영상 부호화 방법에 의해 부호화된 비트스트림을 저장하는 컴퓨터로 판독가능한 기록 매체가 제공될 수 있다.A computer-readable recording medium storing a bitstream encoded by an image encoding method according to the present disclosure can be provided.
본 개시에 의하면, 참조 샘플들을 필터링함으로써, 예측 정확도를 높이고, 이에 따라, 부호화/복호화 성능을 향상시킬 수 있다.According to the present disclosure, by filtering reference samples, prediction accuracy can be increased, and thus encoding/decoding performance can be improved.
본 개시에 의하면, 인트라 예측 모드의 특성에 따라, 참조 샘플에 적용되는 필터 타입을 적응적으로 선택함으로써, 예측 정확도를 향상시키고, 이를 통해, 영상의 압축 성능을 향상시킬 수 있다.According to the present disclosure, by adaptively selecting a filter type applied to a reference sample according to the characteristics of an intra prediction mode, prediction accuracy can be improved, and thereby image compression performance can be improved.
본 개시에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The effects obtainable from the present disclosure are not limited to the effects mentioned above, and other effects not mentioned will be clearly understood by a person skilled in the art to which the present disclosure belongs from the description below.
도 1은 본 개시의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다. FIG. 1 is a block diagram illustrating an image encoding device according to an embodiment of the present disclosure.
도 2는 본 개시의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.FIG. 2 is a block diagram illustrating an image decoding device according to an embodiment of the present disclosure.
도 3은 본 개시에 따른 영상 부호화/복호화 장치에 의해 수행되는 영상 부호화/복호화 방법을 도시한 것이다.FIG. 3 illustrates an image encoding/decoding method performed by an image encoding/decoding device according to the present disclosure.
도 4 및 도 5는 본 개시에 따른 복수의 인트라 예측 모드의 일예를 도시한 것이다.FIGS. 4 and 5 illustrate examples of multiple intra prediction modes according to the present disclosure.
도 6은 본 개시에 따른 플래너 모드 기반의 인트라 예측 방법을 도시한 것이다.FIG. 6 illustrates an intra prediction method based on a planar mode according to the present disclosure.
도 7은 본 개시에 따른 DC 모드 기반의 인트라 예측 방법을 도시한 것이다.FIG. 7 illustrates an intra prediction method based on DC mode according to the present disclosure.
도 8은 본 개시에 따른 방향성 모드 기반의 인트라 예측 방법을 도시한 것이다.FIG. 8 illustrates an intra prediction method based on a directional mode according to the present disclosure.
도 9는 분수 위치의 샘플을 유도하는 방법을 도시한 것이다.Figure 9 illustrates a method for deriving samples of fractional positions.
도 10 및 도 11은 인트라 예측 모드별, 각도에 대한 탄젠트 값이 32배 스케일링된 것을 도시한 것이다.Figures 10 and 11 illustrate that the tangent value for angle is scaled by a factor of 32 for each intra prediction mode.
도 12는 방향성 모드가 34번 내지 49번 모드 중 하나인 경우, 인트라 예측 양상을 예시한 도면이다.Figure 12 is a diagram illustrating an intra prediction aspect when the directional mode is one of
도 13은 좌측 참조 샘플들을 보간하여 상단 참조 샘플을 생성하는 예를 설명하기 위한 도면이다.Figure 13 is a diagram illustrating an example of generating an upper reference sample by interpolating left reference samples.
도 14는 1D 어레이로 배열된 참조 샘플들을 이용하여, 인트라 예측이 수행되는 예를 나타낸 것이다.Figure 14 shows an example in which intra prediction is performed using reference samples arranged in a 1D array.
도 15는 싱글 트리 구조가 사용되는 경우, 부/복호화 순서를 설명하기 위한 도면이다.Figure 15 is a diagram explaining the encoding/decoding order when a single tree structure is used.
도 16은 듀얼 트리 구조가 사용되는 경우, 부/복호화 순서를 설명하기 위한 도면이다.Figure 16 is a diagram explaining the order of encoding/decoding when a dual tree structure is used.
도 17은 복원된 루마 블록을 이용하여 크로마 블록을 예측하는 방법을 나타낸 흐름도이다.Figure 17 is a flowchart illustrating a method for predicting a chroma block using a restored luma block.
도 18 내지 도 20은 루마 블록을 다운 샘플링하는 예를 나타낸 것이다.Figures 18 to 20 illustrate examples of downsampling a luma block.
도 21은 다운 샘플링이 적용되는 위치와 관련한 예를 설명하기 위한 도면이다.Figure 21 is a drawing to explain an example related to the location where down sampling is applied.
도 22는 참조 샘플들을 필터링하는 예를 설명하기 위한 도면이다.Figure 22 is a diagram illustrating an example of filtering reference samples.
도 23은 참조 샘플들을 필터링하는 예를 설명하기 위한 도면이다.Figure 23 is a diagram illustrating an example of filtering reference samples.
도 24는 앵귤러 필터가 적용되는 방향성 모드들을 예시한 것이다.Figure 24 illustrates directional modes to which angular filters are applied.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.The present invention can have various modifications and various embodiments, and specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, but should be understood to include all modifications, equivalents, or substitutes included in the spirit and technical scope of the present invention. In describing each drawing, similar reference numerals are used for similar components.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.The terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are only used to distinguish one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. The term and/or includes a combination of a plurality of related described items or any one of a plurality of related described items.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When it is said that a component is "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components in between. On the other hand, when it is said that a component is "directly connected" or "directly connected" to another component, it should be understood that there are no other components in between.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprises" or "has" and the like are intended to specify the presence of a feature, number, step, operation, component, part or combination thereof described in the specification, but do not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts or combinations thereof.
이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, with reference to the attached drawings, a preferred embodiment of the present invention will be described in more detail. Hereinafter, the same reference numerals are used for the same components in the drawings, and redundant descriptions of the same components are omitted.
도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다. FIG. 1 is a block diagram showing an image encoding device according to an embodiment of the present invention.
도 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).
도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.Each component shown in FIG. 1 is independently depicted to indicate different characteristic functions in the image encoding device, and does not mean that each component is composed of separate hardware or a single software configuration unit. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or one component may be divided into multiple components to perform a function, and such integrated and separated 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.
또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.In addition, some components may not be essential components that perform essential functions in the present invention, but may be optional components that are merely used to improve performance. The present invention may be implemented by including only essential components for implementing the essence of the present invention, excluding components that are merely used to improve performance, and a structure that includes only essential components, excluding optional components that are merely used to improve performance, is also included in the scope of the present invention.
픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 픽쳐 분할부(110)에서는 하나의 픽쳐에 대해 복수의 부호화 단위, 예측 단위 및 변환 단위의 조합으로 분할하고 소정의 기준(예를 들어, 비용 함수)으로 하나의 부호화 단위, 예측 단위 및 변환 단위 조합을 선택하여 픽쳐를 부호화 할 수 있다.The picture splitting unit (110) can split an 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). The picture splitting unit (110) can split one picture into a combination of multiple coding units, prediction units, and transform units, and select one combination of coding units, prediction units, and transform units based on a predetermined criterion (e.g., a cost function) to encode the picture.
예를 들어, 하나의 픽쳐는 복수개의 부호화 단위로 분할될 수 있다. 픽쳐에서 부호화 단위를 분할하기 위해서는 쿼드 트리 구조(Quad Tree Structure)와 같은 재귀적인 트리 구조를 사용할 수 있는데 하나의 영상 또는 최대 크기 부호화 단위(largest coding unit)를 루트로 하여 다른 부호화 단위로 분할되는 부호화 유닛은 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 일정한 제한에 따라 더 이상 분할되지 않는 부호화 단위는 리프 노드가 된다. 즉, 하나의 코딩 유닛에 대하여 정방형 분할만이 가능하다고 가정하는 경우, 하나의 부호화 단위는 최대 4개의 다른 부호화 단위로 분할될 수 있다.For example, a picture can be split into multiple coding units. In order to split a coding unit in a picture, a recursive tree structure such as a quad tree structure can be used. A coding unit that is split into other coding units with one image or the largest coding unit as the root can be split with as many child nodes as the number of split coding units. A coding unit that cannot be split any further according to a certain restriction becomes a leaf node. That is, if it is assumed that only a square split is possible for a coding unit, a coding unit can be split into at most four different coding units.
이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.Hereinafter, in the embodiments of the present invention, the encoding unit may be used to mean a unit that performs encoding, or may be used to mean a unit that performs decoding.
예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다.A prediction unit may be divided into at least one square or rectangular shape of the same size within one coding unit, or may be divided such that one prediction unit among the divided prediction units within one coding unit has a different shape and/or size from another prediction unit.
부호화 단위를 기초로 인트라 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위 NxN으로 분할하지 않고 인트라 예측을 수행할 수 있다.When generating a prediction unit that performs intra prediction based on a coding unit, if it is not the minimum coding unit, intra prediction can be performed without dividing it into multiple prediction units NxN.
예측부(120, 125)는 인터 예측을 수행하는 인터 예측부(120)와 인트라 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화 장치에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction and an intra prediction unit (125) that performs intra prediction. It may be determined whether to use inter prediction or intra prediction for a prediction unit, and specific information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method may be determined. At this time, the processing unit where the prediction is performed and the processing unit where the prediction method and specific contents are determined may be different. For example, the prediction method and prediction mode, etc. may be determined in the prediction unit, and the prediction may be performed in the transformation unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transformation unit (130). In addition, the prediction mode information, motion vector information, etc. used for the prediction may be encoded together with the residual value in the entropy encoding unit (165) and transmitted to the decoding device. When using a specific encoding mode, it is also possible to encode the original block as is and transmit it to the decoding unit without generating a prediction block through the prediction unit (120, 125).
인터 예측부(120)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다. The inter prediction unit (120) may predict a prediction unit based on information of at least one picture among the previous picture or the subsequent picture of the current picture, and in some cases, may predict a prediction unit based on information of a part of an encoded region within the current picture. The inter prediction unit (120) may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
참조 픽쳐 보간부에서는 메모리(155)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.The reference picture interpolation unit can receive reference picture information from the memory (155) and generate pixel information below an integer pixel from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients can be used to generate pixel information below an integer pixel in units of 1/4 pixels. In the case of a chrominance signal, a DCT-based 4-tap interpolation filter (DCT-based Interpolation Filter) with different filter coefficients can be used to generate pixel information below an integer pixel in units of 1/8 pixels.
모션 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터값을 가질 수 있다. 모션 예측부에서는 모션 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 모션 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법, 인트라 블록 카피(Intra Block Copy) 방법 등 다양한 방법이 사용될 수 있다.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 of 1/2 or 1/4 pixel units based on the interpolated pixel. The motion prediction unit can predict the current prediction unit by using a different motion prediction method. Various methods such as the Skip method, the Merge method, the AMVP (Advanced Motion Vector Prediction) method, and the Intra Block Copy method can be used as the motion prediction method.
인트라 예측부(125)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra prediction unit (125) can generate a prediction unit based on reference pixel information surrounding the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block on which inter prediction is performed and the reference pixel is a pixel on which inter prediction is performed, the reference pixel included in the block on which inter prediction is performed can be used as a replacement for the reference pixel information of the surrounding block on which intra prediction is performed. That is, if the reference pixel is not available, the unavailable reference pixel information can be used as a replacement for at least one reference pixel among the available reference pixels.
인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra prediction, the prediction mode can have a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use directional information when performing prediction. The mode for predicting luminance information and the mode for predicting chrominance information can be different, and the intra prediction mode information used for predicting luminance information or the predicted luminance signal information can be utilized to predict chrominance information.
인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행할 수 있다. 그러나 인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수 있다.When performing intra prediction, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit can be 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 sizes of the prediction unit and 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 can be used only for the minimum coding unit.
인트라 예측 방법은 예측 모드에 따라 참조 화소에 AIS(Adaptive Intra Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 참조 화소에 적용되는 AIS 필터의 종류는 상이할 수 있다. 인트라 예측 방법을 수행하기 위해 현재 예측 단위의 인트라 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 인트라 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 인트라 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.The intra prediction method can generate a prediction block after applying an AIS (Adaptive Intra Smoothing) filter to a reference pixel according to a prediction mode. The type of AIS filter applied to the reference pixel may be different. In order to perform the intra prediction method, the intra prediction mode of a current prediction unit can be predicted from the intra prediction modes of prediction units existing in the vicinity of the current prediction unit. When the prediction mode of the current prediction unit is predicted using mode information predicted from the surrounding prediction units, if the intra prediction modes of the current prediction unit and the surrounding prediction units are the same, information that the prediction modes of the current prediction unit and the surrounding prediction units are the same can be transmitted using predetermined flag information, and if the prediction modes of the current prediction unit and the surrounding prediction units are different, entropy encoding can be performed to encode the prediction mode information of the current block.
또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다. In addition, a residual block including residual value information, which is a difference value between the prediction unit that performed the prediction and the original block of the prediction unit based on the prediction unit generated in the prediction unit (120, 125), can be generated. The generated residual block can be input to the transformation unit (130).
변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지, DST를 적용할지 또는 KLT를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다. In the transformation unit (130), the residual block including the residual value information of the prediction unit generated through the original block and the prediction unit (120, 125) can be transformed using a transformation method such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra prediction mode information of the prediction unit used to generate the residual block.
양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.The quantization unit (135) can quantize the values converted to the frequency domain in the transformation unit (130). The quantization coefficients can vary depending on the block or the importance of the image. The values produced by the quantization unit (135) can be provided to the dequantization unit (140) and the reordering unit (160).
재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.The rearrangement unit (160) can perform rearrangement of coefficient values for quantized residual values.
재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.The rearrangement unit (160) can change a two-dimensional block-shaped coefficient into a one-dimensional vector shape by using a coefficient scanning method. For example, the rearrangement unit (160) can change the two-dimensional block-shaped coefficient into a one-dimensional vector shape by scanning from the DC coefficient to the coefficient of the high-frequency region by using a zig-zag scan method. Depending on the size of the transformation unit and the intra prediction mode, a vertical scan that scans the two-dimensional block-shaped coefficient in the column direction or a horizontal scan that scans the two-dimensional block-shaped coefficient in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, it is possible to determine which scan method among the zig-zag scan, the vertical scan, and the horizontal scan is to be used.
엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다. 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, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding).
엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다. The entropy encoding unit (165) can encode various information such as residual value coefficient information of an encoding unit, block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information from the rearrangement unit (160) and the prediction unit (120, 125).
엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다.The entropy encoding unit (165) can entropy encode the coefficient values of the encoding unit input from the rearrangement unit (160).
역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다. In the inverse quantization unit (140) and the inverse transformation unit (145), the values quantized in the quantization unit (135) are inversely quantized and the values transformed in the transformation unit (130) are inversely transformed. The residual values generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted prediction units through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.
필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.The filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).
디블록킹 필터는 복원된 픽쳐에서 블록 간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.A deblocking filter can remove block distortion caused by boundaries between blocks in a restored picture. In order to determine whether to perform deblocking, it is possible to determine whether to apply a deblocking filter to the current block based on pixels included in several columns or rows included in the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied depending on the required deblocking filtering strength. In addition, when applying a deblocking filter, horizontal filtering and vertical filtering can be processed in parallel when performing vertical filtering and horizontal filtering.
오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The offset correction unit can correct the offset from the original image on a pixel basis for the image on which deblocking has been performed. To perform offset correction for a specific picture, a method can 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 a method can be used in which the offset is applied by considering the edge information of each pixel.
ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. Adaptive Loop Filtering (ALF) can be performed based on the value compared between the filtered restored image and 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 can be performed differentially for each group. Information related to whether to apply ALF can be transmitted by luminance signal for each coding unit (CU), and the shape and filter coefficient of the ALF filter to be applied can be different for each block. In addition, the same shape (fixed shape) of the ALF filter can be applied regardless of the characteristics of the target block.
메모리(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 an embodiment of the present invention.
도 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 reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), a prediction unit (230, 235), a filter unit (240), and a memory (245).
영상 부호화 장치에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화 장치와 반대의 절차로 복호화될 수 있다.When a video bitstream is input from a video encoding device, the input bitstream can be decoded in the opposite procedure to that of the video encoding device.
엔트로피 복호화부(210)는 영상 부호화 장치의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화 장치에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다. The entropy decoding unit (210) can perform entropy decoding in a procedure opposite to that of performing entropy encoding in the entropy encoding unit of the video encoding device. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied in response to the method performed in the video encoding device.
엔트로피 복호화부(210)에서는 부호화 장치에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.The entropy decoding unit (210) can decode information related to intra prediction and inter prediction performed in the encoding device.
재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)에서는 부호화부에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 해당 부호화부에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다.The reordering unit (215) can perform reordering based on the method in which the bitstream that has been entropy-decoded by the entropy decoding unit (210) is reordered by the encoding unit. The coefficients expressed in the form of a one-dimensional vector can be re-restored into coefficients in the form of a two-dimensional block and reordered. The reordering unit (215) can perform reordering by receiving information related to the coefficient scanning performed by the encoding unit and performing reverse scanning based on the scanning order performed by the corresponding encoding unit.
역양자화부(220)는 부호화 장치에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit (220) can perform inverse quantization based on the quantization parameters provided from the encoding device and the coefficient values of the rearranged block.
역변환부(225)는 영상 부호화 장치에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT, DST, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 부호화 장치에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화 장치의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.The inverse transform unit (225) can perform inverse transform, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms performed by the transform unit, i.e., DCT, DST, and KLT, on the quantization result performed by the image encoding device. The inverse transform can be performed based on the transmission unit determined by the image encoding device. In the inverse transform unit (225) of the image decoding device, a transform technique (e.g., DCT, DST, KLT) can be selectively performed according to a plurality of pieces of information, such as a prediction method, 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 prediction block generation related information provided from the entropy decoding unit (210) and previously decoded block or picture information provided from the memory (245).
전술한 바와 같이 영상 부호화 장치에서의 동작과 동일하게 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수도 있다.As described above, when performing intra prediction in the same manner as the operation in the video encoding device, 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, if the size of the prediction unit and the size of the transformation unit are different when performing intra prediction, intra prediction can be performed using reference pixels based on the transformation unit. In addition, intra prediction using NxN division only for the minimum coding unit can be used.
예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 인터 예측부(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. The inter prediction unit (230) may perform inter prediction on the current prediction unit based on information included in at least one of a previous picture or a subsequent picture of the current picture including the current prediction unit, by using information necessary for inter prediction of the current prediction unit provided from the image encoding device. Alternatively, inter prediction may be performed based on information on a portion of a pre-restored area within the current picture including the current prediction unit.
인터 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피 모드 중 어떠한 방법인지 여부를 판단할 수 있다.In order to perform inter prediction, it is possible to determine whether the motion prediction method of the prediction unit included in the encoding unit is Skip Mode, Merge Mode, AMVP Mode, or Intra Block Copy Mode based on the encoding unit.
인트라 예측부(235)는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 영상 부호화 장치에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로 인트라 예측을 수행할 수 있다. 인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화 장치에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra prediction unit (235) can generate a prediction block based on pixel information in the current picture. If the prediction unit is a prediction unit that has performed intra prediction, the intra prediction can be performed based on intra prediction mode information of the prediction unit provided by the image encoding device. The intra prediction unit (235) can include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixels of the current block and can determine whether to apply the filter according to the prediction mode of the current prediction unit and apply it. The AIS filter 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 encoding device. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.The reference pixel interpolation unit can interpolate the reference pixel to generate a reference pixel of a pixel unit less than an integer value when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value interpolated by the reference pixel. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.
복원된 블록 또는 픽쳐는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.The restored block or picture may be provided to a filter unit (240). The filter unit (240) may include a deblocking filter, an offset correction unit, and an ALF.
영상 부호화 장치로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화 장치의 디블록킹 필터에서는 영상 부호화 장치에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화 장치에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다. Information on whether a deblocking filter has been applied to a corresponding block or picture from a video encoding device and, if a deblocking filter has been applied, information on whether a strong filter or a weak filter has been applied can be provided. A deblocking filter of a video decoding device can receive information related to a deblocking filter provided from a video encoding device and perform deblocking filtering on a corresponding block in the video decoding device.
오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.The offset correction unit can perform offset correction on the restored image based on information such as the type of offset correction applied to the image during encoding and the offset value.
ALF는 부호화 장치로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.ALF can be applied to an encoding unit based on ALF application information provided from an encoding device, ALF coefficient information, etc. 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.
전술한 바와 같이 이하, 본 발명의 실시예에서는 설명의 편의상 코딩 유닛(Coding Unit)을 부호화 단위라는 용어로 사용하지만, 부호화 뿐만 아니라 복호화를 수행하는 단위가 될 수도 있다.As described above, in the following embodiments of the present invention, for convenience of explanation, the term coding unit is used as an encoding unit, but it may also be a unit that performs not only encoding but also decoding.
또한, 현재 블록은, 부호화/복호화 대상 블록을 나타내는 것으로, 부호화/복호화 단계에 따라, 코딩 트리 블록(또는 코딩 트리 유닛), 부호화 블록(또는 부호화 유닛), 변환 블록(또는 변환 유닛) 또는 예측 블록(또는 예측 유닛) 등을 나타내는 것일 수 있다. 본 명세서에서, '유닛'은 특정 부호화/복호화 프로세스를 수행하기 위한 기본 단위를 나타내고, '블록'은 소정 크기의 화소 어레이를 나타낼 수 있다. 별도의 구분이 없는 한, '블록'과 '유닛'은 동등한 의미로 사용될 수 있다. 예컨대, 후술되는 실시예에서, 부호화 블록(코딩 블록) 및 부호화 유닛(코딩 유닛)은 상호 동등한 의미인 것으로 이해될 수 있다. In addition, the current block represents a block to be encoded/decoded, and may represent a coding tree block (or coding tree unit), an encoding block (or encoding unit), a transform block (or transform unit), or a prediction block (or prediction unit), depending on the encoding/decoding step. In this specification, a 'unit' represents a basic unit for performing a specific encoding/decoding process, and a 'block' may represent a pixel array of a predetermined size. Unless otherwise distinguished, 'block' and 'unit' may be used with the same meaning. For example, in the embodiment described below, an encoding block (coding block) and an encoding unit (coding unit) may be understood to have the same meaning.
도 3은 본 개시에 따른 영상 부호화/복호화 장치에 의해 수행되는 영상 부호화/복호화 방법을 도시한 것이다.FIG. 3 illustrates an image encoding/decoding method performed by an image encoding/decoding device according to the present disclosure.
도 3을 참조하면, 현재 블록의 인트라 예측을 위한 참조 라인을 결정할 수 있다(S300).Referring to FIG. 3, a reference line for intra prediction of the current block can be determined (S300).
현재 블록은 영상 부호화/복호화 장치에 기-정의된 복수의 참조 라인 후보 중 하나 또는 그 이상을 인트라 예측을 위한 참조 라인으로 이용할 수 있다. 여기서, 기-정의된 복수의 참조 라인 후보는, 복호화 대상인 현재 블록에 인접한 이웃 참조 라인과 현재 블록의 경계로부터 1-샘플 내지 N-샘플만큼 떨어진 N개의 비-이웃 참조 라인을 포함할 수 있다. N은 1, 2, 3, 또는 그 이상의 정수일 수 있다. 이하, 설명의 편의를 위해, 현재 블록이 이용 가능한 복수의 참조 라인 후보는, 이웃 참조 라인 후보과 3개의 비-이웃 참조 라인 후보로 구성됨을 가정하나, 이에 한정되지 아니한다. 즉, 현재 블록이 이용 가능한 복수의 참조 라인 후보는 4개 또는 그 이상의 비-이웃 참조 라인 후보를 포함할 수 있음은 물론이다.The current block can use one or more of a plurality of pre-defined reference line candidates in the video encoding/decoding device as reference lines for intra prediction. Here, the plurality of pre-defined reference line candidates can include neighboring reference lines adjacent to the current block to be decoded and N non-neighboring reference lines that are 1 to N samples away from the boundary of the current block. N can be 1, 2, 3, or an integer greater than or equal to 1. For convenience of explanation, it is assumed hereafter that the plurality of reference line candidates available to the current block are composed of neighboring reference line candidates and three non-neighboring reference line candidates, but the present invention is not limited thereto. That is, it goes without saying that the plurality of reference line candidates available to the current block can include four or more non-neighboring reference line candidates.
영상 부호화 장치는, 복수의 참조 라인 후보 중 최적의 참조 라인 후보를 결정하고, 이를 특정하기 위한 인덱스를 부호화할 수 있다. 영상 복호화 장치는, 비트스트림을 통해 시그날링되는 인덱스에 기초하여, 현재 블록의 참조 라인을 결정할 수 있다. 상기 인덱스는, 복수의 참조 라인 후보 중 어느 하나를 특정할 수 있다. 상기 인덱스에 의해 특정된 참조 라인 후보가 현재 블록의 참조 라인으로 이용될 수 있다. The video encoding device can determine an optimal reference line candidate from among a plurality of reference line candidates and encode an index for specifying the optimal reference line candidate. The video decoding device can determine a reference line of a current block based on an index signaled through a bitstream. The index can specify one of the plurality of reference line candidates. The reference line candidate specified by the index can be used as a reference line of the current block.
현재 블록의 참조 라인을 결정하기 위해 시그날링되는 인덱스의 개수는 1개일 수도 있고, 2개 또는 그 이상일 수도 있다. 일 예로, 상기 시그날링되는 인덱스의 개수가 1개인 경우, 현재 블록은 복수의 참조 라인 후보 중에서 상기 시그날링된 인덱스에 의해 특정되는 단일의 참조 라인 후보만을 이용하여 인트라 예측을 수행할 수 있다. 또는, 상기 시그날링되는 인덱스의 개수가 2개 이상인 경우, 현재 블록은 복수의 참조 라인 후보 중에서 복수개의 인덱스에 의해 특정되는 복수의 참조 라인 후보를 이용하여 인트라 예측을 수행할 수 있다.The number of indexes signaled to determine the reference line of the current block may be 1, 2 or more. For example, when the number of the signaled indexes is 1, the current block can perform intra prediction using only a single reference line candidate specified by the signaled index among the plurality of reference line candidates. Alternatively, when the number of the signaled indexes is 2 or more, the current block can perform intra prediction using a plurality of reference line candidates specified by a plurality of indexes among the plurality of reference line candidates.
도 3을 참조하면, 현재 블록의 인트라 예측 모드를 결정할 수 있다(S310).Referring to FIG. 3, the intra prediction mode of the current block can be determined (S310).
현재 블록의 인트라 예측 모드는 영상 부호화/복호화 장치에 기-정의된 복수의 인트라 예측 모드 중에서 결정될 수 있다. 상기 기-정의된 복수의 인트라 예측 모드는 도 4 및 도 5를 참조하여 살펴보기로 한다.The intra prediction mode of the current block can be determined from among a plurality of intra prediction modes pre-defined in the video encoding/decoding device. The pre-defined plurality of intra prediction modes will be examined with reference to FIGS. 4 and 5.
도 4는 본 개시에 따른 복수의 인트라 예측 모드의 일예를 도시한 것이다.FIG. 4 illustrates an example of multiple intra prediction modes according to the present disclosure.
도 4를 참조하면, 영상 부호화/복호화 장치에 기-정의된 복수의 인트라 예측 모드는, 비방향성 모드와 방향성 모드로 구성될 수 있다. 비방향성 모드는, 플래너 모드 또는 DC 모드 중 적어도 하나를 포함할 수 있다. 방향성 모드는, 2번 내지 66번의 방향성 모드를 포함할 수 있다.Referring to FIG. 4, a plurality of intra prediction modes pre-defined in the video encoding/decoding device may be composed of a non-directional mode and a directional mode. The non-directional mode may include at least one of a planar mode or a DC mode. The directional mode may include
도 4에 도시된 것보다, 방향성 모드를 더 확장할 수도 있다. 도 5는 방향성 모드가 확장된 예를 나타낸다. The directional mode can be further extended than that shown in Fig. 4. Fig. 5 shows an example in which the directional mode is extended.
도 5에서는, -1번부터 -14번 모드와 67번부터 80번 모드가 추가된 것으로 예시되었다. 이들 방향성 모드는 와이드 앵글 인트라 예측 모드라 호칭될 수 있다. 와이드 앵글 인트라 예측 모드를 이용할 것인지 여부는, 현재 블록의 형태에 따라, 결정될 수 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방 형태의 블록인 경우, 일부 방향성 모드(예컨대, 2번부터 15번)가 67번부터 80번 사이의 와이드 앵글 인트라 예측 모드로 전환될 수 있다. 반면, 현재 블록이 높이가 너비보다 큰 비정방 형태의 블록인 경우, 일부 방향성 모드(예컨대, 53번부터 66번)가, -1번부터 -14번 사이의 와이드 앵글 인트라 예측 모드로 전환될 수 있다. In Fig. 5, it is exemplified that modes -1 to -14 and
이용 가능한 와이드 앵글 인트라 예측 모드들의 범위는, 현재 블록의 너비와 높이 비율에 따라, 적응적으로 결정될 수 있다. 표 1은 현재 블록의 너비 및 높이 비율에 따른, 이용 가능한 와이드 앵글 인트라 예측 모드들의 범위를 나타낸 것이다.The range of available wide-angle intra prediction modes can be adaptively determined according to the width and height ratio of the current block. Table 1 shows the range of available wide-angle intra prediction modes according to the width and height ratio of the current block.
상기 복수의 인트라 예측 모드 중에서 K개의 후보 모드(most probable mode, MPM)를 선택할 수 있다. 선택된 후보 모드를 포함한 후보 리스트가 생성될 수 있다. 후보 리스트에 속한 후보 모드 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 상기 인덱스에 의해 지시된 후보 모드에 기초하여 현재 블록의 인트라 예측 모드가 결정될 수 있다. 일 예로, 상기 인덱스에 의해 지시된 후보 모드가 현재 블록의 인트라 예측 모드로 설정될 수 있다. 또는, 현재 블록의 인트라 예측 모드는, 상기 인덱스에 의해 지시된 후보 모드의 값과 소정의 차분값에 기초하여 결정될 수도 있다. 상기 차분값은, 상기 현재 블록의 인트라 예측 모드의 값과 상기 인덱스에 의해 지시된 후보 모드의 값 간의 차이로 정의될 수 있다. 상기 차분값은 비트스트림을 통해 시그날링될 수 있다. 또는, 상기 차분값은 영상 부호화/복호화 장치에 기-정의된 값일 수도 있다.또는, 현재 블록의 인트라 예측 모드는, 상기 후보 리스트에 현재 블록의 인트라 예측 모드와 동일한 모드가 존재하는지 여부를 나타내는 플래그에 기초하여 결정될 수 있다. 일 예로, 상기 플래그가 제1 값인 경우, 현재 블록의 인트라 예측 모드는 상기 후보 리스트로부터 결정될 수 있다. 이 경우, 후보 리스트에 속한 복수의 후보 모드 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 상기 인덱스에 의해 지시된 후보 모드가 현재 블록의 인트라 예측 모드로 설정될 수 있다. 반면, 상기 플래그가 제2 값인 경우, 나머지 인트라 예측 모드 중 어느 하나가 현재 블록의 인트라 예측 모드로 설정될 수 있다. 상기 나머지 인트라 예측 모드는, 기-정의된 복수의 인트라 예측 모드 중 상기 후보 리스트에 속한 후보 모드를 제외한 모드를 의미할 수 있다. 상기 플래그가 제2 값인 경우, 상기 나머지 인트라 예측 모드 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 시그날링된 인덱스에 의해 지시된 인트라 예측 모드가 현재 블록의 인트라 예측 모드로 설정될 수 있다.크로마 블록의 인트라 예측 모드는, 복수의 크로마 블록의 인트라 예측 모드 후보들 중에서 선택될 수 있다. 이를 위해, 크로마 블록의 인트라 예측 모드 후보들 중 하나를 지시하는 인덱스 정보가 명시적으로 부호화되어 비트스트림을 통해 시그날링될 수 있다. 표 2는 크로마 블록의 인트라 예측 모드 후보들을 예시한 것이다.Among the above plural intra prediction modes, K candidate modes (most probable modes, MPMs) can be selected. A candidate list including the selected candidate modes can be generated. An index indicating one of the candidate modes belonging to the candidate list can be signaled. The intra prediction mode of the current block can be determined based on the candidate mode indicated by the index. For example, the candidate mode indicated by the index can be set as the intra prediction mode of the current block. Alternatively, the intra prediction mode of the current block can be determined based on a value of the candidate mode indicated by the index and a predetermined differential value. The differential value can be defined as a difference between a value of the intra prediction mode of the current block and a value of the candidate mode indicated by the index. The differential value can be signaled through a bitstream. Alternatively, the difference value may be a pre-defined value in the video encoding/decoding device. Alternatively, the intra prediction mode of the current block may be determined based on a flag indicating whether a mode identical to the intra prediction mode of the current block exists in the candidate list. For example, if the flag is a first value, the intra prediction mode of the current block may be determined from the candidate list. In this case, an index indicating any one of a plurality of candidate modes belonging to the candidate list may be signaled. The candidate mode indicated by the index may be set as the intra prediction mode of the current block. On the other hand, if the flag is a second value, any one of the remaining intra prediction modes may be set as the intra prediction mode of the current block. The remaining intra prediction mode may mean a mode excluding a candidate mode belonging to the candidate list among the pre-defined plurality of intra prediction modes. If the flag is a second value, an index indicating any one of the remaining intra prediction modes may be signaled. An intra prediction mode indicated by a signaled index can be set as the intra prediction mode of the current block. The intra prediction mode of the chroma block can be selected from intra prediction mode candidates of a plurality of chroma blocks. For this purpose, index information indicating one of the intra prediction mode candidates of the chroma block can be explicitly encoded and signaled through the bitstream. Table 2 illustrates intra prediction mode candidates of the chroma block.
표 2의 예에서, DM(Direct Mode)는, 크로마 블록과 동일 위치에 존재하는 루마 블록의 인트라 예측 모드를, 크로마 블록의 인트라 예측 모드로 설정하는 것을 의미한다. 한편, 크로마 블록과 동일 위치에 존재하는 루마 블록은, 크로마 블록의 좌상단 샘플의 위치 또는 중앙 샘플의 위치를 기준으로 결정될 수 있다. 일 예로, 루마 블록의 인트라 예측 모드(루마 모드)가 0번(평면모드)이고, 인덱스가 2번을 가리킨다면, 크로마 블록의 인트라 예측 모드는, 수평 모드(18번)로 결정될 수 있다.일 예로, 루마 블록의 인트라 예측 모드(루마 모드)가 1번(DC모드)이고, 인덱스가 0번을 가리킨다면, 크로마 블록의 인트라 예측 모드는 플래너 모드(0번)로 결정될 수 있다. In the example of Table 2, DM (Direct Mode) means setting the intra prediction mode of the luma block existing at the same position as the chroma block to the intra prediction mode of the chroma block. Meanwhile, the luma block existing at the same position as the chroma block can be determined based on the position of the upper left sample or the position of the center sample of the chroma block. For example, if the intra prediction mode (luma mode) of the luma block is 0 (planar mode) and the index points to 2, the intra prediction mode of the chroma block can be determined as the horizontal mode (18). For example, if the intra prediction mode (luma mode) of the luma block is 1 (DC mode) and the index points to 0, the intra prediction mode of the chroma block can be determined as the planar mode (0).
결과적으로, 크로마 블록의 인트라 예측 모드도 도 4 또는 도 5에 도시된 인트라 예측 모드들 중 하나로 설정될 수 있다. 현재 블록의 인트라 예측 모드는 현재 블록의 참조 라인을 결정하기 위해 이용될 수도 있으며, 이 경우 S310 단계는 S300 단계 전에 수행될 수도 있다.As a result, the intra prediction mode of the chroma block may also be set to one of the intra prediction modes illustrated in FIG. 4 or FIG. 5. The intra prediction mode of the current block may also be used to determine the reference line of the current block, in which case step S310 may be performed before step S300.
도 3을 참조하면, 현재 블록의 참조 라인과 인트라 예측 모드에 기초하여 현재 블록에 대해 인트라 예측을 수행할 수 있다(S320).Referring to FIG. 3, intra prediction can be performed for the current block based on the reference line and intra prediction mode of the current block (S320).
이하, 도 6 내지 도 8을 참조하여 인트라 예측 모드 별 인트라 예측 방법에 대해서 자세히 살펴보기로 한다. 다만, 설명의 편의를 위해, 현재 블록의 인트라 예측을 위해 단일 참조 라인이 이용됨을 가정하나, 복수의 참조 라인이 이용되는 경우에도 후술하는 인트라 예측 방법이 동일/유사하게 적용될 수 있다.Hereinafter, the intra prediction method for each intra prediction mode will be examined in detail with reference to FIGS. 6 to 8. However, for convenience of explanation, it is assumed that a single reference line is used for intra prediction of the current block, but even when multiple reference lines are used, the intra prediction method described below can be applied in the same/similar manner.
도 6은 본 개시에 따른 플래너 모드 기반의 인트라 예측 방법을 도시한 것이다.FIG. 6 illustrates an intra prediction method based on a planar mode according to the present disclosure.
도 6을 참조하면, T는 현재 블록의 우상단 코너에 위치하는 참조 샘플을, L은 현재 블록의 좌하단 코너에 위치하는 참조 샘플을 나타낸다. P1은 수평 방향의 보간을 통해 생성될 수 있다. 일 예로, P1은 P1과 동일한 수평 라인에 위치한 참조 샘플과 T를 보간하여 생성될 수 있다. P2는 수직 방향의 보간을 통해 생성될 수 있다. 일 예로, P2는 P2와 동일한 수직 라인에 위치한 참조 샘플과 L을 보간하여 생성될 수 있다. 현재 블록 내 현재 샘플은, 다음 수학식 1과 같이, P1과 P2의 가중합을 통해 예측될 수 있다.Referring to FIG. 6, T represents a reference sample located at the upper right corner of the current block, and L represents a reference sample located at the lower left corner of the current block. P1 can be generated through horizontal interpolation. For example, P1 can be generated by interpolating T with a reference sample located on the same horizontal line as P1. P2 can be generated through vertical interpolation. For example, P2 can be generated by interpolating L with a reference sample located on the same vertical line as P2. The current sample in the current block can be predicted through a weighted sum of P1 and P2, as in the following
수학식 1에서, 가중치 α와 β는, 현재 블록의 너비와 높이를 고려하여 결정될 수 있다. 현재 블록의 너비와 높이에 따라, 가중치 α와 β는 동일한 값을 가질 수도 있고, 서로 상이한 값을 가질 수도 있다. 만약 현재 블록의 너비와 높이가 같다면, 가중치 α와 β를 동일하게 설정할 수 있고, 현재 샘플의 예측 샘플은 P1과 P2의 평균값으로 설정될 수 있다. 현재 블록의 너비와 높이가 같지 않은 경우, 가중치 α와 β는 서로 상이한 값을 가질 수 있다. 일 예로, 너비가 높이보다 큰 경우, 현재 블록의 너비에 대응하는 가중치에 더 작은 값을 설정하고, 현재 블록의 높이에 대응하는 가중치에 더 큰 값을 설정할 수 있다. 역으로, 너비가 높이보다 큰 경우, 현재 블록의 너비에 대응하는 가중치에 더 큰 값을 설정하고, 현재 블록의 높이에 대응하는 가중치에 더 작은 값을 설정할 수 있다. 여기서, 현재 블록의 너비에 대응하는 가중치는 β를 의미하고, 현재 블록의 높이에 대응하는 가중치는 α를 의미할 수 있다.In
도 7은 본 개시에 따른 DC 모드 기반의 인트라 예측 방법을 도시한 것이다.FIG. 7 illustrates an intra prediction method based on DC mode according to the present disclosure.
도 7을 참조하면, 현재 블록에 인접한 주변 샘플의 평균값을 산출하고, 산출된 평균값을 현재 블록 내 모든 샘플의 예측값으로 설정할 수 있다. 여기서, 주변 샘플은, 현재 블록의 상단 참조 샘플과 좌측 참조 샘플을 포함할 수 있다. 다만, 현재 블록의 형태에 따라, 상단 참조 샘플 또는 좌측 참조 샘플만을 이용하여 평균값을 산출할 수도 있다. 일 예로, 현재 블록의 너비가 높이보다 큰 경우, 현재 블록의 상단 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 크거나 같은 경우, 현재 블록의 상단 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 작거나 같은 경우, 현재 블록의 상단 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 반면, 현재 블록의 너비가 높이보다 작은 경우, 현재 블록의 좌측 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 작거나 같은 경우, 현재 블록의 좌측 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 크거나 같은 경우, 현재 블록의 좌측 참조 샘플만을 이용하여 평균값을 산출할 수 있다.Referring to FIG. 7, the average value of the surrounding samples adjacent to the current block can be calculated, and the calculated average value can be set as the predicted value of all samples in the current block. Here, the surrounding samples can include the upper reference sample and the left reference sample of the current block. However, depending on the shape of the current block, the average value can be calculated using only the upper reference sample or the left reference sample. For example, if the width of the current block is greater than the height, the average value can be calculated using only the upper reference sample of the current block. Alternatively, if the ratio of the width and height of the current block is greater than or equal to a predetermined threshold, the average value can be calculated using only the upper reference sample of the current block. Alternatively, if the ratio of the width and height of the current block is less than or equal to a predetermined threshold, the average value can be calculated using only the upper reference sample of the current block. On the other hand, if the width of the current block is less than the height, the average value can be calculated using only the left reference sample of the current block. Alternatively, if the ratio of the width and height of the current block is less than or equal to a predetermined threshold, the average value can be calculated using only the left reference sample of the current block. Alternatively, if the ratio of the width to height of the current block is greater than or equal to a predetermined threshold, the average value can be calculated using only the left reference sample of the current block.
도 8은 본 개시에 따른 방향성 모드 기반의 인트라 예측 방법을 도시한 것이다.FIG. 8 illustrates an intra prediction method based on a directional mode according to the present disclosure.
현재 블록의 인트라 예측 모드가 방향성 모드인 경우, 해당 방향성 모드의 각도에 따라 참조 라인으로 프로젝션(projection)을 수행할 수 있다. 프로젝션된 위치에 참조 샘플이 존재하면, 해당 참조 샘플을 현재 샘플의 예측 샘플로 설정할 수 있다. 만약 프로젝션된 위치에 참조 샘플이 존재하지 않으면, 프로젝션된 위치에 이웃한 하나 또는 그 이상의 주변 샘플을 이용하여 프로젝션된 위치에 대응하는 샘플을 생성할 수 있다. 일 예로, 프로젝션된 위치를 기준으로 양방향으로 이웃한 2개 또는 그 이상의 주변 샘플을 기반으로 보간을 수행하여, 프로젝션된 위치에 대응하는 샘플을 생성할 수 있다. 또는, 프로젝션된 위치에 이웃한 하나의 주변 샘플을 프로젝션된 위치에 대응하는 샘플로 설정할 수 있다. 이때, 프로젝션된 위치에 이웃한 복수의 주변 샘플 중 프로젝션된 위치에 가장 가까운 주변 샘플이 이용될 수 있다. 프로젝션된 위치에 대응하는 샘플을 현재 샘플의 예측 샘플로 설정할 수 있다.If the intra prediction mode of the current block is a directional mode, projection can be performed as a reference line according to the angle of the directional mode. If a reference sample exists at the projected position, the reference sample can be set as a prediction sample of the current sample. If the reference sample does not exist at the projected position, a sample corresponding to the projected position can be generated using one or more neighboring samples neighboring the projected position. For example, a sample corresponding to the projected position can be generated by performing interpolation based on two or more neighboring samples neighboring in both directions with respect to the projected position. Alternatively, one neighboring sample neighboring the projected position can be set as a sample corresponding to the projected position. In this case, among a plurality of neighboring samples neighboring the projected position, a neighboring sample closest to the projected position can be used. The sample corresponding to the projected position can be set as a prediction sample of the current sample.
도 8을 참조하면, 현재 샘플 B의 경우, 해당 위치에서 인트라 예측 모드의 각도에 따라 참조 라인으로 프로젝션을 수행할 경우, 프로젝션된 위치에 참조 샘플이 존재한다(즉, 정수 위치의 참조 샘플, R3). 이 경우, 프로젝션된 위치의 참조 샘플을 현재 샘플 B의 예측 샘플로 설정할 수 있다. 현재 샘플 A의 경우, 해당 위치에서 인트라 예측 모드의 각도에 따라 참조 라인으로 프로젝션을 수행할 경우, 프로젝션된 위치에 참조 샘플(즉, 정수 위치의 참조 샘플)이 존재하지 않는다. 이 경우, 프로젝션된 위치에 이웃한 주변 샘플(예를 들어, R2와 R3)을 기반으로 보간을 수행하여 분수 위치의 샘플(r)을 생성할 수 있다. 생성된 분수 위치의 샘플(r)을 현재 샘플 A의 예측 샘플로 설정할 수 있다.Referring to FIG. 8, in the case of the current sample B, if projection is performed with a reference line according to the angle of the intra prediction mode at the corresponding position, a reference sample exists at the projected position (i.e., a reference sample at an integer position, R3). In this case, the reference sample at the projected position can be set as a prediction sample of the current sample B. In the case of the current sample A, if projection is performed with a reference line according to the angle of the intra prediction mode at the corresponding position, a reference sample (i.e., a reference sample at an integer position) does not exist at the projected position. In this case, a sample (r) at a fractional position can be generated by performing interpolation based on neighboring samples (e.g., R2 and R3) adjacent to the projected position. The generated sample (r) at the fractional position can be set as a prediction sample of the current sample A.
도 9는 분수 위치의 샘플을 유도하는 방법을 도시한 것이다. Figure 9 illustrates a method for deriving samples of fractional positions.
도 9의 예에서, 변수 h는 예측 샘플 A의 위치와 참조 라인 까지의 수직 방향거리(즉, 세로 거리)를 의미하고, 변수 w는 예측 샘플 A의 위치와 분수 위치 샘플 까지의 수평 방향 거리(즉, 가로 거리)를 의미한다. 또한, 변수 θ는, 인트라 예측 모드의 방향성에 따라 미리 정의된 각도를 의미하고, 변수 x는, 분수 위치를 의미한다.In the example of Fig. 9, the variable h represents the vertical distance (i.e., vertical distance) between the position of the prediction sample A and the reference line, and the variable w represents the horizontal distance (i.e., horizontal distance) between the position of the prediction sample A and the fractional position sample. In addition, the variable θ represents a predefined angle according to the directionality of the intra prediction mode, and the variable x represents the fractional position.
변수 w는 다음의 수학식 2와 같이 유도될 수 있다. The variable w can be derived as shown in the following
이후, 변수 w에서, 정수 위치를 제거하면, 최종적으로, 분수 위치가 유도될 수 있다. Afterwards, by removing the integer positions from the variable w, the fractional positions can finally be derived.
분수 위치 샘플은 인접하는 정수 위치 참조 샘플들을 보간하여 생성될 수 있다. 일 예로, 정수 위치 참조 샘플 R2 및 정수 위치 참조 샘플 R3를 보간하여, x 위치의 분수 위치 참조 샘플을 생성할 수 있다. The fractional position sample can be generated by interpolating adjacent integer position reference samples. For example, the fractional position reference sample at the x position can be generated by interpolating the integer position reference sample R2 and the integer position reference sample R3.
분수 위치 샘플을 유도함에 있어서, 실수 연산을 피하기 위해, 스케일링 팩터를 사용할 수 있다. 일 예로, 스케일링 팩터 f가 32로 설정된 경우, 도 8의 (b)에 도시된 예에서와 같이, 이웃하는 정수 참조 샘플들 사이의 거리가 1이 아닌 32로 설정될 수 있다. In deriving fractional position samples, a scaling factor can be used to avoid real number operations. For example, when the scaling factor f is set to 32, the distance between neighboring integer reference samples can be set to 32 instead of 1, as in the example shown in (b) of Fig. 8.
또한, 인트라 예측 모드의 방향성에 따라 결정되는 각도 θ에 대한 탄젠트 값도 동일한 스케일링 팩터(예컨대, 32)를 이용하여 스케일업할 수 있다. Additionally, the tangent value for angle θ, which is determined by the directionality of the intra prediction mode, can also be scaled up using the same scaling factor (e.g., 32).
도 10 및 도 11은 인트라 예측 모드별, 각도에 대한 탄젠트 값이 32배 스케일링된 것을 도시한 것이다.Figures 10 and 11 illustrate that the tangent value for angle is scaled by a factor of 32 for each intra prediction mode.
도 10은, 비-와이드 앵글 인트라 예측 모드에 대한, 탄젠트 값의 스케일링된 결과를 나타낸 것이고, 도 11은 와이드 앵글 인트라 예측 모드에 대한, 탄젠트 값의 스케일링된 결과를 나타낸 것이다.Figure 10 shows the scaled results of tangent values for the non-wide angle intra prediction mode, and Figure 11 shows the scaled results of tangent values for the wide angle intra prediction mode.
인트라 예측 모드의 각도 값에 대한 탄젠트 값(tanθ)이 양수인 경우, 현재 블록의 상단 라인에 속하는 참조 샘플들(즉, 상단 참조 샘플들) 또는 현재 블록의 좌측 라인에 속하는 참조 샘플들(즉, 좌측 참조 샘플들) 중 한쪽만을 사용하여 인트라 예측이 수행될 수 있다. 한편, 인트라 예측 모드의 각도 값에 대한 탄젠트값이 음수인 경우, 상단에 위치하는 참조 샘플들과 좌측에 위치하는 참조 샘플들이 모두 이용된다. When the tangent value (tanθ) for the angle value of the intra prediction mode is positive, intra prediction can be performed using only one of the reference samples belonging to the upper line of the current block (i.e., upper reference samples) or the reference samples belonging to the left line of the current block (i.e., left reference samples). On the other hand, when the tangent value for the angle value of the intra prediction mode is negative, both the reference samples located at the upper side and the reference samples located at the left side are used.
이때, 구현의 간소화를 위해, 좌측 참조 샘플들을 위쪽으로 프로젝션 하거나, 상단 참조 샘플들을 좌측으로 프로젝션 하여, 참조 샘플들을 1D 어레이 형태로 배열하고, 1D 어레이 형태의 참조 샘플들을 이용하여 인트라 예측을 수행하도록 할 수도 있다. At this time, to simplify the implementation, the reference samples may be arranged in a 1D array form by projecting the left reference samples upward or the upper reference samples to the left, and intra prediction may be performed using the reference samples in the 1D array form.
도 12는 방향성 모드가 34번 내지 49번 모드 중 하나인 경우, 인트라 예측 양상을 예시한 도면이다.Figure 12 is a diagram illustrating the intra prediction aspect when the directional mode is one of
현재 블록의 인트라 예측 모드가 34번 내지 49번 모드 중 하나인 경우, 현재 블록의상단 참조 샘플들 뿐만 아니라, 좌측 참조 샘플들을 이용하여 인트라 예측이 수행된다. 이때, 도 12에 도시된 예에서와 같이, 현재 블록의 좌측에 위치하는 참조 샘플을 상단 라인의 위치로 복사하거나, 좌측에 위치하는 참조 샘플들을 보간하여 상단 라인의 참조 샘플을 생성할 수 있다. If the intra prediction mode of the current block is one of
일 예로, 현재 블록 상단의 A 위치에 대한 참조 샘플을 획득하고자 하는 경우, 현재 블록의 인트라 예측 모드의 방향성을 고려하여, 상단 라인의 A 위치에서, 현재 블록의 좌측 라인에 프로젝션을 수행할 수 있다. 프로젝션된 위치를 a라 할 경우, a 위치에 대응하는 값을 복사하거나, a에 대응하는 분수 위치 값을 생성하여, A 위치의 값으로 설정할 수 있다. 일 예로, a 위치가 정수 위치인 경우, 정수 위치 참조 샘플을 복사하여 A 위치의 값을 생성할 수 있다. 반면, a 위치가 분수 위치인 경우, a 위치의 상측에 위치하는 참조 샘플 및 a 위치의 하측에 위치하는 참조 샘플을 보간하고, 보간된 값을 A 위치의 값으로 설정할 수 있다. 한편, 현재 블록 상단의 A 위치에서, 현재 블록의 좌측 라인으로 프로젝션되는 방향은, 현재 블록의 인트라 예측 모드의 방향과 평행이면서, 반대 방향일 수 있다. For example, in case of obtaining a reference sample for position A at the top of the current block, projection can be performed from position A of the top line to the left line of the current block, considering the directionality of the intra prediction mode of the current block. If the projected position is a, a value corresponding to position a can be copied, or a fractional position value corresponding to a can be generated and set as the value of position A. For example, if position a is an integer position, the value of position A can be generated by copying the integer position reference sample. On the other hand, if position a is a fractional position, the reference sample located above position a and the reference sample located below position a can be interpolated, and the interpolated value can be set as the value of position A. Meanwhile, the direction projected from position A at the top of the current block to the left line of the current block can be parallel to and opposite to the direction of the intra prediction mode of the current block.
도 13은 좌측 참조 샘플들을 보간하여 상단 참조 샘플을 생성하는 예를 설명하기 위한 도면이다.Figure 13 is a diagram illustrating an example of generating an upper reference sample by interpolating left reference samples.
도 13에서, 변수 h는, 상단 라인의 A 위치와 좌측 라인의 a 위치 사이의 수평 방향 거리를 나타낸다. 변수 w는, 상단 라인의 A 위치와 좌측 라인의 a 위치 사이의 수직 방향 거리를 나타낸다. 또한, 변수 θ는, 인트라 예측 모드의 방향성에 따라 미리 정의된 각도를 의미하고, 변수 x는, 분수 위치를 의미한다.In Fig. 13, variable h represents the horizontal distance between position A of the upper line and position a of the left line. Variable w represents the vertical distance between position A of the upper line and position a of the left line. In addition, variable θ represents a predefined angle according to the directionality of the intra prediction mode, and variable x represents a fractional position.
변수 h는 다음의 수학식 3과 같이 유도될 수 있다. The variable h can be derived as shown in the following
이후, 변수 h에서, 정수 위치를 제거하면, 최종적으로, 분수 위치가 유도될 수 있다. Afterwards, by removing the integer position from the variable h, the fractional position can be finally derived.
분수 위치 샘플을 유도함에 있어서, 실수 연산을 피하기 위해, 스케일링 팩터를 사용할 수 있다. 일 예로, 변수 θ에 대한 탄젠트 값을 스케일링 팩터 f1을 이용하여 스케일링할 수 있다. 여기서, 좌측 라인으로 프로젝션되는 방향은, 방향성 예측 모와 평행이면서 반대이므로, 도 10 및 도 11에 도시된 스케일된 탄젠트 값을 사용할 수도 있다. In deriving the fractional position samples, a scaling factor can be used to avoid real number operations. For example, the tangent value for variable θ can be scaled using the scaling factor f1. Here, since the direction projected to the left line is parallel and opposite to the directional prediction pattern, the scaled tangent value shown in Figs. 10 and 11 can also be used.
스케일링 팩터 f1이 적용된 경우, 수학식 3은, 다음의 수학식 4와 같이, 변형 사용될 수 있다. When the scaling factor f1 is applied,
위와 같은 방식으로, 상단 라인에 속하는 참조 샘플들만으로 1D 참조 샘플 어레이를 구성할 수 있다. 이 결과, 1D 어레이로 구성된 상단 참조 샘플들만을 이용하여, 현재 블록에 대한 인트라 예측을 수행할 수 있다. In the same way as above, a 1D reference sample array can be constructed using only the reference samples belonging to the upper line. As a result, intra prediction for the current block can be performed using only the upper reference samples constructed as a 1D array.
도 14는 1D 어레이로 배열된 참조 샘플들을 이용하여, 인트라 예측이 수행되는 예를 나타낸 것이다.Figure 14 shows an example in which intra prediction is performed using reference samples arranged in a 1D array.
도 14에 도시된 예에서와 같이, 좌측 참조 샘플들을 프로젝션하여, 상단 참조 샘플들을 생성함으로써, 상단 라인에 속하는 참조 샘플들만을 이용하여 현재 블록의 예측 샘플들이 획득될 수 있다. As in the example illustrated in Fig. 14, by projecting the left reference samples to generate the upper reference samples, prediction samples of the current block can be obtained using only the reference samples belonging to the upper line.
도 12 및 도 14에 도시된 것과 반대로, 상단 참조 샘플을 좌측 라인에 프로젝션하여, 좌측 라인에 속하는 참조 샘플들만으로 1D 참조 샘플 어레이를 구성할 수도 있다. 구체적으로, 방향성 모드의 각도에 대한 탄젠트 값(tanθ)이 음수인 방향성 모드들 중 19번 내지 33번 모드들에 대해서는, 상단 라인에 속한 참조 샘플들을 좌측 라인으로 프로젝션 하여, 좌측 참조 샘플을 생성할 수 있다. Contrary to what is illustrated in FIGS. 12 and 14, the upper reference sample may be projected onto the left line, thereby constructing a 1D reference sample array using only the reference samples belonging to the left line. Specifically, for
상술한 바와 같이, 픽처는, 블록 단위로 부/복호화될 수 있다. 일 예로, 픽처를, 기 결정된 크기의 블록들로 분할할 수 있다. 기 결정된 크기의 블록을, 코딩 트리 블록(Coding Tree Block, 또는 코딩 트리 유닛) 또는 기준 블록이라 호칭할 수 있다. 기준 블록의 크기를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 시퀀스 파라미터 세트, 또는 픽처 헤더를 통해 코딩 트리 블록의 크기를 나타내는 정보가 부호화될 수 있다.As described above, a picture can be encoded/decoded in block units. For example, a picture can be divided into blocks of a predetermined size. A block of a predetermined size can be called a coding tree block (or coding tree unit) or a reference block. Information indicating the size of the reference block can be signaled through a bitstream. For example, information indicating the size of the coding tree block can be encoded through a sequence parameter set or a picture header.
이후, 기준 블록 내에서 기 정의된 트리 구조들 중 적어도 하나에 기반하여, 기준 블록을 다양한 크기의 블록들로 추가할 수 있다. 그리고 나서, 분할된 블록들마다 예측, 변환, 양자화 및/또는 엔트로피 부호화 등의 부/복호화 처리가 수행될 수 있다. 분할된 블록들 각각은, 코딩 블록, 예측 블록 또는 변환 블록일 수 있다. Thereafter, based on at least one of the tree structures defined in the reference block, the reference block can be added into blocks of various sizes. Then, pre/decode processing such as prediction, transformation, quantization, and/or entropy encoding can be performed on each of the divided blocks. Each of the divided blocks can be a coding block, a prediction block, or a transformation block.
한편, 컬러 픽처의 경우, 루마 픽처와 크로마 픽처를 각각 부/복호화하게 된다. 이때, 크로마 픽처의 경우, 루마 픽처와 유사한 특성을 갖는 경우가 일반적이다. 즉, 크로마 픽처 내 크로마 샘플들의 특성이, 루마 픽처 내 동일 위치 루마 샘플들의 특성과 유사한 경향이 존재한다. 이와 같은 성질을 이용하여, 컬러 콤포넌트들 중 하나의 기준 콤포넌트 대해서만, 기준 블록에 대한 분할 구조를 독자적으로 결정하고, 다른 콤포넌트에서는, 기존 콤포넌트에서 결정된 트리 구조를 동일하게 적용할 수 있다. 이와 같이, 기준 콤포넌트의 트리 분할 구조가 타 콤포넌트에 그대로 적용되는 분할 구조를, 싱글 트리 구조라 호칭할 수 있다. Meanwhile, in the case of a color picture, luma pictures and chroma pictures are encoded/decoded respectively. At this time, in the case of a chroma picture, it is common for it to have similar characteristics to a luma picture. That is, there is a tendency for the characteristics of chroma samples in a chroma picture to be similar to the characteristics of luma samples in the same position in a luma picture. By utilizing this characteristic, the division structure for the reference block can be independently determined only for one reference component among the color components, and the tree structure determined in the existing component can be identically applied to the other components. In this way, a division structure in which the tree division structure of the reference component is applied as it is to the other components can be called a single tree structure.
한편, 후술되는 실시예들에서는, 기준 콤포넌트가 루마 성분인 것으로 가정한다. 즉, 루마 성분에 대해서는 독립적으로 트리 분할 구조가 적용되는 한편, 크로마 성분에는, 루마 성분의 트리 분할 구조가 그대로 적용되는 것으로 가정한다.Meanwhile, in the embodiments described below, it is assumed that the reference component is a luma component. That is, it is assumed that a tree partitioning structure is independently applied to the luma component, while the tree partitioning structure of the luma component is applied as is to the chroma component.
기준 콤포넌트에서의 트리 분할 구조에 대한 정보가 명시적으로 부호화되어 시그날링될 수 있다. 일 예로, 루마 기준 블록에 대한 트리 분할 구조 정보가 부호화되어 시그날링될 수 있다. 반면, 크로마 기준 블록에 대해서는, 트리 분할 구조 정보의 부/복호화가 생략되고, 루마 기준 블록에서의 트리 분할 구조 정보가 동일하게 사용될 수 있다. Information about the tree partition structure in the reference component can be explicitly encoded and signaled. For example, the tree partition structure information for the luma reference block can be encoded and signaled. On the other hand, for the chroma reference block, encoding/decoding of the tree partition structure information can be omitted, and the tree partition structure information in the luma reference block can be used in the same manner.
도 15는 싱글 트리 구조가 사용되는 경우, 부/복호화 순서를 설명하기 위한 도면이다. Figure 15 is a diagram explaining the encoding/decoding order when a single tree structure is used.
도 15에 도시된 예에서와 같이, 싱글 트리 구조가 적용되는 경우, 루마 기준 블록에 대한 트리 분할 구조는 크로마 기준 블록에 그대로 적용될 수 있다. 이에 따라, 크로마 기준 블록에 대한 분할 형태는 루마 기준 블록에 대한 분할 형태와 동일하다. As in the example illustrated in Fig. 15, when a single tree structure is applied, the tree partitioning structure for the luma reference block can be applied as is to the chroma reference block. Accordingly, the partitioning form for the chroma reference block is the same as the partitioning form for the luma reference block.
한편, 부/복호화는, 루마 성분 및 크로마 성분을 번갈아가는 순서로 수행될 수 있다. 일 예로, 도 15에서, 각 리프 노드 블록에 기입된 숫자는, 부/복호화 순서를 나타낸다. Meanwhile, encoding/decoding can be performed in an alternating order of luma components and chroma components. For example, in Fig. 15, the numbers written in each leaf node block indicate the encoding/decoding order.
한편, 컬러 콤포넌트들 각각에 대한 트리 구조가 독립 적으로 결정되는 분할 구조를 듀얼 트리 구조라 호칭할 수 있다. 듀얼 트리 구조가 적용되는 경우, 루마 성분에 대한 트리 분할 구조의 정보 및 크로마 성분에 대한 트리 분할 구조 정보가 독립적으로 부호화되어 시그날링될 수 있다. Meanwhile, a partition structure in which the tree structure for each color component is independently determined may be referred to as a dual tree structure. When a dual tree structure is applied, information on the tree partition structure for the luma component and information on the tree partition structure for the chroma component may be independently encoded and signaled.
도 16은 듀얼 트리 구조가 사용되는 경우, 부/복호화 순서를 설명하기 위한 도면이다. Figure 16 is a diagram explaining the order of encoding/decoding when a dual tree structure is used.
듀얼 트리 구조가 적용되는 경우, 어느 한 콤포넌트에 대한 부/복호화가 종료된 후, 다음 콤포넌트에 대한 부/복호화가 시작될 수 있다. When a dual tree structure is applied, after the encoding/decoding for one component is completed, the encoding/decoding for the next component can begin.
일 예로, 루마 성분 픽처에 대한 부/복호화가 종료된 이후, 크로마 성분 픽처에 대한 부/복호화가 수행될 수 있다. For example, after encoding/decoding a luma component picture is completed, encoding/decoding a chroma component picture can be performed.
또는, 기준 블록 단위로 성분간 부/복호화 순서를, 기준 블록 단위로 설정할 수 있다.일 예로, 루마 성분 기준 블록에 대한 부/복호화가 종료된 이후, 되, 크로마 성분 기준 블록에 대한 부/복호화가 수행될 수 있다. Alternatively, the order of encoding/decoding between components can be set on a per-reference block basis. For example, after encoding/decoding for a luma component reference block is completed, encoding/decoding for a chroma component reference block can be performed.
도 16에 도시된 예에서, 블록 내 기입된 숫자는 부/복호화 순서를 나타낸다. 도 16의 예에서는, 루마 성분의 기준 블록이, 크로마 성분의 기준 블록보다 먼저 부/복호화되는 것으로 예시되었다. In the example illustrated in Fig. 16, the numbers written within the blocks indicate the encoding/decoding order. In the example of Fig. 16, it is illustrated that the reference block of the luma component is encoded/decoded before the reference block of the chroma component.
복원된 루마 블록을 이용하여, 크로마 블록에 대한 예측을 수행할 수 있다. 위와 같은, 상이한 컬러 성분을 이용한 예측 모델을, 콤포넌트간 선형 모델(Cross Component Linear Model, CCLM)이라 호칭할 수 있다. CCLM이 적용되는 경우, 루마 블록의 인트라 예측 모드를 기반으로, 크로마 블록의 인트라 예측 모드를 유도하는 과정이 생략될 수 있다.Using the restored luma block, prediction can be performed on the chroma block. The prediction model using different color components, such as the above, can be called a cross-component linear model (CCLM). When the CCLM is applied, the process of deriving the intra prediction mode of the chroma block based on the intra prediction mode of the luma block can be omitted.
도 17은 복원된 루마 블록을 이용하여 크로마 블록을 예측하는 방법을 나타낸 흐름도이다. Figure 17 is a flowchart illustrating a method for predicting a chroma block using a restored luma block.
도 17을 참조하면, 먼저, 크로마 블록에 대한 예측을 위해, 예측 파라미터를 유도할 수 있다(S1710). 이때, 예측 파라미터는, 픽처의 영상 포맷에 따라 상이한 방법으로 유도될 수 있다. 영상 포맷은, 크로마 서브 샘플링 레이트를 나타내는 것으로, 4:4:4, 4:2:2 또는 4:2:0 중 하나로 결정될 수 있다.Referring to Fig. 17, first, for prediction of a chroma block, prediction parameters can be derived (S1710). At this time, the prediction parameters can be derived in different ways depending on the image format of the picture. The image format indicates a chroma subsampling rate and can be determined as one of 4:4:4, 4:2:2, or 4:2:0.
영상 포맷이 4:4:4가 아닌 경우, 루마 블록을 다운 샘플링하여 크로마 블록의 크기와 동일하게 조절한다. If the video format is not 4:4:4, the luma block is downsampled to the same size as the chroma block.
도 18 내지 도 20은 루마 블록을 다운 샘플링하는 예를 나타낸 것이다.Figures 18 to 20 illustrate examples of downsampling a luma block.
설명의 편의를 위해, 영상 포맷은 4:2:0인 것으로 가정한다. For convenience of explanation, the video format is assumed to be 4:2:0.
영상 포맷이 4:2:0인 경우, 도 18에 도시된 예에서와 같이, 4x4 크기의 루마 블록에 대응되는 크로마 블록의 크기는 2x2 이다. 이 경우, 루마 블록에 다운 샘플링 필터를 적용하여, 4x4 크기의 루마 블록을 2x2 크기로 축소시킬 수 있다. 다음 수학식 5는 다운 샘플링 필터의 적용 양상을 나타낸 것이다.When the video format is 4:2:0, the size of the chroma block corresponding to the 4x4 sized luma block is 2x2, as in the example illustrated in Fig. 18. In this case, by applying a down-sampling filter to the luma block, the 4x4 sized luma block can be reduced to 2x2. The following
수학식 5에서, Downsampled_Luma는, 다운 샘플링된 루마 블록 내 샘플 값을 의미하고, Luma는 다운 샘플링 이전 루마 샘플의 값을 의미한다. 예컨대, Luma[0][0]은 다운 샘플링 이전 루마 블록 내 좌상단 샘플의 위치를 나타낼 수 있다. 다운 샘플링된 루마 블록의 크기는 2x2 이므로, 샘플의 좌표를 나타내는 변수 w 및 h는 각각 0 부터 1 범위의 값을 가질 수 있다.In
수학식 5에 따른 다운 샘플링 필터를 적용하는 경우, 다운 샘플링된 루마 샘플의 값은, 루마 샘플들에 십자 모양의 다운 샘플링 필터를 적용하여 획득될 수 있다. 일 예로, (0, 0) 위치의 다운 샘플링된 루마 샘플의 값은, (0, 0) 위치의 루마 샘플, 상기 (0, 0) 위치의 상단 루마 샘플, 상기 (0, 0) 위치의 좌측 루마 샘플, 상기 (0, 0) 위치의 하단 루마 샘플 및 상기 (0, 0) 위치의 우측 루마 샘플에 다운 샘플링 필터를 적용하여 획득될 수 있다.When applying the down-sampling filter according to
도 19에 도시된 것과 상이한 형태의 다운 샘플링 필터를 적용할 수도 있다. 일 예로, 1D 필터, 직사각형 또는 정사각형 필터를 적용하여, 다운 샘플링된 루마 샘플을 획득할 수 있다. 1D 필터는, 1x3 또는 3x1 크기일 수 있고, 직사각형 필터는, 2x3 또는 3x2 크기일 수 있고, 정사각형 필터는, 2x2 또는 3x2 크기일 수 있다. A downsampling filter of a different form than that illustrated in Fig. 19 may also be applied. For example, a 1D filter, a rectangular or square filter may be applied to obtain a downsampled luma sample. The 1D filter may have a size of 1x3 or 3x1, the rectangular filter may have a size of 2x3 or 3x2, and the square filter may have a size of 2x2 or 3x2.
필터의 형태가 부호화기 및 복호화기에서 기 정의되어 있을 수 있다. The shape of the filter may be predefined in the encoder and decoder.
또는, 현재 블록의 크기/형태, 루마 블록에 적용된 인트라 예측 모드, 크로마 샘플의 위치가 루마 샘플의 위치와 일치하는지 여부 또는 영상 포맷 중 적어도 하나에 기초하여, 필터의 형태가 적응적으로 결정될 수 있다. Alternatively, the shape of the filter can be adaptively determined based on at least one of the size/shape of the current block, the intra prediction mode applied to the luma block, whether the positions of the chroma samples match the positions of the luma samples, or the image format.
또는, 복수의 필터 후보들 중 하나를 지시하는 정보가 부호화되어 시그날링될 수 있다. Alternatively, information indicating one of multiple filter candidates may be encoded and signaled.
또는, 다운 샘플링 위치에 따라, 필터 타입이 상이할 수 있다. 일 예로, 루마 블록의 경계에 위치하는 루마 샘플에 대해서는, 1D 필터 또는 직사각형 필터를 적용하는 반면, 루마 블록의 경계에 위치하지 않는 루마 샘플에 대해서는, 십자 형태 필터를 적용할 수 있다.Alternatively, depending on the downsampling location, the filter type may be different. For example, a 1D filter or a rectangular filter may be applied to luma samples located at the boundary of a luma block, while a cross-shaped filter may be applied to luma samples not located at the boundary of a luma block.
도 19에 도시된 것과 같이, x축 좌표 및 y축 좌표가 모두 짝수인 위치에 다운 샘플링 필터가 적용될 수 있다. As illustrated in Figure 19, a downsampling filter can be applied to positions where both the x-axis coordinate and the y-axis coordinate are even numbers.
도 19에 도시된 것과 상이하게 다운 샘플링 필터의 적용 위치를 설정할 수도 있다. 도 20은 다운 샘플링 필터의 적용 위치에 대한 다양한 예시를 나타낸다.The application position of the down-sampling filter may also be set differently from that shown in Fig. 19. Fig. 20 shows various examples of the application position of the down-sampling filter.
다운 샘플링 적용 위치와 관련한 복수개의 후보들을 기 정의한 뒤, 복수개의 후보들 중 하나를 선택할 수도 있다. 일 예로, 도 20의 (a) 내지 (d)의 예시들을 복수의 후보들로 정의한 뒤, 복수의 예시들 중 하나를 가리키는 인덱스 정보를 부호화하여 시그날링할 수 있다. After defining multiple candidates for the position to which downsampling is applied, one of the multiple candidates can be selected. For example, after defining the examples of (a) to (d) of Fig. 20 as multiple candidates, index information indicating one of the multiple examples can be encoded and signaled.
또는, 크로마 샘플의 위치가 루마 샘플의 위치와 일치하는지 여부에 기초하여, 복수의 후보들 중 하나가 선택될 수도 있다.Alternatively, one of the multiple candidates may be selected based on whether the location of the chroma sample matches the location of the luma sample.
루마 블록 주변의 참조 샘플들에 대해서도 다운 샘플링 필터를 적용할 수 있다. 여기서, 참조 샘플은, 기 복원된 샘플을 나타낼 수 있다. 구체적으로, 루마 블록의 상단에 인접하는 상단 참조 영역 또는 좌측에 인접하는 좌측 참조 영역 중 적어도 하나에 대해 다운 샘플링 필터를 적용하여, 다운 샘플링된 루마 참조 샘플을 획득할 수 있다. A downsampling filter can also be applied to reference samples around the luma block. Here, the reference sample can represent a previously restored sample. Specifically, a downsampling filter can be applied to at least one of an upper reference region adjacent to the upper side of the luma block or a left reference region adjacent to the left side, to obtain a downsampled luma reference sample.
크로마 블록의 참조 영역에 포함된 참조 샘플들의 개수와 동일한 수의 다운 샘플링된 루마 참조 샘플들을 획득할 수 있다. A number of downsampled luma reference samples equal to the number of reference samples included in the reference area of the chroma block can be obtained.
한편, 루마 블록의 참조 영역을, 루마 참조 영역이라 호칭하고, 크로마 블록의 참조 영역을 크로마 참조 영역이라 호칭할 수 있다.Meanwhile, the reference area of the luma block can be called a luma reference area, and the reference area of the chroma block can be called a chroma reference area.
콤포넌트간 예측 모드는, 참조 영역의 구성에 따라, 상단 콤포넌트간 예측 모드, 좌측 콤포넌트간 예측 모드 및 상단 및 좌측 콤포넌트간 예측 모드로 구분될 수 있다. 상단 콤포넌트간 예측 모드가 선택된 경우, 루마 블록 및 크로마 블록 각각의 참조 영역은 상단 참조 영역만으로 구성된다. 좌측 콤포넌트간 예측 모드가 선택된 경우, 루마 블록 및 크로마 블록 각각의 참조 영역은 좌측 참조 영역만으로 구성된다. 상단 및 좌측 콤포넌트간 예측 모드가 선택된 경우, 루마 블록 및 크로마 블록 각각의 참조 영역은, 상단 참조 영역 및 좌측 참조 영역으로 구성될 수 있다.The inter-component prediction mode can be classified into an upper inter-component prediction mode, a left inter-component prediction mode, and an upper and left inter-component prediction mode, depending on the configuration of the reference region. When the upper inter-component prediction mode is selected, the reference region of each of the luma block and the chroma block consists of only the upper reference region. When the left inter-component prediction mode is selected, the reference region of each of the luma block and the chroma block consists of only the left reference region. When the upper and left inter-component prediction modes are selected, the reference region of each of the luma block and the chroma block can consist of an upper reference region and a left reference region.
상단 콤포넌트간 예측 모드, 좌측 콤포넌트간 예측 모드 및 상단 및 좌측 콤포넌트간 예측 모드 중 어느 것이 현재 블록에 적용되었는지 여부를 가리키는 정보가 명시적으로 부호화되어 시그날링될 수 있다. 일 예로, 콤포넌트간 예측 모드의 종류를 가리키는 인덱스 정보가 부호화되어 시그날링될 수 있다. Information indicating which of the upper inter-component prediction mode, the left inter-component prediction mode, and the upper and left inter-component prediction modes is applied to the current block can be explicitly encoded and signaled. For example, index information indicating the type of the inter-component prediction mode can be encoded and signaled.
또는, 현재 블록의 크기/형태, 현재 블록이 CTU 또는 픽처 경계에 접하는지 여부 또는 루마 블록에 적용된 인트라 예측 모드 중 적어도 하나에 기초하여, 상단 콤포넌트간 예측 모드, 좌측 콤포넌트간 예측 모드 및 상단 및 좌측 콤포넌트간 예측 모드 중 하나가 선택될 수 있다.Alternatively, one of the top inter-component prediction mode, the left inter-component prediction mode, and the top and left inter-component prediction mode may be selected based on at least one of the size/shape of the current block, whether the current block touches a CTU or picture boundary, or an intra prediction mode applied to the luma block.
설명의 편의를 위해, 후술되는 실시예에서는, 루마 블록 및 크로마 블록 각각의 참조 영역이 상단 참조 영역 및 좌측 참조 영역을 포함하는 것으로 가정한다.For convenience of explanation, in the embodiments described below, it is assumed that the reference areas of each of the luma block and the chroma block include an upper reference area and a left reference area.
루마 블록의 참조 영역에 적용되는 다운 샘플링 필터의 형태는, 루마 블록에 적용되는 다운 샘플링 필터와 동일할 수 있다. 또는, 루마 블록의 참조 영역에 적용되는 다운 샘플링 필터의 형태는, 루마 블록에 적용되는 다운 샘플링 필터와 상이할 수 있다. 또는, 루마 블록의 상단 참조 영역에 적용되는 다운 샘플링 필터의 형태와 루마 블록의 좌측 참조 영역에 적용되는 다운 샘플링 필터의 형태가 상이할 수 있다.The shape of the down-sampling filter applied to the reference area of the luma block may be the same as the down-sampling filter applied to the luma block. Alternatively, the shape of the down-sampling filter applied to the reference area of the luma block may be different from the down-sampling filter applied to the luma block. Alternatively, the shape of the down-sampling filter applied to the upper reference area of the luma block may be different from the shape of the down-sampling filter applied to the left reference area of the luma block.
한편, 참조 영역 내 다운 샘플링이 적용되는 위치는, 부호화기 및 복호화기에서 기 정의되어 있을 수 있다.Meanwhile, the location where downsampling is applied within the reference region may be predefined in the encoder and decoder.
다른 에로, 복호화기에서, 부호화기와 동일한 방법으로, 참조 영역 내 다운 샘플링이 적용되는 위치를 스스로 결정할 수도 있다. In other words, in a decoder, in the same way as the encoder, it may decide on its own where in the reference region downsampling is applied.
도 21은 다운 샘플링이 적용되는 위치와 관련한 예를 설명하기 위한 도면이다. Figure 21 is a drawing to explain an example related to the location where down sampling is applied.
영상 포맷이 4:2:0인 경우, 1x1 크기의 크로마 블록은, 2x2 크기의 루마 블록에 대응한다. 이에 따라, 4개의 루마 참조 샘플들 중 하나의 위치에 다운 샘플링 필터를 적용하여, 크로마 참조 샘플에 대응하는 다운 샘플링된 루마 참조 샘플을 유도할 수 있다. When the video format is 4:2:0, a 1x1 sized chroma block corresponds to a 2x2 sized luma block. Accordingly, a down-sampling filter can be applied to one of the four luma reference samples to derive a down-sampled luma reference sample corresponding to the chroma reference sample.
1개의 크로마 참조 샘플에 대응하는 4개의 루마 참조 샘플들을 A 내지 D라 할 경우, 참조 영역 내 A 내지 D 위치들 각각에 다운 샘플링을 수행한 뒤, 각 위치에 대한 비용을 산출할 수 있다. 여기서, 특정 위치에 대한 비용은, 해당 위치를 중심으로 다운 샘플링 필터를 적용하여 획득된 다운 샘플링된 루마 참조 샘플 및 해당 위치에 대응하는 크로마 참조 샘플 간의 차분의 합 또는 상기 차분의 절대값의 합을 기초로 유도될 수 있다. 이와 같이, 차분의 절대값의 합을 기초로 유도된 비용을 SAD (Sum of Difference)라 호칭할 수도 있다.When four luma reference samples corresponding to one chroma reference sample are represented as A to D, down-sampling can be performed on each of positions A to D within the reference area, and then the cost for each position can be calculated. Here, the cost for a specific position can be derived based on the sum of the differences between the down-sampled luma reference sample obtained by applying a down-sampling filter centered on the position and the chroma reference sample corresponding to the position, or the sum of the absolute values of the differences. In this way, the cost derived based on the sum of the absolute values of the differences can be referred to as SAD (Sum of Difference).
이후, 비용이 가장 낮은 위치를 최적의 위치로 결정하고, 최적 위치에서의 다운 샘플링된 루마 샘플들을 이용하여, 후술될 예측 파라미터 유도 과정이 수행될 수 있다. Afterwards, the location with the lowest cost is determined as the optimal location, and the prediction parameter derivation process described below can be performed using the downsampled luma samples at the optimal location.
또는, 다운 샘플링 필터가 적용될 수 있는 복수 위치들 중 하나를 지시하는 정보가 부호화되어 시그날링될 수 있다. 일 예로, 도 21에 도시된 예에서, A 내지 D 위치 중 하나를 가리키는 인덱스가 부호화되어 시그날링될 수 있다. 이를 위해, 부호화기에서는, 다운 샘플링 필터가 적용될 수 있는 복수 위치들 각각에 대해 예측 파라미터를 획득하고, 복수의 예측 파라미터들 중 최적의 예측 파라미터를 유도하는데 이용된 위치를 가리키는 인덱스를 부호화하여 시그날링할 수 있다. 여기서, 최적의 예측 파라미터는, 예측 파라미터들 각각의 비용 또는 RDO (Rate Distortion Optimization)에 의해 유도될 수 있다.Alternatively, information indicating one of the multiple positions to which the down-sampling filter can be applied can be encoded and signaled. For example, in the example illustrated in FIG. 21, an index indicating one of positions A to D can be encoded and signaled. To this end, the encoder can obtain prediction parameters for each of the multiple positions to which the down-sampling filter can be applied, and encode and signal an index indicating a position used to derive an optimal prediction parameter among the multiple prediction parameters. Here, the optimal prediction parameter can be derived by a cost or RDO (Rate Distortion Optimization) of each of the prediction parameters.
한편, 상단 참조 영역 내 최적의 다운 샘플링 적용 위치를 결정하는 것이 좌측 참조 영역 내 최적의 다운 샘플링 적용 위치를 결정하는 것과 독립적일 수 있다. 이 경우, 상단 참조 영역 내 최적의 다운 샘플링 적용 위치와 좌측 참조 영역 내 최적의 다운 샘플링 적용 위치가 상이할 수 있다.Meanwhile, determining the optimal down-sampling application location within the upper reference area may be independent of determining the optimal down-sampling application location within the left reference area. In this case, the optimal down-sampling application location within the upper reference area and the optimal down-sampling application location within the left reference area may be different.
다운 샘플링된 루마 참조 샘플들과 크로마 블록의 참조 샘플들을 이용하여, 크로마 블록에 대한 예측 파라미터를 유도할 수 있다. 예측 파라미터는 가중치 α 및 오프셋 β를 포함할 수 있다. 예측 파라미터는 최소 자승법(Least Square Method) 등을 이용하여 유도될 수 있다.Using the downsampled luma reference samples and the reference samples of the chroma block, prediction parameters for the chroma block can be derived. The prediction parameters can include weights α and offsets β. The prediction parameters can be derived using the least square method, etc.
혹은, 다운 샘플링된 루마 참조 샘플들의 최대값과 최소값, 및 크로마 참조 샘플들의 최대값과 최소값의 선형성(Linearlity)에 기반하여, 가중치 α 오프셋 β를 유도할 수 있다. Alternatively, the weight α offset β can be derived based on the linearity of the maximum and minimum values of the downsampled luma reference samples and the maximum and minimum values of the chroma reference samples.
이때, 기 정의된 위치의 크로마 참조샘플들 및 이에 대응하는 다운 샘플링된 루마 참조 샘플들만을 이용하여, 예측 파라미터를 유도할 수도 있다. 이 경우, 예측 파라미터의 유도 과정이 간소화되어, 부호화기 및 복호화기에서의 복잡도가 감소할 수 있다. 일 예로, 다음 수학식 6에 예시된 위치의 크로마 참조 샘플들을 이용하여, 예측 파라미터를 유도할 수 있다. At this time, prediction parameters can be derived only by using chroma reference samples at predefined locations and corresponding down-sampled luma reference samples. In this case, the process of deriving prediction parameters can be simplified, and the complexity in the encoder and decoder can be reduced. For example, prediction parameters can be derived by using chroma reference samples at locations exemplified in the following
위 예에서, W 및 H는 각각 크로마 블록의 너비 및 높이를 나타낸다. 위 예시에 따른, 4개의 크로마 참조 샘플들 및 이에 대응하는 4개의 다운 샘플링된 루마 참조 샘플들을 이용하여 예측 파라미터를 유도할 수 있다.In the above example, W and H represent the width and height of the chroma block, respectively. According to the above example, prediction parameters can be derived using four chroma reference samples and four corresponding down-sampled luma reference samples.
위 예시와 상이한 위치의 참조 샘플들을 이용하여 예측 파라미터를 획득할 수도 있다. 일 예로, 다음의 수학식 7 및 수학식 8과 같이, 참조 샘플들의 위치를 결정할 수도 있다. Prediction parameters can also be obtained using reference samples at different locations from the above example. For example, the locations of reference samples can be determined as in the following
참조 샘플들의 위치에 대해 복수의 후보들을 기 정의한 뒤, 복수의 후보들 중 하나를 선택할 수 있다. 일 예로, 위에 열거된 수학식 6 내지 수학식 8의 예시들 각각을 위치 후보로 설정한 뒤, 복수의 위치 후보들 중 하나에 따라, 참조 샘플들을 선택할 수 있다. After defining multiple candidates for the locations of reference samples, one of the multiple candidates can be selected. For example, each of the examples of
복수의 위치 후보들 중 하나를 선택하기 위한 정보가 부호화되어 시그날링될 수 있다. 일 예로, 복수의 위치 후보들 중 하나를 가리키는 인덱스를 부호화하여 시그날링할 수 있다.Information for selecting one of the multiple location candidates can be encoded and signaled. For example, an index pointing to one of the multiple location candidates can be encoded and signaled.
또는, 현재 블록의 크기/형태, 컬러 포맷 또는 크로마 샘플의 위치가 루마 샘플의 위치와 일치하는지 여부 중 적어도 하나에 기초하여, 복수의 위치 후보들 중 하나가 적응적으로 선택될 수 있다.Alternatively, one of the plurality of location candidates can be adaptively selected based on at least one of the size/shape of the current block, the color format, or whether the location of the chroma sample matches the location of the luma sample.
일 예로, 현재 블록이 정방 형태인 경우, 수학식 6의 위치 후보를 이용하여, 예측 파라미터를 유도할 수 있다. 반면, 현재 블록이 비정방 형태인 경우, 수학식 7 또는 수학식 8의 위치 후보를 이용하여 예측 파라미터를 유도할 수 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방 형태인 경우, 수학식 7의 위치 후보를 사용하고, 현재 블록이 높이가 너비보다 큰 비정방 형태인 경우, 수학식 8의 위치 후보를 사용할 수 있다. For example, if the current block is a square shape, the prediction parameter can be derived using the location candidate of
예측 파라미터가 유도되면, 다운 샘플링된 루마 샘플을 기초로, 크로마 블록의 예측 샘플을 획득할 수 있다(S1720). 일 예로, 다음의 수학식 9에 따라, 크로마 블록의 예측 샘플을 획득할 수 있다.Once the prediction parameters are derived, a prediction sample of a chroma block can be obtained based on the downsampled luma sample (S1720). For example, a prediction sample of a chroma block can be obtained according to the following
수학식 9에서, PredChroma는, 크로마 블록의 예측 샘플을 나타내고, Downsampled_Luma는, 크로마 예측 샘플에 대응되는 위치의 다운 샘플링된 루마 샘플을 나타낸다.In
한편, 영상 포맷이 4:4:4인 경우, 상술한 다운 샘플링 과정은 생략될 수 있다. 즉, 영상 포맷이 4:4:4인 경우, 루마 블록 내 복원 샘플들에 대해 다운 샘플링을 수행하는 과정 및 루마 블록의 참조 샘플들에 대해 다운 샘플링을 수행하는 과정이 생략될 수 있다.Meanwhile, when the video format is 4:4:4, the above-described down sampling process can be omitted. That is, when the video format is 4:4:4, the process of performing down sampling on the restored samples in the luma block and the process of performing down sampling on the reference samples of the luma block can be omitted.
다른 예로, 영상 포맷과 무관하게, 루마 블록의 참조 영역에는 다운 샘플링 필터를 적용하지 않을 수도 있다. 즉, 예측 파라미터 유도시, 다운 샘플링된 루마 참조 샘플들 중 최소값 및 최대값을 이용하는 대신, 루마 참조 샘플들 중 최소값 및 최대값을 이용할 수도 있다.As another example, regardless of the image format, the reference region of the luma block may not be subjected to a downsampling filter. That is, instead of using the minimum and maximum values of the downsampled luma reference samples, the minimum and maximum values of the luma reference samples may be used when deriving the prediction parameters.
화면 내 예측을 위한 참조 샘플들을 필터링하고, 필터링된 참조 샘플들을 이용하여, 현재 블록의 예측 샘플들을 유도할 수 있다.Reference samples for in-screen prediction can be filtered, and prediction samples of the current block can be derived using the filtered reference samples.
한편, 참조 샘플들에 필터링을 수행할 것인지 여부는, 기 설정된 조건을 만족하는지 여부에 기초하여 결정될 수 있다. 여기서, 기 설정된 조건은, 참조 라인의 인덱스, 현재 블록의 크기, 컬러 성분 또는 현재 블록의 인트라 예측 모드 중 적어도 하나에 관련된 것일 수 있다.Meanwhile, whether to perform filtering on the reference samples can be determined based on whether a preset condition is satisfied. Here, the preset condition can be related to at least one of the index of the reference line, the size of the current block, the color component, or the intra prediction mode of the current block.
일 예로, 참조 샘플을 필터링하는 것은, 현재 블록의 참조 라인의 인덱스가 0인 경우에만, 즉, 현재 블록의 참조 라인이 인접 참조 라인인 경우에만 수행될 수 있다. 한편, 참조 라인을 참조 샘플 라인이라 호칭할 수도 있다.For example, filtering of reference samples can be performed only when the index of the reference line of the current block is 0, i.e., only when the reference line of the current block is an adjacent reference line. Meanwhile, the reference line may also be referred to as a reference sample line.
일 예로, 참조 샘플을 필터링하는 것은, 현재 블록의 크기가 문턱값 이상인 경우에만 수행될 수 있다. 여기서, 현재 블록의 크기는, 현재 블록의 너비, 높이 또는 현재 블록 내 샘플들의 개수(즉, 너비와 높이의 곱)가 문턱값 이상인지 여부 중 적어도 하나를 나타낼 수 있다. For example, filtering the reference sample may be performed only if the size of the current block is greater than or equal to a threshold. Here, the size of the current block may indicate at least one of whether the width of the current block, the height, or the number of samples in the current block (i.e., the product of the width and the height) is greater than or equal to the threshold.
일 예로, 참조 샘플을 필터링하는 것은, 예측 대상 컬러 성분이 루마 성분인 경우에만 수행될 수 있다.For example, filtering the reference sample can only be performed if the predicted color component is a luma component.
일 예로, 참조 샘플을 필터링하는 것은, 현재 블록의 인트라 예측 모드가 기 정의된 인트라 예측 모드들 중 하나인 경우에만 수행될 수 있다. For example, filtering a reference sample can be performed only if the intra prediction mode of the current block is one of the predefined intra prediction modes.
참조 샘플을 필터링하는 것으로 결정된 경우, 참조 샘플들 각각에 대해, 인접 참조 샘플을 이용하여 필터링을 수행할 수 있다.If it is decided to filter reference samples, filtering can be performed for each of the reference samples using adjacent reference samples.
도 22는 참조 샘플들을 필터링하는 예를 설명하기 위한 도면이다.Figure 22 is a diagram illustrating an example of filtering reference samples.
설명의 편의를 위해, 참조 샘플들의 개수는 (2W + 2H + 1)개인 것으로 가정한다. 여기서, W 및 H 각각은, 현재 블록의 너비 및 높이를 나타낸다.For convenience of explanation, the number of reference samples is assumed to be (2W + 2H + 1), where W and H represent the width and height of the current block, respectively.
또한, 현재 블록 내 좌상단 샘플의 좌표는 (0, 0)인 것으로 가정하고, 참조 샘플들이 저장되는 버퍼를 ref라 호칭하기로 한다. Additionally, we assume that the coordinates of the upper left sample in the current block are (0, 0), and we call the buffer where the reference samples are stored as ref.
현재 블록에 대해 참조 샘플들에 대한 필터링을 수행하기로 결정되었다 하더라도, 참조 샘플들 별로 필터링 수행 여부가 상이할 수 있다. 일 예로, 상단 참조 샘플들 중 최우측 참조 샘플(즉, e 위치) 및 좌측 참조 샘플들 중 최하단 참조 샘플(즉, a 위치)에는 참조 샘플 필터링이 수행되지 않을 수 있다. Even if it is decided to perform filtering on reference samples for the current block, whether or not filtering is performed may differ for each reference sample. For example, reference sample filtering may not be performed on the rightmost reference sample among the upper reference samples (i.e., position e) and the bottommost reference sample among the left reference samples (i.e., position a).
참조 샘플들은, 참조 샘플에 인접하는 인접 참조 샘플들을 이용하여 필터링될 수 있다. 일 예로, 좌측 참조 샘플들(즉, b 영역에 포함된 참조 샘플들)은, 상단에 인접하는 참조 샘플 및 하단에 인접하는 참조 샘플을 이용하여 필터링될 수 있다. 일 예로, 수학식 10은 좌측 참조 샘플이 필터링되는 예를 타나낸 것이다.Reference samples can be filtered using adjacent reference samples adjacent to the reference sample. For example, left reference samples (i.e., reference samples included in region b) can be filtered using the reference sample adjacent to the top and the reference sample adjacent to the bottom. For example,
상단 참조 샘플들(즉, d 영역에 포함된 참조 샘플들)은, 우측에 인접하는 참조 샘플 및 좌측에 인접하는 참조 샘플을 이용하여 필터링될 수 있다. 일 예로, 수학식 11은 상단 참조 샘플이 필터링되는 예를 나타낸 것이다.The upper reference samples (i.e., the reference samples included in the d region) can be filtered using the reference samples adjacent to the right and the reference samples adjacent to the left. As an example,
좌상단 참조 샘플(즉, c 위치)은, 하단에 인접하는 참조 샘플 및 우측에 인접하는 참조 샘플을 이용하여 필터링될 수 있다. 일 예로, 수학식 12는 좌상단 참조 샘플이 필터링되는 예를 나타낸 것이다.The upper left reference sample (i.e., location c) can be filtered using the reference samples adjacent to the bottom and the reference samples adjacent to the right. As an example,
상술한 예에서와 같이, 참조 샘플의 위치에 따라, 필터링 수행 여부 및 필터 타입이 결정될 수 있다.As in the examples described above, whether filtering is performed and the filter type can be determined depending on the location of the reference sample.
설명의 편의를 위해, 수학식 10 내지 수학식 12의 예에서와 같이, 참조 샘플과 동일한 참조 라인에 속하는 참조 샘플들을 이용하여 참조 샘플을 필터링하는 필터 타입을, 단일 라인 필터 (single line filter)라 호칭할 수 있다. For convenience of explanation, a filter type that filters a reference sample by using reference samples belonging to the same reference line as the reference sample, as in the examples of
다른 예로, 현재 블록의 인트라 예측 모드에 기반하여, 현재 블록에 필터링을 수행할 것인지 여부 또는 필터 타입 중 적어도 하나가 적응적으로 결정될 수도 있다. As another example, whether to perform filtering on the current block or at least one of the filter types may be adaptively determined based on the intra prediction mode of the current block.
도 23은 참조 샘플들을 필터링하는 예를 설명하기 위한 도면이다.Figure 23 is a diagram illustrating an example of filtering reference samples.
현재 블록의 인트라 예측 모드가 플래너 모드 또는 DC 모드인 경우, 도 22를 통해 설명한 실시예(즉, 수학식 10 내지 수학식 12)에 따라, 단일 라인 필터를 기초로, 참조 샘플들을 필터링할 수 있다. 즉, 현재 블록의 인트라 예측 모드가 플래너 모드 또는 DC 모드인 경우, 참조 샘플은, 동일 참조 라인에 속하는 적어도 하나의 인접 참조 샘플을 기초로, 필터링될 수 있다. When the intra prediction mode of the current block is the planar mode or the DC mode, reference samples can be filtered based on a single line filter according to the embodiment described with reference to FIG. 22 (i.e.,
반면, 현재 블록의 인트라 예측 모드가 방향성 모드인 경우, 도 23에 도시된 예에서와 같이, 앵귤러(Angular) 필터를 이용하여 참조 샘플들을 필터링할 수 있다. 즉, 현재 블록의 인트라 예측 모드가 방향성 모드인 경우, 참조 샘플은, 이웃 참조 라인에 속하는 참조 샘플을 이용하여, 필터링될 수 있다. On the other hand, if the intra prediction mode of the current block is a directional mode, reference samples can be filtered using an angular filter, as in the example illustrated in Fig. 23. That is, if the intra prediction mode of the current block is a directional mode, reference samples can be filtered using reference samples belonging to neighboring reference lines.
앵귤러 필터는, 현재 참조 라인에 속하는 참조 샘플을, 현재 참조 라인에 인접하는 이웃 참조 라인에 속하는 참조 샘플을 이용하여 필터링하는 것일 수 있다. 여기서, 현재 참조 라인은 현재 블록의 참조 라인 인덱스에 의해 선택된 참조 라인을 의미할 수 있다.The angular filter may filter reference samples belonging to the current reference line by using reference samples belonging to neighboring reference lines adjacent to the current reference line. Here, the current reference line may mean a reference line selected by a reference line index of the current block.
현재 참조 샘플 라인에 속하는 참조 샘플로부터, 현재 블록의 인트라 예측 모드에 따른 방향성에 따라, 이웃 참조 라인에 속하는 참조 샘플을 선택할 수 있다. 선택된 참조 샘플을, 앵귤러 이웃 참조 샘플 또는 방향성 이웃 참조 샘플이라 호칭할 수 있다. 즉, 앵귤러 이웃 참조 샘플은, 현재 참조 라인에 속하는 참조 샘플로부터, 인트라 예측 모드에 따른 각도선(Angular Line)에 놓여 있을 수 있다. From the reference sample belonging to the current reference sample line, a reference sample belonging to a neighboring reference line can be selected according to the directionality according to the intra prediction mode of the current block. The selected reference sample may be called an angular neighboring reference sample or a directional neighboring reference sample. That is, the angular neighboring reference sample may be located on an angular line according to the intra prediction mode from the reference sample belonging to the current reference line.
현재 참조 라인에 속하는 참조 샘플과 앵귤러 이웃 참조 샘플을 필터에 입력함으로써, 필터링된 참조 샘플을 획득할 수 있다. 필터링된 참조 샘플은, 현재 참조 라인에 속하는 참조 샘플과 앵귤러 이웃 참조 샘플의 가중합 연산에 의해 획득될 수 있다.By inputting the reference sample belonging to the current reference line and the angular neighboring reference sample into the filter, a filtered reference sample can be obtained. The filtered reference sample can be obtained by a weighted sum operation of the reference sample belonging to the current reference line and the angular neighboring reference sample.
이때, 현재 참조 라인에 속하는 참조 샘플로부터 이웃 참조 라인에 프로젝션을 수행하였을 때, 프로젝션된 위치가 정수 위치에 존재하지 않는 경우, 분수 위치 참조 샘플을 생성하고, 생성된 분수 위치 참조 샘플을 앵귤러 이웃 참조 샘플로 설정할 수 있다. 여기서, 분수 위치 참조 샘플은, 이웃 참조 라인 내, 프로젝션된 위치의 양쪽에 위치하는 정수 위치 참조 샘플들을 보간하여 획득될 수 있다. At this time, when projection is performed from a reference sample belonging to the current reference line to a neighboring reference line, if the projected position does not exist at an integer position, a fractional position reference sample can be generated, and the generated fractional position reference sample can be set as an angular neighboring reference sample. Here, the fractional position reference sample can be obtained by interpolating integer position reference samples located on both sides of the projected position within the neighboring reference line.
또는, 간소화를 위해, 각도 선에 의해 지시되는 위치가 분수 위치가 아닌 정수 위치인 특정한 방향성 모드에 대해서만, 앵귤러 필터가 적용되도록 설정할 수 있다.Alternatively, for simplicity, the angular filter can be set to apply only for certain directional modes where the positions indicated by the angular lines are integer positions rather than fractional positions.
도 24는 앵귤러 필터가 적용되는 방향성 모드들을 예시한 것이다.Figure 24 illustrates directional modes to which angular filters are applied.
도 24에 도시된 예에서와 같이, 좌하단 45도 방향(a), 수평 방향(b), 좌상단 45도 방향(c), 수직 방향(d)의 또는 우상단 45도(e) 중 적어도 하나의 방향성 모드에 대해, 앵귤러 필터가 적용될 수 있다.As in the example illustrated in Fig. 24, an angular filter can be applied to at least one directional mode among the lower left 45 degree direction (a), the horizontal direction (b), the upper left 45 degree direction (c), the vertical direction (d), or the upper right 45 degree direction (e).
또는, 간소화를 위해, 프로젝션된 위치가 분수 위치인 경우, 이웃 참조 라인 내 프로젝션된 위치와 가장 가까운 정수 위치 참조 화소를 앵귤러 이웃 참조 샘플로 설정할 수도 있다. 즉, 참조 샘플들을 보간함이 없이, 프로젝션된 위치와 가장 가까운 정수 위치 참조 샘플을 앵귤러 참조 샘플로 설정할 수 있다.Alternatively, for simplicity, if the projected position is a fractional position, the integer position reference pixel closest to the projected position within the neighboring reference line can be set as the angular neighboring reference sample. That is, the integer position reference sample closest to the projected position can be set as the angular reference sample without interpolating the reference samples.
즉, 현재 블록의 인트라 예측 모드가 방향성 모드인 경우, 도 24의 (a) 내지 (e)에 도시된 예시들 중 하나가, 참조 샘플들을 필터링하는 것에 이용될 수 있다. 이 경우, 방향성 모드 별로, 필터링 방향을 결정하기 위한 양자화가 요구될 수 있다.That is, if the intra prediction mode of the current block is a directional mode, one of the examples shown in (a) to (e) of Fig. 24 may be used to filter reference samples. In this case, quantization may be required to determine the filtering direction for each directional mode.
일 예로, 도 5에 도시된 예에서, 인덱스가 10 보다 작은 방향성 모드들에 대해서는, 좌하단 45도 대각 방향(즉, 도 24의 (a))으로 앵귤러 필터에 기반한 필터링이 수행될 수 있다. 인덱스가 10 이상이고, 26 미만인 방향성 모드들에 대해서는, 수평 방향(즉, 도 24의 (b))으로 앵귤러 필터에 기반한 필터링이 수행될 수 있다. 인덱스가 26 이상이고 42 미만인 방향성 모드들에 대해서는, 좌상단 45도 대각 방향(즉, 도 24의 (c))으로 앵귤러 필터에 기반한 필터링이 수행될 수 있다. 인덱스가 42 이상이고 56번 미만인 방향성 모드들에 대해서는, 수직 방향(즉, 도 24의 (d))으로 앵귤러 필터에 기반한 필터링이 수행될 수 있다. 인덱스가 58 인상인 방향성 모드들에 대해서는, 우상단 대각 방향(즉, 도 24의 (e))으로 앵귤러 필터에 기반한 필터링이 수행될 수 있다.For example, in the example illustrated in FIG. 5, for directional modes having indices less than 10, filtering based on an angular filter may be performed in the lower left 45 degree diagonal direction (i.e., (a) of FIG. 24). For directional modes having indices greater than or equal to 10 and less than 26, filtering based on an angular filter may be performed in the horizontal direction (i.e., (b) of FIG. 24). For directional modes having indices greater than or equal to 26 and less than 42, filtering based on an angular filter may be performed in the upper left 45 degree diagonal direction (i.e., (c) of FIG. 24). For directional modes having indices greater than or equal to 42 and less than 56, filtering based on an angular filter may be performed in the vertical direction (i.e., (d) of FIG. 24). For directional modes with an index of 58, filtering based on an angular filter can be performed in the upper right diagonal direction (i.e., (e) of Fig. 24).
다른 예로, 간소화를 위해, 좌상단 45도 방향(즉, 도 5의 34번)의 방향성 모드를 기준으로, 방향성 모드들을 기준 모드보다 왼쪽에 존재하는 모드들(즉, 34미만의 방향성 모드들) 및 기준 모드보다 위쪽에 존재하는 모드(즉, 34이상의 방향성 모드들)로 구분할 수 있다. 이때, 기준 모드보다 왼쪽에 존재하는 모드에 대해서는, 수평 방향(즉, 도 24의 (b))으로 앵귤러 필터에 기반한 필터링을 수행하고, 기준 모드보다 위쪽에 존재하는 모드에 대해서는 수직 방향(즉, 도 24의 (d))으로 앵귤러 필터에 기반한 필터링을 수행할 수도 있다. As another example, for simplicity, based on the directional mode in the upper left 45 degree direction (i.e.,
모든 방향성 모드들에 대해 앵귤러 필터에 기반한 필터링을 허용하는 대신, 일부 방향성 모드들에 대해서만 앵귤러 필터에 기반한 필터링을 수행할 수도 있다. 즉, 현재 블록의 인트라 예측 모드가 기 정의된 방향성 모드들 중 하나인 경우에만, 앵귤러 필터에 기반한 필터링을 수행할 수 있다.Instead of allowing filtering based on angular filters for all directional modes, it is also possible to perform filtering based on angular filters only for some directional modes. That is, filtering based on angular filters can be performed only if the intra prediction mode of the current block is one of the predefined directional modes.
이때, 앵귤러 필터에 기반한 필터링이 수행되는 방향성 예측 모드들의 개수 또는 범위는, 현재 블록의 크기에 따라 상이하게 설정될 수 있다. At this time, the number or range of directional prediction modes in which filtering based on the angular filter is performed can be set differently depending on the size of the current block.
한편, 가중합 연산시, 필터링 위치의 참조 샘플(즉, 현재 참조 라인에 속하는 참조 샘플)에 할당되는 가중치가 앵귤러 이웃 참조 샘플에 할당되는 가중치보다 같거나 큰 값을 갖도록 설정될 수 있다. 일 예로, 필터링될 위치의 참조 샘플에 할당되는 가중치 및 앵귤러 이웃 참조 샘플에 할당되는 가중치의 세트는 {1/2, 1/2} 또는 {3/4, 1/4}일 수 있다.Meanwhile, when calculating the weighted sum, the weight assigned to the reference sample at the filtering position (i.e., the reference sample belonging to the current reference line) may be set to have a value equal to or greater than the weight assigned to the angular neighboring reference sample. For example, the set of the weight assigned to the reference sample at the position to be filtered and the weight assigned to the angular neighboring reference sample may be {1/2, 1/2} or {3/4, 1/4}.
참조 라인에 따라, 필터링될 위치의 참조 샘플에 할당되는 가중치 및 앵귤러 이웃 참조 샘플에 할당되는 가중치는, 참조 라인의 인덱스 또는 인트라 예측 모드 중 적어도 하나에 기초하여 적응적으로 결정될 수 있다. Depending on the reference line, the weights assigned to the reference samples at the positions to be filtered and the weights assigned to the angular neighboring reference samples can be adaptively determined based on at least one of the index of the reference line or the intra prediction mode.
또는, 필터링될 위치의 참조 샘플에 할당되는 가중치 및 앵귤러 이웃 참조 샘플에 할당되는 가중치의 세트를 지시하는 정보가 부호화되어 시그날링될 수도 있다.Alternatively, information indicating the set of weights to be assigned to reference samples at the locations to be filtered and the set of weights to be assigned to angular neighboring reference samples may be encoded and signaled.
도 23 및 도 24에 도시된 예에서는, 현재 블록의 참조 라인이 인접 참조 라인(즉, 인덱스 0인 참조 라인)인 경우, 참조 샘플들에 대한 필터링이 수행되는 것으로 예시하였다. 도시된 예에서와 같이, 현재 블록의 참조 라인이 인접 참조 라인인 경우에만, 필터링이 수행되도록 설정될 수 있다. 이때, 현재 블록에 인접하는 이웃 참조 라인은, 현재 블록의 참조 라인보다 인덱스가 1만큼 큰 참조 라인일 수 있다.In the examples illustrated in FIGS. 23 and 24, filtering is performed on reference samples when the reference line of the current block is an adjacent reference line (i.e., a reference line with index 0). As in the illustrated examples, filtering may be set to be performed only when the reference line of the current block is an adjacent reference line. In this case, the adjacent reference line adjacent to the current block may be a reference line whose index is 1 greater than that of the reference line of the current block.
또한, 현재 블록의 인트라 예측 모드에 따라, 단일 라인 필터 또는 앵귤러 필터 중 하나가 참조 샘플들을 필터링하는 것에 적용될 수 있다. 일 예로, 현재 블록의 인트라 예측 모드가 비방향성 모드인 경우에는, 단일 라인 필터에 기초하여 참조 샘플들을 필터링하고, 현재 블록의 인트라 예측 모드가 방향성 모드인 경우에는, 앵귤러 필터에 기초하여 참조 샘플들을 필터링할 수 있다.Additionally, depending on the intra prediction mode of the current block, either a single-line filter or an angular filter may be applied to filter the reference samples. For example, if the intra prediction mode of the current block is a non-directional mode, the reference samples may be filtered based on a single-line filter, and if the intra prediction mode of the current block is a directional mode, the reference samples may be filtered based on an angular filter.
또는, 참조 라인이 인접 참조 라인이 아닌 경우에도, 앵귤러 필터에 기반하여, 참조 샘플들이 필터링될 수도 있다. 이때, 이웃 참조 라인은, 현재 참조 라인보다 인덱스가 1만큼 큰 참조 라인일 수 있다. 한편, 현재 참조 라인의 인덱스가 최대값을 갖는 경우, 이웃 참조 라인은, 현재 참조 라인보다 인덱스 1만큼 작은 참조 라인일 수 있다. 또는, 현재 참조 라인의 인덱스가 최대값인 경우에는, 현재 블록에 참조 샘플 필터링이 적용되지 않도록 설정할 수 있다.Alternatively, even if the reference line is not an adjacent reference line, the reference samples may be filtered based on the angular filter. In this case, the neighboring reference line may be a reference line whose index is 1 greater than that of the current reference line. On the other hand, if the index of the current reference line is the maximum value, the neighboring reference line may be a reference line whose index is 1 less than that of the current reference line. Alternatively, if the index of the current reference line is the maximum value, reference sample filtering may be set not to be applied to the current block.
또는, 이웃 참조 라인은 현재 참조 라인보다 인덱스가 1만큼 작은 참조 라인일 수 있다. 현재 참조 라인의 인덱스가 최소값(즉, 0)을 갖는 경우, 이웃 참조 라인은 현재 참조 라인보다 인덱스가 1만큼 큰 참조 라인일 수 있다. 또는, 현재 참조 라인의 인덱스가 최소값인 경우에는, 현재 블록에 참조 샘플 필터링이 적용되지 않도록 설정할 수 있다.Alternatively, the neighboring reference line can be a reference line whose index is 1 less than that of the current reference line. If the index of the current reference line is the minimum (i.e., 0), the neighboring reference line can be a reference line whose index is 1 greater than that of the current reference line. Alternatively, if the index of the current reference line is the minimum, reference sample filtering can be set not to be applied to the current block.
또는, 참조 라인이 인접 참조 라인(즉, 인덱스가 0인 참조 라인)인 경우에는, 단일 라인 필터를 이용하여 참조 샘플들을 필터링하고, 참조 라인이 인접 참조 라인이 아닌 경우(즉, 인덱스가 0보다 큰 참조 라인)에는, 앵귤러 필터를 기반으로 참조 샘플들을 필터링할 수 있다.Alternatively, if the reference line is an adjacent reference line (i.e., a reference line with an index of 0), the reference samples can be filtered using a single line filter, and if the reference line is not an adjacent reference line (i.e., a reference line with an index greater than 0), the reference samples can be filtered based on an angular filter.
복수의 이웃 참조 라인들을 이용하여, 참조 샘플들을 필터링할 수도 있다. 일 예로, 현재 참조 라인보다 인덱스가 1 만큼 큰, 제1 참조 라인으로부터 제1 앵귤러 이웃 참조 샘플을 선택하고, 현재 참조 라인보다 인덱스가 1 만큼 작은, 제2 참조 라인으로부터 제2 앵귤러 이웃 참조 샘플을 선택할 수 있다. 이후, 현재 참조 라인 내 필터링될 위치의 참조 샘플과, 제1 앵귤러 이웃 참조 샘플 및 제2 앵귤러 이웃 참조 샘플을 필터에 입력함으로써, 필터링된 참조 샘플을 획득할 수 있다. Reference samples can also be filtered using multiple neighboring reference lines. For example, a first angular neighboring reference sample can be selected from a first reference line whose index is 1 greater than that of the current reference line, and a second angular neighboring reference sample can be selected from a second reference line whose index is 1 less than that of the current reference line. Then, by inputting the reference sample at the position to be filtered within the current reference line, the first angular neighboring reference sample, and the second angular neighboring reference sample into the filter, a filtered reference sample can be obtained.
또는, 현재 참조 라인보다 인덱스가 1 만큼 큰, 제1 참조 라인으로부터 제1 앵귤러 이웃 참조 샘플을 선택하고, 현재 참조 라인보다 인덱스가 2만큼 큰 제2 참조 라인으로부터 제2 앵귤러 이웃 참조 샘플을 선택할 수도 있다.Alternatively, a first angular neighboring reference sample may be selected from a first reference line whose index is 1 greater than that of the current reference line, and a second angular neighboring reference sample may be selected from a second reference line whose index is 2 greater than that of the current reference line.
또는, 현재 참조 라인보다 인덱스가 1 만큼 작은, 제1 참조 라인으로부터 제1 앵귤러 이웃 참조 샘플을 선택하고, 현재 참조 라인보다 인덱스가 인덱스가 2 만큼 작은 제2 참조 라인으로부터 제2 앵귤러 이웃 참조 샘플을 선택할 수도 있다. Alternatively, a first angular neighboring reference sample may be selected from a first reference line whose index is 1 less than that of the current reference line, and a second angular neighboring reference sample may be selected from a second reference line whose index is 2 less than that of the current reference line.
한편, 필터링될 위치의 참조 샘플에 할당되는 가중치는, 제1 앵귤러 이웃 참조 샘플 및 제2 앵귤러 이웃 참조 샘플 각각에 할당되는 가중치보다 큰 값을 가질 수 있다. 일 예로, 필터링될 위치의 참조 샘플, 제1 앵귤러 이웃 참조 샘플 및 제2 앵귤러 이웃 참조 샘플 각각에 할당되는 가중치는, {1/2, 1/4, 1/4}일 수 있다. Meanwhile, the weight assigned to the reference sample at the position to be filtered may have a value greater than the weight assigned to each of the first angular neighboring reference sample and the second angular neighboring reference sample. For example, the weight assigned to each of the reference sample at the position to be filtered, the first angular neighboring reference sample, and the second angular neighboring reference sample may be {1/2, 1/4, 1/4}.
참조 라인의 인덱스에 따라, 앵귤러 필터링을 위한 이웃 참조 라인들의 개수 또는 위치 중 적어도 하나가 상이할 수 있다. 일 예로, 현재 블록의 참조 라인의 인덱스가 최소값(즉, 0, 즉, 인접 참조 라인) 또는 최대값을 가리키는 경우, 현재 참조 라인에 인접하는 하나의 인접 참조 라인을 이용하여, 앵귤러 필터에 기반한 필터링을 수행할 수 있다. 반면, 현재 블록의 참조 라인의 인덱스가 소정의 범위에 속하는 경우(예컨대, 최소값 및 최대값을 제외한 값인 경우), 현재 참조 라인에 인접하는 두개의 인접 참조 라인들을 이용하여 앵귤러 필터에 기반한 필터링을 수행할 수 있다.Depending on the index of the reference line, at least one of the number or positions of neighboring reference lines for angular filtering may be different. For example, if the index of the reference line of the current block indicates a minimum value (i.e., 0, i.e., an adjacent reference line) or a maximum value, filtering based on the angular filter can be performed using one adjacent reference line adjacent to the current reference line. On the other hand, if the index of the reference line of the current block belongs to a predetermined range (e.g., a value excluding the minimum value and the maximum value), filtering based on the angular filter can be performed using two adjacent reference lines adjacent to the current reference line.
또는, 현재 참조 라인의 인덱스가 최소값인 경우, 현재 참조 라인보다 인덱스가 큰 2개의 이웃 참조 라인들을 이용하여, 앵귤러 필터에 기반한 필터링을 수행할 수 있다. 반면, 현재 참조 라인의 인덱스가 최대값인 경우, 현재 참조 라인보다 인덱스가 작은 2개의 이웃 참조 라인들을 이용하여, 앵귤러 필터에 기반한 필터링을 수행할 수 있다. 현재 참조 라인의 인덱스가 최소값 및 최대값이 아닌 경우, 현재 참조 라인은, 제1 이웃 참조 라인 및 제2 이웃 참조 라인 사이에 존재할 수 있다. Alternatively, if the index of the current reference line is the minimum, filtering based on an angular filter can be performed using two neighboring reference lines having indices greater than those of the current reference line. On the other hand, if the index of the current reference line is the maximum, filtering based on an angular filter can be performed using two neighboring reference lines having indices less than those of the current reference line. If the index of the current reference line is not the minimum or maximum, the current reference line can exist between the first neighboring reference line and the second neighboring reference line.
또는, 어떤 방식의 필터링을 사용하는지 알려주는 정보를 부호화하여 디코더로 시그널링 할 수도 있다. Alternatively, information can be encoded and signaled to the decoder indicating what type of filtering to use.
상술한 실시예들에서 사용된 신택스들의 명칭은, 설명의 편의를 위해 명명된 것에 불과하다.The names of the syntaxes used in the above-described embodiments are merely named for convenience of explanation.
복호화 과정 또는 부호화 과정을 중심으로 설명된 실시예들을, 부호화 과정 또는 복호화 과정에 적용하는 것은, 본 개시의 범주에 포함되는 것이다. 소정의 순서로 설명된 실시예들을, 설명된 것과 상이한 순서로 변경하는 것 역시, 본 개시의 범주에 포함되는 것이다.It is within the scope of the present disclosure to apply the embodiments described with a focus on the decoding process or the encoding process to the encoding process or the decoding process. It is also within the scope of the present disclosure to change the embodiments described in a certain order to a different order from the described order.
상술한 개시는 일련의 단계 또는 순서도를 기초로 설명되고 있으나, 이는 발명의 시계열적 순서를 한정한 것은 아니며, 필요에 따라 동시에 수행되거나 다른 순서로 수행될 수 있다. 또한, 상술한 개시에서 블록도를 구성하는 구성요소(예를 들어, 유닛, 모듈 등) 각각은 하드웨어 장치 또는 소프트웨어로 구현될 수도 있고, 복수의 구성요소가 결합하여 하나의 하드웨어 장치 또는 소프트웨어로 구현될 수도 있다. 일 예로, 상기 하드웨어 장치는, 연산을 수행하기 위한 프로세서, 데이터를 저장하는 메모리, 데이터를 전송하는 송신기 및 데이터를 수신하는 수신기 중 적어도 하나를 포함할 수 있다.Although the above-described disclosure has been described based on a series of steps or a flow chart, this does not limit the chronological order of the invention, and may be performed simultaneously or in a different order as needed. In addition, each of the components (e.g., units, modules, etc.) constituting the block diagram in the above-described disclosure may be implemented as a hardware device or software, or a plurality of components may be combined to be implemented as a single hardware device or software. As an example, the hardware device may include at least one of a processor for performing a calculation, a memory for storing data, a transmitter for transmitting data, and a receiver for receiving data.
상술한 개시는 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. The above-described disclosure may be implemented in the form of program commands that can be executed through various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program commands, data files, data structures, etc., singly or in combination.
또한, 본 개시에 의하면, 상술한 부호화 방법에 의해 생성된 비트스트림을 저장하는 컴퓨터로 판독 가능한 기록 매체가 제공될 수 있다. 상기 비트스트림은, 부호화 장치에 의해 전송될 수 있고, 복호화 장치는, 상기 비트스트림을 수신하여, 영상을 복호화할 수 있다. In addition, according to the present disclosure, a computer-readable recording medium storing a bitstream generated by the above-described encoding method can be provided. The bitstream can be transmitted by an encoding device, and a decoding device can receive the bitstream and decode an image.
컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 상기 하드웨어 장치는 본 개시에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs, DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions such as ROMs, RAMs, flash memories, and the like. The hardware devices may be configured to operate as one or more software modules to perform processing according to the present disclosure, and vice versa.
본 개시를 통한 실시예들은 영상을 부호화 또는 복호화하는 전자기기에 적용될 수 있다. Embodiments of the present disclosure can be applied to electronic devices that encode or decode images.
Claims (15)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR20230086023 | 2023-07-03 | ||
| KR10-2023-0086023 | 2023-07-03 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025009857A1 true WO2025009857A1 (en) | 2025-01-09 |
Family
ID=94172390
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2024/009324 Pending WO2025009857A1 (en) | 2023-07-03 | 2024-07-02 | Image encoding/decoding method, and recording medium for storing bitstream |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR20250005892A (en) |
| WO (1) | WO2025009857A1 (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20210114054A (en) * | 2019-03-12 | 2021-09-17 | 엘지전자 주식회사 | Video encoding/decoding method, apparatus, and method of transmitting a bitstream |
| US20220217331A1 (en) * | 2016-05-04 | 2022-07-07 | Microsoft Technology Licensing, Llc | Intra-picture prediction using non-adjacent reference lines of sample values |
| KR102506416B1 (en) * | 2018-09-10 | 2023-03-08 | 텐센트 아메리카 엘엘씨 | Intra interpolation filter for multi-line intra prediction |
| KR20230045102A (en) * | 2017-09-28 | 2023-04-04 | 삼성전자주식회사 | Image encoding method and apparatus, and image decoding method and apparatus |
| KR102540171B1 (en) * | 2017-11-22 | 2023-06-05 | 인텔렉추얼디스커버리 주식회사 | Method and apparatus for encoding/decoding image, recording medium for stroing bitstream |
-
2024
- 2024-07-02 WO PCT/KR2024/009324 patent/WO2025009857A1/en active Pending
- 2024-07-02 KR KR1020240086607A patent/KR20250005892A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220217331A1 (en) * | 2016-05-04 | 2022-07-07 | Microsoft Technology Licensing, Llc | Intra-picture prediction using non-adjacent reference lines of sample values |
| KR20230045102A (en) * | 2017-09-28 | 2023-04-04 | 삼성전자주식회사 | Image encoding method and apparatus, and image decoding method and apparatus |
| KR102540171B1 (en) * | 2017-11-22 | 2023-06-05 | 인텔렉추얼디스커버리 주식회사 | Method and apparatus for encoding/decoding image, recording medium for stroing bitstream |
| KR102506416B1 (en) * | 2018-09-10 | 2023-03-08 | 텐센트 아메리카 엘엘씨 | Intra interpolation filter for multi-line intra prediction |
| KR20210114054A (en) * | 2019-03-12 | 2021-09-17 | 엘지전자 주식회사 | Video encoding/decoding method, apparatus, and method of transmitting a bitstream |
Also Published As
| Publication number | Publication date |
|---|---|
| KR20250005892A (en) | 2025-01-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2017222325A1 (en) | Video signal processing method and device | |
| WO2018106047A1 (en) | Method and apparatus for processing video signal | |
| WO2018212577A1 (en) | Method and device for video signal processing | |
| WO2019164031A1 (en) | Image decoding method and apparatus according to block division structure in image coding system | |
| WO2018097691A2 (en) | Method and apparatus for encoding/decoding image, and recording medium in which bit stream is stored | |
| WO2018008906A1 (en) | Method and apparatus for processing video signal | |
| WO2017043949A1 (en) | Method and device for processing video signal | |
| WO2018066958A1 (en) | Method and apparatus for processing video signal | |
| WO2018056701A1 (en) | Method and apparatus for processing video signal | |
| WO2018212579A1 (en) | Method and device for video signal processing | |
| WO2019194568A1 (en) | Affine model-based image encoding/decoding method and device | |
| WO2020096427A1 (en) | Image signal encoding/decoding method and apparatus therefor | |
| WO2020096425A1 (en) | Image signal encoding/decoding method, and device for same | |
| WO2018044089A1 (en) | Method and device for processing video signal | |
| WO2019182329A1 (en) | Image decoding method/apparatus, image encoding method/apparatus, and recording medium storing bitstream | |
| WO2021040458A1 (en) | Video signal processing method and device | |
| WO2020106117A1 (en) | Inter-image component prediction method, and image encoding and decoding method and device using same | |
| WO2023277486A1 (en) | Video signal encoding/decoding method and device based on intra-prediction, and recording medium storing bitstream | |
| WO2023277487A1 (en) | Video signal encoding/decoding method and apparatus based on intra prediction, and recording medium storing bitstream | |
| WO2023128489A1 (en) | Image encoding/decoding method and apparatus | |
| WO2019240450A1 (en) | Residual coefficient encoding/decoding method and device | |
| WO2025005610A1 (en) | Image encoding/decoding method and recording medium for storing bitstream | |
| WO2021060830A1 (en) | Method and apparatus for processing video signal | |
| WO2024058595A1 (en) | Image encoding/decoding method and recording medium storing bitstream | |
| WO2023249468A1 (en) | Image encoding/decoding method and recording medium storing bitstream |
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: 24836305 Country of ref document: EP Kind code of ref document: A1 |