Processing method, processing device and storage medium
By adopting a local lighting compensation model in the high-efficiency video encoding standard, the second predicted value of the pixel is determined based on the first predicted value and parameters, the pixel prediction value error problem is solved, and the efficiency and accuracy of video encoding and decoding are improved.
Patent Information
- Application Number
- PCT/CN2024/071671
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-17
AI Technical Summary
In the existing high-efficiency video encoding standard protocol, there is an error in the prediction value of pixels, which limits the efficiency of video encoding and decoding.
By determining or obtaining the second predicted value of the first pixel based on the first predicted value and the first parameter, the local light compensation model is used to improve the accuracy of the pixel prediction value, including nonlinear local light compensation and linear local light compensation model.
Improves the efficiency of video encoding and decoding and enhances the accuracy of pixel prediction values.
Smart Images

Figure CN2024071671_17072025_PF_FP_ABST
Abstract
Description
Processing method, processing device and storage medium Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a processing method, a processing device, and a storage medium. Background Art
[0002] The existing High-Efficiency Video Coding (H.266 / VVC) standard protocol proposes a video frame encoding technology to improve encoding performance without significantly increasing computational complexity. Specifically, when encoding and decoding video frames, the protocol divides each frame into different blocks and performs prediction, transformation, and quantization processing before encoding and decoding. During the process of conceiving and implementing this application, the inventors discovered at least the following problems: during encoding and decoding, the predicted values of pixels may contain errors, thereby limiting the efficiency of video encoding and / or decoding.
[0003] The preceding description is intended to provide general background information and does not necessarily constitute prior art.
[0004] Summary of the Invention
[0005] In response to the above technical problems, the present application provides a processing method, a processing device and a storage medium, which can improve the accuracy of pixel prediction values, thereby improving the efficiency of video encoding and / or decoding.
[0006] The present application provides a processing method that can be applied to a processing device, comprising the steps of:
[0007] S10. Determine or obtain a second prediction value of the first pixel according to the first prediction value and the first parameter.
[0008] Optionally, a method for determining or obtaining the first prediction value includes at least one of the following:
[0009] Determine or obtain a first prediction value of at least one first pixel in at least one current block based on a default prediction mode, an inter-frame prediction mode, an intra-frame prediction mode, and at least one item in a candidate list; determine or obtain a first prediction value of at least one first pixel in the current block based on a pixel value, position, and / or motion information of at least one second pixel; determine or obtain a first prediction value of at least one first pixel in the current block based on a pixel value, position, motion information, and / or prediction mode of at least one first image block; determine or obtain a first prediction block and / or a second prediction block of the current block, and determine or obtain a first prediction value of at least one first pixel in the current block based on a prediction value corresponding to the first prediction block and / or a prediction value corresponding to the second prediction block; determine or obtain a first prediction value of a first pixel based on a syntax element obtained in a code stream for use in decoding processing.
[0010] Optionally, the processing method further includes at least one of the following:
[0011] The first pixel is a second color component; the second pixel is a pixel in at least one image block of a first default block, a first neighbor block, a first non-neighbor block, a first co-located block, and a first reference block corresponding to the current block; the second pixel is a pixel in a second image block with a different color component from the current block; the first image block is at least one image block of a second default block, a second neighbor block, a second non-neighbor block, a second co-located block, and a second reference block corresponding to the current block; the first image block is a third image block with a different color component from the current block.
[0012] Optionally, the first parameter is determined or obtained by at least one of the following:
[0013] The pixel value of at least one third pixel; at least one nonlinear local illumination compensation model; a reference pixel determined by at least one of a third default block, a third neighbor block, a third non-neighbor block, a third co-located block, and a third reference block corresponding to the current block; a current template corresponding to the current block where the first pixel is located, and / or a reference template matching the current template.
[0014] Optionally, step S10 includes at least one of the following:
[0015] Determine or obtain the second prediction value of the first pixel based on the first prediction value, the prediction value corresponding to the second prediction block and the first parameter; determine or obtain the second prediction value of the first pixel based on the third prediction value and the sixth prediction value; determine or obtain the second prediction value of the first pixel based on the fifth prediction value and the first parameter; determine or obtain the second prediction value of the first pixel based on at least one of the first prediction value, the offset value, the nonlinear item, the position information, the gradient information and the first parameter.
[0016] Optionally, the processing method further includes at least one of the following:
[0017] The first prediction value includes the prediction value corresponding to the first prediction block; the third prediction value is determined or obtained based on the first prediction value and the first parameter; the sixth prediction value is determined or obtained based on the prediction value corresponding to the second prediction block and the second parameter; the fifth prediction value is determined or obtained based on the first prediction value and the prediction value corresponding to the second prediction block; the offset value is determined by the pixel in the current template and / or the reference template corresponding to at least one first pixel; the offset value is determined by at least one pixel in at least one item of the default block, neighbor block, non-neighbor block, co-located block, time domain block, and reference block corresponding to the current block; the nonlinear term is determined or obtained based on the first prediction value; the nonlinear term is determined or obtained based on the prediction value of the neighbor pixel and / or non-neighbor pixel corresponding to the first pixel.
[0018] Optionally, the processing method further comprises the steps of:
[0019] S20. Encode or decode according to the second prediction value.
[0020] Optionally, step S20 includes the following steps:
[0021] S21. Determine or obtain a prediction result of the first pixel according to the second prediction value and the seventh prediction value;
[0022] S22. Encode according to the prediction result.
[0023] Optionally, the processing method further includes at least one of the following:
[0024] The seventh prediction value is determined or obtained according to the linear local illumination compensation corresponding to the first pixel;
[0025] The first pixel is a pixel in the current block or a pixel in a neighboring block corresponding to the current block;
[0026] Step S21 includes at least one of the following:
[0027] If the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the first range, the prediction result of the first pixel is determined or obtained according to the first method; if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the second range, the prediction result of the first pixel is determined or obtained according to the second method.
[0028] Optionally, step S20 includes at least one of the following:
[0029] Determine the residual corresponding to the first pixel according to the syntax element obtained in the code stream, and decode according to the residual and the second prediction value; determine or obtain the prediction result of the first pixel according to the second prediction value and / or the seventh prediction value, and decode the current block according to the prediction result.
[0030] Optionally, the processing method includes at least one of the following:
[0031] The first pixel is a pixel in a neighboring block corresponding to the current block; the seventh prediction value is determined or obtained by linear local illumination compensation corresponding to the first pixel;
[0032] The prediction result of the first pixel is determined or obtained by at least one of the following:
[0033] If the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the first range, the prediction result of the first pixel is determined or obtained according to the first method; if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the second range, the prediction result of the first pixel is determined or obtained according to the second method.
[0034] The present application also provides a processing device, comprising:
[0035] The processing module is used to determine or obtain a second prediction value of the first pixel according to the first prediction value and the first parameter.
[0036] The present application also provides a processing device, comprising: a memory and a processor, wherein the memory stores a processing program, and when the processing program is executed by the processor, the steps of any of the above processing methods are implemented. The processing device in the present application can be a smart terminal or a server.
[0037] The present application also provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the processing methods described above are implemented.
[0038] As described above, the processing method of the present application can be applied to a processing device, including the steps of: determining or obtaining a second prediction value of a first pixel based on a first prediction value and a first parameter. Through the technical solution of the present application, it is possible to locally compensate the first prediction value of the first pixel through the first parameter, thereby making the obtained second prediction value of the first pixel more accurate and effective, and because the local compensation is performed based on the first parameter, and the first parameter better reflects the characteristics between the current block and the reference block, thereby locally compensating the first prediction value through the first parameter, the effectiveness of the second prediction value obtained is improved, thereby improving the accuracy of pixel prediction, thereby improving the efficiency of video encoding and / or decoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for describing the embodiments. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without inventive work.
[0040] FIG1 is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present application;
[0041] FIG2 is a diagram of a communication network system architecture provided by an embodiment of the present application;
[0042] FIG3 is a schematic flow chart of a processing method according to the first embodiment;
[0043] FIG4 is a schematic diagram of coding of a processing method according to the first embodiment;
[0044] FIG5 is a schematic diagram of decoding of a processing method according to the first embodiment;
[0045] 6 is a schematic diagram of an upper template and a left template having adjacent areas in a processing method according to a second embodiment;
[0046] FIG7 is a schematic diagram of pixel values in adjacent areas in a processing method according to a second embodiment;
[0047] FIG8 is a schematic diagram of pixel values in another adjacent region in the processing method according to the second embodiment;
[0048] 9 is a schematic diagram of an upper template and a left template having adjacent areas in a processing method according to a second embodiment;
[0049] FIG10 is a schematic diagram of a local illumination compensation module in a processing method according to a second embodiment;
[0050] 11 is a schematic diagram of an upper template and a left template of a block to be predicted in a processing method according to a second embodiment;
[0051] FIG12 is a schematic diagram showing the positional relationship between pixel Y11 and pixel Y15 in the processing method according to the second embodiment;
[0052] 13 is a schematic diagram of an upper template and a left template of a block to be predicted under bidirectional prediction in a processing method according to a third embodiment;
[0053] FIG14 is a schematic diagram showing the positional relationship between pixel Y1 and pixel Y5 in a processing method according to a third embodiment;
[0054] 15 is a schematic diagram of a brightness prediction pixel value determined by the first prediction mode in a processing method according to the third embodiment;
[0055] FIG16 is a schematic diagram of a local illumination compensation module in a processing method according to a third embodiment;
[0056] FIG17 is a schematic diagram of another local illumination compensation module in the processing method according to the third embodiment;
[0057] FIG18 is a module diagram illustrating a processing device according to an embodiment of the present application.
[0058] The purpose of this application, its features, and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and the accompanying text are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of this application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0059] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0060] It should be noted that, in this document, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. Optionally, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined based on their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0061] It should be understood that although the terms "first," "second," "third," etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are used solely to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the term "if," as used herein, may be interpreted as "upon," "when," or "in response to a determination." Furthermore, as used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It should be further understood that the terms "comprising" and "including" indicate the presence of the recited features, steps, operations, elements, components, items, types, and / or groups, but do not preclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, types, and / or groups. The terms "or," "and / or," "including at least one of the following," etc., as used herein, may be interpreted as inclusive, meaning any one or any combination. For example, “comprising at least one of the following: A, B, C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”; and for another example, “A, B or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”. An exception to this definition will occur only when a combination of elements, functions, steps or operations are inherently mutually exclusive in some manner.
[0062] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless clearly stated herein, the execution of these steps is not strictly limited in order, and they can be performed in other orders. Moreover, some of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or sub-steps of other steps or parts of stages.
[0063] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0064] It should be noted that in this article, step codes such as S10 and S20 are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the order. When implementing the step, those skilled in the art may execute S20 first and then S10, etc., but these should all be within the scope of protection of this application.
[0065] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0066] In the subsequent description, the use of suffixes such as "module", "component" or "unit" to represent elements is only for the purpose of facilitating the description of the present application and has no specific meaning. Therefore, "module", "component" or "unit" can be used interchangeably.
[0067] The processing device in this application can be a smart terminal or a server. The smart terminal can be implemented in various forms. For example, the smart terminal described in this application can include smart terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0068] The subsequent description will be made by taking a mobile terminal as an example. It will be understood by those skilled in the art that, in addition to components specifically used for mobile purposes, the configuration according to the embodiments of the present application can also be applied to fixed-type terminals.
[0069] Please refer to Figure 1, which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present application. The mobile terminal 100 may include components such as an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will understand that the mobile terminal structure shown in Figure 1 does not limit the mobile terminal. The mobile terminal may include more or fewer components than shown, or may combine certain components, or arrange the components differently.
[0070] The following is a detailed introduction to the various components of the mobile terminal in conjunction with Figure 1:
[0071] The RF unit 101 can be used to send and receive information or receive signals during calls. Specifically, it receives downlink information from the base station and transmits it to the processor 110 for processing. It also transmits uplink data to the base station. Typically, the RF unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and other components. Optionally, the RF unit 101 can also communicate with the network and other devices via wireless communication. The above-mentioned wireless communications can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution), 5G and 6G, etc.
[0072] WiFi is a short-range wireless transmission technology. A mobile terminal, through WiFi module 102, enables users to send and receive emails, browse web pages, and access streaming media, providing wireless broadband Internet access. Although FIG1 illustrates WiFi module 102, it is understood that it is not a required component of the mobile terminal and can be omitted as needed without altering the essence of the invention.
[0073] The audio output unit 103 can convert audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Furthermore, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, or the like.
[0074] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos captured by an image capture device (e.g., a camera) in video capture mode or image capture mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the GPU 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the RF unit 101 or the WiFi module 102. The microphone 1042 may receive sound (audio data) in operating modes such as phone call mode, recording mode, and voice recognition mode, and may process such sound into audio data. In phone call mode, the processed audio (voice) data may be converted into a format that can be transmitted to a mobile communication base station via the RF unit 101. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.
[0075] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Optionally, the light sensor includes an ambient light sensor and a proximity sensor. Optionally, the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described here.
[0076] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0077] The user input unit 107 can be used to receive input digital or character information and generate key signal input related to user settings and function control of the mobile terminal. Optionally, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using a finger, stylus, or any other suitable object or accessory on or near the touch panel 1071) and drive the corresponding connection device according to a pre-set program. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Optionally, the touch detection device detects the user's touch direction and detects the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 110. It can also receive commands sent by the processor 110 and execute them. Optionally, the touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may further include other input devices 1072. Optionally, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power keys, etc.), a trackball, a mouse, a joystick, etc., and the specifics are not limited here.
[0078] Optionally, the touch panel 1071 may overlay the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. The processor 110 then provides a corresponding visual output on the display panel 1061 based on the type of touch event. Although in FIG1 , the touch panel 1071 and the display panel 1061 are shown as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited to this specific embodiment.
[0079] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from the external device and transmit the received input to one or more elements within the mobile terminal 100, or may be used to transmit data between the mobile terminal 100 and the external device.
[0080] Memory 109 can be used to store software programs and various data. Memory 109 may primarily include a program storage area and a data storage area. Optionally, the program storage area may store an operating system and at least one application required for a function (such as audio playback or image playback); the data storage area may store data generated based on the use of the mobile phone (such as audio data, a phone book, etc.). Optionally, memory 109 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Processor 110 is the control center of the mobile terminal, connecting various components of the mobile terminal using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 109 and accessing data stored in memory 109, it executes various functions of the mobile terminal and processes data, thereby providing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, processor 110 may integrate an application processor and a modem processor. Optionally, the application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 110. The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0081] Although not shown in FIG. 1 , the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.
[0082] To facilitate understanding of the embodiments of the present application, the communication network system on which the mobile terminal of the present application is based is described below.
[0083] Please refer to Figure 2, which is a communication network system architecture diagram provided in an embodiment of the present application. The communication network system is an LTE system of universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203 and an operator's IP service 204, which are connected in sequence.
[0084] Optionally, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0085] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022 . Optionally, eNodeB 2021 may be connected to other eNodeBs 2022 via a backhaul (eg, an X2 interface). eNodeB 2021 is connected to EPC 203 , and eNodeB 2021 may provide access from UE 201 to EPC 203 .
[0086] EPC 203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving Gate Way) 2034, a PGW (PDN Gate Way) 2035, and a PCRF (Policy and Charging Rules Function) 2036. Optionally, MME 2031 is a control node that processes signaling between UE 201 and EPC 203, providing bearer and connection management. HSS 2032 provides registers for managing functions such as the Home Location Register (not shown) and stores user-specific information such as service features and data rates. All user data can be sent through SGW2034, PGW2035 can provide IP address allocation and other functions for UE 201, PCRF2036 is the policy and charging control policy decision point for service data flow and IP bearer resources, and it selects and provides available policy and charging control decisions for the policy and charging execution function unit (not shown in the figure).
[0087] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services.
[0088] Although the above introduction takes the LTE system as an example, those skilled in the art should know that this application is not only applicable to the LTE system, but can also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, 5G and future new network systems (such as 6G), etc., which are not limited here.
[0089] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the present application are proposed.
[0090] First embodiment
[0091] Referring to FIG. 3, FIG. 3 is a schematic flowchart of a processing method shown according to the first embodiment. The processing method of the embodiments of the present application can be applied to a processing device, including the steps:
[0092] S10: Determine or obtain a second prediction value of the first pixel according to the first prediction value and the first parameter.
[0093] In this embodiment, the processing device can be a smart terminal, such as a mobile phone, a computer, etc., or can be a server, such as a local server or a cloud server. In this embodiment and the present application, the processing device is mainly exemplified by a smart terminal. Optionally, the technical solution of this embodiment can be applied to fields such as image coding and decoding, video coding and decoding, hardware video coding and decoding, dedicated circuit video coding and decoding, real-time video coding and decoding, etc.
[0094] Optionally, the first parameter can be a LIC parameter, a model parameter of a non-linear local illumination compensation model, etc., such as a filter coefficient, a weight coefficient. The first prediction value can be a prediction value obtained when predicting a pixel in at least one block.
[0095] Optionally, at the encoding end, the input image is divided into at least one image block. Each image block is subtracted from a prediction block predicted by a prediction mode to obtain a residual block. Then, the residual block is subjected to transformation and quantization processing, and then encoded by an entropy encoder. Finally, an encoded bitstream is formed. In addition, the transformed and quantized residual block is added to the corresponding prediction block obtained by the prediction mode to obtain a reconstructed block. After obtaining the reconstructed block, loop filtering processing is performed on the reconstructed block to reduce distortion.
[0096] Optionally, the prediction mode includes an intra prediction mode and an inter prediction mode. Optionally, intra prediction can include intra chrominance prediction of a cross-component linear model. The basic principle of intra chrominance prediction of a cross-component linear model is to predict the chrominance samples of the corresponding chrominance block in the coding unit according to the luminance samples in the reconstructed luminance block in the coding unit. Optionally, the inter prediction module can use local illumination compensation to compensate the first prediction value of the pixel to be predicted.
[0097] Optionally, if there is an illumination change between the current block and the reference block and it is a linear change, a linear function a*p[x]+b can be fitted through the adjacent reconstructed pixels of the current block and the reference block (such as the reference template and the current template) to compensate for the illumination change. Optionally, p[x] is the reference block, a is the scaling factor, and b is the offset. a and b can be derived using the least squares method:
[0098] Optionally, i can be an integer and 0 < i < M, j can be an integer and 0 < j < N, currij It can be the pixel value of the selected pixel in the current template, ref ij M can be the pixel value of a pixel selected from the reference template. Optionally, M can be the width of the current block, and N can be the height of the current block. M and N can also be other integers, for example, M and N can be any integer greater than 2 that satisfies M + N < (width of current block + height of current block).
[0099] Alternatively, a first prediction value of a first pixel to be predicted in the block to be predicted is determined, and a second prediction value for the first pixel to be predicted is determined or obtained based on the first prediction value and the first parameter. Alternatively, a linear model parameter for illumination compensation prediction may be determined and used as the first parameter, thereby establishing a linear model between the current block and the reference block to reflect a linear feature between the current block and the reference block.
[0100] Optionally, the model parameters of the linear model can be determined using a template (such as a current template and / or a reference template). A reference template matching the current template is searched for in the reference image, and the model parameters are determined using the current template and the reference template. Optionally, the current template can be located near the block to be predicted, and the current template and the block to be predicted have highly similar features (such as texture features), so that the model parameters determined by the template can better reflect the features of the block to be predicted. Optionally, the nonlinear model parameters in the illumination compensation prediction can be determined and used as the first parameter, and then the nonlinear characteristics between the current block and the reference block are reflected by establishing a nonlinear model between the current block and the reference block.
[0101] Optionally, the model parameters of the nonlinear model can be determined using a template (e.g., the current template and / or a reference template). A reference template matching the current template is searched for in the reference image, and the model parameters are determined using the current and reference templates. Optionally, the current template can be located near the block to be predicted, and the current template and the block to be predicted can have highly similar features (e.g., texture features). Determining the model parameters using the template can better reflect the features of the block to be predicted.
[0102] Optionally, when performing illumination compensation on the at least one first predicted value, a de-biasing process may be used to reduce the computational complexity of the illumination compensation model. Optionally, the first parameter may further include linear model parameters for illumination compensation prediction. Optionally, the linear model parameters and the nonlinear model parameters may be combined to jointly perform illumination compensation on the at least one first predicted value.
[0103] Optionally, a rate-distortion cost cost1 for linear prediction compensation based on the linear model parameters is calculated, and a rate-distortion cost cost2 for nonlinear prediction compensation based on the nonlinear model parameters is calculated. Optionally, if the ratio between cost1 and cost2 is in the numerical range of 11 (for example, greater than a threshold value 2 and less than a threshold value 1), a weighted method of the two can be used to determine the final prediction result, such as performing linear compensation on the first prediction value based on the linear model parameters and performing nonlinear compensation on the first prediction value based on the nonlinear model parameters, with each having a weight of 0.5. Optionally, if the ratio between cost1 and cost2 is in the numerical range of 12 (for example, greater than a threshold value 1), nonlinear compensation can be performed on the first prediction value based on the linear model parameters to obtain the final prediction result. Optionally, if the ratio between cost1 and cost2 is in the numerical range of 13 (for example, less than a threshold value 2), linear compensation can be performed on the first prediction value based on the nonlinear model parameters to obtain the final prediction result. Optionally, if the ratio between cost1 and cost2 is within the numerical range of 21 (for example, less than a threshold value 1), the final prediction result can be determined by weighting the two, such as performing linear compensation on the first prediction value according to the linear model parameters and performing nonlinear compensation on the first prediction value according to the nonlinear model parameters, and each having a weight of 0.5. Optionally, if the ratio between cost1 and cost2 is within the numerical range of 22 (for example, greater than the threshold value 1), the first prediction value can be nonlinearly compensated according to the linear model parameters to obtain the final prediction result. Optionally, if the ratio between cost1 and cost2 is within the numerical range of 31 (for example, greater than a threshold value 2), the final prediction result can be determined by weighting the two, such as performing linear compensation on the first prediction value according to the linear model parameters and performing nonlinear compensation on the first prediction value according to the nonlinear model parameters, and each having a weight of 0.5. Optionally, if the ratio between cost1 and cost2 is within the numerical range of 32 (for example, less than the threshold value 1), the first prediction value can be linearly compensated according to the nonlinear model parameters to obtain the final prediction result. Alternatively, if the ratio between cost1 and cost2 is within a numerical range of 41 (e.g., greater than a threshold value of 3), nonlinear compensation may be performed on the first predicted value according to the linear model parameters to obtain the final predicted result. Alternatively, if the ratio between cost1 and cost2 is within a numerical range of 42 (e.g., less than a threshold value of 3), linear compensation may be performed on the first predicted value according to the nonlinear model parameters to obtain the final predicted result.
[0104] Optionally, the threshold ranges may be partially the same or different. Some of the thresholds may have the same value or different values.
[0105] Optionally, the technical solution of this embodiment can be applied to the encoding end, referring to FIG4 , including various module units, such as transformation, quantization, entropy coding, inverse quantization, inverse transformation, intra-frame prediction, inter-frame prediction, coded image buffer, and loop filtering module. At the encoding end, after the encoder receives a video image (i.e., the input video data in FIG4 ) from a video source, the input image is divided into at least one image block (the image block includes a luminance block and a chrominance block). Utilizing the temporal and / or spatial correlation between the video images, each of the at least one image block is subjected to prediction processing.
[0106] Optionally, the prediction process includes intra-frame prediction processing and / or inter-frame prediction processing, and / or the intra-frame prediction process and / or the inter-frame prediction process each include at least one prediction mode. For these prediction modes, the encoder uses, for example, rate-distortion optimization to determine the prediction mode ultimately adopted for each of at least one image block. For example, the rate-distortion cost corresponding to each prediction mode or the rate-distortion cost of a combination of several prediction modes is calculated to determine the minimum rate-distortion cost from at least one rate-distortion cost. The prediction mode or combination of prediction modes corresponding to the minimum rate-distortion cost is the prediction mode ultimately adopted by the image block. These prediction modes may include the local illumination compensation mode in this embodiment, that is, local illumination compensation processing is performed on the basis of the first prediction value obtained by the first prediction mode to determine the final pixel value of the pixel to be predicted (that is, the second prediction value of the first pixel). That is, the first prediction value of the first pixel to be predicted in the block to be predicted is determined; and the second prediction value for the first pixel is determined based on the first prediction value and the first parameter. After obtaining the prediction block corresponding to the image block (e.g., the predicted luminance block and the predicted chrominance block) based on the second prediction value, the predicted value of the corresponding pixel sample in the prediction block is subtracted from the pixel value of the pixel sample in the image block to obtain the residual value of the pixel sample and the residual block corresponding to the image block. The residual block is then transformed and quantized, and then encoded by an entropy encoder. Finally, an encoded bitstream is formed. Optionally, the encoded bitstream may also include prediction parameters corresponding to the determined prediction mode and related side information.
[0107] Optionally, the prediction parameters are entropy coded and then packaged into the coded bitstream. Optionally, the prediction parameters also include indication information of the prediction mode.
[0108] Optionally, the transformed and quantized residual block is added to the corresponding prediction block obtained using the prediction mode to obtain a reconstructed block, and then the reconstructed block is loop filtered according to the loop filtering module and filter control data to reduce distortion.
[0109] Optionally, this embodiment can be applied to a decoding end, as shown in FIG5 , and includes various module units, such as entropy decoding, inverse quantization, inverse transform, intra-frame prediction, inter-frame prediction, loop filtering, and a decoded image buffer. At the decoding end, after receiving the encoded bit stream, the decoder's decoding unit parses and decodes the encoded bit stream to obtain transform coefficients; the decoder's inverse transform unit and inverse quantization unit perform inverse transform and inverse quantization on the transform coefficients to obtain a residual block.
[0110] Optionally, a decoding unit of the decoder parses and decodes the encoded bitstream to obtain prediction parameters and related auxiliary information. The prediction processing unit of the decoder performs prediction processing using the prediction parameters to determine a prediction block corresponding to the residual block; optionally, the prediction processing includes intra-frame prediction processing and / or inter-frame prediction processing, and the intra-frame prediction processing and / or inter-frame prediction processing each include at least one prediction mode combined. Optionally, the prediction parameter indicates that the corresponding prediction mode is the prediction mode corresponding to the residual block.
[0111] Optionally, the second predicted value of the first pixel can be determined or obtained on the decoding side based on the first predicted value and the first parameter. For example, at least one first pixel value of at least one first pixel sample of the first color component is obtained or determined; at least one second pixel value of at least one second pixel sample of the first color component and / or the second color component is determined based on at least one first pixel of the at least one first pixel sample. Then, after determining all pixel samples in the block to be predicted, the prediction result of the block to be predicted is obtained. Then, the obtained residual block and the corresponding prediction block (including the predicted luminance block and the predicted chrominance block) are added to obtain a reconstructed block. The loop filtering unit of the decoder performs loop filtering on the reconstructed block according to the filter control data to reduce distortion and improve video quality. The reconstructed block after loop filtering is further combined into a decoded image and stored in the decoded image buffer or output as a decoded video signal.
[0112] The technical solution of this embodiment can locally compensate the first prediction value of the first pixel through the first parameter, thereby making the obtained second prediction value of the first pixel more accurate and effective. Moreover, since the local compensation is performed based on the first parameter, and the first parameter better reflects the characteristics between the current block and the reference block, the effectiveness of the second prediction value obtained by locally compensating the first prediction value through the first parameter is improved, thereby improving the accuracy of pixel prediction and thereby improving the efficiency of video encoding and / or decoding.
[0113] Second embodiment
[0114] Based on the first embodiment, a second embodiment is proposed. In this embodiment, the processing method may further include at least one of the following:
[0115] The first pixel is a second color component; the second pixel is a pixel in at least one image block selected from the group consisting of a first default block, a first neighbor block, a first non-neighbor block, a first co-located block, and a first reference block corresponding to the current block; the second pixel is a pixel in a second image block having a different color component than the current block; the first image block is at least one image block selected from the group consisting of a second default block, a second neighbor block, a second non-neighbor block, a second co-located block, and a second reference block corresponding to the current block; and the first image block is a third image block having a different color component than the current block. The current block may be an image block having one color component, such as a luminance image block or a chrominance image block, a Y component image block, a Cr component image block, a Cb component image block, etc.
[0116] In this embodiment, the method for determining or obtaining the first prediction value includes at least one of the following methods 1 to 5:
[0117] Method 1: determining or obtaining a first prediction value of at least one first pixel in at least one current block according to at least one of a default prediction mode, an inter-frame prediction mode, an intra-frame prediction mode, and a candidate list;
[0118] Optionally, the default prediction mode may be a prediction mode set in advance or preset, or a prediction mode used for prediction of other blocks. The default prediction mode may be selected to predict at least one first pixel in at least one current block to obtain a first prediction value.
[0119] Optionally, the inter-frame prediction mode may include an inter-frame prediction mode corresponding to the luma component and an inter-frame prediction mode corresponding to the chroma component. When the current block is a luma component block, the inter-frame prediction mode corresponding to the luma component may be selected to predict at least one first pixel in at least one current block to obtain a first prediction value. When the current block is a chroma component block, the inter-frame prediction mode corresponding to the chroma component may be selected to predict at least one first pixel in at least one current block to obtain a first prediction value. Optionally, the inter-frame prediction mode of the current block may be an intra-frame prediction mode of other image blocks (e.g., corresponding luma blocks) in the image unit where the current block (e.g., the chroma block) is located. Optionally, the intra-frame prediction mode may include an intra-frame prediction mode corresponding to the luma component and an intra-frame prediction mode corresponding to the chroma component. When the current block is a luma component block, the intra-frame prediction mode corresponding to the luma component may be selected to predict at least one first pixel in at least one current block to obtain a first prediction value. When the current block is a chroma component block, the intra-frame prediction mode corresponding to the chroma component may be selected to predict at least one first pixel in at least one current block to obtain a first prediction value.
[0120] Optionally, the intra-frame prediction mode of the current block may be the intra-frame prediction mode of other image blocks (e.g., corresponding luminance blocks) in the image unit where the current block (e.g., chrominance block) is located. Optionally, the candidate list may include an MVP list and / or a mode list. Optionally, the mode list may be a merge candidate list (e.g., a CCP merge candidate list). At least one candidate item is stored in the mode list. The at least one candidate item corresponds to a prediction mode, such as a default prediction mode, an inter-frame prediction mode, an intra-frame prediction mode, a cross-component prediction mode, etc. Optionally, at least one candidate item is a prediction mode corresponding to a spatially adjacent neighbor block of the current block, a spatially non-adjacent non-neighbor block, or a co-located block of the current block.
[0121] Optionally, at least one prediction mode may be matched in the mode list, and at least one first pixel in at least one current block may be predicted based on the matched prediction mode to obtain a first prediction value. Optionally, rate-distortion costs corresponding to all candidate prediction modes in the mode list may be calculated, and then the prediction mode with the best performance may be selected based on the rate-distortion costs and used as the matched prediction mode.
[0122] Optionally, the MVP list may be a motion vector candidate list. The motion vector candidate list includes at least one candidate (e.g., candidate MVP), which is a motion vector predictor or a block vector predictor. The motion vector predictor or block vector predictor may be a spatially adjacent neighboring block of the current block, a spatially non-adjacent non-neighboring block, or a motion vector or block vector of a co-located block of the current block. The rate-distortion cost of all candidate MVPs in the MVP list may be calculated, and the best MVP may be determined based on the rate-distortion cost of all candidate MVPs, and a first prediction value of at least one first pixel in at least one current block may be determined or obtained based on the best MVP.
[0123] Optionally, the encoding side and / or the decoding side may determine at least one prediction mode based on the default prediction mode, the inter-frame prediction mode, the intra-frame prediction mode, and at least one item in the candidate list, and then predict at least the first pixel in at least one current block based on the determined at least one prediction mode to obtain a first prediction value, and then determine or obtain a second prediction value of the first pixel based on the first prediction value and the first parameter.
[0124] Optionally, the first prediction value of at least one first pixel in at least one current block can be determined or obtained based on the default prediction mode, the inter-frame prediction mode, the intra-frame prediction mode, and at least one item in the candidate list, thereby ensuring the validity of the obtained first prediction value, and making the second prediction value obtained by subsequent illumination compensation based on the first prediction value more accurate and effective, thereby improving the efficiency of video encoding and / or decoding.
[0125] Method 2: determining or obtaining a first prediction value of at least one first pixel in the current block based on the pixel value, position and / or motion information of at least one second pixel;
[0126] Optionally, the second pixel may be a pixel in at least one image block of the first default block, the first neighbor block, the first non-neighbor block, the first co-located block, and the first reference block corresponding to the current block; the second pixel may also be a pixel in a second image block having a color component different from that of the current block. The first default block may be a block that is set in advance and has a corresponding relationship with the current block. The first neighbor block may be a block adjacent to the current block, such as a block adjacent to the left side of the current block. The first non-neighbor block may be a block not adjacent to the current block, such as a block not adjacent to the left side of the current block. The first co-located block may be a co-located block corresponding to the current block. The first reference block may be a reference block corresponding to the current block, and the reference block may be a block (i.e., an image block) in the same frame as the current block, or a block not in the same frame.
[0127] The pixel value of the second pixel may be the pixel value of at least one pixel in at least one image block corresponding to the current block, including a first default block, a first neighbor block, a first non-neighbor block, a first co-located block, and a first reference block. At least one prediction mode, such as the prediction mode used for the second pixel, may be determined based on the pixel value of the second pixel. Then, based on the determined at least one prediction mode, at least one first pixel in the current block is predicted to obtain the first predicted value. Alternatively, the pixel value of the second pixel may be transformed, such as by weighted calculation or range adjustment, to obtain the first predicted value.
[0128] The position of the second pixel may be the position of at least one pixel in at least one image block selected from the first default block, the first neighbor block, the first non-neighbor block, the first co-located block, and the first reference block corresponding to the current block, such as the horizontal and vertical coordinates of the pixel. At least one prediction mode may be determined based on the position of the second pixel. For example, different prediction modes corresponding to different pixel positions in the block may be set in advance, and then at least one prediction mode is determined based on the position of the second pixel. Then, at least one first pixel in the current block is predicted based on the determined at least one prediction mode to obtain a first prediction value.
[0129] The motion information of the second pixel may be motion information of at least one pixel in at least one image block of a first default block, a first neighboring block, a first non-neighboring block, a first co-located block, or a first reference block corresponding to the current block, such as motion estimation, motion compensation, etc. At least one prediction mode may be determined based on the motion information of the second pixel. For example, different prediction modes corresponding to the motion information of different pixels in the block may be set in advance, and then at least one prediction mode is determined based on the motion information of the second pixel. Then, at least one first pixel in the current block is predicted based on the determined at least one prediction mode to obtain a first prediction value.
[0130] Optionally, the encoding side and / or decoding side can determine at least one prediction mode based on the pixel value, position and / or motion information of at least one second pixel to predict at least the first pixel in at least one current block to obtain a first prediction value, and then determine or obtain the second prediction value of the first pixel based on the first prediction value and the first parameter.
[0131] Optionally, based on the pixel value, position and / or motion information of at least one second pixel, a first prediction value of at least one first pixel of the current block is determined or obtained, and the second pixel is a pixel in at least one image block of the first default block, the first neighbor block, the first non-neighbor block, the first co-located block, the first reference block corresponding to the current block, and / or a pixel in a second image block with a color component different from that of the current block, thereby making the first prediction value of the determined first pixel more accurate and effective, and making the second prediction value obtained by subsequent illumination compensation based on the first prediction value more accurate and effective, thereby improving the efficiency of video encoding and / or decoding.
[0132] Method three, determining or obtaining a first prediction value of at least one first pixel in the current block based on the pixel value, position, motion information and / or prediction mode of at least one first image block;
[0133] Optionally, the first image block may be at least one of a second default block, a second neighbor block, a second non-neighbor block, a second co-located block, and a second reference block corresponding to the current block. The second default block may be the same as or different from the first default block, and may be a block set in advance to have a corresponding relationship with the current block. The second neighbor block may be the same as or different from the first neighbor block, and may be a neighbor block of the current block. The second non-neighbor block may be the same as or different from the first non-neighbor block, and may be a non-neighbor block of the current block. The second co-located block may be the same as or different from the first co-located block, and may be the co-located block corresponding to the current block. The second reference block may be the same as or different from the first reference block, and may be a reference block corresponding to the current block.
[0134] Optionally, the first image block may also be a third image block having a different color component than the current block. Optionally, for example, if the first image block is an image block of the Y component, the third image block may be an image block of the U component or the V component. If the first image block is an image block of the U component, the third image block may be an image block of the Y component or the V component. If the first image block is an image block of the V component, the third image block may be an image block of the Y component or the U component.
[0135] Optionally, the pixel value of the first image block may be the pixel value of at least one pixel in at least one image block selected from a second default block, a second neighbor block, a second non-neighbor block, a second co-located block, and a second reference block corresponding to the current block, or may be the pixel value of at least one pixel in a third image block. At least one prediction mode may be determined based on the pixel values of the at least one first image block, such as the prediction mode employed by the at least one first image block, and then the at least one first pixel in the current block may be predicted based on the determined at least one prediction mode to obtain a first predicted value. Optionally, the pixel values of the at least one first image block may be deformed, such as by weighted calculation or range adjustment, to obtain the first predicted value.
[0136] Optionally, the position of the first image block may be the position of at least one image block selected from a second default block, a second neighbor block, a second non-neighbor block, a second co-located block, and a second reference block corresponding to the current block, or may be the position of at least one pixel in a third image block, such as the horizontal and vertical coordinates of the pixel. At least one prediction mode may be determined based on the position of the first image block. For example, different prediction modes corresponding to the positions of different image blocks may be set in advance, and then at least one prediction mode may be determined based on the position of the first image block. Then, at least one first pixel in the current block is predicted based on the determined at least one prediction mode to obtain a first prediction value.
[0137] Optionally, the motion information of the first image block may be motion information corresponding to at least one of a second default block, a second neighbor block, a second non-neighbor block, a second co-located block, and a second reference block corresponding to the current block, or may be motion information corresponding to a third image block, such as motion estimation or motion compensation. At least one prediction mode may be determined based on the motion information of the first image block. For example, different prediction modes corresponding to the motion information of different image blocks may be set in advance, and then at least one prediction mode is determined based on the motion information of the first image block. Then, at least one first pixel in the current block is predicted based on the determined at least one prediction mode to obtain a first prediction value.
[0138] The prediction mode may be a same-component prediction mode or a cross-component prediction mode. For example, at least one first pixel in the current block is predicted according to the cross-component prediction mode to obtain a first prediction value. At least one first pixel in the current block is predicted according to the same-component prediction mode.
[0139] Optionally, the encoding side and / or decoding side can determine or obtain a first prediction value of at least one first pixel in the current block based on the pixel value, position, motion information and / or prediction mode of at least one first image block, and then determine or obtain a second prediction value of the first pixel based on the first prediction value and the first parameter.
[0140] Optionally, based on the pixel value, position, motion information and / or prediction mode of at least one first image block, a first prediction value of at least one first pixel in the current block is determined or obtained, thereby ensuring the validity of the obtained first prediction value, and making the subsequent second prediction value obtained by performing illumination compensation based on the first prediction value more accurate and effective, thereby improving the efficiency of video encoding and / or decoding.
[0141] Method 4: determining or obtaining a first prediction block and / or a second prediction block of the current block, and determining or obtaining a first prediction value of at least one first pixel in the current block based on a prediction value corresponding to the first prediction block and / or a prediction value corresponding to the second prediction block;
[0142] Optionally, the current block may be divided, and the divided blocks may be predicted to obtain at least one predicted block, such as a first prediction block and a second prediction block. The prediction mode used by the first prediction block and the prediction mode used by the second prediction block may be the same or different. The prediction value corresponding to the first prediction block or the prediction value corresponding to the second prediction block may be deformed, and then the first prediction value of at least one first pixel in the current block may be determined or obtained based on the deformed prediction value. The prediction value corresponding to the first prediction block and the prediction value corresponding to the second prediction block may be weighted, and the first prediction value of at least one first pixel in the current block may be determined based on the weighted calculation result, for example, the weighted calculation result may be directly used as the first prediction value.
[0143] Optionally, the encoding side and / or the decoding side can determine or obtain the first prediction value of at least one first pixel in the current block based on the prediction value corresponding to the first prediction block of the current block and / or the prediction value corresponding to the second prediction block, and then determine or obtain the second prediction value of the first pixel based on the first prediction value and the first parameter.
[0144] Optionally, based on the prediction value corresponding to the first prediction block of the current block and / or the prediction value corresponding to the second prediction block of the current block, the first prediction value of at least one first pixel in the current block is determined or obtained, thereby ensuring the validity of the obtained first prediction value, and making the subsequent second prediction value obtained by performing illumination compensation based on the first prediction value more accurate and effective, thereby improving the efficiency of video encoding and / or decoding.
[0145] Method five: determining or obtaining a first prediction value of a first pixel according to a syntax element obtained from a bitstream for use in a decoding process.
[0146] Optionally, the syntax elements may be encoded into the bitstream on the encoding side, and the decoding side obtains the syntax elements in the bitstream, such as an index, determines a prediction mode based on the index, and then predicts the first pixel based on the determined prediction mode to obtain a first prediction value, and then decodes based on the first prediction value. Optionally, by determining or obtaining the first prediction value of the first pixel based on the syntax elements obtained in the bitstream on the decoding side, the validity of the obtained first prediction value can be guaranteed, and the second prediction value obtained by subsequent illumination compensation based on the first prediction value can be more accurate and effective, thereby improving the efficiency of video decoding. Optionally, the first prediction value may be a prediction value obtained through motion estimation, motion compensation, and sub-pixel interpolation.
[0147] Optionally, block motion estimation is the process by which the encoding side searches for an optimal reference block in a reference image for the currently encoded pixel block. Motion compensation involves predicting and compensating the current local image using a previous local image. Sub-pixel interpolation involves determining the optimal reference block in the encoded image and then using bilinear interpolation to determine pixel values at half-pixels, quarter-pixels, and quarter-pixels, thereby determining a suitable motion vector. The motion vector accuracy of a suitable motion vector can be integer pixel, half-pixel, or quarter-pixel.
[0148] Optionally, after determining the reference image, the encoding side determines a better reference block through motion estimation. The better reference block is interpolated by bilinear interpolation to determine the pixel values at 1 / 4, 1 / 2, and 3 / 4 pixels of the better reference block. Based on the pixel blocks consisting of 1 / 4, 1 / 2, and 3 / 4 pixels obtained after the interpolation process, an optimal reference block with sub-pixel accuracy is determined. The best reference block with sub-pixel accuracy is used as the prediction block (first prediction value) of the current image block for local illumination compensation to obtain a prediction block after local illumination compensation. In addition, the motion information corresponding to the best reference block is encoded for transmission to the decoding end.
[0149] Optionally, the decoding side determines the best reference block in the reference image by decoding the motion information, and uses the best reference block as the prediction block (first prediction value) of the current image block. Thereafter, local illumination compensation is performed on the prediction block of the current image block.
[0150] Optionally, the first prediction value may be a prediction value obtained by a Merge mode (list). Optionally, the Merge mode refers to an inter-frame coding mode that directly uses the MVP motion information in the MVP candidate list as the motion information of the current coding unit.
[0151] Optionally, the encoder selects appropriate MVP motion information from the MVP candidate list as the motion information for the current coding unit. This motion information includes a reference image index and / or a motion vector. The encoder then uses this motion information to determine the optimal reference block, which is used as the prediction block (first prediction value) for the current image block. Local illumination compensation is performed to obtain a locally illuminated prediction block. The index value of the MVP candidate list corresponding to the optimal reference block is encoded for transmission to the decoder.
[0152] Optionally, the decoding side determines the motion information by decoding the index value of the MVP candidate list, thereby further determining the best reference block in the reference image, and uses the best reference block as the prediction block of the current image block to perform local illumination compensation on the prediction block of the current image block.
[0153] Optionally, the prediction value in the current image block corresponds to the first prediction value. Optionally, the first prediction value may be a prediction value obtained through a geometric partitioning pattern.
[0154] Optionally, the geometric partitioning mode may be to predict the rectangular coding unit using two different prediction methods, resulting in two prediction blocks using the two prediction methods. The prediction values of the different prediction blocks are fused using a weight matrix to obtain a final prediction value. For two different irregular sub-regions of the rectangular coding unit, the weight coefficients in the weight matrix corresponding to the different irregular sub-regions are different, thereby achieving the effect of determining respective prediction values for the two irregular sub-regions using different prediction methods. Optionally, the first prediction value may be the final prediction value described above. Alternatively, the first prediction value may be the prediction value corresponding to at least one of the two prediction blocks using the two prediction methods described above.
[0155] Optionally, on the encoding side, two different prediction methods are used for rectangular coding units to obtain prediction blocks under the two prediction methods. If the two prediction methods are inter-frame prediction and / or intra-frame block copy prediction, the prediction blocks of the two methods are used as the prediction blocks of the current block. Local illumination compensation is performed on the two prediction blocks of the current image block to obtain two locally illuminated prediction blocks. Furthermore, the motion information / block vector information corresponding to the two prediction methods is encoded and transmitted to the decoding end.
[0156] Optionally, on the decoding side, by decoding the motion information / block vector information corresponding to the two prediction methods, the two best reference blocks in the reference image are determined and used as the two prediction blocks for the current image block. Local illumination compensation is performed on the two prediction blocks of the current image block to obtain two locally illuminated prediction blocks. Optionally, after obtaining the two locally illuminated prediction blocks, the prediction values of the different prediction blocks are fused using a weight matrix to obtain a final prediction value.
[0157] Optionally, the predicted values in the two prediction blocks of the current image block correspond to the first predicted value. Optionally, the first predicted value may be a predicted value obtained by an advanced motion vector prediction mode. Optionally, the advanced motion vector prediction mode may be a motion information encoding by motion vector difference.
[0158] Optionally, on the encoding side, the motion information of the current coding unit is determined by selecting appropriate MVP motion information and motion vector difference (MVD) from the MVP candidate list. The motion information includes a reference image index and / or a motion vector. The motion information is then used to determine the optimal reference block, which is used as the prediction block for the current image block to perform local illumination compensation, resulting in a locally illuminated prediction block. Furthermore, the index value of the MVP candidate list and the motion vector difference corresponding to the optimal reference block are encoded and transmitted to the decoding side. Optionally, the prediction value of the above-mentioned prediction block for the current image block corresponds to the first prediction value.
[0159] Optionally, on the decoding side, the motion information of the current coding unit is determined by decoding the index value and motion vector difference of the MVP candidate list, thereby further determining the best reference block in the reference image, and using the best reference block as the prediction block of the current image block. Local illumination compensation is performed on the prediction block of the current image block. Optionally, the prediction value of the prediction block of the current image block corresponds to the first prediction value.
[0160] Alternatively, the first prediction value may be a prediction value obtained by a sub-block based inter prediction mode. Alternatively, the sub-block based inter prediction mode may be to determine motion information of a sub-block in the coding unit using motion information of a reference block in a co-located image.
[0161] Optionally, at the encoding side, a co-located motion offset is determined, where the co-located motion offset is a motion vector of an adjacent block (such as a neighboring block) of a current encoding block (such as a current block).
[0162] Obtain the center motion information, and based on the co-located motion offset, obtain the corresponding pixel of the center pixel of the current coding unit in the co-located image, and use the coding block where the corresponding pixel is located as the center co-located block. If motion information (reference image index, motion vector) exists for the center co-located block, then determine the center motion information of the current coding unit (i.e., the motion information of the center pixel of the current coding unit) based on the motion information of the center co-located block and the temporal distance between the current image, the co-located image, and their respective reference images.
[0163] Obtain sub-block motion information to determine the motion information for each sub-block of the current coding unit. For example, based on the co-located motion offset, the corresponding pixel in the co-located image for the center pixel of each sub-block of the current coding unit is obtained, and the coding block containing the corresponding pixel is used as the co-located sub-block for each sub-block. If motion information (reference image index, motion vector) exists for the co-located sub-block, the motion information (i.e., the motion information of the center pixel of the sub-block) of the current coding unit is determined based on the motion information of the co-located sub-block and the temporal distance between the current image, the co-located image, and the respective reference images. If motion information (reference image index, motion vector) does not exist for the co-located sub-block, the motion information of the center pixel of the current coding unit is used as the motion information for the corresponding sub-block. Based on the sub-block motion information, a prediction block for each sub-block is determined. Local illumination compensation is performed on the prediction block of each sub-block of the current image block separately to obtain a locally illuminated predicted block for each sub-block; alternatively, local illumination compensation is performed uniformly on the prediction blocks of each sub-block of the current image block to obtain a locally illuminated predicted block for the current coding unit. Furthermore, a syntax element indicating the use of the sub-block based inter-frame prediction mode is encoded to be transmitted to a decoding end. Optionally, the prediction value of the prediction block of each sub-block corresponds to the first prediction value.
[0164] Optionally, at the decoding end, after receiving and decoding a syntax element indicating the use of a sub-block-based inter prediction mode, a co-located motion offset is determined, center motion information is obtained, sub-block motion information is obtained, and a prediction block for each sub-block is determined based on the sub-block motion information. Local illumination compensation is performed on the prediction blocks of each sub-block of the current image block to obtain a locally illuminated prediction block for each sub-block; or, local illumination compensation is performed uniformly on the prediction blocks of each sub-block of the current image block to obtain a locally illuminated prediction block for the current coding unit.
[0165] Optionally, the prediction value of the prediction block of each sub-block corresponds to a first prediction value. Optionally, the first prediction value may be a prediction value obtained by using an affine mode based on the sub-block. Optionally, the affine mode based on the sub-block may be a motion vector for each sub-block in the current coding unit obtained by using an affine transformation.
[0166] Optionally, on the encoding side, after determining the reference image, the motion information of the top-left and top-right sub-blocks of the current coding unit is determined (corresponding to a 4-parameter affine model). Alternatively, after determining the reference image, the motion information of the top-left, top-right, and bottom-left sub-blocks of the current coding unit is determined (corresponding to a 6-parameter affine model). Using the 4-parameter or 6-parameter affine model of the affine transformation and the motion information of each of the aforementioned sub-blocks (the motion information of the top-left and top-right sub-blocks, or the motion information of the top-left, top-right, and bottom-left sub-blocks), motion vectors for each sub-block of the current coding unit are obtained. Based on the motion vectors of each sub-block and the reference image, a prediction block for each sub-block is determined. Local illumination compensation is performed on the prediction blocks of each sub-block of the current coding unit. Furthermore, syntax elements using the sub-block-based affine mode and the motion information of the top-left and top-right sub-blocks are encoded for transmission to the decoding side. Alternatively, the affine mode-based syntax elements of the sub-blocks and the motion information of the upper left sub-block, the upper right sub-block, and the lower left sub-block are used for encoding and transmitted to the decoding end. Optionally, the prediction value of the prediction block of each sub-block corresponds to the first prediction value.
[0167] On the decoding side, after receiving and decoding syntax elements using a sub-block-based affine mode and the motion information of the associated sub-blocks, a 4-parameter affine model or a 6-parameter affine model of affine transformation is used, along with the motion information of each of the aforementioned sub-blocks (motion information of the top left and top right sub-blocks, or motion information of the top left, top right, and bottom left sub-blocks), to obtain motion vectors for each sub-block of the current coding unit. A prediction block for each sub-block is determined based on the motion vectors of each sub-block and a reference image. Local illumination compensation is performed on the prediction blocks of each sub-block of the current coding unit. Optionally, the prediction value of the prediction block for each sub-block corresponds to a first prediction value. Alternatively, the first prediction value may be obtained using other rules, such as a block vector.
[0168] Optionally, in this embodiment, the first parameter may be a filter coefficient, a weight coefficient, etc. Optionally, the first parameter is determined or obtained by at least one of the following methods 1 to 4:
[0169] Method 1: pixel value of at least a third pixel;
[0170] Alternatively, the third pixel may be a pixel of any block, such as a pixel in at least one of a current block, a default block, a neighboring block, a non-neighboring block, a co-located block, a cross-component block, and a reference block. Alternatively, a pixel value of at least one third pixel may be used as a model parameter, i.e., a first parameter, of a nonlinear local illumination compensation model.
[0171] Optionally, the first parameter can be determined or obtained based on the pixel value of at least a third pixel, and the third pixel can be a pixel of any block, so that the determined first parameter is associated with the image block, and the effect of local illumination compensation of the first parameter based on the first parameter is better, and the obtained second prediction value is more accurate and effective, thereby improving the efficiency of video encoding and / or decoding.
[0172] Method 2: at least one nonlinear local illumination compensation model;
[0173] Optionally, at least one nonlinear local illumination compensation model may be selected from at least one candidate nonlinear local illumination compensation model, for example, based on a rate-distortion cost corresponding to the at least one candidate nonlinear local illumination compensation model. Based on the selected at least one nonlinear local illumination compensation model, at least one model parameter is determined and used as the first parameter. For example, the model parameter required for use in the at least one nonlinear local illumination compensation model.
[0174] Optionally, at least one nonlinear local illumination compensation model may be set, and multiple selection strategies may be set for the at least one nonlinear local illumination compensation model, such as selecting a nonlinear local illumination compensation model that has been selected historically. For example, a first-in-first-out list may be set to effectively select the nonlinear local illumination compensation model that was last added to the list. The nonlinear local illumination compensation model that has been used most frequently in a certain period may be selected. For example, a mapping table may be set to record the nonlinear local illumination compensation models used in a film and the number of times these nonlinear local illumination compensation models have been used, and the nonlinear local illumination compensation model with the most usage may be selected. A nonlinear local illumination compensation model used by spatially adjacent coding units may be selected. For example, a nonlinear local illumination compensation model used by the adjacent coding unit above or to the left of the current block may be selected. A nonlinear local illumination compensation model used by temporally adjacent coding units may be selected. For example, a nonlinear local illumination compensation model used by a reference block (coding unit) determined by a motion vector may be selected. Alternatively, in sbTMVP, a nonlinear local illumination compensation model used by a co-located block determined by motion offset in a co-located image may be selected. Alternatively, a nonlinear local illumination compensation model used in a co-located block in the co-located image at the same position as the current coding unit is selected.
[0175] Optionally, the rate-distortion cost of each nonlinear local illumination compensation model can be calculated, and the nonlinear local illumination compensation model with the smallest rate-distortion cost can be used as the final nonlinear local illumination compensation model. At least one first parameter can then be determined based on the determined nonlinear local illumination compensation model, and a second predicted value of the first pixel can be determined or obtained based on the first parameter and the first predicted value. Optionally, the at least one determined nonlinear local illumination compensation model can be deformed, and the at least one first parameter can then be determined or obtained based on the deformed at least one nonlinear local illumination compensation model.
[0176] For example, if the nonlinear local illumination compensation model is PreY1' = f(PreY1, PreY2, PreY3, ..., PreYN); and PreY2, PreY3, ..., PreYN can be the pixel values of pixels in spatially adjacent blocks (e.g., neighboring blocks), spatially non-adjacent blocks (e.g., non-neighboring blocks), temporal blocks (image blocks determined by the motion vector of the current block), or co-located blocks (blocks with the same position coordinates as the current coding block in the co-located image, or image blocks determined in the co-located image by motion offset) of the current block, a corresponding coding block (denoted as RefY1) can be constructed for the pixels in the current template above and the current template to the left (denoted as CurY1). This coding block is then used as the current block, and the spatially adjacent blocks, spatially non-adjacent blocks, temporal blocks, and co-located blocks corresponding to the coding block are determined. The corresponding reference pixels (denoted as RefYN) are determined from these blocks. Then, based on CurY1 = f(RefY1, RefY2, RefY3, ..., RefYN), the model parameters of the nonlinear local illumination compensation model, i.e., the first parameters, are determined.
[0177] Optionally, PreY1 can be the average value of the predicted pixel values of all predicted pixels of sub-block Y1 in the current coding block, and PreY2, PreY3, ..., PreYN can be the average value of the predicted pixel values of all predicted pixels of each sub-block in the spatially adjacent blocks Y2, Y3, ..., YN of sub-block Y1. In this way, the average value of sub-block Y1 after local illumination compensation can be determined by PreY1'=f(PreY1, PreY2, PreY3, ..., PreYN). The final predicted pixel value of each pixel is determined based on the difference between the average value after local illumination compensation and the average value before local illumination compensation. Optionally, the model parameters of the nonlinear local illumination compensation model, i.e., the first parameters, can be determined by the template of the sub-block.
[0178] Optionally, by determining or obtaining the first parameter based on at least one nonlinear local illumination compensation model, the validity of the obtained first parameter can be guaranteed, thereby achieving better results when performing local illumination compensation on the first parameter based on the first parameter, and the obtained second prediction value is more accurate and effective, thereby improving the efficiency of video encoding and / or decoding.
[0179] Mode 3: a reference pixel determined by at least one of a third default block, a third neighbor block, a third non-neighbor block, a third co-located block, and a third reference block corresponding to the current block;
[0180] Optionally, the third default block may be the same as or different from the first default block or the second default block, and may be a block set in advance that has a corresponding relationship with the current block. The third neighbor block may be the same as or different from the first neighbor block or the second neighbor block, and may be a neighbor block of the current block. The third non-neighbor block may be the same as or different from the first non-neighbor block or the second non-neighbor block, and may be a non-neighbor block of the current block. The third co-located block may be the same as or different from the first co-located block or the second co-located block, and may be a block in the co-located image corresponding to the current block. The third reference block may be the same as or different from the first reference block or the second reference block. Optionally, the reference pixel may be a pixel in any of the third default block, the third neighbor block, the third non-neighbor block, the third co-located block, and the third reference block, or a pixel obtained by deforming the pixels in any of the blocks. Optionally, the pixel value of the reference pixel may be used as a model parameter of the nonlinear local illumination compensation model, i.e., the first parameter.
[0181] Optionally, by determining or obtaining a first parameter based on a reference pixel determined based on at least one of a third default block, a third neighbor block, a third non-neighbor block, a third co-located block, and a third reference block corresponding to the current block, the validity of the first parameter can be guaranteed, thereby achieving a better effect when local illumination compensation of the first parameter is performed based on the first parameter, and the obtained second prediction value is more accurate and effective, thereby improving the efficiency of video encoding and / or decoding.
[0182] Mode 4: a current template corresponding to the current block where the first pixel is located, and / or a reference template matching the current template.
[0183] Alternatively, a reference template matching the current template may be determined based on a template corresponding to at least one of a default block, a neighboring block, a non-neighboring block, a co-located block, a temporal block, and a reference block corresponding to the current block. Alternatively, a first parameter may be determined or obtained based on the pixel value of at least one pixel in the current template and / or a reference template matching the current template. For example, the pixel value of at least one pixel in the current template and / or a reference template matching the current template may be input into at least one nonlinear local illumination compensation model to determine a corresponding filter coefficient or weight coefficient, which may be used as the first parameter.
[0184] Optionally, the first parameter can be determined based on the result of weighted processing calculation of the current template and the reference template. Optionally, the weights w0 and w1 are determined using the rate-distortion cost. For example, the rate-distortion cost COST0 of the current template (the upper current template and / or the left current template) is calculated by calculating reference template 0 (the upper reference template 0 and / or the left reference template 0), and the rate-distortion cost COST1 of the current template (the upper current template and / or the left current template) is calculated by calculating reference template 1 (the upper reference template 1 and / or the left reference template 1). Next, the weights w0 and w1 are determined based on the ratio between the rate-distortion cost COST0 and the rate-distortion cost COST1.
[0185] If the predicted value Pred0 and the predicted value Pred1 are weighted, the weighted result is calculated using the following formula: Predw = w0 * predicted value Pred0 + w1 * predicted value Pred1;
[0186] If weighted processing is performed on the pixel value RefY0 of the reference template 0 pixel and the pixel value RefY1 of the reference template 1 pixel, the weighted processing result is calculated using the following formula: Refw=w0*RefY0+w1*prediction value RefY1.
[0187] Optionally, weighted processing calculation can also be performed according to the default weight. If weighted processing is performed on the pixel value RefY0 of the reference template 0 pixel and the pixel value RefY1 of the reference template 1 pixel, the weighted result is calculated using the following formula: Refw = 0.5*RefY0 + 0.5*prediction value RefY1.
[0188] Optionally, after determining the weighted processing result, a first parameter, such as a filter coefficient, is determined according to a nonlinear local illumination compensation model. For example, the nonlinear local illumination compensation model is: CurY1 = c0*RefY1+c1*RefY2+c2*RefY3+c3*RefY4+c4*RefY5+c5*P1+c6*P2+c7*P3+c8*P4+c9*P5+c10*B.
[0189] Optionally, based on the nonlinear local illumination compensation model, the first parameter (such as the filter coefficient) is determined using the pixel prediction value CurY1 of the upper boundary pixel of the upper reference template corresponding to the current block. If the upper boundary pixels of the upper reference template are not within the upper reference template area, there is a problem that nonlinear local illumination compensation cannot be performed on these upper boundary pixels. Similarly, a similar problem exists with the left reference template. Optionally, to avoid this defect, in this embodiment, an adjacent area as shown in Figure 6 can be set around the upper reference template and the left reference template. The adjacent area is a circle of pixels around the upper reference template or the left reference template, such as 1 row or 1 column of pixels. For example, if the reference block has an upper reference template and a left reference template, the adjacent area of the upper reference template may include TL0, TR0, BR0, BL0; the adjacent area of the left reference template may include TL1, TR1, BR1, BL1.
[0190] Optionally, after determining the position of the adjacent area, the pixel value of the adjacent area can be determined. Optionally, the pixel value of the adjacent area is the pixel reconstruction value of the pixel at the corresponding position in the reference image. As shown in Figure 7, since the pixel value of the adjacent area of the upper reference template is the pixel reconstruction value of the pixel at the corresponding position in the reference image, and the pixel reconstruction value of the pixel at the corresponding position is A1, B1, C1, D1, E1, F1, the pixel values of the adjacent area are A1, B1, C1, D1, E1, F1 respectively. Optionally, the pixel value of the adjacent area is different from the pixel value of the upper reference template area.
[0191] Optionally, the reconstructed pixel values of pixels adjacent to the pixels in the adjacent region in the upper reference template or the left reference template are used as the pixel values of the adjacent region. As shown in Figure 8, since the reconstructed pixel values of pixels adjacent to the pixels in the adjacent region in the upper reference template or the left reference template are used as the pixel values of the adjacent region, and the values of the upper boundary of the upper template are A, B, C, D, E, and F, respectively, the values of the pixels in the upper adjacent region are A, A, B, C, D, E, F, and F, respectively.
[0192] Optionally, in the adjacent area of the upper reference template, the upper left adjacent pixel is TL0, the upper right adjacent pixel is TR0, the lower left adjacent pixel is BL0, and the lower right adjacent pixel is BR0. In the left reference template, the upper left adjacent pixel is TL1, the upper right adjacent pixel is TR1, the lower left adjacent pixel is BL1, and the lower right adjacent pixel is BR1. If equation (4) (i.e., CurY1 = f(RefY1, RefY2, RefY3, ..., RefYN)) is used to solve the filter coefficients, since the upper left adjacent pixel is TL0, the upper right adjacent pixel is TR0, the lower left adjacent pixel is BL0, and the lower right adjacent pixel is BR0, the upper left adjacent pixel is TL0, the upper right adjacent pixel is TR0, the lower left adjacent pixel is BL0, and the lower right adjacent pixel is BR0 will not participate in the calculation, so it is not necessary to consider the above pixels as adjacent pixels. In other words, the adjacent area may not include the above pixels.
[0193] Optionally, as shown in FIG9 , the upper reference template and the left reference template may not use adjacent areas at diagonal positions.
[0194] Optionally, the reference template (the reference template above and / or the current template on the left) may utilize the adjacent area of the reference template, and the current template (the current template above and / or the current template on the left) may not utilize the adjacent area of the current template. Optionally, by determining or obtaining the first parameter based on the current template corresponding to the current block where the first pixel is located, and / or the reference template matching the current template, the validity of the first parameter can be guaranteed, thereby achieving better results when local illumination compensation is performed on the first parameter based on the first parameter, and the obtained second prediction value is more accurate and effective, thereby improving the efficiency of video encoding and / or decoding. Optionally, if the inter-frame prediction mode is used to determine the first prediction value, and the unidirectional prediction method in the inter-frame prediction is used, the block to be predicted has a reference block.
[0195] If the nonlinear local illumination compensation adopts the model shown in formula (1): PreY1'=f(PreY1, PreY2, PreY3, ..., PreYN), then the filter coefficient is determined using formula (4). Alternatively, formula (4) can be: CurY1=f(RefY1, RefY2, RefY3, ..., RefYN) Formula (4);
[0196] Optionally, CurY1 is the reconstructed pixel value of the pixel in the upper current template or the left current template, that is, the second predicted value. RefY1 is the reconstructed pixel value of the pixel corresponding to the pixel CurY1 in the upper reference template or the left reference template, and RefY1 is also the predicted pixel value of the pixel CurY1 in the upper current template. For example, in one embodiment, RefY1 is the predicted pixel value of the pixel CurY1 determined after the pixel CurY1 in the upper current template is predicted by the first prediction module as shown in Figure 10. RefY2, RefY3, ..., RefYN are the predicted pixel values of the pixels surrounding the pixel RefY11 in the upper reference template or the left reference template. In one embodiment, RefY2, RefY3, ..., RefYN are the predicted pixel values of these surrounding pixels determined after the pixels surrounding the pixel CurY1 in the upper current template are predicted by the first prediction module as shown in Figure 10.
[0197] Alternatively, if N is 5, the nonlinear local illumination compensation module can adopt the model corresponding to formula (2), that is, PreY1'=c0*PreY1+c1*PreY2+c2*PreY3+c3*PreY4+c4*PreY5+c5*P1+c6*P2+c7*P3+c8*P4+c9*P5+c10*B, and the filter coefficient is determined using formula (4). Formula (5) is as follows: CurY1=c0*RefY1+c1*RefY2+c2*RefY3+c3*RefY4+c4*RefY5+c5*P1+c6*P2+c7*P3+c8*P4+c9*P5+c10*B Formula (5);
[0198] Optionally, c0 to c10 are filter coefficients (or weights). CurY1 is the reconstructed pixel value of the pixel in the upper current template or the left current template. RefY1 is the reconstructed pixel value of the pixel corresponding to CurY1 in the upper reference template or the left reference template. RefY1 is also the predicted pixel value of the pixel CurY1 in the upper current template. For example, RefY1 is the predicted pixel value of the pixel CurY1 in the upper current template determined after the pixel CurY1 is predicted by the first prediction module shown in FIG10 , i.e., the compensated predicted pixel value. RefY2, RefY3, ..., RefYN are the predicted pixel values of the pixels surrounding the pixel RefY1 in the upper reference template or the left reference template. For another example, RefY2, RefY3, ..., RefYN are the predicted pixel values of the pixels surrounding the pixel CurY1 in the upper current template determined after the pixels are predicted by the first prediction module shown in FIG10 . P1 to P5 are nonlinear terms. In one embodiment, P1 to P5 are the squares of RefY1 to RefY5. In another embodiment, P1-P5 are the squares of RefY1-RefY5, scaled to the bit depth range. That is, P1 = (RefY1*RefY1+midVal)>>bitDepth, where bitDepth is the bit depth corresponding to the sample, and ">>" is the right shift sign. For example, for 10-bit video content, P is calculated as follows: P = (RefY1*RefY1+512)>>10.
[0199] Optionally, equation (5) may further include an offset value B. In one embodiment, the offset value B may be 0. In another embodiment, it may be another predetermined value (for example, for 10-bit video, it may be set to 512).
[0200] Optionally, the first parameter (such as the filter coefficient) can be determined by first determining CurY1 in Formula (4) and Formula (5); then determining RefY1~RefYN / RefY1~RefY5 corresponding to CurY1; establishing N equations or overdetermined equations based on the determined RefY11~RefY15 and their corresponding PreY1, PreY2, PreY3,..., PreYN, and solving the equations or overdetermined equations to obtain the values of the filter coefficients of Formula (4) / Formula (5) and use these filter coefficients as the filter coefficients of Formula (1) and Formula (2).
[0201] Optionally, the filter coefficients (i.e., first parameters) in this embodiment are derived using pixels in the upper template and the left template of the block containing the pixel to be predicted (the block to be predicted). Please refer to Figure 11, which shows a schematic diagram of the upper template and the left template of the block to be predicted and the reference block. As shown in Figure 11, the upper template includes the upper current template and the upper reference template; the left template includes the left current template and the left reference template.
[0202] Optionally, reconstructed pixel values of M pixels Y11 are determined / selected from the upper current template and the left current template as the pixel value CurY1 in equation (4) / equation (5). In Figure 11, the position of the upper reference template in the reference image is determined by the motion vector and the position of the upper current template, and the position of the left reference template in the reference image is determined by the motion vector and the position of the left current template.
[0203] Optionally, the horizontal position of the upper reference template is the horizontal position of the upper current template plus the horizontal component of the motion vector, and the vertical position of the upper reference template is the vertical position of the upper current template plus the vertical component of the motion vector. For example, if the horizontal component of the motion vector is -10 and the vertical component is -5, and the position of the upper reference template is (20, 20), then the horizontal position of the upper reference template in the reference image is 10, and the vertical position of the upper reference template is 15. Similarly, the horizontal position of the left reference template is the horizontal position of the left current template plus the horizontal component of the motion vector, and the vertical position of the left reference template is the vertical position of the left current template plus the vertical component of the motion vector. For example, if the horizontal component of the motion vector is -5 and the vertical component is -10, and the position of the left reference template is (6, 15), then the horizontal position of the left reference template in the reference image is 1, and the vertical position of the left reference template is 5.
[0204] Optionally, after determining the position of the upper reference template and / or the left reference template, if the size of the upper reference template and / or the left reference template is known, the pixels included in the upper reference template and the left reference template can be further determined. A group of pixels corresponding to each pixel CurY1 of the pixel values CurY1 of the M pixels Y11 determined in the previous step is determined / selected from the upper reference template as the pixels RefY11-RefY1N / RefY11-RefY15 in formula (4) / formula (5) corresponding to each CurY1. Therefore, a total of M groups of pixels corresponding to the pixel values CurY1 of the M pixels Y11 are selected, and if formula (4) is used, each group of pixels has N pixels, and their pixel values are pixel values RefY11-RefY1N respectively. If formula (5) is used, each group of pixels has N pixels, and their pixel values are pixel values RefY11-RefY15 respectively.
[0205] When the form of formula (4) is adopted (when N is 5), as shown in Figure 12, the pixel values RefY12-RefY15 of pixels Y12-Y15 are the pixel values of the surrounding pixels of pixel Y11. Finally, the determined CurY1 and its corresponding RefY11~RefY1N are substituted into formula (4), thereby obtaining a system of equations. It should be noted that the number of equations in the system of equations needs to be greater than or equal to the number of filter coefficients. By solving the system of equations, the value of the filter coefficient can be determined. Take the above formula (4) as an example. If formula (4) has the following form: CurY1=Ref·c Formula (6)
[0206] Optionally, CurY1 is [CurY12, CurY12, ..., CurY1N]T, which is a vector of pixels in the current template. c is [c0, c1, ..., c9, c10]T, which is the filter coefficient. Ref is a matrix consisting of pixels in the reference template, nonlinear terms associated with the pixels in the reference template, and bias values.
[0207] Optionally, the value of the filter coefficient, that is, the value of the first parameter, is determined by equation (7), that is, calculated by equation (8): c = (Ref T ·Ref) -1 ·Ref T CurY1 formula (8).
[0208] Third embodiment
[0209] Based on the first or second embodiment, a third embodiment is proposed. In this embodiment, the processing method may further include at least one of the following:
[0210] The first prediction value includes the prediction value corresponding to the first prediction block; the third prediction value is determined or obtained based on the first prediction value and the first parameter; the sixth prediction value is determined or obtained based on the prediction value corresponding to the second prediction block and the second parameter; the fifth prediction value is determined or obtained based on the first prediction value and the prediction value corresponding to the second prediction block; the offset value is determined by the pixel in the current template and / or the reference template corresponding to at least one first pixel; the offset value is determined by at least one pixel in at least one item of the default block, neighbor block, non-neighbor block, co-located block, time domain block, and reference block corresponding to the current block; the nonlinear term is determined or obtained based on the first prediction value; the nonlinear term is determined or obtained based on the prediction value of the neighbor pixel and / or non-neighbor pixel corresponding to the first pixel.
[0211] Optionally, in this embodiment, step S10 includes at least one of the following methods 1 to 4:
[0212] Method 1: determining or obtaining a second prediction value of the first pixel according to the first prediction value, the prediction value corresponding to the second prediction block, and the first parameter;
[0213] Optionally, the first prediction value may be determined or obtained according to at least one of the methods 1 to 5 in the above embodiments. The first parameter may be determined or obtained according to at least one of the methods 1 to 4 in the above embodiments, and then the second prediction value of the first pixel may be determined or obtained according to the first prediction value, the prediction value corresponding to the second prediction block, and the first parameter. Optionally, the first prediction value may be subjected to nonlinear local illumination compensation according to the first parameter and the prediction value corresponding to the second prediction block to obtain the second prediction value of the first pixel. Optionally, the first prediction value, the prediction value corresponding to the second prediction block, and the first parameter may be input into a local illumination compensation module, and the second prediction value of the first pixel may be output. The local illumination compensation module may be provided with a nonlinear local illumination compensation model and / or a linear local illumination compensation model.
[0214] Optionally, based on the first prediction value, the prediction value corresponding to the second prediction block and the first parameter, the second prediction value of the first pixel is determined or obtained, and then local illumination compensation can be performed on the first prediction value, so that the obtained second prediction value is more accurate and effective, thereby improving the efficiency of video encoding and / or decoding.
[0215] Method 2: determining or obtaining a second predicted value of the first pixel according to the third predicted value and the sixth predicted value;
[0216] Optionally, the third prediction value is determined or obtained based on the first prediction value and the first parameter. The sixth prediction value is determined or obtained based on the prediction value corresponding to the second prediction block and the second parameter. The second parameter can be an LIC parameter, a model parameter of a nonlinear local illumination compensation model, such as a filter coefficient, a weight coefficient, etc., and the specific value can be the same as or different from the first parameter. The second prediction block can be at least one block that the current block is divided and predicted. Optionally, the first prediction value can be determined or obtained based on at least one of the methods 1 to 5 in the above embodiments. The first parameter can be determined or obtained based on at least one of the methods 1 to 4 in the above embodiments. Optionally, the third prediction value and the sixth prediction value can be input into the local illumination compensation module, and the second prediction value of the first pixel can be output. The local illumination compensation module can be provided with a nonlinear local illumination compensation model and / or a linear local illumination compensation model.
[0217] Optionally, if bidirectional prediction in an inter-frame prediction mode is used, a first predicted value Pred0 for a first pixel to be predicted in a block to be predicted (e.g., a first prediction block) can be determined using motion vector MV0 for prediction direction D0 in the bidirectional prediction. Nonlinear local illumination compensation processing can be performed based on the first predicted value MV0 and a first parameter (e.g., model parameter c0) to determine a third predicted value Pred0' after illumination compensation for the first pixel. A predicted value Pred1 for a first pixel to be predicted in a block to be predicted (e.g., a second prediction block) can be determined using motion vector MV1 for prediction direction D1 in the bidirectional prediction. Nonlinear local illumination compensation processing can be performed based on the predicted value Pred1 and the first parameter (e.g., model parameter c1) to determine a sixth predicted value Pred1' after illumination compensation for the first pixel. A final second predicted value Pred for the first pixel can be determined based on the illumination-compensated predicted value Pred0' and the illumination-compensated predicted value Pred1'. For example, a weighted calculation can be performed on the predicted value Pred0' and the predicted value Pred1' to obtain the second predicted value Pred. Optionally, for the bidirectional prediction manner in the inter-frame prediction mode, different nonlinear local illumination compensation models may be constructed for different prediction directions, and the model parameters c0 and c1 may be determined respectively.
[0218] Optionally, when performing weighted processing calculations, you can refer to the following method. For example, set the default weight to 0.5. If weighted processing is performed on the predicted value Pred0 and the predicted value Pred1, the weighted result is calculated using the following formula: Predw = 0.5*predicted value Pred0 + 0.5*predicted value Pred1; optionally, the corresponding weight can also be calculated using the rate-distortion cost.
[0219] Optionally, by determining or obtaining a third prediction value based on the first prediction value and the first parameter, and determining or obtaining a sixth prediction value based on the prediction value corresponding to the second prediction block and the second parameter, since the third prediction value and the sixth prediction value are both compensated prediction values, the second prediction value determined or obtained based on the third prediction value and the sixth prediction value is also more accurate and effective, thereby improving the efficiency of video encoding and / or decoding.
[0220] Method 3: determining or obtaining a second prediction value of the first pixel according to the fifth prediction value and the first parameter;
[0221] Optionally, the fifth prediction value is determined or obtained based on the first prediction value and the prediction value corresponding to the second prediction block. The second prediction block may be at least one block into which the current block is divided and predicted. Optionally, the first prediction value may be determined or obtained based on at least one of Methods 1 to 5 in the above-described embodiments. The first parameter may be determined or obtained based on at least one of Methods 1 to 4 in the above-described embodiments. Optionally, the first pixel in this embodiment may be the first pixel to be predicted.
[0222] Optionally, the fifth predicted value and the first parameter may be input into a local illumination compensation module, and the second predicted value of the first pixel may be output. The local illumination compensation module may be provided with a nonlinear local illumination compensation model and / or a linear local illumination compensation model.
[0223] Optionally, if a bidirectional prediction method in an inter-frame prediction mode is used, a first prediction value Pred0 of a first pixel to be predicted in a block to be predicted (e.g., a first prediction block) can be determined using motion vector MV0 for prediction direction D0 in the bidirectional prediction; a prediction value Pred1 of a first pixel to be predicted in a block to be predicted (e.g., a second prediction block) can be determined using motion vector MV1 for prediction direction D1 in the bidirectional prediction. A weighted calculation is performed on the prediction values Pred0 and Pred1 to determine a weighted fifth prediction value Predw; and nonlinear local illumination compensation is performed based on the fifth prediction value Predw and a first parameter (e.g., a model parameter c) to determine a second prediction value Pred1 after illumination compensation for the first pixel.
[0224] Optionally, for the bidirectional prediction method in the inter-frame prediction mode, only one nonlinear local illumination compensation model can be constructed for different prediction directions to determine the model parameter c. As shown in Figure 13, the motion vector MV0 corresponds to the upper reference template 0 and the left reference template 0, and the motion vector MV1 corresponds to the upper reference template 1 and the left reference template 1. Next, the pixel values in the upper reference template 0 and / or the left reference template 0, as well as the upper reference template 1 and / or the left reference template 1, are weightedly predicted to obtain the weighted upper reference template and / or the weighted left reference template. Thereafter, the pixel values Ref1 to RefN of the pixels in the weighted upper reference template and / or the weighted left reference template are used as RefY11, RefY12..., RefY1N in formula (4) in the above embodiment to determine the first parameter, such as the filter coefficient.
[0225] Optionally, by determining or obtaining a fifth prediction value based on the first prediction value and the prediction value corresponding to the second prediction block, and then determining or obtaining a second prediction value based on the fifth prediction value and the first parameter, the obtained second prediction value can be illumination compensated, thereby improving the accuracy and effectiveness of the second prediction value, thereby improving the efficiency of video encoding and / or decoding.
[0226] Method 4: Determine or obtain the second prediction value of the first pixel based on at least one of the first prediction value, the offset value, the nonlinear term, the position information, the gradient information, and the first parameter.
[0227] Optionally, the first prediction value can be determined or obtained according to at least one of the methods 1 to 5 in the above embodiments. The first parameter can be determined or obtained according to at least one of the methods 1 to 4 in the above embodiments, and then the second prediction value of the first pixel can be determined or obtained according to the first prediction value, the offset value, the nonlinear term, the position information, the gradient information and at least one of the first parameter. Optionally, at least one of the first prediction value, the offset value, the nonlinear term, the position information, the gradient information and the first parameter can be input into the local illumination compensation module, and the second prediction value of the first pixel can be obtained as an output. The local illumination compensation module can be provided with a nonlinear local illumination compensation model and / or a linear local illumination compensation model.
[0228] Alternatively, if a nonlinear local illumination compensation model is: PreY1′=f(PreY1, PreY2, PreY3, ..., PreYN) (Formula 1);
[0229] To reduce the amount of calculation, an offset value can be set in Equation 1, and a set of offset values can be selected from the upper template and the left template corresponding to the current block. The pixel value of the upper left corner pixel of the upper current template can be selected as the offset value CurOffset, and the pixel value of the upper left corner pixel of the upper reference template can be selected as the offset value RefOffset. Optionally, if the offset value is set, Equation (1) can be updated to Equation (9), that is: PreY1'=f(PreY1-RefOffset,PreY2-RefOffset,PreY3-RefOffset,...,PreYN-RefOffset)+CurOffset Equation (9);
[0230] Optionally, if the first parameter needs to be determined, it can be determined according to the following formula (10), that is: CurY1=f(RefY11-RefOffset,RefY12-RefOffset,RefY13-RefOffset,...,RefY1N-RefOffset)+CurOffset Formula (10).
[0231] Alternatively, if a nonlinear local illumination compensation model can be: PreY1′=f(PreY1, PreY2, PreY3, . . . , PreYN);
[0232] Optionally, the brightness component is used as an example. PreY1 is the predicted pixel value determined by the brightness pixel Y1 through the first prediction mode (or the first prediction method). PreY2, PreY3, ..., PreYN are the predicted pixel values determined by the first prediction mode (or the first prediction method) of other brightness pixels Y2, Y3, ..., YN around the brightness pixel Y1. The predicted brightness pixel values of the brightness pixel Y1 and the other brightness pixels Y2, Y3, ..., YN around it are determined by the first prediction method. The brightness pixel Y1 is further locally compensated for illumination by these predicted brightness pixel values to obtain the predicted brightness pixel value PreY1 after compensation processing of the brightness pixel Y1. / The first prediction mode may be a default prediction mode, an inter-frame prediction mode, an intra-frame prediction mode, a prediction mode in a candidate list, such as at least one corresponding prediction mode among motion estimation, motion compensation, and sub-pixel interpolation, or a prediction mode such as a merge mode, a geometric partitioning mode, an advanced motion vector prediction mode, or a sub-block-based inter-frame prediction mode.
[0233] Optionally, a nonlinear local illumination compensation model may also be Formula (2), that is: PreY1′=c0*PreY1+c1*PreY2+c2*PreY3+c3*PreY4+c4*PreY5+c5*P1+c6*P2+c7*P3+c8*P4+c9*P5+c10*B Formula (2);
[0234] It can also be obtained by transforming formula (2):
[0235] PreY1′=c0*PreY1+c1*PreY2+c2*PreY3+c3*PreY4+c4*PreY5+ca*diagonal pixel+cb*position information+cc*gradient information+c5*P1+c6*P2+c7*P3+c8*P4+c9*P5+c10*B;
[0236] Optionally, c0-c10, ca, cb, cc are model parameters, i.e., first parameters (such as filter coefficients or weight coefficients). PreY1-PreY5 are predicted pixel values determined by the first prediction mode (or first prediction method). Optionally, PreY1 is the predicted pixel value determined by the luma pixel Y1 by the first prediction mode (or first prediction method), and PreY2, PreY3, ..., PreY5 are the predicted pixel values of other luma pixels Y2, Y3, ..., Y5 around the luma pixel Y1 by the first prediction mode. P1-P5 are nonlinear terms. Optionally, P1-P5 are the squares of PreY1-PreY5. In another embodiment, P1-P5 are the squares of PreY1-PreY5 and are scaled to the bit depth range. That is, P1=(PreY1*PreY1+midVal)>>bitDepth; bitDepth is the bit depth corresponding to the sample, and ">>" is the right shift sign. For example, for 10-bit video content, P is calculated by the following formula: P = (PreY1*PreY1+512)>>10;
[0237] Optionally, the formula (2) may further include a bias value B. In one embodiment, the bias value B may be 0. In another embodiment, it may be another predetermined value (for example, for 10-bit video, it may be set to 512). Optionally, the nonlinear term in the formula (2) may include only one term. That is, it only includes the square of the pixel value of PreY1. In this case, the formula (2) has the form shown in the formula (3): PreY1'=c0*PreY1+c1*PreY2+c2*PreY3+c3*PreY4+c4*PreY5+c5*P1+c6*B Formula (3);
[0238] The positional relationship of luma pixels Y1-Y5 can be shown in FIG14 , where luma pixel Y1 is located between luma pixels Y2-Y5, luma pixel Y2 is located above luma pixel Y1, luma pixel Y3 is located to the left of luma pixel Y1, luma pixel Y4 is located to the right of luma pixel Y1, and luma pixel Y5 is located below luma pixel Y1. Alternatively, luma predicted pixel values PreY1-PreY5 determined by the first prediction mode (or first prediction method) for luma pixels Y1-Y5 are shown in FIG15 .
[0239] Optionally, based on at least one of the first prediction value, offset value, nonlinear item, position information, gradient information and first parameter, the second prediction value of the first pixel is determined or obtained, thereby ensuring that the obtained second prediction value is more accurate and effective, thereby improving the efficiency of video encoding and / or decoding.
[0240] Optionally, the local illumination compensation module of any one of the above-mentioned methods 1 to 4 of this embodiment can refer to Figures 16 and 17. As shown in Figure 16, the first predicted value can be PreY1-PreY5, the bias value is B, the first parameter is C0-C9, and P1-P5 is a nonlinear term. And the second predicted value PreY1' is calculated by the summation module. As shown in Figure 17, the first predicted value can be PreY1-PreY5, the bias value is B, the first parameter is C0-C6, and P1 is a nonlinear term. And the second predicted value PreY1 is calculated by the summation module / .
[0241] Optionally, the connection relationship between the local illumination compensation module and the first prediction module in the inter-frame prediction module can be shown in Figure 10 below, including the pixel to be predicted, the inter-frame prediction module, and the compensated predicted pixel value PreY1. The inter-frame prediction module is provided with the first prediction module and the nonlinear local illumination compensation module, and the predicted pixel values input to the inter-frame prediction module (such as the first prediction value) include PreY1, PreY2, PreY3, PreY4, and PreY5.
[0242] Optionally, the first prediction module and the nonlinear local illumination compensation module are both located in the inter-frame prediction module. Optionally, in other embodiments, at least one of the first prediction module and the nonlinear local illumination compensation module is located in the inter-frame prediction module, and both need not be located in the inter-frame prediction module; or at least one of the first prediction module and the nonlinear local illumination compensation module may also be located in the intra-frame prediction module, or at least one of the first prediction module and the nonlinear local illumination compensation module are both located in the intra-frame prediction module.
[0243] Optionally, the input of a subsequent nonlinear local illumination compensation module is determined by the first prediction mode corresponding to the first prediction module. That is, at least a portion of the input of the nonlinear local illumination compensation module is the predicted pixel value determined by the first prediction module. In one embodiment, the first prediction mode may be an inter-frame prediction mode. The motion vector involved in the inter-frame prediction mode may be a motion vector determined by motion estimation, a motion vector determined by a merged motion vector prediction list (MergeMVP list) in a merge mode, a motion vector determined by a motion vector prediction list (MVP list) in an advanced motion vector prediction mode, a motion vector obtained in a symmetric motion vector difference mode, a motion vector determined in a sub-block-based temporal motion vector prediction mode, a motion vector determined in a sub-block-based affine motion compensation mode, a motion vector determined in an affine merge mode, a motion vector obtained in an affine advanced motion vector predictable mode, a motion vector obtained using a decoder-side motion vector refinement (DMVR) technique, or a motion vector determined in a motion vector prediction list (MVP list) in a geometric partitioning mode. After the motion vector is determined in the first prediction mode, the motion vector is used to determine the predicted pixel value of the pixel in the to-be-predicted block, so as to further perform nonlinear local illumination compensation processing.
[0244] Through the technical solution of this embodiment, the accuracy of pixel prediction values can be improved, thereby improving the efficiency of video encoding and / or decoding.
[0245] Fourth embodiment
[0246] Based on any of the above embodiments, a fourth embodiment is proposed. In this embodiment, the processing method further includes step S20, encoding according to the second prediction value.
[0247] The processing method can be applied to the encoding side. For example, after determining the second prediction value corresponding to at least one pixel of the current block, the encoder or encoding end on the encoding side can perform encoding based on the second prediction value to generate a corresponding bitstream. The bitstream is decoded on the decoding side.
[0248] Optionally, step S20 includes the following steps:
[0249] S21. Determine or obtain a prediction result of the first pixel according to the second prediction value and the seventh prediction value;
[0250] S22. Encode according to the prediction result.
[0251] Optionally, the processing method in this embodiment further includes at least one of the following:
[0252] The seventh prediction value is determined or obtained according to the linear local illumination compensation corresponding to the first pixel; the first pixel is a pixel in the current block or a pixel in a neighboring block corresponding to the current block;
[0253] Optionally, nonlinear illumination compensation may be performed on the first predicted value of the first pixel to obtain a second predicted value, and linear illumination compensation may be performed on the first predicted value of the first pixel to obtain a seventh predicted value. Optionally, a prediction result for the first pixel may be determined or obtained based on the second predicted value and the seventh predicted value, and then the encoder may encode the prediction result to generate a corresponding bitstream.
[0254] Optionally, a rate-distortion cost calculation can be performed for linear local illumination compensation and nonlinear local illumination compensation to obtain the cost corresponding to the nonlinear local illumination compensation, i.e., the first point corresponding to the second predicted value, and the cost corresponding to the linear local illumination compensation, i.e., the second cost corresponding to the seventh predicted value. Optionally, the ratio of the first cost to the second cost can be determined, and the prediction result of the first pixel can be determined based on the ratio. Alternatively, the total cost between the first cost and the second cost can be determined, and then the prediction result of the first pixel can be determined based on the proportion of the first cost and the second cost in the total cost. The first cost and the second cost can be rate-distortion costs.
[0255] Optionally, by determining or obtaining a prediction result of the first pixel based on the second prediction value and the seventh prediction value, and then encoding according to the prediction result, the accuracy and effectiveness of the prediction result can be improved by means of illumination compensation, thereby improving the efficiency of video encoding.
[0256] Step S21 includes the following method 1 and / or method 2:
[0257] In method 1, if the ratio between the first cost (e.g., rate-distortion cost) corresponding to the second prediction value and the second cost (e.g., rate-distortion cost) corresponding to the seventh prediction value is within a first range (e.g., the numerical range / ratio range mentioned above), then determining or obtaining a prediction result for the first pixel according to the first method;
[0258] Optionally, the first range can be associated with a ratio threshold. A ratio threshold can be set in advance and used as the first threshold, such as 0.5. The ratio between the first cost and the second cost is calculated, and the ratio is compared with the first threshold. If the ratio is less than the first threshold, the prediction result of the first pixel can be directly determined or obtained according to the first method. The first method can be nonlinear local illumination compensation. Therefore, the second prediction value can be directly used as the prediction result of the first pixel. The second prediction value can also be deformed to obtain the prediction result of the first pixel.
[0259] Optionally, by ensuring that the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within a first range (for example, numerical range / ratio range), the prediction result of the first pixel is determined or obtained according to the first method, thereby saving resources while improving the accuracy of pixel prediction, thereby improving the efficiency of video encoding.
[0260] In approach 2, if a ratio between a first cost (e.g., rate-distortion cost) corresponding to the second prediction value and a second cost (e.g., rate-distortion cost) corresponding to the seventh prediction value is within a second range (e.g., value range / ratio range), determining or obtaining a prediction result for the first pixel according to the second approach;
[0261] Optionally, the second range may be associated with a ratio threshold. A ratio threshold may be set in advance and used as the second threshold. The second threshold may be the same as or different from the first threshold. Optionally, if the ratio between the first cost and the second cost is greater than the second threshold (i.e., corresponding to the second numerical range), the prediction result of the first pixel may be directly determined or obtained according to the second method. The second method may be linear local illumination compensation. Therefore, the seventh prediction value may be directly used as the prediction result of the first pixel. The seventh prediction value may also be deformed to obtain the prediction result of the first pixel.
[0262] Optionally, by ensuring that the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the second range, the prediction result of the first pixel is determined or obtained according to the second method, thereby saving resources while improving the accuracy of pixel prediction, thereby improving the efficiency of video encoding.
[0263] Optionally, the first range and / or the second range may be at least one of the numerical ranges 11 to 13, the numerical ranges 21 to 22, the numerical ranges 31 to 32, and the numerical ranges 41 to 42. The first threshold and / or the second threshold may be at least one of thresholds 1 to 3.
[0264] Optionally, the first method and / or the second method are compensation methods. Optionally, the first method and / or the second method may be at least one of performing linear compensation on the first predicted value based on linear model parameters and performing nonlinear compensation on the first predicted value based on nonlinear model parameters. Optionally, the first method may also be a compensation method that performs linear compensation on the first predicted value based on linear model parameters. Optionally, the second method may also be a compensation method that performs nonlinear compensation on the first predicted value based on nonlinear model parameters. Optionally, the first method may also be a combination of performing linear compensation on the first predicted value based on linear model parameters and performing nonlinear compensation on the first predicted value based on nonlinear model parameters. Optionally, the second method may also be a compensation method that performs nonlinear compensation on the first predicted value based on nonlinear model parameters. Optionally, the first method may also be a combination of performing linear compensation on the first predicted value based on linear model parameters and performing nonlinear compensation on the first predicted value based on nonlinear model parameters. Optionally, the second method may also be a compensation method that performs linear compensation on the first predicted value based on nonlinear model parameters.
[0265] In one embodiment scenario, optionally, the encoding end can be used to determine or obtain a first prediction value of at least one first pixel; determine or obtain a second prediction value of the at least one first pixel based on the first prediction value and the first parameter, and encode the current block based on the second prediction value.
[0266] Optionally, determining or obtaining the first prediction value of at least one first pixel may include at least one of the following: determining or obtaining the first prediction value of at least one first pixel according to at least one item in a default prediction mode, an inter-frame prediction mode, an intra-frame prediction mode, and a candidate list, wherein the at least one first pixel is a pixel in the current block; determining or obtaining the first prediction value of at least one first pixel in the current block according to the pixel value, position, and / or motion information of at least one second pixel; determining or obtaining the first prediction value of at least one first pixel in the current block according to the pixel value, position, motion information, and / or prediction mode of at least one first image block; determining or obtaining the first prediction block and / or the second prediction block of the current block, and determining or obtaining the first prediction value of at least one first pixel in the current block according to one or a combination of the prediction value corresponding to the first prediction block and the prediction value corresponding to the second prediction block.
[0267] Optionally, at least one second pixel is a pixel in at least one image block corresponding to the current block, including the first default block, the first neighbor block, the first non-neighbor block, the first co-located block, the first reference block, and the second image block with a color component different from that of the current block; at least one first image block is at least one image block corresponding to the current block, including the second default block, the second neighbor block, the second non-neighbor block, the second co-located block, the second reference block, and the third image block with a color component different from that of the current block; and the first pixel is the second color component.
[0268] Optionally, the method of determining or obtaining the first parameter includes at least one of the following: determining or obtaining based on the pixel value of at least one third pixel; determining or obtaining based on at least one nonlinear local illumination compensation model; determining or obtaining based on a reference pixel determined from at least one of a third default block, a third neighbor block, a third non-neighbor block, a third co-located block, and a third reference block corresponding to the current block; determining or obtaining based on a reference template that matches the current template and the current template corresponding to the current block where the first pixel is located.
[0269] Optionally, determining or obtaining a second prediction value of at least one first pixel based on the first prediction value and the first parameter includes at least one of the following: the first prediction value includes a prediction value corresponding to the first prediction block, and determining or obtaining the second prediction value of at least one first pixel based on the first prediction value, the prediction value corresponding to the second prediction block and the first parameter; determining or obtaining the second prediction value of at least one first pixel based on at least one of the first prediction value, the offset value, the nonlinear item, the position information, the gradient information and the first parameter.
[0270] Optionally, the first prediction value includes the prediction value corresponding to the first prediction block, and determining or obtaining the second prediction value of at least one first pixel based on the first prediction value, the prediction value corresponding to the second prediction block and the first parameter, including at least one of the following: determining or obtaining a third prediction value based on the first prediction value and the first parameter, determining or obtaining a sixth prediction value based on the prediction value corresponding to the second prediction block and the second parameter, and determining or obtaining the second prediction value of at least one first pixel based on the third prediction value and the sixth prediction value; determining or obtaining a fifth prediction value based on the first prediction value and the prediction value corresponding to the second prediction block, and determining or obtaining the second prediction value of at least one first pixel based on the fifth prediction value and the first parameter.
[0271] Optionally, the offset value is determined by a pixel in the current template and / or the reference template corresponding to at least one first pixel, or is determined by at least one pixel in at least one of a default block, a neighbor block, a non-neighbor block, a co-located block, a time domain block, and a reference block corresponding to the current block, and / or the method for determining or obtaining the nonlinear term includes at least one of the following: determining or obtaining based on the first prediction value; determining or obtaining based on the prediction value of the neighbor pixel and / or non-neighbor pixel corresponding to at least one first pixel.
[0272] Optionally, the step of encoding according to the second prediction value includes: determining a sixth prediction value of linear local illumination compensation corresponding to at least one first pixel; determining or obtaining a prediction result of the first pixel based on the second prediction value and the sixth prediction value, and encoding according to the prediction result.
[0273] Optionally, at least one first pixel is a pixel in the current block or a pixel in a neighboring block corresponding to the current block, and the determining or obtaining of the prediction result of the first pixel based on the second prediction value and the sixth prediction value includes at least one of the following: if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the sixth prediction value is within a first range, the prediction result of the first pixel is determined or obtained according to a first method; if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the sixth prediction value is within a second range, the prediction result of the first pixel is determined or obtained according to a second method.
[0274] Through the technical solution of this embodiment, the accuracy of pixel prediction values can be improved, thereby improving the efficiency of video encoding and / or decoding.
[0275] Fifth embodiment
[0276] Based on any of the above embodiments, a fifth embodiment is proposed. In this embodiment, the processing method further includes step S20, decoding according to the second prediction value.
[0277] The processing method may be applied to a decoding end, for example, a decoder or a decoding end in the decoding side may perform decoding according to the second prediction value after determining the second prediction value corresponding to at least one pixel of the current block.
[0278] Optionally, in this embodiment, the processing method further includes at least one of the following:
[0279] The first pixel is a pixel in a neighboring block corresponding to the current block; the seventh prediction value is determined or obtained by linear local illumination compensation corresponding to the first pixel;
[0280] Optionally, step S20 includes method 1 and / or method 2:
[0281] In method 1, a residual corresponding to the first pixel is determined according to a syntax element obtained from a bitstream, and decoding is performed according to the residual and a second prediction value.
[0282] Optionally, the decoder can obtain corresponding syntax elements in the bitstream, such as transform coefficients. Then, the reference corresponding to the first pixel is determined based on the transform coefficients. For example, the decoding unit of the decoder parses and decodes the encoded bitstream to obtain the transform coefficients; the inverse transform unit and inverse quantization unit of the decoder perform inverse transform and inverse quantization on the transform coefficients to obtain a residual block (i.e., the residual corresponding to the first pixel). The prediction block and the residual corresponding to the second prediction value are processed, such as by addition, to obtain a reconstructed block, thereby completing the corresponding decoding process.
[0283] Optionally, by determining the residual corresponding to the first pixel according to the syntax elements obtained in the bitstream on the decoding side, and performing decoding according to the residual and the second prediction value, the decoding process can be effectively carried out, thereby improving decoding efficiency.
[0284] Mode 2: determining or obtaining a prediction result of the first pixel according to the second prediction value and / or the seventh prediction value, and decoding the current block according to the prediction result.
[0285] Optionally, the decoder may determine the prediction result for the first pixel using the seventh prediction value obtained by linear local illumination compensation and / or the second prediction value obtained by nonlinear local illumination compensation. Optionally, after determining the prediction result for the first pixel, the decoder may directly perform decoding based on the prediction result. Alternatively, decoding may be performed by combining the prediction result with a residual determined based on the bitstream.
[0286] Optionally, by determining or obtaining the prediction result of the first pixel based on the second prediction value and / or the seventh prediction value, and then decoding the current block based on the prediction result, the accuracy of the pixel prediction value (i.e., the prediction result) can be improved, thereby improving the efficiency of video decoding.
[0287] Optionally, the prediction result of the first pixel is determined or obtained by the following method 1 and / or method 2:
[0288] Method 1: If the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within a first range (e.g., value range / ratio range), determining or obtaining the prediction result of the first pixel according to the first method;
[0289] Optionally, the first range may be associated with a ratio threshold. A ratio threshold may be set in advance and used as the first threshold, such as 0.5.
[0290] Alternatively, the first threshold may be a threshold agreed upon between the decoding side and the encoding side. Alternatively, a ratio between the first cost and the second cost is calculated and compared with the first threshold. If the ratio is less than the first threshold (i.e., corresponding to the first numerical range), the prediction result for the first pixel may be directly determined or obtained according to the first method. The first method may be nonlinear local illumination compensation. Therefore, the second prediction value may be directly used as the prediction result for the first pixel. Alternatively, the second prediction value may be deformed to obtain the prediction result for the first pixel.
[0291] Optionally, by ensuring that the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the first range, the prediction result of the first pixel is determined or obtained according to the first method, thereby saving resources while improving the accuracy of pixel prediction, thereby improving the efficiency of video decoding.
[0292] In a second method, if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within a second range (e.g., a numerical range), a prediction result of the first pixel is determined or obtained according to the second method;
[0293] Optionally, the second range may be associated with a ratio threshold. A ratio threshold may be set in advance and used as the second threshold. The second threshold may be the same as or different from the first threshold. Optionally, the second threshold may be a threshold agreed upon by the decoding side and the encoding side.
[0294] Optionally, if the ratio between the first cost and the second cost is greater than a second threshold (i.e., corresponding to a second numerical range), the prediction result for the first pixel can be directly determined or obtained according to the second method. The second method can be linear local illumination compensation. Therefore, the seventh prediction value can be directly used as the prediction result for the first pixel. The seventh prediction value can also be deformed to obtain the prediction result for the first pixel. Optionally, by determining or obtaining the prediction result for the first pixel according to the second method when the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the second range, resources can be saved while improving the accuracy of pixel prediction, thereby improving the efficiency of video decoding. Optionally, the first range and / or the second range can also be at least one of the numerical ranges 11 to 13, 21 to 22, 31 to 32, and 41 to 42. The first threshold and / or the second threshold can be at least one of thresholds 1 to 3.
[0295] Optionally, the first method may also be a compensation method for linearly compensating the first predicted value according to the linear model parameters; the second method may also be a compensation method for nonlinearly compensating the first predicted value according to the nonlinear model parameters. Optionally, the first method may also be a compensation method for linearly compensating the first predicted value according to the linear model parameters and a compensation method for nonlinearly compensating the first predicted value according to the nonlinear model parameters (for example, a compensation method for combining the linear compensation and nonlinear compensation methods in a weighted manner); the second method may also be a compensation method for nonlinearly compensating the first predicted value according to the nonlinear model parameters. Optionally, the first method may also be a compensation method for linearly compensating the first predicted value according to the nonlinear model parameters; the second method may also be a compensation method for linearly compensating the first predicted value according to the linear model parameters and a compensation method for nonlinearly compensating the first predicted value according to the nonlinear model parameters (for example, a compensation method for combining the linear compensation and nonlinear compensation methods in a weighted manner).
[0296] In one scenario embodiment, optionally, the decoding end can be used to determine or obtain a first prediction value of at least one first pixel; determine or obtain a second prediction value of at least one first pixel based on the first prediction value and the first parameter, and decode the current block based on the second prediction value.
[0297] Optionally, determining or obtaining the first prediction value of at least one first pixel includes at least one of the following: determining or obtaining the first prediction value of at least one first pixel based on a syntax element obtained from a code stream; determining or obtaining the first prediction value of at least one first pixel based on a default prediction mode, an inter-frame prediction mode, an intra-frame prediction mode, and at least one item in a candidate list; determining or obtaining the first prediction value of at least one first pixel in the current block based on the pixel value, position, and / or motion information of at least one second pixel; determining or obtaining the first prediction value of at least one first pixel in the current block based on the pixel value, position, motion information, and / or prediction mode of at least one first image block; determining or obtaining the first prediction block and / or the second prediction block of the current block, and determining or obtaining the first prediction value of at least one first pixel in the current block based on one or a combination of the prediction value corresponding to the first prediction block and the prediction value corresponding to the second prediction block.
[0298] Optionally, the at least one second pixel is a pixel in at least one of the following image blocks: a first default block, a first neighbor block, a first non-neighbor block, a first co-located block, a first reference block, or a second image block having a different color component from the current block, corresponding to the current block. Optionally, the at least one first image block is at least one of the following image blocks: a second default block, a second neighbor block, a second non-neighbor block, a second co-located block, a second reference block, or a third image block having a different color component from the current block, corresponding to the current block. Optionally, the first pixel is a second color component.
[0299] Optionally, the method for determining or obtaining the first parameter includes at least one of the following: determining or obtaining based on the pixel value of at least one third pixel; determining or obtaining based on at least one nonlinear local illumination compensation model; determining or obtaining based on a reference pixel determined from at least one of a third default block, a third neighbor block, a third non-neighbor block, a third co-located block, a third time domain block, and a third reference block corresponding to the current block; determining or obtaining based on a current template corresponding to the current block where the first pixel is located, and / or a reference template matching the current template.
[0300] Optionally, determining or obtaining a second predicted value of at least one first pixel based on the first predicted value and the first parameter includes at least one of the following: the first predicted value includes a predicted value corresponding to the first prediction block, and determining or obtaining the second predicted value of at least one first pixel based on the first predicted value, the predicted value corresponding to the second prediction block, and the first parameter; determining or obtaining the second predicted value of at least one first pixel based on at least one of the first predicted value, the offset value, the nonlinear term, the position information, the gradient information, and the first parameter. Optionally, the first predicted value includes a predicted value corresponding to the first prediction block, and determining or obtaining the second predicted value of at least one first pixel based on the first predicted value, the predicted value corresponding to the second prediction block, and the first parameter includes at least one of the following: determining or obtaining a third predicted value based on the first predicted value and the first parameter, determining or obtaining a sixth predicted value based on the predicted value corresponding to the second prediction block and the second parameter, and determining or obtaining the second predicted value of at least one first pixel based on the third predicted value and the sixth predicted value; determining or obtaining a fifth predicted value based on the first predicted value and the predicted value corresponding to the second prediction block, and determining or obtaining the second predicted value of at least one first pixel based on the fifth predicted value and the first parameter.
[0301] Optionally, the offset value is determined by a pixel in the current template and / or the reference template corresponding to at least one first pixel, or is determined by the pixel value of at least one pixel in at least one item of a default block, a neighbor block, a non-neighbor block, a co-located block, a time domain block, and a reference block corresponding to the current block, and / or the method of determining or obtaining the nonlinear term includes at least one of the following: determining or obtaining based on the first predicted value; determining or obtaining based on the predicted value of the neighbor pixel and / or non-neighbor pixel corresponding to at least one first pixel.
[0302] Optionally, decoding based on the second prediction value includes: determining a residual corresponding to the at least one first pixel based on syntax elements obtained from the bitstream, and decoding based on the residual and the second prediction value. Optionally, determining a sixth prediction value for linear local illumination compensation corresponding to the at least one first pixel; determining or obtaining a prediction result for the first pixel based on the second prediction value and / or the sixth prediction value, and decoding the current block based on the prediction result.
[0303] Optionally, at least one first pixel is a pixel in a neighboring block corresponding to the current block, and the determining or obtaining of the prediction result of the first pixel based on the second prediction value and the sixth prediction value includes at least one of the following: if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the sixth prediction value is within a first range (for example, a numerical range / ratio range), the prediction result of the first pixel is determined or obtained according to a first method; if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the sixth prediction value is within a second range (for example, a numerical range / ratio range), the prediction result of the first pixel is determined or obtained according to a second method; if the ratio between the first cost corresponding to the sixth prediction value and the second cost corresponding to the second prediction value is greater than a third threshold, the prediction result of the first pixel is determined or obtained according to a third prediction method.
[0304] The present application also provides a processing device, referring to FIG11 . FIG11 is a schematic diagram of the functional modules of the processing device of the present application, which can be provided in or on a processing device. The processing device includes:
[0305] The processing module A10 is configured to determine or obtain a second predicted value of the first pixel according to the first predicted value and the first parameter.
[0306] Optionally, the method for determining or obtaining the first prediction value includes at least one of the following: determining or obtaining the first prediction value of at least one first pixel in at least one current block according to a default prediction mode, an inter-frame prediction mode, an intra-frame prediction mode, and at least one item in a candidate list; determining or obtaining the first prediction value of at least one first pixel in the current block according to the pixel value, position and / or motion information of at least one second pixel; determining or obtaining the first prediction value of at least one first pixel in the current block according to the pixel value, position, motion information and / or prediction mode of at least one first image block; determining or obtaining the first prediction block and / or the second prediction block of the current block, and determining or obtaining the first prediction value of at least one first pixel in the current block according to the prediction value corresponding to the first prediction block and / or the prediction value corresponding to the second prediction block; determining or obtaining the first prediction value of the first pixel according to the syntax elements obtained in the code stream for decoding processing.
[0307] Optionally, the first pixel is the second color component; the second pixel is a pixel in at least one image block of the first default block, the first neighbor block, the first non-neighbor block, the first co-located block, and the first reference block corresponding to the current block; the second pixel is a pixel in a second image block with a different color component from the current block; the first image block is at least one image block of the second default block, the second neighbor block, the second non-neighbor block, the second co-located block, and the second reference block corresponding to the current block; the first image block is a third image block with a different color component from the current block.
[0308] Optionally, the first parameter is determined or obtained by at least one of the following: the pixel value of at least one third pixel; at least one nonlinear local illumination compensation model; a reference pixel determined by at least one of a third default block, a third neighbor block, a third non-neighbor block, a third co-located block, and a third reference block corresponding to the current block; a current template corresponding to the current block where the first pixel is located, and / or a reference template that matches the current template.
[0309] Optionally, the processing module A10 is used to perform at least one of the following: determine or obtain the second prediction value of the first pixel based on the first prediction value, the prediction value corresponding to the second prediction block, and the first parameter; determine or obtain the second prediction value of the first pixel based on the third prediction value and the sixth prediction value; determine or obtain the second prediction value of the first pixel based on the fifth prediction value and the first parameter; determine or obtain the second prediction value of the first pixel based on at least one of the first prediction value, the offset value, the nonlinear term, the position information, the gradient information, and the first parameter.
[0310] Optionally, the first prediction value includes the prediction value corresponding to the first prediction block; the third prediction value is determined or obtained based on the first prediction value and the first parameter; the sixth prediction value is determined or obtained based on the prediction value corresponding to the second prediction block and the second parameter; the fifth prediction value is determined or obtained based on the first prediction value and the prediction value corresponding to the second prediction block; the offset value is determined by a pixel in the current template and / or the reference template corresponding to at least one first pixel; the offset value is determined by at least one pixel in at least one item of the default block, neighbor block, non-neighbor block, co-located block, time domain block, and reference block corresponding to the current block; the nonlinear item is determined or obtained based on the first prediction value; the nonlinear item is determined or obtained based on the prediction value of the neighbor pixel and / or non-neighbor pixel corresponding to the first pixel.
[0311] Optionally, the processing module A10 is configured to: perform encoding or decoding according to the second prediction value.
[0312] Optionally, the processing module A10 is configured to: determine or obtain a prediction result of the first pixel according to the second prediction value and the seventh prediction value; and perform encoding according to the prediction result.
[0313] Optionally, the seventh prediction value is determined or obtained according to a linear local illumination compensation corresponding to a first pixel; the first pixel is a pixel in the current block or a pixel in a neighboring block corresponding to the current block;
[0314] Optionally, the processing module A10 is used to perform at least one of the following: if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within a first range, determining or obtaining the prediction result of the first pixel according to a first method; if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within a second range, determining or obtaining the prediction result of the first pixel according to a second method.
[0315] Optionally, the processing module A10 is used to perform at least one of the following: determining the residual corresponding to the first pixel based on the syntax elements obtained in the code stream, and decoding according to the residual and the second prediction value; determining or obtaining the prediction result of the first pixel based on the second prediction value and / or the seventh prediction value, and decoding the current block according to the prediction result.
[0316] Optionally, the first pixel is a pixel in a neighboring block corresponding to the current block; the seventh prediction value is determined or obtained by linear local illumination compensation corresponding to the first pixel;
[0317] The prediction result of the first pixel is determined or obtained by at least one of the following: if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the first range, the prediction result of the first pixel is determined or obtained according to the first method; if the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the second range, the prediction result of the first pixel is determined or obtained according to the second method; if the ratio between the second cost corresponding to the seventh prediction value and the first cost corresponding to the second prediction value is greater than the third threshold, the prediction result of the first pixel is determined or obtained according to the third prediction method.
[0318] The present application also provides an intelligent terminal including a memory and a processor, wherein the memory stores a processing program that, when executed by the processor, implements the steps of the processing method in any of the above-mentioned embodiments. The present application also provides a storage medium that stores a processing program that, when executed by the processor, implements the steps of the processing method in any of the above-mentioned embodiments.
[0319] In the embodiments of the smart terminal and storage medium provided in this application, all technical features of any of the above-mentioned processing method embodiments may be included. The expanded and explained contents of the specification are basically the same as those of the embodiments of the above-mentioned methods and will not be repeated here.
[0320] The present application also provides a computer program product, which includes computer program code. When the computer program code is executed on a computer, the computer executes the methods described in the various possible embodiments. The present application also provides a chip, which includes a memory and a processor. The memory is used to store the computer program, and the processor is used to call and execute the computer program from the memory, so that a device equipped with the chip executes the methods described in the various possible embodiments.
[0321] It will be understood that the above scenarios are merely examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of the present application. The technical solutions of the present application can also be applied to other scenarios. For example, a person of ordinary skill in the art will appreciate that, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems. The serial numbers of the embodiments of the present application are for description only and do not represent the merits of the embodiments. The steps in the method of the embodiments of the present application can be adjusted in sequence, merged, and deleted according to actual needs. The units in the device of the embodiments of the present application can be merged, divided, and deleted according to actual needs.
[0322] In this application, the same or similar terminology, technical solutions and / or application scenario descriptions are generally only described in detail the first time they appear. When they appear again later, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, for the same or similar terminology, technical solutions and / or application scenario descriptions that are not described in detail later, you can refer to the previous relevant detailed descriptions.
[0323] In this application, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0324] The various technical features of the technical solution of this application can be combined arbitrarily. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0325] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as mentioned above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the method of each embodiment of the present application.
[0326] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a storage medium or transmitted from one storage medium to another storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a storage disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state storage disk Solid State Disk (SSD)).
[0327] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A processing method, wherein, Including steps: S10. Determine or obtain a second prediction value of a first pixel according to a first prediction value and a first parameter.
2. The processing method according to claim 1, wherein The method for determining or obtaining the first prediction value includes at least one of the following: Determine or obtain a first prediction value of at least one first pixel in at least one current block according to at least one of a default prediction mode, an inter prediction mode, an intra prediction mode, and a candidate list; Determine or obtain a first prediction value of at least one first pixel in the current block according to pixel values, positions, and / or motion information of at least one second pixel; Determine or obtain a first prediction value of at least one first pixel in the current block according to pixel values, positions, motion information, and / or prediction modes of at least one first image block; Determine or obtain a first prediction block and / or a second prediction block of the current block, and determine or obtain a first prediction value of at least one first pixel in the current block according to a prediction value corresponding to the first prediction block and / or a prediction value corresponding to the second prediction block; Determine or obtain a first prediction value of the first pixel according to a syntax element obtained from a bitstream for decoding processing.
3. The processing method according to claim 2, wherein, It further includes at least one of the following: The first pixel is a second color component; The second pixel is a pixel in at least one of a first default block, a first neighbor block, a first non-neighbor block, a first co-located block, and a first reference block corresponding to the current block; The second pixel is a pixel in a second image block having a different color component from that of the current block; The first image block is at least one of a second default block, a second neighbor block, a second non-neighbor block, a second co-located block, and a second reference block corresponding to the current block; The first image block is a third image block having a different color component from that of the current block.
4. The processing method according to claim 1, wherein, The first parameter is determined or obtained by at least one of the following: Pixel values of at least one third pixel; At least one non-linear local illumination compensation model; Reference pixels determined by at least one of a third default block, a third neighbor block, a third non-neighbor block, a third co-located block, and a third reference block corresponding to the current block; A current template corresponding to the current block where the first pixel is located, and / or a reference template matching the current template.
5. The processing method according to claim 1, wherein, Step S10 includes at least one of the following: Determine or obtain a second prediction value of the first pixel according to the first prediction value, a prediction value corresponding to the second prediction block, and the first parameter; Determine or obtain a second prediction value of the first pixel according to a third prediction value and a sixth prediction value; Determine or obtain a second prediction value of the first pixel according to a fifth prediction value and the first parameter; Determine or obtain a second prediction value of the first pixel according to at least one of the first prediction value, an offset value, a non-linear term, position information, gradient information, and the first parameter.
6. The processing method according to claim 5, wherein, It further includes at least one of the following: The first prediction value includes a prediction value corresponding to the first prediction block; The third prediction value is determined or obtained according to the first prediction value and the first parameter; The sixth prediction value is determined or obtained according to a prediction value corresponding to the second prediction block and a second parameter; The fifth prediction value is determined or obtained according to the first prediction value and a prediction value corresponding to the second prediction block; The offset value is determined by pixels in a current template and / or a reference template corresponding to at least one first pixel; The offset value is determined by at least one pixel in at least one of a default block, a neighbor block, a non-neighbor block, a co-located block, a time domain block, and a reference block corresponding to the current block; The nonlinear term is determined or obtained according to the first prediction value; The nonlinear term is determined or obtained according to the predicted values of the neighboring pixels and / or non-neighboring pixels corresponding to the first pixel.
7. The processing method according to claim 1, wherein Also includes the steps: S20. Encode or decode according to the second prediction value.
8. The processing method according to claim 7, wherein, Step S20 includes the following steps: S21. Determine or obtain a prediction result of the first pixel according to the second prediction value and the seventh prediction value; S22. Encode according to the prediction result.
9. The processing method according to claim 8, wherein, Also includes at least one of the following: The seventh prediction value is determined or obtained according to the linear local illumination compensation corresponding to the first pixel; The first pixel is a pixel in the current block or a pixel in a neighboring block corresponding to the current block; Step S21 includes at least one of the following: If the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the first range, determining or obtaining the prediction result of the first pixel according to the first method; If the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the second range, the prediction result of the first pixel is determined or obtained according to the second method.
10. The processing method according to claim 7, wherein, Step S20 includes at least one of the following: Determine a residual corresponding to the first pixel according to a syntax element obtained from the bitstream, and perform decoding according to the residual and the second prediction value; A prediction result of the first pixel is determined or obtained according to the second prediction value and / or the seventh prediction value, and the current block is decoded according to the prediction result.
11. The processing method according to claim 10, wherein, Also includes at least one of the following: The first pixel is a pixel in a neighboring block corresponding to the current block; The seventh prediction value is determined or obtained by linear local illumination compensation corresponding to the first pixel; The prediction result of the first pixel is determined or obtained by at least one of the following: If the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the first range, determining or obtaining the prediction result of the first pixel according to the first method; If the ratio between the first cost corresponding to the second prediction value and the second cost corresponding to the seventh prediction value is within the second range, the prediction result of the first pixel is determined or obtained according to the second method.
12. A processing device, wherein, include: A memory and a processor, wherein a processing program is stored in the memory, and when the processing program is executed by the processor, the steps of the processing method according to claim 1 are implemented.
13. A storage medium, wherein, The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the processing method according to claim 1 are implemented.
Citation Information
Patent Citations
Image component prediction method, encoder, decoder, and storage medium
CN113508584A
Method and apparatus of local illumination compensation for inter prediction
CN113841405A
Encoding method, encoder and computer readable storage medium
CN115134600A
Local illumination compensation methods, video encoding methods, video decoding methods, apparatuses, and system
WO2023245349A1
Method, apparatus, and medium for video processing
WO2023284695A1