Method and device for encoding / decoding intra prediction-related information
The candidate group-based intra prediction mode coding method addresses the inefficiencies in encoding high-definition video content by reducing the bits required for intra prediction mode information, thereby improving compression efficiency.
Patent Information
- Application Number
- PCT/KR2025/008369
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-19
- Filing Date
- 2025-06-18
- Publication Date
- 2025-12-26
AI Technical Summary
Existing video encoding and decoding technologies require a significant number of bits to convey intra prediction mode information and consume excessive computing resources due to the proliferation of various intra coding schemes, leading to inefficiencies in compressing high-definition video content.
A candidate group-based intra prediction mode coding method is employed, determining an intra prediction mode candidate group using surrounding block information to reduce the bits required for encoding and improve compression efficiency.
This approach reduces the amount of bits needed for encoding intra prediction mode information and enhances video compression efficiency by utilizing intra prediction mode candidate groups.
Smart Images

Figure KR2025008369_26122025_PF_FP_ABST
Abstract
Description
Method and device for encoding / decoding intra prediction related information
[0001] The present disclosure relates to the field of video encoding and decoding. More specifically, the present disclosure relates to a video encoding and decoding method and device that efficiently encode various information related to intra prediction.
[0002] With the development and widespread adoption of hardware capable of playing and storing high-resolution or high-definition video content, the need for codecs that effectively encode or decode this content is increasing. Recently, methods for effectively compressing such high-definition or high-definition video content have been implemented. Representative examples of codecs include High Efficiency Video Coding (HEVC) and Versatile Video Coding (VVC).
[0003] In HEVC, a picture is divided into one or more tiles / slices, which are then divided into multiple CTUs (Coding Tree Units). VVC can first divide a picture into multiple sub-pictures. A sub-picture is defined as a group of rectangular slices and was added to VVC to support the function of partially independently encoding / decoding and transmitting a picture. A sub-picture can be divided into tiles / slices, similar to HEVC. VVC also adds a new picture division structure called brick. Bricks are created by horizontally dividing tiles and are the basic unit of parallel processing. In order to process higher resolution images than HEVC, VVC uses a CTU (Coding Tree Unit) with a maximum size of 256x256, which is 16 times larger than HEVC, as the basic unit of encoding / decoding.
[0004] In intra-block prediction, to remove redundancy within the screen, a prediction block is generated using reconstructed pixels adjacent to the current coding block, and a difference value is generated from the current coding block. Unlike intra-block prediction, inter-block prediction generates a prediction block by searching for the block most similar to the current coding block in a previous or subsequent frame.
[0005] Numerous tools have been proposed to improve the efficiency and performance of intra coding. For example, in addition to DC, Planar, and directional intra prediction modes using reference samples in a given direction, various intra coding schemes have been proposed, such as Decoder Side Intra Mode Derivation (DIMD), Template-based Intra Mode Derivation (TIMD), Edge-based Intra Prediction (EIP), Orientation-Based Intra Coding (OBIC), Matrix-based Intra Prediction (MIP), Spatial Geometric Partitioning Mode (SGPM), Intra Template Matching Prediction (IntraTMP), Intra Block Copy (IBC), Multiple Reference Lines (MRL), and Intra Sub-partitions (ISP).
[0006] Thus, as intracoding methods proliferate, the number of bits of additional information required to convey the applied intracoding method and related information has increased significantly. Furthermore, the computing resources used to generate the additional information associated with intracoding have also increased significantly.
[0007] The present disclosure provides a video encoding / decoding method and device that efficiently codes intra prediction mode related information using a relatively small number of bits.
[0008] According to embodiments of the present disclosure, a candidate group-based intra prediction mode coding method is disclosed, which determines an intra prediction mode candidate group using intra prediction mode information of a surrounding block, and determines information related to intra prediction of a current block using candidate intra prediction mode information included in the intra prediction mode candidate group.
[0009] According to the present disclosure, the compression efficiency of a video can be improved.
[0010] Additionally, according to the present disclosure, the amount of bits required to encode information about an intra prediction mode applied to a current block among various intra prediction modes can be reduced.
[0011] Figure 1 is a block diagram illustrating the configuration and operation of a video encoder for encoding an image.
[0012] Figure 2 is a drawing for explaining an embodiment of a method for dividing blocks of an image.
[0013] Figures 3 and 4 are drawings for explaining embodiments of an intra prediction method.
[0014] Figure 5 is a block diagram illustrating the configuration and operation of a video decoder for decoding an image.
[0015] FIG. 6 is a diagram for explaining an embodiment of an intra prediction method in IBC (Intra Block Copy) mode.
[0016] FIG. 7 is a diagram for explaining an embodiment of an intra prediction method in IntraTMP (Intra Template Matching Prediction) mode.
[0017] FIG. 8 is a flowchart illustrating a video decoding method for decoding a candidate-based intra prediction mode according to one embodiment of the present disclosure.
[0018] FIG. 9 is a diagram showing an example of surrounding blocks used when determining an intra prediction mode candidate group according to one embodiment of the present disclosure.
[0019] FIG. 10 is a diagram showing another example of surrounding blocks used when determining an intra prediction mode candidate group according to one embodiment of the present disclosure.
[0020] FIG. 11 is a reference diagram for explaining a process of calculating a template cost for rearranging candidate intra prediction modes according to one embodiment of the present disclosure.
[0021] FIG. 12 is a flowchart illustrating a video encoding method according to one embodiment of the present disclosure.
[0022] A video decoding method according to one embodiment of the present disclosure comprises the steps of: obtaining a bitstream including candidate group-based intra-prediction mode indication information indicating whether to use a candidate group-based intra-prediction mode in which an intra-prediction mode of a current block is determined based on an intra-prediction mode candidate group including intra-prediction mode information of a neighboring block; determining an intra-prediction mode candidate group including at least one candidate intra-prediction mode based on intra-prediction modes of previous blocks reconstructed prior to the current block when the candidate group-based intra-prediction mode indication information indicates that the candidate group-based intra-prediction mode is used; obtaining information indicating an intra-prediction mode of the current block among at least one candidate intra-prediction mode included in the intra-prediction mode candidate group from the bitstream; and determining an intra-prediction mode of the current block based on the information indicating the intra-prediction mode of the current block.
[0023] In one embodiment, the intra prediction mode candidate group may include at least one of intra prediction mode information of a neighboring block adjacent to the current block, intra prediction mode information of a neighboring block non-adjacent to the current block, history-based intra prediction mode information, and default intra prediction mode information.
[0024] In one embodiment, the step of determining the intra prediction mode candidate group includes the step of determining the availability and intra prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks adjacent to the current block according to a predetermined search order; and the step of sequentially adding the intra prediction modes of adjacent neighboring blocks and non-adjacent neighboring blocks determined to be available according to the determination results to the intra prediction mode candidate group according to the predetermined search order.
[0025] In one embodiment, the availability is determined based on whether a surrounding block has an area that extends beyond the boundary of at least one unit among a picture, a slice, a CTU, and a tile, and the intra prediction mode determination process for an unavailable surrounding block may be skipped.
[0026] In one embodiment, the number of candidate intra prediction modes that can be included in the intra prediction mode candidate group is predetermined, and when the number of candidate intra prediction modes included in the intra prediction mode candidate group reaches the predetermined number, the process of searching for surrounding blocks according to the predetermined scan order can be skipped.
[0027] In one embodiment, the number of candidate intra prediction modes that can be included in the intra prediction mode candidate group is predetermined for each intra prediction mode type, and when the number of candidate intra prediction modes for each intra prediction mode type included in the intra prediction mode candidate group reaches the predetermined number for each type, the intra prediction mode of a neighboring block corresponding to an intra prediction mode that has reached the number for each type is no longer included in the intra prediction mode candidates, and when the number of candidate intra prediction modes for each intra prediction mode type included in the intra prediction mode candidate group does not reach the predetermined number for each type, a search process for a neighboring block having an intra prediction mode that has not reached the number for each type can be performed.
[0028] In one embodiment, a candidate intra prediction mode included in the intra prediction mode candidate group may be configured to have an index pointing to the candidate intra prediction mode within a preset index range for each intra prediction mode type.
[0029] In one embodiment, the step of determining the intra-prediction mode candidate group includes: adding available intra-prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks to the intra-prediction mode candidate group according to a predetermined search order, thereby determining an intra-prediction mode candidate group including intra-prediction mode candidates of a total number of intra-prediction mode candidates set in advance; applying each candidate intra-prediction mode included in the intra-prediction mode candidate group to a template composed of neighboring pixels of the current block, thereby obtaining a prediction value of the template according to each candidate intra-prediction mode; and calculating a cost based on a difference value between the prediction value of the template and the template, and rearranging the order of the candidate intra-prediction modes included in the intra-prediction mode candidate group in descending order of cost.
[0030] In one embodiment, the step of determining the intra prediction mode candidate group includes: determining a temporary intra prediction mode candidate group by adding available intra prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks of the current block to the intra prediction mode candidate group according to a predetermined search order; applying each candidate intra prediction mode included in the temporary intra prediction mode candidate group to a template composed of neighboring pixels of the current block to obtain a prediction value of the template according to each candidate intra prediction mode; calculating a cost based on a difference value between the prediction value of the template and the template, and rearranging the order of the candidate intra prediction modes included in the temporary intra prediction mode candidate group in descending order of cost; and extracting a candidate intra prediction mode of a total number of intra prediction mode candidates set in advance, starting from a candidate intra prediction mode having a low index, from the rearranged temporary intra prediction mode candidate group, to determine the intra prediction mode candidate group.
[0031] In one embodiment, the step of determining the intra prediction mode candidate group includes: a step of adding available intra prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks to the intra prediction mode candidate group according to intra prediction mode type in a predetermined search order to determine a temporary intra prediction mode candidate group; a step of applying each candidate intra prediction mode included in the temporary intra prediction mode candidate group to a template composed of neighboring pixels of the current block to obtain a prediction value of the template according to each candidate intra prediction mode; a step of calculating a cost based on a difference value between the prediction value of the template and the template, and reordering the order of the candidate intra prediction modes included in the intra prediction mode candidate group according to the intra prediction mode type in order of decreasing cost; And, in the intra prediction mode candidate group rearranged by the intra prediction mode type, a step of extracting candidate intra prediction modes of a predetermined number of intra prediction mode candidates by intra prediction mode type, starting from a candidate intra prediction having a low index by the intra prediction mode type, and determining an intra prediction mode candidate group including a predetermined number of intra prediction mode candidates by the intra prediction mode type.
[0032] In one embodiment, the step of determining the intra prediction mode candidate group may include: when available intra prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks adjacent to the current block are searched according to a predetermined search order, if the intra prediction mode of the neighboring block is the same as an intra prediction mode already added to the intra prediction mode candidate group, the intra prediction mode of the neighboring block may not be added to the intra prediction mode candidate group.
[0033] In one embodiment, the step of determining the intra-prediction mode candidate group includes: when available intra-prediction modes of adjacent adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks to the current block are searched according to a predetermined search order, comparing intra-prediction mode-related information of the intra-prediction mode of the neighboring block with intra-prediction mode-related information of the intra-prediction mode already added to the intra-prediction mode candidate group; and when the intra-prediction mode-related information of the intra-prediction mode of the neighboring block and the intra-prediction mode-related information of the intra-prediction mode already added to the intra-prediction mode candidate group are the same as a result of the comparison, not adding the intra-prediction mode of the neighboring block to the intra-prediction mode candidate group; and when the intra-prediction mode-related information of the intra-prediction mode of the neighboring block and the intra-prediction mode-related information of the intra-prediction mode already added to the intra-prediction mode candidate group are not the same as a result of the comparison, adding the intra-prediction mode of the neighboring block to the intra-prediction mode candidate group.
[0034] In one embodiment, the candidate group-based intra prediction mode includes an intra skip mode that determines an intra prediction value using an intra prediction mode of the current block determined from the intra prediction mode candidate group as a reconstruction value of the current block without separate residual information, an intra merge mode that determines a reconstruction value of the current block using an intra prediction value using the intra prediction mode of the current block determined from the intra prediction mode candidate group and a residual value included in the bitstream, and an intra merge offset mode that obtains offset information used to adjust a parameter related to the intra prediction mode of the current block determined from the intra prediction mode candidate group from the bitstream and determines a reconstruction value of the current block using the intra prediction mode of the current block and the offset information.
[0035] In one embodiment, the intra prediction mode includes at least one intra prediction mode scheme among a general intra prediction mode including a directional intra prediction mode including a DC and a Planar mode, a Decoder Side Intra Mode Derivation (DIMD), a Template based Intra Mode Derivation (TIMD), an Orientation-Based Intra Coding (OBIC), a Spatial Geometric Partitioning Mode (SGPM), an Intra Template Matching Prediction (IntraTMP), and an Intra Block Copy (IBC), and when the candidate group-based intra prediction mode of the current block is the intra merge offset mode, the offset information is determined for each intra prediction mode type, and when the intra prediction mode of the current block is DIMD, the offset information includes intra mode index information, weighting factor information, and position-dependent index information, and when the intra prediction mode of the current block is TIMD or OBIC, the offset information includes intra mode index information, weighting factor information, and when the intra prediction mode of the current block is the general In case of intra prediction mode, the offset information includes intra mode index information and MPM (Most Probable Mode) information, and in case the intra prediction mode of the current block is IBC or SGPM, the offset information includes block vector information.
[0036] In one embodiment, when the candidate group-based intra prediction mode applied to the current block is the intra merge offset mode, the method comprises: obtaining basic index information and the offset information indicating an intra prediction mode used as an intra prediction mode of the current block among candidate intra prediction modes included in the intra prediction mode candidate group from the bitstream; and determining intra prediction mode-related information applied to the current block by adjusting an intra prediction-related parameter of the candidate intra prediction mode indicated by the basic index information using the offset information.
[0037] In one embodiment, the basic index information and the offset information are determined through a candidate offset index that points to one element among candidate offset lists formed by combining changeable values of parameters included in the basic index information and the offset information.
[0038] In one embodiment, the method further comprises: applying each combination of the intra prediction mode of the current block indicated by the basic index information and the changeable values of the parameters included in the offset information to a template of the current block to obtain a prediction value of the template, and rearranging elements included in the candidate offset list in a decreasing order of cost based on a cost of the template and the prediction value of the template; and obtaining a candidate offset index indicating one element in the rearranged candidate offset list from the bitstream, and obtaining the basic index information and the offset information from one element indicated by the candidate offset index.
[0039] A video encoding method according to one embodiment of the present disclosure includes the steps of: determining an intra-prediction mode candidate group including at least one candidate intra-prediction mode based on intra-prediction modes of previous blocks reconstructed prior to a current block; determining an intra-prediction mode of the current block from among each candidate intra-prediction mode included in the intra-prediction mode candidate group; and encoding candidate group-based intra-prediction mode indication information indicating whether to use a candidate group-based intra-prediction mode in which the intra-prediction mode of the current block is determined based on the intra-prediction mode candidate group including intra-prediction mode information of a neighboring block, and information indicating the intra-prediction mode of the current block.
[0040] Hereinafter, a video encoding and decoding method and device according to an embodiment of the present invention will be described in detail with reference to the attached drawings.
[0041] In the following description of the present invention, detailed descriptions of related known functions or configurations will be omitted if they are deemed to unnecessarily obscure the gist of the invention. Furthermore, the terms described below are defined in light of their functions within the present invention and may vary depending on the intent or custom of the user or operator. Therefore, their definitions should be based on the overall content of the present invention.
[0042] In addition, in order to efficiently explain the technical components that make up the present invention, the preferred embodiments of the present invention implemented below omit, as much as possible, the system functional components that are already provided in each system functional configuration or are commonly provided in the technical field to which the present invention belongs, and focus on explaining the functional components that must be additionally provided for the present invention.
[0043] Anyone having ordinary skill in the art to which the present invention pertains will be able to easily understand the functions of components that have been conventionally used among the functional configurations that are not illustrated below, and will also be able to clearly understand the relationship between the components omitted as described above and the components added for the present invention.
[0044] In this specification, a device that encodes an image to generate a video signal bitstream is referred to as an encoding device, an encoding device, or an encoder, and a device that decodes the video signal bitstream to restore an image is referred to as a decoding device, a decoding device, or a decoder.
[0045] A pixel or pel is the smallest unit that constitutes an image, and the terms pixel and sample can be used interchangeably. A sample can generally represent a pixel or a pixel value, or it can represent only a pixel or pixel value of the luminance component, or only a pixel or pixel value of the chroma component.
[0046] In addition, the unit is used to refer to a basic unit of image processing or a specific location of a picture, and represents an image area including at least one of a luminance component and a chrominance component. Specifically, the unit can be used as a concept including a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), and a transform unit (TU). In addition, a block represents an image area including a specific component among luminance components and chrominance components, and an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. Here, the terms unit, block, partition, signal, and area may be used interchangeably.
[0047] Meanwhile, a picture refers to a field or a frame, and these can be used interchangeably. For example, if the image is an interlaced image, one frame is divided into an odd (or odd, top) field and an even (or even, bottom) field, and each field is composed of a single picture unit, which can be encoded or decoded. If the image is a progressive image, one frame can be composed as a picture, which can be encoded or decoded.
[0048] FIG. 1 is a block diagram illustrating an encoding device according to an embodiment of the present invention, and is intended to explain the configuration and operation of a video encoder for encoding an image.
[0049] Referring to FIG. 1, a video encoder (100) may be configured to include a transformation unit (110), a quantization unit (120), an inverse quantization unit (130), an inverse transformation unit (140), a filtering unit (150), a prediction unit (160), a DPB (Decoded Picture Buffer, 170), and an entropy coding unit (180).
[0050] The conversion unit (110) converts the residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit (160), to obtain a conversion coefficient value.
[0051] For example, the Discrete Cosine Transform (DCT), the Discrete Sine Transform (DST), or the Wavelet Transform can be used.
[0052] The transform kernel used for transforming the residual block may be a transform kernel having separable vertical and horizontal transform properties. In this case, the transform for the residual block may be performed separately as vertical and horizontal transforms. For example, the encoder may perform a vertical transform by applying the transform kernel in the vertical direction of the residual block. Alternatively, the encoder may perform a horizontal transform by applying the transform kernel in the horizontal direction of the residual block.
[0053] Meanwhile, the transform kernel may be used as a term referring to a set of parameters used for transforming the residual signal, such as a transform matrix, a transform array, a transform function, or a transform, and may be any one of a plurality of available kernels, and transform kernels based on different transform types may be used for each of the vertical transform and the horizontal transform.
[0054] The transformation coefficients may be distributed such that higher coefficients are distributed toward the upper left corner of the block, and coefficients closer to '0' are distributed toward the lower right corner of the block. Furthermore, as the current block size increases, there is a possibility that many '0' coefficients exist in the lower right area. To reduce the transformation complexity of large blocks, only the upper left area can be left, and the remaining areas can be reset to '0'.
[0055] Additionally, error signals may exist only in some regions of a coding block, in which case the conversion process may be performed only on some arbitrary regions. For example, in a block of size 2Nx2N, error signals may exist only in the first 2NxN block, in which case the conversion process may be performed only on the first 2NxN block, but the conversion process may not be performed on the second 2NxN block and may not be encoded or decoded.
[0056] The encoder may perform additional transformations before the transform coefficients are quantized. The transformation method described above may be referred to as a primary transform, and the additional transformation may be referred to as a secondary transform.
[0057] The secondary transform can be optional for each residual block. For example, the encoder can improve coding efficiency by performing the secondary transform in areas where it is difficult to focus energy in the low-frequency region using the primary transform alone.
[0058] Specifically, a secondary transformation may be additionally performed on blocks in which residual values appear significantly in directions other than the horizontal or vertical direction of the residual block, and the secondary transformation may not be performed separately into vertical transformation and horizontal transformation, unlike the primary transformation. Such a secondary transformation may be referred to as a low frequency non-separable transform (LFNST).
[0059] The quantization unit (120) quantizes the transformation coefficient value output from the transformation unit (110).
[0060] In order to increase coding efficiency, a method is used in which, instead of coding the picture signal as is, a picture is predicted using an already coded area through a prediction unit (160), and a restored picture is obtained by adding a residual value between the original picture and the predicted picture to the predicted picture.
[0061] To avoid mismatches between the encoder and decoder, when performing prediction in the encoder, information available in the decoder must also be used, and for this purpose, the encoder can perform a process of reconstructing the current block that it has encoded.
[0062] The inverse quantization unit (130) inversely quantizes the transform coefficient values, and the inverse transformation unit (140) restores the residual values using the inverse quantized transform coefficient values.
[0063] The filtering unit (150) performs filtering operations using a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), etc. to improve the quality of the restored picture and enhance encoding efficiency.
[0064] A deblocking filter is a filter for removing distortion within a block generated at the boundary between blocks in a restored picture. The encoder can determine whether to apply a deblocking filter to a boundary based on the distribution of pixels included in several columns or rows based on an arbitrary boundary within a block.
[0065] When a deblocking filter is applied, the filtering unit (150) can apply a long filter, a strong filter, or a weak filter depending on the deblocking filtering strength, and can process horizontal filtering and vertical filtering in parallel.
[0066] Sample Adaptive Offset (SAO) can be used to correct the offset from the original image on a pixel-by-pixel basis for a residual block to which a deblocking filter is applied. In order to correct the offset for a specific picture, the filtering unit (150) can use a method (Band Offset) that divides the pixels included in the image into a certain number of regions, determines the regions to perform offset correction, and applies the offset to the regions. In addition, the filtering unit (150) can use a method (Edge Offset) that applies the offset by considering the edge information of each pixel.
[0067] Adaptive Loop Filtering (ALF) is a method that divides pixels in an image into predetermined groups, determines a filter to be applied to each group, and performs differential filtering for each group. Information regarding whether to apply an adaptive loop filter can be signaled on a coding unit basis, and the shape and filter coefficients of the ALF filter to be applied can vary depending on the block. Furthermore, the same adaptive loop filter can be applied regardless of the characteristics of the target block.
[0068] The filtered picture can be stored in DPB (170) to be used as a reference picture.
[0069] The prediction unit (160) includes an intra / IBC prediction unit (161) and an inter prediction unit (165), and the intra / IBC prediction unit (161) performs intra prediction within the current picture. Various intra prediction methods can be applied, such as DIMD (Decoder Side Intra Mode Derivation), TIMD (Template based Intra Mode Derivation), EIP (Edge-based Intra Prediction), OBIC (Orientation-Based Intra Coding), MIP (Matrix based Intra Prediction), SGPM (Spatial Geometric Partitioning Mode), IntraTMP (Intra Template Matching Prediction), IBC (Intra Block Copy), MRL (Multiple Reference Lines), and ISP (Intra Sub-partitions).
[0070] The inter prediction unit (165) performs inter prediction to predict the current picture using the reference picture stored in the DPB (170).
[0071] The intra / IBC prediction unit (161) performs intra prediction from reconstructed areas within the current picture and transmits intra encoding information to the entropy coding unit (180). Here, the intra encoding information may include at least one of an intra prediction mode, an MPM (Most Probable Mode) flag, an MPM index, information about a reference sample, and various parameter information required for intra prediction according to each intra prediction method. As described below, the intra encoding information may be transmitted through information indicating a candidate intra prediction mode applied to the current block by determining an intra prediction mode candidate group using intra prediction mode information of a neighboring block.
[0072] The inter prediction unit (165) refers to a specific area of the restored reference picture to find the part most similar to the current area, obtains a motion vector value which is the distance between the areas, and transmits motion information (reference direction indication information (L0 prediction, L1 prediction, bidirectional prediction), reference picture index, motion vector information, etc.) for the obtained reference area to the entropy coding unit (180).
[0073] Additionally, the inter prediction unit (165) performs motion compensation using motion information to generate a prediction block for the current block, and transmits inter encoding information including motion information for the reference area to the entropy coding unit (180).
[0074] Meanwhile, the quantized transform coefficients in the form of a two-dimensional array can be rearranged into a one-dimensional array for entropy coding.
[0075] The method of scanning the quantized transform coefficients can be determined according to the size of the transform block and the intra prediction mode, and diagonal, vertical, and horizontal scans can be applied, and the scan information can be signaled on a block-by-block basis or derived from the decoder according to a set rule.
[0076] The entropy coding unit (180) generates a bitstream by entropy coding information representing quantized transform coefficients, intra-coding information, and inter-coding information, and for this purpose, a variable length coding (VLC) method and an arithmetic coding method can be used.
[0077] Variable-length coding (VLC) converts input symbols into a series of codewords, each of which can be of variable length. For example, frequently occurring symbols can be represented by shorter codewords, while less frequently occurring symbols can be represented by longer codewords.
[0078] As a variable length coding method, a context-based adaptive variable length coding (CAVLC) method can be used.
[0079] Arithmetic coding converts consecutive data symbols into a single prime number using the probability distribution of each data symbol, thereby obtaining the optimal prime number bits required to express each symbol.
[0080] As an arithmetic coding method, the context-based adaptive binary arithmetic code (CABAC) method can be used.
[0081] The generated bitstream is encapsulated into NAL (Network Abstraction Layer) units as basic units.
[0082] NAL units are divided into VCL (Video Coding Layer) NAL units containing video data and non-VCL NAL units containing parameter information for decoding video data, and various types of VCL or non-VCL NAL units may exist.
[0083] A NAL unit consists of NAL header information and data, a Raw Byte Sequence Payload (RBSP). The NAL header information includes summary information about the RBSP. The RBSP of a VCL NAL unit contains an integer number of encoded coding tree units.
[0084] In order to decode a bitstream in a decoder, the bitstream must first be divided into NAL units, and then each divided NAL unit must be decoded. Meanwhile, the information required for decoding the bitstream can be transmitted as part of a picture parameter set (PPS), a sequence parameter set (SPS), a video parameter set (VPS), etc.
[0085] Meanwhile, the configuration and operation of the encoder described with reference to FIG. 1 are according to one embodiment of the present invention, and some configurations may be omitted or added as needed.
[0086] Additionally, a single picture may be encoded by dividing it into sub-pictures, slices, tiles, etc. A sub-picture may include one or more slices or tiles. When a single picture is encoded by dividing it into multiple slices or tiles, all slices or tiles within the picture must be decoded before it can be displayed on the screen.
[0087] When a single picture is encoded into multiple subpictures, only any subpicture can be decoded and displayed on the screen. A slice can contain multiple tiles or subpictures, and a tile can contain multiple subpictures or slices.
[0088] Subpictures, slices, and tiles can be encoded or decoded independently of each other, which is effective for parallel processing and processing speed improvement, but the amount of bits may increase because the encoded information of adjacent subpictures, slices, and tiles cannot be used.
[0089] And subpictures, slices, and tiles can be encoded by being divided into multiple coding tree units (CTUs).
[0090] A coding tree unit can be composed of a luminance coding tree block (CTB) of size 128x128 and two chrominance coding tree blocks of size 64x64.
[0091] A single coding tree unit may be undivided and constitute a single coding unit (CU) itself, or may be divided into multiple coding units as illustrated in Fig. 2. A coding unit may be composed of a luminance coding block (CB) and two chrominance coding blocks.
[0092] A coding unit may consist of one transform unit (TU), or may be split into multiple transform units. A transform unit may consist of a luminance transform block (TB) and two chrominance transform blocks.
[0093] Here, a coding unit represents a basic unit for processing a picture in the process of prediction, transformation, quantization, entropy coding, and decoding, and the size and shape of a coding unit within a picture may not be constant.
[0094] A coding unit may have a square or non-square shape, and a rectangular coding unit may include a vertical coding unit whose height is greater than its width and a horizontal coding unit whose width is greater than its height.
[0095] The coding tree unit is first partitioned into a Quad Tree (QT) structure, such that a single node of size 2NX2N can be partitioned into four nodes of size NXN. Furthermore, the Quad Tree partitioning can be performed recursively, and not all nodes need to be partitioned to the same depth.
[0096] Leaf nodes of a quadtree can be further partitioned into a multi-type tree (MTT) structure. For example, in a multi-type tree structure, a single node can be partitioned into a binary or ternary tree structure with horizontal or vertical partitioning. Accordingly, a multi-type tree structure can have four partitioning structures: vertical binary partitioning, horizontal binary partitioning, vertical ternary partitioning, and horizontal ternary partitioning.
[0097] In each tree structure, both the width and height of a node can have a power of 2. For example, in a binary tree (BT) structure, a node of size 2NX2N can be split into two NX2N nodes by vertical binary splitting, and into two 2NXN nodes by horizontal binary splitting.
[0098] Also, in a Ternary Tree (TT) structure, a node of size 2NX2N can be split into nodes of size (N / 2)X2N, NX2N, and (N / 2)X2N by vertical ternary splitting, and into nodes of size 2NX(N / 2), 2NXN, and 2NX(N / 2) by horizontal ternary splitting. This multi-type tree splitting can be performed recursively.
[0099] A leaf node of a multi-type tree can be a coding unit. If the coding unit is no larger than the maximum transformation length, the coding unit can be used as a unit for prediction and transformation without further splitting. On the other hand, if the width or height of the coding unit is larger than the maximum transformation length, the coding unit can be split into multiple transformation units without explicit signaling regarding the splitting.
[0100] The tree partitioning structure as described above may have the same shape (Single Tree) for the luminance block and the chrominance block, or different shapes (Dual Tree) for the luminance block and the chrominance block.
[0101] Meanwhile, the block division from the coding tree unit (CTU) to the coding unit (CU) as described above can be performed through a rate-distortion optimization (RDO) process, whereby the division structure with the smallest rate-distortion cost (RD cost) value within the allowable size and depth conditions is selected to determine the final coding unit.
[0102] Hereinafter, embodiments of the intra prediction method will be described in more detail with reference to FIGS. 3 and 4.
[0103] For intra prediction, intra prediction mode information may be signaled, and the intra prediction mode information may indicate any one of a plurality of intra prediction modes. As described below, the intra prediction mode information of the current block may be transmitted through information indicating a candidate intra prediction mode applied to the current block among candidate intra prediction modes included in a candidate intra prediction mode group constructed using intra prediction mode information of neighboring blocks.
[0104] The multiple intra prediction modes may include various methods such as directional intra prediction mode, IntraTMP, IBC, DIMD, TIMD, OBIC, MIP, SGPM, MRL, ISP, etc. as illustrated in FIG. 3. The video encoder (100) includes intra prediction mode information applied to the current block in a bitstream and transmits the information to the video decoder (200), and the video decoder (200) can parse the intra prediction information included in the bitstream to determine the intra prediction mode of the current block.
[0105] For example, as illustrated in FIG. 3, the directional intra prediction mode may include a planar mode, a DC mode, and 65 directional modes, and each intra prediction mode may be indicated through an intra prediction mode index.
[0106] Intra prediction mode index "0" indicates planar mode, intra prediction mode index "1" indicates DC mode, and intra prediction mode indexes "2" to "66" can indicate different directional modes, respectively.
[0107] The directional modes each indicate different angles within a preset angular range, for example, a directional mode can indicate an angle within an angular range from 45 degrees to -135 degrees clockwise.
[0108] In this case, the intra prediction mode index "2" may indicate the Horizontal Diagonal (HDIA) mode, the intra prediction mode index "18" may indicate the Horizontal (HOR) mode, the intra prediction mode index "34" may indicate the Diagonal (DIA) mode, the intra prediction mode index "50" may indicate the Vertical (VER) mode, and the intra prediction mode index "66" may indicate the Vertical Diagonal (VDIA) mode.
[0109] If the current block is a non-square block, 20 additional wide angular modes can be used, indicating angles greater than 45 degrees clockwise or less than -135 degrees.
[0110] Based on the intra prediction mode information as described above, reference samples to be used for intra prediction for the current block are determined.
[0111] For example, if the intra prediction mode index indicates a specific directional mode, the reference sample corresponding to the corresponding angle from the current sample of the current block is used for prediction of the current sample. For intra prediction, surrounding already reconstructed samples are used as reference samples, and the reference samples may be reconstructed samples located to the left or above the current block.
[0112] Referring to FIG. 4, the reference samples may be samples adjacent to the left boundary and upper boundary of the current block.
[0113] For example, if the size of the current block is NxN and samples of a single reference line adjacent to the current block are used for intra prediction, reference samples can be set using (2N*2+1) surrounding samples located on the left (L, Left), top (T, Top), and top-left (TL, Top-left) of the current block.
[0114] Meanwhile, samples of multiple reference lines (MRL) may be used for intra prediction of the current block, and the multiple reference lines may be composed of n reference lines located within a preset range from the current block. In this case, separate reference line index information indicating the reference lines to be set as reference pixels may be signaled.
[0115] Additionally, if at least some of the samples to be used as reference samples have not yet been restored, reference samples can be obtained through a reference sample padding process, and a reference sample filtering process can be performed to reduce errors in intra prediction.
[0116] FIG. 5 is a block diagram illustrating a decoding device according to one embodiment of the present invention, and is intended to explain the configuration and operation of a video decoder for decoding an image.
[0117] Referring to FIG. 5, a video decoder (200) may be configured to include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), a filtering unit (240), a prediction unit (260), and a DPB (Decoded Picture Buffer, 270).
[0118] The entropy decoding unit (210) entropy decodes the bitstream to extract transform coefficient information, intra-coding information, inter-coding information, etc. for each region.
[0119] For example, the entropy decoding unit (210) can obtain a binary code for transform coefficient information of a specific area from a bitstream, and can obtain a quantized transform coefficient by de-binarizing the binary code.
[0120] The inverse quantization unit (220) inversely quantizes the quantized transform coefficients, and the inverse transform unit (230) restores the residual value using the inverse quantized transform coefficients. The inverse transform unit (230) can obtain the residual value by additionally performing a second inverse transform after performing a first inverse transform on a transform block including the inverse quantized transform coefficients.
[0121] Meanwhile, the residual value obtained from the inverse transformation unit (230) is combined with the predicted value obtained from the prediction unit (260) to restore the original pixel value.
[0122] The filtering unit (240) performs a filtering operation using a deblocking filter, a sample adaptive offset, an adaptive loop filter, etc. to improve the image quality of the restored picture, and the filtered picture can be output or stored in the DPB (270) to be used as a reference picture for the next picture.
[0123] The prediction unit (260) includes an intra / IBC prediction unit (261) and an inter prediction unit (265), and generates a prediction picture by utilizing the encoding type decoded through the entropy decoding unit (210), the transform coefficient for each region, and the intra / inter encoding information.
[0124] To restore the current block in which decoding is performed, the decoded region of the current picture or other pictures containing the current block can be used. A picture (or tile / slice) that performs intra prediction or intra BC prediction using only the current picture for restoration is called an intra picture or I picture (or tile / slice), and a picture (or tile / slice) that can perform all of intra prediction, inter prediction, and intra BC prediction is called an inter picture (or tile / slice).
[0125] Meanwhile, a picture (or tile / slice) that uses at most one motion vector and reference picture index to predict sample values of each block among inter-pictures (or tiles / slices) is called a predictive picture or P-picture (or tile / slice), and a picture (or tile / slice) that uses at most two motion vectors and reference picture indices is called a bi-predictive picture or B-picture (or tile / slice).
[0126] That is, a P picture (or tile / slice) uses at most one motion information set to predict each block, and a B picture (or tile / slice) uses at most two motion information sets to predict each block. Here, a motion information set may include one or more motion vectors and one reference picture index.
[0127] The intra / IBC prediction unit (261) generates a prediction block using intra encoding information and reconstructed samples within the current picture, and the intra encoding information may include at least one of an intra prediction mode, an MPM (Most Probable Mode) flag, an MPM index, information about a reference sample, and various parameter information required for intra prediction according to each intra prediction method.
[0128] As described below, intra encoding information can be determined using information of one candidate intra prediction mode among intra prediction mode candidate groups determined using intra prediction mode information of surrounding blocks. The video decoder (200) can parse information indicating a candidate intra prediction mode applied to a current block among candidate intra prediction modes included in the intra prediction mode candidate group from the bitstream, determine one candidate intra prediction mode among the intra prediction mode candidate groups based on the information indicating the parsed candidate intra prediction mode, and determine intra encoding information of the current block using the determined candidate intra prediction mode.
[0129] The intra / IBC prediction unit (261) can predict sample values of the current block using restored samples located on the left and / or upper side of the current block as reference samples.
[0130] For example, the reference samples may be samples adjacent to the left boundary of the current block and / or samples adjacent to the upper boundary, and may be samples located on a line within a preset distance from the left boundary of the current block among samples of neighboring blocks of the current block and / or samples located on a line within a preset distance from the upper boundary of the current block. In this case, the neighboring blocks of the current block may include at least one of a left (L) block, an upper (A) block, a below left (BL) block, an above right (AR) block, or an above left (AL) block adjacent to the current block.
[0131] The inter prediction unit (265) generates a prediction block using the reference picture and inter encoding information stored in the DPB (270), and the inter encoding information may include a set of motion information (reference picture index, motion vector information, etc.) of the current block for the reference block.
[0132] Meanwhile, inter prediction can include L0 prediction, L1 prediction, and bidirectional prediction (Bi-prediction).
[0133] L0 prediction refers to prediction using a single reference picture included in the L0 picture list, and L1 prediction refers to prediction using a single reference picture included in the L1 picture list. For this, a set of motion information (e.g., motion vector and reference picture index) may be required.
[0134] Bidirectional prediction can utilize up to two reference regions, which may reside in the same reference picture or in different pictures. Accordingly, among the two sets of motion information used in bidirectional prediction, two motion vectors may correspond to the same reference picture index or to different reference picture indices.
[0135] At this time, the reference pictures are pictures that are located temporally before or after the current picture, and may be completed pictures that have already been restored, and the two reference areas used in the bidirectional prediction method may be areas selected from the L0 picture list and the L1 picture list, respectively.
[0136] The inter prediction unit (265) can obtain a reference block of the current block using a motion vector and a reference picture index, and the reference block exists in a reference picture corresponding to the reference picture index.
[0137] Additionally, the sample values of a block specified by a motion vector or their interpolated values can be used as a predictor of the current block. For motion prediction with subpel-level pixel accuracy, an 8-tap interpolation filter can be used for the luminance signal, and a 4-tap interpolation filter can be used for the chrominance signal.
[0138] Meanwhile, the configuration and operation of the decoder described with reference to FIG. 5 are according to one embodiment of the present invention, and some configurations may be omitted or added as needed, and the decoder may decode an image by performing the reverse process of the encoding method of the encoder described above.
[0139] FIG. 6 illustrates an embodiment of an intra prediction method in IBC (Intra Block Copy) mode.
[0140] Referring to Figure 6, in the IBC mode, prediction information of the current block, which is the encoding target block, is obtained from a reference block that has already been decoded and is located within the same frame.
[0141] At this time, the vector information from the current block, which is the encoding target block, to the reference block is referred to as a block vector (BV).
[0142] Although the IBC prediction method described above is an intra-frame prediction method, it is similar to an inter-frame prediction method in that it derives and transmits motion information of the current block to be encoded.
[0143] The IBC prediction method can be divided into ibc_skip / merge mode and ibc_amvp mode, and ibc_skip / merge and ibc_amvp can use skip, merge, AMVP (Advanced Motion Vector Prediction) and similar encoding, information transmission and decoding methods in inter-frame prediction.
[0144] In ibc_skip / merge mode, the block vector (BV) value of the current block can be derived using the merge_idx information. In ibc_amvp mode, the block vector (BV) value of the corresponding block can be derived using the mvd, mvp, and amvr values.
[0145] FIG. 7 is a diagram illustrating an embodiment of an intra prediction method in IntraTMP (Intra Template Matching Prediction) mode.
[0146] As described above, in IBC mode, a block vector (BV), which is motion information for a target block, is derived and transmitted to the decoding device to use a reference block within the same frame as prediction information for the current block.
[0147] Meanwhile, in IntraTMP mode, the use of a reference block within the same frame as the prediction information for the target block is the same as in IBC mode, but the block vector (BV), which is motion information for the target block, is not transmitted to the decoding device, and the decoding device can find the prediction information by searching for the reference block on its own through a template matching process.
[0148] Referring to FIG. 7, a template area is defined around a target block (IntraTMP block), and a template area (Best matching Template) that most closely matches the template area of the target block in the reconstructed area of blocks within the same frame is searched for, thereby obtaining a reference block (ref. block).
[0149] And, based on the position of the reference block (ref. block) obtained as described above, the block vector (intraTMP BV) value for (IntraTMP block) can be derived.
[0150] As described above, IntraTMP prediction is one of the intra-frame prediction modes, in which a block vector (BV) of a target block can be derived in a decoding device, and the block vector (BV) value can be used for intra prediction in the same manner as the block vector (BV) value of the IBC mode.
[0151] Meanwhile, the IntraTMP method as described above can also be used in the process of refining or compensating block vector (BV) values.
[0152] For example, for a block encoded in IBC mode, after finding the location of the initial reference block using the transmitted block vector (BV) value, an updated reference block can be obtained by more precisely correcting the block vector (BV) value through template matching in a certain area around the initial reference block.
[0153] In the MRL (Multi-Reference Line) intra prediction mode, intra prediction can be performed by selecting a reference sample line with the highest prediction accuracy among the surrounding multiple reference sample lines of the current block, deriving a prediction sample using a reference sample located in the prediction direction in the line, and transmitting the used reference sample line to the video decoder (200).
[0154] In the ISP (Intra Sub-Partition) intra prediction mode, the current block is divided into vertical or horizontal subpartitions, and intra prediction is performed based on the same intra prediction mode. Peripheral reference samples are derived for each subpartition and used for intra prediction. That is, in the ISP intra prediction mode, the intra prediction mode for the current block is applied equally to the subpartitions, and peripheral reference samples are derived for each subpartition and used.
[0155] In MIP (Matrix-based Intra Prediction) mode, prediction samples for the current block can be obtained by performing a matrix-vector-multiplication procedure using surrounding reference samples on which an averaging procedure has been performed, and further performing horizontal / vertical interpolation procedures as needed. Depending on the intra prediction mode for MIP, the metrics and offsets used in the matrix vector multiplication can be set differently. The metrics can be called weighting metrics, and the offsets can be called offset vectors or bias vectors.
[0156] In the TIMD (Template-based Intra Mode Derivation) intra prediction mode, the video decoder (200) can derive the intra mode of the current block using previously decoded surrounding pixels. For example, prediction samples for the surrounding template can be derived based on surrounding reference samples of the surrounding template of the current block, and the intra mode of the current block can be derived by comparing the prediction samples for the derived surrounding template with the reconstruction samples of the surrounding template. Specifically, after deriving the Sum of Absolute Transformed Difference (SATD) between the prediction sample derived based on the surrounding reference samples of the surrounding template and the reconstruction sample of the surrounding template, the mode with the minimum SATD can be selected as the intra mode of the current block. For example, prediction samples of the template can be derived based on the surrounding reference samples of the template. After deriving the SATD between the predicted samples of the derived template and the restored samples of the template already derived during the restoration process, the mode with the smallest SATD can be selected as the intra mode of the current block. For example, after selecting the two prediction modes with the smallest SATD, the prediction blocks for the two prediction modes can be blended using a weighted sum method and used as the prediction block of the current block.
[0157] In the DIMD (Decoder Side Intra Mode Derivation) intra prediction mode, the intra prediction mode can be derived and used in the encoder and decoder without directly transmitting the intra prediction mode information. For example, the horizontal gradient and vertical gradient can be obtained from the second surrounding reference row and column, and a Histogram of Gradients (HoG) can be constructed from them. When calculating the HoG, a Sobel filter can be used on the surrounding pixels of the current block. Two intra modes can be selected using the HoG, and the predicted block using the two modes can be blended with the planar mode to obtain the final predicted block.
[0158] In this way, when coding intra prediction mode information applied to the current block among various intra prediction modes such as directional intra prediction mode, IntraTMP, IBC, DIMD, TIMD, OBIC, MIP, SGPM, MRL, and ISP, the number of bits required to transmit information related to the intra prediction mode may increase significantly due to the various intra prediction modes.
[0159] According to embodiments of the present disclosure, information related to the intra prediction mode of the current block is signaled by constructing a candidate group by utilizing information related to intra prediction modes previously used in neighboring blocks, and signaling (transmitting) information indicating one of the candidate groups. In the present disclosure, information related to the intra prediction mode may include information indicating an intra prediction mode used among various types of intra prediction modes (basic intra prediction mode information) and additional information such as parameters used in the intra prediction mode. For example, the intra prediction mode information is information indicating one of various intra prediction types such as a directional intra prediction mode, IntraTMP, IBC, DIMD, TIMD, OBIC, MIP, SGPM, MRL, and ISP, and the additional information may be information related to parameters additionally used during intra prediction in the corresponding intra prediction type.
[0160] Hereinafter, an operation of encoding / decoding candidate-based intra prediction mode-related information according to embodiments of the present disclosure will be described in detail. The operation of encoding candidate-based intra prediction mode-related information described below may be performed by the video encoder (100) illustrated in FIG. 1, and the operation of decoding candidate-based intra prediction mode-related information may be performed by the intra / IBC prediction unit (261) of the video decoder (200) illustrated in FIG. 5.
[0161] FIG. 8 is a flowchart illustrating a video decoding method for decoding a candidate-based intra prediction mode according to one embodiment of the present disclosure.
[0162] Referring to FIG. 8, the video decoder (200) obtains a bitstream including candidate group-based intra prediction mode indication information indicating whether to use a candidate group-based intra prediction mode (S810). Here, the candidate group-based intra prediction mode refers to a mode in which the intra prediction mode of the current block and / or additional information related to the intra prediction mode are determined based on an intra prediction mode candidate group including intra prediction mode information of a neighboring block. That is, as described below, the candidate group-based intra prediction mode refers to a mode in which an intra prediction mode candidate group is configured using intra prediction mode-related information of a neighboring block of the current block, and additional information related to the intra prediction mode and / or the intra prediction mode of the current block is determined using information of one candidate intra prediction mode determined from the intra prediction mode candidate group, thereby performing intra prediction.
[0163] In one embodiment of the present disclosure, the candidate group-based intra prediction mode may include at least one of: i) an intra skip mode that determines an intra prediction value using an intra prediction mode of a current block determined from an intra prediction mode candidate group as a reconstruction value of the current block without separate residue information; ii) an intra merge mode that determines a reconstruction value of the current block using an intra prediction value using an intra prediction mode of the current block determined from an intra prediction mode candidate group and a residual value included in a bitstream; and iii) an intra merge offset mode that obtains offset information used to adjust a parameter related to an intra prediction mode from a bitstream in addition to the intra prediction mode of the current block determined from the intra prediction mode candidate group and determines a reconstruction value of the current block using the intra prediction mode and the offset information.
[0164] Whether a candidate group-based intra prediction mode including at least one of the intra skip mode, intra merge mode, and intra merge offset mode is used can be set in units of sequence, GOP, picture, slice, tile, CTU, CU, and TU, and information indicating whether the candidate group-based intra prediction mode is used can be included in syntax of one or more of SPS (Sequence Parameter Set), PPS (Picture Parameter Set), PH (Picture Header), SH (Slice Header), CTU, CU, and TU in HLS (High-Level Syntax) and signaled from the video encoder (100) to the video decoder (200).
[0165] Candidate group-based intra prediction mode indication information indicating whether a candidate group-based intra prediction mode is used can be configured in association with flag information related to other prediction modes. For example, if pred_mode_flag indicating an intra / inter prediction mode indicates that an intra prediction mode is applied, a syntax structure can be configured such that candidate group-based intra prediction mode indication information is acquired from the bitstream. In addition, if the use of various intra prediction methods such as IntraTMP, IBC, DIMD, TIMD, OBIC, MIP, SGPM, MRL, and ISP is transmitted as a separate flag, a syntax structure can be configured such that candidate group-based intra prediction mode indication information is additionally acquired from the bitstream when a specific intra prediction method is available. For example, if pred_mode_IBC_flag indicating whether IBC is used for each CU unit indicates that the IBC intra prediction mode is available for the current CU unit, information indicating whether a candidate group-based intra prediction mode is additionally used can be acquired from the bitstream.
[0166] The candidate group-based intra prediction mode indication information may include information indicating whether to use each of the intra-skip mode, the intra-merge mode, and the intra-merge offset mode. In addition, the information indicating whether to use each of the intra-skip mode, the intra-merge mode, and the intra-merge offset mode may be included in the bitstream in parallel (independently) or may be configured interdependently. When the information indicating whether to use the intra-skip mode, the intra-merge mode, and the intra-merge offset mode is configured interdependently, the information indicating whether to use the first candidate group-based intra prediction mode among the intra-skip mode, the intra-merge mode, and the intra-merge offset mode may be first acquired, and when the first candidate group-based intra prediction mode is used, the information indicating whether to use the other remaining candidate group-based intra prediction modes may be acquired. For example, assuming that if the information indicating whether the intra skip mode is used (intra_skip_mode_flag) is 0, the intra skip mode is not used, and if it is 1, the intra skip mode is used, then when intra_skip_mode_flag is 1 and the intra skip mode is used, information indicating whether the intra merge mode is used (intra_merge_mode_flag) can be obtained from the bitstream. In addition, in this case, information indicating whether the intra merge offset mode is used (intra_merge_offset_mode_flag) can be obtained when intra_merge_mode_flag is 1 and the intra merge mode is used.
[0167] In addition, information indicating whether to use the intra prediction mode based on the first candidate group among the intra skip mode, the intra merge mode, and the intra merge offset mode may be first obtained, and if the intra prediction mode based on the first candidate group is not used, information indicating whether to use the intra prediction mode based on the other remaining candidates may be obtained. For example, if intra_skip_mode_flag is 0 and the intra skip mode is not used, information indicating whether to use the intra merge mode (intra_merge_mode_flag) and information indicating whether to use the intra merge offset mode (intra_merge_offset_mode_flag) may be obtained from the bitstream. In addition, in this case, the syntax may be configured so that the information indicating whether to use the intra merge offset mode (intra_merge_offset_mode_flag) is obtained dependently on the information indicating whether to use the intra merge mode (intra_merge_mode_flag). That is, the syntax can be configured so that information (intra_merge_offset_mode_flag) indicating whether intra merge offset mode is used is acquired in either case where intra_merge_mode_flag is 1 or 0.
[0168] Without being limited to the examples described above, information indicating whether to use intra skip mode, intra merge mode, and intra merge offset mode can be transmitted by being included in the syntax in various ways.
[0169] Referring back to FIG. 8, if the candidate group-based intra prediction mode indication information indicates that the candidate group-based intra prediction mode is used, the video decoder (200) determines an intra prediction mode candidate group including at least one candidate intra prediction mode based on the intra prediction modes of previous blocks reconstructed before the current block (S820). As described above, the candidate group-based intra prediction mode indication information may include information indicating whether each of the intra-skip mode, the intra-merge mode, and the intra-merge offset mode is used, and the video decoder (200) may determine that the candidate group-based intra prediction mode is used if the intra-prediction mode based on at least one candidate group among the intra-skip mode, the intra-merge mode, and the intra-merge offset mode is applied. In addition, the video decoder (200) may also determine a candidate group-based intra prediction method applied to the current block among the intra-skip mode, the intra-merge mode, and the intra-merge offset mode based on the candidate group-based intra prediction mode indication information.
[0170] The video decoder (200) obtains information indicating the intra prediction mode of the current block among at least one candidate intra prediction mode included in the intra prediction mode candidate group from the bitstream (S830).
[0171] Then, the video decoder (200) determines one candidate intra prediction mode among the candidate intra prediction modes included in the intra prediction mode candidate group based on the information indicating the intra prediction mode of the current block, and determines the determined candidate intra prediction mode as the prediction mode of the current block (S840). If the candidate group-based intra prediction mode applied to the current block is the intra skip mode, the video decoder (200) does not obtain separate residual information from the bitstream, but determines the obtained intra prediction value by applying the determined candidate intra prediction mode as the restoration value of the current block. If the candidate group-based intra prediction mode applied to the current block is the intra merge mode, the video decoder (200) further obtains the residual value of the current block from the bitstream, and reconstructs the current block using the obtained intra prediction value and the residual value by applying the determined candidate intra prediction mode. If the candidate group-based intra prediction mode applied to the current block is the intra merge offset mode, the video decoder (200) further obtains offset information and a residual value including additional parameter information related to the determined candidate intra prediction mode. Then, the video decoder (200) sets parameters used in intra prediction in the determined candidate intra prediction mode using the parameters included in the offset information obtained from the bitstream, performs intra prediction to obtain an intra prediction value, and reconstructs the current block using the intra prediction value and the residual value.
[0172] Hereinafter, the process of determining intra-prediction mode candidate groups using intra-prediction mode information of surrounding blocks when a candidate group-based intra-prediction mode is applied is described in detail. The process of determining intra-prediction mode candidate groups using intra-prediction mode information of surrounding blocks described below can be performed identically during video encoding and decoding.
[0173] An intra prediction mode candidate group may include at least one of intra prediction mode information of adjacent neighboring blocks of the current block, intra prediction mode information of non-adjacent neighboring blocks of the current block, history-based intra prediction mode information, and default intra prediction mode information. In the present disclosure, adjacent neighboring blocks and non-adjacent neighboring blocks may be collectively referred to as "neighboring blocks."
[0174] FIG. 9 is a diagram showing an example of surrounding blocks used when determining an intra prediction mode candidate group according to one embodiment of the present disclosure.
[0175] Referring to FIG. 9, the location of the surrounding blocks of the current block may be one of the left surrounding block (A1), the upper left surrounding block (B2), the lower left surrounding block (A0), the upper surrounding block (B1), and the upper right surrounding block (B0) of the current block.
[0176] An intra prediction mode candidate group can be formed by obtaining intra prediction mode information of surrounding blocks as illustrated in FIG. 9. At this time, the intra prediction mode information of surrounding blocks can be sequentially included in the intra prediction mode candidate group in a predetermined order.
[0177] FIG. 10 is a diagram showing another example of surrounding blocks used when determining an intra prediction mode candidate group according to one embodiment of the present disclosure.
[0178] When determining an intra-prediction mode candidate group, neighboring blocks encoded in the intra-prediction mode are searched, and intra-prediction mode information of the neighboring blocks encoded in the intra-prediction mode may be included in the intra-prediction mode candidate group. The neighboring blocks are blocks processed before the current block, and may include non-adjacent neighboring blocks that are not adjacent to the current block, in addition to neighboring blocks adjacent to the current block. The positions of the neighboring blocks to be searched may be predetermined by being patterned or tabulated according to their relative positions with respect to the current block. For example, the positions of the neighboring blocks to be searched are predetermined based on the position of the current block, and it is determined whether the neighboring blocks at the predetermined positions are encoded in the intra-prediction mode according to a predetermined order, and the intra-prediction mode information of the neighboring blocks encoded in the intra-prediction mode may be included in the intra-prediction mode candidate group. As an example, as illustrated in FIG. 10, the positions and search order of the neighboring blocks may be predetermined. The positions and search order of the surrounding blocks may be set in advance in the video encoder (100) and the video decoder (200), or the video encoder (100) may set a table with the positions and search order of the surrounding blocks as elements, and may be configured to transmit an index of an element indicating the positions and search order of the applied surrounding blocks to the video decoder (200).
[0179] Not limited to the examples of FIGS. 9 and 10 described above, the positions and search order of surrounding blocks used when determining intra prediction mode candidate groups may be changed.
[0180] In addition to the intra prediction mode information available among adjacent / non-adjacent neighboring blocks of the current block, the intra prediction mode candidate group may further include a history-based intra prediction mode determined based on the intra prediction mode used in the previous block, or default intra prediction mode information. The default intra prediction mode information may be configured with one or more intra prediction modes with high applicability. For example, intra prediction modes such as DC and Planar may be included in the intra prediction mode candidate group as default intra prediction modes. If the number of candidate intra prediction modes included in the intra prediction mode candidate group is less than a preset number, the default intra prediction mode information may be added to the intra prediction mode candidate group, or the intra prediction mode candidate group may be configured so as to always be included in the intra prediction mode candidate group.
[0181] In addition to the intra prediction mode information of the surrounding blocks, the intra prediction mode candidate group may include additional information related to the intra prediction mode. For example, if the intra prediction mode candidate group includes a DIMD intra prediction mode candidate, additional information including intra mode index information, weighting factor information, and position-dependent index information may be included in the intra prediction mode candidate group. Furthermore, if the intra prediction mode candidate group includes a TIMD or OBIC intra prediction mode candidate, additional information including intra mode index information and weighting factor information may be included in the intra prediction mode candidate group. Furthermore, if the intra prediction mode candidate group includes a general intra prediction mode, such as DC, Planar, or directional intra prediction as illustrated in FIG. 3, additional information including intra mode index information and MPM (Most Probable Mode) information may be included in the intra prediction mode candidate group. Furthermore, if the intra prediction mode candidate group includes an IBC or SGPM intra prediction mode, block vector information may be included as additional information in the intra prediction mode candidate group.
[0182] When forming a group of intra prediction mode candidates, the process of determining the intra prediction mode of unavailable neighboring blocks among adjacent / non-adjacent neighboring blocks of the current block may be skipped. Availability is determined based on whether the neighboring blocks have an area that extends beyond the boundary of at least one unit among picture, slice, CTU, and tile, and the process of determining the intra prediction mode for unavailable neighboring blocks that extend beyond the boundary of the unit may be skipped.
[0183] The number of candidate intra prediction modes that can be included in an intra prediction mode candidate group can be predetermined. When configuring an intra prediction mode candidate group, if the number of candidate intra prediction modes included in the intra prediction mode candidate group does not reach the predetermined number, neighboring blocks are searched according to a predetermined scanning order, and intra prediction mode information of neighboring blocks encoded with the intra prediction mode is included in the intra prediction mode candidate group. If the number of candidate intra prediction modes included in the intra prediction mode candidate group reaches the predetermined number, the process of searching neighboring blocks according to the predetermined scanning order can be skipped. The number of candidate intra prediction modes that can be included in the intra prediction mode candidate group can be signaled from the video encoder (100) to the video decoder (200) by being included in one or more syntaxes of SPS, PPS, PH, SH, CTU, CU, and TU in HLS (High-Level Syntax).
[0184] In one embodiment, the number of candidate intra prediction modes that can be included in an intra prediction mode candidate group may be predetermined for each intra prediction mode type. For example, an intra prediction mode candidate group may be set to include a total of three candidate intra prediction modes, including one DIMD candidate intra prediction mode, one TIMD candidate intra prediction mode, and one OBIC candidate intra prediction mode.
[0185] If the number of candidate intra prediction modes that can be included in an intra prediction mode candidate group is predetermined for each intra prediction mode type, the intra prediction mode of a neighboring block having the corresponding intra prediction type is included in the intra prediction mode candidate group in the order searched first. If the number of candidate intra prediction modes for each intra prediction mode type included in the intra prediction mode candidate group reaches the predetermined number for each type, the intra prediction mode of a neighboring block corresponding to an intra prediction mode that has reached the number for each type is no longer included in the intra prediction mode candidates, and if the number of candidate intra prediction modes for each intra prediction mode type included in the intra prediction mode candidate group does not reach the predetermined number for each type, the search process for a neighboring block having an intra prediction mode that has not reached the number for each type is continuously performed. In the above example, the process of searching for intra prediction modes of neighboring blocks is performed until one neighboring block intra-predicted with DIMD, one neighboring block intra-predicted with TIMD, and one neighboring block intra-predicted with OBIC are searched according to a predetermined scan order.
[0186] If a candidate intra prediction mode is already included in the intra prediction mode candidate group as many as the number of predetermined candidate intra prediction modes, even if the corresponding intra prediction mode is searched for in a neighboring block, the candidate intra prediction mode of the corresponding intra prediction mode type is no longer included in the intra prediction mode candidate group. In the above example, if one neighboring block intra-predicted with DIMD and one neighboring block intra-predicted with TIMD are searched, and the DIMD intra-prediction mode candidate and the TIMD intra-prediction mode candidate are already included in the intra-prediction mode candidate group, the process of searching one neighboring block intra-predicted with OBIC is continuously performed. Even if neighboring blocks predicted with TIMD or DIMD that have already been filled in are searched during the search process for neighboring blocks intra-predicted with OBIC, the additionally searched DIMD intra-prediction mode candidate and TIMD intra-prediction mode candidate are not included in the intra-prediction mode candidate group.
[0187] In one embodiment, candidate intra prediction modes determined from surrounding blocks may be sequentially included in an intra prediction mode candidate group according to a search order, and an index for identifying each candidate intra prediction mode may be determined. Assuming that the index indicating the candidate intra prediction mode added to the intra prediction mode candidate group first is set to a value of 0, the candidate intra prediction mode added as the nth (n is an integer) to the intra prediction mode candidate group may have an index of a value of (n-1).
[0188] In another embodiment, the candidate intra prediction modes included in the intra prediction mode candidate group may be configured to have an index indicating the candidate intra prediction mode for each intra prediction mode type within a preset index range for each intra prediction mode type. For example, the intra prediction mode candidate group may be configured to include a total of four candidate intra prediction modes, including two DIMD candidate intra prediction modes, one TIMD candidate intra prediction mode, and one OBIC candidate intra prediction mode, and may be configured to have an index within a preset index range for each intra prediction mode type, such as {first DIMD candidate intra prediction mode (index 0), second DIMD candidate intra prediction mode (index 1), first TIMD candidate intra prediction mode (index 2), first OBIC candidate intra prediction mode (index 3)}. Similarly, a specific index value may be set to point to a candidate of a specific intra prediction mode type. That is, a specific intra prediction mode type may be set to be signaled through a specific index value. For example, the TIMD candidate intra prediction mode can be configured to always be signaled via information having a value of index 2.
[0189] Meanwhile, candidate intra prediction modes included in the intra prediction mode candidate group can be reordered in order of decreasing cost based on the cost obtained through template matching.
[0190] FIG. 11 is a reference diagram for explaining a process of calculating a template cost for rearranging candidate intra prediction modes according to one embodiment of the present disclosure.
[0191] A video encoder (100) applies candidate intra prediction modes included in an intra prediction mode candidate group to a template (1120) of a current block (1110) to obtain a prediction value of the template (1120), rearranges the candidate intra prediction modes included in the intra prediction mode candidate group in order of decreasing cost based on a cost which is a difference value between the prediction value of the template and the template, and encodes index information indicating an intra prediction mode applied to the current block among the candidate intra prediction modes included in the rearranged intra prediction mode candidate group.
[0192] The template (1120) may include a first pixel line adjacent to the upper side of the current block (1110), a second pixel line adjacent to the upper side of the first pixel line, a third pixel line adjacent to the left side, and a fourth pixel line adjacent to the left side of the third pixel line. The template (1120) is not limited to the above-described example and may be configured in various ways using previous pixels processed before the current block (1110). When calculating the cost, various cost calculation methods such as SAD (Sum of Absolute Differences), SATD (Sum of Absolute Transformed Differences), MRSAD (Motion-Refined SAD), and MRSATD (Motion-Refined SATD) may be used.
[0193] The video decoder (200) can determine the intra prediction mode of the current block by rearranging candidate intra prediction modes included in the intra prediction mode candidate group in the same order as the video encoder (100) from a small template cost to a large template cost, and obtaining index information indicating the intra prediction mode applied to the current block among the candidate intra prediction modes included in the rearranged intra prediction mode candidate group from the bitstream.
[0194] In one embodiment, when configuring intra prediction mode candidates, the video encoder (100) or the video decoder (200) adds available intra prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks of a current block to an intra prediction mode candidate group according to a predetermined search order, and when an intra prediction mode candidate group including intra prediction mode candidates of a preset total number of intra prediction mode candidates is determined, the candidate intra prediction modes are no longer searched, and the candidate intra prediction modes included in the current intra prediction mode candidate are rearranged in order of decreasing cost according to template matching.
[0195] The video encoder (100) or the video decoder (200) may add available intra prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks of a current block to an intra prediction mode candidate group according to a predetermined search order, determine an intra prediction mode candidate group including intra prediction mode candidates of a total number of intra prediction mode candidates set in advance, apply each candidate intra prediction mode included in the intra prediction mode candidate group to a template composed of neighboring pixels of the current block, obtain a prediction value of the template according to each candidate intra prediction mode, calculate a cost based on a difference value between the prediction value of the template and the template, and rearrange the order of the candidate intra prediction modes included in the intra prediction mode candidate group in the order of the smallest cost.
[0196] For example, if a total of three intra prediction mode candidates are set, the video encoder (100) or the video decoder (200) can rearrange the three intra prediction mode candidates by calculating the template cost for each of the three intra prediction mode candidates without searching the surrounding blocks any further once the three intra prediction mode candidates are searched.
[0197] In one embodiment, when configuring intra prediction mode candidates, the video encoder (100) or the video decoder (200) searches all surrounding blocks used in determining candidate intra prediction modes of the current block according to a predetermined search order, adds all available intra prediction modes of the surrounding blocks to a temporary intra prediction mode candidate group, and then applies each candidate intra prediction mode included in the temporary intra prediction mode candidate group to a template composed of surrounding pixels of the current block to obtain a prediction value of the template according to each candidate intra prediction mode, calculates a cost based on a difference value between the prediction value of the template and the template, and rearranges the order of the candidate intra prediction modes included in the temporary intra prediction mode candidate group in descending order of cost. Then, the video encoder (100) or the video decoder (200) can determine the intra prediction mode candidate group by extracting candidate intra prediction modes of a total number of intra prediction mode candidates set in advance, starting with a candidate intra prediction mode having a low index, from the rearranged temporary intra prediction mode candidate group.
[0198] For example, assuming that the total number of intra prediction mode candidates set in advance is 3, and the number of candidate intra prediction modes included in the temporary intra prediction mode candidate group using the intra prediction modes of available surrounding blocks is 30, the video encoder (100) or the video decoder (200) can apply the 30 candidate intra prediction modes included in the temporary intra prediction mode candidate group to a template to obtain a prediction value of the template, calculate a cost based on a difference value between the prediction value of the template and the template, and rearrange the order of the candidate intra prediction modes included in the temporary intra prediction mode candidate group in the order of the smallest cost. Then, the video encoder (100) or the video decoder (200) can extract the three candidate intra prediction modes set in advance from the candidate intra prediction mode having a low index from the rearranged temporary intra prediction mode candidate group to determine the intra prediction mode candidate group.
[0199] In one embodiment, when configuring intra prediction mode candidates, the video encoder (100) or the video decoder (200) determines a temporary intra prediction mode candidate group by adding available intra prediction modes of surrounding blocks to the intra prediction mode candidate group according to intra prediction mode type according to a predetermined search order, and applies each candidate intra prediction mode included in the temporary intra prediction mode candidate group to a template composed of surrounding pixels of the current block to obtain a prediction value of the template according to each candidate intra prediction mode. And, the video encoder (100) or the video decoder (200) calculates a cost based on a difference value between a prediction value of a template and the template, rearranges the order of candidate intra prediction modes included in the intra prediction mode candidate group by intra prediction mode type in the order of decreasing cost, and extracts candidate intra prediction modes of a predetermined number of intra prediction mode candidates by intra prediction mode type from the intra prediction mode candidate group rearranged by intra prediction mode type starting from a candidate intra prediction having a low index by intra prediction mode type, thereby determining an intra prediction mode candidate group including a predetermined number of intra prediction mode candidates by intra prediction mode type.
[0200] For example, assuming that the total number of intra prediction mode candidates set in advance is set to a total of three, namely, one TIMD candidate intra prediction mode, one DIMD candidate intra prediction mode, and one OBIC candidate intra prediction mode, the video encoder (100) or the video decoder (200) sequentially searches intra prediction modes of available surrounding blocks to determine a temporary intra prediction mode candidate group including one or more TIMD candidate intra prediction modes, one or more DIMD candidate intra prediction modes, and one or more OBIC candidate intra prediction modes, and rearranges each of the TIMD candidate intra prediction modes, the DIMD candidate intra prediction modes, and the OBIC candidate intra prediction modes based on a template cost, and then extracts a candidate intra prediction mode having the smallest cost for each intra prediction mode type, thereby determining an intra prediction mode candidate group including one TIMD candidate intra prediction mode, one DIMD candidate intra prediction mode, and one OBIC candidate intra prediction mode. Can be.
[0201] Meanwhile, when configuring intra prediction mode candidates, the video encoder (100) or the video decoder (200) determines whether the intra prediction mode of the surrounding block is identical to a candidate intra prediction mode already included in the intra prediction mode candidate group when the available intra prediction modes of the surrounding blocks are searched according to a predetermined search order, and if the intra prediction mode of the surrounding block is identical to an intra prediction mode candidate already included in the intra prediction mode candidate group, the video encoder (100) or the video decoder (200) does not add the intra prediction mode of the newly searched surrounding block to the intra prediction mode candidate group when the intra prediction mode of the newly searched surrounding block is different from a candidate intra prediction mode already included in the intra prediction mode candidate group.
[0202] For example, assuming that the total number of intra prediction mode candidates set in advance is three and that the intra prediction mode already includes a DIMD candidate intra prediction mode and a TIMD candidate intra prediction mode, the video encoder (100) or the video decoder (200) may skip the additionally searched DIMD or TIMD mode without including it in the intra prediction mode candidate group when an intra prediction mode type of DIMD or TIMD that is already included in the intra prediction mode candidate group is additionally searched during the search process of the surrounding block.
[0203] In one embodiment, even when the same type of intra prediction mode is searched, if the details related to the intra prediction mode are not the same, the intra prediction mode of the newly searched neighboring block may be included in the intra prediction mode candidate group. Specifically, when the available intra prediction modes of the neighboring blocks are searched according to a predetermined search order, the video encoder (100) or the video decoder (200) compares the intra prediction mode-related information of the intra prediction mode of the neighboring block with the intra prediction mode-related information of the intra prediction mode already added to the intra prediction mode candidate group, and if the intra prediction mode-related information of the intra prediction mode of the neighboring block and the intra prediction mode-related information of the intra prediction mode already added to the intra prediction mode candidate group are the same, the intra prediction mode of the neighboring block is not added to the intra prediction mode candidate group, and if the intra prediction mode-related information of the intra prediction mode of the neighboring block and the intra prediction mode-related information of the intra prediction mode already added to the intra prediction mode candidate group are not the same, the intra prediction mode of the neighboring block is added to the intra prediction mode candidate group.
[0204] For example, assuming that a TIMD candidate intra prediction mode is already included, when a neighboring block newly encoded with a TIMD intra prediction mode is searched for according to a predetermined search order, the video encoder (100) or the video decoder (200) compares the details of the parameters applied during TIMD intra prediction, such as intra angular indexes and weighting factors, in the previously included TIMD candidate intra prediction mode with the details of the intra angular indexes and weighting factors used in the newly searched TIMD candidate intra prediction mode, and if the details are different, includes the newly searched TIMD candidate intra prediction mode information in the intra prediction mode candidate group together with the new details.
[0205] In the present disclosure, detailed information, which is parameters related to an intra prediction mode, may be referred to as additional information or offset information. The offset information may be used to determine or correct parameters applied during intra prediction in relation to a determined candidate intra prediction mode, particularly in an intra merge offset mode.
[0206] If the candidate group-based intra prediction mode of the current block is the intra merge offset mode, the offset information may be determined for each intra prediction mode type. For example, if the intra prediction mode of the current block is DIMD, the offset information may include intra mode index information, weighting factor information, and position-dependent index information. If the intra prediction mode of the current block is TIMD or OBIC, the offset information may include intra mode index information and weighting factor information. If the intra prediction mode of the current block is the general intra prediction mode, the offset information may include intra mode index information and MPM (Most Probable Mode) information. If the intra prediction mode of the current block is IBC or SGPM, the offset information may include block vector information.
[0207] If the candidate group-based intra prediction mode applied to the current block is the intra merge offset mode, the video encoder (100) encodes basic index information and offset information indicating an intra prediction mode used as the intra prediction mode of the current block among the candidate intra prediction modes included in the intra prediction mode candidate group and transmits them to the video decoder (200). The basic index information may be set to be the same as the index information indicating one of the candidate intra prediction modes included in the intra prediction mode candidate group according to the embodiments of the present disclosure described above.
[0208] The video decoder (200) can determine the intra prediction mode of the current block among candidate intra prediction modes included in the intra prediction mode candidate group using basic index information obtained from the bitstream, and can set parameters used in the intra prediction mode of the current block determined using offset information obtained from the bitstream. For example, if the intra prediction mode of the current block is the TIMD intra prediction mode, and the diff_index value and the diff_weighting_factor value are used as parameters for adjusting the weighting factor in the TIMD intra prediction mode, the video encoder (100) encodes and includes in the bitstream offset information including the diff_index value and the diff_weighting_factor value, together with basic index information, which is index information indicating a TIMD intra prediction mode among candidate intra prediction modes included in the intra prediction mode candidate group, as basic index information, and the video decoder (200) configures the intra prediction mode candidate group, and then determines the TIMD intra prediction mode of the current block from the intra prediction mode candidate group using the basic index information, and determines the weighting factor to be applied to the TIMD intra prediction mode using the diff_index value and the diff_weighting_factor value included in the offset information obtained from the bitstream, and can restore the current block according to the TIMD intra prediction mode.
[0209] Meanwhile, the offset information for each intra prediction mode type described above is stored in the form of a look-up table, with combinations of parameters included in the offset information being stored in advance, and information pointing to one element of the look-up table can be used as the offset information.
[0210] In one embodiment, when the intra merge offset mode is applied, the base index information and offset information can be included in the bitstream in parallel (independently).
[0211] Additionally, when the intra-merge offset mode is applied, only an index pointing to a single element in the candidate intra-merge offset information list, which is constructed by combining the changeable values of the parameters included in the basic index information and the offset information, may be included in the bitstream. In this case, the basic index information and the offset information may be signaled through a single index.
[0212] In addition, even when the basic index information is included in the bitstream separately from the offset information, the offset information may be signaled through an index pointing to one element in a candidate offset list constructed by combining all changeable values of the parameters included in the offset information. In this case, the video encoder (100) may calculate a template cost using template matching for each combination of all changeable values of the parameters included in the offset information, reorder the elements included in the candidate offset list in descending order of template cost based on the template cost, and then encode an index pointing to the offset information applied to the current block from among the reordered candidate offset lists and include it in the bitstream. The video decoder (200) may determine the offset information by calculating a template cost using template matching for each combination of all changeable values of the parameters included in the offset information, similarly to the video encoder (100), reordering the elements included in the candidate offset list in descending order of template cost based on the template cost, and then obtaining an index pointing to the offset information applied to the current block from among the reordered candidate offset lists, from the bitstream.
[0213] FIG. 12 is a flowchart illustrating a video encoding method according to one embodiment of the present disclosure.
[0214] Referring to FIG. 12, the video encoder (100) determines an intra prediction mode candidate group including at least one candidate intra prediction mode based on the intra prediction modes of previous blocks restored before the current block (S1210).
[0215] The video encoder (100) determines the intra prediction mode of the current block from among the candidate intra prediction modes included in the intra prediction mode candidate group (S1220). For example, the intra prediction mode of the current block may be determined from among the candidate intra prediction modes included in the intra prediction mode candidate group based on RDO.
[0216] Then, the video encoder (100) encodes candidate group-based intra prediction mode indication information indicating whether to use a candidate group-based intra prediction mode in which the intra prediction mode of the current block is determined based on an intra prediction mode candidate group including intra prediction mode information of a neighboring block, and information indicating the intra prediction mode of the current block (S1230). A video encoding method according to an embodiment of the present disclosure can configure an intra prediction mode candidate group using intra prediction modes of neighboring blocks according to the intra prediction mode candidate group configuration process described above.
[0217] The methods described herein may be performed by a processor of a video encoder or video decoder. Furthermore, the encoder may generate a bitstream that is decoded by a video signal processing method, and the bitstream generated by the encoder may be stored in a computer-readable, non-transitory storage medium (recording medium).
[0218] The embodiments of the present invention described above may be implemented through various means. For example, the embodiments of the present invention may be implemented using hardware, firmware, software, or a combination thereof.
[0219] Some embodiments may also be implemented in the form of a computer-executable storage medium containing computer-executable instructions, such as program modules executed by a computer. Computer-readable media may be any available media that can be accessed by a computer, and includes both volatile and nonvolatile media, removable and non-removable media.
[0220] Additionally, computer-readable media may include both computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Communication media typically includes other data, such as computer-readable instructions, data structures, or program modules, in a modulated data signal, or other transport mechanism, and includes any information delivery media.
Claims
1. A step of obtaining a bitstream including candidate group-based intra prediction mode indication information indicating whether to use a candidate group-based intra prediction mode in which the intra prediction mode of the current block is determined based on an intra prediction mode candidate group including intra prediction mode information of surrounding blocks; If the candidate group-based intra prediction mode indication information indicates that the candidate group-based intra prediction mode is used, a step of determining an intra prediction mode candidate group including at least one candidate intra prediction mode based on intra prediction modes of previous blocks restored before the current block; A step of obtaining information indicating an intra prediction mode of the current block among at least one candidate intra prediction mode included in the intra prediction mode candidate group from the bitstream; and A step of determining an intra prediction mode of the current block based on information indicating an intra prediction mode of the current block, How to decrypt video.
2. In paragraph 1, The above intra prediction mode candidate group is Including at least one of intra prediction mode information of a neighboring block adjacent to the current block, intra prediction mode information of a neighboring block not adjacent to the current block, history-based intra prediction mode information, and default intra prediction mode information. How to decrypt video.
3. In paragraph 1, The step of determining the intra prediction mode candidate group is A step of determining the availability and intra prediction mode of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks adjacent to the current block according to a predetermined search order; and A step of sequentially adding intra prediction modes of adjacent and non-adjacent surrounding blocks determined to be available based on the above judgment result to the intra prediction mode candidate group according to the predetermined search order, How to decrypt video.
4. In paragraph 3, The above availability is determined based on whether a surrounding block has an area that exceeds the boundary of at least one unit among a picture, a slice, a CTU, and a tile, and the intra prediction mode determination process for an unavailable surrounding block is skipped. How to decrypt video.
5. In paragraph 3, The number of candidate intra prediction modes that can be included in the above intra prediction mode candidate group is predetermined, When the number of candidate intra prediction modes included in the above intra prediction mode candidate group reaches a predetermined number, the search process of the surrounding blocks according to the predetermined scan order is skipped. How to decrypt video.
6. In paragraph 3, The number of candidate intra prediction modes that can be included in the above intra prediction mode candidate group is predetermined for each intra prediction mode type. When the number of intra prediction mode candidates for each intra prediction mode type included in the above intra prediction mode candidate group reaches a predetermined number for each type, the intra prediction mode of the surrounding block corresponding to the intra prediction mode that has reached the number for each type is no longer included in the intra prediction mode candidates. If the number of candidate intra prediction modes by intra prediction mode type included in the above intra prediction mode candidate group does not reach a predetermined number by type, a search process for a surrounding block having an intra prediction mode that does not reach the number by type is performed. How to decrypt video.
7. In paragraph 3, The candidate intra prediction mode included in the above intra prediction mode candidate group is configured to have an index pointing to the candidate intra prediction mode within a preset index range for each intra prediction mode type. How to decrypt video.
8. In paragraph 1, The step of determining the intra prediction mode candidate group is A step of adding available intra prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks to the intra prediction mode candidate group according to a predetermined search order, thereby determining an intra prediction mode candidate group including intra prediction mode candidates of a total number of intra prediction mode candidates set in advance; A step of applying each candidate intra prediction mode included in the intra prediction mode candidate group to a template composed of surrounding pixels of the current block to obtain a prediction value of the template according to each candidate intra prediction mode; and Comprising a step of calculating a cost based on a difference value between the predicted value of the template and the template, and rearranging the order of candidate intra prediction modes included in the intra prediction mode candidate group in order of decreasing cost. How to decrypt video.
9. In paragraph 1, The step of determining the intra prediction mode candidate group is A step of determining a temporary intra prediction mode candidate group by adding available intra prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks to the intra prediction mode candidate group according to a predetermined search order; A step of applying each candidate intra prediction mode included in the temporary intra prediction mode candidate group to a template composed of surrounding pixels of the current block to obtain a prediction value of the template according to each candidate intra prediction mode; A step of calculating a cost based on a difference value between the predicted value of the template and the template, and rearranging the order of candidate intra prediction modes included in the temporary intra prediction mode candidate group in order of decreasing cost; and A step of determining the intra prediction mode candidate group by extracting candidate intra prediction modes of a total number of intra prediction mode candidates set in advance from candidate intra prediction modes having a low index in the rearranged temporary intra prediction mode candidate group, How to decrypt video.
10. In paragraph 1, The step of determining the intra prediction mode candidate group is A step of determining a temporary intra prediction mode candidate group by adding available intra prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks to the intra prediction mode candidate group according to intra prediction mode type according to a predetermined search order; A step of applying each candidate intra prediction mode included in the temporary intra prediction mode candidate group to a template composed of surrounding pixels of the current block to obtain a prediction value of the template according to each candidate intra prediction mode; A step of calculating a cost based on a difference value between the predicted value of the template and the template, and rearranging the order of candidate intra prediction modes included in the intra prediction mode candidate group by intra prediction mode type in order of decreasing cost; and Including a step of extracting candidate intra prediction modes of a predetermined number of intra prediction mode candidates for each intra prediction mode type from a candidate intra prediction mode having a low index from a group of intra prediction mode candidates rearranged by the intra prediction mode type, and determining an intra prediction mode candidate group including a predetermined number of intra prediction mode candidates for each intra prediction mode type. How to decrypt video.
11. In paragraph 1, The step of determining the intra prediction mode candidate group is When the available intra prediction modes of adjacent neighboring blocks and non-adjacent non-adjacent neighboring blocks adjacent to the current block are searched according to a predetermined search order, if the intra prediction mode of the neighboring block is identical to the intra prediction mode already added to the intra prediction mode candidate group, the intra prediction mode of the neighboring block is not added to the intra prediction mode candidate group. How to decrypt video.
12. In paragraph 1, The step of determining the intra prediction mode candidate group is A step of comparing intra-prediction mode-related information of an intra-prediction mode of a neighboring block and non-adjacent non-adjacent neighboring blocks that are available to the current block according to a predetermined search order with intra-prediction mode-related information of an intra-prediction mode already added to the intra-prediction mode candidate group; and If the intra prediction mode-related information of the intra prediction mode of the surrounding block and the intra prediction mode-related information of the intra prediction mode already added to the intra prediction mode candidate group are the same as the result of the comparison, a step of not adding the intra prediction mode of the surrounding block to the intra prediction mode candidate group; and Including a step of adding the intra prediction mode of the surrounding block to the intra prediction mode candidate group when the intra prediction mode-related information of the intra prediction mode of the surrounding block and the intra prediction mode-related information of the intra prediction mode already added to the intra prediction mode candidate group are not the same as the result of the comparison. How to decrypt video.
13. In paragraph 1, The above candidate group-based intra prediction mode is Intra skip mode that determines the intra prediction value using the intra prediction mode of the current block determined from the intra prediction mode candidate group without separate residual information as the restoration value of the current block. An intra merge mode that determines a restoration value of the current block using an intra prediction value using the intra prediction mode of the current block determined from the intra prediction mode candidate group and a residual value included in the bitstream. And Including an intra merge offset mode that obtains offset information used to adjust parameters related to the intra prediction mode of the current block determined from the intra prediction mode candidate group from the bitstream and determines a restoration value of the current block using the intra prediction mode of the current block and the offset information. How to decrypt video.
14. In paragraph 13, The intra prediction mode includes at least one intra prediction mode scheme among a general intra prediction mode including a directional intra prediction mode including a DC and a Planar mode, DIMD (Decoder Side Intra Mode Derivation), TIMD (Template based Intra Mode Derivation), OBIC (Orientation-Based Intra Coding), SGPM (Spatial Geometric Partitioning Mode), IntraTMP (Intra Template Matching Prediction), and IBC (Intra Block Copy). If the candidate group-based intra prediction mode of the current block is the intra merge offset mode, the offset information is determined by intra prediction mode type, If the intra prediction mode of the current block is DIMD, the offset information includes intra mode index information, weighting factor information, and position-dependent index information. If the intra prediction mode of the current block is TIMD or OBIC, the offset information includes intra mode index information and weighting factor information. If the intra prediction mode of the current block is the general intra prediction mode, the offset information includes intra mode index information and MPM (Most Probable Mode) information, If the intra prediction mode of the current block is IBC or SGPM, the offset information includes block vector information. How to decrypt video.
15. In paragraph 13, When the candidate group-based intra prediction mode applied to the current block is the intra merge offset mode, a step of obtaining basic index information and offset information indicating an intra prediction mode used as an intra prediction mode of the current block among candidate intra prediction modes included in the intra prediction mode candidate group from the bitstream; and A step of determining intra prediction mode-related information to be applied to the current block by adjusting intra prediction-related parameters of a candidate intra prediction mode indicated by the basic index information using the offset information, How to decrypt video.
16. In paragraph 15, The above basic index information and the above offset information It is determined through a candidate offset index that points to one element among the candidate offset lists formed by combining the changeable values of the parameters included in the above basic index information and the above offset information. How to decrypt video.
17. In paragraph 16, A step of applying each combination of the intra prediction mode of the current block indicated by the basic index information and the changeable values of the parameters included in the offset information to the template of the current block to obtain a prediction value of the template, and rearranging the elements included in the candidate offset list in order of decreasing cost based on the cost of the template and the prediction value of the template; and Further comprising the step of obtaining a candidate offset index pointing to one element in the rearranged candidate offset list from the bitstream, and obtaining the basic index information and the offset information from one element pointed to by the candidate offset index. How to decrypt video.
18. A video decoding device performing the method of any one of claims 1 to 17.
19. A computer-readable recording medium recording a program for executing the method of any one of claims 1 to 17 on a computer.
20. A step of determining an intra prediction mode candidate group including at least one candidate intra prediction mode based on intra prediction modes of previous blocks restored before the current block; A step of determining an intra prediction mode of the current block among each candidate intra prediction mode included in the intra prediction mode candidate group; and A step of encoding candidate group-based intra prediction mode indication information indicating whether to use a candidate group-based intra prediction mode in which the intra prediction mode of the current block is determined based on an intra prediction mode candidate group including intra prediction mode information of a surrounding block, and information indicating the intra prediction mode of the current block, Video encoding method.
21. A video encoding device performing the method of Article 20.
22. A computer-readable recording medium recording a program for executing the method of Article 20 on a computer.
Citation Information
Patent Citations
Video encoding method and device involving intra prediction, and video decoding method and device
KR102317682B1
Method for manufacturing fruit beverage
KR102485467B1
A video encoding / decoding method and apparatus
KR102575576B1
System and method for detecting step-out of hand piece in radio-frequency skin treatment apparatus
KR102682417B1
KR20210091208A