Decoding method, encoding method, decoder, and encoder

By updating the past block vector information list using a different prediction mode, the decoding performance of IBC blocks is improved, addressing the inefficiencies in existing digital video compression technologies.

JP2026522401APending Publication Date: 2026-07-07GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2023-07-03
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing digital video compression technologies struggle to efficiently reduce bandwidth and traffic load for high-resolution video data, necessitating improved decoding performance, particularly for Intra Block Copy (IBC) blocks.

Method used

A decoding method that determines block vector information using a prediction mode different from the IBC mode, updates a past block vector information list to enhance the candidate block vector information list for IBC blocks, thereby improving decoding performance.

Benefits of technology

The method enriches the candidate block vector information for IBC blocks, enhancing decoding performance and efficiency in digital video compression.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026522401000001_ABST
    Figure 2026522401000001_ABST
Patent Text Reader

Abstract

This application provides a decoding method, an encoding method, a decoder, and an encoder, the decoding method relating to the art of decoding images or videos, the decoding method comprising: determining block vector information to use for a current block based on a first prediction mode different from an intra-block copy (IBC) mode; determining first past block vector information based on the block vector information to use for the current block; and updating a first past block vector information list based on the first past block vector information, wherein the first past block vector information list is used to determine a candidate block vector information list to use for an IBC block, the IBC block being a block that is decoded after the current block using the IBC mode. The decoding method provided in this application updates the first past block vector information list using a first prediction mode, which is equivalent to enriching the candidate block vector information of the IBC block using the first prediction mode, thereby improving the decoding performance of the IBC block and improving the decoding performance of the decoder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of encoding and decoding technologies, and more specifically, to a decoding method, an encoding method, a decoder, and an encoder.

Background Art

[0002] Digital video compression technology is mainly for compressing huge digital video data to facilitate transmission and storage, etc.

[0003] With the rapid increase of Internet videos and the ever-increasing requirements for people's video resolution, although the existing digital video compression standards can save a lot of video data, currently, in order to reduce the bandwidth of digital video transmission and the load of traffic, a better digital video compression technology is still required.

Summary of the Invention

Problems to be Solved by the Invention

[0004] This application provides a decoding method, an encoding method, a decoder, and an encoder that can improve the decoding performance of IBC blocks and the decoding performance of the decoder.

Means for Solving the Problems

[0005] In a first aspect, this application provides a decoding method, the method including: determining block vector information to be used for a current block based on a first prediction mode different from an intra block copy (IBC) mode; determining first past block vector information based on the block vector information to be used for the current block; updating a first past block vector information list based on the first past block vector information. Here, the first past block vector information list is used to determine the candidate block vector information list to be used for the IBC block, and the IBC block is a block that is decoded using the IBC mode after the current block.

[0006] In a second embodiment, the present application provides an encoding method, the method being: Based on a first prediction mode that differs from the intrablock copy (IBC) mode, the block vector information to be used for the current block is determined, Based on the block vector information used for the current block, the first past block vector information is determined, This includes updating the first past block vector information list based on the first past block vector information, Here, the first past block vector information list is used to determine the candidate block vector information list to be used for the IBC block, and the IBC block is a block that is encoded using the IBC mode after the current block.

[0007] In a third embodiment, the present application provides a decoder, said decoder, A first decision unit is configured to determine the block vector information to use for the current block based on a first prediction mode that differs from the intrablock copy (IBC) mode. A second determination unit is configured to determine first past block vector information based on the block vector information used for the current block, The system comprises an update unit configured to update the first past block vector information list based on the first past block vector information, Here, the first past block vector information list is used to determine the candidate block vector information list to be used for the IBC block, and the IBC block is a block that is decoded using the IBC mode after the current block.

[0008] In a fourth embodiment, the present application provides an encoder, the encoder is, A first decision unit is configured to determine the block vector information to use for the current block based on a first prediction mode that differs from the intrablock copy (IBC) mode. A second determination unit is configured to determine first past block vector information based on the block vector information used for the current block, The system comprises an update unit configured to update the first past block vector information list based on the first past block vector information, Here, the first past block vector information list is used to determine the candidate block vector information list to be used for the IBC block, and the IBC block is a block that is encoded using the IBC mode after the current block.

[0009] In a fifth embodiment, the present application provides a decoder, said decoder, A processor adapted to execute computer instructions, The system comprises a computer-readable storage medium that stores computer instructions loaded and executed by a processor for performing the decoding method in the first embodiment or each of its implementations described above.

[0010] In one implementation, the processor may be one or more, and the memory may be one or more.

[0011] In one implementation, the computer-readable storage medium may be integrated with the processor, or it may be provided separately from the processor.

[0012] In a sixth embodiment, the present application provides an encoder, the encoder is, A processor adapted to execute computer instructions, The system comprises a computer-readable storage medium that stores computer instructions loaded and executed by a processor for performing the encoding method in the second embodiment or each of its implementations described above.

[0013] In one implementation, the processor may be one or more, and the memory may be one or more.

[0014] In one implementation, the computer-readable storage medium may be integrated with the processor, or it may be provided separately from the processor.

[0015] In a seventh embodiment, the present application provides a computer-readable storage medium that stores computer instructions causing a computer device to execute the decoding method according to the first embodiment or the encoding method according to the second embodiment when read and executed by the processor of the computer device.

[0016] In the eighth embodiment, the application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, thereby causing the computer device to execute the decoding method according to the first embodiment or the encoding method according to the second embodiment.

[0017] In the ninth embodiment, the application provides a bitstream which is a bitstream related to the method of the first embodiment described above, or a bitstream which is generated by the method of the second embodiment described above. [Effects of the Invention]

[0018] Based on the above technical solutions, the decoding method provided in this application updates the first list of past block vector information used to determine the list of candidate block vector information based on a first prediction mode different from the IBC mode. Since the list of candidate block vector information is a list used for the IBC blocks decoded using the IBC mode after the current block, updating the first list of past block vector information using the first prediction mode is equivalent to enriching the candidate block vector information of the IBC blocks using the first prediction mode, improving the decoding performance of the IBC blocks, and improving the decoding performance of the decoder.

Brief Description of the Drawings

[0019] [Figure 1] It is an exemplary block diagram of a video encoding and decoding system according to this application. [Figure 2] It is an exemplary block diagram of a video encoder according to this application. [Figure 3] It is an exemplary structural diagram of the relationship between the encoding tree unit and the encoding unit according to this application. [Figure 4] It is an exemplary block diagram of a video decoder according to this application. [Figure 5] It is an example of the principle of the IntraTMP mode according to this application. [Figure 6] It is an example of the principle of the template matching process adopted by the IntraTMP mode according to this application. [Figure 7] It is an example of the IntraTMP adaptation technology for camera capture content according to this application. [Figure 8] It is an example of the principle of constructing the candidate block list according to this application. [Figure 9] It is an example of the principle of the IntraTMP fusion prediction technology according to this application. [Figure 10] It is an example of the filtering principle of the filter according to this application. [Figure 11] It is an example of the principle of determining the filter coefficients according to this application. [Figure 12] This is an example of a current block demarcation method according to this application. [Figure 13] This is an illustrative flowchart of the decoding method according to this application. [Figure 14] This is an illustrative flowchart of the encoding method according to this application. [Figure 15] This is an exemplary block diagram of the decoder of this application. [Figure 16] This is an illustrative block diagram of the encoder of the present application. [Figure 17] This is an illustrative structural diagram of an electronic device according to this application. [Modes for carrying out the invention]

[0020] The solution provided in this application may be applied to the field of digital compression.

[0021] Here, digital video compression technology is primarily used to compress vast amounts of digital video data, making transmission and storage easier.

[0022] The solution provided in this application may be applied to the field of digital video coding.

[0023] Here, the field of digital video coding includes, but is not limited to, the image coding and decoding field, the video coding and decoding field, the hardware video coding and decoding field, the dedicated circuit video coding and decoding field, and the real-time video coding and decoding field. Furthermore, the solutions provided in this application can be incorporated into the Audio Video Coding Standard (AVS), the second-generation AVS standard (AVS2), or the third-generation AVS standard (AVS3). For example, this includes, but is not limited to, 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. Furthermore, the solutions provided in this application may be used to perform lossy compression on images or lossless compression on images. Here, the lossless compression may be visually lossless compression or mathematically lossless compression.

[0024] Video coding and decoding standards may employ a block-based hybrid coding framework.

[0025] The hybrid coding framework includes modules such as prediction, transform, quantization, entropy coding, and in-loop filtering. The prediction module includes intra-prediction and / or inter-prediction. Because there is a strong correlation between adjacent pixels in a single frame of video, video coding and decoding techniques can eliminate spatial redundancy between adjacent pixels by using intra-prediction methods. Intra-prediction refers only to image information from the same frame and predicts pixel information within the current segmented block. Because there is a strong similarity between adjacent frames in video, using inter-prediction methods in video coding and decoding techniques can eliminate temporal redundancy between adjacent frames, thereby improving coding efficiency. Inter-prediction includes motion estimation and motion compensation. Inter-prediction can refer to image information from different frames and use motion estimation to search for the motion vector information that best matches the current segmented block. The transformation can remove visual redundancy by converting the predicted image block to the frequency domain, redistributing the energy, and combining it with quantization, thereby removing information that is not visually sensitive to humans. Entropy coding can eliminate code redundancy based on the context model and the probabilistic information of the binary bitstream.

[0026] The basic process of a video encoder is as follows:

[0027] The encoder first divides a single frame of image into blocks, then predicts the current block in the current image to obtain the predicted block, then subtracts the predicted block from the original block of the current block to obtain the residual block, performs transformation and quantization on the residual block to obtain a quantization coefficient matrix, and then performs entropy coding on the quantization coefficient matrix to obtain the output bitstream.

[0028] The basic process of a video decoder is as follows:

[0029] The decoder, on the one hand, predicts the current block to obtain a predicted block of the current block, and on the other hand, analyzes the bitstream to obtain a quantization coefficient matrix, performs inverse quantization and inverse transform on the quantization coefficient matrix to obtain a residual block, and then adds the predicted block and the residual block to obtain a reconstructed block. The reconstructed block constitutes a reconstructed image, and loop filtering is performed on the reconstructed image based on the image or block to obtain a decoded image.

[0030] Note that the Current Block may be the current coding / decoding unit (CU) or the current prediction unit (PU), among other things.

[0031] Furthermore, the encoder also performs operations similar to those of the decoder to obtain a decoded image. The decoded image may be provided as an interprediction reference frame for subsequent frames. If necessary, mode information or parameter information such as block partitioning information, prediction, transformation, quantization, entropy coding, and loop filtering determined by the encoder must be written to the bitstream. The decoder determines the same mode information or parameter information such as block partitioning information, prediction, transformation, quantization, entropy coding, and loop filtering as the encoder by analysis and analysis based on existing information, thereby ensuring that the decoded image obtained by the encoder is the same as the decoded image obtained by the decoder. The decoded image obtained by the encoder is usually also called a reconstructed image. The codec may partition the current block into prediction units during prediction and into transformation units during transformation, and the partitioning of the prediction units and transformation units may differ. The above is a basic process of a video codec in a block-based hybrid coding framework, and as technology advances, some modules or steps of the framework or process may be optimized, and this application is not specifically limited thereto.

[0032] Furthermore, the terminology used in the embodiments of this application is intended solely to describe specific embodiments of this application and is not intended to limit this application.

[0033] For example, the terms "and / or" in this specification describe an association relationship between related objects and indicate that there may be three possible relationships. For instance, Object A and / or Object B can represent three cases: Object A exists independently, both Object A and Object B exist, or Object B exists independently. The terms "at least one" describe a combination relationship between enumerated objects and indicate that there may be one or more such relationships. For example, "at least one of A, B, and C" can represent several combinations: A exists independently, B exists independently, C exists independently, A and B exist simultaneously, A and C exist simultaneously, B and C exist simultaneously, or A, B, and C exist simultaneously. The terms "multiple" refer to two or more. The symbol " / " generally indicates that the relationship between the related objects before and after it is an "or" relationship.

[0034] In other examples, the term “corresponding” may mean that there is a direct or indirect corresponding relationship between the two, or that there is a related relationship between them, or that there is a relationship such as indicating and being indicated, or configuring and being configured. The term “indicating” may mean indicating directly, indicating indirectly, or indicating as having a related relationship. For example, A indicating B may mean that A directly indicates B, for example, that B can be obtained by A; A indirectly indicates B, for example, that A indicates C and B can be obtained by C; or it may mean that there is a related relationship between A and B. The terms “predefined” or “preconfigured” mean that a device (e.g., including an encoder or decoder) may pre-store corresponding codes, tables, or other related information used for instruction, which may be defined by a protocol. “Protocol” may mean any single standard protocol in the coding and decoding field, and this application is not limited thereto. The term "when..." can be interpreted as similar to phrases such as "if...", "if...", "at the time of...", or "in response to". Similarly, depending on the context, the phrases "when determined" or "when (the stated condition or event) is detected" can be interpreted as similar to phrases such as "when determined", "in response to the determination", "when (the stated condition or event) is detected", or "in response to the detection of (the stated condition or event)". Terms such as "first", "second", "third", "fourth", "A", and "B" are used to distinguish different subjects and not to describe a particular order. "Include", "equip", and any other variations thereof are intended to indicate non-exclusive (or non-exclusive) inclusion.

[0035] To facilitate understanding, we will first describe the video coding and decoding system according to an embodiment of this application with reference to Figure 1.

[0036] Figure 1 is an illustrative block diagram of a video coding and decoding system according to an embodiment of this application.

[0037] As shown in Figure 1, the video encoding and decoding system 100 includes an encoding device 110 and a decoding device 120.

[0038] Here, the encoding device 110 is configured to encode (which may be understood as compressing) the video data to generate a bitstream and transmit the bitstream to the decoding device 120. The decoding device 120 decodes the bitstream generated by the encoding of the encoding device 110 to obtain the decoded video data.

[0039] The encoding device 110 may be understood as a device having video encoding capabilities, and the decoding device 120 may be understood as a device having video decoding capabilities; that is, the encoding device 110 and decoding device 120 in the embodiments of this application include a wider range of devices such as smartphones, desktop computers, mobile computing devices, notebook computers (e.g., laptop computers), tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, video game consoles, and vehicle computers.

[0040] The encoding device 110 can transmit encoded video data (e.g., a bitstream) to the decoding device 120 via channel 130.

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

[0042] Channel 130 may include one or more communication media that cause the encoding device 110 to directly transmit encoded video data to the decoding device 120 in real time. The encoding device 110 can modulate the encoded video data based on a communication standard and transmit the modulated video data to the decoding device 120. Here, the communication media includes wireless communication media such as radio frequency spectrum. The communication media may also include wired communication media such as one or more physical transmission lines.

[0043] Channel 130 includes a storage medium capable of storing video data encoded by the encoding device 110. The storage medium includes various locally accessible data storage media such as optical discs, DVDs, and flash memory. In this example, the decoding device 120 can retrieve the encoded video data from the storage medium.

[0044] Channel 130 may include a storage server that can store video data encoded by the encoding device 110. In this example, the decoding device 120 can download the stored encoded video data from the storage server. Optionally, the storage server can store the encoded video data and transmit the encoded video data to the decoding device 120, for example, a web server (e.g., for a website) or a File Transfer Protocol (FTP) server.

[0045] The encoding device 110 includes a video encoder 112 and an output interface 113.

[0046] Here, the output interface 113 may include a modulator / demodulator (modem) and / or transmitter. 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 be stored in a storage medium or storage server for later reading by the decoding device 120.

[0047] In addition to the video encoder 112 and output interface 113, the encoding device 110 may further include a video source 111.

[0048] The video source 111 may comprise 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 configured to receive video data from a video content provider, and the computer graphics system is configured to generate video data. The video encoder 112 encodes the video data from the video source 111 to generate a bitstream. The video data may include one or more pictures or sequences of pictures. The bitstream contains encoding information for the pictures or sequences of pictures in bitstream format. The encoding information may include encoded image data and associated data. The associated data may include a Sequence Parameter Set (SPS), a Picture Parameter Set (PPS), and other syntactic structures. The SPS may contain parameters applicable to one or more sequences. The PPS may contain parameters applicable to one or more pictures. A syntactic structure refers to a set of zero or more syntactic elements arranged in a specified order in the bitstream.

[0049] The decoding device 120 comprises an input interface 121 and a video decoder 122. The input interface 121 may include a receiver and / or a modem.

[0050] The decoding device 120 may further include a display device 123 in addition to the input interface 121 and the video decoder 122.

[0051] Here, the input interface 121 can receive encoded video data via channel 130. The video decoder 122 is configured to decode the encoded video data, obtain the decoded video data, and transmit the decoded video data to the display device 123. The display device 123 displays the decoded video data. The display device 123 may be integrated with the decoding device 120 or located outside of the decoding device 120. The display device 123 may include various display devices such as liquid crystal displays (LCDs), plasma displays, organic light-emitting diode (OLED) displays, or other types of display devices.

[0052] Figure 1 is merely an example of the present application and should not be understood as a limitation to the present application. In other words, the technical solutions of the embodiments of the present application are not limited to the system framework shown in Figure 1. For example, the technology of the present application can also be applied to one-sided video encoding or one-sided video decoding.

[0053] The following describes a video encoding framework according to an embodiment of this application.

[0054] Figure 2 is an illustrative block diagram of a video encoder 200 according to an embodiment of the present application.

[0055] The video encoder 200 is applicable to image data in luminance chroma (YCbCr, YUV) format. For example, the YUV ratio can be 4:2:0, 4:2:2, or 4:4:4, where Y represents luminance (Luma), Cb (U) represents blue chromaticity, Cr (V) represents red chromaticity, and U and V are represented as chromaticity (Chroma) to describe color and saturation. For example, in a color format, 4:2:0 indicates that there are four luminance components and two chromaticity components (YYYYCbCr) for every four pixels, 4:2:2 indicates that there are four luminance components and four chromaticity components (YYYYCbCrCbCr) for every four pixels, and 4:4:4 indicates full pixel representation (YYYYCbCrCbCrCbCrCbCr). Of course, this application may also be applied to image data in red-green-blue (RGB) format, and is not specifically limited to this.

[0056] The video encoder 200 reads a video stream and can divide the image of each frame in the video stream into several coding tree units (CTUs). In some examples, a CTU is also called a “tree block,” “largest coding unit” (LCU), or “coding tree block” (CTB). Each CTU can be associated with a pixel block of the same size in the image. Each pixel can correspond to one luminance (or luma) sample and two chrominance (or chroma) samples. Thus, each CTU can be associated with one luminance sample block and two chroma sample blocks. For example, the size of one CTU may be 128×128, 64×64, 32×32, etc. Figure 3 is an exemplary structural diagram of the relationship between coding tree units and coding units according to this application. As shown in Figure 3, one CTU can be further divided into several coding units (CUs) for coding, and the CUs may be rectangular blocks or square blocks. A CU can be further divided into a Prediction Unit (PU) and a Transform Unit (TU), which separates coding, prediction, and transformation, making the process more flexible. In one example, a CTU can be divided into CUs using a tree-like structure (e.g., a quadtree), and each CU can be divided into TUs and PUs using a tree-like structure (e.g., a quadtree).

[0057] Video encoders and video decoders can support various PU sizes.

[0058] Assuming a specific CU size is 2N×2N, video encoders and video decoders can support PU sizes of 2N×2N or N×N for intra prediction, and symmetric PU sizes of 2N×2N, 2N×N, N×2N, N×N, or similar sizes for inter prediction. Video encoders and video decoders can also support asymmetric PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter prediction.

[0059] As shown in Figure 2, the video encoder 200 may include a prediction unit 210, a residual unit 220, a transform / quantization unit 230, an inverse transform / quantization unit 240, a reconstruction unit 250, an in-loop filter unit 260, a decoded image buffer 270, and an entropy coding unit 280. The video encoder 200 may include more, fewer, or different functional components. In this application, the current block is also called the current coding unit (CU) or current prediction unit (PU), etc. The prediction block is also called the prediction image block or image prediction block, and the reconstructed image block is also called the reconstruction block or image reconstructed image block.

[0060] 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 in a single image of video, the intra-prediction method in video coding and decoding techniques can eliminate spatial redundancy between adjacent pixels. Because there is a strong similarity between adjacent images of video, the inter-prediction method can eliminate temporal redundancy between adjacent frames, thereby improving coding efficiency.

[0061] The inter-prediction unit 211 can be used for inter-prediction, which may include motion estimation and motion compensation, and can reference image information from different frames. Inter-prediction uses motion information to find a reference block from a reference frame, generates a prediction block based on the reference block, and is used to eliminate temporal redundancy. The reference frame may be a P-frame and / or a B-frame, where a P-frame refers to a forward prediction frame and a B-frame refers to a bidirectional prediction frame. After finding the reference block using motion information, inter-prediction generates a prediction block based on the reference block. The motion information includes a frame list to which the reference frame belongs, a frame index, and a motion vector. The motion vector may be an integer pixel or a subpixel. If the motion vector is a subpixel, an interpolation filter must be used within the reference frame to create a block of the desired subpixel, and the reference block is the block of integer pixels or subpixels found based on the motion vector. In some techniques, the reference block is directly used as the prediction block, while in other techniques, further processing is performed on the reference block to generate the prediction block. The process of generating a prediction block by adding further processing based on a reference block can be understood as using the reference block as a prediction block, and then generating a new prediction block by adding further processing based on that prediction block.

[0062] The intra-prediction unit 212 refers only to image information from the same frame and predicts pixel information within the currently encoded image block to eliminate spatial redundancy. The reference frame used in intra-prediction may be an I-frame.

[0063] Intra prediction has various prediction modes, including angle prediction mode and non-angle prediction mode. By using these modes, the image block to be encoded is predicted to obtain a predicted block. Based on the predicted block and rate distortion information calculated based on the image block to be encoded, the optimal prediction mode for the image block to be encoded is screened, and this prediction mode is written to the bitstream and transmitted to the decoding side. The decoding side analyzes the prediction mode, obtains a predicted block of the target decoding block based on the prediction, and obtains the reconstructed block by adding the time-domain residual block obtained based on the bitstream.

[0064] Taking the International Digital Video Coding Standards H-Series as an example, the H.264 / AVC standard has 8 angle prediction modes and 1 non-angle prediction mode, while H.265 / HEVC extends this to 33 angle prediction modes and 2 non-angle prediction modes. The intra-prediction modes used in HEVC consist of a total of 35 prediction modes: Planar mode, DC mode, and 33 angle modes. The intra-modes used in VVC consist of a total of 67 prediction modes: Planar mode, DC mode, and 65 angle modes, which include conventional and non-conventional prediction modes, and non-conventional prediction modes may include matrix-weighted intra-frame prediction (MIP) modes. Conventional prediction modes include the planar mode with mode number 0, the DC mode with mode number 1, and angle prediction modes with mode numbers 2 to 66. Furthermore, as the number of angle modes increases, the prediction results of intra prediction become more accurate and better meet the demands of the development of high-resolution and ultra-high-resolution digital video. The intra prediction modes described above are merely examples of this application and do not limit it.

[0065] The residual unit 220 can generate residual blocks of the CU based on the pixel blocks of the CU and the prediction blocks of the PU of the CU. For example, the residual unit 220 can generate residual blocks of the CU such that each sample in the residual block is equal to the difference between the sample in the pixel block of the CU and the corresponding sample in the prediction block of the PU of the CU.

[0066] The conversion / quantization unit 230 can quantize the conversion coefficients. The conversion / quantization unit 230 can quantize the conversion coefficients associated with the TU of the CU based on the quantization parameter (QP) value associated with the CU. The video encoder 200 can adjust the degree of quantization applied to the conversion coefficients associated with the CU by adjusting the QP value associated with the CU.

[0067] The inverse transform / quantization unit 240 can apply inverse quantization and inverse transform, respectively, to the transformed coefficients after quantization, and reconstruct the residual block from the transformed coefficients after quantization.

[0068] The reconstruction unit 250 can generate a reconstructed image block associated with the TU by adding the samples of the reconstructed residual block to the corresponding samples of one or more prediction blocks generated by the prediction unit 210. By reconstructing the sample block of each TU in the CU using this method, the video encoder 200 can reconstruct the pixel block of the CU.

[0069] The in-loop filter unit 260 is used to process pixels after inverse transformation and inverse quantization, compensate for distortion information, and provide a better reference for subsequent pixels to be encoded. For example, it can perform a deblocking filter operation to reduce blocking artifacts in pixel blocks associated with the CU. In some embodiments, the in-loop filter unit 260 includes a deblocking filter (DBF) unit and a sample-adaptive offset / self-adaptive loop filter (SAO / ALF) unit, where the DBF unit is configured to remove blocking artifacts and the SAO / ALF unit is configured to remove ringing artifacts.

[0070] The decoded image buffer 270 can store the reconstructed pixel blocks.

[0071] Here, the inter-prediction unit 211 can perform inter-prediction on other PUs of an image using a reference image containing the reconstructed pixel blocks in the decoded image buffer 270. Furthermore, 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.

[0072] The entropy coding unit 280 can receive the quantized transformation coefficients from the transformation / quantization unit 230. The entropy coding unit 280 can perform one or more entropy coding operations on the quantized transformation coefficients to generate entropy coded data.

[0073] Figure 4 is an exemplary block diagram of a video decoder according to an embodiment of the present application.

[0074] As shown in Figure 4, the video decoder 300 includes an entropy decoding unit 310, a prediction unit 320, an inverse quantization / conversion unit 330, a reconstruction unit 340, an in-loop filter unit 350, and a decoded image buffer 360. The video decoder 300 may include more, fewer, or different functional components.

[0075] The video decoder 300 can receive a bitstream. The entropy decoding unit 310 can extract syntactic elements from the bitstream by analyzing it. As part of the bitstream analysis, the entropy decoding unit 310 can analyze entropy-encoded syntactic elements within the bitstream. The prediction unit 320, the inverse quantization / conversion unit 330, the reconstruction unit 340, and the in-loop filter unit 350 can decode the video data based on the syntactic elements extracted from the bitstream, i.e., generate the decoded video data.

[0076] The prediction unit 320 includes an intra prediction unit 322 and an inter prediction unit 321.

[0077] The intra-prediction unit 322 can perform intra-prediction and generate prediction blocks for the PU. The intra-prediction unit 322 can generate prediction blocks for the PU based on spatially adjacent pixel blocks of the PU using the intra-prediction mode. The intra-prediction unit 322 can further determine the intra-prediction mode of the PU based on one or more syntactic elements analyzed from the bitstream.

[0078] The inter-prediction unit 321 can construct a first reference image list (list 0) and a second reference image list (list 1) based on syntactic elements analyzed from the bitstream. Furthermore, if the PU is encoded using inter-prediction, the entropy decoding unit 310 can analyze the motion information of the PU. Based on the motion information of the PU, the inter-prediction unit 321 can determine one or more reference blocks of the PU. Based on one or more reference blocks of the PU, the inter-prediction unit 321 can generate prediction blocks of the PU.

[0079] The inverse quantization / conversion unit 330 can inverse quantize (i.e., dequantize) the conversion coefficients associated with the TU. The inverse quantization / conversion unit 330 can determine the degree of quantization using the QP value associated with the CU of the TU. After inverse quantization of the conversion coefficients, the inverse quantization / conversion unit 330 can apply one or more inverse transformations to the inversely quantized conversion coefficients to generate residual blocks associated with the TU.

[0080] The reconstruction unit 340 reconstructs the pixel blocks of the CU using the residual blocks associated with the TU of the CU and the predicted blocks of the PU of the CU. For example, the reconstruction unit 340 can reconstruct the pixel blocks of the CU by adding the samples of the residual blocks to the corresponding samples of the predicted blocks, thereby obtaining a reconstructed image block.

[0081] The in-loop filter unit 350 can perform a deblocking filter operation to reduce blocking artifacts in pixel blocks associated with the CU.

[0082] The video decoder 300 can store the reconstructed image of the CU in the decoded image buffer 360. The video decoder 300 can use the reconstructed image in the decoded image buffer 360 as a reference image for subsequent prediction, or it can transmit the reconstructed image to a display device for display.

[0083] Referring to Figures 2 and 4, the basic process of video encoding and decoding is as follows:

[0084] On the encoding side, the image of one frame is divided into image blocks, and the prediction unit 210 generates a predicted block of the current block (i.e., the block to be encoded) using intra-prediction or inter-prediction for the current block. The residual unit 220 can calculate a residual block, i.e., the difference between the predicted block and the original block, based on the predicted block and the original block of the current block (i.e., the block to be encoded), and this residual block may also be called residual information. This residual block can be transformed and quantized by the transformation / quantization unit 230 to remove information that is not visually sensitive to humans and eliminate visual redundancy. Optionally, the residual block before transformation and quantization by the transformation / quantization unit 230 may be called a time-domain residual block, and the time-domain residual block after transformation and quantization by the transformation / quantization unit 230 may be called a frequency residual block or frequency-domain residual block. The entropy coding unit 280 can receive the quantized conversion coefficients output by the conversion / quantization unit 230, perform entropy coding on these quantized conversion coefficients, and output a bitstream. For example, the entropy coding unit 280 can eliminate sign redundancy based on the target context model and the probabilistic information of the binary bitstream.

[0085] On the decoding side, the entropy decoding unit 310 analyzes the bitstream to obtain prediction information and a quantization coefficient matrix for the current block (i.e., the block to be decoded). The prediction unit 320 uses intra-prediction or inter-prediction based on the prediction information to predict the current block (i.e., the block to be decoded). The inverse quantization / transformation 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 the residual block. The reconstruction unit 340 adds the predicted block and the residual block to obtain the reconstructed block. The reconstructed block constitutes a reconstructed image, and the in-loop filter unit 350 performs in-loop filtering on the reconstructed image on an image basis or block basis to obtain the decoded image. Note that on the encoding side, it is also necessary to perform the same operations as the decoder to obtain the decoded image. This decoded image is sometimes called a reconstructed image, and the reconstructed image can be used as a reference frame for inter-prediction of subsequent frames.

[0086] Furthermore, if necessary, the bitstream must include block partitioning information determined by the encoder, as well as mode or parameter information such as prediction, transformation, quantization, entropy coding, and in-loop filtering. The decoding side determines the same block partitioning information, prediction, transformation, quantization, entropy coding, and in-loop filtering mode or parameter information as the encoding side by analyzing the bitstream and analyzing existing information, thereby ensuring that the decoded image obtained by the encoder and the decoded image obtained by the decoder are identical.

[0087] Furthermore, due to the need for parallel processing, images may be divided into slices, and slices within the same image can be processed in parallel; that is, there is no data dependency between them. The term "frame" may be understood as an image or a slice. Moreover, the above is a basic process of a video codec in a block-based encoding / decoding framework, and as technology advances, some modules or steps of the framework or process may be optimized; that is, this application is not limited to the framework and process.

[0088] To facilitate understanding of the technical solution presented in this application, the relevant information is explained below.

[0089] (1) About the Intra Template Matching Prediction (IntraTMP) mode IntraTMP mode is an intra predictive coding tool for special luminance blocks, primarily applied to screen content coding.

[0090] Figure 5 shows an example of the principle of the IntraTMP mode according to this application.

[0091] As shown in Figure 5, IntraTMP mode is primarily implemented through the following process.

[0092] The encoder (or decoder) selects the reconstructed pixels of the L-shaped region adjacent to the current encoded block as a template, searches for the most similar template in the reconstructed region of the given current frame, and uses the reconstructed block corresponding to the most similar template as the matching block and as the prediction block for the current encoded block. For example, R1 to R4 in the diagram are search regions available in IntraTMP mode. For example, matching blocks can be found point by point in the raster scan order in R1 to R4.

[0093] Figure 6 shows an example of the principle of the template matching process employed by the IntraTMP mode according to this application.

[0094] As shown in Figure 6, the template of the current block may include the pixels in column L on the left, the pixels in column M above, and the pixel in row M and column L in the upper left corner, where M and L are both positive integers, for example, both M and L are 4. The matching block of the current block can be represented by a block vector pointing from the current block to the matching block, and the similarity between the template of the current block and the template of the matching block is represented by the magnitude of the template error value, where a smaller template error value indicates a higher degree of similarity. For example, the template error value can be calculated using the Sum of Absolute Difference (SAD), where a smaller SAD indicates a more similar template.

[0095] The encoder uses the flag bit cu_tmp_flag to indicate whether to use IntraTMP mode for the current encoded block. If so, the decoder performs the same template matching process and obtains the same predicted block, and in IntraTMP mode, there is no need to encode extra block vector information in the bitstream.

[0096] It should be understood that the term “block vector” as used in this application may also be referred to as “block vector” or any other similar description.

[0097] (2) IntraTMP adaptation technology for camera-captured content Figure 7 shows an example of the IntraTMP adaptation technology for camera capture content according to this application.

[0098] As shown in Figure 7(a), the IntraTMP adaptive technology for camera capture content proposes performing template matching with a step size S (i.e., every S points in the horizontal and vertical directions, where S>1) based on the conventional IntraTMP mode. For example, instead of searching for matching blocks point by point in the search area using a raster scan, the search is performed every S points in the horizontal and vertical directions of the search area. For example, if the block vector currently being template-matched is (X0,Y0), the next block vector to be template-matched horizontally is (X0+S,Y0), and the vertical coordinate of the next block vector to be template-matched vertically is Y0+S. After template matching is completed, as shown in Figure 7(b), refinement is performed on the optimal matching block within a certain range (i.e., template matching is performed with a smaller step size S'), for example, by refining the matching block vector using a method that performs template matching with a smaller step size, thereby optimizing the matching result. This technology effectively reduces the complexity of the IntraTMP mode while maintaining good encoding efficiency.

[0099] (3) Multiple candidate technologies for IntraTMP The IntraTMP multiple candidate technique obtains N candidate matching blocks within the reference region through a template matching process; in other words, it constructs a candidate block list of length N, where the candidate blocks in the list can be sorted according to the magnitude of the template error value with the current block. A candidate block is selected from the list by index to become the final predicted block. For a coded block using the IntraTMP multiple candidate technique, the decoder decodes the true IntraTMP flag bit intra_tmp_flag, then decodes intra_tmp_idx, where the intra_tmp_idx syntactic element can represent the index of the selected candidate block.

[0100] The process by which the decoder decodes syntactic elements is as follows:

[0101] intra_tmp_flag if(intra_tmp_flag) { intra_tmp_idx } So, how should we construct the candidate blocklist (intraTmpCandList)? One example is as follows:

[0102] In intraTMP, each time a Block Value (BV) is found, the template cost for that BV is calculated. The template cost is generally the cost of template matching for a block of the same size as the current block, determined by the current block's template and the current BV. This cost can be SAD, SATD, SSE, etc. IntraTMP can sort the explored blocks, i.e., the explored BVs, in ascending order according to these costs, with the first N candidates being the N candidates in intraTmpCandList. Alternatively, computational complexity can be saved by keeping only the first N candidates with the minimum cost and directly discarding any candidates exceeding N after sorting.

[0103] Typically, blocks corresponding to adjacent BVs are relatively close together, and especially when BVs support sub-pixel accuracies such as 1 / 2, 1 / 4, 1 / 8, and 1 / 16 precision, sorting solely according to the cost in the template without any control can easily lead to multiple candidates concentrating in a very narrow range. Therefore, some control is needed here to avoid excessive concentration of candidate BVs in intraTmpCandList.

[0104] One method is as follows:

[0105] The search process does not sequentially search all possible BVs. For example, the usual search order is from left to right and from top to bottom. Generally, sequential search is possible for BVs with integer pixels. For example, if the currently searched BV is (x0, y0), assuming that the search range boundary is not exceeded, the next search would be (x0+1, y0). However, a sparse search may be performed first. For example, in the case of an integer pixel BV, if the currently searched BV is (x0, y0), assuming that the search range boundary is not exceeded, the next search would be (x0+4, y0). That is, template matching is performed every certain number of pixels, or in other words, every certain step size. The step size here can be a predetermined value, such as 2, 4, or 8. Of course, the same process can be performed in the vertical direction. First, the N BVs with the minimum cost are found. Next, based on the N BVs with the minimum cost, improvements are made within a narrow range starting from each BV. For example, if the search interval is 4 pixels, the improvement range here can be set to 4x4, and the improved BV can be sorted again among the N candidates in place of the original BV. In this way, we can obtain N BV candidates that are a certain distance apart.

[0106] For example, if N is set to 3, improvements can be made according to the following method.

[0107] In the first step The first search is performed with a fixed step size, for example, with both the horizontal and vertical step sizes set to K. N optimal matching blocks (the first N blocks with the smallest template error value) are obtained at regular intervals.

[0108] In the second step A second search is performed in the adjacent regions of the N matching blocks obtained in the first step. These adjacent regions can be set as multiple non-overlapping regions based on the step size in the first step. From these regions, M optimal matching blocks (which may include the matching blocks obtained in the first step) are obtained.

[0109] If sub-pixel precision is supported, subsequent steps can continue to refine to the sub-pixel BV. For example, based on the integer pixel BV selected in the second step, it is possible to search for half a pixel within a 1-pixel range in all directions (up, down, left, and right).

[0110] It should be noted that the candidate list is constructed on both the encoding and decoding sides, thereby ensuring that the candidate list obtained on the encoding side matches the candidate list obtained on the decoding side.

[0111] Figure 8 shows an example of the principle for constructing a candidate blocklist according to this application.

[0112] As shown in Figure 8(a), in the first step, a first search is performed with a predetermined step size, and the upper left corner of the searched block is shown as a gray dot. As shown in Figure 8(b), three sorted BVs are found, and the upper left corner of the corresponding block is shown as a black dot. Here, the horizontal step size is 4, and the vertical step size is 4. In the second step, a second search is performed based on the three sorted BVs, with a search range of 4x4. The BV with the minimum cost within each 4x4 BV is found and re-participates in the sorting of intraTmpCandList in place of the original BV. Of course, if the BV with the minimum cost is still the original BV, it is not necessary to sort again.

[0113] Since intraTmpCandList is sorted, statistically, candidates closer to the beginning have a higher probability of being selected. Therefore, the encoding of intra_tmp_idx can be set to variable-length coding or truncated unary coding. For example, the variable-length coding scheme is shown in Table 1 below.

[0114] [Table 1]

[0115] Of course, if the probabilities are roughly the same, fixed-length coding or truncated binary can be used.

[0116] When N is relatively large, the probability of the first candidate is high, and the probability decreases as you move towards the end, and the probabilities tend to get closer as you move towards the end. Therefore, the first codeword should be short, and the later codewords should be long, and some of the later candidates can use the same code length. For example, an encoder can perform encoding using the method shown in Table 2.

[0117] [Table 2]

[0118] As shown in Table 2, assuming N is 15, the same length codewords are used for indices 3-6 and for indices 7-14, and x in the above table can be obtained using a truncated binary.

[0119] (4) IntraTMP Fusion Prediction Technology Intra-template matching allows us to obtain template error values ​​between the reconstructed block and the current encoded block at different locations. These reconstructed blocks can be represented by block vectors pointing from the current encoded block to the reconstructed block. In the template matching process, a candidate block vector information list is constructed to record block vectors with smaller template error values. Based on conditions such as the spacing between block vectors and the template error value, one or more block vectors are selected from the candidate block vector information list, and the reconstructed block they point to is set as the matching block for the current encoded block. A weight value is determined for each matching block, and these matching blocks are weighted and fused based on their weight values ​​to obtain the final predicted block, thereby realizing IntraTMP coupled fusion prediction.

[0120] The number of matching blocks to be merged may be a fixed number, or it may be determined based on the relative magnitudes of the template error values ​​of each matching block. For example, for N available matching blocks, a threshold Threshold = minSAD << 1 may be set, where minSAD is the minimum value among the template error values ​​of these matching blocks. Only matching blocks whose template error values ​​are less than or equal to this threshold will be used in the merging process. This method allows for the determination of the matching blocks to be used for merging.

[0121] After determining the matching blocks to be used for fusion, the weights of each matching block can be determined using methods such as a method using predetermined fixed values, a method calculated based on template error values, and a method based on template derivation.

[0122] Figure 9 shows an example of the principle of the IntraTMP fusion prediction technology described in this application.

[0123] As shown in Figure 9, assuming that the number of matching blocks used for fusion is 3, the matching blocks used for fusion include matching block 1, matching block 2, and matching block 3. If we assume that the weight of matching block 1 is W1, the weight of matching block 2 is W2, and the weight of matching block 3 is W3, then the predicted block of the current block could be W1 × matching block 1 + W2 × matching block 2 + W3 × matching block 3.

[0124] (5) Regarding IntraTMP filtering technology The matching block (also called the reference block) obtained through intra-template matching is used directly as the prediction block for the current block. Furthermore, the prediction effect can be improved by applying filtering to the prediction block. Block-level flag bits can be used to indicate whether the current block applies the filtering process to the prediction block.

[0125] There are multiple possible filter formats, and one possible filter format is as follows:

[0126] PredC = c0C + c1N + c2S + c3E + c4W + c5B Here, the filter performs filtering using a cross shape consisting of the pixel to be filtered and one adjacent pixel to its upper, lower, left, and right.

[0127] Specifically, as shown in Figure 10, C is the pixel to be filtered, N is the pixel above it, S is the pixel below it, W is the pixel to its left, and E is the pixel to its right. B (bias) is a fixed value; for example, B is the midpoint of the pixel range. That is, if the pixel value is 10 bits and the maximum value is 1023, B is set to 512. c0 to c5 are the filter coefficients.

[0128] Furthermore, one method for determining the filter coefficients is to train the filter coefficients using the template of the reference block and the template of the current block.

[0129] Figure 11 shows an example of the principle for determining the filter coefficient according to this application.

[0130] As shown in Figure 11, the template area is the reconstruction area consisting of the top four rows and left four columns of the current block. For a referenced block, an additional row of space above, below, to the left, and to the right of the template area is also required as a reference. If part of the additional space is not encoded, it can be copied from the template area.

[0131] Furthermore, one method for training the filter coefficients is to calculate a set of coefficients such that the mean square error (MSE) between the filtered reference block template and the current block template is minimized.

[0132] Currently, when a block uses intraTMP filtering, filtering is performed on the predicted block obtained directly based on the reference block. One method is to sequentially filter each pixel from left to right and top to bottom, and the filtered value is taken as the predicted value.

[0133] Note that the intraTMP multiple candidate method uses a template to screen a large number of possible BVs into a few promising candidates, and then an encoder selects one candidate to determine whether it is the reference block or predicted block of the current block. Due to the correlation between the current block and the template, the template can effectively remove most irrational BVs, while the encoder can make a more accurate decision than the decoder because it has access to the original pixel values ​​of the current block. In this way, better compression efficiency can be achieved by utilizing the cooperation between the encoder and decoder. IntraTMP filtering can be trained using a template, and improvements can be made based on the inherent prediction values ​​of intraTMP.

[0134] (6) IntraTMP fusion technology using template derivation IntraTMP fusion prediction can obtain multiple reference blocks through an intra-template matching process and perform weighted fusion on these reference blocks. Weight values ​​are typically calculated using predefined fixed values ​​or based on the template error of each reference block. The IntraTMP fusion method using template derivation obtains the weights for fusion prediction by training a similar filter coefficient training method based on the template of each reference block and the template of the current block. For example, weighted fusion using five reference blocks is performed in the following format:

[0135]

number

[0136] Furthermore, another way to determine the weights is to calculate a set of coefficients such that the MSE between the template of the merged reference block and the template of the current block is minimized.

[0137] (7) Template-Based Intra-Mode Derivation (TIMD) Technology In TIMD technology, a partially reconstructed pixel in an L-shape adjacent to the current encoded block is used as a template. Specifically, the encoding side traverses the most probable mode (MPM) list, calculates the predicted pixels of the template region in different intra-prediction modes, and obtains a template error value between the predicted pixels and reconstructed pixels in yet another intra-prediction mode. For example, since this template error value can be expressed as a sum of absolute transformed differences (SATD), the encoding side can select the optimal intra-prediction mode based on the template error value. On the decoding side, the intra-prediction mode is obtained using the same derivation method, thus reducing the number of encoded bits for mode information.

[0138] (8) About the Inter-Intra Prediction (CIIP) mode The CIIP mode combines intra-prediction and inter-prediction, and obtains the predicted block for the current encoded block by combining the intra-prediction block and the inter-prediction block through weighting. In the Enhanced Compression Model (ECM), the CIIP mode is combined with template-based prediction techniques, and the accuracy of predictions is further improved by simultaneously assigning different weight values ​​to different regions. Specifically, the intra-prediction block pred_intra is obtained by the TIMD mode, and the inter-prediction block pred_inter is obtained by the template-based Merge mode. On the encoding side, the weight values ​​wIntra and wInter are determined based on the derived intra-prediction mode and the position of the pixel awaiting prediction. The final predicted block Pred is calculated as follows.

[0139] Pred=(wIntra×pred_intra+wInter×pred_inter+4)>>3 Here, Pred represents the prediction block of the current block, pred_intra represents the intra prediction block, wIntra represents the weight value of the intra prediction block, wInter represents the inter prediction block, and pred_inter represents the weight value of the inter prediction block.

[0140] wIntra and wInter are determined based on the intra prediction mode intra_dir derived by TIMD. The ECM has 65 intra angle prediction modes (2 ≤ intra_dir ≤ 66), where 2 ≤ intra_dir < 34 divides the current coded block vertically into four equal parts, and 34 ≤ intra_dir ≤ 66 divides the current coded block horizontally into four equal parts. For example, the weight values ​​wIntra and wInter for each region can be determined by referring to Table 3.

[0141] [Table 3]

[0142] As shown in Table 3, different region indexes correspond to different wIntra and different wInter values. That is, when the region index is 0, wIntra is 6 and wInter is 2; when the region index is 1, wIntra is 5 and wInter is 3; when the region index is 2, wIntra is 3 and wInter is 5; and when the region index is 3, wIntra is 2 and wInter is 6.

[0143] Figure 12 shows an example of the current block area division method according to this application.

[0144] As shown in Figure 12(a), when the current coding block is divided vertically into four equal parts, the region indices are 0, 1, 2, and 3 respectively, in order from left to right. As shown in Figure 12(b), when the current coding block is divided horizontally into four equal parts, the region indices are 0, 1, 2, and 3 respectively, in order from top to bottom.

[0145] If intra_dir is equal to 0 or 1, wIntra and wInter can be determined in other ways. For example, if intra_dir is equal to 0 or 1, the area is not divided into sub-regions, and wIntra and wInter are selected from (3,1), (2,2), and (1,3) based on the encoding type (intra or inter) of the two encoding blocks located on the left and above. For example, if the encoding type of both of these encoding blocks is intra encoding, the encoding side determines (wIntra,wInter) as (3,1). If the encoding type of one of these two encoding blocks is intra encoding and the encoding type of the other is inter encoding, (wIntra,wInter) is determined as (2,2). If the encoding type of both of these encoding blocks is inter encoding, (wIntra,wInter) is determined as (3,1).

[0146] (9) About Intra Block Copy (IBC) mode IBC mode is an intra-prediction technique that obtains predicted pixels based on block matching. Similar to inter-prediction, it achieves prediction using block vectors that point from the current block to a reference block, but differs in that the reference block in inter-prediction is from an encoded reconstructed frame, whereas the reference block in IBC is from a reconstructed portion of the current frame. The block vector information needs to be transmitted via a bitstream, just like in inter-prediction.

[0147] IBC modes can be subdivided into IBC Advanced Motion Vector Prediction (AMVP) mode and IBC merge mode.

[0148] In this mode, IBC-AMVP obtains a predicted block vector from a constructed list of candidate block vector information, obtains the reference block of the current block and the corresponding final block vector through processes such as hash search and exhaustive search, encodes the final block vector based on the predicted block vector, and improves encoding efficiency by encoding based on the residual between the predicted block vector and the final block vector, for example. In IBC-Merge mode, prediction is made using a constructed list of candidate block vector information, and the optimal block vector in the list is selected as the final block vector through encoding processes such as SATD and RDO, the reconstructed block pointed to by it is used as the reference block, prediction is made, and the encoder improves encoding efficiency by encoding the index of the block vector in the list rather than the block vector itself.

[0149] The candidate block vector information list can be composed of encoding information such as the block vectors of adjacent encoded blocks, past block vectors, and average block vectors.

[0150] (10) IBC's MV prediction technology based on past data The historical IBC MV prediction technique maintains a historical block vector information list of maximum length N, recording the block vectors of encoded IBC blocks. When an encoded block is encoded using IBC mode, the historical block vector information list is updated. If the current block vector already exists in the historical block vector information list, it is moved to the end of the list. Otherwise, it is first determined whether the historical block vector information list is full. If it is full, the block vector at the top of the list is taken. Then, that block vector is added to the end of the historical block vector information list.

[0151] This past block vector information list can be used to construct the IBC's Merge list.

[0152] As can be seen from the above, the historical IBC MV prediction technique can store the block vectors of encoded IBC blocks and use them to construct a subsequent IBC encoded block Merge list, enriching the IBC block vector candidates and thereby improving encoding efficiency. Furthermore, the IntraTMP technique can obtain block vectors and perform predictions by an intra-template matching method, eliminating the need to encode the block vectors. In other words, the prediction process of the IntraTMP technique is similar to that of the IBC technique, which obtains reference blocks from the reconstructed portion of the current frame based on the block vectors. In light of this, this application combines these two techniques so that the block vectors of IntraTMP encoded blocks can be stored in the IBC historical block vector information list, enriching the IBC block vector candidates and thereby improving encoding efficiency.

[0153] Figure 13 is an illustrative flowchart of the decoding method 400 according to this application. It should be understood that the decoding method 400 can be performed by a decoder. For example, the decoding method 400 can be performed by the video decoder 122 shown in Figure 1, or the video decoder 300 shown in Figure 4. For the sake of explanation, the decoder will be used as an example below. Specifically, the decoding method 400 can be applied to the intra prediction portion of the video decoder, for example, to the IntraTMP portion of the intra prediction.

[0154] As shown in Figure 13, the decoding method 400 may include some or all of the following:

[0155] In step S410, block vector information to be used for the current block is determined based on a first prediction mode that is different from intrablock copy (IBC).

[0156] Exemplary, the first prediction mode may be an intra-prediction mode.

[0157] Exemplary, the first prediction mode may be any prediction mode that can obtain block vector information of the current block.

[0158] In step S420, the first past block vector information is determined based on the block vector information used for the current block.

[0159] For example, the decoder can determine the block vector information to be used directly for the current block as the first past block vector information, or the decoder can determine a portion of the information in the block vector information to be used for the current block as the first past block vector information, or the decoder can determine the result of a calculation performed based on the block vector information to be used for the current block as the first past block vector information.

[0160] In step S430, the first past block vector information list is updated based on the first past block vector information.

[0161] Here, the first past block vector information list is used to determine the candidate block vector information list to be used for the IBC block, and the IBC block is a block that is decoded using the IBC mode after the current block.

[0162] Exemplary, the first past block vector information list is used to determine the candidate block vector information list to use for an IBC block in IBC Advanced Motion Vector Prediction (AMVP) mode, in other words, the IBC block is a block that is decoded using the IBC AMVP mode after the current block. Alternatively, the first past block vector information list is used to determine the candidate block vector information list to use for an IBC block in IBC merge mode, in other words, the IBC block may be a block that is decoded using the IBC merge mode after the current block.

[0163] For example, when the decoder decodes the IBC block, it constructs the candidate block vector information list based on the first past block vector information list, and then decodes the IBC block based on the candidate block vector information list.

[0164] When using IBC-AMVP mode for the aforementioned IBC block, the encoder can construct a candidate block vector information list in the same manner as the decoder. Subsequently, through processes such as hash search and exhaustive search, the encoder obtains the reference block of the IBC block and the corresponding final block vector. Then, it encodes the final block vector based on a certain predicted block vector in the candidate block vector information list, and improves encoding efficiency by encoding, for example, the residual between the certain predicted block vector and the final block vector. Furthermore, the encoder can provide the decoder with a predicted block vector index, which is used in the candidate block vector information list to indicate the predicted block vector used to encode the final block vector. In response, the decoder can determine the predicted block vector index by decoding the bitstream, and based on the predicted block vector index, determine the predicted block vector to be used for the IBC block in the candidate block vector information. Subsequently, the decoder can obtain the final block vector of the IBC block based on the predicted block vector to be used for the IBC block and the block vector residual determined by decoding the bitstream. Furthermore, based on the final block vector of the IBC block, the decoder can determine the reference block of the IBC block, thereby determining the predicted block of the IBC block based on the reference block of the IBC block.

[0165] When using IBC-Merge mode for the aforementioned IBC block, the encoder can construct a candidate block vector information list in the same manner as the decoder, and then, through an encoding process such as SATD or RDO, select the optimal block vector from the candidate block vector information list as the final block vector. The encoder can then encode the index of the final block vector in the candidate block vector information list, thereby improving encoding efficiency. Correspondingly, the decoder determines the index of the final block vector in the candidate block vector information list by decoding the bitstream, and further determines the reference block of the IBC block based on the final block vector indicated by the index. Thus, the decoder can determine the predicted block of the IBC block based on the reference block of the IBC block.

[0166] In this embodiment, the decoder updates a first past block vector information list used to determine a candidate block vector information list based on a first prediction mode different from the IBC mode. Since the candidate block vector information list is used for IBC blocks that will be decoded using the IBC mode after the current block, the decoder updates the first past block vector information list using the first prediction mode. This is equivalent to the decoder enriching the candidate block vector information of the IBC block using the first prediction mode, which improves the decoding performance of the IBC block when the decoder decodes the IBC block and improves the decoding performance of the decoder.

[0167] It should be noted that if the decoder directly determines the block vector information to be used for the current block as the first past block vector information, the decoder may not perform or may skip this step, i.e., the decoder may directly update the list of first past block vector information based on the block vector information of the current block, and this application is not specifically limited thereto.

[0168] In this embodiment, the decoding performance of the decoder can be improved by enriching the IBC block vector candidates using the encoding information of the IntraTMP block.

[0169] The beneficial effects of the solution provided in this application will be described below, based on the test results.

[0170] Here, Table 4 shows the test results after integrating the decoding method of this application into the latest ECM9.0.

[0171] [Table 4]

[0172] As shown in Table 4, Class F and Class TGM are sequence clusters dedicated to screen content encoding. In the table, Y represents luminance (Luma), U represents blue chromaticity, and V represents red chromaticity. If the corresponding numerical value is negative, it represents the performance gain. EncT represents the change in encoding complexity, and DecT represents the change in decoding complexity. Simulation results show that the decoding method according to this application can improve decoding performance, and the gain effect is particularly pronounced on TGM.

[0173] In some embodiments, the first prediction mode includes an Intra Template Matching Prediction (IntraTMP) mode.

[0174] For example, the IntraTMP mode is: This may be a mode that uses one of the following technologies for camera capture content: IntraTMP adaptive technology, IntraTMP multiple candidate technology, IntraTMP fusion prediction technology, IntraTMP filtering technology, and IntraTMP fusion technology by template derivation.

[0175] In some embodiments, step S420 is performed This may include determining the block vectors in the first past block vector information based on at least one block vector in the block vector information used for the current block and the number of the at least one block vectors.

[0176] Exemplary, the decoder may determine the at least one block vector as the block vector in the first past block vector information based on the number of the at least one block vector, or select some of the block vectors from the at least one block vector as the block vector in the first past block vector information, or calculate the at least one block vector and determine the resulting block vector as the block vector in the first past block vector information.

[0177] In some embodiments, if the number of the at least one block vector is less than or equal to a first predetermined value, the at least one block vector is determined to be the block vector in the first past block vector information.

[0178] For example, the first predetermined numerical value may be realized by pre-storing a corresponding code, table, or other method for indicating related information in the decoder, or the first predetermined numerical value may be specified or defined by a standard protocol.

[0179] For example, the first predetermined numerical value can be any positive integer.

[0180] For example, taking the case where the first predetermined value is equal to 1, if the number of the at least one block vector is 1 or less, the decoder determines the at least one block vector as the block vector in the first past block vector information. In other words, the decoder can directly determine the at least one block vector as the block vector in the first past block vector information only when the number of the at least one block vector is 1. Alternatively, if the prediction process is performed using one block vector for the current block, the decoder can directly determine the one block vector as the block vector in the first past block vector information.

[0181] In another example, taking the case where the first predetermined value is equal to 2, if the number of at least one block vectors is 2 or less, the decoder determines the at least one block vector as the block vector in the first past block vector information. In other words, the decoder can directly determine the at least one block vector as the block vector in the first past block vector information only when the number of at least one block vectors is 1 or 2. Alternatively, if the prediction process is performed using two block vectors for the current block, the decoder can directly determine the two block vectors as the block vectors in the first past block vector information.

[0182] It should be noted that this embodiment is intended to illustrate that a decoder can determine the at least one block vector as the block vector in the first past block vector information if the number of the at least one block vector satisfies certain conditions. The fact that the number of the at least one block vector is less than or equal to a first predetermined numerical value is merely an example of the certain conditions and should not be understood as a limitation on this application. For example, in other alternative embodiments, if the number of the at least one block vector is within a predetermined numerical range, the decoder determines the at least one block vector as the block vector in the first past block vector information. Here, the predetermined numerical range may be a set of numbers formed by a plurality of predetermined numerical values, or it may be a predetermined numerical interval. The predetermined numerical range may be realized by the decoder pre-storing a corresponding code, table, or other method for indicating related information, or the predetermined numerical range may be specified or defined by a standard protocol.

[0183] In some embodiments, if the number of at least one block vector is greater than a second predetermined value, The weighted average value of the at least one block vector is determined as the block vector in the first past block vector information. To determine one or more block vectors from among the at least one block vectors that have the smallest template error value as the block vector in the first past block vector information, The block vector in the first past block vector information is determined by either of the following: determining one or more block vectors from among the at least one block vectors that have the smallest error value of the reference block as the block vector in the first past block vector information.

[0184] For example, the second predetermined numerical value may be realized by pre-storing a corresponding code, table, or other method for indicating related information in the decoder, or the second predetermined numerical value may be specified or defined by a standard protocol.

[0185] For example, the second predetermined numerical value can be any positive integer.

[0186] For example, if the number of the at least one block vector is greater than 1, taking the second predetermined value as equal to 1, the decoder determines the block vector in the first past block vector information by determining the weighted average value of the at least one block vector as the block vector in the first past block vector information; determining one or more block vectors among the at least one block vectors that have the smallest template error value as the block vector in the first past block vector information; or determining one or more block vectors among the at least one block vectors that have the smallest reference block error value as the block vector in the first past block vector information. Alternatively, when using a multi-block vector-based reference block weighted fusion prediction for the current block, the block vector in the first past block vector information is determined by one of the following: determining the weighted average of at least one block vector as the block vector in the first past block vector information; determining one or more block vectors among the at least one block vectors that have the smallest template error value as the block vector in the first past block vector information; or determining one or more block vectors among the at least one block vectors that have the smallest reference block error value as the block vector in the first past block vector information.

[0187] In another example, taking the case that the second predetermined value is equal to 2, if the number of the at least one block vector is greater than 2, the block vector in the first past block vector information is determined according to one of the following: determining the weighted average value of the at least one block vector as the block vector in the first past block vector information; determining one or more block vectors among the at least one block vectors that have the smallest template error value as the block vector in the first past block vector information; or determining one or more block vectors among the at least one block vectors that have the smallest reference block error value as the block vector in the first past block vector information.

[0188] For example, if the number of the at least one block vector is greater than a second predetermined value, the decoder determines the weighted average of the at least one block vector as the block vector in the first past block vector information. For example, the decoder can perform a weighted average calculation on the at least one block vector based on its weight to obtain the weighted average of the at least one block vector. Here, the weight of the at least one block vector may be the weight used to predict the current block based on the at least one reference block corresponding to the at least one block vector; in other words, the weight of the at least one block vector may be the weight used to weight the at least one reference block corresponding to the at least one block vector. The weight of the at least one block vector may be a predefined weight. The predefined weight may be implemented by the decoder pre-storing a code, table or other way of indicating the corresponding information, or the predefined weight may be specified or defined by a standard protocol. It should be understood that the weights of the block vectors in the at least one block vector may be the same or different. For example, if all the block vectors in the at least one block vector have the same weight, the weighted mean of the at least one block vector is the mean of the at least one block vector.

[0189] For example, if the number of the at least one block vector is greater than a second predetermined value, the decoder determines one or more block vectors from among the at least one block vectors that have the smallest template error value as the block vector in the first past block vector information. Here, the template error value of the block vector in the at least one block vector is the similarity between the template region of the current block and the template region of the block vector, for example, SAD. For example, the decoder can determine one block vector from among the at least one block vectors that has the smallest template error value as the block vector in the first past block vector information. In another example, the decoder can determine two block vectors from among the at least one block vectors that have the smallest template error values ​​as the block vectors in the first past block vector information.

[0190] For example, if the number of the at least one block vector is greater than a second predetermined value, the decoder determines one or more block vectors from the at least one block vector that have the smallest error value of the reference block as the block vector in the first past block vector information. Since the at least one block vector corresponds to at least one reference block and the current block is a block that has already been encoded and decoded, the error value of the reference block may be the similarity between the reference block and the reconstructed block of the current block, for example, SAD. For example, the decoder may determine one block vector from the at least one block vector that has the smallest error value as the block vector in the first past block vector information. In another example, the decoder may determine two block vectors from the at least one block vector that have the smallest error values ​​as the block vectors in the first past block vector information.

[0191] It should be noted that this embodiment is intended to illustrate that, if the number of the at least one block vector satisfies certain conditions, the decoder can determine some of the block vectors among the at least one block vectors, or a block vector obtained by performing calculations on the at least one block vector, as the block vector in the first past block vector information. The fact that the number of the at least one block vector is greater than a second predetermined numerical value is merely an example of the certain conditions and should not be understood as a limitation on this application. For example, in other alternative embodiments, if the number of the at least one block vector is not within a predetermined numerical range, the decoder can determine some of the block vectors among the at least one block vector, or a block vector obtained by performing calculations on the at least one block vector, as the block vector in the first past block vector information. Here, the predetermined numerical range may be a set of numbers formed by a plurality of predetermined numerical values, or it may be a predetermined numerical interval. The predetermined numerical range may be realized by the decoder pre-storing a corresponding code, table, or other method for indicating related information, or the predetermined numerical range may be specified or defined by a standard protocol.

[0192] Furthermore, this application is not limited to specific uses of the block vectors included in the first past block vector information.

[0193] For example, if the first past block vector information includes one block vector, the decoder can use the one block vector to perform a unidirectional IBC prediction for the IBC block.

[0194] In another example, if the first past block vector information includes two block vectors, the decoder can use the two block vectors to perform a bidirectional IBC prediction for the IBC block. For example, if the first past block vector information includes two block vectors, the decoder can determine the IBC geometric partitioning mode (GPM) prediction block for the IBC block based on two reference blocks corresponding to the two block vectors.

[0195] In some embodiments, step S420 is performed When using a sub-pixel interpolation prediction method for the current block, it may include determining the first block vector in the block vector information used for the current block as the block vector in the first past block vector information, or determining the second block vector obtained by adjusting the first block vector based on the adjustment amount of the first block vector as the block vector in the first past block vector information.

[0196] For example, if the block vector information used for the current block includes only the first block vector and a sub-pixel interpolation prediction method is used for the current block, the decoder determines the first block vector or the second block vector as the block vector in the first past block vector information. Alternatively, if a first block vector-based sub-pixel interpolation prediction method is used for the current block, the decoder determines the first block vector or the second block vector as the block vector in the first past block vector information.

[0197] Exemplary, the precision of the first block vector may be integer pixel precision or sub-pixel precision. The sub-pixel precision may also be called sub-pixel precision. For example, the sub-pixel precision may be 1 / 2 pixel, 1 / 3 pixel, or 1 / 4 pixel precision. If the precision of the first block vector is integer pixel precision, the reference block pointed to by the first block vector is a block containing integer pixels found based on the first block vector. If the precision of the first block vector is sub-pixel precision, the reference block corresponding to the first block vector is a block containing sub-pixels found based on the first block vector. Therefore, the precision of the first block vector may also be called the precision of the reference block of the first block vector.

[0198] For example, the sub-pixel interpolation prediction method may be understood as a sub-pixel accuracy prediction method similar to inter.

[0199] For example, the sub-pixel interpolation prediction method may refer to a prediction method that determines the sub-pixel block after sub-pixel interpolation as a prediction block.

[0200] Exemplary, the adjustment amount of the first block vector may include the offset direction and / or offset amount of the first block vector.

[0201] For example, the decoder can determine the offset direction and / or offset amount of the first block vector by decoding the bitstream.

[0202] For example, the decoder can obtain an interpolated image by performing sub-pixel interpolation on the current block image in which the current block is located, and then search for a reference block from the interpolated image based on the first block vector. For example, if the precision of the first block vector is integer pixel precision, the decoder can obtain a sub-pixel block by adjusting the integer pixel block pointed to by the first block vector based on the offset direction and offset amount of the first block vector, and determine the obtained sub-pixel block as the predicted block for the current block. For example, the decoder can obtain a sub-pixel block by shifting the integer pixel block pointed to by the first block vector to the right by 1 / 2 pixels. If the precision of the first block vector is sub-pixel precision, the decoder can directly determine the sub-pixel block pointed to by the first block vector as the predicted block for the current block.

[0203] In some embodiments, if the accuracy of the first block vector is equal to the accuracy of the sub-pixel interpolation, the first block vector is determined to be the block vector in the first past block vector information.

[0204] Exemplary, when the precision of the first block vector is equal to the precision of the sub-pixel interpolation, the precision of the reference block pointed to by the first block vector matches the precision of the predicted block; that is, the reference block pointed to by the first block vector can be directly used as the predicted block of the current block; in other words, the precision of the first block vector is sub-pixel precision, and the predicted block of the current block is directly obtained based on a block vector of sub-pixel precision. In this case, when the decoder predicts the current block, the decoder can directly determine the sub-pixel block pointed to by the first block vector as the predicted block of the current block, and correspondingly, the decoder can directly determine the first block vector as the block vector in the first past block vector information.

[0205] In some embodiments, if the accuracy of the first block vector is greater than the accuracy of the sub-pixel interpolation, the second block vector is determined to be the block vector in the first past block vector information.

[0206] For example, the precision of the first block vector is integer pixel precision.

[0207] Exemplary, if the precision of the first block vector is greater than the precision of the sub-pixel interpolation, the precision of the reference block pointed to by the first block vector and the precision of the predicted block do not match; that is, the reference block pointed to by the first block vector cannot be directly used as the predicted block of the current block, or in other words, the predicted block of the current block cannot be directly obtained based on a sub-pixel precision block vector. For example, if the precision of the first block vector is integer pixel precision, the decoder adjusts the integer pixel block pointed to by the first block vector based on the offset direction and offset amount of the first block vector to obtain a sub-pixel block, and determines the obtained sub-pixel block as the predicted block of the current block. For example, the decoder obtains a sub-pixel block by shifting the integer pixel block pointed to by the first block vector to the right by 1 / 2 pixel. The decoder can determine the offset direction and offset amount of the first block vector by decoding the bitstream. In this embodiment, the decoder can adjust the first block vector based on the offset direction and offset amount to obtain a second block vector, and then determine the second block vector as the block vector in the first past block vector information.

[0208] In some embodiments, step S420 is performed If the first past block vector information includes a third block vector, the accuracy of the third block vector may be determined as the accuracy of the block vector information used for the current block, corresponding to one or more block vectors used to determine the third block vector, and the first past block vector information includes the accuracy of the third block vector.

[0209] For example, if the precision of one or more block vectors is the same, the precision of one or more block vectors is determined as the precision of the third block vector.

[0210] For example, if the third block vector is the first block vector in the block vector information used for the current block, the decoder can determine the precision of the first block vector as the precision of the third block vector. If the third block vector is a block vector obtained by weighting and averaging multiple block vectors in the block vector information used by the decoder for the current block, the decoder can determine the precision of the multiple block vectors as the precision of the third block vector. If the third block vector is a second block vector obtained by adjusting based on the first block vector in the block vector information used for the current block, the decoder can determine the precision of the second block vector as the precision of the third block vector.

[0211] In some embodiments, step S420 is performed The block vector information used for the current block includes, The coordinate information of the current block, A flag indicating whether or not to perform lighting compensation for the predicted block of the current block, A flag indicating whether or not to perform filtering on the predicted block of the current block, A flag indicating whether or not to reverse the reference block of the current block. A flag indicating whether the prediction mode used for the current block is the IBC mode, A flag indicating whether the prediction mode to be used for the current block is the first prediction mode, An index indicating the prediction mode to be used for the current block, This may include determining at least one of the indices indicating the weights of a plurality of reference blocks used for the current block as information in the first past block vector information.

[0212] For example, the coordinate information of the current block is: This includes coordinate information for at least one of the following: the upper left corner, lower left corner, upper right corner, lower right corner, and center point of the current block.

[0213] For example, a flag indicating whether or not to perform lighting compensation for the predicted block of the current block is: It may include a flag indicating whether or not to perform local illumination compensation (LIC) on the predicted block of the current block.

[0214] Exemplary, the index indicating the prediction mode to be used for the current block may include at least one of the following: an index indicating the first prediction mode to be used for the current block; an index indicating a submode belonging to the first prediction mode to be used for the current block; and an index indicating the IBC mode to be used for the current block. The submode may be a mode that uses one of the following for camera capture content: IntraTMP adaptive technology, IntraTMP multiple candidate technology, IntraTMP fusion prediction technology, IntraTMP filtering technology, and IntraTMP fusion technology by template derivation.

[0215] It should be noted that determining the information in the block vector information that the decoder directly uses for the current block as the information in the first past block vector information may be understood as the decoder reusing the information in the block vector information that the decoder uses for the current block, or as any other description with a similar meaning, and this application does not specifically limit this.

[0216] In some embodiments, step S420 is performed Decrypting the bitstream and determining the first flag, If the first flag indicates that the first past block vector information list should be updated based on the first prediction mode, this may include determining the first past block vector information based on the block vector information to be used for the current block.

[0217] Exemplary, the decoder decodes the bitstream to determine the first flag, and if the first flag indicates that the first past block vector information list should be updated based on the first prediction mode, the decoder determines the first past block vector information based on the block vector information to be used for the current block, and then updates the first past block vector information list based on the first past block vector information. Otherwise, the decoder does not update the first past block vector information list using the first prediction mode.

[0218] Exemplary, if the value of the first flag is a first numerical value, the first past block vector information list is updated based on the first prediction mode; if the value of the first flag is a second numerical value, the first past block vector information list is not updated based on the first prediction mode. Here, the first numerical value is 1 and the second numerical value is 0, or the first numerical value is 0 and the second numerical value is 1. If the first flag does not exist in the bitstream acquired by the decoder, the value of the first flag can be set to default to the first numerical value, or the value of the first flag can be set to default to the second numerical value.

[0219] Exemplary, when the first flag is activated or enabled, the first past block vector information list is updated based on the first prediction mode; when the first flag is deactivated or disabled, the first past block vector information list is not updated based on the first prediction mode. If the first flag is not present in the bitstream acquired by the decoder, the first flag may be set to be activated or enabled by default, or to be set to be deactivated or disabled by default.

[0220] Exemplary, the first flag may be a sequence-level flag. For example, the first flag indicates whether the current sequence to which the current block belongs is permitted to update the first past block vector information list based on the first prediction mode. The decoder can determine the first flag by decoding the Sequence Parameter Set (SPS) in the bitstream. Alternatively, the first flag may be contained within the SPS in the bitstream.

[0221] Exemplary, the first flag may be an image-level flag. For example, the first flag indicates whether the current image to which the current block belongs allows the first past block vector information list to be updated based on the first prediction mode. The decoder can determine the first flag by decoding the image header information in the bitstream. Alternatively, the first flag may be included within the image header information in the bitstream.

[0222] Exemplary, the first flag may be a slice-level flag. For example, the first flag indicates whether the current slice to which the current block belongs is allowed to update the first past block vector information list based on the first prediction mode. The decoder can obtain the current slice by dividing the current image. The decoder can determine the first flag by decoding the slice-level information in the bitstream. Alternatively, the first flag may be included within the slice-level information in the bitstream.

[0223] Exemplary, the first flag may be an image block-level flag. For example, the first flag indicates whether the current block is allowed to update the first past block vector information list based on the first prediction mode. The decoder can determine the first flag by decoding the block-level information of the current block in the bitstream. Alternatively, the first flag may be included within the block-level information of the current block in the bitstream.

[0224] It should be noted that if the first flag is a sequence-level flag, the decoder may further decode the bitstream to determine at least one of an image-level flag, a slice-level flag, and an image-block-level flag. For example, taking the case where the decoder further decodes the bitstream to determine an image-level flag and an image-block-level flag, if the first flag indicates that the current sequence to which the current block belongs allows updating the first past block vector information list based on the first prediction mode, the decoder decodes the bitstream to determine the image-level flag; if the image-level flag indicates that the current image to which the current block belongs allows updating the first past block vector information list based on the first prediction mode, the decoder decodes the bitstream to determine the image-block-level flag, where the image-block-level flag is used to indicate whether the current block allows updating the first past block vector information list based on the first prediction mode. Of course, the sequence-level flag, the image-level flag, or the image-block-level flag are selectable identifiers and this application does not specifically limit them.

[0225] In some embodiments, step S420 is performed If the number of block vectors in the block vector information used for the current block is less than or equal to a third predetermined value, the first past block vector information may be determined based on the block vector information used for the current block.

[0226] For example, the third predetermined numerical value may be realized by pre-storing a corresponding code, table, or other method for indicating related information in the decoder, or the third predetermined numerical value may be specified or defined by a standard protocol.

[0227] For example, the third predetermined numerical value may be any positive integer.

[0228] For example, the third predetermined value may be greater than the first predetermined value described above. In another example, the third predetermined value may be greater than or equal to the second predetermined value described above.

[0229] In some embodiments, step S420 is performed The area of ​​the current block is equal to or greater than the first threshold. The current block width is greater than or equal to the second threshold. The current block height is equal to or greater than the third threshold. The type of the current image to which the aforementioned current block belongs is of a predetermined type. If at least one of the following conditions is met, the first past block vector information is determined based on the block vector information used for the current block.

[0230] For example, the area of ​​the current block is obtained by multiplying the width of the current block by the height of the current block.

[0231] For example, the width of the current block refers to the number of pixels that the current block contains in the width direction.

[0232] For example, the height of the current block refers to the number of pixels that the current block contains in the height direction.

[0233] For example, if the area of ​​the current block is greater than or equal to a predetermined first threshold, the decoder determines the first past block vector information based on the block vector information used for the current block. In other words, only if the area of ​​the current block is greater than or equal to a predetermined first threshold, the decoder updates the first past block vector information list based on the first past block vector information.

[0234] For example, if the width of the current block is greater than or equal to the second threshold and the height of the current block is greater than or equal to the third threshold, the decoder determines the first past block vector information based on the block vector information used for the current block. In other words, only if the width of the current block is greater than or equal to the second threshold and the height of the current block is greater than or equal to the third threshold, the decoder updates the first past block vector information list based on the first past block vector information.

[0235] For example, if the type of the current image to which the current block belongs is a predetermined type, the decoder determines the first past block vector information based on the block vector information used for the current block. The predetermined type may be an I-frame, a B-frame, or a P-frame. In other words, the decoder updates the first past block vector information list based on the first past block vector information only if the type of the current image to which the current block belongs is a predetermined type. For example, the use of the decoding method according to this application may be restricted based on the type of image, for instance, allowing the decoder to use the decoding method according to this application only if the type of the current image is an I-frame, and not allowing the decoder to use the decoding method according to this application if the type of the current image is a B-frame or a P-frame.

[0236] For example, the first threshold, the second threshold, the third threshold, or the predetermined type may be a predetermined numerical value, which may be implemented by pre-storing in the decoder a corresponding code, table, or other method for indicating related information, or which may be specified or defined by a standard protocol.

[0237] It should be noted that this embodiment is intended to illustrate that the decoder can determine the first past block vector information based on the block vector information used for the current block if certain conditions can be met; in other words, the decoder updates the first past block vector information list based on the first past block vector information only if certain conditions can be met. The above conditions are merely examples of such conditions and should not be understood as limitations on this application. For example, in other alternative embodiments, if at least one of the following is met: the area of ​​the current block is less than or equal to a fourth threshold; the width of the current block is less than or equal to a fifth threshold; the height of the current block is less than or equal to a sixth threshold; or the area of ​​the current block is within a predetermined numerical range, the decoder determines the first past block vector information based on the block vector information used for the current block, or the decoder updates the first past block vector information list based on the first past block vector information. Here, the predetermined numerical range may be a set of numbers formed by a plurality of predetermined numerical values, or the predetermined numerical range may be a predetermined numerical interval. The fourth to sixth thresholds, or the predetermined numerical range, may be implemented in the decoder by pre-storing a corresponding code, table, or other method for indicating related information, or they may be specified or defined by a standard protocol.

[0238] In some embodiments, step S430 is performed If the first past block vector information list includes the first past block vector information, the procedure may include moving the first past block vector information to the end of the first past block vector information list.

[0239] For example, the end of the first past block vector information list is the last position in the first past block vector information list.

[0240] For example, when the decoder determines the candidate block vector information list based on the first past block vector information list, it may select past block vector information from the first past block vector information list as candidate vector information in the candidate vector information list in a backward-to-forward order. For instance, when the decoder determines the candidate block vector information list based on the first past block vector information list, and selects past block vector information from the first past block vector information list as candidate vector information in the candidate vector information list in a backward-to-forward order, if the first past block vector information list contains the first past block vector information, the decoder moves the first past block vector information to the end of the first past block vector information list.

[0241] Exemplary, the past block vector information in the first past block vector information list is updated according to a first-in, first-out mechanism, that is, the first past block vector information added is deleted first. Here, the past block vector information located at the beginning of the first past block vector information list is the first past block vector information added, and it is also the past block vector information that is deleted first when the first past block vector information list is updated, and the past block vector information located at the end of the first past block vector information list is the most recently added past block vector information. In this case, the decoder moves the first past block vector information to the end of the first past block vector information list, which is equivalent to the decoder adjusting the first past block vector information to the most recently added past block vector information.

[0242] For example, if the first past block vector information list contains the same block vector information as the first past block vector information, then the first past block vector information list contains the first past block vector information. The determination of whether or not the block vector information is the same can be achieved in the following manner.

[0243] If the number of block vectors present in two sets of block vector information differs, they are determined to be different.

[0244] If the number of block vectors in two pieces of block vector information is the same, it is determined whether or not different block vectors exist. If different block vectors exist, they are not the same; otherwise, they are determined to be the same piece of block vector information.

[0245] Of course, in other alternative embodiments, it is possible to determine whether or not the block vector information is the same in other ways, and this application is not specifically limited to such methods.

[0246] For example, if the illumination compensation flag bit, filtering flag bit, or inversion flag bit in the block vector information are different, it is determined that they are not the same.

[0247] It should be noted that this embodiment is intended to illustrate that, if the first past block vector information list contains the first past block vector information, the decoder adjusts the first past block vector information to the most recently added past block vector information. Therefore, in other alternative embodiments, the past block vector information located at the end of the first past block vector information list is the first past block vector information to be added, and it is also the first past block vector information to be deleted when updating the first past block vector information list, and if the first past block vector information list contains the first past block vector information, the decoder may move the first past block vector information to the beginning of the first past block vector information list, and this application is not specifically limited thereto.

[0248] In some embodiments, step S430 is performed If the number of past block vector information entries in the first past block vector information list is less than a fourth predetermined value, the first past block vector information is added to the first past block vector information list; otherwise, the past block vector information at the beginning of the first past block vector information list is taken out and added to the end of the first past block vector information list.

[0249] For example, the fourth predetermined numerical value may be realized by pre-storing a corresponding code, table, or other method for indicating related information in the decoder, or the fourth predetermined numerical value may be specified or defined by a standard protocol.

[0250] For example, the fourth predetermined numerical value can be any positive integer.

[0251] Exemplarily, assuming that the fourth predetermined value is N, when the number of past block vector information in the first past block vector information list is smaller than N, the decoder adds the first past block vector information to the first past block vector information list. Otherwise, the decoder extracts the past block vector information arranged at the head of the first past block vector information list and adds the first past block vector information to the end of the first past block vector information list.

[0252] Exemplarily, the fourth predetermined value may also be referred to as the length or the maximum length of the first past block vector information list. In other words, when the number of past block vector information in the first past block vector information list is smaller than the fourth predetermined value, it means that the first past block vector information list is not full. In this case, the decoder can directly add the first past block vector information to the first past block vector information list. When the number of past block vector information in the first past block vector information list is equal to the fourth predetermined value, it means that the first past block vector information list is full. In this case, the decoder first extracts the past block vector information arranged at the head of the first past block vector information list and then needs to add the first past block vector information to the end of the first past block vector information list.

[0253] In some embodiments, the first past block vector information list is a common past block vector information list for the first prediction mode and the IBC mode.

[0254] Exemplarily, the first past block vector information list is a past block vector information list that is commonly maintained for the first prediction mode and the IBC mode. In other words, the decoder can update the first past block vector information list based on the first prediction mode and the IBC mode.

[0255] In some embodiments, when the first past block vector information list is used to determine the candidate block vector information list, the priority of the second past block vector information belonging to the first prediction mode in the first past block vector information list is lower than the priority of the third past block vector information belonging to the IBC mode in the first past block vector information list.

[0256] Exemplarily, when the decoder determines the candidate block vector information list based on the first past block vector information list, the priority of the second past block vector information belonging to the first prediction mode in the first past block vector information list is lower than the priority of the third past block vector information belonging to the IBC mode in the first past block vector information list. In other words, when the decoder determines the candidate block vector information list based on the first past block vector information list, the third past block vector information in the first past block vector information list is preferentially used as the candidate block vector information in the candidate block vector information list. In other words, when the decoder determines the candidate block vector information list based on the first past block vector information list, the third past block vector information in the first past block vector information list is preferentially added to the candidate block vector information list.

[0257] Exemplarily, the decoder determines the prediction mode to which the past vector information 1 belongs by the information included in the past block vector information 1 in the first past block vector information list, that is, at least one of index 1 indicating the prediction mode used by the past vector information 1, index 2 indicating whether the past vector information 1 uses the first prediction mode, and index 3 indicating whether the past vector information 1 uses the IBC mode or other information.

[0258] For example, if index 1 indicates the first prediction mode, the past vector information 1 belongs to the first prediction mode, and if index 1 indicates the IBC mode, the past vector information 1 belongs to the IBC mode. In another example, if index 2 indicates the use of the first prediction mode, the past vector information 1 belongs to the first prediction mode, and if index 2 indicates that the first prediction mode is not used, the past vector information 1 belongs to the IBC mode. In another example, if index 3 indicates the use of the IBC mode, the past vector information 1 belongs to the IBC mode, and if index 1 indicates that the IBC mode is not used, the past vector information 1 belongs to the first prediction mode.

[0259] It should be noted that this embodiment is intended to illustrate that past block vector information belonging to different prediction modes in the first past block vector information list can be added to the candidate block vector information list using different selection policies. The priority is merely an example of a selection policy and should not be understood as a limitation on this application. For example, in other alternative embodiments, the selection method for second past block vector information belonging to the first prediction mode in the first past block vector information list may differ from the selection method for third past block vector information belonging to the IBC mode in the first past block vector information list. For example, when the decoder determines the candidate block vector information list based on the first past block vector information list, the number of second past block vector information belonging to the first prediction mode in the first past block vector information list is smaller than the number of third past block vector information belonging to the IBC mode in the first past block vector information list.

[0260] In this embodiment, the decoder only needs to maintain one common past block vector information list for the first prediction mode and the IBC mode. This reduces the complexity of maintaining the past block vector information list for the decoder and further improves the decoder's decoding efficiency and decoding performance.

[0261] In some embodiments, the first past block vector information list is the past block vector information list for the first prediction mode, and both the first past block vector information list and the second past block vector information list for the IBC mode are used to determine the candidate block vector information list.

[0262] Exemplary, the decoder maintains the first past block vector information list for the first prediction mode and the second past block vector information list for the IBC mode. In other words, the decoder updates the first past block vector information list based on the first prediction mode and the second past block vector information list based on the IBC mode. In other words, for the first prediction mode and the IBC mode, the decoder needs to maintain their respective past block vector information lists.

[0263] In some embodiments, the priority given to the first past block vector information list for determining the candidate block vector information list is lower than the priority given to the second past block vector information list for determining the candidate block vector information list.

[0264] For example, when the decoder determines the candidate block vector information list based on the first past block vector information list and the second past block vector information list, the priority of the first past block vector information list is lower than the priority of the second past block vector information list. In other words, when the decoder determines the candidate block vector information list based on the first past block vector information list and the second past block vector information list, the past block vector information in the second past block vector information list is preferentially used as candidate block vector information in the candidate block vector information list. Alternatively, when the decoder determines the candidate block vector information list based on the first past block vector information list and the second past block vector information list, the past block vector information in the second past block vector information list is preferentially added to the candidate block vector information list.

[0265] It should be noted that this embodiment is intended to illustrate that past block vector information in each table can be added to the candidate block vector information list using different selection policies for the first past block vector information list and the second past block vector information list. The priority is merely an example of a selection policy and should not be understood as a limitation on this application. For example, in other alternative embodiments, the method of selecting past block vector information in the first past block vector information list may differ from the method of selecting past block vector information in the second past block vector information list. For example, when the decoder determines the candidate block vector information list based on the first past block vector information list and the second past block vector information list, the number of past block vector information selected from the first past block vector information list may be less than the number of past block vector information selected from the second past block vector information list.

[0266] In this embodiment, the decoder maintains different past block vector information lists for the first prediction mode and the IBC mode, thereby enriching the information used to construct the candidate block vector information list and improving the decoder's decoding performance.

[0267] In some embodiments, the current image to which the current block belongs includes a plurality of regions after division, the plurality of regions include the location region of the current block, and the first past block vector information list is a past block vector information list corresponding to the location region.

[0268] Exemplary, the multiple regions correspond to multiple past block vector information lists. The multiple past block vector information lists are past block vector information lists for the IBC mode, or past block vector information lists for the first prediction mode, or past block vector information lists are common past block vector information lists for the IBC mode and the first prediction mode.

[0269] For example, if the current frame is a Gradual Decoder Refresh (GDR) frame, the current image to which the current block belongs includes multiple regions after division, where the regions include the location region of the current block, and the first past block vector information list is a past block vector information list corresponding to the location region. For example, the decoder can divide the current image into two regions based on the division boundary, a clean area and a dirty area, where only intra-prediction can be used for image blocks in the clean area, and no information including reconstructed pixels, MV, coding mode, reference list, etc., in the dirty area can be used. In other words, the decoder can maintain two past block vector information lists corresponding to the two regions for the current image, where the first past block vector information list is a past block vector information list corresponding to the location region of the current block. In other words, the decoder can update the past block vector information list corresponding to the location region of the current block based on the first past block vector information, based on the position of the current block. For example, if the current block is located within a clean region, the decoder can update the list of past block vector information corresponding to the clean region based on the first past block vector information; otherwise, the decoder updates the list of past block vector information corresponding to the dirty region based on the first past vector information.

[0270] The decoding method according to this application will be described below in combination with examples.

[0271] In Example 1 In this embodiment, assuming that the first prediction mode described above is the IntraTMP mode, the current block described above is an IntraTMP decoded block. That is, the method of saving information such as the block vector of the IntraTMP decoded block to the IBC past block vector list utilizes information such as the block vector of the IntraTMP decoded block to enrich the IBC block vector candidates, thereby improving the decoding efficiency.

[0272] Specifically, the decoding method includes the following steps:

[0273] In Step 1 The IntraTMP decryption block completes the decryption and checks the block vector that needs to be saved.

[0274] For example, if the prediction process for the IntraTMP decoding block is completed using a single block vector, that block vector can be saved directly. In another example, if sub-pixel interpolation prediction based on a single integer pixel precision block vector is used for the IntraTMP decoding block, that integer pixel precision block vector can be adjusted based on the type of sub-pixel interpolation before being saved. In yet another example, if reference block weighted fusion prediction based on multiple block vectors is used for the IntraTMP decoding block, the block vector with the smallest template error value among these block vectors can be saved.

[0275] In Step 2 Determine the information related to the block vector that needs to be saved.

[0276] For example, the coordinates of the current decoding block, such as the center point coordinates of the current block, can be saved. In another example, the accuracy of the block vector determined in step 1 can be saved. In another example, it can be saved whether to use a LIC method or a filtering method etc. for the current decoding block. In another example, it can be saved whether to invert the reference block for the current decoding block. In another example, a flag bit indicating whether the block vector determined in step 1 belongs to IBC can be introduced. In another example, the bidirectional weighting weight index of the current block can be saved.

[0277] Here, the block vector determined in step 1 and the information related to the block vector determined in step 2 can constitute block vector information.

[0278] In step 3 The decoder can determine whether to save the block vector information (that is, including the block vector determined in step 1 and the information related to the block vector determined in step 2) in the IBC past block vector list based on conditions. For example, it can be saved in the IBC past block vector list only when the size of the current block is less than or equal to WxH.

[0279] In step 4 When the conditions are met, save the block vector information in the IBC past block vector list. If the block vector information already exists in the past block vector list, move the block vector information in the list to the end. Otherwise, first determine whether the IBC past block vector list is full. If it is full, take out the block vector information at the head of the list, and then add the block vector information to the end of the IBC past block vector list to complete the update of the IBC past block vector list.

[0280] In step 5 If the current frame is a GDR frame, the current image is divided into a clean area and a dirty area based on the division boundary. The decoder maintains two IBC past block vector lists. Block vector information can be stored in different lists based on the position of the current block in the current image. For example, if the current block is located within the clean area, the block vector information is stored in IBC past block vector list 1; otherwise, the block vector information is stored in IBC past block vector list 2.

[0281] In step 6 The IBC decoded block constructs a candidate block vector list and uses the block vector information from the IBC past block vector list as a candidate to predict the IBC decoded block.

[0282] It should be understood that Example 1 is merely one example of this application and should not be understood as limiting this application. For example, in other alternative embodiments, Example 1 may be adaptively modified, adjusted, or replaced according to one or more of the following alternatives to form new embodiments.

[0283] Regarding alternative solution 1 In step 1, when using a reference block weighted fusion prediction based on multiple block vectors for an IntraTMP decoded block, the average value of these block vectors can be stored.

[0284] Regarding alternative plan 2 In Step 1, when using reference block weighted fusion prediction based on multiple block vectors for an IntraTMP decoded block, the two block vectors with the smallest template error values ​​among these block vectors can be saved. These two block vectors can be used for bidirectional IBC prediction, i.e., they may be an IBC-GPM prediction block consisting of two IBC reference blocks.

[0285] Regarding alternative solution 3 In Step 1, when using reference block weighted fusion prediction based on multiple block vectors for an IntraTMP decoded block, the optimal block vector can be selected and saved based on the current reconstructed block. For example, the error between the reference block corresponding to each block vector and the current reconstructed block can be calculated, and this error can be calculated by SAD. The block vector with the smallest error is saved as the optimal block vector.

[0286] Regarding alternative solution 4 In step 2, a flag bit can be introduced to indicate whether the block vector determined in step 1 belongs to IntraTMP. When constructing a candidate block vector list or adding past block vector candidates to an IBC decoded block, different processing can be performed for block vectors belonging to different decoding methods. For example, first, all block vectors belonging to IBC mode in the IBC past block vector list can be added, and then block vectors belonging to IntraTMP mode can be added.

[0287] Regarding alternative solution 5 The criteria for determination in step 3 may be that the current width of the block is less than W and the height is less than H, or other conditions relating to width or height.

[0288] Regarding alternative solution 6 The system can be modified to construct an IntraTMP past block vector list, distinct from the IBC past block vector list, and the block vector information of IntraTMP decoded blocks can be stored in the IntraTMP past block vector list.

[0289] Regarding alternative solution 7 The decision criteria in step 3 may include determining whether or not to save block vector information based on the current prediction method for the IntraTMP decoded block. For example, if a reference block weighted fusion prediction based on multiple block vectors is used for the IntraTMP decoded block, the block vector information is not saved to the past block vector list.

[0290] Regarding alternative solution 8 In step 3, the decision criteria are based on sequence-level, frame-level, slice-level, or image block flag bits, which are used to indicate whether or not to allow updating the IBC past block vector list based on IntraTMP mode.

[0291] In the following section, with reference to Figure 14, the encoding method according to the embodiment of this application will be described from the perspective of the encoder.

[0292] Figure 14 is an illustrative flowchart of the encoding method 500 according to this application.

[0293] It should be understood that the encoding method 500 can be performed by an encoder. For example, the encoding method 500 can be performed by the video encoder 112 shown in Figure 1, or the video encoder 200 shown in Figure 2.

[0294] As shown in Figure 14, the encoding method 500 may include the following steps.

[0295] In step S510, block vector information to be used for the current block is determined based on a first prediction mode that is different from the intrablock copy (IBC) mode.

[0296] In step S520, the first past block vector information is determined based on the block vector information used for the current block.

[0297] In step S530, the first past block vector information list is updated based on the first past block vector information.

[0298] Here, the first past block vector information list is used to determine the candidate block vector information list to be used for the IBC block, and the IBC block is a block that is encoded using the IBC mode after the current block.

[0299] In some embodiments, the first prediction mode includes an intra-template matching prediction (IntraTMP) mode.

[0300] In some embodiments, step S520 is performed This may include determining the block vectors in the first past block vector information based on at least one block vector in the block vector information used for the current block and the number of the at least one block vectors.

[0301] In some embodiments, if the number of the at least one block vector is less than or equal to a first predetermined value, the at least one block vector is determined to be the block vector in the first past block vector information.

[0302] In some embodiments, if the number of at least one block vector is greater than a second predetermined value, The weighted average value of the at least one block vector is determined as the block vector in the first past block vector information. To determine one or more block vectors from among the at least one block vectors that have the smallest template error value as the block vector in the first past block vector information, The block vector in the first past block vector information is determined by either of the following: determining one or more block vectors from among the at least one block vectors that have the smallest error value of the reference block as the block vector in the first past block vector information.

[0303] In some embodiments, step S520 is performed When using a sub-pixel interpolation prediction method for the current block, it may include determining the first block vector in the block vector information used for the current block as the block vector in the first past block vector information, or determining the second block vector obtained by adjusting the first block vector based on the adjustment amount of the first block vector as the block vector in the first past block vector information.

[0304] In some embodiments, if the accuracy of the first block vector is equal to the accuracy of the sub-pixel interpolation, the first block vector is determined to be the block vector in the first past block vector information.

[0305] In some embodiments, if the accuracy of the first block vector is greater than the accuracy of the sub-pixel interpolation, the second block vector is determined to be the block vector in the first past block vector information.

[0306] In some embodiments, step S520 is performed If the first past block vector information includes a third block vector, the accuracy of the third block vector may be determined as the accuracy of the block vector information used for the current block, corresponding to one or more block vectors used to determine the third block vector, and the first past block vector information includes the accuracy of the third block vector.

[0307] In some embodiments, step S520 is performed The block vector information used for the current block includes, The coordinate information of the current block, A flag indicating whether or not to perform lighting compensation for the predicted block of the current block, A flag indicating whether or not to perform filtering on the predicted block of the current block, A flag indicating whether or not to reverse the reference block of the current block. A flag indicating whether the prediction mode used for the current block is the IBC mode, A flag indicating whether the prediction mode to be used for the current block is the first prediction mode, An index indicating the prediction mode to be used for the current block, This may include determining at least one of the indices indicating the weights of a plurality of reference blocks used for the current block as information in the first past block vector information.

[0308] In some embodiments, the 500 method is This may further include encoding the first flag, Here, the first flag is used to indicate that the first past block vector information list is updated based on the first prediction mode.

[0309] In some embodiments, step S520 is performed If the number of block vectors in the block vector information used for the current block is less than or equal to a third predetermined value, the first past block vector information may be determined based on the block vector information used for the current block.

[0310] In some embodiments, step S520 is performed The area of ​​the current block is equal to or greater than the first threshold. The current block width is greater than or equal to the second threshold. The current block height is equal to or greater than the third threshold. The type of the current image to which the aforementioned current block belongs is of a predetermined type. If at least one of the following conditions is met, the first past block vector information is determined based on the block vector information used for the current block.

[0311] In some embodiments, step S530 is performed If the first past block vector information list includes the first past block vector information, the procedure may include moving the first past block vector information to the end of the first past block vector information list.

[0312] In some embodiments, step S530 is performed If the number of past block vector information entries in the first past block vector information list is less than a fourth predetermined value, the first past block vector information is added to the first past block vector information list; otherwise, the past block vector information at the beginning of the first past block vector information list is taken out and added to the end of the first past block vector information list.

[0313] In some embodiments, the first past block vector information list is a common past block vector information list for the first prediction mode and the IBC mode.

[0314] In some embodiments, when the first past block vector information list is used to determine the candidate block vector information list, the priority of the second past block vector information belonging to the first prediction mode in the first past block vector information list is lower than the priority of the third past block vector information belonging to the IBC mode in the first past block vector information list.

[0315] In some embodiments, the first past block vector information list is the past block vector information list for the first prediction mode, and both the first past block vector information list and the second past block vector information list for the IBC mode are used to determine the candidate block vector information list.

[0316] In some embodiments, the priority given to the first past block vector information list for determining the candidate block vector information list is lower than the priority given to the second past block vector information list for determining the candidate block vector information list.

[0317] In some embodiments, the current image to which the current block belongs includes a plurality of regions after division, the plurality of regions include the location region of the current block, and the first past block vector information list is a past block vector information list corresponding to the location region.

[0318] Since the encoding method can be understood as the reverse process of the decoding method, specific technical proposals for the encoding method 500 can be found by referring to the relevant content of the decoding method 400, and for the sake of clarity, they will not be explained again in this application.

[0319] The encoding method according to this application will be described below in combination with the examples.

[0320] In Example 1 In this embodiment, assuming that the first prediction mode described above is the IntraTMP mode, the current block described above is an IntraTMP encoded block. That is, the method of saving information such as the block vector of an IntraTMP encoded block to the IBC past block vector list utilizes information such as the block vector of an IntraTMP encoded block to enrich the IBC block vector candidates, thereby improving encoding efficiency.

[0321] Specifically, the encoding method includes the following steps:

[0322] In Step 1 The IntraTMP coding block completes the coding and checks the block vector that needs to be saved.

[0323] For example, if the IntraTMP coded block completes the prediction process using a single block vector, that block vector can be saved directly. In another example, if the IntraTMP coded block uses sub-pixel interpolation prediction based on a single integer pixel precision block vector, that integer pixel precision block vector can be adjusted based on the type of sub-pixel interpolation before being saved. In yet another example, if the IntraTMP coded block uses reference block weighted fusion prediction based on multiple block vectors, the block vector with the smallest template error value among these block vectors can be saved.

[0324] In Step 2 Determine the information related to the block vector that needs to be saved.

[0325] For example, the coordinates of the current coded block, such as the center point coordinates of the current block, can be stored. In another example, the precision of the block vector determined in step 1 can be stored. In yet another example, whether or not to use an LIC method or a filtering method for the current coded block can be stored. In yet another example, whether or not to invert the reference block for the current coded block can be stored. In yet another example, a flag bit can be introduced indicating whether or not the block vector determined in step 1 belongs to the IBC. In yet another example, the bidirectional weight index of the current block can be stored.

[0326] Here, the block vector determined in step 1 and the information related to the block vector determined in step 2 can be used to construct block vector information.

[0327] In Step 3 The encoder can determine, based on certain conditions, whether or not to save the block vector information (i.e., the block vector determined in step 1 and the information related to the block vector determined in step 2) to the IBC past block vector list. For example, it can save the information to the IBC past block vector list only if the current block size is less than or equal to WxH.

[0328] In step 4 If the conditions are met, the block vector information is saved to the IBC past block vector list. If the block vector information already exists in the past block vector list, it is moved to the end of the list. Otherwise, it is first determined whether the IBC past block vector list is full. If it is full, the block vector information at the top of the list is retrieved, and then the block vector information is added to the end of the IBC past block vector list, completing the update of the IBC past block vector list.

[0329] In Step 5 If the current frame is a GDR frame, the current image is divided into a clean area and a dirty area based on the division boundary. The encoder maintains two IBC past block vector lists. Block vector information can be stored in different lists based on the position of the current block in the current image. For example, if the current block is located within the clean area, the block vector information is stored in IBC past block vector list 1; otherwise, the block vector information is stored in IBC past block vector list 2.

[0330] In step 6 The IBC coding block constructs a candidate block vector list, uses the block vector information from the IBC historical block vector list as a candidate, and completes the IBC coding block prediction.

[0331] It should be understood that Example 2 is merely one example of this application and should not be understood as limiting this application. For example, in other alternative embodiments, Example 1 may be adaptively modified, adjusted, or replaced according to one or more of the following alternatives to form a new embodiment.

[0332] Regarding alternative solution 1 In step 1, when using a reference block weighted fusion prediction based on multiple block vectors for an IntraTMP encoded block, the average value of these block vectors can be stored.

[0333] Regarding alternative plan 2 In Step 1, when using reference block weighted fusion prediction based on multiple block vectors for an IntraTMP coded block, the two block vectors with the smallest template error values ​​among these block vectors can be saved. These two block vectors can be used for bidirectional IBC prediction, i.e., they may be an IBC-GPM prediction block consisting of two IBC reference blocks.

[0334] Regarding alternative solution 3 In Step 1, when using reference block weighted fusion prediction based on multiple block vectors for an IntraTMP encoded block, the optimal block vector can be selected and saved based on the current reconstructed block. For example, the error between the reference block corresponding to each block vector and the current reconstructed block can be calculated, and this error can be calculated by SAD. The block vector with the smallest error is saved as the optimal block vector.

[0335] Regarding alternative solution 4 In step 2, a flag bit can be introduced to indicate whether the block vector determined in step 1 belongs to IntraTMP. When constructing a candidate block vector list for an IBC encoded block, or when adding past block vector candidates, different processing can be performed on block vectors belonging to different encoding methods. For example, first, all block vectors belonging to IBC mode in the past IBC block vector list can be added, and then block vectors belonging to IntraTMP mode can be added.

[0336] Regarding alternative solution 5 The criteria for determination in step 3 may be that the current width of the block is less than W and the height is less than H, or other conditions relating to width or height.

[0337] Regarding alternative solution 6 The system can be modified to construct an IntraTMP past block vector list, distinct from the IBC past block vector list, and the block vector information of IntraTMP encoded blocks can be stored in the IntraTMP past block vector list.

[0338] Regarding alternative solution 7 The decision criteria in step 3 may include determining whether or not to save block vector information based on the current prediction method for the IntraTMP coded block. For example, if a reference block weighted fusion prediction based on multiple block vectors is used for the IntraTMP coded block, the block vector information is not saved to the past block vector list.

[0339] Regarding alternative solution 8 In step 3, the decision criteria are based on sequence-level, frame-level, slice-level, or image block flag bits, which are used to indicate whether or not to allow updating the IBC past block vector list based on IntraTMP mode.

[0340] The above describes in detail embodiments of the method of this application, and below, embodiments of the apparatus of this application will be described with reference to Figures 15 to 17.

[0341] Figure 15 is an exemplary block diagram of the decoder 600 according to this application.

[0342] As shown in Figure 15, the decoder 600 is A first decision unit 610 is configured to determine the block vector information to be used for the current block based on a first prediction mode that is different from the intrablock copy (IBC) mode. A second determination unit 620 is configured to determine first past block vector information based on the block vector information used for the current block, The system may include an update unit 630 configured to update the first past block vector information list based on the first past block vector information, Here, the first past block vector information list is used to determine the candidate block vector information list to be used for the IBC block, and the IBC block is a block that is decoded using the IBC mode after the current block.

[0343] In some embodiments, the first prediction mode includes an intra-template matching prediction (IntraTMP) mode.

[0344] In some embodiments, the second decision unit 620 specifically is: The system is configured to determine the block vector in the first past block vector information based on at least one block vector in the block vector information used for the current block and the number of the at least one block vector.

[0345] In some embodiments, the second decision unit 620 specifically is: If the number of the at least one block vector is less than or equal to a first predetermined value, the at least one block vector is configured to be determined as the block vector in the first past block vector information.

[0346] In some embodiments, the second decision unit 620 specifically is: If the number of the at least one block vector is greater than a second predetermined value, The weighted average value of the at least one block vector is determined as the block vector in the first past block vector information. To determine one or more block vectors from among the at least one block vectors that have the smallest template error value as the block vector in the first past block vector information, The system is configured to determine the block vector in the first past block vector information by either of the following: determining one or more block vectors from among the at least one block vectors that have the smallest error value of the reference block as the block vector in the first past block vector information.

[0347] In some embodiments, the second decision unit 620 specifically is: When a sub-pixel interpolation prediction method is used for the current block, the first block vector in the block vector information used for the current block is determined as the block vector in the first past block vector information, or the second block vector obtained by adjusting the first block vector based on the adjustment amount of the first block vector is determined as the block vector in the first past block vector information.

[0348] In some embodiments, the second decision unit 620 specifically is: If the precision of the first block vector is equal to the precision of the sub-pixel interpolation, the first block vector is configured to be determined as the block vector in the first past block vector information.

[0349] In some embodiments, the second decision unit 620 specifically is: If the precision of the first block vector is greater than the precision of the sub-pixel interpolation, the second block vector is configured to be determined as the block vector in the first past block vector information. In some embodiments, the second decision unit 620 specifically is: If the first past block vector information includes a third block vector, the system is configured to determine the precision of the third block vector as the precision of one or more block vectors used to determine the third block vector in the block vector information used for the current block, and the first past block vector information includes the precision of the third block vector.

[0350] In some embodiments, the second decision unit 620 specifically is: The block vector information used for the current block includes, The coordinate information of the current block, A flag indicating whether or not to perform lighting compensation for the predicted block of the current block, A flag indicating whether or not to perform filtering on the predicted block of the current block, A flag indicating whether or not to reverse the reference block of the current block. A flag indicating whether the prediction mode used for the current block is the IBC mode, A flag indicating whether the prediction mode to be used for the current block is the first prediction mode, An index indicating the prediction mode to be used for the current block, The system is configured to determine, as information in the first past block vector information, at least one of the indices indicating the weights of a plurality of reference blocks used for the current block.

[0351] In some embodiments, the second decision unit 620 specifically is: The bitstream is decoded to determine the first flag. If the first flag indicates that the first past block vector information list should be updated based on the first prediction mode, the system is configured to determine the first past block vector information based on the block vector information to be used for the current block.

[0352] In some embodiments, the second decision unit 620 specifically is: If the number of block vectors in the block vector information used for the current block is less than or equal to a third predetermined value, the system is configured to determine the first past block vector information based on the block vector information used for the current block.

[0353] In some embodiments, the second decision unit 620 specifically is: The area of ​​the current block is equal to or greater than the first threshold. The current block width is greater than or equal to the second threshold. The current block height is equal to or greater than the third threshold. The type of the current image to which the aforementioned current block belongs is of a predetermined type. The system is configured to determine the first past block vector information based on the block vector information used for the current block if at least one of the following conditions is met.

[0354] In some embodiments, the update unit 630 is specifically: If the first past block vector information list contains the first past block vector information, the first past block vector information is configured to be moved to the end of the first past block vector information list.

[0355] In some embodiments, the update unit 630 is specifically: If the number of past block vector information entries in the first past block vector information list is less than a fourth predetermined value, the first past block vector information is added to the first past block vector information list; otherwise, the past block vector information at the beginning of the first past block vector information list is retrieved and added to the end of the first past block vector information list.

[0356] In some embodiments, the first past block vector information list is a common past block vector information list for the first prediction mode and the IBC mode.

[0357] In some embodiments, when the first past block vector information list is used to determine the candidate block vector information list, the priority of the second past block vector information belonging to the first prediction mode in the first past block vector information list is lower than the priority of the third past block vector information belonging to the IBC mode in the first past block vector information list.

[0358] In some embodiments, the first past block vector information list is the past block vector information list for the first prediction mode, and both the first past block vector information list and the second past block vector information list for the IBC mode are used to determine the candidate block vector information list. In some embodiments, the priority given to the first past block vector information list for determining the candidate block vector information list is lower than the priority given to the second past block vector information list for determining the candidate block vector information list.

[0359] In some embodiments, the current image to which the current block belongs includes a plurality of regions after division, the plurality of regions include the location region of the current block, and the first past block vector information list is a past block vector information list corresponding to the location region.

[0360] It should be understood that embodiments of the decoder apparatus can correspond to embodiments of the decoding method, and similar descriptions can refer to embodiments of the method. To avoid repetition, details will not be described again in this specification. Specifically, the decoder 600 shown in Figure 15 can correspond to the entity that performs the decoding method 400 of the embodiments of this application, and each of the aforementioned and other operations and / or functions of the decoder 600 is used to realize the corresponding process in the decoding method 400.

[0361] Figure 16 is an exemplary block diagram of the encoder 700 according to this application.

[0362] As shown in Figure 16, the encoder 700 is A first decision unit 710 is configured to determine the block vector information to be used for the current block based on a first prediction mode that is different from the intrablock copy (IBC) mode. A second determination unit 720 is configured to determine first past block vector information based on the block vector information used for the current block, The system may include an update unit 730 configured to update the first past block vector information list based on the first past block vector information, Here, the first past block vector information list is used to determine the candidate block vector information list to be used for the IBC block, and the IBC block is a block that is encoded using the IBC mode after the current block.

[0363] In some embodiments, the first prediction mode includes an intra-template matching prediction (IntraTMP) mode.

[0364] In some embodiments, the second decision unit 720 specifically is: The system is configured to determine the block vector in the first past block vector information based on at least one block vector in the block vector information used for the current block and the number of the at least one block vector.

[0365] In some embodiments, the second decision unit 720 specifically is: If the number of the at least one block vector is less than or equal to a first predetermined value, the at least one block vector is configured to be determined as the block vector in the first past block vector information.

[0366] In some embodiments, the second decision unit 720 specifically is: If the number of the at least one block vector is greater than a second predetermined value, The weighted average value of the at least one block vector is determined as the block vector in the first past block vector information. To determine one or more block vectors from among the at least one block vectors that have the smallest template error value as the block vector in the first past block vector information, The system is configured to determine the block vector in the first past block vector information by either of the following: determining one or more block vectors from among the at least one block vectors that have the smallest error value of the reference block as the block vector in the first past block vector information.

[0367] In some embodiments, the second decision unit 720 specifically is: When a sub-pixel interpolation prediction method is used for the current block, the first block vector in the block vector information used for the current block is determined as the block vector in the first past block vector information, or the second block vector obtained by adjusting the first block vector based on the adjustment amount of the first block vector is determined as the block vector in the first past block vector information.

[0368] In some embodiments, the second decision unit 720 specifically is: If the precision of the first block vector is equal to the precision of the sub-pixel interpolation, the first block vector is configured to be determined as the block vector in the first past block vector information.

[0369] In some embodiments, the second decision unit 720 specifically is: If the precision of the first block vector is greater than the precision of the sub-pixel interpolation, the second block vector is configured to be determined as the block vector in the first past block vector information.

[0370] In some embodiments, the second decision unit 720 specifically is: If the first past block vector information includes a third block vector, the system is configured to determine the precision of the third block vector as the precision of one or more block vectors used to determine the third block vector in the block vector information used for the current block, and the first past block vector information includes the precision of the third block vector.

[0371] In some embodiments, the second decision unit 720 specifically is: The block vector information used for the current block includes, The coordinate information of the current block, A flag indicating whether or not to perform lighting compensation for the predicted block of the current block, A flag indicating whether or not to perform filtering on the predicted block of the current block, A flag indicating whether or not to reverse the reference block of the current block. A flag indicating whether the prediction mode used for the current block is the IBC mode, A flag indicating whether the prediction mode to be used for the current block is the first prediction mode, An index indicating the prediction mode to be used for the current block, The system is configured to determine, as information in the first past block vector information, at least one of the indices indicating the weights of a plurality of reference blocks used for the current block.

[0372] In some embodiments, the encoder further, A coding unit configured to encode a first flag is provided, Here, the first flag is used to indicate that the first past block vector information list is updated based on the first prediction mode.

[0373] In some embodiments, the second decision unit 720 specifically is: If the number of block vectors in the block vector information used for the current block is less than or equal to a third predetermined value, the system is configured to determine the first past block vector information based on the block vector information used for the current block.

[0374] In some embodiments, the second decision unit 720 specifically is: The area of ​​the current block is equal to or greater than the first threshold. The current block width is greater than or equal to the second threshold. The current block height is equal to or greater than the third threshold. The type of the current image to which the aforementioned current block belongs is of a predetermined type. The system is configured to determine the first past block vector information based on the block vector information used for the current block if at least one of the following conditions is met.

[0375] In some embodiments, the update unit 730 is specifically: If the first past block vector information list contains the first past block vector information, the first past block vector information is configured to be moved to the end of the first past block vector information list.

[0376] In some embodiments, the update unit 730 is specifically: If the number of past block vector information entries in the first past block vector information list is less than a fourth predetermined value, the first past block vector information is added to the first past block vector information list; otherwise, the past block vector information at the beginning of the first past block vector information list is retrieved and added to the end of the first past block vector information list.

[0377] In some embodiments, the first past block vector information list is a common past block vector information list for the first prediction mode and the IBC mode.

[0378] In some embodiments, when the first past block vector information list is used to determine the candidate block vector information list, the priority of the second past block vector information belonging to the first prediction mode in the first past block vector information list is lower than the priority of the third past block vector information belonging to the IBC mode in the first past block vector information list.

[0379] In some embodiments, the first past block vector information list is the past block vector information list for the first prediction mode, and both the first past block vector information list and the second past block vector information list for the IBC mode are used to determine the candidate block vector information list.

[0380] In some embodiments, the priority given to the first past block vector information list for determining the candidate block vector information list is lower than the priority given to the second past block vector information list for determining the candidate block vector information list.

[0381] In some embodiments, the current image to which the current block belongs includes a plurality of regions after division, the plurality of regions include the location region of the current block, and the first past block vector information list is a past block vector information list corresponding to the location region.

[0382] It should be understood that embodiments of the encoder apparatus can correspond to embodiments of the encoding method, and similar descriptions can refer to embodiments of the method. To avoid repetition, details will not be described again in this specification. Specifically, the encoder 700 shown in Figure 16 can correspond to the entity that performs the encoding method 500 of the embodiments of this application, and each of the aforementioned and other operations and / or functions of the encoder 700 is used to realize the corresponding process in the encoding method 500.

[0383] Furthermore, it should be understood that each unit in the decoder 600 or encoder 700 according to the embodiments of this application is divided based on logical function, and in actual application, the function of one unit may be realized by multiple units, or the function of multiple units may be realized by one unit, and furthermore, these functions may be realized in cooperation with one or more other units. For example, some or all of the decoder 600 or encoder 700 may be integrated into one or several other units. In another example, some (several) units in the decoder 600 or encoder 700 may be divided into several functionally smaller units, thus enabling similar operation without affecting the realization of the technical effects of the embodiments of this application. In another example, the decoder 600 or encoder 700 may also include other units, and in actual application, these functions may be realized jointly by other units, or jointly by multiple units.

[0384] According to another embodiment of this application, a decoder 600 or encoder 700 according to this application can be configured in a general-purpose computer including processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), by executing a computer program (program code) capable of performing each step of the corresponding method, thereby realizing the encoding or decoding method of the embodiment of this application. The computer program can be, for example, written on a computer-readable storage medium, loaded onto an electronic device via the computer-readable storage medium, executed therein, and realizing the corresponding method of the embodiment of this application. In other words, the above-mentioned unit may be implemented in hardware form, by software instructions, or by a combination of hardware and software units. Specifically, each step of the embodiment of the method in the embodiment of this application can be performed by hardware-type integrated logic circuits and / or software instructions in a processor, and the steps of the method disclosed in the embodiment of this application may be performed directly by a hardware decoding processor or by a combination of hardware and software in a decoding processor. Optionally, the software can be placed in conventional storage media such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. The storage media is placed in memory, and the processor reads the information in memory and, in combination with its hardware, performs the steps in the embodiment of the method described above.

[0385] Figure 17 is an illustrative structural diagram of the electronic device 800 according to this application. As shown in Figure 17, the electronic device 800 comprises at least a processor 810 and a computer-readable storage medium 820. Here, the processor 810 and the computer-readable storage medium 820 may be connected by a bus or other means. The computer-readable storage medium 820 is configured to store a computer program 821 containing computer instructions, and the processor 810 is configured to execute the computer instructions stored in the computer-readable storage medium 820. The processor 810 is the computing core and control core of the electronic device 800 and is applied to implement one or more computer instructions, specifically, to implement a corresponding method process or corresponding function by loading and executing one or more computer instructions.

[0386] For example, the processor 810 may also be called a Central Processing Unit (CPU). The processor 810 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, transistor logic devices, discrete hardware components, etc.

[0387] Exemplary, the computer-readable storage medium 820 may be high-speed RAM memory, non-volatile memory such as at least one magnetic disk memory, and optionally at least one computer-readable storage medium located away from the processor 810. Specifically, the computer-readable storage medium 820 includes, but is not limited to, volatile memory and / or non-volatile memory. 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 may be random-access memory (RAM) used as an external cache. To give an example that is not a restrictive description, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM).

[0388] Exemplary, the electronic device 800 may be a decoder or decoding framework according to an embodiment of the present application, wherein a second computer instruction is stored in the computer-readable storage medium 820, and the processor 810 loads and executes the second computer instruction stored in the computer-readable storage medium 820 to realize the corresponding step in the decoding method of the present application, in other words, the second computer instruction in the computer-readable storage medium 820 is loaded and executed by the processor 810 to perform the corresponding step, and to avoid repetition, further details are not described herein.

[0389] Exemplary, the electronic device 800 may be an encoder or encoding framework according to an embodiment of the present application, wherein a first computer instruction is stored in the computer-readable storage medium 820, and the processor 810 loads and executes the first computer instruction stored in the computer-readable storage medium 820 to realize the corresponding step in the encoding method of the present application, in other words, the first computer instruction in the computer-readable storage medium 820 is loaded and executed by the processor 810 to perform the corresponding step, and details are not described again herein to avoid repetition.

[0390] According to another aspect of this application, the application further provides an encoding and decoding system including the encoder and decoder described above.

[0391] In another aspect of this application, the application further provides a computer-readable memory medium (Memory) (e.g., computer-readable memory medium 820) which is a storage device in electronic device 800 and is configured to store programs and data. To be understood, the computer-readable memory medium 820 herein may include an internal storage medium in electronic device 800, and of course may also include an extended storage medium supported by electronic device 800. The computer-readable memory medium provides a storage space in which the operating system of electronic device 800 is stored. The storage space also stores one or more computer instructions that are loaded and executed by processor 810, and these computer instructions may be one or more computer programs (including program code).

[0392] In another aspect of this application, the application further provides a computer program product or computer program (e.g., computer program 821) which includes computer instructions stored on a computer-readable storage medium. In this case, the data processing device 800 may be a computer, and the processor 810 reads the computer instructions from the computer-readable storage medium 820, and the processor 810 executes the computer instructions, thereby causing the computer to execute the encoding or decoding method in one of the various selectable methods described above. In short, when implemented using software, it can be fully or partially implemented in the form of a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes of the embodiments of this application are executed, or the functions of the embodiments of this application are realized. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable device. The computer instruction may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instruction may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired connection (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless connection (e.g., infrared, radio, microwave, etc.).

[0393] According to another aspect of this application, the application further provides a bitstream which may be a bitstream that is decoded using the decoding method of this application, or a bitstream that is generated using the encoding method of this application.

[0394] Those skilled in the art will understand that each illustrative unit and process step described with reference to the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. While experts in the art may implement the described functions using different methods for each specific application, such implementations should not be considered beyond the scope of this application.

[0395] Finally, it should be noted that the above describes only specific embodiments of this application, and the scope of protection is not limited thereto. Any modifications or substitutions that a person skilled in the art could easily conceive of within the scope of the technical scope disclosed in this application should be included within the scope of protection. Therefore, the scope of protection of this application shall be subject to the scope of protection of the claims.

Claims

1. A decoding method, Based on a first prediction mode different from the intrablock copy (IBC) mode, the block vector information to be used for the current block is determined, Based on the block vector information used for the current block, the first past block vector information is determined. This includes updating the first past block vector information list based on the first past block vector information, A decoding method characterized in that the first past block vector information list is used to determine a candidate block vector information list to be used for an IBC block, and the IBC block is a block that is decoded using the IBC mode after the current block.

2. The first prediction mode is characterized by including an intra-template matching prediction (IntraTMP) mode. The decoding method according to claim 1.

3. Determining the first past block vector information based on the block vector information used for the current block is: The method is characterized by determining the block vector in the first past block vector information based on at least one block vector in the block vector information used for the current block and the number of the at least one block vector. The decoding method according to claim 1 or 2.

4. Determining the block vector in the first past block vector information based on at least one block vector in the block vector information used for the current block and the number of the at least one block vector is: The method is characterized by including determining the at least one block vector as the block vector in the first past block vector information when the number of the at least one block vector is less than or equal to a first predetermined value. The decoding method according to claim 3.

5. Determining the block vector in the first past block vector information based on at least one block vector in the block vector information used for the current block and the number of the at least one block vector is: If the number of the at least one block vector is greater than the second predetermined value, The weighted average value of the at least one block vector is determined as the block vector in the first past block vector information. To determine one or more of the aforementioned block vectors that have the smallest template error value as the block vector in the first past block vector information, To determine one or more block vectors among the at least one block vectors that have the smallest error value of the reference block as the block vector in the first past block vector information, The method is characterized by determining the block vector in the first past block vector information according to any one of the following: The decoding method according to claim 3.

6. Determining the first past block vector information based on the block vector information used for the current block is: When using a sub-pixel interpolation prediction method for the current block, the method includes determining the first block vector in the block vector information used for the current block as the block vector in the first past block vector information, or determining the second block vector obtained by adjusting the first block vector based on the adjustment amount of the first block vector as the block vector in the first past block vector information. The decoding method according to any one of claims 1 to 5.

7. Determining the first block vector in the block vector information used for the current block as the block vector in the first past block vector information, or determining the second block vector obtained by adjusting the first block vector based on the adjustment amount of the first block vector as the block vector in the first past block vector information, is: The method is characterized by including determining the first block vector as the block vector in the first past block vector information when the accuracy of the first block vector is equal to the accuracy of the sub-pixel interpolation. The decoding method according to claim 6.

8. Determining the first block vector in the block vector information used for the current block as the block vector in the first past block vector information, or determining the second block vector obtained by adjusting the first block vector based on the adjustment amount of the first block vector as the block vector in the first past block vector information, is: The method is characterized by including determining the second block vector as the block vector in the first past block vector information if the accuracy of the first block vector is greater than the accuracy of the sub-pixel interpolation. The decoding method according to claim 6.

9. Determining the first past block vector information based on the block vector information used for the current block is: If the first past block vector information includes a third block vector, the accuracy of the third block vector is determined as the accuracy of the block vector information used for the current block, which corresponds to one or more block vectors used to determine the third block vector, and the first past block vector information includes the accuracy of the third block vector. The decoding method according to any one of claims 1 to 8.

10. Determining the first past block vector information based on the block vector information used for the current block is: The block vector information used for the current block includes, The coordinate information of the current block, A flag indicating whether or not to perform lighting compensation for the predicted block of the current block, A flag indicating whether or not to perform filtering on the predicted block of the current block, A flag indicating whether or not to reverse the reference block of the current block. A flag indicating whether the prediction mode used for the current block is the IBC mode, A flag indicating whether the prediction mode to be used for the current block is the first prediction mode, An index indicating the prediction mode to be used for the current block, An index indicating the weights of multiple reference blocks used for the current block, This is characterized by including determining at least one of the above as information in the first past block vector information, The decoding method according to any one of claims 1 to 9.

11. Determining the first past block vector information based on the block vector information used for the current block is: Decode the bitstream and determine the first flag, If the first flag indicates that the first past block vector information list should be updated based on the first prediction mode, the first past block vector information is determined based on the block vector information to be used for the current block, the method is characterized by including: The decoding method according to any one of claims 1 to 10.

12. Determining the first past block vector information based on the block vector information used for the current block is: The method is characterized by including determining the first past block vector information based on the block vector information used for the current block, if the number of block vectors in the block vector information used for the current block is less than or equal to a third predetermined value. The decoding method according to any one of claims 1 to 11.

13. Determining the first past block vector information based on the block vector information used for the current block is: The area of ​​the current block is equal to or greater than the first threshold. The width of the current block is greater than or equal to the second threshold. The current block height is equal to or greater than the third threshold. The type of the current image to which the aforementioned current block belongs is of a predetermined type. The method is characterized by determining the first past block vector information based on the block vector information used for the current block if at least one of the following conditions is met: The decoding method according to any one of claims 1 to 12.

14. Updating the first past block vector information list based on the first past block vector information means that If the first past block vector information list includes the first past block vector information, the method is characterized by moving the first past block vector information to the end of the first past block vector information list. The decoding method according to any one of claims 1 to 13.

15. Updating the first past block vector information list based on the first past block vector information means that The method is characterized by including the following: if the number of past block vector information entries in the first past block vector information list is less than a fourth predetermined value, the first past block vector information is added to the first past block vector information list; otherwise, the past block vector information at the beginning of the first past block vector information list is retrieved and the first past block vector information is added to the end of the first past block vector information list. The decoding method according to any one of claims 1 to 13.

16. The first past block vector information list is characterized in that it is a common past block vector information list for the first prediction mode and the IBC mode. The decoding method according to any one of claims 1 to 15.

17. When the first past block vector information list is used to determine the candidate block vector information list, the priority of the second past block vector information belonging to the first prediction mode in the first past block vector information list is lower than the priority of the third past block vector information belonging to the IBC mode in the first past block vector information list. The decoding method according to claim 16.

18. The first past block vector information list is a past block vector information list for the first prediction mode, and both the first past block vector information list and the second past block vector information list for the IBC mode are used to determine the candidate block vector information list. The decoding method according to any one of claims 1 to 15.

19. The priority given to the first past block vector information list for determining the candidate block vector information list is lower than the priority given to the second past block vector information list for determining the candidate block vector information list. The decoding method according to claim 18.

20. The current image to which the current block belongs includes a plurality of regions after division, the plurality of regions include the location region of the current block, and the first past block vector information list is a past block vector information list corresponding to the location region. The decoding method according to any one of claims 1 to 15.

21. An encoding method, Based on a first prediction mode different from the intrablock copy (IBC) mode, the block vector information to be used for the current block is determined, Based on the block vector information used for the current block, the first past block vector information is determined. This includes updating the first past block vector information list based on the first past block vector information, The encoding method is characterized in that the first past block vector information list is used to determine a candidate block vector information list to be used for an IBC block, and the IBC block is a block that is encoded using the IBC mode after the current block.

22. The first prediction mode is characterized by including an intra-template matching prediction (IntraTMP) mode. The encoding method according to claim 21.

23. Determining the first past block vector information based on the block vector information used for the current block is: The method is characterized by determining the block vector in the first past block vector information based on at least one block vector in the block vector information used for the current block and the number of the at least one block vector. The encoding method according to claim 21 or 22.

24. Determining the block vector in the first past block vector information based on at least one block vector in the block vector information used for the current block and the number of the at least one block vector is: The method is characterized by including determining the at least one block vector as the block vector in the first past block vector information when the number of the at least one block vector is less than or equal to a first predetermined value. The encoding method according to claim 23.

25. Determining the block vector in the first past block vector information based on at least one block vector in the block vector information used for the current block and the number of the at least one block vector is: If the number of the at least one block vector is greater than the second predetermined value, The weighted average value of the at least one block vector is determined as the block vector in the first past block vector information. To determine one or more of the aforementioned block vectors that have the smallest template error value as the block vector in the first past block vector information, To determine one or more block vectors among the at least one block vectors that have the smallest error value of the reference block as the block vector in the first past block vector information, The method is characterized by determining the block vector in the first past block vector information according to any one of the following: The encoding method according to claim 23.

26. Determining the first past block vector information based on the block vector information used for the current block is: When using a sub-pixel interpolation prediction method for the current block, the method includes determining the first block vector in the block vector information used for the current block as the block vector in the first past block vector information, or determining the second block vector obtained by adjusting the first block vector based on the adjustment amount of the first block vector as the block vector in the first past block vector information. The encoding method according to any one of claims 21 to 25.

27. Determining the first block vector in the block vector information used for the current block as the block vector in the first past block vector information, or determining the second block vector obtained by adjusting the first block vector based on the adjustment amount of the first block vector as the block vector in the first past block vector information, is: The method is characterized by including determining the first block vector as the block vector in the first past block vector information when the accuracy of the first block vector is equal to the accuracy of the sub-pixel interpolation. The encoding method according to claim 26.

28. Determining the first block vector in the block vector information used for the current block as the block vector in the first past block vector information, or determining the second block vector obtained by adjusting the first block vector based on the adjustment amount of the first block vector as the block vector in the first past block vector information, is: The method is characterized by including determining the second block vector as the block vector in the first past block vector information if the accuracy of the first block vector is greater than the accuracy of the sub-pixel interpolation. The encoding method according to claim 26.

29. Determining the first past block vector information based on the block vector information used for the current block is: If the first past block vector information includes a third block vector, the accuracy of the third block vector is determined as the accuracy of the block vector information used for the current block, which corresponds to one or more block vectors used to determine the third block vector, and the first past block vector information includes the accuracy of the third block vector. The encoding method according to any one of claims 21 to 28.

30. Determining the first past block vector information based on the block vector information used for the current block is: The block vector information used for the current block includes, The coordinate information of the current block, A flag indicating whether or not to perform lighting compensation for the predicted block of the current block, A flag indicating whether or not to perform filtering on the predicted block of the current block, A flag indicating whether or not to reverse the reference block of the current block. A flag indicating whether the prediction mode used for the current block is the IBC mode, A flag indicating whether the prediction mode to be used for the current block is the first prediction mode, An index indicating the prediction mode to be used for the current block, This is characterized by determining at least one of the indices indicating the weights of a plurality of reference blocks used for the current block as information in the first past block vector information, The encoding method according to any one of claims 21 to 29.

31. The aforementioned encoding method is Further including encoding the first flag, The first flag is used to indicate that the first past block vector information list is updated based on the first prediction mode, The encoding method according to any one of claims 21 to 30.

32. Determining the first past block vector information based on the block vector information used for the current block is: The method is characterized by including determining the first past block vector information based on the block vector information used for the current block, if the number of block vectors in the block vector information used for the current block is less than or equal to a third predetermined value. The encoding method according to any one of claims 21 to 31.

33. Determining the first past block vector information based on the block vector information used for the current block is: The area of ​​the current block is equal to or greater than the first threshold. The width of the current block is greater than or equal to the second threshold. The current block height is equal to or greater than the third threshold. The type of the current image to which the aforementioned current block belongs is of a predetermined type. The method is characterized by determining the first past block vector information based on the block vector information used for the current block if at least one of the following conditions is met: The encoding method according to any one of claims 21 to 32.

34. Updating the first past block vector information list based on the first past block vector information means that If the first past block vector information list includes the first past block vector information, the method is characterized by moving the first past block vector information to the end of the first past block vector information list. The encoding method according to any one of claims 21 to 33.

35. Updating the first past block vector information list based on the first past block vector information means that The method is characterized by including the following: if the number of past block vector information entries in the first past block vector information list is less than a fourth predetermined value, the first past block vector information is added to the first past block vector information list; otherwise, the past block vector information at the beginning of the first past block vector information list is retrieved and the first past block vector information is added to the end of the first past block vector information list. The encoding method according to any one of claims 21 to 33.

36. The first past block vector information list is characterized in that it is a common past block vector information list for the first prediction mode and the IBC mode. The encoding method according to any one of claims 21 to 35.

37. When the first past block vector information list is used to determine the candidate block vector information list, the priority of the second past block vector information belonging to the first prediction mode in the first past block vector information list is lower than the priority of the third past block vector information belonging to the IBC mode in the first past block vector information list. The encoding method according to claim 36.

38. The first past block vector information list is a past block vector information list for the first prediction mode, and both the first past block vector information list and the second past block vector information list for the IBC mode are used to determine the candidate block vector information list. The encoding method according to any one of claims 21 to 35.

39. The priority given to the first past block vector information list for determining the candidate block vector information list is lower than the priority given to the second past block vector information list for determining the candidate block vector information list. The encoding method according to claim 38.

40. The current image to which the current block belongs includes a plurality of regions after division, the plurality of regions include the location region of the current block, and the first past block vector information list is a past block vector information list corresponding to the location region. The encoding method according to any one of claims 21 to 35.

41. It is a decoder, A first decision unit is configured to determine the block vector information to be used for the current block based on a first prediction mode that is different from the intrablock copy (IBC) mode. A second determination unit is configured to determine first past block vector information based on the block vector information used for the current block, The system comprises an update unit configured to update a first past block vector information list based on the first past block vector information, A decoder characterized in that the first past block vector information list is used to determine a candidate block vector information list to be used for an IBC block, and the IBC block is a block that is decoded using the IBC mode after the current block.

42. It is an encoder, A first decision unit is configured to determine the block vector information to be used for the current block based on a first prediction mode that is different from the intrablock copy (IBC) mode. A second determination unit is configured to determine first past block vector information based on the block vector information used for the current block, The system comprises an update unit configured to update a first past block vector information list based on the first past block vector information, An encoder characterized in that the first past block vector information list is used to determine a candidate block vector information list to be used for an IBC block, and the IBC block is a block encoded using the IBC mode after the current block.

43. It is an electronic device, A processor configured to run computer programs, An electronic device comprising: a computer-readable storage medium storing a computer program for implementing the decoding method described in any one of claims 1 to 20, or the encoding method described in any one of claims 21 to 40, when executed by the processor;

44. A computer-readable storage medium storing a computer program that, when executed by a computer, causes the computer to perform the decoding method described in any one of claims 1 to 20, or the encoding method described in any one of claims 21 to 40.

45. Computer program products, including computer programs / instructions, A computer program product characterized in that, when the computer program / instruction is executed by a processor, it implements the decoding method described in any one of claims 1 to 20, or the encoding method described in any one of claims 21 to 40.

46. A bitstream characterized by being decoded by the decoding method described in any one of claims 1 to 20, or generated by the encoding method described in any one of claims 25 to 40.