Decoding method, encoding method, decoder, and encoder
By subdividing the prediction mode in IBC-LIC mode and combining it with local illumination compensation technology, and selecting appropriate illumination compensation models for different scenarios, the problem of low coding efficiency caused by illumination changes is solved, and the performance of encoder and decoder is improved, especially in screen content encoding, where coding efficiency is significantly improved.
Patent Information
- Application Number
- PCT/CN2023/103395
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2025-01-02
AI Technical Summary
Existing digital video compression technologies have low encoding efficiency when dealing with video content affected by changes in lighting. In particular, the encoding efficiency of IBC-LIC technology is limited in screen content encoding scenarios, and it cannot effectively utilize lighting compensation technology to improve encoding performance.
By subdividing the IBC-LIC mode into multiple prediction modes and combining it with local illumination compensation technology, appropriate models and prediction modes are selected for different scenarios to improve the accuracy and efficiency of illumination compensation. In particular, in screen content encoding, the combination of upper and left template regions or individual template regions are used to calculate the illumination compensation model.
It significantly improves the encoding performance of video encoders and the decoding performance of decoders, especially in screen content encoding scenarios, improving encoding and decoding efficiency and reducing encoding bit overhead.
Smart Images

Figure CN2023103395_02012025_PF_FP_ABST
Abstract
Description
Decoding method, encoding method, decoder and encoder Technical Field
[0001] The present application relates to the field of coding and decoding technology, and more specifically, to a decoding method, an encoding method, a decoder, and an encoder. Background Art
[0002] Digital video compression technology mainly compresses huge digital image video data for easy transmission and storage.
[0003] With the surge in Internet videos and people's increasing demand for video clarity, although existing digital video compression standards can save a lot of video data, there is still a need to pursue better digital video compression technology to reduce the bandwidth and traffic pressure of digital video transmission.
[0004] Summary of the Invention
[0005] The present application provides a decoding method, an encoding method, a decoder and an encoder, which can improve the decoding performance of the decoder.
[0006] In a first aspect, the present application provides a decoding method, comprising:
[0007] Determine whether the current block uses the intra block copy (IBC-LIC) mode based on local illumination compensation;
[0008] If the current block uses the IBC-LIC mode, determining a first prediction mode used by the current block in the IBC-LIC mode;
[0009] Based on the model corresponding to the first prediction mode, illumination compensation is performed on a first prediction block obtained by predicting the current block using the IBC mode used by the current block to obtain a second prediction block of the current block.
[0010] In a second aspect, the present application provides an encoding method, comprising:
[0011] Performing illumination compensation on a third prediction block by traversing a model corresponding to at least one mode to obtain a first distortion cost set; the third prediction block is a prediction block obtained by predicting the current block using an intra block copy (IBC) advanced motion vector prediction (AMVP) mode;
[0012] Performing illumination compensation on a fourth prediction block based on the inherited model to obtain a second distortion cost set; the fourth prediction block is a reference block in a merge candidate list obtained by predicting the current block based on an IBC merge mode;
[0013] An IBC mode used by the current block is determined based on the first distortion cost set and the second distortion cost set.
[0014] In a third aspect, the present application provides a decoder, comprising:
[0015] A first determining unit is configured to determine whether the current block uses an intra block copy (IBC-LIC) mode based on local illumination compensation;
[0016] a second determining unit, configured to determine a first prediction mode used by the current block in the IBC-LIC mode if the current block uses the IBC-LIC mode;
[0017] The compensation unit is configured to perform illumination compensation on a first prediction block obtained by predicting the current block using the IBC mode used by the current block based on a model corresponding to the first prediction mode, to obtain a second prediction block of the current block.
[0018] In a fourth aspect, the present application provides an encoder, comprising:
[0019] A first compensation unit is configured to perform illumination compensation on a third prediction block by traversing a model corresponding to at least one mode to obtain a first distortion cost set; the third prediction block is a prediction block obtained by predicting the current block using an intra block copy (IBC) advanced motion vector prediction (AMVP) mode;
[0020] a second compensation unit, configured to perform illumination compensation on a fourth prediction block based on the inherited model to obtain a second distortion cost set; the fourth prediction block being a reference block in a merge candidate list obtained by predicting the current block based on an IBC merge mode;
[0021] A determining unit is configured to determine an IBC mode used by the current block based on the first distortion cost set and the second distortion cost set.
[0022] In a fifth aspect, the present application provides a decoder, comprising:
[0023] a processor adapted to implement computer instructions; and,
[0024] A computer-readable storage medium stores computer instructions, wherein the computer instructions are suitable for being loaded by a processor and executing the decoding method in the first aspect or its various implementations mentioned above.
[0025] In one implementation, there are one or more processors and one or more memories.
[0026] In one implementation, the computer-readable storage medium may be integrated with the processor, or the computer-readable storage medium may be provided separately from the processor.
[0027] In a sixth aspect, the present application provides an encoder, comprising:
[0028] a processor adapted to implement computer instructions; and,
[0029] A computer-readable storage medium stores computer instructions, wherein the computer instructions are suitable for being loaded by a processor and executing the encoding method in the second aspect or its various implementations mentioned above.
[0030] In one implementation, there are one or more processors and one or more memories.
[0031] In one implementation, the computer-readable storage medium may be integrated with the processor, or the computer-readable storage medium may be provided separately from the processor.
[0032] In the seventh aspect, the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are read and executed by a processor of a computer device, the computer device executes the decoding method involved in the first aspect mentioned above or the encoding method involved in the second aspect mentioned above.
[0033] In an eighth aspect, the present application provides a computer program product or computer program, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the decoding method of the first aspect or the encoding method of the second aspect.
[0034] In a ninth aspect, the present application provides a code stream, which is the code stream involved in the method described in the first aspect above or the code stream generated by the method described in the second aspect above.
[0035] Based on the above technical solution, for the decoding method provided in this application, if the current block uses the IBC-LIC mode, it is necessary to further determine the first prediction mode used by the current block in the IBC-LIC mode, and then, based on the model corresponding to the first prediction mode, perform illumination compensation on the first prediction block obtained by predicting the current block using the IBC mode used by the current block to obtain a second prediction block of the current block. This is equivalent to subdividing the IBC-LIC mode into prediction modes and associating the models with the prediction modes, thereby avoiding the use of a unified model for illumination compensation and improving the decoding performance of the decoder. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] FIG1 is a schematic block diagram of a video encoding and decoding system provided in this application.
[0037] FIG2 is a schematic block diagram of a video encoder provided by the present application.
[0038] FIG3 is a schematic structural diagram of the relationship between the coding tree unit and the coding unit provided in the present application.
[0039] FIG4 is a schematic block diagram of a video decoder provided in this application.
[0040] FIG5 is an example of images with different brightness and substantially the same texture provided by the present application.
[0041] FIG6 is an example of the modeling relationship between the reference frame and the current frame provided by this application.
[0042] FIG7 is an example of CTU and CU division provided in this application.
[0043] FIG8 is an example of an IBC provided in this application.
[0044] FIG. 9 is an example of an image with similar textures provided by the present application.
[0045] FIG10 is a schematic flowchart of the decoding method provided in this application.
[0046] FIG11 is an example of a template area provided in this application.
[0047] FIG12 is a schematic flowchart of the encoding method provided in this application.
[0048] FIG13 is a schematic block diagram of a decoder of the present application.
[0049] FIG14 is a schematic block diagram of an encoder of the present application.
[0050] FIG15 is a schematic structural diagram of the electronic device provided in this application. DETAILED DESCRIPTION
[0051] The solution provided by this application can be applied to the field of digital compression technology.
[0052] Among them, digital video compression technology mainly compresses huge digital image video data for easy transmission and storage.
[0053] The solution provided in this application can be applied to the field of digital video coding technology.
[0054] Among them, the field of digital video coding technology includes but is not limited to at least one of the following: image coding and decoding field, video coding and decoding field, hardware video coding and decoding field, dedicated circuit video coding and decoding field, and real-time video coding and decoding field. In addition, the solution provided in this application can be combined with the following standards: Audio Video Coding Standard (AVS), second-generation AVS standard (AVS2) or third-generation AVS standard (AVS3). For example, including but not limited to: H.264 / Audio Video Coding (AVC) standard, H.265 / High Efficiency Video Coding (HEVC) standard and H.266 / Versatile Video Coding (VVC) standard. In addition, the solution provided in this application can be used for lossy compression of images, and can also be used for lossless compression of images. Among them, the lossless compression can be visually lossless compression or mathematically lossless compression.
[0055] The video coding standard may adopt a block-based hybrid coding framework.
[0056] The hybrid coding framework includes modules such as prediction, transform, quantization, entropy coding, and in-loop filtering. The prediction module includes intra-frame prediction and / or inter-frame prediction. Because adjacent pixels within a video frame are strongly correlated, intra-frame prediction is used in video coding and decoding to eliminate spatial redundancy between adjacent pixels. Intra-frame prediction only references information from the same frame to predict pixel information within the current block. Because adjacent frames in a video have strong similarities, inter-frame prediction is used in video coding and decoding to eliminate temporal redundancy between adjacent frames, thereby improving coding efficiency. Inter-frame prediction includes motion estimation and motion compensation. Inter-frame prediction can reference image information from different frames and use motion estimation to search for the motion vector information that best matches the current block. Transformation converts the predicted image block to the frequency domain, redistributing the energy. Combined with quantization, it removes information that is insensitive to the human eye, eliminating visual redundancy. Entropy coding can eliminate character redundancy based on the current context model and the probabilistic information of the binary bitstream.
[0057] The basic process of the video encoder is as follows:
[0058] The encoder first divides a frame of image into blocks; then predicts the current block in the current image to obtain the predicted block of the current block; then subtracts the predicted block from the original block of the current block to obtain the residual block; transforms and quantizes the residual block to obtain a quantization coefficient matrix; then entropy codes the quantization coefficient matrix to obtain the output bitstream.
[0059] The basic process of the video decoder is as follows:
[0060] The decoder predicts the current block to obtain a predicted block. It also parses the bitstream to obtain a quantization coefficient matrix, which it then dequantizes and inversely transforms to produce a residual block. The predicted and residual blocks are then combined to form a reconstructed block. The reconstructed blocks form a reconstructed image, which is then subjected to image-based or block-based loop filtering to produce the decoded image.
[0061] It is worth noting that the current block may be a current coding unit (CU) or a current prediction unit (PU), etc.
[0062] In addition, the encoder also needs similar operations as the decoder to obtain a decoded image. The decoded image can be a reference frame for inter prediction for subsequent frames. The block division information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information determined by the encoder need to be written into the bitstream if necessary. The decoder determines the same block division information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information as the encoder by parsing and analyzing the 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 also usually called a reconstructed image. The codec can divide the current block into prediction units when predicting, and can divide the current block into transformation units when transforming. The division of prediction units and transformation units can be different. The above is the basic process of the video codec under the block-based hybrid coding framework. With the development of technology, some modules or steps of the framework or process may be optimized, and this application does not make specific limitations on this.
[0063] It should be noted that the terms used in the implementation method part of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0064] For example, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The term "at least one" is only a description of the combination relationship of enumerated objects, indicating that one or more items may exist. For example, at least one of the following: A, B, C can mean the following combinations: A exists alone, B exists alone, C exists alone, A and B exist at the same time, A and C exist at the same time, B and C exist at the same time, and A, B, and C exist at the same time. The term "multiple" refers to two or more. The character " / " generally indicates that the related objects before and after are in an "or" relationship.
[0065] For another example, the term "corresponding" may indicate that there is a direct or indirect correspondence between the two, or that there is an association relationship between the two, or a relationship between indication and being indicated, configuration and being configured, etc. The term "indication" may be a direct indication, an indirect indication, or an indication of an association relationship. For example, A indicates B, which may mean that A directly indicates B, for example, B can be obtained through A; it may also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it may also mean that there is an association relationship between A and B. The term "predefined" or "preconfigured" may refer to the pre-storage of corresponding codes, tables or other relevant information that can be used for indication in a device (for example, including an encoder or decoder), or it may refer to an agreement agreed upon by a protocol. "Protocol" may refer to any standard protocol in the field of encoding and decoding, and this application does not limit this. The term "when..." may be interpreted as "if" or "if" or "when..." or "in response to" and similar descriptions. Similarly, depending on the context, the phrase "if determined" or "if (stated condition or event) is detected" can be interpreted as "when determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)" and similar descriptions. The terms "first," "second," "third," "fourth," "Ath," "Bth," etc. are used to distinguish different objects, not to describe a particular order. The terms "include," "include," and "have," and any variations thereof, are intended to cover a non-exclusive inclusion.
[0066] For ease of understanding, the video encoding and decoding system involved in the embodiment of the present application is first introduced with reference to FIG1 .
[0067] FIG1 is a schematic block diagram of a video encoding and decoding system involved in an embodiment of the present application.
[0068] As shown in FIG. 1 , the video encoding and decoding system 100 includes an encoding device 110 and a decoding device 120 .
[0069] The encoding device 110 is used to encode (which can be understood as compressing) the video data to generate a code stream, and transmit the code stream to the decoding device 120. The decoding device 120 decodes the code stream generated by the encoding device 110 to obtain decoded video data.
[0070] The encoding device 110 can be understood as a device with a video encoding function, and the decoding device 120 can be understood as a device with a video decoding function, that is, the embodiments of the present application include a wider range of devices for the encoding device 110 and the decoding device 120, such as smartphones, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, video game consoles, car computers, etc.
[0071] The encoding device 110 may transmit the encoded video data (eg, a code stream) to the decoding device 120 via the channel 130 .
[0072] 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 .
[0073] Channel 130 may include one or more communication media that enable encoding device 110 to transmit encoded video data directly to decoding device 120 in real time. Encoding device 110 may modulate the encoded video data according to a communication standard and transmit the modulated video data to decoding device 120. The communication media may include 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.
[0074] Channel 130 may include a storage medium that can store the video data encoded by encoding device 110. The storage medium includes various locally accessible data storage media, such as optical disks, DVDs, flash memories, etc. In this example, decoding device 120 may obtain the encoded video data from the storage medium.
[0075] Channel 130 may include a storage server that can store the video data encoded by encoding device 110. In this example, decoding device 120 can download the stored encoded video data from the storage server. Alternatively, the storage server can store the encoded video data and transmit the encoded video data to decoding device 120, such as a web server (e.g., for a website), a file transfer protocol (FTP) server, etc.
[0076] The encoding device 110 includes a video encoder 112 and an output interface 113 .
[0077] The output interface 113 may include a modulator / demodulator (modem) and / or a 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 also be stored on a storage medium or storage server for subsequent reading by the decoding device 120.
[0078] In addition to the video encoder 112 and the input interface 113 , the encoding device 110 may also include a video source 111 .
[0079] Video source 111 may include at least one of a video capture device (e.g., a video camera), a video archive, a video input interface, and a computer graphics system. The video input interface is used to receive video data from a video content provider, and the computer graphics system is used to generate video data. Video encoder 112 encodes the video data from video source 111 to generate a bitstream. The video data may include one or more pictures or a sequence of pictures. The bitstream contains encoding information for the picture or picture sequence in the form of a bitstream. The encoding information may include the encoded picture data and associated data. The associated data may include a sequence parameter set (SPS), a picture parameter set (PPS), and other syntax structures. An SPS may contain parameters applicable to one or more sequences. A PPS may contain parameters applicable to one or more pictures. A syntax structure is a set of zero or more syntax elements arranged in a specified order within the bitstream.
[0080] The decoding apparatus 120 includes an input interface 121 and a video decoder 122. The input interface 121 may include a receiver and / or a modem.
[0081] The decoding device 120 may include a display device 123 in addition to the input interface 121 and the video decoder 122 .
[0082] The input interface 121 can receive the encoded video data via the channel 130. The video decoder 122 is configured to decode the encoded video data to obtain 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 can be integrated with the decoding device 120 or external to the decoding device 120. The display device 123 can include various display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.
[0083] It should be understood that Figure 1 is only an example of the present application and should not be understood as a display of the present application. That is to say, the technical solution of the embodiment of the present application is not limited to the system framework shown in Figure 1. For example, the technology of the present application can also be applied to unilateral video encoding or unilateral video decoding.
[0084] The following is an introduction to the video encoding framework involved in the embodiments of the present application.
[0085] FIG2 is a schematic block diagram of a video encoder 200 according to an embodiment of the present application.
[0086] It should be understood that the video encoder 200 can be applied to image data in luminance and chrominance (YCbCr, YUV) format. For example, the YUV ratio can be 4:2:0, 4:2:2, or 4:4:4, where Y represents brightness (Luma), Cb (U) represents blue chrominance, Cr (V) represents red chrominance, and U and V represent chrominance (Chroma) used to describe color and saturation. For example, in terms of color format, 4:2:0 means that every 4 pixels have 4 luminance components and 2 chrominance components (YYYYCbCr), 4:2:2 means that every 4 pixels have 4 luminance components and 4 chrominance components (YYYYCbCrCbCr), and 4:4:4 represents full pixel display (YYYYCbCrCbCrCbCrCbCr). Of course, it can also be applied to image data in red-green-blue (RGB) format, but this application does not specifically limit this.
[0087] After the video encoder 200 reads the video stream, it can divide each frame of the video stream into several coding tree units (CTUs). In some examples, CTUs can be called "tree blocks", "largest coding units" (LCU) or "coding tree blocks" (CTB). Each CTU can be associated with a pixel block of equal size within the image. Each pixel can correspond to one luminance (luminance or luma) sample and two chrominance (chroma) samples. Therefore, each CTU can be associated with one luminance sample block and two chrominance sample blocks. The size of a CTU can be, for example, 128×128, 64×64, 32×32, etc. Figure 3 is a schematic structural diagram of the relationship between the coding tree unit and the coding unit provided in this application. As shown in Figure 3, a CTU can be further divided into several coding units (CUs) for encoding, and the CU can be a rectangular block or a square block. A CU can be further divided into prediction units (PUs) and transform units (TUs), allowing for separation of coding, prediction, and transform, and greater flexibility in processing. In one example, a CTU is divided into CUs using a tree (e.g., a quadtree), and a CU is divided into TUs and PUs using a tree (e.g., a quadtree).
[0088] The video encoder and video decoder can support various PU sizes.
[0089] Assuming that the size of a particular CU is 2N×2N, the video encoder and video decoder may support PU sizes of 2N×2N or N×N for intra prediction, and support symmetric PUs of 2N×2N, 2N×N, N×2N, N×N, or similar sizes for inter prediction. The video encoder and video decoder may also support asymmetric PUs of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter prediction.
[0090] 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, a loop filter unit 260, a decoded image buffer 270, and an entropy coding unit 280. It should be noted that the video encoder 200 may include more, fewer, or different functional components. In this application, the current block may be referred to as the current coding unit (CU) or the current prediction unit (PU), etc. The prediction block may also be referred to as a predicted image block or an image prediction block, and the reconstructed image block may also be referred to as a reconstructed block or an image reconstructed image block.
[0091] Prediction unit 210 includes an inter-frame prediction unit 211 and an intra-frame prediction unit 212. Because adjacent pixels in a video image have strong correlations, video encoding and decoding techniques use intra prediction to eliminate spatial redundancy between adjacent pixels. Because adjacent images in a video have strong similarities, inter prediction eliminates temporal redundancy between adjacent images, thereby improving coding efficiency.
[0092] The inter-prediction unit 211 can be used for inter-prediction, which includes motion estimation and motion compensation. It can refer to image information from different frames. Inter-prediction uses motion information to find a reference block from a reference frame and generates a prediction block based on the reference block to eliminate temporal redundancy. The reference frame can be a P-frame and / or a B-frame. P-frames refer to forward-predicted frames, and B-frames refer to bidirectionally predicted frames. After using motion information to find a reference block, inter-prediction generates a prediction block based on the reference block. Motion information includes the frame list to which the reference frame belongs, the frame index, and the motion vector. The motion vector can be integer-pixel or fractional-pixel. If the motion vector is fractional-pixel, interpolation filtering is required to generate the required fractional-pixel block in the reference frame. The reference block is the integer-pixel or fractional-pixel block found based on the motion vector. Some technologies directly use the reference block as the prediction block, while others further process the reference block to generate a prediction block. Reprocessing a reference block to generate a prediction block can also be understood as using the reference block as the prediction block and then processing the prediction block to generate a new prediction block.
[0093] The intra prediction unit 212 only refers to the information of the same frame image to predict the pixel information in the current code image block to eliminate spatial redundancy. The reference frame used for intra prediction can be an I frame.
[0094] Intra prediction uses multiple prediction modes, including angular and non-angular prediction modes, to predict the image block to be coded. Based on the rate-distortion information calculated from the prediction block and the image block to be coded, the optimal prediction mode for the image block to be coded is selected and written into the bitstream for transmission to the decoder. The decoder parses the prediction mode, predicts the predicted block of the target decoding block, and superimposes it with the time-domain residual block obtained from the bitstream to obtain the reconstructed block.
[0095] Taking the H series of international digital video coding standards as an example, the H.264 / AVC standard has 8 angle prediction modes and 1 non-angle prediction mode, and H.265 / HEVC is expanded to 33 angle prediction modes and 2 non-angle prediction modes. The intra prediction modes used by HEVC are planar mode, direct current (DC) and 33 angle modes, a total of 35 prediction modes. The intra modes used by VVC are planar, DC and 65 angle modes, a total of 67 prediction modes, which include traditional prediction modes and non-traditional prediction modes. Non-traditional prediction modes may include matrix weighted intra-frame prediction (MIP) mode. Traditional prediction modes include: planar mode with mode number 0, DC mode with mode number 1, and angle prediction modes with mode numbers 2 to 66. It should be noted that with the increase of angle modes, the prediction results of intra prediction will be more accurate and more in line with the needs of the development of high-definition and ultra-high-definition digital video. The above intra prediction mode is only an example of this application and should not limit this application.
[0096] The residual unit 220 may generate a residual block for the CU based on the pixel blocks of the CU and the prediction blocks of the PUs of the CU. For example, the residual unit 220 may generate the residual block for the CU such that each sample in the residual block has a value equal to the difference between the sample in the pixel blocks of the CU and the corresponding sample in the prediction blocks of the PUs of the CU.
[0097] The transform / quantization unit 230 may quantize the transform coefficients. The transform / quantization unit 230 may quantize the transform coefficients associated with the TUs of a CU based on a quantization parameter (QP) value associated with the CU. The video encoder 200 may adjust the degree of quantization applied to the transform coefficients associated with the CU by adjusting the QP value associated with the CU.
[0098] The inverse transform / quantization unit 240 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficients to reconstruct a residual block from the quantized transform coefficients.
[0099] Reconstruction unit 250 may add samples of the reconstructed residual block to corresponding samples of one or more prediction blocks generated by prediction unit 210 to generate a reconstructed image block associated with the TU. By reconstructing the sample blocks of each TU of a CU in this manner, video encoder 200 can reconstruct the pixel blocks of the CU.
[0100] The loop filter unit 260 processes the inverse-transformed and inverse-quantized pixels to compensate for distortion and provide a better reference for subsequent pixel encoding. For example, it can perform deblocking filtering to reduce the blocking artifacts of pixel blocks associated with the CU. In some embodiments, the loop filter unit 260 includes a deblocking filter (DBF) unit and a sample adaptive offset / adaptive loop filter (SAO / ALF) unit. The DBF unit is used to remove blocking artifacts, while the SAO / ALF unit is used to remove ringing artifacts.
[0101] The decoded image buffer 270 may store reconstructed pixel blocks.
[0102] The inter prediction unit 211 can use the reference image containing the reconstructed pixel blocks in the decoded image buffer 270 to perform inter prediction on PUs in other images. In addition, the intra prediction unit 212 can use the reconstructed pixel blocks in the decoded image buffer 270 to perform intra prediction on other PUs in the same image as the CU.
[0103] The entropy coding unit 280 may receive the quantized transform coefficients from the transform / quantization unit 230. The entropy coding unit 280 may perform one or more entropy coding operations on the quantized transform coefficients to generate entropy-coded data.
[0104] FIG4 is a schematic block diagram of a video decoder according to an embodiment of the present application.
[0105] 4 , the video decoder 300 includes an entropy decoding unit 310, a prediction unit 320, an inverse quantization / transformation unit 330, a reconstruction unit 340, a loop filter unit 350, and a decoded picture buffer 360. It should be noted that the video decoder 300 may include more, fewer, or different functional components.
[0106] The video decoder 300 may receive a bitstream. The entropy decoding unit 310 may parse the bitstream to extract syntax elements from the bitstream. As part of parsing the bitstream, the entropy decoding unit 310 may parse the entropy-encoded syntax elements in the bitstream. The prediction unit 320, the inverse quantization / transform unit 330, the reconstruction unit 340, and the loop filter unit 350 may decode the video data based on the syntax elements extracted from the bitstream, thereby generating decoded video data.
[0107] The prediction unit 320 includes an intra prediction unit 322 and an inter prediction unit 321 .
[0108] The intra prediction unit 322 may perform intra prediction to generate a prediction block for the PU. The intra prediction unit 322 may use an intra prediction mode to generate a prediction block for the PU based on pixel blocks of spatially neighboring PUs. The intra prediction unit 322 may also determine the intra prediction mode for the PU based on one or more syntax elements parsed from the codestream.
[0109] The inter prediction unit 321 may construct a first reference picture list (List 0) and a second reference picture list (List 1) based on syntax elements parsed from the codestream. Furthermore, if a PU is encoded using inter prediction, the entropy decoding unit 310 may parse the motion information of the PU. The inter prediction unit 321 may determine one or more reference blocks for the PU based on the motion information of the PU. The inter prediction unit 321 may generate a prediction block for the PU based on the one or more reference blocks of the PU.
[0110] The inverse quantization / transform unit 330 may inversely quantize (i.e., dequantize) the transform coefficients associated with the TU. The inverse quantization / transform unit 330 may use the QP value associated with the CU of the TU to determine the degree of quantization. After inverse quantizing the transform coefficients, the inverse quantization / transform unit 330 may apply one or more inverse transforms to the inverse quantized transform coefficients to generate a residual block associated with the TU.
[0111] The reconstruction unit 340 uses the residual block associated with the TU of the CU and the prediction block of the PU of the CU to reconstruct the pixel block of the CU. For example, the reconstruction unit 340 can add samples of the residual block to corresponding samples of the prediction block to reconstruct the pixel block of the CU to obtain a reconstructed image block.
[0112] The loop filtering unit 350 may perform a deblocking filtering operation to reduce blocking artifacts of pixel blocks associated with a CU.
[0113] The video decoder 300 may store the reconstructed image of the CU in the decoded image buffer 360. The video decoder 300 may use the reconstructed image in the decoded image buffer 360 as a reference image for subsequent prediction, or transmit the reconstructed image to a display device for presentation.
[0114] Combining Figures 2 and 4, the basic process of video encoding and decoding is as follows:
[0115] At the encoding end, a frame of an image is divided into image blocks. For the current block, the prediction unit 210 uses intra prediction or inter prediction to predict the prediction block of the current block (i.e., the block to be encoded). The residual unit 220 can calculate a residual block based on the prediction block and the original block of the current block (i.e., the block to be encoded), that is, the difference between the prediction block and the original block. This residual block can also be called residual information. This residual block is transformed and quantized by the transform / quantization unit 230, which can remove information that is insensitive to the human eye to eliminate visual redundancy. Optionally, the residual block before transformation and quantization by the transform / quantization unit 230 can be called a time domain residual block, and the time domain residual block after transformation and quantization by the transform / quantization unit 230 can be called a frequency residual block or a frequency domain residual block. The entropy coding unit 280 receives the quantized change coefficients output by the change quantization unit 230, performs entropy coding on the quantized change coefficients, and outputs a bitstream. For example, the entropy coding unit 280 can eliminate character redundancy based on the target context model and the probability information of the binary bitstream.
[0116] At the decoding end, the entropy decoding unit 310 can parse the code stream to obtain the prediction information, quantization coefficient matrix, etc. of 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 prediction block of the current block (i.e., the block to be decoded). The inverse quantization / transformation unit 330 uses the quantization coefficient matrix obtained from the code stream to inverse quantize and inverse transform the quantization coefficient matrix to obtain a residual block. The reconstruction unit 340 adds the prediction block and the residual block to obtain a reconstructed block. The reconstructed blocks constitute a reconstructed image, and the loop filtering unit 350 performs loop filtering on the reconstructed image based on the image or block to obtain a decoded image. It is worth noting that the encoding end also needs to use operations similar to those of the decoder to obtain a decoded image. The decoded image can also be called a reconstructed image, and the reconstructed image can be a subsequent frame as a reference frame for inter prediction.
[0117] In addition, the block division information determined by the encoder, as well as mode information or parameter information such as prediction, transform, quantization, entropy coding, and loop filtering, etc., are carried in the bitstream when necessary. The decoder parses the bitstream and analyzes the existing information to determine the same block division information, prediction, transform, quantization, entropy coding, loop filtering, etc. mode information or parameter information as the encoder, thereby ensuring that the decoded image obtained by the encoder and the decoder are the same.
[0118] It should be noted that due to the need for parallel processing, images can be divided into slices, etc., and slices within the same image can be processed in parallel, that is, there is no data dependency between them. The term "frame" can be understood as an image or a slice, etc. In addition, the above is the basic process of a video codec under a block-based codec framework. As technology develops, some modules or steps of this framework or process may be optimized. That is, this application is not limited to this framework and process.
[0119] JVET, the international video coding standards organization, has established a group to research coding models that surpass H.266 / VVC. This model, or platform testing software, has been named ECM. Building on VTM10.0, ECM incorporates newer and more efficient compression algorithms, currently surpassing VVC's coding performance by approximately 13%. ECM not only increases the coding unit size for specific resolutions but also integrates numerous intra- and inter-prediction techniques.
[0120] The following describes the related technologies involved in this application.
[0121] (1) Light compensation technology.
[0122] Real-world natural videos often contain changes in light intensity, such as a decrease in light intensity over time, cloud cover, or changes in the intensity of a camera flash. The difference between these video contents and the previous and next frame images lies primarily in the strength of the image's DC component, with little change to the texture information in the content. However, due to the large DC component's numerical influence, motion search and motion compensation in inter-prediction techniques cannot effectively predict these contents, and are prone to encoding a large amount of residual information. Local Illuminance Compensation (LIC) technology can effectively remove this DC redundant information, accurately predict brightness changes, and make corresponding compensation, thereby reducing residual information and improving coding efficiency. In the following text, local illumination compensation technology will be referred to as illumination compensation.
[0123] The latest video codec standard, H.266 / VVC, has been finalized. The Joint Video Coding Experts Group (JVET) has proposed exploring video codec standards based on VVC that surpass VVC's coding performance. They have established the Exploration Experiment EE2 with this goal in mind. The platform reference software used in the exploratory experiment is based on VTM11.0, into which new algorithms will be integrated and the branch will be renamed ECM. Several expert discussion groups have also been established specifically for ECM. The latest ECM reference software version 8.0 already boasts approximately 19% higher coding performance than VVC. VVC, the current state-of-the-art standard, only boasts approximately 27% higher coding performance than the previous-generation video codec standard, H.265 / HEVC. It's conceivable that in the near future, ECM could be the foundation for exploring and researching the next generation of video codec standards.
[0124] In the early days of ECM, the reference software already integrated coding tools that VVC did not have. These coding tools provided efficient coding performance and processing capabilities for different ECM coding scenarios, including LIC. The following is a brief introduction to LIC in ECM.
[0125] Illumination compensation is an inter-coding technique. During the encoding process, the current coding unit uses motion vectors (MVs) to obtain a corresponding reference block. This reference block often comes from a different coded frame, or in other words, the reference coding unit does not belong to the current image. In certain scenarios, images from different frames may vary significantly, and illumination compensation is very effective in addressing some of these variations.
[0126] FIG5 is an example of images with different brightness and substantially the same texture provided by the present application.
[0127] As shown in Figure 5, the texture information of the left and right parts is essentially the same; the difference lies in the brightness variation. This difference is caused by the camera flash, making the image on the right appear very bright, while the image on the left is illuminated by normal natural light. This difference creates a significant burden in video encoding. Assuming the block on the left uses the block on the right as a reference coding unit, the texture information of the two blocks is identical, so the difference in texture detail is minimal, but the overall residual is significant. This is because the pixels in the right image are offset due to the flash, and this offset is included in the residual. If this residual were directly transformed and quantized before being written into the bitstream, the overhead would be enormous.
[0128] The illumination compensation technology in the ECM reference software eliminates these effects, such as those caused by flash or lighting changes, through linear fitting, resulting in better overall prediction results.
[0129] The main parts of illumination compensation technology are as follows:
[0130] The correlation between the reconstructed samples of the reference coding unit and the adjacent parts of the current coding unit is used to fit the changing correlation between the predicted samples and the reference samples within the coding unit. Because the adjacent reconstructed samples above and to the left of the current coding unit are available, if they exist, and the adjacent reconstructed samples above and to the left of the reference coding unit in the reference image are also available, the corresponding fitting model can be obtained by modeling the reconstructed samples of the current frame and the reconstructed samples of the reference image.
[0131] During the modeling process, ECM uses a linear fitting approach for illumination compensation. The model is simplified to consist of a scaling parameter a and a bias parameter b, which can fit the illumination changes between the current frame and the reference frame. The change relationship is expressed by the model parameters as follows: Pred′(x,y) = a·Pred(x,y) + b.
[0132] Where Pred(x,y) is the predicted block before illumination compensation, Pred′(x,y) is the predicted block after illumination compensation, a is the scaling parameter in the illumination compensation model, and b is the offset parameter in the illumination compensation model. Both a and b in the formula need to be calculated using the image information of the current frame (also called the current image) and the image information of the reference frame (also called the reference image). They are obtained by modeling the spatially adjacent reconstructed pixels of the current block with the pixels adjacent to the reconstructed block in the corresponding reference image. The derivation formula is as follows: Curr_Rec neigh =a·Ref_Rec neigh +b.
[0133] Among them, Curr_Rec neigh is the reconstructed image of the current frame, Ref_Rec neigh For the reconstructed image of the reference frame, in the digital video encoding and decoding process, as shown in FIG6 , the coding block of the current frame can be corrected for illumination differences through an illumination compensation model to obtain a compensated prediction block.
[0134] In addition, the calculation of the above-mentioned scaling parameter a and offset parameter b can be assisted by: the adjacent reconstructed pixels of the reconstructed block corresponding to the current block in the reference image, the adjacent reconstructed pixels of the coding block in the current image, and the modeling and solution thereof according to the correlation between the adjacent reconstructed pixels of the current frame coding unit and the reconstructed pixels at the corresponding positions in the reference image.
[0135] FIG7 is an example of CTU and CU division provided in this application.
[0136] As shown in Figure 7, the linear relationship is solved by modeling the nearest reconstructed sample pixels (Reconstructed pixels) of the corresponding CU in the current image and the reference image to obtain the scaling parameter a and the offset parameter b. This linear relationship is then applied to the corresponding reconstructed CU (Reference picture CU) in the reference image to obtain the prediction block of the CU to be encoded (Current picture CU) in the current image.
[0137] The specific modeling process is as follows:
[0138] The illumination compensation model in ECM is a linear model. The model parameters include the scaling factor a and the offset parameter b, both of which are obtained by the least squares method (Least Square Error). The number of selected reconstruction samples is set according to the width and height of the current coding unit. If the width and height of the current coding unit are equal to 4, 4 reconstruction samples are taken from the upper and left adjacent reconstruction samples of the coding unit. For example, if the current coding unit is 16 wide and 4 high, all 4 reconstruction samples are taken from the left adjacent reconstruction samples, and 4 reconstruction samples are taken from the upper adjacent reconstruction samples with a step size of 3. If the width and height of the current coding unit are not equal to 4, the number of pixel samples with the logarithm of 2 of the smaller side length is obtained from the upper and left adjacent reconstruction samples.
[0139] After obtaining the upper and left reconstruction samples, calculate the model parameters. Assume that the obtained reference frame reconstruction samples are recorded as x and the current frame reconstruction samples are recorded as y; then the sum of the reference frame reconstruction samples is recorded as sumX, and the sum of the current frame reconstruction samples is recorded as sumY; the sum of the squares of the reference frame reconstruction samples is recorded as sumXX, and the sum of the products of the reference frame reconstruction samples and the current frame reconstruction samples is recorded as sumXY. The parameter calculation is: a=(sumXY-sumXsumY) / (sumXX–sumXsumX) b=sumY–a*sumX
[0140] Where sumXsumY is sumX multiplied by sumY. The ECM reference software performs some shifting operations during calculation, which are simplified and not detailed here. After obtaining the linear model parameters, a linear transformation is performed on the motion-compensated prediction block to obtain the final prediction block.
[0141] If the reconstructed samples used to calculate the linear model parameters belong to an inter-frame (inter) prediction block, an interpolation operation is required.
[0142] Illumination compensation in ECM works in standard inter-frame prediction, merge prediction mode, and sub-block mode. Inter mode is standard inter-frame prediction, merge mode is merge mode, and sub-block mode is affine mode. Furthermore, illumination compensation only works in single-frame prediction mode and is not used in multi-frame bidirectional reference mode.
[0143] In addition, the illumination compensation technology in ECM is coupled with the adopted technologies. In the current coding unit, the illumination compensation technology is not used simultaneously with the bidirectional optical flow technology (BDOF) and the symmetric motion vector difference (SMVD) technology.
[0144] (2) Application of illumination compensation technology in intra block copy (IBC) technology.
[0145] Typically, illumination compensation is used in inter-frame prediction. Within intra-frame prediction, there's a similar technique called IBC. As the name suggests, IBC searches for a block within the current image that matches or is similar to the current block and copies it as the prediction block for the current block. This prediction technique is specifically designed for screen content coding.
[0146] FIG8 is an example of an IBC provided in this application.
[0147] As shown in Figure 8, there is an inverted triangle graphic texture in the coding block. If the traditional intra prediction technology is used to encode the current block, a large amount of bits will be consumed to encode the residual information. However, after adopting the IBC technology, a search is performed within the specified range of the current image to find a similar or identical point in the upper left corner. Through distortion cost calculation or hash value matching, the searched reconstructed block is determined and copied as the prediction block of the current block. It can be seen that this prediction technology is much more efficient than the traditional intra coding technology. In some cases, it is even possible to search for an identical prediction block, eliminating the need to encode residual information and saving a lot of bit overhead. In addition, the solid line with an arrow is the block vector information BV of the current block. At the decoding end, the matching reconstructed block is found through BV as the prediction block of the current block.
[0148] Similar to inter-frame prediction, IBC has two modes: Advanced Motion Vector Prediction (AMVP) mode and skip / merge mode, also known as merge mode.
[0149] In AMVP mode, IBC needs to transmit an index to indicate which block vector prediction (BVP) to use and the coded block vector difference (BVD).
[0150] In skip / merge mode, IBC needs to transmit an index to indicate which BV information to use.
[0151] Similar to inter-frame prediction, in some application scenarios, even if the texture information within the coding block is the same, there may be color differences. In natural sequences, the most common scenario is illumination changes. For example, a camera is fixedly illuminating a building. The video content of the building taken in the morning is the same as the video content of the building taken in the afternoon, but the illumination intensity has changed. Therefore, even if inter-frame prediction uses the decoded reconstructed frame as the reference content, it cannot fully represent the video content. Because of the different illumination, the overall mean of the video content is different, and the residual bitstream required for encoding is large. The illumination compensation technology solves this problem very well. By establishing a linear model, the reference content and the current content are converted, adapting to the changes in different illumination intensities without changing the texture content.
[0152] In short, similar issues exist in screen content encoding. Even if the encoding blocks have identical content, color deviation or other issues can cause IBC technology to be inefficient, or even unable to find similar encoding blocks. For example, if four sub-images have the same texture but different colors, the significant color difference can cause block copying to be inefficient or even unable to match the reconstructed image content.
[0153] The IBC-LIC technology is the same as the LIC technology. By establishing a linear relationship between the reference block and the coding block, the reference block is converted and used as the prediction block of the current coding unit. The process is the same as the aforementioned LIC part. In AMVP mode, IBC requires an identifier to indicate whether to use the LIC technology, while in merge mode, the LIC technology is turned on and off through inheritance. For example, for four sub-images with the same texture but different colors, after turning on the IBC-LIC technology, starting from the second sub-image, more and more coding blocks will use the IBC-LIC technology to copy the content of the previously reconstructed sub-images.
[0154] The above analysis shows that IBC-LIC technology can indeed provide very impressive performance in screen content encoding application scenarios. Its calculation process is the same as that of LIC technology. The complexity is acceptable both from the software and hardware levels, and the cost-effectiveness is still very high.
[0155] However, IBC-LIC follows the LIC model, which uses both reference and reconstructed samples from the upper and left template regions as input for modeling. This approach may not be well suited for screen content coding scenarios. In natural sequences, illumination changes are typically consistent across the content within the current image. However, in screen content scenarios, content changes occur at the pixel level, resulting in sharper images. While the upper template region may be able to reflect the linear relationship between the current block and the reference block, the left template region may differ significantly from the current block, potentially negatively impacting the linear model. For example, in some presentation applications, color changes can be rapid and dramatic: one shape may be red, but the next shape may be green. If the current coding unit includes two colors, and the reference reconstructed block has the same texture but different color variations, the parameters calculated using the template may not accurately reflect the relationship between the different colors. In this case, the model parameters are more of a compromise fit.
[0156] FIG. 9 is an example of an image with similar textures provided by the present application.
[0157] As shown in Figure 9, assume the left sub-image has an orange background, and the right sub-image has a blue background. These two images are very similar in shape, and some color gradients are also very similar. Therefore, copying the edge shape and then performing color compensation is a very effective method to save bitrate. However, for the coding block where the right sub-image is located at the edge, since the area covered by the template of the coding block is usually multi-colored and the prediction block also has different colors, this will cause the model fitting effect to be inaccurate, thereby reducing the encoding performance of the encoder and the decoding performance of the decoder.
[0158] For example, when the prediction block of the right sub-image located in the lower left corner refers to the same part of the left sub-image, the curve profile and color changes are almost exactly the same, which can save a lot of bits for the coding block. However, because the template area mixes and calculates the linear relationship between white and white, and orange and blue, the calculated linear model parameters are inaccurate, which reduces the effect of the linear transformation of the prediction block. Specifically, the blue area in the prediction block is obtained by linearly transforming the orange area in the reference block, but because a large amount of white-to-white linear fitting is involved in the parameter calculation, the color difference between orange and blue is insufficient; similarly, the white part should not change, but because the linear fitting of orange to blue causes the parameters to change, the resulting color white has color difference. Finally, the residual error of the prediction block is greater than expected, the coding efficiency is greatly reduced, and correspondingly, the decoding efficiency of the decoder is also increased. In view of this, the present application provides a decoding method, an encoding method, a decoder, and an encoder that can improve decoding performance.
[0159] FIG10 is a schematic flow chart of a decoding method 400 provided herein. It should be understood that the decoding method 400 may be performed by a decoder. For example, the decoding method 400 may be performed by the video decoder 122 shown in FIG1 or the video decoder 300 shown in FIG4 . For ease of description, the following description uses a decoder as an example.
[0160] As shown in FIG10 , the decoding method 400 may include some or all of the following:
[0161] S410 , the decoder determines whether the current block uses an intra block copy (Intra Block Copy Local Illuminance Compensation, IBC-LIC) mode based on local illumination compensation.
[0162] Exemplarily, the IBC-LIC mode may be an IBC-LIC mode in an IBC Advanced Motion Vector Prediction (AMVP) mode or an IBC-LIC mode in an IBC merge mode.
[0163] In other words, the decoder determines whether the current block uses the IBC-LIC mode in the IBC AMVP mode or the IBC-LIC mode in the IBC merge mode.
[0164] It should be noted that the IBC-LIC mode refers to using LIC technology to perform illumination compensation on a predicted block obtained by predicting the current block using IBC. In other alternative embodiments, the IBC-LIC mode may also be referred to as a prediction mode corresponding to IBC and LIC, a compensation mode corresponding to IBC and LIC, or other terms with similar meanings, which are not limited in this application.
[0165] S420: If the current block uses the IBC-LIC mode, the decoder determines a first prediction mode used by the current block in the IBC-LIC mode.
[0166] Exemplarily, the first prediction mode is a sub-mode of the IBC-LIC mode.
[0167] Exemplarily, the first prediction mode is a certain type of IBC-LIC mode.
[0168] Exemplarily, the first prediction mode is an IBC-LIC mode corresponding to a specific model.
[0169] For example, the first prediction mode may be a sub-mode of the IBC-LIC mode under the IBCAMVP mode.
[0170] For another example, the first prediction mode may be a sub-mode of the IBC-LIC mode under the IBC merge mode.
[0171] S430: The decoder performs illumination compensation on a first prediction block obtained by predicting the current block using the IBC mode used by the current block based on a model corresponding to the first prediction mode, to obtain a second prediction block of the current block.
[0172] Exemplarily, the IBC mode used by the current block may be the IBC AMVP mode or the IBC merge mode.
[0173] Exemplarily, when the IBC mode used by the current block is the IBCAMVP mode, the first prediction mode is a sub-mode of the IBC-LIC mode under the IBCAMVP mode. In this case, the decoder can perform illumination compensation on the first prediction block obtained by predicting the current block using the IBCAMVP mode based on the model corresponding to the first prediction mode to obtain a second prediction block of the current block.
[0174] Exemplarily, when the IBC mode used by the current block is the IBC merge mode, the first prediction mode is a sub-mode of the IBC-LIC mode under the IBC merge mode. In this case, the decoder can perform illumination compensation on the first prediction block obtained by predicting the current block using the IBC merge mode based on the model corresponding to the first prediction mode to obtain a second prediction block of the current block.
[0175] Exemplarily, after the decoder predicts the current block based on the IBC mode used by the current block to obtain the first prediction block, the decoder determines the model parameters of the model corresponding to the first prediction mode based on the format of the model corresponding to the first prediction mode. Then, the decoder may perform illumination compensation on the first prediction block based on the model parameters of the first model, thereby obtaining the second prediction block. Optionally, the format of the model corresponding to the first prediction mode includes, but is not limited to, information such as the number of models corresponding to the first prediction mode, the template area used by the model corresponding to the first prediction mode, and the adjustment parameters corresponding to the first prediction mode. Of course, the information included in the above format is only an example of this application.
[0176] It is worth noting that the model parameters of the model corresponding to the first prediction mode, such as the scaling parameter a and offset parameter b mentioned above, can be calculated with reference to the calculation formulas for scaling parameter a and offset parameter b described above. Similarly, when the decoder performs illumination compensation on the first prediction block based on the model corresponding to the first prediction mode, it can apply this linear relationship to the first prediction block to obtain the second prediction block. The specific compensation method can be found in the relevant content of Figure 6 and is not detailed here to avoid repetition.
[0177] In this embodiment, for the decoding method provided in this application, if the current block uses the IBC-LIC mode, it is necessary to further determine the first prediction mode used by the current block in the IBC-LIC mode. Then, based on the model corresponding to the first prediction mode, illumination compensation is performed on the first prediction block obtained by predicting the current block using the IBC mode used by the current block to obtain a second prediction block of the current block. This is equivalent to subdividing the IBC-LIC mode into prediction modes and associating the models with the prediction modes. This avoids the use of a unified model for illumination compensation and improves the decoding performance of the decoder.
[0178] The beneficial effects of the solution provided in this application are described below based on the test results.
[0179] Table 1 shows the test results after the decoding method provided by this application is integrated into the latest ECM8.0.
[0180] Table 1
[0181] As shown in Table 1, Class F and class TGM are special sequence classes for screen content encoding, among which the SlideShow and SlideEditing sequences in class F are the application scenarios mentioned above. In the table, Y represents brightness (Luma), U represents blue chroma, and V represents red chroma. When the corresponding values are negative, they represent performance gains. EncT represents the transformation of encoding complexity, and DecT represents the transformation of complexity. It can be seen from the simulation results that the decoding method provided in this application can improve the decoding performance, especially in class F, the gain effect is most obvious.
[0182] In some embodiments, the S420 may include:
[0183] Decoding the code stream and determining a first index;
[0184] The first index is used to indicate the first prediction mode in at least one mode.
[0185] Exemplarily, the at least one mode may be at least one IBC-LIC mode. For example, the at least one mode may be at least one IBC-LIC mode belonging to the IBCAMVP mode. In other words, the first index may be used to indicate the first prediction mode in at least one IBC-LIC mode belonging to the IBCAMVP mode. In this case, when the IBC mode used by the current block is the IBCAMVP mode, the decoder decodes the bitstream to determine the first index, and performs illumination compensation on the first prediction block obtained by predicting the current block using the IBCAMVP mode based on the model corresponding to the first prediction mode indicated by the first index, to obtain a second prediction block of the current block.
[0186] Of course, in other alternative embodiments, when the IBC mode used by the current block is the IBC merge mode, the decoder may also decode the bitstream to determine the first index and determine the prediction mode indicated by the first index as the first prediction mode. This application does not specifically limit this. Furthermore, this application does not specifically limit the method for parsing the first index. For example, the first index may be parsed using a context-based method or an equal probability method.
[0187] In some embodiments, the first index is used to indicate the first prediction mode in the at least one sorted mode; the method 400 may further include:
[0188] Determining a distortion cost of the at least one mode; wherein the distortion cost of any one of the at least one mode is determined based on reconstructed samples within a template region of the current block and samples obtained by performing illumination compensation on at least one predicted sample using a model corresponding to the any one mode, the at least one predicted sample including a predicted sample obtained by predicting samples within the template region of the current block using the IBC-LIC mode; and sorting the at least one mode based on the distortion cost of the at least one mode to obtain the sorted at least one mode.
[0189] Exemplarily, the distortion cost may be any cost that can represent the difference, such as SAD, transform-based SATD, etc.
[0190] Exemplarily, the codeword of the first index is related to the position of the first prediction mode in the at least one sorted mode. For example, the codeword of the first index is negatively correlated with the position of the first prediction mode in the at least one sorted mode. That is, the closer the first prediction mode is to the front of the at least one sorted mode, the smaller the codeword of the first index is, thereby reducing the codeword of the first index. For the encoder, the encoder can sort the modes according to the distortion cost, use shorter codewords for encoding and transmission with lower cost, and use longer codewords for transmission with higher cost, thereby improving the encoding efficiency of the encoder and the decoding efficiency of the decoder.
[0191] In some embodiments, the method 400 may further include:
[0192] A first model is determined based on reconstructed samples within the template area of the current block and reconstructed samples within the template area of the first prediction block; wherein the at least one mode includes a first mode corresponding to the first model.
[0193] Exemplarily, the decoder may determine the model parameters of the first model based on the reconstructed samples within the template region of the current block and the reconstructed samples within the template region of the first prediction block. Optionally, the model parameters of the first model may include the scaling parameter a and the offset parameter b mentioned above. The calculation method thereof may refer to the calculation formulas for the scaling parameter a and the offset parameter b described above. To avoid repetition, they are not further described here.
[0194] It is worth noting that the position of the template area of the current block relative to the current block and the position of the template area of the first prediction block relative to the first prediction block may be the same or different, and this application does not impose any specific limitation on this.
[0195] In some embodiments, the method 400 may further include:
[0196] The parameters of the first model are adjusted based on the adjustment value corresponding to the first mode to obtain a second model; wherein the at least one mode includes a second mode corresponding to the second model.
[0197] Exemplarily, the decoder may adjust the parameters of the first model based on the adjustment value corresponding to the first mode to obtain model parameters of the second model. Optionally, the model parameters of the first model may include the scaling parameter a and the offset parameter b mentioned above, and the adjustment parameters include the adjustment amount of the scaling parameter a and / or the adjustment amount of the offset parameter b.
[0198] For example, when the decoder adjusts the scaling parameter a of the first model, the decoder can obtain the scaling parameter a of the second model by any one of the following methods: multiplying the scaling parameter a of the first model by the adjustment amount of scaling parameter a, subtracting the adjustment amount of scaling parameter a from the scaling parameter a of the first model, or adding the scaling parameter a of the first model to the adjustment amount of scaling parameter a. Similarly, when the decoder adjusts the bias parameter b of the first model, the decoder can obtain the offset parameter b of the second model by any one of the following methods: multiplying the offset parameter b of the first model by the adjustment amount of offset parameter b, subtracting the adjustment amount of offset parameter b from the offset parameter b of the first model, or adding the offset parameter b of the first model to the adjustment amount of offset parameter b.
[0199] In some embodiments, the method 400 may further include:
[0200] determining a plurality of third models;
[0201] Among them, any one of the multiple third models is determined based on a first sample group obtained by dividing the reconstructed samples within the template area of the current block and a second sample group obtained by dividing the predicted samples within the template area of the first prediction block; and the at least one mode includes a third mode corresponding to the multiple third models.
[0202] Exemplarily, the model parameters of any one of the third models may be determined based on the reconstructed samples in the first sample group and the reconstructed samples in the second sample group. Optionally, the model parameters of any one of the third models may include the scaling parameter a and the offset parameter b mentioned above. The calculation method for these parameters can refer to the calculation formulas for scaling parameter a and offset parameter b described above. To avoid repetition, these parameters are not further described here.
[0203] In some embodiments, the method 400 may further include:
[0204] Adjusting parameters of the plurality of third models based on the adjustment values corresponding to the third mode to obtain a plurality of fourth models;
[0205] The at least one mode includes a fourth mode corresponding to the plurality of fourth models.
[0206] Exemplarily, the decoder may adjust the parameters of the multiple third models based on the adjustment value corresponding to the third mode to obtain the model parameters of the multiple fourth models. Optionally, the model parameters of any third model among the multiple third models may include the scaling parameter a and the offset parameter b mentioned above. Optionally, the adjustment parameters include the adjustment amount of the scaling parameter a and / or the adjustment amount of the offset parameter b. Optionally, the adjustment value corresponding to the third mode may include the adjustment value corresponding to each third model in the multiple third models; or, the adjustment value corresponding to the third mode includes the adjustment value shared by the multiple third models.
[0207] The following description will be made by taking as an example that the adjustment value shared by the plurality of third models includes the adjustment amount of the scaling parameter a and / or the adjustment amount of the bias parameter b.
[0208] For example, when the decoder adjusts the scaling parameter a of each third model, the decoder can obtain the scaling parameters a of the multiple fourth models by any one of the following methods: multiplying the scaling parameter a of each third model by the adjustment amount of the scaling parameter a, subtracting the adjustment amount of the scaling parameter a from the scaling parameter a of each third model, or adding the scaling parameter a of each third model to the adjustment amount of the scaling parameter a. Similarly, when the decoder adjusts the bias parameter b of each third model, the decoder can obtain the offset parameter b of the multiple fourth models by any one of the following methods: multiplying the offset parameter b of each third model by the adjustment amount of the offset parameter b, subtracting the adjustment amount of the offset parameter b from the offset parameter b of each third model, or adding the offset parameter b of each third model to the adjustment amount of the offset parameter b.
[0209] In some embodiments, the method 400 may further include:
[0210] Based on values of reconstructed samples in the template area of the first prediction block, the reconstructed samples in the template area of the first prediction block are divided into the multiple sample groups, the second sample group being any one of the multiple sample groups; and the reconstructed samples in the template area of the current block whose positions correspond to the second sample group are divided into the first sample group.
[0211] Exemplarily, the decoder divides the reconstructed samples in the template area of the first prediction block into the multiple sample groups based on the values of the reconstructed samples in the template area of the first prediction block, and the second sample group is any one of the multiple sample groups; the reconstructed samples in the template area of the current block whose positions correspond to the second sample group are divided into the first sample group; based on this, the decoder can determine the multiple third models based on each second sample group obtained by dividing the reconstructed samples in the template area of the first prediction block and the first sample group corresponding to each second sample group.
[0212] For example, the decoder may divide the reconstructed samples in the template area of the first prediction block into one or more second sample groups based on at least one predefined numerical range. Alternatively, the decoder may determine at least one numerical range based on the reconstructed samples in the template area of the first prediction block, and then divide the reconstructed samples in the template area of the first prediction block into one or more second sample groups based on the at least one numerical range.
[0213] Exemplarily, the at least one predefined numerical range may be implemented by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in the decoder, or the at least one predefined numerical range may be agreed upon or defined by a standard protocol.
[0214] Exemplarily, the at least one numerical range may be at least one absolute value range. Accordingly, the decoder may classify, based on the value of any reconstructed sample in the template area of the first prediction block, the sample into a numerical range corresponding to the value of the any reconstructed sample.
[0215] Exemplarily, the decoder may represent or determine the at least one numerical range by a plurality of numerical values.
[0216] Exemplarily, the at least one numerical range and the at least one group may be in a one-to-one correspondence, or the at least one numerical range and the at least one group may be in a many-to-one relationship.
[0217] In this embodiment, the decoder divides the reconstructed samples in the template area of the first prediction block into the multiple sample groups based on the values of the reconstructed samples in the template area of the first prediction block, and divides the reconstructed samples in the template area of the current block based on the division result of the reconstructed samples in the template area of the first prediction block. This can enable the multiple third models to match the distribution of the reconstructed samples in the template area of the first prediction block as much as possible, thereby improving the illumination compensation effect of the multiple third models, and thereby improving the decoding performance of the decoder.
[0218] Of course, the sample group involved in this application can also be understood or equivalently replaced by terms with similar meanings such as collection and grouping.
[0219] In some embodiments, an average value of reconstructed samples in the template area of the first prediction block is determined; based on the average value, the reconstructed samples in the template area of the first prediction block are divided into the multiple sample groups; the multiple sample groups include: a sample group whose reconstructed sample values are greater than or equal to the average value, and a sample group whose reconstructed sample values are less than the average value.
[0220] Exemplarily, when the multiple third models are two third models, the decoder can divide the reconstructed samples in the template area of the first prediction block into: a sample group whose reconstructed sample values are greater than or equal to the average value, and a sample group whose reconstructed sample values are less than the average value based on the average value.
[0221] Of course, in other alternative embodiments, the decoder may also divide the reconstructed samples in the template area of the first prediction block whose offset is less than or equal to a preset threshold into reconstructed samples in one sample group, or divide the reconstructed samples in the template area of the first prediction block in other ways. Furthermore, the decoder may first divide the reconstructed samples in the template area of the current block, and then divide the reconstructed samples in the template area of the first prediction block based on the division result of the reconstructed samples in the template area of the current block. This application does not specifically limit this.
[0222] In some embodiments, the template area of the current block includes an upper template area and / or a left template area.
[0223] Exemplarily, the template area of the current block may be only the upper template area, or the template area of the current block may be only the left template area, or the template area of the current block may include both the upper template area and the left template area. Taking the example of a decoder determining the first model based on the reconstructed samples within the template area of the current block and the reconstructed samples within the template area of the first prediction block, the decoder predicts the current block based on the IBC mode used by the current block to obtain the first prediction block, obtains the upper template area of the first prediction block and the upper template area of the current block, and calculates the model parameters of the first model based on the upper template area of the first prediction block and the upper template area of the current block.
[0224] In this embodiment, it is proposed to add illumination compensation only to the upper template area and only to the left template area. In other words, it is proposed to use only the template area samples on a single side to calculate the linear model parameters and then perform illumination compensation, which can improve the flexibility and compensation effect of illumination compensation.
[0225] Exemplarily, the upper template area includes but is not limited to at least one of the following: a template area directly above, an upper left template area, and an upper right template area.
[0226] For example, taking the upper template area of the current block as an example, the upper template area of the current block can be the template area directly above the current block, or the template area directly above and to the upper left of the current block, or the template area directly above and to the upper right of the current block. The setting can include the template area directly above, directly above, and to the upper right of the current block. Among them, the template area directly above the current block can refer to the template area above the current block, whose left boundary is aligned with the left boundary of the current block, and whose right boundary is aligned with the right boundary of the current block; the template area to the upper right of the current block can refer to the template area above the current block, whose left boundary is aligned with the right boundary of the current block; the template area to the upper left of the current block can refer to the template area above the current block, whose right boundary corresponds to the left boundary of the current block.
[0227] Exemplarily, the left template area includes but is not limited to at least one of the following: a template area on the left, a template area on the upper left, and a template area on the lower left.
[0228] For example, taking the left template area of the current block as an example, the left template area of the current block can be the template area on the left side of the current block, or the template area on the left side and upper left side of the current block, or the template area on the left side and lower left side of the current block. The setting can include the template area on the left side, upper left side, and lower left side of the current block. Among them, the template area on the left side of the current block can refer to the template area on the left side of the current block, whose upper boundary is aligned with the upper boundary of the current block, and whose lower boundary is aligned with the lower boundary of the current block; the template area on the upper left side of the current block can refer to the template area on the left side of the current block, whose lower boundary is aligned with the upper boundary of the current block; the template area on the lower left side of the current block can refer to the template area on the left side of the current block, whose upper boundary corresponds to the lower boundary of the current block.
[0229] In some embodiments, the sampling step used when the template area of the current block is the upper template area or the left template area is smaller than the sampling step used when the template area of the current block includes the upper template area and the left template area; wherein, the samples obtained in the template area of the current block according to the sampling step are used to determine the model corresponding to the mode in the at least one mode.
[0230] Exemplarily, the difference between a sampling step used when the template area of the current block includes the upper template area and the left template area and a sampling step used when the template area of the current block is the upper template area or the left template area is a preset value, and the preset value is any value greater than 0. For example, the difference between a sampling step used when the template area of the current block includes the upper template area and the left template area and a sampling step used when the template area of the current block is the upper template area or the left template area is 2 or another value.
[0231] Exemplarily, the sampling step used when the template area of the current block includes the upper template area and the left template area is a multiple of the sampling step used when the template area of the current block is the upper template area or the left template area. For example, the sampling step used when the template area of the current block includes the upper template area and the left template area is twice or another multiple of the sampling step used when the template area of the current block is the upper template area or the left template area.
[0232] Because more samples are typically used when calculating model parameters using samples from the upper and left template regions than when calculating model parameters using the upper template region alone, the model accuracy when using samples from the upper and left template regions to calculate model parameters is correspondingly higher than when using the upper template region alone to calculate model parameters. In this embodiment, the number of samples involved in model calculation is increased by reducing the sampling step size; or even by selecting all available samples within the template region to calculate linear model parameters; thereby improving the model accuracy when calculating model parameters using only the upper template region or the left template region alone.
[0233] In some embodiments, when the template area of the current block is the upper template area, the number of sample rows of the upper template area is greater than the number of sample rows of the upper template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the upper template area, the number of sample columns of the upper template area is greater than the number of sample columns of the upper template area when the template area of the current block includes the upper template area and the left template area.
[0234] Exemplarily, when the template area of the current block is the upper template area, the number of sample rows of the upper template area is N (a positive integer) more than the number of sample rows of the upper template area when the template area of the current block includes the upper template area and the left template area. Alternatively, when the template area of the current block is the upper template area, the number of sample rows of the upper template area is a multiple of the number of sample rows of the upper template area when the template area of the current block includes the upper template area and the left template area. For example, when the template area of the current block is the upper template area, the number of sample rows of the upper template area is 2 times or other multiples of the number of sample rows of the upper template area when the template area of the current block includes the upper template area and the left template area.
[0235] Exemplarily, when the template area of the current block is the upper template area, the number of sample columns of the upper template area is M (a positive integer) rows more than the number of sample columns of the upper template area when the template area of the current block includes the upper template area and the left template area. Alternatively, when the template area of the current block is the upper template area, the number of sample columns of the upper template area is a multiple of the number of sample columns of the upper template area when the template area of the current block includes the upper template area and the left template area. For example, when the template area of the current block is the upper template area, the number of sample columns of the upper template area is 2 times or other multiples of the number of sample columns of the upper template area when the template area of the current block includes the upper template area and the left template area.
[0236] Because more samples are typically used when calculating model parameters using samples from the upper and left template regions than when calculating model parameters using the upper template region alone, the model accuracy when calculating model parameters using samples from the upper and left template regions is correspondingly higher than when calculating model parameters using the upper template region alone. In this embodiment, by expanding the template region area to obtain wider and more spatial information, the model accuracy when calculating model parameters using the upper template region alone can be improved.
[0237] In some embodiments, when the template area of the current block is the left template area, the number of sample rows of the left template area is greater than the number of sample rows of the left template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the left template area, the number of sample columns of the left template area is greater than the number of sample columns of the left template area when the template area of the current block includes the upper template area and the left template area.
[0238] Exemplarily, when the template area of the current block is the left template area, the number of sample rows of the left template area is N (a positive integer) more than the number of sample rows of the left template area when the template area of the current block includes the upper template area and the left template area. Alternatively, when the template area of the current block is the left template area, the number of sample rows of the left template area is a multiple of the number of sample rows of the left template area when the template area of the current block includes the upper template area and the left template area. For example, when the template area of the current block is the left template area, the number of sample rows of the left template area is 2 times or other multiples of the number of sample rows of the left template area when the template area of the current block includes the upper template area and the left template area.
[0239] Exemplarily, when the template area of the current block is the left template area, the number of sample columns of the left template area is M (a positive integer) rows more than the number of sample columns of the left template area when the template area of the current block includes the upper template area and the left template area. Alternatively, when the template area of the current block is the left template area, the number of sample columns of the left template area is a multiple of the number of sample columns of the left template area when the template area of the current block includes the upper template area and the left template area. For example, when the template area of the current block is the left template area, the number of sample columns of the left template area is 2 times or other multiples of the number of sample columns of the left template area when the template area of the current block includes the upper template area and the left template area.
[0240] Because more samples are typically used when calculating model parameters using samples from the upper and left template regions than when calculating model parameters using the left template region alone, the model accuracy when calculating model parameters using samples from the upper and left template regions is correspondingly higher than when calculating model parameters using the left template region alone. In this embodiment, by expanding the template region area to obtain wider and more spatial information, the model accuracy when calculating model parameters using the left template region alone can be improved.
[0241] FIG. 11 is an example of a template area of a current block provided in this application.
[0242] As shown in Figure 11, (a) in Figure 11 is an example in which the template area of the current block includes both the upper template area and the left template area, (b) in Figure 11 is an example in which the template area of the current block only includes the upper template area, and (c) in Figure 11 is an example in which the template area of the current block only includes the left template area. As shown in Figure 11, for the case in which the template area of the current block only includes the upper template area or the left template area, the template area can be directly expanded. For example, as shown in (b) in Figure 11, when the template area of the current block only includes the upper template area, the template height can be kept unchanged and the width of the template area can be increased (i.e., the extended uploaded template area is increased); as shown in (c) in Figure 11, when the template area of the current block only includes the left template area, the template width can be kept unchanged and the height of the template area can be increased (i.e., the extended left template area is increased).
[0243] Of course, the number of reference rows in the template area can also be increased to increase the number of samples and obtain greater spatial information. For example, the upper template area is composed of two, three or four rows of reconstructed samples, while the left template area is composed of two, three or four columns of reconstructed samples. The present application expands the template area, and different expansion methods can bring more samples and more spatial information to participate in the calculation of model parameters. Even in some embodiments, the decoder can also add a boundary check for the selection of the template area of the current block. For example, for unavailable samples, the decoder does not use the template area or uses the partially available samples of the template area to calculate the model parameters.
[0244] In some embodiments, the S420 may include:
[0245] Decode the code stream and determine at least one index; wherein the at least one index includes at least one of the following: an index for indicating whether the model corresponding to the first prediction mode is a single model or multiple models, an index for indicating the template area used by the model corresponding to the first prediction mode, an index for indicating whether the model corresponding to the first prediction mode is a model after parameter adjustment, and an adjustment parameter corresponding to the first prediction mode; based on the at least one index, determine the first prediction mode.
[0246] Exemplarily, when the IBC mode used by the current block is the IBCAMVP mode, the decoder decodes the code stream to determine the at least one index, and determines a first prediction mode based on the at least one index; then, based on the model corresponding to the first prediction mode, the first prediction block obtained by predicting the current block using the IBCAMVP mode is subjected to illumination compensation to obtain a second prediction block of the current block.
[0247] Of course, in other alternative embodiments, when the IBC mode used by the current block is the IBC merge mode, the decoder may also decode the bitstream to determine the at least one index and determine the first prediction mode based on the at least one index. This application does not specifically limit this. Furthermore, this application does not specifically limit the method for parsing the at least one index. For example, the at least one index may be parsed using a context-based method or an equal probability method.
[0248] In some embodiments, the S410 may include:
[0249] If the IBC mode used by the current block is the IBC Advanced Motion Vector Prediction (AMVP) mode, the code stream is decoded to determine a first flag; if the first flag indicates that the current block is allowed to use the IBC-LIC mode, determining that the current block uses the IBC-LIC mode.
[0250] Exemplarily, if the IBC mode used by the current block is the IBC AMVP mode, the decoder obtains a first identifier by parsing the bitstream. If the first identifier indicates that the current block is permitted to use the IBC-LIC mode, the decoder obtains a first index by decoding the bitstream. The first index is used to indicate the first prediction mode in at least one mode. Based on this, the decoder may perform illumination compensation on a first prediction block obtained by predicting the current block using the IBC mode used by the current block, based on a model corresponding to the first prediction mode, to obtain a second prediction block for the current block.
[0251] In some embodiments, the S410 may include:
[0252] If the IBC mode used by the current block is the IBC merge mode, construct a merge candidate list; determine a second index, where the second index is used to indicate a block vector BV from the current block to the first reference block of the current block in the merge candidate list; if the first reference block uses the IBC-LIC mode, determine that the current block uses the IBC-LIC mode.
[0253] Exemplarily, if the IBC mode used by the current block is the IBC merge mode, the decoder constructs a merge candidate list; then, by parsing the bitstream, obtains a second index; the second index is used to indicate, in the merge candidate list, a block vector BV from the current block to the first reference block of the current block; if the first reference block uses the IBC-LIC mode, then the current block is determined to use the IBC-LIC mode. If the first reference block does not use the IBC-LIC mode, then the current block is determined not to use the IBC-LIC mode.
[0254] In addition, for the current block, different color components are decoded independently of each other. For example, if the luma component has been decoded and the current color component to be decoded is a chroma component and motion vector information / block vector information needs to be obtained from the luma component, the IBC-LIC usage identifier of the luma component can be inherited at the same time.
[0255] In some embodiments, the S420 may include:
[0256] The prediction mode used by the first reference block is determined as the first prediction mode.
[0257] Exemplarily, if the IBC mode used by the current block is the IBC merge mode, the decoder constructs a merge candidate list; then obtains a second index by parsing the code stream; the second index is used to indicate the block vector BV of the first reference block from the current block to the current block in the merge candidate list; if the first reference block uses the IBC-LIC mode, the decoder determines the prediction mode used by the first reference block as the first prediction mode.
[0258] Of course, in other alternative embodiments, if the IBC mode used by the current block is the IBC merge mode, the decoder may also determine whether the current block uses the IBC-LIC mode or not by other means, and when the current block uses the IBC-LIC mode, use other methods to determine the first prediction mode. This application does not specifically limit this. For example, for the IBC-LIC technology in the merge mode, the IBC-LIC mode used by the current block may not be obtained by inheritance, that is, the first prediction mode may be determined using a scheme similar to the AMVP IBC-LIC or a default prediction mode. For another example, for the IBC-LIC technology in the merge mode, the use or non-use of the IBC-LIC may not be determined by inheriting surrounding information, but may be determined by calculating the distortion cost of the encoder, and the use or non-use situation may be transmitted to the decoding end in the form of an identifier and an index. The decoding end parses the identifier used by the technology in the merge mode to determine whether the current coding unit uses the IBC-LIC technology.
[0259] In some embodiments, before S410, the method further includes:
[0260] Obtain a second identifier; wherein the second identifier indicates whether the IBC mode used by the current block is the IBC merge mode.
[0261] Exemplarily, if the second identifier indicates that the IBC mode used by the current block is the IBC merge mode, the decoder determines that the IBC mode used by the current block is the IBC merge mode; further, the decoder constructs a merge candidate list; then obtains a second index by parsing the code stream; the second index is used to indicate the block vector BV of the first reference block from the current block to the current block in the merge candidate list; if the first reference block uses the IBC-LIC mode, it is determined that the current block uses the IBC-LIC mode; further, the decoder can determine the first prediction mode used for the current block based on the prediction mode used when performing illumination compensation on the first reference block.
[0262] Exemplarily, if the second identifier indicates that the IBC mode used by the current block is not the IBC merge mode, the decoder determines that the IBC mode used by the current block is the IBC AMVP mode. Further, the decoder obtains the first identifier by parsing the bitstream. If the first identifier indicates that the current block is allowed to use the IBC-LIC mode, the decoder obtains a first index by decoding the bitstream, and determines the prediction mode indicated by the first index as the prediction mode used by the current block.
[0263] In some embodiments, the S430 may include:
[0264] If the first prediction mode corresponds to a single model, illumination compensation is performed on the prediction samples in the first prediction block based on the single model to obtain the second prediction block.
[0265] Exemplarily, if the first prediction mode is the first mode or the second mode mentioned above, that is, the model corresponding to the first prediction mode is the first model or the second model mentioned above, the decoder performs illumination compensation on the predicted samples in the first prediction block based on the single model to obtain the second prediction block.
[0266] In some embodiments, the S430 may include:
[0267] If the first prediction mode corresponds to multiple models, then determine the model used by any one prediction sample in the first prediction block from the multiple models; perform illumination compensation on the any one prediction sample based on the model used by the any one prediction sample to obtain the second prediction block.
[0268] Exemplarily, if the first prediction mode is the third mode mentioned above, that is, the model corresponding to the first prediction mode is the multiple third models mentioned above, the decoder determines the third model used by any one prediction sample in the first prediction block from the multiple third models; performs illumination compensation on the any one prediction sample based on the third model used by the any one prediction sample to obtain the second prediction block.
[0269] Exemplarily, if the first prediction mode is the fourth mode mentioned above, that is, the model corresponding to the first prediction mode is the multiple fourth models mentioned above, the decoder determines the fourth model used by any one prediction sample in the first prediction block from the multiple fourth models; performs illumination compensation on the any one prediction sample based on the fourth model used by the any one prediction sample to obtain the second prediction block.
[0270] In some embodiments, the decoder determines the model corresponding to the interval in which the value of the arbitrary prediction sample lies among the multiple models as the model used by the arbitrary prediction sample.
[0271] Exemplarily, the model corresponding to the interval may refer to an interval obtained by dividing the reconstructed samples within the template region of the current block for use in determining the model. In other words, the decoder may determine, from among the multiple models, the model corresponding to the interval for determining the model within which the value of the arbitrary prediction sample lies as the model to be used for the arbitrary prediction sample.
[0272] In some embodiments, the S410 may include:
[0273] If at least one of the following conditions is met, it is determined whether the current block uses the IBC-LIC mode:
[0274] The prediction type used by the current block is IBC mode;
[0275] Allowing the current sequence to which the current block belongs to use the IBC-LIC mode;
[0276] The area of the current block is greater than or equal to a preset first threshold;
[0277] The area of the current block is less than or equal to a preset second threshold;
[0278] The type of the current image to which the current block belongs is a preset type;
[0279] The IBC mode used by the current block is not a mode of a type that is used simultaneously with the IBC-LIC mode.
[0280] Exemplarily, the preset type may be an I frame type.
[0281] In other words, the use of the decoding method provided in this application can be restricted based on the type of image, such as the decoding method provided in this application is only allowed to be used when the current image type is an I frame, and the decoding method provided in this application is not allowed to be used when the current image type is a B / P frame.
[0282] Exemplarily, if the prediction type used by the current block is the IBC mode, and the current sequence to which the current block belongs is allowed to use the IBC-LIC mode, and the IBC mode used by the current block is not the IBC merge mode, and the area of the current block is greater than 32, the decoder obtains a first identifier by parsing the bitstream. If the first identifier indicates that the current block is allowed to use the IBC-LIC mode, the decoder determines that the current block uses the IBC-LIC mode.
[0283] In some embodiments, the method 400 may further include:
[0284] Obtaining a residual block of the current block;
[0285] A reconstructed block of the current block is determined based on the residual block and the second prediction block.
[0286] Exemplarily, the decoder decodes the code stream to obtain the residual block, and adds the residual block and the second prediction block to obtain the reconstructed block.
[0287] The main idea of this technical proposal is to provide more different models and modes for IBC-LIC.
[0288] The specific steps are:
[0289] Depending on the template area included in the calculation of the linear model, it can be divided into a mode in which the upper template and the left template are used simultaneously, a mode in which only the upper template is used, and a mode in which only the left template is used. This mode type is the template area selection mode. In addition, the current encoding is allowed to classify the reconstructed samples and the predicted samples according to the sample values, and the linear model is calculated for each type of sample group (i.e., the reconstructed sample group and the predicted sample group). After that, the predicted samples of each type are linearly transformed according to their respective linear models. This mode is the multi-model IBC-LIC. In addition, the slope of the calculated linear model can also be adjusted so that the adjusted linear model better matches the changing relationship between the predicted block and the original sample block. This mode type is the parameter adjustment mode.
[0290] For ease of description, the types of template area selection modes are marked as follows:
[0291] IBC-LIC is a mode in which both the upper and left template regions are used to calculate the linear model, IBC-LIC-T is a mode in which only the upper template region is used to calculate the linear model, and IBC-LIC-L is a mode in which only the left template region is used to calculate the linear model.
[0292] The multi-model schema is marked as follows:
[0293] IBC-LIC-M is a mode in which both the upper and left template regions are used for sample classification and linear model calculation, IBC-LIC-MT is a mode in which only the upper template region is used for sample classification and linear model calculation, and IBC-LIC-ML is a mode in which only the left template region is used for sample classification and linear model calculation.
[0294] The parameter adjustment mode type is marked as follows:
[0295] IBC-LIC-slope adjusts the slope of a linear model using a scaling factor or compensation value. This type of adjustment can be further subdivided into different modes, including those determined by different scaling factors or compensation values, by using this technique for a single model or multiple models, and by different template regions. For example, IBC-LIC-slope0 through IBC-LIC-slope3 can be used to represent four linear model slope adjustments for IBC-LIC, and IBC-LIC-slope4 can be used to represent a linear model slope adjustment for IBC-LIC-M.
[0296] The encoding and decoding method provided in this application is exemplarily described below from the perspectives of an encoder and a decoder.
[0297] From the perspective of whether to calculate the distortion cost of the linear model, the encoding and decoding solution of this application provides the following two embodiments:
[0298] Example 1:
[0299] On the encoding side, the current coding unit performs an IBC matching search, tries various IBC-LIC modes and other IBC prediction modes, and calculates the cost information costPred of the prediction block transformed by the linear model corresponding to each IBC-LIC mode and the original image block corresponding to the current coding unit. In addition, for various IBC-LIC modes, the cost information costTemplate of the template area samples transformed by the linear model and the reconstructed image samples of the corresponding template area (of course, it can also be the original image samples) is calculated; sorted according to the size of costTemplate, the one with a smaller cost uses fewer codewords for encoding and transmission, and the one with a larger cost uses more codewords for encoding and transmission. Compare the costPred under different IBC prediction modes, and replace the one with the smaller cost as the optimal mode for the current coding block under the IBC AMVP mode. The current coding unit tries the prediction mode under merge mode. First, a merge mode list is constructed and BV information is obtained from the surrounding reference blocks. The mode list information also includes information about the IBC-LIC, IBC-CIIP, IBC-GPM and IBC-RR prediction modes corresponding to the obtained block. If IBC-LIC is turned on in the obtained information, the current coding unit also needs to use IBC-LIC technology to perform linear transformation after obtaining the prediction block based on BV. The IBC-LIC mode index is also obtained through inheritance.
[0300] On the decoder side, if the current decoding unit uses IBC merge mode, it parses the bitstream to obtain the index of the merge mode list. Based on the index, it retrieves the corresponding BV and related information. If IBC-LIC is enabled, the current decoding unit also uses IBC-LIC technology; if IBC-LIC is disabled, the current decoding unit also does not use IBC-LIC technology. If the current decoding unit uses IBC AMVP mode, it parses the bitstream to obtain information such as the IBC-LIC usage identifier and mode index. Firstly, for all IBC-LIC-related modes, the costTemplate is calculated in the template area. The costTemplate calculation method is the same as that on the encoder side: the cost information (costTemplate) is calculated between the template area samples transformed by the linear model and the corresponding template area reconstructed image samples, and the costTemplate is sorted by size. Secondly, the final IBC-LIC mode used by the current decoding unit is determined by combining the IBC-LIC mode index obtained from the bitstream and the sorted mode information. Based on the determined IBC-LIC mode, samples in the corresponding template area are selected to calculate the linear model. The linear model is then determined based on the IBC-LIC mode. The calculated linear model is applied to the reference block, i.e. the prediction block, and a new prediction block is obtained after linear transformation.
[0301] In this embodiment, when the current coding unit uses the IBC-LIC mode under the IBC AMVP mode, the costTemplates of various IBC-LIC modes under the IBC AMVP mode are calculated, and the various IBC-LIC modes are sorted based on the calculated costTemplates. The optimal IBC-LIC mode among the sorted IBC-LIC modes is then indicated to the decoder via the bitstream. Accordingly, when the decoder determines that the current decoding unit uses the IBC-LIC mode under the IBC AMVP mode, the costTemplates of various IBC-LIC modes under the IBC AMVP mode are calculated, and the various IBC-LIC modes are sorted based on the calculated costTemplates. The decoder then determines the optimal IBC-LIC mode for the current decoding unit by decoding the bitstream from among the sorted IBC-LIC modes.
[0302] Example 2:
[0303] On the encoding side, the current coding unit performs an IBC matching search, trying various IBC-LIC modes and other IBC prediction modes, and calculating the cost information costPred of the prediction block transformed by the linear model corresponding to each IBC-LIC mode and the reconstructed image sample corresponding to the current coding unit (of course, it can also be the original image sample). The costPred under different IBC prediction modes is compared, and the one with the smaller cost is replaced as the optimal mode for the current coding block under the IBC AMVP mode. The current coding unit tries the prediction mode under the merge mode. First, a merge mode list is constructed, and the BV information is obtained from the surrounding reference blocks. The mode list information also includes information on the IBC-LIC, IBC-CIIP, IBC-GPM, and IBC-RR prediction modes corresponding to the obtained block. If IBC-LIC is turned on in the obtained information, the current coding unit also needs to use IBC-LIC technology to perform a linear transformation after obtaining the prediction block based on the BV. The IBC-LIC mode index is also obtained through inheritance.
[0304] On the decoding side, if the current decoding unit uses the IBC merge mode, the bitstream is parsed to obtain the index of the merge mode list, and the corresponding BV and related information are obtained based on the index. If IBC-LIC is turned on, the current decoding unit also uses the IBC-LIC technology; if IBC-LIC is turned off, the current decoding unit also does not use the IBC-LIC technology. If the current decoding unit is in IBC AMVP mode, the bitstream is parsed to obtain IBC-LIC related usage identifiers and mode indexes and other information. According to the determined IBC-LIC mode, samples in the corresponding template area are selected to calculate the linear model, and it is determined whether to modify the linear model parameters based on the IBC-LIC mode. The calculated linear model is applied to the reference block, i.e., the prediction block, and a new prediction block is obtained after linear transformation.
[0305] In this embodiment, when the current coding unit uses the IBC-LIC mode in the IBC AMVP mode, the encoder may indicate information such as the IBC-LIC usage identifier and mode index to the decoder via the bitstream. Accordingly, when the decoder determines that the current decoding unit uses the IBC-LIC mode in the IBC AMVP mode, it may determine the optimal IBC-LIC mode for the current decoding unit by decoding the bitstream.
[0306] It is worth noting that this application does not specifically limit the calculation process of the model corresponding to IBC-LIC in the above-mentioned Examples 1 and 2. For example, its specific implementation can refer to the schemes described above (such as the first model, the second model, multiple third models, and multiple fourth models), and will not be repeated here. To control complexity and facilitate implementation, this application only uses two linear models for transformation within a prediction block for multi-model modes such as IBC-LIC-M. Of course, it can also use three, four, or five linear models. The method is the same as for two linear models and will not be elaborated in this article.
[0307] Taking two linear models as an example, the process of IBC-LIC-M is as follows:
[0308] Based on the mean value of the template region samples of the reference block (i.e., the first prediction block mentioned above), the samples within the template region are divided into two categories: one category with sample values greater than the mean value of the template region samples; the other category with sample values less than or equal to the mean value of the template region samples. Similarly, as in the first step above, the template region samples of the current prediction block (i.e., the current block mentioned above) are also divided into two categories based on the coordinates corresponding to the template region samples of the reference block, forming a combination. Next, the linear model parameters are calculated for each of these two categories of samples, using the same calculation process as described above and the single model calculation process. For example, for ease of description, the linear model calculated for the category of samples greater than the mean value of the template region samples is referred to as Model 1, and vice versa. Next, a linear transformation is performed on the reference block. Specifically, a linear model is selected based on the sample values within the reference block. If the sample value is greater than the mean value of the template region samples, Model 1 is used for the linear transformation; if the sample value is less than or equal to the mean value of the template region samples, Model 2 is used for the linear transformation, resulting in the prediction block of the current coding unit (i.e., the second prediction block mentioned above).
[0309] It is worth noting that the selection of the above-mentioned model 1 does not necessarily have to be greater than the sample mean of the template area, but can also be greater than or equal to, less than or equal to, etc. On the contrary, the other model 2 can be less than, greater than, etc. This application does not make specific limitations on this.
[0310] The following takes Example 1 as an example to exemplify the specific implementation of the codec.
[0311] The basic process of the encoder is as follows:
[0312] The encoder traverses the prediction mode. If the current prediction mode type is IBC mode, the flag bit that allows the use of this technology is obtained. This flag bit is a sequence-level flag bit, indicating that the current encoder allows the use of IBC-LIC mode, which can be in the form of sps_ibc_lic_enable_flag.
[0313] Step 1:
[0314] If the IBC-LIC usage permission flag is true, the area of the current coding unit is greater than threshold 1, and the area of the current coding unit is less than threshold 2, the encoder attempts the IBC-LIC prediction method, that is, executes step 2; if the IBC-LIC usage permission flag or other conditions such as area are not met, the encoder does not attempt the IBC-LIC prediction method, that is, the encoder skips step 2 and directly executes step 3.
[0315] Step 2:
[0316] Obtain reconstructed samples of the upper and left template regions of the current coding unit and reconstructed samples of the upper and left template regions of the reference block.
[0317] Step 2.1:
[0318] The encoder traverses various prediction modes in the IBC AMVP mode and calculates the corresponding rate-distortion cost.
[0319] The calculation of the prediction block may include:
[0320] The encoding end tries each IBC-LIC related mode, determines the template area according to the IBC-LIC mode, and obtains the number of samples under the corresponding mode. If the current mode is a multi-model related mode, the samples are classified according to the sample mean, and the linear models are calculated separately. The calculation process can refer to the scheme described above to obtain the scaling factors a1 and a2 and the offset parameters b1 and b2; if it is not a multi-model related mode, there is no need to classify the samples, and only one linear model, i.e., a and b, is calculated. If the current mode is a parameter adjustment mode, the model parameters of the linear model are adjusted according to the adjustment values of the scaling parameters and / or the adjustment values of the bias parameters in different modes, and the new scaling factor a and offset parameter b are recalculated. The prediction block is linearly transformed to obtain a new prediction block for the current coding unit.
[0321] In addition, the calculation of the template area cost includes:
[0322] Based on the calculated linear parameters for each IBC-LIC mode, a linear transformation is performed on the predicted samples in the template region to obtain new predicted samples. The distortion cost is then calculated for each reconstructed sample in the corresponding region to obtain the costTemplate corresponding to each IBC-LIC mode. The IBC-LIC modes are sorted based on the size of the costTemplate. The cost calculated for the template region is used to determine the codewords required to transmit each mode. For example, modes with lower costs are allocated fewer codewords for transmission, while modes with higher costs are allocated more codewords for transmission.
[0323] The calculation of the rate-distortion cost may include:
[0324] The prediction block after linear transformation according to each IBC-LIC mode is subtracted from the original image of the corresponding area to obtain the residual block of the current coding unit. After transformation and quantization, inverse quantization and inverse transformation, the residual block is superimposed on the prediction block to obtain a reconstructed block. The distortion between the reconstructed block and the original image is calculated, and the index codeword and residual codeword required for encoding in the IBC-LIC mode are taken into account. The minimum rate-distortion cost costAmvp is traversed across various modes.
[0325] Step 2.2:
[0326] The encoder constructs the list information under the IBC merge mode, traverses each candidate mode and calculates the corresponding rate-distortion cost.
[0327] Specifically, the current coding unit traverses the candidate BVs in the merge list. If the inherited information indicates that IBC-LIC is enabled, the current coding unit obtains the reference block based on the BV information. At the same time, the adjacent template area samples of the current coding unit and the reference block are obtained according to the inherited IBC-LIC mode, and the linear model parameters are calculated. The reference block is transformed according to the linear model parameters, and the steps are the same as above to obtain the final prediction block. The difference between the prediction block and the original sample corresponding to the current coding unit is used to obtain the residual of the current coding unit. The rate-distortion cost value is calculated through operations such as transformation and quantization, recorded as costIdx1; the other candidate BVs in the merge list are traversed and the rate-distortion cost values, such as costIdx2, costIdx3, and costIdx4, are calculated using the same method. The cost values such as costIdx1 and costIdx2 are compared, and the minimum cost value is recorded as costMerge.
[0328] Step 3:
[0329] The encoder traverses other prediction technologies and calculates the rate-distortion cost corresponding to each prediction mode, and selects the prediction mode corresponding to the minimum cost as the optimal prediction mode for the current coding unit.
[0330] Specifically, if costAmvp is the minimum, the current coding unit uses the IBC-LIC mode under the AMVP mode, and the coding unit-level usage identifier of IBC-LIC (i.e., the first identifier mentioned above) needs to be set to true and written into the bitstream. In addition, the index of the IBC-LIC mode (i.e., the first index mentioned above) also needs to be written into the bitstream. If costMergeIbc is the minimum, the current coding unit uses the IBC-LIC mode under the merge mode, and the merge identifier of IBC (i.e., the second identifier mentioned above) is set to true and written into the bitstream, and the merge index is also written into the bitstream. If the current coding unit allows the use of illumination compensation technology and costLic is not the minimum, the current coding unit does not use illumination compensation technology, and the encoding unit-level usage identifier of the illumination compensation technology needs to be set to or not and written into the bitstream. Otherwise, other optimal prediction mode information is written into the bitstream. Since it is not strongly related to this technology, it will not be introduced in detail here.
[0331] Step 4:
[0332] After traversing all coding units, the code stream is output after loop filtering, entropy coding and other technologies.
[0333] Correspondingly, the basic process of the decoder is as follows:
[0334] The decoding end parses or obtains the lic permission flag, which is a sequence-level flag (sps_ibc_lic_enable_flag), indicating that the current decoder allows the use of IBC-LIC technology.
[0335] Step 1:
[0336] Parse the bitstream to obtain the prediction type of the current coding unit. If it is IBC mode, parse the merge usage identifier of the current coding unit. If the merge usage identifier of the current coding unit is not true, and sps_ibc_lic_enable_flag is true, and the area of the current coding unit is greater than threshold 1, and the area of the current coding unit is less than threshold 2, parse the bitstream to obtain the IBC-LIC usage identifier (cu_ibc_lic_flag). If the usage identifier is true, continue to parse the IBC-LIC mode index (cu_ibc_lic_index).
[0337] If the cu_ibc_lic_flag usage identifier of the current coding unit is no, go to step 3.
[0338] If the current merge usage indication bit is true, the merge index is parsed and the corresponding IBC-LIC information is obtained based on the parsed merge index. If the inherited IBC-LIC usage identifier is true, step 2 is executed based on the inherited IBC-LIC mode index; otherwise, step 3 is executed.
[0339] Step 2:
[0340] If the current mode is AMVP, the template region cost calculation is performed: Based on the calculated linear parameters of each IBC-LIC mode, a linear transformation is performed on the predicted samples in the template region to obtain new predicted samples. The distortion cost is then calculated for each reconstructed sample in the corresponding region to obtain the costTemplate corresponding to each IBC-LIC mode. The IBC-LIC modes are sorted based on the size of the costTemplate. The IBC-LIC mode is determined by combining the parsed IBC-LIC index and the sorted order of the modes.
[0341] It is worth noting that after sorting the IBC-LIC modes based on the size of the costTemplate, they can also be represented as a sorted list, so that the decoder can find the corresponding IBC-LIC mode in the sorted list based on the index and make predictions for the current coding unit. Of course, the concept of a list can also be omitted, and this application does not specifically limit this.
[0342] If it is merge mode, the IBC-LIC mode is determined based on the parsed IBC-LIC mode index.
[0343] Prediction block calculation:
[0344] According to the IBC-LIC mode, the reconstructed samples of the template area adjacent to the current coding unit are obtained, and the reconstructed samples of the template area adjacent to the reference coding unit are also obtained.
[0345] In single-model mode, the reconstructed samples are modeled using the linear model calculation method described above, and the scaling factor a and offset parameter b are calculated. A linear transformation is performed on the prediction block, with the transformation parameters being the scaling factor a and the offset b. A new prediction block is obtained by performing a linear transformation on the prediction block.
[0346] If the multi-model mode is used, the samples of the two template areas are classified according to the sample mean of the template area adjacent to the reference block. The samples whose sample values of the template area adjacent to the reference block are greater than the sample mean are classified as the first category. Correspondingly, the samples of the template area adjacent to the prediction block at the corresponding position are also classified as the first category. Conversely, the samples whose sample values of the template area adjacent to the reference block are less than or equal to the sample mean are classified as the second category. Similarly, the samples of the template area adjacent to the prediction block at the corresponding position are also classified as the second category. The linear model of the first category and the linear model of the second category are calculated for the samples of the first category and the second category respectively using the above model calculation method. The model parameters of the linear model of the first category include the scaling parameter a1 and the offset parameter b1, and the model parameters of the linear model of the second category include the scaling parameter a2 and the offset parameter b2. The first type of linear model or the second type of linear model is selected according to the size relationship between the sample value in the reference block and the sample mean of the template area. If the sample value in the reference block is greater than the sample mean of the template area, the first type of linear model is used for linear transformation. Conversely, if the sample value in the reference block is less than or equal to the sample mean of the template area, the second type of linear model is used for linear transformation to obtain a new prediction block.
[0347] If it is a parameter adjustment mode, the slope of the linear model is adjusted according to the adjustment value of the scaling parameter and / or the adjustment value of the bias parameter corresponding to the parameter adjustment mode to obtain a new scaling factor a and offset parameter b, and then a linear transformation is performed on the prediction block to obtain a new prediction block.
[0348] Step 3:
[0349] Continue to parse the information such as the usage identifier or index of the technology, and obtain the final prediction block of the current coding unit based on the parsed information.
[0350] Step 4:
[0351] Parse the bitstream to obtain residual information, and then perform inverse quantization and inverse transformation to obtain time-domain residual information. The final prediction block is superimposed with the time-domain residual information to obtain a reconstructed sample block.
[0352] Step 5:
[0353] After all reconstructed sample blocks undergo loop filtering and other technologies, the final reconstructed image is obtained, which can be used as both video output and as a reference for subsequent decoding.
[0354] It is worth noting that in the above embodiment, IBC-LIC has usage restrictions at the coding unit level. If the width and height product of the current coding unit is less than 32 or greater than 256, the illumination compensation technology is not allowed to be used. That is, threshold 1 is 32 and threshold 2 is 256. However, this restriction can be modified based on the coupling between the various technologies. For example, this embodiment can adopt the restriction that IBC-LIC cannot be used for coding units with a width and height product less than 32, while no restriction is imposed for large areas.
[0355] The following is an exemplary description of the grammatical elements involved in this application.
[0356] The following is a coding unit-level syntax element parsing table. Bold indicates that the syntax element needs to be parsed. For example, cu_ibc_lic_flag is a coding unit-level syntax element that needs to be parsed.
[0357] Table 2
[0358] Among them, sps_ibc_lic_enable_flag is the sequence-level illumination compensation enablement identifier, cu_ibc_lic_flag is the IBC-LIC usage identifier for the current coding unit, and cu_ibc_lic_index is the IBC-LIC index for the current coding unit. The following syntax elements have been parsed by parsing the bitstream to obtain their corresponding values before parsing cu_ibc_lic_flag and cu_ibc_lic_index. modeType is the prediction type used by the current coding unit, which can be MODE_INTRA for intra-frame prediction, MODE_INTER for inter-frame prediction, or MODE_IBC for intra-frame block copy (IBC) prediction; merge_flag is the merge usage identifier for the current coding unit; cbWidth and cbHeight are the width and height of the current coding block, respectively.
[0359] The parsing logic for the grammatical elements shown in Table 2 is as follows:
[0360] If the current sequence to which the current block belongs is allowed to use the IBC-LIC mode, the prediction type used by the current block is the IBC mode, the IBC mode used by the current block is not the IBC merge mode, and the area of the current block is greater than 32, then cu_ibc_lic_flag is obtained by parsing the code stream; if the value of cu_ibc_lic_flag is a first value (for example, 0), it is determined that the current block does not use the IBC-LIC mode; if the value of cu_ibc_lic_flag is a second value (for example, 1), it is determined that the current block uses the IBC-LIC mode; further, when the value of cu_ibc_lic_flag is the second value (for example, 1), the decoder parses cu_ibc_lic_index, where cu_ibc_lic_index indicates the prediction mode used by the current block.
[0361] It is worth noting that the conditions for parsing cu_ibc_lic_flag can be determined based on the existing coding tool coupling relationship in the standard. That is, if the current coding unit allows the use of other IBC-type prediction technologies and cannot be used simultaneously with IBC-LIC, the coding unit-level usage identifier of the aforementioned technology can be first parsed to determine whether to parse the IBC-LIC usage identifier of the current coding unit. If the coding unit usage identifier of the aforementioned tool is true, there is no need to parse the IBC-LIC usage identifier of the current coding unit; otherwise, the IBC-LIC usage identifier of the current coding unit is parsed.
[0362] Exemplarily, if the current sequence to which the current block belongs is allowed to use the IBC-LIC mode, and the prediction type used by the current block is the IBC mode, and the IBC mode used by the current block is not the IBC merge mode, and the area of the current block is greater than 32, and the IBC mode used by the current block is not a mode of a type used simultaneously with the IBC-LIC mode, the decoder obtains cu_ibc_lic_flag by parsing the bitstream; if the value of cu_ibc_lic_flag is a first value (for example, 0), it is determined that the current block does not use the IBC-LIC mode; if the value of cu_ibc_lic_flag is a second value (for example, 1), it is determined that the current block uses the IBC-LIC mode; further, when the value of cu_ibc_lic_flag is the second value (for example, 1), the decoder parses cu_ibc_lic_index, where cu_ibc_lic_index indicates the prediction mode used by the current block.
[0363] Taking Reconstruction-reordered IBC (RRIBC) as an example, the syntax element table shown in Table 2 can be updated to the syntax element table shown in Table 3. RRIBC is a technology that reorders reconstructed samples before searching for matching blocks. The reordering operation includes but is not limited to horizontal flipping and vertical flipping.
[0364] Table 3
[0365] Where cu_rribc_flip_type is the operation type of the RRIBC technology. If cu_rribc_flip_type is 0, it means that the current coding unit does not use RRIBC technology; otherwise, it means that the current coding unit uses RRIBC technology, and the value of cu_rribc_flip_type is the index of the operation type. It should be understood that Table 3 only shows the syntax parsing correlation between RRIBC and IBC-LIC. Similarly, other IBC coding tools also have such relationships, which will not be detailed in this article.
[0366] The parsing logic for the grammatical elements shown in Table 3 is as follows:
[0367] If the current sequence to which the current block belongs is allowed to use the IBC-LIC mode, the prediction type used by the current block is the IBC mode, the IBC mode used by the current block is not the IBC merge mode, the area of the current block is greater than 32, and the IBC mode used by the current block is not the RRIBC type mode, then cu_ibc_lic_flag is obtained by parsing the code stream; if the value of cu_ibc_lic_flag is a first value (for example, 0), it is determined that the current block does not use the IBC-LIC mode; if the value of cu_ibc_lic_flag is a second value (for example, 1), it is determined that the current block uses the IBC-LIC mode; further, when the value of cu_ibc_lic_flag is the second value (for example, 1), the decoder parses cu_ibc_lic_index, where cu_ibc_lic_index indicates the prediction mode used by the current block.
[0368] The encoding method according to an embodiment of the present application will be described below from the perspective of the encoder in conjunction with Figure 12.
[0369] FIG12 is a schematic flowchart of the encoding method 500 provided in this application.
[0370] It should be understood that the encoding method 500 may be performed by an encoder, for example, the video encoder 112 shown in FIG. 1 or the video encoder 200 shown in FIG. 2 .
[0371] As shown in FIG12 , the encoding method 500 may include:
[0372] S510, performing illumination compensation on a third prediction block by traversing a model corresponding to at least one mode to obtain a first distortion cost set; the third prediction block is a prediction block obtained by predicting the current block using an intra block copy (IBC) advanced motion vector prediction (AMVP) mode;
[0373] S520, performing illumination compensation on a fourth prediction block based on the inherited model to obtain a second distortion cost set; the fourth prediction block is a reference block in a merge candidate list obtained by predicting the current block based on an IBC merge mode;
[0374] S530 : Determine an IBC mode used by the current block based on the first distortion cost set and the second distortion cost set.
[0375] In some embodiments, the S530 may include:
[0376] If the minimum value in the first distortion cost set is smaller than the minimum value in the second distortion cost set and the distortion cost of the current block in other prediction modes, it is determined that the IBC mode used by the current block is the IBCAMVP mode.
[0377] In some embodiments, the method 500 may further include:
[0378] determining a first identifier;
[0379] The first flag indicates that the current block is allowed to use the intra block copying (IBC-LIC) mode based on local illumination compensation;
[0380] Encode the first identifier.
[0381] In some embodiments, the method 500 may further include:
[0382] determining a first index;
[0383] The first index is used to indicate a first prediction mode used by the current block in the at least one mode;
[0384] The first index is encoded.
[0385] In some embodiments, the first index is used to indicate the first prediction mode in the at least one sorted mode; the method 500 may further include:
[0386] determining a distortion cost for the at least one mode;
[0387] The distortion cost of any one of the at least one mode is determined based on a reconstructed sample within the template area of the current block and a sample obtained by performing illumination compensation on at least one predicted sample using a model corresponding to the any one mode, the at least one predicted sample including a predicted sample obtained by predicting a sample within the template area of the current block using the IBC-LIC mode;
[0388] The at least one pattern is sorted based on the distortion cost of the at least one pattern to obtain the at least one sorted pattern.
[0389] In some embodiments, the method 500 may further include:
[0390] Determining a first model based on reconstructed samples within the template area of the current block and reconstructed samples within the template area of the third prediction block;
[0391] The at least one mode includes a first mode corresponding to the first model.
[0392] In some embodiments, the method 500 may further include:
[0393] Adjusting parameters of the first model based on adjustment values corresponding to the first mode to obtain a second model;
[0394] The at least one mode includes a second mode corresponding to the second model.
[0395] In some embodiments, the method 500 may further include:
[0396] determining a plurality of third models;
[0397] Among them, any one of the multiple third models is determined based on a first sample group obtained by dividing the reconstructed samples within the template area of the current block and a second sample group obtained by dividing the predicted samples within the template area of the third prediction block; and the at least one mode includes a third mode corresponding to the multiple third models.
[0398] In some embodiments, the method 500 may further include:
[0399] Adjusting parameters of the plurality of third models based on the adjustment values corresponding to the third mode to obtain a plurality of fourth models;
[0400] The at least one mode includes a fourth mode corresponding to the plurality of fourth models.
[0401] In some embodiments, the method 500 may further include:
[0402] Based on values of the reconstructed samples in the template area of the third prediction block, dividing the reconstructed samples in the template area of the third prediction block into the multiple sample groups, wherein the second sample group is any one of the multiple sample groups;
[0403] The reconstructed samples whose positions within the template area of the current block correspond to the second sample group are divided into the first sample group.
[0404] In some embodiments, an average value of reconstructed samples in the template area of the third prediction block is determined; based on the average value, the reconstructed samples in the template area of the third prediction block are divided into the multiple sample groups; the multiple sample groups include: a sample group whose reconstructed sample values are greater than or equal to the average value, and a sample group whose reconstructed sample values are less than the average value.
[0405] In some embodiments, the adjustment parameter includes an adjustment amount of a scaling parameter and / or an adjustment amount of a bias parameter.
[0406] In some embodiments, the template area of the current block includes an upper template area and / or a left template area.
[0407] In some embodiments, a sampling step size used when the template area of the current block is the upper template area or the left template area is smaller than a sampling step size used when the template area of the current block includes the upper template area and the left template area;
[0408] The samples obtained in the template area of the current block according to the sampling step are used to determine a model corresponding to a mode in the at least one mode.
[0409] In some embodiments, when the template area of the current block is the upper template area, the number of sample rows of the upper template area is greater than the number of sample rows of the upper template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the upper template area, the number of sample columns of the upper template area is greater than the number of sample columns of the upper template area when the template area of the current block includes the upper template area and the left template area.
[0410] In some embodiments, when the template area of the current block is the left template area, the number of sample rows of the left template area is greater than the number of sample rows of the left template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the left template area, the number of sample columns of the left template area is greater than the number of sample columns of the left template area when the template area of the current block includes the upper template area and the left template area.
[0411] In some embodiments, the method 500 may further include:
[0412] Encode at least one of the following indexes:
[0413] An index used to indicate whether the model corresponding to the first prediction mode used by the current block is a single model or multiple models, an index used to indicate the template area used by the model corresponding to the first prediction mode, an index used to indicate whether the model corresponding to the first prediction mode is a model after parameter adjustment, and adjustment parameters corresponding to the first prediction mode.
[0414] In some embodiments, the S530 may include:
[0415] If the minimum value in the second distortion cost set is smaller than the minimum value in the first distortion cost set and the distortion cost of the current block in other prediction modes, it is determined that the IBC mode used by the current block is the IBC merge mode.
[0416] In some embodiments, the method 500 may further include:
[0417] Build a list of merge candidates;
[0418] Determine a second index, where the second index is used to indicate a block vector BV from the current block to the first reference block in the merge candidate list;
[0419] The second index is encoded.
[0420] In some embodiments, the method 500 may further include:
[0421] determining a second identifier;
[0422] The second flag indicates whether the IBC mode used by the current block is the IBC merge mode;
[0423] Encode the second identifier.
[0424] In some embodiments, the S510 may include:
[0425] If at least one of the following conditions is met, illumination compensation is performed on the third prediction block based on the model corresponding to the at least one mode to obtain the first distortion cost set:
[0426] The prediction type used by the current block is IBC mode;
[0427] Allowing the current sequence to which the current block belongs to use the IBC-LIC mode;
[0428] The area of the current block is greater than or equal to a preset first threshold;
[0429] The area of the current block is less than or equal to a preset second threshold;
[0430] The type of the current image to which the current block belongs is a preset type;
[0431] The IBC mode used by the current block is not a mode of a type that is used simultaneously with the IBC-LIC mode.
[0432] In some embodiments, the S520 may include:
[0433] Constructing the merge candidate list;
[0434] For the first candidate reference block in the merge candidate list, if the first candidate reference block uses the IBC-LIC mode, the second distortion cost set includes:
[0435] Perform illumination compensation on the first candidate reference block based on the model used by the first candidate reference block, to obtain a distortion cost.
[0436] It should be understood that the encoding method can be understood as the inverse process of the decoding method. Therefore, the specific scheme of the encoding method 500 can refer to the relevant content of the decoding method 300. For the sake of ease of description, this application will not go into details.
[0437] The method embodiment of the present application is described in detail above. The following describes in detail an apparatus embodiment of the present application in conjunction with FIG. 11 to FIG. 10 .
[0438] FIG8 is a schematic block diagram of a decoder 600 provided in this application.
[0439] As shown in FIG8 , the decoder 600 may include:
[0440] A first determining unit 610 is configured to determine whether the current block uses an intra block copy (IBC-LIC) mode based on local illumination compensation;
[0441] A second determining unit 620 is configured to determine a first prediction mode used by the current block in the IBC-LIC mode if the current block uses the IBC-LIC mode;
[0442] The compensation unit 630 is configured to perform illumination compensation on a first prediction block obtained by predicting the current block using the IBC mode used by the current block based on a model corresponding to the first prediction mode, to obtain a second prediction block of the current block.
[0443] In some embodiments, the second determining unit 620 is specifically configured to:
[0444] Decoding the code stream and determining a first index;
[0445] The first index is used to indicate the first prediction mode in at least one mode.
[0446] In some embodiments, the first index is used to indicate the first prediction mode in the at least one sorted mode; and the second determining unit 620 is further used to:
[0447] determining a distortion cost for the at least one mode;
[0448] The distortion cost of any one of the at least one mode is determined based on a reconstructed sample within the template area of the current block and a sample obtained by performing illumination compensation on at least one predicted sample using a model corresponding to the any one mode, the at least one predicted sample including a predicted sample obtained by predicting a sample within the template area of the current block using the IBC-LIC mode;
[0449] The at least one pattern is sorted based on the distortion cost of the at least one pattern to obtain the at least one sorted pattern.
[0450] In some embodiments, the second determining unit 620 is further configured to:
[0451] Determining a first model based on reconstructed samples within the template area of the current block and reconstructed samples within the template area of the first prediction block;
[0452] The at least one mode includes a first mode corresponding to the first model.
[0453] In some embodiments, the second determining unit 620 is further configured to:
[0454] Adjusting parameters of the first model based on adjustment values corresponding to the first mode to obtain a second model;
[0455] The at least one mode includes a second mode corresponding to the second model.
[0456] In some embodiments, the second determining unit 620 is further configured to:
[0457] determining a plurality of third models;
[0458] Among them, any one of the multiple third models is determined based on a first sample group obtained by dividing the reconstructed samples within the template area of the current block and a second sample group obtained by dividing the predicted samples within the template area of the first prediction block; and the at least one mode includes a third mode corresponding to the multiple third models.
[0459] In some embodiments, the second determining unit 620 is further configured to:
[0460] Adjusting parameters of the plurality of third models based on the adjustment values corresponding to the third mode to obtain a plurality of fourth models;
[0461] The at least one mode includes a fourth mode corresponding to the plurality of fourth models.
[0462] In some embodiments, the second determining unit 620 is further configured to:
[0463] Based on values of reconstructed samples in the template area of the first prediction block, dividing the reconstructed samples in the template area of the first prediction block into the multiple sample groups, wherein the second sample group is any one of the multiple sample groups;
[0464] The reconstructed samples whose positions within the template area of the current block correspond to the second sample group are divided into the first sample group.
[0465] In some embodiments, the second determining unit 620 is specifically configured to:
[0466] determining an average value of reconstructed samples in the template area of the first prediction block;
[0467] Based on the average value, reconstructed samples in the template area of the first prediction block are divided into the multiple sample groups; the multiple sample groups include: a sample group whose reconstructed sample values are greater than or equal to the average value, and a sample group whose reconstructed sample values are less than the average value.
[0468] In some embodiments, the adjustment parameter includes an adjustment amount of a scaling parameter and / or an adjustment amount of a bias parameter.
[0469] In some embodiments, the template area of the current block includes an upper template area and / or a left template area.
[0470] In some embodiments, a sampling step size used when the template area of the current block is the upper template area or the left template area is smaller than a sampling step size used when the template area of the current block includes the upper template area and the left template area;
[0471] The samples obtained in the template area of the current block according to the sampling step are used to determine a model corresponding to a mode in the at least one mode.
[0472] In some embodiments, when the template area of the current block is the upper template area, the number of sample rows of the upper template area is greater than the number of sample rows of the upper template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the upper template area, the number of sample columns of the upper template area is greater than the number of sample columns of the upper template area when the template area of the current block includes the upper template area and the left template area.
[0473] In some embodiments, when the template area of the current block is the left template area, the number of sample rows of the left template area is greater than the number of sample rows of the left template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the left template area, the number of sample columns of the left template area is greater than the number of sample columns of the left template area when the template area of the current block includes the upper template area and the left template area.
[0474] In some embodiments, the second determining unit 620 is further configured to:
[0475] Decoding the code stream and determining at least one index;
[0476] The at least one index includes at least one of the following:
[0477] An index for indicating whether the model corresponding to the first prediction mode is a single model or multiple models, an index for indicating the template area used by the model corresponding to the first prediction mode, an index for indicating whether the model corresponding to the first prediction mode is a model after parameter adjustment, and an adjustment parameter corresponding to the first prediction mode;
[0478] Based on the at least one index, the first prediction mode is determined.
[0479] In some embodiments, the first determining unit 610 is specifically configured to:
[0480] If the IBC mode used by the current block is the IBC Advanced Motion Vector Prediction AMVP mode, decoding the bitstream to determine the first identifier;
[0481] If the first flag indicates that the current block is allowed to use the IBC-LIC mode, it is determined that the current block uses the IBC-LIC mode.
[0482] In some embodiments, the first determining unit 610 is specifically configured to:
[0483] If the IBC mode used by the current block is the IBC merge mode, constructing a merge candidate list;
[0484] Determine a second index, where the second index is used to indicate, in the merge candidate list, a block vector BV from the current block to a first reference block of the current block;
[0485] If the first reference block uses the IBC-LIC mode, it is determined that the current block uses the IBC-LIC mode.
[0486] In some embodiments, the second determining unit 620 is specifically configured to:
[0487] The prediction mode used by the first reference block is determined as the first prediction mode.
[0488] In some embodiments, before determining whether the current block uses the intra block copying (IBC-LIC) mode based on local illumination compensation, the first determining unit 610 is further configured to:
[0489] Obtain a second identifier;
[0490] The second flag indicates whether the IBC mode used by the current block is the IBC merge mode.
[0491] In some embodiments, the compensation unit 630 is specifically configured to:
[0492] If the first prediction mode corresponds to a single model, illumination compensation is performed on the prediction samples in the first prediction block based on the single model to obtain the second prediction block.
[0493] In some embodiments, the compensation unit 630 is specifically configured to:
[0494] If the first prediction mode corresponds to multiple models, determining a model used by any prediction sample in the first prediction block from the multiple models;
[0495] Perform illumination compensation on the any one prediction sample based on the model used by the any one prediction sample to obtain the second prediction block.
[0496] In some embodiments, the compensation unit 630 is specifically configured to:
[0497] A model among the multiple models that corresponds to the interval in which the value of the arbitrary prediction sample lies is determined as the model used for the arbitrary prediction sample.
[0498] In some embodiments, the first determining unit 610 is specifically configured to:
[0499] If at least one of the following conditions is met, it is determined whether the current block uses the IBC-LIC mode:
[0500] The prediction type used by the current block is IBC mode;
[0501] Allowing the current sequence to which the current block belongs to use the IBC-LIC mode;
[0502] The area of the current block is greater than or equal to a preset first threshold;
[0503] The area of the current block is less than or equal to a preset second threshold;
[0504] The type of the current image to which the current block belongs is a preset type;
[0505] The IBC mode used by the current block is not a mode of a type that is used simultaneously with the IBC-LIC mode.
[0506] In some embodiments, the compensation unit 630 is further configured to:
[0507] Obtaining a residual block of the current block;
[0508] A reconstructed block of the current block is determined based on the residual block and the second prediction block.
[0509] It should be understood that the device embodiment of the decoder and the method embodiment of the decoding method can correspond to each other, and similar descriptions can refer to the method embodiment. To avoid repetition, they are not described here. Specifically, the decoder 600 shown in Figure 13 can correspond to the corresponding subject in the decoding method 400 of the embodiment of the present application, and the aforementioned and other operations and / or functions of the various units in the decoder 600 are respectively for implementing the corresponding processes in the decoding method 400.
[0510] FIG14 is a schematic block diagram of the encoder 700 provided in this application.
[0511] As shown in FIG14 , the encoder 700 may include:
[0512] A first compensation unit 710 is configured to perform illumination compensation on a third prediction block by traversing a model corresponding to at least one mode to obtain a first distortion cost set; the third prediction block is a prediction block obtained by predicting the current block using an intra block copy (IBC) advanced motion vector prediction (AMVP) mode;
[0513] a second compensation unit 720 configured to perform illumination compensation on a fourth prediction block based on the inherited model to obtain a second distortion cost set; the fourth prediction block being a reference block in a merge candidate list obtained by predicting the current block based on an IBC merge mode;
[0514] The determining unit 730 is configured to determine an IBC mode used by the current block based on the first distortion cost set and the second distortion cost set.
[0515] In some embodiments, the determining unit 730 is specifically configured to:
[0516] If the minimum value in the first distortion cost set is smaller than the minimum value in the second distortion cost set and the distortion cost of the current block in other prediction modes, it is determined that the IBC mode used by the current block is the IBCAMVP mode.
[0517] In some embodiments, the determining unit 730 is further configured to:
[0518] determining a first identifier;
[0519] The first flag indicates that the current block is allowed to use the intra block copying (IBC-LIC) mode based on local illumination compensation;
[0520] Encode the first identifier.
[0521] In some embodiments, the determining unit 730 is further configured to:
[0522] determining a first index;
[0523] The first index is used to indicate a first prediction mode used by the current block in the at least one mode;
[0524] The first index is encoded.
[0525] In some embodiments, the first index is used to indicate the first prediction mode in the at least one sorted mode; and the determining unit 730 is further used to:
[0526] determining a distortion cost for the at least one mode;
[0527] The distortion cost of any one of the at least one mode is determined based on a reconstructed sample within the template area of the current block and a sample obtained by performing illumination compensation on at least one predicted sample using a model corresponding to the any one mode, the at least one predicted sample including a predicted sample obtained by predicting a sample within the template area of the current block using the IBC-LIC mode;
[0528] The at least one pattern is sorted based on the distortion cost of the at least one pattern to obtain the at least one sorted pattern.
[0529] In some embodiments, the determining unit 730 is further configured to:
[0530] Determining a first model based on reconstructed samples within the template area of the current block and reconstructed samples within the template area of the third prediction block;
[0531] The at least one mode includes a first mode corresponding to the first model.
[0532] In some embodiments, the determining unit 730 is further configured to:
[0533] Adjusting parameters of the first model based on adjustment values corresponding to the first mode to obtain a second model;
[0534] The at least one mode includes a second mode corresponding to the second model.
[0535] In some embodiments, the determining unit 730 is further configured to:
[0536] determining a plurality of third models;
[0537] Among them, any one of the multiple third models is determined based on a first sample group obtained by dividing the reconstructed samples within the template area of the current block and a second sample group obtained by dividing the predicted samples within the template area of the third prediction block; and the at least one mode includes a third mode corresponding to the multiple third models.
[0538] In some embodiments, the determining unit 730 is further configured to:
[0539] Adjusting parameters of the plurality of third models based on the adjustment values corresponding to the third mode to obtain a plurality of fourth models;
[0540] The at least one mode includes a fourth mode corresponding to the plurality of fourth models.
[0541] In some embodiments, the determining unit 730 is further configured to:
[0542] Based on values of the reconstructed samples in the template area of the third prediction block, dividing the reconstructed samples in the template area of the third prediction block into the multiple sample groups, wherein the second sample group is any one of the multiple sample groups;
[0543] The reconstructed samples whose positions within the template area of the current block correspond to the second sample group are divided into the first sample group.
[0544] In some embodiments, the determining unit 730 is specifically configured to:
[0545] determining an average value of reconstructed samples in the template area of the third prediction block;
[0546] Based on the average value, the reconstructed samples in the template area of the third prediction block are divided into the multiple sample groups; the multiple sample groups include: a sample group whose reconstructed sample values are greater than or equal to the average value, and a sample group whose reconstructed sample values are less than the average value.
[0547] In some embodiments, the adjustment parameter includes an adjustment amount of a scaling parameter and / or an adjustment amount of a bias parameter.
[0548] In some embodiments, the template area of the current block includes an upper template area and / or a left template area.
[0549] In some embodiments, a sampling step size used when the template area of the current block is the upper template area or the left template area is smaller than a sampling step size used when the template area of the current block includes the upper template area and the left template area;
[0550] The samples obtained in the template area of the current block according to the sampling step are used to determine a model corresponding to a mode in the at least one mode.
[0551] In some embodiments, when the template area of the current block is the upper template area, the number of sample rows of the upper template area is greater than the number of sample rows of the upper template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the upper template area, the number of sample columns of the upper template area is greater than the number of sample columns of the upper template area when the template area of the current block includes the upper template area and the left template area.
[0552] In some embodiments, when the template area of the current block is the left template area, the number of sample rows of the left template area is greater than the number of sample rows of the left template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the left template area, the number of sample columns of the left template area is greater than the number of sample columns of the left template area when the template area of the current block includes the upper template area and the left template area.
[0553] In some embodiments, the determining unit 730 is further configured to:
[0554] Encode at least one of the following indexes:
[0555] An index used to indicate whether the model corresponding to the first prediction mode used by the current block is a single model or multiple models, an index used to indicate the template area used by the model corresponding to the first prediction mode, an index used to indicate whether the model corresponding to the first prediction mode is a model after parameter adjustment, and adjustment parameters corresponding to the first prediction mode.
[0556] In some embodiments, the determining unit 730 is specifically configured to:
[0557] If the minimum value in the second distortion cost set is smaller than the minimum value in the first distortion cost set and the distortion cost of the current block in other prediction modes, it is determined that the IBC mode used by the current block is the IBC merge mode.
[0558] In some embodiments, the determining unit 730 is further configured to:
[0559] Build a list of merge candidates;
[0560] Determine a second index, where the second index is used to indicate a block vector BV from the current block to the first reference block in the merge candidate list;
[0561] The second index is encoded.
[0562] In some embodiments, the determining unit 730 is further configured to:
[0563] determining a second identifier;
[0564] The second flag indicates whether the IBC mode used by the current block is the IBC merge mode;
[0565] Encode the second identifier.
[0566] In some embodiments, the first compensation unit 710 is specifically configured to:
[0567] If at least one of the following conditions is met, illumination compensation is performed on the third prediction block based on the model corresponding to the at least one mode to obtain the first distortion cost set:
[0568] The prediction type used by the current block is IBC mode;
[0569] Allowing the current sequence to which the current block belongs to use the IBC-LIC mode;
[0570] The area of the current block is greater than or equal to a preset first threshold;
[0571] The area of the current block is less than or equal to a preset second threshold;
[0572] The type of the current image to which the current block belongs is a preset type;
[0573] The IBC mode used by the current block is not a mode of a type that is used simultaneously with the IBC-LIC mode.
[0574] In some embodiments, the second compensation unit 720 is specifically configured to:
[0575] Constructing the merge candidate list;
[0576] For the first candidate reference block in the merge candidate list, if the first candidate reference block uses the IBC-LIC mode, the second distortion cost set includes:
[0577] Perform illumination compensation on the first candidate reference block based on the model used by the first candidate reference block, to obtain a distortion cost.
[0578] It should be understood that the device embodiment of the encoder and the method embodiment of the encoding method can correspond to each other, and similar descriptions can refer to the method embodiment. To avoid repetition, they are not described here. Specifically, the encoder 700 shown in Figure 14 can correspond to the corresponding subject in the encoding method 500 of the embodiment of the present application, and the aforementioned and other operations and / or functions of the various units in the encoder 700 are respectively for implementing the corresponding processes in various methods such as the encoding method 500.
[0579] It should also be understood that each unit in the decoder 600 or encoder 700 that the embodiment of the application is related to is divided based on logical function, and in actual applications, the function of a unit can also be realized by multiple units, or the function of multiple units is realized by one unit, or even, these functions can also be assisted by one or more other units to realize.For example, part or all of the decoder 600 or encoder 700 are merged into one or several other units.For another example, a certain (some) unit in the decoder 600 or encoder 700 can also be split into multiple units smaller in function to constitute, and this can realize same operation, without affecting the realization of the technical effect of the embodiment of the application.For another example, this decoder 600 or encoder 700 can also include other units, and in actual applications, these functions can also be assisted by other units to realize, and can be realized by the collaboration of multiple units.
[0580] According to another embodiment of the present application, a computer program (including program code) capable of executing each step involved in the corresponding method can be run on a general-purpose computing device of a general-purpose computer including processing elements and storage elements such as a central processing unit (CPU), a random access memory medium (RAM), and a read-only memory medium (ROM) to construct the decoder 600 or encoder 700 involved in the embodiment of the present application, and to implement the encoding method or decoding method of the embodiment of the present application. The computer program can be recorded on, for example, a computer-readable storage medium, and loaded into an electronic device via a computer-readable storage medium, and run therein to implement the corresponding method of the embodiment of the present application. In other words, the units mentioned above can be implemented in hardware form, can be implemented in software form, or can be implemented in the form of a combination of hardware and software. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the integrated logic circuit of the hardware in the processor and / or the instruction in software form, and the steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as the hardware decoding processor executing the execution, or the hardware and software combination in the decoding processor executing the execution. Alternatively, the software may be located in a mature storage medium in the art, such as a random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or register. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps in the method embodiments described above.
[0581] FIG15 is a schematic structural diagram of an electronic device 800 provided in this application.
[0582] As shown in Figure 15, the electronic device 800 includes at least a processor 810 and a computer-readable storage medium 820. The processor 810 and the computer-readable storage medium 820 may be connected via a bus or other means. The computer-readable storage medium 820 is used to store a computer program 821, which includes computer instructions. The processor 810 is used 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 suitable for implementing one or more computer instructions, specifically loading and executing one or more computer instructions to implement the corresponding method flow or corresponding function.
[0583] For example, the processor 810 may also be referred to as a central processing unit (CPU). The processor 810 may include, but is not limited to, 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, and the like.
[0584] Exemplarily, the computer-readable storage medium 820 may be a high-speed RAM memory, or a non-volatile memory (Non-Volatile Memory), such as at least one disk memory; optionally, it may be at least one computer-readable storage medium located away from the aforementioned processor 810. Specifically, the computer-readable storage medium 820 includes, but is not limited to: volatile memory and / or non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0585] Exemplarily, the electronic device 800 may be a decoder or decoding framework involved in an embodiment of the present application; a second computer instruction is stored in the computer-readable storage medium 820; the processor 810 loads and executes the second computer instruction stored in the computer-readable storage medium 820 to implement the corresponding steps in the decoding method provided in the present application; in other words, the second computer instruction in the computer-readable storage medium 820 is loaded by the processor 810 and the corresponding steps are executed. To avoid repetition, it will not be repeated here.
[0586] Exemplarily, the electronic device 800 may be an encoder or encoding framework involved in an embodiment of the present application; a first computer instruction is stored in the computer-readable storage medium 820; the processor 810 loads and executes the first computer instruction stored in the computer-readable storage medium 820 to implement the corresponding steps in the encoding method provided in the present application; in other words, the first computer instruction in the computer-readable storage medium 820 is loaded by the processor 810 and the corresponding steps are executed. To avoid repetition, it will not be repeated here.
[0587] According to another aspect of the present application, the present application also provides a coding and decoding system, including the encoder and decoder mentioned above.
[0588] According to another aspect of the present application, the present application also provides a computer-readable storage medium (Memory), which is a memory device in the electronic device 800 for storing programs and data. For example, a computer-readable storage medium 820. It can be understood that the computer-readable storage medium 820 here can include both the built-in storage medium in the electronic device 800 and, of course, the extended storage medium supported by the electronic device 800. The computer-readable storage medium provides a storage space, which stores the operating system of the electronic device 800. In addition, one or more computer instructions suitable for being loaded and executed by the processor 810 are also stored in the storage space. These computer instructions can be one or more computer programs 821 (including program codes).
[0589] According to another aspect of the present application, the present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. For example, computer program 821. In this case, the data processing device 800 can be a computer, the processor 810 reads the computer instructions from the computer-readable storage medium 820, and the processor 810 executes the computer instructions so that the computer performs the encoding method or decoding method provided in the various optional embodiments mentioned above. In other words, when implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process of the embodiment of the present application is run in whole or in part or the functions of the embodiment of the present application are implemented. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0590] According to another aspect of the present application, the present application further provides a code stream, which may be a code stream decoded using the decoding method provided by the present application or a code stream generated using the encoding method provided by the present application.
[0591] Those skilled in the art will appreciate that the units and process steps of each example described in conjunction with the embodiments disclosed herein can be implemented in 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. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0592] Finally, it should be noted that the above content is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A decoding method, characterized in that: include: Determine whether the current block uses the intra block copying IBC-LIC mode based on local illumination compensation; If the current block uses the IBC-LIC mode, determining a first prediction mode used by the current block in the IBC-LIC mode; Based on the model corresponding to the first prediction mode, illumination compensation is performed on a first prediction block obtained by predicting the current block using the IBC mode used by the current block to obtain a second prediction block of the current block.
2. The method according to claim 1, characterized in that The determining a first prediction mode used by the current block in the IBC-LIC mode includes: Decoding the code stream and determining a first index; The first index is used to indicate the first prediction mode in at least one mode.
3. The method according to claim 2, characterized in that The first index is used to indicate the first prediction mode in the sorted at least one mode; the method further includes: determining a distortion cost for the at least one mode; The distortion cost of any one of the at least one mode is determined based on a reconstructed sample in a template region of the current block and a sample obtained by performing illumination compensation on at least one predicted sample using a model corresponding to the any one mode, and the at least one predicted sample includes a predicted sample obtained by predicting a sample in the template region of the current block using the IBC-LIC mode; The at least one mode is sorted based on the distortion cost of the at least one mode to obtain the at least one sorted mode.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: Determine a first model based on reconstructed samples in the template area of the current block and reconstructed samples in the template area of the first prediction block; The at least one mode includes a first mode corresponding to the first model.
5. The method according to claim 4, characterized in that The method further comprises: Adjusting the parameters of the first model based on the adjustment value corresponding to the first mode to obtain a second model; Wherein, the at least one mode includes a second mode corresponding to the second model.
6. The method according to any one of claims 2 to 5, characterized in that The method further comprises: determining a plurality of third models; Among them, any one of the multiple third models is determined based on a first sample group obtained by dividing the reconstructed samples within the template area of the current block and a second sample group obtained by dividing the predicted samples within the template area of the first prediction block; and the at least one mode includes a third mode corresponding to the multiple third models.
7. The method according to claim 6, characterized in that The method further comprises: Adjusting the parameters of the plurality of third models based on the adjustment value corresponding to the third mode to obtain a plurality of fourth models; The at least one mode includes a fourth mode corresponding to the plurality of fourth models.
8. The method according to claim 6 or 7, characterized in that: The method further comprises: Based on the values of the reconstructed samples in the template area of the first prediction block, the reconstructed samples in the template area of the first prediction block are divided into the multiple sample groups, the second sample group being any one of the multiple sample groups; The reconstructed samples whose positions in the template area of the current block correspond to the second sample group are divided into the first sample group.
9. The method according to claim 8, characterized in that The dividing the reconstructed samples in the template area of the first prediction block into the plurality of sample groups based on the values of the reconstructed samples in the template area of the first prediction block comprises: determining an average value of reconstructed samples in the template area of the first prediction block; Based on the average value, the reconstructed samples in the template area of the first prediction block are divided into the multiple sample groups; the multiple sample groups include: a sample group whose reconstructed sample values are greater than or equal to the average value, and a sample group whose reconstructed sample values are less than the average value.
10. The method according to claim 5 or 7, characterized in that: The adjustment parameter includes an adjustment amount of a scaling parameter and / or an adjustment amount of a bias parameter.
11. The method according to any one of claims 3 to 10, characterized in that The template area of the current block includes an upper template area and / or a left template area.
12. The method according to claim 11, characterized in that The sampling step used when the template area of the current block is the upper template area or the left template area is smaller than the sampling step used when the template area of the current block includes the upper template area and the left template area; The samples obtained in the template area of the current block according to the sampling step are used to determine a model corresponding to a mode in the at least one mode.
13. The method according to claim 11, characterized in that When the template area of the current block is the upper template area, the number of sample rows of the upper template area is greater than the number of sample rows of the upper template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the upper template area, the number of sample columns of the upper template area is greater than the number of sample columns of the upper template area when the template area of the current block includes the upper template area and the left template area.
14. The method according to claim 11, characterized in that When the template area of the current block is the left template area, the number of sample rows of the left template area is greater than the number of sample rows of the left template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the left template area, the number of sample columns of the left template area is greater than the number of sample columns of the left template area when the template area of the current block includes the upper template area and the left template area.
15. The method according to claim 1, characterized in that The determining a first prediction mode used by the current block in the IBC-LIC mode includes: Decoding the bitstream and determining at least one index; The at least one index includes at least one of the following: An index for indicating whether the model corresponding to the first prediction mode is a single model or multiple models, an index for indicating the template area used by the model corresponding to the first prediction mode, an index for indicating whether the model corresponding to the first prediction mode is a model after parameter adjustment, and an adjustment parameter corresponding to the first prediction mode; Based on the at least one index, the first prediction mode is determined.
16. The method according to any one of claims 2 to 15, characterized in that The determining whether the current block uses the intra block copying IBC-LIC mode based on local illumination compensation includes: If the IBC mode used by the current block is the IBC advanced motion vector prediction AMVP mode, decoding the bitstream to determine the first identifier; If the first flag indicates that the current block is allowed to use the IBC-LIC mode, it is determined that the current block uses the IBC-LIC mode.
17. The method according to claim 1, characterized in that The determining whether the current block uses the intra block copying IBC-LIC mode based on local illumination compensation includes: If the IBC mode used by the current block is the IBC merge mode, constructing a merge candidate list; Determine a second index, where the second index is used to indicate, in the merge candidate list, a block vector BV from the current block to a first reference block of the current block; If the first reference block uses the IBC-LIC mode, it is determined that the current block uses the IBC-LIC mode.
18. The method according to claim 17, characterized in that The determining a first prediction mode used by the current block in the IBC-LIC mode includes: The prediction mode used by the first reference block is determined as the first prediction mode.
19. The method according to any one of claims 1 to 18, characterized in that Before determining whether the current block uses the intra block copying IBC-LIC mode based on local illumination compensation, the method further includes: Obtaining a second identifier; The second flag indicates whether the IBC mode used by the current block is the IBC merge mode.
20. The method according to any one of claims 1 to 19, characterized in that The step of performing illumination compensation on a first prediction block obtained by predicting the current block using the IBC mode based on a model corresponding to the first prediction mode to obtain a second prediction block of the current block includes: If the first prediction mode corresponds to a single model, illumination compensation is performed on the prediction samples in the first prediction block based on the single model to obtain the second prediction block.
21. The method according to any one of claims 1 to 19, characterized in that The step of performing illumination compensation on a first prediction block obtained by predicting the current block using the IBC mode based on a model corresponding to the first prediction mode to obtain a second prediction block of the current block includes: If the first prediction mode corresponds to multiple models, determining a model used by any prediction sample in the first prediction block from among the multiple models; Perform illumination compensation on the any one prediction sample based on the model used by the any one prediction sample to obtain the second prediction block.
22. The method according to claim 21, characterized in that The determining, from among the multiple models, a model used by any one prediction sample in the first prediction block comprises: A model among the multiple models that corresponds to the interval in which the value of the arbitrary prediction sample lies is determined as the model used by the arbitrary prediction sample.
23. The method according to any one of claims 1 to 22, characterized in that The determining whether the current block uses the intra block copying IBC-LIC mode based on local illumination compensation includes: If at least one of the following conditions is met, it is determined whether the current block uses the IBC-LIC mode: The prediction type used by the current block is IBC mode; Allowing the current sequence to which the current block belongs to use the IBC-LIC mode; The area of the current block is greater than or equal to a preset first threshold; The area of the current block is less than or equal to a preset second threshold; The type of the current image to which the current block belongs is a preset type; The IBC mode used by the current block is not a mode of a type that is used simultaneously with the IBC-LIC mode.
24. The method according to any one of claims 1 to 23, characterized in that The method further comprises: Obtaining a residual block of the current block; A reconstructed block of the current block is determined based on the residual block and the second prediction block.
25. A coding method, characterized in that: include: Traversing a model corresponding to at least one mode to perform illumination compensation on the third prediction block to obtain a first distortion cost set; The third prediction block is a prediction block obtained by predicting the current block using the intra block copy IBC advanced motion vector prediction AMVP mode; Performing illumination compensation on the fourth prediction block based on the inherited model to obtain a second distortion cost set; the fourth prediction block is a reference block in a merge candidate list obtained by predicting the current block based on an IBC merge mode; An IBC mode used by the current block is determined based on the first distortion cost set and the second distortion cost set.
26. The method according to claim 25, characterized in that The determining, based on the first distortion cost set and the second distortion cost set, the IBC mode used by the current block includes: If the minimum value in the first distortion cost set is smaller than the minimum value in the second distortion cost set and the distortion cost of the current block in other prediction modes, it is determined that the IBC mode used by the current block is the IBCAMVP mode.
27. The method according to claim 26, characterized in that The method further comprises: determining a first identifier; The first flag indicates that the current block is allowed to use an intra-block copying IBC-LIC mode based on local illumination compensation; Encode the first identifier.
28. The method according to claim 27, characterized in that The method further comprises: determining a first index; The first index is used to indicate a first prediction mode used by the current block in the at least one mode; The first index is encoded.
29. The method according to claim 28, characterized in that The first index is used to indicate the first prediction mode in the sorted at least one mode; the method further includes: determining a distortion cost for the at least one mode; The distortion cost of any one of the at least one mode is determined based on a reconstructed sample in a template region of the current block and a sample obtained by performing illumination compensation on at least one predicted sample using a model corresponding to the any one mode, and the at least one predicted sample includes a predicted sample obtained by predicting a sample in the template region of the current block using the IBC-LIC mode; The at least one mode is sorted based on the distortion cost of the at least one mode to obtain the at least one sorted mode.
30. The method according to any one of claims 25 to 29, characterized in that The method further comprises: Determine a first model based on reconstructed samples in the template area of the current block and reconstructed samples in the template area of the third prediction block; The at least one mode includes a first mode corresponding to the first model.
31. The method according to claim 30, characterized in that The method further comprises: Adjusting the parameters of the first model based on the adjustment value corresponding to the first mode to obtain a second model; Wherein, the at least one mode includes a second mode corresponding to the second model.
32. The method according to any one of claims 25 to 31, characterized in that The method further comprises: determining a plurality of third models; Any one of the plurality of third models is determined based on a first sample group obtained by dividing the reconstructed samples in the template area of the current block and a second sample group obtained by dividing the predicted samples in the template area of the third prediction block; The at least one mode includes a third mode corresponding to the plurality of third models.
33. The method according to claim 32, characterized in that The method further comprises: Adjusting the parameters of the plurality of third models based on the adjustment value corresponding to the third mode to obtain a plurality of fourth models; The at least one mode includes a fourth mode corresponding to the plurality of fourth models.
34. The method according to claim 32 or 33, characterized in that The method further comprises: Based on the values of the reconstructed samples in the template area of the third prediction block, the reconstructed samples in the template area of the third prediction block are divided into the multiple sample groups, the second sample group being any one of the multiple sample groups; The reconstructed samples whose positions in the template area of the current block correspond to the second sample group are divided into the first sample group.
35. The method according to claim 34, characterized in that The step of dividing the reconstructed samples in the template area of the third prediction block into the plurality of sample groups based on the values of the reconstructed samples in the template area of the third prediction block comprises: determining an average value of reconstructed samples in the template area of the third prediction block; Based on the average value, the reconstructed samples in the template area of the third prediction block are divided into the multiple sample groups; the multiple sample groups include: a sample group whose reconstructed sample values are greater than or equal to the average value, and a sample group whose reconstructed sample values are less than the average value.
36. The method according to claim 31 or 33, characterized in that The adjustment parameter includes an adjustment amount of a scaling parameter and / or an adjustment amount of a bias parameter.
37. The method according to any one of claims 29 to 36, characterized in that The template area of the current block includes an upper template area and / or a left template area.
38. The method according to claim 37, characterized in that The sampling step used when the template area of the current block is the upper template area or the left template area is smaller than the sampling step used when the template area of the current block includes the upper template area and the left template area; The samples obtained in the template area of the current block according to the sampling step are used to determine a model corresponding to a mode in the at least one mode.
39. The method according to claim 37, characterized in that When the template area of the current block is the upper template area, the number of sample rows of the upper template area is greater than the number of sample rows of the upper template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the upper template area, the number of sample columns of the upper template area is greater than the number of sample columns of the upper template area when the template area of the current block includes the upper template area and the left template area.
40. The method according to claim 37, characterized in that When the template area of the current block is the left template area, the number of sample rows of the left template area is greater than the number of sample rows of the left template area when the template area of the current block includes the upper template area and the left template area; and / or, when the template area of the current block is the left template area, the number of sample columns of the left template area is greater than the number of sample columns of the left template area when the template area of the current block includes the upper template area and the left template area.
41. The method according to claim 27, characterized in that The method further comprises: Encode at least one of the following indexes: An index used to indicate whether the model corresponding to the first prediction mode used by the current block is a single model or multiple models, an index used to indicate the template area used by the model corresponding to the first prediction mode, an index used to indicate whether the model corresponding to the first prediction mode is a model after parameter adjustment, and adjustment parameters corresponding to the first prediction mode.
42. The method according to claim 25, characterized in that The determining, based on the first distortion cost set and the second distortion cost set, the IBC mode used by the current block includes: If the minimum value in the second distortion cost set is smaller than the minimum value in the first distortion cost set and the distortion cost of the current block in other prediction modes, it is determined that the IBC mode used by the current block is the IBC merge mode.
43. The method according to claim 42, characterized in that The method further comprises: Build a list of merge candidates; Determine a second index, where the second index is used to indicate a block vector BV from the current block to the first reference block in the merge candidate list; The second index is encoded.
44. The method according to any one of claims 25 to 43, characterized in that The method further comprises: determining a second identifier; The second flag indicates whether the IBC mode used by the current block is the IBC merge mode; The second identifier is encoded.
45. The method according to any one of claims 25 to 44, characterized in that The step of traversing a model corresponding to at least one mode to perform illumination compensation on the third prediction block to obtain a first distortion cost set includes: If at least one of the following conditions is met, illumination compensation is performed on the third prediction block based on the model corresponding to the at least one mode to obtain the first distortion cost set: The prediction type used by the current block is IBC mode; Allowing the current sequence to which the current block belongs to use the IBC-LIC mode; The area of the current block is greater than or equal to a preset first threshold; The area of the current block is less than or equal to a preset second threshold; The type of the current image to which the current block belongs is a preset type; The IBC mode used by the current block is not a mode of a type that is used simultaneously with the IBC-LIC mode.
46. The method according to any one of claims 25 to 45, characterized in that The inheritance-based model performs illumination compensation on the fourth prediction block to obtain a second distortion cost set, including: Constructing the merge candidate list; Among them, for the first candidate reference block in the merge candidate list, if the first candidate reference block uses the IBC-LIC mode, the second distortion cost set includes: Based on the model used by the first candidate reference block, illumination compensation is performed on the first candidate reference block to obtain a distortion cost.
47. A decoder, characterized in that include: A first determining unit, configured to determine whether a current block uses an intra-block copying (IBC-LIC) mode based on local illumination compensation; A second determining unit, configured to determine a first prediction mode used by the current block in the IBC-LIC mode if the current block uses the IBC-LIC mode; A compensation unit is used to perform illumination compensation on a first prediction block obtained by predicting the current block using the IBC mode used by the current block based on a model corresponding to the first prediction mode, so as to obtain a second prediction block of the current block.
48. An encoder, characterized in that include: A first compensation unit, configured to perform illumination compensation on a third prediction block by traversing a model corresponding to at least one mode to obtain a first distortion cost set; The third prediction block is a prediction block obtained by predicting the current block using the intra block copy IBC advanced motion vector prediction AMVP mode; A second compensation unit, configured to perform illumination compensation on the fourth prediction block based on the inherited model to obtain a second distortion cost set; The fourth prediction block is a reference block in a merge candidate list obtained by predicting the current block based on an IBC merge mode; A determining unit is configured to determine an IBC mode used by the current block based on the first distortion cost set and the second distortion cost set.
49. An electronic device, characterized in that: include: a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by the processor, implements the method according to any one of claims 1 to 24 or the method according to any one of claims 25 to 46.
50. A computer-readable storage medium, characterized in that Used to store a computer program, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 24 or the method according to any one of claims 25 to 46.
51. A computer program product comprising a computer program / instructions, characterized in that The computer program / instructions, when executed by a processor, implement a method according to any one of claims 1 to 24 or a method according to any one of claims 25 to 46.
52. A code stream, characterized in that The code stream is a code stream decoded according to the method according to any one of claims 1 to 24, or the code stream is a code stream generated by the method according to any one of claims 25 to 46.
Citation Information
Patent Citations
Interaction between intra block replication and interframe coding
CN110572648A
Harmonization between local illumination compensation and inter prediction coding
CN112868238A
Video data coding method and device, electronic equipment and storage medium
CN116170593A
Spatial local illumination compensation
WO2022167322A1
