Image encoding / decoding method and apparatus using intra prediction
By employing adaptive block segmentation and matrix-based intra-frame prediction methods, the problem of low image encoding/decoding efficiency in existing technologies is solved, achieving more efficient encoding/decoding performance.
Patent Information
- Application Number
- CN202310426208.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-09-07
- Filing Date
- 2019-09-06
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2039-09-06
AI Technical Summary
Existing image encoding/decoding methods have low encoding/decoding efficiency, making it difficult to meet the needs of multimedia data processing.
An adaptive block segmentation and matrix-based intra-frame prediction method is adopted to predict the current block by determining reference samples and matrices, including downsampling and upsampling processes.
It improves the efficiency of image encoding/decoding by segmenting tree-structured blocks and matrix-based intra-frame prediction, thereby enhancing encoding/decoding performance.
Smart Images

Figure CN116405679B_ABST
Abstract
Description
[0001] This application is a divisional application of PCT International Patent Application No. PCT / KR2019 / 011554, filed on September 6, 2019, entitled "Image encoding / decoding method and apparatus using intra prediction," which entered the Chinese national phase as Chinese Patent Application No. 201980056309.3, the disclosure of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to an image encoding / decoding method and apparatus. BACKGROUND
[0003] With the popularization of the Internet and portable terminals and the development of information communication technology, the use of multimedia data is rapidly increasing. As a result, in order to perform various services or tasks through image prediction in various systems, the demand for improving the performance and efficiency of the image processing system is significantly increasing, but the research and development results that can respond to this situation are insufficient.
[0004] Thus, in the image encoding / decoding method and apparatus in the related art, there is a need to improve image processing, and in particular, there is a need to improve the performance of image encoding or image decoding. SUMMARY
[0005] TECHNICAL PROBLEM
[0006] The present application aims to improve encoding / decoding efficiency through adaptive block partitioning.
[0007] The present application aims to improve encoding / decoding efficiency through matrix-based intra prediction.
[0008] The present application provides a method and apparatus of determining a reference sample and a matrix for matrix-based intra prediction.
[0009] The present application provides a method and apparatus of downsampling and upsampling for matrix-based intra prediction.
[0010] TECHNICAL SOLUTION
[0011] The video signal processing method and apparatus according to the present application can determine an intra prediction mode of a current block, determine a reference sample for intra prediction of the current block, determine a predetermined matrix based on the intra prediction mode, and predict the current block based on the reference sample and the matrix.
[0012] In the video signal processing method and apparatus according to the present application, determining the reference sample can include determining a neighboring region of the current block and downsampling the determined neighboring region.
[0013] In the video signal processing method and apparatus according to the present application, the neighboring region is divided into a plurality of sample groups, each of which is composed of one or more samples, and a representative value of the sample group is determined as the reference sample, which can be any one of an average value, a minimum value, a maximum value, a mode value, or a median value.
[0014] In the video signal processing method and apparatus according to the present application, the matrix is determined by further considering encoding information of the current block, which can include a size, a shape, an angle or a directionality of an intra prediction mode of the current block.
[0015] In the video signal processing method and apparatus according to the present application, the predicting the current block can include generating a prediction block by applying the matrix to the reference sample.
[0016] In the video signal processing method and apparatus according to the present application, the predicting the current block can further include rearranging all or part of prediction samples of the generated prediction block.
[0017] In the video signal processing method and apparatus according to the present application, the predicting the current block can further include interpolating the current block based on at least one of the prediction block or a reconstructed sample neighboring the current block.
[0018] Technical Effects
[0019] According to the present application, encoding / decoding efficiency can be improved by splitting a tree-structured block.
[0020] According to the present application, encoding / decoding efficiency can be improved by matrix-based intra prediction.
[0021] According to the present application, encoding / decoding efficiency can be improved by downsampling or upsampling for matrix-based intra prediction. BRIEF DESCRIPTION OF DRAWINGS
[0022] Figure 1 A schematic block diagram of an encoding apparatus as an embodiment of the present application is shown.
[0023] Figure 2 A schematic block diagram of a decoding apparatus as an embodiment of the present application is shown.
[0024] Figure 3 A block splitting type as an embodiment to which the present application is applied is shown.
[0025] Figure 4 A tree-structure-based block splitting method as an embodiment to which the present application is applied is shown.
[0026] Figure 5 A process of intra-prediction of a current block based on a matrix as an embodiment of the present application is shown.
[0027] Figure 6 A method of down-sampling a neighboring region to determine a reference sample as an embodiment of the present application is shown.
[0028] Figure 7 A down-sampling method based on a weighted average as an embodiment of the present application is shown.
[0029] Figure 8 A method of dividing a first prediction sample and interpolating a remaining region as an embodiment of the present application is shown.
[0030] Figure 9 A method of assigning a weight value for a distance in an interpolation step as an embodiment of the present application is shown.
[0031] Figure 10 An order of an interpolation step as an embodiment of the present application is shown. DETAILED DESCRIPTION
[0032] The video signal processing method and apparatus according to the present application can determine an intra-prediction mode of a current block, determine a reference sample for the intra-prediction of the current block, determine a predetermined matrix based on the intra-prediction mode, and predict the current block based on the reference sample and the matrix.
[0033] In the video signal processing method and apparatus according to the present application, the determination of the reference sample can include determining a neighboring region of the current block, and down-sampling the determined neighboring region.
[0034] In the video signal processing method and apparatus according to the present application, the neighboring region is divided into a plurality of sample groups, each of the sample groups is composed of one or more samples, a representative value of the sample group is determined as the reference sample, and the representative value can be any one of an average value, a minimum value, a maximum value, a mode value, or a median value.
[0035] In the video signal processing method and apparatus according to the present application, the matrix is determined by further considering encoding information of the current block, and the encoding information can include a size, a shape, an angle or a directionality of an intra-prediction mode of the current block.
[0036] In the video signal processing method and apparatus according to the present application, the prediction of the current block can include generating a prediction block by applying the matrix to the reference sample.
[0037] In the video signal processing method and apparatus according to the present application, the predicting the current block can further include rearranging all or part of the predicted samples of the generated prediction block.
[0038] In the video signal processing method and apparatus according to the present application, the predicting the current block can further include interpolating the current block based on at least one of the prediction block or the reconstructed samples neighboring the current block.
[0039] The present application can be implemented in various ways and can have various embodiments. Specific embodiments are illustrated in the drawings and are described in detail in the detailed description. However, it should be understood that these specific embodiments are not intended to limit the present application to specific embodiments, including all modifications, equivalents, or alternatives within the idea and technical scope of the present application. In describing each drawing, like reference numerals are used to designate like elements.
[0040] The terms of first, second, and the like can be used to describe elements, but the elements should not be limited by the terms. The terms are used only to distinguish one element from another. For example, a first element can be named a second element without departing from the scope of the present application, and similarly, a second element can be named a first element. The term of and / or means a combination of the listed related items or any one of the listed related items.
[0041] When describing that a certain element is "connected" or "coupled" to another element, it should be understood that the certain element can be directly connected or coupled to the other element, or there can be another element between the certain element and the other element. In contrast, when describing that a certain element is "directly connected" or "directly coupled" to another element, it should be understood that there is no other element between the certain element and the other element.
[0042] The terms used in the present application are used only to describe particular embodiments, and are not intended to limit the present application. If it is not explicitly stated otherwise in the document, a singular expression includes a plural expression. In the present application, the terms of "include" or "have" should be understood to indicate that there is the features, numbers, steps, actions, elements, parts, or combinations thereof described in the specification, but not to preclude the existence or possibility of one or more other features, numbers, steps, actions, elements, parts, or combinations thereof.
[0043] If not otherwise defined, all terms including technical or scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and are not to be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0044] Hereinafter, preferred embodiments of the present application will be described in greater detail with reference to the accompanying drawings. Like reference numerals can be used to refer to like elements throughout this application and a detailed description of like elements can be omitted.
[0045] Figure 1 A schematic block diagram of an encoding apparatus as an embodiment of the present application is shown.
[0046] Reference Figure 1 The encoding apparatus 100 can include an image partitioning unit 110, prediction units 120, 125, a transform unit 130, a quantization unit 135, a rearrangement unit 160, an entropy encoding unit 165, an inverse quantization unit 140, an inverse transform unit 145, a filter unit 150, and a memory 155.
[0047] Figure 1 Each of the constituent units indicated in the above can be separately shown to represent different characteristic functions in the image encoding apparatus, and this can mean that each of the constituent units is constituted by a separate hardware. However, for convenience of description, each of the constituent units is listed as each of the constituent units and included therein, at least two of the constituent units are integrated into one constituent unit, or one constituent unit can be divided into a plurality of constituent units to perform a function, and such integrated embodiments of each of the constituent units and separate embodiments are also included in the scope of the present application as long as they do not depart from the essence of the present application.
[0048] In addition, some of the constituent elements can be optional constituent elements for improving performance, and not essential constituent elements for performing the basic functions in the present application. The present application can be implemented only with constituent units that are essential to implement the essence of the present application other than the constituent elements for improving performance, and a structure including only the essential constituent elements other than the optional constituent elements for improving performance is also included in the scope of the present application.
[0049] The image segmentation unit 110 can segment the input image into at least one block. At this time, the block can mean a coding unit (CU), a prediction unit (PU), or a transform unit (TU). The segmentation can be performed based on at least one of a quad tree, a binary tree, or a ternary tree. The quad tree is a manner of quad-dividing an upper block into a lower block having a width and a height of half of the upper block. The binary tree is a manner of binary-dividing an upper block into a lower block having at least one of a width or a height of half of the upper block. In the binary tree segmentation, the block can have not only a square shape but also a non-square shape through the binary tree segmentation based on the foregoing having a height of half of the upper block.
[0050] Hereinafter, in the embodiments of the present application, the coding unit can be used for a unit performing encoding, and can be used for a unit performing decoding.
[0051] The prediction unit 120, 125 can include an inter prediction unit 120 for performing inter prediction and an intra prediction unit 125 for performing intra prediction. It is determined whether to use inter prediction or intra prediction for a prediction unit, and it is possible to determine specific information (e.g., an intra prediction mode, a motion vector, a reference image, etc.) according to each prediction method. At this time, the processing unit for performing prediction can be different from the processing unit for determining the prediction method and the specific content. For example, the method and the mode of prediction, etc. can be determined by the prediction unit, and the prediction can be performed by the transform unit. The residual value (residual block) between the generated prediction block and the original block can be input to the transform unit 130. In addition, in the entropy encoding unit 165, the prediction mode information, the motion vector information, etc. used for prediction can be encoded together with the residual value and transmitted to the decoding device. When a certain encoding mode is used, the original block can also be encoded as it is and transmitted to the decoding unit without generating a prediction block through the prediction unit 120, 125.
[0052] The inter prediction unit 120 can predict a prediction unit based on information of at least one of a previous image or a next image of a current image, and can predict a prediction unit based on information of some regions within the current image that have completed encoding, according to circumstances. The inter prediction unit 120 can include a reference image interpolation unit, a motion prediction unit, and a motion compensation unit.
[0053] In the reference image interpolation section, the reference image information is provided from the memory 155, and pixel information below the integer pixel can be generated in the reference image. For the luminance pixel, in order to generate the pixel information below the integer pixel in the 1 / 4 pixel unit, the DCT-based 8-tap interpolation filter having different filter coefficients can be used. For the color difference signal, in order to generate the pixel information below the integer pixel in the 1 / 8 pixel unit, the DCT-based 4-tap interpolation filter having different filter coefficients can be used.
[0054] The motion prediction section can perform the motion prediction based on the reference image interpolated by the reference image interpolation section. Various methods such as the FBMA (Full search-based Block Matching Algorithm), the TSS (Three Step Search), the NTS (New Three-Step Search Algorithm), etc. can be used as the method of calculating the motion vector. Based on the interpolated pixel, the motion vector can have the motion vector value in the 1 / 2 or 1 / 4 pixel unit. The motion prediction section can predict the current prediction unit by different motion prediction methods. Various methods such as the Skip method, the Merge method, the AMVP (Advanced Motion Vector Prediction) method, etc. can be used as the motion prediction method.
[0055] The intra prediction section 125 can generate the prediction unit based on the reference pixel information adjacent to the current block, which is the pixel information in the current image. Since the adjacent block of the current prediction unit is the block on which the inter prediction is performed, when the reference pixel is the pixel on which the inter prediction is performed, the reference pixel information included in the block on which the inter prediction is performed can be replaced with the reference pixel information of the adjacent block on which the intra prediction is performed. That is, when the reference pixel is unavailable, the unavailable reference pixel information can be replaced with at least one of the available reference pixels.
[0056] The prediction mode in the intra prediction can have the directional prediction mode using the reference pixel information according to the prediction direction and the non-directional mode not using the directional information when the prediction is performed. The mode for predicting the luminance component and the mode for predicting the color difference component can be different, and the intra prediction mode used for predicting the luminance component or the luminance component predicted / reconstructed can be used to predict the color difference component.
[0057] The intra prediction method can generate a prediction block after applying an AIS (Adaptive Intra Smoothing) filter to reference pixels according to an intra prediction mode. The type of the AIS filter applied to the reference pixels can be different. To perform the intra prediction method, an intra prediction mode of a current prediction unit can be predicted from intra prediction modes of neighboring prediction units located adjacent to the current prediction unit. When predicting the prediction mode of the current prediction unit with the mode information predicted from the neighboring prediction units, if the intra prediction modes of the current prediction unit and the neighboring prediction units are the same, information indicating that the intra prediction modes of the current prediction unit and the neighboring prediction units are the same can be transmitted with predetermined flag information, and if the intra prediction modes of the current prediction unit and the neighboring prediction units are different, entropy encoding can be performed to encode the intra prediction mode information of the current block.
[0058] In addition, residual value (Residual) information including a difference between the generated prediction unit and the original block can be generated in the prediction units 120 and 125. The generated residual block can be input to the transform unit 130.
[0059] The transform unit 130 can transform the residual block including the residual data using a transform such as DCT, DST, etc. At this time, the transform type can be determined based on the intra prediction mode of the prediction unit used to generate the residual block.
[0060] The quantization unit 135 can quantize the values transformed into the frequency region by the transform unit 130. The quantization coefficients can vary according to the block or according to the importance of the image. The values calculated from the quantization unit 135 can be provided to the dequantization unit 140 and the rearrangement unit 160.
[0061] The rearrangement unit 160 can perform rearrangement of the coefficient values with respect to the quantized residual block. The rearrangement unit 160 can change the two-dimensional block-shaped coefficients to a one-dimensional vector shape through a coefficient scanning (Coefficient Scanning) method. For example, the rearrangement unit 160 can change the coefficients from the DC coefficient to the coefficients of the high frequency region to a one-dimensional vector shape using a predetermined scanning type.
[0062] The entropy encoding unit 165 can perform entropy encoding based on the values calculated by the rearrangement unit 160. The entropy encoding can use various encoding methods such as an exponential Golomb, a CAVLC (Context-Adaptive Variable Length Coding), a CABAC (Context-Adaptive Binary Arithmetic Coding), etc.
[0063] The entropy encoding unit 165 can encode various information from the rearrangement unit 160 and the prediction unit 120, 125, such as residual coefficient information and block type information of the encoding unit, prediction mode information, partition unit information, prediction unit information, and transmission unit information, motion vector information, reference picture information, interpolation information of the block, filtering information, and the like.
[0064] The entropy encoding unit 165 can entropy-encode the coefficient values of the encoding unit input to the arrangement unit 160.
[0065] The inverse quantization unit 140 and the inverse transform unit 145 inverse-quantize the values quantized in the quantization unit 135 and inverse-transform the values transformed in the transform unit 130. The residual values (Residual) generated by the inverse quantization unit 140 and the inverse transform unit 145 can be combined with the predicted prediction unit by the motion estimation unit, the motion compensation unit, and the intra prediction unit included in the prediction unit 120, 125 to generate a reconstructed block (Reconstructed Block).
[0066] The filtering unit 150 can include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
[0067] The deblocking filter can remove block distortion caused by the boundary between blocks in a reconstructed image. In order to determine whether to perform deblocking, it is determined whether to apply a deblocking filter to the current block based on pixels included in several columns or rows included in the block. When the deblocking filter is applied to the block, a strong filter or a weak filter can be applied according to the required deblocking filter strength. In addition, when the deblocking filter is applied, horizontal filtering and vertical filtering can be processed in parallel when vertical filtering and horizontal filtering are performed.
[0068] The offset correction unit can correct the offset of the original image in pixel units with respect to the image on which deblocking has been performed. In order to perform offset correction with respect to a specific image, a method of determining a region to be offset after dividing the pixels included in the image into a certain number of regions and applying an offset to the region, or a method of applying an offset by considering edge information of each pixel can be used.
[0069] ALF (Adaptive Loop Filtering) can be performed based on a comparison value of a filtered reconstructed image and an original image. After pixels included in an image are classified into predetermined groups, one filter suitable for the group is determined, and filtering can be performed differently for each group. For information on whether ALF is applied, each coding unit (CU) can transmit a luma signal, and the shape of an ALF filter to be applied and filter coefficients can be changed according to each block. In addition, the same shape (fixed shape) of an ALF filter can be applied regardless of the characteristics of an object block to which it is applied.
[0070] The memory 155 can store a reconstructed block or image calculated by the filtering section 150, and when inter prediction is performed, the stored reconstructed block or image can be provided to the prediction sections 120, 125.
[0071] Figure 2 A schematic block diagram of a decoding apparatus as an embodiment of the present application is shown.
[0072] Reference Figure 2 The decoding apparatus 200 can include an entropy decoding section 210, a rearrangement section 215, an inverse quantization section 220, an inverse transform section 225, prediction sections 230, 235, a filtering section 240, and a memory 245.
[0073] Figure 2 Each of the constituent sections indicated in the above is separately shown for the purpose of indicating different characteristic functions in the decoding apparatus, and this can indicate that each of the constituent sections is constituted by separate hardware. However, for the purpose of description, each of the constituent sections is listed as each of the constituent sections and included therein, at least two of the constituent sections are integrated into one constituent section, or one constituent section can be divided into a plurality of constituent sections to perform a function, and such integrated embodiments of each of the constituent sections and separate embodiments are included in the scope of the present application as long as they do not depart from the essence of the present application.
[0074] The entropy decoding section 210 can perform entropy decoding with respect to an input bitstream. For example, in order to perform entropy decoding, various methods such as an exponential Golomb method, a CAVLC (Context-Adaptive Variable Length Coding), a CABAC (Context-Adaptive Binary Arithmetic Coding), etc. can be applied.
[0075] The entropy decoding section 210 can decode information on intra prediction and inter prediction performed by an encoding apparatus.
[0076] The rearranging unit 215 can rearrange the bitstream entropy-decoded by the entropy decoding unit 210. The rearranging can be performed by reconstructing the coefficients expressed in a one-dimensional vector form into coefficients in a two-dimensional block form. The rearranging unit 215 can receive information about the scanning of the coefficients performed by the encoding apparatus, and can perform the rearranging by a method of performing inverse scanning based on the scanning order performed by the encoding apparatus.
[0077] The inverse quantization unit 220 can perform inverse quantization based on the quantization parameter and the coefficient values of the rearranged block.
[0078] The inverse transform unit 225 can perform inverse transform on the inverse-quantized transform coefficients in a predetermined transform type. At this time, the transform type can be determined based on at least one of information about a prediction mode (inter / intra prediction), a size / shape of a block, an intra prediction mode, a component type (luma / chroma component), a partition type (QT, BT, TT, etc.), and the like.
[0079] The prediction units 230, 235 can generate a prediction block based on the prediction block information provided by the entropy decoding unit 210 and the previously decoded block or image information provided by the memory 245.
[0080] The prediction units 230, 235 can include a prediction unit discrimination unit, an inter prediction unit, and an intra prediction unit. The prediction unit discrimination unit can receive various information such as prediction unit information input by the entropy decoding unit 210, intra prediction mode related information of an intra prediction method, motion prediction related information of an inter prediction method, etc., discriminate a prediction unit in a current coding unit (CU), and discriminate whether the prediction unit performs inter prediction or intra prediction. The inter prediction unit 230 can perform inter prediction for a current prediction unit based on information included in at least one of a previous image or a next image of a current image including the current prediction unit using information required for inter prediction of the current prediction unit provided by the encoding apparatus. Alternatively, inter prediction can be performed based on information of some reconstructed areas in the current image including the current prediction unit. To this end, the some reconstructed areas can be added to a reference picture list.
[0081] To perform inter prediction, it can be determined which of a skip mode (Skip Mode), a merge mode (Merge Mode), an AMVP mode (AMVP Mode), and a current image reference mode is used as a motion prediction method of a prediction unit included in a coding unit based on the coding unit.
[0082] The intra prediction section 235 can generate a prediction block based on pixel information in the current picture. When the prediction unit is a prediction unit for which intra prediction is performed, the intra prediction can be performed based on intra prediction mode information of the prediction unit provided by the encoding apparatus. The intra prediction section 235 can include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolation section, and a DC filter. The AIS filter, as a section that filters reference pixels of the current block, can determine whether to apply the filter according to the prediction mode of the current prediction unit. The reference pixels of the current block can be filtered by the AIS filter using the prediction mode of the prediction unit provided by the encoding apparatus and AIS filter information. When the prediction mode of the current block is a mode for which the AIS filter is not applied, the AIS filter can not be applied.
[0083] When the prediction mode of the prediction unit is a prediction unit for which intra prediction is performed based on values of pixels obtained by interpolating the reference pixels, the reference pixel interpolation section can interpolate the reference pixels to generate the reference pixels in a pixel unit below the integer value. When the prediction mode of the current prediction unit is a prediction mode for which the prediction block is generated without interpolating the reference pixels, the reference pixels can not be interpolated. When the prediction mode of the current block is a DC mode, the DC filter can generate the prediction block by filtering.
[0084] The reconstructed block or picture can be provided to the filter section 240. The filter section 240 can include a deblocking filter, an offset correction section, and an ALF.
[0085] Information on whether the deblocking filter is applied to the block or picture can be received from the encoding apparatus, and when the deblocking filter is applied, information on whether a stronger filter or a weaker filter is applied can be received. The deblocking filter of the decoding apparatus can receive the deblocking filter-related information provided by the encoding apparatus, and the decoding apparatus can perform deblocking filtering on the block.
[0086] The offset correction section can perform offset correction on the reconstructed picture based on offset correction type information and offset value information, etc. applied to the picture when encoding.
[0087] The ALF can be applied to the coding unit based on ALF application information, ALF coefficient information, etc. provided by the encoder. Such ALF information can be provided by being included in a specific parameter set.
[0088] The memory 245 can store the reconstructed picture or block as a reference picture or block, and can provide the reconstructed picture to the output section.
[0089] Figure 3 A block partitioning type to which an embodiment of the present application is applied is shown.
[0090] ReferenceFigure 3 The blocks a to s can be obtained according to the split setting and the split mode, and additional block shapes not shown can also be obtained.
[0091] As one example (1), asymmetric splitting can be allowed to be used for tree-based splitting. For example, for a binary tree, it can be a block like b, c, or it can also be a block such as b~g. When a flag allowing asymmetric splitting is not explicitly or implicitly activated according to the encoding / decoding setting, the obtainable candidate blocks can be b or c, and when the flag allowing asymmetric splitting is activated, the obtainable candidate blocks can be b, d, e (horizontal splitting in this example), or c, f, g (vertical splitting in this example).
[0092] In the example, it is assumed that the case where the length ratio of left:right or top:bottom of asymmetric splitting is 1:3 or 3:1 is described, but it is not limited thereto, and there can be candidate groups with other ratios (for example, 1:2, 1:4, 2:3, 2:5, 3:5, etc.) according to the encoding setting.
[0093] The following shows various examples of the split information generated in binary tree splitting (candidate groups of 1:1, 1:3, 3:1 in this example).
[0094] For example, in addition to the flag indicating whether to split and the flag indicating the split direction, a flag indicating the split type can also be generated. At this time, the split type can indicate symmetric or asymmetric splitting. Among them, when asymmetric splitting is determined as the split type, a flag indicating the split ratio can be generated, and an index can be assigned according to the pre-set candidate group. If 1:3 or 3:1 split ratio is supported as a candidate group, the split ratio can be selected by a 1-bit flag.
[0095] Alternatively, in addition to the flag indicating whether to split and the flag indicating the split direction, a flag indicating the split ratio can also be generated. In this example, as a candidate group for the split ratio, a candidate with a 1:1 symmetric ratio can be included.
[0096] In the present disclosure, it is assumed that the binary tree splitting has the structure of the previous example (when the flag allowing asymmetric splitting is activated), and unless otherwise specified, the binary tree indicates a symmetric binary tree.
[0097] As one example (2), for tree-based partitioning, additional tree partitioning can be allowed. For example, partitioning can be performed on a Ternary Tree, a Quad Type Tree, an Octa Tree, etc., through which n partitioned blocks (3, 4, 8, n being an integer in this example) can be obtained. For a Ternary Tree, the supported blocks (when partitioned into multiple blocks in this example) can be h~m, for a Quad Type Tree, the supported blocks can be n~p, and for an Octa Tree, the supported blocks can be q. Whether the tree-based partitioning is supported can be determined implicitly according to the encoding / decoding settings or explicitly generated related information. In addition, it can be used alone or can be used in combination with binary tree, quad tree partitioning, etc. according to the encoding / decoding settings.
[0098] For example, for a binary tree, blocks such as b, c can be used, and when a binary tree and a ternary tree are used in combination (it is assumed in this example that there is a part of overlap between the use range of the binary tree and the use range of the ternary tree), blocks such as b, c, i, 1 can also be used. When a flag indicating whether to allow additional partitioning other than the current tree is explicitly or implicitly inactivated according to the encoding / decoding settings, the available candidate blocks can be b or c, and when activated, the available candidate blocks can be b, i or b, h, i, j (horizontal partitioning in this example), or c, 1 or c, k, 1, m (vertical partitioning in this example).
[0099] In the example, although the case where the length ratio of left:middle:right or top:middle:bottom of the ternary tree partitioning is 2:1:1 or 1:2:1 or 1:1:2 is described, it is not limited thereto, and other ratios can be set according to the encoding.
[0100] The following shows an example of partitioning information generated in the ternary tree partitioning (1:2:1 candidate in this example).
[0101] For example, in addition to the flag indicating whether to partition and the flag indicating the partitioning direction, a flag indicating the partitioning type can also be generated. At this time, the partitioning type can indicate binary tree or ternary tree partitioning.
[0102] In the present application, the adaptive encoding / decoding settings can be applied according to the partitioning method.
[0103] As one example, the partitioning method can be determined according to the type of the block. For example, the encoding block and the transform block can use the quad tree partitioning method, and the prediction block can use the quad tree and binary tree (or ternary tree, etc.) partitioning method.
[0104] As one example, the splitting manner can be determined according to the size of the block. For example, some range (e.g., a x b ~ c x d, when the latter is larger) between the maximum and minimum values of the block can use the quad-tree splitting manner, and some range (e.g., e x f ~ g x h) can use the binary-tree (or ternary-tree, etc.) splitting. At this time, the range information according to the splitting manner can be explicitly generated or implicitly determined, and can also be used when the ranges overlap.
[0105] As one example, the splitting manner can be determined according to the shape of the block (or the block before splitting). For example, when the block shape is a square, quad-tree and binary-tree (or ternary-tree, etc.) splitting can be performed. Alternatively, when the block shape is a rectangle, binary-tree (or ternary-tree, etc.) based splitting can be performed.
[0106] As one example, the splitting setting can be determined according to the type of the block. For example, in the tree-based splitting, the coding block and the prediction block can use the quad-tree, and the transform block can use the binary-tree splitting. Alternatively, the splitting allowed depth for the coding block can be set to m, the splitting allowed depth for the prediction block can be set to n, and the splitting allowed depth for the transform block can be set to o, and m, n, and o can be the same or different.
[0107] As one example, the splitting setting can be determined according to the size of the block. For example, some range (e.g., a x b ~ c x d) of the block can use the quad-tree splitting, some range (e.g., e x f ~ g x h; in this example, it is assumed that c x d is larger than g x h) can use the binary-tree splitting, and some range (e.g., i x j ~ k x l; in this example, it is assumed that g x h is greater than or equal to k x l) can use the ternary-tree splitting. At this time, the ranges can include all ranges between the maximum and minimum values of the block, and the ranges can have a non-overlapping setting or an overlapping setting with each other. For example, the minimum value of some range can be the same as the maximum value of some range, or the minimum value of some range can be smaller than the maximum value of some range. If there are ranges that overlap with each other, the splitting manner having a larger maximum value can have a priority order or information for which splitting manner to use can be explicitly generated. That is, in the splitting manner having a priority order, whether to perform the splitting manner having a lower priority can be determined according to the splitting result, or which splitting manner to use can be determined according to the splitting manner selection information.
[0108] As one example, the splitting setting can be determined according to the shape of the block. For example, when the block shape is a square, the quad-tree splitting can be used. Alternatively, when the block shape is a rectangle, the binary-tree or ternary-tree splitting can be used.
[0109] As an example, the partitioning setting can be determined according to the coding / decoding information (e.g., slice type, color component, coding mode, etc.). For example, when the slice type is I, the quad-tree (or binary-tree, ternary-tree) partitioning can be used in some range (e.g., a x b ~ c x d), when the slice type is P, it can be used in some range (e.g., e x f ~ g x h), and when the slice type is B, it can be used in some range (e.g., i x j ~ k x l). In addition, when the slice type is I, the partitioning allowed depth of the quad-tree (or binary-tree, ternary-tree partitioning) can be set to m, when the slice type is P, it can be set to n, and when the slice type is B, it can be set to o, m, n, and o can be the same or different. The same setting can be applied to some slice types as other slice types (e.g., P and B slices).
[0110] As another example, when the color component is a luma component, the quad-tree (or binary-tree, ternary-tree) partitioning allowed depth can be set to m, and when the color component is a chroma component, it can be set to n, m and n can be the same or different. In addition, the range of the quad-tree (or binary-tree, ternary-tree) partitioning when the color component is a luma component (e.g., a x b ~ c x d) can be the same or different from the range of the quad-tree (or binary-tree, ternary-tree) partitioning when the color component is a chroma component (e.g., e x f ~ g x h).
[0111] As another example, when the coding mode is Intra, the quad-tree (or binary-tree, ternary-tree) partitioning allowed depth can be m, and when the coding mode is Inter, it can be n (assuming n is greater than m in this example), m and n can be the same or different. In addition, the range of the quad-tree (or binary-tree, ternary-tree) partitioning when the coding mode is Intra can be the same or different from the range of the quad-tree (or binary-tree, ternary-tree) partitioning when the coding mode is Inter.
[0112] For the examples described, information can be explicitly generated or implicitly determined for whether to support the adaptive partitioning candidate group structure according to the coding / decoding information.
[0113] The cases of determining the partitioning mode and the partitioning setting according to the coding / decoding setting are described through the examples. The examples represent some cases according to respective factors, and there can be variations in other cases. In addition, the partitioning mode and the partitioning setting can be determined according to a combination of multiple factors. For example, the partitioning mode and the partitioning setting can be determined by the type, size, shape, coding / decoding information, etc. of a block.
[0114] In addition, factors related to the partitioning mode, setting, etc. in the examples can be implicitly determined or information can be explicitly generated to determine whether to allow the adaptive cases as in the above examples.
[0115] The split depth in the split setting indicates the number of times of spatial splitting based on the initial block (the split depth of the initial block in this example is 0), and the greater the split depth, the more capable of splitting into smaller blocks. This can set depth-related settings differently depending on the split method. For example, in a method of performing tree-based splitting, the split depth of a binary tree can share a depth with that of a ternary tree split, the split depth of a quad tree can use a different depth from that of a binary tree split, and the like, and respective depths can be used depending on the type of tree.
[0116] When respective split depths are used depending on the type of tree in this example, the split depth in the split start position of the tree (the block before splitting in this example) can be set to 0. The split depth can be calculated from the position where splitting starts as the center, rather than based on the split range of each tree (the maximum value in this example).
[0117] Figure 4 A block splitting method based on a tree structure, which is an embodiment to which the present application is applied, is shown.
[0118] The thick solid line in the figure indicates a basic coding block, the thick dashed line indicates a quad tree split boundary, the double solid line indicates a symmetric binary tree split boundary, the solid line indicates a ternary tree split boundary, and the thin solid line indicates an asymmetric binary tree split boundary. Boundaries divided according to each split method are indicated except for the thick solid line. The split settings (e.g., split type, split information, split information configuration order, and the like) described below are not limited to the case in this example, and various modified examples can be possible.
[0119] For ease of description, it is assumed that the case where the upper left, upper right, lower left, and lower right blocks (N x N; 64 x 64) with the basic coding block (2N x 2N; 128 x 128) as a reference have respective block split settings is described. First, it is assumed that 4 sub-blocks have been obtained due to a split operation once in the initial block (split depth 0 -> 1; that is, the split depth is increased by 1), and the case where the maximum coding block is 128 x 128, the minimum coding block is 8 x 8, and the maximum split depth is 4 for the quad tree split setting, which is a setting commonly applied to each block.
[0120] (1st; upper left block; A1 to A6)
[0121] This example, as a case where the splitting of a single tree is supported (quaternary tree in this example), can determine the size and shape of the block that can be obtained by one block split setting, such as the maximum coding block, the minimum coding block, the split depth, and the like. This example, as a case where the block that can be obtained according to the splitting is one (2-splitting in the horizontal and vertical directions), the splitting information required for one splitting operation (splitting depth is increased by 1, based on the block 4M x 4N before splitting) is a flag indicating whether to split (if 0 in this example, do not split; if 1, split), and the candidates that can be obtained can be 4M x 4N and 2M x 2N.
[0122] (2; upper right block; A7-A11)
[0123] This example, as a case where the splitting of multiple trees is supported (quaternary tree, binary tree in this example), can determine the size and shape of the block that can be obtained by a plurality of block split settings. In this example, it is assumed that the maximum coding block for the binary tree is 64 x 64, the minimum coding block is one length of 4, and the maximum split depth is 4.
[0124] This example, as a case where the block that can be obtained according to the splitting is two or more (two or four in this example), the splitting information required for one splitting operation (quaternary tree split depth is increased by 1) is a flag indicating whether to split, a flag indicating the split type, a flag indicating the split type, and a flag indicating the split direction, and the candidates that can be obtained can be 4M x 4N, 4M x 2N, 2M x 4N, 4M x N / 4M x 3N, 4M x 3N / 4M x N, M x 4N / 3M x 4N, 3M x 4N / M x 4N.
[0125] If the quaternary tree and binary tree split ranges overlap (i.e., the range in which quaternary tree splitting and binary tree splitting can be performed in the current step), and the current block (before splitting) is a block obtained by quaternary tree splitting (a block obtained by quaternary tree splitting in the parent block <split depth is one less than the current one>), the splitting information can be distinguished and configured by the following cases. That is, when the block supported according to each split setting can be obtained by a plurality of split methods, the classification can be performed to generate the splitting information in the following manner.
[0126] (1) Case where quaternary tree splitting and binary tree splitting overlap
[0127] Table 1
[0128] a b v d QT 1 No Split 0 0 SBT hor 0 1 0 ABT hor 1 / 4 0 1 0 0 ABT hor 3 / 4 0 1 0 1 SBT ver 0 1 1 ABT ver 1 / 4 0 1 1 0 ABT ver 3 / 4 0 1 1 1
[0129] In the table, a is a flag indicating whether or not to perform quadtree splitting, and 1 indicates that quadtree splitting (QT) is performed. If the flag is 0, b, which is a flag indicating whether or not to perform binary tree splitting, is confirmed. If b is 0, no splitting (No Split) is performed for the block, and if b is 1, binary tree splitting is performed.
[0130] c is a flag indicating a splitting direction, and if c is 0, it indicates that horizontal splitting (hor) is performed, and if c is 1, it indicates that vertical splitting (ver) is performed. d is a flag indicating a splitting type, and if d is 0, it indicates that symmetric splitting (Symmetric Binary Tree, SBT) is performed, and if d is 1, it indicates that asymmetric splitting (Asymmetric Binary Tree, ABT) is performed. When d is 1, information on a detailed splitting ratio in asymmetric splitting (1 / 4 or 3 / 4) is confirmed, and when d is 0, in the left / right block or the upper / lower block, the left block and the upper block have a ratio of 1 / 4, and the right block and the lower block have a ratio of 3 / 4, and if d is 1, the opposite is true.
[0131] (2) Case where only binary tree splitting is performed
[0132] In the table, the splitting information can be indicated by the flags b to e other than a.
[0133] For the A7 block in Figure 4 Since quadtree splitting can be performed in the pre-splitting block (A7 to A11) (that is, although quadtree splitting can be performed, binary tree splitting is performed instead of quadtree splitting), it belongs to the case of the splitting information of (1).
[0134] On the contrary, for A8 to A11, since binary tree splitting has already been performed in the pre-splitting block (A8 to A11) instead of quadtree splitting (that is, in the block <A8 to A11>, quadtree splitting cannot be performed any more), it belongs to the case of the splitting information of (2).
[0135] (3; lower left block; A12 to A15)
[0136] This example, as a case where splitting in multiple tree modes (quadtree, binary tree, and ternary tree in this example) is supported, can determine the size and shape of the block that can be obtained by the multiple block splitting settings. In this example, it is assumed that the maximum coding block for binary tree / ternary tree is 64x64, the minimum coding block is one length of 4, and the maximum splitting depth is 4.
[0137] This example is a case where more than 2 blocks (2, 3, 4 in this example) can be obtained by partitioning, and the partitioning information required in the one-time partitioning operation is a flag indicating whether partitioning is performed, a flag indicating the partitioning type, and a flag indicating the partitioning direction, and the candidates that can be obtained are 4M x 4N, 4M x 2N, 2M x 4N, 4M x N / 4M x 2N / 4M x N, M x 4N / 2M x 4N / M x 4N.
[0138] If the quadtree and the binary tree / triple tree partitioning ranges overlap, and the current block is a block obtained by quadtree partitioning, the partitioning information can be distinguished and configured by the following cases.
[0139] (1) Case where quadtree partitioning and binary tree / triple tree partitioning overlap
[0140] Table 2
[0141] a b c d QT 1 No Split 0 0 BT hor 0 1 0 0 TT hor 0 1 0 1 BT hor 0 1 1 0 TT ver 0 1 1 1
[0142] In the table, a is a flag indicating whether quadtree partitioning is performed, and if it is 1, it indicates that quadtree partitioning is performed. If the flag is 0, b, which is a flag indicating whether binary tree or triple tree partitioning is performed, is checked. If b is 0, the block is no longer partitioned, and if b is 1, binary tree or triple tree partitioning is performed.
[0143] c is a flag indicating the partitioning direction, and if c is 0, it indicates horizontal partitioning, and if c is 1, it indicates vertical partitioning, and d is a flag indicating the partitioning type, and if d is 0, it indicates binary tree partitioning (BT), and if d is 1, it indicates triple tree partitioning (TT).
[0144] (2) Case where only binary tree / triple tree partitioning can be performed
[0145] In the table, the partitioning information can be indicated by the flags b to d other than a.
[0146] For the A12 and A15 blocks in Figure 4 Since quadtree partitioning can be performed in the pre-partitioning blocks (A12 to A15), they belong to the case of the partitioning information in (1).
[0147] On the contrary, A13 and A14, which are cases where triple tree partitioning has been performed instead of quadtree partitioning in the pre-partitioning blocks (A13, A14), belong to the case of the partitioning information in (2).
[0148] (4; lower left block; A16 to A20)
[0149] This example, as a case where the partitioning method is supported by multiple trees (quadtree, binary tree, ternary tree in this example), can determine the size and shape of the block that can be obtained by the multiple block partitioning setting. In this example, it is assumed that the maximum coding block for the binary tree / ternary tree is 64x64, the minimum coding block is one length of 4, and the maximum partitioning depth is 4.
[0150] This example, as a case where the block that can be obtained by partitioning is two or more (two, three, four in this example), the partitioning information required for one partitioning operation is a flag indicating whether partitioning is performed, a flag indicating the partitioning category, a flag indicating the partitioning type, and a flag indicating the partitioning direction, and the candidates that can be obtained can be 4Mx4N, 4Mx2N, 2Mx4N, 4MxN / 4Mx3N, 4Mx3N / 4MxN, Mx4N / 3Mx4N, 3Mx4N / Mx4N, 4MxN / 4Mx2N / 4MxN, Mx4N / 2Mx4N / Mx4N.
[0151] If the quadtree and the binary tree / ternary tree partitioning range overlap, and the current block is a block obtained by quadtree partitioning, the partitioning information can be distinguished and configured by the following cases.
[0152] (1) Case where quadtree partitioning and binary tree / ternary tree partitioning overlap
[0153] Table 3
[0154]
[0155] In the table, a is a flag indicating whether quadtree partitioning is performed, and if it is 1, it indicates that quadtree partitioning is performed. If the flag is 0, b is confirmed as a flag indicating whether binary tree partitioning is performed. If b is 0, no further partitioning is performed on the block, and if b is 1, binary tree or ternary tree partitioning is performed.
[0156] c is a flag indicating the partitioning direction, and if c is 0, it indicates horizontal partitioning, and if c is 1, it indicates vertical partitioning. d is a flag indicating the partitioning category, and if d is 0, it indicates ternary tree partitioning, and if d is 1, it indicates binary tree partitioning. When d is 1, e is confirmed as a flag for the partitioning type, and when e is 0, symmetric partitioning is performed, and when e is 1, asymmetric partitioning is performed. When e is 1, information on the detailed partitioning ratio in asymmetric partitioning is confirmed, which is the same as in the previous example.
[0157] (2) Case where only binary tree / ternary tree partitioning can be performed
[0158] In the table, the partitioning information can be indicated by the flags b to f other than a.
[0159] Since Figure 4A20 in the case where the A20 block is a block (A16 to A19) that can be quadtree partitioned, belongs to the case of the (1) original partition information.
[0160] On the contrary, in the case of A16 to A19, as a block (A16 to A19) that has been binary tree partitioned instead of quadtree partitioned, belongs to the case of the (2) original partition information.
[0161] Figure 5 A process of performing intra prediction on a current block based on a matrix is shown as an embodiment of the present application.
[0162] Reference Figure 5 An intra prediction mode for intra prediction of a current block can be determined (S500).
[0163] An encoding / decoding device can determine an intra prediction mode when performing intra prediction on a current block. The current block can be a coding unit (CU), a prediction unit (PU), a transform unit (TU), or any one of these units.
[0164] (E1) The intra prediction mode can be determined based on information of a delivery signal. The information can specify any one of N intra prediction modes predefined in the encoding / decoding device. The predefined intra prediction modes represent all the intra prediction modes available for the current block. N can be a natural number less than or equal to 67 and greater than or equal to 11 (e.g., 67, 35, 11). In addition, the value of N can be determined based on the size of the current block. For example, when the current block is smaller than 8x8, N is determined to be 35, otherwise, N can be determined to be any one of 19 or 11.
[0165] (E2) The intra prediction mode can also be determined by a default mode or index agreed in advance in the encoding / decoding device. The default mode can be at least one of Planar mode (index 0), DC mode (index 1), horizontal mode (index 18), vertical mode (index 50), and diagonal mode (index 2, 34, 66). The index corresponds to the case where the number of predefined intra prediction modes is 67, and different indexes can be assigned to each mode according to the value of N.
[0166] (Embodiment 3) The intra prediction mode can be variably determined based on coding information. The coding information can include information encoded and signaled in an encoding apparatus, and information derived based on information signaled in a decoding apparatus. The coding information can be information about at least one of a current block or a neighboring block. The neighboring block can include a spatial and / or temporal neighboring block of the current block, and the spatial neighboring block can mean a block neighboring at least one of a left side, an upper side, an upper left side, a lower left side, or an upper right side of the current block.
[0167] The coding information can include a block size / shape, availability of a block, a split type, a split number, a component type, a prediction mode, information about an intra prediction mode, an inter mode, motion information, a transform type, a transform skip mode, information about a non-zero residual coefficient, a scan order, a color format, loop filter information, etc. The block size can be represented by any one of a width or a height, a minimum / maximum of a width and a height, a sum of a width and a height, a number of samples belonging to a block, etc. The availability of the block can be determined by considering a block position, a range of a parallel processing region, a decoding order, etc. The prediction mode can mean information indicating an intra mode or an inter mode. The information about the intra prediction mode can include information about whether the intra prediction mode is a non-directional mode, whether the intra prediction mode is a vertical / horizontal mode, a directionality of the intra prediction mode, a number of intra prediction modes pre-defined in an encoding / decoding apparatus, etc. The inter mode can mean information indicating a merge / skip mode, an AMVP mode, or a current picture reference mode. The current picture reference mode can mean a method of predicting a current block using a reconstructed region of a current picture. The current picture can be a picture to which the current block belongs. The current picture can be added to a reference picture list for inter prediction, and can be arranged after a short-term reference picture or a long-term reference picture in the reference picture list. The motion information can include a prediction direction flag, a motion vector, a reference picture index, etc.
[0168] (Embodiment 4) The intra prediction mode can also be derived based on an MPM list and an MPM index. The MPM list can include a plurality of MPMs, and the MPMs can be determined based on intra prediction modes of spatial / temporal neighboring blocks of a current block. The number of MPMs can be x, and x can be an integer of 3, 4, 5, 6, or more.
[0169] For example, the MPM list can include at least one of an intra prediction mode mode A, (mode A-n), (mode A+n), or a default mode of a neighboring block. The n can be an integer of 1, 2, 3, 4, or larger. The neighboring block can represent a block adjacent to a left side and / or an upper layer of the current block. The default mode can be at least one of a Planar mode, a DC mode, or a predetermined directional mode. The predetermined directional mode can include at least one of a horizontal mode (mode V), a vertical mode (mode H), (mode V-k), (mode V+k), (mode H-k), or (mode H+k).
[0170] The MPM index can specify an MPM of the MPM list that is identical to an intra prediction mode of the current block. That is, the MPM specified by the MPM index can be set as the intra prediction mode of the current block.
[0171] The intra prediction mode of the current block can be determined using any one of the aforementioned embodiments 1 to 4 selectively, and can be determined based on a combination of at least two of the embodiments 1 to 4. A predetermined flag can be used for the selection, in which case the flag can be encoded and transmitted by the encoding apparatus.
[0172] Reference Figure 5 A reference sample for intra prediction of the current block can be determined (S510).
[0173] The reference sample can be derived from a neighboring region of the current block. The neighboring region of the current block can include at least one of a left side, a right side, an upper layer, a lower left layer, an upper left layer, a lower right layer, or an upper right layer of the current block.
[0174] The neighboring region can include one or more sample lines. Specifically, the number of sample lines belonging to the neighboring region is k, where k can be 1, 2, 3, 4, or a natural number larger than these. The value of k can be a fixed value agreed upon in advance in the encoding / decoding apparatus, or can be determined variably based on the aforementioned encoding information. For example, when the current block is of a first size (e.g., 4x4, 4x8, 8x4), the neighboring region can be configured as 1 sample line, and when the current block is of a second size (e.g., 8x8, 16x16, etc.), the neighboring region can be configured as 2 sample lines. The sample line can be determined in a vertical direction or a horizontal direction according to the position of the neighboring region. Also, the sample line can be in contact with the current block, or can be away from the current block by a predetermined distance in the vertical and / or horizontal direction.
[0175] The plurality of sample lines can be continuous in the vertical and / or horizontal direction with respect to the current block, or can also be separated from each other by a predetermined distance. As an embodiment, when there are 2 sample lines in the upper layer of the current block, the lowermost sample line is named as the first sample line, and the uppermost sample line is named as the second sample line. At this time, the first sample line and the second sample line can be in contact with each other, or can be separated by a predetermined distance. The predetermined distance can be represented by i line lengths (i.e., width or height). i can be 0, 1, 2, 3, or a natural number greater than 3. As an embodiment, when there are 3 sample lines in the upper layer of the current block, the lowermost sample line is named as the first sample line, the middle sample line is named as the second sample line, and the uppermost sample line is named as the third sample line. At this time, the first sample line and the second sample line can be in contact with each other, and the second sample line and the third sample line can be in contact with each other. Alternatively, the first to third sample lines can also be separated by the predetermined distance. At this time, the interval (d1) between the first and second sample lines can be the same as the interval (d2) between the second and third sample lines. Alternatively, d1 can be set to be greater than d2, or d1 can be set to be less than d2. As an embodiment, when there are more than 4 sample lines in the upper layer of the current block, the 4 sample lines can be determined in the same manner as the 3 sample lines. In addition, the present embodiment can be applied not only to the sample lines in the upper layer, but also to the sample lines in the left side, and the detailed description is omitted herein.
[0176] The reference sample can be derived by using all or part of the samples belonging to the neighboring region.
[0177] (Embodiment 1) Some of the samples of the neighboring region can be samples at a predetermined position in the encoding / decoding device. The predetermined position can include at least one of the leftmost sample, the rightmost sample, or the middle sample of the sample line in the upper layer. The predetermined position can include at least one of the uppermost sample, the lowermost sample, or the middle sample of the sample line in the left side. Alternatively, the predetermined position can include at least one of the odd-numbered samples of the sample line in the upper layer and / or the left side, or at least one of the odd-numbered samples. Alternatively, the predetermined position can also include a sample having a multiple of j of the x-coordinate among the samples of the sample line in the upper layer, or a sample having a multiple of j of the y-coordinate among the samples of the sample line in the left side. j can be 2, 3, 4, or a natural number greater than 4.
[0178] (Embodiment 2) Some of the samples of the neighboring region can also be variably determined based on the encoding information. The encoding information is as described above, and the detailed description is omitted herein.
[0179] Any one of the embodiments 1 or 2 can be selectively utilized, or some samples can be specified based on a combination of the embodiments 1 and 2. At this time, as aforementioned, the interval between some samples can be identically set, but is not limited thereto, and can be differently set.
[0180] The number of some samples can be 1, 2, 3, 4, or more, which is predefined in an encoding / decoding apparatus. In addition, the number of some samples can be differently defined with respect to a left neighboring region and an upper neighboring region of a current block, respectively. For example, when the width of the current block is greater than the height, the number of some samples (numSamA) belonging to the upper neighboring region can be greater than the number of some samples (numSamL) belonging to the left neighboring region. In contrast, when the width of the current block is less than the height, numSamA can be less than numSamL. Alternatively, the number of some samples can be variably determined based on the aforementioned encoding information.
[0181] The samples of the neighboring region can be prediction samples or reconstructed samples. The prediction samples can be obtained through intra prediction or inter prediction. The reconstructed samples can be reconstructed samples before an in-loop filter is applied, or can be reconstructed samples after the in-loop filter is applied.
[0182] On the other hand, the reference samples can be directly derived from the samples of the neighboring region (CASE 1), or can be derived by downsampling the samples of the neighboring region (CASE 2). Any one of the CASE 1 and CASE 2 can be selectively utilized. The selection can be made based on the aforementioned encoding information. For example, when the size of the current block is less than a predetermined threshold, the reference samples can be derived based on the CASE 1, and otherwise, the reference samples can be derived based on the CASE 2. The size can be represented by any one of the width, height, maximum / minimum of the width and height, ratio of the width and height, or product of the width and height of the current block. As an example, when the current block is less than 8x8, the reference samples can be derived from the samples of the neighboring region, and otherwise, the reference samples can be derived by downsampling the samples of the neighboring region. For the downsampling method, the reference samples can be derived by referring to Figure 6 and Figure 7 Further understanding can be made by referring to
[0183] Referring to Figure 5 A matrix for matrix-based intra prediction can be determined (S520).
[0184] The matrix can be determined based on at least one of the intra prediction mode determined in step S500 or the size of the current block. Alternatively, the matrix can be determined by restricting consideration to only the intra prediction mode of the current block, or the matrix can be determined by restricting consideration to only the size of the current block. The size can be represented by any one of a width or a height, a minimum / maximum of the width and the height, a sum of the width and the height, a number of samples belonging to the current block, etc. However, this is not limiting, and the matrix can be further determined by considering coding information about the current block. The coding information is as described above, and a detailed description thereof is omitted herein.
[0185] In particular, the matrix agreed upon in the encoding / decoding apparatus can be divided into a plurality of matrix groups. The plurality of matrix groups can be configured by a first matrix group, a second matrix group, …, an m-th matrix group. Here, m can be a natural number of 2, 3, 4, 5, or more. Based on the size of the current block, the current block can selectively use any one of the plurality of matrix groups. For example, the first matrix group can be used when the size of the current block is 4x4, the second matrix group can be used when the size of the current block is 8x4, 4x8, and 8x8, and the third matrix group can be used in other cases. The matrix group selected based on the size of the current block can include one or more matrix candidates. Any one of the plurality of matrix candidates can be determined by the matrix of the current block. The determination can be made based on coding information (e.g., an intra prediction mode) of the current block.
[0186] The number of the matrix agreed upon can be the same as the number of the aforementioned predefined intra prediction modes. In addition, the number of the matrix agreed upon can be less than the number of the predefined intra prediction modes. At this time, one matrix can be matched with a plurality of intra prediction modes. For example, one matrix can be matched with 2 intra prediction modes. At this time, the number of the matrix agreed upon can have a value of 1 / 2 times the number of the predefined intra prediction modes. However, this is not limiting, and the number of intra prediction modes matched with one matrix can be 3, 4, 5, 6, or more.
[0187] As one embodiment, the matching can be determined by considering directionality and / or symmetry of the intra prediction mode.
[0188] The predefined intra prediction mode can include a directional mode having a predetermined angle. The directional mode can be classified into a first mode group having horizontal directionality and a second mode group having vertical directionality. Assuming that the number of the directional mode is 65, the first mode group can be configured as a mode belonging to between index 2 and index 34, and the second mode group can be configured as a mode belonging to between index 34 and index 66.
[0189] The coding / decoding apparatus only defines the matrix for the first mode group, and the second mode group can also use the matrix defined for the first mode group. Conversely, the coding / decoding apparatus only defines the matrix for the second mode group, and the first mode group can also use the matrix defined for the second mode group. At this time, the number of pre-agreed matrices can have a value of 1 / 2 times the number of predefined intra prediction modes. As an embodiment, when the mode group with symmetry is x, the number of pre-agreed matrices can have a value of 1 / x times the number of predefined intra prediction modes. Wherein, x can be 3, 4 or above.
[0190] The symmetry can include the symmetry of the prediction angle between the mode with vertical directionality and the mode with horizontal directionality, based on the intra prediction mode with -45° angle. Wherein, the intra prediction mode with directionality has a prediction angle (PredAngle) according to each directionality. Wherein, the mode with vertical directionality can include the mode with -45° < (PredAngle) ≤ 45° angle from the mode with -45° angle and the mode along the x-axis direction of the mode. Wherein, the mode with horizontal directionality can include the mode with -45° < (PredAngle) ≤ 45° angle from the mode with -45° angle and the mode along the y-axis direction of the mode, except for the mode.
[0191] Reference Figure 5 The current block can be predicted based on the reference sample and the matrix (S530).
[0192] When the reference sample is determined in step S510, and the matrix is determined in step S520, the coding / decoding apparatus can predict the current block based on the reference sample and the matrix.
[0193] The step of predicting the current block can include a step of applying the matrix to the reference samples to obtain predicted samples (hereinafter, referred to as first predicted samples) of a DS block. The DS block can represent the current block or a down-sampled current block. That is, the DS block can also have the same size as the current block, and the size of the current block can have a size of 1 / 2, 1 / 4, 1 / 8, or 1 / 16 (of at least one of width or height). For example, when the current block is a 4x4, 4x8, or 8x4 block, the DS block can be a 4x4 block. Alternatively, when the current block is an 8x8, 8x16, or 16x8 block, the DS block can be a 4x4 or 8x8 block. Alternatively, when the current block is greater than or equal to 16x16, the DS block can be an 8x8 or 16x16 block. However, the DS block is not limited to a square block, and can also be a non-square block. Alternatively, the DS block can also be limited to a square block. The application of the matrix can include multiplying the reference samples by a weight value obtained from the matrix.
[0194] The step of obtaining the first predicted samples can include at least one of a step of adding an offset value or a filtering step.
[0195] The step of obtaining the first predicted samples can further include a step of rearranging the first predicted samples. The rearranging can be performed only in a case where a plurality of intra prediction modes are matched in one matrix.
[0196] Alternatively, the rearranging can be performed when the intra prediction mode of the current block belongs to a first mode group having a horizontal directionality. For example, when the intra prediction mode of the current block belongs to the first mode group having the horizontal directionality, the rearranging of the first predicted samples for the DS block is performed, and when the intra prediction mode of the current block belongs to a second mode group having a vertical directionality, the rearranging of the first predicted samples for the DS block can not be performed.
[0197] Conversely, the rearranging can be performed when the intra prediction mode of the current block belongs to the first mode group having the vertical directionality. For example, when the intra prediction mode of the current block belongs to the first mode group having the horizontal directionality, the rearranging of the first predicted samples for the DS block is not performed, and when the intra prediction mode of the current block belongs to the second mode group having the vertical directionality, the rearranging of the first predicted samples for the DS block can be performed.
[0198] The rearranging can be performed as in Equation 1 below. Here, x can represent an x-axis coordinate value, and y can represent a y-axis coordinate value. That is, the rearranging can represent a process of assigning the first predicted samples of (x, y) coordinates to (y, x) coordinates.
[0199] [Equation 1]
[0200] The first prediction sample [x][y] = the first prediction sample [y][x]
[0201] Alternatively, the rearrangement according to the present application can also represent a process of rotating a DS block composed of the first prediction samples by a predetermined angle. The predetermined angle can represent 90 degrees or 180 degrees in a clockwise direction, or 90 degrees or 180 degrees in a counterclockwise direction.
[0202] The step of predicting the current block can further include a step of upsampling the current block based on at least one of the neighboring reconstructed samples or the first prediction samples to obtain second prediction samples.
[0203] In the upsampling process, at least one of whether to perform the upsampling or the method of performing the upsampling can be determined based on encoding information of the current block. For example, at least one of whether to perform the upsampling or the method of performing the upsampling can be determined based on a size of a DS block composed of the first prediction samples and a size of the current block. The block size can be represented by any one of a width or a height, a minimum / maximum value of the width and the height, a sum of the width and the height, a number of samples belonging to the block, etc.
[0204] At least one of whether to perform the upsampling can be determined only when a size of a DS block composed of the first prediction samples is smaller than a size of the current block.
[0205] The method of performing the upsampling can include allocating the first prediction samples to predetermined positions within the current block using a ratio of a size of a DS block composed of the first prediction samples and a size of the current block, and interpolating a remaining area within the current block. The remaining area can represent an area other than an area in which the first prediction samples are allocated within the current block. It will be described in detail with reference to Figure 8 to Figure 10 The division of the first prediction samples and the interpolation method for the remaining area are described in detail.
[0206] Figure 6 A method of determining reference samples by downsampling a neighboring area as an embodiment to which the present application is applied is illustrated.
[0207] Reference Figure 6 , Figure 6 (a) of FIG. 1 illustrates a case where neighboring areas for intra prediction are located at a left side of a current block and an upper layer of the current block. In addition, as one embodiment, a sample line located at the left side of the current block contacts the current block and is composed of 1 sample line in a vertical direction. A sample line located at the upper layer of the current block contacts the current block and is composed of 1 sample line in a horizontal direction.
[0208] The reference samples can include a down-sampled region formed by down-sampling a neighboring region of the current block.
[0209] The down-sampled region can be derived from an average value, a maximum value, a minimum value, a mode, or a filtered value of all or some of the samples belonging to the neighboring region.
[0210] When derived from the average value, the down-sampled region can be formed by a method of assigning the average values of different N samples to samples of the down-sampled region.
[0211] The different N samples can be samples arranged in succession, or can be spaced apart by a certain interval. The certain interval is an interval of one or more sample sizes. When the interval is plural, the plural intervals can be uniform or non-uniform. (Here, N is greater than 2 and less than the total number of samples belonging to the neighboring region.) In addition, the combination of the different N samples is referred to as a sample group. At this time, a first sample group can overlap or not overlap with a second sample group.
[0212] As one embodiment, Figure 6 It is shown that N is 2, 2 sample groups do not overlap with each other, and the average values of 2 samples belonging to each sample group are respectively assigned to 1 sample in the down-sampled region to down-sample.
[0213] Alternatively, 3 samples (S1, S2, S3) in succession can constitute a first sample group, and the average value of 3 samples belonging to the first sample group can be assigned to a sample (DS1) of the down-sampled region. 3 samples (S2, S3, S4) in succession can constitute a second sample group, and the average value of 3 samples belonging to the second sample group can be assigned to a sample (DS2) of the down-sampled region.
[0214] Alternatively, after determining the minimum value or the maximum value of 2 samples (S1, S2) belonging to a first sample group, it can be assigned to a sample (DS1) of the down-sampled region. Likewise, after determining the minimum value or the maximum value of 2 samples (S3, S4) belonging to a second sample group, it can be assigned to a sample (DS2) of the down-sampled region. The same can be applied in the case where the first / second sample group is constituted by 3 samples.
[0215] Alternatively, in the upper neighboring region, samples at a predefined position among the samples belonging to the first sample group can be assigned to the samples (DS1) of the down-sampling region, and samples at a predefined position among the samples belonging to the second sample group can be assigned to the samples (DS2) of the down-sampling region. The predefined position can represent a fixed position agreed in advance in the encoding / decoding apparatus, and can be any one of the leftmost, rightmost, or middle position, for example. In the left neighboring region, samples at a predefined position among the samples belonging to each sample group can also be assigned to the samples of the down-sampling region, respectively. In this case, the predefined position can be any one of the uppermost, lowermost, or middle position.
[0216] Figure 7 A down-sampling method based on weighted average values, which is an embodiment to which the present application is applied, is shown.
[0217] In this embodiment, the average value can be calculated by the following formula (hereinafter, referred to as a first average expression):
[0218] the number of samples belonging to the sample group;
[0219] or by the following formula (hereinafter, referred to as a second average expression):
[0220] Sum (weighted value x sample belonging to sample group) / number of samples.
[0221] Figure 7 (a) of FIG. 1 shows a case where the aforementioned sample group is composed of 3 samples. In this case, the weighted values applicable to the 3 samples can be determined to be in the ratio of 1:2:1. As shown in Figure 7 (b) of FIG. 1 shows a case where the sample group is composed of 5 samples. In this case, the weighted values can be determined to be in the ratio of 1:1:4:1:1. As shown in Figure 7 (c) of FIG. 1 shows a case where the sample group is composed of 6 samples. In this case, the weighted values can be determined to be in the ratio of 1:2:1:2:2:1 or 1:2:2:1:2:1, starting from the upper left side in the Z direction. In addition, the Figure 7 (a) and (c) of FIG. 1 show the weighted values applicable to the upper neighboring region, but this can also be equally applicable to the left neighboring region.
[0222] The average value can also include a result value derived by applying a predetermined operation to a plurality of average values calculated by the first average expression or the second average expression. The predetermined operation can be the first average expression or the second average expression. For example, if three samples (i.e., first to third samples) belong to the sample group, an average value between the first sample and the second sample (first value) and an average value between the second sample and the third sample (second value) can be calculated, respectively. The average value can be derived from an average value between the calculated first value and the second value.
[0223] The downsampling method described above can be applied only to the upper neighboring region, or, conversely, only to the left neighboring region. Alternatively, according to an embodiment of the present application, the downsampling method described above (hereinafter, referred to as a first method) can be applied to any one of the upper neighboring region or the left neighboring region, and according to another embodiment of the present application, the downsampling method described above (hereinafter, referred to as a second method) can be applied to the other one of the upper neighboring region or the left neighboring region. Figure 6 Figure 7
[0224] In addition, at least one of the first method or the second method can be selectively used in consideration of the size / shape of the current block. For example, when the width of the current block is greater than a predetermined threshold, the first method can be applied to the upper neighboring region of the current block, and otherwise, the second method can be applied. The height of the current block can be downsam- pled in the same manner. Alternatively, when the current block is not a square, the first method can be applied to any one of the upper neighboring region or the left neighboring region, and the second method can be applied to the other region. At this time, when the width of the current block is greater than the height, the first method can be applied to the upper neighboring region, and the second method can be applied to the left neighboring region. Conversely, when the width of the current block is less than the height, the second method can be applied to the upper neighboring region, and the first method can be applied to the left neighboring region. When the current block is a square, the same downsampling method can be used in the upper neighboring region and the left neighboring region, and the downsampling method can be limited to the first method.
[0225] Figure 8 A method of dividing a first prediction sample, which is a prediction sample to which the present application is applied, and interpolating the remaining regions is shown.
[0226] Referring to Figure 8 (a), the prediction sample of the DS block can be allocated to a prediction sample at a predetermined position in the current block. The predetermined position can be determined by considering the size ratio between the current block and the DS block. For example, the correspondence of the prediction samples between the DS block and the current block can be defined as Equation 2 below.
[0227] [Equation 2]
[0228] The first predicted sample curBLK[(x+1)×r-1][(y+1)×r-1] = the first predicted sample dsBLK[x][y]
[0229] Where r represents the size ratio between the current block and the DS block, and x and y are the x-axis and y-axis coordinates of the first predicted sample within each DS block, respectively. The first predicted sample curBLK can represent the position of the first predicted sample within the current block, and the first predicted sample dsBLK can represent the position of the first predicted sample within the DS block.
[0230] The interpolation, reference Figure 8 (b) can derive samples (hereinafter referred to as interpolation object samples) in the current block that are not partitioned by the first prediction sample, using at least one of the first prediction sample partitioned to the current block or the reconstructed samples adjacent to the current block (hereinafter referred to as interpolation reference samples). Additionally, the interpolation reference samples may also include prediction samples generated by interpolation prior to the current interpolation object sample (i.e., the previous interpolation object sample).
[0231] The location and extent of the reconstructed samples adjacent to the current block are the same as those of the aforementioned reference samples, so their detailed description is omitted here.
[0232] Depending on the location of the interpolation object sample, the interpolation reference sample may consist of multiple first predicted samples, or it may consist of at least one first predicted sample and at least one reconstructed neighboring sample. The reconstructed neighboring samples may selectively utilize any one of samples having the same x-coordinate or y-coordinate as the interpolation object sample, or may utilize multiple samples whose x-coordinate or y-coordinate is at least the same as the interpolation object sample. This selection may be based on the location of the interpolation object sample. For example, if the interpolation object sample has the same x-coordinate as the first predicted sample, the reconstructed neighboring samples may only include samples with the same x-coordinate as the interpolation object sample. Conversely, if the interpolation object sample has the same y-coordinate as the first predicted sample, the reconstructed neighboring samples may only include samples with the same y-coordinate as the interpolation object sample. Alternatively, the reconstructed neighboring samples may also include multiple samples located on the same horizontal and vertical lines as the interpolation object sample.
[0233] The interpolation object sample can be derived from representative values of multiple interpolation reference samples, wherein the representative value can include any one of the average, minimum, maximum, mode, or median value.
[0234] The average value can be calculated using the following formula (hereinafter referred to as the first average expression):
[0235] Total difference reference samples / Number of difference reference samples;
[0236] or can be calculated by the following formula (hereinafter, referred to as a second average expression):
[0237] Sum (weighting value x difference reference sample) / number of difference reference samples.
[0238] The weighting value according to the second average expression can be determined based on the relative / absolute distance between the interpolation object sample and the interpolation reference sample, which can be referred to in detail with reference to Figure 9 Detailed description.
[0239] Figure 9 It is shown that the weighting value for the distance is assigned in the interpolation step as an embodiment to which the present application is applied.
[0240] The weighting value according to the present application can include a weighting value determined based on the distance from the interpolation object sample to the interpolation reference sample. As one embodiment, with reference to Figure 9 , if the first interpolation object sample 910 is interpolated, since the respective distance ratios from the first interpolation object sample 910 to the first interpolation reference sample 911 and the second interpolation reference sample 912 are 3:1, the weighting value ratios applied to the first interpolation reference sample 911 and the second interpolation reference sample 912 can be 1:3. If the second interpolation object sample 920 is interpolated, since the distance ratios from the second interpolation object sample 920 to each of the first interpolation reference sample 921 and the second interpolation reference sample 922 are 1:1, the weighting value ratios applied to the first interpolation reference sample and the second interpolation reference sample 921, 922 can be 1:1.
[0241] In addition, the interpolation filter according to the present application can have directionality. The directionality can include vertical, horizontal, z-type, diagonal, etc. directions.
[0242] The interpolation can be performed based on a predetermined priority order. The priority order can be any one of a case in which the interpolation is performed in the vertical direction after the interpolation is performed in the horizontal direction (first order) or a case in which the interpolation is performed in the horizontal direction after the interpolation is performed in the vertical direction (second order). Or the interpolation can be performed in the vertical direction and the horizontal direction at the same time (third order).
[0243] The current block can be interpolated using only any one of the aforementioned first to third orders, or can be interpolated using a combination of at least two of the first to third orders. For the interpolation order, please refer to Figure 10 Detailed description.
[0244] Figure 10 It is shown that the order of the interpolation step as an embodiment to which the present application is applied.
[0245] Figure 10(a) is about the first order in Figure 9 Specifically, the vertical line to which the first prediction sample belongs can be interpolated first, and then the horizontal line can be interpolated based on the interpolated vertical line and the interpolated reference samples on the left side of the current block.
[0246] Figure 10 (b) is about the second order in Figure 9 Specifically, the horizontal line to which the first prediction sample belongs can be interpolated first, and then the vertical line can be interpolated based on the interpolated horizontal line and the interpolated reference samples on the top of the current block.
[0247] Figure 10 (c) is about the third order in Figure 9 First, the vertical and horizontal lines to which the first prediction sample belongs can be interpolated. Then, the remaining samples which are not interpolated can be interpolated, at this time, the vertical line or the horizontal line can be interpolated only, or the vertical and horizontal lines can be interpolated simultaneously. If the vertical and horizontal lines are interpolated simultaneously, one interpolation target sample can have a first interpolation value on the vertical line and a second interpolation value on the horizontal line simultaneously. At this time, a representative value between the first interpolation value and the second interpolation value can be assigned to the interpolation target sample. The representative value can be derived from the average value, the minimum value, the maximum value, the mode value, or the median value.
[0248] The interpolation order can be an order agreed in advance in the encoding / decoding apparatus, or can be determined selectively based on the encoding information of the current block. The encoding information is as described above, and thus a detailed description thereof is omitted.
[0249] The order can be determined based on the block size. The block size can be represented by any one of the width or the height, the minimum / maximum of the width and the height, the sum of the width and the height, the number of samples belonging to the block, etc.
[0250] For example, when the size of the current block is greater than a predetermined threshold, the first interpolation can be performed, otherwise the second interpolation can be performed. Conversely, when the size of the current block is less than a predetermined threshold, the second interpolation can be performed, otherwise the first interpolation can be performed. The threshold can be 8, 16, 32, or a natural number greater than or equal to 32.
Claims
1. A method of processing a video signal, characterized by, The video signal processing method is applied to a decoder, comprising: determining an intra prediction mode of a current block; determining reference samples for intra prediction of the current block; determining a predetermined matrix based on the intra prediction mode, the matrix being determined from a plurality of matrix groups; and generating a prediction block by applying the matrix to the reference samples; wherein applying the matrix to the reference samples comprises multiplying the reference samples by weighting values obtained from the matrix; transposing all or part of prediction samples of the generated prediction block.
2. The video signal processing method of claim 1, wherein, The reference samples are determined by: determining a neighboring region of the current block; and down-sampling the determined neighboring region.
3. The video signal processing method according to claim 2, wherein: the neighboring region is divided into a plurality of sample groups, each sample group is composed of one or more samples, a representative value of each sample group is determined as the reference sample, and the representative value is any one of an average value, a minimum value, a maximum value, a mode value, or a median value.
4. The video signal processing method according to claim 1, wherein: the matrix is determined by further considering coding information of the current block.
5. The video signal processing method of claim 4, wherein, The method further comprises: interpolating the current block based on at least one of the prediction block or reconstructed samples neighboring the current block.
6. A video signal processing method, characterized by, The video signal processing method is applied to an encoder, comprising: determining an intra prediction mode of a current block; determining reference samples for intra prediction of the current block; determining a predetermined matrix based on the intra prediction mode, the matrix being determined from a plurality of matrix groups; and generating a prediction block by applying the matrix to the reference samples; wherein applying the matrix to the reference samples comprises multiplying the reference samples by weighting values obtained from the matrix, samples of the prediction block being generated at predetermined positions within the current block; transposing all or part of prediction samples of the generated prediction block.
7. The video signal processing method of claim 6, wherein, The reference samples are determined by: determining a neighboring region of the current block; and down-sampling the determined neighboring region.
8. The video signal processing method according to claim 7, wherein: the neighboring region is divided into a plurality of sample groups, each sample group is composed of one or more samples, a representative value of each sample group is determined as the reference sample, and the representative value is any one of an average value, a minimum value, a maximum value, a mode value, or a median value.
9. The video signal processing method according to claim 6, wherein: the matrix is determined by further considering coding information of the current block.
10. The video signal processing method of claim 9, wherein, The method further comprises: interpolating the current block based on at least one of the prediction block or reconstructed samples neighboring the current block.
11. A decoder, characterized by The decoder comprises a first determining unit and a first prediction unit, the first determining unit is configured to determine an intra prediction mode of a current block, determine reference samples for intra prediction of the current block, and determine a predetermined matrix based on the intra prediction mode, the matrix being determined from a plurality of matrix groups; and the first prediction unit is configured to generate a prediction block by applying the matrix to the reference samples. The first prediction unit is configured to generate a prediction block by applying the matrix to the reference samples, wherein the applying the matrix to the reference samples comprises multiplying the reference samples by weighting values obtained from the matrix, and samples of the prediction block are generated at predetermined positions within the current block; and transpose all or part of the prediction samples of the generated prediction block.
12. The decoder of claim 11, wherein The first determination unit is configured to determine a neighboring region of the current block, and down-sample the determined neighboring region.
13. The decoder of claim 12, wherein The neighboring region is divided into a plurality of sample groups, Each sample group comprises one or more samples, A representative value of each sample group is determined as the reference sample, The representative value is any one of an average value, a minimum value, a maximum value, a mode value, or a median value.
14. The decoder of claim 11, wherein The first determination unit is further configured to determine the matrix by further considering encoding information of the current block.
15. The decoder of claim 11, wherein The first prediction unit is further configured to interpolate the current block based on at least one of the prediction block or reconstructed samples neighboring the current block.
16. A decoder, comprising: The decoder comprises a first processor and a first memory storing instructions executable by the first processor, and the instructions, when executed by the first processor, implement the method of any one of claims 1-5.
17. An encoder comprising: The encoder comprises a second determination unit and a second prediction unit, The second determination unit is configured to determine an intra prediction mode of a current block, determine reference samples for intra prediction of the current block, and determine a predetermined matrix based on the intra prediction mode, wherein the matrix is determined from a plurality of matrix groups; The second prediction unit is configured to generate a prediction block by applying the matrix to the reference samples, wherein the applying the matrix to the reference samples comprises multiplying the reference samples by weighting values obtained from the matrix, and samples of the prediction block are generated at predetermined positions within the current block; and transpose all or part of the prediction samples of the generated prediction block.
18. The encoder of claim 17, wherein The second determination unit is configured to determine a neighboring region of the current block, and down-sample the determined neighboring region.
19. The encoder of claim 18, wherein The neighboring region is divided into a plurality of sample groups, Each sample group comprises one or more samples, A representative value of each sample group is determined as the reference sample, The representative value is any one of an average value, a minimum value, a maximum value, a mode value, or a median value.
20. The encoder of claim 17, wherein The second determination unit is further configured to determine the matrix by further considering encoding information of the current block.
21. The encoder of claim 17, wherein The second prediction unit is further configured to interpolate the current block based on at least one of the prediction block or reconstructed samples neighboring the current block.
22. An encoder comprising: The encoder comprises a second processor and a second memory storing instructions executable by the second processor, the instructions, when executed by the second processor, implementing the method of any one of claims 6-10.
23. A computer storage medium, wherein, The computer storage medium stores a computer program, the computer program, when executed by a first processor, implements the method of any one of claims 1-5, or, when executed by a second processor, implements the method of any one of claims 6-10.
Citation Information
Patent Citations
Implicit coding of reference line index used in intra prediction
US20170359595A1