Image encoding / decoding method and apparatus

KR1020260132062APending Publication Date: 2026-09-01DIGITALINSIGHTS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
KR1020260034918
Authority / Receiving Office
KR · KR
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-02-25
Filing Date
2026-02-25
Publication Date
2026-09-01

Smart Images

  • Figure PAT00003_ABST
    Figure PAT00003_ABST
Patent Text Reader

Abstract

The image decoding method and apparatus according to the present disclosure can derive an intra prediction mode of the current block from pre-defined intra prediction modes, construct a reference sample of the current block, and derive a prediction sample of the current block based on the intra prediction mode and the reference sample.
Need to check novelty before this filing date? Find Prior Art

Description

Technology Field

[0001] The present invention relates to an image encoding / decoding method and apparatus. Background Technology

[0002] Market demand for high-resolution video is increasing, and consequently, there is a need for technology that can efficiently compress high-resolution video. In response to these market demands, the Moving Picture Expert Group (MPEG) of ISO / IEC and the Video Coding Expert Group (VCEG) of ITU-T jointly formed the Joint Collaborative Team on Video Coding (JCT-VC), completed the development of the High Efficiency Video Coding (HEVC) video compression standard in January 2013, and have been actively conducting research and development on next-generation compression standards.

[0003] Video compression is broadly composed of intra-frame prediction (or intra prediction), inter-frame prediction (or inter prediction), transformation, quantization, entropy coding, and in-loop filters. Meanwhile, along with the increasing demand for high-resolution video, the demand for stereoscopic video content as a new video service is also increasing. Discussions are underway regarding video compression technologies to effectively provide high-resolution and ultra-high-resolution stereoscopic video content. The problem to be solved

[0004] The present invention aims to provide an intra-prediction-based image encoding / decoding method and apparatus.

[0005] The present invention aims to provide a method and apparatus for inducing an intra-prediction mode.

[0006] The present invention aims to provide a method and apparatus for deriving a reference sample for intra-prediction. means of solving the problem

[0007] The image decoding method and apparatus according to the present disclosure can derive an intra prediction mode of a current block from pre-defined intra prediction modes, construct a reference sample of the current block, and derive a prediction sample of the current block based on the intra prediction mode and the reference sample.

[0008] In the image decoding method and apparatus according to the present disclosure, the predefined intra-prediction modes may include a non-directional mode and a directional mode. The directional mode may be defined based on at least one of a base angle or a delta angle.

[0009] In the image decoding method and apparatus according to the present disclosure, the previously defined intra prediction modes may be divided into a plurality of mode sets. The plurality of mode sets may include at least one of a first mode set consisting of a non-directional mode and a directional mode having a delta angle of 0, a second mode set consisting of a directional mode having a delta angle of 2, a second mode set consisting of a directional mode having a delta angle of 1, or a fourth mode set consisting of a directional mode having a delta angle of 3.

[0010] In the image decoding method and apparatus according to the present disclosure, an intra-prediction mode of the current block can be derived based on a set index that specifies any one of the plurality of mode sets.

[0011] In the image decoding method and apparatus according to the present disclosure, a wide-angle transformation may be performed for the intra-prediction mode of the current block based on at least one of the intra-prediction mode of the current block, a reference sample line index for the current block, or the aspect ratio of the current block.

[0012] In the image decoding method and apparatus according to the present disclosure, the step of constituting the reference sample may include the step of filtering the reference sample.

[0013] In the image decoding method and apparatus according to the present disclosure, the filtering may be performed when the intra-prediction mode of the current block corresponds to a specific mode. The specific mode may be a vertical mode, a horizontal mode, a DC mode, or a SMOOTH mode.

[0014] In the image decoding method and apparatus according to the present disclosure, the filtering may be performed based on at least one of a flag for correction of intra prediction or the size of the current block.

[0015] In the image decoding method and apparatus according to the present disclosure, the filter coefficients of the filtering may be determined based on at least one of the size of the current block, the angle of the intra prediction mode of the current block, or whether the intra prediction mode of the surrounding block is a SMOOTH mode.

[0016] In the image decoding method and apparatus according to the present disclosure, the filter coefficients for filtering can be derived by performing a convolution operation based on filter coefficients according to filter strength and filter coefficients according to interpolation position.

[0017] In the image decoding method and apparatus according to the present disclosure, the step of configuring the reference sample may include the step of interpolating the reference sample. In this case, the interpolation precision may be determined based on an interpolation flag signaled through a bitstream.

[0018] The image encoding method and apparatus according to the present disclosure can derive an intra prediction mode of a current block from pre-defined intra prediction modes, construct a reference sample of the current block, and derive a prediction sample of the current block based on the intra prediction mode and the reference sample.

[0019] The present disclosure may provide a non-transient computer-readable storage medium for storing a bitstream generated by an image encoding method.

[0020] The present disclosure may provide a transmission method and an apparatus for transmitting a bitstream generated by an image encoding method. Effects of the invention

[0021] According to the present invention, the intra prediction mode of the current block can be efficiently signaled.

[0022] According to the present invention, the performance of intra prediction can be improved by allowing a filtering process of reference samples for a specific mode.

[0023] According to the present invention, unnecessary computation can be reduced by performing filtering of reference samples based on whether a second intra prediction is performed.

[0024] According to the present invention, the performance of intra prediction can be improved by effectively determining filter coefficients for corner cases based on the presence or absence of a reference sample.

[0025] According to the present disclosure, smooth filtering and interpolation filtering can be integrated into a single filter to efficiently reduce the pipeline of intra-prediction. Brief explanation of the drawing

[0026] FIG. 1 is a block diagram showing an image encoding device according to the present disclosure. FIG. 2 is a block diagram showing an image decoding device according to the present disclosure. FIG. 3 illustrates an intra-prediction method performed in an image decoding device according to the present disclosure. FIG. 4 illustrates an intra-prediction mode having a predetermined direction or angle as an embodiment according to the present disclosure. FIG. 5 illustrates an example of a directional mode to which wide-angle conversion is applicable, as an embodiment according to the present disclosure. FIG. 6 illustrates an area of ​​a reference sample for filtering as an embodiment according to the present disclosure. Specific details for implementing the invention

[0027] Embodiments of the present invention are described in detail with reference to the drawings attached to this specification so that those skilled in the art can easily implement the invention. However, the present invention may be embodied in various different forms and is not limited to the embodiments described herein. Furthermore, in order to clearly explain the invention in the drawings, parts unrelated to the explanation have been omitted, and similar parts throughout the specification are denoted by similar reference numerals.

[0028] Throughout this specification, when a part is described as being 'connected' to another part, this includes not only cases where they are directly connected, but also cases where they are electrically connected with other elements in between.

[0029] Furthermore, throughout this specification, when a part is described as 'comprising' a certain component, this means that, unless specifically stated otherwise, it does not exclude other components but may include additional components.

[0030] Additionally, terms such as "first," "second," etc., may be used to describe various components, but said components should not be limited by said terms. These terms are used solely for the purpose of distinguishing one component from another.

[0031] Additionally, in the embodiments relating to the device and method described herein, some components of the device or some steps of the method may be omitted. Also, the order of some components of the device or some steps of the method may be changed. Additionally, other components or other steps may be inserted into some components of the device or some steps of the method.

[0032] In addition, some components or steps of the first embodiment of the present invention may be added to or replace some components or steps of the second embodiment of the present invention.

[0033] Furthermore, the components shown in the embodiments of the present invention are depicted independently to represent different characteristic functions and do not imply that each component consists of separate hardware or a single software unit. That is, for convenience of explanation, each component is described by listing it as a separate component, and at least two of the components may be combined to form a single component, or a single component may be divided into multiple components to perform a function. Such integrated and separated embodiments of each component are also included within the scope of the present invention as long as they do not deviate from the essence of the invention.

[0034] First, the terms used in this application are briefly explained as follows.

[0035] The video decoding apparatus described below may be a device included in a civilian security camera, civilian security system, military security camera, military security system, personal computer (PC), notebook computer, portable multimedia player (PMP), wireless communication terminal, smartphone, and server terminal such as a TV application server and service server; it may also refer to various devices equipped with a user terminal such as various devices, a communication device such as a communication modem for performing communication with a wired or wireless communication network, a memory for storing various programs and data for decoding video or predicting between or within a screen for decoding, and a microprocessor for executing programs to perform calculations and control.

[0036] In addition, the video encoded into a bitstream by the encoder can be transmitted to a video decoding device in real-time or non-real-time via wired or wireless communication networks such as the Internet, local area wireless communication networks, wireless LAN networks, WiBro networks, and mobile communication networks, or through various communication interfaces such as cables and Universal Serial Bus (USB), to be decoded, restored as a video, and played back. Alternatively, the bitstream generated by the encoder may be stored in memory. The memory may include both volatile and non-volatile memory. In this specification, memory may be described as a recording medium that stores the bitstream.

[0037] Typically, a video can be composed of a series of pictures, and each picture can be divided into coding units, such as blocks. Furthermore, those skilled in the art to which this embodiment belongs will understand that the term "picture" described below may be replaced with other terms having equivalent meanings, such as "image" or "frame." Additionally, those skilled in the art to which this embodiment belongs will understand that the term "coding unit" may be replaced with other terms having equivalent meanings, such as "unit block" or "block."

[0038] Hereinafter, embodiments of the present invention will be described in more detail with reference to the attached drawings. In describing the present invention, redundant descriptions of identical components are omitted.

[0039] FIG. 1 is a block diagram showing an image encoding device according to the present invention.

[0040] Referring to FIG. 1, the image encoding device (100) may include a picture splitting unit (110), a prediction unit (120, 125), a conversion unit (130), a quantization unit (135), a reordering unit (160), an entropy encoding unit (165), an inverse quantization unit (140), an inverse conversion unit (145), a filter unit (150), and a memory (155).

[0041] The picture splitting unit (110) can split the input picture into at least one processing unit. At this time, the processing unit may be a Prediction Unit (PU), a Transform Unit (TU), or a Coding Unit (CU). In the following embodiments of the present invention, the term "coding unit" may be used to mean a unit that performs coding, or a unit that performs decoding.

[0042] A prediction unit may be divided into at least one square or rectangle of the same size within a single coding unit, or it may be divided such that one of the prediction units within a single coding unit has a different shape and / or size from another prediction unit. When generating a prediction unit that performs intra prediction based on a coding unit, if it is not the minimum coding unit, intra prediction can be performed without dividing into multiple prediction units NxN.

[0043] The prediction unit (120, 125) may include an inter prediction unit (120) that performs inter prediction or inter-frame prediction, and an intra prediction unit (125) that performs intra prediction or intra-frame prediction. It may determine whether to use inter prediction or perform intra prediction for a prediction unit, and determine specific information according to each prediction method (e.g., intra prediction mode, motion vector, reference picture, etc.). The residual value (residual block) between the generated prediction block and the original block may be input to the conversion unit (130). In addition, the prediction mode information, motion vector information, etc. used for prediction may be encoded together with the residual value in the entropy encoding unit (165) and transmitted to the decoder.

[0044] When applying the block merge technology of the present invention described above, a method of using a merge estimation region (MER) considering parallel processing when merging and using movement information of spatially or temporally adjacent blocks of the current block can be applied to the prediction unit (120, 125). That is, the present invention can utilize a parallel estimation region (PER) to configure spatially or temporally adjacent blocks of the current block by considering parallel processing in prediction technologies such as inter-frame prediction, intra-frame prediction, and inter-component prediction among video coding technologies.

[0045] 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 partially encoded area 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.

[0046] In the reference picture interpolation unit, reference picture information is received from memory (155), and pixel information of integer pixels or less can be generated from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 4 pixel units. In the case of chrominance signals, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of integer pixels or less in 1 / 8 pixel units.

[0047] 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 calculate motion vectors. Based on the interpolated pixels, the motion vector can have motion vector values ​​in units of 1 / 2 or 1 / 4 pixels. The motion prediction unit can predict the current prediction unit by using different motion prediction methods. Various motion prediction methods such as the Skip method, Merge method, AMVP (Advanced Motion Vector Prediction) method, and Intra Block Copy method can be used.

[0048] The intra prediction unit (125) can generate a prediction unit based on reference pixel information around the current block, which is pixel information within the current picture. If the surrounding block of the current prediction unit is a block that has performed inter prediction, and the reference pixel is a pixel that has performed inter prediction, the reference pixel included in the block that has performed inter prediction can be replaced with the reference pixel information of the surrounding intra prediction block. That is, if the reference pixel is not available, the unavailable reference pixel information can be replaced with at least one of the available reference pixels.

[0049] Additionally, a residual block can be generated that includes residual value information, which is the difference between the prediction unit that performed the prediction based on the prediction unit generated in the prediction unit (120, 125) and the original block of the prediction unit. The generated residual block can be input to the conversion unit (130).

[0050] In the transformation unit (130), the residual block containing 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), and 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 transformation method will be examined in detail with reference to FIGS. 8 to 10.

[0051] The quantization unit (135) can quantize the values ​​converted into the frequency domain in the conversion unit (130). The quantization coefficient may vary depending on the block or the importance of the image. The values ​​produced by the quantization unit (135) may be provided to the inverse quantization unit (140) and the reordering unit (160).

[0052] The reordering unit (160) can perform reordering of coefficient values ​​for quantized residual values.

[0053] The reordering unit (160) can convert two-dimensional block-shaped coefficients into one-dimensional vector forms through a coefficient scanning method. For example, the reordering unit (160) can convert the coefficients from DC to high-frequency range coefficients into one-dimensional vector forms by scanning using a Zig-Zag Scan method. Depending on the size of the conversion unit and the intra-prediction mode, a vertical scan that scans two-dimensional block-shaped coefficients in the column direction or a horizontal scan that scans two-dimensional block-shaped coefficients in the row direction may be used instead of the Zig-Zag Scan. That is, depending on the size of the conversion unit and the intra-prediction mode, it can be determined whether to use a Zig-Zag Scan, a vertical scan, or a horizontal scan.

[0054] The entropy encoding unit (165) can perform entropy encoding based on the values ​​calculated by the reordering 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). In this regard, the entropy encoding unit (165) can encode residual value coefficient information of the encoding unit from the reordering unit (160) and the prediction unit (120, 125). Additionally, according to the present invention, it is possible to signal and transmit information indicating that motion information is derived and used in the decoder side, and information regarding the technique used for deriving motion information.

[0055] In the inverse quantization unit (140) and inverse transformation unit (145), the values ​​quantized in the quantization unit (135) are inverse quantized, and the values ​​transformed in the transformation unit (130) are inverse transformed. The residual value generated in the inverse quantization unit (140) and inverse transformation unit (145) can be combined with the prediction unit predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction unit (120, 125) to generate a reconstructed block.

[0056] The filter unit (150) may include at least one of a deblocking filter, an offset correction unit, and an Adaptive Loop Filter (ALF). The deblocking filter can remove block distortion caused by boundaries between blocks in the restored picture. The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for the image that has undergone deblocking. To perform offset correction for a specific picture, a method may be used in which pixels included in the image are divided into a certain number of regions, the region to be offset is determined, and the offset is applied to that region, or a method may be used in which the offset is applied by considering the edge information of each pixel. Adaptive Loop Filtering (ALF) may be performed based on a value obtained by comparing the filtered restored image with the original image. After dividing the pixels included in the image into a predetermined group, a filter to be applied to that group is determined, and filtering may be performed differentially for each group.

[0057] 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.

[0058] FIG. 2 is a block diagram showing an image decoding device according to the present invention.

[0059] Referring to FIG. 2, the image decoder (200) may include an entropy decoder (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).

[0060] When a video bitstream is input to a video encoder, the input bitstream can be decoded using the reverse procedure of the video encoder.

[0061] The entropy decoding unit (210) can perform entropy decoding in the opposite procedure to that which the entropy encoding unit of the image encoder performed. 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 correspondence with the method performed in the image encoder.

[0062] The entropy decoding unit (210) can decode information related to intra-prediction and inter-prediction performed in the encoder.

[0063] The reordering unit (215) can perform reordering based on the method of reordering the entropy-decoded bitstream in the encoding unit in the entropy decoding unit (210). The coefficients expressed in the form of a one-dimensional vector can be reordered by restoring them to the form of two-dimensional block coefficients.

[0064] The inverse quantization unit (220) can perform inverse quantization based on the coefficient values ​​of the rearranged block and the quantization parameters provided by the encoder.

[0065] The inverse transform unit (225) can perform inverse transforms, i.e., inverse DCT, inverse DST, and inverse KLT, on the transforms, i.e., DCT, DST, and KLT, performed by the transform unit on the quantization result performed by the image encoder. The inverse transform can be performed based on the transmission unit determined by the image encoder. In the inverse transform unit (225) of the image decoder, a transformation technique (e.g., DCT, DST, KLT) can be selectively performed according to multiple pieces of information such as a prediction method, the size of the current block, and the prediction direction.

[0066] The prediction unit (230, 235) can generate a prediction block based on the prediction block generation information provided by the entropy decoding unit (210) and the previously decoded block or picture information provided by the memory (245).

[0067] As described above, when performing intra prediction or intra-frame prediction identical to the operation in the video encoder, if the size of the prediction unit and the size of the transform unit are the same, intra prediction for the prediction unit is performed based on the pixels to the left of the prediction unit, the pixels to the top left, and the pixels to the top; however, if the size of the prediction unit and the size of the transform unit are different when performing intra prediction, intra prediction can be performed using reference pixels based on the transform unit. Additionally, intra prediction using NxN partitioning only for the minimum encoding unit may also be used.

[0068] 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 receives various information, such as prediction unit information input from the entropy decoding unit (210), prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, distinguishes the prediction unit in the current encoding unit, and determines whether the prediction unit performs inter prediction or intra prediction.

[0069] In addition, when applying the block merge technology of the present invention described above, a method of using a merge estimation region (MER) considering parallel processing when merging and using movement information of spatially or temporally adjacent blocks of the current block can be applied to the prediction unit (230, 235). That is, the present invention can utilize a parallel estimation region (PER) to configure spatially or temporally adjacent blocks of the current block by considering parallel processing in prediction technologies such as inter-frame prediction, intra-frame prediction, and inter-component prediction among video coding technologies.

[0070] The inter prediction unit (230) can perform inter prediction for the current prediction unit based on information included in at least one picture, either a previous picture or a subsequent picture, of the current picture containing the current prediction unit, using information required for inter prediction of the current prediction unit provided by the video encoder. To perform inter prediction, it can determine whether the motion prediction method of the prediction unit included in the corresponding encoding unit is a Skip Mode, Merge Mode, AMVP Mode, or Intra Block Copy Mode based on the encoding unit.

[0071] The intra prediction unit (235) can generate a prediction block based on pixel information within the current picture. If the prediction unit is a prediction unit that has performed intra prediction, it can perform intra prediction based on the intra prediction mode information of the prediction unit provided by the image encoder. The intra prediction unit (235) may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a part that performs filtering on the reference pixel of the current block, and can determine whether to apply the filter based on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixel of the current block using the prediction mode of the prediction unit and the AIS filter information provided by the image encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.

[0072] The reference pixel interpolation unit can generate a reference pixel of an integer value or less by interpolating the reference pixel when the prediction mode of the prediction unit is a prediction unit that performs intra-prediction based on the pixel value interpolated from the reference pixel. If 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 DC mode.

[0073] 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.

[0074] Information regarding whether a deblocking filter has been applied to the corresponding block or picture can be received from the video encoder, and if a deblocking filter has been applied, information regarding whether a strong filter or a weak filter has been applied. The deblocking filter of the video decoder receives information related to the deblocking filter provided by the video encoder and can perform deblocking filtering on the corresponding block.

[0075] The offset correction unit can perform offset correction on the restored image based on the type of offset correction and offset value information applied to the image during encoding. ALF can be applied to the encoding unit based on information on whether ALF is applied and ALF coefficient information provided by the encoder. This ALF information can be provided included in a specific parameter set.

[0076] The memory (245) can store the 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 the output unit.

[0077] FIG. 3 illustrates an intra-prediction method performed in an image decoding device according to the present disclosure.

[0078] Referring to FIG. 3, an intra prediction mode of the current block can be derived (S300).

[0079] An intra-predicted mode predefined in a video encoding / decoding device may include a non-directional mode and a directional mode. Here, the non-directional mode may include at least one of a DC mode, a SMOOTH mode, a SMOOTH_V (vertical) mode, a SMOOTH_H (horizontal) mode, or a PAETH mode. The directional mode may be defined as at least one of a base angle or a delta angle (K). For example, the base angle may correspond to D203_PRED, H_PRED, D157_PRED, D135_PRED, D113_PRED, V_PRED, D67_PRED, D45_PRED, as shown in FIG. 4. K may be an integer in the range of 0 to 3.

[0080] A predefined intra-prediction mode may be divided into multiple mode sets. Each mode set may include one or more intra-prediction modes. For example, a first mode set may consist of a non-directional mode and one or more directional modes having a delta angle of 0. A second mode set may consist of one or more directional modes having a delta angle of 2. A third mode set may consist of one or more directional modes having a delta angle of 1. A fourth mode set may consist of one or more directional modes having a delta angle of 3.

[0081] The mode set of the current block can be determined based on a set index that specifies one of a plurality of mode sets. The set index can be signaled via a bitstream.

[0082] The mode set corresponding to the set index can be defined as shown in Table 1 below.

[0083] Set index Mod set 0 1st Mode Set 1 2nd Mode Set 2 3rd Mode Set 3 4th Mode Set

[0084] When the set index is 0, either a non-directional mode belonging to the first mode set or a directional mode having a delta angle of 0 may be derived as the intra-predicted mode of the current block. Specifically, a first mode index specifying either a non-directional mode belonging to the first mode set or a directional mode having a delta angle of 0 may be signaled. Based on the first mode index, the mode index of the current block may be derived. Among the intra-predicted modes belonging to the first mode set (i.e., a non-directional mode and a directional mode having a delta angle of 0), the intra-predicted mode corresponding to the mode index may be set as the intra-predicted mode of the current block.

[0085] For example, the mode index (mode_idx) of the current block can be derived as shown in the following mathematical formula 1.

[0086] [Mathematical Formula 1]

[0087] mode_idx = 1st mode index

[0088] For example, the intra prediction mode corresponding to the mode index can be defined as shown in Table 2 below.

[0089] Mode Index Intra-prediction mode 0 DC 1 SMOOTH 2 SMOOTH_V 3 SMOOTH_H 4 PAETH 5 D45_PRED 6 D67_PRED 7 V_PRED 8 D113_PRED 9 D135_PRED 10 D157_PRED 11 H_PRED 12 D203_PRED

[0090] If the set index is not zero, the second mode index can be signaled through the bitstream. The second mode index can specify any one of 16 directional modes, which are combinations of the eight basic angles and delta angle signs mentioned above. That is, among the directional modes having a delta angle corresponding to the set index, the directional mode corresponding to the second mode index can be set as the intra-prediction mode of the current block. The mode index corresponding to the intra-prediction mode of the current block can be derived as shown in the following Equation 2.

[0091] [Mathematical Formula 2]

[0092] mode_idx = Number of 1st mode + (Set index - 1) * Number of 2nd mode + 2nd mode index

[0093] In Equation 2, the number of first modes may refer to the number of intra-predicted modes identifiable by the first mode index. The number of second modes may refer to the number of intra-predicted modes identifiable by the second mode index. For example, the number of first modes may be 13 as defined in Table 2. The number of second modes may be 16, which is a combination of 8 basic angles and 2 delta angle symbols. Here, the 8 basic angles may correspond to directional modes excluding non-directional modes from the first mode set.

[0094] Meanwhile, as shown in Table 3, the main mode and delta angle can be calculated and stored based on the mode index derived for the current block.

[0095] if(mode_idx < number of non-directional modes) {main_mode = mode_idx delta_angle = 0}else {main_mode = ((mode_idx - number of non-directional modes) / number of delta angles) + number of non-directional modes delta_angle = ((mode_idx - number of non-directional modes) % number of delta angles) - maximum delta angle}

[0096] In Table 3, the number of non-directional modes may be 5, and the number of delta angles may be 7. When the 7 delta angles are defined as -3, -2, -1, 0, 1, 2, and 3, the maximum delta angle may be 3. Based on at least one of 1) the intra prediction mode of the current block, 2) the reference sample line index (MRL_idx), or 3) the aspect ratio of the current block, the intra prediction mode of the current block may be changed to a mode rotated 180 degrees. Changing to a mode rotated 180 degrees in this way is referred to as wide-angle transformation.

[0097] If the height of the current block is greater than the width, a wide-angle transformation may be performed on the directional mode of the first region shown in FIG. 5. Here, the wide-angle transformation may be the transformation of the angle (init_Ang) of the intra-prediction mode of the current block to an angle with 180 degrees added. The first region may be composed of directional mode(s) having an angle less than or equal to the first angle. The first angle may be determined based on a predetermined threshold angle according to the aspect ratio of the current block.

[0098] For example, when Height is 2*Width, wide angle transformation can be performed for init_Ang that is smaller than the first critical angle. For example, the first critical angle can be 61.

[0099] Alternatively, if Height is 4*Width, a wide angle transformation may be performed for init_Ang that is smaller than the second critical angle. For example, the second critical angle may be 73.

[0100] Alternatively, if Height is 8*Width, a wide angle transformation may be performed for init_Ang that is smaller than the third threshold angle. For example, the third threshold angle may be 82.

[0101] Alternatively, if Height is 16*Width, a wide angle transformation may be performed for init_Ang that is smaller than the fourth critical angle. For example, the fourth critical angle may be 86.

[0102] If the width of the current block is greater than the height, a wide-angle transformation may be performed on the directional mode of the second region shown in FIG. 6. Here, the wide-angle transformation may be the transformation of the angle (init_Ang) of the intra-prediction mode of the current block to an angle 180 degrees less than the angle. The second region may consist of directional mode(s) having an angle greater than or equal to the second angle. The second angle may be determined based on a predetermined threshold angle according to the aspect ratio of the current block.

[0103] For example, if Width is 2*Height, wide angle transformation can be performed for init_Ang that is greater than the second threshold angle. For example, the second threshold angle can be 209.

[0104] Alternatively, if Width is 4*Height, wide angle transformation may be performed for init_Ang that is greater than the second critical angle. For example, the second critical angle may be 197.

[0105] Alternatively, if Width is 8*Height, wide angle transformation may be performed for init_Ang that is greater than the second critical angle. For example, the second critical angle may be 188.

[0106] Alternatively, if Width is 16*Height, wide angle transformation may be performed for init_Ang that is greater than the second threshold angle. For example, the second threshold angle may be 184.

[0107] When comparing the current block's intra prediction mode with the critical angle, the current block's intra prediction mode may be corrected according to MRL_idx and then compared with the critical angle.

[0108] For example, if the value of MRL_idx is 0, 0 degrees can be added to the intra prediction mode of the current block. That is, if the value of MRL_idx is 0, the angle of the current block's intra prediction mode can be compared with the threshold angle without correction to the current block's intra prediction mode. If the value of MRL_idx is 1, 1 degree can be added to the current block's intra prediction mode. If the value of MRL_idx is 2, -1 degree can be added to the current block's intra prediction mode. If the value of MRL_idx is 3, 0 degrees can be added to the current block's intra prediction mode.

[0109] Referring to FIG. 3, a reference sample of the current block can be derived (S310).

[0110] Reference samples for intra-prediction of the current block can be constructed. The process of constructing reference samples may include a process of filtering reference samples.

[0111] Whether to filter a reference sample can be determined based on at least one of a flag regarding whether to allow / perform filtering (signaled at an upper level), the size of the current block, the aspect ratio of the current block, the intra prediction mode of the current block, whether to perform a second intra prediction, or whether to correct the intra prediction.

[0112] Based on at least one of a flag regarding whether filtering is allowed / performed (signaled at an upper level), the size of the current block, the aspect ratio of the current block, the intra prediction mode of the current block, whether a second intra prediction is performed, or whether the intra prediction is corrected, a type of filter for filtering a reference sample may be determined.

[0113] As illustrated in FIG. 6, a pre-defined directional mode can be divided into first to third zones depending on the angle of the directional mode. The directional mode of the first zone can perform intra-prediction based on the top reference sample of the current block. The directional mode of the second zone can perform intra-prediction based on the top and left reference samples of the current block. The directional mode of the third zone can perform intra-prediction based on the left reference sample of the current block.

[0114] In the case of a block where a second intra prediction is performed, the intra prediction mode of the first and third zones may also perform intra prediction based on left and top reference samples. In this case, filtering may be performed on the top and left reference samples.

[0115] Whether to perform a second intra prediction can be determined based on at least one of a flag regarding whether to perform a second intra prediction (signaled at a higher level), MRL_idx, or the intra prediction mode of the current block.

[0116] For example, whether to perform a second intra-prediction can be determined according to the conditions in Table 4 below.

[0117] (flag==1 && MRL_idx==0 && (delta_angle%2)==0) && (0 <angle<90) && second_pred_enabled[angle_to_mode_idx[angle]]) || (플래그==1 && MRL_idx==0 && (delta_angle%2)==0) && (180<angle<270) && second_pred_enabled[angle_to_mode_idx[270-angle]]), angle_to_mode_idx

[90] = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 15, 0, 0, 14, 0, 0, 13, 0, 0, 12, 0, 0, 11, 0, 0, 10, 0, 0, 0, 9, 0, 0, 8, 0, 0, 7, 0, 0, 6, 0, 0, 5, 0, 0, 4, 0, 0, 3, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0},second_pred_enabled

[16] = { 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1};

[0118] In Table 4, angle may refer to the angle of the intra-prediction mode finally derived based on at least one of MRL_idx or wide-angle transformation. The filtering process of a reference sample according to the present disclosure may include at least one of 1) a preparation process of a reference sample, 2) a filtering process of a reference sample, or 3) an interpolation process of a reference sample.

[0119] Preparation process of reference samples

[0120] Based on the intra prediction mode and MRL_idx of the current block, reference samples for intra prediction can be prepared in the reference sample buffer.

[0121] The intra prediction mode of the current block may be a mode that references only the left sample, but the left sample may not exist. Alternatively, the intra prediction mode of the current block may be a mode that references only the top sample, but the top sample may not exist. In such cases, intra prediction of the current block can be performed through the following process.

[0122] If the intra prediction mode of the current block is a mode that refers only to the left sample, but the left sample does not exist, the intra prediction of the current block can be performed based on the existence of the top sample.

[0123] For example, if top samples exist, intra prediction can be performed based on the leftmost sample among the top samples (e.g., (0, -MRL_idx-1)). On the other hand, if top samples do not exist, intra prediction can be performed based on a value determined according to an agreement between the video encoding / decoding devices or a value determined through signaling at a higher level.

[0124] The value determined according to the agreement between the video encoding / decoding devices may be an intermediate bit depth value (e.g., 128<<(bitdepth-8)). Alternatively, the value determined according to the agreement between the video encoding / decoding devices may be a value obtained by adding or subtracting 1 from the intermediate bit depth value.

[0125] The value determined through signaling at the upper level may be a value derived based on the bit depth median value and the difference value signaled through the bitstream. Alternatively, an index for a pre-defined list in the video encoding / decoding device may be signaled. Here, the list may consist of candidate values ​​available as reference sample values. The index may specify any one of the candidate values ​​within the list. Therefore, the value determined through signaling at the upper level may be a candidate value specified by the index among the candidate values ​​within the list.

[0126] If the intra prediction mode of the current block is a mode that refers only to the top sample, but the top sample does not exist, the intra prediction of the current block can be performed based on the existence of the left sample.

[0127] For example, if left samples exist, intra prediction can be performed based on the top sample among the left samples (e.g., (-MRL_idx-1, 0)). On the other hand, if left samples do not exist, intra prediction can be performed based on a value determined by an agreement between video encoding / decoding devices or a value determined through signaling at a higher level.

[0128] The value determined according to the agreement between the video encoding / decoding devices may be a bit depth intermediate value (128<<(bitdepth-8)). Alternatively, the value determined according to the agreement between the video encoding / decoding devices may be a value obtained by adding or subtracting 1 from the bit depth intermediate value.

[0129] The value determined through signaling at the upper level may be a value derived based on the bit depth median value and the difference value signaled through the bitstream. Alternatively, an index for a pre-defined list in the video encoding / decoding device may be signaled. Here, the list may consist of candidate values ​​available as reference sample values. The index may specify any one of the candidate values ​​within the list. Therefore, the value determined through signaling at the upper level may be a candidate value specified by the index among the candidate values ​​within the list.

[0130] If the intra prediction mode of the current block is a mode that references the left and top samples, but neither the left nor the top samples exist, intra prediction can be performed based on a value determined according to an agreement between the video encoding / decoding devices or a value determined through signaling at a higher level.

[0131] The value determined according to the agreement between the video encoding / decoding devices may be a bit depth intermediate value (128<<(bitdepth-8). Alternatively, the value determined according to the agreement between the video encoding / decoding devices may be a value obtained by adding or subtracting 1 from the bit depth intermediate value.

[0132] The value determined through signaling at the upper level may be a value derived based on the bit depth median value and the difference value signaled through the bitstream. Alternatively, an index for a pre-defined list in the video encoding / decoding device may be signaled. Here, the list may consist of candidate values ​​available as reference sample values. The index may specify any one of the candidate values ​​within the list. Therefore, the value determined through signaling at the upper level may be a candidate value specified by the index among the candidate values ​​within the list.

[0133] As mentioned above, if there are no surrounding samples of the current block, the filtering process of the reference sample may be omitted.

[0134] If the top boundary of the current block is located at the boundary of the super block (CTU), the top reference sample adjacent to the current block can be used for intra prediction regardless of MRL_idx.

[0135] If surrounding samples of the current block exist, a left reference sample, a top reference sample, and / or a top-left reference sample can be prepared according to the intra prediction mode of the current block.

[0136] In this case, for the left reference samples, the number of reference samples required for intra prediction can be determined according to the intra prediction mode of the current block. If the number of previously restored left reference samples is smaller than the number of reference samples required for intra prediction, the left reference samples can be prepared by padding the bottommost reference sample among the previously restored left reference samples (downward).

[0137] For top reference samples, the number of reference samples required for intra prediction can be determined based on the intra prediction mode of the current block. If the number of previously restored top reference samples is smaller than the number of reference samples required for intra prediction, the top reference sample can be prepared by padding the rightmost reference sample among the previously restored top reference samples (to the right).

[0138] The top-left reference sample may be prepared based on at least one of the intra-prediction mode of the current block, MRL_idx, whether the current block is located at the boundary of a super block (CTU), or the existence of a left or top reference sample.

[0139] If the intra prediction mode of the current block is a mode that references the top-left sample, the top-left reference sample can be prepared as follows.

[0140] If both left and top reference samples exist, the top-left reference sample can be initialized with the value of the reference sample at that location. In this case, if the top boundary of the current block is located at the boundary of the super block, the top reference sample (-MRL_idx-1, -MRL_idx-1) can be generated by padding the top-left reference sample (-MRL_idx-1, -MRL_idx-1) immediately above the current block.

[0141] If only left reference samples exist, the left reference sample closest to the top-left reference sample among the left reference samples (e.g., (-MRL_idx-1, 0)) can be padded to create the top-left reference sample.

[0142] If only top reference samples exist, a top-left reference sample can be generated by padding the top reference sample closest to the top-left reference sample among the top reference samples (e.g., (0, -MRL_idx-1)).

[0143] If neither the left nor the top reference samples exist, intra prediction can be performed based on a value determined according to an agreement between the video encoding / decoding devices or a value determined through signaling at a higher level.

[0144] The value determined according to the agreement between the video encoding / decoding devices may be a bit depth intermediate value (128<<(bitdepth-8). Alternatively, the value determined according to the agreement between the video encoding / decoding devices may be a value obtained by adding or subtracting 1 from the bit depth intermediate value.

[0145] The value determined through signaling at the upper level may be a value derived based on the bit depth median value and the difference value signaled through the bitstream. Alternatively, an index for a pre-defined list in the video encoding / decoding device may be signaled. Here, the list may consist of candidate values ​​available as values ​​for reference samples. The index may specify any one of the candidate values ​​within the list. Therefore, the value determined through signaling at the upper level may be a candidate value specified by the index among the candidate values ​​in the list. The upper-left reference sample may be generated using a value defined according to the encoder / decoding agreement or received from the upper level.

[0146] Filtering process of reference samples

[0147] Filtering of reference samples may be performed based on at least one of the intra prediction mode of the current block, the size of the current block, the intra prediction mode of surrounding blocks, or whether a second intra prediction is performed.

[0148] Filtering according to the present disclosure may be smooth filtering. Filtering of reference samples may include at least one of 1) corner filtering that performs filtering on the top-left reference sample and 2) edge filtering that performs filtering on the left and top reference samples.

[0149] Whether filtering is allowed or applied to a reference sample can be determined based on a filtering flag signaled through the bitstream. The filtering flag can be signaled at a higher level.

[0150] At least one of corner filtering or edge filtering can be performed only when MRL_idx is 0.

[0151] At least one of corner filtering or edge filtering may be restricted so as not to be performed when the intra prediction mode of the current block corresponds to a specific mode. Here, the specific mode may include at least one of a vertical mode, a horizontal mode, a DC mode, or a SMOOTH mode (e.g., SMOOTH, SMOOTH_V, SMOOTH_H).

[0152] Even if the intra prediction mode of the current block corresponds to the specific mode mentioned above, if it is determined that no correction is performed on the prediction samples of the current block based on at least one of a flag regarding the correction of intra prediction or the size of the current block, filtering of the reference samples may be performed.

[0153] Here, if the value of the flag regarding intra-prediction correction is 0, it may indicate that correction is not allowed / performed for the prediction samples of the current block. On the other hand, if the value of the flag regarding intra-prediction correction is 1, it may indicate that correction is allowed / performed for the prediction samples of the current block.

[0154] For example, if the intra prediction mode of the current block is vertical mode and the width of the current block is greater than or equal to a threshold (e.g., 32), it may be determined that no correction is performed on the prediction samples of the current block, and in this case, filtering may be performed on the reference samples of the current block.

[0155] If the intra prediction mode of the current block is horizontal mode and the height of the current block is greater than or equal to a threshold (e.g., 32), it may be determined that no correction is performed on the prediction samples of the current block, and in this case, filtering may be performed on the reference samples of the current block.

[0156] If the intra prediction mode of the current block is SMOOTH mode, SMOOTH_H mode, or SMOOTH_V mode and the width or height of the current block is greater than or equal to a threshold (e.g., 32), it may be determined that no correction is performed on the prediction samples of the current block, and filtering may be performed on the reference samples of the current block.

[0157] Correction of the predicted samples may not always be performed for the current block encoded in SMOOTH mode (e.g., at least one of SMOOTH, SMOOTH_H, or SMOOTH_V). In this case, filtering may be performed on the reference samples of the current block without any separate conditions.

[0158] For the current block encoded in SMOOTH mode (e.g., at least one of SMOOTH, SMOOTH_H, or SMOOTH_V), correction of the predicted samples may not always be performed. In this case, filtering may not be performed on the reference samples of the current block without any separate conditions.

[0159] 1. Corner Filtering

[0160] Corner filtering can be performed when the intra prediction mode of the current block is a mode that uses left and top reference samples. In this case, corner filtering can be performed using reference samples belonging to a predetermined region and corner reference samples as input.

[0161] A reference sample belonging to a predetermined area may include at least one of a reference sample belonging to a first area (hereinafter referred to as the first reference sample) or a reference sample belonging to a second area (hereinafter referred to as the second reference sample), as illustrated in FIG. 6. In this case, the number of filter taps for corner filtering may be determined according to the value of k. Filtered corner reference samples may be derived by multiplying each of the input reference samples by a predetermined filter coefficient. The filter coefficient may be pre-defined in the image encoding / decoding device or signaled via a bitstream.

[0162] If filter coefficients are pre-defined in the image encoding / decoding device, the filter coefficients applied to the first reference sample, corner reference sample, and second reference sample may be as follows. When k is 1, the filter coefficients may be {4, 8, 4} or {5, 6, 5}. When k is 2, the filter coefficients may be {2, 4, 4, 4, 2}, {2, 3, 6, 3, 2}, or {2, 2, 8, 2, 2}.

[0163] When filter coefficients are signaled through the upper level of the bitstream, a list consisting of N filter coefficient candidates may be defined in the video encoding / decoding device, and an index specifying any one of the N filter coefficient candidates may be signaled through the bitstream. Filter coefficients for corner filtering may be determined based on the filter coefficient candidate specified by the index.

[0164] Filter coefficients may be determined based on at least one of the width and / or height of the current block, the angle of the intra prediction mode, or whether the intra prediction mode of the surrounding block is a SMOOTH mode.

[0165] For example, stronger filtering can be performed as the size of the current block increases, and / or the angle of the directional mode differs from the horizontal or vertical direction, and / or the surrounding blocks are coded in SMOOTH mode, and / or the number of surrounding blocks coded in SMOOTH mode increases.

[0166] If at least one of the upper or left peripheral blocks is an intra-prediction mode that is a SMOOTH mode (i.e., SMOOTH, SMOOTH_V, or SMOOTH_H), filter coefficients can be determined through a first judgment criterion. On the other hand, if both the upper and left peripheral blocks are not in SMOOTH mode, filter coefficients can be determined through a second judgment criterion.

[0167] 2. Edge Filtering

[0168] Edge filtering can be performed on at least one of the top reference sample or the left reference sample based on at least one of the intra prediction mode of the current block, the size of the current block, whether the intra prediction mode of the surrounding block is SMOOTH mode, or whether a second intra prediction is performed.

[0169] Edge filtering for an upper reference sample can be performed when the intra prediction mode of the current block is a mode that references the upper sample and said upper sample is available. Filter coefficients and the number of filter taps for edge filtering can be determined based on at least one of the size of the current block, the angle of the directional mode, or whether the intra prediction mode of the upper surrounding block is a SMOOTH mode.

[0170] Different filter coefficient determination methods can be applied depending on whether the intra prediction mode of the upper surrounding block is SMOOTH mode or not.

[0171] For example, if the intra prediction mode of the current block is SMOOTH mode (i.e., SMOOTH, SMOOTH_V, or SMOOTH_H), filter coefficients can be determined based on the sum of the width and height of the current block.

[0172] If the intra prediction mode of the current block is a directional mode, filter coefficients and the number of filter taps for edge filtering may be determined based on at least one of the angle difference between the directional mode and the mode closest to the horizontal (180 degrees) or vertical (90 degrees) mode, or the sum of the width and height of the current block. For example, stronger edge filtering may be applied as the angle difference increases and / or the sum of the width and height of the current block increases.

[0173] Interpolation process of reference samples

[0174] The interpolation process of reference samples may be a process of generating reference samples at fractional positions based on an interpolation filter for more sophisticated prediction of directional modes.

[0175] Interpolation precision and / or the method of performing interpolation can be determined based on an interpolation flag. The interpolation flag can be signaled through a bitstream (e.g., a higher level such as a sequence, picture, or slice).

[0176] For example, if the value of the interpolation flag is 1, 1 / p (p=2 a An interpolation filter can be applied to decimal places with precision (where a is an integer greater than or equal to 2). If the value of the interpolation flag is 0, interpolation for decimal precision is omitted or 1 / q (q=2 b An interpolation filter for decimal places with precision (where b is an integer greater than or equal to 1 and less than a) can be applied. That is, if the value of the interpolation flag is 0, the reference sample can be upsampled based on an interpolation filter with decimal precision of 1 / q.

[0177] Alternatively, if the value of the interpolation flag is 0, the reference sample can be upsampled. For example, if the value of the interpolation flag is 0, the reference sample can be upsampled through an interpolation filter of m-tap (where m is an integer greater than or equal to 2) for 1 / 2 decimal places.

[0178] When the value of the interpolation flag is 1, interpolation can be performed on-the-fly based on a pre-defined interpolation filter in the video encoding / decoding device.

[0179] Filter coefficients for interpolation may be pre-defined based on at least one of interpolation precision or interpolation position.

[0180] Interpolation can be performed on samples at locations referenced by the second-order intra prediction mode of the current block. Here, the second-order intra prediction mode may refer to a mode derived by rotating the angle of the current block's intra prediction mode by 180 degrees. Intra prediction based on such a second-order intra prediction mode may be referred to as second-order intra prediction.

[0181] An interpolation filter may be applied to a reference sample for a second intra prediction under the same conditions as the reference sample for a first intra prediction. For the reference sample for the second intra prediction, interpolation may be performed with a precision predefined in the image encoding / decoding device. Alternatively, unlike the reference sample for the first intra prediction, interpolation may be omitted for the reference sample for the second intra prediction.

[0182] The smooth filtering and interpolation processes of the aforementioned reference samples may be performed as a single filtering process rather than as separate processes. In this case, if both the smooth filtering and interpolation conditions discussed earlier are satisfied, a single filtering process can be performed based on predetermined filter coefficients to generate filtered reference sample values ​​for the locations referenced for intra-prediction.

[0183] If the smooth filtering condition is not satisfied, interpolation can be performed adaptively based on the interpolation flag.

[0184] If the smooth filtering condition is satisfied and the value of the interpolation flag is 1, 1 / p (p=2) is filtered through the reference sample. a Filtered reference sample values ​​for decimal positions with precision (where a is an integer greater than or equal to 2) can be generated on-the-fly.

[0185] If the smooth filtering condition is satisfied and the value of the interpolation flag is 0, 1 / q (q=2 b Reference samples can be upsampled to precision (where b is an integer greater than or equal to 1 and less than a).

[0186] Filter coefficients for each interpolation position may be stored identically in the image encoding / decoding device in the form of a look-up table. In this case, an interpolation filter having multiple filter strengths may be defined according to the interpolation position based on the smooth filtering condition. That is, interpolation of the reference sample can be performed based on filter coefficients selected according to the filter strength and the interpolation position.

[0187] Filter coefficients of the interpolation filter according to the interpolation position and filter coefficients of the smooth filter according to the filter strength may be stored, respectively. Through convolution operations, a single filter coefficient can be derived from the two filter coefficients, and filtering can be performed on a reference sample based on the derived single filter coefficient. For example, the process of deriving a single filter coefficient by convolving a 1D smooth filter and a 1D interpolation filter is as shown in Table 5 below.

[0188] Interpolation filter at 1 / 2 decimal positions: {-1, 9, 9, -1} Smooth filter: {1, 2, 1} Padding of interpolation filter {-1, -1, 9, 9, -1, -1} Derivation of final filter coefficients through convolution of interpolation filter and smooth filter {1*(-1)+2*(-1)+1*(9), 1*(-1)+2*(9)+1*(9), 1*(9)+2*(9)+1*(-1), 1*(9)+2*(-1)+1*(-1)}= {6, 26, 26, 6}

[0189] Referring to FIG. 3, a prediction sample of the current block can be derived based on the intra prediction mode of the current block and a reference sample (S320). A prediction sample of the current block can be derived based on the filtered reference sample obtained through the filtering process of the reference sample.

[0190] Predicted samples of the current block can also be derived based on upsampled reference samples obtained through the interpolation process of reference samples.

[0191] Predicted samples for the current block can also be derived based on upsampled reference samples obtained through the filtering process and the interpolation process of reference samples.

[0192] The prediction sample of the current block can be derived based on two or more (upsampled) reference samples referenced by the intra-prediction mode of the current block. In this case, the prediction sample of the current block can be derived by performing linear interpolation based on two or more (upsampled) reference samples.

[0193] Referring to Fig. 3, we examined the intra prediction method performed in the video decoding device, and this intra prediction method can be performed in the same way in the encoding device.

[0194] The various embodiments of the present disclosure are not intended to list all possible combinations but to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.

[0195] In addition, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of implementation by hardware, it may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general processors, controllers, microcontrollers, microprocessors, etc.

[0196] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating system, application, firmware, program, etc.) that enable an operation according to a method of various embodiments to be executed on a device or computer, and a non-transitory computer-readable medium on which such software or instructions, etc. are stored and executable on a device or computer.

Claims

Claim 1 A video decoding method comprising: deriving an intra prediction mode of a current block from pre-defined intra prediction modes; constructing a reference sample of the current block; and deriving a prediction sample of the current block based on the intra prediction mode and the reference sample. Claim 2 A method for image decoding according to claim 1, wherein the previously defined intra-predicted modes include a non-directional mode and a directional mode, and the directional mode is defined based on at least one of a base angle or a delta angle. Claim 3 A method for image decoding according to claim 2, wherein the previously defined intra prediction modes are divided into a plurality of mode sets, and the plurality of mode sets include at least one of a first mode set consisting of a non-directional mode and a directional mode having a delta angle of 0, a second mode set consisting of a directional mode having a delta angle of 2, a second mode set consisting of a directional mode having a delta angle of 1, or a fourth mode set consisting of a directional mode having a delta angle of 3. Claim 4 A video decoding method according to paragraph 3, wherein an intra-prediction mode of the current block is derived based on a set index specifying any one of the plurality of mode sets. Claim 5 An image decoding method according to claim 1, wherein a wide-angle transformation is performed on the intra-prediction mode of the current block based on at least one of the intra-prediction mode of the current block, a reference sample line index for the current block, or the aspect ratio of the current block. Claim 6 A video decoding method according to claim 1, wherein the step of constituting the reference sample includes the step of filtering the reference sample. Claim 7 A video decoding method according to claim 6, wherein the filtering is performed when the intra-prediction mode of the current block corresponds to a specific mode, and the specific mode is a vertical mode, a horizontal mode, a DC mode, or a SMOOTH mode. Claim 8 In claim 7, the image decoding method wherein the filtering is performed based on at least one of a flag for correction of intra prediction or the size of the current block. Claim 9 A video decoding method according to claim 6, wherein the filter coefficients of the filtering are determined based on at least one of the size of the current block, the angle of the intra prediction mode of the current block, or whether the intra prediction mode of the surrounding block is a SMOOTH mode. Claim 10 In claim 6, the filter coefficients for the filtering are derived by performing a convolution operation based on filter coefficients according to filter strength and filter coefficients according to interpolation position, in an image decoding method. Claim 11 A method for decoding images according to claim 1, wherein the step of constituting the reference sample includes the step of interpolating the reference sample. Claim 12 A video decoding method according to claim 11, wherein the interpolation precision is determined based on an interpolation flag signaled through a bitstream. Claim 13 A video encoding method comprising: deriving an intra prediction mode of a current block from pre-defined intra prediction modes; constructing a reference sample of the current block; and deriving a prediction sample of the current block based on the intra prediction mode and the reference sample. Claim 14 A non-transient computer-readable storage medium for storing a bitstream generated by a video encoding method according to paragraph 13. Claim 15 A transmission method for transmitting a bitstream generated by a video encoding method according to paragraph 13.