Image processing method, intelligent terminal and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2026-05-19
AI Technical Summary
In the prior art, when predicting the brightness component or chrominance component of an image block, the pixels of the reference region rely on, resulting in prediction distortion in the case of large characteristics, and the accuracy is reduced.
The second pixel is determined or obtained from the first component of the current image block, and prediction is performed using a downsampling model, a non-downsampling model, a gradient model, a convolutional prediction model, or a linear prediction model to reduce the effect of distortion.
The accuracy of prediction results of the luminance component or chrominance component of the image block is improved, and the impact of prediction distortion is reduced.
Smart Images

Figure CN122070693A_ABST
Abstract
Description
Image processing method, intelligent terminal and storage medium Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image processing method, an intelligent terminal, and a storage medium. Background Art
[0002] In the development of image coding and decoding technology, the improvements made by various coding and decoding standards are all committed to improving the image coding and decoding effects from different aspects. Predicting the brightness component / color component of the image during the image coding and decoding process is a hot topic in current research.
[0003] During the process of conceiving and implementing this application, the inventors discovered at least the following problem: In some implementations, the prediction of the luminance or chrominance components of the current image block is performed based on pixels in a reference region. This can cause distortion in the prediction of pixels in the current image block when the features of the current image block differ significantly from those of the reference region, thereby reducing the accuracy of the predicted luminance or chrominance components of the current image block.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Technical Solutions
[0005] In response to the above technical problems, the present application provides an image processing method, an intelligent terminal and a storage medium, which can reduce the distortion effect that occurs when predicting pixels in the current image block, thereby improving the accuracy of the results of predicting the brightness component or chrominance component of the current image block.
[0006] This application provides an image processing method that can be applied to a processing device (such as a smart terminal or server), including:
[0007] According to the first pixel of the first component of the current image block, the second pixel of the first component and / or the second pixel of the second component are determined or obtained.
[0008] Optionally, at least one of the following is also included:
[0009] Determine or obtain a second pixel based on at least one of a downsampling model, a non-downsampling model, a gradient model, a convolution prediction model, and a linear prediction model and the first pixel, where optionally, the second pixel is the second pixel of the first component and / or the second pixel of the second component;
[0010] A second pixel is determined or obtained according to the first pixel and the filter coefficient. Optionally, the second pixel is the second pixel of the first component and / or the second pixel of the second component.
[0011] Optionally, the filter coefficient is determined by at least one of the following methods:
[0012] A first approach is to determine the filter coefficient according to the first reconstructed pixel of the first component, the second reconstructed pixel of the first component, and / or the second reconstructed pixel of the second component.
[0013] Second mode: determining the filter coefficient according to the first reconstructed pixel of the first component, and the second predicted pixel of the first component and / or the second predicted pixel of the second component;
[0014] A third approach is to determine the filter coefficient according to the first predicted pixel of the first component, the second predicted pixel of the first component, and / or the second predicted pixel of the second component.
[0015] Optionally, the method further comprises at least one of the following:
[0016] The first reconstructed pixel is a reconstructed pixel with a maximum first component or a reconstructed pixel with a minimum first component;
[0017] The first reconstructed pixel is a reconstructed pixel determined in a predetermined area;
[0018] The first reconstructed pixel is a maximum reconstructed pixel of the first component or a minimum reconstructed pixel of the first component determined in a predetermined area.
[0019] Optionally, the method further comprises at least one of the following:
[0020] The first reconstructed pixel is different from the first pixel;
[0021] The first predicted pixel is different from the first pixel;
[0022] The first reconstructed pixel is the same as the first pixel;
[0023] The first predicted pixel is the same as the first pixel.
[0024] Optionally, a method for determining the first pixel includes at least one of the following:
[0025] determining a first pixel according to a third reconstructed pixel or a third predicted pixel of the first component;
[0026] determining a first pixel according to a downsampled pixel of a third reconstructed pixel or a third predicted pixel;
[0027] The first pixel is determined according to a fourth predicted pixel determined or obtained by performing intra-frame prediction or inter-frame prediction on the current image block.
[0028] Optionally, the method further includes:
[0029] determining or obtaining a reconstructed image block corresponding to the current image block according to the second pixel;
[0030] The reconstructed pixels of the first component and / or the reconstructed pixels of the second component are determined or obtained according to the reconstructed pixels of the first component of the reconstructed image block.
[0031] Optionally, the method further comprises at least one of the following:
[0032] The current image block includes at least one of a luminance image block and a chrominance image block;
[0033] The first component is the brightness component;
[0034] The second component is the chrominance component;
[0035] The first pixel is a predicted pixel or a reconstructed pixel;
[0036] The second pixel is a predicted pixel or a reconstructed pixel.
[0037] The present application also provides a processing device, comprising: a memory and a processor, wherein an image processing program is stored in the memory, and when the image processing program is executed by the processor, the steps of any of the above-mentioned image processing methods are implemented.
[0038] The present application also provides a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-mentioned image processing methods.
[0039] As described above, the image processing method of the present application can be applied to a processing device and includes determining or obtaining, based on a first pixel of a first component of a current image block, a second pixel of the first component and / or a second pixel of the second component of the current image block. This technical solution can reduce the effects of distortion that occur when predicting pixels in the current image block, thereby improving the accuracy of the prediction results of the luminance component or chrominance component of the current image block. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] 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.
[0041] FIG1 is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present application;
[0042] FIG2 is a diagram of a communication network system architecture provided by an embodiment of the present application;
[0043] FIG3 is a schematic diagram of an application scenario involving a convolutional cross component model prediction mode CCCM;
[0044] FIG4 is a schematic diagram of another application scenario involving the convolutional cross component model prediction mode CCCM;
[0045] FIG5 is a schematic diagram of an application scenario involved in the cross-component residual model CCRM;
[0046] FIG6A is a schematic diagram of the structure of an image encoder involved in the image processing method provided in an embodiment of the present application;
[0047] FIG6B is a schematic diagram of the structure of an image decoder involved in the image processing method provided in an embodiment of the present application;
[0048] FIG7 is a schematic flow chart of an image processing method according to the first embodiment;
[0049] 8a to 8c are schematic diagrams showing the number and position relationship of luminance pixels and chrominance pixels in a coding unit in a YUV image format;
[0050] 9a to 9c are schematic diagrams of determining filter coefficients in an image processing method according to the second embodiment;
[0051] FIG10 is a schematic diagram of the locations of brightness pixels used for gradient calculation;
[0052] 11a to 11c are schematic diagrams of determining a brightness pixel y in an image processing method according to a third embodiment;
[0053] FIG12 is a schematic diagram of determining a brightness pixel Luma1 in an image processing method according to a third embodiment;
[0054] FIG13 is a schematic diagram illustrating determining brightness pixels Luma2 to LumaN in an image processing method according to a third embodiment;
[0055] FIG14 is another schematic diagram showing determination of luminance pixels Luma2 to LumaN in an image processing method according to the third embodiment;
[0056] 15 is a schematic diagram of selecting pixels to determine filter coefficients in an image processing method according to a third embodiment;
[0057] 16a to 16c are schematic diagrams of the second chroma prediction process in the image processing method according to the third embodiment;
[0058] FIG17 is a schematic diagram showing the relationship between image units in an image processing method according to a fifth embodiment;
[0059] FIG18 is another schematic diagram showing the relationship between image units in the image processing method according to the fifth embodiment;
[0060] FIG19 is a schematic diagram of loop filtering processing in an image processing method according to the fifth embodiment;
[0061] FIG20a and FIG20b are schematic diagrams of secondary division in an image processing method according to the fifth embodiment;
[0062] FIG. 21 a and FIG. 21 b are schematic diagrams of expansion / combination of reconstruction unit sizes in an image processing method according to the fifth embodiment.
[0063] 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.
[0064] Implementation Methods of the Application
[0065] 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.
[0066] 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. In addition, 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 by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0067] 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.
[0068] 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, at least a portion 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 at least a portion of other steps or sub-steps or stages of other steps.
[0069] 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.
[0070] It should be noted that in this article, step codes such as S10 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 other steps before executing S10, etc., but these should all be within the scope of protection of this application.
[0071] 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.
[0072] 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.
[0073] The processing device in this application may be a smart terminal or a server. Optionally, the smart terminal may be implemented in various forms. For example, the smart terminal described in this application may 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.
[0074] 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.
[0075] 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.
[0076] The following is a detailed introduction to the various components of the mobile terminal in conjunction with Figure 1:
[0077] 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 more. Furthermore, the RF unit 101 can 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.
[0078] 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.
[0079] 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.
[0080] 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 a phone call mode, a recording mode, and a voice recognition mode, and may process such sound into audio data. In the 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.
[0081] 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.
[0082] 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.
[0083] The user input unit 107 can be used to receive input digital or character information, and to generate key signal input related to the 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. In addition, 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.
[0084] 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.
[0085] 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 an 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 an external device.
[0086] 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 a sound playback function or an image playback function); the data storage area may store data generated based on the use of the mobile phone (such as audio data, a phone book, etc.). Furthermore, memory 109 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0087] Processor 110 is the control center of the mobile terminal, connecting all 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 handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 110.
[0088] 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 managing functions such as charging, discharging, and power consumption through the power management system.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] Optionally, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0093] 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 .
[0094] 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).
[0095] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services.
[0096] 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.
[0097] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the present application are proposed.
[0098] This application proposes an image processing method that can determine or obtain the second pixel of the first component and / or the second pixel of the second component based on the first pixel of the first component of the current image block. This method can reduce the distortion effects that occur when predicting pixels in the current image block, thereby improving the accuracy of the prediction results of the luminance component or chrominance component of the current image block.
[0099] To facilitate understanding, the following is an explanation of the professional terms that may be involved in this application.
[0100] (1) Forecasting model
[0101] Predicting image blocks is an essential step in the encoding or decoding process. For example, the encoder predicts an image block to generate a prediction block, constructing a low-energy residual block to reduce transmission bits. The decoder decodes the image by obtaining the residual block through entropy decoding and combining the residual block with the prediction block obtained by the decoder to obtain the decoded image block. The encoder or decoder can predict image blocks using preset prediction modes, which can include inter-frame prediction and intra-frame prediction.
[0102] (2) Convolutional Cross Component Model Prediction Mode CCCM
[0103] The convolution cross component model prediction mode CCCM uses a filter to predict the chrominance of the current image block from the reconstructed luma samples. Optionally, the filter used by CCCM consists of a 5-tap (or 7-tap) plus-shaped spatial component, a nonlinear term, and a bias term. The input of the spatial 5-tap component of the filter includes the center (C) luma sample, as well as the upper sample (also called the north sample, N), the lower sample (also called the south sample, S), the left sample (also called the west sample, W), and the right sample (also called the east sample, E) of the center (C) luma sample.
[0104] The calculation formula used by CCCM to predict chrominance pixels is as follows: predChromaVal = c0*C+c1*N+c2*S+c3*E+c4*W+c5*P+c6*B
[0105] Among them, C represents the luma sample at the corresponding position of the current chroma sample, and N, S, E, and W are the adjacent samples of the current luma sample, as shown in Figure 3.
[0106] The nonlinear term P = (C*C + midVal) >> bitDepth, and the bias term B = midVal. The bias term B represents a scalar offset between the input and output (similar to the offset term in CCLM) and is set to the middle chroma value (for 10-bit video, B = 512).
[0107] Gy and Gx are vertical and horizontal gradients, respectively, as shown in Figure 4. The calculation formulas for Gy and Gx are as follows: Gy = (2N + NW + NE) – (2S + SW + SE) Gx = (2W + NW + SW) – (2E + NE + SE)
[0108] The Y and X parameters are the vertical and horizontal positions of the center luma sample, which are calculated relative to the top-left coordinate of the sample (also called image block) that currently needs to predict chroma.
[0109] (3) Cross-component residual model CCRM
[0110] The cross-component residual model (CCRM) uses the prediction blocks of luma and chroma to derive a cross-component filter. The derived filter is applied to the reconstructed luma block and blended with the chroma prediction block to obtain the final chroma prediction block. Optionally, when calculating the convolution filter and filter coefficients, the CCRM assumes that the proposed 8-tap filter consists of 6 spatial luma samples, a nonlinear term, and a bias term. The spatial luma samples (L0, ..., L5) are obtained from the luma grid, as shown in Figure 5, and the 6 luma samples closest to the chroma position C are selected without downsampling.
[0111] Based on this, the calculation formula used by CCRM to predict chrominance pixels is as follows: predChromaVal=c0*L0+c1*L1+c2*L2+c3*L3+c4*L4+c5*L5+c6*nonlinear((L0+L3+1)>>1)+c7*B.
[0112] Optionally, the nonlinear operator is a nonlinear operator of CCCM, and B is a bias term.
[0113] Alternatively, please refer to Figures 6A and 6B. Figure 6A is a schematic diagram of an image encoder involved in the image processing method, and Figure 6B is a schematic diagram of an image decoder involved in the image processing method. As shown in Figure 6A, the encoder at the encoding end typically divides the input video image into at least one image block per frame for processing. Each image block can be subtracted from a prediction block obtained by a prediction mode to obtain a residual block. The residual block and relevant prediction mode parameters are then subjected to a series of processing operations to obtain an encoded bitstream. Subsequently, at the decoding end, as shown in Figure 6B, after receiving the bitstream, the decoder can parse the bitstream to obtain the prediction mode parameters. Furthermore, 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. Optionally, the decoding unit of the decoder parses and decodes the encoded bitstream to obtain the prediction parameters and related auxiliary information. Next, the prediction processing unit of the decoder performs prediction processing using the prediction parameters to determine the prediction block corresponding to the residual block. In this way, the decoder can reconstruct the block by adding the obtained residual block to the corresponding prediction block. Optionally, the decoder's loop filtering unit performs loop filtering on the reconstructed blocks to reduce distortion and improve video quality. Thus, the loop-filtered reconstructed blocks are further combined into decoded images and stored in a decoded image buffer or output as decoded video signals.
[0114] Optionally, the image processing method provided in this application can be applied to scenarios where chroma prediction and / or luminance prediction are performed on image blocks during the above-mentioned video image encoding process. For example, scenarios where intra-frame prediction is performed during image encoding, and scenarios where inter-frame prediction is performed during image encoding. Optionally, the image processing method provided in this application can also be applied to scenarios where chroma prediction and / or luminance prediction are performed on image blocks to be decoded during video decoding. For example, scenarios where intra-frame prediction is performed during image decoding, and scenarios where inter-frame prediction is performed during image decoding.
[0115] First embodiment
[0116] In this embodiment, the image processing method may be executed by the aforementioned processing device, or a cluster consisting of multiple such processing devices. The processing device may be a smart terminal (such as the aforementioned mobile terminal 100) or a server. Here, the image processing method will be described using the processing device as the executing entity in the first embodiment of the image processing method.
[0117] As shown in FIG7 , FIG7 is a flow chart of an image processing method according to a first embodiment. In this embodiment, the image processing method includes the following steps:
[0118] S10: Determine or obtain, according to the first pixel of the first component of the current image block, the second pixel of the first component and / or the second pixel of the second component.
[0119] Optionally, during the process of encoding or decoding an image, the processing device uses an inter-frame prediction mode and / or an intra-frame prediction mode to perform chrominance prediction and / or luminance prediction for a second pixel to be predicted in a current image block to be processed, that is, the processing device first obtains or determines a first pixel of at least one first component in the current image block, and then the processing device predicts the second pixel of the first component based on the pixel value of the first pixel, thereby determining or obtaining the pixel value of the second pixel of the first component, and / or the processing device also predicts the second pixel of the second component based on the pixel value of the first pixel, thereby determining or obtaining the pixel value of the second pixel of the second component.
[0120] Optionally, in the present application, the current image block may be an image area in the input video image (i.e., video frame) that is being encoded or decoded and thus requires chrominance prediction and / or luminance prediction. The current image block may also be an image area to be encoded, or an image area that has been reconstructed or decoded. Optionally, the image block currently being encoded or decoded may also be referred to as the current block, current unit, or current processing block. Optionally, the first pixel may also be referred to as a reference pixel, a first sample, or a reference sample, and the second pixel may also be referred to as a pixel to be predicted or a sample to be predicted. Under the H.265 / High Efficiency Video Coding (HEVC) standard, the first pixel and the second pixel may both be a Coding Tree Unit (CTU) in the input video image or a pixel or sample in a Coding Unit (CU). The present application does not impose any specific restrictions on the definition or type of the current image block, the first pixel, and the second pixel.
[0121] Optionally, the first component is a luma component. That is, the first pixel of the first component is a luma component pixel. Optionally, when performing chroma prediction and / or luma prediction for a second pixel to be predicted in the current image block, the processing device may obtain or determine at least one first pixel of a known luma component, thereby performing chroma prediction and / or luma prediction for the second pixel based on the pixel value of the first pixel.
[0122] Optionally, the first component is a luma component, and the second component is a chroma component. That is, the second pixel of the first component is a luma component pixel, and the second pixel of the second component is a chroma component pixel. Optionally, the processing device may predict the luma component of the second pixel based on the known luma component of the first pixel to obtain a luma component prediction result for the second pixel. Optionally, the processing device may predict the chroma component of the second pixel based on the known luma component of the first pixel to obtain a prediction result for the second pixel.
[0123] Optionally, in this embodiment and other embodiments described above and below, after receiving a video image from a video source, the processing device, as an encoder, segments the video image to obtain at least one image block. When the processing device uses an inter-frame prediction mode (especially a cross-component residual prediction mode) to perform chroma prediction and / or luminance prediction on the current image block, the processing device uses the pixel in the current image block for which the chroma component and / or luminance component needs to be predicted as the second pixel, and then directly uses the pixel value (luminance value) of the first pixel of the current image block with a known luminance component to predict the chroma component and / or luminance component of the second pixel, thereby obtaining a chroma component prediction result and / or luminance component prediction result of the second pixel.
[0124] Optionally, the processing device, as an encoder, may use, for example, a rate-distortion optimization algorithm to determine the inter-frame prediction mode ultimately adopted by the current image block. Optionally, the processing device may calculate the rate-distortion cost corresponding to each prediction mode to determine the minimum rate-distortion cost from the rate-distortion costs corresponding to multiple prediction modes, and the prediction mode corresponding to the minimum rate-distortion cost is the prediction mode ultimately adopted by the current image block. That is, assuming that for the prediction processing of the image block currently to be subjected to chroma prediction, the prediction modes that can be used are chroma inter-frame prediction modes 0-N (optionally, including a cross-component residual prediction mode based on inter-frame prediction), and when the processing device calculates that the prediction mode corresponding to the minimum rate-distortion cost for chroma prediction is mode i, the processing device determines mode i as the inter-frame prediction mode ultimately used for chroma prediction of the image block currently to be processed. Optionally, i=0, ..., N.
[0125] Optionally, after the processing device determines or derives the chrominance component and / or luminance component of the second pixel in the current image block in a pixel-by-pixel or block-by-block prediction manner according to the above process, the processing device acting as an encoder may further subtract the predicted value of the corresponding pixel in the predicted image block (i.e., the image block chrominance information of the image block) from the pixel value of the pixel in the current image block to obtain a residual value of the pixel and a residual block corresponding to the image block. The residual block is then transformed and quantized, and then encoded by an entropy encoder to form an encoded bitstream. Optionally, the encoded bitstream may also include prediction parameters corresponding to the inter-frame prediction mode determined by the processing device through the above process (packaged into the encoded bitstream after entropy encoding) and related side information. Optionally, if the processing device uses a cross-component inter-frame prediction mode, the above-mentioned prediction parameters include at least information indicating the use of a cross-component inter-frame prediction model for the prediction operation.
[0126] Optionally, the transformed and quantized residual block is added to the corresponding predicted image block (also called the prediction block) obtained using the prediction mode to obtain a reconstructed image block (also called the reconstructed block). After obtaining the reconstructed image block, the processing device further performs loop filtering on the reconstructed image block to reduce distortion.
[0127] Optionally, when the processing device acts as a decoder, it can receive the encoded bitstream transmitted by the processing device acting as an encoder. After the processing device acts as a decoder and receives the bitstream encoded by the encoder, the decoding unit of the decoder parses and decodes the bitstream to obtain prediction parameters. Optionally, the inverse transform unit and inverse quantization unit of the decoder inverse transform and inverse quantize the transform coefficients to obtain a residual block. Next, the prediction processing unit of the decoder can use the residual block as the current processing block that needs to be decoded, and perform prediction processing using the prediction parameters to determine the prediction block corresponding to the residual block.
[0128] Optionally, when the decoder adopts the same inter-frame prediction mode as that used by the encoder, the prediction parameters obtained by parsing the bitstream can be used to obtain or determine the prediction mode that needs to be adopted for chroma prediction and / or luminance prediction of the image block to be processed (for example, when the prediction parameters indicate that the corresponding prediction mode is an inter-component residual prediction mode based on inter-frame, the decoder uses the cross-component residual prediction mode as the inter-frame prediction mode for chroma prediction and / or luminance prediction of the decoded residual block). Thus, the decoder directly uses the inter-frame prediction mode to use the pixel value (luminance value) of the first pixel of the known luminance component in the image block to predict the chroma component and / or luminance component of the second pixel to be predicted, thereby obtaining the chroma component prediction result and / or luminance component prediction result of the second pixel.
[0129] Optionally, the processing device acting as a decoder determines or derives a chrominance component prediction result and / or a luminance component prediction result for at least one second pixel to be predicted in the image block on a pixel-by-pixel basis (also known as a sample-by-sample basis) or a block-by-block basis. Optionally, after determining or deriving the chrominance information and / or luminance information of the current image block, the processing device may further add the residual block obtained by parsing to the predicted values of the corresponding pixels in the current image block (the image block chrominance information and / or luminance information of the image block) to obtain a reconstructed block. Finally, the processing device further performs loop filtering on the reconstructed block through a loop filtering unit to reduce distortion and improve video quality. The reconstructed block that has undergone loop filtering is further combined into a decoded image and stored in a decoded image buffer or output as a decoded video signal.
[0130] Optionally, in this embodiment and other embodiments described above and below, the prediction mode used by the processing device as an encoder or decoder to predict the current image block (e.g., chroma block) may be a cross-component residual prediction model CCRM as shown in formula (1): predChromaVal = c0*L0+c1*L1+c2*L2+c3*L3+c4*L4+c5*L5+c6*nonlinear((L0+L3+1)>>1)+c7*B(1)
[0131] Optionally, taking chroma prediction as an example, predChromaVal is the chroma prediction value of the second pixel to be predicted in the current image block, c0~c7 are filter coefficients, L0,...,L5 obtain the 6 luminance samples closest to the chroma position C from the luminance grid (as shown in Figure 5), and L0,...,L5 are not downsampled, the nonlinear operator can be a nonlinear operator of CCCM, and B is a bias term, which represents a scalar offset between the input and output (for 10-bit depth video, B is set to the chroma median, i.e. 512).
[0132] Optionally, in order to use the CCRM model shown in the above formula (1) to perform chroma inter-frame prediction processing, the processing device needs to determine the filter coefficients c0~c7 and the luminance values of L0,...,L5 in formula (1), and then obtain the chroma prediction result of the second pixel predChromaVal based on formula (1). Optionally, the processing device can determine the filter coefficients in formula (1) by obtaining or determining at least one reference area from the image frame where the image block currently requiring chroma prediction is located, and determining the filter coefficients based on the sampling values of the luminance / chroma pixels in the at least one reference area. Optionally, when performing chroma prediction, at least one luminance reference area is obtained or determined.
[0133] In this embodiment, the image processing method obtains or determines at least one first pixel of a first component in the current image block when predicting the chrominance component and / or luminance component of the image block through the processing device, and then predicts the second pixel of the first component based on the pixel value of the first pixel, thereby determining or obtaining the pixel value of the second pixel of the first component, and / or, predicts the second pixel of the second component based on the pixel value of the first pixel, thereby determining or obtaining the pixel value of the second pixel of the second component. That is, the technical solution of the embodiment of the present application fully considers the correlation between the reference pixel of the known luminance component in the current image block and the pixel to be predicted, and can reduce the distortion effect that occurs when predicting the pixels in the current image block during the image encoding and decoding process, thereby improving the accuracy of the result of predicting the luminance component or chrominance component of the current image block.
[0134] Second embodiment
[0135] In this embodiment, the image processing method is still described with the processing device as the execution subject. Based on the above first embodiment, the image processing method may include at least one of the following:
[0136] Determine or obtain a second pixel based on at least one of a downsampling model, a non-downsampling model, a gradient model, a convolution prediction model, and a linear prediction model and the first pixel;
[0137] A second pixel is determined or obtained based on the first pixel and the filter coefficient.
[0138] Optionally, the second pixel is the second pixel of the first component and / or the second pixel of the second component.
[0139] Optionally, when the processing device uses the first pixel of the known first component of the current image block to perform chrominance component prediction or luminance component prediction for the second pixel, it can use the pixel value of the first pixel and at least one model among the downsampling model, the non-downsampling model, the gradient model, the convolution prediction model, and the linear prediction model to perform chrominance component prediction or luminance component prediction for the second pixel, thereby determining or obtaining the prediction result of the first component of the second pixel, and / or determining or obtaining the prediction result of the second component of the second pixel.
[0140] Optionally, when performing chroma component prediction or luma component prediction for a second pixel using a first pixel of a known first component of a current image block, the processing device may perform chroma component prediction or luma component prediction for the second pixel based on the pixel value and filter coefficient of the first pixel, thereby determining or obtaining a prediction result for the second pixel. The second pixel may be a luma component pixel or the second pixel may be a chroma component pixel.
[0141] Optionally, the processing device may apply a cross-component prediction mode or a same-component prediction mode of intra-frame prediction to perform chrominance component prediction or luma component prediction on the second pixel based on the first pixel and the filter coefficient. The filter coefficient may be determined by a reconstructed pixel or a predicted pixel corresponding to the image block where the first pixel is located.
[0142] In this embodiment, the filter coefficients are determined using reconstructed pixels or predicted pixels in the image block where the first pixel is located. This method of determining the filter coefficients differs from a method of determining the filter coefficients based on selecting reconstructed pixels from a reference area located adjacent to (above or to the left of) the image block where the first pixel is located. Because the method of determining the filter coefficients in this embodiment determines the filter coefficients using pixels in the image block where the first pixel is located (i.e., the current image block), and performs a prediction operation based on the determined filter coefficients, the accuracy of the prediction result can be improved.
[0143] Optionally, the current image block includes at least one of a luminance image block and a chrominance image block.
[0144] Optionally, the image processing method can predict the current image block in units of coding units (including a luminance image block and two chrominance image blocks) through a processing device according to the process shown below. That is, the processing device determines the predicted pixel value of the predicted pixel in the prediction unit corresponding to the current image block by performing a first prediction process on the current image block. Optionally, the processing device can determine the first luminance predicted pixel value of the luminance prediction block of the prediction unit and the first chrominance predicted pixel value of the chrominance prediction block of the prediction unit through a prediction mode. Then, the processing device further determines the reconstructed pixel value of the reconstructed pixel in the reconstruction unit corresponding to the current image block based on the predicted pixel value and the residual value of the first residual corresponding to the coding unit. Then, the processing device determines the filter coefficient of the filter to be used in the second prediction process by using the above-mentioned reconstructed pixel value or the above-mentioned predicted pixel value as the first pixel of the first component. Finally, the processing device can perform a formal second prediction process using the pixel value and filter coefficient of the first pixel, thereby determining the second chroma prediction pixel value of the chroma prediction block corresponding to the current image block, and / or determining the second luminance prediction pixel value of the luminance prediction block corresponding to the current image block, and performing encoding or decoding processing using the second chroma prediction pixel value and / or the second luminance prediction pixel value.
[0145] Optionally, the current image block may also be referred to as a coding unit. The pixel used to determine the filter coefficient (e.g., a reconstructed pixel, a predicted pixel) and the predicted pixel corresponding to the determined second chroma predicted pixel value and / or the second luminance predicted pixel value—the second pixel—all correspond to the same coding unit.
[0146] Optionally, for videos in YUV format, common formats include YUV444, YUV422, and YUV420. The original intention of setting these video formats is to use different forms of sampling to save the Y, U, and V components based on the physiological characteristics of the human eye, which is high sensitivity to brightness but lower sensitivity to color than brightness. Due to the differences in the above formats, in the YUV422 and YUV420 formats, the size of the brightness block in the coding unit is larger than the size of the chrominance block. That is, the information of the brightness block in the coding unit is richer than the information of the chrominance block. Therefore, under normal circumstances, for videos in these two formats, the processing device can use the brightness value (such as the brightness reconstruction value) to predict the chrominance value during the second prediction processing based on the above filter coefficients. In one embodiment, for a video sequence in the format YUV444, the processing device can use the chrominance value (such as the chrominance reconstruction value) to predict the brightness value during the second prediction processing.
[0147] Optionally, the first component is a brightness component.
[0148] Optionally, the second component is a chrominance component.
[0149] Optionally, the first pixel is a predicted pixel or a reconstructed pixel.
[0150] Optionally, the second pixel is a predicted pixel or a reconstructed pixel.
[0151] Optionally, the filter coefficient is determined by at least one of the following methods:
[0152] A first approach is to determine the filter coefficient according to the first reconstructed pixel of the first component, the second reconstructed pixel of the first component, and / or the second reconstructed pixel of the second component.
[0153] Optionally, when determining the filter coefficient, the processing device may determine the filter coefficient based on a first reconstructed pixel of the first component (i.e., a first luma reconstructed pixel) and a second reconstructed pixel of the first component (i.e., a second luma reconstructed pixel). Alternatively, when determining the filter coefficient, the processing device may further determine the filter coefficient based on the first luma reconstructed pixel and the second reconstructed pixel of the second component (i.e., a chroma reconstructed pixel). Still alternatively, when determining the filter coefficient, the processing device may further determine the filter coefficient based on a combination of the first luma reconstructed pixel, the second luma reconstructed pixel, and the chroma reconstructed pixel.
[0154] Optionally, at the encoding end, for the luminance block of the prediction unit corresponding to the current image block, the processing device may traverse all prediction modes except the prediction mode required for the second prediction process, select the optimal prediction mode for the luminance block of the prediction unit, and perform a first prediction process based on the optimal prediction mode to determine the prediction result of the luminance block (i.e., the first luminance predicted pixel value). Similarly, for the chrominance block of the prediction unit corresponding to the coding unit, the processing device also traverses all prediction modes except the prediction mode required for the second prediction process, thereby selecting the optimal prediction mode for the chrominance block of the prediction unit, and performs a first prediction process based on the optimal prediction mode to determine the prediction result of the chrominance block (i.e., the first chrominance predicted pixel value).
[0155] Optionally, all the prediction modes except the prediction mode required for the second prediction process may be: an intra-frame prediction mode and an inter-frame prediction mode, or a prediction mode combining the intra-frame prediction mode and the inter-frame prediction mode.
[0156] Optionally, the intra prediction mode includes a DC mode, a planar mode, an angular mode, an intra block copy (IBC) mode, and the like.
[0157] Optionally, when the processing device is an encoding end, the main tasks of the inter-frame prediction mode include: motion estimation and motion compensation.
[0158] Optionally, when the processing device performs the first prediction processing using the selected prediction mode, the prediction mode selected for the luminance block and the prediction mode selected for the chrominance block may be the same or different.
[0159] Optionally, after the processing device performs a first prediction process to obtain a first luma predicted pixel value of a luma block of a prediction unit corresponding to the current image block, the processing device determines a first luma reconstructed pixel value of a first luma reconstructed pixel of a luma reconstructed block corresponding to the luma prediction block based on the first luma predicted pixel value and a first luma residual value of a first luma residual in a residual block corresponding to the luma prediction block. Optionally, the first luma residual is obtained by subtracting the predicted pixel value of the luma prediction block from the original luma block, followed by transformation, quantization, inverse transformation, and inverse quantization.
[0160] Optionally, after the processing device performs the first prediction processing to obtain the first chroma predicted pixel value of the chroma block of the prediction unit corresponding to the current image block, the processing device determines the first chroma reconstructed pixel value of the first chroma reconstructed pixel of the chroma reconstruction block corresponding to the chroma prediction block based on the first chroma predicted pixel value and the first chroma residual value of the first chroma residual in the residual block corresponding to the chroma prediction block.
[0161] Optionally, the first chroma residual is obtained by subtracting the predicted pixel value of the chroma prediction block from the original chroma block, and then performing transformation, quantization, inverse transformation, and inverse quantization.
[0162] Optionally, after further determining the first luminance reconstructed pixel value and the first chrominance reconstructed pixel value, the processing device can determine the filter coefficients of the filter to be used in the subsequent second prediction processing through the first luminance reconstructed pixel value and the first chrominance reconstructed pixel value.
[0163] Optionally, when the positions of the above-mentioned first chrominance prediction pixel and the first luminance reconstruction pixel correspond to each other, the processing device can directly determine the filter coefficient of the filter to be used in the subsequent second prediction processing through the above-mentioned first luminance reconstruction pixel value and the first chrominance reconstruction pixel value.
[0164] Optionally, the second reconstructed pixel of the first component (ie, the second luminance reconstructed pixel) may be a downsampled luminance reconstructed pixel corresponding to the first luminance reconstructed pixel.
[0165] Optionally, the processing device may further downsample the first luminance reconstructed pixel to obtain a downsampled first luminance reconstructed pixel. Thus, the processing device may determine the filter coefficient using the first luminance reconstructed pixel value and the first chrominance reconstructed pixel value of the downsampled first luminance reconstructed pixel.
[0166] Optionally, the processing device can also determine or select a first luminance reconstruction pixel value from the above-mentioned luminance reconstruction block according to a predetermined reconstruction pixel selection rule, and determine the filter coefficient based on the determined or selected first luminance reconstruction pixel value and the co-located first chrominance pixel value corresponding to the first luminance reconstruction pixel value.
[0167] Optionally, the first pixel is a reconstructed pixel.
[0168] Optionally, the second pixel is a predicted pixel.
[0169] Optionally, the processing device may use the above-mentioned reconstructed pixel as the first pixel, and thereby determine or obtain the second pixel of the first component and / or the second pixel of the second component based on the reconstructed pixel and the filter coefficient.
[0170] Optionally, after determining the filter coefficient, the processing device can perform a second prediction process on the predicted pixels of the prediction unit corresponding to the current image block using the above-mentioned first luminance reconstructed pixel value and the filter coefficient, thereby determining the second chrominance predicted pixel value of the chrominance prediction block corresponding to the prediction unit, and, or determining the second luminance predicted pixel value of the luminance prediction block corresponding to the prediction unit.
[0171] Optionally, after the processing device acts as an encoder and performs a second prediction process to determine the second chroma predicted pixel value, it can further determine the second chroma residual of the chroma block corresponding to the current image block through the original chroma pixel value corresponding to the current image block and the second chroma predicted pixel value, and then perform entropy coding on the first chroma residual and the second chroma residual.
[0172] Optionally, the first chroma residual may be the residual corresponding to the first chroma reconstructed pixel in the current image block used to determine the filter coefficient, rather than the residual corresponding to all chroma reconstructed pixels in the current image block; the second chroma residual may be the residual corresponding to all chroma reconstructed pixels in the current image block. In other words, the first residual is obtained by performing the first prediction process only on the pixels used to determine the filter coefficient. The pixels used to determine the filter coefficient are pixels selected according to a preset rule, for example, pixels selected according to the preset rules shown in Figures 11a to 11c.
[0173] Optionally, when the processing device acts as an encoder, if the first chrominance residual is the residual corresponding to all chrominance reconstructed pixels in the current image block, only the residual corresponding to the chrominance reconstructed pixels in the first chrominance residual used to determine the filter coefficient can be entropy encoded or decoded, without the need to perform entropy encoding or entropy decoding on the residual corresponding to the chrominance reconstructed pixels in the first chrominance residual that are not used to determine the filter coefficient.
[0174] Optionally, the processing device may further determine the difference between the first chroma residual and the second chroma residual, and perform entropy encoding or decoding on the second chroma residual and the difference between the first chroma residual and the second chroma residual, without performing entropy encoding or decoding on the first chroma residual. Alternatively, the processing device may further determine the difference between the first chroma residual and the second chroma residual, and perform entropy encoding or decoding on the first chroma residual and the difference between the first chroma residual and the second chroma residual, without performing entropy encoding or decoding on the second chroma residual.
[0175] Optionally, at the decoding end, for the luminance block of the prediction unit corresponding to the current image block, the processing device can decode the prediction mode corresponding to the luminance block from the bit stream transmitted from the encoding end, and determine the prediction result of the luminance block (i.e., the predicted pixel value) based on the prediction mode.
[0176] Optionally, for the chroma block of the prediction unit corresponding to the current image block, the processing device can also decode the prediction mode corresponding to the chroma block from the bit stream, and determine the prediction result (i.e., predicted pixel value) of the chroma block based on the prediction mode.
[0177] Optionally, the prediction mode decoded from the bitstream by the processing device is a prediction mode other than the prediction mode for the second prediction processing performed by the encoding end. Optionally, the prediction mode decoded from the bitstream by the processing device can be an intra-frame prediction mode and an inter-frame prediction mode, or a prediction mode that is a combination of the intra-frame prediction mode and the inter-frame prediction mode. Optionally, the intra-frame prediction mode includes at least one of: a DC mode, a planar mode, an angular mode, and an intra-frame block copy (IBC) mode. The main tasks of the inter-frame prediction mode at the encoding end include: motion estimation and motion compensation.
[0178] Optionally, the processing device may obtain a prediction result of the luminance block by performing a first luminance prediction process using the above prediction mode, and may obtain a prediction result of the chrominance block by performing a first chrominance prediction process using the above prediction mode.
[0179] Optionally, the prediction mode of the luminance block and the prediction mode of the chrominance block may be the same or different.
[0180] Optionally, after determining the predicted pixel values of the luma block / chroma block of the prediction unit corresponding to the current image block, the processing device may determine a first luma reconstructed pixel value of a luma reconstructed block corresponding to the current image block based on the predicted pixel values of the luma block and the first luma residual corresponding to the current image block. Furthermore, the processing device may determine a first chroma reconstructed pixel value of a chroma reconstructed block corresponding to the current image block based on the predicted pixel values of the chroma block and the first chroma residual corresponding to the current image block.
[0181] Alternatively, the first luma residual may be obtained by decoding compressed data in a bitstream. Alternatively, the processing device may decode compressed data in a bitstream to obtain a first chroma residual for a first prediction process on the current image block and a second chroma residual for a second prediction process on the current image block.
[0182] Optionally, after determining the first luminance reconstruction pixel value of the luminance reconstruction block corresponding to the current image block and the first chrominance reconstruction pixel value of the chrominance reconstruction block corresponding to the current image block, the processing device can determine the filter coefficient of the filter used in the second prediction process through the first luminance reconstruction pixel value and the first chrominance reconstruction pixel value.
[0183] Optionally, the processing device may also downsample the first luminance reconstructed pixel to obtain a downsampled first luminance reconstructed pixel, and determine the filter coefficient using the first luminance reconstructed pixel value and the first chrominance reconstructed pixel value of the downsampled first luminance reconstructed pixel.
[0184] Optionally, the processing device can also select a first luminance reconstruction pixel value from the above-mentioned luminance reconstruction block according to a predetermined reconstruction pixel selection rule, and determine the filter coefficient of the filter based on the determined / selected first luminance reconstruction pixel value and the corresponding co-located first chrominance pixel value.
[0185] Optionally, after determining the filter coefficients of the filter, the processing device may perform a second prediction process on the current image block using the luminance reconstructed pixel values and the filter coefficients, thereby determining a second predicted pixel value of the chrominance block corresponding to the current image block.
[0186] Optionally, the first pixel is a predicted pixel.
[0187] Optionally, the second pixel is a reconstructed pixel.
[0188] Optionally, the processing device may use the above-mentioned first luminance prediction pixel as the first pixel, thereby determining or obtaining the second pixel of the first component (i.e., the luminance reconstructed pixel) and / or the second pixel of the second component (i.e., the chrominance reconstructed pixel) based on the first luminance prediction pixel and the filter coefficient.
[0189] Optionally, after determining the filter coefficients of the filter, the processing device may further perform a second prediction process on the current image block using the first luma prediction pixel values and the filter coefficients, thereby determining a second predicted pixel value for the chroma block corresponding to the current image block. Furthermore, the processing device may further determine a second chroma reconstructed pixel value for the chroma block corresponding to the current image block using the second predicted pixel value and a second chroma residual corresponding to the current image block. Thus, the processing device may further obtain a decoded image by performing loop filtering on the second chroma reconstructed pixel value.
[0190] Second mode: determining the filter coefficient according to the first reconstructed pixel of the first component, and the second predicted pixel of the first component and / or the second predicted pixel of the second component;
[0191] Optionally, when determining the filter coefficient, the processing device may further determine the filter coefficient based on the first reconstructed pixel of the first component (i.e., the first luma reconstructed pixel) and the second predicted pixel of the first component (i.e., the second luma predicted pixel). Alternatively, when determining the filter coefficient, the processing device may further determine the filter coefficient based on the first luma reconstructed pixel and the second predicted pixel of the second component (i.e., the chroma predicted pixel). Still alternatively, when determining the filter coefficient, the processing device may further determine the filter coefficient based on a combination of the first luma reconstructed pixel, the second luma predicted pixel, and the chroma predicted pixel.
[0192] Optionally, at the encoding end, for the luminance block of the prediction unit corresponding to the current image block, the processing device may traverse all prediction modes except the prediction mode required for the second prediction process to select the optimal prediction mode for the luminance block, and determine the prediction result of the luminance block (i.e., the first luminance predicted pixel value) based on the optimal prediction mode. Optionally, for the chrominance block of the prediction unit corresponding to the current image block, the processing device may also traverse all prediction modes except the prediction mode used for the second prediction process to select the optimal prediction mode for the chrominance block, and determine the prediction result of the chrominance block (i.e., the first chrominance predicted pixel value) based on the optimal prediction mode.
[0193] Optionally, the prediction mode other than the prediction mode used in the second prediction process may be an intra-frame prediction mode and an inter-frame prediction mode, or a prediction mode that is a combination of the intra-frame prediction mode and the inter-frame prediction mode.
[0194] Optionally, the intra prediction mode includes at least one of a DC mode, a planar mode, an angular mode, an intra block copy (IBC) mode, etc. The main tasks of the inter prediction mode at the encoding end include motion estimation and motion compensation.
[0195] Optionally, the processing device performs the first prediction process using a prediction mode other than the prediction mode used in the second prediction process, and may obtain a prediction result of the luminance block or the chrominance block.
[0196] Optionally, the prediction mode of the luminance block and the prediction mode of the chrominance block may be the same or different.
[0197] Optionally, after determining the first brightness predicted pixel value of the brightness block corresponding to the current image block, the processing device can determine the first brightness reconstructed pixel value of the brightness reconstruction block corresponding to the current image block based on the first brightness predicted pixel value and the first brightness residual value of the first brightness residual in the brightness residual block corresponding to the current image block.
[0198] Optionally, the first luminance residual may be obtained by subtracting the predicted pixel value of the luminance prediction block from the original luminance block, followed by transformation, quantization, inverse transformation, and inverse quantization.
[0199] Optionally, after determining the first luminance reconstructed pixel value of the luminance reconstruction block corresponding to the current image block, the processing device can determine the filter coefficient of the filter used in the second prediction process through the first luminance reconstructed pixel value and the above-mentioned first chrominance predicted pixel value.
[0200] Optionally, when the positions of the above-mentioned first chroma prediction pixel and the first luminance reconstruction pixel correspond to each other, that is, when the first chroma prediction pixel and the first luminance prediction pixel are co-located pixels, the processing device can directly determine the above-mentioned filter coefficient through the first luminance reconstruction pixel value and the first chroma prediction pixel value.
[0201] Optionally, as shown in Figures 8a to 8c, the positional correspondence between the first chrominance prediction pixel and the first luminance prediction pixel, which are co-located pixels, is similar to the positional correspondence between the luminance pixel Y and the chrominance pixel C in Figure 8a, or the positional correspondence between the luminance pixels Y1 to Y2 and the chrominance pixel C1 in Figure 8b, or the positional correspondence between the luminance pixel y11 to the luminance pixel y44 and the chrominance pixel c11 in Figure 8c.
[0202] Optionally, the processing device may further determine the filter coefficients by downsampling the first luma reconstructed pixel value to obtain a downsampled luma reconstructed pixel value and the first chroma predicted pixel value. Optionally, the processing device directly determining the filter coefficients by using the first luma reconstructed pixel value and the first chroma predicted value means that the first luma reconstructed pixel value is not downsampled, and the first luma reconstructed pixel value is used to derive the filter coefficients.
[0203] Optionally, the processing device can also select part of the first luminance reconstruction pixel values from the above-mentioned luminance reconstruction block according to a predetermined reconstruction pixel selection rule, and determine the filter coefficients of the filter based on the determined / selected part of the first luminance reconstruction pixel values and the corresponding co-located first chrominance pixel values.
[0204] Optionally, after determining the filter coefficients of the filter, the processing device may perform a second prediction process on the chroma prediction block corresponding to the current image block using the luma reconstructed pixel values and the filter coefficients, thereby determining a second chroma prediction pixel value for the chroma prediction block. Optionally, the processing device may further determine a residual of the chroma block corresponding to the current image block using the second chroma prediction pixel value for further entropy coding.
[0205] Optionally, the residual of the chroma block is a second chroma residual.
[0206] Optionally, the first pixel is a predicted pixel.
[0207] Optionally, the second pixel is a predicted pixel.
[0208] Optionally, the processing device may use the above-mentioned first luminance prediction pixel as the first pixel, thereby determining or obtaining the second pixel of the first component (i.e., the luminance prediction pixel) and / or the second pixel of the second component (i.e., the chrominance prediction pixel) based on the first luminance prediction pixel and the filter coefficient.
[0209] Optionally, after determining the filter coefficient of the filter, the processing device can also perform a second prediction process on the chrominance prediction block corresponding to the current image block using the above-mentioned first luminance prediction pixel value and the filter coefficient, thereby determining the second chrominance prediction pixel value of the chrominance prediction block.
[0210] Optionally, at the decoding end, for the luminance block of the prediction unit corresponding to the current image block, the processing device can decode the prediction mode corresponding to the luminance block from the bit stream, and determine the prediction result of the luminance block (i.e., the first luminance predicted pixel value) based on the prediction mode.
[0211] Optionally, for the chroma block of the prediction unit corresponding to the current image block, the processing device can decode the prediction mode corresponding to the chroma block from the bit stream, and determine the prediction result of the chroma block (i.e., the first chroma predicted pixel value) based on the prediction mode.
[0212] Optionally, the prediction mode decoded from the bit stream by the processing device is a prediction mode other than the prediction mode for the second prediction processing. These prediction modes may be intra-frame prediction modes and inter-frame prediction modes, or may be a prediction mode that is a combination of intra-frame prediction modes and inter-frame prediction modes.
[0213] Optionally, the intra prediction mode includes at least one of a DC mode, a planar mode, an angular mode, an intra block copy (IBC) mode, etc. The main tasks of the inter prediction mode at the encoding end include motion estimation and motion compensation.
[0214] Optionally, the processing device may perform a first prediction process using the above prediction mode to obtain prediction results of the luminance block and the chrominance block corresponding to the current image block.
[0215] Optionally, the prediction mode of the luminance block and the prediction mode of the chrominance block may be the same or different.
[0216] Optionally, after determining the prediction result (i.e., the first luma predicted pixel value) of the luma block corresponding to the current image block, the processing device may determine a first luma reconstructed pixel value of a luma reconstructed block corresponding to the current image block based on the first luma predicted pixel value and the first luma residual corresponding to the current image block. The processing device may also determine a filter coefficient of a filter used in the second prediction process using the first luma reconstructed pixel value and the first chroma predicted pixel value.
[0217] Optionally, the first luminance residual may be obtained by decoding compressed data in a bit stream.
[0218] Optionally, when the positions of the first chroma prediction pixel and the first luminance reconstruction pixel correspond to each other, the processing device may directly determine the filter coefficients according to the first luminance reconstruction pixel value and the first chroma prediction pixel value.
[0219] Optionally, the positions of the first chroma prediction pixel and the first luminance reconstructed pixel corresponding to each other means that the first chroma prediction pixel and the first luminance prediction pixel are co-located pixels.
[0220] Optionally, as shown in Figures 8a to 8c, the positional correspondence between the first chrominance prediction pixel and the first luminance prediction pixel, which are co-located pixels, is similar to the positional correspondence between the luminance pixel Y and the chrominance pixel C in Figure 8a, or the positional correspondence between the luminance pixels Y1 to Y2 and the chrominance pixel C1 in Figure 8b, or the positional correspondence between the luminance pixel y11 to the luminance pixel y44 and the chrominance pixel c11 in Figure 8c.
[0221] Optionally, the processing device may also determine the filter coefficient by downsampling the first luminance reconstructed pixel value to obtain a downsampled luminance reconstructed pixel value and the first chrominance predicted pixel value.
[0222] Optionally, the processing device directly determines the filter coefficient through the first luminance reconstructed pixel value and the first chrominance prediction value, which means that the first luminance reconstructed pixel value is not downsampled, and the first luminance reconstructed pixel is used to derive the filter coefficient.
[0223] Optionally, the processing device can also select part of the first luminance reconstruction pixel values from the above-mentioned luminance reconstruction block according to a predetermined reconstruction pixel selection rule, and determine the filter coefficients of the filter based on the determined / selected part of the first luminance reconstruction pixel values and the corresponding co-located first chrominance pixel values.
[0224] Optionally, after determining the filter coefficient of the filter, the processing device can perform a second prediction process on the chrominance prediction block corresponding to the current image block using the luminance reconstructed pixel value and the filter coefficient, thereby determining the second predicted pixel value of the chrominance prediction block.
[0225] Optionally, the processing device may further determine the reconstructed pixel value of the chroma block corresponding to the current image block using the second predicted pixel value and the chroma residual corresponding to the current image block to obtain a decoded image. Optionally, the chroma residual is a second chroma residual.
[0226] A third approach is to determine the filter coefficient according to the first predicted pixel of the first component, the second predicted pixel of the first component, and / or the second predicted pixel of the second component.
[0227] In this embodiment, when determining the filter coefficient, the processing device may determine the filter coefficient based on the first predicted pixel of the first component (i.e., the first luma predicted pixel) and the second predicted pixel of the first component (i.e., the second luma predicted pixel). Alternatively, when determining the filter coefficient, the processing device may also determine the filter coefficient based on the first luma predicted pixel and the second predicted pixel of the second component (i.e., the chroma predicted pixel). Still alternatively, when determining the filter coefficient, the processing device may also determine the filter coefficient based on a combination of the first luma predicted pixel, the second luma predicted pixel, and the chroma predicted pixel.
[0228] Optionally, at the encoding end, for the luminance block of the prediction unit corresponding to the current image block, the processing device can traverse all prediction modes except the prediction mode required for the second prediction processing to select the optimal prediction mode for the luminance block, and determine the prediction result of the luminance block (i.e., the first luminance predicted pixel value) based on the optimal prediction mode.
[0229] Optionally, for the chroma block of the prediction unit corresponding to the current image block, the processing device can also traverse all prediction modes except the prediction mode used in the second prediction processing to select the optimal prediction mode for the chroma block, and determine the prediction result of the chroma block (i.e., the first chroma predicted pixel value) based on the optimal prediction mode.
[0230] Optionally, the prediction mode other than the prediction mode used in the second prediction process may be an intra-frame prediction mode and an inter-frame prediction mode, or a prediction mode that is a combination of the intra-frame prediction mode and the inter-frame prediction mode.
[0231] Optionally, the intra prediction mode includes at least one of a DC mode, a planar mode, an angular mode, an intra block copy (IBC) mode, etc. The main tasks of the inter prediction mode at the encoding end include motion estimation and motion compensation.
[0232] Optionally, the processing device performs the first prediction process using a prediction mode other than the prediction mode used in the second prediction process, and may obtain a prediction result of the luminance block or the chrominance block.
[0233] Optionally, the prediction mode of the luminance block and the prediction mode of the chrominance block may be the same or different.
[0234] Optionally, after determining the first brightness predicted pixel value of the brightness block corresponding to the current image block, the processing device can determine the first brightness reconstructed pixel value of the brightness reconstruction block corresponding to the current image block based on the first brightness predicted pixel value and the first brightness residual value of the first brightness residual in the brightness residual block corresponding to the current image block.
[0235] Optionally, the first luminance residual may be obtained by subtracting the predicted pixel value of the luminance prediction block from the original luminance block, followed by transformation, quantization, inverse transformation, and inverse quantization.
[0236] Optionally, after determining the first luminance predicted pixel value of the luminance block corresponding to the current image block, the processing device can also directly determine the filter coefficient of the filter used in the second prediction process through the first luminance predicted pixel value and the above-mentioned first chrominance predicted pixel value.
[0237] Optionally, the processing device can also select a first luminance prediction pixel value from the above-mentioned luminance prediction block according to a predetermined prediction pixel selection rule, and determine the filter coefficient of the filter based on the determined / selected first luminance prediction pixel value and the corresponding co-located first chrominance pixel value.
[0238] Optionally, after determining the filter coefficient of the filter, the processing device can perform a second prediction process on the chrominance prediction block corresponding to the current image block using the first luminance reconstructed pixel value and the filter coefficient, thereby determining the second chrominance prediction pixel value of the chrominance prediction block.
[0239] Optionally, the processing device may also perform a second prediction process on the chrominance prediction block using the first luminance prediction pixel value and the filter coefficient, thereby determining a second predicted pixel value of the chrominance prediction block.
[0240] Optionally, the first luminance reconstructed pixel value is obtained by adding the first luminance predicted pixel value and the corresponding residual.
[0241] Optionally, the processing device may further determine the residual of the chroma block corresponding to the current image block by performing a second prediction process on the chroma prediction block to determine a second chroma prediction pixel value, so as to further perform entropy coding processing.
[0242] Optionally, the residual of the chroma block (eg, chroma residual) is the second chroma residual.
[0243] Optionally, at the decoding end, for the luminance block of the prediction unit corresponding to the current image block, the processing device can decode the prediction mode corresponding to the luminance block from the bit stream, and determine the prediction result of the luminance block (i.e., the first luminance predicted pixel value) based on the prediction mode.
[0244] Optionally, for the chroma block of the prediction unit corresponding to the current image block, the processing device can decode the prediction mode corresponding to the chroma block from the bit stream, and determine the prediction result of the chroma block (i.e., the first chroma predicted pixel value) based on the prediction mode.
[0245] Optionally, the prediction mode decoded from the bit stream by the processing device is a prediction mode other than the prediction mode for the second prediction processing. These prediction modes may be intra-frame prediction modes and inter-frame prediction modes, or may be a prediction mode that is a combination of intra-frame prediction modes and inter-frame prediction modes.
[0246] Optionally, the intra prediction mode includes at least one of a DC mode, a planar mode, an angular mode, an intra block copy (IBC) mode, etc. The main tasks of the inter prediction mode at the encoding end include motion estimation and motion compensation.
[0247] Optionally, the processing device may perform a first prediction process using the above prediction mode to obtain prediction results of the luminance block and the chrominance block corresponding to the current image block.
[0248] Optionally, the prediction mode of the luminance block and the prediction mode of the chrominance block may be the same or different.
[0249] Optionally, after determining the prediction result (i.e., the first luma predicted pixel value) of the luma block corresponding to the current image block, the processing device may determine a first luma reconstructed pixel value of a luma reconstructed block corresponding to the current image block based on the first luma predicted pixel value and the first luma residual corresponding to the current image block. The processing device may also determine a filter coefficient of a filter used in the second prediction process using the first luma reconstructed pixel value and the first chroma predicted pixel value.
[0250] Optionally, the first luminance residual may be obtained by decoding compressed data in a bit stream.
[0251] Optionally, the processing device may also downsample the first luminance reconstructed pixel to obtain a downsampled first luminance reconstructed pixel, and determine the filter coefficient using the first luminance reconstructed pixel value and the first chrominance reconstructed pixel value of the downsampled first luminance reconstructed pixel.
[0252] Optionally, the processing device can also select part of the first luminance reconstruction pixel values from the above-mentioned luminance reconstruction block according to a predetermined reconstruction pixel selection rule, and determine the filter coefficients of the filter based on the determined / selected part of the first luminance reconstruction pixel values and the corresponding co-located first chrominance pixel values.
[0253] Optionally, the first pixel is a reconstructed pixel.
[0254] Optionally, the second pixel is a reconstructed pixel.
[0255] Optionally, the processing device may use the above-mentioned first luminance reconstruction pixel as the first pixel, thereby determining or obtaining the second pixel of the first component (i.e., the luminance reconstruction pixel) and / or the second pixel of the second component (i.e., the chrominance reconstruction pixel) based on the first luminance reconstruction pixel and the filter coefficient.
[0256] Optionally, after determining the filter coefficients of the filter, the processing device may perform a second prediction process on the chrominance prediction block corresponding to the current image block using the first luminance reconstructed pixel values and the filter coefficients, thereby determining a second predicted pixel value of the chrominance prediction block. Furthermore, the processing device may determine a chrominance reconstructed pixel value of the chrominance block corresponding to the current image block using the second predicted pixel value and a chrominance residual corresponding to the current image block. The processing device then performs loop filtering on the chrominance reconstructed pixel value to obtain a decoded image. Optionally, the chrominance residual is a second chrominance residual.
[0257] Alternatively, the chroma residual can be obtained by decoding the compressed data in the bitstream.
[0258] Alternatively, the processing device may determine the filter coefficients according to the following principle: that is, as shown in FIG9a to FIG9c, the processing device may use the luminance component Y to predict the chrominance component Cr, may use the luminance component Y to predict the chrominance component Cb, and may use the chrominance component Cr to predict the chrominance component Cb.
[0259] Optionally, as shown in FIG9a , the processing device obtains a luminance reconstructed pixel ReconY1 by adding the luminance predicted pixel PredY1 and the luminance residual ResY1 , thereby determining or obtaining the filter coefficient of the chrominance component Cr through the luminance reconstructed pixel ReconY1 and the chrominance predicted pixel PredCr1 .
[0260] Optionally, if the video format corresponds to YUV444, YUV422, and YUV420, the predicted pixel value of the above-mentioned luminance prediction pixel PredY1 can correspond to the first luminance prediction pixel value mentioned in the above-mentioned second method, the residual value of the luminance residual ResY1 can correspond to the first luminance residual value mentioned in the above-mentioned second method, the pixel value of the luminance reconstruction pixel ReconY1 can correspond to the first luminance reconstruction pixel value mentioned in the above-mentioned second method, and the predicted pixel value of the chrominance prediction pixel PredCr1 can correspond to the first chrominance prediction pixel value mentioned in the above-mentioned second method.
[0261] Optionally, if the video format only corresponds to YUV422 and YUV420, the brightness prediction pixel value of the brightness prediction pixel PredY1 may correspond to the downsampled brightness reconstructed pixel value obtained by downsampling the first brightness reconstructed pixel value mentioned in the second method.
[0262] Optionally, in the process of determining the filter coefficient shown in FIG9 a , the number of the luma prediction pixel PredY1 may be at least one, and the number of the above-mentioned chroma prediction pixel PredCr1 may also be at least one.
[0263] Optionally, the number of the luma prediction pixels PredY1 and the number of the chroma prediction pixels PredCr1 are the same or different.
[0264] Optionally, the positions of the luma prediction pixel PredY1 , the luma reconstruction pixel ReconY1 , and the chroma prediction pixel PredCr1 correspond to each other.
[0265] Alternatively, as shown in FIG9b , the processing device may also add the luma prediction pixel PredY1 and the luma residual ResY1 to obtain a luma reconstructed pixel ReconY1. Furthermore, the processing device may add the chroma prediction pixel PredCr1 and the chroma residual ResCr1 to obtain a chroma reconstructed pixel ReconCr1. The filter coefficients for the chroma component Cr are then determined or obtained using the luma reconstructed pixel ReconY1 and the chroma reconstructed pixel ReconCr1.
[0266] Optionally, when the video format can correspond to YUV444, YUV422, and YUV420, the respective values of the luminance prediction pixel PredY1, the luminance residual ResY1, and the luminance reconstruction pixel ReconY1 can correspond to the first luminance prediction pixel value, the first luminance residual value, and the first luminance reconstruction pixel value mentioned in the above-mentioned first method, the respective values of the chrominance prediction pixel PredCr1, the chrominance residual ResCr1, and the chrominance reconstruction pixel ReconCr1 can correspond to the first chrominance prediction pixel value, the first chrominance residual value, and the first chrominance reconstruction pixel value mentioned in the above-mentioned first method, and the respective values of the luminance reconstruction pixel ReconY1 and the chrominance reconstruction pixel ReconCr1 can correspond to the first luminance reconstruction pixel value and the first chrominance reconstruction pixel value mentioned in the above-mentioned first method.
[0267] Optionally, when the video format corresponds to YUV422 and YUV420, the values of the luminance reconstruction pixel ReconY1 and the chrominance reconstruction pixel ReconCr1 may correspond to the downsampled first luminance reconstruction pixel value obtained by downsampling the first luminance reconstruction pixel in the first manner.
[0268] Optionally, in the process of determining the filter coefficient shown in Figure 9b, the number of luminance prediction pixels PredY1 can also be at least one, the number of chrominance prediction pixels PredCr1 can also be at least one, and the number of luminance prediction pixels PredY1 and the number of chrominance prediction pixels PredCr1 are the same or different, and the positions of the luminance prediction pixel PredY1, the luminance reconstruction pixel ReconY1 and the chrominance prediction pixel PredCr1 also correspond to each other.
[0269] Optionally, as shown in FIG9 c , the processing device may directly determine or obtain the filter coefficient of the chrominance component Cr through the luma prediction pixel PredY1 and the chrominance prediction pixel PredCr1 .
[0270] Optionally, when the video format can correspond to YUV444, YUV422, and YUV420, the values of the luminance prediction pixel PredY1 and the chrominance prediction pixel PredCr1 can correspond to the first luminance prediction pixel value and the first chrominance prediction pixel value mentioned in the third method above.
[0271] Optionally, when the video format corresponds to YUV422 and YUV420, the luminance prediction pixel PredY1 and the chrominance prediction pixel PredCr1 may correspond to the first luminance reconstruction pixel mentioned in the third manner mentioned above and obtained by downsampling the downsampled first luminance reconstruction pixel.
[0272] Optionally, in the process of determining the filter coefficient shown in Figure 9c, the number of luminance prediction pixels PredY1 can also be at least one, the number of chrominance prediction pixels PredCr1 can also be at least one, and the number of luminance prediction pixels PredY1 and the number of chrominance prediction pixels PredCr1 are the same or different, and the positions of the luminance prediction pixel PredY1, the luminance reconstruction pixel ReconY1 and the chrominance prediction pixel PredCr1 also correspond to each other.
[0273] Optionally, when the processing device performs a second prediction process on the current image block according to the first pixel and the filter coefficient to determine the predicted pixel value of the prediction block corresponding to the current image, the processing device may use a filter model in the form shown in formula (2): Chroma = f(c1*Luma1, c2*Luma2, c3*Luma3, ..., cN*LumaN) (2)
[0274] Optionally, Luma1 to LumaN are luminance pixels, Chroma is a chrominance pixel, Luma1 is the luminance pixel co-located with Chroma in formula (2), and Luma2 to LumaN are other luminance pixels. Optionally, Luma2 to LumaN can be luminance pixels surrounding the luminance pixel Luma1.
[0275] Optionally, the processing device may also adopt a filter model in the form of the following formula (3): Chroma = c1*Luma1+c2*Luma2+c3*Luma3+c4*Luma4+c5*Luma5+c6*P1+c7*P2+c8*P3+c9*P4+c10*P5+c11*B (3)
[0276] Optionally, c1~c11 are filter coefficients, Luma1~Luma5 are reference luminance pixels, and P1~P5 are nonlinear terms. Optionally, P1~P5 are the squares of the pixel values of the reference luminance pixel Luma1. Optionally, P1 is the square of the pixel value of the reference luminance pixel Luma1, and is scaled to the bit depth range. That is, P1=(Luma1*Luma1+midVal)>>bitDepth; bitDepth is the bit depth corresponding to the sample, and ">>" is the right shift sign. Optionally, for 10-bit video content, P is calculated by the following formula: P=(Luma1*Luma1+512)>>10.
[0277] Optionally, P2 to P5 may also be the square of the pixel value of the reference luminance pixel Luma1 and scaled to the bit depth range.
[0278] Optionally, equation (3) may further include a bias term B. The bias term B may be zero.
[0279] Optionally, the offset item B may also be other predetermined values (eg, for 10-bit video, the offset item B may be set to 512).
[0280] Optionally, the processing device may also adopt a filter model in the form of the following formula (4): Chroma = c1*Luma1+c2*Luma2+c3*Luma3+c4*Luma4+c5*Luma5+c6*LocX1+c7*LocY1+c8*P1+c9*B (4)
[0281] Optionally, c1 to c9 are filter coefficients, and Luma1 to Luma5 are reference luminance pixels. LocX1 and LocY1 are the horizontal position information and vertical position information of Luma1. P1 is a nonlinear term. Optionally, P1 is the square of the pixel value of the reference luminance pixel Luma1, and is scaled to the bit depth range. That is, P1 = (Luma1*Luma1+midVal)>>bitDepth; bitDepth is the bit depth corresponding to the sample, and ">>" is the right shift sign. Optionally, for 10-bit video content, P = (Luma1*Luma1+512)>>10. Optionally, the bias item B can be 0 or the bias item B can also be other predetermined values (e.g., for 10-bit video, the bias item B can be set to 512).
[0282] Optionally, LocX1 and LocY2 may also be the horizontal position information and vertical position information of the chroma pixel PreChroma to be predicted.
[0283] Optionally, the processing device may also adopt a filter model in the form of the following formula (5): Chroma = c1*Luma1+c2*GLX1+c3*GLY1+c4*P3+c5*P4+c6*P5+c7*B (5)
[0284] Optionally, c1-c7 are filter coefficients. Luma1 is the reference luma pixel co-located with the chroma pixel to be predicted. GLX1 and GLY1 are the horizontal and vertical gradient information of Luma1. P1 is a nonlinear term. Optionally, for 10-bit video content, P = (Luma1*Luma1+512)>>10. Optionally, the bias term B can be 0 or another predetermined value (e.g., for 10-bit video, the bias term B can be set to 512).
[0285] Alternatively, if the chrominance pixel to be predicted is the chrominance pixel in FIG8a, then its co-located reference luma pixel is the luma pixel at the same position as the chrominance pixel. If the chrominance pixel to be predicted is the chrominance pixel in FIG8b, then its co-located reference luma pixel is the luma pixel corresponding to the chrominance pixel.
[0286] Alternatively, the luma pixel corresponding to the position of the chroma pixel C1 may be luma pixel Y1 or luma pixel Y2. If the chroma pixel to be predicted is the chroma pixel in FIG8c, its co-located reference luma pixel is the luma pixel corresponding to its position.
[0287] Optionally, the luminance pixel corresponding to the position of the chrominance pixel C11 may be luminance pixel Y11 to luminance pixel Y44.
[0288] Optionally, the luminance pixel corresponding to the position of the chrominance pixel C11 may be the luminance pixel Y11 or the luminance pixel Y33.
[0289] Optionally, the gradients GLX1 and GLY1 may be calculated as: GLX1=(2Luma5+Luma2+Luma7)−(2Luma6+Luma4+Luma9); GLY1=(2Luma3+Luma2+Luma4)−(2Luma8+Luma7+Luma9).
[0290] Optionally, as shown in Figure 10, Luma2 is the brightness pixel at the upper left of Luma1, Luma3 is the brightness pixel above Luma1, Luma4 is the brightness pixel at the upper right of Luma1, Luma5 is the brightness pixel at the left of Luma1, Luma6 is the brightness pixel at the right of Luma1, Luma7 is the brightness pixel at the lower left of Luma1, Luma8 is the brightness pixel below Luma1, and Luma9 is the brightness pixel at the lower right of Luma1.
[0291] In this embodiment, since it is necessary to determine a reference area in order to calculate the filter coefficient in the prior art, and determine the filter coefficient based on the reconstructed pixels selected in the reference area. When the distribution pattern of the reconstructed pixels selected in the reference area is significantly different from the distribution pattern of the pixels in the current block, the filter coefficient determined by the reference area will affect the accuracy of the cross-component prediction mode or the same-component prediction mode. Based on this, the image processing method of the embodiment of the present application uses the pixels in the current image block to determine the filter coefficient, which can improve the accuracy of the filter model in the cross-component prediction mode or the same-component prediction mode selected for subsequent prediction of the current image block.
[0292] Third embodiment
[0293] In this embodiment, the image processing method is still described with the processing device as the execution subject. Based on any of the above embodiments, the image processing method may further include:
[0294] The first reconstructed pixel is a reconstructed pixel with a maximum first component or a reconstructed pixel with a minimum first component;
[0295] Optionally, during the process of determining the filter coefficient, the first reconstructed pixel of the first component used by the processing device may be the maximum reconstructed pixel in the reconstructed image block of the first component corresponding to the current image block. Optionally, the first reconstructed pixel of the first component used by the processing device may also be the minimum reconstructed pixel in the reconstructed image block of the first component corresponding to the current image block.
[0296] Optionally, the image processing method may also include:
[0297] The first reconstructed pixel is a reconstructed pixel in a predetermined area;
[0298] Optionally, the first reconstructed pixel of the first component used by the processing device in determining the filter coefficient may also be a reconstructed pixel in a predetermined area. Optionally, the predetermined area is the current image block or a sub-block or sub-area of the current image block.
[0299] Optionally, the image processing method may further include:
[0300] The first reconstructed pixel is a maximum reconstructed pixel of the first component or a minimum reconstructed pixel of the first component determined in a predetermined area.
[0301] Optionally, in the process of determining the filter coefficient, the first reconstructed pixel of the first component used by the processing device may also be the maximum reconstructed pixel of the first component or the minimum reconstructed pixel of the first component determined in the predetermined area.
[0302] Optionally, the processing device may use the predicted pixels and / or reconstructed pixels of the current image block or a sub-block or sub-region of the current image block as first predicted pixels and / or first reconstructed pixels to determine the filter coefficients.
[0303] Optionally, the processing device can determine the predicted pixels of the luminance prediction block and the chrominance prediction block corresponding to the current image block, and / or determine the reconstructed pixels of the luminance reconstruction block and the chrominance reconstruction block corresponding to the current image block, as the first predicted pixels and / or the first reconstructed pixels for determining the filter coefficients.
[0304] Optionally, if the processing device determines the filter coefficients using part of the luma reconstructed pixels and part of the chroma reconstructed pixels in the luma reconstruction block, the part of the luma reconstructed pixels and part of the chroma reconstructed pixels may be selected according to a preset rule.
[0305] Optionally, if the processing device determines the filter coefficients using part of the luma reconstructed pixels and part of the chroma predicted pixels in the luma reconstruction block, part of the luma reconstructed pixels and part of the chroma predicted pixels may also be selected according to a preset rule.
[0306] Optionally, if the processing device uses part of the luma prediction pixels and part of the chroma prediction pixels in the luma reconstruction unit, part of the luma prediction pixels and part of the chroma prediction pixels may also be selected according to a preset rule.
[0307] Optionally, assuming that the current image block is the corresponding reconstructed block or prediction block in the coding unit, it can be seen from the above that the first pixel of the first component can be the above-mentioned partial luminance reconstructed pixel, partial chrominance reconstructed pixel, partial luminance predicted pixel or partial chrominance predicted pixel.
[0308] Optionally, referring to Figures 11a to 11c, the size of the luminance image block A1 is 4x4, the size of the luminance image block A2 is 8x8, and the size of the luminance image block A3 is 16x16. The processing device can select four pixels at the upper left corner, lower left corner, upper right corner, and lower right corner of the luminance image block A1 as luminance pixels y1. Then, the processing device determines the co-located chrominance pixels c1 (not shown in the figure) of these luminance pixels y1 in the corresponding chrominance image block, thereby using the luminance pixels y1 as the first reconstructed pixel / first predicted pixel Luma1 of the first component in the above formula (2), and using the co-located chrominance pixel c1 of the luminance pixel y1 as the second predicted pixel Chroma of the second component in the same formula (2), thereby determining the filter coefficients in formula (2) using the above luminance pixels y1 and their co-located chrominance pixels c2.
[0309] Optionally, the processing device may further select four pixels at the upper left corner, lower left corner, upper right corner, and lower right corner of the luminance image block A2 as luminance pixels y2, and determine, based on these luminance pixels y2, the co-located chrominance pixels c2 (not shown in the figure) of these luminance pixels y2 in the corresponding chrominance image block. Thereafter, the processing device uses the luminance pixels y2 as the first reconstructed pixel / first predicted pixel Luma1 of the first component in the above-mentioned equation (2), and uses the co-located chrominance pixel c2 of the luminance pixel y2 as the second predicted pixel Chroma of the second component in the same equation (2), thereby determining the filter coefficients in equation (2) using the above-mentioned luminance pixels y2 and their co-located chrominance pixels c2.
[0310] Optionally, the processing device may further determine a luminance pixel y3 in the luminance image block A3 and a chrominance pixel c3 in the corresponding chrominance image block, so as to determine the filter coefficient in formula (2) based on the luminance pixel y3 and the chrominance pixel c3.
[0311] Optionally, the processing device may also select pixels around the four pixels at the upper left corner, lower left corner, upper right corner, and lower right corner of each of the above-mentioned luminance image blocks as selected luminance pixels as the luminance pixel Luma1 in formula (2), and determine the co-located chrominance pixels of these luminance pixels in the corresponding chrominance image blocks based on these luminance pixels (not shown in the figure) to determine the filter coefficients in formula (2) based on these luminance pixels and the co-located chrominance pixels.
[0312] Optionally, the processing device may also select other luminance pixels on the boundary pixels of the luminance image block (such as pixels in the middle of the boundary pixel row / column) in the luminance image block as luminance pixels for determining the filter coefficient, and use the co-located chrominance pixels corresponding to the luminance pixels as chrominance pixels for determining the filter coefficient. Optionally, the processing device may select other luminance pixels on the boundary pixels of the luminance image block (such as pixels in the middle of the boundary pixel row / column) in the luminance image block as luminance pixel y3, and use the co-located chrominance pixels corresponding to the luminance pixel y3 as chrominance pixel c3 (not shown in the figure). Thereafter, the luminance pixel y3 is used as the first reconstructed pixel / first predicted pixel Luma1 of the first component in the above formula (2), and the co-located chrominance pixel c3 of the luminance pixel y3 is used as the second predicted pixel Chroma of the second component in the above formula (2), thereby determining the filter coefficient in formula (2) through the luminance pixel y3 and its co-located chrominance pixel c3.
[0313] Optionally, the processing device may select pixels in the middle of the luminance image blocks A1-A3 as luminance pixels y1-y3, and use the co-located chrominance pixels corresponding to the luminance pixels y1-y3 as chrominance pixels c1-c3 (not shown in the figure). Thereafter, the processing device uses the luminance pixels y1-y3 as Luma1 in equation (2), and uses the co-located chrominance pixels c1-c3 of the luminance pixels y1-y3 as Chroma in equation (2), thereby determining the filter coefficients in equation (2) using the luminance pixels y1-y3 and their co-located chrominance pixels c1-c2.
[0314] Optionally, the processing device may also select the pixel with the maximum pixel value and / or the pixel with the minimum pixel value among the boundary pixels of the luminance image blocks A1 to A3 as the luminance pixel y, and use the co-located chrominance pixel c of the luminance pixel y as the first reconstructed pixel / first predicted pixel Luma1 of the first component in the above formula (2) and the second predicted pixel Chroma of the second component in (2.1), so as to determine the filter coefficient based on the luminance pixel y and the co-located chrominance pixel c.
[0315] Optionally, the processing device may also select the pixel with the maximum pixel value and / or the pixel with the minimum pixel value among all the luminance pixels of the luminance image blocks A1 to A3 as the luminance pixel y, and use the luminance pixel y and the co-located chrominance pixel c of the luminance pixel y as the first reconstructed pixel / first predicted pixel Luma1 of the first component in the above formula (2) and the second predicted pixel Chroma of the second component in (2.1), respectively, to determine the filter coefficient based on the luminance pixel y and the co-located chrominance pixel c.
[0316] Optionally, for video images in the video formats YUV422 and YUV420, the processing device may downsample the luminance prediction block and / or the luminance reconstruction block to obtain a downsampled reconstructed block, and select luminance pixels in the downsampled reconstructed block for determining the filter coefficients.
[0317] Optionally, the processing device may downsample the luminance image block corresponding to the current image block to obtain a downsampled luminance image block. The luminance pixels in the downsampled luminance image block are then used as luminance pixels for determining the filter coefficients (such as Luma1 in the above formula (2)), and the corresponding chrominance pixels (such as the same luminance pixels) are further determined based on these luminance pixels, thereby determining the filter coefficients based on the portion of luminance pixels and the chrominance pixels corresponding to the portion of luminance pixels.
[0318] Optionally, the above-mentioned luminance image block may be a luminance reconstruction block or a luminance prediction block corresponding to the current image block.
[0319] Alternatively, referring to FIG12 , in the luminance image block A4, the processing device may select one pixel every predetermined number of pixels (e.g., 4 pixels) in the horizontal direction, and one pixel every predetermined number of pixels (e.g., 4 pixels) in the vertical direction, to obtain a plurality of luminance pixels (such as the 16 shadow luminance pixels in the figure) as sampled luminance pixels. Next, the processing device uses these sampled luminance pixels to determine the corresponding chrominance pixels (such as the same luminance pixels), and substitutes these sampled luminance pixels and the chrominance pixels corresponding to these luminance pixels into the above formula (2) to determine the filter coefficients.
[0320] Optionally, the processing device may also determine the filter coefficients by using only a portion of the selected luminance pixels and the chrominance pixels corresponding to the portion of the luminance pixels.
[0321] Optionally, as shown in FIG13 , if the processing device uses the luma pixel y4 as the luma pixel Luma1 co-located with the chroma pixel Chroma, the processing device may select Luma2 to LumaN around the luma pixel y4 (pixels with vertical line shadows around the luma pixel y4 as shown in FIG13 ).
[0322] Optionally, as shown in FIG14 , the processing device may downsample the luminance image block A4 to obtain a downsampled luminance image block A4′. That is, the processing device may directly use the multiple luminance pixels y4 in the luminance block A4 as luminance pixels in the luminance image block A4′. The pixels in the downsampled luminance image block A4′ serve as the luminance pixel Luma1 co-located with the chrominance pixel Chroma to be predicted. Luma2 to LumaN are selected from the luminance pixels surrounding the luminance pixel y4 in the luminance image block that has not been downsampled, as indicated by the vertical shaded pixels in FIG14 .
[0323] Optionally, if the luminance pixel y4 is located at the edge of the luminance image block and there is an adjacent luminance pixel that is not in the image block where the luminance pixel y4 is located, the processing device can select a luminance pixel adjacent to it but in other image blocks, or use a pixel value determined by a preset rule as the pixel value of the adjacent luminance pixel in the image block where the luminance pixel y4 is located.
[0324] Alternatively, as shown in FIG14 , if luma pixel y4 is located on the left boundary of an image block, then there is no luma pixel adjacent to its left in the image block where luma pixel y4 is located. In this case, the processing device may select the luma pixel adjacent to its left in the adjacent image block as Luma2 to LumaN in equation (2), or use the value of luma pixel y4 as the pixel value of the luma pixel adjacent to its left.
[0325] Alternatively, if the processing device selects pixels around the four pixels at the upper left corner, lower left corner, upper right corner, and lower right corner of the luminance image block as the selected luminance pixels as the luminance pixel Luma1 in formula (2), and determines the co-located chrominance pixels of these luminance pixels in the corresponding chrominance image block (not shown in the figure) based on these luminance pixels to determine the filter coefficients in formula (2) based on these luminance pixels and the co-located chrominance pixels, then the selected luminance pixels are luminance pixels that are adjacent to the four pixels at the upper left corner, lower left corner, upper right corner, and lower right corner of the current image block, or adjacent to the luminance pixels at the upper, lower, left, right, and diagonally adjacent to the selected luminance pixels, and the luminance pixels adjacent to the selected luminance pixels at the upper, lower, left, right, and diagonally adjacent to the selected luminance pixels are all located within the current image block. Next, one or more of the luminance pixels adjacent to the four pixels at the upper, lower, left, right, and diagonally adjacent to the selected luminance pixels are used as Luma2 to LumaN in formula (2). In this way, the situation where the adjacent pixels of the selected luminance pixels are not within the current image block is avoided.
[0326] Optionally, as shown in FIG15 , after determining the luma pixels for deriving the filter coefficients according to a preset rule (e.g., upsampling), the processing device may further determine the chroma pixels co-located with these luma pixels (e.g., chroma pixel c4 of the co-located chroma image block a4 in FIG15 ). Filter coefficients c0, c1, ..., cN are then derived based on the luma pixel y4 determined in FIG15 , the pixels surrounding the luma pixel y4 in FIG13 and FIG14 (the vertically shaded luma pixels), and the chroma pixel c4 in FIG15 .
[0327] Optionally, the above-mentioned rules for selecting brightness pixels used by the processing device may also be combined with each other to select pixels for determining filter coefficients.
[0328] Optionally, after determining / selecting the luminance pixel and / or the chrominance pixel corresponding to the luminance pixel, the processing device may substitute these luminance pixels and / or chrominance pixels into the above-mentioned formula (2), formula (3), formula (4) or formula (5) to obtain a system of equations, thereby determining the filter coefficients for performing the second prediction processing on the current image block by solving the system of equations. Optionally, the number of pixel pairs consisting of luminance pixels and chrominance pixels selected by the processing device needs to be greater than or equal to the number of filter coefficients in the above-mentioned formula (2), formula (3), formula (4) or formula (5) adopted by the processing device, so that the processing device can solve the corresponding system of equations to determine the values of the filter coefficients.
[0329] Alternatively, it is assumed that the processing device determines the filter coefficients using the above formula (3). Since the above formula (3) is in the form of: Chroma = L·c, where Chroma is [Chroma1, Chroma2, ..., Chroma N ] T , which is a vector of chrominance pixels. c is [c0,c1,...,c9,c 10 ] T , which are the filter coefficients. L is a matrix composed of luminance pixels. Optionally, L can be:
[0330] In this way, the processing device can pass c=(L T L) -1 ·L T Chroma, determines or obtains the value of the filter coefficient.
[0331] Optionally, the image processing method may further include at least one of the following:
[0332] The first reconstructed pixel is different from the first pixel;
[0333] The first predicted pixel is different from the first pixel;
[0334] The first reconstructed pixel is the same as the first pixel;
[0335] The first predicted pixel is the same as the first pixel.
[0336] Optionally, after the processing device determines the first reconstructed pixel or the first predicted pixel from which the filter coefficient is determined through the above operation and determines the filter coefficient based on the first reconstructed pixel or the first predicted pixel, the processing device can also re-determine / select a new reconstructed pixel or predicted pixel, thereby performing a second prediction processing on the current image block based on the filter coefficient and the new reconstructed pixel or predicted pixel.
[0337] Optionally, the processing device can also directly use the first reconstructed pixel or first predicted pixel for determining the filter coefficient determined by the above operation as the first pixel for performing a second prediction process on the prediction block corresponding to the current image block, thereby determining or deriving the second pixel of the first component (i.e., the luminance prediction pixel), or determining or deriving the second pixel of the second component (i.e., the chrominance prediction pixel).
[0338] Optionally, the processing device can determine the filter model corresponding to Equation (2) by using the determined filter coefficients. As shown in FIG16a , in this filter model, the processing device can use the determined reconstructed pixel value as input, thereby determining the output of the filter model using Equation (2). This output is the second chroma prediction value of the chroma prediction block obtained by the second prediction process.
[0339] Optionally, the reconstructed pixels used as input to the filter model may be all reconstructed pixels corresponding to the current image block determined based on the predicted pixel value corresponding to the current image block and the residual value of the first residual corresponding to the current image block, or may be partial reconstructed pixels.
[0340] Optionally, if the processing device inputs partially reconstructed pixels to the filter model, these partially reconstructed pixels are partially reconstructed pixels other than the reconstructed pixels used in advance by the processing device to determine the filter coefficients.
[0341] Optionally, if the processing device inputs partially reconstructed pixels into the filter model, these partially reconstructed pixels may also be: reconstructed pixels other than the reconstructed pixels corresponding to the predicted pixels used in advance by the processing device to determine the filter coefficients.
[0342] Optionally, as shown in FIG16 b , the second prediction process performed by the processing device on the current image block may further include weighted processing.
[0343] Optionally, after performing the first prediction process to determine the chrominance predicted pixel value, the processing device may weight the chrominance predicted pixel value according to a preset weight and the chrominance predicted pixel value obtained in the first prediction process to obtain a weighted chrominance predicted pixel. The processing device may then use the residual ResCb to obtain the chrominance reconstructed pixel value of the chrominance reconstructed pixel for subsequent second prediction process of the current avatar block.
[0344] Optionally, if the processing device uses all the reconstructed pixels used to determine the filter coefficients to perform a second prediction process on the current image block, the processing device can also use the second chrominance prediction pixel value obtained by these reconstructed pixels as the predicted pixel value of the predicted pixel of the chrominance prediction block corresponding to the current image block to perform subsequent image encoding or decoding processing.
[0345] Alternatively, if the processing device only uses reconstructed pixels other than the reconstructed pixels used to determine the filter coefficients to perform the second prediction processing, then for the chrominance prediction pixels that have not undergone the second prediction processing, the processing device can directly use the chrominance prediction pixel values determined by the first prediction processing as the pixel values of these prediction pixels that have not undergone the second prediction processing, and combine them with the second chrominance prediction pixel values determined by the second prediction processing to obtain a chrominance image block (such as a chrominance prediction image block) for subsequent image encoding or decoding processing.
[0346] In this embodiment, the image processing method obtains or determines predicted pixels or reconstructed pixels in the current image block when predicting the chrominance component and / or luminance component of the image block through a processing device, and then predicts the current image block based on the pixel values of the predicted pixels or reconstructed pixels, thereby fully considering the correlation between the reference pixels of the known luminance component in the current image block and the pixels to be predicted, and effectively avoiding the problem of low prediction result accuracy caused by the large difference between the distribution pattern of the reconstructed pixels selected in the reference area and the distribution pattern of the pixels in the current block when determining the filter coefficient by determining the reference pixels in the reference area in the traditional method, thereby improving the accuracy of the result of predicting the luminance component or chrominance component of the current image block.
[0347] Fourth embodiment
[0348] In this embodiment, the image processing method is still described with the processing device as the execution subject. Based on any of the above embodiments, the method for determining the first pixel may include:
[0349] determining a first pixel according to a third reconstructed pixel or a third predicted pixel of the first component;
[0350] Optionally, the third reconstructed pixel or third predicted pixel of the first component may be a luma reconstructed pixel or luma predicted pixel determined or selected by the processing device during the process of determining or selecting the reconstructed pixel or predicted pixel to determine the filter. The processing device may directly use the third reconstructed pixel or third predicted pixel as the first pixel for performing a second prediction process on the current image block together with the determined filter coefficient.
[0351] Optionally, the method for determining the first pixel may further include:
[0352] determining a first pixel according to a downsampled pixel of a third reconstructed pixel or a third predicted pixel;
[0353] Optionally, the processing device may, in the process of determining or selecting the reconstructed pixel or the predicted pixel to determine the filter, perform downsampling processing on the determined or selected brightness reconstructed pixel or brightness predicted pixel to obtain a pixel (i.e., the downsampled pixel of the above-mentioned third reconstructed pixel or third predicted pixel), and then use the downsampled pixel as the first pixel and the determined filter coefficient to perform a second prediction processing on the current image block.
[0354] Optionally, the method for determining the first pixel may further include:
[0355] The first pixel is determined according to a fourth predicted pixel determined or obtained by performing intra-frame prediction or inter-frame prediction on the current image block.
[0356] Optionally, in addition to determining the brightness reconstruction pixel or brightness prediction pixel used to determine the filter as the first pixel for the second prediction processing, the processing device can also directly perform intra-frame prediction or inter-frame prediction on the current image block, and determine or obtain the fourth prediction pixel as the first pixel to perform the second prediction processing on the current image block together with the determined filter coefficient.
[0357] Optionally, the processing device can also combine the third reconstructed pixel or the third predicted pixel as the first pixel, the downsampled pixel of the third reconstructed pixel or the third predicted pixel, and the fourth predicted pixel, and input them into the above-mentioned filter model, so as to perform a second prediction processing on the current image block, that is, the filter model outputs the prediction result of the prediction block corresponding to the current image block (that is, the luminance predicted pixel value and / or the chrominance predicted pixel value).
[0358] Optionally, based on at least one of the first embodiment, the second embodiment, and the third embodiment, the image processing method further includes:
[0359] determining or obtaining a reconstructed image block corresponding to the current image block according to the second pixel;
[0360] The reconstructed pixels of the first component and / or the reconstructed pixels of the second component are determined or obtained according to the reconstructed pixels of the first component of the reconstructed image block.
[0361] Optionally, after the processing device performs a second prediction process on the current image block, thereby determining or obtaining the second pixel (luminance prediction pixel value and / or chrominance prediction pixel value) of the prediction block corresponding to the current image block, the processing device can further determine or obtain the reconstructed image block corresponding to the current image block based on the residual corresponding to the second pixel and the current image block; thereafter, the processing device can further determine or obtain the reconstructed pixel of the first component and / or the reconstructed pixel of the second component based on the reconstructed pixel of the first component of the reconstructed image block (i.e., the luminance reconstructed pixel value).
[0362] Optionally, the processing device may perform a first prediction process on the current image block to determine or obtain a reconstructed image block. The reconstructed image block includes a luma reconstructed image block and a chroma reconstructed image block. Thereafter, the processing device further determines or obtains the luma reconstructed pixel L2 of the first component of the luma reconstructed image block and / or the chroma reconstructed pixel C1 of the second component of the chroma reconstructed image block based on the luma reconstructed pixel L1 (i.e., the luma reconstructed pixel value) of the first component of the luma reconstructed image block. Optionally, the processing device does not need to perform the second prediction process mentioned in the embodiments of the present application on the current image block.
[0363] Optionally, the above-mentioned method for determining the filter coefficients is the method for determining the filter coefficients mentioned in the embodiment of the present application. In one embodiment, the luminance reconstructed pixel L1' and the chrominance reconstructed pixel C1' are selected from the reconstructed image block (i.e., the reconstructed luminance image block and the reconstructed chrominance image block), and the filter coefficients are determined based on the luminance reconstructed pixel L1' and the chrominance reconstructed pixel C1'. The method of selecting the luminance reconstructed pixel L1' and the chrominance reconstructed pixel C1' is similar to the method described in Figures 11a to 15 and the corresponding relevant paragraphs. The method of determining the filter coefficients based on the luminance reconstructed pixel L1' and the chrominance reconstructed pixel C1' is similar to the method of deriving the filter coefficients using the luminance reconstructed pixel ReconY1 and the chrominance reconstructed pixel ReconCr1 in Figure 9b and its related paragraphs. For the sake of brevity, it is not described in detail. The luminance reconstructed pixel L1 and the luminance reconstructed pixel L1' in the luminance reconstructed image block and the chrominance reconstructed pixel C1' in the chrominance reconstructed image block are reconstructed pixels obtained by intra-frame prediction or inter-frame prediction. The chrominance reconstructed pixel C1 is the chrominance reconstructed pixel in the chrominance reconstructed image block obtained by the loop filtering process of the present application. The brightness reconstruction pixel L1 and the brightness reconstruction pixel L1 ′ are in the same brightness reconstruction image block.
[0364] Optionally, when the processing device is an encoder, the determined filter coefficients may be entropy-encoded and encapsulated in a bitstream. When the processing device is a decoder, the filter coefficients corresponding to the image block may be decoded and reconstructed from the bitstream for loop filtering.
[0365] Optionally, when the processing device is an encoder, entropy encoding may not be performed on the determined filter coefficients. When the processing device is a decoder, the corresponding filter coefficients may be determined using reconstructed pixels in a self-reconstructed image block. The reconstructed image block includes a luma reconstructed image block and its corresponding chroma reconstructed image block, and the reconstructed pixels include luma reconstructed pixels in the luma reconstructed image block and chroma reconstructed pixels in the chroma reconstructed image block.
[0366] Optionally, after the processing device completes the prediction of the current image block, it can also perform encoding / decoding processing on the video image in units of coding units (the coding unit includes a luminance block and two chrominance blocks) as shown in the loop filtering module in Figure 6A or Figure 6B, that is, in the loop filtering module, a luminance reconstructed image block and a chrominance reconstructed image block are obtained, and a filter coefficient is determined based on a portion of the luminance reconstructed pixels in the luminance reconstructed image block and a portion of the chrominance reconstructed pixels in the chrominance reconstructed image block. Then, the chrominance reconstructed image block is loop filtered using the filter coefficient and the luminance reconstructed pixels in the luminance reconstructed image block to obtain a filtered chrominance reconstructed image block. Finally, the processing device can generate a chrominance reconstructed image or a chrominance decoded image based on the filtered chrominance reconstructed image block.
[0367] Optionally, the above-mentioned reconstructed image block is divided differently from the coding unit, prediction unit, and transformation unit. Optionally, the size of the reconstructed image block can be larger than the size of the coding unit, prediction unit, and transformation unit. Optionally, the reconstructed image block can include a reconstructed area outside the coding unit and located around the coding unit.
[0368] In this embodiment, the image processing method can use the pixels of the first component as a reference to predict the pixels of the second component of the current image block during the intra-frame prediction or inter-frame prediction of the current image block, thereby taking into account the prediction processing using the correlation between different components, which can improve the prediction accuracy of images with strong correlation between the luminance component and the chrominance component during the prediction process, and thereby further improve the compression rate of the video data.
[0369] Fifth embodiment
[0370] In this embodiment, the image processing method is still described with the processing device as the execution subject. Based on any of the above embodiments, the image processing method may further include:
[0371] Loop filtering is performed based on the second pixel.
[0372] Optionally, after performing a second prediction process on the current image block to determine or obtain a second pixel (i.e., a luminance prediction pixel value and / or a chrominance prediction pixel value) of a prediction block corresponding to the current image block, the processing device may further use the second pixel to determine a reconstructed image block corresponding to the current image block, and perform loop filtering on the reconstructed image block to obtain a filtered reconstructed image block. Finally, the processing device may generate a reconstructed image or a decoded image based on the filtered reconstructed image block.
[0373] Optionally, the above-mentioned reconstructed image block may be a reconstructed image block corresponding to the current image block or a prediction block corresponding to the current image block.
[0374] Optionally, the aforementioned reconstructed image block may be another reconstructed image block. The other reconstructed image block may be an image block that is divided in a different manner than the current image block or the prediction block corresponding to the current image block. Optionally, the other reconstructed image block may be a reconstructed image block that is slightly larger than the current image block and includes pixel rows or pixel columns surrounding the current image block.
[0375] Optionally, if the division method of the transformation unit and the division method of the prediction unit of the current image block are different, and the sizes of the transformation unit and the prediction unit are different due to the different division methods, then the reconstructed image block can be the reconstructed image block corresponding to the transformation unit.
[0376] Optionally, the relationship between the current image block (i.e., the coding unit currently being encoded by the encoder) and the corresponding prediction block (i.e., prediction unit, transform unit) can be as shown in Figures 17 and 18. Optionally, the current image block (the coding unit shown) includes one luma block and two chroma blocks; the prediction unit includes one luma prediction block and two chroma prediction blocks; and the transform unit includes one luma transform block and two chroma transform blocks. The prediction unit is the basic unit for performing prediction processing, and the transform unit is the basic unit for performing transform, quantization / inverse transform, and inverse quantization.
[0377] Optionally, at the encoding end, a processing device divides the residual corresponding to the current image block into transform units, and then transforms and quantizes the residual to generate transform coefficients. Therefore, before the transform and quantization process, the transform unit stores the residual, and after the transform and quantization process, the transform unit stores the transformed coefficients.
[0378] Optionally, at the decoding end, after the processing device reads the encoded transform coefficient related information from the bit stream, the transform coefficient in the transform unit can be obtained through the information, and the residual can be obtained by inverse transforming and inverse quantizing the transform coefficient.
[0379] Optionally, the reconstructed image block obtained when the processing device performs loop filtering may be a reconstructed image block having the same size as the current image block.
[0380] Optionally, the processing device may also use the luminance reconstructed pixels and chrominance reconstructed pixels determined for the second prediction process as “a portion of luminance reconstructed pixels” and “a portion of chrominance reconstructed pixels” for determining filter coefficients, and determine the filter coefficients.
[0381] Optionally, as shown in FIG19 , since the processing device has completed the reconstruction of the current chrominance pixel, the processing device does not involve residual processing during the subsequent loop filtering process.
[0382] Optionally, after determining the chrominance reconstructed image block, the processing device may perform weighted processing on the filtered chrominance reconstructed image block and the chrominance reconstructed image block before filtering using a preset weight coefficient, thereby obtaining a weighted chrominance reconstructed image block for subsequent generation of a chrominance reconstructed image or a chrominance decoded image.
[0383] Optionally, the processing device may also use secondary segmentation to perform prediction processing and loop filtering processing on the current image block.
[0384] Optionally, after determining the reconstructed pixel value of the reconstructed pixel used to determine the filter coefficient, the processing device may further determine the reconstructed image block corresponding to the reconstructed pixel.
[0385] Optionally, the size of the reconstructed image block is the same as the size of the transform unit, and the reconstructed pixels in the reconstructed image block correspond to the residuals in the transform unit.
[0386] Optionally, the size of the reconstructed image block is the same as the size of the prediction unit (such as the prediction unit corresponding to the current image block when the processing device performs the first prediction processing), and the reconstructed pixels in the reconstructed image block correspond to the predicted pixels in the predicted image block.
[0387] Optionally, the prediction unit division method of the prediction unit in the first prediction process, the division method of deriving reconstructed pixels or reconstructed image blocks using the prediction unit, and the division method of the coding unit are referred to as the first division method. In other words, the first division method can be a division method of dividing the coding tree unit into coding units, a division method of dividing the coding unit into prediction units, and a division method of dividing the coding unit into transform units.
[0388] Optionally, the processing device performs a second prediction process on the current image block using a division method different from the first division method, that is, after determining the reconstructed image block corresponding to the coding tree unit, the reconstructed image block corresponding to the coding unit, the reconstructed image block corresponding to the prediction unit, or the reconstructed image block corresponding to the transform unit, the processing device further divides the reconstructed image block corresponding to the coding tree unit, the reconstructed image block corresponding to the coding unit, the reconstructed image block corresponding to the prediction unit, or the reconstructed image block corresponding to the transform unit to obtain the reconstructed image block used for the second prediction process.
[0389] Optionally, the second division is a division method of further dividing the prediction image block (e.g., prediction unit) into smaller prediction image blocks (e.g., smaller prediction units). The above-mentioned prediction image blocks correspond to the first prediction process, and the smaller prediction image blocks correspond to the second prediction process.
[0390] Optionally, the second division is a division method of further dividing the reconstructed image block into smaller reconstructed image blocks. The prediction image block corresponding to the above-mentioned reconstructed image block is the basic unit of the first prediction processing mentioned in this embodiment, and the prediction image block corresponding to the smaller reconstructed image block is the basic unit of the second prediction processing mentioned in this embodiment.
[0391] Alternatively, assuming that the processing device determines that a reconstructed image block corresponding to a coding tree unit, a coding unit, a prediction unit, or a transform unit is referred to as a reconstructed image block R1 (including a luma reconstructed image block and a chroma reconstructed image block), then, as shown in FIG20a , the processing device may divide the reconstructed image block R1 into multiple smaller reconstructed image blocks r1 of a fixed size according to a preset rule. Subsequently, a second prediction process or loop filtering process is performed on each of the multiple smaller reconstructed image blocks.
[0392] Optionally, the preset rule may be: dividing the reconstructed image block R1 into multiple reconstructed image blocks r1 of the same size.
[0393] Optionally, the reconstructed image block r1 after the secondary division may be an input reconstructed image block (such as a brightness reconstructed image block) of the convolution filter shown in FIG. 9 a to FIG. 9 c .
[0394] Optionally, the reconstructed image block r1 after the secondary division may be an input reconstructed image block of the convolution filter shown in FIG16 a .
[0395] Optionally, the reconstructed image block r1 after the above-mentioned secondary division can also be the input reconstructed image block of the convolution filter shown in Figure 19.
[0396] In this embodiment, the processing device may perform the second division in a manner different from the first division to perform a second prediction on the reconstructed image block. Thus, the granularity of the second prediction performed by the processing device on the current image block differs from that of the first prediction. This allows the two prediction results for the current image block to complement each other, thereby improving the accuracy of the prediction for the current image block.
[0397] Optionally, the above-mentioned secondary division may also be used to predict an image block (the predicted chrominance image block P1 as shown in FIG20 b , or the predicted luminance image block P2 (not shown in the figure).
[0398] Alternatively, the processing device may perform a secondary division of the prediction image block or prediction unit in the first prediction process in a manner similar to the method of dividing the reconstructed image block r1, thereby obtaining divided prediction units or prediction image blocks (such as the predicted chrominance image block p1 shown in FIG20b ). The processing device then selects or determines luma pixels or chroma pixels for deriving filter coefficients based on the divided prediction units or prediction image blocks.
[0399] Optionally, the processing device performs a second division on the prediction unit P1 in the first prediction process to obtain prediction units p1. Thereafter, the luminance pixel PredY1 and the chrominance pixel PredCr1 shown in FIG. 9a to FIG. 9c are determined based on the prediction unit p1.
[0400] In this embodiment, since the processing device adopts the second division, filter coefficients corresponding to prediction units with finer granularity can be obtained, and thus the prediction accuracy of the current image block is improved.
[0401] Optionally, if the processing device performs loop filtering processing using the above-mentioned secondary division method, it is beneficial to eliminate artifacts and improve the quality of the reconstructed image.
[0402] Optionally, the processing device performs the above-mentioned secondary division processing on the reconstructed luminance block and the reconstructed chrominance block in the loop filtering processing.
[0403] Optionally, the processing device may also perform secondary prediction or loop filtering processing on reconstructed image blocks of other sizes.
[0404] Optionally, the processing device may use a size of the image block or image unit different from that involved in the first prediction process for the second prediction process or subsequent loop filtering process on the current image block.
[0405] Optionally, after determining the reconstructed pixel value of the reconstructed pixel used to determine the filter coefficient, the processing device may determine the reconstructed image block corresponding to the reconstructed pixel.
[0406] Optionally, the size of the reconstructed image block is the same as the size of the transformation unit, and the reconstructed pixels in the reconstructed image block correspond to the residuals in the transformation unit; or, the size of the reconstructed image block is the same as the size of the prediction unit (such as the prediction unit corresponding to the first prediction processing performed by the processing device), and the reconstructed pixels in the reconstructed image block correspond to the predicted pixels in the prediction image block.
[0407] Optionally, the size of the prediction unit in the first prediction process, the size of the reconstructed pixel or image block derived using the prediction unit, and the size of the coding unit are referred to as the first size involved in the first prediction process. Different from the first size, the size of the image block or image unit involved in the second prediction process performed by the processing device uses a size different from the size of the image block or image unit involved in the first prediction process. After determining the reconstructed image block corresponding to the coding tree unit, the reconstructed image block corresponding to the coding unit, the reconstructed image block corresponding to the prediction unit, or the reconstructed image block corresponding to the transform unit, the reconstructed image block corresponding to the coding tree unit, the reconstructed image block corresponding to the coding unit, the reconstructed image block corresponding to the prediction unit, or the reconstructed image block corresponding to the transform unit is further expanded to obtain the reconstructed image block used in the second prediction process.
[0408] Alternatively, it is assumed that the processing device determines that the reconstructed image block corresponding to the coding tree unit, the reconstructed image block corresponding to the coding unit, the reconstructed image block corresponding to the prediction unit, or the reconstructed image block corresponding to the transform unit is referred to as the reconstructed image block R1' (including the luma reconstructed image block and the chroma reconstructed image block). As shown in FIG. 21a , according to a preset rule, the reconstructed image block R1' is expanded into a larger reconstructed image block r1'. Thereafter, a second prediction process or loop filtering process is performed on the reconstructed image block r1'.
[0409] Optionally, as shown in Figure 21a, the preset rule is that the reconstructed image block r1 not only includes the reconstructed image block R1' but also includes one or more pixel rows or pixel columns located outside the reconstructed image block R1' and around it (for example, above, below, left, and right).
[0410] Optionally, as shown in FIG21b , the processing device reassembles the reconstructed image block R1′ into a reconstructed image block r1′ according to a preset rule. A second prediction process or loop filtering process is then performed on the reconstructed image block r1′. Optionally, as shown in FIG21b , the prediction rule may be that the reconstructed image block r1′ includes a portion of the reconstructed image block R1′ and one or more pixel rows or pixel columns surrounding the portion (e.g., above, below, to the left, and to the right).
[0411] Optionally, the expanded / combined reconstructed image block r1 ′ may be an input reconstructed image block of the convolution filter shown in FIG. 9 a to FIG. 9 c .
[0412] Optionally, the expanded / combined reconstructed image block r1 ′ may be an input reconstructed image block of the convolution filter shown in FIG16 a .
[0413] Optionally, the expanded / combined reconstructed image block r1 ′ mentioned above may also be the input reconstructed image block of the convolution filter shown in FIG19 .
[0414] In this embodiment, the processing device can facilitate the second prediction with a reconstructed image block of a different size or image content than that involved in the first prediction process. In this way, the results of the two predictions can complement each other, which is conducive to improving the accuracy of the prediction.
[0415] Optionally, the reconstructed image block may be a brightness reconstructed image block.
[0416] Optionally, the above-mentioned secondary division can also be used to predict image blocks.
[0417] Optionally, the processing device may expand / combine the prediction image blocks or prediction units in the first prediction process in a manner similar to the above-mentioned method of expanding / combining the reconstructed image block r1' to obtain expanded / combined prediction units or prediction image blocks, and then select or determine the luminance pixels or chrominance pixels used to derive the filter coefficients based on the expanded / combined prediction units or prediction image blocks. Optionally, the processing device expands / combines the prediction unit P1' and the prediction unit P1' in the first prediction process to obtain the prediction unit p1'. Thereafter, the luminance pixel PredY1 and the chrominance pixel PredCr1 shown in Figures 9a to 9c are determined based on the prediction unit p1'.
[0418] In this embodiment, because the processing device employs an expansion / combination approach, the accuracy of prediction for the current image block can be improved. In this case, the predicted image block can be a luminance prediction image block or a chrominance prediction image block. Optionally, if the processing device utilizes the expanded / combined image blocks for loop filtering, this can also help eliminate artifacts and blocking effects, thereby improving the quality of the reconstructed image. In this case, the processing device performs separate loop filtering operations for reconstructed luminance blocks and reconstructed chrominance blocks.
[0419] An embodiment of the present application further provides a processing device, including a memory and a processor. The memory stores an image processing program, and when the image processing program is executed by the processor, the steps of the image processing method in any of the above embodiments are implemented.
[0420] An embodiment of the present application further provides a storage medium on which an image processing program is stored. When the image processing program is executed by a processor, the steps of the image processing method in any of the above embodiments are implemented.
[0421] In the embodiments of the processing device and storage medium provided in this application, all technical features of any of the above-mentioned image 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.
[0422] An embodiment of the present application further provides a computer program product, which includes computer program code. When the computer program code runs on a computer, the computer executes the methods in the various possible implementation modes described above.
[0423] An embodiment of the present application also provides a chip, including a memory and a processor, wherein the memory is used to store computer programs, and the processor is used to call and run the computer programs from the memory, so that a device equipped with the chip executes the methods in the various possible implementation modes as described above.
[0424] It is understood that the above scenarios are merely examples and do not limit the application scenarios of the technical solutions provided in the embodiments of this application. The technical solutions of this application can also be applied to other scenarios. For example, those skilled 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 this application will also be applicable to similar technical problems.
[0425] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0426] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0427] The units in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0428] 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.
[0429] 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.
[0430] 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.
[0431] 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.
[0432] 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)).
[0433] 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. An image processing method, wherein: include: According to the first pixel of the first component of the current image block, the second pixel of the first component and / or the second pixel of the second component is determined or obtained.
2. The method of claim 1, wherein: Also includes at least one of the following: Determine or obtain a second pixel according to at least one of a downsampling model, a non-downsampling model, a gradient model, a convolution prediction model, and a linear prediction model and the first pixel; A second pixel is determined or obtained based on the first pixel and the filter coefficient.
3. The method of claim 2, wherein: The filter coefficients are determined in a manner that includes at least one of the following: A first method: determining a filter coefficient according to a first reconstructed pixel of a first component, a second reconstructed pixel of the first component and / or a second reconstructed pixel of a second component; The second mode: determining the filter coefficient according to the first reconstructed pixel of the first component, and the second predicted pixel of the first component and / or the second predicted pixel of the second component; A third approach: determining a filter coefficient according to a first predicted pixel of the first component, and a second predicted pixel of the first component and / or a second predicted pixel of the second component.
4. The method of claim 3, wherein: Also includes at least one of the following: The first reconstructed pixel is a maximum reconstructed pixel or a minimum reconstructed pixel of the first component; The first reconstructed pixel is a reconstructed pixel determined in a predetermined area; The first reconstructed pixel is a maximum reconstructed pixel of the first component or a minimum reconstructed pixel of the first component in a predetermined area.
5. The method of claim 4, wherein: Also includes at least one of the following: The first reconstructed pixel is different from the first pixel; The first predicted pixel is different from the first pixel; The first reconstructed pixel is the same as the first pixel; The first predicted pixel is the same as the first pixel.
6. The method according to any one of claims 1 to 5, wherein: The method for determining the first pixel includes at least one of the following: Determine the first pixel according to the third reconstructed pixel or the third predicted pixel of the first component; Determine the first pixel according to the downsampled pixel of the third reconstructed pixel or the third predicted pixel; The first pixel is determined according to a fourth predicted pixel determined or obtained by performing intra-frame prediction or inter-frame prediction on the current image block.
7. The method according to any one of claims 1 to 5, wherein: Also includes: Determine or obtain a reconstructed image block corresponding to the current image block according to the second pixel; The reconstructed pixels of the first component and / or the reconstructed pixels of the second component are determined or obtained according to the reconstructed pixels of the first component of the reconstructed image block.
8. The method according to any one of claims 1 to 5, wherein: Also includes at least one of the following: The current image block includes at least one of a luminance image block and a chrominance image block; The first component is the brightness component; The second component is the chrominance component; The first pixel is a predicted pixel or a reconstructed pixel; The second pixel is a predicted pixel or a reconstructed pixel.
9. A processing device, wherein: include: A memory and a processor, wherein an image processing program is stored in the memory, and when the image processing program is executed by the processor, the steps of the image processing method according to any one of claims 1 to 8 are implemented.
10. A storage medium, wherein: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 8 are implemented.