Video signal processing method and apparatus
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-09-06
- Publication Date
- 2026-08-11
AI Technical Summary
由于图像数据的分辨率、品质变得越高,数据量相对于现有图像数据越增加,因此如果利用现有的有无线宽频带电路之类的介质传送图像数据或者利用现有的存储介质进行存储,则传送费用和存储费用增加
[0022] According to the present invention, intra-frame prediction can be performed efficiently on encoded/decoded object blocks.
Smart Images

Figure CN116582670B_ABST
Abstract
Description
[0001] This patent application is a divisional application of the patent application with an international filing date of September 6, 2018, national application number 201880035977.3, and an invention title of "Video Signal Processing Method and Apparatus". Technical Field
[0002] This invention relates to video signal processing methods and apparatus. Background Technology
[0003] In recent years, the demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, has increased across various application fields. As image data resolution and quality improve, the data volume also increases relative to existing image data. Therefore, if existing wireless broadband circuits are used to transmit image data or existing storage media are used for storage, transmission and storage costs increase. To address these issues arising from the increasing resolution and quality of image data, efficient image compression techniques can be used.
[0004] As an image compression technology, there are various techniques, such as inter-frame prediction technology that predicts the pixel values contained in the current image based on the previous or next image, intra-frame prediction technology that predicts the pixel values contained in the current image using the pixel information in the current image, and entropy coding technology that assigns short codes to values that occur frequently and long codes to values that occur infrequently, etc. These image compression technologies can be used to effectively compress image data before transmission or storage.
[0005] On the other hand, with the increasing demand for high-resolution images, the demand for stereoscopic image content, as a new image service, is also increasing. Video compression technologies for effectively providing high-resolution and ultra-high-resolution stereoscopic image content are currently being discussed. Summary of the Invention
[0006] The purpose of this invention is to provide a method and apparatus for effectively performing intra-frame prediction on encoded / decoded blocks when encoding / decoding video signals.
[0007] The purpose of this invention is to provide a method and apparatus for performing intra-frame prediction using multiple non-adjacent reference samples when encoding / decoding video signals.
[0008] The purpose of this invention is to provide a method and apparatus for performing intra-frame prediction using right-side and bottom-side reference samples when encoding / decoding video signals.
[0009] The technical problems to be solved by this invention are not limited to those mentioned above. For other technical problems not mentioned, those skilled in the art can clearly understand them based on the following description.
[0010] The video signal decoding method and apparatus involved in this invention can be: determining whether to apply bidirectional intra-frame prediction to the current block, deriving a reference sample of the current block, and, when applying bidirectional intra-frame prediction to the current block, obtaining a prediction sample of the current block based on a first reference sample and a second reference sample specified by the intra-frame prediction mode of the current block.
[0011] The video signal coding method and apparatus involved in this invention can be: determining whether to apply bidirectional intra-frame prediction to the current block, deriving reference samples of the current block, and, when applying bidirectional intra-frame prediction to the current block, obtaining prediction samples of the current block based on a first reference sample and a second reference sample specified by the intra-frame prediction mode of the current block.
[0012] In the video signal encoding / decoding method and apparatus involved in this invention, the first reference sample can be the left or upper reference sample of the current block, and the second reference sample can be the right or lower reference sample of the current block.
[0013] In the video signal encoding / decoding method and apparatus involved in this invention, the above-mentioned right-side reference sample can be generated by interpolating the right-side lower-end reference sample and the right-side upper-end reference sample, and the above-mentioned lower-end reference sample can be generated by interpolating the right-side lower-end reference sample and the left-side lower-end reference sample.
[0014] The video signal encoding / decoding method and apparatus involved in this invention can be: selecting the first reference sample by applying the intra-frame prediction mode of the current block in the positive direction, and selecting the second reference sample by applying the intra-frame prediction mode of the current block in the negative direction.
[0015] In the video signal encoding / decoding method and apparatus involved in this invention, the predicted sample can be obtained by weighted operation of a first predicted sample obtained based on the first reference sample and a second predicted sample obtained based on the second reference sample.
[0016] The video signal encoding / decoding method and apparatus involved in this invention may be: the weights applicable to the first prediction sample and the second prediction sample are determined based on at least one of the position of the prediction object sample, the size and shape of the current block, or the intra-frame prediction mode.
[0017] In the video signal encoding / decoding method and apparatus involved in this invention, the above-mentioned bidirectional intra-frame prediction is only applicable to the specified region within the current block.
[0018] The video signal encoding / decoding method and apparatus involved in this invention may include: the step of determining whether to apply bidirectional intra-frame prediction to the current block includes the step of determining whether the intra-frame prediction mode of the current block is a directional intra-frame prediction mode, and the step of decoding information indicating whether the directional intra-frame prediction mode is used as a bidirectional intra-frame prediction mode.
[0019] In the video signal encoding / decoding method and apparatus involved in this invention, whether to apply bidirectional intra-frame prediction to the current block is determined based on whether to apply bidirectional intra-frame prediction to the surrounding blocks adjacent to the current block.
[0020] In the video signal encoding / decoding method and apparatus involved in the present invention, it can be determined that bidirectional intra-frame prediction is applied to the current block when the intra-frame prediction mode of the current block is a directional intra-frame prediction mode within a specified range.
[0021] The features briefly summarized above are merely exemplary forms for the detailed description of the invention below, and are not intended to limit the scope of the invention.
[0022] According to the present invention, intra-frame prediction can be performed efficiently on encoded / decoded object blocks.
[0023] According to the present invention, an advantage is that the efficiency of intra-frame prediction can be improved by utilizing multiple non-adjacent reference samples to perform intra-frame prediction.
[0024] According to the present invention, an advantage is that the efficiency of intra-frame prediction can be improved by utilizing reference samples on the right and bottom sides.
[0025] The effects that can be obtained by the present invention are not limited to those mentioned above. For other effects not mentioned, those skilled in the art to which this invention pertains can clearly understand them based on the following description. Attached Figure Description
[0026] Figure 1 This is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
[0027] Figure 2 This is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
[0028] Figure 3 To illustrate an embodiment of the present invention, a diagram is shown illustrating an example of hierarchical segmentation of coded blocks based on a tree structure.
[0029] Figure 4 For the application of one embodiment of the present invention, a graph is shown that allows for partitioning patterns based on binary tree segmentation.
[0030] Figure 5 For the purpose of applying an embodiment of the present invention, a diagram is shown illustrating an example of binary tree-based segmentation that only allows a specific form of segmentation.
[0031] Figure 6 To illustrate an embodiment of the present invention, a diagram is shown for demonstrating an example of encoding / decoding information related to the allowed number of binary tree splits.
[0032] Figure 7 A diagram illustrating a partitioning pattern applicable to a coding block is provided for an embodiment of the present invention.
[0033] Figure 8 A diagram illustrating the types of intra-frame prediction modes predefined in the image encoder / decoder is provided for application of one embodiment of the present invention.
[0034] Figure 9 A diagram illustrating the types of extended intra-frame prediction modes is provided for application of one embodiment of the present invention.
[0035] Figure 10 To illustrate an embodiment of the present invention, a sequence diagram of the intra-frame prediction method is shown.
[0036] Figure 11 A diagram illustrating a method for correcting the predicted sample of the current block based on the difference information of surrounding samples, for the application of an embodiment of the present invention.
[0037] Figure 12 as well as Figure 13 A diagram representing a one-dimensional reference sample group in which reference samples are rearranged into a single column.
[0038] Figure 14 This is a diagram illustrating an example of deriving a right-side reference sample or a bottom-side reference sample using multiple reference samples.
[0039] Figure 15 as well as Figure 16 This diagram illustrates how a non-square block is used to determine a right-side reference sample and a lower-side reference sample, according to an embodiment of the present invention.
[0040] Figure 17 This is a diagram used to illustrate an example of deriving a second reference sample from a first reference sample.
[0041] Figure 18 A diagram representing the reference samples that constitute a one-dimensional reference sample group.
[0042] Figure 19 A diagram representing the region where bidirectional intra-frame prediction is applicable.
[0043] Figure 20 To identify examples of directional prediction modes that allow bidirectional intra-frame prediction.
[0044] Figure 21 This is a flowchart of an intra-block prediction method based on the bidirectional intra-prediction mode involved in this invention. Detailed Implementation
[0045] This invention can be modified in various ways and has multiple embodiments. Specific embodiments are illustrated in the figures below for detailed description. However, this is not intended to limit the invention to specific implementations; it should be understood that all modifications, equivalents, and even substitutions encompassed within the spirit and scope of the invention are included. In the description of the figures, similar reference numerals are used for similar structural elements.
[0046] While terms such as "first" and "second" can be used in the description of various constituent elements, the constituent elements are not limited to these terms. The purpose of using these terms is solely to distinguish one constituent element from another structural element. For example, without departing from the scope of this invention, a first constituent element may be named a second structural element, and similarly, a second structural element may be named a first structural element. The term "and / or" includes a combination of multiple related descriptions or any one of multiple related descriptions.
[0047] When referring to a structural element as "connected to" or "accessed" by another structural element, although it can be directly connected to or accessed by another structural element, it should also be understood that other constituent elements may exist in between. Conversely, when referring to a structural element as "directly connected to" or "directly accessed" by another structural element, it should be understood that no other structural elements exist in between.
[0048] The terminology used in this application is for illustrative purposes only and is not intended to limit the invention. The singular representation includes the plural representation unless there is a clear difference in meaning in the context. In this application, terms such as "comprising" or "having" should be understood as specifying the presence of features, numbers, steps, actions, structural elements, components, or combinations thereof described in the specification, rather than precluding the presence or additional possibilities of one or more other features or numbers, steps, actions, structural elements, components, or combinations thereof.
[0049] The preferred embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used for the same structural elements in the drawings, and repeated descriptions of the same structural elements will be omitted.
[0050] Figure 1 This is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
[0051] Reference Figure 1 The image encoding apparatus 100 may include an image segmentation unit 110, a prediction unit 120 and 125, a conversion unit 130, a quantization unit 135, a reorganization unit 160, an entropy encoding unit 165, an inverse quantization unit 140, an inverse conversion unit 145, a filtering unit 150, and a storage unit 155.
[0052] for Figure 1 The structural components shown are presented individually to represent different specific functions in the image encoding apparatus, and do not imply that each structural component is composed of a separate hardware or software structural unit. That is, the structural components are listed and included in the form of individual structural components for ease of explanation. At least two structural components can be combined to form a single structural component, or a single structural component can be divided into multiple structural components to perform functions. Such embodiments where the structural components are integrated or separated are all included within the scope of the present invention as long as they do not depart from the essence of the present invention.
[0053] Furthermore, some structural elements in this invention may not be essential for performing the essential function, but rather optional structural elements used to improve performance. This invention can be implemented by including only the structural parts necessary for realizing the essence of the invention, excluding the structural elements used to improve performance. Structures that include only the essential structural elements, excluding the optional structural elements used to improve performance, are also included within the scope of this invention.
[0054] The image segmentation unit 110 can segment the input image into at least one processing unit. This processing unit can be a prediction unit (PU), a transformation unit (TU), or a coding unit (CU). In the image segmentation unit 110, an image can be segmented into a combination of multiple coding units, prediction units, and transformation units, and a combination of coding units, prediction units, and transformation units can be selected according to a predetermined criterion (e.g., a cost function) to encode the image.
[0055] For example, an image can be segmented into multiple coding units. To segment a coding unit from an image, a recursive tree structure such as a quadtree structure can be used. A coding unit that is segmented from an image or the largest coding unit into other coding units can be segmented into a number of child nodes equal to the number of coding units it was segmented into. Coding units that cannot be further segmented due to certain constraints become leaf nodes. That is, assuming that a coding unit can only be segmented into squares, a coding unit can be segmented into at most four other coding units.
[0056] In the embodiments of the present invention, the encoding unit may be used either as a unit for performing encoding or as a unit for performing decoding.
[0057] A prediction unit can be either a unit divided from a coding unit in the form of at least one square or rectangle of the same size, or a unit divided from a coding unit in the form of one prediction unit having a different shape and / or size than another prediction unit.
[0058] When generating prediction units for intra-frame prediction based on coding units, if the prediction unit is not the smallest coding unit, intra-frame prediction can be performed without dividing it into multiple prediction units NxN.
[0059] Prediction units 120 and 125 may include an inter-frame prediction unit 120 that performs inter-frame prediction and an intra-frame prediction unit 125 that performs intra-frame prediction. After deciding whether to use inter-frame prediction or perform intra-frame prediction for a prediction unit, specific information (e.g., intra-frame prediction mode, motion vector, reference image, etc.) can be determined based on each prediction method. In this case, the processing unit performing the prediction and the processing unit determining the prediction method and specific content can be different. For example, the prediction method and prediction mode can be determined by the prediction unit, and the prediction execution can be performed by the conversion unit. The residual value (residual block) between the generated prediction block and the original block can be input to the conversion unit 130. Furthermore, prediction mode information, motion vector information, etc., used for prediction can be encoded together with the residual value in the entropy coding unit 165 and then transmitted to the decoder. When using a specific coding mode, the prediction block can be generated without using prediction units 120 and 125, and the original block can be directly encoded and transmitted to the decoding unit.
[0060] The inter-frame prediction unit 120 can predict prediction units based on information from at least one of the previous or next images of the current image, or it can predict prediction units based on information from a portion of the currently encoded region, depending on the situation. The inter-frame prediction unit 120 may include a reference image interpolation unit, a motion prediction unit, and a motion compensation unit.
[0061] In the reference image interpolation unit, reference image information can be received from the storage unit 155, and pixel information of integer pixels or less in the reference image can be generated. In the case of luminance pixels, an 8-tap DCT-based interpolation filter can be used, with different filtering coefficients to generate pixel information of integer pixels or less in 1 / 4 pixel units. In the case of chrominance signals, a 4-tap DCT-based interpolation filter can be used, with different filtering coefficients to generate pixel information of integer pixels or less in 1 / 8 pixel units.
[0062] The motion prediction unit can perform motion prediction based on a reference image interpolated by the reference image interpolation unit. Various methods can be used to calculate motion vectors, such as FBMA (Full Search-based Block Matching Algorithm), TSS (Three-Step Search), and NTS (New Three-Step Search Algorithm). The motion vector, based on the interpolated pixels, can have a motion vector value of 1 / 2 or 1 / 4 pixel units. Different motion prediction methods can be used within the motion prediction unit to predict the current prediction unit. Various motion prediction methods can be used, such as skipping, merging, AMVP (Advanced Motion Vector Prediction), and intra-block copying.
[0063] The intra-frame prediction unit 125 can generate prediction units based on pixel information within the current image, i.e., reference pixel information surrounding the current block. Since the surrounding blocks of the current prediction unit are blocks that have performed inter-frame prediction, if the reference pixel is a pixel that has performed inter-frame prediction, the reference pixel contained in the block that performed inter-frame prediction can be replaced with the reference pixel information of the surrounding blocks that performed intra-frame prediction. That is, if the reference pixel is unavailable, the unavailable reference pixel information can be replaced with at least one of the available reference pixels.
[0064] In intra-frame prediction, the prediction mode can be a directional prediction mode that uses reference pixel information along the prediction direction, and a non-directional mode that does not use directional information when performing prediction. The mode used to predict luminance information and the mode used to predict chromatic difference information can be different. To predict chromatic difference information, either the intra-frame prediction mode information used to predict luminance information or the predicted luminance signal information can be used.
[0065] When performing intra-frame prediction, if the size of the prediction unit and the size of the transformation unit are the same, intra-frame prediction can be performed based on pixels to the left of the prediction unit, pixels at the upper left, and pixels at the top. However, when performing intra-frame prediction, if the size of the prediction unit and the size of the transformation unit are different, intra-frame prediction can be performed using reference pixels based on the transformation unit. Furthermore, intra-frame prediction using NxN segmentation can be used only for the smallest coding unit.
[0066] In intra-frame prediction methods, a prediction block can be generated by applying an AIS (Adaptive IntraSmoothing) filter to a reference pixel according to the prediction mode. The type of AIS filter applied to the reference pixel can be different. To perform intra-frame prediction, the intra-frame prediction mode of the current prediction unit can be predicted based on the intra-frame prediction modes of surrounding prediction units. When using mode information predicted from surrounding prediction units to predict the prediction mode of the current prediction unit, if the intra-frame prediction modes of the current prediction unit and its surrounding units are the same, a specified flag can be used to convey this information. If the prediction modes of the current prediction unit and its surrounding units are different, entropy coding can be performed to encode the prediction mode information of the current block.
[0067] Furthermore, based on the prediction units generated by the prediction units 120 and 125, a residual block containing information about the difference between the prediction unit that performed the prediction and the original block of the prediction unit can be generated. The generated residual block can be input into the conversion unit 130.
[0068] In the conversion unit 130, the residual block, which contains the original block and the residual information of the prediction units generated by the prediction units 120 and 125, can be converted using conversion methods such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. Whether DCT, DST, or KLT is used to convert the residual block is determined based on the intra-frame prediction mode information of the prediction units used to generate the residual block.
[0069] The quantization unit 135 can quantize the values converted to the frequency region by the conversion unit 130. The quantization coefficients can be changed according to the block or the importance of the image. The values calculated by the quantization unit 135 can be provided to the inverse quantization unit 140 and the re-quantization unit 160.
[0070] The reorganization unit 160 can reorganize the coefficient values of the quantified residual values.
[0071] The reorganization unit 160 can convert two-dimensional block shape coefficients into one-dimensional vector shapes using a coefficient scanning method. For example, in the reorganization unit 160, a zig-zag scan method can be used to scan from DC coefficients to high-frequency domain coefficients to convert them into one-dimensional vector shapes. Depending on the size of the conversion unit and the intra-frame prediction mode, a vertical scan that scans the two-dimensional block shape coefficients along the column direction or a horizontal scan that scans the two-dimensional block shape coefficients along the row direction can be used instead of a zig-zag scan. That is, the scanning method used—zig-zag scan, vertical scan, or horizontal scan—can be determined based on the size of the conversion unit and the intra-frame prediction mode.
[0072] The entropy coding unit 165 can perform entropy coding based on the value calculated by the rearrangement unit 160. Entropy coding can use various coding methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding).
[0073] The entropy coding unit 165 can encode various information from the reorganization unit 160 and the prediction units 120 and 125, including residual coefficient information of the coding unit, block type information, prediction mode information, segmentation unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information.
[0074] In the entropy coding unit 165, the coefficient values of the coding units input from the rearrangement unit 160 can be entropy encoded.
[0075] In the dequantization unit 140 and the deconversion unit 145, the value quantized by the quantization unit 135 is dequantized, and the value converted by the conversion unit 130 is deconverted. The residual value generated by the dequantization unit 140 and the deconversion unit 145 can be combined with the prediction unit predicted by the motion estimation unit, motion compensation unit and intra-frame prediction unit included in the prediction units 120 and 125 to generate a reconstructed block.
[0076] The filtering unit 150 may include at least one of a deblocking filter, an offset correction unit, and an ALF (Adaptive Loop Filter).
[0077] Deblocking filters remove block distortion caused by block boundaries in reconstructed images. To determine whether to perform deblocking, the number of columns or rows containing the pixels in the block can be used to decide whether to apply a deblocking filter to the current block. If a deblocking filter is applied, a strong or weak filter can be used depending on the required deblocking intensity. Furthermore, when applying a deblocking filter, horizontal and vertical filtering can be processed in parallel during vertical and horizontal filtering.
[0078] The offset correction unit can correct the offset between the deblocked image and the original image on a pixel-by-pixel basis. To perform offset correction on a specific image, one can use a method that divides the pixels contained in the image into a certain number of regions, determines the regions to be offset, and applies the offset to the corresponding regions, or consider the edge information of each pixel to apply the offset.
[0079] ALF (Adaptive Loop Filtering) can be performed based on the values obtained by comparing the filtered reconstructed image with the original image. The pixels contained in the image can be divided into defined groups, and a filter can be determined for each group, thus performing differentiated filtering according to each group. Information regarding the applicability of ALF can be transmitted according to the luminance signal in the coding unit (CU). The pattern and filter coefficients of the ALF filter to be applied to each block can be different. Furthermore, ALF filters of the same form (fixed form) can be applied regardless of the characteristics of the target block.
[0080] The storage unit 155 can store the reconstructed blocks or images calculated by the filtering unit 150, and the stored reconstructed blocks or images can be provided to the prediction units 120 and 125 when performing inter-frame prediction.
[0081] Figure 2This is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
[0082] Reference Figure 2 The image decoder 200 may include an entropy decoding unit 210, a reorganization unit 215, an inverse quantization unit 220, an inverse conversion unit 225, a prediction unit 230, 235, a filtering unit 240, and a storage unit 245.
[0083] When an image bitstream is input into an image encoder, the input bitstream can be decoded by following the reverse steps of the image encoder.
[0084] The entropy decoding unit 210 can perform entropy decoding in the reverse order of the entropy encoding steps performed in the entropy encoding unit of the image encoder. For example, corresponding to the method performed in the image encoder, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) can be applied.
[0085] The entropy decoding unit 210 can decode information related to intra-frame prediction and inter-frame prediction performed in the encoder.
[0086] The reorganization unit 215 can reorganize the bitstream that has undergone entropy decoding in the entropy decoding unit 210 based on the reorganization method in the encoding unit. The reorganization can reconstruct coefficients in a two-dimensional block form from coefficients represented in a one-dimensional vector form. In the reorganization unit 215, reorganization can be performed by receiving information related to the coefficient scan performed in the encoding unit and scanning in the reverse direction based on the scan order performed in the corresponding encoding unit.
[0087] The dequantization unit 220 can perform dequantization based on the quantization parameters provided in the encoder and the coefficient values of the reorganized block.
[0088] The inverse conversion unit 225 can perform inverse conversions (i.e., inverse DCT, inverse DST, and inverse KLT) on the quantization results performed in the image encoder, which are the opposite of the conversions performed in the conversion unit. The inverse conversion can be performed based on the transmission unit determined in the image encoder. In the inverse conversion unit 225 of the image decoder, conversion methods (e.g., DCT, DST, KLT) can be selectively performed according to multiple pieces of information, such as the prediction method, the size of the current block, and the prediction direction.
[0089] Prediction units 230 and 235 can generate prediction blocks based on prediction block generation information provided in entropy decoding unit 210 and previously decoded block or image information provided in storage unit 245.
[0090] As previously described, similar to the actions in the image encoder, when the size of the prediction unit and the size of the transformation unit are the same during intra-frame prediction, intra-frame prediction is performed based on pixels to the left of the prediction unit, pixels at the upper left, and pixels at the top. However, when the size of the prediction unit and the size of the transformation unit are different during intra-frame prediction, intra-frame prediction is performed using reference pixels based on the transformation unit. Furthermore, intra-frame prediction using NxN segmentation can be used only for the smallest coding unit.
[0091] Prediction units 230 and 235 may include a prediction unit discrimination unit, an inter-frame prediction unit, and an intra-frame prediction unit. The prediction unit discrimination unit may receive input from the entropy decoding unit 210, including prediction unit information, prediction mode information of the intra-frame prediction method, and motion prediction-related information of the inter-frame prediction method, etc., and distinguishes prediction units from the current coding unit to determine whether the prediction unit should perform inter-frame prediction or intra-frame prediction. The inter-frame prediction unit 230 may utilize the information required for inter-frame prediction of the current prediction unit provided in the image encoder, and perform inter-frame prediction for the current prediction unit based on information contained in at least one of the previous or next images of the current image containing the current prediction unit. Alternatively, it may perform inter-frame prediction based on information from a reconstructed portion of the current image containing the current prediction unit.
[0092] To perform inter-frame prediction, it is possible to determine, based on the coding unit, which of the following methods the motion prediction method for the prediction unit contained in the corresponding coding unit is: Skip Mode, Merge Mode, AMVP Mode, or Intra-Block Copy Mode.
[0093] The intra-prediction unit 235 can generate prediction blocks based on pixel information within the current image. When the prediction unit is one that has performed intra-prediction, intra-prediction can be performed based on the intra-prediction mode information of the prediction unit provided in the image encoder. The intra-prediction unit 235 may include an AIS (Adaptive Intra Smoothing) filter, a reference image interpolation unit, and a DC filter. The AIS filter is the part that performs filtering on the reference pixels of the current block, and whether to apply the filter can be determined based on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixels of the current block using the prediction mode of the prediction unit provided in the image encoder and the AIS filter information. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[0094] When the prediction unit's prediction mode is to perform intra-frame prediction based on the pixel value interpolated from the reference pixel, the reference pixel can be interpolated to generate a reference pixel with a pixel unit smaller than an integer value. When the prediction unit's prediction mode is to generate a prediction block without interpolating the reference pixel, the reference pixel can be left uninterpolated. When the prediction mode of the current block is DC mode, the DC filter can generate a prediction block through filtering.
[0095] The reconstructed blocks or images can be provided to the filtering unit 240. The filtering unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
[0096] The image encoder can receive information regarding whether a deblocking filter is applied to a corresponding block or image, and if so, whether a strong or weak filter is applied. The image decoder's deblocking filter can receive deblocking filter-related information provided by the image encoder and perform deblocking filtering on the corresponding block within the image decoder.
[0097] The offset correction unit can perform offset correction on the reconstructed image based on the type of offset correction applicable to the image during encoding and offset value information.
[0098] ALF can be applied to the encoding unit based on ALF applicability information and ALF coefficient information provided by the encoder. This ALF information can be provided within a specific set of parameters.
[0099] The storage unit 245 can store reconstructed images or blocks so that they can be used as reference images or reference blocks, and can also provide the reconstructed images to the output unit.
[0100] As described above, in the embodiments of the present invention, for ease of explanation, the term "coding unit" will be used as the unit of encoding, but it can also refer to a unit that performs decoding in addition to encoding.
[0101] Furthermore, the current block represents an encoding / decoding object block, which can be represented as a coding tree block (or coding tree unit), coding block (or coding unit), conversion block (or conversion unit), or prediction block (or prediction unit), depending on the encoding / decoding steps.
[0102] An image can be divided into square or non-square basic blocks for encoding / decoding. These basic blocks are called coding tree units (CMUs). A CMU can be defined as the largest allowed coding unit within a sequence or slice. Information related to whether a CMU is square or non-square, or its size, can be signaled using sequence parameter sets, image parameter sets, or slice headers. A CMU can be further divided into smaller partitions. For example, if a partition created by dividing a CMU has a depth of 1, then that partition can be defined as having a depth of 2. That is, a partition created by dividing a CMU into partitions of depth k can be defined as having a depth of k+1.
[0103] A coding unit can be defined as a partition of any size generated by splitting the coding tree units. A coding unit can be recursively split, or it can be divided into basic units for performing prediction, quantization, conversion, or in-loop filtering. For example, a partition of any size generated by splitting the coding units can be defined as a coding unit, or as a basic unit for performing prediction, quantization, conversion, or in-loop filtering, i.e., a conversion unit or a prediction unit.
[0104] The partitioning of a coding tree unit or coding unit can be performed based on at least one vertical line or horizontal line. Furthermore, the number of vertical or horizontal lines used to partition the coding tree unit or coding unit can be at least one. For example, a coding tree unit or coding unit can be divided into two partitions using one vertical line or one horizontal line, or into three partitions using two vertical lines or two horizontal lines. Alternatively, a coding tree unit or coding unit can be divided into four partitions with a length and a width of 1 / 2 using one vertical line and one horizontal line.
[0105] When a coding tree unit or coding unit is divided into multiple partitions using at least one vertical line or at least one horizontal line, the partitions can have uniform or different sizes. Alternatively, any partition can have a different size than the remaining partitions.
[0106] In the embodiments described later, it is assumed that the coding tree unit or coding unit is divided into a quadtree, ternary tree, or binary tree structure. However, it is also possible to divide the coding tree unit or coding unit using a greater number of vertical lines or a greater number of horizontal lines.
[0107] Figure 3 To illustrate an embodiment of the present invention, an example of hierarchical segmentation of coded blocks based on a tree structure is shown.
[0108] The input image signal is decoded into defined block units; these basic units used for decoding the input image signal are called coded blocks. Coded blocks can serve as units for performing intra / inter-frame prediction, conversion, and quantization. Furthermore, the prediction mode (e.g., intra-frame prediction mode or inter-frame prediction mode) is determined by the coded block unit, and the prediction blocks contained within a coded block can share the determined prediction mode. Coded blocks can be square or non-square blocks of any size within the range of 8x8 to 64x64, and can be square or non-square blocks of sizes of 128x128, 256x256, or higher.
[0109] Specifically, the coded block can be hierarchically segmented based on at least one of a quad tree, a triple tree, and a binary tree. Quad tree-based segmentation can refer to dividing a 2Nx2N coded block into four NxN coded blocks; triple tree-based segmentation can refer to dividing a coded block into three coded blocks; and binary tree-based segmentation can refer to dividing a coded block into two coded blocks. Even after performing triple tree-based or binary tree-based segmentation, square coded blocks can exist at the lower-level depth. Alternatively, after performing triple tree-based or binary tree-based segmentation, the generation of square coded blocks can be restricted at the lower-level depth.
[0110] Binary tree-based partitioning can be performed symmetrically or asymmetrically. The encoded blocks resulting from binary tree partitioning can be square blocks or non-square blocks such as rectangles. As an example, the partitioning patterns allowed based on binary tree partitioning include... Figure 4As shown, it may include at least one of the following: symmetric 2NxN (horizontal non-square coding unit) or Nx2N (vertical non-square coding unit), and asymmetric nLx2N, nRx2N, 2NxnU or 2NxnD.
[0111] Based on binary tree partitioning, either symmetrical or asymmetrical partitioning can be restricted. In this case, constructing the coding tree unit as a square block is equivalent to quadtree CU partitioning, and constructing the coding tree unit as a symmetrical non-square block is equivalent to binary tree partitioning. Constructing the coding tree unit as both square blocks and symmetrical non-square blocks is equivalent to quadtree and binary tree CU partitioning, respectively.
[0112] Binary tree-based partitioning can be performed on coded blocks for which quadtree-based partitioning is no longer required. For coded blocks partitioned from binary trees, it can be configured to not perform at least one of quadtree-based, ternary tree-based, or binary tree-based partitioning.
[0113] Alternatively, for coded blocks segmented based on a binary tree, while allowing segmentation based on a ternary tree or a binary tree, it is possible to restrict the segmentation to either the horizontal or vertical direction.
[0114] For example, the further segmentation or direction of a binary tree-based coded block can be restricted based on its position, index, shape, and the further segmentation of adjacent partitions. As an example, when the index of the coded block that appears earlier in the binary tree segmentation is set to 0 (hereinafter referred to as coded block index 0), and the index of the coded block that appears later in the binary tree segmentation is set to 1 (hereinafter referred to as coded block index 1), if binary tree segmentation is applied to both coded blocks with index 0 and index 1, the binary tree segmentation direction of the coded block with index 1 can be determined based on the binary tree segmentation direction of the coded block with index 0. Specifically, if the binary tree segmentation direction of the coded block with index 0 is to divide it into square partitions, the binary tree segmentation of the coded block with index 1 can be restricted to have a different direction than the binary tree segmentation of the coded block with index 1. That is, it is permissible to restrict the coding blocks at both index 0 and index 1 to be divided into square partitions. In this case, the encoding / decoding of the binary tree partitioning direction information for the coding block at index 1 can be omitted. This is because dividing the coding blocks at both index 0 and index 1 into square partitions produces the same effect as partitioning the higher-level depth block based on a quadtree, and allowing the coding blocks at both index 0 and index 1 to be divided into square partitions is not preferred in terms of coding efficiency.
[0115] Ternary tree-based partitioning represents dividing the coded block into three partitions along a horizontal or vertical direction. The three partitions generated by ternary tree-based partitioning can all have different sizes. Alternatively, two partitions can be of the same size, and the remaining partition can have a different size. For example, the width-to-height ratio of the partitions generated by partitioning the coded block can be set along the partitioning direction as 1:n:1, 1:1:n, n:1:1, or m:n:1. Here, m and n are real numbers of 1 or greater than 1, such as integers like 2.
[0116] Ternary tree-based partitioning can be performed on code blocks for which quadtree-based partitioning is no longer required. For code blocks partitioned based on a ternary tree, it can be set to not perform at least one of quadtree-based partitioning, ternary tree-based partitioning, or binary tree-based partitioning.
[0117] Alternatively, for coded blocks segmented based on a ternary tree, segmentation based on a ternary tree or a binary tree is permitted, while restricting segmentation to either horizontal or vertical directions.
[0118] For example, based on the position, index, shape, size, and further segmentation patterns of adjacent partitions in the coded block segmented from the ternary tree, further segmentation or the direction of further segmentation can be restricted. As an example, for the largest partition in the coded block generated by ternary tree segmentation, either horizontal or vertical segmentation can be restricted. Specifically, for the largest partition in the coded block generated by ternary tree segmentation, binary tree segmentation or ternary tree segmentation in the same direction as the ternary tree segmentation direction of the higher-level depth partition can be disallowed. In this case, the encoding / decoding of information indicating the binary or ternary tree segmentation direction can be omitted for the largest partition in the coded block segmented from the ternary tree.
[0119] The size or shape of the current block can be used to restrict binary tree-based or ternary tree-based segmentation. The size of the current block can be represented by at least one of the following: the current block's width, height, minimum / maximum width / height, sum of width and height, product of width and height, or the number of samples contained in the current block. For example, if at least one of the current block's width or height is greater than a predefined value, binary tree-based or ternary tree-based segmentation may be disallowed. The predefined value can be an integer such as 16, 32, 64, or 128. As another example, if the ratio of the current block's width to height is greater than or less than a predefined value, binary tree-based or ternary tree-based segmentation may be disallowed. With a predefined value of 1, binary tree-based or ternary tree-based segmentation may be allowed only if the current block is a square block with the same width and height.
[0120] The segmentation at a lower depth can be determined by the segmentation pattern of the higher depth. For example, if two or more depths allow binary tree-based segmentation, then only binary tree-based segmentation with the same pattern as the binary tree segmentation at the higher depth is allowed at the lower depth. For instance, if binary tree-based segmentation of the higher depth in a 2NxN pattern is performed, binary tree-based segmentation of the same 2NxN pattern can also be performed at the lower depth. Alternatively, if binary tree-based segmentation of the higher depth in an Nx2N pattern is performed, binary tree-based segmentation of the same Nx2N pattern can also be allowed at the lower depth.
[0121] Conversely, at lower depths, only binary-based segmentations with morphologies different from those at higher depths are permitted.
[0122] For sequences, stripes, coding tree units, or coding units, they can be restricted to using only specific types of binary tree-based partitioning or specific types of ternary tree-based partitioning. For example, coding tree units can be restricted to allowing only 2NxN or Nx2N binary tree-based partitioning. The allowed partitioning patterns can be predefined in the encoder or decoder, or information related to the allowed or disallowed partitioning patterns can be encoded and transmitted via signaling through the bitstream.
[0123] Figure 5 A diagram illustrating an example of binary tree-based partitioning that allows only specific forms of partitioning. Figure 5 (a) represents an example of binary tree-based partitioning that is restricted to only Nx2N form. Figure 5 (b) represents an example of binary tree-based segmentation that is restricted to only allowing 2NxN segments. To achieve adaptive segmentation based on the quadtree or binary tree described above, information indicating quadtree-based segmentation, information related to the size / depth of the coded blocks that allow quadtree-based segmentation, information indicating binary tree-based segmentation, information related to the size / depth of the coded blocks that allow binary tree-based segmentation, information related to the size / depth of the coded blocks that do not allow binary tree-based segmentation, or information related to whether the binary tree-based segmentation is vertical or horizontal, etc.
[0124] Furthermore, for a coding tree unit or a specified coding unit, the number of allowed binary / ternary tree splits, the depth of allowed binary / ternary tree splits, or the number of allowed binary / ternary tree split depths can be obtained. This information can be encoded into coding tree units or coding unit units and transmitted to the decoder via bitstream.
[0125] As an example, the syntax 'max_binary_depth_idx_minus1', representing the maximum allowed depth of a binary tree split via a bitstream, can be encoded / decoded via the bitstream. In this case, max_binary_depth_idx_minus1+1 can refer to the maximum allowed depth of a binary tree split.
[0126] observe Figure 6 The examples shown demonstrate that, Figure 6In the bitstream, binary tree splits are performed on coding units of depth 2 and depth 3. Therefore, at least one of the following information—indicating the number of times a binary tree split was performed within a coding unit (twice), the maximum depth of allowed binary tree splits within a coding unit (depth 3), or the number of depths of allowed binary tree splits within a coding unit (two, depth 2 and depth 3)—can be encoded / decoded.
[0127] As another example, at least one of the following—the number of allowed binary / ternary tree splits, the depth of allowed binary / ternary tree splits, or the number of allowed binary / ternary tree split depths—can be obtained as a sequence, image, or stripe. As an example, this information can be encoded into a sequence, image, or stripe unit and transmitted via a bitstream. Alternatively, the depth of allowed binary / ternary tree splits or the number of allowed binary / ternary tree split depths can be predefined as a sequence, image, or stripe. Thus, at least one of the following—the number of binary / ternary tree splits, the maximum depth of allowed binary / ternary tree splits, or the number of allowed binary / ternary tree split depths—can differ between the first and second stripes. As an example, in the first stripe, binary tree splits are allowed at only one depth, while in the second stripe, binary tree splits are allowed at two depths.
[0128] As another example, at least one of the allowed number of binary / ternary tree splits, the allowed depth of binary / ternary tree splits, or the allowed number of depths of binary / ternary tree splits can be set to be different based on the temporal ID of the strip or image. The temporal ID is used to identify each of multiple layers of an image that possesses at least one scalability in terms of viewpoint, spatiality, temporality, or quality.
[0129] like Figure 3 As shown, the first coded block 300 with a split depth of k can be divided into multiple second coded blocks based on a quadtree. For example, the second coded blocks 310-340 can be square blocks with half the width and height of the first coded block, and the split depth of the second coded blocks is increased to k+1.
[0130] The second coding block 310 with a segmentation depth of k+1 can be segmented into multiple third coding blocks with a segmentation depth of k+2. The segmentation of the second coding block 310 can be selectively performed using either a quadtree or a binary tree, depending on the segmentation method. The segmentation method can be determined based on at least one of information indicating quadtree-based segmentation or information indicating binary tree-based segmentation.
[0131] When the second coding block 310 is partitioned based on a quadtree, it can be divided into four third coding blocks 310a, each half the width and height of the second coding block, and the partitioning depth of the third coding blocks 310a increases to k+2. Conversely, when the second coding block 310 is partitioned based on a binary tree, it can be divided into two third coding blocks. In this case, the two third coding blocks are non-square blocks, each half the width and height of the second coding block, and the partitioning depth increases to k+2. The second coding block can be determined as a horizontal or vertical non-square block based on the partitioning direction, which can be determined based on information related to whether the partitioning based on the binary tree is vertical or horizontal.
[0132] On the other hand, the second coding block 310 can be determined to be an end coding block that is no longer based on quadtree or binary tree segmentation. In this case, the corresponding coding block can be used as a prediction block or a transformation block.
[0133] The third coding block 310a can be determined as an end coding block in the same way as the segmentation of the second coding block 310, or it can be further segmented based on a quadtree or a binary tree.
[0134] On the other hand, the third coding block 310b, segmented based on the binary tree, can be further segmented into vertical coding blocks 310b-2 or horizontal coding blocks 310b-3, with the segmentation depth of the corresponding coding blocks increasing to k+3. Alternatively, the third coding block 310b can be determined as the terminal coding block 310b-1, which is no longer segmented based on the binary tree. In this case, the corresponding coding block 310b-1 can be used as a prediction block or a transformation block. The above segmentation process can be performed restrictively based on at least one of the following: information related to the size / depth of coding blocks that allow quadtree-based segmentation, information related to the size / depth of coding blocks that allow binary tree-based segmentation, or information related to the size / depth of coding blocks that do not allow binary tree-based segmentation.
[0135] The size of a coded block can be limited to a specified number, or the size of a coded block within a specified unit can have a fixed value. For example, the size of a coded block within a sequence or image can be limited to 256x256, 128x128, or 32x32. Information indicating the size of the coded blocks within a sequence or image can be sent via signals through the sequence header or image header.
[0136] Based on the results of quadtree, binary tree, and ternary tree segmentation, the coding unit can be a square or a rectangle of any size.
[0137] Encoding / decoding of a coded block can be performed using at least one of skip mode, in-frame prediction, inter-frame prediction, or skip method.
[0138] As another example, intra-frame prediction or inter-frame prediction can be performed in units of the same or smaller size as the coded block by partitioning the coded block. To this end, when the coded block is determined, the prediction block can be determined by the prediction partitioning of the coded block. The prediction partitioning of the coded block can be performed using a partition mode (Part_mode) that represents the partitioning pattern of the coded block. The size or shape of the prediction block can be determined according to the partition mode of the coded block. For example, the size of the prediction block determined by the partition mode can have the same or smaller value as the size of the coded block.
[0139] Figure 7 This is a diagram representing the partitioning patterns applicable to a coding block when encoding a coding block using inter-picture prediction.
[0140] When encoding blocks through inter-frame prediction, such as Figure 7 As shown in the example, any of the eight partitioning modes can be applied to the encoded block.
[0141] When encoding blocks by in-frame prediction, the partitioning mode PART_2Nx2N or PART_NxN can be applied to the encoding blocks.
[0142] PART_NxN can be applied when the encoded block has a minimum size. This minimum size can be predefined in the encoder and decoder. Alternatively, information related to the minimum size of the encoded block can be sent via a bitstream signal. For example, the minimum size of the encoded block can be sent via a stripe header signal; therefore, the minimum size of the encoded block can be defined for each stripe.
[0143] Generally, the size of the prediction block can range from 64x64 to 4x4. However, when encoding the coded block by inter-frame prediction, the prediction block may not be 4x4 in order to reduce memory bandwidth when motion compensation is performed.
[0144] Figure 8 For the purpose of applying an embodiment of the present invention, the types of intra-frame prediction modes predefined in the image encoder / decoder are represented.
[0145] The image encoder / decoder can perform intra-prediction using any of the predefined intra-prediction modes. The predefined intra-prediction modes used for intra-prediction can consist of non-directional prediction modes (e.g., planar mode, DC mode) and 33 directional prediction modes.
[0146] Alternatively, to improve the accuracy of intra-frame prediction, a greater number of directional prediction modes than 33 can be used. That is, the angles of the directional prediction modes can be further subdivided to define M extended directional prediction modes (M>33), and a directional prediction mode with a specified angle can be derived using at least one of the predefined 33 directional prediction modes.
[0147] Specifically, quantity ratios can be used Figure 8 The 35 intra-prediction modes shown represent more intra-prediction modes than previously thought. This allows for the utilization of a larger number of intra-prediction modes compared to other modes. Figure 8 The 35 intra-prediction modes shown are further intra-prediction modes, which are called extended intra-prediction modes.
[0148] Figure 9 As an example of an extended intra-prediction mode, it can consist of two non-directional prediction modes and 65 extended directional prediction modes. Extended intra-prediction modes can be used equally in the luma and chroma components, or the number of intra-prediction modes can be different for each component. For example, 67 extended intra-prediction modes can be used in the luma component, and 35 intra-prediction modes can be used in the chroma component.
[0149] Alternatively, intra-prediction can be performed using a different number of intra-prediction modes depending on the chroma format. For example, in the 4:2:0 format, 67 intra-prediction modes can be used in the luma component and 35 in the chroma component. In the 4:4:4 format, both the luma and chroma components use 67 intra-prediction modes.
[0150] Alternatively, intra-prediction can be performed using different numbers of intra-prediction modes depending on the block size and / or shape. That is, intra-prediction can be performed using 35 or 67 intra-prediction modes depending on the size and / or shape of the PU or CU. For example, if the CU or PU size is less than 64x64 or is an asymmetric partition, 35 intra-prediction modes can be used; if the CU or PU size is equal to or greater than 64x64, 67 intra-prediction modes can be used. Intra_2Nx2N allows 65 directional intra-prediction modes, while Intra_NxN allows only 35 directional intra-prediction modes.
[0151] The block size applicable to the extended intra-prediction mode can be set differently for each sequence, image, or stripe. For example, in the first stripe, the extended intra-prediction mode can be set to apply to blocks larger than 64x64 (e.g., CU or PU), and in the second stripe, it can be set to apply to blocks larger than 32x32. Information indicating the block size applicable to the extended intra-prediction mode can be signaled for each sequence, image, or stripe unit. For example, the information indicating the block size applicable to the extended intra-prediction mode can be defined as "log2_extended_intra_mode_size_minus4", which is the logarithm of the block size minus an integer 4. As an example, a value of 0 for log2_extended_intra_mode_size_minus4 indicates that the extended intra-prediction mode can be applied to blocks with a size of 16x16 or larger, and a value of 1 for log2_extended_intra_mode_size_minus4 indicates that the extended intra-prediction mode can be applied to blocks with a size of 32x32 or larger.
[0152] As described above, the number of intra-prediction modes can be determined by considering at least one of the color difference components, color difference format, block size, or shape. Not limited to the above examples, the number of intra-prediction mode candidates (e.g., the number of MPMs) used to determine the intra-prediction mode for the encoded / decoded object block can also be determined based on at least one of the color difference components, color difference format, block size, or shape. Furthermore, it is also possible to utilize... Figure 8 The number of intra-frame prediction modes shown is much larger. For example, it can be further subdivided. Figure 8The directional prediction mode shown uses 129 directional prediction modes and 2 non-directional prediction modes. As in the example above, at least one of the following can be considered to determine whether to use a more specific prediction mode: color difference component, color difference component, block size, or shape. Figure 8 The number of intra-frame prediction modes shown is greater.
[0153] Referring to the accompanying figures described below, a method for determining the intra-prediction mode of an encoded / decoded object block, and a method for performing intra-prediction using the determined intra-prediction mode, are described.
[0154] Figure 10 For the purpose of applying an embodiment of the present invention, a flowchart of an intra-frame prediction method is briefly shown.
[0155] Reference Figure 10 This can determine the intra-prediction mode of the current block (S1000).
[0156] Specifically, the intra-prediction mode of the current block can be derived based on a candidate list and an index. The candidate list can include multiple candidates, which can be determined based on the intra-prediction modes of neighboring blocks adjacent to the current block. Neighboring blocks can include at least one block located above, below, to the left, to the right, or in a corner of the current block. The index can specify any one of the multiple candidates belonging to the candidate list. The candidate specified by the index can be set as the intra-prediction mode of the current block.
[0157] The intra-prediction modes used for intra-prediction of surrounding blocks can be set as candidates. For example, candidates can be derived based on the intra-prediction modes of the current block's left block, top block, lower left corner neighbor block, upper right corner neighbor block, and upper left corner neighbor block. If surrounding blocks are encoded using intra-prediction, candidates for the current block can be derived using the intra-prediction modes of the collocated blocks of the surrounding blocks.
[0158] Furthermore, intra-prediction modes with similar directionality to the intra-prediction modes of surrounding blocks can be designated as candidates. The intra-prediction mode with similar directionality can be determined by adding or subtracting a predetermined constant value from the intra-prediction modes of surrounding blocks. The predetermined constant value can be an integer of 1, 2, or higher, and can be adaptively determined based on the number of available intra-prediction modes. For example, if there are 35 available intra-prediction modes, the predetermined constant value can be set to 1; if there are 67 available intra-prediction modes, the predetermined constant value can be set to 2; and if there are 131 available intra-prediction modes, the predetermined constant value can be set to 4.
[0159] The candidate list may also include a default mode. The default mode may include at least one of the following: planar mode, DC mode, vertical mode, horizontal mode, top-right diagonal mode, and top-left diagonal mode. The maximum number of candidates that the current block's candidate list can contain can be considered to adaptively add default modes.
[0160] The maximum number of candidates that the candidate list can contain can be 3, 4, 5, 6, 7, or more. This maximum number of candidates can be a fixed value preset in the image encoder / decoder, or it can be variably determined based on the attributes of the current block. Attributes can represent the block's position / size / shape, the number / type of intra-prediction modes that the block can use, chromatic aberration attributes, chromatic aberration format, etc. Alternatively, information indicating the maximum number of candidates that the candidate list can contain can be separately transmitted via a signal, and this information can be used to variably determine the maximum number of candidates that the candidate list can contain. The information indicating the maximum number of candidates can be transmitted via a signal at at least the sequence level, picture level, strip level, or block level.
[0161] Candidates included in the candidate list can be sorted in a predefined order. For example, candidates can be arranged in the candidate list in the order of left block, top block, bottom left block, top right block, and top left block. Alternatively, the order of candidates can be variably determined based on the size or shape of the current block. For example, if the current block is a non-square block with a height greater than its width, the intra-prediction mode of the top block can be arranged with higher priority than the intra-prediction mode of the left block.
[0162] When selectively using extended intra-prediction modes and 35 predefined intra-prediction modes, the intra-prediction modes of peripheral blocks can be converted into indices corresponding to either the extended intra-prediction modes or the 35 intra-prediction modes to derive candidates. To convert the indices, either a predefined table or a scaling operation based on specified values can be used. The predefined table can define the mapping relationships between different groups of intra-prediction modes (e.g., extended intra-prediction modes and 35 intra-prediction modes).
[0163] For example, if 35 intra-prediction modes are used in the left peripheral block, and the intra-prediction mode of the left peripheral block is 10 (horizontal mode), it can be converted to index 16 corresponding to the horizontal mode in the extended intra-prediction mode.
[0164] Alternatively, if the extended intra-prediction mode is used in the upper peripheral block and the intra-prediction mode index of the upper peripheral block is 50 (vertical mode), it can be converted from 35 intra-prediction modes to index 26 corresponding to the vertical mode.
[0165] Based on the above intra-prediction mode determination method, the intra-prediction mode can be derived independently for each of the luminance and chrominance components, and the chrominance component can be derived based on the intra-prediction mode of the luminance component.
[0166] Specifically, the intra-frame prediction mode for the chromatic difference component can be determined based on the intra-frame prediction mode for the luminance component, as shown in Table 1 below.
[0167] [Table 1]
[0168]
[0169] In Table 1, intra_chroma_pred_mode represents the information sent by the signal to specify the intra prediction mode of the chroma component, and IntraPredModeY represents the intra prediction mode of the luminance component.
[0170] When the candidate list is determined, information indicating whether a candidate with the same intra-prediction mode as the current block is included in the candidate list can be decoded. If the information indicates that a candidate with the same intra-prediction mode as the current block is included in the candidate list, the index information indicating any of the candidates (e.g., MPM_index) can be decoded. The intra-prediction mode of the current block can be set to be the same as the intra-prediction mode of the candidate indicated by the aforementioned index information.
[0171] Conversely, if the aforementioned information indicates that a candidate with the same intra-prediction mode as the current block is not included in the candidate list, the residual intra-prediction mode information (e.g., rem_intra_mode) can be decoded from any of the residual intra-prediction modes other than the candidates. The intra-prediction mode of the current block can be determined based on the intra-prediction mode indicated by the aforementioned residual intra-prediction mode information. As an example, the intra-prediction mode indicated by the aforementioned residual intra-prediction mode can be compared with the candidates to determine the current intra-prediction mode. For example, if the intra-prediction mode of a candidate is less than the intra-prediction mode indicated by the residual intra-prediction mode, 1 can be added to the residual intra-prediction mode to derive the intra-prediction mode of the current block.
[0172] Reference Figure 10 Reference samples for intra-frame prediction of the current block can be derived (S1010).
[0173] Specifically, reference samples for intra-frame prediction can be derived based on the surrounding samples of the current block. The surrounding samples can represent the reconstructed samples of the surrounding blocks mentioned above, which can be the reconstructed samples before or after the application of the loop filter.
[0174] Peripheral samples reconstructed before the current block can be used as reference samples, as can peripheral samples filtered based on a specified intra-frame filter. Filtering peripheral samples using an intra-frame filter can be called reference sample smoothing. The aforementioned intra-frame filter can include at least one of a first intra-frame filter applied to multiple peripheral samples located on the same horizontal line or a second intra-frame filter applied to multiple peripheral samples located on the same vertical line. Either the first or second intra-frame filter can be selectively applied depending on the position of the peripheral samples, or both intra-frame filters can be used repeatedly. In this case, the filtering coefficients of at least one of the first or second intra-frame filters can be (1, 2, 1), but are not limited to this.
[0175] The filtering described above can be adaptively performed based on at least one of the intra-prediction mode of the current block or the size of the transformed block. For example, if the intra-prediction mode of the current block is DC mode, vertical mode, or horizontal mode, filtering may not be performed. If the size of the transformed block is N x M, filtering may not be performed. Here, N and M can be the same or different values, and can be any of 4, 8, 16, or higher. As an example, if the size of the transformed block is 4 x M, filtering may not be performed. Alternatively, filtering can be selectively performed based on a comparison between the difference between the intra-prediction mode and the vertical mode (or horizontal mode) of the current block and a predefined threshold. For example, filtering may be performed only if the difference between the intra-prediction mode and the vertical mode of the current block is greater than the threshold. As shown in Table 2, the threshold can be defined according to the size of the transformed block.
[0176] [Table 2]
[0177] 8x8 conversion 16x16 conversion 32x32 conversion threshold 7 1 0
[0178] The intra-frame filter described above can be determined as any one of a plurality of intra-frame filter candidates predefined in the image encoder / decoder. To do this, an additional index of the intra-frame filter for the current block can be specified among the plurality of intra-frame filter candidates by signal transmission. Alternatively, the intra-frame filter can be determined based on at least one of the following: the size / shape of the current block, the size / shape of the transformed block, information about the filter strength, or the variation of surrounding samples.
[0179] Intra-frame prediction for the current block can be performed using multiple reference sample lines. As an example, more than two reference sample lines can be used.
[0180] The decision to use multiple reference sample lines for intra-prediction can be adaptively determined based on factors such as the size, shape, or intra-prediction mode of the current block. For example, if the intra-prediction mode of the current block is a non-directional intra-prediction mode or a directional intra-prediction mode, the use of multiple reference sample lines for intra-prediction can be restricted. The directional direction can include vertical, horizontal, or diagonal directions.
[0181] Reference Figure 10 Intra-prediction can be performed using the intra-prediction mode of the current block and reference samples (S1020).
[0182] That is, the prediction sample for the current block can be obtained using the intra-prediction mode determined in S1000 and the reference sample derived in S1010. When performing intra-prediction using multiple reference sample lines, the prediction sample can be obtained based on a weighted average of reference samples belonging to different reference sample lines. For example, the prediction sample can be derived based on a weighted average of a first reference sample belonging to a first reference sample line and a second reference sample belonging to a second reference sample line. In this case, the weights applied to the first and second reference samples can either have the same value or have different values depending on their distance from the target sample. For example, a higher weight can be assigned to the reference sample that is closer to the target sample than the first or second reference sample.
[0183] However, for intra-frame prediction, since boundary samples from surrounding blocks are used, image quality degradation may occur in the predicted image. Therefore, a correction process for the predicted samples generated through the above prediction process can also be included, as detailed below. Figure 11 A detailed description will follow. However, it is obvious that the correction process described later is not only applicable to intra-frame predicted samples, but also to inter-frame predicted samples or reconstructed samples.
[0184] Figure 11 To illustrate an embodiment of the present invention, a method for correcting the predicted sample of the current block based on the differential information of surrounding samples is presented.
[0185] The predicted samples of the current block can be corrected based on the difference information of multiple surrounding samples relative to the current block. This correction can be performed on all predicted samples belonging to the current block, or only on predicted samples belonging to a specified region. This region can be a row / column or multiple rows / columns, or it can be a region pre-defined for correction in the image encoder / decoder. For example, correction can be performed on a row / column located at the boundary of the current block, or multiple rows / columns located at or near the boundary of the current block. Alternatively, the region can be variably determined based on at least one of the size / shape of the current block or the intra-frame prediction mode.
[0186] The surrounding samples can belong to at least one of the surrounding blocks located at the top, left, or top-left corner of the current block. The number of surrounding samples used for correction can be 2, 3, 4, or more. The positions of the surrounding samples can be variably determined based on the position of the predicted sample, which is the correction target within the current block. Alternatively, a portion of the surrounding samples can have fixed positions independent of the position of the predicted sample, which is the correction target, and the remaining portion can have variable positions based on the position of the predicted sample, which is the correction target.
[0187] The difference information of the surrounding samples can represent either the difference between the surrounding samples or the value obtained by scaling the aforementioned difference samples to a specified constant value (e.g., 1, 2, 3, etc.). The specified constant value can be determined by considering the position of the predicted sample as the correction target, the position of the predicted sample in the column or row to which it belongs, and the position of the predicted sample within the column or row.
[0188] For example, if the intra-frame prediction mode of the current block is vertical mode, the final prediction sample can be obtained by using the difference sample between the peripheral sample p(-1, y) adjacent to the left boundary of the current block and the peripheral sample p(-1, -1) at the top left, as shown in Equation 1 below.
[0189] [Mathematical Expression 1]
[0190] P'(0,y)=P(0,y)+((p(-1,y)-p(-1,-1))>>1 for y=0...N-1
[0191] For example, if the intra-frame prediction mode of the current block is horizontal mode, the final prediction sample can be obtained by using the difference sample between the surrounding sample p(x, -1) adjacent to the upper boundary of the current block and the surrounding sample p(-1, -1) at the upper left, as shown in Equation 2 below.
[0192] [Mathematical Expression 2]
[0193] P'(x,0)=p(x,0)+((p(x,-1)-p(-1,-1))>>1 for x=0...N-1
[0194] For example, if the intra-frame prediction mode of the current block is vertical, the final prediction sample can be obtained using the difference sample between the peripheral sample p(-1, y) adjacent to the left boundary of the current block and the peripheral sample p(-1, -1) at the top left. In this case, the difference sample can be added to the prediction sample, or it can be scaled to a specified constant value before being added to the prediction sample. The specified constant value used for scaling can be determined differently depending on the column and / or row. As an example, the prediction sample can be corrected as shown in Equations 3 and 4 below.
[0195] [Mathematical Expression 3]
[0196] P'(0,y)=P(0,y)+((p(-1,y)-p(-1,-1))>>1fory=0...N-1
[0197] [Mathematical Expression 4]
[0198] P'(1,y)=P(1,y)+((p(-1,y)-p(-1,-1))>>2 for y=0...N-1
[0199] For example, when the intra-frame prediction mode of the current block is horizontal, the final prediction sample can be obtained using the difference sample between the surrounding sample p(x, -1) adjacent to the upper boundary of the current block and the surrounding sample p(-1, -1) at the upper left, as described in the vertical mode. As an example, the prediction sample can be corrected as shown in Equations 5 and 6 below.
[0200] [Mathematical Expression 5]
[0201] P′(x,0)=p(x,0)+((p(x,-1)-p(-1,-1))>>1 for x=O...N-1
[0202] [Mathematical Expression 6]
[0203] P′(x,1)=p(x,1)+((p(x,-1)-p(-1,-1))>>2 for x=O...N-1
[0204] When the intra-prediction mode of the current block is directional prediction mode, intra-prediction of the current block can be performed based on the directionality of the directional prediction mode. As an example, Table 3 shows... Figure 8 The directional intra-prediction modes shown are the intra-prediction parameters (intraPredAng) of modes 2 to 34.
[0205] [Table 3]
[0206]
[0207] Table 3 illustrates 33 directional intra-prediction modes as an example, but more or fewer directional intra-prediction modes can also be defined.
[0208] The intra-frame direction parameters for the current block can be determined based on a lookup table that defines the mapping between directional intra-frame prediction modes and intra-frame direction parameters. Alternatively, the intra-frame direction parameters for the current block can be determined based on information transmitted via signals through a bitstream.
[0209] Intra-frame prediction for the current block can be performed using at least one of a left-side reference sample or a top-side reference sample, based on the directionality of the directional intra-frame prediction mode. The top-side reference sample can represent a reference sample with a y-axis coordinate smaller than the predicted object sample (x, 0) contained in the top row of the current block (e.g., from (-1, -1) to (2W-1, -1)), and the left-side reference sample can represent a reference sample with an x-axis coordinate smaller than the predicted object sample (0, y) contained in the leftmost column of the current block (e.g., from (-1, -1) to (-1, 2H-1)).
[0210] The reference samples for the current block can be arranged in a one-dimensional manner based on the directionality of the intra-prediction mode. Specifically, when the intra-prediction of the current block requires both the upper reference sample and the left reference sample, the reference samples for each predicted object sample are selected after assuming they are arranged in a column along the vertical or horizontal direction.
[0211] As an example, when the intra-frame direction parameter is negative (e.g., the intra-frame prediction modes corresponding to modes 11 to 25 in Table 3), the upper reference sample and the left reference sample can be rearranged along the horizontal or vertical direction to form a one-dimensional reference sample group (P_ref_1D).
[0212] Figure 12 as well as Figure 13 This represents a one-dimensional reference sample group formed by rearranging the reference samples into a column.
[0213] The directionality of the intra-prediction mode can be used to determine whether the reference samples are rearranged vertically or horizontally. For example, when the intra-prediction mode index is between 11 and 18, it can be done as follows: Figure 12As shown in the example, the upper reference sample of the current block is rotated counterclockwise to generate a one-dimensional reference sample group that arranges the left reference sample and the upper reference sample vertically.
[0214] Conversely, when the intra-frame prediction mode index is between 19 and 25, it can be as follows: Figure 13 As shown in the example, the left reference sample of the current plot is rotated clockwise to generate a one-dimensional reference sample group that arranges the left reference sample and the upper reference sample in the horizontal direction.
[0215] If the intra-direction parameter of the current block is not negative, intra-prediction for the current block can be performed using only the left or top reference samples. Therefore, for intra-prediction modes where the intra-direction parameter is not negative, a one-dimensional reference sample set can be generated using only the left or top reference samples.
[0216] Based on the intra-frame orientation parameters, a reference sample determination index iIdx can be derived to specify at least one reference sample used in the prediction of the target sample. Furthermore, based on the intra-frame orientation parameters, a weight-related parameter i can be derived to determine the weights applicable to each reference sample. fact As an example, the following mathematical expressions 7 and 8 illustrate how the reference sample determines the index and weight-related parameters.
[0217] [Mathematical Expression 7]
[0218] iIdx=(y+1)*(P ang / 32)
[0219] ifact = [(y+1)*P ang ]31
[0220] As shown in Equation 7, iIdx and i... can be variably determined based on the slope of the directional intra-prediction mode. fact At this point, the reference sample specified by iIdx can be equivalent to an integer pixel.
[0221] The index can be determined based on a reference sample, specifying at least one reference sample for each predicted object sample. For example, the index can be determined based on a reference sample, specifying the position of the reference sample within a one-dimensional reference sample group used to predict the predicted object samples within the current block. A predicted image (i.e., a predicted sample) can be generated for the predicted object samples based on the reference sample at the specified position.
[0222] When considering the intra-prediction mode of the current block, if the target sample can be predicted using only a reference sample, a predicted image for the target sample can be generated based on the reference sample specified by the intra-prediction mode of the current block.
[0223] As an example, if an imaginary angular line, representing the angle or slope of the intra-prediction mode, passes through an integer pixel (i.e., a reference sample at an integer position) within a one-dimensional reference sample group, then the reference sample at the integer pixel position can be copied, or the position between the reference sample at the integer pixel position and the target sample can be considered to generate a predicted image for the target sample. As an example, Equation 8 below represents an example of generating a predicted image P(x, y) for the target sample by copying the reference sample P_ref_1D(x+iIdx+1) within a one-dimensional reference sample group specified by the intra-prediction mode of the current block.
[0224] [Mathematical Expression 8]
[0225] P(x, y) = P_ref_1D(x + iIdx + 1)
[0226] When considering the intra-prediction mode of the current block, if it is determined that the target sample cannot be predicted using only one reference sample, multiple reference samples can be used to perform prediction for the target sample. Specifically, based on the intra-prediction mode of the current block, linear interpolation or tap-filter-based interpolation can be performed on the reference sample at a specified position and its adjacent neighboring reference samples to perform prediction for the target sample. The number of taps in the interpolation filter can be a natural number greater than 2. Specifically, depending on the number of reference samples used for interpolation, the number of taps in the tap filter can be 2, 3, 4, 5, 6, or an integer greater than or equal to these.
[0227] As an example, if an imaginary angular line, based on the angle or slope of the intra-prediction mode, does not pass through integer pixels (i.e., reference samples at integer positions) within a one-dimensional reference sample group, then interpolation can be performed on the reference samples located on that angular line and the reference samples adjacent to the aforementioned reference samples on the left / right or top / bottom to generate a predicted image for the predicted object sample. As an example, Equation 9 below represents an example of interpolating two or more reference samples to generate a predicted sample P(x, y) for the predicted object sample.
[0228] [Mathematical Expression 9]
[0229] P(x,y)(32-i) fact ) / 32*P_ref_1D(x+iIdx+1)+i fact / 32*P_ref_1D(x+ildx+2)
[0230] The coefficients of the interpolation filter can be based on the weight-related parameter i. fact The decision is made based on the distance between fractional pixels and integer pixels (i.e., the integer positions of each reference sample) located on the angular line.
[0231] The following mathematical formula 10 shows the case where the number of taps in the tap filter is 4.
[0232] [Mathematical Expression 10]
[0233] P(x,y)=f(0)*P_ref_1D(x+iIdx-1)+f(1)*P_ref_1D(x+iIdx)+f(2)*P_ref_1D(x+iIdx+1)+f(3)*P_ref_1D(x+iIdx+2)
[0234] When using a multi-tap filter, a sample at a position that is not equivalent to the left or top reference sample can be replaced with its nearest neighboring reference sample. For example, in Equation 9 above, when the sample at position P_ref_1D(x+iIdx-1) is not equivalent to the top reference sample, it can be replaced with the reference sample at position P_ref_1D(x+idx). Alternatively, when the sample at position P_ref_1D(x+iIdx+2) is not equivalent to the top reference sample, it can be replaced with the reference sample at position P_ref_1D(x+iIdx+1).
[0235] Multi-tap filters can be applied to multiple reference samples arranged in a column along a horizontal or vertical direction. Alternatively, multi-tap filters can be applied to defined polygonal shapes such as quadrilaterals. The shape of the applied multi-tap filter can be variably determined based on the size and shape of the current block or the intra-frame prediction mode.
[0236] As shown in mathematical formulas 8-10, the method of generating predicted samples by interpolating reference samples using the directionality of intra-frame prediction is called intra-frame prediction sample interpolation.
[0237] When using intra-frame prediction sample interpolation, a large number of taps does not necessarily guarantee improved prediction accuracy. For example, if the current block size is 2x16 (height or width significantly larger than another asymmetric coding unit) or 4x4 (smaller block size), using a tap filter with more than 4 taps may result in overly smoothed predicted images. Therefore, the type of tap filter can be adaptively determined based on the size, shape, or intra-frame prediction mode of the current block. The type of tap filter can be distinguished by at least one of the following: number of taps, filter coefficients, filter strength (strong / weak), and filter direction. The number of taps or filter coefficients can also be variably determined based on the filter strength. Furthermore, the applicable direction of the tap filter can be determined based on the type of tap filter, such as horizontal interpolation, vertical interpolation, or both horizontal and vertical interpolation. The applicable direction of the tap filter can be variably set in the current block's line units (rows or columns) or sample units.
[0238] Specifically, the type of tap filter to use can be determined based on the width or height of the current block. For example, if at least one of the width or height of the current block is less than a predefined value, a 2-tap filter can be used instead of a 4-tap filter to perform intra-frame predictive sample interpolation. Conversely, if both the width and height of the current block are greater than the predefined values, a 4-tap filter can be used to perform intra-frame predictive sample interpolation. The predefined values can be 4, 8, or 16, etc.
[0239] Alternatively, the type of tap filter to use can be determined based on whether the width and height of the current block are the same. For example, if the width and height of the current block are different, a 2-tap filter can be used instead of a 4-tap filter to perform intra-predictive sample interpolation. Conversely, if the width and height of the current block are the same, a 4-tap filter can be used to perform intra-predictive sample interpolation.
[0240] Alternatively, the type of tap filter to use can be determined based on the width-to-height ratio of the current block. For example, if the width (w) to height (h) ratio of the current block (i.e., w / h or h / w) is less than a predefined threshold, a 2-tap filter can be used instead of a 4-tap filter to perform intra-frame predictive sample interpolation. Conversely, if the width-to-height ratio of the current block is greater than the predefined threshold, a 4-tap filter can be used to perform intra-frame predictive sample interpolation.
[0241] Alternatively, the type of tap filter can be determined based on the intra-prediction mode, shape, or size of the current block. For example, if the current block is a 2x16 coding unit and its intra-prediction mode falls within the horizontal range, a tap filter with n taps can be used to perform intra-prediction sample interpolation. Conversely, if the current block is a 2x16 coding unit and its intra-prediction mode falls within the vertical range, a tap filter with m taps can be used to perform intra-prediction sample interpolation.
[0242] Conversely, when the current block is a 16x2 coding unit and the intra-prediction mode of the current block is an intra-prediction mode belonging to the horizontal direction, a tap filter with n taps can be used to perform intra-prediction sample interpolation. Conversely, when the current block is a 16x2 coding unit and the intra-prediction mode of the current block is an intra-prediction mode belonging to the vertical direction, a tap filter with m taps can be used to perform intra-prediction sample interpolation.
[0243] The horizontal range can represent a defined range of intra-prediction modes that include those in the horizontal direction, and the vertical range can represent a defined range of intra-prediction modes that include those in the vertical direction. For example, when based on 35 intra-prediction modes, the horizontal range can represent intra-prediction modes from mode 11 to mode 18, and the vertical range can represent intra-prediction modes from mode 19 to mode 27.
[0244] Furthermore, n and m are constants greater than 0, and n and m can have different values. Alternatively, n and m can be set to have the same value, while at least one of the filter coefficients or filter strengths of the n-tap filter and the m-tap filter can be set to be different.
[0245] When using directional prediction mode or DC mode, there is a concern about image quality degradation at block boundaries. Conversely, in planar mode, the advantage is that the image quality degradation at block boundaries is relatively less than in the aforementioned prediction modes.
[0246] After generating a first predicted image in the horizontal direction and a second predicted image in the vertical direction using reference samples, a weighted prediction is performed on the first and second predicted images to perform planar prediction.
[0247] The first predicted image can be generated based on reference samples adjacent to the current block in the horizontal direction of the predicted object sample. For example, the first predicted image can be generated based on a weighted average of the reference samples in the horizontal direction of the predicted object sample. The weights applied to each reference sample can be determined by considering factors such as the distance to the predicted object sample or the size of the current block. The samples in the horizontal direction can include a left reference sample (i.e., a left reference sample with the same y-coordinate as the predicted object sample) and a right reference sample (i.e., a right reference sample with the same y-coordinate as the predicted object sample) located on the same horizontal line as the predicted object sample. The right reference sample can be derived from the upper reference sample of the current block. For example, the right reference sample can be derived by copying the value of the upper reference sample located on the same vertical line, or by a weighted average or average of multiple upper reference samples. The upper reference sample located on the same vertical line as the right reference sample can include a reference sample adjacent to the upper right corner of the current block (i.e., an upper reference sample with the same x-coordinate as the right reference sample). Alternatively, the position of the upper reference sample used to derive the right-side reference sample can be determined differently based on the shape, size, or position of the current block or the predicted object sample.
[0248] The second predicted image can be generated based on reference samples adjacent to the current block in the vertical direction of the predicted object sample. For example, the second predicted image can be generated based on a weighted average of reference samples in the vertical direction of the predicted object sample. In this case, the weights applied to each reference sample can be determined considering factors such as the distance to the predicted object sample or the size of the current block. Samples located in the vertical direction can include upper reference samples (i.e., upper reference samples with the same x-coordinate as the predicted object sample) and lower reference samples (i.e., lower reference samples with the same x-coordinate as the predicted object sample) located on the same vertical line as the predicted object sample. The lower reference sample can be derived from the left reference sample of the current block. For example, the lower reference sample can be derived by copying the value of a left reference sample located on the same horizontal line, or by a weighted average or average of multiple left reference samples. The left reference sample located on the same horizontal line as the lower reference sample can include a reference sample adjacent to the lower left corner of the current block (i.e., a left reference sample with the same y-coordinate as the lower reference sample). Alternatively, the position of the upper reference sample used to derive the lower reference sample can be determined differently depending on the size, shape, or position of the current block or the predicted object sample.
[0249] Alternatively, the left-side reference sample and the upper-side reference sample can be used to derive at least one of the right-side reference sample or the lower-side reference sample.
[0250] As an example, the weighted average of the upper reference sample and the left reference sample of the current block can be determined as at least one value of the right reference sample or the lower reference sample.
[0251] Alternatively, after deriving the lower right reference sample adjacent to the lower right corner of the current block using the lower left and upper right reference samples, the right and lower reference samples can be derived using the derived lower right reference samples. The lower right reference sample can be derived based on a weighted average of the upper right and left reference samples of the current block. In this case, the weights applied to the upper right and left reference samples can either have the same value or be determined based on the width / height of the current block.
[0252] Once the lower right reference sample is determined, interpolation can be performed between the lower right reference sample and the upper right reference sample to derive the right reference sample. Similarly, interpolation can be performed between the lower right reference sample and the lower left reference sample to derive the lower reference sample. The coefficients of the interpolation filter can be determined based on factors such as the size of the current block, the shape of the current block, the distance from the lower right reference sample, the distance from the upper right reference sample, or the distance from the lower left reference sample.
[0253] To derive the right-side or left-side reference sample, a reference sample at a fixed position can be used, or a reference sample adaptively selected based on the position of the target sample can be used. For example, the right-side reference sample can be derived using the upper right-side reference sample regardless of the position of the target sample, or using a left-side reference sample (e.g., a reference sample with the same y-axis coordinate as the target sample) or an upper reference sample (e.g., a reference sample with the same x-axis coordinate as the target sample) selected based on the position of the target sample. Alternatively, the lower-side reference sample can be derived using the lower left-side reference sample regardless of the position of the target sample, or using a left-side reference sample (e.g., a reference sample with the same y-axis coordinate as the target sample) or an upper reference sample (e.g., a reference sample with the same x-axis coordinate as the target sample) selected based on the position of the target sample.
[0254] Figure 14 This is a diagram illustrating an example of deriving a right-hand reference sample or a bottom-hand reference sample using multiple reference samples. Assume the current block is a block of size W x H.
[0255] Referring to 14(a), firstly, the lower right reference sample P(W, H) can be generated based on the weighted average of the upper right reference sample P(W, -1) and the lower left reference sample P(-1, H) of the current block. In this case, the weights applied to the upper right reference sample and the left reference sample can be set to the same value, or determined based on the width (W) and height (H) of the current block. As an example, when the current block is not a square, the weight applied to the upper right reference sample can be determined as W / (W+H), and the weight applied to the lower left reference sample can be determined as H / (W+H).
[0256] Furthermore, a right-side reference sample P(W, y) for the object prediction sample (x, y) can be generated based on the right-side lower-end reference sample P(W, H) and the right-side upper-end reference sample P(W, -1). For example, the right-side prediction sample P(W, y) can be calculated as a weighted average of the right-side lower-end reference sample P(W, H) and the right-side upper-end reference sample P(W, -1). Additionally, a lower-end reference sample P(x, H) for the object prediction sample (x, y) can be generated based on the right-side lower-end reference sample P(W, H) and the left-side lower-end reference sample P(-1, H). For example, the lower-end reference sample P(x, H) can be calculated as a weighted average of the right-side lower-end reference sample P(W, H) and the left-side reference sample P(-1, H).
[0257] like Figure 14 As shown in (b), when generating the right-side reference sample and the lower-side reference sample, the generated reference samples can be used to generate the first prediction sample P for the prediction object sample. h (x, y) and the second predicted sample P v (x, y). At this point, the first predicted sample P h (x, y) can be generated based on a weighted average of the left reference sample P(-1, y) and the right reference sample P(W, y), and the second predicted sample P v (x, y) can be generated based on a weighted average of the upper reference sample P(x, -1) and the lower reference sample P(x, H).
[0258] Figure 15 as well as Figure 16 This diagram illustrates how a right-side reference sample and a lower-side reference sample are determined for a non-square block, according to an embodiment of the present invention.
[0259] like Figure 15 As shown in the example, in the case of a non-square block of size (N / 2)xN, the right reference sample can be derived based on the upper right reference sample P(N / 2, -1), and the lower left reference sample can be derived based on the lower left reference sample P(-1, N).
[0260] Alternatively, the right-side reference sample or the lower-side reference sample can be derived based on at least one of the weighted average, minimum, or maximum values of the upper-right reference sample P(N / 2, -1) and the lower-left reference sample P(-1, N). For example, after deriving the right-side reference sample based on the weighted average of P(N / 2, -1) and P(-1, N), or after deriving the lower-right reference sample P(N / 2, N) based on P(N / 2, -1) and P(-1, N), the lower-right reference sample and the upper-right reference sample can be interpolated to derive the right-side reference sample. Alternatively, after deriving the lower-side reference sample based on the weighted average of P(N / 2, -1) and P(-1, N), or after deriving the lower-right reference sample P(N / 2, N) based on P(N / 2, -1) and P(-1, N), the lower-right reference sample and the lower-left reference sample can be interpolated to derive the lower-side reference sample.
[0261] On the contrary, such as Figure 16 As shown in the example, in the case of a non-square block of size Nx(N / 2), the right reference sample can be derived based on the upper right reference sample P(N, -1), and the lower left reference sample can be derived based on the lower left reference sample P(-1, N / 2).
[0262] Alternatively, the right-side reference sample or the lower-side reference sample can be derived based on at least one of the weighted average, minimum, or maximum values of the upper-left reference sample P(N, -1) and the lower-left reference sample P(-1, N / 2). For example, after deriving the right-side reference sample based on the weighted average or average of P(N, -1) and P(-1, N / 2), or after deriving the lower-right reference sample P(N, N / 2) based on P(N, -1) and P(-1, N / 2), the lower-right reference sample and the upper-right reference sample can be interpolated to derive the right-side reference sample. Alternatively, after deriving the lower-side reference sample based on the weighted average or average of P(N, -1) and P(-1, N / 2), or after deriving the lower-right reference sample P(N, N / 2) based on P(N, -1) and P(-1, N / 2), the lower-right reference sample and the lower-left reference sample can be interpolated to derive the lower-side reference sample.
[0263] In passing Figures 14-16The illustrated example shows that the lower reference sample is derived based on at least one of the lower left reference sample of the current block placed on the same horizontal line as the lower reference sample, or the upper right reference sample of the current block placed on the same vertical line as the right reference sample. Similarly, the right reference sample is derived based on at least one of the upper right reference sample of the current block placed on the same vertical line as the right reference sample, or the lower left reference sample of the current block placed on the same horizontal line as the lower reference sample. However, unlike the illustrated example, the right reference sample can also be derived based on at least one of the upper middle section reference sample or the left middle section reference sample, or vice versa. For example, after deriving the lower middle section sample using the upper middle section sample and the lower left reference sample, the lower sample can be generated by interpolation or extrapolation between the lower middle section sample and the lower left sample. Furthermore, after deriving the right middle section sample using the left middle section sample and the upper right sample, the lower sample can be generated by interpolation or extrapolation between the right middle section sample and the upper right sample.
[0264] The positions of the reference samples used to generate the first and second predicted images can be determined differently depending on the size or shape of the current block. For example, the positions of the upper or left reference samples used to derive the right or lower reference samples can be determined differently depending on the size or shape of the current block.
[0265] As an example, when the current block is an NxN square, the right-side reference sample can be derived based on the right-side upper reference sample P(N, -1), and the lower-side reference sample can be derived based on the left-side lower reference sample P(-1, N). Alternatively, when the current block is an NxN square, the right-side and lower-side reference samples can be derived based on at least one of the weighted average, minimum, or maximum values of the right-side upper reference sample P(N, -1) and the left-side lower reference sample P(-1, N).
[0266] Conversely, when the current block is a non-square block of size Nx2 / N, the lower middle reference sample P(N / 2, N / 2) can be derived based on the upper middle reference sample P(N / 2, -1) and the lower left reference sample P(-1, N / 2), and the lower reference sample can be derived based on the derived lower middle reference sample. As an example, the lower reference sample can be derived through interpolation or extrapolation between the lower middle reference sample and the lower left reference sample. Alternatively, when the current block is a non-square block of size N / 2xN, the right middle reference sample P(N / 2, N / 2) can be derived based on the upper right reference sample P(N / 2, -1) and the lower left middle reference sample P(-1, N / 2), and the right reference sample can be derived based on the derived right middle reference sample. As an example, the right reference sample can be derived through interpolation or extrapolation between the right middle reference sample and the upper right reference sample.
[0267] The first predicted image can be calculated based on a weighted prediction of a reference sample placed on the same horizontal line as the predicted object sample. Furthermore, the second predicted image can be calculated based on a weighted prediction of a reference sample placed on the same vertical line as the predicted object sample.
[0268] Not limited to the above examples, the average, minimum or maximum value of the reference sample can also be used to generate the first or second predicted image.
[0269] The method for exporting reference samples, or the method for exporting the first or second predicted image, can be set differently depending on whether the predicted object sample is contained within a specified region of the current block, the size or shape of the current block, etc. Specifically, the number or position of reference samples used when using right-side or bottom-side reference samples can be set differently depending on the position of the predicted object sample, or the weights or number of reference samples used when exporting the first or second predicted image can be set differently.
[0270] As an example, the right reference sample used when generating the first predicted image of the predicted object sample contained in the specified area can be derived using only the upper reference sample, and the right reference sample used when generating the first predicted image of the predicted object sample contained outside the specified area can be derived based on the weighted average of the upper reference sample and the left reference sample.
[0271] For example, such as Figure 15As shown in the example, when the current block is a non-square block with a height greater than its width, the right-hand reference sample of the predicted object sample at position (x, y) within the specified region of the current block can be derived from P(N / 2, -1). For example, the right-hand reference sample of the predicted object sample within the specified region can be generated by copying the value of the reference sample P(N / 2, -1). Conversely, the right-hand reference sample of the predicted object sample at position (x', y') outside the specified region of the current block can be derived based on a weighted or averaged sum of P(N / 2, -1) and P(-1, N). For example, the right-hand reference sample of the predicted object sample outside the specified region can be generated by interpolating the lower right reference sample P(N / 2, N) and the upper right reference sample P(N / 2, -1) derived from P(N / 2, -1) and P(-1, N).
[0272] Or, such as Figure 16 As shown in the example, when the current block is a non-square block with a width greater than its height, the lower reference sample of the predicted object sample at position (x, y) within the specified region of the current block can be derived from P(-1, N / 2). For example, the lower reference sample of the predicted object sample within the specified region can be generated by copying the value of the reference sample P(-1, N / 2). Conversely, the lower reference sample of the predicted object sample at position (x', y') outside the specified region of the current block can be derived based on a weighted or averaged sum of P(N, -1) and P(-1, N / 2). For example, the lower object reference sample of the predicted object sample outside the specified region can be generated by interpolating the lower right reference sample P(N, N / 2) and the lower left reference sample P(-1, N / 2) derived from P(N, -1) and P(-1, N / 2).
[0273] As another example, prediction object samples contained within a defined region can generate a first or second prediction image based on a weighted average of reference samples. Prediction object samples outside the defined region can generate a first or second prediction image using the average, minimum, or maximum value of the reference samples, or simply using any one of the predefined positions in the reference samples. For example, ... Figure 15As shown in the example, when the current block is a non-square block with a height greater than its width, the predicted object sample at position (x, y) within the specified region of the current block can generate a first predicted image using only one of the right reference sample P(N / 2, y) derived from P(N / 2, -1) or the left reference sample at position P(-1, y). Conversely, the predicted object sample at position (x', y') not within the specified region can generate a first predicted image based on a weighted average of the right reference sample P(N / 2, y') derived from P(N / 2, -1) and the reference sample at position P(-1, y').
[0274] Or, such as Figure 16 As shown in the example, when the current block is a non-square block with a width greater than its height, the predicted object sample at position (x, y) within the specified region of the current block can generate a second predicted image using only one of the lower reference sample P(x, N / 2) derived from P(-1, N / 2) or the upper reference sample at position P(x, -1). Conversely, the predicted object sample at position (x', y') not within the specified region can generate a second predicted image based on a weighted average of the lower reference sample P(x', N / 2) derived from P(-1, N / 2) and the reference sample at position P(-1, y').
[0275] In the above embodiments, the defined region can be one of at least one sample line adjacent to the boundary of the current block, or other residual regions. The boundary of the current block can include at least one of a left boundary, a right boundary, a top boundary, or a bottom boundary. Furthermore, the number or position of the boundaries used to define the defined region can be set differently depending on the shape of the current block. Alternatively, the defined region can be a block shape that contacts one corner of the current block. In this case, the size and shape of the defined region can be determined based on at least one of the size or shape of the current block.
[0276] In planar mode, the final predicted image can be derived based on a weighted average, minimum, or maximum value of the first and second predicted images.
[0277] As an example, the following mathematical expression 11 represents the expression based on the first predicted image P. h and the second predicted image P v An example of using weighted averages to generate the final predicted image P.
[0278] [Mathematical Expression 11]
[0279] P(x, y) = (w*P h (x, y) + (1 - w) * P v(x, y) + N >> (log 2(N) + 1)
[0280] In the above mathematical formula 11, the prediction weight w can vary depending on the shape and size of the current block or the position of the predicted object sample.
[0281] As an example, the prediction weight w can be derived by considering the width of the current block, the height of the current block, or the width-to-height ratio. When the current block is a non-square block whose width is greater than its height, w can be set to assign more weight to the first predicted image. Conversely, when the current block is a non-square block whose height is greater than its width, w can be set to assign more weight to the second predicted image.
[0282] As an example, when the current block is a square, the prediction weight w can have a value of 1 / 2. Conversely, when the current block is a non-square block with a height greater than its width (e.g., (N / 2) x N), the prediction weight w can be set to 1 / 4, and when the current block is a non-square block with a width greater than its height (e.g., N x (N / 2)), the prediction weight w can be set to 3 / 4.
[0283] Besides planar mode, intra-frame prediction can also be performed in DC mode or directional intra-frame prediction mode using reference samples other than the left and top reference samples. In the following embodiments, the left and top reference samples are referred to as first reference samples, and the reference samples other than the left and top reference samples are referred to as second reference samples. As an example, the second reference sample may include the right reference sample and / or the bottom reference sample of the current block. The bottom reference sample may represent a reference sample with a y-axis coordinate larger than the predicted object sample in the bottom row of the current block, and the right reference sample may represent a reference sample with an x-axis coordinate larger than the predicted object sample in the rightmost column of the current block.
[0284] Whether to use a second reference sample for intra-frame prediction can be determined based on at least one of the following: the size and shape of the current block, the intra-frame prediction mode, or the position of the predicted object sample. For example, the decision to use a second reference sample can be based on whether the intra-frame prediction mode of the current block is vertical, horizontal, or diagonal. Alternatively, it can be configured such that: for predicted object samples contained within a specified region of the current block, intra-frame prediction is performed using a second reference sample; conversely, for predicted object samples not contained within a specified region of the current block, intra-frame prediction is performed using a first reference sample.
[0285] Alternatively, information indicating whether a second reference sample is used can be transmitted via a bitstream signal. This information could be a 1-bit flag or an index used to determine the intra-prediction mode of the current block.
[0286] Alternatively, the decision to use a second reference sample can be based on whether a second reference sample is used in the surrounding blocks of the current block.
[0287] The second reference sample can be generated based on the first reference sample. As an example, the order of the first reference samples can be changed to construct the second reference sample, or the second reference sample can be derived using the first reference sample at a specific position.
[0288] Figure 17 This is a diagram illustrating an example of deriving a second reference sample using a first reference sample.
[0289] First, the desired lower right reference sample P(W, H) can be derived based on the upper right reference sample r(W, -1) and the lower left reference sample r(-1, H) of the current block. Specifically, the lower right reference sample can be derived by weighting or averaging the upper right reference sample and the lower left reference sample. The following mathematical expression 12 represents an example of deriving the lower right reference sample.
[0290] [Mathematical Expression 12]
[0291]
[0292] As shown in Equation 12 above, the lower right reference sample can be calculated based on a weighted average of the upper right reference sample and the lower left reference sample. In this case, the weights applied to the upper right reference sample and the lower left reference sample can be determined based on the width and height of the current block. For example, when the current block is square, the same weights can be applied to the upper right reference sample and the lower left reference sample; conversely, when the current block is not square, different weights can be applied to the upper right reference sample and the lower left reference sample. The weight setting method represented by Equation 12 is merely one example of the present invention, and the invention is not limited thereto. Besides the example shown in Equation 12, weights can also be determined based on at least one of the following: the size and shape of the current block, the intra-prediction mode, the availability of reference samples, the availability of surrounding blocks, whether the surrounding blocks are encoded in an intra-prediction mode, or the intra-prediction mode of the surrounding blocks.
[0293] The right-side reference sample can be derived based on the upper right-side reference sample and the lower right-side reference sample. As an example, the right-side reference sample can be obtained by interpolating the upper right-side reference sample and the lower right-side reference sample. The following mathematical expression 13 represents an example of deriving the right-side reference sample.
[0294] [Mathematical Expression 13]
[0295]
[0296] As shown in mathematical formula 13 above, the reference sample P on the right is... r (W, y) (where y is an integer between 0 and the CU height (cu_height)) can be obtained by weighted prediction of the upper right reference sample r(W, -1) and the lower right reference sample P(W, H). The weights applied to the upper right and lower right reference samples can be determined based on at least one of the width, height, or position of the right reference sample of the current block. For example, as shown in Equation 13, a weight of (H-1-y) / H can be applied to the upper right reference sample, and a weight of (y+1) / H can be applied to the lower right reference sample. The weight setting method represented by Equation 13 is merely one example of the present invention, and the invention is not limited thereto. Besides the example shown in Equation 13, the weights can also be determined based on at least one of the following: the size and shape of the current block, the intra-prediction mode, the availability of reference samples, the availability of surrounding blocks, whether the surrounding blocks are encoded in an intra-prediction mode, or the intra-prediction mode of the surrounding blocks.
[0297] The lower reference sample can be derived based on the left lower reference sample and the right lower reference sample. As an example, the lower reference sample can be obtained by interpolating the left lower reference sample and the right lower reference sample. The following mathematical expression 14 represents an example of deriving the lower reference sample.
[0298] [Mathematical Expression 14]
[0299]
[0300] As shown in mathematical formula 14 above, the lower end refers to sample P. b(x, H) (where x is an integer between 0 and the CU width (cu_width)) can be obtained by weighted prediction of the lower left reference sample r(-1, H) and the lower right reference sample P(W, H). The weights applied to the lower left and lower right reference samples can be determined based on at least one of the width, height, or position of the lower reference sample of the current block. For example, as shown in Equation 14, a weight of (W-1-x) / W can be applied to the lower left reference sample, and a weight of (x+1) / H can be applied to the lower right reference sample. The weight setting method represented by Equation 14 is merely one example of the present invention, and the invention is not limited thereto. Besides the example represented by Equation 14, the weights can also be determined based on at least one of the following: the size and shape of the current block, the intra-prediction mode, the availability of reference samples, the availability of surrounding blocks, whether the surrounding blocks are encoded in an intra-prediction mode, or the intra-prediction mode of the surrounding blocks.
[0301] If the current block is not a square, it can be based on the above... Figure 15 as well as Figure 16 The example is used to derive the right-side reference sample and the lower-side reference sample.
[0302] As shown in the example above, a second reference sample, including a right-side reference sample and a bottom-side reference sample, can be derived using first reference samples at fixed positions such as the upper right-side reference sample and the lower left-side reference sample. Alternatively, unlike the example above, a second reference sample can be derived using a first reference sample at a different position than the upper right-side reference sample and / or the lower left-side reference sample. For example, a right-side reference sample and a bottom-side reference sample can be derived using a first reference sample such as the upper middle section reference sample or the left middle section reference sample of the current block.
[0303] Alternatively, the first reference sample used when deriving the second reference sample can be determined based on the intra-prediction mode of the current block. As an example, the right-side reference sample and / or the lower-side reference sample can be derived based on the left-side reference sample and / or the upper-side reference sample specified by the intra-prediction mode directionality of the current block.
[0304] Alternatively, the second reference sample can be determined using multiple left-side reference samples and / or multiple upper-side reference samples. As an example, at least one of the right-side reference sample, the lower-side reference sample, or the right-side lower-side reference sample can be generated based on the weighted average, maximum, or minimum value of multiple left-side reference samples, or it can be generated based on the weighted average, maximum, or minimum value of multiple upper-side reference samples.
[0305] Alternatively, a second reference sample can be generated by copying the first reference sample. In this case, the first reference sample used to generate the second reference sample can have a fixed position, or it can be adaptively determined based on the size, shape, intra-frame prediction mode, or position of the second reference sample of the current block.
[0306] The example above shows a scenario with W lower reference samples and H right reference samples, but it is possible to derive more lower reference samples and / or right reference samples. For example, lower reference samples can be derived up to a vertical line equal to the rightmost upper reference sample r(2W-1, -1), or right reference samples can be derived up to a horizontal line equal to the bottommost left reference sample r(-1, 2H-1).
[0307] At this point, the lower reference sample with an x-coordinate larger than W can be generated by extrapolating the lower left and lower right reference samples, or by interpolating the lower right reference sample P(W, H) and the rightmost lower reference sample P(2W-1, H). The rightmost lower reference sample can be generated by copying the rightmost upper reference sample r(2W-1, -1), or by weighting the upper right reference sample and the lower left reference sample. The right reference sample with a y-coordinate larger than H can be generated by extrapolating the upper right and lower right reference samples, or by interpolating the lower right reference sample P(W, H) and the bottom right reference sample P(W, 2H-1). At this point, the bottom right reference sample can be generated by copying the bottom left reference sample r(-1, 2H-1), or by weighting the bottom left reference sample and the upper left reference sample.
[0308] A first one-dimensional reference sample group can be generated by arranging the first reference sample in one dimension, and a second one-dimensional reference sample group can be generated by arranging the second reference sample in one dimension. In this case, the first one-dimensional reference sample group can be configured to include not only the first reference sample but also at least one of the second reference sample, and the second one-dimensional reference sample group can be configured to include not only the second reference sample but also at least one of the first reference sample.
[0309] Figure 18 A diagram representing the reference samples that constitute a one-dimensional reference sample group.
[0310] like Figure 18 As shown in example (a), the first one-dimensional reference sample group can be composed of the left reference sample and the upper reference sample of the current block.
[0311] On the contrary, such as Figure 18As shown in example (b), the second one-dimensional reference sample group can be configured to include not only the right-side reference sample and the lower-end reference sample of the current block, but also a portion of the left-side reference sample and a portion of the upper-end reference sample.
[0312] That is, left reference samples whose y-axis coordinates are larger than those of the lower left reference sample r(-1, H) and the lower left reference sample can all be included in the first one-dimensional reference sample group and the second one-dimensional reference sample group. Similarly, upper reference samples whose x-axis coordinates are larger than those of the upper right reference sample r(W, -1) and the upper right reference sample can all be included in the first one-dimensional reference sample group and the second one-dimensional reference sample group.
[0313] Alternatively, based on at least one of the current block size, shape, or intra-frame prediction mode, the aforementioned portion of the first reference samples may be included only in the first one-dimensional reference sample group, or the aforementioned portion of the first reference samples may be included only in the second one-dimensional reference sample group. In addition to the structure of the one-dimensional reference sample group, the arrangement order of the reference samples constituting the one-dimensional reference sample group may also be variably determined based on at least one of the current block size, shape, or intra-frame prediction mode.
[0314] For ease of explanation, in the embodiments described later, the reference sample group containing the left and upper reference samples of the current block is referred to as the first reference sample group (e.g., the first one-dimensional reference sample group), and the reference sample group containing the right and lower reference samples of the current block is referred to as the second reference sample group (e.g., the second one-dimensional reference sample group). As an example, the first and second reference sample groups can be distinguished based on whether they contain the right and lower reference samples. Furthermore, in order to perform intra-frame prediction of the target sample, the reference samples selected from the first reference sample group are referred to as the first basic reference samples, and the reference samples selected from the second reference sample group are referred to as the second basic reference samples.
[0315] Intra-frame prediction for the current block can be performed using at least one of a first reference sample group or a second reference sample group. For example, the predicted value of the target sample within the current block can be obtained based on at least one of a first base reference sample selected from the first reference sample group or a second base reference sample selected from the second reference sample group. In this case, the first base reference sample and / or the second base reference sample can be determined based on at least one of the current block's shape, size, or intra-frame prediction mode. For example, when the intra-frame prediction mode for the current block is determined, a first base reference sample for the target sample can be specified according to the determined intra-frame prediction mode direction, and a second base reference sample for the target sample can be specified along the opposite direction of the determined intra-frame prediction mode.
[0316] Alternatively, the position of the second base reference sample can be determined based on the position of the first base reference sample, or vice versa. For example, a second base reference sample with the same x-coordinate or y-coordinate as the first base reference sample can be selected, or a second base reference sample whose x-coordinate or y-coordinate is added to the first base reference sample by an offset. The offset can be a fixed value or adaptively determined based on the size, shape, or intra-frame prediction mode of the current block.
[0317] Alternatively, the positions of the first and / or second base reference samples can be determined based on the position of the target sample. For example, a first and / or second base reference sample can be selected that has the same x-coordinate or the same y-coordinate as the target sample, or a first and / or second base reference sample can be selected that has a value obtained by adding an offset to the x-coordinate or y-coordinate of the target sample. The offset can have a fixed value or can be adaptively determined based on the size, shape, or intra-frame prediction mode of the current block.
[0318] The predicted value of the target sample can be generated based on at least one of a first predicted image based on a first base reference sample or a second predicted image based on a second base reference sample. In this case, the first predicted image can be generated based on the explanations provided in Mathematical Formulas 8 to 10 above.
[0319] The second predicted image can be generated by interpolating or copying a second base reference sample specified according to the slope of the intra-prediction mode of the current block. As an example, Equation 15 is a figure illustrating an example of deriving the second predicted image by copying the second base reference sample.
[0320] [Mathematical Expression 15]
[0321] P2(x,y)=P_2nd_1D(x+iIdx+1+f)
[0322] In the above mathematical formula 15, P2(x, y) represents the second predicted image, and P_2nd_1D(x+iIdx+1+f) represents the second base reference sample.
[0323] When a single second base reference sample is insufficient to represent the slope of the intra-prediction mode of the current block, a second predicted image can be generated by interpolating multiple second base reference samples. Specifically, when an imaginary angle line based on the slope and / or angle of the intra-prediction mode does not pass through an integer pixel (i.e., a reference sample at an integer position), a second predicted image can be obtained by interpolating the second reference samples adjacent to the corresponding angle line on the left, right, or top and bottom. As an example, Equation 16 illustrates an example of obtaining a second predicted image by interpolating second reference samples.
[0324] [Mathematical Expression 16]
[0325]
[0326] The coefficients of the interpolation filter can be based on the weight-related parameter i. fact The coefficients of the interpolation filter can be determined based on the distance between fractional pixels and integer pixels (i.e., the integer positions of each reference sample) located on the angular line.
[0327] Although an interpolation filter with 2 taps is shown in Equation 16, an interpolation filter with more than 2 taps can also be used.
[0328] The final predicted image of the predicted object sample can be obtained based on at least one of the first predicted image or the second predicted image. For example, the first predicted image can be determined as the final predicted image of the predicted object sample, or the second predicted image can be determined as the final predicted image of the predicted object sample. Alternatively, the final predicted image of the predicted object sample can be determined based on a weighted or averaged operation of the first and second predicted images. Equation 17 is an example of obtaining the final predicted sample based on a weighted operation of the first and second predicted images.
[0329] [Mathematical Expression 17]
[0330] P(x,y)=w(x,y)×P1(x,y)+(1-w(x,y))×P2(x,y)
[0331] In Equation 17 above, P1(x, y) represents the first predicted image, and P2(x, y) represents the second predicted image. Additionally, w(x, y) represents the weight assigned to the first predicted image.
[0332] The weights assigned to the first and second predicted images can be determined based on at least one of the following: the position of the predicted object sample, the size and shape of the current block, or the intra-frame prediction mode. As an example, Equation 18 illustrates how weights are determined based on the size of the current block and the position of the predicted object sample.
[0333] [Mathematical Expression 18]
[0334]
[0335] In the above mathematical formula 18, W and H represent the width and height of the current block, respectively, and (x, y) represents the coordinates of the predicted object sample.
[0336] As shown in the example of mathematical formula 18 above, it can be set that: the closer the predicted object sample is to the upper left corner of the current block, the greater the weight of the first predicted image, and the closer the predicted object sample is to the lower right corner of the current block, the greater the weight of the second predicted image.
[0337] Alternatively, the weight can be derived from the adjacent blocks of the current block. The adjacent blocks of the current block can include at least one of the upper adjacent block, the left adjacent block, or the adjacent block adjacent to the corner (e.g., the upper left adjacent block, the upper right adjacent block, or the lower left adjacent block).
[0338] Alternatively, information used to determine the weights can be transmitted via a bitstream signal. This information can represent either the weight values applicable to the first or second predicted image, or the weight difference between the current block and its neighboring blocks.
[0339] As shown in the example above, obtaining the final predicted image through a weighted operation between the first and second predicted images can be called bi-intra prediction.
[0340] Bidirectional intra-prediction can be applied to only a portion of the current block. In this case, the region for which bidirectional intra-prediction applies can be predefined in the encoder and decoder. For example, bidirectional intra-prediction can be applied to a block of a predetermined size (e.g., 4x4) adjacent to the lower right corner of the current block. Alternatively, the region for which bidirectional intra-prediction applies can be adaptively determined based on the size, shape, or intra-prediction mode of the current block. Alternatively, information for determining the region for which bidirectional intra-prediction applies (e.g., information indicating the size or location of the region) can be transmitted via a bitstream signal.
[0341] Figure 19 This is an example representing a region where bidirectional intra-frame prediction is applicable.
[0342] In regions where bidirectional intra-frame prediction is applicable, the final predicted sample can be obtained by weighted prediction of the first and second predicted images. Conversely, in regions where bidirectional intra-frame prediction is not applicable, either the first or second predicted image can be used as the final predicted sample.
[0343] In the example above, bidirectional intra-frame prediction was performed using a first base reference sample selected from the first sample group and a second base reference sample selected from the second sample group. Unlike the example described above, bidirectional intra-frame prediction can also be performed by selecting multiple reference samples from the first sample group, or by selecting multiple reference samples from the second sample group. For example, if the intra-frame prediction mode of the current block is either the upper right diagonal or the lower left diagonal, bidirectional intra-frame prediction can be performed by selecting both the upper reference sample and the left reference sample from the first sample group. That is, the final prediction sample for the current block can be obtained by performing a weighted prediction on the first reference image obtained based on the upper reference sample and the second reference image obtained based on the lower reference sample.
[0344] Alternatively, bidirectional intra-frame prediction can be performed by selecting the right reference sample and the lower reference sample in the second sample group, depending on the intra-frame prediction mode.
[0345] Bidirectional intra-prediction can be defined as independent intra-prediction modes. As an example, a total of 2N+2 intra-prediction modes can be defined by defining N directional prediction modes and N bidirectional intra-prediction modes corresponding to those N directional prediction modes. As an example, this can be achieved by defining... Figure 8 The intra-prediction modes shown are supplemented with bidirectional intra-prediction modes to define a total of 68 intra-prediction modes (i.e., 2 non-directional intra-prediction modes, 33 directional intra-prediction modes, and 33 bidirectional intra-prediction modes). Of course, more or fewer directional or bidirectional intra-prediction modes can also be used.
[0346] Alternatively, after determining the intra-prediction mode for the current block, it can be decided whether to switch the determined intra-prediction mode to a bidirectional prediction mode. As an example, when the intra-prediction mode for the current block is determined, information related to whether to use the determined intra-prediction mode as a bidirectional intra-prediction mode can be decoded. This information can be a 1-bit flag (e.g., bi_intra_flag), but is not limited to this. A value of 0 for bi_intra_flag indicates directional intra-prediction, and a value of 1 indicates bidirectional intra-prediction. That is, when bi_intra_flag is 0, the first predicted image is determined as the final predicted sample for the current block; conversely, when bi_intra_flag is 1, the image obtained by weighted prediction of the first and second predicted images is determined as the final predicted sample for the current block.
[0347] Alternatively, the decision on whether the current block uses bidirectional intra-prediction mode can be based on whether neighboring blocks adjacent to the current block use bidirectional intra-prediction mode. As an example, if the intra-prediction mode of the current block is the same as the candidate (i.e., MPM candidate) derived from the intra-prediction modes of the neighboring blocks, the decision on whether the current block uses bidirectional intra-prediction mode can be made in the same way as the decision on whether the neighboring blocks use bidirectional intra-prediction mode.
[0348] Alternatively, the decision to perform bidirectional intra-prediction can be based on the size and / or shape of the current block. For example, it can be configured to allow bidirectional intra-prediction only for blocks larger than 32x32. Thus, bidirectional intra-prediction may not be applicable when the current block size is smaller than 32x32, but it can be applied when the current block size is 32x32 or larger.
[0349] As another example, bidirectional intra-frame prediction can be allowed only for square blocks, or only for blocks of non-square shape.
[0350] Alternatively, bidirectional intra-prediction can be applied only to certain directional intra-prediction modes. As an example, Figure 20 To identify examples representing directional prediction modes that allow bidirectional intra-frame prediction. For example... Figure 20 As shown in the example, it can be configured to allow bidirectional intra-prediction only for a portion of the intra-prediction modes between the horizontal and vertical directions. In this case, when selecting an intra-prediction mode within the above range, bidirectional intra-prediction can be performed by default. Furthermore, when selecting an intra-prediction mode within the above range, the decision to perform bidirectional intra-prediction can be based on at least one of the information parsed from the bitstream, the size of the current block, or its shape.
[0351] Intra-prediction modes applicable to bidirectional intra-prediction are not limited to Figure 20 The example shown illustrates an intra-prediction mode that allows bidirectional intra-prediction. This mode can be predefined in both the encoder and decoder, or it can be adaptively determined based on the size and / or morphology of the current block. Alternatively, information for determining the intra-prediction mode that allows bidirectional intra-prediction can be sent via a signal through the bitstream.
[0352] Figure 21 This is a flowchart illustrating an intra-block prediction method based on the bidirectional intra-prediction mode involved in this invention.
[0353] First, it can be decided whether to apply bidirectional intra-prediction to the current block (S2110). This decision can be made based on information parsed from the bitstream, the current block's form, size, or intra-prediction mode.
[0354] As an example, after determining the intra-prediction mode for the current block based on the candidate list and index, the decision on whether to apply bidirectional intra-prediction to the current block can be based on the size and shape of the current block or information parsed from the bitstream (e.g., bi_pred_flag). Alternatively, the decision on whether to apply bidirectional intra-prediction to the current block can be based on whether the intra-prediction mode of the current block is a directional prediction mode suitable for bidirectional intra-prediction.
[0355] Then, reference samples for the current block can be exported (S2120). First, the first reference sample adjacent to the left and top of the current block is exported. If bidirectional intra-frame prediction is applied to the current block, the second reference sample adjacent to the right and bottom is further exported (S2130).
[0356] Next, without applying bidirectional intra-frame prediction to the current block, a first prediction image can be generated based on at least one base reference sample from the first reference samples, according to the intra-frame prediction mode of the current block (S2140). In this case, the first prediction image is determined to be the final prediction sample for the current block.
[0357] Conversely, when applying bidirectional intra-frame prediction to the current block, a second prediction image can be generated based on at least one of the first prediction image and the second reference sample (S2150). The first and second base reference samples can be determined based on the directionality of the intra-frame prediction mode, or based on the size, shape, or position of other base reference samples of the current block. When the first and second prediction images are acquired, the final prediction sample of the current block can be obtained by performing weighted prediction on the first and second prediction images.
[0358] The above embodiments are described based on a series of steps or sequence diagrams, but this is not a limitation on the time sequence of the invention; they can be executed simultaneously or in other orders as needed. Furthermore, each of the constituent elements (e.g., units, modules, etc.) constituting the block diagrams in the above embodiments can be implemented by either hardware or software, or by a combination of multiple constituent elements implemented by a single hardware or software device. The above embodiments can be implemented by program instructions executable by various computer constituent elements and stored in a computer-readable storage medium. The computer-readable storage medium can contain program instructions, data files, data structures, etc., individually or in combination. Examples of computer-readable storage media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical storage media such as CD-ROMs and DVDs; magnetic-optical media such as floppy disks; and hardware devices specifically configured to store and execute program instructions, such as ROMs, RAMs, and flash memory. The aforementioned hardware devices can be configured to operate as one or more software modules to perform the processes involved in this invention, and vice versa.
[0359] Industrial availability
[0360] This invention is applicable to electronic devices capable of encoding / decoding images.
[0361] Inventive concept
[0362] This invention provides the following inventive concept:
[0363] 1. An image decoding method, characterized in that it comprises:
[0364] The steps to determine whether to apply bidirectional intra-frame prediction to the current block;
[0365] The steps to derive the reference sample of the current block mentioned above; and
[0366] In the case of applying bidirectional intra-frame prediction to the current block, the step of obtaining the prediction sample of the current block based on the first reference sample and the second reference sample specified by the intra-frame prediction mode of the current block.
[0367] 2. The image decoding method according to inventive concept 1 is characterized in that,
[0368] The first reference sample is the left-side reference sample or the top-side reference sample of the current block, and the second reference sample is the right-side reference sample or the bottom-side reference sample of the current block.
[0369] 3. The image decoding method according to inventive concept 2 is characterized in that,
[0370] The aforementioned right-side reference sample is generated by interpolating the right-side lower reference sample and the right-side upper reference sample, and the aforementioned lower-side reference sample is generated by interpolating the aforementioned right-side lower reference sample and the left-side lower reference sample.
[0371] 4. The image decoding method according to inventive concept 1 is characterized in that,
[0372] The first reference sample is selected by applying the intra-prediction mode of the current block in the positive direction, and the second reference sample is selected by applying the intra-prediction mode of the current block in the negative direction.
[0373] 5. The image decoding method according to inventive concept 1, characterized in that,
[0374] The aforementioned prediction samples are obtained through a weighted operation of a first prediction sample obtained based on the first reference sample and a second prediction sample obtained based on the second reference sample.
[0375] 6. The image decoding method according to inventive concept 5 is characterized in that,
[0376] The weights applicable to both the first and second prediction samples are determined based on at least one of the following: the position of the prediction target sample, the size and shape of the current block, or the intra-frame prediction mode.
[0377] 7. The image decoding method according to inventive concept 1, characterized in that,
[0378] The bidirectional intra-frame prediction described above applies only to the specified region within the current block.
[0379] 8. The image decoding method according to inventive concept 1, characterized in that,
[0380] The steps for determining whether to apply bidirectional intra-frame prediction to the current block include:
[0381] The steps to determine whether the intra-prediction mode of the current block is a directional intra-prediction mode; and
[0382] The steps of decoding information indicating whether the above-mentioned directional intra-prediction mode is used as a bidirectional intra-prediction mode.
[0383] 9. The image decoding method according to inventive concept 1, characterized in that,
[0384] Whether to apply bidirectional intra-frame prediction to the current block is determined based on whether to apply bidirectional intra-frame prediction to the neighboring blocks adjacent to the current block.
[0385] 10. The image decoding method according to inventive concept 1, characterized in that,
[0386] If the intra-prediction mode of the current block is a directional intra-prediction mode within the specified range, it is determined that bidirectional intra-prediction will be applied to the current block.
[0387] 11. An image encoding method, characterized in that it comprises:
[0388] The steps to determine whether to apply bidirectional intra-frame prediction to the current block;
[0389] The steps to derive the reference sample of the current block mentioned above; and
[0390] When bidirectional intra-frame prediction is applied to the current block, prediction samples for the current block are obtained based on a first reference sample and a second reference sample specified by the intra-frame prediction mode of the current block.
[0391] 12. The image encoding method according to inventive concept 11 is characterized in that,
[0392] The first reference sample is selected by applying the intra-prediction mode of the current block in the positive direction, and the second reference sample is selected by applying the intra-prediction mode of the current block in the negative direction.
[0393] 13. The image encoding method according to inventive concept 11 is characterized in that,
[0394] The aforementioned prediction samples are obtained through a weighted operation of a first prediction sample obtained based on the first reference sample and a second prediction sample obtained based on the second reference sample.
[0395] 14. An image decoding device, characterized in that,
[0396] The system includes an intra-prediction unit that determines whether to apply bidirectional intra-prediction to the current block, derives a reference sample for the current block, and, if bidirectional intra-prediction is applied to the current block, obtains a prediction sample for the current block based on a first reference sample and a second reference sample specified by the intra-prediction mode of the current block.
[0397] 15. An image encoding device, characterized in that,
[0398] The system includes an intra-prediction unit that determines whether to apply bidirectional intra-prediction to the current block, derives a reference sample for the current block, and, if bidirectional intra-prediction is applied to the current block, obtains a prediction sample for the current block based on a first reference sample and a second reference sample specified by the intra-prediction mode of the current block.
Claims
1. A method for decoding video, the method comprising: Construct a list of the most likely modes (MPMs) for the current block; The intra-prediction mode of the current block is determined based on the MPM list; A prediction block is obtained based on the intra-prediction mode of the current block, wherein, in response to the intra-prediction mode of the current block being a directional mode, each prediction sample in the prediction block is derived based on at least one reference sample specified by the angle of the directional mode; and Determine whether to apply bidirectional intra-frame prediction to the current block. Specifically, in response to applying bidirectional intra-frame prediction to the current block, a first reconstructed sample in a first region of the current block is obtained from a modified prediction sample obtained by modifying a first prediction sample in the prediction block, and a second reconstructed sample in a second region of the current block is obtained from a second prediction sample in the prediction block. The modified prediction sample is obtained by weighting the first predicted sample and a second value derived from one of the reference samples. Specifically, a first weight applied to the first predicted sample and a second weight applied to the second value are determined based on the position of the first predicted sample.
2. The method according to claim 1, wherein, The first region consists of at least one column or row starting from the left or top boundary of the current block, and the second region represents the remaining region in the current block excluding the first region.
3. The method according to claim 1, wherein, Whether to apply bidirectional intra-frame prediction to the current block is implicitly determined by referring to whether both the width and height of the current block are greater than a threshold.
4. The method according to claim 3, wherein, Whether to apply bidirectional intra-prediction to the current block is implicitly determined by further referencing whether the intra-prediction mode of the current block is one of the predefined directional modes.
5. The method according to claim 1, wherein, The first predicted sample is obtained based on a first reference sample, wherein the first reference sample is located in the positive direction according to the directional pattern, starting from the position of the first predicted sample. The second value is derived from a second reference sample located in the opposite direction to the directional pattern, starting from the position of the first predicted sample.
6. The method according to claim 5, wherein, The second value is derived by copying the second reference sample, and the second reference sample is determined by the angle of the directional pattern of the current block.
7. A method for encoding video, the method comprising: Construct a list of the most likely modes (MPMs) for the current block; Information on whether the intra-prediction mode of the current block is the same as one of the MPM candidates in the MPM list is encoded; A prediction block is obtained based on the intra-prediction mode of the current block, wherein, in response to the intra-prediction mode of the current block being a directional mode, each prediction sample in the prediction block is derived based on at least one reference sample specified by the angle of the directional mode; and Determine whether to apply bidirectional intra-frame prediction to the current block. Specifically, in response to applying bidirectional intra-frame prediction to the current block, a first reconstructed sample in a first region of the current block is obtained from a modified prediction sample obtained by modifying a first prediction sample in the prediction block, and a second reconstructed sample in a second region of the current block is obtained from a second prediction sample in the prediction block. The modified prediction sample is obtained by weighting the first predicted sample and a second value derived from one of the reference samples. Specifically, a first weight applied to the first predicted sample and a second weight applied to the second value are determined based on the position of the first predicted sample.
8. An apparatus for transmitting compressed video data, the apparatus comprising: A processor used to generate the compressed video data; as well as Transmitter for transmitting the compressed video data In order to generate the compressed video data, the processor is configured to: Construct a list of the most likely modes (MPMs) for the current block; Information on whether the intra-prediction mode of the current block is the same as one of the MPM candidates in the MPM list is encoded; A prediction block is obtained based on the intra-prediction mode of the current block, wherein, in response to the intra-prediction mode of the current block being a directional mode, each prediction sample in the prediction block is derived based on at least one reference sample specified by the angle of the directional mode; and Determine whether to apply bidirectional intra-frame prediction to the current block. Specifically, in response to applying bidirectional intra-frame prediction to the current block, a first reconstructed sample in a first region of the current block is obtained from a modified prediction sample obtained by modifying a first prediction sample in the prediction block, and a second reconstructed sample in a second region of the current block is obtained from a second prediction sample in the prediction block. The modified prediction sample is obtained by weighting the first predicted sample and a second value derived from one of the reference samples. Specifically, a first weight applied to the first predicted sample and a second weight applied to the second value are determined based on the position of the first predicted sample.
Citation Information
Patent Citations
Unified intra block copy and inter prediction modes
CN105493505A
Intra-prediction method and apparatus in video coding system
WO2017069419A1