Decoding method, encoding method, and related apparatus
By reordering the correspondence between intra-frame prediction modes and candidate reconstruction regions, the optimal index value is selected for video prediction, which solves the bit overhead problem caused by the index value and improves the accuracy and efficiency of video coding.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HISENSE VISUAL TECH CO LTD
- Filing Date
- 2026-01-05
- Publication Date
- 2026-07-16
AI Technical Summary
In existing video coding technologies, the bit overhead caused by the index value affects the accuracy of mode selection in intra-frame prediction mode selection, making it difficult to meet the requirements for video quality and compression efficiency in extremely low bit rate environments.
By confirming the correspondence between multiple intra-frame prediction modes and candidate reconstruction regions, a list of prediction modes is obtained by reordering them, and the optimal mode is selected based on the index value for prediction to generate predicted pixel values.
It improves the accuracy of intra-frame prediction mode, enhances video quality and compression efficiency, and particularly improves video coding performance in extremely low bitrate environments.
Smart Images

Figure CN2026070644_16072026_PF_FP_ABST
Abstract
Description
Decoding methods, encoding methods and related devices
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese patent application No. 202510026052.4, filed on January 7, 2025, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of video encoding and decoding, and in particular to a decoding method, encoding method and related apparatus. Background Technology
[0004] Intra-frame prediction refers to using the boundary pixels of neighboring and reconstructed image blocks as reference pixels to predict the pixels of the current image block, in order to remove spatial redundancy in the video signal.
[0005] In related technologies, various intra-frame prediction modes each correspond to a fixed index value. By estimating the rate-distortion (RD) cost of using each mode for prediction, and arranging them according to the estimated RD cost from smallest to largest, the intra-frame prediction mode with the smaller RD cost is selected to predict the image patch. Intra-frame prediction is achieved by transmitting the corresponding index value during the prediction process.
[0006] However, the intra-prediction mode selected by the above method will be different for different images. Since the index value is the same, the bit overhead of the index value will affect the RD overhead of the intra-prediction mode and reduce the accuracy of the intra-prediction mode selection. Summary of the Invention
[0007] In a first aspect, a decoding method is provided, applied to a decoder, the method comprising: confirming a first index value through a bitstream; confirming a plurality of preset intra-frame prediction modes, wherein the plurality of intra-frame prediction modes correspond one-to-one with a plurality of candidate reconstruction regions; reordering the plurality of intra-frame prediction modes based on the pixel information corresponding to the plurality of candidate reconstruction regions respectively, to obtain a prediction mode list; determining a first intra-frame prediction mode from the prediction mode list based on the first index value; and predicting the current block based on the first intra-frame prediction mode to obtain the predicted pixel value corresponding to the current block.
[0008] Secondly, an encoding method is provided for an encoder. The method includes: identifying multiple preset intra-frame prediction modes, each corresponding to a multiple candidate reconstruction regions; reordering the multiple intra-frame prediction modes based on pixel information corresponding to each of the candidate reconstruction regions to obtain a prediction mode list; determining a first intra-frame prediction mode from the prediction mode list; determining a first index value corresponding to the first intra-frame prediction mode based on the prediction mode list, wherein the first intra-frame prediction mode is used to predict the current block to obtain the predicted pixel value corresponding to the current block; and outputting the first index value through a bitstream.
[0009] Thirdly, a decoding chip is provided, including a processor and a memory; the processor is used to call a program or instructions from the memory to cause the method described in the second aspect to be executed.
[0010] Fourthly, a decoder is provided, comprising: a memory for storing a computer program; and a processor for executing the method described in the first aspect when running the computer program.
[0011] Fifthly, an encoder is provided, comprising: a memory for storing a computer program; and a processor for executing the method described in the second aspect when running the computer program.
[0012] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program / instructions and a bit stream are stored, wherein the computer program / instructions, when executed by a processor, are capable of generating the bit stream in accordance with the method described in the second aspect.
[0013] In a seventh aspect, a bitstream is provided, including a bitstream generated according to the method described in the second aspect.
[0014] Eighthly, a method for storing a bit stream is provided, comprising: generating a bit stream by performing the method described in the second aspect, and storing the bit stream.
[0015] A ninth aspect provides a method for transmitting a bit stream, comprising: generating a bit stream by performing the method described in the second aspect, and transmitting the bit stream. Attached Figure Description
[0016] Figure 1 is a structural example diagram of the video encoder provided in an embodiment of this application;
[0017] Figure 2 is another structural example of the video decoder provided in the embodiments of this application;
[0018] Figure 3 is a schematic diagram of the filter types provided in the embodiments of this application;
[0019] Figure 4 is a schematic diagram of the reconstruction area types provided in the embodiments of this application;
[0020] Figure 5 is a schematic diagram of another reconstruction region type provided in an embodiment of this application;
[0021] Figure 6 is a schematic diagram of another reconstruction region type provided in an embodiment of this application;
[0022] Figure 7 is a schematic diagram of the reconstruction area confirmation method provided in the embodiment of this application;
[0023] Figure 8 is a schematic diagram of the reconstructed area provided in an embodiment of this application;
[0024] Figure 9 is a schematic diagram of the pixel prediction process provided in an embodiment of this application;
[0025] Figure 10 is a flowchart of the method for determining the intra-frame prediction mode of the coding stage list provided in an embodiment of this application;
[0026] Figure 11 is a flowchart of the method for determining the intra-frame prediction mode in the decoding stage list provided in an embodiment of this application;
[0027] Figure 12 is a schematic diagram of the decoder provided in an embodiment of this application;
[0028] Figure 13 is another structural schematic diagram of the decoder provided in the embodiment of this application;
[0029] Figure 14 is a schematic diagram of the encoder provided in an embodiment of this application;
[0030] Figure 15 is another structural schematic diagram of the encoder provided in the embodiment of this application. Detailed Implementation
[0031] Figure 1 is a schematic block diagram of a video encoder according to an embodiment of this application. The video encoder 100 can be used for lossy compression of images, or for lossless compression of images. The lossless compression can be visually lossless compression or mathematically lossless compression.
[0032] This video encoder 100 can be applied to image data in luminance / chrominance (YCbCr, YUV) format. For example, the YUV ratio can be 4:2:0, 4:2:2, or 4:4:4, where Y represents luminance (Luma), Cb (U) represents cyan, Cr (V) represents red, and U and V represent chrominance (Chroma) used to describe color and saturation. For example, in color format, 4:2:0 means that there are 4 luminance components and 2 chrominance components (YYYYCbCr) for every 4 pixels; 4:2:2 means that there are 4 luminance components and 4 chrominance components (YYYYCbCrCbCr) for every 4 pixels; and 4:4:4 means full pixel display (YYYYCbCrCbCrCbCrCbCr).
[0033] For example, the video encoder 100 reads video data and, for each image in the video data, divides the image into several coding tree units (CTUs). In some examples, a CTU may be called a "tree block," "largest coding unit" (LCU), or "coding tree block" (CTB). Each CTU can be associated with a pixel block of equal size within the image. Each pixel can correspond to one luminance (luma) sample and two chrominance (chroma) samples. Therefore, each CTU can be associated with one luminance sample block and two chrominance sample blocks. The size of a CTU is, for example, 128×128, 64×64, 32×32, etc. A CTU can be further divided into several coding units (CUs) for encoding. CUs can be rectangular or square blocks. CUs can correspond to prediction units (PUs) and transform units (TUs).
[0034] In some embodiments, the current block may be referred to as the current image block or the current coding unit (CU). A prediction block may also be referred to as a prediction image block or image prediction block, and a reconstructed image block may also be referred to as a reconstruction block or image reconstruction block. For the purpose of parallel processing, an image can be divided into slices. Slices within the same image can be processed in parallel, meaning they have no data dependency on each other. A "frame" is a commonly used term, generally understood as one image. In this document, "frame" can also be replaced with "image" or "slice," etc.
[0035] The video encoder 100 in this embodiment will be described below with reference to Figure 1.
[0036] In some embodiments, the video encoder 100 may include a prediction module 110. The prediction module 110 includes an inter-frame prediction module 111 and an intra-frame prediction module 112. Intra-frame prediction eliminates spatial redundancy between adjacent pixels by utilizing the strong correlation between adjacent pixels in an image of the video. Inter-frame prediction eliminates temporal redundancy between adjacent images by utilizing the strong similarity between adjacent images in the video, thereby improving coding efficiency.
[0037] The inter-frame prediction module 111 can be used for inter-frame prediction, which can include motion estimation and motion compensation. It can reference image information from different images. Inter-frame prediction uses motion information to find reference blocks in the reference images and generates prediction blocks based on these reference blocks to eliminate temporal redundancy. The motion information includes a list of reference images, the reference image index, and motion vectors. Motion vectors can be integer-pixel or fractional-pixel. If the motion vector is fractional-pixel, interpolation filtering needs to be used in the reference image to create the required fractional-pixel blocks. Here, the integer-pixel or fractional-pixel blocks in the reference image found based on the motion vectors are called reference blocks. Some techniques use reference blocks as prediction blocks, while others process the reference blocks further to generate prediction blocks. Processing the reference blocks further to generate prediction blocks can also be understood as using the reference blocks as prediction blocks and then processing them to generate new prediction blocks.
[0038] The intra-frame prediction module 112 refers only to information from the same image to predict pixel information within the current image block, thereby eliminating spatial redundancy.
[0039] Intra-frame prediction has multiple prediction modes. Taking the international digital video coding standards H-series as an example, the H.264 / AVC standard has 8 angular prediction modes and 1 non-angular prediction mode, while H.265 / HEVC extends this to 33 angular prediction modes and 2 non-angular prediction modes. High Efficiency Video Coding (HEVC) uses Planar, DC, and 33 angular modes, for a total of 35 prediction modes. Versatile Video Coding (VVC) uses Planar, DC, and 65 angular modes, for a total of 67 prediction modes. In addition, it includes Extrapolation Filter-based Intra Prediction (EIP) mode and EIP-based Merge mode.
[0040] It should be noted that with the increase in angle modes, intra-frame prediction will be more accurate and better meet the needs of the development of high-definition and ultra-high-definition digital video.
[0041] In some embodiments, the video encoder 100 may include a residual module 120. The residual module 120 may generate a residual block of the CU based on pixel blocks of the CU and prediction blocks of the CU. For example, the residual module 120 may generate a residual block of the CU such that each sample in the residual block has a value equal to the difference between the sample in the pixel block of the CU and the corresponding sample in the prediction block of the CU. The residual block can also be understood as residual information.
[0042] In some embodiments, the video encoder 100 may include a transformation module 125. The transformation module 125 can transform the residual information generated by the residual module 120 to obtain transformation coefficients.
[0043] In some embodiments, the video encoder 100 may include a quantization module 130. The quantization module 130 quantizes transform coefficients. The quantization module 130 quantizes the transform coefficients associated with the CU based on a quantization parameter (QP) value associated with the CU. The video encoder 100 can adjust the degree of quantization applied to the transform coefficients associated with the CU by adjusting the QP value associated with the CU.
[0044] In some embodiments, the video encoder 100 may include an inverse quantization module 135. The inverse quantization module 135 can apply inverse quantization to the quantized transform coefficients to obtain the transform coefficients.
[0045] In some embodiments, the video encoder 100 may include an inverse transform module 140. The inverse transform module 140 applies an inverse transform to the transform coefficients, which can be used to reconstruct the residual block.
[0046] In some embodiments, the video encoder 100 may include a reconstruction module 150. The reconstruction module 150 may add samples of the reconstructed residual block to corresponding samples of one or more prediction blocks generated by the prediction module 110 to generate reconstructed image blocks associated with the CU. By reconstructing each sample block of the CU in this manner, the video encoder 100 can reconstruct the pixel blocks of the CU.
[0047] In some embodiments, the video encoder 100 may include a loop filter module 160. The loop filter module 160 is used to process the pixels after inverse transform and inverse quantization to compensate for distortion information and provide a better reference for subsequent encoded pixels. For example, it may perform deblocking filtering operations to reduce the block effect of pixel blocks associated with the CU.
[0048] In some embodiments, the loop filtering module 160 includes a deblocking filtering module. The deblocking filtering module is used to remove block artifacts. Block artifacts refer to the discontinuities at the boundaries of coded blocks in an image. The deblocking filtering module can smooth the block boundaries to effectively reduce or remove block artifacts.
[0049] In some embodiments, the loop filtering module 160 includes a sample adaptive offset (SAO) module. The SAO module can be used to remove ringing effects. For strong edges in an image, quantization distortion due to high-frequency AC coefficients can produce a ripple effect around the edges after decoding; this distortion can be called ringing. The SAO module can suppress ringing effects from a pixel-domain perspective.
[0050] In some embodiments, the loop filtering module 160 includes an adaptive loop filter (ALF) module, which is used to remove ringing effects. ALF technology can include luma ALF, chroma ALF, and inter-component ALF. ALF can be based on the Wiener filtering principle, using the original image information and reconstructed image information to establish the Wiener-Hough equation and solve for a series of filter coefficients with the minimum mean square error to remove ringing effects.
[0051] In some embodiments, the video encoder 100 may include a decoded image buffer 170. The decoded image buffer 170 may store reconstructed pixel blocks. The inter-frame prediction module 111 may use a reference image containing the reconstructed pixel blocks to perform inter-frame prediction on PUs of other images. In addition, the intra-frame prediction module 112 may use the reconstructed pixel blocks in the decoded image buffer 170 to perform intra-frame prediction on other PUs in the same image as the CU.
[0052] In some embodiments, the video encoder 100 may include an entropy coding module 180. The entropy coding module 180 may receive quantized transform coefficients from the quantization module 130. The entropy coding module 180 may perform one or more entropy coding operations on the quantized transform coefficients to produce entropy-coded data.
[0053] Figure 2 is a schematic block diagram of a video decoder according to an embodiment of this application. As shown in Figure 2, the video decoder 200 can receive a bitstream. The video decoder 200 may include an entropy decoding module 210. The entropy decoding module 210 can parse the bitstream to extract syntax elements from it. As part of parsing the bitstream, the entropy decoding module 210 can parse the entropy-encoded syntax elements in the bitstream. The prediction module 220, the inverse quantization module 230, the inverse transform module 235, the reconstruction module 240, and the loop filtering module 250 can decode the video data based on the syntax elements extracted from the bitstream, i.e., generate decoded video data.
[0054] In some embodiments, the video decoder 200 may include a prediction module 220. The prediction module 220 includes an intra-frame prediction module 222 and an inter-frame prediction module 221.
[0055] Intra-prediction module 222 can perform intra-prediction to generate prediction blocks for PUs. Intra-prediction module 222 can use intra-prediction modes to generate prediction blocks for PUs based on pixel blocks of spatially adjacent PUs. Intra-prediction module 222 can also determine the intra-prediction mode of PUs based on one or more syntax elements parsed from the bitstream.
[0056] Inter-frame prediction module 221 can construct a first reference image list (list 0) and a second reference image list (list 1) based on the syntax elements parsed from the bitstream. Furthermore, if the PU uses inter-frame prediction coding, entropy decoding module 210 can parse the motion information of the PU. Inter-frame prediction module 221 can determine one or more reference blocks of the PU based on the motion information of the PU. Inter-frame prediction module 221 can generate prediction blocks for the PU based on one or more reference blocks of the PU.
[0057] In some embodiments, the video decoder 200 may include an inverse quantization module 230. The inverse quantization module 230 applies inverse quantization to the quantized transform coefficients to obtain the transform coefficients. The inverse quantization module 230 may use the QP value associated with the CU of the TU to determine the degree of quantization.
[0058] In some embodiments, the video decoder 200 may include an inverse transform module 235. The inverse transform module 235 can inversely transform the transform coefficients associated with the TU. After performing the inverse transform on the transform coefficients, the inverse transform module 235 can generate a residual block associated with the TU.
[0059] In some embodiments, the video decoder 200 may include a reconstruction module 240. The reconstruction module 240 uses a residual block associated with the TU of the CU and a prediction block of the PU of the CU to reconstruct pixel blocks of the CU. For example, the reconstruction module 240 may add samples of the residual block to the corresponding samples of the prediction block to reconstruct pixel blocks of the CU, thereby obtaining reconstructed image blocks.
[0060] In some embodiments, the video decoder 200 may include a loop filter module 250. The loop filter module 250 may perform deblocking filtering operations to reduce the block artifacts of pixel blocks associated with the CU.
[0061] In some embodiments, the video decoder 200 may include a decoded image buffer 260. The video decoder 200 may store the reconstructed image of the CU in the decoded image buffer 260. The video decoder 200 may use the reconstructed image in the decoded image buffer 260 as a reference image for subsequent prediction, or transmit the reconstructed image to a display device for presentation.
[0062] The basic process of video encoding and decoding is as follows: At the encoding end, the data transmitted by the encoding end (e.g., index values) is confirmed through the bitstream to divide an image into blocks. For the current block, the prediction module 110 uses intra-frame prediction or inter-frame prediction to generate a prediction block for the current block. The residual module 120 can calculate a residual block based on the prediction block and the original block of the current block, that is, the difference between the prediction block and the original block of the current block. This residual block can also be called residual information. This residual block can remove information that is not sensitive to the human eye through the transformation process of the transformation module 125 and the quantization process of the quantization module 130, thereby eliminating visual redundancy. In some embodiments, the residual block before transformation by the transformation module 125 can be called a temporal residual block, and the temporal residual block after quantization by the quantization module 130 can be called a frequency residual block or a frequency domain residual block. The entropy coding module 180 receives the quantized transformation coefficients output by the quantization module 130 and can perform entropy coding on the quantized transformation coefficients to output the bitstream. For example, the entropy coding module 180 can eliminate character redundancy based on the target context model and the probability information of the binary bitstream.
[0063] At the decoding end, the entropy decoding module 210 parses the bitstream to obtain the prediction information and quantization coefficient matrix of the current block. The prediction module 220 uses intra-frame prediction or inter-frame prediction based on the prediction information to generate the prediction block of the current block. The inverse quantization module 230 uses the quantization coefficient matrix obtained from the bitstream to inverse quantize the quantization coefficient matrix to obtain the transform coefficients; the inverse transform module 235 performs an inverse transform on the transform coefficients to obtain the residual block. The reconstruction module 240 adds the prediction block and the residual block to obtain the reconstructed block. The reconstructed blocks form the reconstructed image, and the loop filtering module 250 performs loop filtering on the reconstructed image based on the image or based on the blocks to obtain the decoded image. The encoding end also needs similar operations to the decoding end to obtain the decoded image. This decoded image can also be called the reconstructed image, which can be used as a reference image for inter-frame prediction of subsequent images.
[0064] It should be noted that the block partitioning information determined at the encoding end, as well as mode information or parameter information such as prediction, transform, quantization, entropy coding, and loop filtering, are carried in the bitstream when necessary. The decoding end determines the same block partitioning information, prediction, transform, quantization, entropy coding, and loop filtering mode information or parameter information as the encoding end by parsing the bitstream and analyzing existing information, thereby ensuring that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end.
[0065] It is understandable that the "inverse transformation" of the transform coefficients at the decoding end can also be referred to as "transformation" in standard texts. In the embodiments of this application, "transformation" and "inverse transformation" correspond to two opposite processes. For example, "transformation" converts spatial domain values to frequency domain coefficients, while "inverse transformation" converts frequency domain coefficients back to spatial domain values. If the standard only specifies decoding, then "transformation" in the standard text refers to the decoding part, specifically the "inverse transformation" in this document. The "inverse transformation" of the transform coefficients at the decoding end can also be referred to as "transformation" in standard texts.
[0066] The above describes the basic flow of a video codec under a block-based hybrid coding framework. With the development of technology, some modules or steps of this framework or flow may be optimized. This application is applicable to the basic flow of a video codec under this block-based hybrid coding framework, but is not limited to this framework and flow.
[0067] The encoding and decoding technologies involved in the embodiments of this application will be described below.
[0068] In today's digital age, the generation and transmission of video content has become a crucial means of information exchange. With the rapid development of social media, online education, and remote work, the demand for high-quality video coding technologies is growing daily. However, while relevant video coding standards (such as H.265 / HEVC and H.266 / VVC) perform excellently in high-bitrate environments, they struggle to achieve satisfactory video quality and compression efficiency at extremely low bitrates. The importance of low-bitrate video coding is becoming increasingly apparent, particularly in scenarios such as mobile devices, the Internet of Things (IoT), and emergency communications.
[0069] Against this backdrop, the research and standardization of the EIP model is particularly urgent. The EIP model uses a predefined template to determine the extrapolation filter coefficients from the reconstructed pixels adjacent to the current block, and then extrapolates position by position from the top left corner to the bottom right corner to form a prediction block.
[0070] At the AD meeting of the Joint Video Experts Team (JEVT) (AD being the meeting number), proposal JVET-AD0081, an intra-frame prediction mode based on extrapolation filters, was presented. EIP is a method for intra-frame prediction in video coding that uses a predefined template to determine the extrapolation filter coefficients from neighboring reconstructed pixels of the current block, and then extrapolates positionally from the top left to the bottom right to form the prediction block. This method provides an efficient way to handle complex textures and transition bands in intra-frame prediction of video coding, thereby improving performance.
[0071] For ease of understanding, the intra-frame prediction process in the encoding and decoding process is described below. Currently, the process based on EIP mode encoding mainly includes the following steps 301 to 305.
[0072] Step 301: Confirm the EIP filter combination.
[0073] In some embodiments, the filter combination in EIP mode consists of a filter and a reconstruction region, wherein the reconstruction region can also be referred to as a reconstruction region reference pixel template.
[0074] In some embodiments, during intra-frame prediction, the filter can reduce noise and abrupt changes by filtering the reference pixel, making the reference pixel smoother, which is beneficial to the subsequent prediction process.
[0075] In some embodiments, there are multiple different filter shapes for the filter. Different filter shapes determine the arrangement of reference pixels in the EIP mode. The reference pixels are used to predict the pixels in the current block (or the current image block) to obtain the corresponding pixel prediction values.
[0076] Referring to Figure 3, which illustrates the filter types provided in this application embodiment, three different filter shapes are currently displayed: a 4×4 type filter, a 2×8 type filter, and an 8×2 type filter. The 2×8 type filter and the 8×2 type filter represent two different aspect ratios. It should be noted that the above description of filter types is merely an illustrative example, and the shape of the filters in this application embodiment is not limited.
[0077] In some embodiments, the reconstruction region refers to the image blocks that have been reconstructed at specified locations around the current block after the current block has been determined, which are used as a reference to predict the pixels in the current block.
[0078] In some embodiments, the shape of the reconstructed region also includes various types. In some embodiments, please refer to FIG5, which shows a schematic diagram of the reconstructed region types provided in the embodiments of this application. As shown in FIG4 to FIG6, three reconstructed region shapes are currently shown, including the “left side + top side” region type shown in FIG4 (also known as the L-shaped region type), the “top side” region type shown in FIG5, and the “left side” region type shown in FIG6. These three reconstructed regions correspond to three different sizes. The shape of the reconstructed region is not limited in the embodiments of this application.
[0079] The reconstruction region contains multiple reconstruction pixels. Due to the different size of the reconstruction region, the arrangement of the reconstruction pixels in the reconstruction region is also different. Therefore, the results obtained by performing intra-frame prediction on the current block through the reconstruction region will also be different.
[0080] Based on the above, considering the three filters and three reconstruction regions, combining a single filter with the three reconstruction regions forms a filter combination, also known as an EIP filter combination, or an intra-frame prediction mode. Therefore, there are nine different combination methods, including the following:
[0081] Filter combination 1 is obtained by combining a 4×4 type filter with a reconstruction region of the left + top region type;
[0082] Filter combination 2 is obtained by combining a 4×4 type filter with a reconstruction region of the upper region type;
[0083] Filter combination 3 is obtained by combining a 4×4 type filter with a reconstruction region of the left region type;
[0084] The filter combination 4 is obtained by combining a 2×8 type filter with a reconstruction region of the left + top region type;
[0085] The filter combination 5 is obtained by combining a 2×8 type filter with a reconstruction region of the upper region type;
[0086] The filter combination 6 is obtained by combining a 2×8 type filter with a reconstruction region of the left region type;
[0087] The filter combination 7 is obtained by combining an 8×2 type filter with a reconstruction region of the left + top region type;
[0088] The filter combination 8 is obtained by combining an 8×2 type filter with a reconstruction region of the upper region type;
[0089] The filter combination 9 is obtained by combining an 8×2 type filter with a reconstruction region of the left region type.
[0090] Referring to Figure 4-6, which shows filter combinations 1, 2, and 3 composed of a 4×4 filter and three different reconstruction regions, respectively, we will focus on filter combination 3 as an example. For filter combination 3, the filter has a block width and a block height, while the reconstruction region has a left size and an above size. Therefore, the size of the reconstruction region is determined by the minimum side (min, block width, block height) of the filter and the filter shape. When the filter shape is 4×4, its width and height are equal. In one example: if the current block is 8×16 and the selected filter shape is 4×4, the above size of the reconstruction region is min(8,16) + 4 - 1 = 11, and the left size of the reconstruction region is also min(8,16) + 4 - 1 = 11. That is, the left size of the reconstruction region is 11, and the above size is also 11. The "-1" is because there is a predicted pixel position in the filter, so the row and column where the predicted pixel position is located are subtracted from the left and top dimensions.
[0091] Referring to Figure 3, for the three different types of filters, each filter has a predicted pixel position (represented by white squares). That is, in the EIP prediction process, the placement of the filter in the reconstruction area determines 15 reference pixels (represented by gray squares) and one predicted pixel. The predicted pixel is predicted using the pixel values corresponding to the 15 reference pixels to obtain the predicted value corresponding to the predicted pixel. In other words, the 15 reference pixels in the filter are the EIP input pixels, and the pixel in the lower right corner of the filter is the EIP output pixel.
[0092] In some embodiments, the current block may also have different sizes, such as any one of 4×4, 4×8, 4×16, 4×32, 8×4, 8×8, 8×16, 8×32, 16×4, 16×8, 16×16, 16×32, 32×4, 32×8, 32×16, and 32×32.
[0093] For each of the aforementioned block sizes, any one of the nine filter combinations can be selected for prediction. Therefore, the combination results between different block sizes and filter combinations can be found in Table 1 below. Table 1 describes multiple results for the current block and filter combinations.
[0094] Table 1
[0095] Table 1 shows the combinations of nine filter types based on different block sizes. Each cell in the table is divided into two smaller cells: the upper cell indicates the region type of the reconstruction area, and the lower cell indicates the shape of the filter. Taking a 4×4 block as an example, there are three filter combinations to choose from when the current block size is 4×4. EIP_AL_A_L represents the left and top reconstruction regions, EIP_AL_L represents the left reconstruction region, and EIP_AL_A represents the top reconstruction region. EIP_FILTER_S represents a square filter (i.e., a filter with equal length and width), EIP_FILTER_V represents a horizontal filter (e.g., an 8×2 type filter), and EIP_FILTER_H represents a vertical filter (e.g., a 2×8 type filter).
[0096] In some embodiments, during the process of confirming the filter combination, firstly, the reconstructed region needs to be loaded and the reference pixel range needs to be determined; secondly, the filter combination selected for the current block is determined according to the list mentioned above.
[0097] In some embodiments, taking the current block as being located in the first image as an example, the reconstruction region corresponding to the current block is determined based on the position of the current block in the first image and the size corresponding to the current block. In some embodiments, FIG7 shows a schematic diagram of the reconstruction region confirmation method provided by the embodiments of this application. Referring to FIG7, two different reconstruction region sizes are currently provided.
[0098] For the first case, please refer to the reconstruction region 610 in Figure 7: If the distance between the upper left corner of the current block and the boundary of the first image is greater than min(block width, block height) + EIP_FILTER_SIZE (where EIP_FILTER_SIZE = 7), that is, the coordinates (x, y) of the upper left corner of the current block satisfy x > min(block width, block height) + 7 and y > min(block width, block height) + 7, then the width of the left reconstruction region and the height of the upper reconstruction region are set to min(block width, block height) + EIP_FILTER_SIZE respectively.
[0099] At this point, the width of the left reconstruction region and the height of the upper reconstruction region are both greater than the block width and block height of the current block, which can provide enough reference pixels for EIP filter calculation.
[0100] For the second case, please refer to the reconstruction region 620 in Figure 7: If the distance between the top left corner of the current block and the boundary of the first image is less than or equal to min(block width, block height) + EIP_FILTER_SIZE (EIP_FILTER_SIZE = 7), that is, the coordinates (x, y) of the top left corner of the current block satisfy x ≤ min(block width, block height) + 7 or y ≤ min(block width, block height) + 7, then the width of the left reconstruction region is set to x, and the height of the upper reconstruction region is set to y.
[0101] At this point, the size of the left and upper reconstructed regions is determined by the actual position of the current block in the image to ensure that only reconstructed adjacent pixels are used and to avoid accessing unreconstructed pixels beyond their boundaries.
[0102] In both of the above cases, EIP_FILTER_SIZE = 7 indicates the minimum boundary distance required to enable EIP mode. When the first case is met, it usually means that the current block is far from the image boundary, and its block width and block height are generally greater than 7. In the second case, the current block may be close to the left or top boundary of the image. In this case, EIP mode can still be used, but the reference area is limited to the actual available adjacent reconstructed pixels.
[0103] In some embodiments, during the process of determining the reference pixel range, the predicted sample is cropped from the first image to the range corresponding to the reference sample. After loading the reconstructed region, all pixels in the reference sample are traversed to determine the maximum and minimum values among all pixels, which are then used to adjust the range values of the predicted pixels. Here, the predicted sample refers to the portion of the first image used for pixel prediction of the current block, and the reference sample refers to the reconstructed region adjacent to the current block.
[0104] Step 302: Confirm the EIP filter coefficients.
[0105] In some embodiments, after determining multiple filter combinations, taking a single filter combination as an example, the filter coefficients corresponding to the filter combination are confirmed and used to predict the pixels in the current block.
[0106] In some embodiments, after determining multiple candidate filter combinations, for any given filter combination, firstly, based on the reconstruction region corresponding to the combination (i.e., the reference sample that is adjacent to the current block and has been reconstructed), the corresponding reference pixels are loaded; then, based on these reference pixels, the filter coefficients dedicated to the filter combination are calculated and determined.
[0107] It should be understood that this filter combination will perform intra-frame prediction on the current block based on the calculated filter coefficients to generate the predicted pixel value corresponding to the current block.
[0108] In this embodiment, the filter coefficients can be confirmed using the following steps 701 to 702:
[0109] Step 701, Derivation of EIP coefficients.
[0110] The EIP coefficients are the filter coefficients in EIP mode, which can be derived from the reconstructed pixels adjacent to the current block.
[0111] Because there is a possibility of reusing prediction parameters from adjacent blocks when executing EIP mode, the decoder needs to decode the flag corresponding to EIP Merge before executing step 701. The EIP Merge flag is used to determine whether EIP Merge mode is used when executing EIP mode for the current block. EIP Merge mode refers to obtaining existing filter combinations from multiple candidate reconstruction regions for prediction of the current block. The number of reconstruction regions in the second list obtained after filtering and reordering the candidate reconstruction regions is less than the number of reconstruction regions in the first list. A decoding result of true indicates that EIP Merge mode is used, and a decoding result of false indicates that EIP Merge mode is not used.
[0112] In some embodiments, when the EIP Merge flag is false after decoding, step 701 is executed. Specifically, the EIP coefficients corresponding to the current block can be derived based on the Convolutional Cross-Component Model (CCCM). The CCCM model uses the correlation between luminance and chrominance to predict chrominance pixels. Before predicting chrominance pixels, it is usually necessary to downsample the luminance corresponding to the reconstructed pixel to match the size of the chrominance block. Then, a convolutional filter is used to calculate the chrominance of the predicted pixel.
[0113] In some embodiments, when the EIP Merge flag is true after decoding, step 702 is performed to select a filter combination from the EIP Merge candidate list for prediction of the current block without re-deriving the EIP coefficients. Step 702 will be described in detail later and will not be repeated here.
[0114] The above process can reduce the computational complexity and signaling overhead of the EIP mode while ensuring prediction accuracy.
[0115] Figure 8 shows a schematic diagram of the reconstruction region provided in the embodiment of this application. As shown in Figure 8, the L-shaped reconstruction region corresponding to the current block is currently displayed. The selected filter is a 4×4 type filter. Therefore, after aligning the filter with the upper left corner of the reconstruction region, the left region of the L-shaped reconstruction region is divided according to the three columns on the left side of the filter, and the upper region of the L-shaped reconstruction region is divided according to the three columns on the top side of the filter, thereby dividing the L-shaped reconstruction region into a first region 810 and a second region 820. The first region 810 can also be called the reference region, and the second region 820 can be called the prediction region.
[0116] At this point, the pixel corresponding to the bottom right corner of the filter is located within the second region 820, while the other 15 pixels in the filter are located within the first region 810. Therefore, the reconstructed pixel values corresponding to the 15 pixels in the first region 810 are used to predict the pixel in the second region 820, obtaining the prediction result for that pixel. That is, the bottom right corner pixel is used as the EIP output pixel, and the reconstructed pixel values corresponding to the other 15 pixels are used as the 15 EIP input pixels. Furthermore, using a one-pixel step size as the sliding reference, the filter is moved within the reconstruction region. During this movement, the CCCM model continuously performs chromaticity prediction on the pixel located in the bottom right corner of the filter, thereby constructing an autocorrelation matrix and a cross-correlation vector.
[0117] Specifically, the autocorrelation matrix is constructed by sliding samples of the reconstructed pixel values within the first region 810 (i.e., the reference region) of the L-shaped reconstruction area shown in Figure 8. When moving a 4×4 type filter within the reconstruction area with a one-pixel step, each time the 15 input pixels (all located in the first region 810, excluding the lower right corner) of the filter are treated as a row vector, multiplied by their own transpose, and accumulated to form a 15×15 autocorrelation matrix, which is used to characterize the statistical correlation within the reference pixels.
[0118] The cross-correlation vector is formed by multiplying and accumulating the target pixel (the chroma pixel to be predicted) in the second region 820 (i.e. the prediction region) corresponding to the lower right corner of the filter with its corresponding 15 input pixels (from the first region 810) during the same sliding process. The result is a cross-correlation vector of length 15, which is used to characterize the cross-correlation between the reference pixel and the target predicted pixel.
[0119] After determining the autocorrelation matrix and cross-correlation vector, the linear relationships between multiple EIP input pixels and EIP output pixels can be calculated based on these matrixes and vectors. The difference between the reconstructed value of the EIP output pixel and the corresponding pixel in the second region is calculated using the Mean Squared Error (MSE) criterion. The EIP output pixel with the minimum MSE is selected. Based on the linear relationships between this EIP output pixel and the 15 EIP output pixels in the filter, the coefficients corresponding to each of the 15 EIP output pixels are obtained.
[0120] Step 702, EIP coefficient inheritance of the EIP filter
[0121] As mentioned earlier, if the EIP Merge flag is true after decoding, it indicates that the current block will use Merge mode when executing EIP mode. At this time, the decoder needs to decode the Merge index to select an existing candidate EIP coefficient from the EIP Merge list based on the decoding result, as the EIP coefficient of the EIP filter.
[0122] The EIP Merge list stores multiple candidate EIP coefficients, each of which is an EIP coefficient used by other reconstructed pixel blocks in historical time periods.
[0123] The Merge index indicates which EIP Merge mode is used during the decoding of the current block. In EIP Merge mode, during the prediction of the current block, the pixel blocks adjacent to the current block are directly used to predict the pixels of the current block to obtain the pixel prediction result of the current block.
[0124] In some embodiments, candidate EIP coefficients are EIP coefficients used when predicting pixels in the reconstruction region adjacent to the current block during historical periods; that is, candidate EIP coefficients inherit EIP coefficients corresponding to other pixels in the reconstruction region.
[0125] In some embodiments, candidate EIP coefficients include at least one of spatial adjacency options, non-adjacency options, temporal candidate options, or historical candidate options. Specifically, spatial adjacency options refer to the EIP coefficients used when predicting pixels adjacent to the current block in the reconstructed region; non-adjacency options refer to the EIP coefficients used when predicting pixels not adjacent to the current block in the reconstructed region; temporal candidate options refer to the EIP coefficients used during intra-frame prediction in the previous frame; and historical candidate options are those EIP coefficients added to the EIP Merge mode as candidates if EIP coefficients were used during intra-frame prediction at a historical time.
[0126] In some embodiments, the EIP Merge mode may include one or more candidates; for example, up to 12 candidates may be included at the same time.
[0127] In some embodiments, when there are 12 candidate options, each candidate option is substituted into the second region corresponding to the above-mentioned reconstruction region to calculate the Sum of Absolute Differences (SAD) cost corresponding to the candidate option. The 12 candidate options are sorted from low to high according to their respective SAD costs, and at least two candidate options with the lowest costs are retained, while the remaining candidate options are filtered out.
[0128] In some embodiments, there may be multiple candidates with the same cost. Based on this, the maximum number of candidates that can be retained can be further limited (e.g., a maximum of 6).
[0129] In some embodiments, the candidate options include at least one of spatially adjacent candidate options, non-adjacent candidate options, temporal candidate options, and historical candidate options; wherein, spatially adjacent candidate options refer to the EIP coefficients used in previous predictions of reconstructed pixel blocks adjacent to the current block, non-adjacent candidate options refer to the EIP coefficients used in previous predictions of reconstructed pixel blocks not adjacent to the current block, temporal candidate options refer to the EIP coefficients used when performing intra-frame predictions of pixel blocks at corresponding positions in the previous frame image, and historical candidate options refer to the EIP coefficients added to the EIP Merge list as candidate options if EIP coefficients were used when performing intra-frame predictions at historical moments.
[0130] In this embodiment of the application, after the filter coefficients are determined, an intra-frame prediction mode list is generated for the filter coefficients, filter shape and reconstruction region, as shown in Table 1 above.
[0131] Step 303: Make a prediction for the current block.
[0132] After obtaining the EIP coefficients corresponding to different EIP modes through the above steps, the current block is predicted by using one or more or all EIP modes through a filter in a diagonal zigzag scanning order from the upper left corner to the lower right corner of the current block, so as to obtain the pixel prediction value corresponding to each pixel in the current block.
[0133] In some embodiments, the filter input differs for different positions within the current block, including the following cases:
[0134] The first method involves using the reconstructed pixel as the input to the filter for the pixel located at the top left corner of the current block. For example, with a 4×4 filter, the bottom right pixel of the filter is aligned with the top left pixel of the current block and used as the EIP output pixel. The other 15 pixels in the filter are within the reconstruction area, and the reconstructed pixel values within the reconstruction area are used as the EIP input pixels.
[0135] The second approach involves using a filter whose input is partly the reconstructed pixel and partly the previously predicted pixel value. For example, with a 4×4 filter, when the filter predicts the pixel at the top edge of the current block, it still predicts the pixel at the bottom right corner of the filter based on 15 pixels. After aligning the pixel in the fourth row of the filter with the pixel in the first row of the current block, the pixel values corresponding to the three pixels in the fourth row (excluding the bottom right corner) are the pixel values predicted during the previous pixel prediction. The pixels corresponding to the other three rows of the filter are within the reconstruction area, so the pixels corresponding to these three rows are the reconstructed pixel values within the reconstruction area.
[0136] The third method involves using previously predicted samples as input to other positions within the current block. For example, with a 4×4 filter, when the filter is completely in the center, the other 15 pixels are used to predict the pixel in the lower right corner of the filter. Since the other 15 pixels are all within the current block, the pixel value corresponding to these 15 pixels is the predicted pixel value obtained from the previous prediction of the pixel at that position.
[0137] In some embodiments, please refer to Figure 9, which shows a schematic diagram of the pixel prediction process provided in the embodiments of this application. As shown in Figure 9, the current block corresponds to a first reconstruction region. After selecting the corresponding EIP mode, the filter corresponding to the EIP mode is used to perform a Z-scan starting from the upper left corner of the current block to predict the pixels in the current block one by one until the pixel in the lower right corner of the current block is predicted for the last time. The prediction process can refer to the following formula 1.
[0138] Formula 1:
[0139] Among them, pred (x,y) It is the predicted pixel value at the current position in the block, c i It is the i-th coefficient of the selected EIP filter, with coefficient indices ranging from 0 to 14, for a total of 15 coefficients. This is the reconstructed or predicted pixel value used for prediction at the current location. offsetX i and offsetY i It refers to the offset relative to the current position.
[0140] Step 304: Map the pixel prediction values to the transform set.
[0141] In some embodiments, during the process of traversing all EIP modes, the current block is predicted based on all EIP modes to obtain prediction results corresponding to each of the various EIP modes.
[0142] In some embodiments, after obtaining the prediction result in EIP mode, three columns of regions are constructed to the left of the current block and three rows of regions are constructed above the current block using the decoder-side Intra Mode Derivation (DIMD) method, forming a reference region for the current block in the current process. This region can also be called the third region. It is worth noting that this region is a different concept from the reference region in the reconstruction region mentioned above.
[0143] In some embodiments, after the reference region is constructed, the horizontal and vertical gradients corresponding to the pixels in the current block are calculated using the reference region. Based on the angle formed between the horizontal and vertical gradients, the number of times different angles are generated is calculated, a gradient histogram is constructed, and the angle with the most occurrences in the gradient histogram is selected as the angle prediction mode corresponding to the EIP mode.
[0144] In some embodiments, after the angle prediction mode is determined, the EIP mode is mapped to the corresponding transform set according to the angle prediction mode. The transform set contains at least one different transform technique for residual processing, specifically including at least one of the following three transform techniques: Low Frequency Non-Transformable (LFNST), Non-Separable Transform (NSPT), or Multiple Selection Transform (MTS).
[0145] LFNST, introduced in the H.266 standard, is a secondary transform technique used to further process low-frequency coefficients after the main transform, thereby improving coding efficiency. LFNST supports two transform sizes: 4x4 and 8x8, each with four transform sets, each containing two different transform kernels. The selection of transform sets is implicitly determined by the encoder's TU size and intra-frame prediction mode. During encoding, LFNST is applied between the main transform and quantization, further reducing residual energy to improve compression efficiency.
[0146] Among them, NSPT is a technique that performs transformation directly in two-dimensional space to process residual signals in a non-separable manner to improve coding efficiency. NSPT does not rely on separation processing in the horizontal and vertical directions. During the transformation process, a two-dimensional transform kernel is directly applied to perform an overall transformation on the residual block.
[0147] MTS is a technique introduced in the related standard VVC (Versatile Video Coding), which allows the selection of different transform kernels in intra-frame and inter-frame residual coding. By selecting the transform kernel that best suits the current residual characteristics, coding efficiency is improved, thereby enhancing video compression performance.
[0148] Step 305, Fast Encoder Algorithm.
[0149] The encoder updates the complete RDO list by calculating and comparing the SATD cost between EIP mode, EIP Merge mode and non-EIP mode; the complete RDO list contains all intra-prediction modes to be evaluated, including several non-EIP modes, EIP modes and EIP Merge modes.
[0150] When an EIP pattern or EIP Merge pattern is added to the current complete RDO list, the encoder will conditionally reduce the pattern with the worst SATD cost in the complete RDO cost. Here, the complete RDO cost refers to the RDO cost value corresponding to each pattern in the list.
[0151] This approach ensures prediction performance while avoiding a significant increase in coding complexity due to the addition of new candidate modes through RDO decision-making and a fast filtering mechanism based on SATD cost. When an EIP mode or EIP Merge mode is added to the current complete RDO list, the encoder conditionally removes the mode with the worst SATD cost from the complete RDO cost. Finally, the intra-prediction mode to be used is determined based on the RDO results, and the index value corresponding to this intra-prediction mode is transmitted during the encoding and decoding process. Table 2 below shows the relevant EIP syntax.
[0152] Table 2
[0153] The semantics of the syntactic elements involved in the EIP pattern and EIP Merge pattern in Table 2 are explained below.
[0154] coding_unit(x0,y0,cbWidth,cbHeight,cqtDepth,treeType,modeType) contains all the relevant parameters for the current block.
[0155] cu_eip_flag[x0][y0] is used to identify whether the current mode is EIP (including EIP mode and EIP Merge mode).
[0156] if(cu_eip_flag[x0][y0]){ indicates that the current block is executed in EIP mode.
[0157] eip_merge_flag[x0][y0] indicates whether to execute EIP Merge mode in the current block if it is determined that EIP mode will be executed in the current block.
[0158] if(eip_merge_flag[x0][y0]){ indicates that the current block is executed in EIP Merge mode.
[0159] eip_merge_idx[x0][y0] represents the index value (idx) corresponding to the EIP Merge transmitted when the current block is in EIP Merge mode.
[0160] eip_mode_idx[x0][y0] represents the index value (idx) corresponding to the EIP mode when the current block does not execute the EIP Merge mode.
[0161] Since the three filters and three types of reconstructed region reference pixel templates in EIP can be combined to form nine filter combinations, EIP will select and use portions of these nine combinations for blocks of different sizes. The encoder and decoder construct the same list to specify the mode idx value. In relevant standards (e.g., ECM version 13.0), this idx is transmitted using truncated binary encoding, and the list order is fixed.
[0162] In this embodiment, for each candidate EIP filter combination, the encoder uses the corresponding filter to generate the predicted value of the current block, and calculates the corresponding cost based on the difference between the predicted value and the reconstructed value of the current block. Since the reconstructed value is fixed, but the predicted values generated by different filters may be different, the cost corresponding to each filter combination is also different. The encoder dynamically adjusts the mode number in the intra-frame prediction mode list according to the cost, so that the mode with a better cost obtains a smaller idx value, thereby reducing the number of bits required for index coding.
[0163] Based on this, the order of the modes in the intra-prediction list in this application embodiment is adjusted so that modes with better prediction performance correspond to smaller index values, thereby reducing the number of bits required for index encoding. Referring to Figure 10, which shows a flowchart of the intra-prediction mode determination method for the encoding stage list provided in this application embodiment, the method in Figure 10 can be applied to an encoder. As shown in Figure 10, the method includes:
[0164] Step 1010: Confirm multiple preset intra-frame prediction modes, each of which corresponds to a candidate reconstruction region.
[0165] In the embodiments of this application, the preset multiple intra-frame prediction modes include, but are not limited to, one or more of EIP (Extrapolation Filter-based Intra Prediction) mode, EIP Merge mode, Angular Intra Mode, Planar Mode, and DC Mode.
[0166] When the intra-frame prediction mode is EIP mode or EIP Merge mode, its specific implementation depends on the type of extrapolation filter and the type of reference pixel template used.
[0167] As mentioned earlier, the EIP pattern is composed of three extrapolation filters (one-dimensional horizontal filter, one-dimensional vertical filter, and two-dimensional anisotropic filter) and three reference pixel templates (left + top L-shaped template, left-side template only, and top-side template only), forming a maximum of nine EIP filter combinations. For the current coded block (CU) of different sizes or shapes, the encoder selects some valid combinations from these nine combinations to construct the initial EIP pattern set.
[0168] Each EIP filter combination corresponds to a unique candidate reconstruction region, which consists of reconstructed neighboring pixels and is used to generate prediction samples for the current block. Therefore, there is a one-to-one correspondence between multiple intra-frame prediction modes and multiple candidate reconstruction regions: each intra-frame prediction mode (especially EIP-type modes) is associated with a specific candidate reconstruction region, and the pixel information of this region will be used for subsequent prediction performance evaluation and mode ranking. At both the encoder and decoder ends, the same initial mode list (i.e., the first list) is pre-constructed based on the same rules (such as block size, available reference pixel positions, etc.), where each mode is arranged in a fixed order and assigned a corresponding index value (idx). This initial list serves as the basic input for subsequent re-ranking operations.
[0169] Step 1020: Based on the pixel information corresponding to the multiple candidate reconstruction regions, the multiple intra-frame prediction modes are reordered to obtain a prediction mode list.
[0170] In some embodiments, if the intra-frame prediction mode is EIP mode or EIP Merge mode, the first list is determined based on the filter shape and the reconstructed region shape, as shown in Table 1 above. In this case, the first list is implemented as the initial list; that is, if there are no subsequent steps, the first list is used as the prediction mode list.
[0171] In the first list, since multiple intra-prediction modes are arranged in a specified order, each intra-prediction mode has a corresponding index value according to its position. After determining the intra-prediction mode to be used, its index value is transmitted to realize the prediction process. For details, please refer to Table 2 above.
[0172] As mentioned above, each intra-frame prediction mode in this application embodiment has a corresponding candidate reconstruction region. In some embodiments, the positions of at least two intra-frame prediction modes in the first list can be adjusted using the pixel information corresponding to different candidate reconstruction regions to generate a prediction mode list; or, multiple intra-frame prediction modes can be sorted using the pixel information corresponding to different candidate reconstruction regions to generate a prediction mode list.
[0173] In some embodiments, when the prediction mode list is obtained by adjusting the first list, the first list and the prediction mode list contain the same intra-prediction modes, but the order of the multiple intra-prediction modes in the prediction mode list is different from that in the first list; or, the intra-prediction modes contained in the first list are different from those contained in the prediction mode list, for example, the number of intra-prediction modes contained in the prediction mode list is less than the number of intra-prediction modes contained in the first list; or, the intra-prediction modes contained in the first list are different from those contained in the prediction mode list, and for the same intra-prediction modes in the first list and the prediction mode list, the order of these intra-prediction modes in the first list is also different from their order in the prediction mode list.
[0174] In some embodiments, a second region is predicted based on the reconstructed pixels in the first region to obtain a first predicted pixel value corresponding to the second region; a first parameter is determined based on the difference between the first predicted pixel value and the first reconstructed pixel value; the arrangement position of the i-th intra-frame prediction mode among multiple intra-frame prediction modes is determined based on the first parameter; and a prediction mode list is generated based on the arrangement positions corresponding to the multiple intra-frame prediction modes.
[0175] In some embodiments, the plurality of intra-frame prediction modes includes an nth intra-frame prediction mode, the nth intra-frame prediction mode corresponds to an nth candidate reconstruction region, the nth candidate reconstruction region includes a first region and a second region, the first region includes a first sub-region, the first sub-region is adjacent to the second region, the first sub-region corresponds to a second reconstructed pixel value, and n is a positive integer; the second region is predicted based on the reconstructed pixels in the first region to obtain a first predicted pixel value corresponding to the second region; a second parameter is obtained based on the difference between the first predicted pixel value and the second reconstructed pixel value; the arrangement position of the nth intra-frame prediction mode among the plurality of intra-frame prediction modes is determined based on the second parameter; a prediction mode list is generated based on the arrangement positions corresponding to the plurality of intra-frame prediction modes respectively.
[0176] In some embodiments, the multiple intra-frame prediction modes include an m-th intra-frame prediction mode, which corresponds to an m-th candidate reconstruction region. The m-th candidate reconstruction region includes a third region, which corresponds to a third reconstructed pixel value, where m is a positive integer. The horizontal and vertical gradients corresponding to the third reconstructed pixel value are identified, and the horizontal and vertical gradients form candidate angles. A gradient histogram corresponding to the third region is generated based on the horizontal and vertical gradients, and the gradient histogram includes the counting results corresponding to multiple candidate angles. A third parameter corresponding to the third reconstructed pixel value is determined based on the gradient histogram. The arrangement position of the m-th intra-frame prediction mode among the multiple intra-frame prediction modes is determined based on the second parameter. A prediction mode list is generated based on the arrangement positions corresponding to the multiple intra-frame prediction modes.
[0177] In some embodiments, the intra-frame prediction mode includes filter shapes; confirming the first priority corresponding to multiple candidate reconstruction regions; sorting the multiple intra-frame prediction modes based on the first priority to obtain a first sorting result; confirming the second priority corresponding to multiple filter shapes; and rearranging the first sorting result based on the second priority to obtain a prediction mode list.
[0178] In some embodiments, the candidate reconstruction region is divided into a first region and a second region according to the filter shape, and a third region is generated based on the current block according to the filter shape. The third region may be the same as or different from the second region. The first and second regions can be referred to in FIG8, and the third region can be referred to in FIG9 as the first reference region.
[0179] In some embodiments, the first region further includes a first sub-region, which is implemented as a region that is adjacent to the second region, that is, the first sub-region is the boundary position in the first region.
[0180] In some embodiments, the second region includes a plurality of prediction units (PUs); the first reconstructed pixel value and the first predicted pixel value include one or more of the following: the first reconstructed pixel value is the reconstructed pixel value corresponding to the first PU among the plurality of PUs, and the first predicted pixel value is the predicted pixel value corresponding to the first PU; the first reconstructed pixel value is the reconstructed pixel value corresponding to at least two PUs among the plurality of PUs, and the first predicted pixel value includes the reconstructed pixel values corresponding to at least two PUs; the first reconstructed pixel value is the average of the reconstructed pixel values corresponding to at least two PUs among the plurality of PUs, and the first predicted pixel value includes the average of the reconstructed pixel values corresponding to at least two PUs; the first reconstructed pixel value is the sum of the pixel values of the reconstructed pixel values corresponding to at least two PUs among the plurality of PUs, and the first predicted pixel value includes the sum of the pixel values of the reconstructed pixel values corresponding to at least two PUs.
[0181] In some embodiments, the first reconstructed pixel value can be the first reconstructed pixel value corresponding to a single pixel in the second region, that is, in this case, the filter only performs one prediction process on the second region; or, the first reconstructed pixel value is the reconstructed pixel value corresponding to multiple pixels in the second region respectively; or, the first reconstructed pixel value is the sum of the pixel values corresponding to the reconstructed pixel values corresponding to multiple pixels in the second region respectively; or, the first reconstructed pixel value is the pixel average of the reconstructed pixel values corresponding to multiple pixels in the second region respectively; or, the first reconstructed pixel value is the weighted average of the reconstructed pixel values corresponding to multiple pixels in the second region respectively, wherein the weights can be adjusted according to the actual situation.
[0182] In some embodiments, the first predicted pixel value can be the first predicted pixel value corresponding to a single pixel in the second region, that is, in this case, the filter only performs a prediction process for the second region once; or, the first predicted pixel value is the predicted pixel value corresponding to multiple pixels in the second region respectively; or, the first predicted pixel value is the sum of the pixel values corresponding to the predicted pixel values corresponding to multiple pixels in the second region respectively; or, the first predicted pixel value is the pixel average of the predicted pixel values corresponding to multiple pixels in the second region respectively; or, the first predicted pixel value is the weighted average of the predicted pixel values corresponding to multiple pixels in the second region respectively, wherein the weights can be adjusted according to the actual situation.
[0183] In some embodiments, the first predicted pixel value and the first reconstructed pixel value are parameters in the same intra-frame prediction mode, that is, the first predicted pixel value and the first reconstructed pixel value correspond to each other.
[0184] In some embodiments, when the pixel information includes a first parameter, the pixel corresponding to the position of the filter in the first region determines the first reconstructed pixel value, and the pixel corresponding to the position of the filter in the second region determines the first pixel prediction value. For example, taking a 4×4 type filter as an example, the filter is used to predict the pixels in the second region based on the first region to obtain the first predicted pixel value corresponding to the pixel in the second region. Since the second region is a pixel in the candidate reconstruction region, the pixel also includes the previously predicted first reconstructed pixel value.
[0185] In some embodiments, the cost corresponding to the intra-frame prediction mode is determined by calculating the difference between the first reconstructed pixel value and the first predicted pixel value.
[0186] In some embodiments, the pixel information includes a first parameter; the first parameter includes one or more of the following: obtained by calculating the difference between the first reconstructed pixel value and the first predicted pixel value using the mean square error (MSE) criterion; obtained by calculating the difference between the first reconstructed pixel value and the first predicted pixel value using the sum of absolute errors (SAD) criterion; obtained by calculating the difference between the first reconstructed pixel value and the first predicted pixel value using the sum of absolute transformed differences (SATD) criterion.
[0187] In some embodiments, the difference between the first reconstructed pixel value and the first predicted pixel value is calculated using the MSE criterion, the SAD criterion, or the SATD criterion.
[0188] Since the cost of the intra-prediction mode has already been calculated using the SAD or SATD criteria, if the calculated cost reaches a pre-set cost threshold, the intra-prediction mode can be directly removed from the first list, thus achieving a coarse screening process for multiple intra-prediction modes.
[0189] In some embodiments, the first reconstructed pixel value is obtained by predicting a second image patch, which includes a second region.
[0190] In some embodiments, the first reconstructed pixel value is a pixel value that was previously calculated for that pixel using other intra-frame prediction modes.
[0191] In some embodiments, when the pixel information includes a second parameter, the filter predicts the second region based on the reconstructed pixels in the first region to obtain the first predicted pixel value corresponding to the second region.
[0192] As mentioned earlier, the nth candidate reconstruction region includes a first region and a second region. The first region includes a first sub-region, which is adjacent to the second region. The first sub-region corresponds to the second reconstructed pixel value. Based on this, since the first sub-region and the second region are directly adjacent in space, the second reconstructed pixel value represents the reconstructed signal on one side of the boundary, while the first predicted pixel value at the junction of the second region and the first sub-region represents the predicted signal on the other side of the boundary. Therefore, by calculating the difference between the first predicted pixel value and the second reconstructed pixel value, the degree of signal jump across the junction boundary can be reflected, thereby determining the boundary continuity between the first region and the second region: the smaller the difference, the better the boundary continuity, and the more applicable the corresponding second parameter.
[0193] In some embodiments, when the pixel information includes a third parameter, taking the third region as an example, the angle prediction mode histogram is calculated using the pixels in the third region based on the DIMD method. The angle corresponding to the pixel is then calculated based on the angle prediction histogram and used as the predicted angle of the third region. When EIP predicts textures with angles, it can be equivalent to extending the texture of the reference region. Since the three filter types of EIP (e.g., 4x4, 2x8, 8x2) have different capabilities for capturing different texture characteristics, the EIP modes can be reordered according to the angle mode of the reference region, so that the EIP filter combination that better matches the predicted angle gets a higher position in the intra-frame prediction mode list.
[0194] In some embodiments, when the pixel information includes a fourth parameter, the L-shaped template has a higher selection probability in the reconstructed region. Therefore, the EIP filter combination is divided into three categories according to the region type of the reconstructed region. First, the reconstructed regions are sorted according to information such as the shape of the current block, and then reordered according to the different filter shapes in the region.
[0195] In some embodiments, the intra-frame prediction mode includes the filter shape corresponding to the filter; the third region is determined by the filter shape.
[0196] In some embodiments, for different parameter types, multiple intra-prediction modes in the first list are reordered in ascending order of parameter results to generate a prediction mode list. The first list is an initially constructed set of intra-prediction modes, which contains multiple intra-prediction modes arranged in a fixed order and assigned index values (idx) sequentially, for example, assigned 0, 1, 2... as index values for each mode starting from the position of arrangement 0. The prediction mode list is obtained by reordering the first list, and the intra-prediction modes contained therein are also assigned index values sequentially starting from 0 according to the new arrangement order.
[0197] Since the index value of each intra-frame prediction mode is determined by its position in the current list, if an intra-frame prediction mode is positioned earlier in the prediction mode list than in the first list, its index value in the prediction mode list is less than its index value in the first list. Since the index value is transmitted using truncated binary encoding, a smaller index value corresponds to a shorter code length, thereby reducing the number of bits required to select the mode.
[0198] In some embodiments, a third intra-prediction mode is included among the plurality of intra-prediction modes. The third intra-prediction mode is located at a first position in a first list and at a second position in a prediction mode list. The first position and the second position are different.
[0199] In some embodiments, the plurality of intra-frame prediction modes further includes a fourth intra-frame prediction mode; the third intra-frame prediction mode corresponds to the second index value at the first position, and the third intra-frame prediction mode corresponds to the third index value at the second position, wherein the number of bits corresponding to the second index value is different from the number of bits corresponding to the third index value.
[0200] Step 1030: Determine the first intra-frame prediction mode from the prediction mode list;
[0201] In some embodiments, after a prediction mode list is generated, the first intra-frame prediction mode to be used is determined from the prediction mode list by calculating RD, and the first index value corresponding to the first intra-frame prediction mode is transmitted to the encoding process.
[0202] Step 1040: Determine the first index value corresponding to the first intra-frame prediction mode based on the prediction mode list. The first intra-frame prediction mode is used to predict the current block to obtain the predicted pixel value corresponding to the current block.
[0203] In some embodiments, based on the pixel information corresponding to multiple candidate reconstruction regions, the EIP Merge modes in the first list are filtered out to obtain a prediction mode list, wherein the number of EIP Merge modes in the prediction mode list is less than the number of EIP Merge modes in the first list.
[0204] In some embodiments, when the pixel information includes a fourth parameter, as can be seen from the above embodiments, after filtering the EIP Merge mode to obtain up to six candidate options, these are then used as the first list corresponding to the EIP Merge mode. The EIP Merge mode is then filtered and sorted a second time according to the above-mentioned methods of calculating cost, calculating boundary continuity, and angle prediction mode to obtain the prediction mode list corresponding to the EIP Merge mode.
[0205] Step 1050: Output the first index value through the bitstream.
[0206] The first index value is used to transmit the bitstream to the decoder for decoding.
[0207] In this embodiment, the order of the modes in the intra-prediction list is adjusted during the decoding stage. Referring to Figure 11, a flowchart illustrating the method for determining the intra-prediction modes in the decoding stage provided by this embodiment is shown. The method in Figure 11 can be applied to a decoder. As shown in Figure 11, the method includes:
[0208] Step 1110: Confirm the first index value through the bitstream.
[0209] Data rate refers to the number of times a communication port changes between high and low voltage levels during data transmission within one second.
[0210] Step 1120: Confirm multiple preset intra-frame prediction modes, each of which corresponds to a candidate reconstruction region.
[0211] In this embodiment, the decoder pre-constructs an initial set of intra-frame prediction modes, i.e., a first list, based on the size and shape of the current block to be decoded (CU) and the available adjacent reconstructed pixel information, following the same rules as the encoder. Each intra-frame prediction mode in this first list corresponds one-to-one with the corresponding candidate reconstruction region, ensuring that the encoder and decoder can synchronously generate the same mode list structure without additional signaling.
[0212] Specifically, multiple intra-frame prediction modes include, but are not limited to, one or more of the following: EIP mode, EIP Merge mode, angle prediction mode, planar mode, and DC mode. When EIP mode or EIP Merge mode is involved, its specific instance is determined by the combination of the shape of the extrapolation filter (e.g., 4×4, 2×8, 8×2 types) and the type of the reference pixel template (e.g., L-shaped template, left-side-only template, top-side-only template), resulting in a maximum of nine EIP filter combinations. For a given current block, the decoder selects a valid subset from these nine combinations as initial candidates for EIP-type modes based on the block size and the availability of reference pixels.
[0213] Each EIP filter combination corresponds to a unique candidate reconstruction region, which consists of the reconstructed pixels above and / or to the left of the current block, and is used to reproduce the prediction process at the decoding end. Therefore, each intra-frame prediction mode (especially EIP-type modes) is associated with a specific candidate reconstruction region, and there is a clear one-to-one mapping relationship between the two.
[0214] In the decoder, the first list is arranged in a predefined fixed order (e.g., sorted by filter type first, then by template type), and an initial index value (idx) is assigned to each mode. This initial list serves as the base input for subsequent reordering operations. It is worth noting that because the encoder and decoder use the same construction rules, the first lists generated by both are completely identical in terms of mode types, number, and initial order, thus ensuring that the selected prediction mode can be correctly reconstructed after receiving the index value.
[0215] Step 1130: Based on the pixel information corresponding to the multiple candidate reconstruction regions, the multiple intra-frame prediction modes are reordered to obtain a prediction mode list.
[0216] It should be noted that in this embodiment, the reordering performed by the decoder to obtain the prediction mode list is done in the same way as the encoder. For details, please refer to the relevant description of step 1020 above, which will not be repeated here.
[0217] Step 1140: Based on the first index value, determine the first intra-frame prediction mode from the prediction mode list;
[0218] In some embodiments, after a prediction mode list is generated, the first intra-frame prediction mode to be used is determined from the prediction mode list by calculating RD, and the first index value corresponding to the first intra-frame prediction mode is transmitted to the encoding process.
[0219] Step 1150: Predict the current block based on the first intra-frame prediction mode to obtain the predicted pixel value corresponding to the current block.
[0220] In some embodiments, based on the pixel information corresponding to multiple candidate reconstruction regions, the EIP Merge modes in the first list are filtered out to obtain a prediction mode list, wherein the number of EIP Merge modes in the prediction mode list is less than the number of EIP Merge modes in the first list.
[0221] In some embodiments, when the pixel information includes a fourth parameter, as can be seen from the above embodiments, after filtering the EIP Merge mode to obtain up to six candidate options, these are then used as the first list corresponding to the EIP Merge mode. The EIP Merge mode is then filtered and sorted a second time according to the above-mentioned methods of calculating cost, calculating boundary continuity, and angle prediction mode to obtain the prediction mode list corresponding to the EIP Merge mode.
[0222] Figure 12 is a schematic diagram of the decoder provided in an embodiment of this application. As shown in Figure 12, the decoder 1200 includes: an indexing unit 1210, a confirmation unit 1220, and a prediction unit 1230. The indexing unit 1210 is configured to: confirm a first index value through the bitstream; confirm a plurality of preset intra-frame prediction modes, wherein the plurality of intra-frame prediction modes correspond one-to-one with a plurality of candidate reconstruction regions; and reorder the plurality of intra-frame prediction modes based on the pixel information corresponding to the plurality of candidate reconstruction regions to obtain a prediction mode list. The confirmation unit 1220 is configured to: determine a first intra-frame prediction mode from the prediction mode list based on the first index value. The prediction unit 1230 is configured to: predict the current block based on the first intra-frame prediction mode to obtain the predicted pixel value corresponding to the current block.
[0223] This application provides a computer-readable storage medium applied to a decoder 1200. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the aforementioned decoding method.
[0224] Based on the composition of the decoder 1200 and the computer-readable storage medium described above, refer to Figure 13, which shows a schematic diagram of the specific hardware structure of the decoder provided in this embodiment. As shown in Figure 13, the decoder 1300 may include: a communication interface 1310, a memory 1320, and a processor 1330; the various components are coupled together through a bus system 1340. It is understood that the bus system 1340 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 1340 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 1340 in Figure 13. The communication interface 1310 is used for receiving and sending signals during the process of sending and receiving information with other external network elements. The memory 1320 is used to store computer programs. The processor 1330 is configured to, when running the computer program, perform the following actions: confirming a first index value through the bitstream; confirming a plurality of preset intra-frame prediction modes, wherein the plurality of intra-frame prediction modes correspond one-to-one with a plurality of candidate reconstruction regions; reordering the plurality of intra-frame prediction modes based on the pixel information corresponding to the plurality of candidate reconstruction regions to obtain a prediction mode list; determining a first intra-frame prediction mode from the prediction mode list based on the first index value; and predicting the current block based on the first intra-frame prediction mode to obtain the predicted pixel value corresponding to the current block.
[0225] It is understood that the memory 1320 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can 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. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1320 of the systems and methods described in this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0226] The processor 1330 can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 1330 or by instructions in software form. The processor 1330 can 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 devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 1320. Processor 1330 reads the information in memory 1320 and completes the steps of the above method in conjunction with its hardware.
[0227] It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (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 in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0228] In some embodiments, the processor 1330 is further configured to execute the decoding method described in the foregoing embodiments when running the computer program.
[0229] This application also provides a decoding chip, which includes a processor and a memory. The processor is used to call and run a computer program from the memory, so that a device equipped with the decoding chip can execute any of the decoding methods described above.
[0230] Figure 14 is a schematic diagram of the encoder structure provided in an embodiment of this application. As shown in Figure 14, the encoder 1400 includes: a sorting unit 1410, a determining unit 1420, and an output unit 1430. The sorting unit 1410 is configured to: confirm a plurality of preset intra-frame prediction modes, wherein the plurality of intra-frame prediction modes correspond one-to-one with a plurality of candidate reconstruction regions; and reorder the plurality of intra-frame prediction modes based on the pixel information corresponding to the plurality of candidate reconstruction regions respectively, to obtain a prediction mode list; the determining unit 1420 is configured to: determine a first intra-frame prediction mode from the prediction mode list; and determine a first index value corresponding to the first intra-frame prediction mode based on the prediction mode list, wherein the first intra-frame prediction mode is used to predict the current block to obtain the predicted pixel value corresponding to the current block; the output unit 1430 is configured to: output the first index value through a bitstream.
[0231] Therefore, some embodiments of this application provide a computer-readable storage medium applied to an encoder 1400, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the encoding method in the foregoing embodiments.
[0232] Based on the composition of the encoder 1400 described above and the computer-readable storage medium, refer to Figure 15, which shows a schematic diagram of the specific hardware structure of the encoder provided in this embodiment. As shown in Figure 15, the encoder 1500 may include: a communication interface 1510, a memory 1520, and a processor 1530; the various components are coupled together through a bus system 1540. It is understood that the bus system 1540 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 1540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 1540 in Figure 15. The communication interface 1510 is used for receiving and sending signals during the process of sending and receiving information with other external network elements. The memory 1520 is used to store computer programs. The processor 1530, when running the computer program, performs the following actions: confirming multiple preset intra-frame prediction modes, each corresponding to a multiple candidate reconstruction regions; reordering the multiple intra-frame prediction modes based on pixel information corresponding to the multiple candidate reconstruction regions to obtain a prediction mode list; determining a first intra-frame prediction mode from the prediction mode list; determining a first index value corresponding to the first intra-frame prediction mode based on the prediction mode list, wherein the first intra-frame prediction mode is used to predict the current block to obtain the predicted pixel value corresponding to the current block; and outputting the first index value through the bitstream.
[0233] It is understood that the memory 1520 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can 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. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1520 of the systems and methods described in this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0234] Processor 1530 can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 1530 or by instructions in software form. Processor 1530 can 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 devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 1520. Processor 1530 reads the information in memory 1520 and completes the steps of the above method in conjunction with its hardware.
[0235] It is understood that the embodiments described in this application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (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 in this application, or combinations thereof. For software implementation, the technology described in this application can be implemented through modules (e.g., procedures, functions, etc.) that perform the functions described in this application. Software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.
[0236] In some embodiments, the processor 1530 is further configured to execute the encoding method described in the foregoing embodiments when running the computer program.
[0237] This application also provides an encoding chip, which includes a processor and a memory. The processor is used to call and run a computer program from the memory, so that a device equipped with the encoding chip can execute any of the decoding methods described above.
[0238] Based on the same inventive concept, embodiments of this application also provide a bitstream, including a bitstream generated according to any of the encoding or decoding methods described above.
[0239] Based on the same inventive concept, embodiments of this application also provide a method for storing a bit stream, comprising: generating a bit stream by performing any of the encoding or decoding methods described above, and storing the bit stream.
[0240] Based on the same inventive concept, embodiments of this application also provide a method for transmitting a bit stream, comprising: generating a bit stream by performing any of the encoding or decoding methods described above, and transmitting the bit stream.
Claims
1. A decoding method applied to a decoder, the method comprising: The first index value is confirmed through the bitstream; Confirm multiple preset intra-frame prediction modes, each of which corresponds one-to-one with multiple candidate reconstruction regions; Based on the pixel information corresponding to the multiple candidate reconstruction regions, the multiple intra-frame prediction modes are reordered to obtain a prediction mode list. Based on the first index value, a first intra-frame prediction mode is determined from the prediction mode list; Based on the first intra-frame prediction mode, the current block is predicted to obtain the predicted pixel value corresponding to the current block.
2. The method according to claim 1, wherein the plurality of intra-frame prediction modes includes an i-th intra-frame prediction mode, the i-th intra-frame prediction mode corresponds to an i-th candidate reconstruction region, the i-th candidate reconstruction region includes a first region and a second region, the second region is provided with a corresponding first reconstruction pixel value, the first reconstruction pixel value is obtained by predicting the second image block, and i is a positive integer; The method involves reordering the multiple intra-frame prediction modes based on the pixel information corresponding to the multiple candidate reconstruction regions to obtain a prediction mode list, including: Based on the reconstructed pixels in the first region, the second region is predicted to obtain the first predicted pixel value corresponding to the second region; Based on the difference between the first predicted pixel value and the first reconstructed pixel value, a first parameter is determined to characterize the prediction accuracy of the i-th intra-frame prediction mode. The position of the i-th intra-frame prediction mode among the plurality of intra-frame prediction modes is determined based on the first parameter; and the prediction mode list is generated based on the respective positions of the plurality of intra-frame prediction modes.
3. The method according to claim 2, wherein the second region includes a plurality of prediction units (PUs); The first reconstructed pixel value and the first predicted pixel value include one or more of the following: The first reconstructed pixel value is the reconstructed pixel value corresponding to the first PU among the plurality of PUs, and the first predicted pixel value is the predicted pixel value corresponding to the first PU; The first reconstructed pixel value is the reconstructed pixel value corresponding to at least two of the plurality of PUs, and the first predicted pixel value includes the reconstructed pixel value corresponding to the at least two PUs. The first reconstructed pixel value is the average of the reconstructed pixel values corresponding to at least two of the plurality of PUs, and the first predicted pixel value includes the average of the reconstructed pixel values corresponding to the at least two PUs. The first reconstructed pixel value is the sum of the pixel values of the reconstructed pixel values corresponding to at least two of the plurality of PUs, and the first predicted pixel value includes the sum of the pixel values of the reconstructed pixel values corresponding to the at least two PUs.
4. The method according to claim 2, wherein the first parameter is obtained by at least one of the following methods: The difference between the first reconstructed pixel value and the first predicted pixel value is calculated based on the mean square error (MSE) criterion. The difference between the first reconstructed pixel value and the first predicted pixel value is calculated based on the absolute error and the SAD criterion. The difference between the first reconstructed pixel value and the first predicted pixel value is calculated based on the SATD (Sum of Absolute Values) criterion.
5. The method according to any one of claims 1 to 4, wherein the plurality of intra-frame prediction modes includes an nth intra-frame prediction mode, the nth intra-frame prediction mode corresponds to an nth candidate reconstruction region, the nth candidate reconstruction region includes a first region and a second region, the first region includes a first sub-region, the first sub-region is connected to the second region, the first sub-region has a corresponding second reconstructed pixel value, and n is a positive integer; The method involves reordering the multiple intra-frame prediction modes based on the pixel information corresponding to the multiple candidate reconstruction regions to obtain a prediction mode list, including: Based on the reconstructed pixels in the first region, the second region is predicted to obtain the first predicted pixel value corresponding to the second region; Based on the difference between the first predicted pixel value and the second reconstructed pixel value, a second parameter is determined to characterize the pixel continuity of the nth intra-frame prediction mode at the boundary between the first sub-region and the second region. The position of the nth intra-frame prediction mode among the plurality of intra-frame prediction modes is determined based on the second parameter; and the prediction mode list is generated based on the respective positions of the plurality of intra-frame prediction modes.
6. The method according to any one of claims 1 to 4, wherein the plurality of intra-frame prediction modes includes an m-th intra-frame prediction mode, the m-th intra-frame prediction mode corresponds to an m-th candidate reconstruction region, the m-th candidate reconstruction region includes a third region, the third region has a corresponding third reconstructed pixel value, and m is a positive integer; The method involves reordering the multiple intra-frame prediction modes based on the pixel information corresponding to the multiple candidate reconstruction regions to obtain a prediction mode list, including: Confirm the horizontal and vertical gradients corresponding to the third reconstructed pixel value, where the horizontal and vertical gradients form a candidate angle. A gradient histogram corresponding to the third region is generated based on the horizontal and vertical gradients. The gradient histogram includes the counting results corresponding to multiple candidate angles. Based on the counting results corresponding to the multiple candidate angles, the third parameter corresponding to the third reconstructed pixel value is determined; The m-th intra-frame prediction mode is positioned among the multiple intra-frame prediction modes based on the third parameter. The prediction mode list is generated based on the arrangement positions corresponding to the multiple intra-frame prediction modes.
7. The method according to any one of claims 1 to 4, wherein the intra-frame prediction mode includes a filter shape; The method involves reordering the multiple intra-frame prediction modes based on the pixel information corresponding to the multiple candidate reconstruction regions to obtain a prediction mode list, including: Confirm the first priority corresponding to each of the multiple candidate reconstruction regions; The multiple intra-frame prediction modes are sorted based on the first priority to obtain a first sorting result; Identify the second priority corresponding to each of the various filter shapes; The first sorting result is rearranged based on the second priority to obtain the prediction mode list.
8. The method according to any one of claims 1 to 4, wherein the intra-frame prediction mode comprises: At least one of the following: intra-frame prediction EIP mode, EIP Merge mode, angle prediction mode, plane mode, and DC mode based on extrapolation filter.
9. The method of claim 8, wherein the first list includes a plurality of EIP Merge patterns; The method further includes: Based on the pixel information corresponding to the multiple candidate reconstruction regions, the EIP Merge modes in the first list are filtered out to obtain the prediction mode list, wherein the number of EIP Merge modes in the prediction mode list is less than the number of EIP Merge modes in the first list.
10. An encoding method applied to an encoder, comprising: Confirm multiple preset intra-frame prediction modes, each of which corresponds one-to-one with multiple candidate reconstruction regions; Based on the pixel information corresponding to the multiple candidate reconstruction regions, the multiple intra-frame prediction modes are reordered to obtain a prediction mode list. Determine the first intra-frame prediction mode from the list of prediction modes; Based on the prediction mode list, a first index value corresponding to the first intra-frame prediction mode is determined. The first intra-frame prediction mode is used to predict the current block and obtain the predicted pixel value corresponding to the current block. The first index value is output through the bitstream.
11. The method according to claim 10, wherein the plurality of intra-frame prediction modes includes an i-th intra-frame prediction mode, the i-th intra-frame prediction mode corresponds to an i-th candidate reconstruction region, the i-th candidate reconstruction region includes a first region and a second region, the second region is provided with a corresponding first reconstruction pixel value, the first reconstruction pixel value is obtained by predicting the second image block, and i is a positive integer; The method involves reordering the multiple intra-frame prediction modes based on the pixel information corresponding to the multiple candidate reconstruction regions to obtain a prediction mode list, including: Based on the reconstructed pixels in the first region, the second region is predicted to obtain the first predicted pixel value corresponding to the second region; Based on the difference between the first predicted pixel value and the first reconstructed pixel value, a first parameter is determined to characterize the prediction accuracy of the i-th intra-frame prediction mode. The position of the i-th intra-frame prediction mode among the plurality of intra-frame prediction modes is determined based on the first parameter; and the prediction mode list is generated based on the respective positions of the plurality of intra-frame prediction modes.
12. The method according to claim 11, wherein the second region includes a plurality of prediction units PU; The first reconstructed pixel value and the first predicted pixel value include one or more of the following: The first reconstructed pixel value is the reconstructed pixel value corresponding to the first PU among the plurality of PUs, and the first predicted pixel value is the predicted pixel value corresponding to the first PU; The first reconstructed pixel value is the reconstructed pixel value corresponding to at least two of the plurality of PUs, and the first predicted pixel value includes the reconstructed pixel value corresponding to the at least two PUs. The first reconstructed pixel value is the average of the reconstructed pixel values corresponding to at least two of the plurality of PUs, and the first predicted pixel value includes the average of the reconstructed pixel values corresponding to the at least two PUs. The first reconstructed pixel value is the sum of the pixel values of the reconstructed pixel values corresponding to at least two of the plurality of PUs, and the first predicted pixel value includes the sum of the pixel values of the reconstructed pixel values corresponding to the at least two PUs.
13. The method of claim 11, wherein the first parameter is obtained by at least one of the following methods: The difference between the first reconstructed pixel value and the first predicted pixel value is calculated based on the mean square error (MSE) criterion. The difference between the first reconstructed pixel value and the first predicted pixel value is calculated based on the absolute error and the SAD criterion. The difference between the first reconstructed pixel value and the first predicted pixel value is calculated based on the SATD (Sum of Absolute Values) criterion.
14. The method according to any one of claims 10 to 13, wherein the plurality of intra-frame prediction modes includes an nth intra-frame prediction mode, the nth intra-frame prediction mode corresponds to an nth candidate reconstruction region, the nth candidate reconstruction region includes a first region and a second region, the first region includes a first sub-region, the first sub-region is connected to the second region, the first sub-region has a corresponding second reconstructed pixel value, and n is a positive integer; The method involves reordering the multiple intra-frame prediction modes based on the pixel information corresponding to the multiple candidate reconstruction regions to obtain a prediction mode list, including: Based on the reconstructed pixels in the first region, the second region is predicted to obtain the first predicted pixel value corresponding to the second region. Based on the difference between the first predicted pixel value and the second reconstructed pixel value, a second parameter is determined to characterize the pixel continuity of the nth intra-frame prediction mode at the boundary between the first sub-region and the second region. The position of the nth intra-frame prediction mode among the plurality of intra-frame prediction modes is determined based on the second parameter; and the prediction mode list is generated based on the respective positions of the plurality of intra-frame prediction modes.
15. The method according to any one of claims 10 to 13, wherein the plurality of intra-frame prediction modes includes an m-th intra-frame prediction mode, the m-th intra-frame prediction mode corresponds to an m-th candidate reconstruction region, the m-th candidate reconstruction region includes a third region, the third region corresponds to a third reconstructed pixel value, and m is a positive integer; The method involves reordering the multiple intra-frame prediction modes based on the pixel information corresponding to the multiple candidate reconstruction regions to obtain a prediction mode list, including: Confirm the horizontal and vertical gradients corresponding to the third reconstructed pixel value, where the horizontal and vertical gradients form a candidate angle. A gradient histogram corresponding to the third region is generated based on the horizontal and vertical gradients. The gradient histogram includes the counting results corresponding to multiple candidate angles. Based on the counting results corresponding to the multiple candidate angles, the third parameter corresponding to the third reconstructed pixel value is determined; The m-th intra-frame prediction mode is determined in the order of the multiple intra-frame prediction modes based on the second parameter; and the prediction mode list is generated based on the order of the multiple intra-frame prediction modes respectively.
16. The method according to any one of claims 10 to 13, wherein the intra-frame prediction mode includes a filter shape; The method involves reordering the multiple intra-frame prediction modes based on the pixel information corresponding to the multiple candidate reconstruction regions to obtain a prediction mode list, including: Confirm the first priority corresponding to each of the multiple candidate reconstruction regions; The multiple intra-frame prediction modes are sorted based on the first priority to obtain a first sorting result; Identify the second priority corresponding to each of the various filter shapes; The first sorting result is rearranged based on the second priority to obtain the prediction mode list.
17. The method according to any one of claims 10 to 13, wherein the intra-frame prediction mode comprises: At least one of the following: intra-frame prediction EIP mode, EIP Merge mode, angle prediction mode, plane mode, and DC mode based on extrapolation filter.
18. The method of claim 17, wherein the first list includes a plurality of EIP Merge patterns; The method further includes: Based on the pixel information corresponding to the multiple candidate reconstruction regions, the EIP Merge modes in the first list are filtered out to obtain the prediction mode list, wherein the number of EIP Merge modes in the prediction mode list is less than the number of EIP Merge modes in the first list.
19. A decoding chip, comprising: A processor and a memory, the processor being configured to invoke a program or instructions from the memory to cause the method as described in any one of claims 1-9 to be executed.
20. A decoder, comprising: Memory, used to store computer programs; A processor, configured to perform the method as described in any one of claims 1-9 when running the computer program.
21. An encoder, comprising: Memory, used to store computer programs; A processor, configured to perform the method as described in any one of claims 10-18 when running the computer program.
22. A computer-readable storage medium having stored thereon a computer program / instructions and a bit stream, wherein the computer program / instructions, when executed by a processor, are capable of generating the bit stream according to any one of claims 10-18.
23. A bit stream comprising a bit stream generated according to any one of claims 10-18.
24. A method for storing a bit stream, comprising: The method described in any one of claims 10-18 is used to generate a bit stream and to store the bit stream.
25. A method for transmitting a bit stream, comprising: The method described in any one of claims 10-18 is used to generate a bit stream and to transmit the bit stream.