Video encoding / decoding method, device, equipment, system and storage medium
By determining a reference region and interpolation filter for video blocks, the method improves prediction efficiency and decoding accuracy, enhancing video encoding and decoding performance.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2026-03-11
AI Technical Summary
Existing video encoding and decoding technologies face challenges in improving prediction efficiency and reducing redundancy in video data, which affects compression efficiency.
The proposed solution involves determining a reference region and an interpolation filter for a current block, predicting a block based on this region and filter, and using a transform kernel corresponding to the prediction mode to enhance encoding and decoding performance.
This approach improves the accuracy of transform kernel determination, enhances decoding accuracy, and reduces the need for specifying transform kernels separately, thereby increasing video encoding and decoding efficiency.
Smart Images

Figure 2026508708000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to the field of video encoding and decoding technology, and more particularly to a video encoding and decoding method, device, apparatus, system, and storage medium. [Background technology]
[0002] Digital video technology can be incorporated into a variety of video devices, such as digital televisions, smartphones, computers, e-readers, or video players. With the development of video technology, the amount of data contained in video data is increasing. To facilitate the transmission of video data, video devices may implement video compression techniques to enable more efficient transmission or storage of video data.
[0003] Since video has temporal or spatial redundancy, prediction can eliminate or reduce the redundancy in the video and improve compression efficiency. To improve the prediction effect, this application proposes an interpolation filtering prediction method. Summary of the Invention [Means for solving the problem]
[0004] The embodiments of the present application provide a video encoding / decoding method, device, apparatus, system, and storage medium, which can improve the prediction effect of the current block and enhance the encoding / decoding performance.
[0005] In a first aspect, the present application provides a video decoding method, applied to a decoder, the method comprising: determining a reference region and an interpolation filter for a current block, and determining a prediction block for the current block based on the reference region and the interpolation filter; determining an intra prediction mode corresponding to the prediction block; and determining a transformation kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block; performing an inverse transform on the transform coefficients of the current block based on a transform kernel corresponding to the current block to obtain a residual block of the current block; and obtaining a reconstructed block of the current block based on the predicted block and the residual block of the current block.
[0006] In a second aspect, embodiments of the present application provide a video encoding method, applied to an encoder, comprising: determining a reference region and an interpolation filter for a current block, and determining a prediction block for the current block based on the reference region and the interpolation filter; determining an intra prediction mode corresponding to the prediction block; and determining a transformation kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block; performing a transform on a residual block of the current block based on a transform kernel corresponding to the current block to obtain transform coefficients of the current block; and performing encoding based on the transform coefficients of the current block to obtain a bitstream.
[0007] In a third aspect, the present application provides a video decoding apparatus, adapted to perform the method of the first aspect or any of its embodiments, in particular the apparatus comprising functional units for performing the method of the first aspect or any of its embodiments.
[0008] In a fourth aspect, the present application provides a video encoding apparatus, adapted to perform the method of the second aspect or any embodiment thereof, in particular the apparatus comprising functional units for performing the method of the second aspect or any embodiment thereof.
[0009] In a fifth aspect, there is provided a video decoder, comprising a processor and a memory, the memory adapted to store a computer program, the processor adapted to execute the method of the first aspect or any embodiment thereof by calling and executing the computer program stored in the memory.
[0010] In a sixth aspect, there is provided a video encoder, comprising a processor and a memory, the memory adapted to store a computer program, and the processor adapted to perform the method of the second aspect or any embodiment thereof by calling and executing the computer program stored in the memory.
[0011] In a seventh aspect, there is provided a video encoding and decoding system, comprising a video encoder and a video decoder, the video decoder being adapted to perform the method of the first aspect or any of its embodiments, and the video encoder being adapted to perform the method of the second aspect or any of its embodiments.
[0012] In an eighth aspect, a chip is provided for implementing the method of any one of the first to second aspects or their respective embodiments. Specifically, the chip includes a processor for retrieving and executing a computer program from a memory, thereby causing a device incorporating the chip to execute the method of any one of the first to second aspects or their respective embodiments.
[0013] In a ninth aspect, there is provided a computer readable storage medium, adapted to store a computer program, the computer program causing a computer to perform a method according to any one of the first to second aspects or embodiments thereof.
[0014] In a tenth aspect, there is provided a computer program product, comprising computer program instructions, which when executed by a computer cause a method to be performed according to any of the first to second aspects or respective embodiments thereof.
[0015] In an eleventh aspect, there is provided a computer program, which, when run on a computer, causes the computer to carry out a method according to any one of the first to second aspects or embodiments thereof.
[0016] Based on the above technical solution, the present application proposes an interpolation filter prediction method. When predicting a current block, first determine a reference region and an interpolation filter for the current block, and then determine a predicted block of the current block based on the reference region and the interpolation filter. Next, determine a prediction mode corresponding to the predicted block, and then determine a transform kernel corresponding to the current block based on the prediction mode. Use the transform kernel to perform an inverse transform on the transform coefficients of the current block to obtain a residual block of the current block, and then obtain a reconstructed value of the current block based on the residual block of the current block and the predicted block. That is, in this embodiment, when the current block is predicted using an interpolation filter prediction method, determine a conventional prediction mode corresponding to the predicted block, and then determine a transform kernel corresponding to the current block. This allows the determined transform kernel to better fit the characteristics of the current block, improving the determination accuracy of the transform kernel. Using this accurately determined transform kernel to determine the reconstructed value of the current block can improve the determination accuracy of the reconstructed value and enhance the decoding accuracy of the current block. In addition, since the embodiment of the present application determines the transform kernel of the current block based on the conventional prediction mode corresponding to the predicted block, there is no need to specify the transform kernel separately, which saves codewords and further improves the video encoding and decoding efficiency. [Brief explanation of the drawings]
[0017] [Figure 1] 1 is a schematic block diagram of a video encoding / decoding system according to an embodiment of the present application. [Figure 2] 1 is a schematic block diagram of a video encoder according to an embodiment of the present application; [Figure 3] 1 is a schematic block diagram of a video decoder according to an embodiment of the present application; [Figure 4A]FIG. 1 is a schematic diagram of intra prediction. [Figure 4B] FIG. 1 is a schematic diagram of intra prediction. [Figure 5A] FIG. 1 is a schematic diagram of intra prediction. [Figure 5B] FIG. 1 is a schematic diagram of intra prediction. [Figure 5C] FIG. 1 is a schematic diagram of intra prediction. [Figure 5D] FIG. 1 is a schematic diagram of intra prediction. [Figure 5E] FIG. 1 is a schematic diagram of intra prediction. [Figure 5F] FIG. 1 is a schematic diagram of intra prediction. [Figure 5G] FIG. 1 is a schematic diagram of intra prediction. [Figure 5H] FIG. 1 is a schematic diagram of intra prediction. [Figure 5I] FIG. 1 is a schematic diagram of intra prediction. [Figure 6] FIG. 1 is a schematic diagram of intra-prediction modes. [Figure 7] FIG. 1 is a schematic diagram of intra-prediction modes. [Figure 8] FIG. 1 is a schematic diagram of intra-prediction modes. [Figure 9] 1 is a schematic diagram of the CCCM principle. [Figure 10] 1 is a schematic flow diagram of a video decoding method according to an embodiment of the present application; [Figure 11] FIG. 2 is a schematic diagram showing the position of a current block in a current image. [Figure 12] FIG. 2 is a schematic diagram of a reconstruction region. [Figure 13A] FIG. 1 is a schematic diagram of one type of reference region. [Figure 13B] FIG. 10 is a schematic diagram of another type of reference region. [Figure 13C] FIG. 10 is a schematic diagram of yet another type of reference region. [Figure 14A] FIG. 1 is a schematic diagram of one type of interpolation filter shape. [Figure 14B] FIG. 10 is a schematic diagram of another type of interpolation filter shape. [Figure 14C]FIG. 10 is a schematic diagram of yet another type of interpolation filter shape. [Figure 14D] FIG. 10 is a schematic diagram of yet another type of interpolation filter shape. [Figure 14E] FIG. 10 is a schematic diagram of yet another type of interpolation filter shape. [Figure 14F] FIG. 10 is a schematic diagram of yet another type of interpolation filter shape. [Figure 14G] FIG. 10 is a schematic diagram of yet another type of interpolation filter shape. [Figure 15] 1 is a schematic diagram of multiple types of interpolation filter shapes according to an embodiment of the present application; [Figure 16] 1 is a schematic diagram of multiple types of interpolation filter shapes according to an embodiment of the present application; [Figure 17] 1 is a schematic diagram of multiple types of interpolation filter shapes according to an embodiment of the present application; [Figure 18A] 1 is a schematic diagram of multiple types of interpolation filter shapes according to an embodiment of the present application; [Figure 18B] 1 is a schematic diagram of multiple types of interpolation filter shapes according to an embodiment of the present application; [Figure 19] 1 is a schematic diagram of multiple types of interpolation filter shapes according to an embodiment of the present application; [Figure 20] FIG. 2 is a schematic diagram of a first reconstruction area. [Figure 21] 1 is a schematic diagram of differently shaped interpolation filters moving within different types of reference regions; [Figure 22] 1 is a schematic diagram illustrating interpolation prediction for a current block using an interpolation filter; [Figure 23] FIG. 1 is a schematic diagram of intra-prediction modes. [Figure 24] FIG. 1 is a schematic diagram of determining horizontal and vertical gradients. [Figure 25] 1 is a gradient amplitude histogram. [Figure 26] 1 is a flow diagram of a prediction method according to an embodiment of the present application; [Figure 27] FIG. 1 is a schematic flow diagram for determining a prediction mode according to an embodiment of the present application; [Figure 28]1 is a schematic block diagram of a video decoding device according to an embodiment of the present application; [Figure 29] 1 is a schematic block diagram of a video encoding device according to an embodiment of the present application; [Figure 30] 1 is a schematic block diagram of an electronic device according to an embodiment of the present application. [Figure 31] 1 is a schematic block diagram of a video encoding / decoding system according to an embodiment of the present application. DETAILED DESCRIPTION OF THE INVENTION
[0018] The present application can be applied to the fields of image encoding and decoding, video encoding and decoding, hardware video encoding and decoding, dedicated circuit video encoding and decoding, real-time video encoding and decoding, etc. For example, the solution of the present application can be combined with audio video coding standards (AVS), such as the H.264 / audio video coding (AVC) standard, the H.265 / high efficiency video coding (HEVC) standard, and the H.266 / versatile video coding (VVC) standard. Alternatively, the present solution may operate in combination with other proprietary or industry standards, including ITU-TH.261, ISO / IEC MPEG-1 Visual, ITU-TH.262 or ISO / IEC MPEG-2 Visual, ITU-TH.263, ISO / IEC MPEG-4 Visual, and ITU-TH.264 (also known as ISO / IEC MPEG-4 AVC), including Scalable Video Coding (SVC) and Multi-view Video Coding (MVC) extensions. It is understood that the present technology is not limited to any particular encoding and decoding standard or technique.
[0019] For ease of understanding, a video encoding / decoding system according to an embodiment of the present invention will be described first with reference to FIG.
[0020] FIG. 1 is a schematic block diagram of a video encoding / decoding system according to an embodiment of the present application. Note that FIG. 1 is merely an example, and the video encoding / decoding system according to the embodiment of the present application is not limited to that shown in FIG. 1. As shown in FIG. 1, the video encoding / decoding system 100 includes an encoding device 110 and a decoding device 120. Here, the encoding device encodes (also understood as compressing) video data to generate a bitstream and transmits the bitstream to a decoding device. The decoding device decodes the bitstream encoded and generated by the encoding device to obtain decoded video data.
[0021] In the present application, encoding device 110 is understood to be a device having video encoding functionality, and decoding device 120 is understood to be a device having video decoding functionality. That is, in the present application, encoding device 110 and decoding device 120 include a broader range of devices, such as smartphones, desktop computers, mobile computing devices, notebook computers (e.g., laptops), tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, video game consoles, and in-vehicle computers.
[0022] In some embodiments, encoding device 110 may transmit encoded video data (e.g., a bitstream) to decoding device 120 over channel 130. Channel 130 may include one or more media and / or devices capable of transmitting encoded video data from encoding device 110 to decoding device 120.
[0023] In one example, channel 130 includes one or more communication media that enable encoding device 110 to transmit encoded video data directly to decoding device 120 in real time. In this example, encoding device 110 may perform modulation on the encoded video data in accordance with a communication standard and transmit the modulated video data to decoding device 120. Here, the communication medium may include a wireless communication medium (e.g., a radio frequency spectrum), and optionally, the communication medium may further include a wired communication medium (e.g., one or more physical transmission lines).
[0024] In another example, channel 130 may include a storage medium that stores the video data encoded by encoding device 110. The storage medium may include various locally accessible data storage media, such as optical disks, DVDs, flash memory, etc. In this example, decoding device 120 may obtain the encoded video data from the storage medium.
[0025] In another example, channel 130 may include a storage server that stores the video data encoded by encoding device 110. In this example, decoding device 120 may download the stored encoded video data from the storage server. Alternatively, the storage server may store the encoded video data and transmit the encoded video data to decoding device 120, such as a web server (e.g., for a website), a File Transfer Protocol (FTP) server, etc.
[0026] In some embodiments, encoding device 110 includes a video encoder 112 and an output interface 113, where output interface 113 may include a modulator / demodulator (modem) and / or a transmitter.
[0027] In some embodiments, encoding device 110 may further include a video source 111 in addition to video encoder 112 and input interface 113 .
[0028] The video source 111 may include at least one of a video acquisition device (e.g., a video camera), a video archive, a video input interface, and a computer graphics system, where the video input interface is used to receive video data from a video content provider and the computer graphics system is used to generate the video data.
[0029] The video encoder 112 performs encoding on video data from the video source 111 to generate a bitstream. The video data may include one or more pictures or a sequence of pictures. The bitstream contains coding information for a picture or a sequence of pictures in the form of a bitstream. The coding information may include coded image data and associated data. The associated data may include a sequence parameter set (SPS), a picture parameter set (PPS), and other syntax structures. An SPS may contain parameters that apply to one or more sequences. A PPS may contain parameters that apply to one or more pictures. A syntax structure refers to a set of zero or more syntax elements arranged in a specified order in the bitstream.
[0030] The video encoder 112 transmits the encoded video data directly to the decoding device 120 via the output interface 113. The encoded video data may further be stored in a storage medium or a storage server for later reading by the decoding device 120.
[0031] In some embodiments, decoding device 120 includes an input interface 121 and a video decoder 122 .
[0032] In some embodiments, decoding device 120 may further include a display device 123 in addition to input interface 121 and video decoder 122 .
[0033] Here, the input interface 121 may include a receiver and / or a modem. The input interface 121 may receive encoded video data via a channel 130.
[0034] The video decoder 122 is used to decode the encoded video data, obtain the decoded video data, and transmit the decoded video data to the display device 123 .
[0035] Display device 123 is used to display the decoded video data and may be integrated with decoding device 120 or may be external to decoding device 120. Display device 123 may include a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or other types of display devices.
[0036] Furthermore, Fig. 1 is merely an example, and the technical solutions of the embodiments of the present application are not limited to Fig. 1. For example, the technology of the present application may also be applied to one-sided video encoding or one-sided video decoding.
[0037] A video coding framework according to an embodiment of the present application will now be described.
[0038] 2 is a schematic block diagram of a video encoder according to an embodiment of the present application. It is understood that the video encoder 200 may be used for lossy compression of images or for lossless compression of images. The lossless compression may be visually lossless compression or mathematically lossless compression.
[0039] The video encoder 200 may be applied to image data in a luminance / chrominance (YCbCr, YUV) format. For example, the YUV ratio may be 4:2:0, 4:2:2, or 4:4:4, where Y represents luminance (Luma), Cb (U) represents blue chrominance, and Cr (V) represents red chrominance, and U and V represent chrominance (Chroma) to describe color and saturation. For example, in color format, 4:2:0 means that every four pixels have four luminance components and two chrominance components (YYYYCbCr), 4:2:2 means that every four pixels have four luminance components and four chrominance components (YYYYCbCrCbCr), and 4:4:4 means full pixel display (YYYYCbCrCbCrCbCrCbCr).
[0040] For example, the video encoder 200 reads video data and divides each frame image in the video data into multiple coding tree units (CTUs). In some examples, a CTU may be referred to as a "tree block," a "largest coding unit" (LCU), or a "coding tree block" (CTB). Each CTU may be associated with a block of pixels of the same size in the image. Each pixel may correspond to one luminance (luma) sample and two chrominance (chroma) samples. Thus, each CTU may be associated with one luminance sample block and two chrominance sample blocks. The size of a CTU may be, for example, 128x128, 64x64, 32x32, etc. A CTU may be further divided into multiple coding units (CUs) for encoding, and a CU may be a rectangular or square block. The CU is further divided into a prediction unit (PU) and a transform unit (TU), which separates the coding, prediction, and transformation processes and increases processing flexibility. In one example, the CTU is divided into CUs using a quadtree scheme, and the CU is divided into TUs and PUs using a quadtree scheme.
[0041] Video encoders and video decoders can support various PU sizes. Assuming a specific CU size is 2Nx2N, video encoders and video decoders can support PU sizes of 2Nx2N or NxN for intra prediction, and can support symmetric PUs of 2Nx2N, 2NxN, Nx2N, NxN, or similar sizes for inter prediction. Video encoders and video decoders can further support asymmetric PUs of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter prediction.
[0042] 2, the video encoder 200 may include a prediction unit 210, a residual unit 220, a transform / quantization unit 230, an inverse transform / inverse quantization unit 240, a reconstruction unit 250, a loop filter unit 260, a decoded image buffer 270, and an entropy coding unit 280. However, the video encoder 200 may include more, fewer, or different functional components.
[0043] Alternatively, in this application, the current block may be referred to as a current coding unit (CU) or a current prediction unit (PU), etc. A prediction block may also be referred to as a predicted image block or an image prediction block, and a reconstructed image block may also be referred to as a reconstruction block or an image reconstruction block.
[0044] In some embodiments, the prediction unit 210 includes an inter prediction unit 211 and an intra prediction unit 212. Because there is a strong correlation between adjacent pixels within a frame of video, the intra prediction method is used in video encoding and decoding techniques to remove spatial redundancy between adjacent pixels. Because there is a strong similarity between adjacent frames of video, the inter prediction method is used in video encoding and decoding techniques to remove temporal redundancy between adjacent frames, thereby improving coding efficiency.
[0045] The inter prediction unit 211 may be used for inter prediction, which may include motion estimation and motion compensation and may refer to image information from different frames. Inter prediction uses motion information to find a reference block from a reference frame, generate a predicted block based on the reference block, and remove temporal redundancy. The frames used for inter prediction may be P frames and / or B frames, where P frames refer to forward-predicted frames and B frames refer to bidirectionally predicted frames. Inter prediction uses motion information to find a reference block from a reference frame and generate a predicted block based on the reference block. The motion information includes a reference frame list in which the reference frame is located, a reference frame index, and a motion vector. The motion vector may be integer pixel or fractional pixel. If the motion vector is fractional pixel, an interpolation filter must be used in the reference frame to generate the required fractional pixel block. Here, the integer pixel or fractional pixel block between the reference frames found based on the motion vector is called the reference block. Some techniques directly use the reference block as the predicted block, while some techniques perform further processing based on the reference block to generate the predicted block. Performing further processing based on a reference block to generate a predicted block can also be understood as using the reference block as a predicted block and then performing further processing based on the predicted block to generate a new predicted block.
[0046] The intra prediction unit 212 is used to predict pixel information within the current coding image block by only referring to information of the same frame image, and to remove spatial redundancy. The frame used for intra prediction may be an I frame.
[0047] There are various prediction modes for intra prediction. Taking the international digital video coding standard H series as an example, the H.264 / AVC standard has 8 types of angular prediction modes and 1 type of non-angular prediction mode, while H.265 / HEVC has expanded this to 33 types of angular prediction modes and 2 types of non-angular prediction modes. The intra prediction modes used in HEVC include planar mode, DC, and 33 types of angular modes, for a total of 35 types of prediction modes. The intra modes used in VVC include planar, DC, and 65 types of angular modes, for a total of 67 types of prediction modes.
[0048] Furthermore, with the increase in angle modes, intra prediction becomes more accurate and better meets the evolving needs of high-definition and ultra-high-definition digital video.
[0049] The residual unit 220 may generate a residual block for a CU based on the pixel block of the CU and the prediction block of the PU of the CU. For example, the residual unit 220 may generate a residual block for a CU such that each sample in the residual block has a value equal to the difference between the pixel block of the CU and the corresponding sample in the prediction block of the PU of the CU.
[0050] The transform / quantization unit 230 may quantize the transform coefficients. The transform / quantization unit 230 may quantize the transform coefficients associated with the TUs of a CU based on a quantization parameter (QP) value associated with the CU. The video encoder 200 may adjust the degree of quantization applied to the transform coefficients associated with the CU by adjusting the QP value associated with the CU.
[0051] The inverse transform / inverse quantization unit 240 applies inverse quantization and inverse transform, respectively, to the quantized transform coefficients and may reconstruct residual blocks from the quantized transform coefficients.
[0052] Reconstruction unit 250 may add the samples of the reconstructed residual block to corresponding samples of one or more prediction blocks generated by prediction unit 210 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 200 can reconstruct the pixel blocks of the CU.
[0053] The loop filter unit 260 operates on the pixels after inverse transformation and inverse quantization and is used to compensate for distortion information and provide a good reference for subsequent coding pixels, for example, deblocking filtering can be performed to reduce the blocking effect of pixel blocks associated with a CU.
[0054] In some embodiments, the loop filter unit 260 includes a deblocking filter unit and a sample adaptive compensation / adaptive loop filter (SAO / ALF) unit, where the deblocking filter unit is used to remove blocking effects and the SAO / ALF unit is used to remove ringing effects.
[0055] The decoded image buffer 270 can store the reconstructed pixel blocks. The inter prediction unit 211 can perform inter prediction on PUs of other images using a reference image including the reconstructed pixel blocks. Also, the intra prediction unit 212 can perform intra prediction on other PUs in the same image as the CU using the reconstructed pixel blocks in the decoded image buffer 270.
[0056] The entropy coding unit 280 may receive the quantized transform coefficients from the transform / quantization unit 230. The entropy coding unit 280 may perform one or more entropy coding operations on the quantized transform coefficients to generate entropy-coded data.
[0057] FIG. 3 is a schematic block diagram of a video decoder according to an embodiment of the present application.
[0058] 3, the video decoder 300 includes an entropy decoding unit 310, a prediction unit 320, an inverse quantization / inverse transform unit 330, a reconstruction unit 340, a loop filter unit 350, and a decoded image buffer 360. Note that the video decoder 300 may include more, fewer, or different functional components.
[0059] The video decoder 300 may receive a bitstream. The entropy decoding unit 310 may extract syntax elements from the bitstream by parsing the bitstream. As part of parsing the bitstream, the entropy decoding unit 310 may analyze entropy-encoded syntax elements in the bitstream. The prediction unit 320, the inverse quantization / inverse transform unit 330, the reconstruction unit 340, and the loop filter unit 350 may decode video data based on the syntax elements extracted from the bitstream, i.e., generate decoded video data.
[0060] In some embodiments, the prediction unit 320 includes an intra prediction unit 322 and an inter prediction unit 321 .
[0061] The intra prediction unit 322 may perform intra prediction to generate a prediction block of the PU. The intra prediction unit 322 may use an intra prediction mode to generate a prediction block of the PU based on pixel blocks of spatially neighboring PUs. The intra prediction unit 322 may further determine the intra prediction mode of the PU based on one or more syntax elements parsed from the bitstream.
[0062] The inter prediction unit 321 may construct a first reference image list (list 0) and a second reference image list (list 1) based on syntax elements parsed from the bitstream. If the PU uses inter prediction coding, the entropy decoding unit 310 may analyze motion information of the PU. The inter prediction unit 321 may determine one or more reference blocks for the PU based on the motion information of the PU. The inter prediction unit 321 may generate a prediction block for the PU based on the one or more reference blocks for the PU.
[0063] The inverse quantization / inverse transform unit 330 may inverse quantize (i.e., perform an inverse quantization process) the transform coefficients associated with the TU. The inverse quantization / inverse transform unit 330 may determine the degree of quantization using a QP value associated with the CU of the TU.
[0064] After dequantizing the transform coefficients, the inverse quantization / inverse transform unit 330 may apply one or more inverse transforms to the dequantized transform coefficients to generate a residual block associated with the TU.
[0065] The reconstruction unit 340 may reconstruct a pixel block of the CU using a residual block associated with the TU of the CU and a prediction block of the PU of the CU. For example, the reconstruction unit 340 may add samples of the residual block to corresponding samples of the prediction block to reconstruct the pixel block of the CU and obtain a reconstructed image block.
[0066] Loop filter unit 350 may perform deblocking filtering to reduce the blocking effect of pixel blocks associated with a CU.
[0067] The video decoder 300 may store the reconstructed image of the CU in the decoded image buffer 360. The video decoder 300 may use the reconstructed image in the decoded image buffer 360 as a reference image for subsequent prediction, or may transmit the reconstructed image to a display device for display.
[0068] The basic flow of video encoding and decoding is as follows. On the encoding side, a frame image is divided into blocks, and for a current block, the prediction unit 210 generates a predicted block of the current block using intra prediction or inter prediction. The residual unit 220 calculates a residual block, i.e., the difference between the predicted block and the original block of the current block, based on the predicted block and the original block of the current block. The residual block is also called residual information. The residual block undergoes processes such as transformation and quantization by the transform / quantization unit 230 to remove information insensitive to the human eye and eliminate visual redundancy. Alternatively, the residual block before transformation and quantization by the transform / quantization unit 230 is called a time-domain residual block, and the time-domain residual block after transformation and quantization by the transform / quantization unit 230 is called a frequency-domain residual block or frequency-domain residual block. The entropy coding unit 280 receives the quantized transform coefficients output from the transform / quantization unit 230, performs entropy coding on the quantized transform coefficients, and outputs a bitstream. For example, the entropy coding unit 280 can remove character redundancies based on a target context model and probability information in the binary bitstream.
[0069] On the decoding side, the entropy decoding unit 310 analyzes the bitstream to obtain prediction information, a quantization coefficient matrix, etc., for the current block. The prediction unit 320 generates a prediction block for the current block using intra- or inter-prediction based on the prediction information. The inverse quantization / inverse transform unit 330 uses the quantization coefficient matrix obtained from the bitstream to perform inverse quantization and inverse transform on the quantization coefficient matrix to obtain a residual block. The reconstruction unit 340 adds the prediction block and the residual block to obtain a reconstructed block. The reconstructed block forms a reconstructed image, and the loop filter unit 350 performs loop filtering on the reconstructed image based on an image or block to obtain a decoded image. The encoding side also needs to perform the same operations as the decoding side to obtain a decoded image. This decoded image is also called a reconstructed image, and the reconstructed image can be used as a reference frame for inter-prediction of a subsequent frame.
[0070] The block division information determined by the encoding side, as well as mode or parameter information such as prediction, transform, quantization, entropy coding, and loop filter, are included in the bitstream as necessary. The decoding side analyzes the bitstream and performs analysis based on existing information to determine the same block division information as the encoding side, as well as mode or parameter information such as prediction, transform, quantization, entropy coding, and loop filter, thereby ensuring that the decoded image obtained by the encoding side matches the decoded image obtained by the decoding side.
[0071] The above is the basic flow of video encoding and decoding under the block-based hybrid coding framework. As technology develops, some modules or steps of the framework or flow may be optimized. This application applies to the basic flow of video encoding and decoding under the block-based hybrid coding framework, but is not limited to this framework and flow.
[0072] In the embodiments of the present application, the current block may be a current coding unit (CU) or a current prediction unit (PU), etc. Due to the need for parallel processing, an image may be divided into slices, etc., and slices within the same image can be processed in parallel, i.e., there is no data dependency between them. The term "frame" is a general term, and one frame can generally be understood to be one image. The term "frame" in the present application may also be replaced with "image" or "slice."
[0073] Intra prediction typically involves predicting the current coding block using various angular and non-angular modes to obtain a predicted block. Based on rate-distortion information calculated from the predicted block and the original block, the optimal prediction mode for the current coding unit is selected and transmitted to the decoder via a bitstream. The decoder analyzes the prediction mode, predicts and obtains a predicted image for the current decoding block, and combines the residual pixels transmitted via the bitstream to obtain a reconstructed image. The intra prediction method predicts the current block using reconstructed pixels that have already been coded and decoded around the current block as reference pixels. Figure 4A is a schematic diagram of intra prediction. As shown in Figure 4A, the current block has a size of 4x4. The pixels in the left row and the top column of the current block are reference pixels for the current block. Intra prediction uses these reference pixels to predict the current block. All of these reference pixels may be available, i.e., they have all been coded and decoded. Some may be unavailable. For example, if the current block is located at the leftmost position of the entire frame, the reference pixels to the left of the current block are unavailable. Or, when encoding or decoding a current block, if a part of the lower left side of the current block has not yet been encoded or decoded, the reference pixels on the lower left side are also unavailable. If the reference pixels are unavailable, they may be filled in using available reference pixels or specific values, or may be filled in using a specific method, or may not be filled in at all.
[0074] Figure 4B is a schematic diagram of intra prediction. As shown in Figure 4B, the multiple reference line (MRL) intra prediction method can improve encoding and decoding efficiency by using more reference pixels, for example, by using four reference rows / columns as reference pixels for the current block.
[0075] Furthermore, intra prediction has various prediction modes. Figures 5A to 5I are schematic diagrams of intra prediction. As shown in Figures 5A to 5I, intra prediction for 4x4 blocks in H.264 mainly includes nine types of modes. Here, mode 0 shown in Figure 5A vertically copies the upper pixel of the current block to the current block as a predicted value. Mode 1 shown in Figure 5B horizontally copies the reference pixel on the left side to the current block as a predicted value. Mode 2 (DC) shown in Figure 5C uses the average value of eight points A to D and I to L as the predicted value for all points. Modes 3 to 8 shown in Figures 5D to 5I each copy reference pixels at a specific angle to corresponding positions in the current block. However, if some positions in the current block cannot exactly correspond to the reference pixels, a weighted average of the reference pixels or fractional pixels of interpolated reference pixels must be used.
[0076] Other modes include Planar and Planar, and with technological developments and increased block sizes, the number of angular prediction modes is also increasing. Figure 6 is a schematic diagram of intra prediction modes. As shown in Figure 6, the intra prediction modes used in HEVC include Planar, DC, and 33 types of angular modes, for a total of 35 types of prediction modes. Figure 7 is a schematic diagram of intra prediction modes. As shown in Figure 7, the intra modes used in VVC include Planar, DC, and 65 types of angular modes, for a total of 67 types of prediction modes. Figure 8 is a schematic diagram of intra prediction modes. As shown in Figure 8, the modes used in VS3 include DC, Planar, Bilinear, PCM, and 62 types of angular modes, for a total of 66 types of prediction modes.
[0077] There are also several techniques for improving prediction, such as improving fractional pixel interpolation of reference pixels and filtering the predicted pixels. For example, the Multiple Intra Prediction Filter (MIPF) in AVS3 generates predicted values using different filters for different block sizes. For pixels at different positions within the same block, pixels close to the reference pixel generate predicted values using one type of filter, while pixels farther away generate predicted values using a different type of filter. One example of a filtering technique for predicted pixels is the Intra Prediction Filter (IPF) in AVS3, which can filter the predicted values using reference pixels.
[0078] In some embodiments, in current video encoding and decoding, the loop filter unit employs an Adaptive Loop Filter (ALF) technique, for example, to filter the reconstructed image to obtain a final decoded image.
[0079] The Adaptive Loop Filter (ALF) technology will be described below.
[0080] The ALF is a filter in a loop filter, designed based on the Wiener filter principle, to minimize the error between the target sample and the input sample. In the loop filter, the target sample is the original image, and the input is the reconstructed image.
[0081] Before performing filtering using the ALF, the filter coefficients are first determined.
[0082] For example, a Wiener-Hopf Fielder equation such as that shown in Equation (1) can be constructed and solved to obtain the filter coefficients of the interpolation filter.
[0083] JPEG2026508708000002.jpg25161JPEG2026508708000003.jpg50161
[0084] JPEG2026508708000004.jpg19161
[0085] For example, the Wiener-Hopf equation can be solved by decomposing the autocorrelation coefficient matrix using Cholesky decomposition to obtain the filter coefficients of the filter.
[0086] After determining the filter coefficients of the filter based on the above formula (1), the samples waiting to be filtered are filtered using the following formula (2), and the filtered samples are obtained.
[0087] JPEG2026508708000005.jpg23161JPEG2026508708000006.jpg20161
[0088] The Convolutional Cross Component Model (CCCM) is a process for predicting chrominance pixels using reconstructed pixels of the luma component. Its advantage is that the decoder can obtain the CCCM filter coefficients using already reconstructed pixels, eliminating the overhead of storing filter coefficients in the bitstream, as in ALF. As shown in Figure 9, the CCCM coefficients are obtained by calculating the already reconstructed pixels around the current chroma block to be predicted and the already reconstructed pixels around the luma block at the corresponding position of the chroma block.
[0089] An embodiment of the present application proposes an interpolation filter prediction method. When predicting a current block, a reference region and an interpolation filter for the current block are first determined, and a predicted block for the current block is determined based on the reference region and the interpolation filter. For example, a filtering process is performed on the reference region using an interpolation filter, and then filter coefficients of the filter are calculated and obtained. Interpolation filter prediction is performed on the current block using the interpolation filter whose filter coefficients have already been determined to obtain a predicted block for the current block. Next, a prediction mode corresponding to the predicted block is determined, and a transform kernel corresponding to the current block is determined based on the prediction mode. An inverse transform is performed on the transform coefficients of the current block using the transform kernel to obtain a residual block for the current block. A reconstructed value for the current block is then obtained based on the residual block for the current block and the predicted block. That is, in this embodiment, when the current block is predicted using the interpolation filter prediction method, a conventional prediction mode corresponding to the predicted block is determined to determine a transform kernel corresponding to the current block. The determined transform kernel is adapted to the characteristics of the current block, improving the accuracy of determining the transform kernel. When the reconstructed value for the current block is determined using this accurately determined transform kernel, the accuracy of determining the reconstructed value is improved, thereby improving the decoding accuracy of the current block. In addition, since the embodiment of the present application determines the transform kernel of the current block according to the conventional prediction mode corresponding to the predicted block, there is no need to specify the transform kernel separately, which can save codewords and further improve the video encoding and decoding efficiency.
[0090] Hereinafter, with reference to FIG. 10, the video decoding method provided by the embodiment of the present application will be described by taking the decoding side as an example.
[0091] Figure 10 is a schematic flow diagram of a video decoding method according to an embodiment of the present application, which is applied to the video decoder shown in Figures 1 and 3. As shown in Figure 10, the method of the embodiment of the present application includes the following steps:
[0092] S101: determine a reference region and an interpolation filter of a current block; and determine a prediction block of the current block according to the reference region and the interpolation filter.
[0093] When decoding a current block, the decoding side decodes the bitstream to obtain quantized coefficients of the current block, performs inverse quantization on the quantized coefficients to obtain transform coefficients of the current block, and performs inverse transform on the transform coefficients to obtain residual values of the current block. Next, the decoding side determines a prediction mode for the current block, determines a predicted value for the current block based on the prediction mode, and obtains a reconstructed value for the current block based on the predicted value and residual value of the current block.
[0094] In some embodiments, the current block is also referred to as the block to be predicted.
[0095] In the present embodiment, the decoding side first determines the prediction mode of the current block.
[0096] In some embodiments, the manner in which the decoding side determines the prediction mode of the current block includes at least some of the following:
[0097] In method 1, the encoding side determines the prediction mode of the current block. For example, from among candidate prediction modes consisting of a conventional prediction mode and an interpolation filter prediction mode as shown in FIG. 6 or 7, the candidate prediction mode with the smallest cost is determined as the prediction mode of the current block. Next, the encoding side adds indication information of the prediction mode of the current block to the bitstream. As a result, the decoding side decodes the bitstream to obtain the indication information of the prediction mode of the current block, and further determines the prediction mode of the current block based on the indication information, predicts the current block using the intra prediction mode, and obtains a predicted value of the current block.
[0098] For example, if the terminal device determines that the prediction mode of the current block is a conventional prediction mode, it writes the index of the prediction mode of the current block into the bitstream as indication information of the prediction mode. The decoding side decodes the bitstream to obtain the prediction mode index, and further determines the prediction mode of the current block from the conventional prediction modes shown in Figure 6 or Figure 7 based on the index.
[0099] In Method 2, the encoding side constructs an intra-prediction mode candidate list and selects an intra-prediction mode for the current block from the intra-prediction mode candidate list. The intra-prediction mode candidate list includes an interpolation filter prediction mode. Next, the encoding side writes the sequence number (or index number) of the intra-prediction mode of the current block in the intra-prediction mode candidate list into the bitstream. The decoding side then decodes the bitstream and determines the sequence number of the intra-prediction mode of the current block in the intra-prediction mode candidate list. At the same time, the decoding side constructs an intra-prediction mode candidate list using the same method as the encoding side (the constructed intra-prediction mode candidate list includes an interpolation filter prediction mode). Furthermore, the intra-prediction mode of the current block is determined from the constructed intra-prediction mode candidate list based on the sequence number of the intra-prediction mode candidate list. Finally, the determined intra-prediction mode of the current block is used to predict the current block and obtain a predicted value for the current block.
[0100] In method 3, the encoding side constructs an intra-prediction mode candidate list, which includes an interpolation filter prediction mode. Next, an intra-prediction mode for a current block is selected from the intra-prediction mode candidate list. For example, the cost of each candidate prediction mode in the intra-prediction mode candidate list in the template for the current block is determined, and the intra-prediction mode for the current block is determined based on the cost. Correspondingly, the decoding side constructs an intra-prediction mode candidate list in the same manner as the encoding side, which also includes an interpolation filter prediction mode. Next, the cost of each candidate prediction mode in the template for the current block in the intra-prediction mode candidate list is determined, and the intra-prediction mode for the current block is determined based on the cost. Finally, prediction is performed on the current block using the determined intra-prediction mode for the current block to obtain a predicted value for the current block.
[0101] Method 4: The encoding side and the decoding side perform prediction for the current block using the interpolation filter prediction mode by default.
[0102] In addition to determining whether or not the current block will perform prediction using the interpolation filter prediction mode using the above methods 1 to 4, the decoding side may also determine whether or not the current block will perform prediction using the interpolation filter prediction mode using the following method 5.
[0103] In method 5, the decoding side decodes the bitstream to obtain third information, which is used to indicate whether the current block is predicted using an interpolation filter prediction mode. If the decoding side determines based on the third information that the current block is predicted using the interpolation filter prediction mode, it determines a reference region and an interpolation filter for the current block.
[0104] In method 5, when the encoding side determines that the current block employs the interpolation filter prediction mode, it writes third information into the bitstream. The decoder side then decodes the bitstream to obtain the third information and, based on the third information, determines whether the current block employs the interpolation filter prediction mode for prediction. If the third information indicates that the current block employs the interpolation filter prediction mode for prediction, the decoding side predicts the current block using the interpolation filter prediction mode to obtain a predicted block for the current block. If the third information indicates that the current block employs a prediction mode other than the interpolation filter prediction mode for prediction, the decoding side skips the step of predicting the current block using the interpolation filter prediction mode, and instead determines a prediction mode for the current block, predicts the current block using the determined prediction mode, and obtains a predicted block for the current block.
[0105] In the embodiment of the present application, the specific expression format of the third information may be any indication information that can indicate whether the current block adopts the interpolation filter prediction mode for prediction, but is not limited thereto.
[0106] In one example, the third information may be represented as intra_eip_flag, whereby different assigned values of intra_eip_flag can determine whether the current block is predicted using the interpolation filter prediction mode. For example, intra_eip_flag = 0 indicates that the current block is predicted without using the interpolation filter prediction mode, and intra_eip_flag = 1 indicates that the current block is predicted using the interpolation filter prediction mode. Thus, the encoding side writes the predetermined flag intra_eip_flag into the bitstream, and the decoding side determines the prediction mode of the current block based on the decoded value of the predetermined flag intra_eip_flag. For example, intra_eip_flag = 1 indicates that the prediction mode of the current block is the interpolation filter prediction mode, whereby the decoding side predicts the current block using the interpolation filter prediction mode.
[0107] In some embodiments, to improve the prediction accuracy of the interpolation filter prediction mode, the interpolation filter prediction mode is used for some blocks that satisfy the requirements, and is not used for some blocks that do not satisfy the requirements. Based on this, before decoding the bitstream to obtain the third information, the decoding side needs to further determine whether the position of the current block in the current image satisfies the predetermined position requirement and whether the size of the current block satisfies the predetermined block size. If it is determined that the position of the current block in the current image satisfies the predetermined position requirement and the size of the current block satisfies the predetermined block size, the bitstream is decoded to obtain the third information.
[0108] The embodiment of the present application does not limit the predetermined position requirement and the prediction block size, which are specifically determined based on actual needs.
[0109] In one example, as shown in FIG. 11, assuming that the position of the top left corner of the current image is (0,0) and the position of the top left corner of the current block is (x,y), the specified position requirement is that x of the current block is equal to or greater than a first specified value XX, and y of the current block is equal to or greater than a second specified value YY.
[0110] The embodiment of the present application does not limit the specific numerical values of the first and second predetermined values.
[0111] Illustratively, the first predetermined value and the second predetermined value are the same.
[0112] For example, the first predetermined value and the second predetermined value are both 13. That is, if the distance from the top edge of the current block to the top edge of the current image is 13 pixel rows or more and the distance from the left edge of the current block to the left edge of the current image is 13 pixel columns or more, the position of the current block in the current image satisfies the predetermined position requirement.
[0113] In one example, still referring to FIG. 11, assuming that the width of the current block is W and the height is H, the predetermined block size requirement is that the width W of the current block is less than or equal to a third predetermined value A, and the height H of the current block is less than or equal to a fourth predetermined value B.
[0114] The embodiment of the present application does not limit the specific numerical values of the third and fourth predetermined values.
[0115] Exemplarily, the third predetermined value and the fourth predetermined value are the same.
[0116] For example, the third and fourth predetermined values are both 32. That is, if the width and height of the current block are both equal to or less than 32, the current block satisfies the predetermined block size requirement.
[0117] In an embodiment of the present application, before determining whether a current block is predicted using an interpolation filter prediction mode, the decoding side first determines whether the position of the current block in a current image satisfies a predetermined position requirement and whether the size of the current block satisfies a predetermined block size requirement. If the position of the current block in a current image satisfies the predetermined position requirement and the size of the current block satisfies the predetermined block size requirement, the decoding side decodes the bitstream to obtain third information, and determines whether the current block is predicted using an interpolation filter prediction mode based on the third information. For example, as shown in FIG. 11, if the distance from the top edge of the current block to the top edge of the current image is 13 pixel rows or more, the distance from the left edge of the current block to the left edge of the current image is 13 pixel columns or more, and the width and height of the current block are both 32 or less, the decoding side decodes the bitstream to obtain the third information.
[0118] In some embodiments, the first predetermined value, the second predetermined value, the third predetermined value, and the fourth predetermined value are default values.
[0119] In some embodiments, the first predetermined value, the second predetermined value, the third predetermined value, and the fourth predetermined value are values obtained by decoding from a bitstream on the decoding side.
[0120] In some embodiments, if the position of the current block in the current image does not meet a predetermined position requirement and / or the size of the current block does not meet a predetermined block size requirement, it is determined that the current block is to be predicted without employing an interpolation filter prediction mode.
[0121] In some embodiments, the method further includes the steps of: decoding the bitstream to obtain fourth information before the decoding side determines whether the position of the current block in the current image satisfies a predetermined position requirement and whether the size of the current block satisfies a predetermined block size, the fourth information being used to indicate whether the current sequence is allowed to perform prediction using an interpolation filter prediction mode; and, if the fourth information indicates that the current sequence is allowed to perform prediction using an interpolation filter prediction mode, determining whether the position of the current block in the current image satisfies a predetermined position requirement and whether the size of the current block satisfies the predetermined block size.
[0122] In an embodiment of the present application, a high-level syntax element, such as the fourth information at the sequence level, indicates whether the current sequence is allowed to use the interpolation filter prediction mode for prediction. If the fourth information indicates that the current sequence is allowed to use the interpolation filter prediction mode for prediction, the decoding side determines whether the position of the current block in the current image satisfies a predetermined position requirement, and whether the size of the current block satisfies a predetermined block size. Furthermore, if it is determined that the position of the current block in the current image satisfies the predetermined position requirement, and the size of the current block satisfies the predetermined block size requirement, the decoding side decodes the third information to determine whether the current block is allowed to use the interpolation filter prediction mode for prediction.
[0123] In some embodiments, if the fourth information indicates that the current sequence does not allow prediction to be performed using an interpolation filter prediction mode, the decoding side skips the steps of determining whether the position of the current block in the current image satisfies the predetermined position requirement and whether the size of the current block satisfies the predetermined block size requirement, as well as the step of decoding the third information.
[0124] The embodiments of the present application do not limit the specific expression format of the fourth information, and it may be any indication information that can indicate whether the current sequence is allowed to perform prediction using the interpolation filter prediction mode.
[0125] In one example, the fourth information may be represented as sps_eip_enabled_flag, whereby different assigned values of sps_eip_enabled_flag can determine whether the current sequence is allowed to perform prediction using the interpolation filter prediction mode. For example, when sps_eip_enabled_flag=0, it indicates that the current sequence is not allowed to perform prediction using the interpolation filter prediction mode, and when sps_eip_enabled_flag=1, it indicates that the current sequence is allowed to perform prediction using the interpolation filter prediction mode.
[0126] Illustratively, the fourth information is carried in a sequence level parameter set (SPS), for example, as shown in Table 1.
[0127] JPEG2026508708000007.jpg60157
[0128] Here, sps_eip_enabled_flag represents fourth information, and is conveyed in seq_parameter_set_rbsp( ). For example, sps_eip_enabled_flag=0 indicates that the current sequence is not permitted to perform prediction using the interpolation filter prediction mode, and sps_eip_enabled_flag=1 indicates that the current sequence is permitted to perform prediction using the interpolation filter prediction mode.
[0129] In some embodiments, the present application may further include a general constraints information (GCI) identification bit to indicate whether to use the interpolation filter prediction technique. Exemplarily, the gci_no_eip_constraint_flag indicates whether the current video enables the interpolation filter prediction technique. Exemplarily, the gci_no_eip_constraint_flag is carried in the general constraints information (general_constraints_info( )), as shown in Table 2.
[0130] JPEG2026508708000008.jpg72157
[0131] As shown in Table 2, gci_no_eip_constraint_flag=1 indicates that the current video does not enable interpolation filter prediction technology. That is, it means that a constraint is imposed on the sequence-level interpolation filter intra prediction technology that it must be 0 in all images. In other words, it means that the adoption of interpolation filter intra prediction technology is not permitted in all sequences included in the current video. When gci_no_eip_constraint_flag=0, it indicates that the current video enables interpolation filter prediction technology. That is, it means that a constraint is not imposed on the sequence-level interpolation filter intra prediction technology that it must be 0 in all images.
[0132] As can be seen from the above, when the syntax elements in the embodiment of the present application include the high-level syntax elements gci_no_eip_constraint_flag and sps_eip_enabled_flag, and the block-level intra_eip_flag, the decoding side first decodes the high-level syntax elements. Specifically, first, gci_no_eip_constraint_flag is decoded, and if gci_no_eip_constraint_flag=0, then sps_eip_enabled_flag is decoded. If sps_eip_enabled_flag=1, the syntax elements of the block are analyzed.
[0133] For example, block-level syntax elements are shown in Table 3.
[0134] JPEG2026508708000009.jpg45157
[0135] In Table 3, cbWidth and cbHeight indicate the width and height of the current block, SIZE_A may be understood as the third predetermined value, SIZE_B as the fourth predetermined value, XX as the first predetermined value, and YY as the second predetermined value. x0 and y0 indicate the coordinate difference between the top left corner of the current block and the top left corner of the current image.
[0136] As can be seen from Table 3 above, when the fourth sequence-level information sps_eip_enabled_flag=1 indicates that the use of the interpolation filter prediction mode is enabled in the current sequence, the control unit 10 determines whether the position of the current block in the current image satisfies a predetermined position requirement and whether the size of the current block satisfies a predetermined block size requirement. If it is determined that the position of the current block in the current image satisfies the predetermined position requirement and the size of the current block satisfies the predetermined block size requirement, the control unit 10 decodes the third information intra_eip_flag, and determines whether the current block is predicted using the interpolation filter prediction mode based on the decoded third information intra_eip_flag.
[0137] The specific process of determining whether the current block is predicted using the interpolation filter prediction mode has been described above.
[0138] In the embodiment of the present application, if the decoding side determines that the current block adopts the interpolation filter prediction mode for prediction, the current block is predicted using the interpolation filter prediction mode to obtain a predicted value of the current block.
[0139] Hereinafter, a process in which the decoding side performs prediction on the current block using the interpolation filter prediction mode will be described.
[0140] When it is determined that the current block is predicted using the interpolation filter prediction mode, the decoding side first determines a reference region and an interpolation filter for the current block.
[0141] A specific process by which the decoding side determines the reference area of the current block will be described below.
[0142] In the present embodiment, the reference region of the current block is part or all of the already reconstructed region surrounding the current block.
[0143] For example, as shown in Figure 12, the reconstruction area around the current block may include an upper reconstruction area of the current block, a left reconstruction area of the current block, an upper right reconstruction area of the current block, a lower left reconstruction area of the current block, and an upper left reconstruction area of the current block. Note that the block to be predicted in Figure 12 is the current block.
[0144] The embodiment of the present application does not limit the specific shape and size of the reference area of the current block.
[0145] In one example, the reference area of the current block includes any one of the following reconstruction areas: an upper reconstruction area of the current block, a left reconstruction area of the current block, an upper right reconstruction area of the current block, a lower left reconstruction area of the current block, and an upper left reconstruction area of the current block. For example, the reference area of the current block is the upper reconstruction area of the current block, or the reference area of the current block is the left reconstruction area of the current block.
[0146] In one example, the reference area of the current block includes any two of the upper reconstruction area of the current block, the left reconstruction area of the current block, the upper right reconstruction area of the current block, the lower left reconstruction area of the current block, and the upper left reconstruction area of the current block. For example, the reference area of the current block includes the upper reconstruction area of the current block and the left reconstruction area of the current block. Also, for example, the reference area of the current block includes the upper reconstruction area of the current block and the lower left reconstruction area of the current block.
[0147] In one example, the reference region of the current block includes any three reconstruction regions from among the upper reconstruction region of the current block, the left reconstruction region of the current block, the upper right reconstruction region of the current block, the lower left reconstruction region of the current block, and the upper left reconstruction region of the current block. For example, the reference region of the current block includes the upper reconstruction region of the current block, the upper right reconstruction region of the current block, and the upper left reconstruction region of the current block. Also, for example, the reference block of the current block includes the left reconstruction region of the current block, the upper left reconstruction region of the current block, and the lower left reconstruction region of the current block.
[0148] In one example, the reference region of the current block includes any four reconstruction regions from among the upper reconstruction region of the current block, the left reconstruction region of the current block, the upper right reconstruction region of the current block, the lower left reconstruction region of the current block, and the upper left reconstruction region of the current block. For example, the reference region of the current block includes the upper reconstruction region of the current block, the upper right reconstruction region of the current block, the upper left reconstruction region of the current block, and the left reconstruction region of the current block. Also, for example, the reference block of the current block includes the left reconstruction region of the current block, the upper left reconstruction region of the current block, the lower left reconstruction region of the current block, and the upper reconstruction region of the current block.
[0149] In one example, the reference area of the current block includes all five reconstruction areas: the upper reconstruction area of the current block, the left reconstruction area of the current block, the top right reconstruction area of the current block, the bottom left reconstruction area of the current block, and the top left reconstruction area of the current block.
[0150] In the embodiment of the present application, the specific manner in which the decoding side determines the reference area of the current block includes, but is not limited to, the following:
[0151] Method 1: The reference region of the current block is set as the default region. For example, on the encoding side and the decoding side, the reference region of the current block is set as default to include at least one of the upper reconstruction region of the current block, the left reconstruction region of the current block, the upper right reconstruction region of the current block, the lower left reconstruction region of the current block, and the upper left reconstruction region of the current block.
[0152] In method 2, the decoding side decodes the bitstream to obtain first information, which is used to indicate the type of reference area of the current block. Based on the type of reference area, the decoding side determines the reference area of the current block from among the P pre-defined reference areas, where P is a positive integer greater than 1.
[0153] In this implementation method, the encoding side determines a reference area for the current block from among P preset reference areas. For example, the encoding side calculates the coding costs corresponding to each of the P reference areas and determines the reference area with the smallest coding cost as the reference area for the current block. Next, the encoding side indicates the type of reference area with the smallest coding cost to the decoding side via first information. As a result, the decoding side decodes the bitstream to obtain the first information, and further determines a reference area for the current block from among the P preset reference areas based on the type of reference area indicated by the first information.
[0154] The P preset reference regions are assumed to have different types or shapes.
[0155] The embodiments of the present application do not specifically limit the specific number and shape of the P reference regions.
[0156] In one example, the P reference regions include at least one of a first reference region, a second reference region, and a third reference region.
[0157] Here, the first reference region shown in Figure 13A includes reconstruction regions above, above right, left, above left, and above left of the current block. The second reference region shown in Figure 13B includes reconstruction regions above, above right, and above left of the current block. The third reference region shown in Figure 13C includes reconstruction regions to the left, above left, and above left of the current block. The block to be predicted in Figures 13A to 13C is the current block.
[0158] The embodiment of the present application does not limit the specific representation format of the first information, and any indication information capable of indicating the type of the reference area of the current block may be used.
[0159] In one example, the first information is represented as eip_ref_type, and different types of reference regions are indicated depending on the value of eip_ref_type.
[0160] For example, as shown in Table 4, the correspondence between the three reference regions shown in FIGS. 13A and 13B and the values of eip_ref_type is as follows:
[0161] JPEG2026508708000010.jpg54157
[0162] Based on Table 4 above, the decoding side decodes the bitstream to obtain the first information eip_ref_type, and further determines the reference area of the current block based on the value of the first information eip_ref_type. For example, if eip_ref_type=0, the reference area of the current block is determined as the first reference area. As shown in FIG. 13A, the first reference area includes the reconstruction areas above, to the right, to the left, to the top left, and to the top left of the current block. If eip_ref_type=1, the reference area of the current block is determined as the second reference area. As shown in FIG. 13B, the second reference area includes the reconstruction areas above, to the right, and to the top left of the current block. If eip_ref_type=2, the reference area of the current block is determined as the third reference area. As shown in FIG. 13C, the third reference area includes the reconstruction areas above, to the right, and to the top left of the current block.
[0163] Note that, although an example has been described above in which the P reference regions are the three reference regions shown in Figures 13A to 13C, the P reference regions in the embodiments of the present application may further include other reference regions in addition to the three reference regions described above, but the embodiments of the present application are not limited to this. The correspondence relationship between the reference regions and the values of eip_ref_type shown in Table 4 above can be adjusted as appropriate depending on the number of reference regions.
[0164] In some embodiments, the decoding side may employ a truncated binary code decoding method to decode and obtain the first information from the bitstream.
[0165] For example, the correspondence between the truncated binary code, the value of eip_ref_type, and the type of the reference area is as shown in Table 5.
[0166] JPEG2026508708000011.jpg59158
[0167] In the embodiment of the present application, the decoding side may adopt an equal probability decoding method or a context model decoding method to decode the codewords of the truncated binary code.
[0168] The decoding side may determine the reference area of the current block by using the above-described method 1 or method 2, or may determine the reference area of the current block by employing the following method 3.
[0169] Method 3: Determine the reference region of the current block among the P preset reference regions according to the shape of the current block.
[0170] In Method 3, prediction is performed using different reference regions for current blocks with different shapes, thereby improving prediction accuracy.
[0171] For example, if the shape of the current block is square, the first type of reference area is used.
[0172] Also, for example, if the shape of the current block is a rectangle whose width is greater than its height, the second type of reference area is used.
[0173] Also, for example, if the shape of the current block is a rectangle whose width is smaller than its height, a third type of reference area is used.
[0174] That is, in the embodiment of the present application, the correspondence relationship between the P reference regions and the shape of the current block is preset, so that the decoding side may determine the reference region of the current block from among the P reference regions based on the shape of the current block and the correspondence relationship between the P reference regions and the shape of the current block.
[0175] The process by which the decoding side determines the interpolation filter for the current block will be described below.
[0176] In the embodiment of the present application, there is no limitation on the specific shape of the interpolation filter.
[0177] Illustratively, the interpolation filters provided by the embodiments of the present application include, but are not limited to, square interpolation filters and interpolation filters whose height is less than their width.
[0178] For example, square interpolation filters include, but are not limited to, the 4x4 interpolation filter shown in Figure 14A.
[0179] Also, for example, interpolation filters whose height is greater than their width include, but are not limited to, the 5x3 interpolation filter shown in Figure 14B, the 6x2 interpolation filter shown in Figure 14D, and the 7x1 interpolation filter shown in Figure 14G.
[0180] Also, for example, interpolation filters whose height is smaller than their width include, but are not limited to, the 3x5 interpolation filter shown in Figure 14C, the 2x6 interpolation filter shown in Figure 14E, and the 1x7 interpolation filter shown in Figure 14F.
[0181] JPEG2026508708000012.jpg18161
[0182] In the embodiment of the present application, the specific manner in which the decoding side determines the interpolation filter of the current block includes, but is not limited to, the following:
[0183] Method 1: The interpolation filter of the current block is set as a default interpolation filter. For example, on the encoding side and the decoding side, the interpolation filter of the current block is set as a default to any one of the interpolation filters shown in Figures 14A to 14G. For example, the default interpolation filter is a 4x4 interpolation filter.
[0184] In method 2, the decoder decodes the bitstream to obtain second information, which is used to indicate the shape of an interpolation filter for a current block. Based on the shape of the interpolation filter for the current block, the decoder determines an interpolation filter for the current block from among Q preset interpolation filters, where Q is a positive integer greater than 1.
[0185] In this implementation method, the encoding side determines an interpolation filter for the current block from among Q preset interpolation filters. For example, the encoding side determines coding costs corresponding to the Q interpolation filters and selects the interpolation filter with the minimum coding cost as the interpolation filter for the current block. Next, the encoding side indicates the shape of the determined interpolation filter with the minimum coding cost to the decoding side via second information. As a result, the decoding side decodes the bitstream to obtain the second information, and further determines an interpolation filter for the current block from among the Q preset interpolation filters based on the shape of the interpolation filter indicated by the second information.
[0186] It should be noted that the Q preset interpolation filters each have a different shape.
[0187] The embodiments of the present application do not specifically limit the specific number and shapes of the Q interpolation filters, for example, the Q interpolation filters include at least one of a first interpolation filter, a second interpolation filter, and a third interpolation filter, where the first interpolation filter is a square interpolation filter, the second interpolation filter is a rectangular interpolation filter whose width is greater than its height, and the third interpolation filter is a rectangular interpolation filter whose height is greater than its width.
[0188] In one example, the Q interpolation filters include the plurality of interpolation filters shown in FIGS. 14A-14H.
[0189] The embodiment of the present application does not limit the specific representation format of the second information, and any indication information capable of indicating the shape of the interpolation filter for the current block may be used.
[0190] In one example, the second information is represented as eip_filter_type. For example, different shapes of interpolation filters are designated depending on the value of eip_filter_type.
[0191] For example, when the Q interpolation filters are the five interpolation filters shown in FIG. 15, the correspondence between the five interpolation filters and the values of eip_filter_type is as shown in Table 6.
[0192] JPEG2026508708000013.jpg49158
[0193] Based on Table 5 above, the decoding side decodes the bitstream to obtain the second information eip_filter_type, and further determines the interpolation filter for the current block based on the value of the second information eip_filter_type. For example, if eip_filter_type=0, the shape of the interpolation filter for the current block is determined to be 4x4. If eip_filter_type=1, the shape of the interpolation filter for the current block is determined to be 3x5. If eip_filter_type=2, the shape of the interpolation filter for the current block is determined to be 5x3. If eip_filter_type=3, the shape of the interpolation filter for the current block is determined to be 2x6. If eip_filter_type=4, the shape of the interpolation filter for the current block is determined to be 6x2.
[0194] In some embodiments, the decoding side may employ a truncated binary code decoding method to decode and obtain the second information from the bitstream.
[0195] For example, if the preset Q interpolation filters include the five interpolation filters shown in FIG. 15, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 7.
[0196] JPEG2026508708000014.jpg55158
[0197] In this case, when the five types of interpolation filter shapes shown in Table 7 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of 15 types of combinations of interpolation filters and reconstruction regions exist.
[0198] In some embodiments, the decoding side may decode the bitstream to obtain the second information eip_filter_type, and then determine the interpolation filter for the current block from the above-mentioned Table 7 based on the shape of the interpolation filter indicated by the second information eip_filter_type. Similarly, the decoding side may decode the bitstream to obtain the first information eip_ref_type, and then determine the reference region for the current block from the above-mentioned Table 5 based on the value of the first information eip_ref_type.
[0199] In one example, the syntax elements of an embodiment of the present application are as shown in Table 8.
[0200] JPEG2026508708000015.jpg158161
[0201] As shown in Table 8, the decoding side decodes the bitstream and first obtains the fourth information sps_eip_enabled_flag at the sequence level. The fourth information sps_eip_enabled_flag indicates whether prediction using the interpolation filter prediction mode is permitted in the current sequence. Next, it determines whether the position of the current block in the current image satisfies a predetermined position requirement and whether the size of the current block satisfies a predetermined block size requirement. If it is determined that the position of the current block in the current image satisfies the predetermined position requirement and the size of the current block satisfies the predetermined block size requirement, it decodes the third information intra_eip_flag. The third information intra_eip_flag indicates whether the current block is predicted using the interpolation filter prediction mode. If the third information intra_eip_flag=1 indicates that the current block is predicted using the interpolation filter prediction mode, it decodes the bitstream to obtain the first information eip_ref_type and the second information eip_filter_type. Here, the first information eip_ref_type indicates the type of reference region of the current block, so that the decoding side can obtain the reference region of the current block by table lookup based on the value of the first information eip_ref_type.Furthermore, the second information eip_filter_type indicates the shape of the interpolation filter of the current block, so that the decoding side can obtain the interpolation filter of the current block by table lookup based on the value of the second information eip_filter_type.
[0202] In some embodiments, if an embodiment of the present application includes the seven interpolation filters shown in FIG. 16, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 9.
[0203] JPEG2026508708000016.jpg75161
[0204] In this case, when the seven types of interpolation filter shapes shown in Table 9 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of 21 types of combinations of interpolation filters and reconstruction regions exist.
[0205] Similarly, the decoding side can decode the syntax shown in Table 8 and obtain the reference region and interpolation filter of the current block by referring to Table 5 and the above-described Table 8.
[0206] In some embodiments, if an embodiment of the present application includes the three interpolation filters shown in FIG. 17, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 10.
[0207] JPEG2026508708000017.jpg48152
[0208] In this case, when the three types of interpolation filter shapes shown in Table 10 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of nine combinations of interpolation filters and reconstruction regions exist.
[0209] Similarly, the decoding side can obtain the reference region and interpolation filter of the current block by decoding the syntax shown in Table 8 and looking up Table 5 and Table 10 described above.
[0210] In some embodiments, if an embodiment of the present application includes the three interpolation filters shown in FIG. 18A, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 11.
[0211] JPEG2026508708000018.jpg48152
[0212] In this case, when the three types of interpolation filter shapes shown in Table 11 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of nine combinations of interpolation filters and reconstruction regions exist.
[0213] Similarly, the decoding side can obtain the reference region and interpolation filter of the current block by decoding the syntax shown in Table 8 and looking up Table 5 and Table 11 described above.
[0214] In some embodiments, if an embodiment of the present application includes the three interpolation filters shown in FIG. 18B, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 12.
[0215] JPEG2026508708000019.jpg47152
[0216] In this case, when the three types of interpolation filter shapes shown in Table 12 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of nine combinations of interpolation filters and reconstruction regions exist.
[0217] Similarly, the decoding side can obtain the reference region and interpolation filter of the current block by decoding the syntax shown in Table 8 and looking up Table 5 and Table 11 described above.
[0218] Generally, using a filter with more taps for the same number of samples can achieve a better interpolation effect. Compared with the 2x6 and 6x2 interpolation filters shown in Figure 18A, the interpolation filters shown in Figure 18B have an increased number of taps. For example, they are expanded to 2x8 and 8x2 interpolation filters. In fact, the 2x8 and 8x2 filters, like the 4x4 filter, use 15 samples as input and obtain one result as output. From the perspective of complexity, the complexity of these filters is similar. Therefore, the interpolation filter shown in Figure 18B can improve the interpolation effect without increasing complexity.
[0219] In some embodiments, if an embodiment of the present application includes the three interpolation filters shown in FIG. 19, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 13.
[0220] JPEG2026508708000020.jpg49152
[0221] In this case, when the three types of interpolation filter shapes shown in Table 13 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of nine combinations of interpolation filters and reconstruction regions exist.
[0222] Similarly, the decoding side can obtain the reference region and interpolation filter of the current block by decoding the syntax shown in Table 8 and looking up Table 5 and Table 13 described above.
[0223] The decoding side may determine the interpolation filter for the current block by using the above-described method 1 or method 2, or may determine the interpolation filter for the current block by employing the following method 3.
[0224] Method 3: Determine the interpolation filter of the current block from among the Q preset interpolation filters according to the shape of the current block.
[0225] In the method 3, different interpolation filters are used to perform prediction for current blocks with different shapes, thereby improving the accuracy of prediction.
[0226] For example, if the shape of the current block is square, an interpolation filter of the first type of shape is used.
[0227] Also, for example, if the shape of the current block is a rectangle whose width is greater than its height, an interpolation filter of a second type of shape is used.
[0228] Also, for example, if the shape of the current block is a rectangle whose width is smaller than its height, an interpolation filter of a third type of shape is used.
[0229] That is, in the embodiment of the present application, the correspondence relationship between the Q interpolation filters and the shape of the current block is preset, so that the decoding side can determine the interpolation filter for the current block from among the Q interpolation filters based on the shape of the current block and the correspondence relationship between the Q interpolation filters and the shape of the current block.
[0230] In the embodiment of the present application, the decoding side determines the reference region and interpolation filter of the current block according to the above steps, and then determines a prediction block of the current block according to the reference region and interpolation filter.
[0231] A process in which the decoding side determines a prediction block for the current block based on the reference region and interpolation filter of the current block will be described below.
[0232] In an embodiment of the present application, the decoding side determines a reference region and an interpolation filter for a current block, and then determines filter coefficients of the interpolation filter by filtering the reference region using the interpolation filter. Then, it performs interpolation filtering on the current block based on the determined filter coefficients to obtain a predicted block for the current block.
[0233] The embodiment of the present application does not limit the specific manner in which the decoding side determines the prediction block of the current block based on the reference region and interpolation filter of the current block.
[0234] In some embodiments, determining a prediction block of the current block based on the reference region and the interpolation filter of the current block in the above-mentioned S101 includes the following steps:
[0235] S101-A1, determining filter coefficients of an interpolation filter based on a reference region.
[0236] S101-A2, perform interpolation filtering prediction on the current block using an interpolation filter according to the filter coefficients to obtain a prediction block of the current block.
[0237] The methods for determining the filter coefficients of the interpolation filter in S101-A1 described above include at least the following methods.
[0238] Method 1: The interpolation filter determined above is slid over the reference region of the current block to construct a Wiener-Hopf equation, and then the filter coefficients of the interpolation filter are obtained by solving the Wiener-Hopf equation.
[0239] JPEG2026508708000021.jpg55161
[0240] In one example, the Wiener-Hopf equation constructed by sliding an interpolation filter within the reference region of the current block is shown in Equation (3).
[0241] JPEG2026508708000022.jpg27161JPEG2026508708000023.jpg22161
[0242] JPEG2026508708000024.jpg32161
[0243] In one example, the decoding side employs a method of decomposing the autocorrelation coefficient matrix using Cholesky decomposition, and solves the Wiener-Hopf equation shown in equation (3) above to obtain the filter coefficients of the filter.
[0244] The decoding side determines the filter coefficients of the interpolation filter based on the above-mentioned equation (3), and then performs interpolation filtering prediction on the current block using the interpolation filter based on the filter coefficients to obtain a predicted block of the current block.
[0245] For example, the decoding side obtains the prediction block of the current block according to the following equation (4):
[0246] JPEG2026508708000025.jpg21161JPEG2026508708000026.jpg43161
[0247] Method 2: The above-mentioned S101-A1 includes the following steps S101-A11 to S101-A14.
[0248] S101-A11, determine a first reconstruction region around the current block.
[0249] S101-A12: determining a pixel average reconstruction value based on the reconstruction value of the first reconstruction region;
[0250] In step S101-A13, mean subtraction is performed on the reconstruction values of the pixel points in the reference region based on the pixel mean reconstruction value.
[0251] In step S101-A14, the pixel values of the pixel points in the reference region after averaging are removed are input to an interpolation filter, and the interpolation filter is slid within the reference region to obtain the filter coefficients of the interpolation filter.
[0252] In this method 2, averaging is performed on the reference region, and the filter coefficients of the interpolation filter are determined based on the reference region after averaging is removed. Since the amount of data is reduced by performing averaging on the reference region, determining the filter coefficients based on the reference region after averaging can improve the efficiency of determining the filter coefficients.
[0253] Specifically, the decoding side may first determine one first reconstruction region, and the first reconstruction region may be an arbitrary part of the reconstruction region surrounding the current block.
[0254] In the embodiment of the present application, the methods by which the decoding side determines the first reconstruction region around the current block include at least the following methods.
[0255] Method 1: By default, the decoding side determines one reconstruction area around the current block as the first reconstruction area.
[0256] For example, as shown in FIG. 20, the decoding side determines, by default, an area consisting of one row from the top, one column to the left, and one pixel point at the top left corner of the current block as the first reconstruction area.
[0257] Method 2: Determine the first reconstruction area based on the shape of the current block.
[0258] For example, if the shape of the current block is square, the reconstruction pixel area one row above and one column to the left of the current block is determined as the first reconstruction area.
[0259] Also, for example, if the shape of the current block is a rectangle whose width is greater than its height, the reconstruction pixel area in the upper row of the current block is determined as the first reconstruction area.
[0260] Also, for example, if the shape of the current block is a rectangle with its height greater than its width, the reconstruction pixel area on the left side of the current block is determined as the first reconstruction area.
[0261] The method for determining the first reconstruction region based on the shape of the current block includes, but is not limited to, the above-mentioned examples.
[0262] After determining the first reconstruction region, the decoding side determines the pixel average reconstruction value m based on the reconstruction values of the first reconstruction region.
[0263] In one implementation, the average value of the reconstruction values in the first reconstruction region is determined as the pixel average reconstruction value m.
[0264] In one example, when the first reconstruction region is as shown in FIG. 20, the pixel average reconstruction value m may be calculated by the method shown in Table 14.
[0265] JPEG2026508708000027.jpg121156
[0266] In one example, if the first reconstruction region is one row above and / or one column to the left of the current block, the average of the reconstruction values in the one row above and / or one column to the left may be determined as the pixel average reconstruction value m. In this case, the pixel average reconstruction value m can be calculated using the method shown in Table 15.
[0267] JPEG2026508708000028.jpg169158
[0268] As shown in Table 15 above, when the first reconstruction region is one row above and / or one column to the left of the current block, the pixel average reconstruction value m can be calculated quickly by adopting a shift operation instead of division.
[0269] The decoding side may determine the average value of the reconstructed values in the first reconstruction region as the pixel average reconstructed value m, or may determine the pixel average reconstructed value m by the following method.
[0270] In another method, the weighted average of the reconstruction values of the first reconstruction region is determined as the pixel average reconstruction value m.
[0271] The decoding side may also determine the pixel average reconstruction value m using other methods.
[0272] After determining the pixel average reconstruction value, the decoding side performs averaging removal on the reconstruction values of the pixel points in the reference area based on the pixel average reconstruction value.
[0273] For example, for each pixel point in the reference region, the reconstructed value of the pixel point is divided by the pixel average reconstructed value described above and then rounded to obtain the pixel value of the pixel point after averaging in the reference region is removed.
[0274] Furthermore, for example, the decoding side subtracts the pixel average reconstruction value from the reconstruction value of the pixel point in the reference region to obtain the pixel value of the pixel point after averaging removal in the reference region. For example, for each pixel point in the reference region, the decoding side subtracts the pixel average reconstruction value described above from the reconstruction value of the pixel point to obtain the pixel value of the pixel point after averaging removal in the reference region.
[0275] The embodiments of the present application do not limit the specific method by which the decoding side performs averaging removal on the reconstructed values of pixel points in the reference area based on the pixel average reconstructed value.
[0276] The decoding side performs averaging removal on the reconstructed values of the pixel points in the reference region based on the above-described method, obtains the pixel values of the pixel points in the reference region after averaging removal, and then executes the above-described steps S101-A14. The pixel values of the pixel points in the reference region after averaging removal are input to an interpolation filter, and the interpolation filter is slid within the reference region to obtain the filter coefficients of the interpolation filter.
[0277] For example, Figure 21 shows a process of obtaining filter coefficients of an interpolation filter by sliding the interpolation filter of the current block on the reference region of the current block after averaging removal, when the interpolation filter of the current block has five different shapes and the reference region of the current block has three different types. The interpolation filter may slide horizontally by one row or vertically by one column on the reference region after averaging removal. Note that the block to be predicted in Figure 21 is the current block.
[0278] JPEG2026508708000029.jpg56161
[0279] In one example, the Wiener-Hopf equation constructed by sliding the interpolation filter within the reference region of the current block is shown in Equation (5).
[0280] JPEG2026508708000030.jpg38161JPEG2026508708000031.jpg18161
[0281] JPEG2026508708000032.jpg31161
[0282] In one example, the decoding side employs a method of decomposing the autocorrelation coefficient matrix using Cholesky decomposition, and solves the Wiener-Hopf equation shown in equation (5) above to obtain the filter coefficients of the filter.
[0283] The decoding side determines the filter coefficients of the interpolation filter based on the above-mentioned equation (5), then executes the above-mentioned step S101-A2, performs interpolation filtering prediction on the current block using the interpolation filter based on the filter coefficients, and obtains a predicted block of the current block.
[0284] In the above equation (5), the filter coefficients are determined using the reference region after averaging is removed. Therefore, when determining the predicted value of the current block based on the filter coefficients, the influence of the pixel average reconstruction value m must be taken into consideration.
[0285] In one possible implementation, the interpolation filter coefficients determined by the above equation (5) are substituted into the above equation (4) to obtain the predicted value of each point in the current block, and then the pixel average reconstruction value m is added to the predicted value of each point to obtain the final predicted value of each point in the current block, thereby obtaining the predicted block of the current block.
[0286] In another possible implementation manner, the above-mentioned S101-A2 includes the following steps:
[0287] S101-A21, for the r-th point within the current point, determine pixel values at N positions corresponding to the r-th point based on the shape of the interpolation filter, where r is a positive integer.
[0288] In step S101-A22, pixel values at N positions are subjected to averaging removal based on the pixel average reconstruction value, and pixel values at N positions after averaging removal are obtained.
[0289] In S101-A23, a predicted value of the r-th point is obtained based on the pixel values after averaging and the filter coefficients of the N positions.
[0290] S101-A24, obtain a predicted block of the current block based on the predicted value of each point in the current block.
[0291] As shown in Figure 22, assuming that the shape of the interpolation filter of the current block is 4x4, the decoding side sequentially performs interpolation prediction for each position in the current block using an interpolation filter with known filter coefficients. Specifically, for the rth point in the current block, first, pixel values of N positions corresponding to the rth point are determined based on the shape of the interpolation filter of the current block. For example, as shown in Figure 22, in a 4x4 interpolation filter, the dark color position is the position of the rth point to be processed, and the 15 light color positions are N positions corresponding to the rth point. Here, the block to be predicted in Figure 22 is the current block.
[0292] Next, pixel values of N positions corresponding to the r-th point are determined. For example, for any of the N positions, if the position is in a reconstruction region surrounding the current block, the reconstruction value of the position is determined as the pixel value of the position. If the position is within the current block, the predicted value of the position is determined as the pixel value of the position.
[0293] Since the above-mentioned filter coefficients are determined based on the reference area after averaging removal, the decoding side performs averaging removal on pixel values at N positions of the r-th point based on the pixel average reconstruction value, thereby obtaining pixel values at N positions of the r-th point after averaging removal. For example, by subtracting the pixel average reconstruction value from the pixel values at N positions of the r-th point, pixel values at N positions of the r-th point after averaging removal are obtained.
[0294] Next, a predicted value of the r-th point is obtained based on the pixel values after averaging and the filter coefficients at the N positions.
[0295] The embodiment of the present application does not limit the specific manner of obtaining the predicted value of the r-th point based on the pixel values and filter coefficients after averaging removal at N positions.
[0296] JPEG2026508708000033.jpg31161
[0297] In another implementation, the above-mentioned S101-A23 includes the following steps:
[0298] S101-A231: determining a second reconstruction area around the current block, and determining the maximum reconstruction value and the minimum reconstruction value of the second reconstruction area;
[0299] S101-A232: Obtain a first predicted value based on the pixel values after averaging removal at N positions, the filter coefficients, and the pixel average reconstruction value.
[0300] S101-A233, determine a predicted value of the r-th point based on the first predicted value, the maximum reconstructed value, and the minimum reconstructed value.
[0301] JPEG2026508708000034.jpg19161
[0302] The embodiment of the present application does not limit the specific manner of determining the second reconstruction region around the current block.
[0303] In one example, the second reconstruction region of the current block coincides with the reference region of the current block.
[0304] In one example, the second reconstruction area of the current block coincides with the first reconstruction area of the current block.
[0305] In one example, the reconstruction regions above, to the left, above right, above left, and below left of the current block are determined as the second reconstruction region, i.e., the reconstruction regions of the top 13 rows, the left 13 columns, the top 13 rows, the top left 13 rows and 13 columns, and the bottom left 13 columns of the current block are determined as the second reconstruction region.
[0306] In addition, the execution order of the specific process of S101-A231 and S101-A232 is not limited. For example, S101-A231 may be executed before S101-A232, after S101-A232, or simultaneously with S101-A232.
[0307] The embodiments of the present application do not limit the specific method by which the decoding side obtains the first predicted value based on the pixel values after averaging removal at N positions, the filter coefficients, and the pixel average reconstruction value.
[0308] For example, the pixel values after averaging removal at N positions of the rth point are multiplied by a filter coefficient to obtain a second predicted value of the rth point, and the second predicted value is added to the pixel average reconstruction value to obtain a first predicted value of the rth point.
[0309] For example, the decoding side obtains the first predicted value of the r-th point based on the following equation (6).
[0310] JPEG2026508708000035.jpg21161 JPEG2026508708000036.jpg22161
[0311] Also, for example, the decoding side obtains one predicted value of the r-th point based on the above-mentioned equation (6), and then performs prediction processing on the predicted value to obtain a first predicted value of the r-th point.
[0312] The decoding side determines the first predicted value of the rth point in the current block based on the above steps, and then determines the predicted value of the rth point based on the first predicted value, the maximum reconstructed value, and the minimum reconstructed value.
[0313] For example, if the first predicted value is greater than the minimum reconstruction value and less than the maximum reconstruction value, the first predicted value is determined as the predicted value of the r-th point.
[0314] Also, for example, if the first predicted value is equal to or less than the minimum reconstructed value, the minimum reconstructed value is determined as the predicted value of the r-th point.
[0315] Furthermore, for example, if the first predicted value is equal to or greater than the maximum reconstructed value, the maximum reconstructed value is determined as the predicted value of the r-th point.
[0316] In one example, the decoding side determines the predicted value of the r-th point based on the following equation (7).
[0317] JPEG2026508708000037.jpg21161 JPEG2026508708000038.jpg17161
[0318] The above describes an example of determining the predicted value of the rth point in the current block, but the decoding side refers to the above method to determine the predicted value of each point in the current block, and further, the predicted values of each point in the current block constitute a predicted block of the current block.
[0319] The decoding side performs interpolation filtering prediction on the current block based on the above steps, and after obtaining the predicted block of the current block, performs the following steps:
[0320] S102, determine an intra prediction mode corresponding to the prediction block, and determine a transformation kernel corresponding to the current block according to the intra prediction mode corresponding to the prediction block.
[0321] As can be seen from the above description, when decoding a current block, the decoding side decodes the bitstream to obtain the quantized coefficients of the current block, then performs inverse quantization on the quantized coefficients to obtain the transform coefficients of the current block, and then performs inverse transform on the transform coefficients of the current block to obtain the residual block (or residual value) of the current block. At the same time, it determines the prediction mode of the current block, uses the prediction mode to predict the current block, obtains the predicted block of the current block, and adds the predicted block and the residual block to obtain the reconstructed block of the current block.
[0322] When performing an inverse transform on the transform coefficients of a current block, a transform kernel needs to be determined, and residual values of the current block are obtained by performing an inverse transform on the transform coefficients of the current block based on the transform kernel. Currently, a decoding side uses a conventional intra prediction mode to predict the current block, and the decoding side can determine the transform kernel to be used for the current block based on the correspondence between the conventional intra prediction mode and the transform kernel. However, in an embodiment of the present application, when predicting the current block, an interpolation filtering prediction mode is used instead of the conventional intra prediction mode. Therefore, it is not possible to directly determine the transform kernel corresponding to the current block based on the interpolation filtering prediction mode.
[0323] To solve this technical problem, in an embodiment of the present application, a prediction block of a current block is determined using an interpolation filtering prediction mode, a conventional intra prediction mode corresponding to the prediction block is determined, and a transformation kernel corresponding to the current block is determined based on the conventional intra prediction mode.
[0324] Hereinafter, a specific process by which the decoding side determines the intra prediction mode corresponding to the prediction block will be described.
[0325] In one example, as shown in FIG. 7, the conventional intra prediction modes included in the current VVC are as follows: PLANAR mode: Intra prediction mode index is 0, DC mode: Intra prediction mode index is 1, Angle mode: Intra prediction mode index is 2 to 66.
[0326] In one example, as shown in Figure 23, the direction of the arrow in the figure indicates the direction of angle mode prediction present in VVC, and the prediction mode indexes used during decoding are 2 to 66. If the current block is a non-square block, some angle directions are replaced with wide angles, for example, -1 to -14 and 67 to 80 in Figure 23.
[0327] In some embodiments, the intra prediction mode corresponding to the prediction block is a default intra prediction mode, i.e., when a current block is predicted using an interpolation filtering prediction mode to obtain a prediction block, one of the conventional intra prediction modes is determined by default as the intra prediction mode corresponding to the prediction block.
[0328] In some embodiments, the decoding side determines the intra prediction mode corresponding to the prediction block by the following steps.
[0329] S102-A1, determine angle values of M points in the prediction block, where M is a positive integer.
[0330] S102-A2, determine an intra prediction mode corresponding to the prediction block according to the angle values of the M points.
[0331] In the embodiment of the present application, the intra prediction mode corresponding to the prediction block is determined by calculating statistics of the intra prediction modes corresponding to the angle values of M points in the prediction block.
[0332] The embodiments of the present application do not limit the specific positions and number of the M points in the prediction block for determining the angle value, for example, the M points may be one point in the prediction block or multiple points in the prediction block.
[0333] For example, if the above M points are one point, the decoding side determines the angle value of one point within the prediction block (e.g., the center point of the prediction block), determines the intra prediction mode corresponding to the point based on the angle value of the point, and further determines the intra prediction mode as the intra prediction mode corresponding to the prediction block.
[0334] Also, for example, if the above M points are multiple points, the decoding side determines the angle values of the multiple points, determines the intra prediction mode corresponding to each of the multiple points based on the angle values of the multiple points, and further determines the intra prediction mode with the largest number of identical intra prediction modes among the multiple points as the intra prediction mode corresponding to the predicted block.
[0335] In some embodiments, when determining the angle values of M points in a prediction block using a sliding window method, the selection of the M points is related to the shape and size of the sliding window, for example, each of the M points is a center point of the sliding window as the sliding window slides within the prediction block.
[0336] In the embodiment of the present application, the method for determining the angle value of each of the M points is the same. For ease of explanation, the case of determining the angle value of the i-th point among the M points will be taken as an example.
[0337] The embodiments of the present application are not limited to a specific method for determining the angle value of a point.
[0338] In some embodiments, the above S102-A1 includes steps S102-A11 and S102-A12.
[0339] S102-A11, for an i-th point among M points, determine the horizontal gradient and vertical gradient of the i-th point, where i is a positive integer less than or equal to M;
[0340] S102-A12, determine the angle value of the i-th point based on the horizontal gradient and vertical gradient of the i-th point.
[0341] In this embodiment, for each of the M points (e.g., the i-th point), the decoding side first determines the horizontal gradient and vertical gradient of the i-th point, and then determines the angle value of the i-th point based on the horizontal gradient and vertical gradient.
[0342] The embodiments of the present application are not limited to a specific method for determining the horizontal gradient and vertical gradient of the i-th point.
[0343] In one example, a horizontal gradient value of the i-th point is determined based on the horizontal change between the predicted values of points around the i-th point in the predicted block and the predicted value of the i-th point, and a vertical gradient value of the i-th point is determined based on the vertical change between the predicted values of points around the i-th point in the predicted block and the predicted value of the i-th point.
[0344] In another example, the decoding side determines a predicted value of a point within a sliding window centered on the i-th point within the prediction block, and obtains the horizontal gradient and vertical gradient of the i-th point based on the predicted value of the point within the sliding window and a horizontal gradient operator and a vertical gradient operator.
[0345] In this example, a sliding window is first determined, for example, a 3x3 sliding window as shown in Figure 24. The sliding window is slid within the prediction block, and the horizontal and vertical gradients of the center point of the sliding window are determined each time the sliding window is slid. Taking an example in which the center point of the current sliding window is the i-th point, predicted values of each point within the current sliding window are first obtained, and predicted values of, for example, 3x3=9 points can be obtained. Next, the horizontal and vertical gradients of the i-th point are determined based on the predicted values of the 9 points and preset horizontal and vertical gradient operators.
[0346] JPEG2026508708000039.jpg18161
[0347] JPEG2026508708000040.jpg23161
[0348] The embodiments of the present application are not limited to specific values of the horizontal gradient operator and the vertical gradient operator.
[0349] JPEG2026508708000041.jpg24161
[0350] After determining the horizontal gradient and vertical gradient of the i-th point based on the above steps, the decoding side may determine the angle value of the i-th point based on the horizontal gradient and vertical gradient of the i-th point.
[0351] For example, the arctangent value of the ratio of the vertical gradient to the horizontal gradient of the i-th point is determined as the angle value of the i-th point, as shown in equation (8).
[0352] JPEG2026508708000042.jpg26161JPEG2026508708000043.jpg13161
[0353] The decoding side may determine the angle value of the i-th point using other methods besides determining the angle value of the i-th point using the above formula (8). For example, the decoding side obtains the angle value of the i-th point by adjusting the angle value determined by the above formula (8).
[0354] The decoding side applies the above method to each of the M points, and after determining the angle values of each of the M points, it then executes the above S102-A2 to determine the intra prediction mode corresponding to the predicted block based on the angle values of the M points.
[0355] The embodiment of the present application does not limit the specific manner of determining the intra prediction mode corresponding to the prediction block based on the angle values of the M points.
[0356] In some embodiments, the decoding side selects the angle value 1 that appears most frequently from the angle values of the M points, matches the angle value 1 with the prediction angle of a conventional intra prediction mode to obtain the intra prediction mode corresponding to the angle value 1, and further determines the intra prediction mode corresponding to the angle value 1 as the intra prediction mode corresponding to the predicted block.
[0357] In some embodiments, the above S102-A2 includes the following steps S102-A21 and S102-A22.
[0358] S102-A21, determine intra prediction modes corresponding to the M points according to the angle values of the M points.
[0359] S102-A22, determine an intra prediction mode corresponding to a prediction block according to the intra prediction modes corresponding to the M points.
[0360] In this implementation, the decoding side determines the intra prediction mode corresponding to each of the M points based on the angle values of each of the M points. For example, for each of the M points, the angle value of the point is matched with the prediction angle of a conventional intra prediction mode to obtain the intra prediction mode corresponding to the angle value of the point. In this way, the intra prediction mode corresponding to each of the M points can be obtained.
[0361] Next, the intra prediction mode corresponding to the prediction block is determined based on the intra prediction modes corresponding to each of these M points.
[0362] In one possible implementation, among the intra prediction modes corresponding to the M points, the intra prediction mode that is repeated most often is determined as the intra prediction mode corresponding to the prediction block.
[0363] In another possible implementation manner, the above S102-A22 includes the following steps:
[0364] S102-A221, determining gradient amplitude values corresponding to the M points based on the horizontal gradients and vertical gradients of the M points;
[0365] S102-A222, determine an intra prediction mode corresponding to the prediction block according to the intra prediction mode and gradient amplitude values corresponding to the M points.
[0366] In this implementation, the decoding side determines gradient amplitude values corresponding to each of the M points based on the horizontal gradients and vertical gradients of each of the M points determined above.
[0367] In the embodiments of the present application, the specific method for the decoding side to determine the gradient amplitude value corresponding to each of the M points is the same. For ease of explanation, the case of determining the gradient amplitude value corresponding to the i-th point among the M points will be taken as an example.
[0368] The embodiment of the present application does not limit the specific manner in which the decoding side determines the gradient amplitude value corresponding to the i-th point based on the horizontal gradient and vertical gradient of the i-th point.
[0369] For example, the decoding side multiplies the horizontal gradient and vertical gradient of the i-th point to obtain the gradient amplitude value corresponding to the i-th point.
[0370] Furthermore, for example, the decoding side adds the absolute value of the horizontal gradient and the absolute value of the vertical gradient of the i-th point to obtain the gradient amplitude value corresponding to the i-th point.
[0371] For example, the decoding side determines the gradient amplitude value corresponding to the i-th point based on the following equation (9).
[0372] JPEG2026508708000044.jpg22156 JPEG2026508708000045.jpg12161
[0373] The decoding side can determine the gradient amplitude values corresponding to each of the M points based on the above steps. Then, the decoding side performs the above steps S102-A222 to determine the intra prediction mode corresponding to the prediction block based on the intra prediction mode and gradient amplitude values corresponding to the M points.
[0374] In one example, the intra prediction mode corresponding to the point with the largest gradient amplitude value among the M points is determined as the intra prediction mode corresponding to the prediction block.
[0375] In another example, for any of the M points, the gradient amplitude value corresponding to the point is accumulated in the intra prediction mode corresponding to the point to obtain the accumulated gradient amplitude values of the intra prediction modes corresponding to the M points, and the intra prediction mode with the largest accumulated gradient amplitude value among the intra prediction modes corresponding to the M points is determined as the intra prediction mode corresponding to the prediction block.
[0376] For example, as shown in Figure 25, gradient amplitude values corresponding to each of M points are accumulated in the corresponding intra prediction mode. For example, if the intra prediction modes corresponding to points 1 and 2 of the M points are both intra prediction mode 1, the gradient amplitude values corresponding to points 1 and 2 are accumulated and added to the gradient amplitude value corresponding to intra prediction mode 1. By this analogy, the gradient amplitude histogram shown in Figure 25 can be obtained. As a result, the intra prediction mode with the largest accumulated gradient amplitude value in the gradient amplitude histogram can be determined as the intra prediction mode corresponding to the prediction block. For example, the intra prediction mode corresponding to the accumulated gradient amplitude values shown in dark colors in Figure 25 is determined as the intra prediction mode corresponding to the prediction block.
[0377] In some embodiments, if the gradient amplitude values corresponding to M points are all 0, a first intra prediction mode is determined as the intra prediction mode corresponding to the prediction block. That is, if the gradient amplitude values corresponding to all M points are all 0, it means that the horizontal gradients and vertical gradients of each of the M points are all 0. In this case, the pre-set first intra prediction mode may be determined as the intra prediction mode corresponding to the prediction block.
[0378] The embodiment of the present application is not limited to the first intra prediction mode.
[0379] Exemplarily, the first intra prediction mode is a planar mode.
[0380] After determining the intra prediction mode corresponding to the prediction block based on the above steps, the decoding side determines the transformation kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block.
[0381] The embodiments of the present application do not limit the specific manner in which the decoding side determines the transformation kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block.
[0382] In some embodiments, based on the intra prediction mode corresponding to the prediction block, the decoding side searches for an image block from among the already decoded image blocks surrounding the prediction block whose intra prediction mode is the same as the intra prediction mode corresponding to the prediction block, and further determines the transformation kernel corresponding to the image block as the transformation kernel corresponding to the current block.
[0383] In some embodiments, the step of determining a transformation kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block in S102 above includes the following steps:
[0384] S102-B1, obtaining a correspondence relationship between an intra prediction mode and a transform kernel group, where one transform kernel group includes at least one kind of transform kernel.
[0385] S102-B2: look up the first transform kernel group corresponding to the intra prediction mode of the prediction block in the above correspondence relationship.
[0386] S102-B3: determining a transformation kernel corresponding to the current block from the first transformation kernel group;
[0387] In the embodiment of the present application, there is a correspondence relationship between the intra prediction mode and the transform kernel group, and based on this, the decoding side determines the intra prediction mode corresponding to the prediction block, and then obtains the predetermined correspondence relationship between the intra prediction mode and the transform kernel group.
[0388] In one example, the correspondence between the intra prediction modes and the transform kernel groups is as shown in Table 16.
[0389] JPEG2026508708000046.jpg186161
[0390] Note that the above Table 16 is merely the correspondence between intra prediction modes and transformation kernel groups in the embodiments of the present application, and the correspondence between intra prediction modes and transformation kernel groups in the embodiments of the present application is not limited to that shown in Table 15.
[0391] Here, each transformation kernel group includes at least one type of transformation kernel.
[0392]
[0049] After obtaining the correspondence relationship between intra prediction modes and transform kernel groups shown in Table 16, the decoding side looks up the transform kernel group corresponding to the intra prediction mode corresponding to the prediction block from the correspondence relationship between intra prediction modes and transform kernel groups based on the intra prediction mode corresponding to the prediction block, and refers to this transform kernel group as the first transform kernel group. For example, if the intra prediction mode corresponding to the prediction block is an angular prediction mode with 64 angular directions, looking up Table 16 above will determine that the transform kernel group corresponding to the angular prediction mode with 64 angular directions is 4. As a result, the decoding side determines the transform kernel corresponding to the current block from at least one transform kernel included in transform kernel group 4.
[0393] For example, if the first transformation kernel group includes one transformation kernel, the transformation kernel is determined as the transformation kernel corresponding to the current block.
[0394] Furthermore, for example, if the first transform kernel group includes multiple types of transform kernels, the decoding side determines the type of transform kernel corresponding to the current block, and further determines the transform kernel of that transform kernel type in the first transform kernel group as the transform kernel corresponding to the current block.
[0395] Here, the method by which the decoding side determines the type of transformation kernel corresponding to the current block is not limited to the following.
[0396] In one example, the type of the transform kernel corresponding to the current block is a default type, in which case the decoding side determines the default type as the type of the transform kernel corresponding to the current block.
[0397] In another example, the encoding side writes the type of transform kernel corresponding to the current block into the bitstream, so that the decoding side obtains the type of transform kernel corresponding to the current block by decoding the bitstream.
[0398] As is apparent from the above description, in the present embodiment, the decoding side determines a prediction block of a current block using an interpolation filtering prediction mode, then determines a conventional intra prediction mode corresponding to the prediction block, and determines a transform kernel corresponding to the current block based on the conventional intra prediction mode corresponding to the prediction block. That is, in the present embodiment, the conventional intra prediction mode derived from the interpolation filtering prediction is used to select a transform kernel group including a non-separable primary transform (NSPT) and a non-separable low-frequency secondary transform (LFNST). This allows the determined transform kernel to better match the characteristics of the current block, thereby improving the accuracy of determining the transform kernel. Determining the reconstructed value of the current block using a transform kernel with this accuracy improves the accuracy of the reconstructed value and enhances the decoding accuracy of the current block. Furthermore, in the present embodiment, when the transform kernel of the current block is determined using the conventional prediction mode corresponding to the prediction block, there is no need to specify the transform kernel separately, which can save codewords and further improve the video encoding and decoding efficiency.
[0399] After the decoding side determines the transformation kernel corresponding to the current block based on the above steps, it executes the following step S103.
[0400] S103: Perform inverse transformation on the transform coefficients of the current block based on a transformation kernel corresponding to the current block to obtain a residual block of the current block, and then obtain a reconstructed block of the current block based on the predicted block of the current block and the residual block.
[0401] In an embodiment of the present application, the decoding side determines a predicted block of the current block and a transform kernel corresponding to the current block based on the above steps. Thus, the decoding side decodes the bitstream to obtain the quantized coefficients of the current block, then performs inverse quantization on the quantized coefficients to obtain the transform coefficients of the current block, and then performs inverse transform on the transform coefficients using the determined transform kernel corresponding to the current block to obtain a residual block (or residual value) of the current block. Finally, the decoding side adds the predicted block of the current block and the residual block to obtain a reconstructed block of the current block.
[0402] In some embodiments, the current block is a luminance block or a chrominance block, i.e., in embodiments of the present application, prediction can be performed for both a luminance block and a chrominance block using the interpolation filtering prediction mode provided by embodiments of the present application.
[0403] In some embodiments, if the current block is a luminance block, the prediction mode of the current block is an interpolation filtering prediction mode, and the chroma block corresponding to the current block adopts a direct derivation mode DM, the PLANAR mode or the intra prediction mode corresponding to the prediction block is determined as the prediction mode of the chroma block.
[0404] In this embodiment, prediction may be performed for luma blocks (or luma components) using the interpolation filtering prediction mode provided by the embodiment of the present application, while prediction is performed for chroma blocks (or chroma components) using other intra prediction modes.
[0405] Specifically, the decoding side predicts and decodes a current block (i.e., a luminance block) using the interpolation filtering prediction mode, and then starts predicting and decoding a chroma block corresponding to the current block (i.e., a luminance block). When predicting and decoding a chroma block, the decoding side first determines the prediction mode to be used by the chroma block, and obtains the prediction mode of the chroma block, for example, by decoding the bitstream. In one example, if it is determined that the chroma block adopts the direct-derived DM mode, the decoding side derives the intra-prediction mode of the chroma block based on the intra-prediction mode of the luminance block.
[0406] In one example, if the current block (i.e., the luminance block) adopts the interpolation filtering prediction mode and the chroma block adopts the DM mode, the PLANAR mode is determined as the prediction mode of the chroma block, prediction is performed on the chroma block, and a predicted value of the chroma block is obtained.
[0407] In another example, if the current block (i.e., the luminance block) adopts the interpolation filtering prediction mode and the chroma block adopts the DM mode, the intra prediction mode corresponding to the prediction block of the current block determined above is determined as the prediction mode of the chroma block, and prediction is performed on the chroma block to obtain the predicted value of the chroma block.
[0408] In a video decoding method provided by an embodiment of the present application, when predicting a current block, a reference region and an interpolation filter for the current block are first determined, and a predicted block for the current block is determined based on the reference region and the interpolation filter. For example, an interpolation filter is used to filter the reference region, and then filter coefficients of the filter are calculated. Interpolation filtering prediction of the current block is performed using the interpolation filter whose filter coefficients have been determined, thereby obtaining a predicted block for the current block. Next, a prediction mode corresponding to the predicted block is determined, and a transform kernel corresponding to the current block is determined based on the prediction mode. An inverse transform is performed on the transform coefficients of the current block using the transform kernel to obtain a residual block for the current block, and a reconstructed value for the current block is obtained based on the residual block for the current block and the predicted block. That is, in an embodiment of the present application, when prediction is performed using an interpolation filtering prediction method for the current block, a transform kernel corresponding to the current block can be derived by determining a conventional prediction mode corresponding to the predicted block. This allows the determined transform kernel to better match the characteristics of the current block, thereby improving the accuracy of determining the transform kernel. Using the transform kernel determined with this accuracy to determine a reconstructed value for the current block improves the accuracy of the reconstructed value and enhances the decoding accuracy of the current block. In addition, in the embodiment of the present application, the transform kernel of the current block is determined based on the conventional prediction mode corresponding to the predicted block, so there is no need to specify the transform kernel separately, which can save on coding amount and further improve the video encoding / decoding effect.
[0409] The prediction method of the present invention has been described above using the decoding side as an example, but below it will be described using the encoding side as an example.
[0410] Figure 26 is a flowchart of a prediction method according to an embodiment of the present application, which is applied to the video encoder shown in Figures 1 and 2. As shown in Figure 26, the method of the embodiment of the present application includes the following steps:
[0411] S201: determining a reference region and an interpolation filter of a current block; and determining a prediction block of the current block based on the reference region and the interpolation filter.
[0412] When encoding a current block, the encoding side first determines a prediction mode for the current block, predicts the current block using the prediction mode, obtains a predicted block (or predicted value) of the current block, subtracts the predicted block of the current block from the current block, obtains a residual block (or residual value) of the current block, transforms the residual block of the current block to obtain transform coefficients, quantizes the transform coefficients to obtain quantized coefficients, and encodes the quantized coefficients to obtain a bitstream.
[0413] In the present embodiment, the encoding side first determines the prediction mode of the current block.
[0414] In some embodiments, the manner in which the encoding side determines the prediction mode of the current block includes at least some of the following:
[0415] In method 1, the encoding side selects the candidate prediction mode with the lowest cost as the prediction mode for the current block from among multiple candidate prediction modes, including the conventional prediction mode and the interpolation filtering prediction mode shown in Figure 6 or Figure 7. Next, the encoding side adds indication information for the prediction mode of the current block to the bitstream. As a result, the decoding side obtains the indication information for the prediction mode of the current block by decoding the bitstream, and then determines the prediction mode for the current block based on the indication information.
[0416] In Method 2, the encoding side constructs an intra-prediction mode candidate list and selects an intra-prediction mode for the current block from the intra-prediction mode candidate list, where the intra-prediction mode candidate list includes an interpolation filtering prediction mode. Then, the encoding side writes the index number of the intra-prediction mode for the current block in the intra-prediction mode candidate list into the bitstream.
[0417] In method 3, the encoding side constructs an intra-prediction mode candidate list, which includes an interpolation filtering prediction mode. Then, the encoding side selects an intra-prediction mode for a current block from the intra-prediction mode candidate list. For example, the cost of each candidate prediction mode in the intra-prediction mode candidate list in the template for the current block is determined, and the intra-prediction mode for the current block is determined based on the cost. Correspondingly, the decoding side constructs an intra-prediction mode candidate list in the same manner as the encoding side, which further includes an interpolation filtering prediction mode. Then, the cost of each candidate prediction mode in the template for the current block in the intra-prediction mode candidate list is determined, and the intra-prediction mode for the current block is determined based on the cost. Finally, the current block is predicted using the determined intra-prediction mode for the current block to obtain a predicted value for the current block.
[0418] As can be seen from the above methods, when determining a prediction mode for a current block, the encoding side first determines a plurality of candidate prediction modes, and then determines a prediction mode for the current block from the plurality of candidate prediction modes, where the plurality of candidate prediction modes includes an interpolation filtering prediction mode.
[0419] Here, a specific method for determining the prediction mode of the current block from among a plurality of candidate prediction modes may be that the encoding side determines an arbitrary candidate prediction mode from among the plurality of candidate prediction modes as the prediction mode of the current block. That is, the encoding side performs prediction on the current block using each of the plurality of candidate prediction modes, and determines a cost corresponding to each candidate prediction mode, where the cost may be RDO or SATD, etc., and determines the candidate prediction mode with the smallest cost as the prediction mode of the current block.
[0420] The encoding side determines the prediction mode of the current block according to the above method, and if the determined prediction mode of the current block is the interpolation filtering prediction mode, executes the above step S201.
[0421] In some embodiments, before determining the prediction mode of the current block from among multiple candidate prediction modes, the encoding side needs to determine whether the position of the current block in the current image satisfies a predetermined position requirement, and whether the size of the current block satisfies a predetermined block size requirement.
[0422] The embodiment of the present application is not limited to the preset position and prediction block size, which are specifically determined according to actual needs.
[0423] In one example, as shown in Figure 11, the position of the top left corner of the current image is (0,0), and the position of the top left corner of the current block is (x,y), where the predetermined position requirement is that the x value of the current block is equal to or greater than a first predetermined value XX, and the y value of the current block is equal to or greater than a second predetermined value YY.
[0424] The embodiment of the present application does not limit the specific numerical values of the first and second predetermined values.
[0425] Illustratively, the first predetermined value and the second predetermined value are the same.
[0426] For example, the first predetermined value and the second predetermined value are both 13. That is, if the distance from the top edge of the current block to the top edge of the current image is 13 pixel rows or more and the distance from the left edge of the current block to the left edge of the current image is 13 pixel columns or more, the position of the current block in the current image satisfies the predetermined position requirement.
[0427] In one example, still referring to FIG. 11, if the width of the current block is W and the height of the current block is H, the predetermined block size requirement is that the width W of the current block is less than or equal to a third predetermined value A and the height H of the current block is less than or equal to a fourth predetermined value B.
[0428] The embodiment of the present application does not limit the specific numerical values of the third and fourth predetermined values.
[0429] Exemplarily, the third predetermined value and the fourth predetermined value are the same.
[0430] For example, the third and fourth predetermined values are both 32. That is, if the width and height of the current block are both equal to or less than 32, the current block satisfies the predetermined block size requirement.
[0431] In an embodiment of the present application, before determining whether a current block is predicted using an interpolation filtering prediction mode, the decoding side first determines whether the position of the current block in a current image satisfies a predetermined position requirement, and whether the size of the current block satisfies a predetermined block size requirement. If the position of the current block in a current image satisfies the predetermined position requirement and the size of the current block satisfies the predetermined block size requirement, the decoding side determines a prediction mode for the current block from among a plurality of candidate prediction modes including the interpolation filtering prediction mode. For example, as shown in FIG. 11, if the distance from the top edge of the current block to the top edge of the current image is 13 pixel rows or more, the distance from the left edge of the current block to the left edge of the current image is 13 pixel columns or more, and the width and height of the current block are both 32 or less, the decoding side determines a prediction mode for the current block from among a plurality of candidate prediction modes including the interpolation filtering prediction mode.
[0432] In some embodiments, the first predetermined value, the second predetermined value, the third predetermined value, and the fourth predetermined value are default values.
[0433] In some embodiments, if the position of the current block in the current image does not satisfy a predetermined position requirement and / or the size of the current block does not satisfy a predetermined block size requirement, the encoding side determines that the prediction mode of the current block is not an interpolation filtering prediction mode. In this case, the encoding side determines the prediction mode of the current block from candidate prediction modes that do not include the interpolation filtering prediction mode.
[0434] In some embodiments, the encoding side further includes the steps of: determining whether the position of the current block in the current image satisfies a predetermined position requirement and whether the size of the current block satisfies the predetermined block size before determining whether the current sequence allows prediction to be performed using an interpolation filtering prediction mode; and, if the current sequence allows prediction to be performed using an interpolation filtering prediction mode, determining whether the position of the current block in the current image satisfies the predetermined position requirement and whether the size of the current block satisfies the predetermined block size.
[0435] In an embodiment of the present application, a high-level syntax element indicates whether the current sequence is allowed to use an interpolation filtering prediction mode for prediction. If the current sequence uses an interpolation filtering prediction mode for prediction, the encoding side determines whether the position of the current block in the current image satisfies a predetermined position requirement and whether the size of the current block satisfies a predetermined block size. If it is determined that the position of the current block in the current image satisfies the predetermined position requirement and the size of the current block satisfies the predetermined block size requirement, the encoding side determines a prediction mode for the current block from candidate prediction modes that do not include the interpolation filtering prediction mode.
[0436] In some embodiments, if the encoding side determines that the current sequence does not allow prediction to be performed using the interpolation filtering prediction mode, the encoding side skips the above step S201.
[0437] In some embodiments, the encoding side writes fourth information into the bitstream, which is used to indicate whether the current sequence allows prediction using the interpolation filtering prediction mode.
[0438] In the embodiments of the present application, the specific expression format of the fourth information may be, but is not limited to, any indication information that can indicate whether the current sequence is allowed to perform prediction using the interpolation filtering prediction mode.
[0439] In one example, the fourth information may be represented as sps_eip_enabled_flag, whereby different assigned values of sps_eip_enabled_flag can indicate whether the current sequence is allowed to perform prediction using the interpolation filtering prediction mode. For example, when sps_eip_enabled_flag=0, it indicates that the current sequence is not allowed to perform prediction using the interpolation filtering prediction mode, and when sps_eip_enabled_flag=1, it indicates that the current sequence is allowed to perform prediction using the interpolation filtering prediction mode.
[0440] Illustratively, the fourth information is carried in a sequence level parameter set (SPS).
[0441] In some embodiments, embodiments of the present application may further include a general constraints information (GCI) identification bit to indicate whether or not to use the interpolation filtering prediction technique. Exemplarily, the gci_no_eip_constraint_flag indicates whether or not the current video enables the interpolation filtering prediction technique. Exemplarily, the gci_no_eip_constraint_flag is carried in the general constraints information (general_constraints_info( )), as shown in Table 2.
[0442] In some embodiments, when the encoding side determines that the current sequence is allowed to perform prediction using the interpolation filtering prediction mode, the encoding side writes third information into the bitstream, which is used to indicate whether the current block performs prediction using the interpolation filtering prediction mode.
[0443] In the embodiment of the present application, the specific expression format of the third information may be any indication information that can indicate whether the current block is predicted using an interpolation filtering prediction mode, but is not limited to this.
[0444] In one example, the third information may be represented as intra_eip_flag, whereby different assigned values of intra_eip_flag indicate whether the current block is predicted using the interpolation filtering prediction mode. For example, intra_eip_flag = 0 indicates that the current block is predicted without using the interpolation filtering prediction mode, and intra_eip_flag = 1 indicates that the current block is predicted using the interpolation filtering prediction mode. Thus, the encoding side writes the predetermined flag intra_eip_flag into the bitstream, and the decoding side determines the prediction mode of the current block based on the decoded value of the predetermined flag intra_eip_flag. For example, intra_eip_flag = 1 indicates that the prediction mode of the current block is the interpolation filtering prediction mode, whereby the decoding side predicts the current block using the interpolation filtering prediction mode.
[0445] In some embodiments, as shown in FIG. 27 , the process of determining a prediction mode for a current block may include the following steps: First, determine whether the current block is predicted using the interpolation filtering prediction mode. For example, if the fourth sequence-level information indicates that the current sequence allows the use of the interpolation filtering prediction mode, and if the position of the current block in the current image satisfies a predetermined position requirement and the size of the current block satisfies a predetermined block size requirement, it is determined that the current block can be predicted using the interpolation filtering prediction mode. Next, obtain filter coefficients, predict the current block based on the filter coefficients, and obtain a predicted value for the current block. At the same time, coarse prediction mode selection is performed together with other intra prediction mode tools, and several prediction modes with relatively low costs are selected for further fine selection, and the final intra prediction mode is determined as the prediction mode for the current block. If it is determined that the current block cannot be predicted using the interpolation filtering prediction mode, skip selecting the interpolation filtering prediction mode.
[0446] For example, in the coarse selection step of the prediction mode of the current block, the encoding side calculates the cost of each candidate intra prediction mode (including the interpolation filtering prediction mode), as shown in Equation (10).
[0447] JPEG2026508708000047.jpg18156 JPEG2026508708000048.jpg13161
[0448] In one example, the distortion value D is calculated as shown in equation (11).
[0449] JPEG2026508708000049.jpg19156
[0450] After determining the cost of each candidate prediction mode, the encoding side selects some more candidate prediction modes from the plurality of candidate prediction modes and performs fine selection.
[0451] JPEG2026508708000050.jpg56161
[0452] The encoding side determines the candidate prediction mode with the smallest cost in the process of fine selection as the prediction mode for the current block.
[0453] When the encoding side determines that the prediction mode of the current block is the interpolation filtering prediction mode, it executes the above-mentioned step S101.
[0454] Hereinafter, a process in which the encoding side performs prediction on the current block using the interpolation filter prediction mode will be described.
[0455] When the encoding side determines that the current block is to be predicted using the interpolation filter prediction mode, it first determines the reference region and the interpolation filter of the current block.
[0456] A detailed process by which the encoding side determines the reference area of the current block will be described below.
[0457] In the present embodiment, the reference region of the current block is part or all of the already reconstructed region surrounding the current block.
[0458] For example, as shown in FIG. 12, the reconstruction area around the current block may include an upper reconstruction area of the current block, a left reconstruction area of the current block, an upper right reconstruction area of the current block, a lower left reconstruction area of the current block, and an upper left reconstruction area of the current block.
[0459] The embodiment of the present application does not limit the specific shape and size of the reference area of the current block.
[0460] In one example, the reference area of the current block includes any one of the following reconstruction areas: an upper reconstruction area of the current block, a left reconstruction area of the current block, an upper right reconstruction area of the current block, a lower left reconstruction area of the current block, and an upper left reconstruction area of the current block. For example, the reference area of the current block is the upper reconstruction area of the current block, or the reference area of the current block is the left reconstruction area of the current block.
[0461] In one example, the reference area of the current block includes any two of the upper reconstruction area of the current block, the left reconstruction area of the current block, the upper right reconstruction area of the current block, the lower left reconstruction area of the current block, and the upper left reconstruction area of the current block. For example, the reference area of the current block includes the upper reconstruction area of the current block and the left reconstruction area of the current block. Also, for example, the reference area of the current block includes the upper reconstruction area of the current block and the lower left reconstruction area of the current block.
[0462] In one example, the reference region of the current block includes any three reconstruction regions from among the upper reconstruction region of the current block, the left reconstruction region of the current block, the upper right reconstruction region of the current block, the lower left reconstruction region of the current block, and the upper left reconstruction region of the current block. For example, the reference region of the current block includes the upper reconstruction region of the current block, the upper right reconstruction region of the current block, and the upper left reconstruction region of the current block. Also, for example, the reference block of the current block includes the left reconstruction region of the current block, the upper left reconstruction region of the current block, and the lower left reconstruction region of the current block.
[0463] In one example, the reference region of the current block includes any four reconstruction regions from among the upper reconstruction region of the current block, the left reconstruction region of the current block, the upper right reconstruction region of the current block, the lower left reconstruction region of the current block, and the upper left reconstruction region of the current block. For example, the reference region of the current block includes the upper reconstruction region of the current block, the upper right reconstruction region of the current block, the upper left reconstruction region of the current block, and the left reconstruction region of the current block. Also, for example, the reference block of the current block includes the left reconstruction region of the current block, the upper left reconstruction region of the current block, the lower left reconstruction region of the current block, and the upper reconstruction region of the current block.
[0464] In one example, the reference area of the current block includes all five reconstruction areas: the upper reconstruction area of the current block, the left reconstruction area of the current block, the top right reconstruction area of the current block, the bottom left reconstruction area of the current block, and the top left reconstruction area of the current block.
[0465] In the embodiment of the present application, the specific manner in which the encoding side determines the reference area of the current block includes, but is not limited to, the following:
[0466] Method 1: The reference region of the current block is set as the default region. For example, on the encoding side and the decoding side, the reference region of the current block is set as default to include at least one of the upper reconstruction region of the current block, the left reconstruction region of the current block, the upper right reconstruction region of the current block, the lower left reconstruction region of the current block, and the upper left reconstruction region of the current block.
[0467] Method 2: Determine the first cost when predicting the current block based on P reference regions, and determine the reference region with the smallest first cost among the P reference regions as the reference region for the current block.
[0468] In this implementation method, the encoding side predicts the current block based on these P reference regions, determines a first cost corresponding to each reference region, and determines the reference region with the smallest first cost among these P reference regions as the reference region for the current block.
[0469] In some embodiments, the encoding side writes first information into the bitstream, and the first information is used to indicate the type of the reference area of the current block. That is, in Scheme 2, the encoding side further indicates the determined type of the reference area of the current block to the decoding side via the first information.
[0470] The P preset reference regions are assumed to have different types or shapes.
[0471] The embodiments of the present application do not specifically limit the specific number and shape of the P reference regions.
[0472] In one example, the P reference regions include at least one of a first reference region, a second reference region, and a third reference region.
[0473] Here, the first reference area shown in Figure 13A includes the reconstruction areas above, above right, left, above left, and above left of the current block. The second reference area shown in Figure 13B includes the reconstruction areas above, above right, and above left of the current block. The third reference area shown in Figure 13C includes the reconstruction areas to the left, above left, and above left of the current block.
[0474] The embodiment of the present application does not limit the specific representation format of the first information, and any indication information capable of indicating the type of the reference area of the current block may be used.
[0475] In one example, the first information is represented as eip_ref_type, and different types of reference regions are indicated depending on the value of eip_ref_type.
[0476] As a specific example, the correspondence between the three reference regions shown in FIGS. 13A and 13B and the values of eip_ref_type is as shown in Table 4.
[0477] Based on Table 4 above, the encoding side determines the value of the first information eip_ref_type based on the reference area type of the current block. For example, if the reference area of the current block is determined to be the first reference area, eip_ref_type=0 is determined. If the reference area of the current block is determined to be the second reference area, eip_ref_type=1 is determined. If the reference area of the current block is determined to be the third reference area, eip_ref_type=2 is determined.
[0478] Note that, although an example has been described above in which the P reference regions are the three reference regions shown in Figures 13A to 13C, the P reference regions in the embodiments of the present application may further include other reference regions in addition to the three reference regions described above, but the embodiments of the present application are not limited to this. The correspondence relationship between the reference regions and the values of eip_ref_type shown in Table 4 above can be adjusted as appropriate depending on the number of reference regions.
[0479] In some embodiments, the encoding side may employ a truncated binary code encoding method to write the first information into the bitstream.
[0480] For example, the correspondence between the truncated binary code, the value of eip_ref_type, and the type of the reference area is as shown in Table 5.
[0481] In the embodiment of the present application, the encoding side may adopt an equiprobability encoding method or a context model encoding method, and may encode the codeword of the truncated binary code.
[0482] The encoding side may determine the reference area of the current block using the above-described method 1 or method 2, or may determine the reference area of the current block by employing the following method 3.
[0483] Method 3: Determine the reference region of the current block among the P preset reference regions according to the shape of the current block.
[0484] In Method 3, prediction is performed using different reference regions for current blocks with different shapes, thereby improving prediction accuracy.
[0485] For example, if the shape of the current block is square, the first type of reference area is used.
[0486] Also, for example, if the shape of the current block is a rectangle whose width is greater than its height, the second type of reference area is used.
[0487] Also, for example, if the shape of the current block is a rectangle whose width is smaller than its height, a third type of reference area is used.
[0488] That is, in the embodiment of the present application, the correspondence relationship between the P reference regions and the shape of the current block is preset, so that the encoding side may determine the reference region of the current block from among the P reference regions according to the correspondence relationship between the P reference regions and the shape of the current block.
[0489] The process by which the encoding side determines the interpolation filter for the current block will be described below.
[0490] In the embodiment of the present application, there is no limitation on the specific shape of the interpolation filter.
[0491] Illustratively, the interpolation filters provided by the embodiments of the present application include, but are not limited to, square interpolation filters and interpolation filters whose height is less than their width.
[0492] For example, a square interpolation filter includes, but is not limited to, the 4x4 interpolation filter shown in Figure 14A.
[0493] Also, for example, interpolation filters whose height is greater than their width include, but are not limited to, the 5x3 interpolation filter shown in Figure 14B, the 6x2 interpolation filter shown in Figure 14D, and the 7x1 interpolation filter shown in Figure 14G.
[0494] Also, for example, interpolation filters whose height is smaller than their width include, but are not limited to, the 3x5 interpolation filter shown in Figure 14C, the 2x6 interpolation filter shown in Figure 14E, and the 1x7 interpolation filter shown in Figure 14F.
[0495] JPEG2026508708000051.jpg20161
[0496] In the embodiment of the present application, the specific manner in which the decoding side determines the interpolation filter of the current block includes, but is not limited to, the following:
[0497] Method 1: The interpolation filter of the current block is set as a default interpolation filter. For example, on the encoding side and the decoding side, the interpolation filter of the current block is set as a default to any one of the interpolation filters shown in Figures 14A to 14G. For example, the default interpolation filter is a 4x4 interpolation filter.
[0498] Method 2: The encoding side determines the interpolation filter for the current block from among the Q preset interpolation filters.
[0499] For example, the encoding side randomly selects one interpolation filter from among the Q interpolation filters and sets it as the interpolation filter for the current block.
[0500] Furthermore, for example, the encoding side determines the second cost when predicting the current block using each of Q interpolation filters, and determines the interpolation filter with the smallest second cost among the Q interpolation filters as the interpolation filter for the current block.
[0501] In some embodiments, the encoding side writes second information into the bitstream, which is used to indicate the shape of the interpolation filter for the current block.
[0502] In this implementation method, the encoding side determines an interpolation filter for the current block from among Q preset interpolation filters. For example, the encoding side determines a second cost corresponding to each of the Q interpolation filters and selects the interpolation filter with the smallest second cost as the interpolation filter for the current block. Next, the encoding side indicates the shape of the interpolation filter with the smallest second cost via second information. As a result, the decoding side decodes the bitstream to obtain the second information, and further determines an interpolation filter for the current block from among the Q preset interpolation filters based on the shape of the interpolation filter indicated by the second information.
[0503] It should be noted that the Q preset interpolation filters each have a different shape.
[0504] The embodiments of the present application do not specifically limit the specific number and shapes of the Q interpolation filters, for example, the Q interpolation filters include at least one of a first interpolation filter, a second interpolation filter, and a third interpolation filter, where the first interpolation filter is a square interpolation filter, the second interpolation filter is a rectangular interpolation filter whose width is greater than its height, and the third interpolation filter is a rectangular interpolation filter whose height is greater than its width.
[0505] In one example, the Q interpolation filters include the plurality of interpolation filters shown in FIGS. 14A-14H.
[0506] The embodiment of the present application does not limit the specific representation format of the second information, and any indication information capable of indicating the shape of the interpolation filter for the current block may be used.
[0507] In one example, the second information is represented as eip_filter_type. For example, different shapes of interpolation filters are designated depending on the value of eip_filter_type.
[0508] For example, when the Q interpolation filters are the five interpolation filters shown in FIG. 15, the correspondence between the five interpolation filters and the values of eip_filter_type is as shown in Table 6.
[0509] Based on Table 5 above, the encoding side determines the value of the second information eip_filter_type based on the determined shape of the interpolation filter for the current block. For example, if the shape of the interpolation filter for the current block is determined to be 4x4, eip_filter_type=0 is determined. If the shape of the interpolation filter for the current block is determined to be 3x5, eip_filter_type=1 is determined. If the shape of the interpolation filter for the current block is determined to be 5x3, eip_filter_type=2 is determined. If the shape of the interpolation filter for the current block is determined to be 2x6, eip_filter_type=3 is determined. If the shape of the interpolation filter for the current block is determined to be 6x2, eip_filter_type=4 is determined.
[0510] In some embodiments, the encoding side may employ a truncated binary code encoding scheme to incorporate the second information into the bitstream.
[0511] For example, if the preset Q interpolation filters include the five interpolation filters shown in FIG. 15, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 7.
[0512] In this case, when the five types of interpolation filter shapes shown in Table 7 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of 15 types of combinations of interpolation filters and reconstruction regions exist.
[0513] In some embodiments, if an embodiment of the present application includes the seven interpolation filters shown in FIG. 16, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 9.
[0514] In this case, when the seven types of interpolation filter shapes shown in Table 9 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of 21 types of combinations of interpolation filters and reconstruction regions exist.
[0515] In some embodiments, if an embodiment of the present application includes the three interpolation filters shown in FIG. 17, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 10.
[0516] In this case, when the three types of interpolation filter shapes shown in Table 10 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of nine combinations of interpolation filters and reconstruction regions exist.
[0517] In some embodiments, if an embodiment of the present application includes the three interpolation filters shown in FIG. 18A, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 11.
[0518] In this case, when the three types of interpolation filter shapes shown in Table 11 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of nine combinations of interpolation filters and reconstruction regions exist.
[0519] In some embodiments, if an embodiment of the present application includes the three interpolation filters shown in FIG. 18B, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 12.
[0520] In this case, when the three types of interpolation filter shapes shown in Table 12 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of nine combinations of interpolation filters and reconstruction regions exist.
[0521] In some embodiments, if an embodiment of the present application includes the three interpolation filters shown in FIG. 19, the correspondence between the truncated binary code, the value of eip_filter_type, and the shape of the interpolation filter is as shown in Table 13.
[0522] In this case, when the three types of interpolation filter shapes shown in Table 13 above are combined with the three types of reconstruction region types shown in Table 5 above, a total of nine combinations of interpolation filters and reconstruction regions exist.
[0523] The encoding side may determine the interpolation filter for the current block using the above-described method 1 or method 2, or may determine the interpolation filter for the current block by employing the following method 3.
[0524] Method 3: Determine the interpolation filter of the current block from among the Q preset interpolation filters according to the shape of the current block.
[0525] In the method 3, different interpolation filters are used to perform prediction for current blocks with different shapes, thereby improving the accuracy of prediction.
[0526] For example, if the shape of the current block is square, an interpolation filter of the first type of shape is used.
[0527] Also, for example, if the shape of the current block is a rectangle whose width is greater than its height, an interpolation filter of a second type of shape is used.
[0528] Also, for example, if the shape of the current block is a rectangle whose width is smaller than its height, an interpolation filter of a third type of shape is used.
[0529] That is, in the embodiment of the present application, the correspondence relationship between the Q interpolation filters and the shape of the current block is preset, so that the decoding side can determine the interpolation filter for the current block from among the Q interpolation filters according to the correspondence relationship between the Q interpolation filters and the shape of the current block.
[0530] In the embodiment of the present application, the encoding side determines the reference region and interpolation filter of the current block according to the above steps, and then determines a prediction block of the current block according to the reference region and interpolation filter.
[0531] Hereinafter, a process in which the encoding side determines a prediction block of the current block based on the reference region and interpolation filter of the current block will be described.
[0532] In an embodiment of the present application, the encoding side determines a reference region and an interpolation filter for a current block, and then performs filtering in the reference region using the interpolation filter to determine filter coefficients of the interpolation filter. Then, the encoding side performs interpolation filtering on the current block based on the determined filter coefficients to obtain a predicted block for the current block.
[0533] The embodiment of the present application does not limit the specific manner in which the encoding side determines the prediction block of the current block based on the reference region and interpolation filter of the current block.
[0534] In some embodiments, determining a prediction block of the current block based on the reference region and the interpolation filter of the current block in the above-mentioned S201 includes the following steps:
[0535] S201-A1, determining filter coefficients of an interpolation filter based on a reference region.
[0536] S201-A2, perform interpolation filtering prediction on the current block using an interpolation filter according to the filter coefficients to obtain a prediction block of the current block.
[0537] The methods for determining the filter coefficients of the interpolation filter in S201-A1 described above include at least the following methods.
[0538] Method 1: The interpolation filter determined above is slid over the reference region of the current block to construct a Wiener-Hopf equation, and then the filter coefficients of the interpolation filter are obtained by solving the Wiener-Hopf equation.
[0539] JPEG2026508708000052.jpg66161
[0540] In one example, the Wiener-Hopf equation constructed by sliding an interpolation filter within the reference region of the current block is shown in Equation (3).
[0541] Since the reference region of the current block is the reconstruction region, all parameters in the above-mentioned equation (3) are known except for the interpolation filter coefficients. Therefore, the filter coefficients of the interpolation filter for the current block can be determined by solving the above-mentioned equation (3).
[0542] In one example, the encoding side employs a method of decomposing the autocorrelation coefficient matrix using Cholesky decomposition, and solves the Wiener-Hopf equation shown in equation (3) above to obtain the filter coefficients of the filter.
[0543] The encoding side determines the filter coefficients of the interpolation filter based on the above-mentioned equation (3), and then performs interpolation filtering prediction on the current block using the interpolation filter based on the filter coefficients to obtain a predicted block of the current block.
[0544] As a specific example, the decoding side obtains a predicted block of the current block based on the following equation (4).
[0545] Method 2: The above-mentioned S201-A1 includes the following steps S201-A11 to S201-A14.
[0546] S201-A11, determine a first reconstruction region around the current block.
[0547] S201-A12: determining a pixel average reconstruction value based on the reconstruction value of the first reconstruction region;
[0548] In step S201-A13, mean subtraction is performed on the reconstruction values of the pixel points in the reference region based on the pixel mean reconstruction value.
[0549] In step S201-A14, the pixel values of the pixel points in the reference region after averaging are removed are input to an interpolation filter, and the interpolation filter is slid within the reference region to obtain the filter coefficients of the interpolation filter.
[0550] In this method 2, averaging is performed on the reference region, and the filter coefficients of the interpolation filter are determined based on the reference region after averaging is removed. Since the amount of data is reduced by performing averaging on the reference region, determining the filter coefficients based on the reference region after averaging can improve the efficiency of determining the filter coefficients.
[0551] Specifically, the encoding side may first determine one first reconstruction region, and the first reconstruction region may be an arbitrary part of the reconstruction region surrounding the current block.
[0552] In the embodiment of the present application, the manner in which the encoding side determines the first reconstruction region around the current block includes at least the following manners.
[0553] Method 1: By default, the encoding side determines one reconstruction area around the current block as the first reconstruction area.
[0554] For example, as shown in FIG. 20, the encoding side defaults to a region consisting of one row above, one column to the left, and one pixel point at the upper left corner of the current block as the reconstruction region.
[0555] Method 2: Determine the first reconstruction area based on the shape of the current block.
[0556] For example, if the shape of the current block is square, the reconstruction pixel area one row above and one column to the left of the current block is determined as the first reconstruction area.
[0557] Also, for example, if the shape of the current block is a rectangle whose width is greater than its height, the reconstruction pixel area in the upper row of the current block is determined as the first reconstruction area.
[0558] Also, for example, if the shape of the current block is a rectangle with its height greater than its width, the reconstruction pixel area on the left side of the current block is determined as the first reconstruction area.
[0559] The method for determining the first reconstruction region based on the shape of the current block includes, but is not limited to, the above-mentioned examples.
[0560] After determining the first reconstruction region, the encoding side determines the pixel average reconstruction value m based on the reconstruction value of the first reconstruction region.
[0561] In one implementation, the average value of the reconstruction values in the first reconstruction region is determined as the pixel average reconstruction value m.
[0562] In one example, when the first reconstruction region is as shown in FIG. 20, the pixel average reconstruction value m may be calculated by the method shown in Table 13.
[0563] In one example, if the first reconstruction region is one row above and / or one column to the left of the current block, the average of the reconstruction values in the one row above and / or one column to the left may be determined as the pixel average reconstruction value m. In this case, the pixel average reconstruction value m can be calculated using the method shown in Table 15.
[0564] As shown in Table 15 above, when the first reconstruction region is one row above and / or one column to the left of the current block, the pixel average reconstruction value m can be calculated quickly by adopting a shift operation instead of division.
[0565] The encoding side may determine the average value of the reconstructed values in the first reconstruction region as the pixel average reconstructed value m, or may determine the pixel average reconstructed value m by the following method.
[0566] In another method, the weighted average of the reconstruction values of the first reconstruction region is determined as the pixel average reconstruction value m.
[0567] The encoding side may also determine the pixel average reconstruction value m using other methods.
[0568] After determining the pixel average reconstruction value, the encoding side performs averaging removal on the reconstruction values of the pixel points in the reference region based on the pixel average reconstruction value.
[0569] For example, for each pixel point in the reference region, the reconstructed value of the pixel point is divided by the pixel average reconstructed value described above and then rounded to obtain the pixel value of the pixel point after averaging in the reference region is removed.
[0570] Furthermore, for example, the encoding side subtracts the pixel average reconstruction value from the reconstruction value of the pixel point in the reference region to obtain the pixel value of the pixel point after averaging removal in the reference region. For example, for each pixel point in the reference region, the encoding side subtracts the pixel average reconstruction value described above from the reconstruction value of the pixel point to obtain the pixel value of the pixel point after averaging removal in the reference region.
[0571] The embodiments of the present application do not limit the specific method by which the decoding side performs averaging removal on the reconstructed values of pixel points in the reference area based on the pixel average reconstructed value.
[0572] The encoding side performs averaging removal on the reconstructed values of pixel points in the reference region based on the above-described method, obtains pixel values of the pixel points in the reference region after averaging removal, and then executes the above-described steps S201-A14. The pixel values of the pixel points in the reference region after averaging removal are input to an interpolation filter, and the interpolation filter is slid within the reference region to obtain filter coefficients of the interpolation filter.
[0573] 21 illustrates a process of acquiring filter coefficients of an interpolation filter by sliding the interpolation filter of the current block on the reference region of the current block after averaging removal, where the interpolation filter of the current block has five different shapes and the reference region of the current block has three different types. The interpolation filter may be slid horizontally by one row or vertically by one column on the reference region after averaging removal.
[0574] JPEG2026508708000053.jpg66161
[0575] In one example, the Wiener-Hopf equation constructed by sliding the interpolation filter within the reference region of the current block is shown in Equation (5).
[0576] Since the reference region of the current block is the reconstruction region, all parameters in the above-mentioned equation (5) are known except for the interpolation filter coefficients. Therefore, the filter coefficients of the interpolation filter for the current block can be determined by solving the above-mentioned equation (5).
[0577] In one example, the encoding side employs a method of decomposing the autocorrelation coefficient matrix using Cholesky decomposition, and solves the Wiener-Hopf equation shown in equation (5) above to obtain the filter coefficients of the filter.
[0578] The encoding side determines the filter coefficients of the interpolation filter based on the above-mentioned equation (5), and then executes the above-mentioned step S201-A2, performs interpolation filtering prediction on the current block using the interpolation filter based on the filter coefficients, and obtains a predicted block of the current block.
[0579] In the above equation (5), the filter coefficients are determined using the reference region after averaging is removed. Therefore, when determining the predicted value of the current block based on the filter coefficients, the influence of the pixel average reconstruction value m must be taken into consideration.
[0580] In one possible implementation, the interpolation filter coefficients determined by the above equation (5) are substituted into the above equation (4) to obtain the predicted value of each point in the current block, and then the pixel average reconstruction value m is added to the predicted value of each point to obtain the final predicted value of each point in the current block, thereby obtaining the predicted block of the current block.
[0581] In another possible implementation manner, the above-mentioned S201-A2 includes the following steps:
[0582] S201-A21, for the r-th point within the current point, determine pixel values at N positions corresponding to the r-th point based on the shape of the interpolation filter, where r is a positive integer.
[0583] In S201-A22, pixel values at N positions are averaged and removed based on the pixel average reconstruction value, and pixel values at N positions after the average and removal are obtained.
[0584] In S201-A23, a predicted value of the r-th point is obtained based on the pixel values after averaging and the filter coefficients of the N positions.
[0585] S201-A24, obtain a predicted block of the current block based on the predicted value of each point in the current block.
[0586] As shown in Figure 22, assuming that the shape of the interpolation filter for the current block is 4x4, the encoding side uses an interpolation filter with known filter coefficients to sequentially perform interpolation prediction for each position in the current block. Specifically, for the rth point in the current block, pixel values for N positions corresponding to the rth point are first determined based on the shape of the interpolation filter for the current block. For example, as shown in Figure 22, in a 4x4 interpolation filter, the dark-colored position is the position of the rth point to be processed, and the 15 light-colored positions are the N positions corresponding to the rth point.
[0587] Next, pixel values of N positions corresponding to the r-th point are determined. For example, for any of the N positions, if the position is in a reconstruction region surrounding the current block, the reconstruction value of the position is determined as the pixel value of the position. If the position is within the current block, the predicted value of the position is determined as the pixel value of the position.
[0588] Since the above-mentioned filter coefficients are determined based on the reference area after averaging removal, the encoding side performs averaging removal on pixel values at N positions of the r-th point based on the pixel average reconstruction value, thereby obtaining pixel values at N positions of the r-th point after averaging removal. For example, by subtracting the pixel average reconstruction value from the pixel values at N positions of the r-th point, pixel values at N positions of the r-th point after averaging removal are obtained.
[0589] Next, a predicted value of the r-th point is obtained based on the pixel values after averaging and the filter coefficients at the N positions.
[0590] The embodiment of the present application does not limit the specific manner of obtaining the predicted value of the r-th point based on the pixel values and filter coefficients after averaging removal at N positions.
[0591] JPEG2026508708000054.jpg29161
[0592] In another implementation, the above-mentioned S201-A23 includes the following steps:
[0593] S201-A231: determining a second reconstruction area around the current block, and determining the maximum reconstruction value and the minimum reconstruction value of the second reconstruction area;
[0594] S201-A232: Obtain a first predicted value based on the pixel values after averaging removal at the N positions, the filter coefficients, and the pixel average reconstruction value.
[0595] S201-A233, determine a predicted value of the r-th point based on the first predicted value, the maximum reconstructed value, and the minimum reconstructed value.
[0596] JPEG2026508708000055.jpg17161
[0597] The embodiment of the present application does not limit the specific manner of determining the second reconstruction region around the current block.
[0598] In one example, the second reconstruction region of the current block coincides with the reference region of the current block.
[0599] In one example, the second reconstruction area of the current block coincides with the first reconstruction area of the current block.
[0600] In one example, the reconstruction regions above, to the left, above right, above left, and below left of the current block are determined as the second reconstruction region, i.e., the reconstruction regions of the top 13 rows, the left 13 columns, the top 13 rows, the top left 13 rows and 13 columns, and the bottom left 13 columns of the current block are determined as the second reconstruction region.
[0601] In addition, the execution order of the specific process of implementing the above-mentioned S201-A231 and the above-mentioned S201-A232 is not limited. For example, the above-mentioned S201-A231 may be executed before the above-mentioned S201-A232, after the above-mentioned S201-A232, or simultaneously with the above-mentioned S201-A232.
[0602] The embodiments of the present application do not limit the specific method by which the encoding side obtains the first predicted value based on the pixel values after averaging removal at N positions, the filter coefficients, and the pixel average reconstruction value.
[0603] For example, the pixel values after averaging removal at N positions of the rth point are multiplied by a filter coefficient to obtain a second predicted value of the rth point, and the second predicted value is added to the pixel average reconstruction value to obtain a first predicted value of the rth point.
[0604] For example, the encoding side obtains the first predicted value of the r-th point according to the following equation (6):
[0605] Also, for example, the encoding side obtains one predicted value of the r-th point based on the above-mentioned equation (6), and then performs prediction processing on the predicted value to obtain a first predicted value of the r-th point.
[0606] The encoding side determines the first predicted value of the rth point in the current block based on the above steps, and then determines the predicted value of the rth point based on the first predicted value, the maximum reconstructed value, and the minimum reconstructed value.
[0607] For example, if the first predicted value is greater than the minimum reconstruction value and less than the maximum reconstruction value, the first predicted value is determined as the predicted value of the r-th point.
[0608] Also, for example, if the first predicted value is equal to or less than the minimum reconstructed value, the minimum reconstructed value is determined as the predicted value of the r-th point.
[0609] Furthermore, for example, if the first predicted value is equal to or greater than the maximum reconstructed value, the maximum reconstructed value is determined as the predicted value of the r-th point.
[0610] In one example, the encoding side determines the predicted value of the r-th point based on the following equation (7).
[0611] The above describes an example of determining the predicted value of the rth point in the current block, but the encoding side refers to the above method to determine the predicted value of each point in the current block, and the predicted values of each point in the current block further constitute a predicted block of the current block.
[0612] Based on the above steps, the encoding side performs interpolation filtering prediction on the current block to obtain the predicted block of the current block, and then performs the following steps:
[0613] S202, determine an intra prediction mode corresponding to the prediction block, and determine a transformation kernel corresponding to the current block according to the intra prediction mode corresponding to the prediction block.
[0614] As can be seen from the above description, when encoding a current block, the encoding side determines a prediction block of the current block based on the above steps, then subtracts the prediction block of the current block from the current block to obtain a residual block of the current block, then performs a transform on the residual block of the current block to obtain transform coefficients, quantizes the transform coefficients to obtain quantized coefficients, and encodes the quantized coefficients to obtain a bitstream.
[0615] When transforming the residual values of the current block to obtain transform coefficients, a transform kernel needs to be determined, and the transform coefficients are obtained by transforming the residual values of the current block based on the transform kernel. Currently, an encoding side predicts the current block using a conventional intra prediction mode. The encoding side can determine the transform kernel to be used for the current block based on the correspondence between the conventional intra prediction mode and the transform kernel. However, in this embodiment, when predicting the current block, an interpolation filter prediction mode is used instead of the conventional intra prediction mode. Therefore, it is not possible to directly determine the transform kernel corresponding to the current block.
[0616] To solve this technical problem, in an embodiment of the present application, a prediction block of a current block is determined using an interpolation filtering prediction mode, a conventional intra prediction mode corresponding to the prediction block is determined, and a transformation kernel corresponding to the current block is determined based on the conventional intra prediction mode.
[0617] A detailed process by which the encoding side determines an intra prediction mode corresponding to a prediction block will be described below.
[0618] In one example, as shown in FIG. 7, the conventional intra prediction modes included in the current VVC are as follows: PLANAR mode: Intra prediction mode index is 0, DC mode: Intra prediction mode index is 1, Angle mode: Intra prediction mode index is 2 to 66.
[0619] In one example, as shown in Figure 23, the directions of the arrows in the figure indicate the directions of angle mode predictions present in VVC, and the prediction mode indexes used during encoding are 2 to 66. If the current block is a non-square block, some angle directions are replaced with wide angles, for example, -1 to -14 and 67 to 80 in Figure 23.
[0620] In some embodiments, the intra prediction mode corresponding to the prediction block is a default intra prediction mode, i.e., when a current block is predicted using an interpolation filtering prediction mode to obtain a prediction block, one of the conventional intra prediction modes is determined by default as the intra prediction mode corresponding to the prediction block.
[0621] In some embodiments, the encoding side determines the intra prediction mode corresponding to the prediction block by the following steps.
[0622] S202-A1, determine angle values of M points in the prediction block, where M is a positive integer.
[0623] S202-A2, determine an intra prediction mode corresponding to the prediction block according to the angle values of the M points.
[0624] In the embodiment of the present application, the intra prediction mode corresponding to the prediction block is determined by calculating statistics of the intra prediction modes corresponding to the angle values of M points in the prediction block.
[0625] The embodiments of the present application do not limit the specific positions and number of the M points in the prediction block for determining the angle value, for example, the M points may be one point in the prediction block or multiple points in the prediction block.
[0626] For example, if the above M points are one point, the encoding side determines the angle value of one point within the prediction block (e.g., the center point of the prediction block), determines the intra prediction mode corresponding to the point based on the angle value of the point, and further determines the intra prediction mode as the intra prediction mode corresponding to the prediction block.
[0627] Also, for example, if the above M points are multiple points, the encoding side determines the angle values of the multiple points, determines the intra prediction mode corresponding to each of the multiple points based on the angle values of the multiple points, and further determines the intra prediction mode with the largest number of identical intra prediction modes among the multiple points as the intra prediction mode corresponding to the predicted block.
[0628] In some embodiments, when determining the angle values of M points in a prediction block using a sliding window method, the selection of the M points is related to the shape and size of the sliding window, for example, each of the M points is a center point of the sliding window as the sliding window slides within the prediction block.
[0629] In the embodiment of the present application, the method for determining the angle value of each of the M points is the same. For ease of explanation, the case of determining the angle value of the i-th point among the M points will be taken as an example.
[0630] The embodiments of the present application are not limited to a specific method for determining the angle value of a point.
[0631] In some embodiments, the above S202-A1 includes steps S202-A11 and S202-A12.
[0632] S202-A11, for an i-th point among M points, determine the horizontal gradient and vertical gradient of the i-th point, where i is a positive integer less than or equal to M;
[0633] S202-A12, determine the angle value of the i-th point based on the horizontal gradient and vertical gradient of the i-th point.
[0634] In this embodiment, for each of the M points (e.g., the i-th point), the encoding side first determines the horizontal gradient and vertical gradient of the i-th point, and then determines the angle value of the i-th point based on the horizontal gradient and vertical gradient.
[0635] The embodiments of the present application are not limited to a specific method for determining the horizontal gradient and vertical gradient of the i-th point.
[0636] In one example, a horizontal gradient value of the i-th point is determined based on the horizontal change between the predicted values of points around the i-th point in the predicted block and the predicted value of the i-th point, and a vertical gradient value of the i-th point is determined based on the vertical change between the predicted values of points around the i-th point in the predicted block and the predicted value of the i-th point.
[0637] In another example, the encoding side determines a predicted value of a point within a sliding window centered on the i-th point within the prediction block, and obtains the horizontal gradient and vertical gradient of the i-th point based on the predicted value of the point within the sliding window and a horizontal gradient operator and a vertical gradient operator.
[0638] In this example, a sliding window is first determined, for example, a 3x3 sliding window as shown in Figure 24. The sliding window is slid within the prediction block, and each time the sliding window is slid, the horizontal and vertical gradients of the center point of the sliding window are determined. Taking an example in which the center point of the current sliding window is the i-th point, predicted values of each point within the current sliding window are first obtained, and predicted values of, for example, 3x3=9 points can be obtained. Next, the horizontal and vertical gradients of the i-th point are determined based on the predicted values of the 9 points and preset horizontal and vertical gradient operators.
[0639] JPEG2026508708000056.jpg17161
[0640] JPEG2026508708000057.jpg21161
[0641] The embodiments of the present application are not limited to specific values of the horizontal gradient operator and the vertical gradient operator.
[0642] After determining the horizontal and vertical gradients of the i-th point based on the above steps, the encoding side may determine the angle value of the i-th point based on the horizontal and vertical gradients of the i-th point.
[0643] For example, the arctangent value of the ratio of the vertical gradient to the horizontal gradient of the i-th point is determined as the angle value of the i-th point. For example, the angle value of the i-th point is determined based on Equation (8).
[0644] The encoding side may determine the angle value of the i-th point using other methods than the above formula (8). For example, the encoding side obtains the angle value of the i-th point by adjusting the angle value determined by the above formula (8).
[0645] The encoding side applies the above method to each of the M points, and after determining the angle values of each of the M points, it then executes the above S202-A2 to determine the intra prediction mode corresponding to the predicted block based on the angle values of the M points.
[0646] The embodiment of the present application does not limit the specific manner of determining the intra prediction mode corresponding to the prediction block based on the angle values of the M points.
[0647] In some embodiments, the encoding side selects the angle value 1 that appears most frequently from the angle values of the M points, matches the angle value 1 with the prediction angle of a conventional intra prediction mode to obtain the intra prediction mode corresponding to the angle value 1, and further determines the intra prediction mode corresponding to the angle value 1 as the intra prediction mode corresponding to the predicted block.
[0648] In some embodiments, the above S202-A2 includes the following steps S202-A21 and S202-A22.
[0649] S202-A21, determine intra prediction modes corresponding to the M points according to the angle values of the M points.
[0650] S202-A22, determine an intra prediction mode corresponding to the prediction block according to the intra prediction modes corresponding to the M points.
[0651] In this implementation, the encoding side determines the intra prediction mode corresponding to each of the M points based on the angle values of each of the M points. For example, for each of the M points, the angle value of the point is matched with the prediction angle of a conventional intra prediction mode to obtain the intra prediction mode corresponding to the angle value of the point. In this way, the intra prediction mode corresponding to each of the M points can be obtained.
[0652] Next, the intra prediction mode corresponding to the prediction block is determined based on the intra prediction modes corresponding to each of these M points.
[0653] In one possible implementation, among the intra prediction modes corresponding to the M points, the intra prediction mode that is repeated most often is determined as the intra prediction mode corresponding to the prediction block.
[0654] In another possible implementation manner, the above S202-A22 includes the following steps:
[0655] S202-A221, determining gradient amplitude values corresponding to the M points based on the horizontal gradients and vertical gradients of the M points.
[0656] S202-A222, determine an intra prediction mode corresponding to the prediction block according to the intra prediction modes and gradient amplitude values corresponding to the M points.
[0657] In this implementation, the encoding side determines gradient amplitude values corresponding to each of the M points based on the horizontal gradients and vertical gradients of each of the M points determined above.
[0658] In the embodiments of the present application, the specific manner in which the encoding side determines the gradient amplitude value corresponding to each of the M points is the same. For ease of explanation, the case in which the gradient amplitude value corresponding to the i-th point among the M points is determined will be taken as an example.
[0659] The embodiment of the present application does not limit the specific manner in which the encoding side determines the gradient amplitude value corresponding to the i-th point based on the horizontal gradient and vertical gradient of the i-th point.
[0660] For example, the encoding side multiplies the horizontal gradient and vertical gradient of the i-th point to obtain the gradient amplitude value corresponding to the i-th point.
[0661] Furthermore, for example, the encoding side adds the absolute value of the horizontal gradient and the absolute value of the vertical gradient of the i-th point to obtain the gradient amplitude value corresponding to the i-th point.
[0662] For example, the encoding side determines the gradient amplitude value corresponding to the i-th point based on the following equation (9).
[0663] The encoding side can determine the gradient amplitude values corresponding to each of the M points based on the above steps. Then, the encoding side performs the above steps S202-A222 to determine the intra prediction mode corresponding to the prediction block based on the intra prediction mode and gradient amplitude values corresponding to the M points.
[0664] In one example, the intra prediction mode corresponding to the point with the largest gradient amplitude value among the M points is determined as the intra prediction mode corresponding to the prediction block.
[0665] In another example, for any of the M points, the gradient amplitude value corresponding to the point is accumulated in the intra prediction mode corresponding to the point to obtain the accumulated gradient amplitude values of the intra prediction modes corresponding to the M points, and the intra prediction mode with the largest accumulated gradient amplitude value among the intra prediction modes corresponding to the M points is determined as the intra prediction mode corresponding to the prediction block.
[0666] For example, as shown in Figure 25, gradient amplitude values corresponding to each of M points are accumulated in the corresponding intra prediction mode. For example, if the intra prediction modes corresponding to points 1 and 2 of the M points are both intra prediction mode 1, the gradient amplitude values corresponding to points 1 and 2 are accumulated and added to the gradient amplitude value corresponding to intra prediction mode 1. By this analogy, the gradient amplitude histogram shown in Figure 25 can be obtained. As a result, the intra prediction mode with the largest accumulated gradient amplitude value in the gradient amplitude histogram can be determined as the intra prediction mode corresponding to the prediction block. For example, the intra prediction mode corresponding to the accumulated gradient amplitude values shown in dark colors in Figure 25 is determined as the intra prediction mode corresponding to the prediction block.
[0667] In some embodiments, if the gradient amplitude values corresponding to M points are all 0, a first intra prediction mode is determined as the intra prediction mode corresponding to the prediction block. That is, if the gradient amplitude values corresponding to all M points are all 0, it means that the horizontal gradients and vertical gradients of each of the M points are all 0. In this case, the pre-set first intra prediction mode may be determined as the intra prediction mode corresponding to the prediction block.
[0668] The embodiment of the present application does not limit the type of the first intra prediction mode.
[0669] The embodiment of the present application is not limited to the first intra prediction mode.
[0670] After determining the intra prediction mode corresponding to the prediction block based on the above steps, the encoding side determines the transformation kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block.
[0671] The embodiments of the present application do not limit the specific manner in which the encoding side determines the transformation kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block.
[0672] In some embodiments, based on the intra prediction mode corresponding to the prediction block, the encoding side searches for an image block from among the already decoded image blocks surrounding the prediction block whose intra prediction mode is the same as the intra prediction mode corresponding to the prediction block, and further determines the transformation kernel corresponding to the image block as the transformation kernel corresponding to the current block.
[0673] In some embodiments, the step of determining a transformation kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block in S202 above includes the following steps:
[0674] S202-B1, obtaining a correspondence relationship between an intra prediction mode and a transform kernel group, where one transform kernel group includes at least one kind of transform kernel.
[0675] S202-B2: look up the first transform kernel group corresponding to the intra prediction mode of the prediction block in the above correspondence relationship.
[0676] S202-B3: determining a transformation kernel corresponding to the current block from the first transformation kernel group;
[0677] In the embodiment of the present application, there is a correspondence relationship between the intra prediction mode and the transform kernel group, and based on this, the encoding side determines the intra prediction mode corresponding to the prediction block, and then obtains the predetermined correspondence relationship between the intra prediction mode and the transform kernel group.
[0678] In one example, the correspondence between the intra prediction modes and the transform kernel groups is as shown in Table 16.
[0679] Note that the above Table 16 is merely the correspondence between intra prediction modes and transformation kernel groups in the embodiments of the present application, and the correspondence between intra prediction modes and transformation kernel groups in the embodiments of the present application is not limited to that shown in Table 16.
[0680] Here, each transformation kernel group includes at least one type of transformation kernel.
[0681]
[0047] After obtaining the correspondence relationship between intra prediction modes and transform kernel groups shown in Table 16, the encoding side looks up the transform kernel group corresponding to the intra prediction mode corresponding to the prediction block from the correspondence relationship between intra prediction modes and transform kernel groups based on the intra prediction mode corresponding to the prediction block, and refers to this transform kernel group as the first transform kernel group. For example, if the intra prediction mode corresponding to the prediction block is an angular prediction mode with 64 angular directions, looking up Table 16 above will determine that the transform kernel group corresponding to the angular prediction mode with 64 angular directions is 4. As a result, the encoding side determines the transform kernel corresponding to the current block from at least one type of transform kernel included in transform kernel group 4.
[0682] For example, if the first transformation kernel group includes one transformation kernel, the transformation kernel is determined as the transformation kernel corresponding to the current block.
[0683] Furthermore, for example, if the first transform kernel group includes multiple types of transform kernels, the encoding side determines the type of transform kernel corresponding to the current block, and further determines the transform kernel of that transform kernel type in the first transform kernel group as the transform kernel corresponding to the current block.
[0684] Here, the method by which the encoding side determines the type of transformation kernel corresponding to the current block is not limited to the following.
[0685] In one example, the type of the transform kernel corresponding to the current block is a default type, in which case the encoding side determines the default type as the type of the transform kernel corresponding to the current block.
[0686] In another example, the encoding side writes the type of the transform kernel corresponding to the current block into the bitstream, so that the encoding side obtains the type of the transform kernel corresponding to the current block by encoding the bitstream.
[0687] As is apparent from the above description, in the present embodiment, the encoding side determines a prediction block of a current block using an interpolation filtering prediction mode, then determines a conventional intra prediction mode corresponding to the prediction block, and determines a transform kernel corresponding to the current block based on the conventional intra prediction mode corresponding to the prediction block. That is, in the present embodiment, the conventional intra prediction mode derived from the interpolation filtering prediction is used to select a transform kernel group of a non-separable primary transform (NSPT) and a non-separable low-frequency secondary transform (LFNST). This allows the determined transform kernel to better match the characteristics of the current block, thereby improving the accuracy of determining the transform kernel. If a transform kernel with this accuracy is used to determine a reconstructed value of the current block, the accuracy of the reconstructed value can be improved, thereby improving the coding accuracy of the current block. Furthermore, in the present embodiment, when the transform kernel of the current block is determined using a conventional prediction mode corresponding to the prediction block, there is no need to specify the transform kernel separately, which can save codewords and improve the video coding efficiency.
[0688] After the encoding side determines the transformation kernel corresponding to the current block based on the above steps, it executes the following step S203.
[0689] S203: Performing transformation on the residual block of the current block according to a transformation kernel corresponding to the current block to obtain the transformation coefficients of the current block, and performing encoding according to the transformation coefficients of the current block to obtain a bitstream.
[0690] In an embodiment of the present application, the encoding side determines a predicted block of a current block and a transformation kernel corresponding to the current block based on the above steps. Thus, the encoding side can obtain a residual block of the current block based on the predicted block of the current block and the current block. For example, the residual block of the current block is obtained by subtracting the predicted block of the current block from the current block. Next, the residual block of the current block is transformed based on the determined transformation kernel to obtain transform coefficients of the current block. Furthermore, the transform coefficients are directly coded to obtain a bitstream, or the transform coefficients are quantized to obtain quantized coefficients, and the quantized coefficients are coded to obtain a bitstream.
[0691] In some embodiments, the current block is a luminance block or a chrominance block, i.e., in embodiments of the present application, prediction can be performed for both a luminance block and a chrominance block using the interpolation filtering prediction mode provided by embodiments of the present application.
[0692] In some embodiments, if the current block is a luminance block, the prediction mode of the current block is an interpolation filtering prediction mode, and the chroma block corresponding to the current block adopts a direct derivation mode DM, the PLANAR mode or the intra prediction mode corresponding to the prediction block is determined as the prediction mode of the chroma block.
[0693] In the following, the effect of the interpolation filter prediction mode proposed in the embodiment of the present application will be tested by an experiment.
[0694] In one example, Table 17 shows the compression effect when compressing different videos under the All Intra Main test condition using 3×5=15 combinations of filter coefficients determined by the reference region types shown in Figures 13A to 13C and the five types of interpolation filters of shapes shown in Figure 15.
[0695] JPEG2026508708000058.jpg71161
[0696] As shown in Table 17, when compression was performed on different types of test data under general-purpose test conditions using the types of reference regions shown in Figures 13A to 13C and the five types of interpolation filters shown in Figure 15, the objective compression effect was improved by 0.26%, 0.20%, and 0.17% for the Y / U / V components, respectively.
[0697] In one example, when compression is performed on different videos under test conditions of all intra coding (All Intra Main) using 3 x 7 = 21 combinations of filter coefficients determined by the types of reference regions shown in Figures 13A to 13C and the seven types of interpolation filters shown in Figures 14A to 14G, the compression effect is shown in Table 18.
[0698] JPEG2026508708000059.jpg58161
[0699] As shown in Table 18, when compression was performed on different types of test data under general-purpose test conditions using the types of reference regions shown in Figures 13A to 13C and the seven types of interpolation filters shown in Figures 14A to 14G, the objective compression effect was improved by 0.26%, 0.19%, and 0.19% for the Y / U / V components, respectively.
[0700] In one example, when compression is performed on different videos under test conditions of all intra coding (All Intra Main) using a combination of 3×1=3 types of filter coefficients determined by the types of reference regions shown in Figures 13A to 13C and one type of interpolation filter shape shown in Figure 14A, the compression effect is shown in Table 19.
[0701] JPEG2026508708000060.jpg58161
[0702] As shown in Table 19, when compression was performed on different types of test data under general-purpose test conditions using the types of reference regions shown in Figures 13A to 13C and one type of interpolation filter shape shown in Figure 14A, the objective compression effect was improved by 0.13%, 0.11%, and 0.02% for the Y / U / V components, respectively.
[0703] In one example, when compression is performed on different videos under test conditions of all intra coding (All Intra Main) using a combination of 3 x 3 = 9 types of filter coefficients determined by the types of reference regions shown in Figures 13A to 13C and the three types of interpolation filters of shapes shown in Figure 17, the compression effect is shown in Table 20.
[0704] JPEG2026508708000061.jpg58140
[0705] As shown in Table 20, when compression was performed on different types of test data under general-purpose test conditions using the types of reference regions shown in Figures 13A to 13C and the three types of interpolation filters shown in Figure 17, the objective compression effect was improved by 0.23%, 0.20%, and 0.15% for the Y / U / V components, respectively.
[0706] In one example, when different videos are compressed under the test conditions of all intra coding (All Intra Main) using a combination of 3×3=9 types of filter coefficients determined by the types of reference regions shown in Figures 13A to 13C and the three types of interpolation filters shown in Figure 18, the compression effect is shown in Table 21.
[0707] JPEG2026508708000062.jpg59140
[0708] As shown in Table 21, when compression was performed on different types of test data under general-purpose test conditions using the types of reference regions shown in Figures 13A to 13C and the three types of interpolation filters shown in Figure 18, the objective compression effect was improved by 0.25%, 0.18%, and 0.18% for the Y / U / V components, respectively.
[0709] In one example, when compression is performed on different videos under the test condition of all intra coding (All Intra Main), the compression effect is shown in Table 22 using 3×3=9 types of filter coefficient combinations obtained by combining the types of reference regions shown in Figures 13A to 13C with the three types of interpolation filters of shapes shown in Figure 19.
[0710] JPEG2026508708000063.jpg58140
[0711] As shown in Table 22, when compression was performed on different types of test data under general-purpose test conditions using the types of reference regions shown in Figures 13A to 13C and the three types of interpolation filters shown in Figure 19, the objective compression effect was improved by 0.19%, 0.15%, and 0.14% for the Y / U / V components, respectively.
[0712] In a video encoding method provided by an embodiment of the present application, when predicting a current block, a reference region and an interpolation filter for the current block are first determined, and a predicted block for the current block is determined based on the reference region and the interpolation filter. Next, a prediction mode corresponding to the predicted block is determined, and a residual block of the current block is transformed based on a transform kernel corresponding to the current block to obtain transform coefficients for the current block. Then, encoding is performed based on the transform coefficients of the current block to obtain a bitstream. That is, in an embodiment of the present application, when predicting the current block using an interpolation filter prediction method, a transform kernel corresponding to the current block is determined by determining a conventional prediction mode corresponding to the predicted block. This determines the transform kernel corresponding to the current block, so that the determined transform kernel better matches the characteristics of the current block and improves the accuracy of determining the transform kernel. Determining a reconstructed value for the current block using the transform kernel determined with this accuracy improves the accuracy of the reconstructed value and enhances the encoding accuracy of the current block. Furthermore, in an embodiment of the present application, a transform kernel for the current block is determined based on a conventional prediction mode corresponding to the predicted block, eliminating the need to specify the transform kernel separately, thereby reducing the amount of coding and improving the video encoding efficiency.
[0713] It is understood that Figures 10-26 are merely illustrative of the present application and should not be construed as limiting the present application.
[0714] Although the preferred embodiments of the present application have been described in detail above with reference to the drawings, the present application is not limited to the specific details of the above-described embodiments. Within the scope of the technical concept of the present application, multiple simple modifications may be made to the technical solutions of the present application, and all of these simple modifications fall within the scope of protection of the present application. For example, the specific technical features described in the above-described specific embodiments may be combined in any appropriate manner as long as no contradictions arise. To avoid unnecessary repetition, the present application does not separately describe various possible combinations. Furthermore, different embodiments of the present application may be combined in any manner, and as long as such combinations do not violate the concept of the present application, they shall be deemed to be the same as the content disclosed in the present application.
[0715] It should also be understood that in the embodiments of the methods herein, the order of the numbers of the above-mentioned processes does not indicate the order of execution, and the execution order of each process should be determined by its function and inherent logic, and does not limit the execution process of the embodiments in any way. Furthermore, the term "and / or" in the embodiments herein simply describes the relationship between related objects and indicates that three types of relationships may exist. Specifically, A and / or B refers to three cases: A exists alone, A and B exist simultaneously, and B exists alone. Furthermore, the character " / " in the present application generally indicates that the related objects before and after are in an "or" relationship.
[0716] While an embodiment of the method of the present application has been described in detail above with reference to FIGS. 10 to 27, an embodiment of the apparatus of the present application will now be described in detail with reference to FIGS.
[0717] FIG. 28 is a schematic block diagram of a video decoding device according to an embodiment of the present application, and the video decoding device 10 is applied to the above-mentioned video decoder.
[0718] As shown in FIG. 28, the video decoding device 10 includes the following components.
[0719] The prediction unit 11 is used to determine a reference region and an interpolation filter for a current block, and to determine a prediction block for the current block based on the reference region and the interpolation filter.
[0720] The transform unit 12 is used to determine an intra-prediction mode corresponding to the predictive block, and to determine a transform kernel corresponding to the current block based on the intra-prediction mode corresponding to the predictive block.
[0721] The decoding unit 13 is used to perform an inverse transform on the transform coefficients of the current block based on a transform kernel corresponding to the current block, to obtain a residual block of the current block, and to obtain a reconstructed block of the current block based on the predicted block and the residual block of the current block.
[0722] In some embodiments, the transform unit 12 is specifically used to determine angle values of M points in the prediction block, where M is a positive integer, and to determine an intra prediction mode corresponding to the prediction block based on the angle values of the M points.
[0723] In some embodiments, the conversion unit 12 is specifically used to determine, for an i-th point among the M points, the horizontal gradient and the vertical gradient of the i-th point, where i is a positive integer less than or equal to M, and to determine an angle value of the i-th point based on the horizontal gradient and the vertical gradient of the i-th point.
[0724] In some embodiments, the transform unit 12 is specifically used to determine a predicted value of a point within a sliding window centered on the i-th point in the prediction block, and obtain the horizontal gradient and vertical gradient of the i-th point based on the predicted value of the point within the sliding window and a horizontal gradient operator and a vertical gradient operator.
[0725] In some embodiments, the transformation unit 12 is specifically used to determine the product of the predicted value of a point within the sliding window and the horizontal gradient operator as the horizontal gradient of the i-th point, and to determine the product of the predicted value of a point within the sliding window and the vertical gradient operator as the vertical gradient of the i-th point.
[0726] In some embodiments, the conversion unit 12 is specifically used to determine the arctangent value of the ratio of the vertical gradient to the horizontal gradient of the i-th point as the angle value corresponding to the i-th point.
[0727] In some embodiments, the transform unit 12 is specifically used to determine the intra prediction mode corresponding to the M points based on the angle values of the M points, and to determine the intra prediction mode corresponding to the prediction block based on the intra prediction mode corresponding to the M points.
[0728] In some embodiments, the transform unit 12 is specifically used to determine gradient amplitude values corresponding to the M points based on the horizontal gradients and vertical gradients of the M points, and to determine an intra prediction mode corresponding to the prediction block based on the intra prediction mode and gradient amplitude values corresponding to the M points.
[0729] In some embodiments, the conversion unit 12 is specifically used to add the absolute value of the horizontal gradient and the absolute value of the vertical gradient of the i-th point to obtain a gradient amplitude value corresponding to the i-th point.
[0730] In some embodiments, the transform unit 12 is specifically used to accumulate, for any one of the M points, the gradient amplitude value corresponding to the point in the intra prediction mode corresponding to the point, obtain the accumulated gradient amplitude values of the intra prediction modes corresponding to the M points, and determine the intra prediction mode with the largest accumulated gradient amplitude value among the intra prediction modes corresponding to the M points as the intra prediction mode corresponding to the prediction block.
[0731] In some embodiments, the transform unit 12 is further used to determine a first intra prediction mode as the intra prediction mode corresponding to the prediction block if the gradient amplitude values corresponding to the M points are all 0.
[0732] Optionally, the first intra prediction mode is a planar mode.
[0733] In some embodiments, the transform unit 12 is specifically used to obtain a correspondence relationship between an intra-prediction mode and a transform kernel group, where one transform kernel group includes at least one type of transform kernel, and is used to look up a first transform kernel group in the correspondence relationship corresponding to the intra-prediction mode of the prediction block, and determine a transform kernel corresponding to the current block from the first transform kernel group.
[0734] In some embodiments, the transformation unit 12 is specifically used to determine the type of transformation kernel corresponding to the current block, and determine a transformation kernel of the type in the first transformation kernel group as the transformation kernel corresponding to the current block.
[0735] In some embodiments, the transform unit 12 is specifically used to decode the bitstream to obtain the type of transform kernel corresponding to the current block.
[0736] In some embodiments, the prediction unit 11 is specifically used to decode a bitstream to obtain first information, which is used to indicate the type of reference area of the current block, and is used to determine the reference area of the current block among P pre-set reference areas based on the type of the reference area, where P is a positive integer greater than 1.
[0737] In some embodiments, the prediction unit 11 is specifically used to determine a reference area of the current block among P pre-set reference areas based on the shape of the current block, where P is a positive integer greater than 1.
[0738] In some embodiments, the P reference regions include at least one of a first reference region, a second reference region, and a third reference region, where the first reference region includes reconstruction regions above, to the right, to the left, to the top left, and to the top left of the current block, the second reference region includes reconstruction regions above, to the right, and to the top left of the current block, and the third reference region includes reconstruction regions to the left, to the top left, and to the top left of the current block.
[0739] In some embodiments, the prediction unit 11 is specifically used to decode the bitstream to obtain second information, which is used to indicate the shape of an interpolation filter for the current block, and to determine an interpolation filter for the current block among Q preset interpolation filters based on the shape of the interpolation filter, where Q is a positive integer greater than 1.
[0740] In some embodiments, the prediction unit 11 is specifically used to determine an interpolation filter for the current block among Q preset interpolation filters based on the shape of the current block, where Q is a positive integer greater than 1.
[0741] In some embodiments, the Q interpolation filters include at least one of a first interpolation filter, a second interpolation filter, and a third interpolation filter, wherein the first interpolation filter is a square interpolation filter, the second interpolation filter is a rectangular interpolation filter whose width is greater than its height, and the third interpolation filter is a rectangular interpolation filter whose height is greater than its width.
[0742] In some embodiments, the prediction unit 11 is further adapted to employ a truncated binary code decoding scheme to decode and obtain the first information and / or the second information from the bitstream.
[0743] In some embodiments, before the step of determining the reference region and interpolation filter of the current block, the prediction unit 11 is further used to decode the bitstream to obtain third information, which is used to indicate whether the current block is predicted using an interpolation filter prediction mode, and if it is determined based on the third information that the current block is predicted using an interpolation filter prediction mode, it is used to determine the reference region and interpolation filter of the current block.
[0744] In some embodiments, before decoding the bitstream to obtain the third information, the prediction unit 11 further determines whether the position of the current block in the current image satisfies a predetermined position requirement, and whether the size of the current block satisfies a predetermined block size requirement, and if it is determined that the position of the current block in the current image satisfies the predetermined position requirement and the size of the current block satisfies the predetermined block size requirement, the prediction unit 11 is used to decode the bitstream to obtain the third information.
[0745] In some embodiments, the prediction unit 11 is further used to determine that the current block is to be predicted without adopting the interpolation filter prediction mode if the position of the current block in the current image does not satisfy the predetermined position requirement and / or the size of the current block does not satisfy the predetermined block size requirement.
[0746] In some embodiments, before the steps of determining whether the position of the current block in the current image satisfies a predetermined position requirement and determining whether the size of the current block satisfies a predetermined block size, the prediction unit 11 is further used to decode the bitstream to obtain fourth information, which is used to indicate whether the current sequence is allowed to perform prediction using an interpolation filter prediction mode, and if the fourth information indicates that the current sequence is allowed to perform prediction using the interpolation filter prediction mode, it is used to determine whether the position of the current block in the current image satisfies the predetermined position requirement and whether the size of the current block satisfies the predetermined block size.
[0747] In some embodiments, the prediction unit 11 is specifically used to determine filter coefficients of the interpolation filter based on the reference region, and perform interpolation filter prediction on the current block using the interpolation filter based on the filter coefficients to obtain a predicted block of the current block.
[0748] In some embodiments, the prediction unit 11 is specifically used to determine a first reconstruction area around the current block, determine a pixel average reconstruction value based on the reconstruction value of the first reconstruction area, perform average removal on the reconstruction values of pixel points in the reference area based on the pixel average reconstruction value, use the pixel values of the pixel points in the reference area after average removal as the input of the interpolation filter, and slide the interpolation filter within the reference area to obtain the filter coefficients of the interpolation filter.
[0749] In some embodiments, the prediction unit 11 is specifically used to determine the first reconstruction region based on the shape of the current block.
[0750] In some embodiments, the prediction unit 11 is specifically used to determine the reconstructed pixel area of one row above and one column to the left of the current block as the first reconstruction area if the shape of the current block is square, or to determine the reconstructed pixel area of one row above the current block as the first reconstruction area if the shape of the current block is rectangular with its width greater than its height, or to determine the reconstructed pixel area of one column to the left of the current block as the first reconstruction area if the shape of the current block is rectangular with its height greater than its width.
[0751] In some embodiments, the prediction unit 11 is specifically used to obtain the pixel value of the pixel point after removing the average value in the reference region by subtracting the pixel average reconstruction value from the reconstruction value of the pixel point in the reference region.
[0752] In some embodiments, the prediction unit 11 is specifically used for determining, for the r-th point within the current point, pixel values of N positions corresponding to the r-th point based on the shape of the interpolation filter, where r is a positive integer; for performing average removal on the pixel values of the N positions based on the pixel average reconstruction value to obtain pixel values after average removal of the N positions; for obtaining a predicted value of the r-th point based on the pixel values after average removal of the N positions and the filter coefficients; and for obtaining a predicted block of the current block based on the predicted values of points within the current block.
[0753] In some embodiments, the prediction unit 11 is specifically used to determine, for any of the N positions, a reconstruction value of the position as the pixel value of the position if the position is in a reconstruction area around the current block, or to determine a predicted value of the position as the pixel value of the position if the position is within the current block.
[0754] In some embodiments, the prediction unit 11 is specifically used to obtain pixel values after removing the mean values of the N positions by subtracting the pixel mean reconstruction value from the pixel values of the N positions.
[0755] In some embodiments, the prediction unit 11 is specifically used to determine a second reconstruction area around the current block, and determine the maximum reconstruction value and the minimum reconstruction value of the second reconstruction area, obtain a first predicted value based on the pixel values after removing the average values of the N positions, the filter coefficients and the pixel average reconstruction value, and determine the predicted value of the rth point based on the first predicted value, the maximum reconstruction value and the minimum reconstruction value.
[0756] In some embodiments, the prediction unit 11 is specifically used to multiply the pixel values after removing the average values of the N positions by the filter coefficients to obtain a second predicted value of the rth point, and to add the second predicted value and the pixel average reconstruction value to obtain the first predicted value.
[0757] In some embodiments, the prediction unit 11 is specifically used to determine the first predicted value as the predicted value of the rth point if the first predicted value is greater than the minimum reconstruction value and less than the maximum reconstruction value.
[0758] In some embodiments, the prediction unit 11 is specifically used to determine the minimum reconstruction value as the prediction value of the r-th point if the first prediction value is less than or equal to the minimum reconstruction value.
[0759] In some embodiments, the prediction unit 11 is specifically used to determine the maximum reconstruction value as the prediction value of the r-th point if the first prediction value is greater than or equal to the maximum reconstruction value.
[0760] In some embodiments, the prediction unit 11 is specifically used to determine the upper, left, upper right, upper left and lower left reconstruction regions of the current block as the second reconstruction region.
[0761] In some embodiments, if the current block is a luminance block and the prediction mode of the current block is an interpolation filter prediction mode, the prediction unit 11 is further used to determine the PLANAR mode or the intra prediction mode corresponding to the prediction block as the prediction mode of the chroma block if the chroma block corresponding to the current block adopts the direct derivation mode DM.
[0762] It is understood that the device embodiments and the method embodiments are mutually compatible, and similar descriptions can be referred to in the method embodiments. To avoid repetition, detailed descriptions are omitted here. Specifically, the device 10 shown in FIG. 28 can execute the decoding method of the decoding side in the embodiment of the present application, and the above and other operations and / or functions of each component in the device 10 are intended to realize the corresponding flow of each method, such as the decoding method of the decoding side. For brevity, detailed descriptions are omitted here.
[0763] FIG. 29 is a schematic block diagram of a video encoding device according to an embodiment of the present application, which is applied to the above-mentioned encoder.
[0764] As shown in FIG. 29, the video encoding device 20 includes the following components.
[0765] The prediction unit 21 is used to determine a reference region and an interpolation filter for a current block, and to determine a prediction block for the current block based on the reference region and the interpolation filter.
[0766] The transform unit 22 is used to determine an intra-prediction mode corresponding to the predictive block, and to determine a transform kernel corresponding to the current block based on the intra-prediction mode corresponding to the predictive block.
[0767] The encoding unit 23 is used to perform a transform on the residual block of the current block based on a transform kernel corresponding to the current block, obtain the transform coefficients of the current block, and perform encoding based on the transform coefficients of the current block to obtain a bitstream.
[0768] In some embodiments, the transform unit 22 is specifically used to determine angle values of M points in the prediction block, where M is a positive integer, and to determine an intra-prediction mode corresponding to the prediction block based on the angle values of the M points.
[0769] In some embodiments, the conversion unit 22 is specifically used to determine, for an i-th point among the M points, the horizontal gradient and the vertical gradient of the i-th point, where i is a positive integer less than or equal to M, and to determine an angle value of the i-th point based on the horizontal gradient and the vertical gradient of the i-th point.
[0770] In some embodiments, the transform unit 22 is specifically used to determine a predicted value of a point within a sliding window centered on the i-th point within the prediction block, and obtain the horizontal gradient and vertical gradient of the i-th point based on the predicted value of the point within the sliding window and a horizontal gradient operator and a vertical gradient operator.
[0771] In some embodiments, the transformation unit 22 is specifically used to determine the product of the predicted value of a point within the sliding window and the horizontal gradient operator as the horizontal gradient of the i-th point, and to determine the product of the predicted value of a point within the sliding window and the vertical gradient operator as the vertical gradient of the i-th point.
[0772] In some embodiments, the conversion unit 22 is specifically used to determine the arctangent value of the ratio of the vertical gradient to the horizontal gradient of the i-th point as the angle value corresponding to the i-th point.
[0773] In some embodiments, the transform unit 22 is specifically used to determine the intra prediction mode corresponding to the M points based on the angle values of the M points, and to determine the intra prediction mode corresponding to the prediction block based on the intra prediction mode corresponding to the M points.
[0774] In some embodiments, the transform unit 22 is specifically used to determine gradient amplitude values corresponding to the M points based on the horizontal gradients and vertical gradients of the M points, and to determine an intra prediction mode corresponding to the prediction block based on the intra prediction mode and gradient amplitude values corresponding to the M points.
[0775] In some embodiments, the conversion unit 22 is specifically used to add the absolute value of the horizontal gradient and the absolute value of the vertical gradient of the i-th point to obtain a gradient amplitude value corresponding to the i-th point.
[0776] In some embodiments, the transform unit 22 is specifically used to accumulate, for any one of the M points, the gradient amplitude value corresponding to the point in the intra prediction mode corresponding to the point, obtain the accumulated gradient amplitude values of the intra prediction modes corresponding to the M points, and determine, among the intra prediction modes corresponding to the M points, the intra prediction mode with the largest accumulated gradient amplitude value as the intra prediction mode corresponding to the prediction block.
[0777] In some embodiments, the transform unit 22 is further used to determine the first intra prediction mode as the intra prediction mode corresponding to the prediction block if the gradient amplitude values corresponding to the M points are all 0.
[0778] Optionally, the first intra prediction mode is a planar mode.
[0779] In some embodiments, the transform unit 22 is specifically used to obtain a correspondence relationship between an intra-prediction mode and a transform kernel group, where one transform kernel group includes at least one type of transform kernel, and is used to look up a first transform kernel group in the correspondence relationship corresponding to the intra-prediction mode of the prediction block, and to determine a transform kernel corresponding to the current block from the first transform kernel group.
[0780] In some embodiments, the transformation unit 22 is specifically used to determine the type of transformation kernel corresponding to the current block, and determine a transformation kernel of the type in the first transformation kernel group as the transformation kernel corresponding to the current block.
[0781] In some embodiments, encoding unit 23 further writes the type of transform kernel corresponding to the current block into the bitstream.
[0782] In some embodiments, the prediction unit 21 is specifically used to determine a reference region of the current block among P pre-defined reference regions, where P is a positive integer greater than 1.
[0783] In some embodiments, the prediction unit 21 is specifically used to determine a first cost for predicting the current block based on the P reference regions, respectively, and determine the reference region among the P reference regions with the smallest first cost as the reference region for the current block.
[0784] In some embodiments, the encoding unit 23 is further adapted to write first information into the bitstream, the first information being adapted to indicate the type of the reference area of the current block.
[0785] In some embodiments, the prediction unit 21 is specifically used to determine a reference area of the current block among P pre-set reference areas based on the shape of the current block, where P is a positive integer greater than 1.
[0786] In some embodiments, the P reference areas include at least one of a first reference area, a second reference area, and a third reference area, wherein the first reference area includes reconstruction areas above, to the right, to the left, to the top left, and to the top left of the current block, the second reference area includes reconstruction areas above, to the right, and to the top left of the current block, and the third reference area includes reconstruction areas to the left, to the top left, and to the top left of the current block.
[0787] In some embodiments, the prediction unit 21 is specifically used to determine an interpolation filter for the current block among Q preset interpolation filters, where Q is a positive integer greater than 1.
[0788] In some embodiments, the prediction unit 21 is specifically used to determine a second cost when using the Q interpolation filters to perform prediction on the current block, respectively, and to determine the interpolation filter among the Q interpolation filters that has the smallest second cost as the interpolation filter for the current block.
[0789] In some embodiments, encoding unit 23 is further adapted to write second information into the bitstream, the second information being used to indicate the shape of an interpolation filter for the current block.
[0790] In some embodiments, the prediction unit 21 is specifically used to determine an interpolation filter for the current block among Q preset interpolation filters based on the shape of the current block, where Q is a positive integer greater than 1.
[0791] In some embodiments, the Q interpolation filters include at least one of a first interpolation filter, a second interpolation filter, and a third interpolation filter, wherein the first interpolation filter is a square interpolation filter, the second interpolation filter is a rectangular interpolation filter whose width is greater than its height, and the third interpolation filter is a rectangular interpolation filter whose height is greater than its width.
[0792] In some embodiments, the encoding unit 23 is further adapted to employ a truncated binary code encoding scheme to write the first information and / or the second information into the bitstream.
[0793] In some embodiments, before determining the reference region and interpolation filter of the current block, the prediction unit 21 is further used to determine a prediction mode of the current block from among a plurality of candidate prediction modes, the plurality of candidate prediction modes including an interpolation filtering prediction mode, which is used to determine the reference region and interpolation filter of the current block when making predictions when the prediction mode of the current block is the interpolation filter prediction mode.
[0794] In some embodiments, before the step of determining a prediction mode for the current block from among a plurality of candidate prediction modes, the prediction unit 21 is further used to determine whether the position of the current block in the current image satisfies a predetermined position requirement and whether the size of the current block satisfies a predetermined block size requirement, and is used to determine a prediction mode for the current block from among the plurality of candidate prediction modes if the position of the current block in the current image satisfies the predetermined position requirement and the size of the current block satisfies the predetermined block size requirement.
[0795] In some embodiments, the prediction unit 21 is further used to determine that the current block is to be predicted without adopting the interpolation filter prediction mode if the position of the current block in the current image does not satisfy the predetermined position requirement and / or the size of the current block does not satisfy the predetermined block size requirement.
[0796] In some embodiments, the prediction unit 21 is used to determine whether the position of the current block in the current image satisfies a predetermined position requirement and whether the size of the current block satisfies a predetermined block size requirement, before determining whether the current sequence allows prediction to be performed using the interpolation filter prediction mode, and if the current sequence allows prediction to be performed using the interpolation filter prediction mode, to determine whether the position of the current block in the current image satisfies the predetermined position requirement and whether the size of the current block satisfies the predetermined block size.
[0797] In some embodiments, the encoding unit 23 is further configured to write third information into the bitstream, which is used to indicate whether the current block is predicted using an interpolation filtering prediction mode.
[0798] In some embodiments, the encoding unit 23 is further adapted to write fourth information into the bitstream, the fourth information being adapted to indicate whether the current sequence allows prediction to be performed using an interpolation filtering prediction mode.
[0799] In some embodiments, the prediction unit 21 is specifically used to determine filter coefficients of the interpolation filter based on the reference region, and perform interpolation filter prediction on the current block using the interpolation filter based on the filter coefficients to obtain a predicted block of the current block.
[0800] In some embodiments, the prediction unit 21 is specifically used to determine a first reconstruction area around the current block, determine a pixel average reconstruction value based on the reconstruction value of the first reconstruction area, perform average removal on the reconstruction values of pixel points in the reference area based on the pixel average reconstruction value, use the pixel values of the pixel points in the reference area after average removal as the input of the interpolation filter, and slide the interpolation filter within the reference area to obtain the filter coefficients of the interpolation filter.
[0801] In some embodiments, the prediction unit 21 is specifically used to determine the first reconstruction region based on the shape of the current block.
[0802] In some embodiments, the prediction unit 21 is specifically used to determine the reconstructed pixel area one row above and one column to the left of the current block as the first reconstruction area if the shape of the current block is square, or to determine the reconstructed pixel area one row above the current block as the first reconstruction area if the shape of the current block is rectangular with its width greater than its height, or to determine the reconstructed pixel area one column to the left of the current block as the first reconstruction area if the shape of the current block is rectangular with its height greater than its width.
[0803] In some embodiments, the prediction unit 21 is specifically used to obtain the pixel value of the pixel point after removing the mean value in the reference region by subtracting the pixel mean reconstruction value from the reconstruction value of the pixel point in the reference region.
[0804] In some embodiments, the prediction unit 21 is specifically used for determining, for the r-th point within the current point, pixel values of N positions corresponding to the r-th point based on the shape of the interpolation filter, where r is a positive integer; for performing average removal on the pixel values of the N positions based on the pixel average reconstruction value to obtain pixel values after average removal of the N positions; for obtaining a predicted value of the r-th point based on the pixel values after average removal of the N positions and the filter coefficients; and for obtaining a predicted block of the current block based on the predicted values of points within the current block.
[0805] In some embodiments, the prediction unit 21 is specifically used to determine, for any of the N positions, a reconstruction value of the position as the pixel value of the position if the position is in a reconstruction area around the current block, or to determine a predicted value of the position as the pixel value of the position if the position is within the current block.
[0806] In some embodiments, the prediction unit 21 is specifically used to obtain pixel values after removing the mean values of the N positions by subtracting the pixel mean reconstruction value from the pixel values of the N positions.
[0807] In some embodiments, the prediction unit 21 is specifically used to determine a second reconstruction area around the current block, and determine the maximum reconstruction value and the minimum reconstruction value of the second reconstruction area, obtain a first predicted value based on the pixel values after removing the average values of the N positions, the filter coefficients and the pixel average reconstruction value, and determine the predicted value of the rth point based on the first predicted value, the maximum reconstruction value and the minimum reconstruction value.
[0808] In some embodiments, the prediction unit 21 is specifically used to multiply the pixel values after removing the average values of the N positions by the filter coefficients to obtain a second predicted value of the rth point, and to add the second predicted value and the pixel average reconstruction value to obtain the first predicted value.
[0809] In some embodiments, the prediction unit 21 is specifically used to determine the first predicted value as the predicted value of the rth point if the first predicted value is greater than the minimum reconstruction value and less than the maximum reconstruction value.
[0810] In some embodiments, the prediction unit 21 is specifically configured to determine the minimum reconstruction value as the prediction value of the r-th point if the first prediction value is less than or equal to the minimum reconstruction value.
[0811] In some embodiments, the prediction unit 21 is specifically used to determine the maximum reconstruction value as the prediction value of the r-th point if the first prediction value is greater than or equal to the maximum reconstruction value.
[0812] In some embodiments, the prediction unit 21 is specifically used to determine the upper, left, upper right, upper left and lower left reconstruction regions of the current block as the second reconstruction region.
[0813] In some embodiments, if the current block is a luminance block and the prediction mode of the current block is an interpolation filter prediction mode, prediction unit 21 is further used to determine the PLANAR mode or the intra prediction mode corresponding to the prediction block as the prediction mode of the chroma block if the chroma block corresponding to the current block adopts the direct derivation mode DM.
[0814] It is understood that the device embodiments and the method embodiments can correspond to each other, and similar descriptions can be referred to in the method embodiments. To avoid repetition, detailed descriptions are omitted here. Specifically, the device 20 shown in FIG. 29 can execute the decoding method of the decoding side in the embodiment of the present application, and the above and other operations and / or functions of each component in the device 20 are intended to realize the corresponding flow of each method, such as the decoding method of the decoding side. For brevity, detailed descriptions are omitted here.
[0815] The above description of the apparatus and system according to the embodiments of the present application has been given in terms of functional units with reference to the drawings. It is understood that the functional units may be implemented in hardware, software instructions, or a combination of hardware and software units. Specifically, each step of the method embodiments in the embodiments of the present application may be performed by a hardware integrated logic circuit and / or software instructions in a processor. The method steps disclosed in the embodiments of the present application may be directly executed and completed by a hardware decode processor, or may be executed and completed by a combination of hardware and software units in a decode processor. Optionally, the software units may be located in a storage medium well-established in the art, such as a random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable read-only memory, or register. The storage medium is located in a memory, and the processor reads information in the memory and completes the steps of the above-described method embodiments in combination with its own hardware.
[0816] FIG. 30 is a schematic block diagram of an electronic device according to an embodiment of the present application.
[0817] As shown in FIG. 30 , the electronic device 30 may be a video encoder or a video decoder described in the embodiments of the present application, and the electronic device 30 may include a memory 33 and a processor 32 .
[0818] The memory 33 is used to store a computer program 34 and transmits the program code 34 to the processor 32. In other words, the processor 32 can call up and execute the computer program 34 from the memory 33 to implement the method in the embodiment of the present application.
[0819] For example, the processor 32 is used to perform the steps in the method 200 described above based on instructions in the computer program 34 .
[0820] In some embodiments of the present application, the processor 32:
[0821] This includes, but is not limited to, general purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0822] In some embodiments of the present application, the memory 33 includes, but is not limited to, volatile memory and / or non-volatile memory.
[0823] Here, non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory is random access memory (RAM), which functions as an external high-speed cache. By way of example and non-limiting example, many forms of RAM are available, including static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct Rambus random access memory (DR RAM).
[0824] In some embodiments of the present application, the computer program 34 may be divided into one or more units that are stored in the memory 33 and executed by the processor 32 to complete the methods provided by the present application. The one or more units are a series of computer program instruction segments that can perform a specific function, and the instruction segments are used to describe how the computer program 34 is executed in the electronic device 30.
[0825] As shown in FIG. 30, the electronic device 30 may further include a transceiver 33 .
[0826] The transceiver 33 can be connected to the processor 32 or the memory 33 .
[0827] Here, the processor 32 can control the transceiver 31 to communicate with other devices, specifically, to transmit information or data to other devices or receive information or data transmitted from other devices. The transceiver 31 may include a transmitter and a receiver. The transceiver 31 may further include an antenna, and the number of antennas may be one or more.
[0828] The components in the electronic device 30 are connected via a bus system, which includes a power bus, a control bus, and a status signal bus in addition to a data bus.
[0829] FIG. 31 is a schematic block diagram of a video encoding / decoding system according to an embodiment of the present application.
[0830] 31, the video encoding / decoding system 40 may include a video encoder 41 and a video decoder 42. Here, the video encoder 41 is used to perform the video encoding method according to the embodiment of the present application, and the video decoder 42 is used to perform the video decoding method according to the embodiment of the present application.
[0831] The present application further provides a computer storage medium having a computer program stored therein, which, when executed by a computer, causes the computer to perform the method according to the above-described method embodiment. In other words, an embodiment of the present application further provides a computer program product including instructions, which, when executed by a computer, cause the computer to perform the method according to the above-described method embodiment.
[0832] The present application further provides a bitstream, which is generated according to the encoding method described above.
[0833] When implemented in software, the software may be implemented, in whole or in part, in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded into a computer and executed, the flow or function according to the embodiments of the present application is generated, in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored on a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired method (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or a wireless method (e.g., infrared, radio, microwave, etc.). The computer-readable storage medium may be any available medium accessible by a computer, or a data storage device, such as a server or data center, that aggregates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid state drives (SSDs)).
[0834] As can be understood by those skilled in the art, each example unit and algorithm step described in the embodiments of the present application may be realized by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in a hardware manner or a software manner depends on the specific application and design constraints of the technical solution. Although experts can implement the described functions using different methods for each specific application, such implementation is not considered to go beyond the scope of the present application.
[0835] It should be understood that in some embodiments provided by the present application, the disclosed systems, devices, and methods may be realized in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a division of logical functions, and other division methods may exist in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented. Furthermore, the shown or discussed mutual couplings, direct couplings, or communication connections may be via some interfaces. Indirect couplings or communication connections between devices or units may be realized in electrical, mechanical, or other forms.
[0836] Units described as separate components may or may not be physically separate. Components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Depending on actual needs, some or all of the units may be selected to achieve the purpose of the proposed embodiments. For example, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit.
[0837] The above content is merely a specific implementation of the present application, and the scope of protection of the present application is not limited thereto. Any modifications or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be equivalent to the scope of protection of the claims.
Claims
1. 1. A video decoding method comprising: determining a reference region and an interpolation filter for a current block, and determining a prediction block for the current block based on the reference region and the interpolation filter; determining an intra prediction mode corresponding to the prediction block; and determining a transformation kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block; performing an inverse transform on transform coefficients of the current block according to a transform kernel corresponding to the current block to obtain a residual block of the current block; and obtaining a reconstructed block of the current block according to the predicted block of the current block and the residual block. A method characterized by:
2. The step of determining an intra prediction mode corresponding to the prediction block includes: determining angle values of M points in the prediction block, where M is a positive integer; determining an intra prediction mode corresponding to the prediction block based on the angle values of the M points; 2. The method of claim 1 .
3. The step of determining angle values of M points in the prediction block comprises: For an i-th point of the M points, determining a horizontal gradient and a vertical gradient of the i-th point, where i is a positive integer less than or equal to M; and determining an angle value for the i-th point based on the horizontal and vertical gradients of the i-th point.
3. The method of claim 2.
4. The step of determining the horizontal and vertical gradients of the i-th point comprises: determining a prediction for a point within a sliding window centered on the i-th point within the prediction block; obtaining horizontal and vertical gradients of the i-th point based on predicted values of points within the sliding window and a horizontal gradient operator and a vertical gradient operator; 4. The method of claim 3.
5. obtaining horizontal and vertical gradients of the i-th point based on the predicted values of points within the sliding window and a horizontal gradient operator and a vertical gradient operator, determining the product of the predicted value of a point within the sliding window and the horizontal gradient operator as the horizontal gradient of the i-th point; determining the product of the predicted value of a point within the sliding window and the vertical gradient operator as the vertical gradient of the i-th point; 5. The method of claim 4.
6. determining an angle value corresponding to the i-th point based on the horizontal gradient and the vertical gradient of the i-th point, determining the arctangent of the ratio of the vertical gradient to the horizontal gradient of the i-th point as an angle value corresponding to the i-th point; 4. The method of claim 3.
7. The step of determining an intra prediction mode corresponding to the prediction block based on the angle values of the M points includes: determining intra prediction modes corresponding to the M points based on angle values of the M points; determining an intra prediction mode corresponding to the prediction block based on intra prediction modes corresponding to the M points; 4. The method of claim 3.
8. determining an intra prediction mode corresponding to the prediction block based on intra prediction modes corresponding to the M points, determining gradient amplitude values corresponding to the M points based on horizontal and vertical gradients of the M points; determining an intra prediction mode corresponding to the prediction block based on the intra prediction mode and gradient amplitude values corresponding to the M points; 8. The method of claim 7.
9. determining gradient amplitude values corresponding to the M points based on horizontal and vertical gradients of the M points, adding the absolute value of the horizontal gradient and the absolute value of the vertical gradient of the i-th point to obtain a gradient amplitude value corresponding to the i-th point; 9. The method of claim 8.
10. determining an intra prediction mode corresponding to the prediction block based on the intra prediction mode and gradient amplitude values corresponding to the M points, For any point among the M points, accumulating a gradient amplitude value corresponding to the point to an intra prediction mode corresponding to the point to obtain an accumulated gradient amplitude value of the intra prediction mode corresponding to the M points; determining, among the intra prediction modes corresponding to the M points, the intra prediction mode having the largest cumulative gradient amplitude value as the intra prediction mode corresponding to the prediction block; 9. The method of claim 8.
11. The method comprises: and determining a first intra prediction mode as the intra prediction mode corresponding to the prediction block when the gradient amplitude values corresponding to the M points are all 0.
9. The method of claim 8.
12. the first intra prediction mode is a PLANAR mode; 12. The method of claim 11 .
13. determining a transformation kernel corresponding to the current block based on an intra prediction mode corresponding to the predicted block, obtaining a correspondence between an intra prediction mode and a transform kernel group, wherein one transform kernel group includes at least one type of transform kernel; looking up a first transform kernel group corresponding to an intra prediction mode of the prediction block in the correspondence relationship; determining a transformation kernel corresponding to the current block from the first transformation kernel group; 13. The method according to any one of claims 1 to 12.
14. determining a transformation kernel corresponding to the current block from the first transformation kernel group, determining a type of transformation kernel corresponding to the current block; determining a transformation kernel of the transformation kernel type in the first transformation kernel group as a transformation kernel corresponding to the current block; 14. The method of claim 13.
15. The step of determining the type of transformation kernel corresponding to the current block includes: decoding a bitstream to obtain a type of a transform kernel corresponding to the current block; 15. The method of claim 14.
16. The step of determining the reference area of the current block comprises: decoding a bitstream to obtain first information, the first information being used to indicate a type of reference area of the current block; determining a reference area of the current block among P preset reference areas based on the type of the reference area, where P is a positive integer greater than 1; 2. The method of claim 1 .
17. The step of determining the reference area of the current block comprises: determining a reference area of the current block from among P preset reference areas based on a shape of the current block, where P is a positive integer greater than 1; 2. The method of claim 1 .
18. the P reference areas include at least one of a first reference area, a second reference area, and a third reference area, the first reference area including reconstruction areas above, to the right of, to the left of, to the top left of, and to the top left of the current block, the second reference area including reconstruction areas above, to the right of, and to the top left of the current block, and the third reference area including reconstruction areas to the left of, to the top left of, and to the top left of the current block; 18. The method according to claim 16 or 17.
19. The step of determining an interpolation filter for a current block comprises: decoding the bitstream to obtain second information, the second information being used to indicate a shape of an interpolation filter for the current block; determining an interpolation filter for the current block from among Q preset interpolation filters based on the shape of the interpolation filter, where Q is a positive integer greater than 1; 2. The method of claim 1 .
20. The step of determining an interpolation filter for a current block comprises: determining an interpolation filter for the current block from among Q preset interpolation filters based on a shape of the current block, where Q is a positive integer greater than 1; 2. The method of claim 1 .
21. the Q interpolation filters include at least one of a first interpolation filter, a second interpolation filter, and a third interpolation filter, wherein the first interpolation filter is a square interpolation filter, the second interpolation filter is a rectangular interpolation filter whose width is greater than its height, and the third interpolation filter is a rectangular interpolation filter whose height is greater than its width; 21. The method of claim 19 or 20.
22. The method comprises: The method further includes a step of employing a truncated binary code decoding method to decode and obtain the first information and / or the second information from the bitstream.
20. The method of claim 16 or 19.
23. Before the step of determining the reference region and the interpolation filter of the current block, the method further comprises: The method further includes the step of decoding the bitstream to obtain third information, wherein the third information is used to indicate whether the current block is predicted using an interpolation filter prediction mode; The step of determining a reference region and an interpolation filter for a current block comprises: determining a reference region and an interpolation filter for the current block when it is determined that the current block is predicted using the interpolation filter prediction mode based on the third information; 2. The method of claim 1 .
24. Before the step of decoding the bitstream to obtain the third information, the method further comprises: determining whether a position of the current block in the current image satisfies a predetermined position requirement; and determining whether a size of the current block satisfies a predetermined block size requirement; The step of decoding the bitstream to obtain the third information includes: if it is determined that the position of the current block in the current image satisfies the predetermined position requirement and the size of the current block satisfies the predetermined block size requirement, decoding the bitstream to obtain the third information; 24. The method of claim 23.
25. The method comprises: and determining that the current block is to be predicted without adopting the interpolation filter prediction mode when the position of the current block in the current image does not satisfy the predetermined position requirement and / or the size of the current block does not satisfy the predetermined block size requirement.
25. The method of claim 24.
26. Before the steps of determining whether the position of the current block in the current image satisfies a predetermined position requirement and determining whether the size of the current block satisfies a predetermined block size, the method further comprises: The method further includes: decoding the bitstream to obtain fourth information, the fourth information being used to indicate whether a current sequence is allowed to adopt the interpolation filter prediction mode for prediction; The step of determining whether the position of the current block in the current image satisfies a predetermined position requirement and determining whether the size of the current block satisfies a predetermined block size includes: When the fourth information indicates that the current sequence is allowed to adopt the interpolation filter prediction mode for prediction, the method includes the steps of determining whether a position of the current block in the current image satisfies the predetermined position requirement, and determining whether a size of the current block satisfies the predetermined block size.
25. The method of claim 24.
27. determining a prediction block of the current block based on the reference region and the interpolation filter, determining filter coefficients of the interpolation filter based on the reference region; performing interpolation filter prediction on the current block using the interpolation filter based on the filter coefficients to obtain a predicted block of the current block; 2. The method of claim 1 .
28. The step of determining filter coefficients of the interpolation filter based on the reference region includes: determining a first reconstruction region around the current block; determining a pixel average reconstruction value based on the reconstruction values of the first reconstruction region; performing mean value removal on the reconstructed values of the pixel points of the reference region based on the pixel mean reconstructed values; a step of using pixel values of pixel points in the reference region after removing the average value as an input to the interpolation filter, and sliding the interpolation filter within the reference region to obtain filter coefficients of the interpolation filter, 28. The method of claim 27.
29. The step of determining a first reconstruction region around the current block includes: determining the first reconstruction area based on a shape of the current block; 29. The method of claim 28.
30. determining the first reconstruction area based on the shape of the current block, If the shape of the current block is square, determining a reconstruction pixel area one row above and one column to the left of the current block as the first reconstruction area; or If the shape of the current block is a rectangle whose width is greater than its height, determining a reconstruction pixel area in one row above the current block as the first reconstruction area; or If the shape of the current block is a rectangle whose height is greater than its width, determining a reconstruction pixel area on one column to the left of the current block as the first reconstruction area.
30. The method of claim 29.
31. The step of removing the mean value from the reconstruction values of the pixel points of the reference region based on the pixel mean reconstruction value includes: a step of subtracting the pixel average reconstruction value from a reconstruction value of the pixel point in the reference region to obtain a pixel value of the pixel point after removing the average value in the reference region; 29. The method of claim 28.
32. performing interpolation filter prediction on the current block using the interpolation filter based on the filter coefficients to obtain a predicted block of the current block, for an r-th point of the current points, determining pixel values of N positions corresponding to the r-th point based on the shape of the interpolation filter, where r is a positive integer; performing mean value removal on pixel values at the N positions based on the pixel mean reconstruction value to obtain pixel values after mean value removal at the N positions; obtaining a predicted value of the r-th point based on the pixel values after removing the average value of the N positions and the filter coefficients; obtaining a predicted block of the current block based on a predicted value of a point in the current block; 29. The method of claim 28.
33. The step of determining pixel values at N positions corresponding to the r-th point comprises: for any of the N positions, if the position is in a reconstruction region around the current block, determining a reconstruction value for the position as the pixel value for the position, or if the position is within the current block, determining a predicted value for the position as the pixel value for the position; 33. The method of claim 32.
34. The step of removing the mean values of the pixel values at the N positions based on the pixel mean reconstruction value and obtaining the pixel values after the mean values of the N positions are removed includes: and subtracting the pixel average reconstruction value from pixel values at the N positions to obtain pixel values after removing the average values at the N positions.
33. The method of claim 32.
35. The step of obtaining a predicted value of the r-th point based on the pixel values after removing the average values of the N positions and the filter coefficients includes: determining a second reconstruction region around the current block, and determining a maximum reconstruction value and a minimum reconstruction value of the second reconstruction region; obtaining a first predicted value based on the pixel values after removing the mean values at the N positions, the filter coefficients, and the pixel mean reconstruction value; determining a predicted value for the r-th point based on the first predicted value, the maximum reconstruction value, and the minimum reconstruction value; 33. The method of claim 32.
36. The step of obtaining a first predicted value based on the pixel values after removing the average values at the N positions, the filter coefficients, and the pixel average reconstruction value includes: multiplying the pixel values after removing the average values at the N positions by the filter coefficient to obtain a second predicted value of the r-th point; adding the second predicted value and the pixel average reconstructed value to obtain the first predicted value.
36. The method of claim 35.
37. determining a predicted value for the r-th point based on the first predicted value, the maximum reconstruction value, and the minimum reconstruction value, determining the first predicted value as the predicted value for the r-th point if the first predicted value is greater than the minimum reconstruction value and less than the maximum reconstruction value; 36. The method of claim 35.
38. determining a predicted value for the r-th point based on the first predicted value, the maximum reconstruction value, and the minimum reconstruction value, if the first predicted value is less than or equal to the minimum reconstruction value, determining the minimum reconstruction value as the predicted value for the r-th point.
36. The method of claim 35.
39. determining a predicted value for the r-th point based on the first predicted value, the maximum reconstruction value, and the minimum reconstruction value, if the first predicted value is greater than or equal to the maximum reconstruction value, determining the maximum reconstruction value as the predicted value for the r-th point.
36. The method of claim 35.
40. The step of determining a second reconstruction region around the current block includes: determining upper, left, upper right, upper left, and lower left reconstruction regions of the current block as the second reconstruction region; 36. The method of claim 35.
41. If the current block is a luminance block and the prediction mode of the current block is an interpolation filter prediction mode, the method includes: If the chroma block corresponding to the current block adopts a direct derivation mode (DM), the method further includes determining a PLANAR mode or an intra prediction mode corresponding to the prediction block as a prediction mode of the chroma block.
2. The method of claim 1 .
42. 1. A video encoding method comprising: determining a reference region and an interpolation filter for a current block, and determining a prediction block for the current block based on the reference region and the interpolation filter; determining an intra prediction mode corresponding to the prediction block; and determining a transformation kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block; performing a transform on a residual block of the current block according to a transform kernel corresponding to the current block to obtain transform coefficients of the current block; and performing encoding according to the transform coefficients of the current block to obtain a bitstream. A method characterized by:
43. The step of determining an intra prediction mode corresponding to the prediction block includes: determining angle values of M points in the prediction block, where M is a positive integer; determining an intra prediction mode corresponding to the prediction block based on the angle values of the M points; 43. The method of claim 42.
44. The step of determining angle values of M points in the prediction block comprises: For an i-th point of the M points, determining a horizontal gradient and a vertical gradient of the i-th point, where i is a positive integer less than or equal to M; and determining an angle value for the i-th point based on the horizontal and vertical gradients of the i-th point.
44. The method of claim 43.
45. The step of determining the horizontal and vertical gradients of the i-th point comprises: determining a prediction for a point within a sliding window centered on the i-th point within the prediction block; obtaining horizontal and vertical gradients of the i-th point based on predicted values of points within the sliding window and horizontal and vertical gradient operators; 45. The method of claim 44.
46. obtaining horizontal and vertical gradients of the i-th point based on predicted values of points within the sliding window and horizontal and vertical gradient operators, determining the product of the predicted value of a point within the sliding window and the horizontal gradient operator as the horizontal gradient of the i-th point; determining the product of the predicted value of a point within the sliding window and the vertical gradient operator as the vertical gradient of the i-th point; 46. The method of claim 45.
47. determining an angle value corresponding to the i-th point based on the horizontal gradient and the vertical gradient of the i-th point, determining the arctangent of the ratio of the vertical gradient to the horizontal gradient of the i-th point as an angle value corresponding to the i-th point; 45. The method of claim 44.
48. The step of determining an intra prediction mode corresponding to the prediction block based on the angle values of the M points includes: determining intra prediction modes corresponding to the M points based on angle values of the M points; determining an intra prediction mode corresponding to the prediction block based on intra prediction modes corresponding to the M points; 45. The method of claim 44.
49. determining an intra prediction mode corresponding to the prediction block based on intra prediction modes corresponding to the M points, determining gradient amplitude values corresponding to the M points based on horizontal and vertical gradients of the M points; determining an intra prediction mode corresponding to the prediction block based on the intra prediction mode and gradient amplitude values corresponding to the M points; 49. The method of claim 48.
50. determining gradient amplitude values corresponding to the M points based on horizontal and vertical gradients of the M points, adding the absolute value of the horizontal gradient and the absolute value of the vertical gradient of the i-th point to obtain a gradient amplitude value corresponding to the i-th point; 50. The method of claim 49.
51. determining an intra prediction mode corresponding to the prediction block based on the intra prediction mode and gradient amplitude values corresponding to the M points, For any point among the M points, accumulating a gradient amplitude value corresponding to the point to an intra prediction mode corresponding to the point to obtain an accumulated gradient amplitude value of the intra prediction mode corresponding to the M points; determining, among the intra prediction modes corresponding to the M points, the intra prediction mode having the largest cumulative gradient amplitude value as the intra prediction mode corresponding to the prediction block; 50. The method of claim 49.
52. The method comprises: and determining a first intra prediction mode as the intra prediction mode corresponding to the prediction block when the gradient amplitude values corresponding to the M points are all 0.
50. The method of claim 49.
53. the first intra prediction mode is a PLANAR mode; 53. The method of claim 52.
54. determining a transformation kernel corresponding to the current block based on an intra prediction mode corresponding to the predicted block, obtaining a correspondence between an intra prediction mode and a transform kernel group, wherein one transform kernel group includes at least one type of transform kernel; looking up a first transform kernel group corresponding to an intra prediction mode of the prediction block in the correspondence relationship; determining a transformation kernel corresponding to the current block from the first transformation kernel group; 54. The method according to any one of claims 42 to 53.
55. determining a transformation kernel corresponding to the current block from the first transformation kernel group, determining a type of transformation kernel corresponding to the current block; determining a transformation kernel of the type in the first transformation kernel group as a transformation kernel corresponding to the current block; 55. The method of claim 54.
56. The method comprises: and further comprising writing a type of the transform kernel corresponding to the current block into a bitstream.
56. The method of claim 55.
57. The step of determining a reference region and an interpolation filter for a current block comprises: determining a reference area of the current block among P preset reference areas, where P is a positive integer greater than 1; 43. The method of claim 42.
58. The step of determining a reference area of the current block among the P preset reference areas includes: determining a first cost for performing prediction on the current block based on the P reference regions; determining a reference area having the smallest first cost among the P reference areas as a reference area of the current block; 58. The method of claim 57.
59. The method comprises: writing first information into a bitstream, the first information being used to indicate a type of reference area of the current block; 59. The method of claim 58.
60. The step of determining the reference area of the current block comprises: determining a reference area of the current block from among P preset reference areas based on a shape of the current block, where P is a positive integer greater than 1; 43. The method of claim 42.
61. The P reference regions include at least one of a first reference region, a second reference region, and a third reference region, the first reference region including reconstruction regions above, above right, left, above left, and above left of the current block, the second reference region including reconstruction regions above, above right, and above left of the current block, and the third reference region including reconstruction regions to the left, above left, and above left of the current block.
61. The method of claim 57 or 60.
62. The step of determining an interpolation filter for a current block comprises: determining an interpolation filter for the current block from among Q preset interpolation filters, where Q is a positive integer greater than 1; 43. The method of claim 42.
63. The step of determining an interpolation filter for the current block among Q preset interpolation filters includes: determining a second cost when performing prediction on the current block using each of the Q interpolation filters; determining an interpolation filter having the smallest second cost among the Q interpolation filters as an interpolation filter for the current block; 63. The method of claim 62.
64. The method comprises: writing second information into a bitstream, the second information being used to indicate the shape of an interpolation filter for the current block; 63. The method of claim 62.
65. The step of determining an interpolation filter for a current block comprises: determining an interpolation filter for the current block from among Q preset interpolation filters based on a shape of the current block, where Q is a positive integer greater than 1; 43. The method of claim 42.
66. the Q interpolation filters include at least one of a first interpolation filter, a second interpolation filter, and a third interpolation filter, wherein the first interpolation filter is a square interpolation filter, the second interpolation filter is a rectangular interpolation filter whose width is greater than its height, and the third interpolation filter is a rectangular interpolation filter whose height is greater than its width; 66. The method of claim 62 or 65.
67. The method comprises: The method further includes the step of writing the first information and / or the second information into the bitstream using a truncated binary code encoding method.
65. The method of claim 59 or 64.
68. Before the step of determining the reference region and the interpolation filter of the current block, the method further comprises: determining a prediction mode for the current block from a plurality of candidate prediction modes, the plurality of candidate prediction modes including an interpolation filtering prediction mode; The step of determining a reference region and an interpolation filter for a current block comprises: When a prediction mode of the current block is the interpolation filter prediction mode, determining a reference region and an interpolation filter of the current block when performing prediction.
43. The method of claim 42.
69. Prior to determining a prediction mode for the current block from among a plurality of candidate prediction modes, the method further comprises: determining whether a position of the current block in the current image satisfies a predetermined position requirement; and determining whether a size of the current block satisfies a predetermined block size requirement; determining a prediction mode for the current block from a plurality of candidate prediction modes, determining a prediction mode for the current block from among the plurality of candidate prediction modes when a position of the current block in the current image satisfies the predetermined position requirement and a size of the current block satisfies the predetermined block size requirement; 69. The method of claim 68.
70. The method comprises: determining that the current block is to be predicted without adopting the interpolation filter prediction mode when the position of the current block in the current image does not satisfy the predetermined position requirement and / or the size of the current block does not satisfy the predetermined block size requirement; 70. The method of claim 69.
71. Prior to the steps of determining whether the position of the current block in the current image satisfies a predetermined position requirement and determining whether the size of the current block satisfies a predetermined block size requirement, the method further comprises: The method further includes determining whether a current sequence is allowed to adopt the interpolation filter prediction mode for prediction; The step of determining whether the position of the current block in the current image satisfies a predetermined position requirement and determining whether the size of the current block satisfies a predetermined block size includes: When the current sequence allows the interpolation filter prediction mode to be adopted for prediction, the method includes the steps of: determining whether a position of the current block in a current image satisfies the predetermined position requirement; and determining whether a size of the current block satisfies the predetermined block size.
70. The method of claim 69.
72. The method comprises: and writing third information into a bitstream, the third information being used to indicate whether the current block is predicted using an interpolation filtering prediction mode.
69. The method of claim 68.
73. The method comprises: writing fourth information into a bitstream, the fourth information being used to indicate whether the current sequence is allowed to perform prediction using an interpolation filtering prediction mode; 72. The method of claim 71 .
74. determining a prediction block of the current block based on the reference region and the interpolation filter, determining filter coefficients of the interpolation filter based on the reference region; performing interpolation filter prediction on the current block using the interpolation filter based on the filter coefficients to obtain a predicted block of the current block; 43. The method of claim 42.
75. The step of determining filter coefficients of the interpolation filter based on the reference region includes: determining a first reconstruction region around the current block; determining a pixel average reconstruction value based on the reconstruction values of the first reconstruction region; performing mean value removal on the reconstructed values of the pixel points of the reference region based on the pixel mean reconstructed values; a step of using pixel values of pixel points in the reference region after removing the average value as an input to the interpolation filter, and sliding the interpolation filter within the reference region to obtain filter coefficients of the interpolation filter, 75. The method of claim 74.
76. The step of determining a first reconstruction region around the current block includes: determining the first reconstruction area based on a shape of the current block; 76. The method of claim 75.
77. determining the first reconstruction area based on the shape of the current block, If the shape of the current block is square, determining a reconstruction pixel area one row above and one column to the left of the current block as the first reconstruction area; or If the shape of the current block is a rectangle whose width is greater than its height, determining a reconstruction pixel area in one row above the current block as the first reconstruction area; or If the shape of the current block is a rectangle whose height is greater than its width, determining a reconstruction pixel area on one column to the left of the current block as the first reconstruction area.
77. The method of claim 76.
78. The step of removing the mean value from the reconstruction values of the pixel points of the reference region based on the pixel mean reconstruction value includes: a step of subtracting the pixel average reconstruction value from a reconstruction value of the pixel point in the reference region to obtain a pixel value of the pixel point after removing the average value in the reference region; 76. The method of claim 75.
79. performing interpolation filter prediction on the current block using the interpolation filter based on the filter coefficients to obtain a predicted block of the current block, For an r-th point in the current block, determining pixel values at N positions corresponding to the r-th point based on the shape of the interpolation filter, where r is a positive integer; performing mean value removal on pixel values at the N positions based on the pixel mean reconstruction value to obtain pixel values after mean value removal at the N positions; obtaining a predicted value of the r-th point based on the pixel values after removing the average value of the N positions and the filter coefficients; obtaining a predicted block of the current block based on a predicted value of a point in the current block; 76. The method of claim 75.
80. The step of determining pixel values at N positions corresponding to the r-th point comprises: for any of the N positions, if the position is in a reconstruction region around the current block, determining a reconstruction value for the position as the pixel value for the position, or if the position is within the current block, determining a predicted value for the position as the pixel value for the position; 80. The method of claim 79.
81. The step of removing the mean values of the pixel values at the N positions based on the pixel mean reconstruction value and obtaining the pixel values after the mean values of the N positions are removed includes: and subtracting the pixel average reconstruction value from pixel values at the N positions to obtain pixel values after removing the average values at the N positions.
80. The method of claim 79.
82. The step of obtaining a predicted value of the r-th point based on the pixel values after removing the average values of the N positions and the filter coefficients includes: determining a second reconstruction region around the current block, and determining a maximum reconstruction value and a minimum reconstruction value of the second reconstruction region; obtaining a first predicted value based on the pixel values after removing the mean values at the N positions, the filter coefficients, and the pixel mean reconstruction value; determining a predicted value for the r-th point based on the first predicted value, the maximum reconstruction value, and the minimum reconstruction value; 80. The method of claim 79.
83. The step of obtaining a first predicted value based on the pixel values after removing the average values at the N positions, the filter coefficients, and the pixel average reconstruction value includes: multiplying the pixel values after removing the average values at the N positions by the filter coefficient to obtain a second predicted value of the r-th point; adding the second predicted value and the pixel average reconstructed value to obtain the first predicted value.
83. The method of claim 82.
84. determining a predicted value for the r-th point based on the first predicted value, the maximum reconstruction value, and the minimum reconstruction value, determining the first predicted value as the predicted value for the r-th point if the first predicted value is greater than the minimum reconstruction value and less than the maximum reconstruction value; 83. The method of claim 82.
85. determining a predicted value for the r-th point based on the first predicted value, the maximum reconstruction value, and the minimum reconstruction value, if the first predicted value is less than or equal to the minimum reconstruction value, determining the minimum reconstruction value as the predicted value for the r-th point.
83. The method of claim 82.
86. determining a predicted value for the r-th point based on the first predicted value, the maximum reconstruction value, and the minimum reconstruction value, if the first predicted value is greater than or equal to the maximum reconstruction value, determining the maximum reconstruction value as the predicted value for the r-th point.
83. The method of claim 82.
87. The step of determining a second reconstruction region around the current block includes: determining upper, left, upper right, upper left, and lower left reconstruction regions of the current block as the second reconstruction region; 83. The method of claim 82.
88. If the current block is a luminance block and the prediction mode of the current block is an interpolation filter prediction mode, the method includes: If the chroma block corresponding to the current block adopts a direct derivation mode (DM), the method further includes determining a PLANAR mode or an intra prediction mode corresponding to the prediction block as a prediction mode of the chroma block.
43. The method of claim 42.
89. 1. A video decoding device, comprising: a prediction unit for determining a reference region and an interpolation filter for a current block, and for determining a prediction block for the current block based on the reference region and the interpolation filter; a transform unit for determining an intra prediction mode corresponding to the prediction block, and determining a transform kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block; a decoding unit for performing an inverse transform on transform coefficients of the current block according to a transform kernel corresponding to the current block to obtain a residual block of the current block; and for obtaining a reconstructed block of the current block according to the predicted block of the current block and the residual block. An apparatus characterized in that
90. 1. A video encoding device, comprising: a prediction unit for determining a reference region and an interpolation filter for a current block, and for determining a prediction block for the current block based on the reference region and the interpolation filter; a transform unit for determining an intra prediction mode corresponding to the prediction block, and determining a transform kernel corresponding to the current block based on the intra prediction mode corresponding to the prediction block; a coding unit for performing a transform on a residual block of the current block according to a transform kernel corresponding to the current block to obtain transform coefficients of the current block, and performing coding according to the transform coefficients of the current block to obtain a bitstream; An apparatus characterized in that
91. a processor and a memory, the memory is used to store a computer program; The processor is used to execute the method according to any one of claims 1 to 41 or 42 to 88 by calling and executing a computer program stored in the memory. An electronic device characterized by:
92. a video encoder and a video decoder, The video decoder is used to perform a method according to any one of claims 1 to 41, The video encoder is adapted to perform a method according to any one of claims 42 to 88. A video encoding and decoding system comprising:
93. Used to store computer programs, The computer program causes a computer to execute the method according to any one of claims 1 to 41 or 42 to 88. A computer-readable storage medium comprising: