Method for decoding video and method for encoding video
By employing intra-frame weighted prediction with non-adjacent reference samples in video signal encoding/decoding, the problem of low efficiency in intra-frame prediction is solved, achieving efficient video signal encoding/decoding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KT CORP
- Filing Date
- 2018-05-16
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies have low efficiency in intra-frame prediction when encoding/decoding high-resolution and high-quality video signals, especially when using non-adjacent reference samples, making it difficult to perform predictions effectively.
Intra-weighted prediction is performed using multiple non-adjacent reference samples. The intra-prediction mode of the current block is determined, and the prediction sample is generated by the weighted sum of the top and left reference samples. The weights are determined based on the position of the prediction sample or the distance between the reference sample and the prediction sample.
It improves the efficiency of intra-frame prediction and enables efficient encoding/decoding of video signals, especially when using non-adjacent reference samples.
Smart Images

Figure CN116828205B_ABST
Abstract
Description
[0001] This application is a divisional application of the application with national application number 201880032562.0, international application date of May 16, 2018, national entry date of November 15, 2019, and invention title "Method and Apparatus for Video Signal Processing". Technical Field
[0002] This invention relates to methods and apparatus for processing video signals. Background Technology
[0003] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) and ultra-high-definition (UHD) images, has increased across various application areas. However, high-resolution and high-quality image data involves a significant increase in data volume compared to conventional image data. Consequently, transmission and storage costs increase when transmitting image data using media such as conventional wired and wireless broadband networks, or when storing image data using conventional storage media. To address these issues arising from the increasing resolution and quality of image data, efficient image encoding / decoding techniques can be utilized.
[0004] Image compression techniques encompass various methods, including: inter-frame prediction techniques that predict pixel values included in the current image based on previous or subsequent images; intra-frame prediction techniques that predict pixel values included in the current image using pixel information from the current image; and entropy coding techniques that assign short codes to values with high frequency of occurrence and long codes to values with low frequency of occurrence. Image data can be effectively compressed using such image compression techniques and can then be transmitted or stored.
[0005] Simultaneously, with the increasing demand for high-resolution images, the demand for stereoscopic image content as a new image service has also increased. Video compression technologies for effectively delivering stereoscopic image content with high and ultra-high resolution are being discussed. Summary of the Invention
[0006] Technical issues
[0007] The purpose of this invention is to provide a method and apparatus for effectively performing intra-frame prediction on target blocks during the encoding / decoding of video signals.
[0008] 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.
[0009] The technical objectives of this invention are not limited to the technical problems mentioned above. Furthermore, those skilled in the art will clearly understand other technical problems not mentioned below based on the following description.
[0010] Technical solution
[0011] The method and apparatus for decoding video signals according to the present invention can determine the intra-prediction mode of the current block, obtain reference samples of the current block, and use at least one of the reference samples to obtain a prediction sample of the current block. In this case, when intra-weighted prediction is applied to the current block, the prediction sample can be obtained based on multiple non-adjacent reference samples.
[0012] The method and apparatus for encoding video signals according to the present invention can determine the intra-prediction mode of the current block, obtain reference samples of the current block, and use at least one of the reference samples to obtain prediction samples of the current block. In this case, when intra-weighted prediction is applied to the current block, prediction samples can be obtained based on multiple non-adjacent reference samples.
[0013] In the method and apparatus for encoding / decoding video signals according to the present invention, a plurality of reference samples that are not adjacent to each other may include a top reference sample located at the top of the current block and a left reference sample located at the left side of the current block.
[0014] In the method and apparatus for encoding / decoding video signals according to the present invention, a prediction sample can be obtained based on a weighted sum between an upper reference sample and a left reference sample.
[0015] In the method and apparatus for encoding / decoding video signals according to the present invention, the weights applied to the upper reference sample and the left reference sample can be determined based on the position of the predicted sample or the distance between each reference sample and the predicted sample.
[0016] In the method and apparatus for encoding / decoding video signals according to the present invention, the weights applied to the upper reference sample and the left reference sample can be determined based on sub-blocks.
[0017] In the method and apparatus for encoding / decoding video signals according to the present invention, one of the upper reference sample and the left reference sample can be specified by applying an intra-frame prediction mode in the forward direction, and the other can be specified by applying an intra-frame prediction mode in the reverse direction.
[0018] In the method and apparatus for encoding / decoding video signals according to the present invention, whether to perform intra-frame weighted prediction can be determined based on whether the intra-frame prediction mode is a predefined intra-frame prediction mode.
[0019] The features briefly outlined above for this invention are merely illustrative aspects of the following detailed description of the invention and do not limit the scope of the invention.
[0020] Technical effect
[0021] According to the present invention, effective intra-frame prediction can be performed on the encoded / decoded target block.
[0022] According to the present invention, the efficiency of intra-frame prediction is improved by using multiple reference samples that are not adjacent to each other.
[0023] The effects that can be obtained by the present invention are not limited to those mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art based on the following description. Attached Figure Description
[0024] Figure 1 This is a block diagram illustrating an apparatus for encoding video according to an embodiment of the present invention.
[0025] Figure 2 This is a block diagram illustrating an apparatus for decoding video according to an embodiment of the present invention.
[0026] Figure 3 This is a diagram illustrating an example of hierarchical segmentation of coded blocks based on a tree structure according to an embodiment of the present invention.
[0027] Figure 4 This is a diagram illustrating a type of segmentation that allows binary tree-based segmentation according to an embodiment of the present invention.
[0028] Figure 5 This is a diagram illustrating an example of binary tree-based partitioning that allows only a predetermined type according to an embodiment of the invention.
[0029] Figure 6 This is a diagram illustrating an example of how information related to the allowed number of binary tree splits is encoded / decoded according to an embodiment of the present invention.
[0030] Figure 7 This is a diagram illustrating a segmentation pattern applicable to coded blocks according to an embodiment of the present invention.
[0031] Figure 8 This is a diagram illustrating the types of predefined intra-frame prediction modes of an apparatus for encoding / decoding video according to an embodiment of the present invention.
[0032] Figure 9 This is a diagram illustrating an extended intra-frame prediction mode type according to an embodiment of the present invention.
[0033] Figure 10This is a flowchart that briefly illustrates an intra-frame prediction method according to an embodiment of the present invention.
[0034] Figure 11 This is a diagram illustrating a method for correcting the predicted sample of the current block based on the difference information of neighboring samples according to an embodiment of the present invention.
[0035] Figure 12 and Figure 13 This is a diagram showing a one-dimensional group of reference samples where the reference samples are rearranged into rows.
[0036] Figure 14 This is a flowchart illustrating a method for performing intra-frame prediction based on sub-blocks.
[0037] Figure 15 This is a diagram illustrating the segmentation types of sub-blocks based on intra-frame prediction modes.
[0038] Figure 16 and Figure 17 This is a diagram illustrating an example of performing intra-frame prediction based on sub-blocks.
[0039] Figure 18 This is a diagram illustrating an example of applying the same weight based on a predetermined block.
[0040] Figure 19 This is a diagram illustrating an example of performing intra-frame weighted prediction in stages. Detailed Implementation
[0041] Various modifications can be made to this invention, and various embodiments of the invention exist. Examples of these embodiments will now be provided with reference to the accompanying drawings, and examples of these embodiments will be described in detail. However, the invention is not limited thereto, and the exemplary embodiments can be interpreted as including all modifications, equivalents, or substitutions within the technical concept and scope of the invention. In the described drawings, similar reference numerals refer to similar elements.
[0042] The terms "first," "second," etc., used in this specification may be used to describe various components, but these components should not be construed as being limited to these terms. The terms are used only to distinguish one component from others. For example, without departing from the scope of the invention, a "first" component may be referred to as a "second" component, and a "second" component may similarly be referred to as a "first" component. The term "and / or" includes a combination of multiple items or any one of multiple items.
[0043] It will be understood that, in this specification, when an element is simply referred to as "connected to" or "coupled to" another element rather than "directly connected to" or "directly coupled to" another element, the element may be "directly connected to" or "directly coupled to" another element, or connected to or coupled to another element in the presence of other elements. In contrast, it should be understood that when an element is referred to as "directly coupled to" or "directly connected to" another element, there is no intermediate element.
[0044] The terminology used in this specification is for descriptive purposes only and is not intended to limit the invention. Expressions used in the singular include plural expressions unless the expression has a distinct meaning in the context. It should be understood throughout this specification that terms such as “comprising,” “having,” etc., are intended to indicate the presence of features, numbers, steps, actions, elements, components, or combinations thereof disclosed in the specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, actions, elements, components, or combinations thereof may be present or added.
[0045] Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. In the drawings, the same constituent elements are indicated by the same reference numerals, and repeated descriptions of the same elements will be omitted.
[0046] Figure 1 This is a block diagram illustrating an apparatus for encoding video according to an embodiment of the present invention.
[0047] Reference Figure 1 The device 100 for encoding video may include: an image segmentation module 110, prediction modules 120 and 125, a transformation module 130, a quantization module 135, a rearrangement module 160, an entropy coding module 165, an inverse quantization module 140, an inverse transformation module 145, a filter module 150, and a memory 155.
[0048] Figure 1 The constituent parts shown are illustrated independently to represent different functional characteristics within an apparatus for encoding video, but this does not imply that each constituent part is composed of a separate hardware or software unit. In other words, for convenience, each constituent part includes every one of the listed constituent parts. Therefore, at least two constituent parts in each constituent part can be combined to form a single constituent part, or a constituent part can be divided into multiple constituent parts to perform each function. Embodiments that combine each constituent part and embodiments that divide a constituent part are also included within the scope of this invention without departing from its spirit.
[0049] Furthermore, some constituent elements may not be essential for performing the basic functions of the invention, but are selective elements that only improve its performance. The invention can be implemented by including only the essential constituent elements necessary for realizing the essence of the invention, excluding those used to improve performance. Structures that include only the essential constituent elements, excluding those selectively used to improve performance, are also included within the scope of the invention.
[0050] Image segmentation module 110 can segment an input image into one or more processing units. Here, the processing unit can be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). Image segmentation module 110 can segment an image into a combination of multiple coding units, prediction units, and transform units, and can encode the image by selecting the combination of coding units, prediction units, and transform units according to a predetermined criterion (e.g., a cost function).
[0051] For example, an image can be segmented into multiple coding units. A recursive tree structure, such as a quadtree, can be used to segment the image into coding units. A coding unit rooted at an image or the largest coding unit and divided into other coding units can have child nodes corresponding to the number of coding units it was divided into. Coding units no longer subject to predetermined segmentation restrictions are used as leaf nodes. That is, assuming a coding unit can only be segmented into squares, a coding unit can be segmented into at most four other coding units.
[0052] In the following, in embodiments of the present invention, a coding unit may refer to a unit that performs encoding or a unit that performs decoding.
[0053] A prediction unit can be one of the partitions in a single coding unit that are divided into square or rectangular shapes of the same size, or a prediction unit can be one of the partitions in a single coding unit that are divided into such that one prediction unit in a single coding unit has a different shape and / or size than the other prediction units.
[0054] When a prediction unit is generated to perform intra-frame prediction based on a coding unit and that coding unit is not the smallest coding unit, intra-frame prediction can be performed without dividing the coding unit into multiple prediction units N×N.
[0055] Prediction modules 120 and 125 may include an inter-frame prediction module 120 that performs inter-frame prediction and an intra-frame prediction module 125 that performs intra-frame prediction. It can be determined whether inter-frame prediction or intra-frame prediction is performed on a prediction unit, and detailed information based on each prediction method (e.g., intra-frame prediction mode, motion vectors, reference image, etc.) can be determined. Here, the processing unit performing the prediction may be different from the processing unit that determines the prediction method and details. For example, the prediction method, prediction mode, etc., may be determined based on the prediction unit, and the prediction may be performed based on the transform unit. The residual value (residual block) between the generated prediction block and the original block can be input to the transform module 130. Furthermore, prediction mode information, motion vector information, etc., used for prediction can be encoded using the residual value in the entropy coding module 165 and can be transmitted to the device for decoding video. When using a specific coding mode, the original block can be sent to the device for decoding video by encoding it as is without generating a prediction block through prediction modules 120 and 125.
[0056] In some cases, the inter-frame prediction module 120 can predict prediction units based on information from at least one of the previous or subsequent images of the current image, or it can predict prediction units based on information from some coded regions in the current image. The inter-frame prediction module 120 may include a reference image interpolation module, a motion prediction module, and a motion compensation module.
[0057] The reference image interpolation module can receive reference image information from memory 155 and generate pixel information (whether it's an integer pixel or smaller) based on the reference image. In the case of luminance pixels, an interpolation filter based on an 8-tap DCT with different filter coefficients can be used to generate pixel information (whether an integer pixel or smaller) based on a 1 / 4 pixel. In the case of chrominance signals, an interpolation filter based on a 4-tap DCT with different filter coefficients can be used to generate pixel information (whether an integer pixel or smaller) based on an 1 / 8 pixel.
[0058] The motion prediction module can perform motion prediction based on a reference image interpolated by the reference image interpolation module. Various methods can be used to compute motion vectors, such as Full Search-Based Block Matching (FBMA), Three-Step Search (TSS), and New Three-Step Search (NTS). Motion vectors can have motion vector values based on 1 / 2 pixel or 1 / 4 pixel values for the interpolated pixels. The motion prediction module can predict the current prediction unit by changing the motion prediction method. Various methods can be used, such as skipping, merging, AMVP (Advanced Motion Vector Prediction), and intra-block copying.
[0059] The intra-frame prediction module 125 can generate prediction units based on reference pixel information adjacent to the current block—which is pixel information in the current image. If the neighboring block of the current prediction unit is a block undergoing inter-frame prediction and therefore the reference pixel is a pixel undergoing inter-frame prediction, the reference pixel information of the neighboring block undergoing intra-frame prediction can replace the reference pixel information included in the block undergoing inter-frame prediction. That is, when a reference pixel is unavailable, at least one of the available reference pixels can be used to replace the unavailable reference pixel information.
[0060] Intra-frame prediction can include directional prediction modes that use reference pixel information based on the prediction direction, and non-directional prediction modes that do not use directional information when performing prediction. The mode used to predict luminance information can be different from the mode used to predict chrominance information, and to predict chrominance information, intra-frame prediction mode information used to predict luminance information or predicted luminance signal information can be used.
[0061] When performing intra-frame prediction, if the size of the prediction unit is the same as the size of the transform unit, intra-frame prediction can be performed based on the pixels located to the left, top left, and top of the prediction unit. However, when performing intra-frame prediction, if the size of the prediction unit is different from the size of the transform unit, intra-frame prediction can be performed based on the transform unit using reference pixels. Furthermore, intra-frame prediction using N×N segmentation can be used only for the smallest coding unit.
[0062] In intra-frame prediction methods, depending on the prediction mode, prediction blocks can be generated after applying an AIS (Adaptive Intra-Frame Smoothing) filter to a reference pixel. The type of AIS filter applied to the reference pixel can be different. To perform the intra-frame prediction method, the intra-frame prediction mode of the current prediction unit can be predicted based on the intra-frame prediction modes of the prediction units adjacent to the current prediction unit. In the prediction of the prediction mode of the current prediction unit using mode information predicted based on neighboring prediction units, if the intra-frame prediction mode of the current prediction unit is the same as that of the neighboring prediction units, predetermined flag information can be used to transmit information indicating that the prediction modes of the current prediction unit and the neighboring prediction units are the same. If the prediction mode of the current prediction unit is different from that of the neighboring prediction units, entropy coding can be performed to encode the prediction mode information of the current block.
[0063] Furthermore, residual blocks including information about residual values, which are the differences between the predicted units and the original blocks of the predicted units, can be generated based on the prediction units generated by prediction modules 120 and 125. The generated residual blocks can be input to transformation module 130.
[0064] Transformation module 130 can transform residual blocks, including information about the residual values between the original block and the prediction units generated by prediction modules 120, 125, using transformation methods such as Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), and KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on the intra-frame prediction mode information of the prediction units used to generate the residual block.
[0065] The quantization module 135 can quantize the values transformed to the frequency domain by the transformation module 130. The quantization coefficients can vary depending on the importance or blocks of the image. The values calculated by the quantization module 135 can be provided to the inverse quantization module 140 and the rearrangement module 160.
[0066] The rearrangement module 160 can rearrange the coefficients of the quantized residual values.
[0067] The rearrangement module 160 can transform coefficients in two-dimensional block form into coefficients in one-dimensional vector form using a coefficient scanning method. For example, the rearrangement module 160 can use a zigzag scanning method to scan from DC coefficients to coefficients in the high-frequency domain, thereby transforming the coefficients into one-dimensional vector form. Depending on the size of the transform unit and the intra-frame prediction mode, a vertical scan scanning the coefficients in two-dimensional block form in the column direction or a horizontal scan scanning the coefficients in two-dimensional block form in the row direction can be used instead of a zigzag scan. That is, the choice between zigzag scanning, vertical scanning, and horizontal scanning can be determined based on the size of the transform unit and the intra-frame prediction mode.
[0068] Entropy coding module 165 can perform entropy coding based on the value calculated by rearrangement module 160. Entropy coding can use various coding methods, such as exponential Golomb coding, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).
[0069] The entropy coding module 165 can encode various information from the rearrangement module 160 and the prediction modules 120 and 125, such as block type information and residual coefficient information of the coding unit, prediction mode information, segmentation unit information, prediction unit information, transform unit information, motion vector information, reference frame information, block interpolation information, filtering information, etc.
[0070] The entropy coding module 165 can entropy code the coefficients of the coding units input from the rearrangement module 160.
[0071] The inverse quantization module 140 can perform inverse quantization on the value quantized by the quantization module 135, and the inverse transform module 145 can perform inverse transform on the value transformed by the transform module 130. The residual value generated by the inverse quantization module 140 and the inverse transform module 145 can be combined with the prediction units predicted by the motion estimation module, motion compensation module, and intra-frame prediction module of the prediction modules 120 and 125 to generate a reconstruction block.
[0072] The filter module 150 may include at least one of a deblocking filter, an offset correction unit, or an adaptive loop filter (ALF).
[0073] Deblocking filters can remove block distortion caused by boundaries between blocks in a reconstructed image. To determine whether to perform deblocking, the pixels included in several rows or columns within a block can be the basis for deciding whether to apply a deblocking filter to the current block. When applying a deblocking filter to a block, a strong or weak filter can be applied depending on the desired deblocking filtering strength. Furthermore, horizontal and vertical filtering can be processed in parallel when applying a deblocking filter.
[0074] The offset correction module can correct the offset from the original image based on the pixels in the image that has undergone deblocking. To perform offset correction on a specific image, a method that considers the edge information of each pixel to apply the offset can be used, or a method that divides the image's pixels into a predetermined number of regions, determines the regions to be offset, and applies the offset to the determined regions can be used.
[0075] Adaptive Loop Filtering (ALF) can be performed based on values obtained by comparing the filtered reconstructed image with the original image. The pixels in the image can be segmented into predetermined groups, a filter to be applied to each group can be determined, and filtering can be performed individually for each group. Information regarding whether ALF is applied and the luminance signal can be transmitted via the encoding unit (CU). The shape and filter coefficients of the filter used for ALF can vary depending on each block. Furthermore, regardless of the characteristics of the target block, a filter of the same shape (fixed shape) for ALF can be applied.
[0076] The memory 155 can store the reconstructed blocks or images calculated by the filter module 150. During inter-frame prediction, the stored reconstructed blocks or images can be provided to the prediction modules 120 and 125.
[0077] Figure 2 This is a block diagram illustrating an apparatus for decoding video according to an embodiment of the present invention.
[0078] Reference Figure 2The device 200 for decoding video may include: an entropy decoding module 210, a rearrangement module 215, an inverse quantization module 220, an inverse transform module 225, prediction modules 230 and 235, a filter module 240, and a memory 245.
[0079] When a video bitstream is input from a device used for encoding video, the input bitstream can be decoded by inverse processing of the device used for encoding video.
[0080] The entropy decoding module 210 can perform entropy decoding according to the inverse process of entropy encoding performed by the entropy encoding module of the device for encoding video. For example, various methods such as exponential Golomb coding, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) can be applied corresponding to the method performed by the device for encoding video.
[0081] The entropy decoding module 210 can decode information about intra-frame prediction and inter-frame prediction performed by the means for encoding video.
[0082] The rearrangement module 215 can perform rearrangement on the bitstream entropy decoded by the entropy decoding module 210 based on the rearrangement method used in the device for encoding video. The rearrangement module can reconstruct and rearrange coefficients in one-dimensional vector form into coefficients in two-dimensional block form. The rearrangement module 215 can receive information related to the coefficient scan performed in the device for encoding video, and can perform rearrangement via a method of reverse scanning of coefficients based on the scan order performed in the device for encoding video.
[0083] The inverse quantization module 220 can perform inverse quantization based on the quantization parameters and block rearrangement coefficients received from the device used to encode video.
[0084] The inverse transform module 225 can perform inverse transforms, namely inverse DCT, inverse DST, and inverse KLT, which are the inverse processes of DCT, DST, and KLT performed by the transform module on the quantization results of the device for encoding video. The inverse transform can be performed based on the transfer units determined by the device for encoding video. The inverse transform module 225 of the device for decoding video can selectively execute transform schemes (e.g., DCT, DST, and KLT) based on various information such as the prediction method, the size of the current block, and the prediction direction.
[0085] Prediction modules 230 and 235 can generate prediction blocks based on information about the prediction blocks received from entropy decoding module 210 and previously decoded block or image information received from memory 245.
[0086] As described above, similar to the operation of a device for encoding video, when performing intra-frame prediction, if the size of the prediction unit is the same as the size of the transform unit, intra-frame prediction can be performed on the prediction unit based on the pixels located to the left, top left, and top of the prediction unit. When performing intra-frame prediction, if the size of the prediction unit is different from the size of the transform unit, intra-frame prediction can be performed using reference pixels based on the transform unit. Furthermore, intra-frame prediction using N×N segmentation can be used only for the smallest coding unit.
[0087] Prediction modules 230 and 235 may include a prediction unit determination module, an inter-frame prediction module, and an intra-frame prediction module. The prediction unit determination module can receive various information from the entropy decoding module 210, such as prediction unit information, prediction mode information of the intra-frame prediction method, and motion prediction information about the inter-frame prediction method. It can segment the current coding unit into prediction units and determine whether to perform inter-frame prediction or intra-frame prediction on the prediction unit. Using the information required for inter-frame prediction of the current prediction unit received from the means for encoding video, the inter-frame prediction module 230 can perform inter-frame prediction on the current prediction unit based on information from at least one of the previous or subsequent images of the current image including the current prediction unit. Alternatively, inter-frame prediction can be performed based on information from some pre-reconstructed regions in the current image including the current prediction unit.
[0088] To perform inter-frame prediction, it is possible to determine for the coding unit which mode among skip mode, merge mode, AMVP mode, and inter-block copy mode should be used as the motion prediction method for the prediction unit included in the coding unit.
[0089] Intra-prediction module 235 can generate prediction blocks based on pixel information in the current image. When the prediction unit is a prediction unit undergoing intra-prediction, intra-prediction can be performed based on intra-prediction mode information of the prediction unit received from the means for encoding video. Intra-prediction module 235 may include an adaptive intra-smoothing (AIS) filter, a reference pixel interpolation module, and a DC filter. The AIS filter 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 AIS filter information received from the means for encoding video and the prediction mode of the prediction unit. If the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.
[0090] When the prediction mode of the current prediction unit is one in which intra-frame prediction is performed based on pixel values obtained by interpolating reference pixels, the reference pixel interpolation module can interpolate the reference pixels to generate reference pixels that are integers or smaller than integers. When the prediction mode of the current prediction unit is one in which prediction blocks are generated without interpolating reference pixels, interpolation of reference pixels is not required. When the prediction mode of the current block is DC mode, the DC filter can generate prediction blocks through filtering.
[0091] The reconstructed blocks or images can be provided to filter module 240. Filter module 240 may include a deblocking filter, an offset correction module, and an ALF.
[0092] Information about whether a deblocking filter should be applied to a corresponding block or image can be received from the device used for encoding video, and information about which filter, strong or weak, should be applied when applying the deblocking filter. The deblocking filter of the device used for decoding video can receive information about the deblocking filter from the device used for encoding video, and can perform deblocking filtering on the corresponding block.
[0093] The offset correction module can perform offset correction on the reconstructed image based on the type and offset value information of the offset correction applied to the image during encoding.
[0094] The ALF can be applied to the coding unit based on information received from the device used to encode video, such as whether to apply the ALF and ALF coefficient information. The ALF information can be provided as information included in a specific parameter set.
[0095] The memory 245 can store reconstructed images or blocks used as reference images or blocks, and can provide the reconstructed images to the output module.
[0096] As described above, in embodiments of the present invention, for ease of explanation, the term "encoding unit" is used as a term representing a unit used for encoding; however, the term "encoding unit" can also be used as a unit that performs both decoding and encoding.
[0097] Furthermore, the current block can represent the target block to be encoded / decoded. And, depending on the encoding / decoding steps, the current block can represent a coding tree block (or coding tree unit), a coding block (or coding unit), a transform block (or transform unit), a prediction block (or prediction unit), etc.
[0098] Images can be encoded / decoded by dividing them into basic blocks that are either square or non-square in shape. These basic blocks are called coding tree units. A coding tree unit can be limited to the largest allowed coding unit within a sequence or slice. Information about whether a coding tree unit is square or non-square, or about its size, can be signaled via a sequence parameter set, an image parameter set, or a slice header. A coding tree unit can be divided into smaller partitions. If we assume the depth of a partition generated by dividing a coding tree unit is 1, then the depth of a partition generated by dividing a partition with depth 1 can be limited to 2. That is, a partition generated by dividing a partition with depth k in a coding tree unit can be limited to a depth of k+1.
[0099] Partitions of arbitrary size generated by dividing the coding tree into units can be defined as coding units. Coding units can be recursively divided or subdivided into basic units for performing prediction, quantization, transform, or in-loop filtering. For example, partitions of arbitrary size generated by dividing coding units can be defined as coding units, or as transform units or prediction units, which are basic units for performing prediction, quantization, transform, in-loop filtering, etc.
[0100] The segmentation of a coding tree unit or coding unit can be performed based on at least one of vertical or horizontal lines. Furthermore, the number of vertical or horizontal lines used to segment the coding tree unit or coding unit can be at least one or more. For example, a coding tree unit or coding unit can be segmented into two partitions using one vertical or one horizontal line, or into three partitions using two vertical or two horizontal lines. Alternatively, a coding tree unit or coding unit can be segmented into four partitions with a length and width of 1 / 2 using one vertical and one horizontal line.
[0101] 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, these partitions may have the same size or different sizes. Alternatively, any one partition may have a different size than the other partitions.
[0102] In the embodiments described below, it is assumed that the coding tree unit or coding unit is divided into a quadtree structure, a ternary tree structure, or a binary tree structure. However, it is also possible to use a greater number of vertical lines or a greater number of horizontal lines to divide the coding tree unit or coding unit.
[0103] Figure 3 This is a diagram illustrating an example of hierarchical segmentation of coded blocks based on a tree structure according to an embodiment of the present invention.
[0104] The input video signal is decoded in predetermined block units. This default unit for decoding the input video signal is the coding block. A coding block can be a unit that performs intra / inter-frame prediction, transform, and quantization. Furthermore, a prediction mode (e.g., intra-frame prediction mode or inter-frame prediction mode) is determined based on the coding block, and prediction blocks included in a coding block can share the determined prediction mode. A coding block can be a square or non-square block of any size in the range of 8×8 to 64×64, or it can be a square or non-square block of 128×128, 256×256, or larger.
[0105] Specifically, the coded blocks can be hierarchically segmented based on at least one of quadtrees, ternary trees, or binary trees. Here, quadtree-based segmentation can mean dividing a 2N×2N coded block into four N×N coded blocks, ternary tree-based segmentation can mean dividing one coded block into three coded blocks, and binary tree-based segmentation can mean dividing one coded block into two coded blocks. Even when performing ternary tree-based or binary tree-based segmentation, square-shaped coded blocks can exist at a lower depth. Furthermore, after performing ternary tree-based or binary tree-based segmentation, square-shaped coded blocks can be restricted to be generated at a lower depth.
[0106] Binary tree-based segmentation can be performed symmetrically or asymmetrically. The coded blocks segmented based on the binary tree can be square blocks or non-square blocks, such as rectangles. For example, the segmentation types that allow binary tree-based segmentation can include at least one of the following: symmetrical types of 2N×N (horizontal non-square coding units) or N×2N (vertical non-square coding units), and asymmetrical types of nL×2N, nR×2N, 2N×nU, or 2N×nD.
[0107] Binary tree-based segmentation can be restricted to either symmetric or asymmetric segmentation. In this case, constructing a coding tree unit using square blocks corresponds to quadtree CU segmentation, and constructing a coding tree unit using symmetric non-square blocks corresponds to binary tree segmentation. Constructing coding tree units using both square blocks and symmetric non-square blocks corresponds to quadtree and binary tree CU segmentation, respectively.
[0108] Binary tree-based segmentation can be performed on coded blocks that no longer require quadtree-based segmentation. Alternatively, at least one of quadtree-based, ternary tree-based, or binary tree-based segmentation can be omitted from coded blocks that no longer require binary tree-based segmentation.
[0109] Alternatively, ternary tree-based or binary tree-based segmentation can be used for binary tree-based segmented coding blocks, but may restrictively allow only one of horizontal or vertical segmentation.
[0110] For example, for a coded block segmented based on a binary tree, the additional segmentation or direction can be restricted based on the position, index, shape, or additional segmentation type of adjacent partitions of the coded block segmented based on the binary tree. For example, when the index of the coded block that comes first in the coded block generated by binary tree segmentation is 0 (hereinafter referred to as coded block index 0) and the index of the coded block that comes later in the coded block generated by binary tree segmentation is 1 (hereinafter referred to as coded block index 1), when applying binary tree-based segmentation to all coded blocks with coded block index 0 or coded block index 1, the binary tree-based segmentation direction of the coded block with coded block index 1 can be determined based on the binary tree-based segmentation direction of the coded block with coded block index 0. Specifically, when the binary tree-based segmentation direction of the coded block with coded block index 0 segments the coded block with coded block index 0 into square partitions, the binary tree-based segmentation of the coded block with coded block index 1 can be restricted to have a different direction than the binary tree-based segmentation of the coded block with coded block index 1. Therefore, it is possible to restrict the partitioning of coded blocks with block indices 0 and 1 to square partitions. In this case, the encoding / decoding of information indicating the binary tree partitioning direction for the coded block with block index 1 can be omitted. This is because partitioning all coded blocks with block indices 0 and 1 into square partitions has the same effect as partitioning higher-depth blocks based on a quadtree; therefore, in terms of coding efficiency, it is not desirable to partition all coded blocks into square partitions.
[0111] Ternary tree-based partitioning means dividing the coded block into three partitions, either horizontally or vertically. All three partitions generated by ternary tree-based partitioning can have different sizes. Alternatively, two partitions generated by ternary tree-based partitioning can have the same size, while the third partition can have a different size. For example, depending on the partitioning direction, the width or height ratio of the partitions generated when the coded block is partitioned can be set to 1:n:1, 1:1:n, n:1:1, or m:n:1. Here, m and n can be 1 or real numbers greater than 1, such as integers like 2.
[0112] Ternary tree-based partitioning can be performed on coded blocks that are no longer subject to quadtree-based partitioning. For coded blocks that are partitioned based on a ternary tree, it is possible to set not to perform at least one of quadtree-based partitioning, ternary tree-based partitioning, or binary tree-based partitioning.
[0113] Alternatively, ternary tree-based or binary tree-based segmentation can be used for coded blocks segmented by ternary trees, but may be restricted to either horizontal or vertical segmentation.
[0114] For example, for a coded block segmented based on a ternary tree, additional segmentation or the direction of additional segmentation can be restricted based on the position, index, shape, or additional segmentation type of adjacent partitions of the coded block segmented based on the ternary tree. For example, one of horizontal or vertical segmentation can be limited to the partition with the largest size in the coded block generated by the ternary tree segmentation. Specifically, the largest partition in the coded block generated by the ternary tree segmentation can prevent binary tree segmentation or ternary tree segmentation in the same direction as the ternary tree segmentation direction of a higher-depth segmentation. In this case, for the largest partition in the coded block segmented based on the ternary tree, the encoding / decoding of information indicating the binary tree segmentation direction or the ternary tree segmentation direction can be omitted.
[0115] The segmentation at a lower depth can be determined based on the segmentation type at the higher depth. For example, when binary tree-based segmentation is allowed at two or more depths, only binary tree-based segmentations of the same type as the binary tree segmentation at the higher depth can be allowed at the lower depth. For instance, if binary tree-based segmentation of type 2NxN is performed at the higher depth, binary tree-based segmentation of type 2NxN can also be performed at the lower depth. Alternatively, if binary tree-based segmentation of type Nx2N is performed at the higher depth, binary tree-based segmentation of type Nx2N can be allowed at the lower depth.
[0116] In contrast, it is also possible to allow binary tree-based splits with different types of splits at lower depths compared to binary tree splits at higher depths.
[0117] For sequences, slices, coding tree units, or coding units, restrictions can be placed on using only specific types of binary tree-based partitioning or specific types of ternary tree-based partitioning. For example, restrictions can be placed on allowing only 2NxN or Nx2N type binary tree-based partitioning of coding tree units. The allowed partitioning types can be predefined in the encoder or decoder, and information regarding allowed or disallowed partitioning types can be encoded and transmitted via a bitstream as a signal.
[0118] Figure 5 This is a diagram illustrating an example where only specific types of binary tree-based partitioning are allowed. Figure 5 (a) shows an example that only allows binary tree-based partitioning of type N×2N, and Figure 5(b) shows an example of binary tree-based segmentation that only allows 2N×N type. To achieve adaptive segmentation based on quadtrees or binary trees, information indicating quadtree-based segmentation, information about the size / depth of the coded block that allows quadtree-based segmentation, information indicating binary tree-based segmentation, information about the size / depth of the coded block that allows binary tree-based segmentation, information about the size / depth of the coded block that does not allow binary tree-based segmentation, information about whether binary tree-based segmentation is performed in the vertical or horizontal direction, etc.
[0119] Furthermore, information regarding 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 for a coding tree unit or a specific coding unit. This information can be encoded based on the coding tree unit or coding unit and can be transmitted to the decoder via a bitstream.
[0120] For example, the syntax "max_binary_depth_idx_minus1" indicating the maximum depth allowed for binary tree splits can be encoded / decoded via a bitstream. In this case, max_binary_depth_idx_minus1+1 can indicate the maximum depth allowed for binary tree splits.
[0121] Reference Figure 6 The example shown is in Figure 6 In the code, binary tree splits have already been performed on coding units of depth 2 and depth 3. Therefore, at least one of the following can be encoded / decoded via the bitstream: information indicating the number of times a binary tree split has been performed in the coding tree unit (i.e., 2 times), information indicating the maximum depth of a binary tree split allowed in the coding tree unit (i.e., depth 3), or information indicating the number of depths of binary tree splits performed in the coding tree unit (i.e., 2 (depth 2 and depth 3)).
[0122] As another example, at least one of the following can be obtained for each sequence or slice: information about the number of allowed binary / ternary tree splits, information about the depth of allowed binary / ternary tree splits, or information about the number of allowed depths of binary / ternary tree splits. For example, this information can be encoded based on sequence, image, or slice units and transmitted via a bitstream. Alternatively, the depth of allowed binary / ternary tree splits or the number of allowed depths of binary / ternary tree splits can be defined for each sequence, image, or slice unit. Therefore, at least one of the following—the number of binary / ternary tree splits in the first slice and the second slice, the maximum depth of allowed binary / ternary tree splits in the first slice and the second slice, or the number of depths of binary / ternary tree splits performed in the first slice and the second slice—can differ from the second slice. For example, in the first slice, only a binary tree split of one depth may be allowed, while in the second slice, binary tree splits of two depths may be allowed.
[0123] As another example, the allowed number of binary / ternary tree splits, the allowed depth of binary / ternary tree splits, or the allowed depth of binary / ternary tree splits can be set differently based on the temporal ID of the slice or image. Here, the temporal ID is used to identify each of multiple layers of a video that has scalability in at least one of view, space, time, or quality.
[0124] like Figure 3 As shown, a first coding block 300 with a partitioning depth (segmentation depth) of k can be divided into multiple second coding blocks based on a quadtree. For example, the second coding blocks 310 to 340 can be square blocks with half the width and half the height of the first coding block, and the partitioning depth of the second coding blocks can be increased to k+1.
[0125] A 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 performed by selectively using either a quadtree or a binary tree, depending on the segmentation method. Here, the segmentation method can be determined based on at least one of information indicating quadtree-based segmentation or information indicating binary tree-based segmentation.
[0126] When the second coding block 310 is segmented based on a quadtree, it can be divided into four third coding blocks 310a, each having half the width and half the height of the second coding block, and the segmentation depth of the third coding blocks 310a can be increased to k+2. In contrast, when the second coding block 310 is segmented based on a binary tree, it can be divided into two third coding blocks. Here, each of the two third coding blocks can be a non-square block having one of half the width and half the height of the second coding block, and the segmentation depth can be increased to k+2. The second coding block can be determined as a horizontal or vertical non-square block depending on the segmentation direction, and the segmentation direction can be determined based on information about whether the binary tree-based segmentation is performed vertically or horizontally.
[0127] Meanwhile, the second coding block 310 can be determined as a leaf coding block that is no longer segmented based on a quadtree or binary tree. In this case, the leaf coding block can be used as a prediction block or a transform block.
[0128] Similar to the segmentation of the second coding block 310, the third coding block 310a can be determined as a leaf coding block, or it can be further segmented based on a quadtree or a binary tree.
[0129] Simultaneously, 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, and the segmentation depth of the relevant coding blocks can be increased to k+3. Alternatively, the third coding block 310b can be determined as a leaf coding block 310b-1 that is no longer segmented based on the binary tree. In this case, coding block 310b-1 can be used as a prediction block or a transform block. However, the above segmentation process can be performed restrictively based on at least one of the following: information about the size / depth of coding blocks that allow quadtree-based segmentation, information about the size / depth of coding blocks that allow binary tree-based segmentation, or information about the size / depth of coding blocks that do not allow binary tree-based segmentation.
[0130] The number of candidates representing the size of a coded block can be limited to a predetermined number, or the size of the coded block within a predetermined unit can have a fixed value. For example, the size of a coded block in a sequence or image can be limited to 256×256, 128×128, or 32×32. Information indicating the size of the coded blocks in a sequence or image can be sent via signals through the sequence header or image header.
[0131] As a result of quadtree-based and binary tree-based segmentation, the coding unit can be represented as a square or rectangle of arbitrary size.
[0132] Depending on whether the encoded block is generated based on quadtree segmentation, binary tree segmentation, or ternary tree segmentation, the application of transform skip can be restricted.
[0133] Here, if the inverse transform is skipped in both the horizontal and vertical directions of the coding block, then no inverse transform is performed in either direction. In this case, the inverse quantization residual coefficients can be scaled to a preset value to obtain residual samples of the coding block.
[0134] Omitting the inverse transformation in the horizontal direction means performing the inverse transformation in the vertical direction using DCT, DST, etc., instead of in the horizontal direction. In this case, scaling can be performed in the horizontal direction.
[0135] Omitting the inverse transformation in the vertical direction means performing the inverse transformation in the horizontal direction using DCT, DST, etc., instead of in the vertical direction. In this case, scaling can be performed in the vertical direction.
[0136] Specifically, depending on the segmentation type of the coded block, it can be determined whether the inverse transform skipping technique can be used for the coded block. For example, when the coded block is generated through binary tree-based segmentation, it is possible to restrict the use of the inverse transform skipping technique. Therefore, when the coded block is generated through binary tree-based segmentation, the residual samples of the coded block can be obtained by performing an inverse transform on the coded block. Furthermore, when the coded block is generated through binary tree-based segmentation, the encoding / decoding of information indicating whether to skip the inverse transform (e.g., transform_skip_flag) can be omitted.
[0137] Alternatively, when generating coded blocks via binary tree-based segmentation, the inverse transform skipping technique can be restricted to at least one direction, either horizontal or vertical. Here, the direction in which the inverse transform skipping technique is restricted can be determined based on information decoded from the bitstream, or adaptively based on at least one of the coded block size, coded block shape, or intra-frame prediction mode of the coded block.
[0138] For example, when the coded block is a non-square block with a width greater than its height, the inverse transform skipping technique can be allowed only in the vertical direction, and the use of the inverse transform skipping technique in the horizontal direction can be restricted. That is, when the coded block is 2N×N, the inverse transform can be performed in the horizontal direction of the coded block, and the inverse transform can be selectively performed in the vertical direction.
[0139] On the other hand, when the coded block is a non-square block with a height greater than its width, the inverse transform skipping technique can be allowed only in the horizontal direction, and the use of the inverse transform skipping technique in the vertical direction can be restricted. That is, when the coded block is N×2N, the inverse transform can be performed in the vertical direction of the coded block, and the inverse transform can be selectively performed in the horizontal direction.
[0140] Compared to the example above, when the coded block is a non-square block with a width greater than its height, the inverse transform skipping technique is only allowed in the horizontal direction, and when the coded block is a non-square block with a height greater than its width, the inverse transform skipping technique is only allowed in the vertical direction.
[0141] Information about whether to skip the inverse horizontal transform or the inverse vertical transform can be transmitted via a bitstream. For example, the information indicating whether to skip the inverse horizontal transform could be a 1-bit flag "hor_transform_skip_flag", and the information indicating whether to skip the inverse vertical transform could be a 1-bit flag "ver_transform_skip_flag". The encoder can encode at least one of "hor_transform_skip_flag" or "ver_transform_skip_flag" according to the shape of the encoded block. Furthermore, the decoder can use at least one of "hor_transform_skip_flag" or "ver_transform_skip_flag" to determine whether to skip the inverse horizontal or vertical transform.
[0142] Depending on the segmentation type of the coded block, the inverse transform in either direction can be omitted. For example, when the coded block is generated by binary tree-based segmentation, the inverse transform in either the horizontal or vertical direction can be omitted. That is, if the coded block is generated by binary tree-based segmentation, but no information indicating whether to skip the inverse transform of the coded block (e.g., transform_skip_flag, hor_transform_skip_flag, ver_transform_skip_flag) is encoded / decoded, it can be determined whether to skip the inverse transform in at least one direction relative to the horizontal or vertical direction of the coded block.
[0143] The coded block is encoded using at least one of skip mode, intra-frame prediction, inter-frame prediction, or skip method. Once the coded block is determined, the predicted block can be determined by predictive segmentation of the coded block. Predictive segmentation of the coded block can be performed using a part mode that indicates the segmentation type of the coded block. The size or shape of the predicted block can be determined based on the part mode of the coded block. For example, the size of the predicted block determined based on the part mode can be equal to or smaller than the size of the coded block.
[0144] Figure 7 This is a diagram showing the segmentation modes that can be applied to a coded block when encoding the coded block via inter-frame prediction.
[0145] When encoding blocks using inter-frame prediction, one of eight segmentation modes can be applied to the coded blocks, such as... Figure 7 The example shown is the same.
[0146] When encoding a coded block using intra-frame prediction, the partitioning mode PART_2N×2N or partitioning mode PART_N×N can be applied to the coded block.
[0147] When the coded block has a minimum size, PART_N×N can be applied. Here, the minimum size of the coded block can be predetermined in the encoder and decoder. Alternatively, information about the minimum size of the coded block can be signaled via a bitstream. For example, the minimum size of the coded block can be signaled via a slice header so that the minimum size of the coded block can be defined within each slice.
[0148] Typically, prediction blocks can range in size from 64×64 to 4×4. However, when encoding blocks via inter-frame prediction, the prediction block size can be limited to less than 4×4 to reduce memory bandwidth when performing motion compensation.
[0149] Figure 8 This is a diagram illustrating the types of predefined intra-frame prediction modes of an apparatus for encoding / decoding video according to an embodiment of the present invention.
[0150] A device for encoding / decoding video can perform intra-prediction using one of the predefined intra-prediction modes. The predefined intra-prediction modes for intra-prediction can include non-directional prediction modes (e.g., planar mode, DC mode) and 33 directional prediction modes.
[0151] Alternatively, to improve the accuracy of intra-frame prediction, a greater number of directional prediction modes than 33 can be used. That is, M extended directional prediction modes (M>33) can be defined by subdividing the angles of the directional prediction modes, and at least one of the 33 predefined directional prediction modes can be used to obtain a directional prediction mode with a predetermined angle.
[0152] Specifically, it can be used to compare Figure 8 The diagram shows 35 intra-prediction modes, which is a larger number of intra-prediction modes. Using more than 35 intra-prediction modes can be referred to as extended intra-prediction modes.
[0153] Figure 9 An example of extended intra-prediction modes is shown, and these extended intra-prediction modes can include two non-directional prediction modes and 65 extended directional prediction modes. The same number of extended intra-prediction modes can be used for both the luma and chroma components, or different numbers can be used for each component. For example, 67 extended intra-prediction modes can be used for the luma component, and 35 intra-prediction modes can be used for the chroma component.
[0154] Alternatively, depending on the chroma format, different numbers of intra-prediction modes can be used when performing intra-prediction. For example, in the case of 4:2:0 format, 67 intra-prediction modes can be used for the luma component to perform intra-prediction, and 35 intra-prediction modes can be used for the chroma component. In the case of 4:4:4 format, 67 intra-prediction modes can be used for both the luma and chroma components to perform intra-prediction.
[0155] Alternatively, depending on the size and / or shape of the block, different numbers of intra-prediction modes can be used to perform intra-prediction. That is, depending on the size and / or shape of the PU or CU, 35 or 67 intra-prediction modes can be used. For example, if the CU or PU has a size smaller than 64×64 or is asymmetrically segmented, 35 intra-prediction modes can be used. If the CU or PU is equal to or greater than 64×64, 67 intra-prediction modes can be used. For Intra_2N×2N, 65 directional intra-prediction modes are allowed, while for Intra_N×N, only 35 directional intra-prediction modes are allowed.
[0156] For each sequence, image, or slice, the size of the block to which the extended intra-prediction mode is applied can be set differently. For example, the extended intra-prediction mode can be set to apply to blocks (e.g., CU or PU) with a size greater than 64×64 in the first slice. On the other hand, the extended intra-prediction mode can be set to apply to blocks with a size greater than 32×32 in the second slice. Information indicating the size of the block to which the extended intra-prediction mode is applied can be signaled based on the sequence, image, or slice. For example, the information indicating the size of the block to which the extended intra-prediction mode is applied can be limited to "log2_extended_intra_mode_size_minus4", obtained by taking the logarithm of the block size and then subtracting the integer 4. For example, if the value of log2_extended_intra_mode_size_minus4 is 0, it can indicate that the extended intra-prediction mode can be applied to blocks with a size equal to or greater than 16×16. Furthermore, if the value of log2_extended_intra_mode_size_minus4 is 1, it indicates that the extended intra-prediction mode can be applied to blocks of size equal to or greater than 32×32.
[0157] As described above, the number of intra-prediction modes can be determined by considering at least one of the block's color components, chroma format, or size or shape. Furthermore, the number of intra-prediction mode candidates (e.g., the number of MPMs) for determining the intra-prediction mode of the current block to be encoded / decoded can also be determined based on at least one of the block's color components, color format, or size or shape. Additionally, a comparison can be used... Figure 8 The intra-prediction modes shown are a larger number of intra-prediction modes. For example, through further subdivision. Figure 8 The directional prediction mode shown can also utilize 129 directional prediction modes and 2 non-directional prediction modes. At least one of the color components, color format components, size, or shape of the block in the example described above can be considered to determine whether to use a more specific method. Figure 8 The intra-prediction modes shown are more numerous than the intra-prediction modes.
[0158] Based on the directionality of intra-prediction modes, directional intra-prediction modes can be classified into several groups. For example, the first group might indicate intra-prediction modes that are directional intra-prediction modes pointing towards the lower left and have smaller values than intra-prediction modes in the horizontal direction. The first group of intra-prediction modes could be referred to as bottom-horizontal intra-prediction modes. For instance, the first group could include intra-prediction modes with a mode value less than 10 out of 35 intra-prediction modes or less than 16 out of 67 intra-prediction modes.
[0159] The second group can indicate intra-prediction modes that start from the horizontal intra-prediction modes and have smaller mode values than the intra-prediction modes in the top-left diagonal direction. This second group of intra-prediction modes can be referred to as the top horizontal intra-prediction modes. For example, the second group may include intra-prediction modes with mode values of 10 or more but less than 18 out of 35 intra-prediction modes, or intra-prediction modes with mode values of 16 or more but less than 34 out of 67 intra-prediction modes.
[0160] The third group can indicate intra-prediction modes that have smaller mode values than the intra-prediction modes in the vertical direction, starting from the intra-prediction modes in the upper left diagonal direction. This third group of intra-prediction modes can be referred to as the left-side vertical intra-prediction modes. For example, the third group may include intra-prediction modes with mode values of 18 or greater and less than 26 out of 35 intra-prediction modes, or intra-prediction modes with mode values of 34 or greater and less than 50 out of 67 intra-prediction modes.
[0161] The fourth group can indicate intra-prediction modes with mode values that are the same as or greater than the mode values of the intra-prediction modes in the vertical direction. For example, the fourth group may include intra-prediction modes with a mode value of 26 or greater among 35 intra-prediction modes or intra-prediction modes with a mode value of 50 or greater among 67 intra-prediction modes.
[0162] It is also possible to classify directional intra-prediction modes into more than four groups or fewer than four groups, and the range of intra-prediction modes in each of the four groups can be set to a range different from the description.
[0163] Referring to the accompanying diagrams described below, the diagrams will be... Figure 1 It describes a method for determining the intra-prediction mode of the current block to be encoded / decoded and a method for performing intra-prediction using the determined intra-prediction mode.
[0164] Figure 10 This is a flowchart that briefly illustrates an intra-frame prediction method according to an embodiment of the present invention.
[0165] Reference Figure 10 The intra-prediction mode of the current block can be determined at step S1000.
[0166] Specifically, the intra-prediction mode of the current block can be obtained based on a candidate list and an index. Here, the candidate list contains multiple candidates, and these candidates can be determined based on the intra-prediction modes of neighboring blocks adjacent to the current block. Neighboring blocks can include at least one of the blocks located at the top, bottom, left, right, or corner of the current block. An index can specify one of the multiple candidates in the candidate list. The candidate specified by the index can be set as the intra-prediction mode of the current block.
[0167] Intra-prediction modes used for intra-frame prediction in adjacent blocks can be set as candidates. For example, candidates can be obtained based on the intra-prediction modes of the left block, top block, bottom-left adjacent block, top-right adjacent block, and top-left adjacent block of the current block. If adjacent blocks are encoded using inter-frame prediction, candidates for the current block can be obtained using the intra-prediction modes of the collocated blocks of adjacent blocks.
[0168] Furthermore, intra-prediction modes with a directionality similar to that of the intra-prediction modes in adjacent blocks can be designated as candidates. Here, intra-prediction modes with similar directionality can be determined by adding a predetermined constant value to or subtracting a predetermined constant value from the intra-prediction modes of adjacent blocks. The predetermined constant value can be an integer, such as 1, 2, or greater, and can be adaptively determined based on the number of available intra-prediction modes. For example, if the number of available intra-prediction modes is 35, the predetermined constant value can be set to 1; if the number of available intra-prediction modes is 67, the predetermined constant value can be set to 2; and if the number of available intra-prediction modes is 131, the predetermined constant value can be set to 4.
[0169] 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, or top-left diagonal mode. The maximum number of candidates included in the candidate list for the current block can be adjusted to adaptively add default modes.
[0170] The maximum number of candidates that can be included in the candidate list can be three, four, five, six, seven, or more. The maximum number of candidates that can be included in the candidate list can be a fixed value preset in the apparatus for encoding / decoding video, or it can be variably determined based on the characteristics of the current block. Characteristics can be the block's position / size / shape, the number / type of intra-prediction modes that the block can use, color type, color format, etc. Alternatively, information indicating the maximum number of candidates that can be included in the candidate list can be transmitted separately by signaling, and this information can be used to variably determine the maximum number of candidates that can be included in the candidate list. Information indicating the maximum number of candidates can be transmitted by signaling at at least one of the sequence level, picture level, slice level, or block level.
[0171] Candidates in the candidate list can be sorted according to 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 ordered with a higher priority than the intra-prediction mode of the left block.
[0172] When selectively using extended intra prediction modes and 35 predefined intra prediction modes, the intra prediction modes of adjacent blocks can be converted to indices corresponding to either the extended intra prediction modes or the 35 predefined intra prediction modes, thus generating candidates. For the conversion to indices, a predefined table can be used, or a scaling operation based on predetermined values can be used. Here, the predefined table can define the mapping between different groups of intra prediction modes (e.g., extended intra prediction modes and 35 predefined intra prediction modes).
[0173] For example, if the left adjacent block uses 35 intra-prediction modes and the left adjacent block has 10 intra-prediction modes (horizontal mode), it can be converted to index 16, which corresponds to the horizontal mode in the extended intra-prediction modes.
[0174] Alternatively, if the top adjacent block uses an extended intra-prediction mode and the top adjacent block's intra-prediction mode has index 50 (vertical mode), it can be converted to index 26, which corresponds to the vertical mode among the 35 intra-prediction modes.
[0175] Based on the method for determining the intra-prediction mode described above, the intra-prediction mode can be obtained independently for each of the luma and chroma components, or the intra-prediction mode of the chroma component can be obtained based on the intra-prediction mode of the luma component.
[0176] Specifically, the intra-prediction mode of the chrominance component can be determined based on the intra-prediction mode of the luminance component, as shown in Table 1 below.
[0177] [Table 1]
[0178]
[0179] In Table 1, Intra_chroma_pred_mode refers to the information sent by signal to specify the intra-prediction mode of the chroma component, and IntraPredModeY indicates the intra-prediction mode of the luma component.
[0180] Reference Figure 10 Reference samples for intra-frame prediction of the current block can be obtained at step S1010.
[0181] Specifically, reference samples for intra-frame prediction can be obtained based on neighboring samples of the current block. Neighboring samples can be reconstructed samples of neighboring blocks, and the reconstructed samples can be reconstructed samples before or after the application of the intra-loop filter.
[0182] Neighboring samples reconstructed before the current block can be used as reference samples, and neighboring samples filtered based on a predetermined intra-frame filter can also be used as reference samples. Filtering neighboring samples using an intra-frame filter can also be called reference sample smoothing. The intra-frame filter can include at least one of a first intra-frame filter applied to multiple neighboring samples located on the same horizontal line or a second intra-frame filter applied to multiple neighboring samples located on the same vertical line. Depending on the position of the neighboring samples, one of the first intra-frame filter and the second intra-frame filter can be selectively applied, or both intra-frame filters can be applied. In this case, at least one filter coefficient of the first intra-frame filter or the second intra-frame filter can be (1,2,1), but is not limited to this.
[0183] Filtering can be adaptively performed based on at least one of the intra-prediction mode of the current block or the size of the transform block of the current 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 transform block size is N×M, filtering may not be performed. Here, N and M can be the same value or different values, or they can be 4, 8, 16, or more. For example, if the transform block size is 4×4, filtering may not be performed. Alternatively, filtering can be selectively performed based on a predefined threshold and a comparison between the intra-prediction mode of the current block and the vertical mode (or horizontal mode). For example, filtering may be performed if the difference between the intra-prediction mode of the current block and the vertical mode is greater than the threshold. As shown in Table 2, thresholds can be defined for each size of the transform block.
[0184] [Table 2]
[0185] 8x8 transformation 16x16 transformation 32x32 transformation threshold 7 1 0
[0186] An intra-frame filter can be determined as one of a plurality of predefined intra-frame filter candidates in an apparatus for encoding / decoding video. For this purpose, a separate index of the intra-frame filter for the current block among the plurality of intra-frame filter candidates can be signaled. 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 transform block, information about the filter strength, or changes in surrounding samples.
[0187] Intra-frame prediction on the current coding block can be performed using multiple reference sample lines. For example, intra-frame prediction on the current coding block can be performed using two or more reference sample lines.
[0188] Whether to use multiple reference sample lines to perform intra-prediction can be determined based on the size / shape of the current block, the intra-prediction mode, etc. 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 to perform intra-prediction can be restricted. Here, the directional direction can include the vertical direction, the horizontal direction, or the diagonal direction.
[0189] Reference Figure 10 In step S1020, intra-prediction can be performed using the intra-prediction mode of the current block and the reference sample.
[0190] In other words, the intra-prediction mode determined in step S1000 and the reference samples obtained in step S1010 can be used to obtain the prediction sample for the current block. When performing intra-prediction using multiple reference sample lines, the prediction sample can be obtained based on the weighted sum of reference samples belonging to different reference sample lines. For example, the prediction sample can be obtained based on the weighted sum 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, depending on the distance to the target prediction sample, the weights applied to the first and second reference samples can have the same value or different values. For example, in the first and second reference samples, the reference sample closer to the target prediction sample can be given a higher weight.
[0191] However, in the case of intra-frame prediction, boundary samples from adjacent blocks can be used, which degrades the quality of the predicted image. Therefore, a correction process can be performed on the predicted samples generated by the prediction process described above, and a reference can be used. Figure 11The correction process is described in detail. However, the correction process is not limited to intra-frame predicted samples, but can also be applied to inter-frame predicted samples or reconstructed samples.
[0192] Figure 11 This is a diagram illustrating a method for correcting the predicted sample of the current block based on the difference information of neighboring samples according to an embodiment of the present invention.
[0193] The predicted samples of the current block can be corrected based on the difference information of multiple neighboring samples. Correction can be performed on all predicted samples in the current block, or it can be performed on predicted samples in a predetermined partial region. The partial region can be a row / column or multiple rows / columns, and these partial regions can be preset regions for correction in an apparatus for encoding / decoding video. For example, correction can be performed on a row / column located at the boundary of the current block, or correction can be performed on multiple rows / columns located from the boundary of the current block. Alternatively, the partial region can be variably determined based on at least one of the size / shape of the current block or an intra-frame prediction mode.
[0194] Neighboring samples may belong to neighboring blocks located at the top, left, and top-left corner of the current block. The number of neighboring samples used for correction can be 2, 3, 4, or more. The positions of neighboring samples can be variably determined based on the position of the predicted sample that serves as the correction target in the current block. Alternatively, some neighboring samples may have fixed positions regardless of the position of the predicted sample that serves as the correction target, and the remaining neighboring samples may have variable positions depending on the position of the predicted sample that serves as the correction target.
[0195] The difference information between adjacent samples can refer to the difference between adjacent samples, or it can refer to the value obtained by scaling the difference sample by a predetermined constant value (e.g., 1, 2, 3, etc.). Here, the predetermined constant value can be determined by considering the position of the predicted sample as the correction target, including the column or row position of the predicted sample as the correction target, the position of the predicted sample in the column or row, etc.
[0196] For example, if the intra-frame prediction mode of the current block is vertical, the final prediction sample can be obtained by using the difference between the neighboring sample p(-1,y) near the left boundary of the current block and the top-left neighboring sample p(-1,-1), as shown in Equation 1.
[0197] [Equation 1]
[0198] P′(0,y)=P(0,y)+((p(-1,y)-p(-1,-1))>>1, for y=0...N-1
[0199] For example, if the intra-frame prediction mode of the current block is horizontal, the final prediction sample can be obtained by using the difference sample between the neighboring sample p(x,-1) near the top boundary of the current block and the top-left neighboring sample p(-1,-1), as shown in Equation 2.
[0200] [Equation 2]
[0201] P′(x, 0) = p(x, 0) + ((p(x, -1) - p(-1, -1)) >> 1, for x = 0...N-1
[0202] For example, if the intra-frame prediction mode of the current block is vertical, the final predicted sample can be obtained using the difference sample between the neighboring sample p(-1,y) near the left boundary of the current block and the top-left neighboring sample p(-1,-1), as shown in Equation 2. Here, the difference sample can be added to the predicted sample, or the difference sample can be scaled by a predetermined constant value and then added to the predicted sample. The predetermined constant value used for scaling can be determined differently depending on the column and / or row. For example, the predicted sample can be corrected as shown in Equations 3 and 4.
[0203] [Equation 3]
[0204] P′(0,y)=P(0,y)+((p(-1,y)-p(-1,-1))>>1, for y=0...N-1
[0205] [Equation 4]
[0206] P'(1,y)=P(1,y)+((p(-1,y)-p(-1,-1))>>2, for y=0...N-1
[0207] For example, if the intra-frame prediction mode for the current block is horizontal, the final predicted sample can be obtained using the difference between the neighboring sample p(x,-1) near the left boundary of the current block and the top-left neighboring sample p(-1,-1), as described above in horizontal mode. For example, the predicted sample can be corrected as shown in Equations 5 and 6 below.
[0208] [Equation 5]
[0209] P′(x, 0) = p(x, 0) + ((p(x, -1) - p(-1, -1)) >> 1, for x = 0...N-1
[0210] [Equation 6]
[0211] P'(1,y)=P(1,y)+((p(-1,y)-p(-1,-1))>>2, for y=0...N-1
[0212] When the intra-prediction mode of the current block is a directional prediction mode, intra-prediction of the current block can be performed based on the directionality of the directional prediction mode. For example, Table 3 shows the intra-predAng parameter intraPredAng from mode 2 to mode 34. Modes 2 to 34 are... Figure 8 The directional intra-frame prediction mode is shown.
[0213] [Table 3]
[0214]
[0215] Table 3 describes 33 directional intra-prediction modes as examples, but more or fewer directional intra-prediction modes can be specified.
[0216] The intra-frame direction parameters of the current block can be determined based on a lookup table that defines the mapping between the directional intra-prediction mode and the intra-frame direction parameters. Alternatively, the intra-frame direction parameters of the current block can be determined based on information transmitted via signals through a bitstream.
[0217] Depending on the directionality of the directional intra-prediction mode, at least one of the left-hand reference sample or the top-hand reference sample can be used to perform intra-prediction for the current block. Here, the top-hand reference sample can be a reference sample whose y-axis coordinate is less than the predicted target sample (x, 0) included in the top row of the current block (e.g., (-1, -1) to (2W-1, -1)), and the left-hand reference sample can be a reference sample whose x-axis coordinate is less than the predicted target sample (0, y) included in the leftmost column of the current block (e.g., (-1, -1) to (-1, 2H-1)).
[0218] Depending on the directionality of the intra-prediction mode, the reference samples of the current block can be arranged in one dimension. Specifically, if both the top and left reference samples should be used for the intra-prediction of the current block, it is assumed that the top and left reference samples are arranged in a line along the vertical or horizontal direction, and a reference sample for each predicted target sample can be selected.
[0219] For example, when the intra-frame orientation parameter is negative (e.g., corresponding to the intra-frame prediction modes 11 to 25 in Table 3), the top 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.
[0220] Figure 12 and Figure 13 This is a diagram showing a one-dimensional set of reference samples in which reference samples are rearranged into lines.
[0221] The directionality of the intra-prediction mode can be used to determine whether the reference samples are rearranged vertically or horizontally. For example, if the intra-prediction mode index is between 11 and 18, such as... Figure 12 As shown in the example, the top reference sample of the current block can be rotated counterclockwise to generate a one-dimensional reference sample group in which the left reference sample and the top reference sample are arranged vertically.
[0222] On the other hand, if the intra-frame prediction mode index is between 19 and 25, such as Figure 13 As shown in the example, the left reference sample of the current block can be rotated clockwise to generate a one-dimensional reference sample group in which the left reference sample and the top reference sample are arranged in the horizontal direction.
[0223] If the intra-direction parameter of the current block is not negative, intra-prediction of the current block can be performed using only the left or top reference sample. 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 sample.
[0224] Based on the intra-frame orientation parameters, a reference sample determination index iIdx can be obtained to specify at least one reference sample for predicting the target sample. Furthermore, a weight-related parameter ifact can be obtained to determine the weights applied to each reference sample based on the intra-frame orientation parameters. For example, Equations 7 and 8 show examples of obtaining the reference sample determination index and the weight-related parameter.
[0225] [Equation 7]
[0226] iIdx=(y+1)*(P ang / 32)
[0227] ifact = [(y+1)*P ang ]31
[0228] As shown in Equation 7, iIdx and ifact are variably determined based on the slope of the directional intra-prediction mode. In this case, the reference sample specified by iIdx can correspond to an integer pixel.
[0229] Indexing based on reference samples allows for the specification of at least one reference sample for each prediction sample. For example, indexing can be based on reference samples to specify the position of a reference sample within a one-dimensional set of reference samples used to predict the target sample in the current block. Based on the reference sample at the specified position, a prediction image (i.e., a prediction sample) of the target sample can be generated.
[0230] Considering the intra-prediction mode of the current block, if the target sample can be predicted using only one reference sample, then the predicted image of the target sample can be generated based on the reference sample specified by the intra-prediction mode of the current block.
[0231] For example, when an imaginary angular line, based on the angle or slope of the intra-prediction mode, crosses an integer pixel in a one-dimensional reference sample group (i.e., a reference sample at an integer position), a predicted image of the target sample can be generated by copying the reference sample at the integer pixel position or by considering the position between the reference sample at the integer pixel position and the target sample. For example, Equation 8 below shows an example of generating a predicted image P(x, y) of the target sample by copying a reference sample P_ref_1D(x+iIdx+1) in a one-dimensional reference sample group specified by the intra-prediction mode of the current block.
[0232] [Equation 8]
[0233] P(x, y) = P_ref_1D(x + iIdx + 1)
[0234] Considering the intra-prediction mode of the current block, when it is determined that the target sample is not predicted using only one reference sample, multiple reference samples can be used to perform prediction on the target sample. Specifically, depending on the intra-prediction mode of the current block, the target sample can be predicted by performing linear interpolation or tap-based interpolation on the reference sample at a predetermined position and its neighboring reference samples. The number of taps in the interpolation filter can be two or more natural numbers. Specifically, depending on the number of reference samples to be interpolated, the number of taps in the tap filter can be 2, 3, 4, 5, 6, or more integers.
[0235] For example, since the imaginary corner of the intra-prediction mode, based on its angle or slope, does not cross integer pixels in a one-dimensional reference sample group (i.e., reference samples at integer positions), a predicted image of the target sample can be generated by interpolating the reference samples placed on the corresponding corner and the reference samples to the left / right or top / bottom of neighboring reference samples. For example, Equation 9 below shows an example of generating a predicted sample P(x, y) for the target sample by interpolating two or more reference samples.
[0236] [Equation 9]
[0237] P(x, y) = (32 - i fact ) / 32*P_ref_1D(x+iIdx+1)+i fact / 32*P_ref_1D(x+iIdx+2)
[0238] It can be based on the weight-related parameter i fact The coefficients of the interpolation filter are then determined. As an example, the coefficients of the interpolation filter can be determined based on the distance between integer pixels located on the corner (i.e., integer positions of each reference sample) and fractional pixels.
[0239] Equation 10 below shows the case where the number of taps in the tapped filter is 4.
[0240] [Equation 10]
[0241] 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)
[0242] When using a multi-tap filter, a sample at a position that does not correspond to either the left-hand or top-hand reference sample can be replaced with the nearest reference sample at that position. For example, in Equation 9, if the sample at position P_ref_1D(x+iIdx-1) does not correspond to the top-hand reference sample, it can be replaced with the reference sample at position P_ref_1D(x+idx). Alternatively, if the sample at position P_ref_1D(x+iIdx+2) does not correspond to the top-hand reference sample, it can be replaced with the reference sample at position P_ref_1D(x+iIdx+1).
[0243] Multi-tap filters can be applied to multiple reference samples arranged in a line along a horizontal or vertical direction. Alternatively, multi-tap filters can be applied to a predetermined polygon, such as a rectangle. The shape to which the multi-tap filter is applied can be variably determined based on the size, shape, or intra-frame prediction mode of the current block.
[0244] As shown in Equations 8 to 10, generating prediction samples by using intra-frame prediction directional interpolation reference samples can be called intra-frame prediction sample interpolation technique.
[0245] When using intra-frame prediction sample interpolation techniques, a large number of taps in the tap filter does not necessarily guarantee improved prediction accuracy. For example, in cases where the current block size is an asymmetric coding unit where one of its height or width is significantly larger than the other (e.g., 2x16) or a small block (e.g., 4x4), using a tap filter with four or more taps may lead to over-smoothing of the predicted image. Therefore, the type of tap filter can be adaptively determined based on the size, shape, or intra-frame prediction mode of the current block. Here, the type of tap filter can be classified by at least one of the following: the number of taps, filter coefficients, filter strength (strong / weak), or filter direction. The number of filter taps or filter coefficients can be variably determined based on the filter strength. Furthermore, the application 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 application direction of the tap filter can be variably set based on lines (rows or columns) or samples in the current block.
[0246] Specifically, the type of tap filter to be used 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 predetermined value, intra-frame predictive sample interpolation can be performed by using a 2-tap filter instead of a 4-tap filter. On the other hand, if both the width and height of the current block are greater than or equal to the predetermined values, a 4-tap filter can be used to perform intra-frame predictive sample interpolation. Here, the predefined value can represent values such as 4, 8, or 16.
[0247] 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-frame predictive sample interpolation. On the other hand, if the width and height of the current block are the same, a 4-tap filter can be used to perform intra-frame predictive sample interpolation.
[0248] Alternatively, the type of tap filter to use can be determined based on the ratio of the width to the height of the current block. For example, if the ratio of the width (w) to the height (h) 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. On the other hand, if the ratio of the width to the height of the current block is greater than or equal to a predefined threshold, a 4-tap filter can be used to perform intra-frame predictive sample interpolation.
[0249] 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 type coding unit and its intra-prediction mode is a horizontal intra-prediction mode, a tap filter with n taps can be used to perform intra-prediction sample interpolation. On the other hand, if the current block is a 2x16 type coding unit and its intra-prediction mode is a vertical intra-prediction mode, a tap filter with m taps can be used to perform intra-prediction sample interpolation.
[0250] On the other hand, when the current block is a 16x2 type coding unit and the intra-prediction mode of the current block belongs to the horizontal intra-prediction mode, a tap filter with n taps can be used to perform intra-prediction sample interpolation. Conversely, when the current block is a 16x2 type coding unit and the intra-prediction mode of the current block belongs to the vertical intra-prediction mode, a tap filter with m taps can be used to perform intra-prediction sample interpolation.
[0251] Here, the horizontal range can indicate a predetermined range including intra-prediction modes in the horizontal direction, while the vertical range can indicate a predetermined range including intra-prediction modes in the vertical direction. For example, based on 35 intra-prediction modes, the horizontal range can indicate intra-prediction modes between mode 11 and mode 18, and the vertical range can indicate intra-prediction modes between mode 19 and mode 27.
[0252] 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, but at least one of the filter coefficients or filter strengths of the n-tap filter and the m-tap filter can be set differently.
[0253] A block can be divided into multiple sub-blocks, and intra-prediction can be performed on a sub-block basis. In this case, sub-blocks belonging to the same block can have the same intra-prediction mode. However, the range of reference samples referenced by each sub-block may be different. That is, in Figure 10 In the example shown, the reference sample acquisition step S1010 and the intra-frame prediction execution step S1020 can be performed on a sub-block basis.
[0254] A block comprising multiple sub-blocks can be a coded block, a prediction block, or a transform block. Alternatively, a block comprising multiple sub-blocks can be a predetermined region that shares the same intra-frame prediction mode and the same MPM candidate list.
[0255] The size and shape of a block (or region) comprising multiple sub-blocks can have an NxM shape predefined in the encoder and decoder. Here, N and M can be the same or different natural numbers.
[0256] Alternatively, information specifying the size and shape of a block (or region) comprising multiple sub-blocks can be transmitted via a bit stream using signals. The size and shape of a block (or region) comprising multiple sub-blocks can be variably determined based on the information transmitted via signals.
[0257] For ease of description, an intra-prediction target block (or region) comprising multiple sub-blocks will be referred to as the current block. The method of performing intra-prediction on a sub-block basis will be described in detail below.
[0258] Figure 14 This is a flowchart illustrating a method for performing intra-frame prediction based on sub-blocks.
[0259] Reference Figure 14 First, the segmentation type S1410 of the current block can be determined.
[0260] The segmentation type of the current block can be determined based on at least one of the current block's size, shape, or intra-prediction mode. For example, if the current block's intra-prediction mode is vertical or similar, the segmentation type of the current block can have sub-blocks arranged vertically. On the other hand, if the current block's intra-prediction mode is horizontal or similar, the segmentation type of the current block can have sub-blocks arranged horizontally. Here, an intra-prediction mode similar to a specific direction can be an intra-prediction mode whose angle is within a predetermined angle relative to the specific direction, or an intra-prediction mode whose mode value difference with the intra-prediction mode of the specific direction is within a predetermined value.
[0261] Figure 15 This is a diagram illustrating the segmentation types of sub-blocks based on intra-frame prediction modes.
[0262] like Figure 15 The example shown illustrates that, in the case of an intra-prediction mode with the upper-right orientation, the current block can be segmented into sub-blocks with a width greater than its height (NxM shape, where N>M). Conversely, in the case of an intra-prediction mode with the upper-left orientation, the current block can be segmented into sub-blocks with a height greater than its width (NxM shape, where N>M). <M)。
[0263] As another example, the segmentation type of the coded block can be determined based on whether the intra-prediction mode of the current block has a specific direction. For instance, if the current block has an intra-prediction mode in the upper-right direction, the segmentation type of the current block can be determined as vertically arranged sub-blocks. On the other hand, if the current block has an intra-prediction mode other than the upper-right direction, the segmentation type of the current block can be determined as horizontally arranged sub-blocks.
[0264] Alternatively, information indicating the segmentation type of the current block can be transmitted via a bitstream signal. In this case, the information indicating the segmentation type may include at least one of the following: an index specifying the segmentation type, information indicating the size and shape of the sub-blocks, or information indicating the segmentation direction of the current block.
[0265] Sub-blocks can be square or non-square. Alternatively, sub-blocks can be generated by dividing the current block based on rows or columns, or by dividing the current block based on multiple rows or columns.
[0266] When generating multiple sub-blocks by segmenting the current block, intra-prediction S1420 can be performed based on the sub-blocks. In this case, intra-prediction can be performed sequentially according to the position of the sub-blocks.
[0267] Figure 16 and Figure 17 This is a diagram illustrating an example of performing intra-frame prediction based on sub-blocks.
[0268] To perform intra-frame prediction based on sub-blocks, a block can be divided into multiple sub-blocks. Although in Figure 16 and Figure 17 The example shown illustrates dividing the coded block into two sub-blocks, but it is also possible to divide the coded block into more sub-blocks.
[0269] Multiple sub-blocks can have the same intra-prediction mode. For example, the intra-prediction mode of the first sub-block and the intra-prediction mode of the second sub-block can both be the intra-prediction mode in the upper right direction.
[0270] Intra-prediction of the first sub-block, which is adjacent to the top or left boundary of the current block, can be performed using reference samples adjacent to the coded block. As an example, intra-prediction of the first sub-block can be performed using at least one of the top or left reference samples adjacent to the coded block, depending on the intra-prediction mode.
[0271] After performing intra-prediction of the first sub-block, intra-prediction of the second sub-block adjacent to the first sub-block can be performed by setting the samples included in the first sub-block as reference samples. For example, samples located at the bottom boundary of the first sub-block adjacent to the second sub-block can be set as reference samples for intra-prediction of the second sub-block. In this case, the samples of the first sub-block can be predicted samples, residual samples, or reconstructed samples reconstructed using the predicted samples and residual samples of the first sub-block.
[0272] As an example, in Figure 17 The example shown illustrates setting the neighboring sample adjacent to the top of the second sub-block as the reference sample of the second sub-block (in... Figure 17 (referred to as "second reference sample" in Chinese).
[0273] Alternatively, intra-frame prediction of the second sub-block may include a first intra-frame prediction using reference samples adjacent to the current block and a second intra-frame prediction using reference samples from the first sub-block. For example, the predicted samples in the second sub-block can be obtained as a weighted sum between a first predicted sample generated based on the first intra-frame prediction and a second predicted sample generated based on the second intra-frame prediction. In this case, the weights applied to the first and second predicted samples can have the same value or can be set differently depending on the distance from the target sample.
[0274] The residual samples of the current block to which intra-frame prediction is performed can be obtained through inverse quantization and inverse transform. In this case, when multiple transforms are applied to the current block, the units to which the transforms are applied can be variably determined according to the transform order. For example, the first transform can be performed based on the coded block, and the second transform can be performed based on the sub-block. In this case, the reference samples of the second sub-block can be configured using samples from the first sub-block to which the second transform is applied (i.e., residual samples). For example, the reference samples of the second sub-block can be obtained as the sum of the residual samples and the predicted samples in the first sub-block.
[0275] Depending on the intra-frame prediction mode, there may be situations where samples at unpredicted or unreconstructed locations should be used as reference samples. For example, in Figure 17 In the example shown, the samples adjacent to the top right corner of the second sub-block and the samples to the right of the samples are likely to be samples that have not yet been predicted or reconstructed. In this case, the unpredicted or unreconstructed samples can be replaced by the samples located at the right boundary of the first sub-block or by interpolation of a predetermined number of samples included in the first sub-block.
[0276] When a first sub-prediction block is generated by performing intra-frame prediction on the first sub-block and a second sub-prediction block is generated by performing intra-frame prediction on the second sub-block, the prediction block of the current block can be generated by merging the first and second sub-prediction blocks.
[0277] Whether to perform intra-prediction of the current block based on sub-blocks can be adaptively determined based on the size, shape, or intra-prediction mode of the current block. For example, whether to perform intra-prediction of the current block based on sub-blocks can be determined based on whether the intra-prediction mode of the current block is a directional mode in a specific direction.
[0278] Alternatively, information indicating whether to perform intra-frame prediction of the current block based on sub-blocks can be encoded and transmitted via a bitstream as a signal. This information can be transmitted as a signal based on blocks, slices, or images.
[0279] In the implementation described above, it is assumed that an intra-prediction mode is applied to the current block. However, intra-prediction can be performed on the current block using multiple intra-prediction modes. Here, multiple intra-prediction modes can be represented by a combination of a non-directional intra-prediction mode and at least one directional intra-prediction mode, a combination of multiple directional intra-prediction modes, or a combination of multiple non-directional intra-prediction modes.
[0280] For example, different intra-prediction modes or different directional intra-prediction modes can be applied to each predicted target sample in the current block. To determine the intra-prediction mode for each predicted target sample, information indicating the difference between the intra-prediction mode and the previously predicted target sample can be signaled via a bitstream.
[0281] For example, the current block can be divided into multiple regions, and different intra-prediction modes can be applied to the divided regions. Here, the multiple regions can represent a predetermined number of sample units and block units of a predetermined size / shape. For example, the current block can be divided into multiple sub-blocks with a predetermined shape / size. Alternatively, the multiple regions can be generated by dividing the current block into predetermined row / column units. For example, the region including the rows / columns on both sides of the current block is set as the first region, and the other regions are set as the second region, so that different intra-prediction modes can be applied to the first region and the second region. The multiple regions can be variably determined according to the size of the current prediction block, the number of samples, etc., or, regardless of these elements, the multiple regions can have a fixed number predefined in the encoder and decoder.
[0282] Using multiple reference samples, intra-frame prediction for the current block can be performed. Specifically, prediction samples can be generated based on a weighted sum operation among multiple reference samples, and this can be called intra-weighted prediction.
[0283] Intra-weighted prediction can be performed using multiple non-adjacent reference samples or groups of non-adjacent reference samples. For example, intra-weighted prediction can be performed based on a weighted sum of top and left reference samples, or it can be performed based on a weighted sum of n spatially adjacent top reference samples and m spatially adjacent left reference samples. n and m can have the same value or they can have different values.
[0284] The positions of the top and left reference samples used for intra-weighted prediction can be specified by the directionality of the intra-prediction mode. For example, one of the top and left reference samples can be selected by applying the intra-prediction mode of the current block in the positive direction, and the other can be selected by applying the intra-prediction mode of the current block in the negative direction. For example, if the intra-prediction mode of the current block is in the upper-right diagonal direction, intra-weighted prediction can be performed using the top reference sample located in the upper-right diagonal direction of the predicted target sample and the left reference sample located in the lower-left diagonal direction of the predicted target sample.
[0285] Depending on the location of the target sample to be predicted, a reference sample can be adaptively selected for intra-frame weighted prediction. For example, at least one of a top reference sample with the same x-axis coordinate as the target sample to be predicted or a left reference sample with the same y-axis coordinate as the target sample to be predicted can be used for intra-frame weighted prediction.
[0286] Intra-weighted prediction can be performed using reference samples at fixed locations. For example, at least one of the reference samples adjacent to the left corner of the current block, the upper right corner of the current block, or the lower left corner of the current block can be used for intra-weighted prediction.
[0287] The weights applied to the top and left reference samples can be determined based on the location of the predicted target sample or the distance between the predicted target sample and each reference sample. Equation 11 is an example of intra-frame weighted prediction and illustrates a method for obtaining the predicted sample p(x,y) of the predicted target sample at position (x,y).
[0288] [Equation 11]
[0289]
[0290] In Equation 11, P_ref(x+y+2, -1) represents the top reference sample of the current block, and P_ref(-1, x+y+2) represents the left reference sample of the current block. In Equation 11, the positions of the top and left reference samples can be determined based on the intra-prediction mode or the direction of the intra-prediction mode of the current block. As shown in Equation 11, the weights applied to the top and left reference samples can be determined based on the position of the predicted target sample or the distance to the predicted target sample.
[0291] Equation 12, as another example of intra-frame weighted prediction, illustrates a method for obtaining the predicted sample p(x,y) of the predicted target sample at position (x,y).
[0292] [Equation 12]
[0293] P(x,y)=HorW×P_ref(x+y+2,-1)+VerW×P_ef(-1,x+y+2)+(x+y+1) / 2>>S[+y])
[0294] In Equation 12, the positions of the top and left reference samples can be determined based on the intra-prediction mode of the current block or the direction of the intra-prediction mode. Equation 11 uses the division operator, which has high implementation complexity, while Equation 12 uses a shift operation. In Equation 12, the variable S[n] can be defined as follows.
[0295]
[0296] Furthermore, the weights HorW and VerW applied to the top reference sample and the left reference sample can be determined according to Equation 13 below.
[0297] [Equation 13]
[0298] HorW = 1 << S[x+y]-VerW, if x < y
[0299] HorW = (y+1)*S[x+y+2], if x>=y
[0300] VerW = (x+1)*S[x+y+2], if x < y
[0301] VerW = (1 << S[x+y]) - HorW, if x >= y
[0302] As shown in Equation 13, the weights applied to the top and left reference samples can be determined based on the position of the predicted target sample or the distance between the predicted target sample and each reference sample.
[0303] As another example, instead of setting different weights for the top and left reference samples for each predicted target sample, the weights applied to the top and left reference samples can be determined on a predetermined block basis. That is, intra-frame weighted prediction of the predicted samples included in a predetermined block unit can be performed by applying the same weights to the top reference sample and the same weights to the left reference sample.
[0304] Figure 18 This is a diagram illustrating an example of applying the same weights based on a predetermined block.
[0305] exist Figure 18 In the example shown, the same weights are applied to the 4×4 sub-blocks. When the same weights are applied to the sub-blocks, the predicted sample at position (x, y) can be obtained as shown in Equation 14 below.
[0306] [Equation 14]
[0307] P(x,y)=(x′+1)×P_ref(x+y+2,-1)+(y′+1)×P_ref(-1,x+y+2)+(x+y+2) / 2>>(x′+y′+1)
[0308] The variables x' and y' in Equation 14 can be obtained based on the size of the sub-blocks with the same weights, as shown in Equation 15.
[0309] [Equation 15]
[0310] x′=floor(y / sub_width), y′=floor(y / sub_height)
[0311] In Equation 15, the floor(x) function represents the largest integer less than or equal to x. Sub_width and sub_height represent the width and height of sub-blocks with the same weight, respectively.
[0312] A predefined block unit can be a block unit in which intra-frame prediction is performed, such as a coded block, prediction block, or transform block, or it can be a sub-block smaller than the block unit in which intra-frame prediction is performed. The size and shape of the sub-block can be predefined in the encoder and decoder, or information indicating the size and shape of the sub-block can be sent by signaling via a bitstream.
[0313] Whether to perform intra-weighted prediction can be variably determined based on the size, shape, or intra-prediction mode of the current block. For example, whether to perform intra-weighted prediction can be determined based on whether the intra-prediction mode of the current block is planar, DC, horizontal, vertical, or diagonal. A diagonal mode can indicate an intra-prediction mode with a specific orientation (e.g., corresponding to intra-prediction modes of 2, 34, or 66), or it can indicate any intra-prediction mode with similar orientations within a specific range. Specifically, if the intra-prediction mode of the current block is horizontal or vertical, intra-weighted prediction may not be used. Alternatively, whether to perform intra-weighted prediction can be determined based on whether the intra-prediction mode belongs to a predefined group of intra-prediction modes.
[0314] Alternatively, intra-weighted prediction can replace any directional intra-prediction mode. For example, if the upper-right diagonal intra-prediction mode is selected, intra-weighted prediction can be used. Figure 9 Taking the 67 intra-prediction modes shown as an example, the upper right diagonal prediction mode with intra-prediction mode 66 can be used as an intra-weighted prediction mode.
[0315] Alternatively, information indicating whether to perform intra-weighted prediction can be sent via a bitstream using a signal. This information can only be sent via signal if the intra-prediction mode of the current block has a predefined direction. For example, if the upper-right diagonal intra-prediction mode is selected, whether to perform intra-weighted prediction can be determined based on the information sent via a signal through the bitstream. The information can be a 1-bit flag, but is not limited to this. Figure 9 Taking the 67 intra-prediction modes shown as an example, when the intra-prediction mode of the current block is 66, the flag indicating whether to perform intra-weighted prediction can be decoded.
[0316] Intra-weighted prediction can be performed by performing intra-prediction to obtain prediction samples and then performing a weighted sum operation between the obtained prediction samples and an additional reference sample. That is, intra-weighted prediction can be performed by additionally applying reference samples to the intra-prediction and processing the intra-prediction results.
[0317] Figure 19 This is a diagram illustrating an example of performing intra-frame weighted prediction in stages.
[0318] As such Figure 19 The example shown first allows for intra-block prediction of the current block. For instance, if the intra-block prediction mode is the upper-right diagonal direction, the predicted samples in the current block can be generated based on reference samples located in the upper-right direction of the predicted target samples.
[0319] When obtaining prediction samples through intra-frame prediction, the final prediction sample can be obtained by a weighted sum of the prediction sample and the reference samples of the neighboring current block. As an example, ... Figure 19 The example shown illustrates that the final prediction sample can be obtained by a weighted sum operation between the prediction sample p(x, y) obtained through intra-frame prediction and the top reference sample p(x+y+2, -1) at the top of the neighboring current block.
[0320] exist Figure 19 In the example shown, when the intra-prediction mode of the current block is the upper-right diagonal direction, the top reference sample is used to perform intra-weighted prediction. That is, when using the top reference sample to perform intra-prediction based on the intra-prediction mode of the current block, at least one of the top reference samples can be used to perform intra-weighted prediction, such as... Figure 19 The example shown. Although not shown, when performing intra-prediction using left-side reference samples according to the intra-prediction mode of the current block, at least one of the left-side reference samples can be used to perform intra-weighted prediction.
[0321] In contrast, when performing intra-prediction using top reference samples based on the intra-prediction mode of the current block, at least one of the left reference samples can be used to perform intra-weighted prediction. Furthermore, when performing intra-prediction using left reference samples based on the intra-prediction mode of the current block, at least one of the top reference samples can also be used to perform intra-weighted prediction.
[0322] Alternatively, intra-weighted prediction can be performed to apply both the top and left reference samples to the prediction samples obtained based on the intra-prediction mode of the current block.
[0323] In cases where the intra-prediction mode of the current block has a right-top diagonal direction, intra-weighted prediction can also be performed by using the left-side reference sample.
[0324] As in the example described above, intra-weighted prediction can be selectively performed based on the size, shape, or intra-prediction mode of the current block.
[0325] For example, intra-weighted prediction can be selectively performed based on whether the intra-prediction mode of the current block is planar, vertical, horizontal, or diagonal. For instance, if the intra-prediction mode of the current block is top-horizontal or left-vertical, intra-weighted prediction is not performed; however, if the intra-prediction mode of the current block is bottom-horizontal or right-vertical, intra-weighted prediction can be performed. If the intra-prediction mode of the current block is bottom-horizontal, intra-weighted prediction is performed using Equation 16 below; if the intra-prediction mode of the current block is right-vertical, intra-weighted prediction can be performed using Equation 17.
[0326] [Formula 16]
[0327]
[0328] [Equation 17]
[0329]
[0330] Although the embodiments described above are based on a series of steps or flowcharts, this does not limit the temporal order of the invention, and they can be performed simultaneously or in different orders as needed. Furthermore, in the embodiments described above, each component constituting a block diagram (e.g., unit, module, etc.) can be implemented as a hardware device or software, and multiple components can be combined to implement a single hardware device or software. The embodiments described above can be implemented in the form of program instructions executable by various computer components and recordable in a computer-readable recording medium. A computer-readable recording medium can include individual program instructions, data files, data structures, etc., or combinations thereof. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as CD-ROMs and DVDs; and magneto-optical media such as floppy disks; as well as hardware devices specifically configured for storing and executing program instructions, such as ROMs, RAMs, flash memory, etc. A hardware device can be configured to operate as one or more software modules to perform the processing according to the invention, and vice versa.
[0331] For example, this disclosure may also include the following technical solutions.
[0332] Technical Solution 1. A method for decoding video, the method comprising:
[0333] Determine the intra-prediction mode for the current block;
[0334] Obtain a reference sample of the current block; and
[0335] The prediction sample for the current block is obtained using at least one of the reference samples.
[0336] Specifically, when applying intra-frame weighted prediction to the current block, the predicted sample is obtained based on multiple non-adjacent reference samples.
[0337] Technical Solution 2. The method for decoding video according to Technical Solution 1,
[0338] Among them, the multiple reference samples that are not adjacent to each other include a top reference sample located at the top of the current block and a left reference sample located at the left side of the current block.
[0339] Technical Solution 3. The method for decoding video according to Technical Solution 2,
[0340] The predicted sample is obtained based on the weighted sum between the top reference sample and the left reference sample.
[0341] Technical Solution 4. The method for decoding video according to Technical Solution 3,
[0342] The weights applied to the top reference sample and the left reference sample are determined based on the position of the predicted sample or the distance between each reference sample and the predicted sample.
[0343] Technical Solution 5. The method for decoding video according to Technical Solution 3,
[0344] The weights applied to the top reference sample and the left reference sample are determined based on the sub-blocks.
[0345] Technical Solution 6. The method for decoding video according to Technical Solution 2,
[0346] Specifically, one of the top reference sample and the left reference sample is specified by applying the intra-frame prediction mode in the positive direction, and the other is specified by applying the intra-frame prediction mode in the negative direction.
[0347] Technical Solution 7. The method for decoding video according to Technical Solution 1,
[0348] Specifically, whether to perform the intra-frame weighted prediction is determined based on whether the intra-frame prediction mode is a predefined intra-frame prediction mode.
[0349] Technical Solution 8. A method for encoding video, the method comprising:
[0350] Determine the intra-prediction mode for the current block;
[0351] Obtain a reference sample of the current block; and
[0352] The prediction sample for the current block is obtained using at least one of the reference samples.
[0353] Specifically, when applying intra-frame weighted prediction to the current block, the predicted sample is obtained based on multiple non-adjacent reference samples.
[0354] Technical Solution 9. The method for encoding video according to Technical Solution 8,
[0355] Among them, the multiple reference samples that are not adjacent to each other include a top reference sample located at the top of the current block and a left reference sample located at the left side of the current block.
[0356] Technical Solution 10. The method for encoding video according to Technical Solution 9,
[0357] The predicted sample is obtained based on the weighted sum between the top reference sample and the left reference sample.
[0358] Technical Solution 11. The method for encoding video according to Technical Solution 10,
[0359] The weights applied to the top reference sample and the left reference sample are determined based on the position of the predicted sample or the distance between each reference sample and the predicted sample.
[0360] Technical Solution 12. The method for encoding video according to Technical Solution 10,
[0361] The weights applied to the top reference sample and the left reference sample are determined based on the sub-blocks.
[0362] Technical Solution 13. The method for encoding video according to Technical Solution 9,
[0363] Specifically, one of the top reference sample and the left reference sample is specified by applying the intra-frame prediction mode in the positive direction, and the other is specified by applying the intra-frame prediction mode in the negative direction.
[0364] Technical Solution 14. An apparatus for decoding video, the apparatus comprising:
[0365] The intra-prediction module is used to: determine the intra-prediction mode for the current block.
[0366] Obtain the reference sample of the current block, and
[0367] The prediction sample for the current block is obtained using at least one of the reference samples.
[0368] Specifically, when applying intra-frame weighted prediction to the current block, the predicted sample is obtained based on multiple non-adjacent reference samples.
[0369] Technical Solution 15. An apparatus for encoding video, the apparatus comprising:
[0370] The intra-prediction module is used to determine the intra-prediction mode for the current block.
[0371] Obtain the reference sample of the current block, and
[0372] The prediction sample for the current block is obtained using at least one of the reference samples.
[0373] Specifically, when applying intra-frame weighted prediction to the current block, the predicted sample is obtained based on multiple non-adjacent reference samples.
[0374] Industrial applicability
[0375] This invention can be applied to electronic devices capable of encoding / decoding images.
Claims
1. A method for decoding video, the method comprising: The coded block is divided into multiple coded blocks, and the current block is the coded block that serves as the leaf node of one of the multiple coded blocks; Construct a list of most probable mode (MPM) candidates for the current block; The intra-prediction mode of the current block is determined based on the MPM candidate list; Obtain a reference sample of the current block; The prediction sample for the current block is obtained based on the intra-frame prediction mode and the reference sample. as well as Determine whether to modify at least one of the predicted samples in the current block. Specifically, the decision to modify at least one of the predicted samples is based on whether the intra-prediction mode of the current block is one of the predefined intra-prediction modes. Wherein, if it is determined that at least one of the predicted samples needs to be modified, a modified predicted sample is generated based on a weighted sum of the predicted sample and a reference sample. This weighted sum is performed by applying a first weight to the predicted sample and a second weight to the reference sample. The second weight is set to be the same for all predicted samples in the same sub-region included in the current block.
2. The method for decoding video according to claim 1, wherein, The predicted samples are generated by applying an interpolation filter to the reference samples, and The interpolation filter is selected from multiple filter candidates based on the size of the current block.
3. The method for decoding video according to claim 1, wherein, If the intra-prediction mode of the current block has a direction toward the upper right, the reference sample is selected from the reference samples located in the lower left direction relative to the predicted sample.
4. The method for decoding video according to claim 1, wherein, The sub-region is composed of at least one column or at least one row in the current block.
5. A method for encoding video, the method comprising: The coded block is divided into multiple coded blocks, and the current block is the coded block that serves as the leaf node of one of the multiple coded blocks; Construct a list of most probable mode (MPM) candidates for the current block; Obtain a reference sample of the current block; The prediction sample for the current block is obtained based on the intra-frame prediction mode and the reference sample. Information about the intra-prediction mode of the current block is encoded based on the MPM candidate list; and Determine whether to modify at least one of the predicted samples in the current block. Specifically, the decision to modify at least one of the predicted samples is based on whether the intra-prediction mode of the current block is one of the predefined intra-prediction modes. Wherein, if it is determined that at least one of the predicted samples needs to be modified, a modified predicted sample is generated based on a weighted sum of the predicted sample and a reference sample. This weighted sum is performed by applying a first weight to the predicted sample and a second weight to the reference sample. The second weight is set to be the same for all predicted samples in the same sub-region included in the current block.
6. A method for transmitting compressed video data, the method comprising: Generate the compressed video data associated with the image signal; as well as Send the compressed video data, The compressed video data is generated through an encoding method, which includes: The coded block is divided into multiple coded blocks, and the current block is the coded block that serves as the leaf node of one of the multiple coded blocks; Construct a list of most probable mode (MPM) candidates for the current block; Obtain a reference sample of the current block; The prediction sample for the current block is obtained based on the intra-frame prediction mode and the reference sample. Information about the intra-prediction mode of the current block is encoded based on the MPM candidate list; and Determine whether to modify at least one of the predicted samples in the current block. Specifically, the decision to modify at least one of the predicted samples is based on whether the intra-prediction mode of the current block is one of the predefined intra-prediction modes. Wherein, if it is determined that at least one of the predicted samples needs to be modified, a modified predicted sample is generated based on a weighted sum of the predicted sample and a reference sample. This weighted sum is performed by applying a first weight to the predicted sample and a second weight to the reference sample. The second weight is set to be the same for all predicted samples in the same sub-region included in the current block.
Citation Information
Patent Citations
Method and device for processing video signal
CA2997097A1
Method for processing image on basis of intra prediction mode and apparatus therefor
WO2016153146A1