Encoding / decoding method and device, encoder, decoder, bitstream, and storage medium
By enhancing intra-prediction with reference block-based methods, the method improves video encoding and decoding performance, especially for images with overlapping textures, by accurately determining intra-predicted values and reducing bitstream overhead.
Patent Information
- Application Number
- JP2025521080
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2022-10-13
- Publication Date
- 2025-10-03
AI Technical Summary
Existing video encoding and decoding standards suffer from low video encoding and decoding performance due to inadequate intra-prediction methods, which fail to effectively utilize spatial correlation between adjacent pixels.
The proposed method improves intra-prediction accuracy by determining a first reference block and obtaining a first intra-predicted value based on sample values of a reconstructed area adjacent to the current block and the reference block, and using this to generate a bitstream.
This approach enhances video encoding and decoding performance by improving image coding efficiency and reducing bitstream overhead, particularly for images with overlapping textures, while minimizing unnatural transitions between image blocks.
Smart Images

Figure 2025533242000001_ABST
Abstract
Description
[Technical Field]
[0001] This application relates to video imaging technology, and in particular, but not exclusively, to encoding and decoding methods and devices, encoders, decoders, bitstreams, and storage media. [Background technology]
[0002] In the field of video encoding and decoding, how to improve video compression efficiency is of great importance. Video compression technology is made possible because a large amount of data redundancy occurs during the digitization of images and videos. There is strong spatial correlation between adjacent parts or adjacent pixels within an image. Intra-prediction is a prediction method that exploits the spatial correlation between previously coded or decoded pixels around a current block and pixels within the current block, thereby reducing spatial redundancy in video coding based on the prediction results. However, intra-prediction in existing video encoding and decoding standards has the problem of low video encoding and decoding performance. Therefore, it is still meaningful to research methods to further improve the accuracy of intra-prediction, thereby improving video encoding and decoding performance. Summary of the Invention
[0003] The encoding / decoding method and its device, encoder, decoder, bitstream, and storage medium provided in the embodiments of the present application can improve the accuracy of intra prediction, thereby improving the video encoding and decoding performance. The encoding / decoding method and its device, encoder and decoder, bitstream, and storage medium provided in the embodiments of the present application are realized as follows.
[0004] According to one aspect of an embodiment of the present application, there is provided a decoding method to be applied to a decoder, the method including: determining a first reference block for a current block; obtaining a first intra predicted value of the current block based on sample values of a reconstructed area adjacent to the current block and sample values of the first reference block; and determining a reconstructed value of the current block based on the first intra predicted value of the current block.
[0005] According to another aspect of an embodiment of the present application, there is provided a decoding method to be applied to a decoder, the method including: determining a plurality of reference blocks for a current block, the plurality of reference blocks being located within an image in which the current block is located; obtaining a first intra-predicted value of the current block based on sample values of the plurality of reference blocks; and determining a reconstructed value of the current block based on the first intra-predicted value of the current block.
[0006] According to yet another aspect of an embodiment of the present application, there is provided an encoding method to be applied to an encoder, the method including: determining a first reference block for a current block; obtaining a first intra-predicted value of the current block based on sample values of a reconstructed area adjacent to the current block and sample values of the first reference block; obtaining a residual value of the current block based on the first intra-predicted value of the current block and the sample values of the current block; and generating a bitstream based on the residual value.
[0007] According to yet another aspect of an embodiment of the present application, there is provided an encoding method to be applied to an encoder, the method including: determining a plurality of reference blocks for a current block, the plurality of reference blocks being located within an image in which the current block is located; obtaining a first intra-predicted value of the current block based on sample values of the plurality of reference blocks; obtaining a residual value of the current block based on the first intra-predicted value of the current block and the sample values of the current block; and generating a bitstream based on the residual value.
[0008] According to another aspect of an embodiment of the present application, there is provided a decoding device to be applied to a decoder, the device comprising: a first determination module configured to determine a first reference block for a current block; a first prediction module configured to obtain a first intra predicted value of the current block based on sample values of a reconstructed area adjacent to the current block and sample values of the first reference block; and a second determination module configured to determine a reconstructed value of the current block based on the first intra predicted value of the current block.
[0009] According to yet another aspect of an embodiment of the present application, there is provided a decoding device to be applied to a decoder, the device comprising: a third determination module configured to determine a plurality of reference blocks for a current block, the plurality of reference blocks being located within an image in which the current block is located; a second prediction module configured to obtain a first intra-predicted value of the current block based on sample values of the plurality of reference blocks; and a second determination module configured to determine a reconstructed value of the current block based on the first intra-predicted value of the current block.
[0010] According to yet another aspect of an embodiment of the present application, there is provided a decoder comprising a first memory and a first processor, wherein the first memory stores a computer program executable by the first processor, and the first processor executes the computer program to realize the decoding method described in the embodiment of the present application.
[0011] According to another aspect of an embodiment of the present application, there is provided an encoding device to be applied to an encoder, the device comprising: a first determination module configured to determine a first reference block for a current block; a first prediction module configured to obtain a first intra-predicted value of the current block based on sample values of a reconstructed area adjacent to the current block and sample values of the first reference block; and a generation module configured to obtain a residual value of the current block based on the first intra-predicted value of the current block and the sample values of the current block, and to generate a bitstream based on the residual value.
[0012] According to yet another aspect of an embodiment of the present application, there is provided an encoding device to be applied to an encoder, the device comprising: a third determination module configured to determine a plurality of reference blocks for a current block, the plurality of reference blocks being located within an image in which the current block is located; a second prediction module configured to obtain a first intra-predicted value of the current block based on sample values of the plurality of reference blocks; and a generation module configured to obtain a residual value of the current block based on the first intra-predicted value of the current block and the sample values of the current block, and to generate a bitstream based on the residual value.
[0013] According to yet another aspect of an embodiment of the present application, there is provided an encoder comprising a second memory and a second processor, wherein the second memory stores a computer program executable by the second processor, and the second processor executes the computer program to realize the encoding method described in the embodiment of the present application.
[0014] According to another aspect of an embodiment of the present application, a bitstream is provided, the bitstream being generated based on residual values between a first intra-predicted value of a current block and sample values of the current block, the first intra-predicted value being obtained by an encoding method described in an embodiment of the present application.
[0015] According to yet another aspect of an embodiment of the present application, there is provided an electronic device comprising: a processor configured to execute a computer program; and a computer-readable storage medium having the computer program stored thereon, the computer program causing the processor to execute an encoding method described in an embodiment of the present application or a decoding method described in an embodiment of the present application.
[0016] According to yet another aspect of an embodiment of the present application, there is provided a computer-readable storage medium having a computer program stored therein, the computer program causing a processor to execute an encoding method described in an embodiment of the present application or a decoding method described in an embodiment of the present application.
[0017] It should be noted that the general description above and the detailed description below are merely exemplary and explanatory and are not intended to limit the present application. [Brief explanation of the drawings]
[0018] [Figure 1] FIG. 1 is a schematic diagram showing the basic process of a video codec. [Figure 2] FIG. 2 is a schematic diagram showing the positional relationship between a current block and reference pixels; [Figure 3] FIG. 1 is a schematic diagram illustrating the use of four reference rows / columns in an intra prediction method. [Figure 4] FIG. 1 is a schematic diagram showing nine modes for performing intra prediction on 4x4 blocks in H.264. [Figure 5] FIG. 1 is a schematic diagram showing 35 types of intra prediction modes used in HEVC. [Figure 6] FIG. 1 is a schematic diagram showing 67 types of intra modes used in VVC. [Figure 7] FIG. 10 is a schematic diagram showing a wide-angle mode. [Figure 8] FIG. 1 is a schematic diagram showing 66 types of prediction modes used in AVS3. [Figure 9] FIG. 2 is a schematic diagram showing screen content. [Figure 10] FIG. 1 is a schematic diagram illustrating inter prediction. [Figure 11] FIG. 1 is a schematic diagram showing intraTMP. [Figure 12] FIG. 2 is a schematic diagram showing a floor image. [Figure 13] FIG. 10 is a schematic diagram showing a wall panel image. [Figure 14] 1 is a flowchart illustrating an implementation of an encoding method according to an embodiment of the present application; [Figure 15A] FIG. 2 is a schematic diagram illustrating that the position of a first reference block relative to the reconstructed region in a configuration region is consistent with the position of a current block relative to the reconstructed region according to an embodiment of the present application; [Figure 15B] FIG. 1 is a schematic diagram of filtering according to an embodiment of the present application. [Figure 16] FIG. 10 is a schematic diagram illustrating a second embodiment according to the present invention. [Figure 17] 1 is a flowchart illustrating an implementation of an encoding method according to an embodiment of the present application; [Figure 18] 1 is a flowchart illustrating an implementation of a decoding method according to an embodiment of the present application; [Figure 19] 1 is a flowchart illustrating an implementation of a decoding method according to an embodiment of the present application; [Figure 20] FIG. 2 is a schematic diagram illustrating the positional relationship between a current block and its surrounding reconstructed pixel region. [Figure 21] FIG. 1 is a schematic diagram illustrating a configuration of a decoding device according to an embodiment of the present application. [Figure 22] FIG. 10 is a schematic diagram illustrating the configuration of another decoding device according to an embodiment of the present application. [Figure 23]1 is a schematic diagram illustrating a configuration of an encoding device according to an embodiment of the present application; [Figure 24] 1 is a schematic diagram illustrating a configuration of an encoding device according to an embodiment of the present application; [Figure 25] FIG. 2 is a schematic diagram illustrating the configuration of a decoder according to an embodiment of the present application. [Figure 26] FIG. 1 is a schematic diagram illustrating a configuration of an encoder according to an embodiment of the present application. DETAILED DESCRIPTION OF THE INVENTION
[0019] The drawings herein are incorporated into this specification and constitute a part of this specification. These drawings illustrate embodiments that are consistent with the present application and are used to explain the technical solutions of the present application together with this specification. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without any creative efforts.
[0020] The flowcharts shown in the drawings are merely illustrative and do not necessarily include all contents and operations / steps, nor do they necessarily have to be performed in the order described. For example, some operations / steps may be further decomposed, and some operations / steps may be integrated or partially integrated, so that the actual execution order may be changed according to actual circumstances.
[0021] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the specific technical solutions of the present application will be described in more detail below with reference to the drawings of the embodiments of the present application. The following embodiments are used to explain the present application, but are not intended to limit the present application.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terms used herein are merely for the purpose of describing the embodiments of the present application and are not intended to be limiting of the present application.
[0023] In the description below, the statements "in some embodiments" or "in other embodiments" or "in one example" describe a subset of all possible embodiments, but it will be understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without contradiction.
[0024] It should be noted that the terms "first / second / third" and the like in the examples herein do not represent a particular order, but rather distinguish between similar or different objects. As will be understood, "first / second / third" and the like can be used to interchange a particular order or order when appropriate, and the examples of the present application described herein can be performed in an order other than that shown or described herein.
[0025] The encoder and decoder frameworks and service scenarios described in the embodiments of the present application are intended to more clearly explain the technical solutions of the embodiments of the present application, and do not limit the technical solutions provided in the embodiments of the present application. It is well known to those skilled in the art that with the evolution of encoders and decoders and the emergence of new service scenarios, the technical solutions provided in the embodiments of the present application can be similarly applied to similar technical problems.
[0026] Most video encoding and decoding standards use a block-based hybrid coding framework. Each image, subimage, or frame in a video is divided into square largest coding units (LCUs) or coding tree units (CTUs) of the same size (e.g., 128x128 or 64x64). Each LCU or CTU can be divided into rectangular coding units (CUs) according to a rule. The coding units can be divided into prediction units (PUs) and / or transform units (TUs). The hybrid coding framework includes modules such as prediction, transform, quantization, entropy coding, and an in-loop filter. The prediction module includes intra-prediction and inter-prediction. Inter-prediction includes motion estimation and motion compensation. Because there is a strong correlation between adjacent pixels within a frame of video, video encoding and decoding techniques use intra-prediction methods to remove spatial redundancy between adjacent pixels. Because there is a strong similarity between adjacent frames in video, video encoding and decoding techniques use inter-prediction methods to remove temporal redundancy between adjacent frames, thereby improving the efficiency of encoding and decoding.
[0027] The basic process of the encoder and decoder is as shown in Figure 1. On the encoding side, a frame of image 101 is divided into blocks, a predicted block of the current block is generated using intra- or inter-prediction for the current block, the predicted block is subtracted from the original block of the current block to obtain a residual block, the residual block is transformed and quantized to obtain a quantized coefficient matrix, the quantized coefficient matrix is entropy coded, and the resulting bitstream is generated. On the decoding side (not shown), intra- or inter-prediction for the current block is used to generate a predicted block of the current block, while the bitstream is analyzed to obtain a quantized coefficient matrix, the quantized coefficient matrix is inversely quantized and inversely transformed to obtain a residual block, and the predicted block and residual block are added to obtain a reconstructed block. The reconstructed block forms a reconstructed image, and in-loop filtering is performed on the reconstructed image on an image-by-image or block-by-block basis to obtain a decoded image. On the encoding side, the decoded image is obtained by performing the same operations as on the decoding side. On the encoding side, the decoded image is used as a reference frame for inter-prediction of a subsequent frame. Block partition information determined by the encoding side, mode information such as prediction, transform, quantization, entropy coding, and in-loop filtering, or parameter information, should be included in the bitstream as necessary. The decoding side analyzes the bitstream and determines the same block partition information, mode information such as prediction, transform, quantization, entropy coding, and in-loop filtering, or parameter information as the encoding side by analyzing it based on existing information, thereby ensuring that the decoded image obtained by the encoding side is the same as the decoded image obtained by the decoding side. The decoded image obtained by the encoding side is usually also called a reconstructed image. During prediction, the current block can be divided into prediction units, and during transformation, the current block can be divided into transform units, and the division of the prediction units and the transform units may be different.
[0028] The above is a basic process of a video codec in a block-based hybrid coding framework, and as technology develops, some modules or steps of the framework or process may be optimized. The encoding and decoding methods provided in the embodiments of the present application are applicable to the basic process of a video codec in the block-based hybrid coding framework, but are not limited to the framework and process. It is well known to those skilled in the art that with the evolution of encoders and decoders and the emergence of new service scenarios, the methods provided in the embodiments of the present application can also be applied to similar technical problems.
[0029] The current block may be a current coding unit (CU) or a current prediction unit (PU), etc.
[0030] As can be seen, there is a strong spatial correlation between adjacent parts or pixels within an image. Intra prediction is a prediction method that utilizes the spatial correlation between the coded or decoded pixels around the current block and the pixels within the current block. For example, as shown in FIG. 2, a white 4x4 block is the current block, and the gray pixels in one column to the left and one row above the current block are reference pixels for the current block. In intra prediction, these reference pixels are used to predict the current block. These reference pixels may all be available, i.e., all have already been coded or decoded, or some may not be available. For example, if the current block is located at the leftmost edge of the entire frame, the reference pixels to the left of the current block may not be available. Or, if the lower left part of the current block has not yet been coded or decoded when coding and decoding the current block, the reference pixels to the lower left may also not be available. If reference pixels are unavailable, available reference pixels or a specific value or method may be used for padding, or no padding may be used.
[0031] In the multiple reference line (MRL) intra prediction method, coding efficiency can be improved by using more reference pixels. Figure 3 shows an example using four reference rows / columns.
[0032] There are multiple prediction modes for intra prediction. Figure 4 shows nine modes for intra prediction for 4x4 blocks in H.264. Here, in mode 0, the upper pixels of the current block are copied vertically to the current block as a predicted value. In mode 1, the reference pixels on the left side are copied horizontally to the current block as a predicted value. In mode 2 (i.e., DC mode), the average value of eight points A to D and I to L is used as the predicted value for all points. In modes 3 to 8, the reference pixels are copied to corresponding positions of the current block at specific angles (hence, modes 3 to 8 are also called angular prediction modes). Because some positions of the current block do not exactly correspond to the reference pixels, it is necessary to use a weighted average value of the reference pixels or a fractional pixel of the interpolated reference pixels.
[0033] In addition, modes such as Plane and Planar are also available. With technological advances and block expansion, the number of angular prediction modes is also increasing. As shown in Figure 5, HEVC uses 35 intra prediction modes, including Planar, DC, and 33 angular modes. As shown in Figure 6, VVC uses 67 intra prediction modes, including Planar, DC, and 65 angular modes. In addition to the 67 modes, VVC also provides a wide-angle mode for rectangular blocks with large differences between their length and width. For example, the modes indicated by the dashed lines in Figure 7, namely, modes in the two intervals from -14 to -1 and from 67 to 80, are provided. These modes replace some of the standard modes. As shown in Figure 8, AVS3 uses 66 prediction modes, including DC, Planar, Bilinear, PCM, and 62 angular modes.
[0034] Video is composed of multiple images. To make a video appear smooth, a single second of video contains tens to hundreds of frames (e.g., 24 frames per second, 30 frames per second, 50 frames per second, 60 frames per second, 120 frames per second, etc.). Therefore, video has significant temporal redundancy. In other words, video has a lot of temporal correlation. Inter-frame prediction exploits this temporal correlation to improve compression efficiency. Inter-frame prediction generally exploits temporal correlation using "motion." A very simple "motion" model is that an object is located at a certain position in an image corresponding to a certain time, and after a certain amount of time has passed, it translates to another position in the image corresponding to that time. This is the most basic and commonly used translation in video encoding and decoding. Inter-frame prediction uses motion information to represent "motion." Basic motion information includes information on a reference frame (or reference picture) and motion vectors (MVs). The codec determines a reference image based on information about the reference image, and determines the coordinates of a reference block based on information about a motion vector and the coordinates of a current block. The reference block is determined using the coordinates of the reference block in the reference image. Using the determined reference block as a predicted block is the most basic prediction method of inter prediction.
[0035] Not all motion in video is simple. Even motion that can be considered as translation undergoes subtle changes over time, including small deformations, brightness changes, and noise changes. Using multiple reference blocks to predict a current block can achieve better prediction results. For example, in bidirectional prediction, two reference blocks are used to predict the current block. The two reference blocks can be one forward reference block and one backward reference block. Both reference blocks can be forward or backward. Forward refers to a time corresponding to a reference image that is earlier than the current frame, while backward refers to a time corresponding to a reference image that is later than the current frame. Alternatively, forward refers to a position of a reference image in a video that is earlier than the current frame, while backward refers to a position of a reference image in a video that is later than the current frame. Alternatively, forward refers to a picture order count (POC) of a reference image that is smaller than the POC of the current frame, while backward refers to a POC of a reference image that is larger than the POC of the current frame. Future video encoding and decoding standards may support prediction using multiple reference blocks. A simple method for generating a predicted block using two reference blocks is to average the pixel values of corresponding positions in the two reference blocks to obtain the predicted block. To achieve a better prediction effect, a weighted average such as BCW (Bi-prediction with CU-level weighting) used in VVC can also be used. GPM (Geometric partitioning mode) in VVC can also be considered a special type of bidirectional prediction. To use bidirectional prediction, it is necessary to find two reference blocks, which requires two sets of reference image information and motion vector information.
[0036] Motion in video includes not only simple translation but also scaling, rotation, distortion, and various other complex motions. VVC uses affine to simulate some of these simple motions. The affine model in VVC uses two or three control points and derives a motion vector for each subblock within the current block using a linear model based on these control points. The reason we discuss motion vectors rather than motion information here is because they all point to the same reference image. While conventional translation locates a single "entire block" from a reference image, affine can be understood as locating a set of discontinuous "subblocks" from a reference image. All of the above falls under the category of unidirectional prediction; affine can also implement bidirectional prediction or prediction of more "reference blocks." The reference block here refers to subblocks. In a specific implementation, unidirectional motion information in the affine motion information data structure can include information on one reference image and two or three motion vectors. Alternatively, it can include information on two or three sets of reference images and motion vectors, but the reference images are the same.
[0037] Intra Block Copy (IBC) can significantly improve the compression efficiency of screen content coding, and therefore IBC is used for screen content coding from HEVC to VVC. Screen content, unlike camera-captured content, is computer-generated, noise-free, includes text and computer graphics, and has clear boundaries. Screen content often contains overlapping content. For example, as shown in Figure 9, the content within the two boxes on the first row overlaps, and the content within the box on the third row overlaps with the content within the box on the fourth row.
[0038] As mentioned above, in inter prediction, a reference block in a reference image is used as a prediction block of a current block, and the reference image is not the current image. On the other hand, IBC finds a block from the coded and decoded part of the current image (called the reconstructed part) as a prediction block of the current block. In some places, IBC is also called intra picture block compensation or current picture referencing (CPR). In this embodiment, the name of IBC is not limited, and unless otherwise specified, all the above names are equivalent or interchangeable.
[0039] IBC uses a block vector (BV) to represent the position difference between a current block and a reference block. An encoder determines the best matching block for the current block using a block matching method within a search range and encodes the BV. There are various methods for encoding the BV, which will not be described in detail here. IBC can be considered as a type of intra prediction method, or as a separate prediction method independent of intra prediction and inter prediction.
[0040] The template matching (TM) method is first used for inter-frame prediction. This method exploits the correlation between neighboring pixels and uses a subregion surrounding the current block as a template. When encoding and decoding a current block, its left and upper sides have already been encoded and coded according to the coding order. Of course, in hardware decoder implementations, the left and upper sides of the current block may not necessarily have already been coded and coded when decoding of the current block begins. Of course, what is being referred to here is an inter-frame block. For example, in HEVC, the prediction process for an inter-frame block can be performed in parallel because the surrounding reconstructed pixels are not required when generating a predicted block using an inter-frame coded block. However, an intra-frame coded block requires the reconstructed pixels on its left and upper sides as reference pixels. In theory, the left and upper sides of the current block are available, which means that it is feasible to adjust the hardware design appropriately. In contrast, the right and lower sides of the current block are not available in the coding order of a video standard (such as VVC).
[0041] As shown in FIG. 10 , rectangular regions on the left and top of a current block 1001 are set as templates. The height of the left template portion is typically the same as the height of the current block 1001, and the width of the top template portion is typically the same as the width of the current block 1001, but may be different. Motion information or a motion vector for the current block 1001 is determined by searching for the best matching position of the template in a reference frame 1003 of the current frame 1002. This process can be roughly described as follows: In a certain reference frame, a search is performed within a certain range around a certain starting position. Search rules such as the search range and search step length can be preset. Each time a position is moved to, the degree of matching between the template corresponding to that position and templates surrounding the current block is calculated. The degree of matching can be measured using several distortion costs, such as SAD (sum of absolute difference), SATD (sum of absolute transformed difference), or MSE (mean-square error). A smaller value of SAD, SATD, or MSE indicates a higher degree of matching. Here, the transformation used in SATD may be a Hadamard transformation. The cost is calculated using the template's predicted block corresponding to that position and the template's reconstructed blocks surrounding the current block. In addition to searching for integer pixel positions, sub-pel positions can also be searched, and the motion information for the current block is determined based on the position with the highest degree of matching. By utilizing the correlation between adjacent pixels, the motion information suitable for the template may be suitable for the current block. Of course, the template matching method is not necessarily applicable to all blocks, so several methods can be used to determine whether the current block uses the above template matching method, for example, a control switch can be used to indicate whether the template matching method is used for the current block.An example of a template matching technique is decoder-side motion vector derivation (DMVD). Both the encoder and decoder can use templates to perform searches to derive motion information or find better motion information based on existing motion information. This method does not require the transmission of specific motion vectors or motion vector differences, and both the encoder and decoder perform searches using the same rules, ensuring consistency between encoding and decoding. While the template matching method can improve compression performance, it also increases the decoder's complexity to some extent because it requires the decoder to perform a "search."
[0042] Intra template matching prediction (intraTMP) is also a type of prediction technique. As mentioned above, TM can reduce the overhead of encoding MVs, that is, TM can reduce the overhead of encoding BVs. For example, there is no need to encode BVs, and the matching block found by TM can be directly used as the prediction block of the intraTMP mode for the current block.
[0043] As an example of intraTMP, as shown in Figure 11, an inverted L-shaped region 111 in the upper left corner of a current block 110 is used as a template to search within a search range 112. The search range is a reconstructed region, and the illustrated region 112 includes the current CTU R1, the upper left CTU R2, the upper CTU R3, and the left CTU R4. This is just an example, and the search range will be different in actual applications. In the example shown in Figure 11, the optimal matching block 113 was found within R2.
[0044] As can be seen from the above explanation, one of the key reasons why IBC significantly improves the compression efficiency of screen content coding is that it can find many overlapping blocks within screen content. Screen content typically has sharp boundaries, and from a color (luminance and chrominance) perspective, large areas may have the same color (luminance and chrominance). Even in content captured by a camera, there are approximately overlapping blocks. Even when taking into account the effects of noise, subtle changes in luminance, and perspective angle, it is undeniable that there are overlapping textures in content captured by a camera. For example, the floor in Figure 12 and the wall panel in Figure 13 have approximately overlapping textures. At the same time, the floor in Figure 12 has some areas that are slightly darker and some areas that are slightly lighter. On the other hand, the wall panel in Figure 13 is at a certain angle relative to the camera, which creates different perspectives in the overlapping textures.
[0045] Although techniques such as IBC and intraTMP can be used for camera-captured content or natural sequences, considering that camera-captured content has more approximately overlapping textures, the method of directly using the best matching block or reference block found based on techniques such as IBC and intraTMP as the prediction block of the current block requires some optimization to be more suitable for encoding camera-captured content. In the embodiments of the present application, we mainly discuss the problem of how to generate a prediction block from a reference block obtained based on techniques such as IBC and intraTMP.
[0046] An embodiment of the present application provides an encoding method, and FIG. 14 is a flowchart illustrating the implementation of the encoding method according to the embodiment of the present application. As shown in FIG. 14, the method includes the following steps 141 to 144.
[0047] In step 141, the encoder determines the first reference block for the current block.
[0048] In step 142, the encoder obtains a first intra prediction value for the current block based on sample values of a reconstructed region adjacent to the current block and sample values of the first reference block.
[0049] In step 143, the encoder obtains residual values of the current block based on the first intra predicted values of the current block and the sample values of the current block.
[0050] In step 144, the encoder generates a bitstream based on the residual values.
[0051] In an embodiment of the present application, after obtaining a first reference block for a current block, the encoder does not directly use sample values of the reference block as the first intra-predicted value of the current block, but instead determines the first intra-predicted value based on sample values of a reconstructed area adjacent to the current block and sample values of the first reference block. That is, by considering not only sample values of the first reference block but also sample values of a reconstructed area adjacent to the current block when determining the first intra-predicted value, the final obtained first intra-predicted value becomes more accurate. As a result, on the one hand, it is possible to improve image coding performance, improve coding efficiency, and reduce bitstream overhead, which is particularly beneficial for improving the coding and decoding performance of images with approximately overlapping textures (such as images collected by a camera). On the other hand, it is possible to reduce the image boundary effect, i.e., the problem of unnatural transitions between image blocks, which occurs when sample values of the first reference block are directly used as the first intra-predicted value.
[0052] Further alternative embodiments of each of the above steps and related terminology are described below.
[0053] In step 141, the encoder determines the first reference block for the current block.
[0054] In the embodiments of the present application, the method for determining the first reference block is not limited, and in some embodiments, the first reference block may be obtained based on one reference block, for example, the sample values of the first reference block are equal to the sample values of the one reference block, that is, the one reference block is used as the first reference block.
[0055] In some other embodiments, the first reference block is obtained based on a weighted sum of multiple reference blocks. Furthermore, in some embodiments, a weighted average of sample values at corresponding positions in the multiple reference blocks is used as the sample value at the corresponding position in the first reference block.
[0056] In the present embodiment, when performing weighted averaging to determine sample values of a first reference block, the weighting coefficient values of the multiple reference blocks may be the same or different, and the weighting coefficient values of different samples in the reference block involved in the weighting average may be the same or different. The weighting coefficient value of each sample of the reference block may be set based on the relative position between the reference block and the current block and / or the reliability of the reference block. In one possible embodiment, the weighting coefficient value of the reference block obtained based on IBC is greater than the weighting coefficient of the reference block obtained based on intraTMP mode. In another possible embodiment, the weighting coefficient value of the reference block obtained based on IBC is less than the weighting coefficient of the reference block obtained based on intraTMP mode. Alternatively, the weighting coefficient value of the reference block obtained based on IBC is equal to the weighting coefficient of the reference block obtained based on intraTMP mode.
[0057] In the embodiments of the present application, the method for determining the one reference block and the method for determining the multiple reference blocks are not limited.
[0058] In some embodiments, the one reference block is a reference block obtained under IBC mode or intraTMP mode.
[0059] In some embodiments, the plurality of reference blocks are reference blocks obtained under IBC mode and / or intraTMP mode.
[0060] Furthermore, in some embodiments, the reference block obtained based on the IBC mode is located within the image (frame) in which the current block resides.
[0061] Specifically, in some embodiments, for a reference block obtained under intraTMP mode, the encoder may obtain it as follows: Determine a first matching block of the current block based on the intraTMP mode, where the one reference block is equal to the first matching block, and the multiple reference blocks include one first matching block or K first matching blocks, where K is greater than or equal to 1. If the current block includes one first matching block, the matching block is a corresponding reconstructed block with the smallest distortion cost. If the current block includes K first matching blocks, the K first matching blocks are the K reconstructed blocks with the smallest distortion cost or reconstructed blocks with distortion costs less than a cost threshold.
[0062] Specifically, in some embodiments, the encoder can obtain a reference block obtained under the IBC mode as follows: Based on the IBC mode, search for a second matching block that matches the original sample values of the current block from the reconstructed region of the current frame, where the one reference block is equal to the second matching block, and the multiple reference blocks include one second matching block or L second matching blocks, where L is greater than or equal to 1. If the reference block includes one second matching block, the matching block is a reconstructed block with the smallest error from the sample values of the current block. If the reference block includes L second matching blocks, the L second matching blocks are the L reconstructed blocks with the smallest error from the sample values of the current block, or reconstructed blocks with errors from the sample values less than an error threshold. Meanwhile, the encoder generates a bitstream based on the BV between the current block and the second matching block, so that the decoder obtains the BV by decoding and determines the one or more reference blocks based on the BV.
[0063] In step 142, a first intra-predicted value of the current block is obtained based on sample values of a reconstructed region adjacent to the current block and sample values of the first reference block.
[0064] In some embodiments, the sample values of the reconstructed area adjacent to the current block may be understood as the reconstructed sample values adjacent to the current block. In other words, the sample values refer to the sample values of the reconstructed area around the current block, and the specific reconstructed area referred to is not limited. In some embodiments, the reconstructed area includes the upper neighboring area of the current block and / or the left neighboring area of the current block. In some embodiments, the upper neighboring area may include one row of samples or multiple rows of samples, and the left neighboring area may include one column of samples or multiple columns of samples.
[0065] In the embodiment of the present application, the specific embodiment of step 142 is not limited, and various methods are possible, as long as both the sample values of the reconstructed region adjacent to the current block and the sample values of the first reference block are involved in determining the first intra predicted value. For example, the first intra predicted value can be determined by the methods described in the following embodiments 1 to 7.
[0066] In embodiment 1, the sample values of the reconstructed region adjacent to the current block and the sample values of the first reference block are filtered to obtain a first intra-predicted value of the current block.
[0067] Further, in some embodiments, a filter template is used to filter sample values of a reconstructed region adjacent to the current block and sample values of the first reference block to obtain a first intra-predicted value of the current block.
[0068] In some embodiments, the filter template may also be understood as a filter, a coefficient matrix, a filter matrix, or the like. However, in embodiments of the present application, the shape and size of the filter template are not limited, and in short, when determining the first intra-prediction value of at least one sample of the current block, at least one neighboring reconstructed sample and at least one sample of the first reference block are involved in the calculation. In one example, the filter template is an MxM filter matrix, where M is greater than 1, for example, M=3 or 5. In another example, the filter template may be an Mx1 or 1xM one-dimensional filter, or in another example, the filter template may be a filter with other numbers of taps.
[0069] The filter coefficients of the filter template are also not limited, that is, the values of each element in the filter matrix are not limited and can be set according to specific performance requirements.
[0070] In addition, a specific filtering method is not limited. In some embodiments, a filter template may be used to filter a region including the first reference block and the reconstructed region to obtain a first intra-predicted value of the current block.
[0071] Furthermore, in some embodiments, the position of the first reference block relative to the reconstructed region within the constructed region coincides with the position of the current block relative to the reconstructed region. For example, as shown in Figure 15A, 151 is a region composed of the first reference block and the reconstructed region, where the shaded portion is the reconstructed region and the non-shaded portion (i.e., the blank portion) is the first reference block. 152 is a region composed of the current block and the reconstructed region, where the shaded portion is the reconstructed region and the non-shaded portion (i.e., the blank portion) is the current block.
[0072] For example, as shown in FIG. 15B, if the width and height of the current block (i.e., blank area) are defined as width and height, respectively, filtering can be performed using the reconstructed samples (i.e., reconstructed pixels) in the top row and left column of the current block, where the top row and left column of the current block are the shaded areas shown in FIG. 15B, and the filter template is 153. If a (width+1)×(height+1) matrix is defined as temp (i.e., an example of the first matrix), the sample values in the first row and first column of temp are the reconstructed sample values in the top row and left column around the current block. Other positions (the same as the positions of the current block) are sample values of the first reference block. If the first intra-predicted value at position (x, y) of the current block is represented as pred[x][y], where y is 0 to height−1 and x is 0 to width−1, pred[x][y] can be obtained according to the following equation:
[0073] pred[x][y]=(temp[x][y]+2*temp[x+1][y]+temp[x+2][y]+2*temp[x][y+1]+4*temp[x+1][y+1]+2*temp[x+2][y+1]+temp[x][y+2]+2*temp[x+1][y+2]+temp[x+2][y+2]+8)>>4 As shown in FIG. 15B, the value of the sample in the shaded area is the value of the reconstructed sample around the current block, and the value of the sample in the non-shaded area (i.e., the blank area) is the sample value of the first reference block. In this example, a 3×3 filter (i.e., filter template 151) is set, and the filter coefficients are 1, 2, 1, 2, 4, 2, 1, 2, 1 from left to right and from top to bottom.
[0074] On the other hand, there may be a case where it is necessary to keep the value of pred[x][y] within an allowable value range, for example, in the range of 0 to (1<<bitdepth)-1, where bitdepth is the bit width used for pred[x][y].
[0075] In Embodiment 2, the first intra prediction value of the current block is obtained based on the weighted sum of the sample value of the first reference block and the sample value of the reconstructed area.
[0076] Furthermore, in some embodiments, Embodiment 2 can be realized as follows. The first intra prediction value of the fourth sample of the current block is obtained based on the weighted sum of the sample value of the first sample of the first reference block and the sample value of the second sample and / or the third sample of the reconstructed area, where the position of the first sample corresponds to the position of the fourth sample, the second sample includes at least one sample in the same column as the fourth sample in the upper adjacent area of the current block, and the third sample includes at least one sample in the same row as the fourth sample in the left adjacent area of the current block.
[0077] Furthermore, in some embodiments, the weighting factors of the second sample and the third sample are predetermined values, or The weighting factor of the second sample is determined based on the position of the fourth sample, the position of the second sample, and / or the size of the current block, and the weighting factor of the third sample is determined based on the position of the fourth sample, the position of the third sample, and / or the size of the current block.
[0078] For example, if the predicted value at the (x, y) position of the current block is pred[x][y], where y is 0 to height-1 and x is 0 to width-1, the first intra predicted value of the sample at (x, y) can be obtained according to the following formula:
[0079] pred[x][y]=((weightL[x][y]*refL+weightT[x][y]*refT+(64-weightL[x][y]-weightT[x][y])*ref[x][y]+32)>>6) Here, ref[x][y] is the sample value at the corresponding position in the reference block determined based on a mode such as IBC or intraTMP. As shown in FIG. 16, refL is the value of the reconstructed pixel at (-1, y) in the same row as the point (x, y) on the left side of the current block, and refT is the value of the reconstructed pixel at (x, -1) in the same column as the point (x, y) above the current block. weightL[x][y] is the weight of refL, and weightT[x][y] is the weight of refT. Here, in order to avoid decimals, the weights are first multiplied by 64 and then right-shifted by 6 bits. weightL[x][y] and weightT[x][y] may be values related to x, y, width, and / or height, and the method for deriving weightL[x][y] and weightT[x][y] will not be described in detail here. weightL[x][y] and weightT[x][y] may be fixed values. In this case, weightL[x][y] can also be written as weightL, and weightT[x][y] can be written as weightT.
[0080] Also, there may be a case where it is necessary to keep the value of pred[x][y] within an allowable value range, for example, in the range of 0 to (1 << bitdepth) - 1. Here, bitdepth is the bit width used for pred[x][y].
[0081] Note that in FIG. 16, the reference block and the current block are not drawn separately, but this is for the purpose of assisting understanding.
[0082] In Embodiment 3, based on the sample values in the reconstructed region, an intra prediction is performed on the current block to obtain a second intra prediction value of the current block, and based on the weighted sum of the sample value of the first reference block and the second intra prediction value of the corresponding sample in the current block, a first intra prediction value of the current block is obtained.
[0083] Furthermore, in some embodiments, at least one of the PLANAR mode, DC mode, and angular mode is used for the intra prediction of the current block.
[0084] For example, in some embodiments, if the first intra prediction value at the (x, y) position of the current block is set as pred[x][y], where y ranges from 0 to height - 1 and x ranges from 0 to width - 1, then pred[x][y] = ((weight[x][y] * ref[x][y] + (64 - weight[x][y]) * predPlanar[x][y] + 32) >> 6). Here, weight[x][y] is the weight of the reference block at the (x, y) position, and 64 - weight[x][y] is the weight of the sample prediction value obtained based on the PLANAR mode at the (x, y) position. Here, to avoid decimals, the weight is first multiplied by 64 and then right-shifted by 6 bits. As one possibility, weight[x][y] is the same for all (x, y), and in this case, weight[x][y] can also be written as weight. As another possibility, weight[x][y] may be different for different (x, y).
[0085] Also, there may be a need to keep the value of pred[x][y] within an allowable value range, for example, in the range of 0 to (1 << bitdepth) - 1, where bitdepth is the bit width used for pred[x][y].
[0086] In Example 4, a sample value offset between a neighboring region of the first reference block and the reconstructed region is determined, and a first intra-predicted value of the current block is determined based on the sample value offset and the sample values of the first reference block, where a position of the neighboring region of the first reference block relative to the first reference block is consistent with a position of the reconstructed region relative to the current block. For example, the neighboring region of the first reference block includes an upper neighboring region of the first reference block, and correspondingly, the reconstructed region includes an upper neighboring region of the current block; and / or the neighboring region of the first reference block includes a left neighboring region of the first reference block, and correspondingly, the reconstructed region includes a left neighboring region of the current block.
[0087] Further, in some embodiments, a first average value of sample values of the reconstructed region is determined, a second average value of sample values of adjacent regions of the first reference block is determined, and the sample value offset amount is determined based on the difference between the first average value and the second average value.
[0088] In Example 5, a sample value offset amount between a partial region of the first reference block and the reconstructed region is determined, and a first intra-prediction value of the current block is determined based on the sample value offset amount and the sample value of the first reference block.
[0089] Further, in some embodiments, a first average value of sample values of the reconstructed region is determined, a third average value of sample values of a subregion of the first reference block is determined, and the sample value offset amount is determined based on the difference between the first average value and the third average value.
[0090] For example, an average value avgRec is calculated using the reconstructed samples in the left column and the top row of the current block, and an average value avgRef is calculated using the samples in the left column and the top row outside the reference block or the samples in the leftmost column and the top row inside the reference block. The difference between these two average values is the sample value offset amount offset, where offset = avgRec - avgRef. Let pred[x][y] be the first intra-predicted value at the (x, y) position of the current block, where y is 0 to height - 1 and x is 0 to width - 1. Then, pred[x][y] = ref[x][y] + offset, i.e., the first intra-predicted value at each position of the current block is equal to the reference value at the corresponding position plus the sample value offset amount, where ref[x][y] is the sample value at the corresponding position in the reference block determined based on the mode, such as IBC or intraTMP.
[0091] In Example 6, a numerical relationship between the sample values of the reconstructed area and the sample values of the partial area of the first reference block is determined, and a first intra-predicted value of the current block is obtained based on the numerical relationship and the sample values of the first reference block.
[0092] In Examples 5 and 6, the reconstructed area includes an upper adjacent area of the current block, and correspondingly, the partial area of the first reference block includes an upper area within the first reference block, and / or the reconstructed area includes a left adjacent area of the current block, and correspondingly, the partial area of the first reference block includes a left area within the first reference block.
[0093] In Example 7, a numerical relationship is determined between sample values of the reconstructed region and sample values of a neighboring region of the first reference block, and a first intra-predicted value of the current block is obtained based on the numerical relationship and the sample values of the first reference block, where the position of the neighboring region of the first reference block relative to the first reference block is consistent with the position of the reconstructed region relative to the current block. For example, the neighboring region of the first reference block includes an upper neighboring region of the first reference block, and correspondingly, the reconstructed region includes an upper neighboring region of the current block; and / or the neighboring region of the first reference block includes a left neighboring region of the first reference block, and correspondingly, the reconstructed region includes a left neighboring region of the current block.
[0094] In the present embodiment, the numerical relationship can be understood as a linear relationship or a non-linear relationship, i.e., linear model parameters or non-linear model parameters of the reconstructed region and the subregion of the first reference block are determined based on the sample values of the reconstructed region and the sample values of the subregion of the first reference block. The linear model parameters can be understood as an example of a linear relationship, i.e., a numerical relationship, and the non-linear model parameters can be understood as another example of a non-linear relationship, i.e., a numerical relationship.
[0095] For example, a linear model is obtained using the reconstructed sample values of the first column to the left and the first row to the top of the current block, and the sample values of the first column to the left and the first row to the top of the outside of the reference block, or the sample values of the leftmost column and the top row inside the reference block, where a is the scaling factor of the linear model and b is the offset of the linear model. If the first intra predicted value at the (x, y) position of the current block is pred[x][y], where y is 0 to height-1 and x is 0 to width-1, then pred[x][y]=ref[x][y]*a+b, i.e., the first intra predicted value at each position of the current block is equal to the value obtained after applying the linear model to the corresponding reference value.
[0096] Also, there may be a case where it is necessary to keep the value of pred[x][y] within an allowable value range, for example, in the range of 0 to (1<<bitdepth)-1, where bitdepth is the bit width used for pred[x][y].
[0097] In some embodiments, the first intra prediction value is within a set numerical range.
[0098] The embodiments of the present application further provide another encoding method. FIG. 17 is a flowchart of the implementation of the encoding method according to the embodiments of the present application. As shown in FIG. 17, it includes the following steps 171 to step 174.
[0099] In step 171, the encoder determines a plurality of reference blocks of the current block, and the plurality of reference blocks are located within the image where the current block is located.
[0100] In step 172, the encoder obtains a first intra prediction value of the current block based on the sample values of the plurality of reference blocks.
[0101] In step 173, the encoder obtains a residual value of the current block based on the first intra prediction value of the current block and the sample value of the current block.
[0102] In step 174, the encoder generates a bitstream based on the residual value.
[0103] In the embodiments of the present application, the accuracy of the first intra prediction value is improved by multi-prediction. That is, instead of directly using one reference block as the first intra prediction value, the first intra prediction value of the current block is determined based on the sample values of a plurality of reference blocks, thereby improving the encoding performance of the image. For example, it is possible to improve the encoding efficiency and save the overhead of the bitstream. In particular, it is beneficial for improving the encoding and decoding performance of images with approximately overlapping textures (such as images collected by a camera).
[0104] Further alternative embodiments of each of the above steps and related terminology are described below.
[0105] In step 171, the encoder determines a number of reference blocks for the current block, the reference blocks being located within the image in which the current block resides.
[0106] In some embodiments, the plurality of reference blocks are reference blocks obtained under IBC mode and / or intraTMP mode, whereby the method for determining the plurality of reference blocks can be understood by reference to the above description and explanation, and will not be repeated here due to space limitations.
[0107] Furthermore, in some embodiments, the reference block obtained based on the IBC mode is located within the image (frame) in which the current block resides.
[0108] In step 172, the encoder obtains a first intra predicted value of the current block based on sample values of the plurality of reference blocks.
[0109] In some embodiments, the first intra-predicted value of the current block can be obtained based on a weighted sum of the sample values of the reference blocks.
[0110] For example, taking the reference block obtained based on the intraTMP mode as an example, when searching for a template matching block based on the intraTMP mode, within a finite search range, the matching block with the minimum cost is determined as the reference block ref0, the cost on its template is set as cost0, the matching block with the second smallest cost is determined as the matching block ref1, and the cost on its template is set as cost1. If the first intra prediction value at the (x, y) position of the current block is pred[x][y], it is as follows.
[0111] pred[x][y]=(weight*ref0[x][y]+(64 - weight)*ref1[x][y]+32)>>6) Here, one method for determining weight is weight = cost0 * 64 / (cost0 + cost1). Considering that the cost of performing division in hardware is very high, the method for deriving weight can replace division with a method such as a look-up table, etc., which will not be elaborated here.
[0112] Also, there may be a case where it is necessary to keep the value of pred[x][y] within an allowable value range, for example, within the range of 0 to (1 << bitdepth) - 1, where bitdepth is the bit width used for pred[x][y].
[0113] The embodiments of the present application provide a decoding method. FIG. 18 is a flowchart of the realization of the decoding method according to the embodiments of the present application. As shown in FIG. 18, the method includes the following steps 181 to step 183.
[0114] In step 181, the decoder determines the first reference block of the current block.
[0115] In step 182, the decoder obtains the first intra prediction value of the current block based on the sample values of the reconstructed area adjacent to the current block and the sample values of the first reference block.
[0116] In step 183, the decoder determines a reconstructed value for the current block based on the first intra predicted value of the current block.
[0117] Further alternative embodiments of each of the above steps and related terminology are described below.
[0118] In step 181, the decoder determines the first reference block for the current block.
[0119] In some embodiments, the first reference block is obtained based on one reference block, or the first reference block is obtained based on a weighted sum of multiple reference blocks.
[0120] Furthermore, in some embodiments, the one reference block is a reference block obtained under IBC mode or intraTMP mode.
[0121] Furthermore, in some embodiments, the plurality of reference blocks are reference blocks obtained under IBC mode and / or intraTMP mode.
[0122] Furthermore, in some embodiments, the reference block obtained based on the IBC mode is located within the image (frame) in which the current block resides.
[0123] Specifically, in some embodiments, the decoder can obtain the reference blocks obtained under the IBC mode as follows: decode the bitstream, determine that the intra prediction modes adopted by the current block include the IBC mode, obtain the BV of the current block, and determine some or all of the reference blocks in the one or more reference blocks based on the BV.
[0124] It should be noted that the technical details not disclosed in step 181 and its corresponding embodiments can be understood by referring to the explanations and descriptions of step 141 and its corresponding embodiments in the encoding method above. Therefore, for the sake of brevity and space, some technical details of step 181 will not be repeated here.
[0125] In step 182, the decoder obtains a first intra predicted value of the current block based on sample values of a reconstructed region adjacent to the current block and sample values of the first reference block.
[0126] Similarly, the implementation method and specific implementation details of step 182 can be understood with reference to the explanation and description of step 142 in the above encoding method. In other words, the methods for determining the first intra predicted value on the decoding side and the encoding side are the same. Therefore, for the sake of brevity and space, some technical details of step 182 will not be repeated here.
[0127] In step 183, the decoder determines a reconstructed value for the current block based on the first intra predicted value of the current block.
[0128] In some embodiments, the decoder may decode the bitstream to obtain residual values of the current block and determine a reconstructed value of the current block based on the residual values of the current block and the first intra-predicted value.
[0129] Furthermore, in some embodiments, a reconstructed value of a sample of the current block can be obtained based on the sum of the residual value of the sample and the first intra-predicted value of the sample. For example, the reconstructed value of a sample of the current block is equal to the sum of the residual value of the sample and the first intra-predicted value of the sample.
[0130] An embodiment of the present application provides yet another decoding method, and FIG. 19 is an implementation flowchart of the decoding method according to an embodiment of the present application. As shown in FIG. 19, the method includes the following steps 191 to 193.
[0131] In step 191, the decoder determines a number of reference blocks for the current block, the reference blocks being located within the image in which the current block resides.
[0132] In some embodiments, the plurality of reference blocks are reference blocks obtained under IBC mode and / or intraTMP mode.
[0133] Furthermore, in some embodiments, the reference block obtained based on the IBC mode is located within the image (frame) in which the current block resides.
[0134] It should be noted that the technical details not disclosed in step 191 and its corresponding embodiments can be understood by referring to the explanations and descriptions of step 171 or step 141 in the encoding method above and its corresponding embodiments. Therefore, for the sake of brevity and space, some technical details of step 191 will not be repeated here.
[0135] In step 192, the decoder obtains a first intra predicted value of the current block based on sample values of the plurality of reference blocks.
[0136] Similarly, the implementation method and specific implementation details of step 192 can be understood with reference to the explanation and description of step 171 in the above encoding method. In other words, the methods for determining the first intra predicted value on the decoding side and the encoding side are the same. Therefore, for the sake of brevity and space constraints, some technical details of step 192 will not be repeated here.
[0137] In step 193, the decoder determines a reconstructed value for the current block based on the first intra predicted value of the current block.
[0138] The implementation method and specific implementation details of step 193 can be understood by referring to the description of step 183 above, and will not be repeated here.
[0139] The embodiments of the present application further provide various control methods for the above encoding / decoding methods, which are applicable to both the control of the decoding method and the control of the encoding method.
[0140] The first control method is to use the encoding / decoding method described in the embodiment of the present application as the default.
[0141] The second method is to determine whether to employ the encoding / decoding method to determine the first intra predicted value of the current block based on the value of the first flag bit.
[0142] In the second method, as a more specific embodiment, for example, when the value of the first flag bit is equal to a first numerical value, it is determined whether to adopt the encoding / decoding method to determine the first intra prediction value of the current block based on the relationship between the template matching cost between the current block and the reference block obtained under intraTMP mode and a first threshold.
[0143] Furthermore, in some embodiments, if the template matching cost is less than a first threshold, the first intra predicted value of the current block is equal to the sample value of the first reference block.
[0144] Further, in some embodiments, if the template matching cost is equal to or greater than a first threshold, the encoding / decoding method is employed to determine a first intra-prediction value of the current block.
[0145] The third method is to determine whether to adopt the encoding / decoding method to determine the first intra prediction value of the current block based on the relationship between the template matching cost between the current block and a reference block obtained under intraTMP mode and a first threshold.
[0146] In the third method, as a more specific embodiment, for example, if the template matching cost is less than a first threshold, the first intra-predicted value of the current block is equal to the sample value of the first reference block.
[0147] In the third method, as a more specific embodiment, for example, if the template matching cost is equal to or greater than a first threshold, the encoding / decoding method is employed to determine a first intra-predicted value of the current block.
[0148] In the embodiment of the present application, the magnitude of the first numerical value and the first threshold value is not limited, and the number of bits representing the first flag bit is also not limited, for example, it may be 1 bit, and the corresponding first numerical value may be 1 or 0.
[0149] In the following, an exemplary application of the embodiment of the present application in a practical application scenario will be described.
[0150] The IBC decoding process can be roughly summarized as follows: analyze the bitstream to determine whether the current block uses IBC; if the current block uses IBC, determine the BV of the current block; determine a reference block based on the BV; and use the reference block as the prediction block of the current block.
[0151] Another way to express the use of a reference block as a predicted block is to set the value of each position in the predicted block to the value of the corresponding position in the reference block, or to set the predicted value to the value of the corresponding position in the reference block.
[0152] The decoding process for IntraTMP can be roughly summarized as follows: the bitstream is analyzed to determine whether the current block uses IntraTMP; if the current block uses IntraTMP, the decoder uses a template matching search to determine the reference block and uses the reference block as the prediction block for the current block.
[0153] Another way to express the reference block as a predicted block is to set the value of each position in the predicted block to the value of the corresponding position in the reference block, or to set the predicted value to the value of the corresponding position in the reference block.
[0154] The difference between the two is how the reference block is determined. IBC determines the BV (by analyzing the bitstream) and then determines the reference block based on the BV. On the other hand, intraTMP is a special IBC that determines the reference block by template matching search. Whether or not intraTMP uses the BV when determining the reference block is not limited here and may or may not be used at the time of implementation.
[0155] In the embodiment of this application, we discuss the problem of how to generate a prediction block from a reference block. This solution can be used for camera-captured content, so-called natural sequences. This solution can be applied to IBC, intraTMP, and other intra block copy techniques.
[0156] In the embodiment of the present application, the first intra-predicted value is generated through one processing step based on the reference block. That is, one step is added after finding the reference block. For a certain position of the current block, the value at the corresponding position of the reference block is called the reference value. In the present solution, the first intra-predicted value is generated through one processing step based on the reference value, and includes Method 1 and Method 2 described in the following embodiments.
[0157] Method 1 obtains a predicted block based on the reference block and reconstructed pixels around the current block.
[0158] For content captured by a camera, there may be color (luminance and chrominance) differences between the reference block and the current block, and the reconstructed pixels around the current block may have a strong correlation with the current block, especially between the pixels inside and outside the blocks adjacent to the left and top boundaries of the current block. For content captured by a camera, the block with the lowest cost can be found based on IBC. Similarly, the block with the lowest template cost can be found based on intraTMP. As shown in Figure 20, the unshaded area (i.e., the blank area) is the current block, and the shaded area is the reconstructed pixel area around the current block. It can be seen that there is a certain overlap between the reconstructed pixel area around the current block and the template.
[0159] More specifically, the first method is to obtain a predicted value by filtering using the value of the reference block and the reconstructed pixel values around the current block. For example, one filter can be set, and as an example, this filter is a rectangular filter such as a 3x3 filter or a 5x5 filter, and the reference value and the reconstructed pixel values around the current block are arranged at corresponding positions, and filtering is performed using the filter. Specifically, as an example, filtering may be performed on one row (column) or multiple rows (columns) of pixels on the upper and left sides, or as another example, filtering may be performed on all pixels of the current block.
[0160] In some embodiments, filtering may be performed using a horizontal filter and a vertical one-dimensional filter. In some embodiments, filters with other numbers of taps may be used. In some embodiments, more reconstructed pixels around the current block, such as two rows and two columns, may be used.
[0161] More specifically, the second method is to obtain a predicted value by weighting the value of the reference block and the reconstructed pixel values around the current block. For a specific embodiment of the second method, please refer to the above description and explanation of the specific embodiment of Example 2. Due to space limitations, the description will not be repeated here.
[0162] More specifically, the third method is to obtain a new predicted value by weighting the value of the reference block and the predicted value generated by the reconstructed pixels around the current block. For example, the value of the reference block and the predicted value of the planar mode are weighted to obtain a new predicted value. For a specific embodiment of the third method, please refer to the above explanation and description of the specific embodiment of Example 3. Due to space limitations, the description will not be repeated here.
[0163] The first to third methods described above may be used alone or in combination.
[0164] More specifically, the fourth method is to calculate an offset, a linear model, or a nonlinear model using the value of a reference block and the reconstructed pixels around the current block, and determine a first intra-predicted value using the reference block and the offset, the linear model, or the nonlinear model. Here, for specific embodiments of determining a first intra-predicted value using a reference block and an offset, please refer to the above descriptions and explanations for Examples 4 and 5, and for the sake of brevity, the description will not be repeated here. For specific embodiments of determining a first intra-predicted value using a reference block and a linear model or a nonlinear model, please refer to the above descriptions and explanations for Examples 6 and 7, and for the sake of brevity, the description will not be repeated here.
[0165] In Method 2, one method is to determine N reference blocks using BV or template matching, and then determine a predicted block based on these N reference blocks, where N is a positive number greater than 1, for example, N is 2. In IBC or intraTMP, it is known that it is difficult to find a perfect match or a perfect template match in the content captured by the camera, so the average accuracy of the prediction can be improved by weighting multiple reference blocks.
[0166] More specifically, it is as follows.
[0167] In some embodiments, all N reference blocks can be determined using BV, which can be seen as converting single prediction to dual prediction or multi-prediction based on the general IBC.
[0168] In some other embodiments, all N reference blocks can be determined by a template matching method, which can be seen as converting single prediction to dual prediction or multi-prediction based on intraTMP.
[0169] In some other embodiments, some of the N reference blocks may be determined using BVs and some may be determined using template matching. For example, if N is 2, one reference block may be determined using BVs and the other may be determined using template matching. As can be seen, transmitting BVs in a bitstream involves overhead, while the template matching method does not. On the other hand, in the method of transmitting BVs in a bitstream, the encoder has greater operational flexibility and can determine the BVs based on considerations such as coding strategy and / or rate-distortion cost, and can use the original content of the current block when making decisions. On the other hand, the template matching method requires both the encoder and decoder to perform the same operations, and therefore has the limitation that only the template can be used to search for a matching block, and the original content of the current block cannot be used. Therefore, a method that combines both methods can utilize the advantages of each to improve compression efficiency.
[0170] It should be noted that for embodiments not disclosed in Method 2, they can be understood by referring to the above explanations and descriptions regarding the specific embodiments of Step 172, and due to space limitations, they will not be repeated here.
[0171] The above-mentioned methods 1 and 2 may be used alone or in combination.
[0172] Some embodiments further provide a control method for the above solution. One possibility is to use the above prediction method by default. Another possibility is to use a flag bit to indicate whether the above prediction method can be used, such as at the sequence level (sps flag), picture level (pps flag), slice level (slice header flag), or block level. Yet another possible method is to adaptively determine whether to use the above prediction method. For example, in intraTMP, when searching for a reference block, the template cost of each searched block is obtained, and then it can be determined whether to use the above method based on this cost. Also, a threshold can be set. If the template cost of the reference block is less than the threshold (or equal to or less than the threshold), the above prediction method is not used, i.e., the reference value is directly used as the predicted value. Otherwise, if the template cost of the reference block is greater than the threshold (or equal to or greater than the threshold), the above prediction method is used, i.e., a processing process is performed on the reference value to generate a predicted value. Specifically, one possibility is that the threshold is 0.
[0173] Of course, an adaptive switching method may be used when using the above flag bit control. For example, if there is a flag at the sequence level to control whether the current sequence can use the above prediction method, and the sequence level flag indicates that it is available, an adaptive method can be used at the block level to determine whether to use the above method.
[0174] In the present embodiment, the reference blocks of technologies such as IBC or intraTMP are further processed to be more suitable for encoding and decoding camera-captured content, thereby improving compression efficiency. Specifically, the above-mentioned method 1 utilizes both the reference blocks of technologies such as IBC or intraTMP and the correlation between the current block and the reconstructed pixels surrounding the current block, and can further reduce the boundary effect caused by directly copying the reference blocks. Method 2 improves the average prediction accuracy through multi-prediction.
[0175] In the embodiment of the present application, the most basic point is to generate a predicted value through one processing process based on a reference block, that is, to generate a predicted value through one processing process based on a reference value. That is, one step is added after finding a reference block using a technique such as IBC or intraTMP. Furthermore, Method 1 is to generate a predicted block using a reference block and reconstructed pixels around the current block. Method 2 is multi-prediction.
[0176] It should be noted that the term "pixel" used in this specification can be understood as a "sample."
[0177] It should be noted that although the steps of the methods of the present application are described in a particular order in the drawings, this does not require or imply that these steps must be performed in that particular order, or that all of the steps shown must be performed to achieve a desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be integrated into one step and / or one step may be divided into multiple steps and performed. Or, steps in different embodiments may be combined to form a new technical solution.
[0178] Based on the above-mentioned embodiment, the embodiment of the present application provides a decoding device applied to a decoder. FIG. 21 is a schematic diagram showing the configuration of the decoding device according to the embodiment of the present application. As shown in FIG. 21, the decoding device 21 includes: a first determining module 211 configured to determine a first reference block of the current block; a first prediction module 212 configured to obtain a first intra prediction value of the current block based on sample values of a reconstructed region adjacent to the current block and sample values of the first reference block; a second determination module 213 configured to determine a reconstructed value of the current block based on the first intra predicted value of the current block.
[0179] In some embodiments, the first prediction module 212 is configured to filter sample values of a reconstructed region adjacent to the current block and sample values of the first reference block to obtain a first intra predicted value of the current block.
[0180] In some embodiments, the first prediction module 212 is configured to use a filter template to filter sample values of a reconstructed region adjacent to the current block and sample values of the first reference block to obtain a first intra-predicted value of the current block.
[0181] In some embodiments, the first prediction module 212 is configured to obtain a first intra predicted value of the current block based on a weighted sum of sample values of the first reference block and sample values of the reconstructed region.
[0182] In some embodiments, the first prediction module 212 is configured to obtain a first intra-predicted value of a fourth sample of the current block based on a weighted sum of a sample value of a first sample of the first reference block and a sample value of a second sample and / or a third sample of the reconstructed area, wherein the position of the first sample corresponds to the position of the fourth sample, the second sample includes at least one sample in the same column as the fourth sample in an upper-neighboring area of the current block, and the third sample includes at least one sample in the same row as the fourth sample in a left-neighboring area of the current block.
[0183] In some embodiments, the weighting factors of the second sample and the third sample are predetermined values, or the weighting factor of the second sample is determined based on the position of the fourth sample, the position of the second sample, and / or the size of the current block, and the weighting factor of the third sample is determined based on the position of the fourth sample, the position of the third sample, and / or the size of the current block.
[0184] In some embodiments, the first prediction module 212 is configured to perform intra prediction on the current block based on sample values of the reconstructed region to obtain a second intra prediction value of the current block, and to obtain a first intra prediction value of the current block based on a weighted sum of sample values of the first reference block and second intra prediction values of corresponding samples in the current block.
[0185] In some embodiments, at least one of a planar mode, a DC mode, and an angular mode is used for intra prediction of the current block.
[0186] In some embodiments, the first prediction module 212 is configured to determine a sample value offset amount between a neighboring region of the first reference block and the reconstructed region, where the position of the neighboring region of the first reference block relative to the first reference block matches the position of the reconstructed region relative to the current block, and determine a first intra-predicted value of the current block based on the sample value offset amount and the sample values of the first reference block.
[0187] In some embodiments, the first prediction module 212 is configured to determine a first average value of sample values of the reconstructed region, determine a second average value of sample values of adjacent regions of the first reference block, and determine the sample value offset amount based on a difference between the first average value and the second average value.
[0188] In some embodiments, the first prediction module 212 is configured to determine a sample value offset amount between a sub-region of the first reference block and the reconstructed region, and determine a first intra-predicted value of the current block based on the sample value offset amount and the sample values of the first reference block.
[0189] In some embodiments, the first prediction module 212 is configured to determine a first average value of sample values of the reconstructed region, determine a third average value of sample values of a subregion of the first reference block, and determine the sample value offset amount based on a difference between the first average value and the third average value.
[0190] In some embodiments, the first prediction module 212 is configured to determine a numerical relationship between sample values of the reconstructed region and sample values of a subregion of the first reference block, and obtain a first intra-predicted value of the current block based on the numerical relationship and the sample values of the first reference block.
[0191] In some embodiments, the first prediction module 212 is configured to determine a numerical relationship between sample values of the reconstructed region and sample values of neighboring regions of the first reference block, where the position of the neighboring regions of the first reference block relative to the first reference block matches the position of the reconstructed region relative to the current block, and obtain a first intra-predicted value of the current block based on the numerical relationship and the sample values of the first reference block.
[0192] In some embodiments, the first reference block is obtained based on one reference block, or the first reference block is obtained based on a weighted sum of multiple reference blocks.
[0193] In some embodiments, the one reference block is a reference block obtained under IBC mode or intraTMP mode.
[0194] In some embodiments, the plurality of reference blocks are reference blocks obtained under IBC mode and / or intraTMP mode.
[0195] In some embodiments, the decoding device 21 further comprises a first control module, which is configured to determine whether to use the first prediction module 212 to determine a first intra prediction value of the current block based on the value of the first flag bit.
[0196] In some other embodiments, the decoding device 21 further includes a second control module, which is configured to determine whether to use the first prediction module 212 to determine a first intra prediction value of the current block based on a relationship between a template matching cost between the current block and a reference block obtained under intraTMP mode and a first threshold value when the value of the first flag bit is equal to a first numerical value.
[0197] In some other embodiments, the decoding device 21 further includes a third control module, which is configured to determine whether to use the first prediction module 212 to determine a first intra prediction value of the current block based on a relationship between a template matching cost between the current block and a reference block obtained under intraTMP mode and a first threshold.
[0198] In some embodiments, if the template matching cost is less than a first threshold, the first intra predicted value of the current block is equal to the sample value of the first reference block.
[0199] In some embodiments, the second control module or the third control module is configured to determine a first intra-predicted value of the current block using the first prediction module 212 if the template matching cost is greater than or equal to a first threshold.
[0200] Based on the above-mentioned embodiment, the embodiment of the present application further provides a decoding device applied to the decoder. FIG. 22 is a schematic diagram showing the configuration of another decoding device according to the embodiment of the present application. As shown in FIG. 22, the decoding device 22 comprises: a third determination module 221 configured to determine a plurality of reference blocks of a current block, the plurality of reference blocks being located in an image in which the current block is located; a second prediction module 222 configured to obtain a first intra-predicted value of the current block based on sample values of the plurality of reference blocks; a second determination module 223 configured to determine a reconstructed value of the current block based on the first intra predicted value of the current block.
[0201] In some embodiments, the second prediction module 222 is configured to obtain a first intra predicted value of the current block based on a weighted sum of sample values of the plurality of reference blocks.
[0202] In some embodiments, the plurality of reference blocks are reference blocks obtained under IBC mode and / or intraTMP mode.
[0203] In some embodiments, the decoding device 22 further comprises a first control module, which is configured to determine whether to use the second prediction module 222 to determine the first intra prediction value of the current block based on the value of the first flag bit.
[0204] In some embodiments, the decoding device 22 further comprises a second control module, which is configured to determine whether to use the second prediction module 222 to determine a first intra prediction value of the current block based on a relationship between a template matching cost between the current block and a reference block obtained under intraTMP mode and a first threshold value when the value of the first flag bit is equal to a first numerical value.
[0205] In some other embodiments, the decoding device 22 further includes a third control module, which is configured to determine whether to use the second prediction module 222 to determine a first intra prediction value of the current block based on a relationship between a template matching cost between the current block and a reference block obtained under intraTMP mode and a first threshold.
[0206] In some embodiments, the second control module or the third control module is configured to determine a first intra prediction value for the current block using the second prediction module 222 if the template matching cost is greater than or equal to a first threshold.
[0207] The above description of the embodiment of the decoding device is similar to the description of the embodiment of the encoding / decoding method above, and has the same beneficial effects as the embodiment of the encoding / decoding method. Technical details not disclosed in the embodiment of the device of the present application can be understood by referring to the description of the embodiment of the encoding / decoding method of the present application.
[0208] An embodiment of the present application provides a coding device to be applied to an encoder. FIG. 23 is a schematic diagram showing the configuration of a coding device according to an embodiment of the present application. As shown in FIG. 23, the coding device 23 includes: a first determining module 231 configured to determine a first reference block of the current block; a first prediction module 232 configured to obtain a first intra prediction value of the current block based on sample values of a reconstructed region adjacent to the current block and sample values of the first reference block; a generating module 233 configured to generate a bitstream based on the first intra predicted value of the current block and the sample values of the current block.
[0209] In some embodiments, the generation module 233 is configured to determine sample residual values of the current block based on the sample values of the current block and the first intra-predicted values of the current block, encode the sample residual values of the current block, and write the resulting encoded bits into a bitstream.
[0210] An embodiment of the present application provides a coding device to be applied to an encoder. FIG. 24 is a schematic diagram showing the configuration of a coding device according to an embodiment of the present application. As shown in FIG. 24, the coding device 24 includes: a third determination module 241 configured to determine a plurality of reference blocks of a current block, the plurality of reference blocks being located in an image in which the current block is located; a second prediction module 242 configured to obtain a first intra predicted value of the current block based on sample values of the plurality of reference blocks; a generating module 243 configured to generate a bitstream based on the first intra predicted value of the current block and the sample values of the current block.
[0211] In some embodiments, the second prediction module 242 is configured to obtain a first intra prediction value of the current block based on a weighted sum of sample values of the plurality of reference blocks.
[0212] The above description of the encoding device embodiment is similar to the description of the above encoding / decoding method and decoding device embodiment, and has the same beneficial effects as the encoding / decoding method embodiment and the decoding device. Technical details not disclosed in the device embodiment of the present application can be understood by referring to the description of the encoding / decoding method embodiment and the decoding device of the present application.
[0213] The module division in the device described in the embodiments of the present application is merely an example and merely a logical functional division, and other division methods may be used in actual implementation. Furthermore, each functional unit in each embodiment of the present application may be integrated into a single processing unit or may exist physically separately, or two or more units may be integrated into a single unit. The above-mentioned integrated units may be realized in the form of hardware, a software functional unit, or a combination of software and hardware.
[0214] In addition, in the embodiments of the present application, the above methods may be realized as software functional modules and stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the essential parts of the technical solutions of the embodiments of the present application, i.e., the parts that contribute to the related art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing an electronic device to execute all or part of the methods described in each embodiment of the present application. The storage medium may include various media capable of storing program code, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk. Thus, the embodiments of the present application are not limited to a specific combination of hardware and software.
[0215] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed, realizes an encoder-side video image processing method or a decoder-side video image processing method.
[0216] An embodiment of the present application provides a decoder, and as shown in Fig. 25, the decoder 25 includes a first communication interface 251, a first memory 252, and a first processor 253, and each component is coupled via a first bus system 254. As can be understood, the first bus system 254 is configured to realize connection communication between these components. In addition to a data bus, the first bus system 254 includes a power bus, a control bus, and a status signal bus. However, for clarity of explanation, all various buses are denoted as the first bus system 254 in Fig. 25.
[0217] The first communication interface 251 is configured to send and receive signals in the process of sending and receiving information to and from other external network elements.
[0218] The first memory 252 is configured to store a computer program executable by the first processor 253 .
[0219] The first processor 253 is configured to execute the decoding method described in the embodiments of the present application when executing the computer program.
[0220] It is understood that first memory 252 in the present embodiment may be volatile or nonvolatile memory, or may include both volatile and nonvolatile memory. Here, nonvolatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM) used as an external cache. By way of illustrative, but not limiting example, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM), etc. The first memory 252 in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0221] The first processor 253 may be an integrated circuit chip with signal processing functions. In the implementation process, each step of the above method may be completed by an instruction in the form of a hardware integrated logic circuit or software in the first processor 253. The first processor 253 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. Each method, step, and logic block diagram disclosed in the embodiments of the present application may be realized or executed. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in the decoding processor. The software module can be stored in a conventional storage medium such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is stored in the first memory 252, and the first processor 253 reads the information in the first memory 252 and completes the steps of the above method in combination with its hardware.
[0222] It is understandable that the embodiments described herein may be realized in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware realization, the processing unit may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processing devices (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or a combination thereof. For a software realization, the technical solutions described herein may be realized by executing the functional modules (processes, functions, etc.) described herein. The software code may be stored in a memory and executed by a processor. The memory may be realized within the processor or external to the processor.
[0223] Optionally, as another embodiment, the first processor 253 is further configured to, when executing said computer program, perform a method according to any of the decoder 50-side embodiments described above.
[0224] An embodiment of the present application provides an encoder, and as shown in FIG. 26, the encoder 26 includes a second communication interface 261, a second memory 262, and a second processor 263, and each component is coupled via a second bus system 264. As can be understood, the second bus system 264 is configured to realize connection communication between these components. In addition to a data bus, the second bus system 264 includes a power bus, a control bus, and a status signal bus. However, for clarity of explanation, all the various buses are denoted as the second bus system 264 in FIG. 26. Here, The second communication interface 261 is configured to send and receive signals in the process of sending and receiving information to and from other external network elements.
[0225] The second memory 262 is configured to store a computer program executable by the second processor 263 .
[0226] The second processor 263 is configured to execute the encoding method described in the embodiments of the present application when executing the computer program.
[0227] It is understood that the second memory 262 has the same hardware function as the first memory 252, and the second processor 263 has the same hardware function as the first processor 253, and they will not be described again here.
[0228] An embodiment of the present application provides an electronic device, the electronic device including a processor configured to execute a computer program and a computer-readable storage medium storing the computer program, the computer program, when executed by the processor, causing the processor to perform the encoding method and / or decoding method described in the embodiment of the present application. The electronic device may be various types of devices having video encoding and / or video decoding functions. For example, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a personal computer, a television, a projection device, a monitoring device, etc.
[0229] It should be noted that the above description of the storage medium and device embodiments is similar to the description of the method embodiments above, and has the same beneficial effects as the method embodiments. Technical details not disclosed in the storage medium and device embodiments of the present application can be understood by referring to the description of the method embodiments of the present application.
[0230] It should be understood that, as used herein, the phrase "one embodiment," "one embodiment," or "some embodiments" means that a particular feature, structure, or characteristic associated with an embodiment is included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment," "in one embodiment," or "some embodiments" in this specification do not necessarily refer to the same embodiment. Furthermore, these particular features, structures, or characteristics may be incorporated into one or more embodiments in any suitable manner. It should be understood that, in the various embodiments of the present application, the magnitude of the sequence numbers of the above processes does not imply an execution order. The execution order of each process should be determined according to its function and inherent logic and should not constitute any limitations on the implementation process of the embodiments of the present application. The numbers of the above embodiments of the present application are for illustrative purposes only and do not represent the superiority or inferiority of the embodiments. The above description of the embodiments tends to emphasize the differences between the embodiments, and the same or similar parts may be referenced and will not be repeated here for brevity.
[0231] The term "and / or" in this specification describes only a related relationship and indicates that a three-way relationship may exist, for example, A and / or B may indicate three cases: A exists independently, both A and B exist, and B exists independently.
[0232] It should be noted that, as used herein, the terms "comprises," "includes," or any other variation thereof, are intended to cover a non-exclusive inclusion, whereby a process, method, article, or device comprising a set of elements includes not only those elements but also other elements not expressly listed or inherent in such process, method, article, or device. Unless otherwise limited, an element defined as "comprising" does not exclude the presence of other identical elements in the process, method, article, or device that comprises that element.
[0233] In some embodiments provided herein, the disclosed devices and methods may be implemented in other ways. The embodiments described above are merely exemplary, and the division of modules is merely a logical division of functions. In actual implementation, other division methods may be used. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not implemented. Furthermore, the mutual couplings or direct couplings or communication connections between the illustrated or described components may be indirect couplings or communication connections via several interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0234] The modules described as the separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, may be located in one place, or may be distributed across multiple network units, and some or all of the modules may be selected according to actual needs to achieve the purpose of the technical solution of this embodiment.
[0235] In addition, the functional modules in each embodiment of the present application may all be integrated into one processing unit, each module may be used individually as one unit, or two or more modules may be integrated into one unit. The integrated unit may be realized in the form of hardware or a combination of hardware and software functional units.
[0236] Those skilled in the art will understand that all or some of the steps for realizing the above embodiments can be performed by hardware associated with program instructions, and the aforementioned program may be stored in a computer-readable storage medium, and when the program is executed, the steps comprising the above method embodiments are performed, and the aforementioned storage medium includes various media capable of storing program code, such as removable storage, read-only memory (ROM), magnetic disk, or optical disk.
[0237] Alternatively, the above-mentioned integrated units of the present application may be realized in the form of software functional modules and stored in a single computer-readable storage medium when sold or used as an independent product. Based on this understanding, the essential parts of the technical solutions of the embodiments of the present application, i.e., the parts that contribute to the related art, may be embodied in the form of a software product, and the computer software product is stored in a single storage medium and includes several instructions for causing an electronic device to execute all or part of the methods described in each embodiment of the present application. The above-mentioned storage medium includes various media that can store program code, such as removable storage, ROM, magnetic disk, or optical disk.
[0238] The methods disclosed in the several method embodiments provided herein can be combined in any manner consistent with one another to obtain new method embodiments.
[0239] The features disclosed in the several product embodiments provided herein may be combined in any manner consistent with one another to obtain new product embodiments.
[0240] The features disclosed in any method or apparatus embodiment provided herein may be combined in any manner consistent with one another to obtain new method or apparatus embodiments.
[0241] The above content is merely an embodiment of the present application, and the scope of protection of the present application is not limited thereto. Any modifications or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims.
Claims
1. A decoding method applied to a decoder, comprising: determining a first reference block for the current block; obtaining a first intra-predicted value of the current block based on sample values of a reconstructed region adjacent to the current block and sample values of the first reference block; determining a reconstructed value of the current block based on a first intra predicted value of the current block.
2. the first intra prediction value of the current block is obtained by filtering sample values of a reconstructed area adjacent to the current block and sample values of the first reference block; The decoding method of claim 1 .
3. the first intra-predicted value of the current block is obtained by filtering sample values of a reconstructed region adjacent to the current block and sample values of the first reference block using a filter template; The decoding method according to claim 2.
4. the first intra prediction value of the current block is obtained based on a weighted sum of sample values of the first reference block and sample values of the reconstructed region; The decoding method of claim 1 .
5. a first intra-predicted value of a fourth sample of the current block is obtained based on a weighted sum of a sample value of a first sample of the first reference block and a sample value of a second sample and / or a third sample of the reconstructed region; a position of the first sample corresponds to a position of the fourth sample, the second sample includes at least one sample in the same column as the fourth sample in an upper neighboring region of the current block, and the third sample includes at least one sample in the same row as the fourth sample in a left neighboring region of the current block; 5. The decoding method according to claim 4.
6. the weighting coefficients of the second sample and the third sample are predetermined values, or the weighting coefficient of the second sample is determined based on the position of the fourth sample, the position of the second sample, and / or the size of the current block, and the weighting coefficient of the third sample is determined based on the position of the fourth sample, the position of the third sample, and / or the size of the current block. The decoding method according to claim 5.
7. a second intra-predicted value of the current block is obtained by performing intra-prediction on the current block based on sample values of the reconstructed region, and a first intra-predicted value of the current block is obtained based on a weighted sum of sample values of the first reference block and second intra-predicted values of corresponding samples in the current block; The decoding method of claim 1 .
8. At least one of a planar mode, a DC mode, and an angular mode is used for intra prediction of the current block. The decoding method according to claim 7.
9. a sample value offset amount between a neighboring region of the first reference block and the reconstructed region is determined, a position of the neighboring region of the first reference block relative to the first reference block is consistent with a position of the reconstructed region relative to the current block, and a first intra-predicted value of the current block is determined based on the sample value offset amount and the sample value of the first reference block. The decoding method of claim 1 .
10. determining a first average value of the sample values of the reconstructed region; determining a second average value of sample values of neighboring regions of the first reference block; determining the sample value offset amount based on a difference between the first average value and the second average value; The decoding method according to claim 9.
11. determining a sample value offset between a sub-region of the first reference block and the reconstructed region; determining a first intra-predicted value of the current block based on the sample value offset amount and the sample value of the first reference block; The decoding method of claim 1 .
12. determining a first average value of the sample values of the reconstructed region; determining a third average value of the sample values of the subregion of the first reference block; determining the sample value offset amount based on a difference between the first average value and the third average value; The decoding method according to claim 11.
13. determining a numerical relationship between sample values of the reconstructed region and sample values of a subregion of the first reference block; obtaining a first intra predicted value of the current block based on the numerical relationship and the sample values of the first reference block; The decoding method of claim 1 .
14. the reconstructed region includes an upper adjacent region of the current block, and correspondingly, the partial region of the first reference block includes an upper region within the first reference block; and / or the reconstructed region includes a left adjacent region of the current block, and correspondingly, the partial region of the first reference block includes a left region within the first reference block; The decoding method according to any one of claims 11 to 13.
15. determining a numerical relationship between sample values of the reconstructed region and sample values of neighboring regions of the first reference block, wherein a position of the neighboring regions of the first reference block relative to the first reference block coincides with a position of the reconstructed region relative to the current block; obtaining a first intra predicted value of the current block based on the numerical relationship and sample values of the first reference block; The decoding method of claim 1 .
16. the reconstructed region includes an upper neighboring region of the current block and / or a left neighboring region of the current block; The decoding method according to any one of claims 1 to 10 and 15.
17. The first reference block is obtained based on one reference block, or the first reference block is obtained based on a weighted sum of multiple reference blocks. A decoding method according to any one of claims 1 to 16.
18. The one reference block is a reference block obtained under an IBC mode or an intraTMP mode.
18. The decoding method of claim 17.
19. The plurality of reference blocks are reference blocks obtained under an IBC mode and / or an intraTMP mode.
18. The decoding method of claim 17.
20. The reference block obtained based on the IBC mode is located in the image where the current block is located.
20. A decoding method according to claim 18 or 19.
21. Whether to employ the decoding method to determine the first intra-predicted value of the current block is determined based on a value of a first flag bit. A decoding method according to any one of claims 1 to 20.
22. If the value of the first flag bit is equal to a first numerical value, whether to employ the decoding method to determine the first intra-predicted value of the current block is determined based on a relationship between a template matching cost between the current block and a reference block obtained under an intraTMP mode and a first threshold. A decoding method according to any one of claims 1 to 20.
23. Whether to use the decoding method to determine the first intra prediction value of the current block is determined based on a relationship between a template matching cost between the current block and a reference block obtained under an intraTMP mode and a first threshold. A decoding method according to any one of claims 1 to 20.
24. If the template matching cost is less than a first threshold, the first intra-predicted value of the current block is equal to the sample value of the first reference block.
24. A decoding method according to claim 22 or 23.
25. If the template matching cost is greater than or equal to a first threshold, a first intra prediction value is determined by employing the decoding method.
24. A decoding method according to claim 22 or 23.
26. A decoding method applied to a decoder, comprising: determining a plurality of reference blocks of a current block, the plurality of reference blocks being located within the image in which the current block is located; obtaining a first intra-predicted value of the current block based on sample values of the plurality of reference blocks; determining a reconstructed value of the current block based on a first intra predicted value of the current block.
27. the first intra predicted value of the current block is obtained based on a weighted sum of sample values of the plurality of reference blocks; 27. The decoding method of claim 26.
28. The plurality of reference blocks are reference blocks obtained under an IBC mode and / or an intraTMP mode.
28. A decoding method according to claim 26 or 27.
29. The reference block obtained based on the IBC mode is located in the image where the current block is located.
29. The decoding method of claim 28.
30. Whether to employ the decoding method to determine the first intra-predicted value of the current block is determined based on a value of a first flag bit. The decoding method according to any one of claims 26 to 28.
31. If the value of the first flag bit is equal to a first numerical value, whether to employ the decoding method to determine the first intra-predicted value of the current block is determined based on a relationship between a template matching cost between the current block and a reference block obtained under an intraTMP mode and a first threshold. The decoding method according to any one of claims 26 to 28.
32. Whether to use the decoding method to determine the first intra prediction value of the current block is determined based on a relationship between a template matching cost between the current block and a reference block obtained under an intraTMP mode and a first threshold. The decoding method according to any one of claims 26 to 28.
33. If the template matching cost is greater than or equal to a first threshold, a first intra prediction value is determined by employing the decoding method.
33. A decoding method according to claim 31 or 32.
34. A coding method applied to an encoder, comprising: determining a first reference block for the current block; obtaining a first intra-predicted value of the current block based on sample values of a reconstructed region adjacent to the current block and sample values of the first reference block; obtaining a residual value of the current block according to a first intra predicted value of the current block and sample values of the current block; generating a bitstream based on the residual values.
35. the first intra prediction value of the current block is obtained by filtering sample values of a reconstructed area adjacent to the current block and sample values of the first reference block; 35. The encoding method of claim 34.
36. the first intra-predicted value of the current block is obtained by filtering sample values of a reconstructed region adjacent to the current block and sample values of the first reference block using a filter template; 36. The encoding method of claim 35.
37. the first intra prediction value of the current block is obtained based on a weighted sum of sample values of the first reference block and sample values of the reconstructed region; 35. The encoding method of claim 34.
38. a first intra-predicted value of a fourth sample of the current block is obtained based on a weighted sum of a sample value of a first sample of the first reference block and a sample value of a second sample and / or a third sample of the reconstructed region; a position of the first sample corresponds to a position of the fourth sample, the second sample includes at least one sample in the same column as the fourth sample in an upper neighboring region of the current block, and the third sample includes at least one sample in the same row as the fourth sample in a left neighboring region of the current block; 38. The encoding method of claim 37.
39. the weighting factors of the second sample and the third sample are predetermined values, or a weighting factor for the second sample is determined based on a position of the fourth sample, a position of the second sample, and / or a size of the current block, and a weighting factor for the third sample is determined based on a position of the fourth sample, a position of the third sample, and / or a size of the current block.
39. The encoding method of claim 38.
40. a second intra-predicted value of the current block is obtained by performing intra-prediction on the current block based on sample values of the reconstructed region; a first intra-predicted value of the current block is obtained based on a weighted sum of a sample value of the first reference block and a second intra-predicted value of a corresponding sample in the current block; 35. The encoding method of claim 34.
41. At least one of a planar mode, a DC mode, and an angular mode is used for intra prediction of the current block.
41. The encoding method of claim 40.
42. determining a sample value offset between a neighboring region of the first reference block and the reconstructed region, wherein a position of the neighboring region of the first reference block relative to the first reference block coincides with a position of the reconstructed region relative to the current block; determining a first intra-predicted value of the current block based on the sample value offset amount and the sample value of the first reference block; 35. The encoding method of claim 34.
43. determining a first average value of the sample values of the reconstructed region; determining a second average value of sample values of neighboring regions of the first reference block; determining the sample value offset amount based on a difference between the first average value and the second average value; 43. The encoding method of claim 42.
44. determining a sample value offset between a sub-region of the first reference block and the reconstructed region; determining a first intra-predicted value of the current block based on the sample value offset amount and the sample value of the first reference block; 35. The encoding method of claim 34.
45. determining a first average value of the sample values of the reconstructed region; determining a third average value of the sample values of the subregion of the first reference block; determining the sample value offset amount based on a difference between the first average value and the third average value; 45. The encoding method of claim 44.
46. determining a numerical relationship between sample values of the reconstructed region and sample values of a subregion of the first reference block; obtaining a first intra predicted value of the current block based on the numerical relationship and the sample values of the first reference block; 35. The encoding method of claim 34.
47. the reconstructed region includes an upper adjacent region of the current block, and correspondingly, the partial region of the first reference block includes an upper region within the first reference block; and / or the reconstructed region includes a left adjacent region of the current block, and correspondingly, the partial region of the first reference block includes a left region within the first reference block; The encoding method according to any one of claims 44 to 46.
48. determining a numerical relationship between sample values of the reconstructed region and sample values of neighboring regions of the first reference block, wherein a position of the neighboring regions of the first reference block relative to the first reference block coincides with a position of the reconstructed region relative to the current block; obtaining a first intra predicted value of the current block based on the numerical relationship and the sample values of the first reference block; 35. The encoding method of claim 34.
49. the reconstructed region includes an upper neighboring region of the current block and / or a left neighboring region of the current block; The encoding method according to any one of claims 34 to 43 and 48.
50. The first reference block is obtained based on one reference block, or the first reference block is obtained based on a weighted sum of multiple reference blocks. The encoding method according to any one of claims 34 to 49.
51. The one reference block is a reference block obtained under an IBC mode or an intraTMP mode.
51. The encoding method of claim 50.
52. The plurality of reference blocks are reference blocks obtained under an IBC mode and / or an intraTMP mode.
51. The encoding method of claim 50.
53. The reference block obtained based on the IBC mode is located in the image where the current block is located.
53. The encoding method according to claim 51 or 52.
54. Whether to employ the encoding method to determine the first intra-predicted value of the current block is determined based on a value of a first flag bit. The encoding method according to any one of claims 34 to 52.
55. If the value of the first flag bit is equal to a first numerical value, whether to adopt the encoding method to determine the first intra prediction value of the current block is determined based on a relationship between a template matching cost between the current block and a reference block obtained under an intraTMP mode and a first threshold. The encoding method according to any one of claims 34 to 52.
56. Whether to employ the encoding method for determining the first intra prediction value of the current block is determined based on a relationship between a template matching cost between the current block and a reference block obtained under an intraTMP mode and a first threshold. The encoding method according to any one of claims 34 to 52.
57. If the template matching cost is less than a first threshold, the first intra-predicted value of the current block is equal to the sample value of the first reference block.
57. An encoding method according to claim 55 or 56.
58. If the template matching cost is greater than or equal to a first threshold, a first intra-predicted value of the current block is determined by employing the encoding method.
57. An encoding method according to claim 55 or 56.
59. A coding method applied to an encoder, comprising: determining a plurality of reference blocks of a current block, the plurality of reference blocks being located within the image in which the current block is located; obtaining a first intra-predicted value of the current block based on sample values of the plurality of reference blocks; obtaining a residual value of the current block according to a first intra predicted value of the current block and sample values of the current block; generating a bitstream based on the residual values.
60. the first intra predicted value of the current block is obtained based on a weighted sum of sample values of the plurality of reference blocks; 60. The encoding method of claim 59.
61. The plurality of reference blocks are reference blocks obtained under an IBC mode and / or an intraTMP mode.
61. An encoding method according to claim 59 or 60.
62. The reference block obtained based on the IBC mode is located in the image where the current block is located.
62. The encoding method of claim 61.
63. Whether to employ the encoding method to determine the first intra-predicted value of the current block is determined based on a value of a first flag bit. Encoding method according to any one of claims 59 to 61.
64. If the value of the first flag bit is equal to a first numerical value, whether to adopt the encoding method to determine the first intra prediction value of the current block is determined based on a relationship between a template matching cost between the current block and a reference block obtained under an intraTMP mode and a first threshold. Encoding method according to any one of claims 59 to 61.
65. Whether to employ the encoding method for determining the first intra prediction value of the current block is determined based on a relationship between a template matching cost between the current block and a reference block obtained under an intraTMP mode and a first threshold. Encoding method according to any one of claims 59 to 61.
66. If the template matching cost is greater than or equal to a first threshold, a first intra-predicted value of the current block is determined by employing the encoding method.
66. An encoding method according to claim 64 or 65.
67. A decoding device applied to a decoder, a first determining module configured to determine a first reference block of the current block; a first prediction module configured to obtain a first intra predicted value of the current block based on sample values of a reconstructed region adjacent to the current block and sample values of the first reference block; a second determination module configured to determine a reconstructed value of the current block based on the first intra predicted value of the current block.
68. A decoding device applied to a decoder, a third determination module configured to determine a plurality of reference blocks of a current block, the plurality of reference blocks being located within an image in which the current block is located; a second prediction module configured to obtain a first intra predicted value of the current block based on sample values of the plurality of reference blocks; a second determination module configured to determine a reconstructed value of the current block based on the first intra predicted value of the current block.
69. A decoder comprising: a first memory and a first processor; the first memory stores a computer program executable by the first processor; A decoder, wherein the first processor executes the computer program to implement the method according to any one of claims 1 to 25 or the method according to any one of claims 26 to 33.
70. A coding device applied to an encoder, a first determining module configured to determine a first reference block of the current block; a first prediction module configured to obtain a first intra predicted value of the current block based on sample values of a reconstructed region adjacent to the current block and sample values of the first reference block; a generating module configured to obtain residual values of the current block based on a first intra-predicted value of the current block and sample values of the current block, and to generate a bitstream based on the residual values.
71. A coding device applied to an encoder, a third determination module configured to determine a plurality of reference blocks of a current block, the plurality of reference blocks being located within an image in which the current block is located; a second prediction module configured to obtain a first intra predicted value of the current block based on sample values of the plurality of reference blocks; a generating module configured to obtain residual values of the current block based on a first intra-predicted value of the current block and sample values of the current block, and to generate a bitstream based on the residual values.
72. 1. An encoder comprising: a second memory and a second processor; the second memory stores a computer program executable by the second processor; The encoder, wherein the second processor executes the computer program to realize the method according to any one of claims 34 to 58 or any one of claims 59 to 66.
73. A bitstream comprising: The bitstream is generated based on residual values between a first intra-predicted value of a current block and sample values of the current block, the first intra-predicted value being obtained by a method according to any one of claims 34 to 53, or the first intra-predicted value being obtained by a method according to any one of claims 59 to 62.
74. An electronic device, a processor configured to execute a computer program; and a computer-readable storage medium having a computer program stored thereon, the computer program causing the processor to perform the method of any one of claims 1 to 25, or the method of any one of claims 26 to 33, or the method of any one of claims 34 to 58, or the method of any one of claims 59 to 66.
75. A computer-readable storage medium having stored thereon a computer program for causing a processor to carry out the method according to any one of claims 1 to 25, or the method according to any one of claims 26 to 33, or the method according to any one of claims 34 to 58, or the method according to any one of claims 59 to 66.
Citation Information
Patent Citations
Image prediction / encoding device, image prediction / encoding method, image prediction / encoding program, image prediction / decoding device, image prediction / decoding method, and image prediction / decoding program
JP2008283662A
Method and apparatus for block vector signaling and derivation in intra picture block compensation
US20200014934A1
Boundary filtering method for intra prediction
US20200314418A1
Method and apparatus for intra-prediction in image coding system
US20210297677A1
Video encoding and decoding using intra block copy
US20220182604A1