ENCRYPTION METHODS, DECODATION METHODS, AND COMPUTER-READABLE RECORDS

VN126264APending Publication Date: 2026-06-15GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
VN · VN
Patent Type
Applications
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2023-09-20
Publication Date
2026-06-15

AI Technical Summary

Technical Problem

The existing intra prediction method based on interpolation filtering consumes a lot of encoding time, resulting in low efficiency.

Method used

By pre-establishing the correspondence between the shape and/or size of the current block and the combinations that are allowed to be used, the number of combinations allowed to be used by the current block is limited, thereby reducing encoding time.

Benefits of technology

It effectively saves encoding time, while maintains encoding and decoding performance, reducing the encoding time complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure VN1202603132_0
    Figure VN1202603132_0
Patent Text Reader

Abstract

The invention relates to a method of encoding, a method of decoding, and a recording medium that is readable by a computer.The decoding method includes the following steps: analyzing the code flow to identify the first identifier and index information corresponding to the current block; the first identifier is used to indicate that the forecasting mode of the current block is an in-structure forecasting mode based on extrapolation filtering; based on the index information, determine the target combination from the combinations allowed to be used by the current block; the combinations allowed to be used by the current block include at least one combination, each combination corresponding to a recombinant region belonging to a type and shape of extrapolation filter; the recombinant region is used to achieve the extrapolation filter coefficient; and the combinations allowed to be used by the current block correspond to the shape and / or size of the current block; based on the target combination, determine the extrapolation filter coefficient; and, based on the extrapolation filter coefficient, perform an in-structure forecast based on extrapolation filtering on the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Coding and decoding method, codec and storage medium Technical Field

[0001] The present application relates to the technical field of video coding and decoding, and in particular to a coding and decoding method, a codec, and a storage medium. Background Art

[0002] Intra-frame prediction based on interpolation filtering can improve encoding and decoding performance and is therefore widely used. However, the currently used intra-frame prediction based on interpolation filtering consumes a lot of encoding time.

[0003] Summary of the Invention

[0004] The embodiments of the present application provide a coding and decoding method, a codec, and a storage medium to save coding time.

[0005] In a first aspect, a decoding method is provided, which is applied to a decoder, the method comprising: parsing a bitstream to determine first identification information and index information corresponding to a current block, the first identification information being used to indicate that a prediction mode of the current block is an intra-frame prediction mode based on interpolation filtering; determining a target combination from combinations allowed for use by the current block according to the index information, the combinations allowed for use by the current block comprising at least one combination, wherein each combination corresponds to a type of reconstruction area and an interpolation filter shape, the reconstruction area being used to obtain interpolation filter coefficients, the combinations allowed for use by the current block corresponding to a shape and / or size of the current block; determining an interpolation filter coefficient according to the target combination; and performing intra-frame prediction based on interpolation filtering on the current block according to the interpolation filter coefficients.

[0006] In a second aspect, a coding method is provided, which is applied to an encoder, and the method includes: determining a combination allowed to be used for the current block based on the shape and / or size of the current block, the combinations allowed to be used for the current block including at least one combination, wherein each combination corresponds to a type of reconstruction area and an interpolation filter shape, and the reconstruction area is used to obtain an interpolation filter coefficient; determining an interpolation filter coefficient based on the combination allowed to be used for the current block; and performing intra-frame prediction based on interpolation filtering on the current block based on the interpolation filter coefficient.

[0007] According to a third aspect, a decoder is provided, comprising: a decoding unit configured to parse a code stream and determine first identification information and index information corresponding to a current block, wherein the first identification information is used to indicate that the prediction mode of the current block is an intra-frame prediction mode based on interpolation filtering; a first determination unit configured to determine a target combination from combinations allowed for use by the current block according to the index information, wherein the combinations allowed for use by the current block include at least one combination, wherein each combination corresponds to a type of reconstruction area and an interpolation filter shape, and the reconstruction area is used to obtain an interpolation filter coefficient, and the combination allowed for use by the current block corresponds to the shape and / or size of the current block; a second determination unit configured to determine the interpolation filter coefficient according to the target combination; and a prediction unit configured to perform intra-frame prediction based on interpolation filtering on the current block according to the interpolation filter coefficient.

[0008] According to a fourth aspect, a decoder is provided, comprising: a memory for storing a computer program; and a processor for executing the method according to the first aspect when running the computer program.

[0009] In a fifth aspect, an encoder is provided, comprising: a first determination unit, configured to determine, based on a shape and / or size of the current block, a combination allowed for use of the current block, the combinations allowed for use of the current block including at least one combination, wherein each combination corresponds to a type of reconstruction area and an interpolation filter shape, and the reconstruction area is used to obtain an interpolation filter coefficient; a second determination unit, configured to determine, based on the combination allowed for use of the current block, an interpolation filter coefficient; and a prediction unit, configured to perform intra-frame prediction based on interpolation filtering on the current block according to the interpolation filter coefficient.

[0010] In a sixth aspect, 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.

[0011] In a seventh aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the method as described in the first aspect or the second aspect is implemented.

[0012] In an eighth aspect, a computer program product is provided, comprising a computer program, which implements the method described in the first aspect or the second aspect when executed.

[0013] The embodiment of the present application pre-establishes a correspondence between the shape and / or size of the current block and the combinations allowed to be used for the current block (combinations of the interpolation filter shape and the reconstruction area), and determines the combinations allowed to be used for the current block based on the shape and / or size of the current block during the actual encoding and decoding process. This helps to constrain the number of combinations allowed to be used for the current block, thereby saving encoding time. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] FIG1 is a structural diagram illustrating an example of a video encoder to which an embodiment of the present application may be applied.

[0015] FIG2 is a diagram showing an example structure of a video decoder to which an embodiment of the present application can be applied.

[0016] FIG3 is a diagram showing an example of the shape of an interpolation filter.

[0017] FIG. 4A is a diagram illustrating an example of a combination of an interpolation filter shape and a reconstruction area.

[0018] FIG. 4B is another exemplary diagram of a combination of an interpolation filter shape and a reconstruction area.

[0019] FIG. 4C is another exemplary diagram showing a combination of an interpolation filter shape and a reconstruction area.

[0020] FIG. 5A is an example diagram of an intra-frame prediction method based on interpolation filtering.

[0021] FIG. 5B is a diagram illustrating an example of an intra prediction mode.

[0022] FIG. 6A is a diagram illustrating an example of a method for calculating a gradient value of a prediction block.

[0023] FIG6B is an example diagram of a gradient histogram of a prediction block.

[0024] FIG. 7 is a diagram illustrating an example of an interpolation filter with nonlinear terms.

[0025] FIG. 8 is another example diagram of an interpolation filter with nonlinear terms.

[0026] FIG. 9 is another example diagram of an interpolation filter with nonlinear terms.

[0027] FIG10 is an example diagram of a reconstruction area corresponding to a narrow rectangular block.

[0028] FIG11 is an example diagram of the shape of the interpolation filter provided in an embodiment of the present application.

[0029] FIG12 is an example diagram of the reconstruction area type provided in an embodiment of the present application.

[0030] FIG13A is an example diagram of a combination of an interpolation filter shape and a reconstruction region type provided in one embodiment of the present application.

[0031] FIG13B is an example diagram of a combination of interpolation filter shape and reconstruction region type provided in another embodiment of the present application.

[0032] FIG13C is an example diagram of a combination of interpolation filter shape and reconstruction region type provided in yet another embodiment of the present application.

[0033] FIG14 is a flow chart of the decoding method provided in an embodiment of the present application.

[0034] FIG15 is an example diagram of a prediction method provided in an embodiment of the present application.

[0035] FIG16 is a flow chart of the encoding method provided in an embodiment of the present application.

[0036] FIG17 is a schematic diagram of the structure of a decoder provided in one embodiment of the present application.

[0037] FIG18 is a schematic structural diagram of a decoder provided in another embodiment of the present application.

[0038] FIG19 is a schematic diagram of the structure of an encoder provided in one embodiment of the present application.

[0039] FIG20 is a schematic diagram of the structure of an encoder provided in another embodiment of the present application. DETAILED DESCRIPTION

[0040] FIG1 is a schematic block diagram of a video encoder according to an embodiment of the present application.

[0041] It should be understood that the video encoder 100 can be used to perform lossy compression or lossless compression on an image. The lossless compression can be visually lossless compression or mathematically lossless compression.

[0042] The video encoder 100 can be applied to image data in a luminance and chrominance (YCbCr, YUV) format. For example, the YUV ratio can be 4:2:0, 4:2:2, or 4:4:4, where Y represents brightness (Luma), Cb (U) represents blue chrominance, Cr (V) represents red chrominance, and U and V represent chrominance (Chroma) for describing color and saturation. For example, in terms of color format, 4:2:0 means that every 4 pixels have 4 luminance components and 2 chrominance components (YYYYCbCr), 4:2:2 means that every 4 pixels have 4 luminance components and 4 chrominance components (YYYYCbCrCbCr), and 4:4:4 represents full pixel display (YYYYCbCrCbCrCbCrCbCr).

[0043] For example, the video encoder 100 reads video data, and for each image in the video data, divides the image into a number of coding tree units (CTUs). In some examples, CTUs may be referred to as "tree blocks", "largest coding units" (LCUs) or "coding tree blocks" (CTBs). Each CTU may be associated with a pixel block of equal size within the image. Each pixel may correspond to a luminance (luminance or luma) sample and two chrominance (chroma) samples. Therefore, each CTU may be associated with a luminance sample block and two chroma sample blocks. The size of a CTU is, for example, 128×128, 64×64, 32×32, etc. A CTU may be further divided into a number of coding units (CUs) for encoding. A CU may be a rectangular block or a square block. A CU can be further divided into prediction units (PUs) and transform units (TUs), allowing for separation of coding, prediction, and transform, and greater flexibility in processing. In one example, a CTU is divided into CUs using a quadtree, and a CU is divided into TUs and PUs using a quadtree.

[0044] The video encoder and video decoder can support various PU sizes. Assuming that the size of a particular CU is 2N×2N, the video encoder and video decoder can support PU sizes of 2N×2N or N×N for intra-frame prediction, and support symmetric PUs of 2N×2N, 2N×N, N×2N, N×N, or similar sizes for inter-frame prediction. The video encoder and video decoder can also support asymmetric PUs of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter-frame prediction.

[0045] In some embodiments, as shown in FIG1 , the video encoder 100 may include a prediction unit 110, a residual unit 120, a transform / quantization unit 130, an inverse transform / quantization unit 140, a reconstruction unit 150, a loop filter unit 160, a decoded image buffer 170, and an entropy coding unit 180. It should be noted that the video encoder 100 may include more, fewer, or different functional components.

[0046] Optionally, in this application, the current block may be referred to as the current coding unit (CU) or the current prediction unit (PU), etc. The prediction block may also be referred to as a predicted image block or an image prediction block, and the reconstructed image block may also be referred to as a reconstructed block or an image reconstruction block.

[0047] In some embodiments, the prediction unit 110 includes an inter-frame prediction unit 111 and an intra-frame prediction unit 112. Because there is a strong correlation between adjacent pixels in a video image, intra-frame prediction is used in video coding and decoding technologies to eliminate spatial redundancy between adjacent pixels. Because there is a strong similarity between adjacent images in a video, inter-frame prediction is used in video coding and decoding technologies to eliminate temporal redundancy between adjacent images, thereby improving coding efficiency.

[0048] The inter-frame prediction unit 111 can be used for inter-frame prediction. Inter-frame prediction can include motion estimation and motion compensation. It can refer to image information from different images. Inter-frame prediction uses motion information to find a reference block from the reference image and generate a prediction block based on the reference block to eliminate temporal redundancy. Inter-frame prediction uses motion information to find a reference block from the reference image and generate a prediction block based on the reference block. Motion information includes the reference image list in which the reference image is located, the reference image index, and the motion vector. The motion vector can be integer pixel or fractional pixel. If the motion vector is fractional pixel, interpolation filtering is required to generate the required fractional pixel block in the reference image. Here, the integer pixel or fractional pixel block in the reference image found based on the motion vector is called a reference block. Some technologies directly use the reference block as the prediction block, while others further process the reference block to generate a prediction block. Reprocessing the reference block to generate a prediction block can also be understood as using the reference block as the prediction block and then processing the prediction block to generate a new prediction block.

[0049] The intra-frame prediction unit 112 only refers to information of the same image to predict pixel information within the current code image block to eliminate spatial redundancy.

[0050] Intra-frame prediction has multiple prediction modes. For example, the H-series international digital video coding standard H.264 / AVC has eight angular prediction modes and one non-angular prediction mode. H.265 / HEVC expands this to 33 angular prediction modes and two non-angular prediction modes. HEVC uses planar, DC, and 33 angular modes for a total of 35 intra-frame prediction modes. VVC uses planar, DC, and 65 angular modes for a total of 67 intra-frame prediction modes.

[0051] It should be noted that with the increase of angle modes, intra-frame prediction will be more accurate and more in line with the needs of high-definition and ultra-high-definition digital video development.

[0052] Residual unit 120 may generate a residual block for a CU based on the pixel blocks of the CU and the prediction blocks of the PUs of the CU. For example, residual unit 120 may generate a residual block for the CU such that each sample in the residual block has a value equal to the difference between the sample in the pixel blocks of the CU and the corresponding sample in the prediction blocks of the PUs of the CU.

[0053] The transform / quantization unit 130 may quantize the transform coefficients. The transform / quantization unit 130 may quantize the transform coefficients associated with the TUs of the CU based on a quantization parameter (QP) value associated with the CU. The video encoder 100 may adjust the degree of quantization applied to the transform coefficients associated with the CU by adjusting the QP value associated with the CU.

[0054] The inverse transform / quantization unit 140 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficients to reconstruct a residual block from the quantized transform coefficients.

[0055] Reconstruction unit 150 may add samples of the reconstructed residual block to corresponding samples of one or more prediction blocks generated by prediction unit 110 to generate a reconstructed image block associated with the TU. By reconstructing the sample blocks of each TU of a CU in this manner, video encoder 100 can reconstruct the pixel blocks of the CU.

[0056] The loop filter unit 160 is used to process the inverse transformed and inverse quantized pixels to compensate for distortion information and provide a better reference for subsequent coded pixels. For example, it can perform a deblocking filtering operation to reduce the blocking effect of pixel blocks associated with the CU.

[0057] In some embodiments, the loop filtering unit 160 includes a deblocking filtering unit and a sample adaptive offset / adaptive loop filtering (SAO / ALF) unit, wherein the deblocking filtering unit is used to remove blocking effects, and the SAO / ALF unit is used to remove ringing effects.

[0058] The decoded image buffer 170 may store the reconstructed pixel blocks. The inter-prediction unit 111 may use a reference image containing the reconstructed pixel blocks to perform inter-prediction on PUs of other images. In addition, the intra-prediction unit 112 may use the reconstructed pixel blocks in the decoded image buffer 170 to perform intra-prediction on other PUs in the same image as the CU.

[0059] The entropy encoding unit 180 may receive the quantized transform coefficients from the transform / quantization unit 130. The entropy encoding unit 180 may perform one or more entropy encoding operations on the quantized transform coefficients to generate entropy-encoded data.

[0060] FIG2 is a schematic block diagram of a video decoder according to an embodiment of the present application.

[0061] 2 , video decoder 200 includes an entropy decoding unit 210, a prediction unit 220, an inverse quantization / transformation unit 230, a reconstruction unit 240, a loop filter unit 250, and a decoded picture buffer 260. It should be noted that video decoder 200 may include more, fewer, or different functional components.

[0062] Video decoder 200 may receive a bitstream. Entropy decoding unit 210 may parse the bitstream to extract syntax elements from the bitstream. As part of parsing the bitstream, entropy decoding unit 210 may parse the entropy-encoded syntax elements in the bitstream. Prediction unit 220, inverse quantization / transform unit 230, reconstruction unit 240, and loop filter unit 250 may decode video data based on the syntax elements extracted from the bitstream, thereby generating decoded video data.

[0063] In some embodiments, the prediction unit 220 includes an intra-frame prediction unit 222 and an inter-frame prediction unit 221 .

[0064] The intra-frame prediction unit 222 may perform intra-frame prediction to generate a prediction block for the PU. The intra-frame prediction unit 222 may use an intra-frame prediction mode to generate a prediction block for the PU based on the pixel blocks of spatially neighboring PUs. The intra-frame prediction unit 222 may also determine the intra-frame prediction mode of the PU based on one or more syntax elements parsed from the codestream.

[0065] The inter-frame prediction unit 221 may construct a first reference picture list (List 0) and a second reference picture list (List 1) based on syntax elements parsed from the codestream. In addition, if a PU is encoded using inter-frame prediction, the entropy decoding unit 210 may parse the motion information of the PU. The inter-frame prediction unit 221 may determine one or more reference blocks of the PU based on the motion information of the PU. The inter-frame prediction unit 221 may generate a prediction block for the PU based on the one or more reference blocks of the PU.

[0066] The inverse quantization / transform unit 230 may inversely quantize (ie, dequantize) the transform coefficients associated with the TU. The inverse quantization / transform unit 230 may use the QP value associated with the CU of the TU to determine the degree of quantization.

[0067] After inverse quantizing the transform coefficients, the inverse quantization / transform unit 230 may apply one or more inverse transforms to the inverse quantized transform coefficients in order to generate a residual block associated with the TU.

[0068] Reconstruction unit 240 uses the residual block associated with the TU of the CU and the prediction block of the PU of the CU to reconstruct the pixel block of the CU. For example, reconstruction unit 240 can add samples of the residual block to corresponding samples of the prediction block to reconstruct the pixel block of the CU to obtain a reconstructed image block.

[0069] The loop filtering unit 250 may perform a deblocking filtering operation to reduce blocking artifacts of pixel blocks associated with a CU.

[0070] 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.

[0071] The basic process of video encoding and decoding is as follows: At the encoder end, an image is divided into blocks. For the current block, the prediction unit 110 uses intra-frame prediction or inter-frame prediction to generate a prediction block for the current block. The residual unit 120 calculates a residual block based on the predicted block and the original block of the current block. This residual block is the difference between the predicted block and the original block of the current block. This residual block can also be referred to as residual information. This residual block undergoes transformation and quantization by the transform / quantization unit 130, removing information that is insensitive to the human eye and eliminating visual redundancy. Optionally, the residual block before transformation and quantization by the transform / quantization unit 130 can be referred to as a time-domain residual block, and the time-domain residual block after transformation and quantization by the transform / quantization unit 130 can be referred to as a frequency residual block or a frequency-domain residual block. The entropy coding unit 180 receives the quantized change coefficients output by the transform and quantization unit 130, performs entropy coding on these quantized change coefficients, and outputs a bitstream. For example, the entropy coding unit 180 can eliminate character redundancy based on the target context model and probability information of the binary bitstream.

[0072] At the decoding end, the entropy decoding unit 210 can parse the code stream to obtain the prediction information, quantization coefficient matrix, etc. of the current block. The prediction unit 220 uses intra-frame prediction or inter-frame prediction on the current block based on the prediction information to generate a prediction block for the current block. The inverse quantization / transformation unit 230 uses the quantization coefficient matrix obtained from the code stream to inverse quantize and inverse transform the quantization coefficient matrix to obtain a residual block. The reconstruction unit 240 adds the prediction block and the residual block to obtain a reconstructed block. The reconstructed blocks constitute a reconstructed image, and the loop filtering unit 250 performs loop filtering on the reconstructed image based on the image or block to obtain a decoded image. The encoding end also requires similar operations as the decoding end to obtain a decoded image. The decoded image can also be called a reconstructed image, and the reconstructed image can be used as a reference image for inter-frame prediction of subsequent images.

[0073] It should be noted that the block division information determined by the encoder, as well as mode information or parameter information such as prediction, transform, quantization, entropy coding, and loop filtering, etc., are carried in the bitstream when necessary. The decoder parses the bitstream and analyzes the existing information to determine the same block division information, prediction, transform, quantization, entropy coding, loop filtering, etc. mode information or parameter information as the encoder, thereby ensuring that the decoded image obtained by the encoder and the decoder are identical.

[0074] The above is the basic process of the video codec under the block-based hybrid coding framework. With the development of technology, some modules or steps of the framework or process may be optimized. This application is applicable to the basic process of the video codec under the block-based hybrid coding framework, but is not limited to the framework and process.

[0075] The preceding text describes in detail the codec framework provided by the embodiments of the present application. This application relates to an intra-frame prediction mode based on interpolation filtering, which can be applied to the intra-frame prediction unit in the codec mentioned above. The following describes the intra-frame prediction mode based on interpolation filtering in detail.

[0076] Intra-frame prediction based on interpolation filtering is also called interpolation intra-frame prediction, interpolation filter prediction, or extrapolation intra prediction (EIP). Intra-frame prediction based on interpolation filtering can obtain interpolation filter coefficients (or interpolation filter coefficients) by reconstructing the area around the current block to be predicted (the area where the reconstructed pixel values ​​are located), and then perform intra-frame prediction on the current block based on the interpolation filter coefficients.

[0077] Intra-frame prediction techniques based on interpolation filtering may include one or more of the following features:

[0078] First: the number of taps of the interpolation filter should generally be greater than or equal to 2; the interpolation filter can have a variety of shapes, and the selected interpolation filter shape can be controlled using syntax elements;

[0079] Second: the reconstruction area used to obtain the interpolation filter coefficients should be one or several areas around the current block, and the area used to obtain the interpolation filter coefficients can be selected using syntax elements.

[0080] The following is an example of the implementation process of the intra-frame prediction technology based on interpolation filtering.

[0081] First, define the interpolation filter shape and the type of reconstruction region.

[0082] Figure 3 shows three examples of interpolation filter shapes: interpolation filter 3a, interpolation filter 3b, and interpolation filter 3c. As shown in Figure 3, interpolation filter 3a has a 4×4 shape, meaning that both the filter height and filter width of interpolation filter 3a are 4. Interpolation filter 3b has a 2×8 shape, meaning that the filter height of interpolation filter 3b is 2 and the filter width is 8. Interpolation filter 3c has an 8×2 shape, meaning that the filter height of interpolation filter 3c is 8 and the filter width is 2.

[0083] Each square in the interpolation filter in Figure 3 can represent a pixel point or pixel position. The gray area represents the input position of the interpolation filter, and the white area represents the output position of the interpolation filter. As can be seen from Figure 3, interpolation filters 3a-3c are all 15-tap interpolation filters, that is, interpolation filters 3a-3c each have 15 input positions and 1 output position.

[0084] The reconstruction area can be of three types: L-shaped reconstruction area, upper reconstruction area, and left reconstruction area. The L-shaped reconstruction area can include reconstructed pixels in the upper left, left, lower left, upper, and upper right areas of the block to be predicted. The upper reconstruction area can include reconstructed pixels in the upper left, upper, and upper right areas of the block to be predicted. The left reconstruction area includes reconstructed pixels in the upper left, left, and lower left areas of the block to be predicted.

[0085] The three interpolation filters shown in FIG3 can slide in the three types of reconstruction areas defined above, thereby forming nine combinations, as shown in FIG4A to FIG4C . N in FIG4A to FIG4C is a variable. The value of N can be predefined, and the value of N can be related to the size of the block to be predicted. Each of the nine combinations can determine a set of interpolation filter coefficients. For example, the interpolation filter coefficients corresponding to each of the nine combinations can be solved as follows: the selected interpolation filter is slid in the selected area to construct a set of autocorrelation coefficient matrices and a set of cross-correlation coefficient vectors; then, a linear equation system is constructed using the autocorrelation coefficient matrix and the cross-correlation coefficient vector to solve the interpolation filter coefficients.

[0086] After obtaining the interpolation filter coefficients, prediction can be performed on the current block to be predicted. For example, as shown in Figure 5A, the interpolation filter can start from the upper left corner of the current block and move toward the lower right corner in a certain order. The interpolation filter can be used to predict along a diagonal line, and points to be predicted on the same diagonal line can be predicted in parallel.

[0087] Each time the interpolation filter moves to a new pixel, the predicted value of the pixel can be calculated based on the following formula (1):

[0088] In the above formula, pred r Represents the prediction result of the prediction position r in the current block. Represents the input of the interpolation filter. c n Represents the interpolation filter coefficient. When it is located in the reconstruction area, the reconstructed pixel value in the reconstruction area can be used as the input of the interpolation filter; when When it is located in the current block, the already obtained prediction value can be used as input.

[0089] After the prediction is completed, the predicted value of the prediction block can be transformed to obtain the transform coefficients. The transform mentioned here can include a primary transform or a secondary transform. The primary transform can be, for example, multiple transform selection (MTS) or a non-separable primary transform (NSPT). The secondary transform can be, for example, a low frequency non-separable secondary transform (LFNST).

[0090] MTS includes traditional transforms such as the discrete cosine transform (DCT) and discrete sine transform (DST). NSPT and LFNST, on the other hand, are based on a set of transform coefficients obtained from a universal training set using an optimal transform. The difference between NSPT and LFNST is that NSPT can be used directly to transform residual information, while LFNST further transforms the transform coefficients after the DCT2 transform.

[0091] Different prediction modes may be suitable for different transformation methods. Therefore, an appropriate transformation kernel can be selected based on the prediction mode of the prediction block. For traditional prediction modes, for NSPT or LFNST, a certain mapping method (such as a lookup table) can be used to map different traditional prediction modes to different groups of transformation kernels for transformation.

[0092] In the reference software ECM, traditional intra prediction modes include planar mode, DC mode, and angular mode. The intra prediction mode index of planar mode is 0, the intra prediction mode index of DC mode is 1, and the intra prediction mode index of angular mode is 2 to 66.

[0093] The arrows in Figure 5B indicate the directions corresponding to the various angular prediction modes in Versatile Video Coding (VVC). These angular prediction modes use prediction mode indices 2 to 66 during encoding and decoding. If the current block is non-square, some angular directions are replaced with wide angles (as indicated by indices -1 to -14 and 67 to 80 in Figure 5B).

[0094] In the ECM reference software, NSPT and LFNST each divide traditional prediction modes into 35 groups, each with three selectable transformation kernels. Table 1 shows the correspondence between traditional prediction modes and transformation kernel groups.

[0095] Table 1

[0096] For a prediction block based on interpolation filtering, the prediction block can be matched to a traditional prediction mode. Then, the transform kernel corresponding to the traditional prediction mode can be used as the transform kernel of the prediction block. For example, based on the predicted value in the prediction block, the prediction block based on interpolation filtering can be matched to a planar mode or a prediction mode in angular directions 2 to 66. The following, in conjunction with Figures 6A and 6B, provides an example of how a prediction mode based on interpolation filtering is matched to a traditional prediction mode.

[0097] As shown in FIG6A , a 3×3 sliding window can be used to slide in the prediction block based on interpolation filtering to calculate the horizontal and vertical gradient values ​​of each 3×3 window in the prediction block: G x and G y .G x and G y It can be represented by the 3×3 horizontal gradient operator M x and the vertical gradient operator M y It is obtained by multiplying the predicted value within the window position. x and M y The values ​​of are as follows:

[0098] Assuming that the prediction block based on interpolation filtering is a block with a width and height of (w, h), the sliding 3×3 window can calculate the G of the (w-2)*(h-2) positions of the center of the prediction block. x and G y .

[0099] Then, according to G at each position x and G y , calculate the traditional angle direction O corresponding to each position according to the following formulas (2) and (3), and calculate the amplitude value G of the gradient of the angle corresponding to each position: G=|G x |+|G y | (2)

[0100] In some implementations, the calculation process of atan can be simplified. For example, the calculation process of atan can be simplified by looking up a table or using a modified formula.

[0101] Next, the magnitude value G of the gradient at each position may be accumulated in the derived traditional angle categories to obtain a histogram of the magnitude values ​​of the gradient (see FIG6B ).

[0102] Finally, the traditional angle with the largest cumulative gradient magnitude is selected as the angle corresponding to the interpolation filter-based prediction block. When the magnitudes derived from all traditional angles are zero, the prediction block can be matched to the traditional planar mode. The traditional prediction mode matched by the interpolation filter-based prediction block can be used to select the transform kernel group for NSPT and LFNST.

[0103] In some implementations, after the coefficients of the interpolation filter are obtained, when performing interpolation filtering on the current block, a set of adaptive maximum and minimum values ​​can be used to limit the output range of the interpolation filter.

[0104] For example, a set of maximum and minimum values ​​can be searched in the reconstructed area around the current block. Then, when the interpolation filter is used to predict each position in the current block, the maximum and minimum values ​​can be used to limit the output range of the output value of each position, as shown in formula (4). Compared with the prediction method given by formula (1), it can be seen that formula (4) adds additional maximum and minimum value restriction operations:

[0105] Among them, max and min are the maximum and minimum values ​​mentioned above respectively.

[0106] In some implementations, when obtaining interpolation filter coefficients, the mean of the input and output samples of the interpolation filter can be subtracted. The interpolation filter coefficients thus resolved help improve the fitting effect of the interpolation filter. According to this implementation, when using the interpolation filter to predict the current block, the input data needs to be subtracted from the mean before being sent to the interpolation filter, and the output of the interpolation filter needs to be added with the mean to obtain the predicted value, see formula (5). Compared with the prediction method given by formula (1), formula (5) adds the additional calculation operations of removing the mean and adding the mean to the output.

[0107] Here, m is the mean mentioned above, which can be a certain reconstructed value in the reconstructed area around the current block to be predicted, or it can be the mean of a part of the reconstructed values ​​in the reconstructed area around the current block to be predicted.

[0108] In some implementations, direct mode (DM) or derived mode is a widely used and efficient intra-frame chroma prediction mode. When a chroma block selects DM mode, the chroma block will obtain the mode selected by the corresponding luma block for intra-frame prediction.

[0109] Currently, intra-frame prediction technology based on interpolation filtering is only used for intra-frame prediction of luminance blocks. One possible approach is to extend the intra-frame prediction mode based on interpolation filtering to chrominance blocks. However, the need to obtain interpolation filter coefficients when performing intra-frame prediction on chrominance blocks will bring high computational complexity. Therefore, in the relevant technology, if the chrominance block selects the DM mode and the corresponding luminance block selects the intra-frame prediction mode based on interpolation filtering, the DM mode will be set to the planar prediction mode.

[0110] As mentioned above, for luma blocks using an intra-frame prediction mode based on interpolation filtering, a traditional prediction mode can be derived by constructing a gradient histogram. Therefore, in some implementations, if the chroma block selects the DM mode and the corresponding luma block selects the intra-frame prediction mode based on interpolation filtering, the traditional prediction mode can be used as the prediction mode for the chroma block.

[0111] The following describes a method for selecting a basic transform kernel for a prediction block in an intra-frame prediction mode based on interpolation filtering.

[0112] After determining the predicted value for the current block, the encoder can subtract the predicted value from the original pixel values ​​of the current block to obtain the residual value of the current block. This residual information can be further transformed, quantized, and encoded before being written into the bitstream. At the decoder, the coefficients parsed from the bitstream are dequantized and inversely transformed to obtain the residual value. This residual value is then added to the predicted value to obtain the reconstructed value of the current block.

[0113] The previous article introduced a method for deriving a gradient histogram based on the prediction results of interpolation filtering, matching the gradient histogram to the traditional prediction mode, and further selecting an inseparable transform kernel. In the related art, except for inseparable transforms, in other basic transforms, the transform kernel is selected in the same way as the planar mode. However, the intra-frame prediction mode based on interpolation filtering has different characteristics from the planar mode, so the selection method of the basic transform kernel corresponding to the intra-frame prediction mode based on interpolation filtering should be optimized.

[0114] In the reference software ECM, basic transforms are divided into horizontal and vertical transforms. The following seven transforms are allowed for each direction: ('DCT2', 'DCT8', 'DST7', 'DCT5', 'DST4', 'DST1', 'IDTR'). DCT2, DCT8, and DCT5 are subclasses of DCT; DST7, DST4, and DST1 are subclasses of DST; and IDTR represents the identity transform, meaning no transformation.

[0115] In the reference software ECM, the most commonly used base transform mode uses DCT2 in both horizontal and vertical directions, denoted as DCT2-DCT2. DCT2-DCT2 can be used as a transform before LFNST or when MTS technology is disabled. If MTS mode is selected, the transform process uses a combination of the base transforms in the horizontal and vertical directions rather than an inseparable transform. In the reference software ECM, up to six non-DCT2-DCT2 transform kernels can be selected for the current block, depending on the characteristics of the non-zero coefficients in the current block.

[0116] In some implementations, for a prediction block in an intra-frame prediction mode based on interpolation filtering, the MTS basic transform kernel used for its residual may be related to whether the interpolation filtering mode is selected for the current block. For example, the MTS basic transform kernel may be related to which interpolation filtering sub-mode (i.e., the combination of interpolation filter shape and reconstruction area) is selected for the current block and / or the shape and size of the current block.

[0117] The following provides two designs of base variation kernels that can be used by prediction blocks based on interpolation filtering modes.

[0118] As a design solution, the MTS selectable basic transform kernel is related to whether the current block has selected the interpolation filter prediction mode. For example, if the current block has selected the interpolation filter prediction mode, it can be selected from the six MTS transform kernels shown in Table 2:

[0119] Table 2

[0120] At the decoding end, when MTS is selected and the prediction mode of the current block is the interpolation filtering prediction mode, a corresponding transform kernel can be selected from the six transform kernels according to the parsed MTS transform index for inverse transformation.

[0121] As another design solution, the optional basic transform kernel of MTS is related to whether the interpolation filter mode is selected for the current block and the shape and size of the current block. If the interpolation filter prediction mode is selected for the current block, the MTS transform kernel shown in Table 3 can be selected based on the shape and size of the current block:

[0122] Table 3

[0123] At the decoding end, when MTS is selected and the prediction mode of the current block is the interpolation prediction mode, the corresponding transform kernel can be selected for inverse transformation according to the parsed MTS transform index and the shape and size of the current block.

[0124] The candidates for the MTS transform kernels provided by the above two design schemes can be obtained in the following manner: first, an encoder containing an interpolation filter prediction mode can be used to encode a set of images or a set of videos. Then, the residual information of the blocks in the selected interpolation filter mode is classified into categories (such as the shape and size of the block, the interpolation filter mode) to screen the possible transform kernels in the horizontal and vertical directions. The transform kernel selection criteria can be based on the sum of absolute difference (SAD), the sum of squared error (SSE) or other metrics. For example, the transform coding gain of each transform kernel can be calculated. The transform coding gain can be defined as the arithmetic mean of the transform coefficient variance divided by the geometric mean of the transform coefficient variance.

[0125] In the interpolation filter prediction mode described above, the interpolation filter prediction does not contain nonlinear terms or bias terms. In order to improve the coding performance gain, nonlinear terms or bias terms can be introduced into the interpolation filter prediction mode.

[0126] For example, referring to FIG7 , based on the 15-tap interpolation filter shown in FIG1 , a 3-tap nonlinear term can be added (see the three dark gray blocks near the output of the interpolation filter in FIG7 ). The input t i (i ranges from 0 to 14) corresponds to the 14 gray positions around the current position to be predicted, t i It is the reconstructed value or predicted value at the gray position (depending on whether the input required for the current position to be predicted is located in the block to be predicted or in the reconstructed area).

[0127] The input p of the three nonlinear terms of the interpolation filter i =(t i ×t i +midVal)>>bitDepth, i is the three positions of dark gray, t i is the value of the linear term, midVal and bitDepth are equal to 512 and 10 respectively in the case of 10 bits.

[0128] When the nonlinear term is added, the following formula (6) can be used to predict the current prediction position:

[0129] As mentioned earlier, the process of obtaining interpolation filter coefficients constructs an autocorrelation matrix and a cross-correlation coefficient vector. If the prediction formula includes nonlinear terms, the corresponding nonlinear terms can be added when constructing the autocorrelation matrix and cross-correlation coefficient vector. Similarly, if the prediction formula includes bias terms, the bias terms can also be added when constructing the autocorrelation matrix and cross-correlation coefficient vector.

[0130] In addition to the example in Figure 7, nonlinear terms as shown in Figure 8 can also be added to the interpolation filter. Compared with Figure 7, the different interpolation filter shapes shown in Figure 8 all use nonlinear terms with similar shapes, making the calculation simpler. In addition to using three nonlinear terms in the interpolation filter, more nonlinear terms can also be used. For example, Figure 9 shows an example of using five nonlinear terms, that is, adding five nonlinear terms to the linear terms of the 15-tap interpolation filter. The number of nonlinear terms can be designed based on the performance and complexity requirements of the codec.

[0131] In some implementations, if the linear term adopts the aforementioned de-averaging scheme, the nonlinear term may also adopt the aforementioned de-averaging scheme.

[0132] The bias term refers to the filter coefficient that adds a tap in the interpolation filter (such as c in formula (7) a+1 ). When calculating the prediction value, the filter coefficient can be multiplied by a constant. The constant can be related to the bit depth of the pixel. For example, for a video sequence with a bit depth of 10, the constant can be 512 (i.e., 2 10-1 ):

[0133] For example, for a narrow block to be predicted with a width of 16 pixels and a height of 4 pixels, if the left reconstructed area is used to obtain interpolation filter coefficients, there are more pixels to be predicted, while fewer pixels in the reconstructed area are used to obtain interpolation filter parameters. Similarly, for a narrow block to be predicted with a width of 4 pixels and a height of 16 pixels, if the upper reconstructed area is used to obtain interpolation filter coefficients, there are more pixels to be predicted, while fewer pixels are used to obtain interpolation filter parameters. For details, see the two cases shown in Figure 10.

[0134] Therefore, in some implementations, if the width of the block to be predicted × a < the height of the block to be predicted, then the use of the upper reconstructed region to obtain interpolation filter coefficients may be prohibited; and / or if the height of the block to be predicted × a < the width of the block to be predicted, then the use of the left reconstructed region to obtain interpolation filter coefficients may be prohibited. The value of a may be 2, for example.

[0135] If some interpolation filter submodes are restricted based on the aspect ratio of the block to be predicted, the number of interpolation filter submodes allowed for different aspect ratios will be different. Therefore, when parsing the interpolation filter identifier, the selection of its context model can be related to one or more factors such as the block shape and aspect ratio.

[0136] At the current stage, the coding complexity of the reference software ECM has increased by 6 to 8 times compared to VTM (the reference software of VVC), which makes the coding cost of the reference software ECM too high and difficult to implement. The overly complex implementation of the interpolation filtering technology is one of the reasons for the high coding cost. Specifically, the interpolation filtering technology needs to obtain 9 sets of interpolation filter coefficients from 9 combinations of interpolation filter shapes and reconstruction area types at the encoding end, and perform rate-distortion screening based on the 9 sets of interpolation filter coefficients to determine whether to use interpolation filtering technology. The process of obtaining 9 sets of interpolation filter coefficients is complex and time-consuming. After testing, the use of interpolation filtering technology will cause the time complexity of the encoding end to increase by more than 3% (approximately 3.7%).

[0137] The embodiment of the present application proposes a coding and decoding method that can reduce the time complexity of the interpolation filter prediction mode. The embodiment of the present application is described in detail below with examples.

[0138] Each permitted combination of the block to be predicted mentioned in the embodiments of the present application may correspond to a type of reconstruction region (used to obtain interpolation filter coefficients) and an interpolation filter shape. In other words, the permitted combination of the block to be predicted refers to a combination of the type of reconstruction region and the interpolation filter shape.

[0139] The embodiments of the present application do not limit the specific number of interpolation filter shapes, which can be selected according to actual needs. In some implementations, the interpolation filter shapes mentioned in the embodiments of the present application may include: a first interpolation filter shape, a second interpolation filter shape, and a third interpolation filter shape.

[0140] Taking the three interpolation filter shapes with 15 taps shown in Figure 11 as an example, the first interpolation filter shape can be any one of the three interpolation filter shapes. For example, the first interpolation filter shape can be the interpolation filter shape EIP_FILTER_S, that is, a 4×4 interpolation filter.

[0141] Taking the three 15-tap interpolation filter shapes shown in Figure 11 as an example, the second interpolation filter shape can be any one of the three interpolation filter shapes. For example, the second interpolation filter shape can be the interpolation filter shape EIP_FILTER_H, that is, a 2×8 interpolation filter.

[0142] Taking the three interpolation filter shapes with 15 taps shown in Figure 11 as an example, the third interpolation filter shape can be any one of the three interpolation filter shapes. For example, the first interpolation filter shape can be the interpolation filter shape EIP_FILTER_V, that is, an 8×2 interpolation filter.

[0143] The reconstruction region referred to in the embodiments of the present application refers to the region consisting of reconstructed pixels. The reconstruction region can be used to obtain interpolation filter coefficients. The embodiments of the present application do not specifically limit the type of reconstruction region, and may be selected based on actual needs. In some implementations, the reconstruction region referred to in the embodiments of the present application may include: a first type of reconstruction region, a second type of reconstruction region, and a third type of reconstruction region.

[0144] Different types of reconstruction regions may include different areas around the block to be predicted.

[0145] In some implementations, the first type of reconstruction area may include one or more of the following areas:

[0146] The upper side of the block to be predicted (may include the upper left, upper right, and upper right);

[0147] The reconstructed area on the left side of the block to be predicted (may include the upper left, left, and lower left).

[0148] For example, the first type of reconstruction area may include reconstruction areas on the upper side of the block to be predicted and on the left side of the block to be predicted.

[0149] In some implementations, the second type of reconstruction area may include one or more of the following areas:

[0150] The upper side of the block to be predicted (may include the upper left, upper right, and upper right);

[0151] The reconstructed area on the left side of the block to be predicted (may include the upper left, left, and lower left).

[0152] For example, the second type of reconstruction area may be a reconstruction area on the upper side of the block to be predicted.

[0153] In some implementations, the third type of reconstruction area may include one or more of the following areas:

[0154] The upper side of the block to be predicted (may include the upper left, upper right, and upper right);

[0155] The reconstructed area on the left side of the block to be predicted (may include the upper left, left, and lower left).

[0156] For example, the third type of reconstruction area may be a reconstruction area on the left side of the block to be predicted.

[0157] FIG12 shows three types of reconstruction regions, namely, an L-shaped reconstruction region (hereinafter referred to as EIP_AL_A_L), an upper reconstruction region (hereinafter referred to as EIP_AL_A) and a left reconstruction region (hereinafter referred to as EIP_AL_L).

[0158] EIP_AL_A_L may include the reconstructed areas on the left, upper left, lower left, upper, and upper right sides of the block to be predicted.

[0159] EIP_AL_A may include the reconstructed areas on the upper left, upper, and upper right sides of the block to be predicted.

[0160] EIP_AL_L may include the reconstructed areas on the upper left, left, and lower left sides of the block to be predicted.

[0161] The first type of reconstruction area mentioned above may be any one of the three types of reconstruction areas shown in Figure 12. For example, the first type of reconstruction area may be EIP_AL_A_L.

[0162] The second type of reconstruction area mentioned above may be any one of the three types of reconstruction areas shown in Figure 12. For example, the second type of reconstruction area may be EIP_AL_A.

[0163] The third type of reconstruction area mentioned above may be any one of the three types of reconstruction areas shown in Figure 12. For example, the third type of reconstruction area may be EIP_AL_L.

[0164] The embodiment of the present application does not specifically limit the maximum number of "combinations of reconstruction region types and interpolation filter shapes", which is related to the number of reconstruction region types and interpolation filter shapes allowed to be used.

[0165] In some implementations, the combinations mentioned in the embodiments of the present application may include one or more of the following combinations:

[0166] a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape;

[0167] a second combination corresponding to the first type of reconstruction region and the second interpolation filter shape;

[0168] a third combination corresponding to the first type of reconstruction region and the third interpolation filter shape;

[0169] a fourth combination, corresponding to the second type of reconstruction region and the first interpolation filter shape;

[0170] a fifth combination, corresponding to the second type of reconstruction region and the second interpolation filter shape;

[0171] a sixth combination, corresponding to the second type of reconstruction region and the third interpolation filter shape;

[0172] a seventh combination, corresponding to the third type of reconstruction region and the first interpolation filter shape;

[0173] An eighth combination, corresponding to the third type of reconstruction area and the second interpolation filter shape;

[0174] The ninth combination corresponds to the third type of reconstruction area and the third interpolation filter shape.

[0175] Taking the reconstruction area type EIP_AL_A_L shown in Figure 12 and the interpolation filter shapes EIP_FILTER_S, EIP_FILTER_H, and EIP_FILTER_V shown in Figure 11 as an example, three combinations can be obtained as shown in Figure 13A, namely (EIP_AL_A_L, EIP_FILTER_S), (EIP_AL_A_L, EIP_FILTER_V) and (EIP_AL_A_L, EIP_FILTER_H).

[0176] Taking the reconstruction area type EIP_AL_A shown in Figure 12 and the interpolation filter shapes EIP_FILTER_S, EIP_FILTER_H, and EIP_FILTER_V shown in Figure 11 as an example, three combinations can be obtained as shown in Figure 13B, namely (EIP_AL_A, EIP_FILTER_S), (EIP_AL_A, EIP_FILTER_V) and (EIP_AL_A, EIP_FILTER_H).

[0177] Taking the reconstruction area type EIP_AL_L shown in Figure 12 and the interpolation filter shapes EIP_FILTER_S, EIP_FILTER_H, and EIP_FILTER_V shown in Figure 11 as an example, three combinations can be obtained as shown in Figure 13C, namely (EIP_AL_L, EIP_FILTER_S), (EIP_AL_L, EIP_FILTER_V) and (EIP_AL_L, EIP_FILTER_H).

[0178] The first combination mentioned above may be any combination in Figures 13A to 13C. For example, the first combination may be (EIP_AL_A_L, EIP_FILTER_S).

[0179] The second combination mentioned above may be any combination in Figures 13A to 13C. For example, the second combination may be (EIP_AL_A_L, EIP_FILTER_H).

[0180] The third combination mentioned above may be any combination in Figures 13A to 13C. For example, the third combination may be (EIP_AL_A_L, EIP_FILTER_V).

[0181] The fourth combination mentioned above may be any combination in Figures 13A to 13C. For example, the fourth combination may be (EIP_AL_A, EIP_FILTER_S).

[0182] The fifth combination mentioned above may be any combination in Figures 13A to 13C. For example, the fifth combination may be (EIP_AL_A, EIP_FILTER_H).

[0183] The sixth combination mentioned above may be any combination in Figures 13A to 13C. For example, the sixth combination may be (EIP_AL_A, EIP_FILTER_V).

[0184] The seventh combination mentioned above may be any combination in Figures 13A to 13C. For example, the seventh combination may be (EIP_AL_L, EIP_FILTER_S).

[0185] The eighth combination mentioned above may be any combination in Figures 13A to 13C. For example, the eighth combination may be (EIP_AL_L, EIP_FILTER_H).

[0186] The ninth combination mentioned above may be any combination in Figures 13A to 13C. For example, the ninth combination may be (EIP_AL_L, EIP_FILTER_V).

[0187] It should be understood that the above is only an example of the interpolation filter shape, the reconstruction area type and the combination of the two, and the embodiments of the present application are not limited to this. For example, 4 interpolation filter shapes and 3 reconstruction areas can be set, thereby obtaining 4×3=12 combinations. For another example, 5 interpolation filter shapes and 5 reconstruction areas can be set, thereby obtaining 5×5=25 combinations. The following mainly uses the interpolation filter shapes, reconstruction area types, and the combinations of interpolation filter shapes and reconstruction area types shown in Figures 11 to 13 as examples for explanation.

[0188] For a block to be predicted of a certain shape and / or size, different combinations have different probabilities of being selected during intra prediction. In other words, combinations of blocks to be predicted of different shapes and / or sizes that are more likely to be selected exhibit certain distribution characteristics.

[0189] Assume that the shape and / or size of the block to be predicted is 4×4 to 32×32 (i.e., 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, 32×32), and the combination of interpolation filter shape and reconstruction region type is the nine combinations shown in Figures 13A to 13C. The following gives the statistical data of the selected nine combinations for each shape and / or size (the statistical data is obtained by testing on a given video training set).

[0190] For the 4×4 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 4 below.

[0191] Table 4

[0192] For the 4×8 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 5 below.

[0193] Table 5

[0194] For the 4×16 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 6 below.

[0195] Table 6

[0196] For the 4×32 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 7 below.

[0197] Table 7

[0198] For the 8×4 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 8 below.

[0199] Table 8

[0200] For the 8×8 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 9 below.

[0201] Table 9

[0202] For the 8×16 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 10 below.

[0203] Table 10

[0204] For the 8×32 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 11 below.

[0205] Table 11

[0206] For the 16×4 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 12 below.

[0207] Table 12

[0208] For the 16×8 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 13 below.

[0209] Table 13

[0210] For the 16×16 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 14 below.

[0211] Table 14

[0212] For the 16×32 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 15 below.

[0213] Table 15

[0214] For the 32×4 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 16 below.

[0215] Table 16

[0216] For the 32×8 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 17 below.

[0217] Table 17

[0218] For the 32×16 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 18 below.

[0219] Table 18

[0220] For the 32×32 block to be predicted, the statistical data of the number of times the nine combinations shown in FIG. 13A to FIG. 13C are selected can be seen in Table 19 below.

[0221] Table 19

[0222] It should be understood that the above description uses the size of the block to be predicted between 4×4 and 32×32 as an example, but the embodiments of the present application are not limited thereto. For example, the block to be predicted may be a block larger than 32×32. In other words, intra-frame prediction techniques based on interpolation filtering can be used on blocks larger than 32×32. For example, the maximum size of the block to be predicted may be the size corresponding to the maximum allowed coding unit, prediction unit, or transform unit.

[0223] The above statistics show that the probability of selection for different combinations varies across different blocks. Observing the statistical results, we find that among the nine combinations, (EIP_AL_A_L, EIP_FILTER_S) has a high selection probability for blocks of all sizes and shapes. Furthermore, if the block to be predicted is narrow and rectangular, the reconstructed pixel region adjacent to the longer side is more likely to be selected. Furthermore, for narrow and rectangular blocks, the interpolation filter shape also has a certain relationship with the selection probability. For example, on a 4×32 block, EIP_FILTER_H is more likely to be selected, while on a 32×4 block, EIP_FILTER_V is more likely to be selected.

[0224] Based on the above statistical characteristics, the embodiments of the present application optimize the combinations allowed for blocks of different shapes and / or sizes. Specifically, the embodiments of the present application correspond (or associate) the allowed combinations for blocks of different shapes and / or sizes to be predicted. For blocks of a certain shape and / or size to be predicted, the allowed combinations can be limited to save encoding time, thereby optimizing overall encoding and decoding performance.

[0225] The following provides detailed examples of the correspondence between the shape and / or size of a block to be predicted and the permitted combinations of blocks to be predicted. It should be understood that this correspondence between the shape and / or size of a block to be predicted and the permitted combinations of blocks to be predicted can be applied to both the encoder and decoder. This correspondence can, for example, be a mapping table. This correspondence can be determined through negotiation between the encoder and decoder, or indicated through predefined protocol information.

[0226] In some implementations, if the size of the current block to be predicted is greater than or equal to a first size, the number of combinations allowed for the current block is the first number; if the size of the current block is less than the first size, the number of combinations allowed for the current block is less than the first number. That is, in this implementation, larger blocks to be predicted are allowed to use a greater number of combinations, while smaller blocks to be predicted are allowed to use a smaller number of combinations. This is because using intra-frame prediction techniques based on interpolation filtering on small blocks consumes more encoding time than on large blocks. Therefore, eliminating more combinations on small blocks can save more encoding and decoding time. Furthermore, using more combinations on large blocks can ensure encoding and decoding performance.

[0227] In some implementations, the first size is greater than or equal to 16×16. For example, if the size of the current block is 16×16, 32×32, 16×32, or 32×16, the number of combinations allowed for the current block is the first number. This is because, compared to large blocks (blocks larger than 16×16), using intra-frame prediction technology based on interpolation filtering on small blocks takes more encoding time. Therefore, removing more combinations on small blocks can save more encoding and decoding time. In addition, using more combinations on large blocks can ensure encoding and decoding performance.

[0228] In some implementations, the first number is the maximum number of combinations allowed for the block to be predicted. It should be understood that the maximum number of combinations allowed for the block to be predicted is related to the interpolation filter shapes and reconstruction region types that can be used. For example, if the interpolation filter corresponds to three interpolation filter shapes and three reconstruction regions, the maximum number of combinations allowed for the block to be predicted can be 3×3=9.

[0229] For example, if the size of the current block is greater than or equal to the first size, the current block allows the following nine combinations:

[0230] a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape;

[0231] a second combination corresponding to the first type of reconstruction region and the second interpolation filter shape;

[0232] a third combination corresponding to the first type of reconstruction region and the third interpolation filter shape;

[0233] a fourth combination, corresponding to the second type of reconstruction region and the first interpolation filter shape;

[0234] a fifth combination, corresponding to the second type of reconstruction region and the second interpolation filter shape;

[0235] a sixth combination, corresponding to the second type of reconstruction region and the third interpolation filter shape;

[0236] a seventh combination, corresponding to the third type of reconstruction region and the first interpolation filter shape;

[0237] An eighth combination, corresponding to the third type of reconstruction area and the second interpolation filter shape;

[0238] The ninth combination corresponds to the third type of reconstruction area and the third interpolation filter shape.

[0239] Taking the interpolation filter shapes including EIP_FILTER_S, EIP_FILTER_V, EIP_FILTER_H, and the reconstruction area types including EIP_AL_A_L, EIP_AL_A, EIP_AL_L as an example, the first combination can be (EIP_AL_A_L, EIP_FILTER_S), the second combination can be (EIP_AL_A_L, EIP_FILTER_H), and the third combination can be (EIP_AL_A_L, EIP_FILTER_V ), the fourth combination may be (EIP_AL_A, EIP_FILTER_S), the fifth combination may be (EIP_AL_A, EIP_FILTER_H), the sixth combination may be (EIP_AL_A, EIP_FILTER_V), the seventh combination may be (EIP_AL_L, EIP_FILTER_S), the eighth combination may be (EIP_AL_L, EIP_FILTER_H), and the ninth combination may be (EIP_AL_L, EIP_FILTER_V).

[0240] Taking the current block size as 16×16, 32×32, 16×32, or 32×16, the interpolation filter shapes include EIP_FILTER_S, EIP_FILTER_V, and EIP_FILTER_H, and the reconstruction area types include EIP_AL_A_L, EIP_AL_A, and EIP_AL_L as an example, the combinations allowed for the current block can be determined based on the following Table 20:

[0241] Table 20

[0242] In some implementations, if the current block is a 4×N and / or N×4 block, the number of combinations allowed for the current block is less than or equal to the second number. The second number may be less than the maximum number of combinations allowed for the block to be predicted. The maximum number of combinations allowed for the block to be predicted is related to the interpolation filter shape and / or the type of reconstruction area allowed to be used. Taking the example of allowing the use of three interpolation filter shapes and three reconstruction areas, the maximum number of combinations allowed for the block to be predicted may be 3×3=9. 4×N and / or N×4 blocks are smaller blocks. Compared with large blocks, using intra-frame prediction technology based on interpolation filtering on small blocks will take up more encoding time. Therefore, limiting the number of combinations used for small blocks can save more encoding and decoding time.

[0243] In some implementations, the second number may be 3. That is, if the current block is a 4×N and / or N×4 block, the number of combinations allowed to be used by the current block is less than or equal to 3.

[0244] In some implementations, N may be a positive integer less than or equal to 32. For example, the value of N may be 4, 8, 16, or 32.

[0245] In some implementations, if the current block is a 4×4, 4×8, 4×16, 8×4, or 16×4 block, the combinations allowed for the current block include one or more of the following combinations:

[0246] a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape;

[0247] a second combination corresponding to the first type of reconstruction region and the second interpolation filter shape;

[0248] The third combination corresponds to the first type of reconstruction area and the third interpolation filter shape.

[0249] Taking the interpolation filter shapes including EIP_FILTER_S, EIP_FILTER_V, and EIP_FILTER_H, and the reconstruction area types including EIP_AL_A_L, EIP_AL_A, and EIP_AL_L as an example, the first combination may be (EIP_AL_A_L, EIP_FILTER_S), the second combination may be (EIP_AL_A_L, EIP_FILTER_H), and the third combination may be (EIP_AL_A_L, EIP_FILTER_V). Therefore, for a current block of 4×4, 4×8, 4×16, 8×4, or 16×4, the allowed combinations may be determined based on the following Table 21.

[0250] Table 21

[0251] In some implementations, if the current block is a 4×32 or 32×4 block, the number of combinations allowed for the current block is less than or equal to a third number. The third number may be less than the second number mentioned above. Taking the second number as 3 as an example, the second number may be 2. 4×32 or 32×4 blocks are narrow rectangular blocks, and narrow rectangular blocks are more likely to select a specific type of reconstruction area and / or interpolation filter shape. For example, the reconstructed pixel area adjacent to the longer side of the narrow rectangular block is more likely to be selected; for another example, for a 4×32 block, EIP_FILTER_H is more likely to be selected; for another example, for a 32×4 block, EIP_FILTER_V is more likely to be selected. Therefore, for narrow rectangular blocks, the above information can be used to introduce more combination restrictions, which helps to save encoding time while maintaining encoding and decoding performance.

[0252] In some implementations, if the current block is a 4×32 block, the combinations allowed for the current block include one or more of the following combinations:

[0253] a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape;

[0254] The third combination corresponds to the first type of reconstruction area and the third interpolation filter shape.

[0255] Taking the interpolation filter shapes including EIP_FILTER_S, EIP_FILTER_V, and EIP_FILTER_H, and the reconstruction area types including EIP_AL_A_L, EIP_AL_A, and EIP_AL_L as an example, the first combination may be (EIP_AL_A_L, EIP_FILTER_S), and the third combination may be (EIP_AL_A_L, EIP_FILTER_V). Therefore, for a 4×32 current block, the allowed combinations may be determined based on the following Table 22.

[0256] Table 22

[0257] In some implementations, if the current block is a 32×4 block, the combinations allowed for the current block include one or more of the following combinations:

[0258] a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape;

[0259] The second combination corresponds to the first type of reconstruction area and the second interpolation filter shape.

[0260] Taking the interpolation filter shapes including EIP_FILTER_S, EIP_FILTER_V, and EIP_FILTER_H, and the reconstruction area types including EIP_AL_A_L, EIP_AL_A, and EIP_AL_L as an example, the first combination may be (EIP_AL_A_L, EIP_FILTER_S), and the second combination may be (EIP_AL_A_L, EIP_FILTER_H). Therefore, for a 32×4 current block, the allowed combinations may be determined based on the following Table 23.

[0261] Table 23

[0262] Testing has shown that limiting the allowed combinations for the predicted block to those listed in Tables 20 to 23 maintains nearly unchanged encoding and decoding performance. However, the increase in encoding time due to the introduction of interpolation filtering is reduced from 3.7% to approximately 2.6%.

[0263] As mentioned above, for 4×16 or 16×4 blocks, the number of combinations allowed is a second number (e.g., 3). To further save encoding time, the number of combinations allowed for 4×16 or 16×4 blocks can be further restricted. For example, the number of combinations allowed for 4×16 or 16×4 blocks can be restricted to a third number (less than the second number). This third number can be, for example, 2.

[0264] In some implementations, if the current block is an 8×N and / or N×8 block, the number of combinations allowed to be used by the current block is less than or equal to the fourth number. N is a positive integer, and 8≤N≤32. For example, N can be 8, 16, or 32.

[0265] The fourth number is less than the maximum number of combinations allowed for the block to be predicted. The maximum number of combinations allowed for the block to be predicted is related to the allowed interpolation filter shapes and / or the types of reconstruction regions. Taking three interpolation filter shapes and three reconstruction regions as an example, the maximum number of combinations allowed for the block to be predicted can be 3×3=9. The value of the fourth number can be, for example, 5.

[0266] In some implementations, the fourth number may be greater than the second number mentioned above. The second number mentioned above is for 4×N and / or N×4 blocks. Compared with such blocks, 8×N and / or N×8 (8≤N≤32) blocks are larger in size. That is, in this implementation, a larger number of combinations are allowed for the blocks to be predicted that are larger in size, and a smaller number of combinations are allowed for the blocks to be predicted that are smaller in size. This is because using intra-frame prediction technology based on interpolation filtering on small blocks will take up more encoding time than on large blocks. Therefore, removing more combinations on small blocks can save more encoding and decoding time.

[0267] In some implementations, if the current block is an 8×8 block, the combinations allowed for the current block include one or more of the following combinations:

[0268] a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape;

[0269] a second combination corresponding to the first type of reconstruction region and the second interpolation filter shape;

[0270] a third combination corresponding to the first type of reconstruction region and the third interpolation filter shape;

[0271] a fourth combination, corresponding to the second type of reconstruction region and the first interpolation filter shape;

[0272] The seventh combination corresponds to the third type of reconstruction area and the first interpolation filter shape.

[0273] Taking the interpolation filter shapes including EIP_FILTER_S, EIP_FILTER_V, and EIP_FILTER_H, and the reconstruction area types including EIP_AL_A_L, EIP_AL_A, and EIP_AL_L as an example, the first combination may be (EIP_AL_A_L, EIP_FILTER_S), the second combination may be (EIP_AL_A_L, EIP_FILTER_H), the third combination may be (EIP_AL_A_L, EIP_FILTER_V), the fourth combination may be (EIP_AL_A, EIP_FILTER_S), and the seventh combination may be (EIP_AL_L, EIP_FILTER_S). Therefore, for an 8×8 current block, the allowed combinations may be determined based on the following Table 24.

[0274] Table 24

[0275] In some implementations, if the current block is an 8×16 or 8×32 block, the combinations allowed for the current block include one or more of the following combinations:

[0276] a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape;

[0277] a second combination corresponding to the first type of reconstruction region and the second interpolation filter shape;

[0278] a third combination corresponding to the first type of reconstruction region and the third interpolation filter shape;

[0279] a seventh combination, corresponding to the third type of reconstruction region and the first interpolation filter shape;

[0280] The ninth combination corresponds to the third type of reconstruction area and the third interpolation filter shape.

[0281] Taking the interpolation filter shapes including EIP_FILTER_S, EIP_FILTER_V, and EIP_FILTER_H, and the reconstruction area types including EIP_AL_A_L, EIP_AL_A, and EIP_AL_L as an example, the first combination may be (EIP_AL_A_L, EIP_FILTER_S), the second combination may be (EIP_AL_A_L, EIP_FILTER_H), the third combination may be (EIP_AL_A_L, EIP_FILTER_V), the seventh combination may be (EIP_AL_L, EIP_FILTER_S), and the ninth combination may be (EIP_AL_L, EIP_FILTER_V). Therefore, for an 8×16 or 8×32 current block, the allowed combinations may be determined based on the following Table 25.

[0282] Table 25

[0283] In some implementations, if the current block is a 16×8 or 32×8 block, the combinations allowed for the current block include one or more of the following combinations:

[0284] a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape;

[0285] a second combination corresponding to the first type of reconstruction region and the second interpolation filter shape;

[0286] a third combination corresponding to the first type of reconstruction region and the third interpolation filter shape;

[0287] a fifth combination, corresponding to the second type of reconstruction region and the second interpolation filter shape;

[0288] The seventh combination corresponds to the third type of reconstruction area and the first interpolation filter shape.

[0289] Taking the interpolation filter shapes including EIP_FILTER_S, EIP_FILTER_V, and EIP_FILTER_H, and the reconstruction area types including EIP_AL_A_L, EIP_AL_A, and EIP_AL_L as an example, the first combination may be (EIP_AL_A_L, EIP_FILTER_S), the second combination may be (EIP_AL_A_L, EIP_FILTER_H), the third combination may be (EIP_AL_A_L, EIP_FILTER_V), the fifth combination may be (EIP_AL_A, EIP_FILTER_H), and the seventh combination may be (EIP_AL_L, EIP_FILTER_S). Therefore, for a 16×8 or 32×8 current block, the allowed combinations may be determined based on the following Table 26.

[0290] Table 26

[0291] As mentioned above, the number of combinations allowed for 8×32 or 32×8 blocks can be a fourth number (e.g., 5). To further save encoding time, the number of combinations allowed for 8×32 or 32×8 blocks can be further restricted. For example, the number of combinations allowed for 8×32 or 32×84 blocks can be restricted to a fifth number (less than the fourth number). This fifth number can be, for example, 3.

[0292] In some implementations, in order to reduce encoding time complexity, the first target prediction block may be prohibited from using an intra-frame prediction mode based on interpolation filtering. The first target prediction block may, for example, include one or more of the following: a 4×4 block, a 4×N block (N is a positive integer less than or equal to 32, such as N equal to 4, 8, 16, or 32), a block whose width is greater than twice the height, and a block whose height is greater than twice the width. Of course, based on actual needs, blocks of other sizes and / or shapes may be prohibited from using interpolation filtering technology, thereby further reducing encoding time complexity.

[0293] In some implementations, for any block to be predicted that allows the use of interpolation filtering techniques, the combinations allowed for the block to be predicted include a first combination. The first combination corresponds to a first type of reconstruction region and a first filter shape. Taking the interpolation filter shapes including EIP_FILTER_S, EIP_FILTER_V, and EIP_FILTER_H, and the reconstruction region types including EIP_AL_A_L, EIP_AL_A, and EIP_AL_L as an example, the first combination may be (EIP_AL_A_L, EIP_FILTER_S). From the statistical data of blocks of various sizes mentioned above, it can be seen that the probability of selecting (EIP_AL_A_L, EIP_FILTER_S) is relatively high for all blocks to be predicted. Therefore, including this first combination in all combinations of blocks to be predicted helps maintain codec performance.

[0294] The above article provides detailed examples of the concepts of allowed combinations of prediction blocks and the possible combination restrictions introduced by blocks of various shapes / sizes. The above content can be applied to both the encoding end and the decoding end.

[0295] The following is a detailed explanation of the decoding method provided in the embodiments of the present application.

[0296] FIG14 is a flow chart of a decoding method according to an embodiment of the present application. The method of FIG14 can also be referred to as an intra-frame prediction method, or an intra-frame prediction method based on interpolation filtering. The method of FIG14 can be applied to a decoder.

[0297] Referring to FIG. 11 , in step S1410 , the code stream is parsed to determine first identification information and index information corresponding to the current block.

[0298] The current block may refer to a current block to be predicted or a current block to be decoded. In some implementations, the current block is a luminance block. In other implementations, the current block may also be a chrominance block.

[0299] The first identification information may be used to indicate that the prediction mode of the current block is an intra prediction mode based on interpolation filtering. For ease of description, the following text uses cu_eip_flag to represent the first identification information (of course, the first identification information may also be represented by any other letters and / or numbers). cu_eip_flag may be represented by a context-adaptive arithmetic entropy coding syntax element (i.e., ae(v)).

[0300] In some implementations, the value of cu_eip_flag can be true or false.

[0301] In some implementations, cu_eip_flag can be encoded or decoded using a context model.

[0302] In some implementations, cu_eip_flag can be encoded or decoded using bypass coding.

[0303] In some implementations, if cu_eip_flag does not exist in the code stream, the value of cu_eip_flag may be a default value (eg, 0).

[0304] The index information may be used to indicate or determine a target combination to be used for intra-frame prediction of the current block based on interpolation filtering. The target combination may be one of the combinations allowed for the current block (for an introduction to the combinations allowed for the current block, see the introduction to the combinations used for the block to be predicted above).

[0305] In some implementations, the index information may include an index value, and based on the index value, the target combination may be directly determined from the combinations allowed for the current block. For example, if the combinations allowed for the current block include four combinations, the index value may include two fixed-length binary codes. The two fixed-length binary codes have four values, corresponding one-to-one to the four combinations allowed for the current block.

[0306] As mentioned above, the probability of selecting a certain combination (hereinafter referred to as the first combination) is relatively high for blocks of various shapes / sizes. For example, if the interpolation filter shapes include EIP_FILTER_S, EIP_FILTER_V, and EIP_FILTER_H, and the reconstruction area types include EIP_AL_A_L, EIP_AL_A, and EIP_AL_L, the probability of selecting (EIP_AL_A_L, EIP_FILTER_S) for blocks of various shapes / sizes is relatively high. Therefore, in some implementations, this characteristic can be utilized to optimize the representation of the aforementioned index information, thereby reducing the number of encoding bits corresponding to the index information. For example, the index information can include second identification information. The second identification information can be a binary code. For ease of description, the second identification information will be represented by first_mode (of course, the second identification information can also be represented by any other letters and / or numbers). first_mode can be used to indicate whether the target combination is the first combination (e.g., (EIP_AL_A_L, EIP_FILTER_S)). If first_mode indicates that the target combination is the first combination, the index information may not carry the third identification information mentioned later (see later for detailed description), thereby reducing the number of coding bits corresponding to the index information.

[0307] In some implementations, first_mode may employ a context model for encoding or decoding.

[0308] In some implementations, first_mode may be encoded or decoded using a bypass encoding method.

[0309] In some implementations, if first_mode indicates that the target combination is not the first combination and / or the number of combinations allowed for the current block is greater than two, the index information may further include third identification information. This third identification information may be used to indicate the target combination from the combinations allowed for the current block, excluding the first combination. For ease of description, other_mode is used below to represent the third identification information (of course, the third identification information may also be represented by any other letters and / or numbers).

[0310] In some implementations, other_mode may be encoded or decoded using a context model.

[0311] In some implementations, other_mode may be encoded or decoded using a bypass encoding method.

[0312] In some implementations, other_mode may be represented by fixed-length codes of different lengths according to the number of combinations allowed for the current block.

[0313] As an example, assuming that the current block is a 4×32 or 32×4 block, and the number of combinations allowed for the current block may be 2, since the current block only allows two combinations. Therefore, in this case, the index information may only include first_mode. If first_mode indicates that the target combination is not the first combination, it means that the target combination is another combination of the two combinations other than the first combination. As an example, for a 4×32 or 32×4 block, the correspondence between the index information and the combinations allowed for the current block can be determined based on the following Table 27.

[0314] Table 27

[0315] For another example, assuming that the current block is a 4×N or N×4 block other than 4×32 or 32×4, and the number of combinations allowed for the current block is 3, the current block also allows two combinations in addition to the first combination. In this case, other_mode can use a fixed-length binary code to indicate the two combinations. As an example, for a 4×32 or 32×4 block, the correspondence between index information and the combinations allowed for the current block can be determined based on the following Table 28.

[0316] Table 28

[0317] For another example, assuming that the current block is an 8×N or N×8 block, and the number of combinations allowed for the current block is 5, the current block also allows four combinations in addition to the first combination. In this case, other_mode can use two fixed-length binary codes to indicate the four combinations. As an example, for an 8×N or N×8 block, the correspondence between index information and the combinations allowed for the current block can be determined based on the following Table 29.

[0318] Table 29

[0319] For another example, assuming that the current block is a 16×16, 16×32, 32×16, or 32×32 block, and the number of combinations allowed for the current block is 9, the current block allows eight combinations in addition to the first combination. In this case, other_mode can use three fixed-length binary codes to indicate the eight combinations. As an example, for a 16×16, 16×32, 32×16, or 32×32 block, the correspondence between index information and the combinations allowed for the current block can be determined based on Table 30 below.

[0320] Table 30

[0321] For another example, assuming that the current block is a 4×16 or 16×4 block, and the number of combinations allowed for the current block is 2, since the current block only allows two combinations, in this case, the index information may only include first_mode. If first_mode indicates that the target combination is not the first combination, it means that the target combination is another combination of the two combinations other than the first combination. As an example, for a 4×32 or 32×4 block, the correspondence between the index information and the combinations allowed for the current block can be determined based on the following Table 31.

[0322] Table 31

[0323] For another example, assuming that the current block is an 8×32 or 32×8 block, and the number of combinations allowed for the current block is 3, the current block also allows two combinations in addition to the first combination. In this case, other_mode can use a fixed-length binary code to indicate the two combinations. As an example, for a 4×32 or 32×4 block, the correspondence between index information and the combinations allowed for the current block can be determined based on the following Table 32.

[0324] Table 32

[0325] In some implementations, if first_mode does not exist in the code stream, the value of first_mode may be a default value (such as 0).

[0326] In some implementations, if other_mode does not exist in the code stream, the value of other_mode may be a default value (such as 0).

[0327] In some implementations, other_mode may be decoded using unary truncated codes, binary truncated codes, Golomb coding, etc. For example, if the number of combinations that other_mode needs to indicate is not a power of 2, the above encoding methods may be used for decoding.

[0328] In step S1420, a target combination is determined from combinations allowed for the current block according to the index information.

[0329] In some implementations, the combinations allowed for the current block may be determined based on the shape and / or size of the current block. Then, the target combination may be determined from the combinations allowed for the current block based on the index information.

[0330] In some implementations, it may be first determined based on first_mode in the index information whether the target combination is the first combination among the combinations allowed for the current block. If the target combination is the first combination among the combinations allowed for the current block, step S1430 may be performed based on the first combination.

[0331] In some implementations, it is possible to first determine whether the target combination is the first combination among the combinations allowed for the current block based on the first_mode in the index information. If the target combination is not the first combination among the combinations allowed for the current block, the number of remaining combinations other than the first combination among the combinations allowed for the current block can be determined. For ease of description, numOtherModes is used hereinafter to represent the number of the remaining combinations. If numOtherModes is equal to 1 (i.e., the combinations allowed for the current block only contain one remaining combination other than the first combination), the parsing of other_mode can be skipped, and the remaining combinations can be directly determined as the above-mentioned target combinations. Taking the current block as a 4×32 or 32×4 block as an example, as mentioned above, the number of combinations allowed for 4×32 or 32×4 blocks can be 2. Therefore, for such current blocks, if the target combination is not the first combination, the parsing of other_mode can be skipped, and the remaining combinations can be directly determined as the above-mentioned target combinations.

[0332] Furthermore, in some implementations, if numOtherModes is greater than 1, other_mode may be parsed from the bitstream and the target combination determined based on other_mode. Assuming the current block is an 8×N or N×8 block (8≤N≤32), as mentioned above, the number of combinations allowed for an 8×N or N×8 block is 5. Therefore, for this type of current block, if the target combination is not the first combination, two binary codes may be parsed to determine the target combination.

[0333] A more specific example of how to determine the target combination is given below in conjunction with the code.

[0334] The coding unit syntax is as follows:

[0335] In some implementations, the target combination may be determined based on the combination index identifier of the target combination according to first_mode and other_mode in the index information. Then, the target combination may be determined based on the correspondence between the combination index identifier of the target combination and the combination.

[0336] Taking a 4×32 or 32×4 block as an example, the combination index identifier of the target combination can be first determined based on the index information and the correspondence between the index information and the combination index identifiers shown in Table 27. Then, the target combination can be determined based on the combination index identifier of the target combination and the correspondence between the combination index identifiers and the combinations shown in Table 22 or Table 23.

[0337] Taking the current block as an example of a 4×N or N×4 block other than a 4×32 or 32×4 block, the combination index identifier of the target combination can be first determined based on the index information and the correspondence between the index information and the combination index identifiers shown in Table 28. Then, the target combination can be determined based on the combination index identifier of the target combination and the correspondence between the combination index identifiers and combinations shown in Table 21.

[0338] In step S1430, interpolation filter coefficients are determined according to the target combination.

[0339] In some implementations, an interpolation filter corresponding to the target combination can be slid within the reconstruction region corresponding to the target combination to construct a set of autocorrelation coefficient matrices and a set of cross-correlation coefficient vectors. Then, a linear equation system can be constructed using the autocorrelation coefficient matrix and the cross-correlation coefficient vectors to further solve the interpolation filter coefficients.

[0340] In step S1440 , intra-frame prediction based on interpolation filtering is performed on the current block according to the interpolation filter coefficients.

[0341] In some implementations, prediction may be performed within the current block using interpolation filters in an order from top left to bottom right along the diagonal direction of the current block.

[0342] In some implementations, the interpolation filter may determine the prediction value of each prediction position within the current block based on the following formula (8):

[0343] pred r is the prediction result of the prediction block position r, Represents the input of the interpolation filter, a represents the number of input positions of the interpolation filter, p n represents the position difference between the nth input position in a input positions and the current output position, p n The specific position of is related to the shape of the interpolation filter, c n is the interpolation filter coefficient corresponding to the nth input position. The value of a is equal to the number of taps of the interpolation filter. For example, the value of a can be 15.

[0344] When r+p n When located in a reconstruction area, The reconstruction value within the reconstruction area is used as the input of the interpolation filter, as shown at position X in Figure 15; when r+p n When it is in the current block, Use the already predicted pixel value within the current block as input, as shown at position Y in Figure 15.

[0345] min and max are intended to limit the maximum and minimum values ​​of the predicted position of the current block (of course, in some embodiments, the maximum and minimum values ​​of the predicted value may not be limited).

[0346] In some implementations, the value of min may be 0, for example.

[0347] In some implementations, the value of max may be, for example, the maximum prediction value allowed under the current video sequence bit depth. For example, if the current video sequence bit depth is 10 bits, the value of max may be 1023.

[0348] In some implementations, if the current block is a chroma block, the DM mode is selected for prediction of the current block, and the intra-frame prediction mode of the luminance block corresponding to the current block is an intra-frame prediction mode based on interpolation filtering, a gradient histogram can be derived based on the predicted value of the luminance block at the corresponding position, and then a traditional intra-frame prediction mode (such as an angular prediction mode) can be analyzed based on the gradient histogram, and the chroma block can be predicted using this traditional prediction mode. For detailed description, please refer to the relevant description of Figure 6 above.

[0349] In some implementations, the method of FIG. 14 may further include: parsing the bitstream to determine quantized coefficients of the current block; performing inverse quantization on the quantized coefficients to determine transform coefficients of the current block; and performing inverse transformation on the transform coefficients to determine residual information of the current block. Various inverse transformation methods are possible. For example, if the current block is a luma block, a gradient histogram can be derived based on the luma prediction value of the luma block. A traditional intra-frame prediction mode (such as an angular prediction mode) can then be analyzed based on the gradient histogram, and a group of secondary transform kernels can be selected using the angular mode. The corresponding transform kernel can then be found within the corresponding secondary transform kernel group based on the decoded secondary transform index and inverse transformation can be performed. For another example, if the current block is a luma block, a gradient histogram can be derived based on the luma prediction value of the luma block. A traditional intra-frame prediction mode (such as an angular prediction mode) can then be analyzed based on the gradient histogram, and a group of primary transform kernels can be selected using the angular mode. The corresponding transform kernel can then be determined based on the decoded primary transform index and inverse transformation can be performed.

[0350] In some implementations, the method of FIG14 may further include determining reconstruction information for the current block based on the prediction value and residual information of the current block. For example, the prediction value and the residual value of the current block may be summed, and the summed result may be used as the reconstruction value of the current block.

[0351] The decoding method provided by the embodiment of the present application is described in detail above in conjunction with Figure 14. The encoding method provided by the embodiment of the present application is described in detail below in conjunction with Figure 16.

[0352] FIG16 is a flow chart of an encoding method according to an embodiment of the present application. The method of FIG16 can also be referred to as an intra-frame prediction method, or an intra-frame prediction method based on interpolation filtering. The method of FIG16 can be applied to an encoder.

[0353] 16 , in step S1610 , combinations allowed for the current block are determined based on the shape and / or size of the current block.

[0354] The current block may refer to a current block to be predicted or a current block to be decoded. In some implementations, the current block is a luma block. In other implementations, the current block may also be a chroma block. Regarding the shape and / or size of the current block and the combinations allowed for the current block, please refer to the above description and will not be repeated here.

[0355] In step S1620, interpolation filter coefficients are determined according to the combinations allowed for the current block.

[0356] For example, if the number of combinations allowed for the current block is M (M is a positive integer greater than or equal to 1), step S1620 may include: determining M groups of interpolation filter coefficients according to the M combinations allowed for the current block.

[0357] As a more specific example, for each combination allowed by the current block, the interpolation filter corresponding to the combination can be slid within the reconstruction area corresponding to the combination to construct a set of autocorrelation coefficient matrices and a set of cross-correlation coefficient vectors. Then, a linear equation system can be constructed using the autocorrelation coefficient matrix and the cross-correlation coefficient vectors to further solve the interpolation filter coefficients.

[0358] In step S1630, intra prediction based on interpolation filtering is performed on the current block according to the interpolation filter coefficients.

[0359] Assuming the number of combinations allowed for the current block is M, then M sets of interpolation filter coefficients are obtained in step S1620. In step S1630, intra-frame prediction based on interpolation filtering may be performed M times on the current block based on each set of interpolation filter coefficients in the M sets of interpolation filter coefficients. For example, prediction may be performed within the current block using interpolation filters in the diagonal direction of the current block, from the top left to the bottom right, for each set of interpolation filter coefficients in the M sets of interpolation filter coefficients.

[0360] In some implementations, the interpolation filter may determine the prediction value of each prediction position within the current block based on the following formula (9):

[0361] pred r is the prediction result of the prediction block position r, Represents the input of the interpolation filter, a represents the number of input positions of the interpolation filter, p n represents the position difference between the nth input position in a input positions and the current output position, p n The specific position of is related to the shape of the interpolation filter, c n is the interpolation filter coefficient corresponding to the nth input position. The value of a is equal to the number of taps of the interpolation filter. For example, the value of a can be 15.

[0362] When r+p n When located in a reconstruction area, The reconstruction value within the reconstruction area is used as the input of the interpolation filter, as shown at position X in Figure 15; when r+p n When it is in the current block, Use the already predicted pixel value within the current block as input, as shown at position Y in Figure 15.

[0363] min and max are intended to limit the maximum and minimum values ​​of the predicted position of the current block (of course, in some embodiments, the maximum and minimum values ​​of the predicted value may not be limited).

[0364] In some implementations, the value of min may be 0, for example.

[0365] In some implementations, the value of max may be, for example, the maximum prediction value allowed under the current video sequence bit depth. For example, if the current video sequence bit depth is 10 bits, the value of max may be 1023.

[0366] In some implementations, if the current block is a chroma block, the DM mode is selected for prediction of the current block, and the intra-frame prediction mode of the luminance block corresponding to the current block is an intra-frame prediction mode based on interpolation filtering, a gradient histogram can be derived based on the predicted value of the luminance block at the corresponding position, and then a traditional intra-frame prediction mode (such as an angular prediction mode) can be analyzed based on the gradient histogram, and the chroma block can be predicted using this traditional prediction mode. For detailed description, please refer to the relevant description of Figure 6 above.

[0367] In some implementations, the method of FIG16 may further include determining residual information of the current block based on the predicted value of the current block. For example, the difference between the original pixel value of the current block and the predicted value of the current block may be determined as the residual information of the current block.

[0368] In some implementations, if the prediction value of the current block is determined based on a target combination among the combinations allowed for the current block, first identification information is encoded, and the coded bits of the first identification information are written into the bitstream. The first identification information is used to indicate that the prediction mode of the current block is an intra-frame prediction mode based on interpolation filtering. For ease of description, cu_eip_flag is used below to represent the first identification information (of course, the first identification information may also be represented by any other letters and / or numbers). cu_eip_flag may be a context-adaptive arithmetic entropy coding syntax element (i.e., ae(v)).

[0369] In some implementations, the value of cu_eip_flag can be true or false.

[0370] In some implementations, cu_eip_flag can be encoded or decoded using a context model.

[0371] In some implementations, cu_eip_flag can be encoded or decoded using bypass coding.

[0372] In some implementations, if cu_eip_flag does not exist in the code stream, the value of cu_eip_flag may be a default value (eg, 0).

[0373] In some implementations, if the prediction value of the current block is determined based on a target combination among the combinations allowed for the current block, index information is encoded and encoding bits of the index information are written into the bitstream, wherein the index information is used to indicate the target combination.

[0374] The index information may be used to indicate or determine a target combination used by the current block in intra-frame prediction based on interpolation filtering. The target combination may be one of the combinations allowed for the current block (for an introduction to the combinations allowed for the current block, see above).

[0375] In some implementations, the index information may include an index value, and based on the index value, the target combination may be directly determined from the combinations allowed for the current block. For example, if the combinations allowed for the current block include four combinations, the index value may include two fixed-length binary codes. The two fixed-length binary codes have four values, corresponding one-to-one to the four combinations allowed for the current block.

[0376] As mentioned above, the probability of selecting a certain combination (hereinafter referred to as the first combination) is relatively high for blocks of various shapes / sizes. For example, if the interpolation filter shapes include EIP_FILTER_S, EIP_FILTER_V, and EIP_FILTER_H, and the reconstruction area types include EIP_AL_A_L, EIP_AL_A, and EIP_AL_L, the probability of selecting (EIP_AL_A_L, EIP_FILTER_S) for blocks of various shapes / sizes is relatively high. Therefore, in some implementations, this characteristic can be utilized to optimize the aforementioned index information, thereby reducing the number of encoding bits corresponding to the index information. For example, the index information can include second identification information. The second identification information can be a binary code. For ease of description, the second identification information will be represented by first_mode (of course, the second identification information can also be represented by any other letters and / or numbers). first_mode can be used to indicate whether the target combination is the first combination (e.g., (EIP_AL_A_L, EIP_FILTER_S)). If first_mode indicates that the target combination is the first combination, the index information may not carry the third identification information mentioned later (see later for detailed description), thereby reducing the number of coding bits corresponding to the index information.

[0377] In some implementations, first_mode may employ a context model for encoding or decoding.

[0378] In some implementations, first_mode may be encoded or decoded using a bypass encoding method.

[0379] In some implementations, if first_mode indicates that the target combination is not the first combination and / or the number of combinations allowed for the current block is greater than two, the index information may further include third identification information. This third identification information may be used to indicate the target combination from the combinations allowed for the current block, excluding the first combination. For ease of description, other_mode is used below to represent the third identification information (of course, the third identification information may also be represented by any other letters and / or numbers).

[0380] In some implementations, other_mode may be encoded or decoded using a context model.

[0381] In some implementations, other_mode may be encoded or decoded using a bypass encoding method.

[0382] In some implementations, other_mode may be represented by fixed-length codes of different lengths according to the number of combinations allowed for the current block.

[0383] As an example, assuming the current block is a 4×32 or 32×4 block, and the number of combinations allowed for the current block is 2, since the current block only allows two combinations. Therefore, in this case, the index information may only include first_mode. If first_mode indicates that the target combination is not the first combination, it means that the target combination is another combination of the two combinations other than the first combination. As an example, for a 4×32 or 32×4 block, the correspondence between the index information and the combinations allowed for the current block can be determined based on Table 27 above.

[0384] For another example, assume that the current block is a 4×N or N×4 block other than 4×32 or 32×4, and the number of combinations allowed for the current block is 3. Therefore, in addition to the first combination, the current block also allows two combinations. In this case, other_mode can use a fixed-length binary code to indicate the two combinations. As an example, for a 4×32 or 32×4 block, the correspondence between index information and the combinations allowed for the current block can be determined based on Table 28 above.

[0385] For another example, assuming the current block is an 8×N or N×8 block, and the number of combinations allowed for the current block is 5, then in addition to the first combination, the current block also allows four combinations. In this case, other_mode can use two fixed-length binary codes to indicate the four combinations. As an example, for an 8×N or N×8 block, the correspondence between index information and the combinations allowed for the current block can be determined based on Table 29 above.

[0386] For another example, assuming that the current block is a 16×16, 16×32, 32×16, or 32×32 block, and the number of combinations allowed for the current block is 9, the current block allows eight combinations in addition to the first combination. In this case, other_mode can use three fixed-length binary codes to indicate the eight combinations. As an example, for a 16×16, 16×32, 32×16, or 32×32 block, the correspondence between index information and the combinations allowed for the current block can be determined based on Table 30 above.

[0387] For another example, assuming the current block is a 4×16 or 16×4 block, and the number of combinations allowed for the current block is 2, since the current block only allows two combinations, in this case the index information may only include first_mode. If first_mode indicates that the target combination is not the first combination, it means that the target combination is another combination of the two combinations other than the first combination. As an example, for a 4×32 or 32×4 block, the correspondence between the index information and the combinations allowed for the current block can be determined based on Table 31 above.

[0388] For another example, assuming that the current block is an 8×32 or 32×8 block, and the number of combinations allowed for the current block is 3, the current block also allows two combinations in addition to the first combination. In this case, other_mode can use a fixed-length binary code to indicate the two combinations. As an example, for a 4×32 or 32×4 block, the correspondence between index information and the combinations allowed for the current block can be determined based on Table 32 above.

[0389] In some implementations, other_mode may be encoded using unary truncated code, binary truncated code, Golomb coding, etc. For example, if the number of combinations that other_mode needs to indicate is not a power of 2, the above encoding methods may be used for encoding.

[0390] In some implementations, it is possible to first determine whether the target combination is the first combination among the combinations allowed for the current block based on the first_mode in the index information. If the target combination is not the first combination among the combinations allowed for the current block, the number of remaining combinations other than the first combination among the combinations allowed for the current block can be determined. For ease of description, numOtherModes is used hereinafter to represent the number of the remaining combinations. If numOtherModes is equal to 1 (that is, the combinations allowed for the current block only contain one remaining combination other than the first combination), the encoding of other_mode can be skipped. Taking the current block as a 4×32 or 32×4 block as an example, as mentioned above, the number of combinations allowed for 4×32 or 32×4 blocks can be 2. Therefore, for such current blocks, if the target combination is not the first combination, the encoding of other_mode can be skipped.

[0391] Furthermore, in some implementations, if numOtherModes is greater than 1, other_mode may be encoded. Assuming the current block is an 8×N or N×8 block (8≤N≤32), as mentioned above, the number of combinations allowed for an 8×N or N×8 block is 5. Therefore, for such a current block, if the target combination is not the first combination, two binary codes of other_mode may be encoded to represent the target combination.

[0392] A more specific example is given below with code.

[0393] The coding unit syntax is as follows:

[0394] In some implementations, the method of FIG. 16 further includes: transforming the residual information to determine the transform coefficients; quantizing the transform coefficients to obtain quantized coefficients; encoding the quantized coefficients and writing the encoded bits into the bitstream.

[0395] There are many ways to transform. For example, if the current block is a luminance block, a gradient histogram can be derived based on the luminance prediction value of the luminance block. Then, a traditional intra-frame prediction mode (such as an angle prediction mode) can be analyzed based on the gradient histogram, and the angle mode can be used to select a group of secondary transformation kernels. Then, the corresponding transformation kernel can be found in the secondary transformation kernel corresponding to the group according to the decoded secondary transformation index for transformation. For another example, if the current block is a luminance block, a gradient histogram can be derived based on the luminance prediction value of the luminance block. Then, a traditional intra-frame prediction mode (such as an angle prediction mode) can be analyzed based on the gradient histogram, and the angle mode can be used to select a group of primary transformation kernels. Then, the corresponding transformation kernel can be determined according to the decoded primary transformation index for transformation.

[0396] The method embodiment of the present application is described in detail above in conjunction with Figures 1 to 16 . The device embodiment of the present application is described in detail below in conjunction with Figures 17 to 20 . It should be understood that the description of the method embodiment corresponds to the description of the device embodiment. Therefore, for parts not described in detail, reference can be made to the above method embodiment.

[0397] FIG17 is a schematic diagram of the structure of a decoder provided by an embodiment of the present application. As shown in FIG17 , the decoder 1700 includes: a decoding unit 1710 , a first determination unit 1720 , a second determination unit 1730 , and a prediction unit 1740 .

[0398] The decoding unit 1710 is configured to parse the code stream and determine first identification information and index information corresponding to the current block, where the first identification information is used to indicate that the prediction mode of the current block is the intra-frame prediction mode based on interpolation filtering.

[0399] The first determination unit 1720 is configured to determine a target combination from the combinations allowed for use by the current block based on the index information, the combinations allowed for use by the current block including at least one combination, wherein each combination corresponds to a type of reconstruction area and an interpolation filter shape, the reconstruction area is used to obtain interpolation filter coefficients, and the combinations allowed for use by the current block correspond to the shape and / or size of the current block.

[0400] The second determining unit 1730 is configured to determine an interpolation filter coefficient according to the target combination.

[0401] The prediction unit 1740 is configured to perform intra-frame prediction based on interpolation filtering on the current block according to the interpolation filter coefficients.

[0402] In some implementations, if the size of the current block is greater than or equal to a first size, the number of combinations allowed to be used for the current block is the first number; if the size of the current block is smaller than the first size, the number of combinations allowed to be used for the current block is smaller than the first number.

[0403] In some implementations, the first size is greater than or equal to 16×16.

[0404] In some implementations, the first number is 9.

[0405] In some implementations, the first number is a maximum value of the number of combinations allowed for the block to be predicted.

[0406] In some implementations, if the size of the current block is greater than or equal to the first size, the combinations allowed to be used for the current block include one or more of the following: a first combination, corresponding to the first type of reconstruction area and the first interpolation filter shape; a second combination, corresponding to the first type of reconstruction area and the second interpolation filter shape; a third combination, corresponding to the first type of reconstruction area and the third interpolation filter shape; a fourth combination, corresponding to the second type of reconstruction area and the first interpolation filter shape; a fifth combination, corresponding to the second type of reconstruction area and the second interpolation filter shape; a sixth combination, corresponding to the second type of reconstruction area and the third interpolation filter shape; a seventh combination, corresponding to the third type of reconstruction area and the first interpolation filter shape; an eighth combination, corresponding to the third type of reconstruction area and the second interpolation filter shape; and a ninth combination, corresponding to the third type of reconstruction area and the third interpolation filter shape.

[0407] In some implementations, the first type of reconstruction area includes the reconstruction areas on the left and above the block to be predicted, the second type of reconstruction area is the reconstruction area on the above side of the block to be predicted, and the third type of reconstruction area is the reconstruction area on the left side of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

[0408] In some implementations, if the current block is a 4×N and / or N×4 block, the number of combinations allowed to be used for the current block is less than or equal to a second number, the second number is less than the maximum number of combinations allowed to be used for the block to be predicted, and N is a positive integer less than or equal to 32.

[0409] In some implementations, if the current block is a 4×32, 4×16, 16×4, or 32×4 block, the number of combinations allowed to be used for the current block is less than or equal to a third number, and the third number is less than the second number.

[0410] In some implementations, the third number is 2.

[0411] In some implementations, the second number is 3.

[0412] In some implementations, if the current block is a 4×4, 4×8, 4×16, 8×4, or 16×4 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction area and a second interpolation filter shape; and a third combination, corresponding to the first type of reconstruction area and a third interpolation filter shape.

[0413] In some implementations, the first type of reconstruction area includes reconstruction areas on the left and top sides of the block to be predicted, the first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

[0414] In some implementations, if the current block is a 4×32 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; and a third combination, corresponding to the first type of reconstruction area and a third interpolation filter shape.

[0415] In some implementations, the first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, the first interpolation filter has a shape of 4×4, and the third interpolation filter has a shape of 8×2.

[0416] In some implementations, if the current block is a 32×4 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; and a second combination, corresponding to the first type of reconstruction area and a second interpolation filter shape.

[0417] In some implementations, the first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, the first interpolation filter has a shape of 4×4, and the second interpolation filter has a shape of 2×8.

[0418] In some implementations, if the current block is an 8×N and / or N×8 block, the number of combinations allowed to be used for the current block is less than or equal to a fourth number, and the fourth number is less than the maximum number of combinations allowed to be used for the block to be predicted, N is a positive integer, and 8≤N≤32.

[0419] In some implementations, if the current block is an 8×32 or 32×8 block, the number of combinations allowed to be used by the current block is less than or equal to the fifth number.

[0420] In some implementations, the fifth number is 3.

[0421] In some implementations, the fourth number is 5.

[0422] In some implementations, if the current block is an 8×8 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; a second combination, corresponding to a first type of reconstruction area and a second interpolation filter shape; a third combination, corresponding to a first type of reconstruction area and a third interpolation filter shape; a fourth combination, corresponding to a second type of reconstruction area and a first interpolation filter shape; and a seventh combination, corresponding to a third type of reconstruction area and a first interpolation filter shape.

[0423] In some implementations, the first type of reconstruction area includes the reconstruction areas above and to the left of the block to be predicted, the second type of reconstruction area is the reconstruction area above the block to be predicted, and the third type of reconstruction area is the reconstruction area to the left of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

[0424] In some implementations, if the current block is an 8×16 or 8×32 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; a second combination, corresponding to a first type of reconstruction area and a second interpolation filter shape; a third combination, corresponding to a first type of reconstruction area and a third interpolation filter shape; a seventh combination, corresponding to a third type of reconstruction area and the first interpolation filter shape; and a ninth combination, corresponding to a third type of reconstruction area and a third interpolation filter shape.

[0425] In some implementations, the first type of reconstruction area includes the reconstruction areas above and to the left of the block to be predicted, the third type of reconstruction area is the reconstruction area to the left of the block to be predicted, the first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

[0426] In some implementations, if the current block is a 16×8 or 32×8 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; a second combination, corresponding to a first type of reconstruction area and a second interpolation filter shape; a third combination, corresponding to a first type of reconstruction area and a third interpolation filter shape; a fifth combination, corresponding to a second type of reconstruction area and a second interpolation filter shape; and a seventh combination, corresponding to a third type of reconstruction area and a first interpolation filter shape.

[0427] In some implementations, the first type of reconstruction area includes the reconstruction areas above and to the left of the block to be predicted, the second type of reconstruction area is the reconstruction area above the block to be predicted, and the third type of reconstruction area is the reconstruction area to the left of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

[0428] In some implementations, the use of an intra-frame prediction mode based on interpolation filtering is prohibited for a first target prediction block, where the first target prediction block includes one or more of the following: a 4×4 block; a 4×N block; a block whose width is greater than twice its height; a block whose height is greater than twice its width; where N is a positive integer less than or equal to 32.

[0429] In some implementations, for any block to be predicted that is allowed to use the intra prediction mode based on interpolation filtering, the combinations allowed for the block to be predicted include a first combination corresponding to a first type of reconstruction region and a first filter shape.

[0430] In some implementations, the first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, and the first filter shape is 4×4.

[0431] In some implementations, the index information includes second identification information, where the second identification information is used to indicate whether the target combination is a first combination, where the first combination corresponds to a first type of reconstruction region and a first filter shape.

[0432] In some implementations, the first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, and the first filter shape is 4×4.

[0433] In some implementations, if the second identification information indicates that the target combination is not the first combination and / or the number of combinations allowed for use in the current block is greater than 2, the index information also includes third identification information, and the third identification information is used to indicate the target combination from the remaining combinations allowed by the current block except the first combination.

[0434] In some implementations, the decoding unit is further configured to: parse the bitstream to determine the quantized coefficients of the current block; the decoder 1700 further includes:

[0435] a third determining unit, configured to perform inverse quantization on the quantized coefficients to determine transform coefficients of the current block;

[0436] a fourth determining unit configured to perform an inverse transform on the transform coefficients to determine residual information of the current block;

[0437] The fifth determining unit is configured to determine the reconstruction information of the current block according to the prediction value of the current block and the residual information.

[0438] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.

[0439] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, or the portion that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0440] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the decoder 1700. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the decoding method in the first embodiment.

[0441] Based on the composition of the above-mentioned decoder 1700 and the computer-readable storage medium, refer to Figure 18, which shows a specific hardware structure diagram of the decoder 1700 provided in an embodiment of the present application. As shown in Figure 18, the decoder 1800 may include: a communication interface 1810, a memory 1820 and a processor 1830; each component is coupled together through a bus system 1840. It can be understood that the bus system 1840 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 1840 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as bus system 1840 in Figure 18. Among them,

[0442] Communication interface 1810, used for sending and receiving signals when sending and receiving information with other external network elements;

[0443] Memory 1820, for storing computer programs;

[0444] The processor 1830 is configured to, when running the computer program, execute:

[0445] Parse the code stream to determine the current point in the point cloud to be decoded;

[0446] If the current point is a repeated point, a decoding method for the sign bit of the color residual of the current point is determined according to a decoding order of the color components of the current point.

[0447] It is understood that the memory 1820 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 1820 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0448] The processor 1830 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the processor 1830. The processor 1830 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 1820 , and the processor 1830 reads the information in the memory 1820 and completes the steps of the above method in combination with its hardware.

[0449] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0450] Optionally, as another embodiment, the processor 1830 is further configured to execute the decoding method described in the above embodiment when running the computer program.

[0451] FIG19 is a schematic diagram of the structure of an encoder provided by an embodiment of the present application. As shown in FIG19 , the encoder 1900 includes: a first determination unit 1910 , a second determination unit 1920 , and a prediction unit 1930 .

[0452] The first determination unit 1910 is configured to determine the combinations allowed to be used for the current block based on the shape and / or size of the current block, where the combinations allowed to be used for the current block include at least one combination, where each combination corresponds to a type of reconstruction area and an interpolation filter shape, and the reconstruction area is used to obtain the interpolation filter coefficient.

[0453] The second determining unit 1920 is configured to determine the interpolation filter coefficient according to the combination allowed to be used by the current block.

[0454] The prediction unit 1930 is configured to perform intra-frame prediction based on interpolation filtering on the current block according to the interpolation filter coefficients.

[0455] In some implementations, if the size of the current block is greater than or equal to a first size, the number of combinations allowed to be used for the current block is the first number; if the size of the current block is smaller than the first size, the number of combinations allowed to be used for the current block is smaller than the first number.

[0456] In some implementations, the first size is greater than or equal to 16×16.

[0457] In some implementations, the first number is 9.

[0458] In some implementations, the first number is a maximum value of the number of combinations allowed for the block to be predicted.

[0459] In some implementations, if the size of the current block is greater than or equal to the first size, the combinations allowed to be used for the current block include one or more of the following: a first combination, corresponding to the first type of reconstruction area and the first interpolation filter shape; a second combination, corresponding to the first type of reconstruction area and the second interpolation filter shape; a third combination, corresponding to the first type of reconstruction area and the third interpolation filter shape; a fourth combination, corresponding to the second type of reconstruction area and the first interpolation filter shape; a fifth combination, corresponding to the second type of reconstruction area and the second interpolation filter shape; a sixth combination, corresponding to the second type of reconstruction area and the third interpolation filter shape; a seventh combination, corresponding to the third type of reconstruction area and the first interpolation filter shape; an eighth combination, corresponding to the third type of reconstruction area and the second interpolation filter shape; and a ninth combination, corresponding to the third type of reconstruction area and the third interpolation filter shape.

[0460] In some implementations, the first type of reconstruction area includes the reconstruction areas above and to the left of the block to be predicted, the second type of reconstruction area is the reconstruction area above the block to be predicted, and the third type of reconstruction area is the reconstruction area to the left of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

[0461] In some implementations, if the current block is a 4×N and / or N×4 block, the number of combinations allowed to be used for the current block is less than or equal to a second number, the second number is less than the maximum number of combinations allowed to be used for the block to be predicted, and N is a positive integer less than or equal to 32.

[0462] In some implementations, if the current block is a 4×32, 4×16, 16×4, or 32×4 block, the number of combinations allowed to be used for the current block is less than or equal to a third number, and the third number is less than the second number.

[0463] In some implementations, the third number is 2.

[0464] In some implementations, the second number is 3.

[0465] In some implementations, if the current block is a 4×4, 4×8, 4×16, 8×4, or 16×4 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction area and a second interpolation filter shape; and a third combination, corresponding to the first type of reconstruction area and a third interpolation filter shape.

[0466] In some implementations, the first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, the first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

[0467] In some implementations, if the current block is a 4×32 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; and a third combination, corresponding to the first type of reconstruction area and a third interpolation filter shape.

[0468] In some implementations, the first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, the first interpolation filter has a shape of 4×4, and the third interpolation filter has a shape of 8×2.

[0469] In some implementations, if the current block is a 32×4 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; and a second combination, corresponding to the first type of reconstruction area and a second interpolation filter shape.

[0470] In some implementations, the first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, the first interpolation filter has a shape of 4×4, and the second interpolation filter has a shape of 2×8.

[0471] In some implementations, if the current block is an 8×N and / or N×8 block, the number of combinations allowed to be used for the current block is less than or equal to a fourth number, and the fourth number is less than the maximum number of combinations allowed to be used for the block to be predicted, N is a positive integer, and 8≤N≤32.

[0472] In some implementations, if the current block is an 8×32 or 32×8 block, the number of combinations allowed to be used by the current block is less than or equal to the fifth number.

[0473] In some implementations, the fifth number is 3.

[0474] In some implementations, the fourth number is 5.

[0475] In some implementations, if the current block is an 8×8 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; a second combination, corresponding to a first type of reconstruction area and a second interpolation filter shape; a third combination, corresponding to a first type of reconstruction area and a third interpolation filter shape; a fourth combination, corresponding to a second type of reconstruction area and a first interpolation filter shape; and a seventh combination, corresponding to a third type of reconstruction area and a first interpolation filter shape.

[0476] In some implementations, the first type of reconstruction area includes the reconstruction areas above and to the left of the block to be predicted, the second type of reconstruction area is the reconstruction area above the block to be predicted, and the third type of reconstruction area is the reconstruction area to the left of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

[0477] In some implementations, if the current block is an 8×16 or 8×32 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; a second combination, corresponding to a first type of reconstruction area and a second interpolation filter shape; a third combination, corresponding to a first type of reconstruction area and a third interpolation filter shape; a seventh combination, corresponding to a third type of reconstruction area and the first interpolation filter shape; and a ninth combination, corresponding to a third type of reconstruction area and a third interpolation filter shape.

[0478] In some implementations, the first type of reconstruction area includes the reconstruction areas above and to the left of the block to be predicted, the third type of reconstruction area is the reconstruction area to the left of the block to be predicted, the first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

[0479] In some implementations, if the current block is a 16×8 or 32×8 block, the combinations allowed for use by the current block include one or more of the following combinations: a first combination, corresponding to a first type of reconstruction area and a first interpolation filter shape; a second combination, corresponding to a first type of reconstruction area and a second interpolation filter shape; a third combination, corresponding to a first type of reconstruction area and a third interpolation filter shape; a fifth combination, corresponding to a second type of reconstruction area and a second interpolation filter shape; and a seventh combination, corresponding to a third type of reconstruction area and a first interpolation filter shape.

[0480] In some implementations, the first type of reconstruction area includes the reconstruction areas above and to the left of the block to be predicted, the second type of reconstruction area is the reconstruction area above the block to be predicted, and the third type of reconstruction area is the reconstruction area to the left of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

[0481] In some implementations, the use of an intra-frame prediction mode based on interpolation filtering is prohibited for a first target prediction block, where the first target prediction block includes one or more of the following: a 4×4 block; a 4×N block; a block whose width is greater than twice its height; a block whose height is greater than twice its width; where N is a positive integer less than or equal to 32.

[0482] In some implementations, for any block to be predicted that is allowed to use the intra prediction mode based on interpolation filtering, the combinations allowed for the block to be predicted include a first combination corresponding to a first type of reconstruction region and a first filter shape.

[0483] In some implementations, the first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, and the first filter shape is 4×4.

[0484] In some implementations, the encoder 1900 further includes: a third determination unit, configured to determine the residual information of the current block based on the prediction value of the current block, wherein the prediction value of the current block is determined based on a target combination among the combinations allowed to be used by the current block; a first encoding unit, configured to encode first identification information and / or index information, and write the encoding bits of the first identification information and / or the index information into the bitstream; wherein the first identification information is used to indicate that the prediction mode of the current block is an intra-frame prediction mode based on interpolation filtering, and the index information is used to indicate the target combination.

[0485] In some implementations, the index information includes second identification information, where the second identification information is used to indicate whether the target combination is a first combination, where the first combination corresponds to a first type of reconstruction region and a first filter shape.

[0486] In some implementations, the first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, and the first filter shape is 4×4.

[0487] In some implementations, if the second identification information indicates that the target combination is not the first combination and / or the number of combinations allowed for use in the current block is greater than 2, the index information also includes third identification information, and the third identification information is used to indicate the target combination from the remaining combinations allowed for use in the current block except the first combination.

[0488] In some implementations, the encoder 1900 further includes:

[0489] a fourth determining unit, configured to transform the residual information to determine a transformation coefficient;

[0490] a quantization unit configured to quantize the transform coefficients to obtain quantized coefficients;

[0491] The second encoding unit is configured to encode the quantized coefficients and write the encoded bits into a bit stream.

[0492] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.

[0493] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, or the portion that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0494] Therefore, an embodiment of the present application provides a computer-readable storage medium, which is applied to the encoder 1900. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the decoding method described in any one of the aforementioned embodiments.

[0495] Based on the composition of the above-mentioned encoder 1900 and the computer-readable storage medium, refer to Figure 20, which shows a specific hardware structure diagram of the encoder 1900 provided in an embodiment of the present application. As shown in Figure 20, the encoder 2000 may include: a communication interface 2010, a memory 2020 and a processor 2030; each component is coupled together through a bus system 2040. It can be understood that the bus system 2040 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 2040 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as bus systems 2040 in Figure 20. Among them,

[0496] Communication interface 2010, used for sending and receiving signals when sending and receiving information with other external network elements;

[0497] Memory 2020, for storing computer programs;

[0498] The processor 2030 is configured to, when running the computer program, execute:

[0499] Determine the current point in the point cloud to be encoded;

[0500] If the current point is a repeated point, the encoding method of the sign bit of the color residual of the current point is determined according to the encoding order of the color components of the current point.

[0501] It is understood that the memory 2020 in the embodiment of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 2020 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0502] The processor 2030 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the processor 2030. The above-mentioned processor 2030 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. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 2020, and the processor 2030 reads the information in the memory 2020 and completes the steps of the above method in combination with its hardware.

[0503] It is understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0504] Optionally, as another embodiment, the processor 2030 is further configured to execute the encoding method in the aforementioned embodiment when running the computer program.

[0505] It should be noted that, in this application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0506] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0507] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0508] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0509] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0510] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A decoding method, applied to a decoder, the method comprising: Parsing a bitstream to determine first identification information and index information corresponding to a current block, wherein the first identification information is used to indicate that a prediction mode of the current block is an intra-frame prediction mode based on interpolation filtering; Determine, according to the index information, a target combination from combinations allowed for the current block, the combinations allowed for the current block comprising at least one combination, wherein each combination corresponds to a type of reconstruction region and an interpolation filter shape, the reconstruction region is used to obtain an interpolation filter coefficient, and the combination allowed for the current block corresponds to a shape and / or size of the current block; Determining interpolation filter coefficients according to the target combination; According to the interpolation filter coefficients, intra-frame prediction based on interpolation filtering is performed on the current block.

2. The method according to claim 1, wherein: If the size of the current block is greater than or equal to the first size, the number of combinations allowed to be used by the current block is the first number; If the size of the current block is smaller than the first size, the number of combinations allowed to be used by the current block is smaller than the first number.

3. The method according to claim 2, wherein: The first size is greater than or equal to 16×16.

4. The method according to claim 2, wherein: The first number is 9.

5. The method according to claim 2, wherein: The first number is the maximum value of the number of combinations allowed for the block to be predicted.

6. The method according to claim 2, wherein: If the size of the current block is greater than or equal to the first size, the combinations allowed to be used by the current block include one or more of the following: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction region and the second interpolation filter shape; a third combination corresponding to the first type of reconstruction region and a third interpolation filter shape; a fourth combination, corresponding to the second type of reconstruction region and the first interpolation filter shape; A fifth combination, corresponding to the second type of reconstruction area and the second interpolation filter shape; a sixth combination, corresponding to the second type of reconstruction region and the third interpolation filter shape; a seventh combination, corresponding to the third type of reconstruction region and the first interpolation filter shape; an eighth combination, corresponding to the third type of reconstruction area and the second interpolation filter shape; The ninth combination corresponds to the third type of reconstruction area and the third interpolation filter shape.

7. The method according to claim 6, wherein: The first type of reconstruction area includes the reconstruction areas on the left and top of the block to be predicted, the second type of reconstruction area is the reconstruction area on the top of the block to be predicted, the third type of reconstruction area is the reconstruction area on the left of the block to be predicted, the first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

8. The method of claim 1, wherein: If the current block is a 4×N and / or N×4 block, the number of combinations allowed to be used for the current block is less than or equal to a second number, the second number is less than the maximum number of combinations allowed to be used for the block to be predicted, and N is a positive integer less than or equal to 32.

9. The method according to claim 8, wherein: If the current block is a 4×32, 4×16, 16×4 or 32×4 block, the number of combinations allowed to be used by the current block is less than or equal to a third number, and the third number is less than the second number.

10. The method according to claim 9, wherein: The third number is 2.

11. The method according to claim 8, wherein: The second number is 3.

12. The method according to claim 8, wherein: If the current block is a 4×4, 4×8, 4×16, 8×4 or 16×4 block, the combinations allowed for the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction region and the second interpolation filter shape; The third combination corresponds to the first type of reconstruction area and the third interpolation filter shape.

13. The method according to claim 12, wherein: The first type of reconstruction area includes reconstruction areas on the left and top sides of the block to be predicted, the first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

14. The method of claim 8, wherein: If the current block is a 4×32 block, the combinations allowed to be used by the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; The third combination corresponds to the first type of reconstruction area and the third interpolation filter shape.

15. The method according to claim 14, wherein: The first type of reconstruction area includes reconstruction areas on the upper side and the left side of the block to be predicted, the first interpolation filter has a shape of 4×4, and the third interpolation filter has a shape of 8×2.

16. The method of claim 8, wherein: If the current block is a 32×4 block, the combinations allowed to be used by the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; The second combination corresponds to the first type of reconstruction area and the second interpolation filter shape.

17. The method according to claim 16, wherein: The first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, the first interpolation filter has a shape of 4×4, and the second interpolation filter has a shape of 2×8.

18. The method of claim 1, wherein: If the current block is an 8×N and / or N×8 block, the number of combinations allowed to be used for the current block is less than or equal to a fourth number, and the fourth number is less than the maximum number of combinations allowed to be used for the block to be predicted, N is a positive integer, and 8≤N≤32.

19. The method of claim 18, wherein: If the current block is an 8×32 or 32×8 block, the number of combinations allowed to be used by the current block is less than or equal to the fifth number.

20. The method according to claim 19, wherein: The fifth number is 3.

21. The method according to claim 18, wherein: The fourth number is 5.

22. The method of claim 18, wherein: If the current block is an 8×8 block, the combinations allowed to be used by the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction region and the second interpolation filter shape; a third combination corresponding to the first type of reconstruction region and a third interpolation filter shape; a fourth combination, corresponding to the second type of reconstruction region and the first interpolation filter shape; The seventh combination corresponds to the third type of reconstruction area and the first interpolation filter shape.

23. The method according to claim 22, wherein: The first type of reconstruction area includes the reconstruction areas on the upper and left sides of the block to be predicted, the second type of reconstruction area is the reconstruction area on the upper side of the block to be predicted, and the third type of reconstruction area is the reconstruction area on the left side of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

24. The method of claim 18, wherein: If the current block is an 8×16 or 8×32 block, the combinations allowed to be used by the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction region and the second interpolation filter shape; a third combination corresponding to the first type of reconstruction region and a third interpolation filter shape; a seventh combination, corresponding to the third type of reconstruction region and the first interpolation filter shape; The ninth combination corresponds to the third type of reconstruction area and the third interpolation filter shape.

25. The method according to claim 24, wherein: The first type of reconstruction area includes the reconstruction areas on the upper and left sides of the block to be predicted, the third type of reconstruction area is the reconstruction area on the left side of the block to be predicted, the first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

26. The method of claim 18, wherein: If the current block is a 16×8 or 32×8 block, the combinations allowed for the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction region and the second interpolation filter shape; a third combination corresponding to the first type of reconstruction region and a third interpolation filter shape; A fifth combination, corresponding to the second type of reconstruction area and the second interpolation filter shape; The seventh combination corresponds to the third type of reconstruction area and the first interpolation filter shape.

27. The method according to claim 26, wherein: The first type of reconstruction area includes the reconstruction areas on the upper and left sides of the block to be predicted, the second type of reconstruction area is the reconstruction area on the upper side of the block to be predicted, and the third type of reconstruction area is the reconstruction area on the left side of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

28. The method of claim 1, wherein: For a first target prediction block, an intra prediction mode based on interpolation filtering is prohibited, and the first target prediction block includes one or more of the following: 4×4 blocks; 4×N blocks; A block whose width is greater than twice its height; A block whose height is greater than twice its width; Wherein, N is a positive integer less than or equal to 32.

29. The method of claim 1, wherein: For any block to be predicted that is allowed to use the intra prediction mode based on interpolation filtering, the combinations allowed to be used by the block to be predicted include a first combination, and the first combination corresponds to a first type of reconstruction area and a first filter shape.

30. The method of claim 29, wherein: The first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, and the first filter shape is 4×4.

31. The method of claim 1, wherein: The index information includes second identification information, where the second identification information is used to indicate whether the target combination is a first combination, where the first combination corresponds to a first type of reconstruction area and a first filter shape.

32. The method according to claim 31, wherein: The first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, and the first filter shape is 4×4.

33. The method according to claim 31 or 32, wherein: If the second identification information indicates that the target combination is not the first combination and / or the number of combinations allowed for the current block is greater than 2, the index information also includes third identification information, and the third identification information is used to indicate the target combination from the remaining combinations allowed by the current block except the first combination.

34. The method of claim 1, wherein: The method further comprises: Parsing a bitstream to determine quantized coefficients of the current block; De-quantizing the quantized coefficients to determine the transform coefficients of the current block; Performing an inverse transformation on the transformation coefficients to determine residual information of the current block; Reconstruction information of the current block is determined according to the prediction value of the current block and the residual information.

35. A coding method, applied to an encoder, the method comprising: Determine, according to the shape and / or size of the current block, a combination allowed to be used by the current block, wherein the combination allowed to be used by the current block includes at least one combination, wherein each combination corresponds to a type of reconstruction area and an interpolation filter shape, and the reconstruction area is used to obtain an interpolation filter coefficient; Determining interpolation filter coefficients according to a combination allowed to be used by the current block; According to the interpolation filter coefficients, intra-frame prediction based on interpolation filtering is performed on the current block.

36. The method of claim 35, wherein: If the size of the current block is greater than or equal to the first size, the number of combinations allowed to be used by the current block is the first number; If the size of the current block is smaller than the first size, the number of combinations allowed to be used by the current block is smaller than the first number.

37. The method of claim 36, wherein: The first size is greater than or equal to 16×16.

38. The method of claim 36, wherein: The first number is 9.

39. The method of claim 36, wherein: The first number is the maximum value of the number of combinations allowed for the block to be predicted.

40. The method of claim 36, wherein: If the size of the current block is greater than or equal to the first size, the combinations allowed to be used by the current block include one or more of the following: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction region and the second interpolation filter shape; a third combination corresponding to the first type of reconstruction region and a third interpolation filter shape; a fourth combination, corresponding to the second type of reconstruction region and the first interpolation filter shape; A fifth combination, corresponding to the second type of reconstruction area and the second interpolation filter shape; a sixth combination, corresponding to the second type of reconstruction region and the third interpolation filter shape; a seventh combination, corresponding to the third type of reconstruction region and the first interpolation filter shape; an eighth combination, corresponding to the third type of reconstruction area and the second interpolation filter shape; The ninth combination corresponds to the third type of reconstruction area and the third interpolation filter shape.

41. The method of claim 40, wherein: The first type of reconstruction area includes the reconstruction areas on the upper and left sides of the block to be predicted, the second type of reconstruction area is the reconstruction area on the upper side of the block to be predicted, and the third type of reconstruction area is the reconstruction area on the left side of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

42. The method of claim 35, wherein: If the current block is a 4×N and / or N×4 block, the number of combinations allowed to be used for the current block is less than or equal to a second number, the second number is less than the maximum number of combinations allowed to be used for the block to be predicted, and N is a positive integer less than or equal to 32.

43. The method of claim 42, wherein: If the current block is a 4×32, 4×16, 16×4 or 32×4 block, the number of combinations allowed to be used by the current block is less than or equal to a third number, and the third number is less than the second number.

44. The method of claim 43, wherein: The third number is 2.

45. The method of claim 42, wherein: The second number is 3.

46. ​​The method of claim 42, wherein: If the current block is a 4×4, 4×8, 4×16, 8×4 or 16×4 block, the combinations allowed for the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction region and the second interpolation filter shape; The third combination corresponds to the first type of reconstruction area and the third interpolation filter shape.

47. The method of claim 46, wherein: The first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, the first interpolation filter has a shape of 4×4, the second interpolation filter has a shape of 2×8, and the third interpolation filter has a shape of 8×2.

48. The method of claim 42, wherein: If the current block is a 4×32 block, the combinations allowed to be used by the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; The third combination corresponds to the first type of reconstruction area and the third interpolation filter shape.

49. The method of claim 48, wherein: The first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, the first interpolation filter has a shape of 4×4, and the third interpolation filter has a shape of 8×2.

50. The method of claim 42, wherein: If the current block is a 32×4 block, the combinations allowed to be used by the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; The second combination corresponds to the first type of reconstruction area and the second interpolation filter shape.

51. The method of claim 50, wherein: The first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, the first interpolation filter has a shape of 4×4, and the second interpolation filter has a shape of 2×8.

52. The method of claim 35, wherein: If the current block is an 8×N and / or N×8 block, the number of combinations allowed to be used for the current block is less than or equal to a fourth number, and the fourth number is less than the maximum number of combinations allowed to be used for the block to be predicted, N is a positive integer, and 8≤N≤32.

53. The method of claim 52, wherein: If the current block is an 8×32 or 32×8 block, the number of combinations allowed to be used by the current block is less than or equal to the fifth number.

54. The method of claim 53, wherein: The fifth number is 3.

55. The method of claim 52, wherein: The fourth number is 5.

56. The method of claim 52, wherein: If the current block is an 8×8 block, the combinations allowed to be used by the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction region and the second interpolation filter shape; a third combination corresponding to the first type of reconstruction region and a third interpolation filter shape; a fourth combination, corresponding to the second type of reconstruction region and the first interpolation filter shape; The seventh combination corresponds to the third type of reconstruction area and the first interpolation filter shape.

57. The method of claim 56, wherein: The first type of reconstruction area includes the reconstruction areas on the upper and left sides of the block to be predicted, the second type of reconstruction area is the reconstruction area on the upper side of the block to be predicted, and the third type of reconstruction area is the reconstruction area on the left side of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

58. The method of claim 52, wherein: If the current block is an 8×16 or 8×32 block, the combinations allowed to be used by the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction region and the second interpolation filter shape; a third combination corresponding to the first type of reconstruction region and a third interpolation filter shape; a seventh combination, corresponding to the third type of reconstruction region and the first interpolation filter shape; The ninth combination corresponds to the third type of reconstruction area and the third interpolation filter shape.

59. The method of claim 58, wherein: The first type of reconstruction area includes the reconstruction areas on the upper and left sides of the block to be predicted, the third type of reconstruction area is the reconstruction area on the left side of the block to be predicted, the first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

60. The method of claim 52, wherein: If the current block is a 16×8 or 32×8 block, the combinations allowed for the current block include one or more of the following combinations: a first combination corresponding to a first type of reconstruction region and a first interpolation filter shape; a second combination, corresponding to the first type of reconstruction region and the second interpolation filter shape; a third combination corresponding to the first type of reconstruction region and a third interpolation filter shape; A fifth combination, corresponding to the second type of reconstruction area and the second interpolation filter shape; The seventh combination corresponds to the third type of reconstruction area and the first interpolation filter shape.

61. The method of claim 60, wherein: The first type of reconstruction area includes the reconstruction areas on the upper and left sides of the block to be predicted, the second type of reconstruction area is the reconstruction area on the upper side of the block to be predicted, and the third type of reconstruction area is the reconstruction area on the left side of the block to be predicted. The first interpolation filter shape is 4×4, the second interpolation filter shape is 2×8, and the third interpolation filter shape is 8×2.

62. The method of claim 35, wherein: For a first target prediction block, an intra prediction mode based on interpolation filtering is prohibited, and the first target prediction block includes one or more of the following: 4×4 blocks; 4×N blocks; A block whose width is greater than twice its height; A block whose height is greater than twice its width; Wherein, N is a positive integer less than or equal to 32.

63. The method of claim 35, wherein: For any block to be predicted that is allowed to use the intra prediction mode based on interpolation filtering, the combinations allowed to be used by the block to be predicted include a first combination, and the first combination corresponds to a first type of reconstruction area and a first filter shape.

64. The method of claim 63, wherein: The first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, and the first filter shape is 4×4.

65. The method of claim 35, wherein: The method further comprises: Determining residual information of the current block according to a prediction value of the current block, wherein the prediction value of the current block is determined based on a target combination among combinations allowed to be used by the current block; Encode the first identification information and / or the index information, and write the encoded bits of the first identification information and / or the index information into a bitstream; The first identification information is used to indicate that the prediction mode of the current block is an intra-frame prediction mode based on interpolation filtering, and the index information is used to indicate the target combination.

66. The method of claim 65, wherein: The index information includes second identification information, where the second identification information is used to indicate whether the target combination is a first combination, where the first combination corresponds to a first type of reconstruction area and a first filter shape.

67. The method of claim 66, wherein: The first type of reconstruction area includes reconstruction areas above and to the left of the block to be predicted, and the first filter shape is 4×4.

68. The method of claim 66 or 67, wherein: If the second identification information indicates that the target combination is not the first combination and / or the number of combinations allowed for use in the current block is greater than 2, the index information also includes third identification information, and the third identification information is used to indicate the target combination from the remaining combinations allowed for use in the current block except the first combination.

69. The method of claim 65, wherein: The method further comprises: Transforming the residual information to determine a transformation coefficient; quantizing the transform coefficients to obtain quantized coefficients; The quantized coefficients are encoded, and the encoded bits are written into a bit stream.

70. A decoder, the decoder comprising: A decoding unit, configured to parse the bitstream and determine first identification information and index information corresponding to a current block, wherein the first identification information is used to indicate that a prediction mode of the current block is an intra-frame prediction mode based on interpolation filtering; a first determining unit configured to determine, according to the index information, a target combination from combinations allowed for the current block, the combinations allowed for the current block comprising at least one combination, wherein each combination corresponds to a type of reconstruction region and an interpolation filter shape, the reconstruction region being used to obtain an interpolation filter coefficient, and the combination allowed for the current block corresponding to a shape and / or size of the current block; A second determining unit is configured to determine an interpolation filter coefficient according to the target combination; The prediction unit is configured to perform intra-frame prediction based on interpolation filtering on the current block according to the interpolation filtering coefficient.

71. A decoder, the decoder comprising: Memory for storing computer programs; A processor, configured to execute the method according to any one of claims 1 to 34 when running the computer program.

72. An encoder, comprising: A first determining unit is configured to determine, according to a shape and / or size of a current block, a combination allowed to be used by the current block, wherein the combination allowed to be used by the current block includes at least one combination, wherein each combination corresponds to a type of reconstruction area and an interpolation filter shape, and the reconstruction area is used to obtain an interpolation filter coefficient; A second determining unit, configured to determine an interpolation filter coefficient according to a combination allowed to be used by the current block; The prediction unit is configured to perform intra-frame prediction based on interpolation filtering on the current block according to the interpolation filtering coefficient.

73. An encoder, comprising: Memory for storing computer programs; A processor for executing the method according to any one of claims 35 to 69 when running the computer program.

74. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 34 or the method according to any one of claims 35 to 69 is implemented.