Video coding method and apparatus, video decoding method and apparatus, and storage device, system and media.

BR112025021710A2Pending Publication Date: 2026-09-08
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
BR112025021710
Authority / Receiving Office
BR · BR
Patent Type
Applications
Publication Date
2026-09-08

Smart Images

  • Figure 00000191_0000
    Figure 00000191_0000
  • Figure 00000191_0001
    Figure 00000191_0001
  • Figure 00000191_0002
    Figure 00000191_0002
Patent Text Reader
Need to check novelty before this filing date? Find Prior Art

Description

1 / 165 “VIDEO CODING METHOD AND APPARATUS, VIDEO DECODING METHOD AND APPARATUS, AND STORAGE DEVICE, SYSTEM AND MEDIA” FIELD OF TECHNIQUE

[001] This disclosure relates to the field of video encoding and decoding technology and, in particular, to video encoding and decoding methods, apparatus, a device, a system and a storage medium. BACKGROUND

[002] Digital video technology can be incorporated into a variety of video devices, such as digital televisions, smartphones, computers, e-readers, or video players. With the development of video technology, video data includes a large amount of data. To facilitate the transmission of video data, the video device adopts video compression technology to achieve more efficient transmission or storage of video data.

[003] There is temporal or spatial redundancy in the video, and prediction can be used to eliminate or reduce redundancy in the video and improve compression efficiency. In order to improve the prediction effect, an intrablock copy illumination compensation mode is proposed. However, in some scenarios, when a current intrablock copy illumination compensation mode is used for prediction, the illumination compensation effect is poor, resulting in inaccurate prediction and low encoding and decoding efficiency. SUMMARY

[004] The modalities of the present disclosure provide methods of encoding and decoding video, Petition 870250091537, dated 07 / 10 / 2025, pages 200 / 401 2 / 165 devices, a device, a system and a storage medium, which can improve the accuracy of constructing a list of candidate prediction modes, improve the accuracy of predicting a current block and, in turn, improve encoding and decoding performance.

[005] In a first aspect, the present disclosure provides a method of video decoding, applied to a decoder, including:

[006] determine a prediction mode for a current block;

[007] in response to the fact that the current block prediction mode is a multi-model intrablock copy lighting compensation mode, determine a current block reference block and determine N groups of linear model parameters, where N is a positive integer greater than 1; and

[008] select a target group of linear model parameters from the N groups of linear model parameters and perform the linear transformation on the reference block using the target group of linear model parameters to obtain a prediction block of the current block.

[009] In a second aspect, the modalities of the present disclosure provide a method of video encoding that includes:

[0010] determine a prediction mode for a current block;

[0011] in response to the fact that the current block prediction mode is a multi-model intrablock copy lighting compensation mode, determine a current block reference block and determine N groups of linear model parameters, where N is a positive integer greater than 1; and

[0012] select a target group of parameters Petition 870250091537, dated 07 / 10 / 2025, pages 201 / 401 3 / 165 of the linear model of the N groups of linear model parameters and perform the linear transformation on the reference block using the target group of linear model parameters to obtain a prediction block of the current block.

[0013] In a third aspect, the present disclosure provides a video decoding apparatus, which is configured to execute the method in the first aspect or various implementations of the first aspect. Specifically, the apparatus includes functional units for executing the method in the first aspect or various implementations of the first aspect.

[0014] In a fourth aspect, the present disclosure provides a video encoding apparatus, which is configured to perform the method in the second aspect or various implementations of the second aspect. Specifically, the apparatus includes functional units for performing the method in the second aspect or various implementations of the second aspect.

[0015] In a fifth aspect, a video decoder is provided, including a processor and memory. The memory is configured to store a computer program and the processor is configured to call and execute the computer program stored in memory to perform the method in the first aspect or various implementations of the first aspect.

[0016] In a sixth aspect, a video encoder is provided, including a processor and memory. The memory is configured to store a computer program and the processor is configured to call and execute the computer program stored in memory to perform the method in the second aspect or various implementations of the second aspect.

[0017] In a seventh aspect, a system of Petition 870250091537, dated 07 / 10 / 2025, pp. 202 / 401 4 / 165 video encoding and decoding is provided, including a video encoder and a video decoder. The video decoder is configured to perform the method on the first aspect or on multiple implementations of the first aspect, and the video encoder is configured to perform the method on the second aspect or on multiple implementations of the second aspect.

[0018] In an eighth aspect, a chip is provided, which is configured to implement the method in either the first aspect and the second aspect or in each of the implementations of the first and second aspects. Specifically, the chip includes a processor to call a computer program from memory and execute the computer program, so that a device equipped with the chip performs the method in either the first aspect and the second aspect or in each of the implementations of the first and second aspects.

[0019] In a ninth aspect, a computer-readable storage medium is provided for storing a computer program. The computer program enables a computer to execute the method in either the first and second aspects or in each of the implementations of the first and second aspects.

[0020] In a tenth aspect, a computer program product is provided, including computer program instructions. The computer program instructions enable a computer to execute the method in either the first aspect or the second aspect, or in each of the implementations of the first and second aspects.

[0021] In an eleventh aspect, it is Petition 870250091537, dated 07 / 10 / 2025, pp. 203 / 401 5 / 165 provided a computer program. The computer program, when executed on a computer, allows the computer to execute the method in either the first aspect or the second aspect, or in each of the implementations of the first and second aspects.

[0022] In a twelfth aspect, a bitstream is provided. The bitstream is generated based on the method in the second aspect.

[0023] Based on the technical solutions above, a multi-model intrablock copy illumination compensation mode is proposed to augment the intrablock copy illumination compensation modes, so that the encoding and decoding ends can select a single-model intrablock copy illumination compensation mode (i.e., having only one group of model parameters) for prediction compensation or select the multi-model intrablock copy illumination compensation mode (i.e., including multiple groups of model parameters) for prediction compensation according to the specific situations of the current block. In a case where the multi-model intrablock copy illumination compensation mode is selected to perform prediction compensation in the current block, N groups of linear model parameters are determined and the target linear model parameters are selected from the N groups of linear model parameters.The target model parameters are then used to perform the linear transformation on the reference block of the current block to obtain the prediction block of the current block, thus improving the lighting compensation effect and, in turn, improving the prediction accuracy and encoding and decoding performance. BRIEF DESCRIPTION OF THE DRAWINGS Petition 870250091537, dated 07 / 10 / 2025, pp. 204 / 401 6 / 165

[0024] Figure 1 is a schematic block diagram of a video encoding and decoding system involved in embodiments of the present disclosure;

[0025] Figure 2 is a schematic block diagram of a video encoder involved in embodiments of the present disclosure;

[0026] Figure 3 is a schematic block diagram of a video decoder involved in embodiments of the present disclosure;

[0027] Figures 4A and 4B are schematic diagrams of images with different lumas;

[0028] Figure 5 is a schematic diagram of a lighting compensation model principle;

[0029] Figure 6 is a schematic diagram of sample selection;

[0030] Figure 7 is a schematic diagram of an intra-block copy (IBC) principle;

[0031] Figure 8 is a schematic diagram of images with different lighting;

[0032] Figure 9 is a schematic diagram of an IBC local lighting compensation (IBC-LIC);

[0033] Figure 10 is a schematic diagram of an application scenario;

[0034] Figure 11 is a schematic flowchart of a video decoding method provided in an embodiment of the present disclosure;

[0035] Figure 12 is a schematic diagram of a model;

[0036] Figure 13 is a schematic diagram of an extended model;

[0037] Figure 14 is a schematic diagram of an extended model;

[0038] Figure 15 is a schematic flowchart. Petition 870250091537, dated 07 / 10 / 2025, pp. 205 / 401 7 / 165 of a video encoding method provided in an embodiment of this disclosure;

[0039] Figure 16 is a schematic block diagram of a video decoding device provided in an embodiment of the present disclosure;

[0040] Figure 17 is a schematic block diagram of a video encoding apparatus provided in an embodiment of the present disclosure;

[0041] Figure 18 is a schematic block diagram of an electronic device provided in embodiments of the present disclosure; and

[0042] Figure 19 is a schematic block diagram of a video encoding and decoding system provided in embodiments of the present disclosure. DETAILED DESCRIPTION

[0043] This disclosure can be applied to the field of image encoding and decoding, the field of video encoding and decoding, the field of hardware video encoding and decoding, the field of dedicated circuit video encoding and decoding, the field of real-time video encoding and decoding, etc. For example, the solutions in this disclosure can be combined with audio and video coding (AVS) standards, such as the H.264 / Audio Video Coding (AVC) standard, the H.265 / High Efficiency Video Coding (HEVC) standard, and the H.266 / Versatile Video Coding (VVC) standard. Alternatively, the solutions in this disclosure can be implemented in conjunction with other proprietary or industry standards, including ITU-TH.261, ISO / IECMPEG-1Visual, ITU-TH.262 or ISO / IECMPEG2Visual, ITU-TH.263, ISO / IECMPEG-4Visual, ITU-TH.264 (also known as ISO / IECMPEG-4 AVC), including scalable video coding (SVC) extensions and. Petition 870250091537, dated 07 / 10 / 2025, pp. 206 / 401 8 / 165 multiview video encoding (MVC). It should be understood that the technology of this disclosure is not limited to any specific encoding and decoding standard or technology.

[0044] For ease of understanding, a video encoding and decoding system involved in the modalities of the present disclosure is introduced for the first time with reference to Figure 1.

[0045] Figure 1 is a schematic block diagram of a video encoding and decoding system involved in embodiments of the present disclosure. It should be noted that Figure 1 is only an example, and the video encoding and decoding system in the embodiments of the present disclosure includes, without limitation, those shown in Figure 1. As shown in Figure 1, the video encoding and decoding system 100 includes an encoding device 110 and a decoding device 120. The encoding device is used to encode (which can be understood as compressing) video data to generate a bitstream and transmit the bitstream to the decoding device. The decoding device decodes the bitstream generated by the encoding device to obtain decoded video data.

[0046] The encoding device 110 in the embodiments of this disclosure 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, in the embodiments of this disclosure, the encoding device 110 and the decoding device 120 include a wide range of devices, such as smartphones, desktop computers, mobile computing devices, Petition 870250091537, dated 07 / 10 / 2025, pp. 207 / 401 9 / 165 notebooks (e.g., laptops), tablets, set-top boxes, televisions, cameras, display devices, digital media players, video game consoles, or vehicle computers.

[0047] In some embodiments, the encoding device 110 may transmit the encoded video data (e.g., the bitstream) to the decoding device 120 by means of a channel 130. The channel 130 may include one or more means and / or apparatus capable of transmitting the encoded video data from the encoding device 110 to the decoding device 120.

[0048] In one instance, channel 130 includes one or more communication media that allow encoding device 110 to transmit the encoded video data directly to decoding device 120 in real time. In this case, encoding device 110 can modulate the encoded video data based on a communication standard and transmit the modulated video data to decoding device 120. The communication media include a wireless communication medium, such as a radio frequency spectrum. Optionally, the communication medium may also include a wired communication medium, such as one or more physical transmission lines.

[0049] In another case, channel 130 includes a storage medium, and the storage medium can store the video data encoded by the encoding device 110. The storage medium includes a plurality of locally accessible data storage media, such as an optical disc, a digital video disc (DVD), and flash memory. In this case, the decoding device 120 can acquire the encoded video data from the storage medium. Petition 870250091537, dated 07 / 10 / 2025, pages 208 / 401 10 / 165

[0050] In another case, channel 130 may include a storage server, and the storage server may store the video data encoded by the encoding device 110. In this case, the decoding device 120 may download the encoded video data stored on the storage server. Optionally, the storage server may store the encoded video data and transmit the encoded video data to the decoding device 120. For example, the storage server is a web server (e.g., for a website), a File Transfer Protocol (FTP) server, etc.

[0051] In some embodiments, the encoding device 110 includes a video encoder 112 and an output interface 113. The output interface 113 may include a modulator / demodulator (modem) and / or a transmitter.

[0052] In some embodiments, the encoding device 110 may additionally include a video source 111, in addition to the video encoder 112 and the input interface 113.

[0053] The video source 111 may include at least one of the following: a video acquisition device (e.g., a video camera), a video file, a video input interface, or a computer graphics system. The video input interface is used to receive video data from a video content provider. The computer graphics system is used to generate video data.

[0054] Video encoder 112 encodes the video data from video source 111 to generate a bitstream. The video data may include one or more images or a sequence of images. The bitstream contains Petition 870250091537, dated 07 / 10 / 2025, pp. 209 / 401 11 / 165 Encoding information for the image(s) or image sequence in the form of a bitstream. Encoding information may include encoded image data and associated data. Associated data may include a sequence parameter set (SPS), an image parameter set (PPS), and other syntax structures. The SPS may contain parameters applied to one or more sequences. The PPS may contain parameters applied to one or more images. The syntax structure refers to a set of zero or more syntax elements arranged in a specified order in the bitstream.

[0055] The video encoder 112 transmits the encoded video data directly to the decoding device 120 via the output interface 113. The encoded video data can also be stored on a storage medium or on a storage server for subsequent reading by the decoding device 120.

[0056] In some embodiments, the decoding device 120 includes an input interface 121 and a video decoder 122.

[0057] In some embodiments, the decoding device 120 may additionally include a display device 123, in addition to the input interface 121 and the video decoder 122.

[0058] Input interface 121 includes a receiver and / or a modem. Input interface 121 can receive video data encoded via channel 130.

[0059] The video decoder 122 is used to decode the encoded video data to obtain decoded video data and transmit the decoded video data to the display device 123.

[0060] Display device 123 displays the Petition 870250091537, dated 07 / 10 / 2025, pp. 210 / 401 12 / 165 decoded video data. The display unit 123 can be integrated with the decoding device 120 or external to the decoding device 120. The display unit 123 can include one of several display units, such as a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or other types of display units.

[0061] Furthermore, Figure 1 is only an example, and the technical solution of the embodiments of the present disclosure is not limited to Figure 1. For example, the technology of the present disclosure can also be applied to one-sided video encoding or one-sided video decoding.

[0062] A video encoding structure involved in the modalities of the present disclosure will be presented below.

[0063] Figure 2 is a schematic block diagram of a video encoder involved in embodiments of the present disclosure. It should be understood that the 200 video encoder can be used to perform lossy compression on the image, or it can be used to perform lossless compression on the image. Lossless compression can be visually lossless or mathematically lossless.

[0064] The Video 200 encoder can be applied to image data in a luma and chroma format (YCbCr, YUV). For example, a YUV ratio can be 4:2:0, 4:2:2, or 4:4:4, where Y represents luma, Cb (U) represents blue chroma, Cr (V) represents red chroma, and U and V represent chroma to describe color and saturation. For example, in a color format, 4:2:0 represents that each 4 samples have 4 luma components and 2 chroma components (YYYYCbCr), 4:2:2 represents that each 4 samples have 4 Petition 870250091537, dated 07 / 10 / 2025, pp. 211 / 401 13 / 165 luma components and 4 chroma components (YYYYCbCrCbCr) and 4:4:4 represents the complete display of the sample (YYYYCbCrCbCrCrCrCr).

[0065] For example, the 200 video encoder reads video data and partitions each image of the video data into multiple CTUs (Coding Tree Units). In some examples, the CTB may be referred to as a tree block, larger coding unit (LCU), or coding tree block (CTB). Each CTU can be associated with a sample block of identical size within the image. Each sample can correspond to one luma (or luminance) sample and two chroma (or chrominance) samples. Thus, each CTU can be associated with one luma sample block and two chroma sample blocks. The size of a single CTU is, for example, 128 x 128, 64 x 64, 32 x 32, or similar. A single CTU can be partitioned into multiple coding units (CUs) for encoding. The CU can be a rectangular block or a square block.A can be partitioned into a prediction unit (PU) and a transformation unit (TU), which separates encoding, prediction, and transformation, making processing more flexible. In one example, a CTU is partitioned into CUs in a quadtree manner, and a CU is partitioned into TUs and PUs in a quadtree manner.

[0066] The video encoder and video decoder can support various PU sizes. Assuming the size of a specific CU is 2N x 2N, the video encoder and video decoder can support a PU size of 2N x 2N or N x N for intra-prediction and support symmetrical PUs of 2N x 2N, 2N x N, N x 2N, N x N or similar sizes for prediction between themselves. The video encoder and video decoder can also support asymmetrical PUs of 2N x nU, 2N x nD, nL x Petition 870250091537, dated 07 / 10 / 2025, page 212 / 401 14 / 165 2N and nR x 2N for prediction between each other.

[0067] In some embodiments, as shown in Figure 2, the video encoder 200 may include: a prediction unit 210, a residual unit 220, a transformation / quantization unit 230, an inverse transformation / inverse quantization unit 240, a reconstruction unit 250, a loop filter unit 260, a temporary decoded image storage unit 270, and an entropy encoding unit 280. It should be noted that the video encoder 200 may include more, fewer, or different functional components.

[0068] Optionally, in this disclosure, a current block may be referred to as a current encoding unit () or a current prediction unit (PU), a prediction block may be referred to as a prediction image block or an image prediction block, and a reconstructed image block may be referred to as a reconstructed block or a reconstructed image block.

[0069] In some embodiments, the prediction unit 210 includes an interprediction unit 211 and an intraprediction unit 212. Because there is a strong correlation between adjacent samples in a video image, an intraprediction method is used in video encoding and decoding technology to eliminate spatial redundancy between adjacent samples. Because there is a strong similarity between adjacent images in a video, an inter-image prediction method is used in video encoding and decoding technology to eliminate temporal redundancy between adjacent images. Thus, encoding efficiency is improved.

[0070] The inter-forecasting unit 211 can be used for inter-forecasting. Inter-forecasting can include motion estimation and motion compensation. Petition 870250091537, dated 07 / 10 / 2025, pp. 213 / 401 15 / 165 and can refer to information from different images. In interprediction, motion information is used to find a reference block from a reference image, and a prediction block is generated according to the reference block to eliminate temporal redundancy. An image used for interprediction can be a P-frame and / or a B-frame, where the P-frame refers to a direct prediction image and the B-frame refers to a bidirectional prediction image. Interprediction uses motion information to find the reference block from the reference image and generates the prediction block according to the reference block. Motion information includes a list of reference images where the reference image is located, an index of reference images, and a motion vector. The motion vector can be a whole-pixel motion vector or a fractional-pixel motion vector.In the case where the motion vector is a fractional pixel motion vector, interpolation filtering needs to be used on the reference image to generate a necessary fractional pixel block. Here, a block of whole pixels or a block of fractional pixels found in the reference image according to the motion vector is called a reference block. In some technologies, the reference block will be used directly as a prediction block. In some technologies, the prediction block will be generated by processing the reference block. Processing the reference block to generate the prediction block can also be understood as using the reference block as a prediction block and then processing the prediction block to generate a new prediction block.

[0071] The prediction unit 212 refers only to information from the same image for prediction. Petition 870250091537, dated 07 / 10 / 2025, pp. 214 / 401 16 / 165 sample information in a current image block to eliminate spatial redundancy. A frame used for intra-prediction can be an I-frame.

[0072] There are several prediction modes for intra-prediction. Considering the H series of international digital video coding standards as an example, the H.264 / AVC standard has 8 angle prediction modes and 1 no-angle prediction mode, and the H.265 / HEVC standard is expanded to 33 angle prediction modes and 2 no-angle prediction modes. The intra-prediction modes used by HEVC include one planar mode, one direct current (DC) mode, and 33 angle modes, for a total of 35 prediction modes. The intra-prediction modes used by HEVC are one planar mode, one DC mode, and 65 angle modes, for a total of 67 prediction modes.

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

[0074] Residual unit 220 can generate a residual block of a CU based on a sample block of the CU and a prediction block of a PU of the CU. For example, residual unit 220 can generate the residual block of the CU such that each sample in the residual block has a value equal to the difference between a sample in the sample block of the CU and a corresponding sample in the prediction block of the PU of the CU.

[0075] The transformation / quantization unit 230 can quantize a transformation coefficient. The transformation / quantization unit 230 can quantize a transformation coefficient associated with a CU TU based on a quantization parameter (QP) value associated with the CU. The video encoder 200 can adjust a degree of Petition 870250091537, dated 07 / 10 / 2025, pp. 215 / 401 17 / 165 quantization applied to the transformation coefficient associated with the CU adjusting the QP value associated with the CU.

[0076] The inverse transformation / inverse quantization unit 240 can separately perform inverse quantization and inverse transformation on the quantized transformation coefficient, to reconstruct a residual block from the quantized transformation coefficient.

[0077] Reconstruction unit 250 can add samples from the reconstructed residual block to the corresponding samples from one or more prediction blocks generated by prediction unit 210, to generate a reconstructed block associated with the TU. By reconstructing the sample block of each TU of the CU in this way, video encoder 200 can reconstruct the sample block of the CU.

[0078] The 260 loop filter unit is used to process inversely transformed and inversely quantized samples, to compensate for distortion information and provide a good reference for subsequent encoded samples. For example, a deblock filtering operation can be performed to reduce sample block blocking artifacts associated with the CU.

[0079] In some embodiments, the 260 loop filter unit includes an unlock filtering unit and an adaptive shift / adaptive loop filtering (SAO / ALF) unit, wherein the unlock filtering unit is used to remove blocking artifacts and the SAO / ALF unit is used to remove a ringing effect.

[0080] Temporary decoded image storage 270 can store the reconstructed sample block. Interprediction unit 211 can use a reference image containing the sample block. Petition 870250091537, dated 07 / 10 / 2025, pp. 216 / 401 18 / 165 reconstructed to perform interprediction in a PU of another image. Additionally, the intraprediction unit 212 can use the reconstructed sample block in the decoded temporary image storage 270 to perform intraprediction in other PUs in the same image as the CU.

[0081] The entropy encoding unit 280 can receive the quantized transformation coefficient from the transformation / quantization unit 230. The entropy encoding unit 280 can perform one or more entropy encoding operations on the quantized transformation coefficient to generate entropy-encoded data.

[0082] Figure 3 is a schematic block diagram of a video decoder involved in embodiments of the present disclosure.

[0083] As shown in Figure 3, the video decoder 300 includes an entropy decoding unit 310, a prediction unit 320, an inverse quantization / inverse transform unit 330, a reconstruction unit 340, a loop filter unit 350, and a temporary decoded image storage unit 360. It should be noted that the video decoder 300 may include more, fewer, or different functional components.

[0084] The video decoder 300 can receive a bitstream. The entropy decoding unit 310 can analyze the bitstream to extract syntax elements from the bitstream. As part of the bitstream analysis, the entropy decoding unit 310 can analyze entropy-encoded syntax elements in the bitstream. The prediction unit 320, the inverse quantization / inverse transform unit 330, the reconstruction unit 340, and the loop filter unit Petition 870250091537, dated 07 / 10 / 2025, pp. 217 / 401 19 / 165 350 can decode video data according to the syntax element(s) extracted from the bitstream, that is, generate decoded video data.

[0085] In some modalities, the prediction unit 320 includes an intraprediction unit 322 and an interprediction unit 321.

[0086] The intra-prediction unit 322 can perform intra-prediction to generate a prediction block for a PU. The intra-prediction unit 322 can use an intra-prediction mode to generate a prediction block of a PU based on sample blocks of spatially adjacent PUs. The intra-prediction unit 322 can also determine the intra-prediction mode of the PU based on one or more parsed syntax elements of the bitstream.

[0087] The interprediction unit 321 can construct a first list of reference images (list 0) and a second list of reference images (list 1) according to the syntax element(s) analyzed from the bitstream. Furthermore, in a case where the PU is encoded using interprediction, the entropy decoding unit 310 can analyze the motion information of the PU. The interprediction unit 321 can determine one or more reference blocks of the PU based on the motion information of the PU. The interprediction unit 321 can generate a prediction block of the PU based on one or more reference blocks of the PU.

[0088] The inverse quantization / inverse transformation unit 330 can perform inverse quantization (i.e., dequantization) on a transformation coefficient associated with a TU. The inverse quantization / inverse transformation unit 330 can use a QP value associated with a CU of the TU to determine a degree of quantization. Petition 870250091537, dated 07 / 10 / 2025, pp. 218 / 401 20 / 165

[0089] After the transformation coefficient is inversely quantized, the inverse quantization / inverse transformation unit 330 can apply one or more inverse transformations to the inversely quantized transformation coefficient, to generate a residual block associated with the TU.

[0090] Reconstruction unit 340 uses the residual block associated with the CU TU and the prediction block of the CU PU to reconstruct a sample block of the CU. For example, reconstruction unit 340 can add samples from the residual block to the corresponding samples from the prediction block to reconstruct the sample block of the CU to obtain a reconstructed block.

[0091] The 350 loop filter unit can perform an unblock filtering operation to reduce sample block blocking artifacts associated with.

[0092] The 300 video decoder can store the reconstructed image from the CU in the 360 ​​decoded temporary image storage. The 300 video decoder can use the reconstructed image in the 360 ​​decoded temporary image storage as a reference image for subsequent preview or transmit the reconstructed image to a display device for display.

[0093] A basic video encoding and decoding process is as follows. At one end of encoding, an image is partitioned into blocks, and for a current block, the prediction unit 210 generates a prediction block of the current block using intra-prediction or inter-prediction. The residual unit 220 can calculate, based on the prediction block and an original block of the current block, a residual block, that is, a difference between the prediction block and the original block of the current block. The block Petition 870250091537, dated 07 / 10 / 2025, pp. 219 / 401 The 21 / 165 residual can also be referred to as residual information. The residual block undergoes processes such as transformation and quantization by the 230 transformation / quantization unit, so that information to which the human eye is not sensitive can be removed to eliminate visual redundancy. Optionally, the residual block before transformation and quantization performed by the 230 transformation / quantization unit can be referred to as a time-domain residual block, and the time-domain residual block transformed and quantized by the 230 transformation / quantization unit can be referred to as a frequency residual block or a frequency-domain residual block. The 280 entropy encoding unit receives the output of the transformation coefficient quantized by the 230 transformation / quantization unit and can perform entropy encoding on the quantized transformation coefficient to generate a bit stream.For example, the 280 entropy encoding unit can eliminate character redundancy according to a target context model and probability information of the binary bitstream.

[0094] At one end of the decoding process, the entropy decoding unit 310 can analyze the bitstream to obtain prediction information, quantization coefficient matrix, etc. of the current block, and the prediction unit 320 performs intra-prediction or inter-prediction on the current block to generate a prediction block of the current block based on the prediction information. The inverse quantization / inverse transformation unit 330 uses the quantization coefficient matrix obtained from the bitstream to perform inverse quantization and inverse transformation on the quantization coefficient matrix to obtain Petition 870250091537, dated 07 / 10 / 2025, pp. 220 / 401 22 / 165 a residual block. The reconstruction unit 340 adds the prediction block and the residual block to obtain a reconstructed block. Reconstructed blocks constitute a reconstructed image. The loop filter unit 350 performs loop filtering on the reconstructed image based on an image or block to obtain a decoded image. The encoding end also needs to perform operations similar to those of the decoding end to obtain a decoded image. The decoded image can also be referred to as a reconstructed image, and the reconstructed image can be used as a reference image for a subsequent image for interprediction.

[0095] It should be noted that block partition information, as well as mode information or parameter information for prediction, transformation, quantization, entropy coding, loop filtering, etc., determined by the encoding end, are carried in the bitstream when necessary. The decoding end analyzes the bitstream and performs analysis according to the existing information to determine the same block partition information, mode information, or parameter information for prediction, transformation, quantization, entropy coding, loop filtering, etc., as the encoding end, thus ensuring that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end.

[0096] The above is the basic process for a video codec in a block-based hybrid encoding framework. With technological development, some modules or steps of the framework or process may be optimized. This disclosure applies to the process Petition 870250091537, dated 07 / 10 / 2025, pp. 221 / 401 23 / 165 is the basic video codec under the block-based hybrid encoding framework, but is not limited to the structure and process.

[0097] The international video coding standards development organization (Joint Video Experts Team (JVET)) established a team to study a coding model beyond H.266 / VVC and named the model (i.e., platform testing software) the Enhanced Compression Model (ECM). The ECM began adopting newer and more efficient compression algorithms based on VTM10.0 and currently has coding performance that exceeds VVC by about 13%. The ECM not only expands the coding unit size for a specific resolution but also integrates many intra-forecasting and inter-forecasting technologies.

[0098] The technical solutions of the modalities of this disclosure are improvements in the ECM reference software to achieve greater coding efficiency.

[0099] In embodiments of this disclosure, the current block can be a current encoding unit () or a current prediction unit (PU). Due to parallel processing requirements, an image can be partitioned into slices, and slices within the same image can be processed in parallel, i.e., there is no data dependency between slices. The term frame is a commonly used term, which can generally be understood as a frame being an image. In this disclosure, frame can also be replaced by an image or slices.

[00100] In real-life videos, there are usually variations in lighting intensity in the video content, such as a decrease in lighting intensity over time, blocking by dark clouds, or variations in Petition 870250091537, dated 07 / 10 / 2025, pp. 222 / 401 24 / 165 camera flash intensity. The difference between the video content and adjacent images lies primarily in the strength of a direct current (DC) component of the image, and there is basically no change in texture information in the content. However, due to the influence of a large DC component value, motion search and motion compensation of interprediction technology cannot effectively predict these contents and are prone to introducing a lot of residual information during encoding. Local illumination compensation (LIC) technology can effectively remove DC redundancy information, accurately predict luma change, and make the corresponding compensation, thus making residual information small and improving encoding efficiency. In the following text, local illumination compensation technology is abbreviated as illumination compensation.

[00101] The latest H.266 / VVC video codec standard has been finalized. The Joint Video Coding Standards Expert Team (JVET) proposed exploring video encoding and decoding standards beyond VVC-based encoding performance and established the exploratory experiment EE2 with the goal of going beyond VVC. The platform reference software used in the exploratory experiment is based on VTM11.0. The new algorithm will be integrated into the platform reference software, and the branch will be changed to ECM. Furthermore, several expert discussion teams will be established for ECM. The latest version 8.0 of the ECM reference software already has encoding performance beyond VVC by about 19%. VVC, as the current latest standard, is only about 27% higher in performance. Petition 870250091537, dated 07 / 10 / 2025, pp. 223 / 401 25 / 165 encoding is superior to the previous generation H.265 / HEVC video codec standard. It is conceivable that, in the near future, the window for exploration and research into the next generation of video encoding and decoding standards may be opened based on ECM.

[00102] In the early days of ECM, the coding tools that VVC lacked were integrated into the reference software. The coding tools provide efficient coding performance and processing capabilities for different ECM coding scenarios, including LIC. A brief introduction to LIC in current ECM is given below.

[00103] Lighting compensation technology is an intercoding technology. During the intercoding process, a current encoding unit obtains a corresponding reference block according to the motion vector (MV) information. The reference block usually comes from a different encoding frame, i.e., a reference encoding unit does not belong to the current image. Different images may have large or small changes in some specific scenarios, and lighting compensation technology is very effective in processing some of these changes. As shown in Figures 4A and 4B, the texture information of the left and right parts is basically the same, and the difference lies in the change in brightness between the two parts. The image on the right is very bright because it is illuminated by the camera flash, and the image on the left is illuminated by normal natural light.There is a difference between the two images, and this difference places a huge burden on video encoding. Assuming the left block uses the right block as a reference encoding unit, the texture information of the two blocks is the same, and... Petition 870250091537, dated 07 / 10 / 2025, pp. 224 / 401 26 / 165 therefore, the difference in texture detail is very small, but the overall residue is large. This is because the samples in the image on the right are shifted as a whole due to the flash, and this shift is included in the residue of the two blocks. If the residue were directly transformed and quantized and then written to the bitstream, the overhead would be enormous.

[00104] The lighting compensation technology in existing ECM reference software eliminates the influence, which is, for example, caused by flash or changes in lighting, through a linear adjustment method, thus improving the overall prediction effect. The main aspects of lighting compensation technology are as follows.

[00105] The correlation between reconstructed samples of adjacent parts of the reference coding unit and the current coding unit is used to adjust the correlation between changes in the prediction samples and the reference samples within the coding unit. This is because the upper and left reconstructed samples adjacent to the current coding unit can be obtained if they exist, and the upper and left reconstructed samples adjacent to the reference coding unit in the reference image can also be obtained. By modeling the reconstructed samples from the current image and the reconstructed samples from the reference image, a matching fit model can be obtained.

[00106] During the modeling process, the ECM lighting compensation adopts a linear adjustment method. The model is simplified to consist of a scale parameter a and an offset parameter b, which Petition 870250091537, dated 07 / 10 / 2025, pp. 225 / 401 27 / 165 can adjust the lighting change between the current image and the reference image.

[00107] For example, the change relationship is represented by the model parameters, which are shown in Formula (1): Predf(jE,y) = a Ρτβάζχ,γ') + b

[00108] where Pred(x, y) is a forecast block before lighting compensation, Pred'(x, y) is a forecast block after lighting compensation, a is the scale parameter in the lighting compensation model and b is the offset parameter in the lighting compensation model.

[00109] Both a and b in the formula need to be calculated using the information from the current image and the information from the reference image.

[00110] For example, aeb are obtained by modeling spatially reconstructed samples adjacent to the current block and samples adjacent to a corresponding reconstructed block in a reference image, and the derivation formula is shown in Formula (2): Curr_RecngigJl= a Ref_Recngigh+ b(2}

[00111] In the formula above, ^urr-^ecnei. <jk θ a imagem reconstruída da imagem atual e ^ef-^ecnei.nh θ a imagem reconstruída da imagem de referência.

[00112] As shown in Figure 5, in the digital video encoding and decoding process, the current image encoding block is corrected for the illumination difference through the illumination compensation model to obtain a compensated prediction block.

[00113] Calculating the scale parameter a and the deviation parameter b requires the use of samples. Petition 870250091537, dated 07 / 10 / 2025, pp. 226 / 401 28 / 165 reconstructed samples adjacent to the corresponding reconstructed block in the reference image and reconstructed samples adjacent to the coding block in the current image. Based on the correlation between the reconstructed samples adjacent to the coding unit in the current image and the reconstructed samples in the corresponding positions in the reference image, the scale parameter a and the displacement parameter b are modeled and resolved, as shown in Figure 6.

[00114] In Figure 6, the reconstructed pixels are reconstructed samples closest to the CU, the reference image CU is a corresponding reconstructed CU in the reference image, and the current image CU is one to be encoded in the current encoding image. By modeling the corresponding reconstructed pixels in the two images to resolve a linear relationship, the scale parameter a and the offset parameter b are obtained, and then the linear relationship is applied to the reference image CU to obtain a prediction block of the current image CU. The specific modeling process is as follows.

[00115] The lighting compensation model in ECM is a linear model, and the model parameters include the scale factor a and the offset parameter b, which are obtained by least squares error. The number of reconstructed samples is selected based on the width and height of the current encoding unit. In a case where the width or height of the current encoding unit is equal to 4, 4 reconstructed samples are taken from the upper reconstructed samples adjacent to the encoding unit, and 4 reconstructed samples are taken from the left reconstructed samples adjacent to the encoding unit. For example, if the width of the current encoding unit is 16 and the height of the current encoding unit is 4, Petition 870250091537, dated 07 / 10 / 2025, pp. 227 / 401 29 / 165 All 4 reconstructed samples will be taken from the reconstructed samples to the left adjacent to the coding unit, and 4 reconstructed samples will be taken from the reconstructed samples above adjacent to the coding unit with a step size of 3. In the case where the width and height of the current coding unit are not equal to 4, samples with the number of the logarithm of the length of the relatively small side up to base 2 are obtained from the adjacent reconstructed samples above and from the reconstructed samples adjacent to the left.

[00116] The model parameters are calculated after obtaining the upper and left reconstructed samples. Assuming that the reconstructed samples obtained from the reference image are denoted as x, the reconstructed samples from the current image are designated as y, the sum of the reconstructed samples from the reference image is denoted as sumX, the sum of the reconstructed samples from the current image is denoted as sumY, the sum of the squares of the reconstructed samples from the reference image is denoted as sumXX, and the sum of the products of the reconstructed samples from the reference image and the reconstructed samples from the current image is denoted as sumXY, then the parameter calculations are shown in Formula (3):

[00117] a = (sumXY - sumXsumY) / (sumXX - sumXsumX);

[00118] b = sumY - a * sumX (3)

[00119] where sumXsumY is sumX multiplied by sumY.

[00120] There are some shift operations in the calculation process of the ECM reference software, which are simplified processes and will not be described in detail in this document. After the Petition 870250091537, dated 07 / 10 / 2025, pp. 228 / 401 30 / 165 linear model parameters are obtained, the linear transformation is performed on a forecast block after motion compensation to obtain a final forecast block.

[00121] In a case where the samples reconstructed to calculate the linear model parameters belong to an interprediction block, an interpolation operation is necessary.

[00122] Lighting compensation technology in ECM can be used in general forecasting between frames, merge forecasting mode, and sub-block mode, where general forecasting between frames is an inter-frame mode, merge forecasting mode is a merge mode, and sub-block mode is an affine mode. Furthermore, lighting compensation technology is only applicable to a single-frame forecasting mode and is prohibited for use in a multi-frame bidirectional reference mode.

[00123] Furthermore, there is a coupled relationship between the lighting compensation technology in the ECM and another adopted technology. In the current encoding unit, the lighting compensation technology is not applied in conjunction with a bidirectional optical flow (BDOF) technology or a symmetric motion vector difference (SMVD) technology.

[00124] The aforementioned illumination compensation technology is applied to interprediction, and there is a technology in intraprediction that is similar to interprediction, namely intrablock copy (IBC) technology. Intrablock copy technology, as the name suggests, is to find a block in the current image that matches or is close to the current encoding block and then copy it as a prediction block of the current encoding block. This is an intra-prediction technology. Petition 870250091537, dated 07 / 10 / 2025, pp. 229 / 401 31 / 165 prediction used specifically for screen content encoding.

[00125] For example, as shown in Figure 7, there is an inverted triangle graphic texture in the encoding block on the right. If a traditional intra-prediction technology is used to encode the current encoding block, a large amount of bit overhead will be required to encode residual information. After adopting intra-block copy technology, a search is performed within a specified range of the current image to find a similar or identical graphic texture in the upper left corner. By calculating the cost of distortion or hash value matching, a searched reconstructed block is determined and copied as a prediction block of the current encoding block. It can be seen that this prediction technology is much more efficient than the traditional intra-encoding technology.In some scenarios, it is even possible to search for an identical prediction block without encoding residual information, thus saving the overhead of a large number of bits.

[00126] In Figure 7, the solid line with an arrow is the block vector (BV) information of the current encoding block. At the decoding end, the current encoding block finds, based on the BV, a corresponding reconstructed block as the prediction block of the current encoding block.

[00127] Similar to interprediction, IBC has two modes, where one is an advanced motion vector prediction (AMVP) mode and the other is a jump / merge mode (i.e., the merge mode).

[00128] In AMVP mode, the IBC needs to transmit an index to indicate which block vector forecast Petition 870250091537, dated 07 / 10 / 2025, pp. 230 / 401 32 / 165 (BVP) use, as well as encode the block vector difference (BVD).

[00129] In skip / merge mode, the IBC needs to transmit an index to indicate which block vector (BV) information to use.

[00130] Similar to interprediction, in some application scenarios, even if the texture information in the encoding blocks is the same, there may be color differences. In natural sequences, the most common scenario is changing lighting. For example, a camera is set to capture a building, and the video content of the building captured in the morning is the same as the video content of the building captured in the afternoon. However, the lighting intensity changes. Therefore, even if interprediction uses the decoded reconstructed image as reference content, the video content cannot be fully represented. This is because the lighting is different and the overall average of the video content is different. The residual bitstream overhead required for encoding is large.Lighting compensation technology solves this problem very well by converting the reference content and the current content, establishing a linear model, thus adapting to variations in different lighting intensities without altering the texture content.

[00131] Screen content encoding also has a similar problem. Even if the content of the encoding blocks is the same, color deviation or other problems can cause low encoding efficiency of the intrablock copy technology, and even a similar encoding block may not be found. For example, as shown in Figure 8, even if the textures of the image content are the same, the large Petition 870250091537, dated 07 / 10 / 2025, pp. 231 / 401 A 33 / 165 color difference causes a decrease in the efficiency of the block copy technology or even an inability to combine these reconstructed image contents.

[00132] IBC-LIC technology is the same as inter-LIC technology. By establishing a linear relationship between the reference block and the encoding block, the reference block is converted as the prediction block of the current encoding unit. The process is the same as the inter-LIC mentioned above. In some modes, in AMVP mode, the IBC needs a flag to indicate whether to use LIC technology; and in merge mode, LIC technology is enabled and disabled by inheritance.

[00133] For example, after IBC-LIC technology is enabled, the encoding status of the current image area is shown in Figure 9. As shown in Figure 9, from the second sub-image onwards, IBCLIC technology is used in more and more encoding blocks to copy the content of the previously reconstructed sub-image.

[00134] IBC-LIC technology can actually deliver very impressive performance in screen content encoding application scenarios, and its calculation process is the same as the calculation process of inter LIC technology. The complexity is acceptable in terms of both software and hardware, and the cost-benefit ratio is high.

[00135] However, IBC-LIC adopts reference samples and reconstructed samples from the top and left model areas as input for modeling when using inter LIC, which may not be a good option for screen content encoding scenarios. Typically, in natural sequences, lighting variations should be the same for the actual image content. However, in Petition 870250091537, dated 07 / 10 / 2025, pp. 232 / 401 In 34 / 165 screen content scenarios, the change in content is at the pixel level and is sharp. For example, in some PPT application scenarios, the color change is very fast and drastic. Some shapes are red, but a subsequent changed shape might be green. In a case where the current encoding unit includes both colors and the reconstructed reference block has the same texture but a different color change, the parameters calculated using the model cannot accurately reflect the change relationship between different colors. In this case, the model parameters are more like a compromise adjustment. In a special example, considering Figure 10 as an example, assuming a blue circular pattern is on the right and an orange circular pattern is on the left, the blue circular pattern on the right and the orange circular pattern on the left are very similar in shape, and some color gradients are also very similar.Therefore, copying edge shapes and performing color compensation is a highly effective method for saving bitrate. However, an area covered by the model usually has multiple colors, and the prediction block also has different colors, resulting in an inaccurate model fit. As a result, when the intrablock copy lighting compensation mode is used for prediction, the prediction is not accurate, leading to low encoding and decoding efficiency.

[00136] In order to solve the above technical problems, the embodiments of the present disclosure propose a multi-model intrablock copy illumination compensation mode to augment the intrablock copy illumination compensation modes. In this way, the encoding and decoding ends can select a single-model intrablock copy illumination compensation mode (i.e., have only one group of Petition 870250091537, dated 07 / 10 / 2025, pp. 233 / 401 35 / 165 model parameters) for forecast compensation or select the multi-model intrablock copy illumination compensation mode (i.e., including multiple groups of model parameters) for forecast compensation according to the specific situations of the current block. In a case where the multi-model intrablock copy illumination compensation mode is selected to perform forecast compensation in the current block, multiple groups of linear model parameters are determined, and the target linear model parameters are selected from the various groups of linear model parameters. The target model parameters are then used to perform the linear transformation on a reference block of the current block to obtain a forecast block of the current block, thus improving forecast accuracy and enhancing encoding and decoding performance.

[00137] Next, with reference to Figure 11, a video decoding method provided in the embodiment of the present disclosure is introduced taking one decoding end as an example.

[00138] Figure 11 is a schematic flowchart of a video decoding method provided in an embodiment of the present disclosure. The embodiment of the present disclosure is applied to the video decoders shown in Figures 1 and 3. As shown in Figure 11, the method in the embodiments of the present disclosure includes the following steps.

[00139] In S101, a prediction mode for a current block is determined.

[00140] In the embodiments of this disclosure, for convenience of description, the intrablock copy illumination compensation mode with only one group of Petition 870250091537, dated 07 / 10 / 2025, pp. 234 / 401 36 / 165 model parameters is denoted as a single model intrablock copy lighting compensation mode, for example, represented as an IBC-LIC-S mode, where the IBC-LIC-S mode is an currently existing IBC-LIC mode. The intrablock copy lighting compensation mode, including multiple groups of model parameters, is denoted as a multi-model intrablock copy lighting compensation mode, for example, represented as an IBC-LIC-M mode.

[00141] In order to improve the effect of intrablock copy illumination compensation, the embodiments of the present disclosure propose a multi-model intrablock copy illumination compensation mode, which can be understood as an intrablock copy illumination compensation mode including several groups of linear model parameters. For example, a reference block (or an initial prediction block) of the current block is determined using intrablock technology. Then, an ideal group of linear model parameters is selected from the various groups of linear model parameters, and the linear transformation (i.e., illumination compensation) is performed on the reference block of the current block to obtain a prediction block of the current block. Therefore, the illumination compensation effect and the prediction accuracy are enhanced, thus improving the image decoding effect.

[00142] In the embodiments of this disclosure, for convenience of description, the intrablock copy lighting compensation mode with only one model parameter group is denoted as a single model intrablock copy lighting compensation mode, for example, represented as an IBC-LIC-S mode.

[00143] The modalities of this disclosure Petition 870250091537, dated 07 / 10 / 2025, pp. 235 / 401 37 / 165 does not limit the specific way to determine the forecast mode of the current block.

[00144] In some embodiments, the decoding end standardizes the prediction mode of the current block to the multi-model intra-block copy lighting compensation mode.

[00145] In some embodiments, the decoding end creates a list of candidate prediction modes, and the candidate prediction modes include the single-model intrablock copy illumination compensation mode and the multi-model intrablock copy illumination compensation mode. Then, the decoding end determines a cost for each candidate prediction mode in the list of candidate prediction modes to predict a model of the current block and determines a candidate prediction mode with a minimum cost as the prediction mode of the current block.

[00146] In some embodiments, the decoding end decodes a bit stream to obtain the initial information, where the initial information is used to indicate a type of prediction of the current block. Then, the decoding end determines the prediction mode of the current block based on the initial information.

[00147] The methods of this disclosure do not limit the specific form of the initial information.

[00148] In one example, the first information can be represented as modeType.

[00149] For example, in a case where modeType = MODE_INTRA, it indicates that the forecast type of the current block is intra forecast.

[00150] As another example, in a case where modeType = MODE_INTER, it indicates that the forecast type of the current block is inter forecast. Petition 870250091537, dated 07 / 10 / 2025, pp. 236 / 401 38 / 165

[00151] As another example, in a case where modeType = MODE_IBC, it indicates that the current block forecast type is intrablock copy forecast.

[00152] In some embodiments, in a case where a sequence-level flag is included in the embodiments of the present disclosure, before decoding the bitstream to obtain the first information, the decoding end decodes the bitstream to obtain a third flag. The third flag is the sequence-level flag, which is used to indicate whether a current sequence allows local lighting compensation. In a case where the third flag indicates that the current sequence allows local lighting compensation, the decoding end decodes the bitstream to obtain a first flag. Otherwise, the decoding end skips the bitstream decoding step to obtain the first information.

[00153] The modalities of this disclosure do not limit the specific form of the third signal.

[00154] In one example, the third flag can be represented as sps_ibc_lic_enable_flag. The third flag sps_ibc_lic_enable_flag is set with different values ​​to indicate whether the current sequence allows the use of local lighting compensation technology.

[00155] For example, in a case where the value of the third flag sps_ibc_lic_enable_flag is 0, this indicates that the current sequence does not allow the use of local lighting compensation technology.

[00156] As another example, in a case where the value of the third flag sps_ibc_lic_enable_flag is 1, it indicates that the current sequence allows the use of the technology of Petition 870250091537, dated 07 / 10 / 2025, pp. 237 / 401 39 / 165 local lighting compensation.

[00157] The modalities of this disclosure do not limit the specific manner in which the decoding end determines the prediction mode of the current block based on the initial information.

[00158] In some embodiments, in a case where the decoding end determines that the prediction type of the current block is intra-prediction or inter-prediction based on the initial information, the decoding end continues to decode the bitstream to determine a specific mode of intra-prediction or inter-prediction of the current block. In this case, the decoding end may determine that the prediction mode of the current block is not the multi-model intra-block copy lighting compensation mode.

[00159] In some embodiments, in a case where the decoding end determines that the current block prediction type is intrablock copy prediction based on first information, the decoding end may default the current block prediction mode to multimodel intrablock copy lighting compensation mode.

[00160] In some embodiments, in the case where the decoding end determines that the prediction type of the current block is intrablock copy prediction based on first information, the decoding end continues to decode the bitstream to obtain a first flag that is used to indicate whether the current block uses a merge mode, and then the decoding end determines the prediction mode of the current block based on the first flag.

[00161] The modalities of this disclosure do not limit the specific form of the first flag. Petition 870250091537, dated 07 / 10 / 2025, pp. 238 / 401 40 / 165

[00162] In one example, the first flag can be represented as merge_flag. The first merge_flag flag is set with different values ​​to indicate whether the current block uses merge mode for prediction.

[00163] For example, in a case where the value of the first merge_flag is 0, this indicates that the current block does not use the merge mode for prediction.

[00164] As another example, in a case where the value of the first merge_flag is 1, this indicates that the current block uses merge mode for prediction.

[00165] The modalities of the present disclosure do not limit the specific manner in which the decoding end determines the prediction mode of the current block based on the first flag.

[00166] In a possible implementation, in the case where the first flag indicates that the current block does not use the merge mode, the decoding end defaults the prediction mode of the current block to the multi-model intra-block copy lighting compensation mode.

[00167] In a possible implementation, in the case where the first flag indicates that the current block does not use the merge mode, the decoding end can use the single-model intrablock copy lighting compensation mode and the multi-model intrablock copy lighting compensation mode to predict a model area of ​​the current block separately and select a mode with a minimum cost as the prediction mode of the current block.

[00168] In a possible implementation, in the case where the first flag indicates that the current block does not use merge mode, the end of the decoding Petition 870250091537, dated 07 / 10 / 2025, pp. 239 / 401 41 / 165 continues to decode the bitstream to obtain the second piece of information that is used to indicate whether the current block uses the intrablock copy lighting compensation mode, and then the decoding end determines the prediction mode of the current block based on the second piece of information.

[00169] The modalities of this disclosure do not limit the specific form of the second piece of information.

[00170] In some modes, the second piece of information may be represented as cu_ibc_lic_flag. The second piece of information cu_ibc_lic_flag is set to different values ​​to indicate whether the current block uses the intrablock copy lighting compensation mode.

[00171] For example, in a case where the value of the second cu_ibc_lic_flag information is 0, this indicates that the current block does not use the intrablock copy lighting compensation mode for prediction.

[00172] As another example, in a case where the value of the second cu_ibc_lic_flag information is 1, this indicates that the current block uses the intrablock copy lighting compensation mode for prediction.

[00173] In some embodiments, the decoding end has restrictions on block sizes using the intrablock copy illumination compensation mode. For example, blocks of certain sizes do not use the intrablock copy illumination compensation mode, and blocks of certain sizes do use the intrablock copy illumination compensation mode. Based on this, before decoding the second piece of information, the decoding end determines whether a current block size meets a predefined first size. In a case where the current block size meets the predefined first size, the decoding end Petition 870250091537, dated 07 / 10 / 2025, pages 240 / 401 42 / 165 decodes the bit stream to obtain the second piece of information.

[00174] The modalities of this disclosure do not limit the specific indicator(s) for measuring the size of the current block.

[00175] For example, a width and height of the current block can be used to measure the size of the current block. For example, in a case where the width of the current block is greater than threshold 1 and the height of the current block is greater than threshold 2, it is determined that the size of the current block meets the first predefined size. Then, the bitstream is decoded to obtain the second piece of information. A threshold value of 1 can be 4, 8, 16, 32, 128, 256, etc. A limit value of 2 could be 4, 8, 16, 32, 128, 256, etc. Limit 1 can be equal to limit 2.

[00176] For example, a product of the width and height of the current block (i.e., an area of ​​the current block) can be used to measure the size of the current block. For example, in a case where the area of ​​the current block is greater than or equal to threshold 3 and less than threshold 5, it is determined that the size of the current block meets the first predefined size. Then, the bitstream is decoded to obtain the second piece of information. A threshold value of 3 could be 16, 32, etc. A threshold value of 5 could be 256, 1024, etc.

[00177] For example, the number of samples included in the current block can be used to measure the size of the current block. For example, in a case where the number of samples included in the current block is greater than or equal to the threshold 4, it is determined that the size of the current block meets the first predefined size. Then, the bitstream is decoded to obtain the second piece of information. A value of the threshold 4 could be 16, 32, 128, Petition 870250091537, dated 07 / 10 / 2025, pp. 241 / 401 43 / 165 256, 1024, etc.

[00178] The modalities of this disclosure do not limit the specific manner in which the decoding end determines the prediction mode of the current block based on the second piece of information.

[00179] Method 1: In the case where the second piece of information indicates that the current block does not use the intra-block copy lighting compensation mode, the decoding end continues to decode the bitstream, determines the prediction mode of the current block, and determines that the prediction mode of the current block is not the multi-model intra-block copy lighting compensation mode.

[00180] Method 2: In the case where the second piece of information indicates that the current block uses the intrablock copy lighting compensation mode, the decoding end defaults the prediction mode of the current block to the multi-model intrablock copy lighting compensation mode.

[00181] Method 3: In the case where the second piece of information indicates that the current block uses the intrablock copy lighting compensation mode, the decoding end can use the single-model intrablock copy lighting compensation mode and the multi-model intrablock copy lighting compensation mode to predict the area of ​​the current block model separately and select the mode with the minimum cost as the prediction mode for the current block.

[00182] Method 4: In the case where the second piece of information indicates that the current block uses the intra-block copy illumination compensation mode, the decoding end continues to decode the bitstream to obtain index information, which is used Petition 870250091537, dated 07 / 10 / 2025, pp. 242 / 401 44 / 165 to indicate an index of the intrablock copy illumination compensation mode used by the current block, and then the decoding end determines the prediction mode of the current block based on the index information.

[00183] The modalities of this disclosure do not limit the specific form of the index information.

[00184] In some embodiments, index information may be represented as cu_ibc_lic_index. The cu_ibc_lic_index index information is set to different values ​​to indicate the mode indices of the intrablock copy lighting compensation mode used by the current block.

[00185] For example, in a case where the cu_ibc_lic_index information value is a first numeric value, this indicates that the current block prediction mode is the single model intrablock copy lighting compensation mode.

[00186] As another example, in a case where the cu_ibc_lic_index flag value is a second numeric value, it is determined that the current block prediction mode is the multi-model intrablock copy lighting compensation mode.

[00187] The terms of this disclosure do not limit the specific values ​​of the first numerical value and the second numerical value.

[00188] For example, the first numerical value is 0.

[00189] For example, the second numerical value is 1.

[00190] In an example of Method 4, the decoding end determines the prediction mode of the current block by decoding the syntax elements shown in Table 1. Petition 870250091537, dated 07 / 10 / 2025, pp. 243 / 401 45 / 165 TABLE 1 if (sps_ibc_lic_enable_flag && modeType == MODE_IBC && !merge_flag && cbWidth * cbHeight >32) { cu_ibc_lic_flag ae(v) if (cu_ibc_lic_flag) cu_ibc_lic_index ae(v)} else { cu_ibc_lic_flag = 0}

[00191] Here, sps_ibc_lic_enable_flag is the third flag, which is used to indicate whether the current sequence allows local lighting compensation; modeType is the first piece of information, which is used to indicate the prediction type of the current block; modeType == MODE_IBC indicates that the prediction type of the current block is intrablock copy prediction; merge_flag is the first flag, which is used to indicate whether the current block uses the merge mode for prediction; cbWidth is the width of the current block and cbHeight is the height of the current block; _ibc_lic_flag is the second piece of information, which is used to indicate whether the current block uses the intrablock copy lighting compensation mode; and _ibc_lic_index is the index flag, which is used to indicate the mode index of the intrablock copy lighting compensation mode used by the current block.

[00192] As shown in Table 1 above, in this example, the decoding end first decodes sps_ibc_lic_enable_flag. In a case where sps_ibc_lic_enable_flag indicates that the current sequence allows local lighting compensation, the decoding end continues to decode merge_flag. In a case Petition 870250091537, dated 07 / 10 / 2025, pp. 244 / 401 46 / 165 where merge_flag indicates that the current block does not use merge mode, the decoding end determines if cbWidth * cbHeight of the current block is greater than 32, where 32 is a predefined value that can be changed according to the actual conditions. In a case where the decoding end determines that cbWidth * cbHeight of the current block is greater than 32, the decoding end continues to decode cu_ibc_lic_flag. In a case where cu_ibc_lic_flag indicates that the current block uses intrablock copy lighting compensation mode, the decoding end continues to decode cu_ibc_lic_index to obtain whether the prediction mode of the current block is single-model intrablock copy lighting compensation mode or multi-model intrablock copy lighting compensation mode.

[00193] For example, cu_ibc_lic_index can be decoded in a context-based manner or in an equal-probability manner.

[00194] Method 5: In a case where the second piece of information indicates that the current block uses the intrablock copy lighting compensation mode and the current block size is greater than or equal to a second predefined size, the multi-model intrablock copy lighting compensation mode is determined as the current block's prediction mode.

[00195] In Method 5, for a large current block, the multi-model intrablock copy lighting compensation mode is used by default. That is, during the parsing of syntax elements at the decoding end, in a case where cu_ibc_lic_flag is true and the current block size is larger than the second predefined size, this indicates that the current block uses the lighting compensation mode of Petition 870250091537, dated 07 / 10 / 2025, pp. 245 / 401 47 / 165 intrablock copy of multiple models; otherwise, this indicates that the current block does not use lighting compensation technology and there is no need to analyze the index.

[00196] The modalities of this disclosure do not limit the specific indicator(s) for measuring the size of the current block.

[00197] For example, the width and height of the current block can be used to measure the size of the current block. For example, in a case where the width of the current block is greater than limit 1 and the height of the current block is greater than limit 2, it is determined that the size of the current block is greater than the second predefined size. A limit 1 value can be 4, 8, 16, 32, 128, 256, etc. A limit 2 value can be 4, 8, 16, 32, 128, 256, etc. The limit can be equal to limit 2.

[00198] For example, a product of the width and height of the current block (i.e., an area of ​​the current block) can be used to measure the size of the current block. For example, in a case where the area of ​​the current block is greater than or equal to the threshold 3, it is determined that the size of the current block is greater than the second predefined size. A threshold value of 3 can be 16, 32, 128, 256, etc.

[00199] For example, the number of samples included in the current block can be used to measure the size of the current block. For example, in a case where the number of samples included in the current block is greater than or equal to the threshold 4, it is determined that the size of the current block is greater than the second predefined size. A value of the threshold 4 can be 16, 32, 128, 256, 1024, etc.

[00200] The second piece of information in the modes above only indicates whether the current block uses the intrablock copy lighting compensation mode and does not indicate Petition 870250091537, dated 07 / 10 / 2025, pp. 246 / 401 48 / 165 is the mode index for intrablock copy illumination compensation mode. The mode index for intrablock copy illumination compensation mode is indicated by the index information.

[00201] In some embodiments, the second information indicates whether the current block uses the intrablock copy illumination compensation mode, and the second information may additionally indicate the mode index of the intrablock copy illumination compensation mode. In this case, the decoding end can directly determine the prediction mode of the current block based on a value of the second information.

[00202] In one example, cu_ibc_lic_mode can be used in this mode to represent the second piece of information. Alternatively, another syntax element can be used to represent the second piece of information, which will not be limited in the modes of this disclosure.

[00203] For example, in a case where the value of the second cu_ibc_lic_mode information is a first numeric value, it is determined that the prediction mode of the current block is a non-intrablock copy lighting compensation mode.

[00204] As another example, in a case where the value of the second cu_ibc_lic_mode information is a second numeric value, it is determined that the prediction mode of the current block is the single model intrablock copy lighting compensation mode.

[00205] As another example, in a case where the value of the second cu_ibc_lic_mode information is a third numeric value, it is determined that the prediction mode of the current block is the multi-model intrablock copy lighting compensation mode. Petition 870250091537, dated 07 / 10 / 2025, pp. 247 / 401 49 / 165

[00206] The terms of this disclosure do not limit the specific values ​​of the first numerical value, the second numerical value, and the third numerical value.

[00207] In one example, the first numerical value is 0, the second numerical value is 1, and the third numerical value is 2.

[00208] In this mode, if the current block uses the intrablock copy lighting compensation mode and the mode index of the intrablock copy lighting compensation mode used by the current block can be determined through the specific value of the second cu_ibc_lic_mode information.

[00209] For example, the decoding end decodes the bit stream to obtain the second cu_ibc_lic_mode information. In the case where the value of the second cu_ibc_lic_mode information is the first numeric value, it is determined that the current block does not use the intrablock copy lighting compensation mode. In a case where the value of the second cu_ibc_lic_mode information is the second numeric value, it is determined that the prediction mode of the current block is the single-model intrablock copy lighting compensation mode. In a case where the value of the second cu_ibc_lic_mode information is the third numeric value, it is determined that the prediction mode of the current block is the multi-model intrablock copy lighting compensation mode.

[00210] In an example of this mode, the decoding endpoint determines the prediction mode of the current block by decoding the syntax elements shown in Table 2. TABLE 2 Petition 870250091537, dated 07 / 10 / 2025, pp. 248 / 401 50 / 165 if (sps_ibc_lic_enable_flag && modeType == MODE_IBC && !merge_flag && cbWidth * cbHeight >32) { cu_ibc_lic_mode ae(v)} else { cu_ibc_lic_mode = 0}

[00211] As shown in Table 2 above, in this example, the decoding end first decodes sps_ibc_lic_enable_flag. In a case where sps_ibc_lic_enable_flag indicates that the current sequence allows local lighting compensation, the decoding end proceeds to decode merge_flag. In a case where merge_flag indicates that the current block does not use merge mode, the decoding end determines if cbWidth * cbHeight of the current block is greater than 32, where 32 is a predefined value that can be changed according to the actual conditions. In a case where the decoding end determines that cbWidth * cbHeight of the current block is greater than 32, the decoding end proceeds to decode cu_ibc_lic_mode. In a case where cu_ibc_lic_mode is 0, it indicates that the current block does not use intrablock copy lighting compensation mode.In a case where cu_ibc_lic_mode is 1, it indicates that the current block uses the single-model intrablock copy lighting compensation mode. In a case where cu_ibc_lic_mode is 2, it indicates that the current block uses the multi-model intrablock copy lighting compensation mode.

[00212] In some embodiments, the intrablock copy illumination compensation mode is mutually exclusive with some tools. Thus, a condition for Petition 870250091537, dated 07 / 10 / 2025, pp. 249 / 401 51 / 165 analyzing the second piece of information can be determined according to a coupling relationship of a decoding tool existing in the standards. In this case, before the decoding end decodes the second piece of information, the method additionally includes: decoding the bitstream by the decoding end to obtain the third piece of information. The third piece of information is used to indicate whether the current block is decoded using a first tool, and the first tool is mutually exclusive with the intrablock copy illumination compensation technology. In a case where the third piece of information indicates that the current block is decoded without using the first tool, the decoding end decodes the bitstream to obtain the second piece of information.

[00213] In embodiments of the present disclosure, in a case where the current block allows the use of other types of intrablock copy prediction technologies that cannot be used simultaneously with the intrablock copy lighting compensation technology, the analysis of the second information of the current block can be determined first by analyzing a block-level usage flag (i.e., the third information) of the first tool. In a case where the block-level usage flag (i.e., the third information) of the first tool is true, there is no need to analyze the second information of the current block; otherwise, the second information of the current block will be analyzed.

[00214] For example, the syntax element table is updated by taking an example where the first tool is RRIBC. RRIBC stands for Reordered by Reconstruction, which is a technology that reorganizes samples. Petition 870250091537, dated 07 / 10 / 2025, pp. 250 / 401 52 / 165 are reconstructed and then search for a matching block. Reorganization operations include, but are not limited to, horizontal inversion and vertical inversion. In this case, the decoding end decodes the syntax elements shown in Table 3 to obtain the prediction mode of the current block. TABLE 3 if (sps_ibc_lic_enable_flag && modeType == MODE_IBC && !merge_flag && cbWidth * cbHeight >32 && cu_rribc_flip_type == 0) { cu_ibc_lic_flag ae(v) if (cu_ibc_lic_flag) cu_ibc_lic_index ae(v)} else { cu_ibc_lic_flag = 0}

[00215] As shown in Table 3, cu_rribc_flip_type is a type of operation of the first RRIBC tool. In a case where cu_rribc_flip_type is 0, it indicates that the current block does not use RRIBC technology; otherwise, it indicates that the current block uses RRIBC technology.

[00216] As shown in Table 3, the decoding end decodes cu_rribc_flip_type. In a case where cu_rribc_flip_type = 0, it indicates that the current block does not use RRIBC technology; then, the decoding end continues to decode the second cu_ibc_lic_flag information. In a case where cu_rribc_flip_type = 1, it indicates that the current block uses RRIBC technology; then, the decoding end skips decoding the second cu_ibc_lic_flag information and determines that the current block does not use copy lighting compensation technology. Petition 870250091537, dated 07 / 10 / 2025, pp. 251 / 401 53 / 165 intrablock.

[00217] In one example, the second piece of information in Table 3 can also be represented by cu_ibc_lic_mode in Table 2, and therefore the cu_ibc_lic_index information in Table 3 is excluded.

[00218] The above describes the specific process in which the decoding end determines the prediction mode of the current block in a case where the first flag indicates that the current block does not use merge mode.

[00219] In some embodiments, in a case where the first flag indicates that the current block uses merge mode, the decoding end can determine the prediction mode of the current block in at least the following ways.

[00220] Method 1: In the case where the first flag indicates that the current block uses merge mode, a prediction mode of the reference block is determined as the prediction mode of the current block.

[00221] In this Method 1, in the case where the decoding end determines that the current block uses merge mode, the prediction mode of the current block is obtained by inheritance. Specifically, the decoding end determines the reference block of the current block and sets the prediction mode of the reference block as the prediction mode of the current block.

[00222] For example, in a case where the reference block's prediction mode is the single-model intrablock copy lighting compensation mode, it is determined that the current block's prediction mode is also the single-model intrablock copy lighting compensation mode.

[00223] As another example, in a case where the Petition 870250091537, dated 07 / 10 / 2025, pp. 252 / 401 The 54 / 165 reference block prediction mode is the multi-model intra-block copy lighting compensation mode; it is determined that the current block prediction mode is also the multi-model intra-block copy lighting compensation mode.

[00224] In this Method 1, the encoding end does not need to transmit information about the prediction mode of the current block in the bitstream.

[00225] Method 2: In the case where the first flag indicates that the current block uses merge mode, the single model intrablock copy lighting compensation mode is determined as the current block's prediction mode.

[00226] In this Method 2, in the case where the current block uses the merge mode, by default, both the encoding end and the decoding end determine the single model intrablock copy lighting compensation mode as the prediction mode of the current block.

[00227] In this Method 2, the encoding end does not need to transmit information about the prediction mode of the current block in the bitstream.

[00228] Method 3: In the case where the first flag indicates that the current block uses merge mode, the multi-model intrablock copy lighting compensation mode is determined as the current block's prediction mode.

[00229] In this Method 3, in the case where the current block uses the merge mode, by default, both the encoding end and the decoding end determine the multi-model intrablock copy lighting compensation mode as the prediction mode of the current block. Petition 870250091537, dated 07 / 10 / 2025, pp. 253 / 401 55 / 165

[00230] In this Method 3, the encoding end does not need to transmit current block prediction mode information in the bitstream.

[00231] Method 4: in the case where the first flag indicates that the current block uses merge mode, the bitstream is decoded to obtain the fourth piece of information, where the fourth piece of information is used to indicate the prediction mode of the current block; and the prediction mode of the current block is obtained based on the fourth piece of information.

[00232] In this Method 4, in the case where the current block uses merge mode, it is determined whether the current block uses IBC-LIC without inheriting surrounding information. Instead, by calculating a rate distortion cost at the encoding end, the use of IBC-LIC is transmitted to the decoding end in the form of a flag and an index. The decoding end analyzes the IBC-LIC technology usage flag in merge mode to determine whether IBC-LIC technology should be used for the current encoding unit. For example, the encoding end calculates the rate distortion cost of each candidate prediction mode to predict the current block and determines a candidate prediction mode with a minimum cost as the prediction mode for the current block.At the same time, according to the minimum-cost candidate prediction mode, the fourth piece of information is recorded in the bitstream, and the prediction mode of the current block is indicated by the fourth piece of information.

[00233] In one example, in a case where the encoding endpoint determines that the current block does not use IBC-LIC, the second cu_ibc_lic_flag information in the table above can be set to false. As another example, in a case where the encoding endpoint Petition 870250091537, dated 07 / 10 / 2025, pp. 254 / 401 56 / 165 determines that the current block uses IBC-LIC, the second cu_ibc_lic_flag information in the table above can be set to true and cu_ibc_lic_index is determined based on a specific IBC-LIC mode index of the current block. For example, in the case where the current block's prediction mode is the single-model intrablock copy lighting compensation mode, cu_ibc_lic_index is set to 0 and encoded in the bitstream; and in the case where the current block's prediction mode is the multi-model intrablock copy lighting compensation mode, cu_ibc_lic_index is set to 1 and encoded in the bitstream.

[00234] In one example, if the encoding end determines that the current block does not use IBC-LIC, the second cu_ibc_lic_mode information in the table above can be set to false (e.g., set to 0). As another example, if the encoding end determines that the current block uses IBC-LIC, the second cu_ibc_lic_mode information in the table above can be set to true, and the specific value of cu_ibc_lic_mode is determined based on the specific IBC-LIC mode index of the current block. For example, if the current block's prediction mode is the single-model intrablock copy lighting compensation mode, cu_ibc_lic_mode is set to 1 and encoded in the bitstream; and if the current block's prediction mode is the multi-model intrablock copy lighting compensation mode, cu_ibc_lic_mode is set to 2 and encoded in the bitstream.

[00235] The text above describes the specific process in which the decoding end determines the prediction mode of the current block.

[00236] After the end of Petition 870250091537, dated 07 / 10 / 2025, pp. 255 / 401 57 / 165 decoding determines the prediction mode of the current block based on the step above, the end of the decoding executes the following step S102.

[00237] In S102, in response to the fact that the current block prediction mode is the multi-model intrablock copy illumination compensation mode, a current block reference block is determined and N groups of linear model parameters are determined.

[00238] N is a positive integer greater than 1.

[00239] Based on the steps above, the decoding end determines the prediction mode of the current block. In the case where the prediction mode of the current block is the multi-model intrablock copy illumination compensation mode, the decoding end needs to determine the N groups of linear model parameters and determine the reference block of the current block. Then, one group of linear model parameters is selected from the N groups of linear model parameters as target linear model parameters, and the linear transformation is performed on the reference block of the current block to obtain a prediction block with a good illumination compensation effect, thus improving prediction accuracy and decoding performance.

[00240] The specific process for determining the reference block of the current block is presented below.

[00241] In some embodiments, the reference block of the current block is also called the forecast block of the current block, or an initial forecast block of the current block, or a first forecast block of the current block. That is, in the embodiments of this disclosure, the reference block of the current block can be understood as a forecast block that is not subject to compensation of Petition 870250091537, dated 07 / 10 / 2025, pp. 256 / 401 58 / 165 lighting.

[00242] In some modalities, in intraprediction, the decoding end determines the reference block of the current block in a current image (i.e., a current frame).

[00243] For example, in Figure 7, the solid line with an arrow is the block vector (BV) information of the current block. At the decoding end, through the BV, a corresponding reconstructed block is found for the current block as the current block reference block.

[00244] Similar to interprediction, IBC has two modes, one being the Advanced Motion Vector Prediction (AMVP) mode and the other being a jump / merge mode (i.e., the merge mode).

[00245] In one example, in AMVP mode, the decoding end creates a list of MVP candidates, decodes the bitstream, obtains an index, selects an MVP from the list of MVP candidates based on the index, determines a starting point for movement estimation based on the selected MVP, and then searches near the starting point to obtain the reference block of the current block.

[00246] In one example, in skip / merge mode, the decoding end creates a list of MVP candidates, decodes the bitstream, obtains an index, selects an MVP from the list of MVP candidates based on the index, uses the selected MVP as a current point MV, and then determines the current block reference block in the current image based on the MV.

[00247] In some embodiments, the decoding end may also use other existing methods to determine the reference block of the current block. Petition 870250091537, dated 07 / 10 / 2025, pp. 257 / 401 59 / 165

[00248] The specific process by which the decoding end determines the N groups of linear model parameters is presented below.

[00249] In embodiments of the present disclosure, in the case where the decoding end determines that the prediction mode of the current block is the multi-model intrablock copy lighting compensation mode, several groups of linear model parameters need to be determined and one group of linear model parameters is selected from the several groups of linear model parameters to perform the linear transformation on the reference block of the current block to obtain a prediction value of the current block.

[00250] The terms of this disclosure do not limit the specific parameters included in each linear model parameter group. For example, the parameters may be any parameters related to the linear transformation.

[00251] In one example, each group of linear model parameters among the N groups of linear model parameters includes a scale parameter a and a displacement parameter b. It should be noted that, among the N groups of linear model parameters, the parameters included in each group are not completely the same.

[00252] For example, the N groups of linear model parameters in the embodiments of the present disclosure are shown in Table 4. TABLE 4 Index N groups of linear model parameters 0 (a0, b0) 1 (a1, b1) Petition 870250091537, dated 07 / 10 / 2025, pp. 258 / 401 60 / 165 i (ai, bi) N-1 (an-1, bn-1)

[00253] In Table 4 above, (ai, bi) is an i-th group of linear model parameters, where ai is the scale parameter in the i-th group of linear model parameters and bi is the displacement parameter in the i-th group of linear model parameters.

[00254] After determining the N groups of linear model parameters shown in Table 4, the decoding end can select one group of linear model parameters from the N groups of linear model parameters shown in Table 4 above and perform the linear transformation on the reference block of the current block to obtain the lighting compensation. Therefore, a reference block after lighting compensation is obtained, and then the reference block after lighting compensation is determined as the prediction block of the current block.

[00255] The modalities of the present disclosure do not limit the specific manner for the decoding end to determine the N groups of linear model parameters.

[00256] In some embodiments, the encoding end can record certain N groups of linear model parameters in the bitstream, so that the decoding end can obtain the N groups of linear model parameters by decoding the bitstream.

[00257] In some embodiments, the N groups of linear model parameters are predefined values ​​or empirical values. Petition 870250091537, dated 07 / 10 / 2025, pp. 259 / 401 61 / 165

[00258] In some embodiments, the decoding end determines the N groups of linear model parameters by means of the following S102-A step.

[00259] In S102-A, the N groups of linear model parameters are determined based on a reconstructed area surrounding the reference block and a reconstructed area surrounding the current block.

[00260] In this mode, the decoding end determines the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block, and then determines the N groups of linear model parameters based on the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block.

[00261] For example, the reconstructed area surrounding the reference block includes a reconstructed area adjacent to the reference block and / or a reconstructed area not adjacent to the reference block. Correspondingly, the reconstructed area surrounding the current block includes a reconstructed area adjacent to the current block and / or a reconstructed area not adjacent to the current block.

[00262] In embodiments of the present disclosure, the decoding end can determine N groups of linear model parameters that differ based on feature information from the reconstructed area surrounding the reference block and feature information from the reconstructed area surrounding the current block. The N groups of linear model parameters that differ can achieve different lighting compensation effects. Thus, the decoding end can select, according to real-world situations, a group of linear model parameters with a compensation effect of Petition 870250091537, dated 07 / 10 / 2025, pp. 260 / 401 62 / 165 target illumination of N groups of linear model parameters with different illumination compensation effects, to perform illumination compensation in the reference block of the current block, which improves the illumination compensation effect and the prediction effect, and thus improves decoding performance.

[00263] The embodiments of the present disclosure do not limit the specific manner in which the decoding end determines the N groups of linear model parameters based on the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block.

[00264] In some embodiments, the decoding end first determines a group of linear model parameters based on the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block. For example, the process of determining a group of linear model parameters based on the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block can be performed with reference to the method shown in Formula (3) above. Then, a group of linear model parameters is fitted to obtain the N groups of linear model parameters.

[00265] In some embodiments, the decoding end partitions the reconstructed area surrounding the reference block into N subareas. For example, based on color information, luma information, bit depth, and other feature information of the reconstructed area surrounding the reference block, the reconstructed area surrounding the reference block is partitioned into the first N subareas. Correspondingly, according to the first N subareas of the reference block, the reconstructed area surrounding the current block is divided into N Petition 870250091537, dated 07 / 10 / 2025, pp. 261 / 401 63 / 165 second subareas, wherein a single first subarea corresponds to a second subarea. Thus, a group of linear model parameters can be determined according to each first subarea of ​​the N first subareas and according to the first subarea and a second subarea corresponding to the first subarea. For example, linear model parameter group 1 is determined according to first subarea 1 and second subarea 1, and linear model parameter group 2 is determined according to first subarea 2 and second subarea 2, and so on; and thus, N groups of linear model parameters can be determined. For example, the process of determining linear model parameter group 1 according to first subarea 1 and second subarea 1 can be performed with reference to the method shown in Formula (3) above.

[00266] In some embodiments, the S102-A above includes the following steps S102-A1 to S102-A3.

[00267] In S102-A1, a first set of samples is determined from the reconstructed area surrounding the reference block, and a second set of samples is determined from the reconstructed area surrounding the actual block.

[00268] In S102-A2, the first set of samples and the second set of samples are classified into N groups of sample sets, where any group of sample sets among the N groups of sample sets includes at least one first sample and at least one second sample.

[00269] In S102-A3, for an i-th group of sample sets among the N groups of sample sets, an i-th group of linear model parameters is determined based on the first sample(s) and Petition 870250091537, dated 07 / 10 / 2025, pp. 262 / 401 64 / 165 second sample(s) included in the i-th group of sample sets, where i is a positive integer less than or equal to N.

[00270] In the embodiment of this disclosure, for convenience of description, samples (i.e., reconstructed samples) included in the reconstructed area surrounding the reference block are denoted as first samples, and samples (i.e., reconstructed samples) included in the reconstructed area surrounding the actual block are denoted as second samples.

[00271] In this embodiment, after determining the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block, the decoding end determines the first set of samples from the reconstructed surrounding area of ​​the reference block and determines the second set of samples from the reconstructed surrounding area of ​​the current block, wherein the first set of samples includes at least one first sample and the second set of samples includes at least one second set of samples.

[00272] The modalities of the present disclosure do not limit the specific manner in which the decoding end determines the first set of samples from the reconstructed area surrounding the reference block and determines the second set of samples from the reconstructed area surrounding the current block.

[00273] For example, the decoding end acquires at least one first sample of the reconstructed area surrounding the reference block according to a predefined acquisition step size to constitute the first set of samples, and acquires at least one second sample of the reconstructed area surrounding the current block according to the step size. Petition 870250091537, dated 07 / 10 / 2025, pp. 263 / 401 65 / 165 of predefined acquisition to constitute the second set of samples.

[00274] As another example, the decoding end determines all first samples included in the reconstructed area surrounding the reference block as the first set of samples and determines all second samples included in the reconstructed area surrounding the current block as the second set of samples.

[00275] In some embodiments, the reconstructed area surrounding the reference block includes a model area of ​​the reference block, and the reconstructed area surrounding the current block includes a model area of ​​the current block. In this case, the S102-A1 above includes the following S102-A1 step.

[00276] In S102-A11, the first set of samples is determined from the area of ​​the reference block model and the second set of samples is determined from the area of ​​the current block model.

[00277] In this mode, in the case where the reconstructed surrounding area of ​​the reference block includes the model area of ​​the reference block and the reconstructed surrounding area of ​​the current block includes the model area of ​​the current block, the decoding end can directly determine the first set of samples from the model area of ​​the reference block and determine the second set of samples from the model area of ​​the current block.

[00278] Specific implementations of the decoding end, determining the first set of samples from the reference block model area and determining the second set of samples from the current block model area, include, but are not limited to, the following methods. Petition 870250091537, dated 07 / 10 / 2025, pp. 264 / 401 66 / 165

[00279] Method 1: The number of first samples to be selected and the number of second samples to be selected are determined according to the width and height of the current block.

[00280] For example, in a case where the width or height of the current block is equal to the preset value 1 (e.g., 4), second samples with the preset value number 1 (e.g., 4) are taken from each of the top models and the left model of the current block to constitute the second set of samples, and the second set of samples includes 8 second samples; First samples with the preset value number 1 (e.g., 4) are taken from each of the top models and the left model of the reference block to constitute the first set of samples, and the first set of samples includes 8 first samples.

[00281] As another example, in a case where the width of the current block is the preset value 2 (e.g., 16) and the height of the current block is the preset value 3 (e.g., 4), 4 second samples are taken from the left model of the current block and second samples with the number of preset values ​​5 (e.g., 4) are taken from the top model of the current block according to a step size of the preset value 4 (e.g., 3) to constitute the second set of samples, and the second set of samples includes 8 second samples; 4 first samples are taken from the left model of the reference block, and the first samples with the number of preset values ​​5 (e.g., 4) are taken from the top model of the reference block according to the step size of the preset value 4 (e.g., 3) to constitute the first Petition 870250091537, dated 07 / 10 / 2025, pp. 265 / 401 67 / 165 sample set, and the first sample set includes the first 8 samples.

[00282] As another example, in a case where the width and height of the current block are not equal to the predefined value 1 (for example, 4), second samples with the number of the logarithm of the relatively small side length up to base 2 are obtained from reconstructed samples included in the top model and the left model of the current block to constitute the second set of samples; and first samples with the number of the logarithm of the relatively small side length up to base 2 are obtained from reconstructed samples included in the top model and the left model of the reference block to constitute the first set of samples.

[00283] For example, the top model includes a sample row (i.e., row of pixels) and the left model includes a sample column (i.e., column of pixels).

[00284] Method 2: The decoding end performs sampling in the reference block model area according to a first sampling step size to obtain the first set of samples, and performs sampling in the current block model area according to the first sampling step size to obtain the second set of samples, where the first sampling step size is smaller than a predefined sampling step size.

[00285] In this Method 2, the decoding end can increase the number of samples involved in the calculation of linear model parameters, reducing the sampling step size, in order to improve the accuracy of the linear model parameter calculation. Petition 870250091537, dated 07 / 10 / 2025, pp. 266 / 401 68 / 165

[00286] For example, the decoding end performs sampling in the model area of ​​the reference block according to the first sampling step size to obtain the first set of samples and performs sampling in the model area of ​​the current block according to the first sampling step size to obtain the second set of samples, where the first sampling step size is smaller than the predefined sampling step size.

[00287] For example, the size of the first sampling step is less than 3.

[00288] Method 3: The decoding end determines all samples included in the reference block model area as the first set of samples and determines all samples included in the current block model area as the second set of samples.

[00289] In Method 3, all samples included in the reference block model area can be determined as the first set of samples, and all samples included in the current block model area can be determined as the second set of samples, in order to increase the number of samples involved in the calculation of linear model parameters and improve the accuracy of the linear model parameter calculation.

[00290] The terms of this disclosure do not limit the specific sizes of the reference block model area and the actual block model area.

[00291] In some embodiments, as shown in Figure 12, the reference block model area includes an upper reference block model area and / or a left reference block model area. Petition 870250091537, dated 07 / 10 / 2025, pp. 267 / 401 69 / 165 reference, and the current block model area includes a top current block model area and / or a left current block model area.

[00292] In some embodiments, to increase the number of samples involved in the calculation of linear model parameters, the model area can be enlarged.

[00293] In one example, the top model is expanded. For example, as shown in Figure 13, a model area on the left side of the reference block includes the left model area of ​​the reference block and a lower left model area of ​​the reference block, and a model area on the left side of the current block includes the left model area of ​​the current block and a lower left model area of ​​the current block.

[00294] In one example, the left model is expanded. For example, as shown in Figure 14, the number of sample lines included in a model area on the top side of the reference block is greater than or equal to a predefined number of lines, and the number of sample lines included in a model area on the top side of the current block is greater than or equal to the predefined number of lines.

[00295] Thus, in the embodiments of the present disclosure, when samples are selected, it is possible to determine the first set of samples from the model on the top side and / or the model on the left side of the reference block shown in Figures 13 and 14 and to determine the second set of samples from the model on the top side and / or the model on the left side of the actual block shown in Figures 13 and 14, so as to increase the number of samples in the first set of samples and in the second set of samples.

[00296] In some modalities, the extremity Petition 870250091537, dated 07 / 10 / 2025, pp. 268 / 401 70 / 165 decoding can further increase the number of lines in the top-side model to achieve model expansion. For example, the number of sample lines included in the top-side model area of ​​the reference block is greater than or equal to the predefined number of lines, and the number of sample lines included in the top-side model area of ​​the current block is greater than or equal to the predefined number of lines. For example, the predefined number of lines could be 2, 3, 4, 5, etc.

[00297] In some embodiments, the decoding end may further increase the number of columns in the left-hand model to achieve model expansion. For example, the number of sample columns included in the left-hand model area of ​​the reference block is greater than or equal to a predefined number of columns, and the number of sample columns included in the left-hand model area of ​​the current block is greater than or equal to the predefined number of columns. For example, the predefined number of columns may be 2, 3, 4, 5, etc.

[00298] After determining the first set of samples from the reconstructed area surrounding the reference block and determining the second set of samples from the reconstructed area surrounding the current block through the steps above, the decoding end executes step S102-A2 above.

[00299] The arrangements of this disclosure do not limit the specific manner in which the decoding end classifies the first set of samples and the second set of samples into the N groups of sample sets.

[00300] In some embodiments, the decoding end classifies the first set of samples and the second set of samples into N groups of sets. Petition 870250091537, dated 07 / 10 / 2025, pp. 269 / 401 71 / 165 of samples based on feature information, such as color information, luma information, and bit depth, from each of the first samples and the second samples in the first sample set and the second sample set, and each of the N sample set groups includes at least one first sample and at least one second sample. For example, in the first sample set and the second sample set, the first sample and the second sample, which have similar feature information, such as color information and luma information, are classified into one sample set group.

[00301] In some modes, the S102-A2 above includes the following steps.

[00302] In S102-A21, the first samples included in the first set of samples are classified into N classes of the first samples.

[00303] In S102-A22, the second samples included in the second set of samples are classified into N classes of second samples.

[00304] In S102-A23, the N groups of sample sets are obtained based on the N classes of the first samples and the N classes of the second samples.

[00305] In this mode, the decoding end classifies the first samples included in the first set of samples into the N classes of first samples and, at the same time, classifies the second samples included in the second set of samples into the N classes of second samples, where each of the N classes of first samples includes at least one first sample, and each of the N classes of second samples includes at least one second sample.

[00306] The modalities of this disclosure Petition 870250091537, dated 07 / 10 / 2025, pp. 270 / 401 72 / 165 does not limit the specific way in which the decoding end classifies the first samples included in the first sample set into the N classes of the first samples.

[00307] In some embodiments, the decoding end classifies, based on the characteristic information of each of the first samples in the first set of samples, the first samples to obtain the N classes of the first samples.

[00308] In some embodiments, the S102-A21 above includes the following steps S102-A21-a1 and S102-A21-a2.

[00309] In S102-A21-a1, a first sample mean value is determined from the first sample set.

[00310] In S102-A21-a2, the first set of samples is classified into the N classes of the first samples based on the mean of the first sample.

[00311] In this mode, the decoding end classifies the first samples included in the first sample set based on the sample average value.

[00312] Specifically, the decoding end first determines the sample mean of the first set of samples based on a reconstructed value of each first sample in the first set of samples. For ease of description, the sample mean is referred to as the first sample mean. Then, the decoding end classifies the first samples included in the first set of samples into the N classes of first samples based on the first sample mean.

[00313] For example, the first samples in the first set of samples that are greater than or equal to Petition 870250091537, dated 07 / 10 / 2025, pp. 271 / 401 73 / 165 first sample mean values ​​are classified into a first class of first samples; and the first samples in the first sample set that are less than or equal to the first sample mean value are classified into a second class of first samples.

[00314] As another example, the first samples in the first sample set whose difference values ​​with the first sample mean value are between the limit ceo and the limit d are classified in a first class of first samples; the first samples in the first sample set whose difference values ​​with the first sample mean value are less than the limit C are classified in a second class of first samples; and the first samples in the first sample set whose difference values ​​with the first sample mean value are greater than the limit D are classified in a third class of first samples.

[00315] In some embodiments, the S102-A21 above includes the following step S102-A21-b.

[00316] In S102-A21-b, the first set of samples is sorted into the N classes of first samples based on the bit depths of the first samples in the first set of samples.

[00317] In this mode, the decoding end classifies the first set of samples into the N classes of the first samples based on the bit depth of each of the first samples in the first set of samples.

[00318] In one example, the first samples in the first set of samples are classified into 2 classes of first samples, 3 classes of first samples, or 4 classes of first samples based on Petition 870250091537, dated 07 / 10 / 2025, pp. 272 / 401 74 / 165 bit depth sizes, and the bit depths of the first samples in each class of first samples are close.

[00319] In another example, the decoding end determines an average first bit depth value from the first set of samples and classifies the first set of samples into N classes of first samples based on the average first bit depth value.

[00320] For example, the first samples in the first sample set whose bit depths are greater than or equal to the first average bit depth value are classified into a first class of first samples; and the first samples in the first sample set whose bit depths are less than or equal to the first average bit depth value are classified into a second class of first samples.

[00321] As another example, the first samples in the first sample set whose bit depth difference values ​​and the first average bit depth value are between the threshold e and the threshold f are classified into a first class of first samples; the first samples in the first sample set whose bit depth difference values ​​and the first average bit depth value are less than the threshold e are classified into a second class of first samples; and the first samples in the first sample set whose bit depth difference values ​​and the first average bit depth value are greater than the threshold f are classified into a third class of first samples. Petition 870250091537, dated 07 / 10 / 2025, pp. 273 / 401 75 / 165

[00322] The decoding end classifies the first samples in the first sample set into the N classes of first samples based on the step above and also classifies the second samples in the second sample set into the N classes of second samples.

[00323] The modalities of the present disclosure do not limit the specific manner in which the decoding end classifies the second samples included in the second set of samples into the N classes of second samples.

[00324] In some embodiments, the decoding end may classify the second samples included in the second set of samples into the N classes of second samples in the same way as the classification of the N classes of first samples.

[00325] In some embodiments, the decoding end classifies the second samples included in the second set of samples into the N classes of second samples by means of the following step. That is, the S102-A22 above includes the following step.

[00326] In S102-A221, for a j-th class of first samples in the N classes of first samples, the second samples in the second set of samples that correspond to the first samples in the j-th class are determined as a j-th class of second samples, where j is a positive integer less than or equal to N.

[00327] Based on the steps above, the decoding end classifies the first samples in the first set of samples into the N classes of the first samples, and for the j-th class of the first samples in the N classes of the first samples, the decoding end determines the second samples. Petition 870250091537, dated 07 / 10 / 2025, pp. 274 / 401 76 / 165 in the second set of samples that correspond to the j-th class of the first samples as the j-th class of the second samples, where j is a positive integer less than or equal to N.

[00328] For example, the decoding end classifies the first samples in the first set of samples that are greater than or equal to the first sample mean value into a first class of first samples; similarly, the decoding end classifies the second samples in the second set of samples, whose positions correspond to the first samples of the first class, into a first class of second samples. The decoding end classifies the first samples in the first set of samples that are less than the first sample mean value into a second class of first samples; similarly, the decoding end classifies the second samples in the second set of samples, whose positions correspond to the first samples of the second class, into a second class of second samples.

[00329] It can be seen from the above that the N classes of first samples obtained by classifying the first set of samples by the decoding end are in one-to-one correspondence with the N classes of second samples obtained by classifying the second sample defined by the decoding end. For example, the first class of first samples corresponds to the first class of second samples, and the second class of first samples corresponds to the second class of second samples. Therefore, the decoding end can determine the j-th class of first samples in the N classes of first samples and the j-th class of second samples in the N classes of Petition 870250091537, dated 07 / 10 / 2025, pages 275 / 401 77 / 165 second samples as a j-th group of sample sets. Thus, the N classes of first samples and the N classes of second samples constitute the N groups of sample sets.

[00330] The decoding end sorts the first set of samples and the second set of samples into N groups of sample sets based on the steps above, and then executes step S102-A3 above.

[00331] In embodiments of the present disclosure, the decoding end determines a group of linear model parameters based on each group of sample sets in the N groups of sample sets, in order to obtain the N groups of linear model parameters.

[00332] In the embodiments of the present disclosure, the specific process for determining each group of linear model parameters based on each group of sample sets in the N groups of sample sets is the same. For the sake of description, the process for determining the i-th group of linear model parameters based on the i-th group of sample sets is taken as an example for description.

[00333] The arrangements of this disclosure do not limit the specific manner of determining the i-th group of linear model parameters based on the first sample(s) and second sample(s) included in the i-th group of sample sets in S102-A3 above.

[00334] In one example, a linear relationship between the first sample(s) and the second sample(s) included in the i-th group of sample sets is determined, and then the i-th group of linear model parameters is determined. Once the first sample Petition 870250091537, dated 07 / 10 / 2025, pp. 276 / 401 78 / 165 and the second sample included in the i-th group of sample sets are known, a scale parameter a and a shift parameter b corresponding to the i-th group of sample sets can be determined by solving a linear equation, to obtain the i-th group of linear model parameters.

[00335] In one example, the first samples in the i-th group of sample sets are added to obtain a first sum value, and the second samples in the i-th group of sample sets are added to obtain a second sum value; a sum of squares of the first samples in the i-th group of sample sets is determined to obtain a third sum value; a fourth sum value is obtained by multiplying the first samples and the second samples in the i-th group of sample sets and then adding the multiplied results; and the i-th group of linear model parameters is determined based on the first sum value, the second sum value, the third sum value, and the fourth sum value.

[00336] In this example, the first samples xi in the i-th group of sample sets are added to obtain the first sum value sumXi; the second samples yi in the i-th group of sample sets are added to obtain the second sum value sumYi; the sum of the squares of the first samples xi in the i-th group of sample sets is determined to obtain the third sum value sumXiXi; the fourth sum value sumXiYi is obtained by multiplying the first samples xi and the second samples yi in the i-th group of sample sets and then adding the multiplied results; and the i-th group of linear model parameters is determined based on the first sum value, in Petition 870250091537, dated 07 / 10 / 2025, pp. 277 / 401 79 / 165 second value of the sum, in the third value of the sum and in the fourth value of the sum.

[00337] The features of this disclosure do not limit the specific manner in which the decoding end determines the i-th group of linear model parameters based on the first sum value, the second sum value, the third sum value, and the fourth sum value.

[00338] In some embodiments, the i-th group of linear model parameters includes a scaling coefficient ai and a displacement parameter bi.

[00339] For example, the decoding end determines the i-th group of linear model parameters using the following formula (4): ai = (sumXiYi - sumXisumYi) / (sumXiXi sumXisumXi); bi = sumYi - ai * sumXi (5)

[00340] The text above is an introduction to the process of determining the i-th group of linear model parameters based on the i-th group of sample sets. The decoding end can determine the N groups of linear model parameters based on the N groups of sample sets with reference to the method above.

[00341] After determining the N groups of linear model parameters based on the steps above, the decoding end executes the next step S103.

[00342] In S103, a target group of linear model parameters is selected from the N groups of linear model parameters, and the linear transformation is performed on the reference block using the target group of linear model parameters to obtain a prediction block of the current block. Petition 870250091537, dated 07 / 10 / 2025, pp. 278 / 401 80 / 165

[00343] In embodiments of the present disclosure, in the case where the decoding end determines that the prediction mode of the current block is the multi-model intrablock copy illumination compensation mode, the decoding end determines the reference block of the current block and determines the N groups of linear model parameters. Then, the decoding end selects the target linear model parameters from the N groups of linear model parameters and performs the linear transformation on the reference block of the current block using the target linear model parameters, which improves the illumination compensation effect of the reference block and thus improves the prediction effect and decoding performance.

[00344] The features of this disclosure do not limit the specific manner in which the decoding end selects the target group of linear model parameters from the N groups of linear model parameters.

[00345] In some embodiments, the encoding end and the decoding end determine the N groups of linear model parameters using the same method, and the encoding end can record an index of the selected target group of linear model parameters in the bitstream. Thus, after determining the N groups of linear model parameters based on the steps above, the decoding end decodes the bitstream to obtain the index of the target group of linear model parameters and then determines, based on the index, the target group of linear model parameters from the N groups of linear model parameters determined as shown in Table 4 above.

[00346] In some modes, the decoding end selects the target group of parameters from Petition 870250091537, dated 07 / 10 / 2025, pp. 279 / 401 81 / 165 linear model of N groups of linear model parameters using the following steps.

[00347] In S103-A1, a second sample mean value is determined for the reference block.

[00348] In S103-A2, the target group of linear model parameters is selected from the N groups of linear model parameters based on the second sample mean value.

[00349] The method in this mode corresponds to the S102-A21-a1 and S102-A21-a2 methods described above.

[00350] It can be seen in S102-A21-a1 and S102-A21a2 above that, when the decoding end determines the N groups of linear model parameters, the decoding end classifies the first samples included in the first sample set into the N classes of first samples based on the first sample mean value and classifies the second samples included in the second sample set into the N classes of second samples based on the position information of the N classes of first samples, so as to obtain the N groups of sample sets. Finally, the N groups of linear model parameters are determined based on the N groups of sample sets.Based on this, when the decoding end selects the target linear model parameters from the N groups of linear model parameters, the decoding end determines a sample mean value (which is denoted as the second sample mean value) from the current block's reference block, that is, a mean value of reconstructed sample values ​​included in the reference block. In this way, the target group of linear model parameters can be selected from the N groups of linear model parameters based on the second sample mean value. Petition 870250091537, dated 07 / 10 / 2025, pages 280 / 401 82 / 165

[00351] The features of this disclosure do not limit the specific manner in which the decoding end selects the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value.

[00352] In one possible implementation, the decoding end compares the second sample mean value with the sample values ​​in the N sample set groups corresponding to the N linear model parameter groups, selects a linear model parameter group corresponding to a sample set group closest to the second sample mean value, and determines the linear model parameter group as the target group of linear model parameters. For example, the second sample mean value is closest to (i.e., has a shorter distance from) the first sample(s) and second sample(s) included in a k-th sample set group in the N sample set groups, and a linear model parameter group corresponding to the k-th sample set group among the N linear model parameter groups is determined as the target group of linear model parameters.

[00353] In one possible implementation, the decoding end selects the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value and the first sample mean value.

[00354] It can be seen in S102-A21-a1 and S102-A21a2 above that, in some embodiments, when the decoding end classifies the first set of samples and the second set of samples into the N groups of sample sets, the first samples in the first set of Petition 870250091537, dated 07 / 10 / 2025, pp. 281 / 401 83 / 165 samples that are greater than or equal to the first sample mean value are classified into the first class of first samples, and the first samples in the first sample set that are less than or equal to the first sample mean value are classified into the second class of first samples. Then, the N groups of linear model parameters are determined based on the N groups of sample sets. Based on this, the decoding end can select the target group of linear model parameters from the N groups of linear model parameters based on the magnitudes of the second sample mean value and the first sample mean value.

[00355] For example, in a case where the second sample mean value is greater than or equal to the first sample mean value, a group of linear model parameters corresponding to the first class of the first samples among the N groups of linear model parameters is determined as the target group of linear model parameters.

[00356] As another example, in a case where the second sample mean value is less than or equal to the first sample mean value, a group of linear model parameters corresponding to the second class of first samples among the N groups of linear model parameters is determined as the target group of linear model parameters.

[00357] In some embodiments, the decoding end selects the target group of linear model parameters from the N groups of linear model parameters using the following steps.

[00358] In S103-B1, a second average bit depth value is determined for the reference block.

[00359] In S103-B2, the target group of parameters Petition 870250091537, dated 07 / 10 / 2025, pp. 282 / 401 The 84 / 165 linear model is selected from the N groups of linear model parameters based on the second average bit depth value.

[00360] The method in this mode corresponds to the S102-A21-b1 and S102-A21-b2 methods mentioned above.

[00361] It can be seen in S102-A21-b1 and S102-A21b2 above that, when the decoding end determines the N groups of linear model parameters, the decoding end classifies the first samples included in the first sample set into the N classes of first samples based on the first average bit depth value and classifies the second samples included in the second sample set into the N classes of second samples based on the position information of the N classes of first samples, so as to obtain the N groups of sample sets. Finally, the N groups of linear model parameters are determined based on the N groups of sample sets.Based on this, when the decoding end selects the target linear model parameters from the N groups of linear model parameters, the decoding end determines an average bit depth value (which is denoted as the second average bit depth value) of the current block's reference block, that is, an average bit depth value of the reconstructed sample values ​​included in the reference block. In this way, the target group of linear model parameters can be selected from the N groups of linear model parameters based on the second average bit depth value.

[00362] The features of this disclosure do not limit the specific manner in which the decoding end selects the target group of linear model parameters from the N groups of linear model parameters. Petition 870250091537, dated 07 / 10 / 2025, pp. 283 / 401 85 / 165 based on the second average bit depth value.

[00363] In one possible implementation, the decoding end compares the second average bit depth value with the bit depths of the samples in the N sample set groups corresponding to the N linear model parameter groups, selects a linear model parameter group corresponding to a sample set group closest to the second average bit depth value, and determines the linear model parameter group as the target linear model parameter group.For example, the second average bit depth value is the closest to the bit depths of the first sample(s) and the second sample(s) included in the k-th group of sample sets in the N groups of sample sets, and therefore a group of linear model parameters corresponding to the k-th group of sample sets among the N groups of linear model parameters is determined as the target group of linear model parameters.

[00364] In one possible implementation, the decoding end selects the target group of linear model parameters from the N groups of linear model parameters based on the second average bit depth value and the first average bit depth value.

[00365] It can be seen in S102-A21-b1 and S102-A21b2 above that, in some embodiments, when the decoding end sorts the first set of samples and the second set of samples into N groups of sample sets, the first samples in the first set of samples whose bit depths are greater than or equal to the first average bit depth value are Petition 870250091537, dated 07 / 10 / 2025, pp. 284 / 401 86 / 165 are classified in the first class of first samples, and the first samples in the first sample set whose bit depths are less than or equal to the first average bit depth value are classified in the second class of first samples. Then, the N groups of linear model parameters are determined based on the N groups of sample sets. Based on this, the decoding end can select the target group of linear model parameters from the N groups of linear model parameters based on the magnitudes of the second average bit depth value and the first average bit depth value.

[00366] For example, in a case where the second average bit depth value is greater than or equal to the first average bit depth value, a group of linear model parameters corresponding to the first class of first samples among the N groups of linear model parameters is determined as the target group of linear model parameters.

[00367] As another example, in a case where the second average bit depth value is less than or equal to the first average bit depth value, a group of linear model parameters corresponding to the second class of the first samples among the N groups of linear model parameters is determined as the target group of linear model parameters.

[00368] After determining the target group of linear model parameters from the N groups of linear model parameters based on the steps above, the decoding end performs the linear transformation on the reference block of the current block using the target group of linear model parameters.

[00369] For example, the model parameters Petition 870250091537, dated 07 / 10 / 2025, pp. 285 / 401 The 87 / 165 linear target includes a scale parameter al and an offset parameter bl, and the decoding end performs the linear transformation on the reference block based on the scale parameter and the offset parameter to obtain the prediction block.

[00370] For example, the decoding end performs the linear transformation on the current block reference block based on formula (5): Predf{x,y) = «1 Pred(x,y) +

[00371] where θ is the reference block of the current block or a forecast block before lighting compensation, al is the scale parameter included in the target linear model parameters, bl is the offset parameter included in the target linear model parameters and Freriob]_ocobe is the forecast of the current block or a forecast block after lighting compensation.

[00372] In some embodiments, the embodiments of this disclosure provide the video decoding method, which is applicable to intra-prediction at the decoding end. After the embodiments of this solution are integrated into the latest ECM8.0, the test results under the general AI test condition are shown in Table 5. TABLE 5 PERFORMANCE OF THE IBC-LIC-M MODE All intra MainlO YU About ECM8.0 DecT V | EncT Class A1 0.00% 0.00% 0.00% 100% 100% Class A2 0.00% 0.00% 0.00% 100% 100% Class B 0.00% 0.00% 0.00% 100% 100% Class C 0.00% 0.00% 0.00% 100% 100% Petition 870250091537, dated 07 / 10 / 2025, pp. 286 / 401 88 / 165 Class E 0.00% 0.00% 0.00% 100% 100% Overall 0.00% 0.00% 0.00% 100% 100% Class D 0.00% 0.00% 0.00% 100% 100% Class F -0.17% -0.06% -0.07% 100% 100% Class TGM -0.02% 0.02% -0.04% 100% 100% TABLE 6 COMBINATION MODE PERFORMANCE All intra Main10 Y About ECM8 0 EncT DecT UV Class A1 0.00% 0.00% 0.00% 100% 100% Class A2 0.00% 0.00% 0.00% 100% 100% Class B 0.00% 0.00% 0.00% 100% 100% Class C 0.00% 0.00% 0.00% 100% 100% Class E 0.00% 0.00% 0.00% 100% 100% Overall 0.00% 0.00% 0.00% 100% 100% Class D 0.00% 0.00% 0.00% 100% 100% Class F -0.50% -0.67% -0.54% 101% 99% Class TGM -0.11% -0.10% -0.07% 102% 101%

[00373] It should be noted that negative numbers represent performance gains, with fewer bits having the same quality.

[00374] This disclosure applies to screen content encoding scenarios; during testing, general screen content encoding test conditions are used, i.e., this technology is not enabled from Class A1 to Class E, so there is no change in encoding performance and no fluctuation in encoding time in these classes.

[00375] Class F and Class TGM are special sequence classes for encoding screen content. From the simulation results, the solution of Petition 870250091537, dated 07 / 10 / 2025, pp. 287 / 401 The 89 / 165 decoding provided in the embodiments of this disclosure has a 0.17% improvement in encoding performance for Class F, and the encoding and decoding time does not change.

[00376] The video decoding method provided in the embodiments of this disclosure proposes a multi-model intrablock copy illumination compensation mode to augment the intrablock copy illumination compensation modes, so that the decoding end can select a single-model intrablock copy illumination compensation mode (i.e., having only one group of model parameters) for prediction compensation or select the multi-model intrablock copy illumination compensation mode (i.e., including multiple groups of model parameters) for prediction compensation according to the specific situations of the current block.In a case where the multi-model intrablock copy illumination compensation mode is selected to perform prediction compensation on the current block, N groups of linear model parameters are determined, and the target linear model parameters are selected from these N groups. The target model parameters are then used to perform the linear transformation on the current block's reference block to obtain the current block's prediction block, thus improving the illumination compensation effect and, in turn, improving prediction accuracy and decoding performance.

[00377] The description above presents the video decoding method of the present disclosure, taking the decoding end as an example. Next, an encoding end is taken as an example for introduction. Petition 870250091537, dated 07 / 10 / 2025, pp. 288 / 401 90 / 165

[00378] Figure 15 is a schematic flowchart of a video encoding method provided in an embodiment of the present disclosure. The embodiment of the present disclosure applies to the video encoders shown in Figures 1 and 2. As shown in Figure 15, the method in the embodiments of the present disclosure includes the following steps.

[00379] In S201, a prediction mode for a current block is determined.

[00380] In the embodiments of this disclosure, for convenience of description, the intrablock copy illumination compensation mode with only one model parameter group is denoted as a single model intrablock copy illumination compensation mode, for example, represented as an IBC-LIC-S mode, where the IBC-LIC-S mode is an currently existing IBC-LIC mode. The intrablock copy illumination compensation mode including multiple model parameter groups is denoted as a multi-model intrablock copy illumination compensation mode, for example, represented as an IBC-LIC-M mode.

[00381] In order to improve the effect of intrablock copy illumination compensation, the embodiments of the present disclosure propose a multi-model intrablock copy illumination compensation mode, which can be understood as an intrablock copy illumination compensation mode including several groups of linear model parameters. For example, a reference block (or an initial prediction block) of the current block is determined using intrablock technology. Then, an ideal group of linear model parameters is selected from the various groups of linear model parameters, and the linear transformation (i.e., compensation of Petition 870250091537, dated 07 / 10 / 2025, pp. 289 / 401 91 / 165 illumination) is performed on the reference block of the current block to obtain a prediction block of the current block. Therefore, the illumination compensation effect and prediction accuracy are enhanced, thus improving the image encoding effect.

[00382] In the embodiments of this disclosure, for convenience of description, the intrablock copy lighting compensation mode with only one model parameter group is denoted as a single model intrablock copy lighting compensation mode, for example, represented as an IBC-LIC-S mode.

[00383] The modalities of this disclosure do not limit the specific manner of determining the forecast mode of the current block.

[00384] In some embodiments, the coding end standardizes the current block prediction mode to the multi-model intrablock copy lighting compensation mode.

[00385] In some modes, the S201 above includes the following steps.

[00386] In S201-A1, a list of candidate prediction modes corresponding to the current block is determined, where the candidate prediction modes include the multi-model intrablock copy lighting compensation mode.

[00387] In S201-A2, a cost is determined for each candidate forecasting mode in the list of candidate forecasting modes to forecast the current block.

[00388] In S201-A3, the current block forecasting mode is determined based on cost.

[00389] In some modes, before the encoding end determines the list of candidate prediction modes corresponding to the current block, the Petition 870250091537, dated 07 / 10 / 2025, pages 290 / 401 The 92 / 165 method additionally includes: determining a third flag, the third flag being used to indicate whether a current sequence allows local lighting compensation; and in response to the third flag being used to indicate that the current sequence allows local lighting compensation, adding the multi-model intrablock copy lighting compensation mode to the list of candidate prediction modes corresponding to the current block.

[00390] The modalities of this disclosure do not limit the specific form of the third signal.

[00391] In one example, the third flag can be represented as sps_ibc_lic_enable_flag. The third flag sps_ibc_lic_enable_flag is set with different values ​​to indicate whether the current sequence allows the use of local lighting compensation technology.

[00392] For example, in a case where the value of the third flag sps_ibc_lic_enable_flag is 0, this indicates that the current sequence does not allow the use of local lighting compensation technology.

[00393] As another example, in a case where the value of the third flag sps_ibc_lic_enable_flag is 1, it indicates that the current sequence allows the use of local lighting compensation technology.

[00394] In some embodiments, the encoding end writes the third flag to the bitstream, where the third flag is used to indicate whether the current sequence allows for local lighting compensation.

[00395] In some modes, the encoding end has restrictions on block sizes when using copy illumination compensation mode. Petition 870250091537, dated 07 / 10 / 2025, pages 291 / 401 93 / 165 intrablock. For example, blocks of certain sizes do not use the intrablock copy lighting compensation mode, and blocks of certain sizes do use the intrablock copy lighting compensation mode. Based on this, the coding end determines whether a current block size meets a first predefined size before determining the list of candidate prediction modes corresponding to the current block. In a case where the current block size meets the first predefined size, the coding end adds the multi-model intrablock copy lighting compensation mode to the list of candidate prediction modes corresponding to the current block.

[00396] The modalities of this disclosure do not limit the specific indicator(s) for measuring the size of the current block.

[00397] For example, the width and height of the current block can be used to measure the size of the current block. For example, in a case where the width of the current block is greater than limit 1 and the height of the current block is greater than limit 2, it is determined that the size of the current block meets the first predefined size. A limit 1 value can be 4, 8, 16, 32, 128, 256, etc. A limit 2 value can be 4, 8, 16, 32, 128, 256, etc. Limit 1 can be equal to limit 2.

[00398] For example, a product of the width and height of the current block (i.e., an area of ​​the current block) can be used to measure the size of the current block. For example, in a case where the area of ​​the current block is greater than or equal to threshold 3 and less than threshold 5, it is determined that the size of the current block meets the first predefined size. A threshold value of 3 could be 16, 32, etc. A threshold value of 5 could be 256, 1024, etc. Petition 870250091537, dated 07 / 10 / 2025, pages 292 / 401 94 / 165

[00399] For example, the number of samples included in the current block can be used to measure the size of the current block. For example, in a case where the number of samples included in the current block is greater than or equal to the threshold 4, it is determined that the size of the current block meets the first predefined size. A value of the threshold 4 can be 16, 32, 128, 256, 1024, etc.

[00400] In some embodiments, before determining the list of candidate prediction modes corresponding to the current block, the coding end determines whether the current block is coded using a first tool, where the first tool is mutually exclusive with the intrablock copy illumination compensation technology. In a case where the current block is coded without using the first tool, the coding end adds the multi-model intrablock copy illumination compensation mode to the list of candidate prediction modes corresponding to the current block.

[00401] In one example, the encoding end traverses the prediction modes and, in a case where a current prediction mode type is an intrablock copy mode, an enabled flag for that technology (i.e., the third flag) is obtained. The flag is a sequence-level flag, which indicates whether a current sequence allows the use of intrablock copy local illumination compensation technology and may be in the form of sps_ibc_lic_enable_flag.

[00402] In step 1: in a case where the enabled flag (i.e., the third flag) of IBC-LIC is true and the current block size meets the first predefined size (e.g., the current block area is greater than limit 1 and the current block area is Petition 870250091537, dated 07 / 10 / 2025, pages 293 / 401 95 / 165 less than limit 2), the encoding end attempts to use the IBC-LIC prediction method, i.e., it executes the following step 2. In a case where the enabled flag (i.e., the third flag) of the IBC-LIC or the current block size does not meet the first predefined size, the encoding end does not attempt to use the IBC-LIC prediction method, i.e., it skips the following step 2 and directly executes step 3.

[00403] In step 2, reconstructed sample information is obtained from the top and left model areas of the current block and reconstructed sample information from the top and left model areas of the reference block.

[00404] First, the encoding end traverses multiple prediction modes in IBC AMVP mode and calculates the respective rate distortion costs.

[00405] In a first round, the coding end attempts to use the IBC-LIC-S mode. The number of samples obtained is the same as described above and depends on the width and height of the current block. The reconstructed samples obtained are modeled by the linear model calculation method described above, and a scale parameter a and a shift parameter b are calculated. The linear transformation is performed on a prediction block, with scale transformation parameters a times and offset b, to obtain a final prediction block from the current block. A residual of the current block is obtained by subtracting the predicted block from an original sample corresponding to the current block, and the rate distortion cost (denoted as cost1) is calculated by operations such as transformation and quantization.

[00406] In a second round, the encoding end attempts to use IBC-LIC-M mode. The number of Petition 870250091537, dated 07 / 10 / 2025, pages 294 / 401 The 96 / 165 samples obtained is the same as described above and depends on the width and height of the current block. Samples from two model areas are classified based on an average sample value from the model areas adjacent to the reference block. Samples whose sample values ​​are greater than the average sample value in the model areas adjacent to the reference block are classified in a first class; and, correspondingly, samples in the model areas adjacent to the prediction block in the corresponding positions are also classified in the first class. Otherwise, if samples whose sample values ​​are less than or equal to the average sample value in the model areas adjacent to the reference block are classified in a second class, and similarly, samples in the model areas adjacent to the prediction block in the corresponding positions are also classified in the second class.The linear model parameters of a first class are calculated for the first sample class and the second sample class separately using the model calculation method mentioned above, to obtain a scale factor a1 and a shift parameter b1 in the first model parameters and a scale factor a2 and a shift parameter b2 in the second model parameters. A first model or a second model is selected based on the size ratio between the sample values ​​in the reference block and the average sample value of the model areas; for samples in the reference block whose sample values ​​are greater than the average sample value of the model areas, the first model parameters are used for linear transformation; and for samples in the reference block whose sample values ​​are less than or equal to the average sample value of the model areas, the... Petition 870250091537, dated 07 / 10 / 2025, pages 295 / 401 97 / 165 parameters from the second model are used for linear transformation. After the predicted block is obtained, the rate distortion cost is calculated with the original block and denoted as cost2.

[00407] By comparing cost1 and cost2, the minimum cost is recorded and indicated as costAmvpIbcLic, and the current lighting compensation mode information, including a lighting compensation mode index, is stored. The mode index corresponding to cost1 is 0 and the mode index corresponding to cost2 is 1.

[00408] Next, the final encoding builds list information for the IBC merge mode, traverse the candidate modes, and calculate the respective rate distortion costs.

[00409] The current block traverses candidate BVs in the merge list. In a case where IBC-LIC is enabled on legacy information, the current block obtains the reference block based on the BV information and obtains samples in model areas adjacent to the current block and the reference block based on the legacy IBC-LIC mode and calculates the linear model parameters. The reference block is transformed based on the linear model parameters and the steps are the same as above, to obtain the final prediction block. A residual of the current block is obtained by subtracting the predicted block from the original samples corresponding to the current block. The rate distortion cost (which is denoted as costIdx1) is calculated by operations such as transformation and quantization. Other candidate BVs in the merge list are traversed and the rate distortion costs costIdx2, costIdx3, costIdx4, etc. are calculated by the same method.

[00410] By comparing costs Petition 870250091537, dated 07 / 10 / 2025, pages 296 / 401 98 / 165 costIdxl, costIdx2, etc., the minimum cost is recorded and indicated as costMergeIbc.

[00411] In step 3, the coding end continues to traverse other interprediction technologies, calculates the rate distortion cost corresponding to each technology, and selects the prediction mode corresponding to the minimum cost as the optimal prediction mode for the current block.

[00412] In some embodiments, if costAmvpIbcLic is the minimum, the current block uses intrablock copy illumination compensation technology and the usage flag at the encoding unit level of the illumination compensation technology needs to be set to true and written to the bitstream. In addition, the index of the intrablock copy illumination compensation mode also needs to be written to the bitstream.

[00413] In some modes, if costMergeIbc is the minimum, the current block uses the intrablock copy technology of the merge mode, the IBC merge flag is set to true and written to the bitstream, and the merge index is also written to the bitstream.

[00414] In some embodiments, in a case where the current block allows the use of lighting compensation technology and costLic is not the minimum, the current block does not use lighting compensation technology and the usage flag at the encoding unit level of lighting compensation technology needs to be set to false and recorded in the bitstream; otherwise, other information from the optimal prediction mode is recorded in the bitstream, which is not strongly related to this technology and is not described in detail. Petition 870250091537, dated 07 / 10 / 2025, pp. 297 / 401 99 / 165 in this document.

[00415] In some modes, the encoding end determines a prediction type for the current block and records the first information in the bitstream, where the first information is used to indicate the prediction type for the current block.

[00416] The modalities of this disclosure do not limit the specific form of the initial information.

[00417] In one example, the first information can be represented as modeType.

[00418] For example, in a case where modeType = MODE_INTRA, it indicates that the forecast type of the current block is intra forecast.

[00419] As another example, in a case where modeType = MODE_INTER, it indicates that the forecast type of the current block is inter forecast.

[00420] As another example, in a case where modeType = MODE_IBC, it indicates that the current block forecast type is intrablock copy forecast.

[00421] In some embodiments, in a case where the first information indicates that the current block prediction type is intra-block copy prediction, a first flag is written to the bitstream. The first flag is used to indicate whether the current block uses a merge mode.

[00422] The modalities of this disclosure do not limit the specific form of the first flag.

[00423] In one example, the first flag can be represented as merge_flag. The first merge_flag flag is set with different values ​​to indicate whether the current block uses merge mode for prediction.

[00424] For example, in a case where the value Petition 870250091537, dated 07 / 10 / 2025, pages 298 / 401 100 / 165 of the first merge_flag is 0, this indicates that the current block does not use merge mode for prediction.

[00425] As another example, in a case where the value of the first merge_flag is 1, this indicates that the current block uses merge mode for prediction.

[00426] In some embodiments, in the case where the current block does not use the merge mode, the second information is written to the bitstream. The second information is used to indicate whether the current block uses an intrablock copy lighting compensation mode.

[00427] In some modes, the second information may be represented as cu_ibc_lic_flag. The second cu_ibc_lic_flag information is set to different values ​​to indicate whether the current block uses the intrablock copy lighting compensation mode.

[00428] For example, in a case where the value of the second cu_ibc_lic_flag information is 0, this indicates that the current block does not use the intrablock copy lighting compensation mode for prediction.

[00429] As another example, in a case where the value of the second cu_ibc_lic_flag information is 1, this indicates that the current block uses the intrablock copy lighting compensation mode for prediction.

[00430] In some embodiments, in the case where the current block uses the intra-block copy illumination compensation mode, index information is written to the bitstream. The index information is used to indicate a mode index of the intra-block copy illumination compensation mode used by the current block.

[00431] In some embodiments, in the case where the current block uses the intrablock copy lighting compensation mode, the index information is written to the bitstream. The index information is used to Petition 870250091537, dated 07 / 10 / 2025, pages 299 / 401 101 / 165 indicates a mode index of the intrablock copy illumination compensation mode used by the current block.

[00432] The modalities of this disclosure do not limit the specific form of the index information.

[00433] In some embodiments, the index information may be represented as cu_ibc_lic_index. The cu_ibc_lic_index index information is set to different values, to indicate the mode indices of the intrablock copy lighting compensation mode used by the current block.

[00434] For example, in a case where the current block prediction mode is the single model intrablock copy lighting compensation mode, the cu_ibc_lic_index information value is a first numeric value.

[00435] As another example, in a case where the current block prediction mode is the multi-model intrablock copy lighting compensation mode, the cu_ibc_lic_index flag value is a second numeric value.

[00436] The terms of this disclosure do not limit the specific values ​​of the first numerical value and the second numerical value.

[00437] For example, the first numerical value is 0.

[00438] For example, the second numerical value is 1.

[00439] For example, the _ibc_lic_index above can be encoded in a context-based manner or in an equal manner.

[00440] Method 5: In a case where the second piece of information indicates that the current block uses the intrablock copy lighting compensation mode and the Petition 870250091537, dated 07 / 10 / 2025, pages 300 / 401 If the current block size is greater than or equal to a second preset size, the multi-model intrablock copy lighting compensation mode is determined as the current block prediction mode.

[00441] In Method 5, for a large current block, the multi-model intrablock copy lighting compensation mode is used by default. That is, during syntax element parsing at the coding end, in a case where cu_ibc_lic_flag is true and the current block size is larger than the second predefined size, this indicates that the current block uses the multi-model intrablock copy lighting compensation mode; otherwise, it indicates that the current block does not use lighting compensation technology and there is no need to parse the index.

[00442] The modalities of this disclosure do not limit the specific indicator(s) for measuring the size of the current block.

[00443] For example, the width and height of the current block can be used to measure the size of the current block. For example, in a case where the width of the current block is greater than limit 1 and the height of the current block is greater than limit 2, it is determined that the size of the current block is greater than the second predefined size. A limit 1 value can be 4, 8, 16, 32, 128, 256, etc. A limit 2 value can be 4, 8, 16, 32, 128, 256, etc. Limit 1 can be equal to limit 2.

[00444] For example, a product of the width and height of the current block (i.e., the area of ​​the current block) can be used to measure the size of the current block. For example, in a case where the area of ​​the current block is greater than or equal to the limit 3, it is determined that the size of the block Petition 870250091537, dated 07 / 10 / 2025, pages 301 / 401 The current 103 / 165 is greater than the second predefined size. A limit value of 3 can be 16, 32, 128, 256, etc.

[00445] For example, the number of samples included in the current block can be used to measure the size of the current block. For example, in a case where the number of samples included in the current block is greater than or equal to the threshold 4, it is determined that the size of the current block is larger than the second predefined size. A value of the threshold 4 can be 16, 32, 128, 256, 1024, etc.

[00446] In some embodiments, in a case where the second information indicates that the current block uses the intrablock copy lighting compensation mode and the current block size is greater than or equal to the second preset size, the multi-model intrablock copy lighting compensation mode is determined as the current block's prediction mode.

[00447] The second piece of information in the above modes only indicates whether the current block uses the intrablock copy illumination compensation mode and does not indicate the mode index of the intrablock copy illumination compensation mode. The mode index of the intrablock copy illumination compensation mode is indicated by the index information.

[00448] In some embodiments, the second piece of information indicates whether the current block uses the intrablock copy illumination compensation mode, and the second piece of information may additionally indicate the mode index of the intrablock copy illumination compensation mode.

[00449] In one example, cu_ibc_lic_mode can be used in this mode to represent the second piece of information. Alternatively, another syntax element can be used to represent the second piece of information, the Petition 870250091537, dated 07 / 10 / 2025, pages 302 / 401 104 / 165 which will not be limited to the modalities of this disclosure.

[00450] For example, in a case where the current block prediction mode is a non-intrablock copy lighting compensation mode, the value of the second cu_ibc_lic_mode information is determined to be a first numeric value.

[00451] As another example, in a case where the current block prediction mode is the single model intrablock copy lighting compensation mode, it is determined that the value of the second cu_ibc_lic_mode information is a second numeric value.

[00452] As another example, in a case where the current block prediction mode is the multi-model intrablock copy lighting compensation mode, it is determined that the value of the second cu_ibc_lic_mode information is a third numeric value.

[00453] The terms of this disclosure do not limit the specific values ​​of the first numerical value, the second numerical value, and the third numerical value.

[00454] In one example, the first numerical value is 0, the second numerical value is 1, and the third numerical value is 2.

[00455] In some embodiments, in a case where the current block uses merge mode, the encoding end may determine the prediction mode of the current block in at least the following ways.

[00456] Method 1: In the case where the current block uses merge mode, a prediction mode of the reference block is determined as the prediction mode of the current block.

[00457] Method 2: in the case where the current block Petition 870250091537, dated 07 / 10 / 2025, pages 303 / 401 105 / 165 uses the merge mode; the single-model intrablock copy lighting compensation mode is determined as the current block prediction mode.

[00458] Method 3: In the case where the current block uses the merge mode, the multi-model intrablock copy lighting compensation mode is determined as the current block's prediction mode.

[00459] Method 4: In the case where the current block uses the merge mode, the prediction mode is not obtained by inheritance. Instead, by calculating the rate distortion cost of each candidate prediction mode to predict the current block, a candidate prediction mode with a minimum cost is determined as the prediction mode of the current block. In one example, the fourth piece of information is written to the bitstream and the prediction mode of the current block is indicated by the fourth piece of information.

[00460] The description above presents the specific process of determining, by the coding end, the prediction mode of the current block.

[00461] After determining the prediction mode of the current block based on the steps above, the encoding end executes the following S202 step.

[00462] In S202, in response to the fact that the current block prediction mode is the multi-model intrablock copy illumination compensation mode, a current block reference block is determined and N groups of linear model parameters are determined.

[00463] N is a positive integer greater than 1.

[00464] Based on the steps above, the encoding end determines the prediction mode of the current block. In the case where the prediction mode of the current block is the copy lighting compensation mode Petition 870250091537, dated 07 / 10 / 2025, pages 304 / 401 In a 106 / 165 intrablock multi-model configuration, the coding end needs to determine the N groups of linear model parameters and determine the reference block of the current block. Then, one group of linear model parameters is selected from the N groups of linear model parameters as the target linear model parameters, and the linear transformation is performed on the reference block of the current block to obtain a prediction block with a good illumination compensation effect, thus improving prediction accuracy and coding performance.

[00465] The specific process for determining the reference block of the current block is presented below.

[00466] In some embodiments, the reference block of the current block is also called the forecast block of the current block, or an initial forecast block of the current block, or a first forecast block of the current block. That is, in the embodiments of this disclosure, the reference block of the current block can be understood as a forecast block that is not subject to lighting compensation.

[00467] In some modalities, in intraprediction, the coding end determines the reference block of the current block in a current image (i.e., a current frame).

[00468] For example, in Figure 7, the solid line with an arrow is the block vector (BV) information of the current block. At the encoding end, through the BV, a corresponding reconstructed block is found for the current block as the current block reference block.

[00469] Similar to interprediction, IBC has two modes, one being the Advanced Motion Vector Prediction (AMVP) mode and the other being a jump / merge mode (i.e., the merge mode). Petition 870250091537, dated 07 / 10 / 2025, pages 305 / 401 107 / 165 [0047 0] In one example, in AMVP mode, the coding end creates a list of MVP candidates, determines an ideal MVP from the list of MVP candidates, determines a starting point for movement estimation based on the selected MVP, and then searches near the starting point to obtain the reference block for the current block.

[00471] In one example, in skip / merge mode, the coding end creates a list of MVP candidates, determines an ideal MVP from the list of MVP candidates, uses the selected MVP as a current point MV, and then determines the current block reference block in the current image based on the MV.

[00472] In some embodiments, the encoding end may also use other existing methods to determine the reference block of the current block.

[00473] The specific process for determining, by the coding end, the N groups of linear model parameters is presented below.

[00474] In embodiments of the present disclosure, in the case where the coding end determines that the prediction mode of the current block is the multi-model intrablock copy lighting compensation mode, several groups of linear model parameters need to be determined and one group of linear model parameters is selected from the several groups of linear model parameters to perform the linear transformation on the reference block of the current block to obtain a prediction value of the current block.

[00475] The terms of this disclosure do not limit the specific parameters included in each linear model parameter group. For example, the parameters may be any parameters related to Petition 870250091537, dated 07 / 10 / 2025, pages 306 / 401 108 / 165 linear transformation.

[00476] In one example, each group of linear model parameters among the N groups of linear model parameters includes a scale parameter a and a displacement parameter b. It should be noted that, among the N groups of linear model parameters, the parameters included in each group are not completely the same.

[00477] For example, the N groups of linear model parameters in the embodiments of the present disclosure are shown in Table 4.

[00478] After determining the N groups of linear model parameters shown in Table 4, the coding end can select one group of linear model parameters from the N groups of linear model parameters shown in Table 4 above and perform the linear transformation on the reference block of the current block to obtain the lighting compensation. Therefore, a reference block after lighting compensation is obtained, and then the reference block after lighting compensation is determined as the prediction block of the current block.

[00479] The modalities of the present disclosure do not limit the specific manner for the coding end to determine the N groups of linear model parameters.

[00480] In some embodiments, the N groups of linear model parameters are predefined values ​​or empirical values.

[00481] In some embodiments, the coding end determines the N groups of linear model parameters by means of step S202-A below.

[00482] In S202-A, the N groups of linear model parameters are determined based on an area Petition 870250091537, dated 07 / 10 / 2025, pages 307 / 401 109 / 165 reconstructed surrounding the reference block and a reconstructed surrounding area of ​​the current block.

[00483] In this embodiment, the coding end determines the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block, and then determines the N groups of linear model parameters based on the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block.

[00484] For example, the reconstructed area surrounding the reference block includes a reconstructed area adjacent to the reference block and / or a reconstructed area not adjacent to the reference block. Correspondingly, the reconstructed area surrounding the current block includes a reconstructed area adjacent to the current block and / or a reconstructed area not adjacent to the current block.

[00485] In the embodiments of the present disclosure, the coding end can determine N groups of linear model parameters that differ based on the feature information of the reconstructed area surrounding the reference block and the feature information of the reconstructed area surrounding the current block. The N groups of linear model parameters that differ can achieve different lighting compensation effects. Thus, the coding end can select, according to real situations, a group of linear model parameters with a target lighting compensation effect from the N groups of linear model parameters with different lighting compensation effects, to perform lighting compensation in the reference block of the current block, which improves the lighting compensation effect and the prediction effect, and thus improves the Petition 870250091537, dated 07 / 10 / 2025, pages 308 / 401 110 / 165 encoding performance.

[00486] The features of this disclosure do not limit the specific manner in which the coding end determines the N groups of linear model parameters based on the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block.

[00487] In some embodiments, the coding end first determines a group of linear model parameters based on the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block. For example, the process of determining a group of linear model parameters based on the reconstructed surrounding area of ​​the reference block and the reconstructed surrounding area of ​​the current block can be performed with reference to the method shown in Formula (3) above. Then, a group of linear model parameters is fitted to obtain the N groups of linear model parameters.

[00488] In some embodiments, the encoding end partitions the reconstructed area surrounding the reference block into N subareas. For example, based on color information, luma information, bit depth, and other feature information of the reconstructed area surrounding the reference block, the reconstructed area surrounding the reference block is partitioned into N first subareas. Correspondingly, according to the N first subareas of the reference block, the reconstructed area surrounding the current block is divided into N second subareas, where a single first subarea corresponds to a second subarea. In this way, a group of linear model parameters can be determined according to each first subarea of ​​the N first subareas and according to the first subarea and a second subarea. Petition 870250091537, dated 07 / 10 / 2025, pages 309 / 401 111 / 165 corresponding to the first subarea. For example, linear model parameter group 1 is determined according to the first subarea 1 and the second subarea 1, and linear model parameter group 2 is determined according to the first subarea 2 and the second subarea 2, and so on; and thus, N linear model parameter groups can be determined. For example, the process of determining linear model parameter group 1 according to the first subarea 1 and the second subarea 1 can be performed with reference to the method shown in Formula (3) above.

[00489] In some modes, the S202-A above includes the following steps S202-A1 to S202-A3.

[00490] In S202-A1, a first set of samples is determined from the reconstructed area surrounding the reference block, and a second set of samples is determined from the reconstructed area surrounding the actual block.

[00491] In S202-A2, the first set of samples and the second set of samples are classified into N groups of sample sets, where any group of sample sets among the N groups of sample sets includes at least one first sample and at least one second sample.

[00492] In S202-A3, for an i-th group of sample sets among the N groups of sample sets, an i-th group of linear model parameters is determined based on the first sample(s) and second sample(s) included in the i-th group of sample sets, where i is a positive integer less than or equal to N.

[00493] In the modalities of the present disclosure, for convenience of description, the samples (i.e., Petition 870250091537, dated 07 / 10 / 2025, pages 310 / 401 112 / 165 reconstructed samples) included in the reconstructed area surrounding the reference block are denoted as first samples, and the samples (i.e., reconstructed samples) included in the reconstructed area surrounding the actual block are denoted as second samples.

[00494] In this embodiment, after determining the reconstructed area surrounding the reference block and the reconstructed area surrounding the current block, the coding end determines the first set of samples from the reconstructed area surrounding the reference block and determines the second set of samples from the reconstructed area surrounding the current block, wherein the first set of samples includes at least one first sample and the second set of samples includes at least one second set of samples.

[00495] The arrangements of this disclosure do not limit the specific manner in which the coding end determines the first set of samples from the reconstructed area surrounding the reference block and determines the second set of samples from the reconstructed area surrounding the actual block.

[00496] For example, the encoding end acquires at least one first sample from the reconstructed area surrounding the reference block according to a predefined acquisition step size to constitute the first set of samples and acquires at least one second sample from the reconstructed area surrounding the current block according to the predefined acquisition step size to constitute the second set of samples.

[00497] As another example, the encoding end determines all the first samples included in the reconstructed area surrounding the reference block. Petition 870250091537, dated 07 / 10 / 2025, pages 311 / 401 113 / 165 as the first set of samples and determines all second samples included in the reconstructed area surrounding the current block as the second set of samples.

[00498] In some embodiments, the reconstructed area surrounding the reference block includes a model area of ​​the reference block, and the reconstructed area surrounding the current block includes a model area of ​​the current block. In this case, the S202-A1 above includes the following S202-A1 step.

[00499] In S202-A11, the first set of samples is determined from the area of ​​the reference block model and the second set of samples is determined from the area of ​​the current block model.

[00500] In this mode, in the case where the reconstructed surrounding area of ​​the reference block includes the model area of ​​the reference block and the reconstructed surrounding area of ​​the current block includes the model area of ​​the current block, the coding end can directly determine the first set of samples from the model area of ​​the reference block and determine the second set of samples from the model area of ​​the current block.

[00501] Specific implementations of the encoding end, determining the first set of samples from the reference block model area and determining the second set of samples from the current block model area, include, without limitation, the following ways.

[00502] Method 1: The number of first samples to be selected and the number of second samples to be selected are determined according to the width and height of the current block.

[00503] For example, in a case where the Petition 870250091537, dated 07 / 10 / 2025, pages 312 / 401 114 / 165 width or height of the current block is equal to the default value 1 (e.g., 4), second samples with the default value number 1 (e.g., 4) are taken from each of the top models and the left model of the current block to constitute the second set of samples, and the second set of samples includes 8 second samples; First samples with the default value number 1 (e.g., 4) are taken from each of the top models and the left model of the reference block to constitute the first set of samples, and the first set of samples includes 8 first samples.

[00504] As another example, in a case where the width of the current block is the preset value 2 (e.g., 16) and the height of the current block is the preset value 3 (e.g., 4), 4 second samples are taken from the left model of the current block and second samples with the number of preset values ​​5 (e.g., 4) are taken from the top model of the current block according to a step size of the preset value 4 (e.g., 3) to constitute the second set of samples, and the second set of samples includes 8 second samples; 4 first samples are taken from the left model of the reference block, and the first samples with the number of preset values ​​5 (e.g., 4) are taken from the top model of the reference block according to the step size of the preset value 4 (e.g., 3) to constitute the first set of samples, and the first set of samples includes 8 first samples.

[00505] As another example, in a case where the width and height of the current block are not equal to the predefined value 1 (for example, 4), second samples with the Petition 870250091537, dated 07 / 10 / 2025, pp. 313 / 401 115 / 165, the number of logarithms of the length of the relatively small side to the base 2, are obtained from reconstructed samples included in the upper and left models of the current block to constitute the second set of samples; and the first samples with the number of logarithms of the length of the relatively small side to the base 2 are obtained from reconstructed samples included in the upper and left models of the reference block to constitute the first set of samples.

[00506] 0For example, the top model includes a sample row and the left model includes a sample column.

[00507] Method 2: The encoding end performs sampling in the reference block model area according to a first sampling step size to obtain the first set of samples, and performs sampling in the current block model area according to the first sampling step size to obtain the second set of samples, where the size of the first sampling step is less than a predefined sampling step size.

[00508] In this Method 2, the encoding end can increase the number of samples involved in the calculation of linear model parameters, reducing the sampling step size, in order to improve the accuracy of the linear model parameter calculation.

[00509] For example, the encoding end performs sampling in the model area of ​​the reference block according to the first sampling step size to obtain the first set of samples and performs sampling in the model area of ​​the current block according to the first sampling step size to Petition 870250091537, dated 07 / 10 / 2025, pp. 314 / 401 116 / 165 obtain the second set of samples, where the first sampling step size is smaller than the predefined sampling step size.

[00510] For example, the size of the first sampling step is less than 3.

[00511] Method 3: the encoding end determines all samples included in the model area of ​​the reference block as the first sample set and determines all samples included in the model area of ​​the current block as the second sample set.

[00512] In Method 3, all samples included in the reference block model area can be determined as the first set of samples, and all samples included in the current block model area can be determined as the second set of samples, in order to increase the number of samples involved in the calculation of linear model parameters and improve the accuracy of the linear model parameter calculation.

[00513] The terms of this disclosure do not limit the specific sizes of the reference block model area and the actual block model area.

[00514] In some embodiments, as shown in Figure 12, the reference block model area includes a top reference block model area and / or a left reference block model area, and the current block model area includes a top current block model area and / or a left current block model area.

[00515] In some embodiments, to increase the number of samples involved in the calculation of linear model parameters, the model area can be enlarged.

[00516] In one example, the superior model is Petition 870250091537, dated 07 / 10 / 2025, pp. 315 / 401 117 / 165 expanded. For example, as shown in Figure 13, a model area on the left side of the reference block includes the left model area of ​​the reference block and a lower left model area of ​​the reference block, and a model area on the left side of the current block includes the left model area of ​​the current block and a lower left model area of ​​the current block.

[00517] In one example, the left model is expanded. For example, as shown in Figure 14, the number of sample lines included in a model area on the top side of the reference block is greater than or equal to a predefined number of lines, and the number of sample lines included in a model area on the top side of the current block is greater than or equal to the predefined number of lines.

[00518] Thus, in the embodiments of the present disclosure, when samples are selected, it is possible to determine the first set of samples from the model on the top side and / or the model on the left side of the reference block shown in Figures 13 and 14 and to determine the second set of samples from the model on the top side and / or the model on the left side of the actual block shown in Figures 13 and 14, so as to increase the number of samples in the first set of samples and in the second set of samples.

[00519] In some embodiments, the encoding end may further increase the number of lines in the top-side model to achieve model expansion. For example, the number of sample lines included in the top-side model area of ​​the reference block is greater than or equal to the predefined number of lines, and the number of sample lines included in the top-side model area of ​​the current block is greater than or equal to Petition 870250091537, dated 07 / 10 / 2025, pages 316 / 401 118 / 165 to the predefined number of lines. For example, the predefined number of lines can be 2, 3, 4, 5, etc.

[00520] In some embodiments, the coding end may further increase the number of columns in the left-hand model to achieve model expansion. For example, the number of sample columns included in the left-hand model area of ​​the reference block is greater than or equal to a predefined number of columns, and the number of sample columns included in the left-hand model area of ​​the current block is greater than or equal to the predefined number of columns. For example, the predefined number of columns may be 2, 3, 4, 5, etc.

[00521] After determining the first set of samples from the reconstructed area surrounding the reference block and determining the second set of samples from the reconstructed area surrounding the current block through the steps above, the coding end executes step S202-A2 above.

[00522] The arrangements of this disclosure do not limit the specific manner in which the coding end classifies the first set of samples and the second set of samples into the N groups of sample sets.

[00523] In some embodiments, the encoding end classifies the first set of samples and the second set of samples into N sample set groups based on feature information such as color information, luma information, and bit depth of each of the first samples and the second samples in the first sample set and the second sample set, and each of the N sample set groups includes at least one first sample and at least one second sample. For example, in the first Petition 870250091537, dated 07 / 10 / 2025, pp. 317 / 401 In the first sample set (119 / 165), and in the second sample set, the first sample and the second sample, which have similar characteristic information, such as color information and luma information, are classified into a group of sample sets.

[00524] In some modes, the S202-A2 above includes the following steps.

[00525] In S202-A21, the first samples included in the first sample set are classified into N classes of the first samples.

[00526] In S202-A22, the second samples included in the second set of samples are classified into N classes of second samples.

[00527] In S202-A23, the N groups of sample sets are obtained based on the N classes of the first samples and the N classes of the second samples.

[00528] In this mode, the coding end classifies the first samples included in the first set of samples into the N classes of first samples and, at the same time, classifies the second samples included in the second set of samples into the N classes of second samples, where each of the N classes of first samples includes at least one first sample, and each of the N classes of second samples includes at least one second sample.

[00529] The modalities of the present disclosure do not limit the specific manner in which the coding end classifies the first samples included in the first set of samples into the N classes of the first samples.

[00530] In some modalities, the coding end classifies, based on the characteristic information of each of the first samples in Petition 870250091537, dated 07 / 10 / 2025, pages 318 / 401 120 / 165 first set of samples, the first samples to obtain the N classes of the first samples.

[00531] In some modes, the S202-A21 above includes the following steps S202-A21-a1 and S202-A21-a2.

[00532] In S202-A21-a1, a first sample mean value is determined from the first sample set.

[00533] In S202-A21-a2, the first set of samples is classified into the N classes of the first samples based on the first sample mean.

[00534] In this mode, the coding end classifies the first samples included in the first sample set based on the sample average value.

[00535] Specifically, the coding end first determines the sample mean of the first set of samples based on a reconstructed value of each first sample in the first set of samples. For ease of description, the sample mean is referred to as the first sample mean. Then, the coding end classifies the first samples included in the first set of samples into the N classes of first samples based on the first sample mean.

[00536] For example, the first samples in the first sample set that are greater than or equal to the first sample mean value are classified into a first class of first samples; and the first samples in the first sample set that are less than or equal to the first sample mean value are classified into a second class of first samples.

[00537] As another example, the first samples in the first set of samples whose values ​​of Petition 870250091537, dated 07 / 10 / 2025, pages 319 / 401 121 / 165 differences with the first sample mean value are between the limit c and the limit d are classified in a first class of first samples; the first samples in the first set of samples whose difference values ​​with the first sample mean value are less than the limit C are classified in a second class of first samples; and the first samples in the first set of samples whose difference values ​​with the first sample mean value are greater than the limit D are classified in a third class of first samples.

[00538] In some embodiments, the S202-A21 above includes the following step S202-A21-b.

[00539] In S202-A21-b, the first set of samples is sorted into the N classes of first samples based on the bit depths of the first samples in the first set of samples.

[00540] In this mode, the encoding end classifies the first set of samples into the N classes of the first samples based on the bit depth of each of the first samples in the first set of samples.

[00541] In one example, the first samples in the first sample set are classified into 2 first sample classes, 3 first sample classes, or 4 first sample classes based on bit depth sizes, and the bit depths of the first samples in each first sample class are close.

[00542] In another example, the encoding end determines an average first-bit depth value from the first set of samples and classifies the first set of samples into the N classes of the first Petition 870250091537, dated 07 / 10 / 2025, pages 320 / 401 122 / 165 samples based on the first average bit depth value.

[00543] For example, the first samples in the first sample set whose bit depths are greater than or equal to the first average bit depth value are classified into a first class of first samples; and the first samples in the first sample set whose bit depths are less than or equal to the first average bit depth value are classified into a second class of first samples.

[00544] As another example, the first samples in the first sample set whose bit depth difference values ​​and the first average bit depth value are between the threshold e and the threshold f are classified into a first class of first samples; the first samples in the first sample set whose bit depth difference values ​​and the first average bit depth value are less than the threshold e are classified into a second class of first samples; and the first samples in the first sample set whose bit depth difference values ​​and the first average bit depth value are greater than the threshold f are classified into a third class of first samples.

[00545] The coding end classifies the first samples in the first sample set into the N classes of first samples based on the step above and also classifies the second samples in the second sample set into the N classes of second samples.

[00546] The terms of this disclosure do not limit the specific manner in which the end of Petition 870250091537, dated 07 / 10 / 2025, pages 321 / 401 123 / 165 coding classifies the second samples included in the second set of samples into N classes of second samples.

[00547] In some embodiments, the coding end may classify the second samples included in the second set of samples into the N classes of second samples in the same manner as the classification of the N classes of first samples.

[00548] In some embodiments, the coding end classifies the second samples included in the second set of samples into the N classes of second samples by means of the following step. That is, the S202-A22 above includes the following step.

[00549] In S202-A221, for a j-th class of first samples in the N classes of first samples, the second samples in the second set of samples that correspond to the first samples in the j-th class are determined as a j-th class of second samples, where j is a positive integer less than or equal to N.

[00550] Based on the steps above, the coding end classifies the first samples in the first sample set into the N classes of first samples, and for the j-th class of first samples in the N classes of first samples, the coding end determines the second samples in the second sample set that correspond to the j-th class of first samples as the j-th class of second samples, where j is a positive integer less than or equal to N.

[00551] For example, the coding end classifies the first samples in the first set of samples that are greater than or equal to the first sample mean value into a first class of firsts. Petition 870250091537, dated 07 / 10 / 2025, pp. 322 / 401 124 / 165 samples; Similarly, the coding end classifies the second samples in the second set of samples whose positions correspond to the first samples in the first class into a first class of second samples. The coding end classifies the first samples in the first set of samples that are smaller than the first sample average value into a second class of first samples; correspondingly, the coding end classifies the second samples in the second set of samples whose positions correspond to the first samples in the second class into a second class of second samples.

[00552] It can be seen from the above that the N classes of first samples obtained by classifying the first set of samples by the coding end are in one-to-one correspondence with the N classes of second samples obtained by classifying the second sample defined by the coding end. For example, the first class of first samples corresponds to the first class of second samples, and the second class of first samples corresponds to the second class of second samples. Therefore, the coding end can determine the j-th class of first samples in the N classes of first samples and the j-th class of second samples in the N classes of second samples as a j-th group of sample sets. In this way, the N classes of first samples and the N classes of second samples constitute the N groups of sample sets.

[00553] The coding end sorts the first set of samples and the second set of samples into the N groups of sample sets based on the steps above and then executes step S202-A3 above. Petition 870250091537, dated 07 / 10 / 2025, pp. 323 / 401 125 / 165

[00554] In embodiments of the present disclosure, the coding end determines a group of linear model parameters based on each group of sample sets in the N groups of sample sets, in order to obtain the N groups of linear model parameters.

[00555] In the embodiments of the present disclosure, the specific process for determining each group of linear model parameters based on each group of sample sets in the N groups of sample sets is the same. For the sake of description, the process for determining an i-th group of linear model parameters based on an i-th group of sample sets is taken as an example for description.

[00556] The arrangements of this disclosure do not limit the specific manner of determining the i-th group of linear model parameters based on the first sample(s) and second sample(s) included in the i-th group of sample sets in S202-A3 above.

[00557] In one example, a linear relationship between the first sample(s) and the second sample(s) included in the i-th group of sample sets is determined, and then the i-th group of linear model parameters is determined. Once the first sample and the second sample included in the i-th group of sample sets are known, a scaling coefficient a and a shift parameter b corresponding to the i-th group of sample sets can be determined by solving a linear equation, to obtain the i-th group of linear model parameters.

[00558] In one example, the first samples in the i-th group of sample sets are added to obtain a first sum value, and the second samples in Petition 870250091537, dated 07 / 10 / 2025, pp. 324 / 401 126 / 165 i-th group of sample sets are added to obtain a second sum value; a sum of squares of the first samples in the i-th group of sample sets is determined to obtain a third sum value; a fourth sum value is obtained by multiplying the first samples and the second samples in the i-th group of sample sets and then adding the multiplied results; and the i-th group of linear model parameters is determined based on the first sum value, the second sum value, the third sum value, and the fourth sum value.

[00559] In this example, the first samples xi in the i-th group of sample sets are added to obtain the first sum value sumXi; the second samples yi in the i-th group of sample sets are added to obtain the second sum value sumYi; the sum of the squares of the first samples xi in the i-th group of sample sets is determined to obtain the third sum value sumXiXi; the fourth sum value sumXiYi is obtained by multiplying the first samples xi and the second samples yi in the i-th group of sample sets and then adding the multiplied results; and the i-th group of linear model parameters is determined based on the first sum value, the second sum value, the third sum value, and the fourth sum value.

[00560] The features of this disclosure do not limit the specific manner in which the coding end determines the i-th group of linear model parameters based on the first sum value, the second sum value, the third sum value, and the fourth sum value.

[00561] In some modalities, the i-th group Petition 870250091537, dated 07 / 10 / 2025, pages 325 / 401 127 / 165 of linear model parameters includes a scaling coefficient ai and a shift parameter bi.

[00562] For example, the coding end determines the i-th group of linear model parameters using the following Formula (4).

[00563] The text above is an introduction to the process of determining the i-th group of linear model parameters based on the i-th group of sample sets. The coding end can determine the N groups of linear model parameters based on the N groups of sample sets with reference to the method above.

[00564] In some embodiments, the encoding end can record the N specified groups of linear model parameters into the bitstream, so that the decoding end can obtain the N groups of linear model parameters by decoding the bitstream.

[00565] After determining the N groups of linear model parameters based on the steps above, the coding end executes the following step S203.

[00566] In S203, a target group of linear model parameters is selected from the N groups of linear model parameters, and the linear transformation is performed on the reference block using the target group of linear model parameters to obtain a prediction block of the current block.

[00567] In embodiments of this disclosure, where the coding end determines that the prediction mode of the current block is the illumination compensation mode of the multi-model intrablock copy, the coding end determines the reference block of the current block and determines the N groups of linear model parameters. Then, the coding end selects the target linear model parameters from the N groups. Petition 870250091537, dated 07 / 10 / 2025, pp. 326 / 401 128 / 165 linear model parameters and performs the linear transformation on the reference block of the current block using the target linear model parameters, which improves the illumination compensation effect of the reference block and thus improves the prediction effect and coding performance.

[00568] The features of this disclosure do not limit the specific manner in which the coding end selects the target group of linear model parameters from the N groups of linear model parameters.

[00569] In some embodiments, the coding end selects the target group of linear model parameters from the N groups of linear model parameters using the following steps.

[00570] In S203-A1, a second sample mean value is determined for the reference block.

[00571] In S203-A2, the target group of linear model parameters is selected from the N groups of linear model parameters based on the second sample mean value.

[00572] The method in this mode corresponds to the S202-A21-a1 and S202-A21-a2 methods described above.

[00573] It can be seen in S202-A21-a1 and S202-A21a2 above that, when the coding end determines the N groups of linear model parameters, the coding end classifies the first samples included in the first sample set into the N classes of first samples based on the first sample mean value and classifies the second samples included in the second sample set into the N classes of second samples based on the position information of the N classes of first samples, so as to obtain the N groups of sample sets. Finally, the N groups of linear model parameters are determined based on the N Petition 870250091537, dated 07 / 10 / 2025, pp. 327 / 401 129 / 165 sample set groups. Based on this, when the coding end selects the target linear model parameters from the N groups of linear model parameters, the coding end determines a sample mean value (which is denoted as the second sample mean value) from the current block's reference block, i.e., a mean value of the reconstructed sample values ​​included in the reference block. In this way, the target group of linear model parameters can be selected from the N groups of linear model parameters based on the second sample mean value.

[00574] The features of this disclosure do not limit the specific manner in which the coding end selects the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value.

[00575] In one possible implementation, the coding end compares the second sample mean value with the sample values ​​in the N groups of sample sets corresponding to the N groups of linear model parameters, selects a group of linear model parameters corresponding to a group of sample sets closest to the second sample mean value, and determines the group of linear model parameters as the target group of linear model parameters. For example, the second sample mean value is closest to (i.e., has a shorter distance from) the first sample(s) and second sample(s) included in a k-th group of sample sets in the N groups of sample sets, and a group of linear model parameters corresponding to the k-th group of sample sets among the N groups of linear model parameters is determined as the target group of linear model parameters. Petition 870250091537, dated 07 / 10 / 2025, pp. 328 / 401 130 / 165

[00576] In one possible implementation, the coding end selects the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value and the first sample mean value.

[00577] It can be seen from S202-A21-a1 and S202-A21-a2 above that, in some embodiments, when the coding end classifies the first sample set and the second sample set into the N sample set groups, the first samples in the first sample set that are greater than or equal to the first sample mean value are classified into the first first sample class, and the first samples in the first sample set that are less than or equal to the first sample mean value are classified into the second first sample class. Then, the N linear model parameter groups are determined based on the N sample set groups. Based on this, the coding end can select the target group of linear model parameters from the N linear model parameter groups based on the magnitudes of the second sample mean value and the first sample mean value.

[00578] For example, in a case where the second sample mean value is greater than or equal to the first sample mean value, a group of linear model parameters corresponding to the first class of the first samples among the N groups of linear model parameters is determined as the target group of linear model parameters.

[00579] As another example, in a case where the second sample mean value is less than or equal to the first sample mean value, a group of linear model parameters corresponding to the second class of firsts Petition 870250091537, dated 07 / 10 / 2025, pp. 329 / 401 131 / 165 samples among the N groups of linear model parameters is determined as the target group of linear model parameters.

[00580] In some embodiments, the coding end selects the target group of linear model parameters from the N groups of linear model parameters using the following steps.

[00581] In S203-B1, a second average bit depth value is determined for the reference block.

[00582] In S203-B2, the target group of linear model parameters is selected from the N groups of linear model parameters based on the second average bit depth value.

[00583] The method in this mode corresponds to the S202-A21-b1 and S202-A21-b2 methods mentioned above.

[00584] It can be seen in S202-A21-b1 and S202-A21b2 above that, when the encoding end determines the N groups of linear model parameters, the encoding end classifies the first samples included in the first sample set into the N classes of first samples based on the first average bit depth value and classifies the second samples included in the second sample set into the N classes of second samples based on the position information of the N classes of first samples, so as to obtain the N groups of sample sets. Finally, the N groups of linear model parameters are determined based on the N groups of sample sets.Based on this, when the encoding end selects the target linear model parameters from the N groups of linear model parameters, the encoding end determines an average bit depth value (which is denoted as the second average bit depth value) of the block. Petition 870250091537, dated 07 / 10 / 2025, pages 330 / 401 132 / 165 is the reference of the current block, that is, an average bit depth value of the reconstructed sample values ​​included in the reference block. In this way, the target group of linear model parameters can be selected from the N groups of linear model parameters based on the second average bit depth value.

[00585] The embodiments of the present disclosure do not limit the specific manner in which the encoding end selects the target group of linear model parameters from the N groups of linear model parameters based on the second average bit depth value.

[00586] In one possible implementation, the encoding end compares the second average bit depth value with the bit depths of the samples in the N sample set groups corresponding to the N linear model parameter groups, selects a linear model parameter group corresponding to a sample set group closest to the second average bit depth value, and determines the linear model parameter group as the target linear model parameter group. For example, the second average bit depth value is closest to the bit depths of the first sample(s) and the second sample(s) included in the k-th sample set group in the N sample set groups, and therefore a linear model parameter group corresponding to the k-th sample set group among the N linear model parameter groups is determined as the target linear model parameter group.

[00587] In one possible implementation, the coding end selects the target group of linear model parameters from the N groups of parameters of Petition 870250091537, dated 07 / 10 / 2025, pp. 331 / 401 133 / 165 linear model based on the second average bit depth value and the first average bit depth value.

[00588] It can be seen from S202-A21-b1 and S202-A21-b2 above that, in some embodiments, when the encoding end sorts the first set of samples and the second set of samples into N groups of sample sets, the first samples in the first set of samples whose bit depths are greater than or equal to the first average bit depth value are sorted into the first class of first samples, and the first samples in the first set of samples whose bit depths are less than or equal to the first average bit depth value are sorted into the second class of first samples. Then, the N groups of linear model parameters are determined based on the N groups of sample sets.Based on this, the encoding end can select the target group of linear model parameters from the N groups of linear model parameters based on the magnitudes of the second bit-depth average value and the first bit-depth average value.

[00589] For example, in a case where the second average bit depth value is greater than or equal to the first average bit depth value, a group of linear model parameters corresponding to the first class of first samples among the N groups of linear model parameters is determined as the target group of linear model parameters.

[00590] As another example, in a case where the second average bit depth value is less than or equal to the first average bit depth value, a group of linear model parameters corresponding to Petition 870250091537, dated 07 / 10 / 2025, pp. 332 / 401 134 / 165 The second class of the first samples among the N groups of linear model parameters is determined as the target group of linear model parameters.

[00591] After determining the target group of linear model parameters from the N groups of linear model parameters based on the steps above, the coding end performs the linear transformation on the reference block of the current block using the target group of linear model parameters.

[00592] For example, the target linear model parameters include a scale parameter a1 and an offset parameter b1, and the coding end performs the linear transformation on the reference block based on the scale parameter and the offset parameter to obtain the prediction block.

[00593] For example, the end of the encoding performs the linear transformation on the reference block of the current block based on Formula (5) above.

[00594] The video coding method provided in the embodiments of this disclosure proposes a multi-model intrablock copy lighting compensation mode to augment the intrablock copy lighting compensation modes, so that the coding end can select a single-model intrablock copy lighting compensation mode (i.e., having only one group of model parameters) for prediction compensation or select the multi-model intrablock copy lighting compensation mode (i.e., including multiple groups of model parameters) for prediction compensation according to the specific situations of the current block. In a case where the multi-model intrablock copy lighting compensation mode is selected to perform the compensation of Petition 870250091537, dated 07 / 10 / 2025, pp. 333 / 401 135 / 165 prediction in the current block, N groups of linear model parameters are determined and the target linear model parameters are selected from the N groups of linear model parameters. The target model parameters are then used to perform the linear transformation on the reference block of the current block to obtain the prediction block of the current block, thus improving the lighting compensation effect and, in turn, improving the prediction accuracy and coding performance.

[00595] It should be understood that Figures 11 to 15 are merely examples of the present disclosure and should not be interpreted as limitations to the present disclosure.

[00596] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details in the embodiments above. Within the technical concept of the present disclosure, a variety of simple variations can be made to the technical solution of the present disclosure, and all such simple variations fall within the scope of protection of the present disclosure. For example, the various specific technical features described in the specific embodiments above can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the various possible combinations are not further described in the present disclosure.As another example, different implementations of this disclosure may also be combined arbitrarily, provided they do not violate the concept of this disclosure, which should also be considered as the content disclosed in this disclosure.

[00597] It should also be understood that, in various methodological modalities of the present disclosure, the magnitudes Petition 870250091537, dated 07 / 10 / 2025, pp. 334 / 401 The serial numbers 136 / 165 of the processes above do not imply a sequential order of execution, and the order of execution of the processes should be determined by their inherent function and logic, without constituting any limitation on the implementation process of the embodiments of this disclosure. Furthermore, in the embodiments of this disclosure, the term "and / or" is merely a description of an association relationship between associated objects, indicating that there can be three types of relationships. Specifically, A and / or B can represent three situations: A exists alone, both A and B exist, and B exists alone. Additionally, the character / in this disclosure generally indicates that the associated objects before and after that character are in an "or" relationship.

[00598] Together with Figures 11 to 15, the embodiments of the method of the present disclosure are described in detail above, and the embodiments of the apparatus of the present disclosure will be described in detail below together with Figures 16 and 17.

[00599] Figure 16 is a schematic block diagram of a video encoding apparatus provided in an embodiment of the present disclosure. The video encoding apparatus 10 is applied to the aforementioned video encoder.

[00600] As shown in Figure 16, the video encoding apparatus 10 includes:

[00601] a mode determination unit 11, configured to determine a prediction mode for a current block;

[00602] a parameter determination unit 12, configured to, in response to the fact that the current block prediction mode is a multi-model intrablock copy lighting compensation mode, Petition 870250091537, dated 07 / 10 / 2025, pages 335 / 401 137 / 165 determine a reference block of the current block and determine N groups of linear model parameters, where N is a positive integer greater than 1; and

[00603] a transformation unit 13, configured to select a target group of linear model parameters from the N groups of linear model parameters and perform the linear transformation on the reference block using the target group of linear model parameters, to obtain a prediction block of the current block.

[00604] In some embodiments, the parameter determination unit 12 is specifically configured to determine the N groups of linear model parameters based on a reconstructed surrounding area of ​​the reference block and a reconstructed surrounding area of ​​the current block.

[00605] In some embodiments, the parameter determination unit 12 is specifically configured to: determine a first set of samples from the reconstructed area surrounding the reference block and determine a second set of samples from the reconstructed area surrounding the current block; classify the first set of samples and the second set of samples into N groups of sample sets, any of the N groups of sample sets including at least one first sample and at least one second sample; and for an i-th group of sample sets among the N groups of sample sets, determine an i-th group of linear model parameters based on the first sample(s) and the second sample(s) included in the i-th group of sample sets, where i is a positive integer less than or equal to N.

[00606] In some embodiments, the reconstructed area surrounding the reference block includes a Petition 870250091537, dated 07 / 10 / 2025, pages 336 / 401 138 / 165 reference block model area, and the reconstructed area surrounding the current block includes a current block model area. Parameter determination unit 12 is specifically configured to determine the first set of samples from the reference block model area and to determine the second set of samples from the current block model area.

[00607] In some embodiments, the parameter determination unit 12 is specifically configured to: perform sampling in the reference block model area according to a first sampling step size to obtain the first set of samples, where the first sampling step size is smaller than a predefined sampling step size; and perform sampling in the current block model area according to the first sampling step size to obtain the second set of samples.

[00608] In some embodiments, the parameter determination unit 12 is specifically configured to: determine all samples included in the reference block model area as the first sample set; and determine all samples included in the current block model area as the second sample set.

[00609] In some embodiments, the reference block model area includes a model area on the top side of the reference block and / or a model area on the left side of the reference block, and the current block model area includes a model area on the top side of the current block and / or a model area on the left side of the current block.

[00610] In some embodiments, the model area on the upper side of the reference block includes a Petition 870250091537, dated 07 / 10 / 2025, pp. 337 / 401 139 / 165 upper model area of ​​the reference block and an upper right model area of ​​the reference block; and the top side model area of ​​the current block includes an upper model area of ​​the current block and an upper right model area of ​​the current block.

[00611] In some embodiments, the model area on the left side of the reference block includes a model area to the left of the reference block and a model area to the lower left of the reference block; and the model area on the left side of the current block includes a model area to the left of the current block and a model area to the lower left of the current block.

[00612] In some embodiments, the number of sample lines included in the model area on the top side of the reference block is greater than or equal to a predefined number of lines, and the number of sample lines included in the model area on the top side of the actual block is greater than or equal to the predefined number of lines.

[00613] In some embodiments, the number of sample columns included in the model area on the left side of the reference block is greater than or equal to a predefined number of columns, and the number of sample columns included in the model area on the left side of the actual block is greater than or equal to the predefined number of columns.

[00614] In some embodiments, the parameter that determines unit 12 is specifically configured to: classify the first samples included in the first sample set into N classes of first samples; classify the second samples included in the second sample set into N classes of second samples; and obtain the N groups of sample sets with Petition 870250091537, dated 07 / 10 / 2025, pp. 338 / 401 140 / 165 based on the N classes of the first samples and the N classes of the second samples.

[00615] In some embodiments, the parameter that determines unit 12 is specifically configured to: determine a first sample mean value from the first set of samples; and classify the first set of samples into the first N sample classes based on the first sample mean value.

[00616] In some embodiments, the parameter that determines unit 12 is specifically configured to: classify the first samples in the first set of samples that are greater than or equal to the first sample mean value in a first class of first samples; and classify the first samples in the first set of samples that are less than or equal to the first sample mean value in a second class of first samples.

[00617] In some embodiments, the parameter determination unit 12 is specifically configured to classify the first set of samples into the N classes of the first samples based on the bit depths of the first samples in the first set of samples.

[00618] In some embodiments, the parameter that determines unit 12 is specifically configured to: determine an average first bit depth value of the first set of samples; and classify the first set of samples into the N classes of the first samples based on the first average bit depth value.

[00619] In some embodiments, the parameter determination unit 12 is specifically configured to: classify the first samples in the first set of samples whose bit depths Petition 870250091537, dated 07 / 10 / 2025, pp. 339 / 401 141 / 165 are greater than or equal to the first average bit depth value in a first class of first samples; and classify the first samples in the first set of samples whose bit depths are less than or equal to the first average bit depth value in a second class of first samples.

[00620] In some embodiments, the parameter 12 determination unit is specifically set to: for a j-th class of first samples in the N classes of first samples, determine second samples in the second set of samples that correspond to the first samples in the j-th class as a j-th class of second samples, j being a positive integer less than or equal to N.

[00621] In some embodiments, the parameter determination unit 12 is specifically configured to determine the j-th class of the first samples and the j-th class of the second samples as a j-th group of sample sets.

[00622] In some embodiments, the parameter determination unit 12 is specifically configured to: add the first samples in the i-th group of sample sets to obtain a first sum value and add second samples in the i-th group of sample sets to obtain a second sum value; determine a sum of squares of the first samples in the i-th group of sample sets to obtain a third sum value; obtain a fourth sum value by multiplying the first samples and the second samples in the i-th group of sample sets and then by adding the multiplied results; and determine the i-th group of linear model parameters based on the first sum value, the second sum value, the third sum value Petition 870250091537, dated 07 / 10 / 2025, pages 340 / 401 142 / 165 sum and in the fourth value of the sum.

[00623] In some embodiments, transformation unit 13 is specifically configured to: determine a second sample mean value from the reference block; and select the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value.

[00624] In some embodiments, transformation unit 13 is specifically configured to select the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value and the first sample mean value.

[00625] In some embodiments, transformation unit 13 is specifically configured to: in response to the second sample mean value being greater than or equal to the first sample mean value, determine a group of linear model parameters corresponding to the first class of first samples among the N groups of linear model parameters as the target group of linear model parameters; and in response to the second sample mean value being less than or equal to the first sample mean value, determine a group of linear model parameters corresponding to the second class of first samples among the N groups of linear model parameters as the target group of linear model parameters.

[00626] In some embodiments, transformation unit 13 is specifically configured to: determine a second average bit depth value of the reference block; and select the target group of linear model parameters from the N groups of linear model parameters based on the second average bit depth value. Petition 870250091537, dated 07 / 10 / 2025, pp. 341 / 401 143 / 165

[00627] In some embodiments, transformation unit 13 is specifically configured to select the target group of linear model parameters from the N groups of linear model parameters based on the second average bit depth value and the first average bit depth value.

[00628] In some embodiments, transformation unit 13 is specifically configured to: in response to the second average bit depth value being greater than or equal to the first average bit depth value, determine a group of linear model parameters corresponding to the first class of first samples among the N groups of linear model parameters as the target group of linear model parameters; and in response to the second average bit depth value being less than or equal to the first average bit depth value, determine a group of linear model parameters corresponding to the second class of first samples among the N groups of linear model parameters as the target group of linear model parameters.

[00629] In some embodiments, the mode determination unit 11 is specifically configured to: decode a bit stream to obtain the first information, with the first information being used to indicate a type of prediction of the current block; and determine the prediction mode of the current block based on the first information.

[00630] In some embodiments, the mode 11 determination unit is specifically configured to: in response to the fact that initial information indicates that the current block prediction type is intra-block copy prediction, decode the bitstream to obtain a first flag, where the first flag is used Petition 870250091537, dated 07 / 10 / 2025, pp. 342 / 401 144 / 165 to indicate whether the current block uses a merge mode; and to determine the prediction mode of the current block based on the first flag.

[00631] In some embodiments, the mode determination unit 11 is specifically configured to: in response to the first flag indicating that the current block does not use merge mode, decode the bitstream to obtain the second information, wherein the second information is used to indicate whether the current block uses an intrablock copy lighting compensation mode; and determine the prediction mode of the current block based on the second information.

[00632] In some embodiments, the mode determination unit 11 is specifically configured to: in response to the second piece of information indicating that the current block uses the intra-block copy illumination compensation mode, decode the bitstream to obtain index information, wherein the index information is used to indicate a mode index of the intra-block copy illumination compensation mode used by the current block; and determine the prediction mode of the current block based on the index information.

[00633] In some embodiments, the mode that determines unit 11 is specifically configured to: in response to a value of the index information being a first numeric value, determine that the prediction mode of the current block is a single-model intrablock copy lighting compensation mode; and in response to a value of the index flag being a second numeric value, determine that the prediction mode of the current block is a multi-model intrablock copy lighting compensation mode.

[00634] In some modalities, the unit of Petition 870250091537, dated 07 / 10 / 2025, pp. 343 / 401 145 / 165 mode 11 determination is specifically configured to: in response to the second piece of information indicating that the current block uses the intrablock copy lighting compensation mode and a current block size is greater than or equal to a second predefined size, determine the multi-model intrablock copy lighting compensation mode as the current block's prediction mode.

[00635] In some embodiments, the second information is used to indicate a mode index of the intrablock copy lighting compensation mode, and the mode determination unit 11 is specifically configured to determine the current block prediction mode based on a value of the second information.

[00636] In some embodiments, the mode that determines unit 11 is specifically configured to: in response to the second information value being a first numeric value, determine that the current block prediction mode is a non-intrablock copy lighting compensation mode; in response to the second information value being a second numeric value, determine that the current block prediction mode is a single-model intrablock copy lighting compensation mode; and in response to the second information value being a third numeric value, determine that the current block prediction mode is a multi-model intrablock copy lighting compensation mode.

[00637] In some embodiments, the mode 11 determination unit is configured to: determine whether a current block size meets a first predefined size before decoding the bitstream to obtain the second information; and decode the bitstream to obtain the second information in response to the fact that the current block size meets the first predefined size. Petition 870250091537, dated 07 / 10 / 2025, pp. 344 / 401 146 / 165

[00638] In some embodiments, the mode 11 determination unit is configured to: decode the bitstream to obtain the third information before decoding the bitstream to obtain the second information, wherein the third information is used to indicate whether the current block is decoded using a first tool, and the first tool is mutually exclusive with an intrablock copy illumination compensation technology; and decode the bitstream to obtain the second information in response to which the third information indicates that the current block is decoded without using the first tool.

[00639] In some embodiments, the mode 11 determination unit is specifically configured to, in response to the first flag indicating that the current block uses merge mode, determine a reference block prediction mode as the current block prediction mode.

[00640] In some embodiments, the mode determination unit 11 is specifically configured to, in response to the first flag indicating that the current block uses the merge mode, determine a single model intrablock copy lighting compensation mode as the prediction mode of the current block.

[00641] In some embodiments, the mode 11 determination unit is specifically configured to: in response to the first flag indicating that the current block uses merge mode, decode the bitstream to obtain the fourth piece of information, wherein the fourth piece of information is used to indicate the prediction mode of the current block; and obtain the prediction mode of the current block based on the fourth piece of information.

[00642] In some modalities, the unit of Petition 870250091537, dated 07 / 10 / 2025, pages 345 / 401 147 / 165 mode 11 determination is configured to: decode the bitstream to obtain a third flag before decoding the bitstream to obtain the first flag, wherein the third flag is used to indicate whether a current sequence allows local lighting compensation; and in response to the third flag indicating that the current sequence allows local lighting compensation, decode the bitstream to obtain the first flag.

[00643] It should be understood that the embodiments of the apparatus and the embodiments of the method may correspond to each other and, for similar descriptions, reference may be made to the embodiments of the method, which will not be repeated in this document to avoid repetition. Specifically, the apparatus 10 shown in Figure 16 may perform the decoding end method in the embodiments of the present disclosure, and the above operations and / or functions and others of each unit in the apparatus 10 are, respectively, to implement corresponding processes in each method, such as the decoding end method mentioned above, which will not be repeated in this document for the sake of brevity.

[00644] Figure 17 is a schematic block diagram of a video encoding apparatus provided in an embodiment of the present disclosure, and the video encoding apparatus is applied to the aforementioned encoder.

[00645] As shown in Figure 17, the video encoding apparatus 20 may include:

[00646] a mode 21 prediction unit, configured to determine a prediction mode for a current block; Petition 870250091537, dated 07 / 10 / 2025, pp. 346 / 401 148 / 165

[00647] a parameter determination unit 22, configured to, in response to the fact that the current block prediction mode is a multi-model intrablock copy lighting compensation mode, determine a reference block of the current block and determine N groups of linear model parameters, wherein N is a positive integer greater than 1; and

[00648] a transformation unit 23, configured to select a target group of linear model parameters from the N groups of linear model parameters and perform the linear transformation on the reference block using the target group of linear model parameters to obtain a prediction block of the current block.

[00649] In some embodiments, the parameter determination unit 22 is specifically configured to determine the N groups of linear model parameters based on a reconstructed surrounding area of ​​the reference block and a reconstructed surrounding area of ​​the current block.

[00650] In some embodiments, the parameter determination unit 22 is specifically configured to: determine a first set of samples from the reconstructed area surrounding the reference block and determine a second set of samples from the reconstructed area surrounding the current block; classify the first set of samples and the second set of samples into N groups of sample sets, any of the N groups of sample sets including at least one first sample and at least one second sample; and for an i-th group of sample sets among the N groups of sample sets, determine an i-th group of linear model parameters based on the first sample(s) and second sample(s) included. Petition 870250091537, dated 07 / 10 / 2025, pp. 347 / 401 149 / 165 in the i-th group of sample sets, where i is a positive integer less than or equal to N.

[00651] In some embodiments, the reconstructed area surrounding the reference block includes a model area of ​​the reference block, and the reconstructed area surrounding the current block includes a model area of ​​the current block. Parameter determination unit 22 is specifically configured to determine the first set of samples from the model area of ​​the reference block and to determine the second set of samples from the model area of ​​the current block.

[00652] In some embodiments, the parameter determination unit 22 is specifically configured to: perform sampling in the reference block model area according to a first sampling step size to obtain the first set of samples, where the first sampling step size is smaller than a predefined sampling step size; and perform sampling in the current block model area according to the first sampling step size to obtain the second set of samples.

[00653] In some embodiments, the parameter determination unit 22 is specifically configured to: determine all samples included in the reference block model area as the first sample set; and determine all samples included in the current block model area as the second sample set.

[00654] In some embodiments, the model area of ​​the reference block includes a model area on the top side of the reference block and / or a model area on the left side of the reference block, and the model area of ​​the actual block includes a model area on the side Petition 870250091537, dated 07 / 10 / 2025, pages 348 / 401 150 / 165 top of the current block and / or a model area on the left side of the current block.

[00655] In some embodiments, the model area on the upper side of the reference block includes a top model area of ​​the reference block and a top-right model area of ​​the reference block; and the model area on the upper side of the current block includes a top model area of ​​the current block and a top-right model area of ​​the current block.

[00656] In some embodiments, the model area on the left side of the reference block includes a model area to the left of the reference block and a model area to the lower left of the reference block; and the model area on the left side of the current block includes a model area to the left of the current block and a model area to the lower left of the current block.

[00657] In some embodiments, the number of sample lines included in the model area on the top side of the reference block is greater than or equal to a predefined number of lines, and the number of sample lines included in the model area on the top side of the actual block is greater than or equal to the predefined number of lines.

[00658] In some embodiments, the number of sample columns included in the model area on the left side of the reference block is greater than or equal to a predefined number of columns, and the number of sample columns included in the model area on the left side of the actual block is greater than or equal to the predefined number of columns.

[00659] In some modes, the parameter that determines unit 22 is specifically configured to: classify the first samples included in Petition 870250091537, dated 07 / 10 / 2025, pages 349 / 401 151 / 165 first set of samples into N classes of first samples; classify the second samples included in the second set of samples into N classes of second samples; and obtain the N groups of sample sets based on the N classes of first samples and the N classes of second samples.

[00660] In some embodiments, the parameter that determines unit 22 is specifically configured to: determine a first sample mean value from the first sample set; and classify the first sample set into the first N sample classes based on the first sample mean value.

[00661] In some embodiments, the parameter that determines unit 22 is specifically configured to: classify the first samples in the first set of samples that are greater than or equal to the first sample mean value in a first class of first samples; and classify the first samples in the first set of samples that are less than or equal to the first sample mean value in a second class of first samples.

[00662] In some embodiments, the parameter determination unit 22 is specifically configured to classify the first set of samples into the N classes of the first samples based on the bit depths of the first samples in the first set of samples.

[00663] In some embodiments, the parameter determination unit 22 is specifically configured to: determine an average first bit depth value of the first set of samples; and classify the first set of samples into the N classes of the first samples based on the average first bit depth value. Petition 870250091537, dated 07 / 10 / 2025, pp. 350 / 401 152 / 165

[00664] In some embodiments, the parameter determination unit 22 is specifically configured to: classify the first samples in the first set of samples whose bit depths are greater than or equal to the first average bit depth value in a first class of first samples; and classify the first samples in the first set of samples whose bit depths are less than or equal to the first average bit depth value in a second class of first samples.

[00665] In some embodiments, the parameter determination unit 22 is specifically configured to, for a j-th class of first samples in the N classes of first samples, determine second samples in the second set of samples that correspond to the first samples in the j-th class as a j-th class of second samples, j being a positive integer less than or equal to N.

[00666] In some embodiments, the parameter determination unit 22 is specifically configured to determine the j-th class of the first samples and the j-th class of the second samples as a j-th group of sample sets.

[00667] In some embodiments, the parameter determination unit 22 is specifically configured to: add the first samples in the i-th group of sample sets to obtain a first sum value and add second samples in the i-th group of sample sets to obtain a second sum value; determine a sum of squares of the first samples in the i-th group of sample sets to obtain a third sum value; obtain a fourth sum value by multiplying the first samples and the Petition 870250091537, dated 07 / 10 / 2025, pages 351 / 401 153 / 165 second samples in the i-th group of sample sets and then by adding the multiplied results; determine the i-th group of linear model parameters based on the first sum value, the second sum value, the third sum value, and the fourth sum value.

[00668] In some embodiments, transformation unit 23 is specifically configured to: determine a second sample mean value from the reference block; and select the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value.

[00669] In some embodiments, transformation unit 23 is specifically configured to select the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value and the first sample mean value.

[00670] In some embodiments, transformation unit 23 is specifically configured to: in response to the second sample mean value being greater than or equal to the first sample mean value, determine a group of linear model parameters corresponding to the first class of first samples among the N groups of linear model parameters as the target group of linear model parameters; and in response to the second sample mean value being less than or equal to the first sample mean value, determine a group of linear model parameters corresponding to the second class of first samples among the N groups of linear model parameters as the target group of linear model parameters.

[00671] In some embodiments, the transformation unit 23 is specifically configured to: determine a second average bit depth value Petition 870250091537, dated 07 / 10 / 2025, pp. 352 / 401 154 / 165 of the reference block; and select the target group of linear model parameters from the N groups of linear model parameters based on the second average bit depth value.

[00672] In some embodiments, the transformation unit 23 is specifically configured to select the target group of linear model parameters from the N groups of linear model parameters based on the average value of the second bit depth and the average value of the first bit depth.

[00673] In some embodiments, the transformation unit 23 is specifically configured to: in response to the second average bit depth value being greater than or equal to the first average bit depth value, determine a group of linear model parameters corresponding to the first class of first samples among the N groups of linear model parameters as the target group of linear model parameters; and in response to the second average bit depth value being less than or equal to the first average bit depth value, determine a group of linear model parameters corresponding to the second class of first samples among the N groups of linear model parameters as the target group of linear model parameters.

[00674] In some embodiments, the mode determination unit 21 is specifically configured to: determine a list of candidate prediction modes corresponding to the current block, the candidate prediction modes including the multi-model intrablock copy lighting compensation mode; determine a cost for each candidate prediction mode in the list of candidate prediction modes to predict the current block; and determine the prediction mode of the current block based on the cost. Petition 870250091537, dated 07 / 10 / 2025, pp. 353 / 401 155 / 165

[00675] In some embodiments, before determining the list of candidate prediction modes corresponding to the current block, the mode determination unit 21 is configured to determine whether a current block size meets a first predefined size; in response to the current block size meeting the first predefined size, add the multi-model intrablock copy lighting compensation mode to the list of candidate prediction modes corresponding to the current block.

[00676] In some embodiments, before determining the list of candidate prediction modes corresponding to the current block, the mode determination unit 21 is configured to: determine if the current block is encoded using a first tool, where the first tool is mutually exclusive with an intrablock copy lighting compensation technology; and in response to the fact that the current block is encoded without using the first tool, add the multi-model intrablock copy lighting compensation mode to the list of candidate prediction modes corresponding to the current block.

[00677] In some embodiments, the mode 21 determination unit is configured to determine a prediction type for the current block and record the initial information in a bitstream, where the initial information is used to indicate the prediction type for the current block.

[00678] In some embodiments, the mode 21 determination unit is configured to, in response to the current block prediction type being intrablock copy prediction, write a first flag to the bitstream, where the first flag is used to indicate Petition 870250091537, dated 07 / 10 / 2025, pages 354 / 401 156 / 165 if the current block uses a merge mode.

[00679] In some embodiments, the mode 21 determination unit is configured to, in response to the current block not using the merge mode, record the second piece of information in the bitstream, where the second piece of information is used to indicate whether the current block uses an intrablock copy lighting compensation mode.

[00680] In some embodiments, the mode determination unit 21 is configured to, in response to the current block using the intrablock copy illumination compensation mode, write index information to the bitstream, where the index information is used to indicate a mode index of the intrablock copy illumination compensation mode used by the current block.

[00681] In some embodiments, the mode 21 determination unit is configured to: in response to the current block prediction mode being a single-model intrablock copy illumination compensation mode, determine that an index information value is a first numeric value; and in response to the current block prediction mode being a multi-model intrablock copy illumination compensation mode, determine that the index flag value is a second numeric value.

[00682] In some embodiments, the mode 21 determination unit is specifically configured to, in response to the second piece of information indicating that the current block uses the intrablock copy lighting compensation mode and a current block size is greater than or equal to a second predefined size, determine the multimodel intrablock copy lighting compensation mode as the current block's prediction mode.

[00683] In some modalities, the second Petition 870250091537, dated 07 / 10 / 2025, pages 355 / 401 Information 157 / 165 is used to indicate a mode index of the intrablock copy illumination compensation mode, and mode determination unit 21 is configured to: in response to the current block prediction mode being a non-intrablock copy illumination compensation mode, determine that a value of the second piece of information is a first numeric value; in response to the current block prediction mode being a single-model intrablock copy illumination compensation mode, determine that the value of the second piece of information is a second numeric value; and in response to the current block prediction mode being a multi-model intrablock copy illumination compensation mode, determine that the value of the second piece of information is a third numeric value.

[00684] In some embodiments, the mode 21 determination unit is specifically configured to, in response to the current block using merge mode, determine a reference block prediction mode as the current block prediction mode.

[00685] In some embodiments, the mode determination unit 21 is specifically configured to, in response to the current block using the merge mode, determine a single model intrablock copy lighting compensation mode as the current block's prediction mode.

[00686] In some embodiments, before determining the list of candidate prediction modes corresponding to the current block, mode determination unit 21 is configured to: determine a third flag, wherein the third flag is used to indicate whether a current sequence allows local lighting compensation; in response to which the third flag is used to indicate that the current sequence allows the Petition 870250091537, dated 07 / 10 / 2025, pages 356 / 401 158 / 165 Local lighting compensation, add the multi-model intrablock copy lighting compensation mode to the list of candidate prediction modes corresponding to the current block.

[00687] In some embodiments, the mode 21 determination unit is configured to record the third flag in a bitstream, where the third flag is used to indicate whether the current sequence allows for local illumination compensation.

[00688] It should be understood that the embodiments of the apparatus and the embodiments of the method may correspond to each other and, for similar descriptions, reference may be made to the embodiments of the method, which will not be repeated in this document to avoid repetition. Specifically, the apparatus 20 shown in Figure 17 may perform the end-of-encoding coding method in the embodiments of this disclosure, and the above operations and / or functions and others of each unit in the apparatus 20 are, respectively, to implement corresponding processes in each method, such as the end-of-encoding coding method mentioned above, which will not be repeated in this document for the sake of brevity.

[00689] The text above describes the apparatus and system of the embodiments of the present disclosure from the perspective of the functional units together with the accompanying drawings. It should be understood that the functional units may be implemented in hardware form, or may be implemented through instructions in software form, or may be implemented through a combination of hardware and software units. Specifically, the steps of the embodiments of the method in the embodiments of the present disclosure may be executed by the hardware and / or integrated logic circuit. Petition 870250091537, dated 07 / 10 / 2025, pp. 357 / 401 159 / 165 software instructions in the processor. The method steps disclosed in the embodiments of this disclosure can be directly reflected as being executed by a hardware decoding processor or as being executed by a combination of hardware and software units in the decoding processor. Optionally, the software unit may be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or a register. The storage medium is located in memory, and the processor reads the information in memory and completes the steps in the embodiments of the method above in conjunction with its hardware.

[00690] Figure 18 is a schematic block diagram of an electronic device provided in embodiments of the present disclosure.

[00691] As shown in Figure 18, the electronic device 30 may be the video encoder or the video encoder, as described in the embodiments of this disclosure, and the electronic device 30 may include:

[00692] a memory 33 and a processor 32, wherein the memory 33 is configured to store a computer program 34 and transmit the program code 34 to the processor 32; in other words, the processor 32 has the capability to call the computer program 34 from memory 33 and execute the computer program 34 to implement the method in the embodiments of the present disclosure.

[00693] For example, processor 32 is configured to execute the steps of method 200 above with Petition 870250091537, dated 07 / 10 / 2025, pages 358 / 401 160 / 165 based on computer program instructions 34.

[00694] In some embodiments of this disclosure, processor 32 may include, without limitation:

[00695] 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 device, a discrete gate or transistor logic device or a discrete hardware component.

[00696] In some forms of this publication, memory 33 includes, without limitation:

[00697] volatile (transient) memory and / or non-volatile (non-transient) memory, wherein the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasable PROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory; and the volatile memory may be a random access memory (RAM), serving as an external cache.As an example, and not a limitation, a variety of RAM forms are available, such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synch link DRAM, SLDRAM), and direct memory bus random access memory (direct Rambus RAM, DR RAM).

[00698] In some forms of the present Petition 870250091537, dated 07 / 10 / 2025, pp. 359 / 401 161 / 165 disclosure, the computer program 34 can be partitioned into one or more units. The one or more units are stored in memory 33 and executed by the processor 32, to implement the method provided in this disclosure. The one or more units can be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution processes of the computer program 34 in the electronic device 30.

[00699] As shown in Figure 18, electronic device 30 may additionally include:

[00700] a transceiver 33, wherein the transceiver 33 is connectable to processor 32 or to memory 33.

[00701] Processor 32 can control transceiver 33 to communicate with other devices and, specifically, can control transceiver 33 to transmit information or data to other devices, or control transceiver 33 to receive information or data transmitted by other devices. Transceiver 33 may include a transmitter and a receiver. Transceiver 33 may additionally include an antenna, and there may be one or more antennas.

[00702] It should be understood that various components of the electronic device 30 are connected by means of a bus system, wherein the bus system includes not only a data bus, but also a power bus, a control bus and a status signal bus.

[00703] Figure 19 is a schematic block diagram of a video encoding and decoding system provided in embodiments of the present disclosure.

[00704] As shown in Figure 19, the Petition 870250091537, dated 07 / 10 / 2025, pages 360 / 401 162 / 165 video encoding and decoding system 40 may include a video encoder 41 and a video encoder 42. Video encoder 41 is configured to perform the video encoding method involved in the embodiments of this disclosure, and video encoder 42 is configured to perform the video encoding method involved in the embodiments of this disclosure.

[00705] This disclosure further provides a computer storage medium with a computer program stored thereon. The computer program, when executed by a computer, enables the computer to execute the method in the method embodiments described above. In other words, the embodiments of this disclosure further provide a computer program product, including instructions, and the instructions, when executed by a computer, enable the computer to execute the method in the method embodiments described above.

[00706] This disclosure also provides a bitstream, which is generated according to the encoding method above.

[00707] When implemented using software, all or part of the above embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, the computer program instructions produce, in whole or in part, a process or function according to the embodiments of this disclosure. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or any other programmable device. The computer instructions may be stored in a medium of Petition 870250091537, dated 07 / 10 / 2025, pages 361 / 401 163 / 165 computer-readable storage, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one site, computer, server, or data center to another site, computer, server, or data center via a wired method (e.g., coaxial cable, fiber optic cable, or digital subscriber line (DSL)) or a wireless method (e.g., infrared, radio, or microwave). The computer-readable storage medium can be any available medium that a computer can access or can be a data storage device, such as a server or data center, that includes one or more available media.The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, or magnetic tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[00708] Those skilled in the art will appreciate that the units and steps of the algorithm of the examples described together with the embodiments disclosed in this disclosure can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered as being outside the scope of this disclosure.

[00709] In various forms provided in this disclosure, it should be understood that the system, Petition 870250091537, dated 07 / 10 / 2025, pp. 362 / 401 164 / 165 devices and methods disclosed may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the partitioning of units is only partitioning of logical functions, and there may be other forms of partitioning in the actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not implemented. Furthermore, the mutual coupling or direct coupling or communication connection illustrated or discussed may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or otherwise.

[00710] The units described as discrete components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place or may be distributed across a plurality of network units. Some or all of these units may be selected depending on the actual needs to achieve the solution objective of the embodiments. For example, several functional units in various embodiments of the present disclosure may be integrated into one processing unit, or several units may exist physically alone, or two or more units may be integrated into one unit.

[00711] The descriptions above are merely specific implementations of the present disclosure, but the scope of protection of the present disclosure is not limited to these. Anyone skilled in the art can easily conceive of variations or substitutions within the technical scope of the present disclosure, all of which should be included in the scope of protection of the present disclosure. Therefore, the Petition 870250091537, dated 07 / 10 / 2025, pp. 363 / 401 165 / 165 The scope of protection of this disclosure will be subject to the scope of protection of the claims. Petition 870250091537, dated 07 / 10 / 2025, pp. 364 / 401

Claims

1 / 25 CLAIMS 1. VIDEO DECODING METHOD characterized by comprising: determining a prediction mode of a current block; in response to the fact that the prediction mode of the current block is a multi-model intrablock copy lighting compensation mode, determining a reference block of the current block and determining N groups of linear model parameters, wherein N is a positive integer greater than 1; and selecting a target group of linear model parameters from the N groups of linear model parameters and performing the linear transformation on the reference block using the target group of linear model parameters to obtain a prediction block of the current block.

2. METHOD, according to claim 1, characterized by the determination of N groups of linear model parameters comprising: determining the N groups of linear model parameters based on a reconstructed area surrounding the reference block and a reconstructed area surrounding the actual block.

3. METHOD, according to claim 2, characterized by the determination of N groups of linear model parameters based on the reconstructed area surrounding the reference block and the reconstructed area surrounding the current block, comprising: determining a first set of samples from the reconstructed area surrounding the reference block and determining a second set of samples from the reconstructed area surrounding the current block; classifying the first set of samples and the second set of samples into N groups of sets of Petition 870250091537, dated 07 / 10 / 2025, p.365 / 401 2 / 25 samples, wherein any of the N groups of sample sets comprises at least one first sample and at least one second sample; and for an i-th group of sample sets among the N groups of sample sets, determine an i-th group of linear model parameters based on at least one first sample and at least one second sample comprised in the i-th group of sample sets, where i is a positive integer less than or equal to N.

4. METHOD, according to claim 3, characterized in that the reconstructed area surrounding the reference block comprises a model area of ​​the reference block, and in that the reconstructed area surrounding the actual block comprises a model area of ​​the actual block; and the determination of the first set of samples from the reconstructed area surrounding the reference block, and the determination of the second set of samples from the reconstructed area surrounding the actual block comprise: determining the first set of samples from the model area of ​​the reference block and determining the second set of samples from the model area of ​​the actual block.

5. METHOD, according to claim 4, characterized by the determination of the first set of samples from the area of ​​the reference block model and the determination of the second set of samples from the area of ​​the actual block model comprising: performing sampling in the area of ​​the reference block model according to a first sampling step size to obtain the first set of samples, wherein the first sampling step size is smaller than a predefined sampling step size; and Petition 870250091537, dated 10 / 07 / 2025, p. 366 / 401 3 / 25 performing sampling in the area of ​​the actual block model according to the size of the first sampling step to obtain the second set of samples.

6. METHOD, according to claim 4, characterized by the determination of the first set of samples from the reference block model area and the determination of the second set of samples from the actual block model area comprising: determining all samples included in the reference block model area as the first set of samples; and determining all samples comprised in the actual block model area as the second set of samples.

7. METHOD, according to claim 4, characterized in that the area of ​​the reference block model comprises an area of ​​the model on the upper side of the reference block and / or an area of ​​the model on the left side of the reference block, and wherein the area of ​​the actual block model comprises an area of ​​the model on the upper side of the actual block and / or an area of ​​the model on the left side of the actual block.

8. METHOD, according to claim 7, characterized in that the model area on the upper side of the reference block comprises an area of ​​the upper model of the reference block and an area of ​​the upper right model of the reference block; and wherein the model area on the upper side of the current block comprises an area of ​​the upper model of the current block and an area of ​​the upper right model of the current block.

9. METHOD, according to claim 7, characterized in that the model area on the left side of the reference block comprises a model area on the left side of the reference block and a model area on the lower left side of the reference block; and wherein the model area on the left side of the actual block comprises a model area on the left side of the actual block and a model area on the lower left side of the actual block.

10. METHOD, according to claim 7, characterized in that the number of sample lines included in the model area on the upper side of the reference block is greater than or equal to a predefined number of lines, and the number of sample lines included in the model area on the upper side of the actual block is greater than or equal to the predefined number of lines.

11. METHOD, according to claim 7, characterized in that the number of sample columns comprised in the model area on the left side of the reference block is greater than or equal to a predefined number of columns, and the number of sample columns comprised in the model area on the left side of the actual block is greater than or equal to the predefined number of columns.

12. METHOD, according to claim 3, characterized by classifying the first set of samples and the second set of samples into N groups of sample sets, comprising: classifying the first samples included in the first set of samples into N classes of first samples; classifying the second samples included in the second set of samples into N classes of second samples; and obtaining the N groups of sample sets based on the N classes of first samples and the N classes of second samples.

13. METHOD, according to claim 12, Petition 870250091537, dated 10 / 07 / 2025, p. 368 / 401 5 / 25 characterized by classifying the first samples comprised in the first set of samples into the N classes of the first samples comprising: determining a first sample mean value of the first set of samples; and classifying the first set of samples into the N classes of the first samples based on the first sample mean value.

14. METHOD, according to claim 13, characterized by classifying the first set of samples into N classes of first samples based on the first sample mean value, comprising: classifying the first samples in the first set of samples that are greater than or equal to the first sample mean value into a first class of first samples; and classifying the first samples in the first set of samples that are less than or equal to the first sample mean value into a second class of first samples.

15. METHOD, according to claim 12, characterized by classifying the second samples comprised in the second set of samples into N classes of second samples comprising: for a j-th class of first samples in the N classes of first samples, determining second samples in the second set of samples that correspond to the first samples in the j-th class as a j-th class of second samples, where j is a positive integer less than or equal to N.

16. METHOD, according to claim 15, characterized by obtaining the N groups of sample sets based on the N classes of the first samples and Petition 870250091537, dated 07 / 10 / 2025, page 369 / 401 6 / 25 on the N classes of the second samples comprising: determining the J-th class of the first samples and the J-th class of the second samples as a j-th group of sample sets.

17. METHOD, according to claim 3, characterized by determining the i-th group of linear model parameters based on at least one first sample and at least one second sample comprised in the i-th group of sample sets, comprising: adding the first samples in the i-th group of sample sets to obtain a first sum value and adding second samples in the i-th group of sample sets to obtain a second sum value; determining a sum of squares of the first samples in the i-th group of sample sets to obtain a third sum value; obtaining a fourth sum value by multiplying the first samples and the second samples in the i-th group of sample sets and then by adding the multiplied results; and determining the i-th group of linear model parameters based on the first sum value, the second sum value, the third sum value, and the fourth sum value.

18. METHOD, according to claim 14, characterized by the selection of the target group of linear model parameters from the N groups of linear model parameters comprising: determining a second sample mean value from the reference block; and selecting the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value.

19. METHOD, according to claim 18, characterized by selecting the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value comprising: selecting the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value and the first sample mean value.

20. METHOD, according to claim 19, characterized by selecting the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value and the first sample mean value, comprising: in response to the second sample mean value being greater than or equal to the first sample mean value, determining a group of linear model parameters corresponding to the first class of first samples among the N groups of linear model parameters as the target group of linear model parameters; and in response to the second sample mean value being less than or equal to the first sample mean value, determining a group of linear model parameters corresponding to the second class of first samples among the N groups of linear model parameters as the target group of linear model parameters.

21. METHOD, according to claim 2, characterized by the determination of the current block prediction mode comprising: decoding a bit stream to obtain the first information, wherein the first information is used to indicate a type of current block prediction; and determining the current block prediction mode based on the first information.

22. METHOD, according to claim 21, characterized by determining the prediction mode of the current block based on first information comprising: in response to the fact that the first information indicates that the prediction type of the current block is intrablock copy prediction, decoding the bitstream to obtain a first flag, wherein the first flag is used to indicate whether the current block uses a merge mode; and determining the prediction mode of the current block based on the first flag.

23. METHOD, according to claim 22, characterized by determining the prediction mode of the current block based on the first flag, understanding: in response to the fact that the first flag indicates that the current block does not use the merge mode, decoding the bitstream to obtain the second information, wherein the second information is used to indicate whether the current block uses an intrablock copy lighting compensation mode; and determining the prediction mode of the current block based on the second information.

24. METHOD, according to claim 23, characterized by determining the prediction mode of the current block based on second information comprising: in response to the fact that the second information indicates that the current block uses the intrablock copy illumination compensation mode, decoding the bitstream to obtain index information, wherein the index information is used to indicate a mode index of the intrablock copy illumination compensation mode used by the current block; and Petition 870250091537, dated 10 / 07 / 2025, p. 372 / 401 9 / 25 determining the prediction mode of the current block based on the index information.

25. METHOD, according to claim 24, characterized by determining the current block prediction mode based on index information comprising: in response to a value of the index information being a first numerical value, determining that the current block prediction mode is a single-model intrablock copy lighting compensation mode; and in response to a value of the index flag being a second numerical value, determining that the current block prediction mode is a multi-model intrablock copy lighting compensation mode.

26. METHOD, according to claim 23, characterized by determining the prediction mode of the current block based on second information comprising: in response to which second information indicates that the current block uses the intrablock copy lighting compensation mode and a current block size is greater than or equal to a predefined second size, determining the intrablock copy lighting compensation mode of multiple models as the prediction mode of the current block.

27. METHOD, according to claim 23, characterized in that the second information is used to indicate a mode index of the intrablock copy lighting compensation mode; and wherein the determination of the current block prediction mode based on the second information comprises: determining the current block prediction mode based on a value of the second information.

28. METHOD, according to claim 27, characterized by determining the current block prediction mode based on the value of the second information Petition 870250091537, dated 10 / 07 / 2025, page 373 / 401 10 / 25 comprising: in response to the value of the second information being a first numerical value, determining that the current block prediction mode is a non-intrablock copy lighting compensation mode; in response to the value of the second information being a second numerical value, determining that the current block prediction mode is a single-model intrablock copy lighting compensation mode; and in response to the value of the second information being a third numerical value, determining that the current block prediction mode is a multi-model intrablock copy lighting compensation mode.

29. METHOD, according to claim 23, characterized in that, before decoding the bitstream to obtain the second information, the method further comprises: determining whether a current block size meets a predefined first size; and wherein the decoding of the bitstream to obtain the second information comprises: in response to whether the current block size meets the predefined first size, decoding the bitstream to obtain the second information.

30. METHOD, according to claim 23, characterized in that, before decoding the bitstream to obtain the second information, the method further comprises: decoding the bitstream to obtain a third piece of information, wherein the third piece of information is used to indicate whether the current block is decoded using a first tool, and wherein the first tool is mutually exclusive with an intrablock copy illumination compensation technology; and wherein the decoding of the bitstream to obtain the second information comprises: in response to the third information indicating that the current block is decoded without using the first tool, decoding the bitstream to obtain the second information.

31. METHOD, according to claim 23, characterized by determining the prediction mode of the current block based on the first flag indicating: in response to the first flag indicating that the current block uses merge mode, determine a reference block prediction mode as the prediction mode of the current block.

32. METHOD, according to claim 23, characterized by determining the prediction mode of the current block based on the first flag indicating: in response to the first flag indicating that the current block uses the merge mode, determine a single model intrablock copy lighting compensation mode as the prediction mode of the current block.

33. METHOD, according to claim 23, characterized by determining the prediction mode of the current block based on the first flag understanding: in response to the first flag indicating that the current block uses merge mode, decoding the bitstream to obtain the fourth piece of information, wherein the fourth piece of information is used to indicate the prediction mode of the current block; and obtaining the prediction mode of the current block based on the fourth piece of information.

34. METHOD, according to claim 23, characterized in that, before decoding the bit stream to obtain the first flag, the method further comprises: decoding the bit stream to obtain a third flag, wherein the third flag is used to indicate whether a current sequence allows local lighting compensation; and wherein the decoding of the bit stream to obtain the first flag comprises: in response to the third flag indicating that the current sequence allows local lighting compensation, decoding the bit stream to obtain the first flag.

35. VIDEO CODING METHOD characterized by comprising: determining a prediction mode of a current block; in response to the fact that the prediction mode of the current block is a multi-model intrablock copy lighting compensation mode, determining a reference block of the current block and determining N groups of linear model parameters, wherein N is a positive integer greater than 1; and selecting a target group of linear model parameters from the N groups of linear model parameters and performing the linear transformation on the reference block using the target group of linear model parameters to obtain a prediction block of the current block.

36. METHOD, according to claim 35, characterized by the determination of N groups of linear model parameters comprising: determining the N groups of linear model parameters based on a reconstructed area surrounding the reference block and a reconstructed area surrounding the actual block. Petition 870250091537, dated 10 / 07 / 2025, pp. 376 / 401 13 / 25 37. METHOD, according to claim 36, characterized by the determination of N groups of linear model parameters based on the reconstructed area surrounding the reference block and the reconstructed area surrounding the current block, comprising: determining a first set of samples from the reconstructed area surrounding the reference block and determining a second set of samples from the reconstructed area surrounding the current block; classifying the first set of samples and the second set of samples into N groups of sample sets, wherein any of the N groups of sample sets comprises at least one first sample and at least one second sample;For an i-th group of sample sets among the N groups of sample sets, determine an i-th group of linear model parameters based on at least one first sample and at least one second sample comprised within the i-th group of sample sets, where i is a positive integer less than or equal to N.

38. METHOD, according to claim 37, characterized in that the reconstructed area surrounding the reference block comprises a model area of ​​the reference block, and in that the reconstructed area surrounding the actual block comprises a model area of ​​the actual block; and the determination of the first set of samples of the reconstructed area surrounding the reference block, and the determination of the second set of samples of the reconstructed area surrounding the actual block comprise: determining the first set of samples of the model area of ​​the reference block and determining the second set of samples of the model area of ​​the current block. Petition 870250091537, dated 10 / 07 / 2025, page 377 / 401 14 / 25.

39. METHOD, according to claim 38, characterized by the determination of the first set of samples from the model area of ​​the reference block and the determination of the second set of samples from the model area of ​​the actual block comprising: performing sampling in the model area of ​​the reference block according to a first sampling step size to obtain the first set of samples, wherein the first sampling step size is smaller than a predefined sampling step size; and performing sampling in the model area of ​​the actual block according to the size of the first sampling step to obtain the second set of samples.

40. METHOD, according to claim 38, characterized by the determination of the first set of samples from the model area of ​​the reference block and the determination of the second set of samples from the model area of ​​the actual block comprising: determining all samples included in the model area of ​​the reference block as the first set of samples; and determining all samples comprised in the model area of ​​the actual block as the second set of samples.

41. METHOD, according to claim 38, characterized in that the area of ​​the reference block model comprises an area of ​​the model on the upper side of the reference block and / or an area of ​​the model on the left side of the reference block, and wherein the area of ​​the actual block model comprises an area of ​​the model on the upper side of the actual block and / or an area of ​​the model on the left side of the actual block. Petition 870250091537, dated 10 / 07 / 2025, pp. 378 / 401 15 / 25 42. METHOD, according to claim 41, characterized in that the model area on the upper side of the reference block comprises an area of ​​the upper model of the reference block and an area of ​​the upper right model of the reference block; and wherein the model area on the upper side of the current block comprises an area of ​​the upper model of the current block and an area of ​​the upper right model of the current block.

43. METHOD, according to claim 41, characterized in that the model area on the left side of the reference block comprises a model area on the left of the reference block and a model area on the lower left of the reference block; and wherein the model area on the left side of the actual block comprises a model area on the left of the actual block and a model area on the lower left of the actual block.

44. METHOD, according to claim 41, characterized in that the number of sample lines included in the model area on the upper side of the reference block is greater than or equal to a predefined number of lines, and the number of sample lines included in the model area on the upper side of the actual block is greater than or equal to the predefined number of lines.

45. METHOD, according to claim 41, characterized in that the number of sample columns comprised in the model area on the left side of the reference block is greater than or equal to a predefined number of columns, and the number of sample columns comprised in the model area on the left side of the actual block is greater than or equal to the predefined number of columns.

46. ​​METHOD, according to claim 37, characterized by classifying the first set of samples and the second set of samples into N groups of sample sets comprising: classifying the first samples included in the first set of samples into N classes of first samples; classifying the second samples included in the second set of samples into N classes of second samples; and obtaining the N groups of sample sets based on the N classes of first samples and the N classes of second samples.

47. METHOD, according to claim 46, characterized by classifying the first samples comprised in the first set of samples into the N classes of the first samples comprising: determining a first sample mean value of the first set of samples; and classifying the first set of samples into the N classes of the first samples based on the first sample mean value.

48. METHOD, according to claim 47, characterized by classifying the first set of samples into N classes of first samples based on the first sample mean value, comprising: classifying the first samples in the first set of samples that are greater than or equal to the first sample mean value into a first class of first samples; and classifying the first samples in the first set of samples that are less than or equal to the first sample mean value into a second class of first samples.

49. METHOD, according to claim 46, characterized by classifying the second samples Petition 870250091537, dated 07 / 10 / 2025, page 380 / 401 17 / 25 comprised in the second set of samples into N classes of second samples comprising: for a j-th class of first samples in the N classes of first samples, determining second samples in the second set of samples that correspond to the first samples in the j-th class as a j-th class of second samples, where j is a positive integer less than or equal to N.

50. METHOD, according to claim 49, characterized by obtaining N groups of sample sets based on the N classes of the first samples and the N classes of the second samples comprising: determining the J-th class of the first samples and the J-th class of the second samples as a j-th group of sample sets.

51. METHOD, according to claim 37, characterized by the determination of the i-th group of linear model parameters based on at least one first sample and at least one second sample comprised in the i-th group of sample sets, comprising: adding the first samples in the i-th group of sample sets to obtain a first sum value and adding second samples in the i-th group of sample sets to obtain a second sum value; determining a sum of squares of the first samples in the i-th group of sample sets to obtain a third sum value; obtaining a fourth sum value by multiplying the first samples and the second samples in the i-th group of sample sets and then by adding the multiplied results; and determining the i-th group of parameters of Petition 870250091537, dated 07 / 10 / 2025, p.381 / 401 18 / 25 linear model based on the first sum value, the second sum value, the third sum value, and the fourth sum value.

52. METHOD, according to claim 48, characterized by selecting the target group of linear model parameters from the N groups of linear model parameters comprising: determining a second sample mean value from the reference block; and selecting the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value.

53. METHOD, according to claim 52, characterized by selecting the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value comprising: selecting the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean value and the first sample mean value.

54. METHOD, according to claim 53, characterized by selecting the target group of linear model parameters from the N groups of linear model parameters based on the second sample mean and the first sample mean, comprising: in response to the second sample mean being greater than or equal to the first sample mean, determining a group of linear model parameters corresponding to the first class of first samples among the N groups of linear model parameters as the target group of linear model parameters; and in response to the second sample mean being less than or equal to the first sample mean, determining a group of linear model parameters corresponding to the second class of first samples among the N groups of linear model parameters as the target group of linear model parameters.

55. METHOD, according to claim 37, characterized by determining the prediction mode of the current block comprising: determining a list of candidate prediction modes corresponding to the current block, wherein the candidate prediction modes comprise the multi-model intrablock copy lighting compensation mode; determining a cost of each candidate prediction mode in the list of candidate prediction modes to predict the current block; and determining the prediction mode of the current block based on the cost.

56. METHOD, according to claim 55, characterized in that, before determining the list of candidate prediction modes corresponding to the current block, the method further comprises: determining whether a current block size meets a first predefined size; and wherein the determination of the list of candidate prediction modes corresponding to the current block comprises: in response to whether the current block size meets the first predefined size, adding the multi-model intrablock copy lighting compensation mode to the list of candidate prediction modes corresponding to the current block.

57. METHOD, according to claim 55, characterized in that, before determining the list of candidate prediction modes corresponding to the current block, the method further comprises: determining whether the current block is encoded using a first tool, wherein the first tool is mutually exclusive with an intrablock copy lighting compensation technology; and wherein the determination of the list of candidate prediction modes corresponding to the current block comprises: in response to the fact that the current block is encoded without using the first tool, adding the multi-model intrablock copy lighting compensation mode to the list of candidate prediction modes corresponding to the current block.

58. METHOD, according to claim 55, characterized by further comprising: determining a prediction type of the current block and recording the initial information in a bitstream, wherein the initial information is used to indicate the prediction type of the current block.

59. METHOD, according to claim 58, characterized by further comprising: in response to the fact that the current block prediction type is intrablock copy prediction, writing a first flag in the bitstream, wherein the first flag is used to indicate whether the current block uses a merge mode.

60. METHOD, according to claim 59, characterized by further comprising: in response to the current block not using the merge mode, recording second information in the bitstream, wherein the second information is used to indicate whether the current block uses an intrablock copy lighting compensation mode. Petition 870250091537, dated 10 / 07 / 2025, pp. 384 / 401 21 / 25 61. METHOD, according to claim 60, characterized by further comprising: in response to the current block using the intrablock copy illumination compensation mode, writing index information in the bitstream, wherein the index information is used to indicate a mode index of the intrablock copy illumination compensation mode used by the current block.

62. METHOD, according to claim 61, characterized by further comprising: in response to the fact that the current block prediction mode is a single-model intrablock copy lighting compensation mode, determining that a value of the index information is a first numerical value; and in response to the fact that the current block prediction mode is a multi-model intrablock copy lighting compensation mode, determining that the value of the index flag is a second numerical value.

63. METHOD, according to claim 60, characterized by determining the current block prediction mode comprising: in response to the fact that the second information indicates that the current block uses the intrablock copy lighting compensation mode and a current block size is greater than or equal to a second predefined size, determining the multimodel intrablock copy lighting compensation mode as the current block prediction mode.

64. METHOD, according to claim 60, characterized in that the second information is used to indicate a mode index of the intrablock copy illumination compensation mode; and wherein the method further comprises: in response to the fact that the current block prediction mode is a non-intrablock copy illumination compensation mode, determining that a value of the second information is a first numerical value; in response to the fact that the current block prediction mode is a single-model intrablock copy illumination compensation mode, determining that the value of the second information is a second numerical value; and in response to the fact that the current block prediction mode is a multi-model intrablock copy illumination compensation mode, determining that the value of the second information is a third numerical value.

65. METHOD, according to claim 59, characterized by determining the prediction mode of the current block comprising: in response to the fact that the current block uses the merge mode, determining a prediction mode of the reference block as the prediction mode of the current block.

66. METHOD, according to claim 59, characterized by determining the prediction mode of the current block comprising: in response to the fact that the current block uses the merge mode, determining a single model intrablock copy lighting compensation mode as the prediction mode of the current block.

67. METHOD, according to claim 55, characterized in that, before determining the list of candidate prediction modes corresponding to the current block, the method further comprises: determining a third flag, wherein the third flag is used to indicate whether a current sequence allows local lighting compensation; and wherein the determination of the list of candidate prediction modes corresponding to the current block Petition 870250091537, dated 10 / 07 / 2025, pp. 386 / 401 23 / 25 comprises: in response to the third flag being used to indicate that the current sequence allows local lighting compensation, adding the multi-model intrablock copy lighting compensation mode to the list of candidate prediction modes corresponding to the current block.

68. METHOD, according to claim 67, characterized by further comprising: recording the third flag in a bitstream, wherein the third flag is used to indicate whether the current sequence allows for local illumination compensation.

69. VIDEO DECODING APPARATUS characterized by comprising: a mode determination unit configured to determine a prediction mode of a current block; a parameter determination unit configured to: in a case where the prediction mode of the current block is a multi-model intrablock copy lighting compensation mode, determine a reference block of the current block and determine N groups of linear model parameters, wherein N is a positive integer greater than 1; and a transformation unit configured to: select a target group of linear model parameters from the N groups of linear model parameters and perform the linear transformation on the reference block using the target group of linear model parameters to obtain a prediction block of the current block.

70. VIDEO CODING APPARATUS characterized by comprising: a mode prediction unit configured to determine a prediction mode of a current block; a parameter determination unit configured to: in a case where the prediction mode of the current block is a multi-model intrablock copy lighting compensation mode, determine a reference block of the current block and determine N groups of linear model parameters, wherein N is a positive integer greater than 1; and a transformation unit configured to: select a target group of linear model parameters from the N groups of linear model parameters and perform the linear transformation on the reference block using the target group of linear model parameters to obtain a prediction block of the current block.

71. ELECTRONIC DEVICE characterized by comprising a processor and a memory, wherein the memory is configured to store a computer program; and the processor is configured to call and execute the computer program stored in memory to implement the method, as defined in any one of claims 1 to 34 or 35 to 68.

72. A VIDEO ENCODING AND DECODING SYSTEM characterized by comprising: a video encoder and a video decoder, wherein the video decoder is configured to implement the method as defined in any one of claims 1 to 34; and the video encoder is configured to implement the method as defined in any one of claims 35 to 68.

73. COMPUTER-READABLE STORAGE MEDIUM characterized by being configured to store a computer program, wherein the computer program enables a computer to execute the method as defined in any one of claims 1 to 34 or 35 to 68.