Image processing method, processing device and storage medium
By determining the motion information of the unit to be processed in video encoding, the problem of errors between the motion offset representation and the actual motion trajectory is solved, and the accuracy and efficiency of video encoding are improved.
Patent Information
- Application Number
- PCT/CN2024/072534
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-10
- Filing Date
- 2024-01-16
- Publication Date
- 2024-10-17
AI Technical Summary
In the existing technology, there is a large error between the trajectory represented by the motion offset determined in video coding and the actual motion trajectory of the unit to be processed, resulting in low prediction accuracy and efficiency of video coding.
By obtaining or determining the motion information of the sub-processing unit in the unit to be processed, various methods are used, such as co-located processing units, co-located sub-processing units, preset sub-block merging candidate lists, preset flags, motion offset information, etc. Determine the prediction result of the unit to be processed and ensure that the trajectory represented by the motion offset parameter is consistent or similar to the actual motion trajectory.
It effectively improves the prediction accuracy and efficiency of video encoding and reduces errors in the encoding and decoding process.
Smart Images

Figure CN2024072534_17102024_PF_FP_ABST
Abstract
Description
Image processing method, processing device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 10, 2023, with application number 202310370419.5 and invention name “Image processing method, processing device and storage medium”, the entire contents of which are incorporated by reference into the application. Technical Field
[0002] The present application relates to the field of image processing technology, and in particular to an image processing method, processing device and storage medium. Background Art
[0003] In the development of video coding technology, improvements made by various video coding standards are all committed to improving the video coding effect from different aspects. Among them, prediction processing in image encoding and decoding based on sub-block motion offset is a hot topic in current research.
[0004] During the process of conceiving and implementing this application, the inventors discovered that there are at least the following problems: there is a large error between the trajectory represented by the motion offset determined in the related art and the actual motion trajectory of the unit to be processed, which leads to low prediction accuracy and / or low efficiency of video encoding.
[0005] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Technical Solutions
[0006] In response to the above technical problems, the present application provides an image processing method, processing device and storage medium, so that the trajectory represented by the determined motion offset parameters and the actual motion trajectory of the unit to be processed remain consistent or similar, thereby effectively improving the prediction accuracy and / or efficiency of video encoding.
[0007] To solve the above technical problems, the present application provides an image processing method that can be applied to a processing device, including:
[0008] Obtaining or determining motion information of a sub-processing unit in a unit to be processed;
[0009] Luminance / chrominance prediction is performed on the unit to be processed according to the motion information to determine or obtain a prediction result of the unit to be processed.
[0010] Optionally, a method for acquiring or determining the motion information of the sub-processing unit includes at least one of the following:
[0011] The first method is to obtain or determine the motion information according to the co-located processing unit of the unit to be processed;
[0012] The second method is to obtain or determine the motion information according to the co-located sub-processing unit of the sub-processing unit;
[0013] A third method: obtaining or determining the motion information according to a preset sub-block merging candidate list;
[0014] Fourth method: obtaining or determining the motion information according to a preset flag;
[0015] Fifth mode: obtaining or determining the motion information according to the first motion offset information of the unit to be processed;
[0016] A sixth approach is to obtain or determine the motion information based on the second motion offset information of the first image unit or the first sub-image unit in the processed area of the image to be processed;
[0017] A seventh manner: obtaining or determining the motion information according to a combination of at least one of the second motion offset information;
[0018] An eighth method: obtaining or determining the motion information according to a motion vector prediction candidate list.
[0019] Optionally, the second method includes:
[0020] determining a co-located sub-processing unit according to the third motion offset information and the position information and motion offset information of the sub-processing unit;
[0021] The motion information of the sub-processing unit is acquired or determined according to the position information of the co-located sub-processing unit and / or the motion information of the center sample of the co-located sub-processing unit.
[0022] Optionally, the fourth method includes:
[0023] If the preset flag is the first value, obtaining or determining the motion information of the sub-processing unit according to the motion information of the co-located sub-processing unit of the sub-processing unit; and / or,
[0024] If the preset flag is the second value, the motion information of the sub-processing unit is acquired or determined according to the motion information of the center sample of the co-located processing unit of the unit to be processed.
[0025] Optionally, the fifth method includes:
[0026] Obtaining or determining first motion offset information based on at least one corresponding first motion information of at least one adjacent region, at least one adjacent region, at least one adjacent sample, or at least one adjacent sample, or obtaining or determining first motion offset information based on a motion offset information list; and
[0027] The motion information of the sub-processing unit is acquired or determined according to the first motion offset information.
[0028] Optionally, acquiring or determining the motion information of the sub-processing unit according to the first motion offset information includes:
[0029] determining a co-located sub-processing unit according to the position information of the sub-processing unit and the first motion offset information;
[0030] The motion information of the sub-processing unit is acquired or determined according to the position information and / or motion information of the co-located sub-processing unit.
[0031] Optionally, the sixth method includes:
[0032] The first motion offset information is determined according to the second offset information, and the motion information of the sub-processing unit is acquired or determined according to the first motion offset information.
[0033] Optionally, at least one of the following is also included:
[0034] The first image unit is an image unit of the same size as the unit to be processed;
[0035] The first sub-image unit is a sub-image unit having the same size as the sub-processing unit;
[0036] The second motion offset information includes: motion information of at least one first region and / or at least one first sample of the first image unit or the first sub-image unit;
[0037] The preset flag includes a first value and / or a second value.
[0038] 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.
[0039] 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.
[0040] As described above, the image processing method of the present application can be applied to a processing device and includes determining or obtaining a prediction result for the unit to be processed based on motion information of a sub-processing unit within the unit to be processed. Through the above technical solution, the trajectory represented by the motion offset parameters determined for the unit to be processed during the image encoding and decoding process can be ensured to be consistent or similar to the actual motion trajectory of the unit to be processed, thereby effectively improving the prediction accuracy and / or efficiency of video encoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] 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.
[0042] FIG1 is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present application;
[0043] FIG2 is a diagram of a communication network system architecture provided by an embodiment of the present application;
[0044] FIG3 a is a schematic diagram of spatially adjacent blocks used by ATMVP;
[0045] FIG3 b is a schematic diagram of a process of sub-block-based temporal motion vector prediction (SbTMVP) in general video coding (VVC);
[0046] FIG4A is a schematic diagram of an image coding scenario involved in the image processing method provided in an embodiment of the present application;
[0047] FIG4B is a schematic diagram of an image decoding scenario involved in the image processing method provided in an embodiment of the present application;
[0048] FIG5 is a schematic diagram showing the relationship between the unit to be processed and the sub-processing unit within the unit to be processed involved in the first embodiment of the present application;
[0049] FIG6 is a schematic diagram of the relationship between the current image and the co-located image involved in the second embodiment of the present application;
[0050] FIG7 a is a schematic diagram of an adjacent area of a unit to be processed and a sub-processing unit according to a second embodiment of the present application;
[0051] FIG7 b is a schematic diagram of another adjacent area of a unit to be processed and a sub-processing unit involved in the second embodiment of the present application;
[0052] FIG8 is a schematic diagram of adjacent samples of a to-be-processed unit and a sub-processing unit according to the second embodiment of the present application;
[0053] FIG9 is a schematic diagram of adjacent areas of a unit to be processed and a sub-processing unit according to a second embodiment of the present application;
[0054] FIG10 is a schematic diagram of determining a co-located sub-processing unit according to a motion vector according to a second embodiment of the present application;
[0055] FIG11 is a schematic diagram of determining corresponding co-located image blocks for multiple candidate offsets according to a fourth embodiment of the present application;
[0056] 12a to 12d are schematic diagrams of determining a sub-image block motion vector using a co-located image block according to a fourth embodiment of the present application;
[0057] FIG13 is a schematic diagram of determining a co-located sub-image block from a plurality of candidate offsets according to a fourth embodiment of the present application;
[0058] 14a and 14b are schematic diagrams of determining a sub-image block motion vector using a co-located sub-image block according to a fourth embodiment of the present application;
[0059] FIG15 is a schematic diagram of determining a co-located image block from multiple candidate offsets according to a fourth embodiment of the present application;
[0060] 16a to 16d are schematic diagrams of determining a sub-image block motion vector using a co-located image block according to a fourth embodiment of the present application;
[0061] FIG17 is a schematic diagram of directly determining a co-located sub-image block based on multiple candidate offsets according to a fourth embodiment of the present application;
[0062] 18a to 18b are schematic diagrams of determining a sub-image block motion vector using a co-located sub-image block according to a fourth embodiment of the present application;
[0063] FIG19 is a schematic diagram of selecting a sub-image block according to the fourth embodiment of the present application;
[0064] FIG20 is a schematic diagram of selecting multiple sub-image blocks according to the fourth embodiment of the present application;
[0065] FIG21 is a schematic diagram of determining a co-located sub-image block from a plurality of candidate offsets according to a fourth embodiment of the present application;
[0066] 22a to 22b are schematic diagrams of determining a motion vector of a sub-image block by using a co-located sub-image block according to a fourth embodiment of the present application.
[0067] 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.
[0068] Implementation Methods of the Application
[0069] 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.
[0070] 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.
[0071] 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.
[0072] It should be understood that, although the various steps in the flowcharts in the embodiments of the present application are shown in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be performed in other orders. And / or, 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 other steps or at least a portion of the sub-steps or stages of other steps.
[0073] 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.
[0074] It should be noted that in this article, conjunctions such as first, then, and again are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute substantial restrictions on the order.
[0075] 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.
[0076] 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.
[0077] The processing device may be implemented in various forms. For example, the processing device described in this application may be a server, or may be a smart terminal such as a mobile phone, tablet computer, laptop computer, PDA, portable media player (PMP), navigation device, wearable device, smart bracelet, pedometer, etc., or a fixed terminal such as a digital TV, desktop computer, etc.
[0078] 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.
[0079] 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.
[0080] The following is a detailed introduction to the various components of the mobile terminal in conjunction with Figure 1:
[0081] 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) and 5G, etc.
[0082] 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.
[0083] 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.
[0084] 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) and / or process such sound into audio data in operating modes such as a phone call mode, a recording mode, and a voice recognition mode. 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] 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.
[0093] 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.
[0094] 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.
[0095] 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.
[0096] Optionally, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0097] 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 .
[0098] 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 a home location register (not shown) and / or 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).
[0099] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services.
[0100] 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.
[0101] Based on the hardware structure of the processing device and the communication network system taking the mobile terminal as an example, the overall concept of the image processing method of the present application is proposed.
[0102] In the development of video coding technology, improvements made by various video coding standards are all committed to improving the video coding effect from different aspects. Among them, prediction processing in image encoding and decoding based on sub-block motion offset is a hot topic in current research.
[0103] During the process of conceiving and implementing this application, the inventors discovered at least the following problems: there is a large error between the trajectory represented by the motion offset determined in the related art and the actual motion trajectory of the unit to be processed, which leads to low efficiency in video encoding.
[0104] The preceding description is intended to provide general background information and does not necessarily constitute prior art.
[0105] To address the above issues, this application proposes an image processing method that determines or obtains a prediction result for a unit to be processed based on the motion information of a sub-processing unit within the unit to be processed. Thus, the technical solution of this application ensures that the trajectory represented by the motion offset parameters determined for the unit to be processed during the image encoding and decoding process remains consistent or similar to the actual motion trajectory of the unit to be processed, thereby effectively improving the prediction accuracy and / or efficiency of video encoding.
[0106] Based on the overall concept of the image processing method provided by the present application, various embodiments of the image processing method of the present application are further proposed.
[0107] To facilitate understanding, the following first explains the professional terms that may be involved in the embodiments of this application.
[0108] (1) Inter-frame prediction
[0109] In the process of encoding or decoding an image, predicting the image block is an essential step. For example, the encoder predicts the image block to obtain a prediction block, constructs a residual block with less energy, and reduces the transmission bits. The decoder decodes the residual block through entropy decoding, and / or obtains a decoded image block by combining the residual block and the prediction block obtained by prediction in the decoder to achieve image decoding. The prediction of the image block by the encoder or decoder can be achieved through some preset prediction modes, which include inter-frame prediction modes and intra-frame prediction modes. Optionally, the inter-frame prediction that can be commonly used by the encoder or decoder includes subblock-based temporal motion vector prediction (hereinafter referred to as SbTMVP).
[0110] (2) Temporal motion vector prediction based on sub-blocks
[0111] Versatile Video Coding (VVC) supports sub-block-based temporal motion vector prediction. Similar to the temporal motion vector prediction (TMVP) in High Efficiency Video Coding (HEVC), SbTMVP uses the motion field in the collocated picture to improve the motion vector prediction and merge mode of the coding unit (CU) in the current picture. SbTVMP uses the same collocated picture used in TMVP. SbTMVP differs from TMVP in the following two aspects:
[0112] –TMVP predicts motion at the CU level, but SbTMVP predicts motion at the sub-CU level;
[0113] –TMVP obtains the temporal motion vector from the co-located block in the co-located image (the co-located block is the lower right corner block or the center block relative to the current CU), while SbTMVP applies motion shift before obtaining the temporal motion information from the co-located image, where the motion offset is obtained from the motion vector of the spatial neighboring block A1 of the current CU.
[0114] 3a and 3b , SbTMVP predicts the motion vector of a sub-CU in the current CU in two steps.
[0115] In a first step, the spatially neighboring block A1 shown in Figure 3a is checked. If A1 has a motion vector using the co-located image as its reference image, this motion vector is selected as the motion offset to be applied, whereas if no such motion is identified, the motion offset is set to (0,0).
[0116] In the second step, as shown in Figure 3b, the motion offset identified in the first step is applied (i.e., added to the coordinates of the image block) to obtain the sub-CU level motion information (motion vector and reference index) from the co-located image. The example in Figure 3b assumes that the motion offset is set to the motion vector of the spatially adjacent block A1. Then, for each sub-CU, the motion information of its corresponding block in the co-located image (the minimum motion grid / motion unit covering the center sample) is used to derive the motion information of the sub-CU. After the motion information of the co-located sub-CU is determined, it is converted into the motion vector and reference index of the current sub-CU in a similar way to the TMVP process of HEVC, where temporal motion scaling is applied to align the reference picture of the temporal motion vector with the reference picture of the current CU.
[0117] In VVC, a sub-block based merge list containing SbTVMP candidates and affine merge candidates is used for signaling of sub-block based merge mode. SbTVMP mode is enabled / disabled by the sequence parameter set SPS flag. If SbTMVP mode is enabled, the SbTMVP predictor is added as the first entry in the sub-block based merge candidate list, followed by the affine merge candidates. In the sequence parameter set (SPS), information about the size of the sub-block based merge list is sent, and / or the maximum allowed size of the sub-block based merge list is 5 in VVC.
[0118] The sub-CU size used in SbTMVP is fixed to 8x8. Like the affine merge mode, the SbTMVP mode is only applicable to CUs whose width and height are greater than or equal to 8.
[0119] The encoding logic of the additional SbTMVP merge candidate is the same as that of other merge candidates, that is, an additional rate-distortion detection is performed on each CU in a P slice or a B slice to decide whether to use the SbTMVP merge candidate.
[0120] Alternatively, please refer to Figures 4A and 4B. Figure 4A is a schematic diagram of the image encoding scenario involved in the processing method provided in this application, and Figure 4B is a schematic diagram of the image decoding process. At the encoding end, the encoder typically divides the input video image into at least one image block for processing. Each image block can be subtracted from the prediction block obtained by the prediction mode to obtain a residual block. The residual block and the relevant parameters of the prediction mode are then subjected to a series of processing to obtain the encoded bitstream. Subsequently, at the decoding end, after receiving the bitstream, the decoder can parse the bitstream to obtain the prediction mode parameters. Furthermore, the decoder's inverse transform unit and inverse quantization unit inversely transform and inverse quantize the transform coefficients to obtain the residual block. Optionally, the decoder's decoding unit parses and decodes the encoded bitstream to obtain the prediction parameters and related auxiliary information. Next, the decoder's prediction processing unit uses the prediction parameters to perform prediction processing to determine the prediction block corresponding to the residual block. In this way, the decoder can obtain a reconstructed 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 block to reduce distortion and improve video quality. Thus, the reconstructed blocks that have undergone loop filtering are further combined into decoded images and stored in a decoded image buffer or output as decoded video signals.
[0121] Optionally, the image processing method provided in the embodiments of the present application can be applied to scenarios where encoding prediction is performed on image blocks during the above-mentioned video image encoding process, for example, scenarios where inter-frame prediction is performed during video image encoding, and scenarios where inter-frame prediction is performed during video image decoding.
[0122] First embodiment
[0123] In this embodiment, the image processing method provided by this application can be executed by the aforementioned processing device, or a cluster composed of multiple aforementioned processing devices. The processing device can be a smart terminal (such as the aforementioned mobile terminal 100) or a server. Here, the image processing method provided by this application is described using the processing device as the executing entity in the first embodiment of the image processing method provided by this application.
[0124] In this embodiment, the image processing method provided by this application includes:
[0125] Obtaining or determining motion information of a sub-processing unit in a unit to be processed;
[0126] Luminance / chrominance prediction is performed on the unit to be processed according to the motion information to determine or obtain a prediction result of the unit to be processed.
[0127] Optionally, in this embodiment, the unit to be processed may be an image block in the input video image (i.e., video frame) that is being encoded or decoded and thus requires prediction processing. Optionally, the image block may also be referred to as an image sample, which may be referred to as a current block, a current sample, or a block to be processed. Under the H.265 / High Efficiency Video Coding (HEVC) standard, the unit to be processed may be a coding tree unit (CTU) in the input video image, or a coding unit CU. The embodiment of the present application does not impose any specific restrictions on the type of the unit to be processed.
[0128] Optionally, after receiving a video image from a video source as an encoder, the processing device segments the video image to obtain at least one image block (the image block includes an image coding unit and a sub-image coding unit). Thereafter, the processing device utilizes the temporal and / or spatial correlation between the video images to perform prediction processing on each of the at least one image block. In one embodiment, when the processing device uses an inter-frame prediction mode (especially a temporal motion vector prediction based on a sub-block) to perform prediction processing on the current image block, it can determine that the image block is a unit to be processed. In this way, during the process of performing prediction processing on the current unit to be processed, the processing device can determine or obtain a prediction result for the prediction processing on the unit to be processed based on the motion information of the sub-processing units in the unit to be processed.
[0129] Optionally, the processing device, acting as an encoder, may use, for example, rate-distortion optimization to determine the prediction mode ultimately adopted for each of the at least one image block. For example, the rate-distortion cost corresponding to each prediction mode may be calculated to determine the minimum rate-distortion cost from among the rate-distortion costs corresponding to the multiple prediction modes. The prediction mode corresponding to the minimum rate-distortion cost is the prediction mode ultimately adopted for the image block.
[0130] Optionally, in this embodiment, the processing device can obtain or determine the motion information of the sub-processing unit in the unit to be processed based on the co-located processing unit of the unit to be processed, the co-located sub-processing unit of the sub-processing unit in the unit to be processed, a preset sub-block merging candidate list, the value of a preset flag, the first motion offset information of the unit to be processed, and / or the second motion offset information of the first image unit or the first sub-image unit in the processed area of the image to be processed where the unit to be processed is located, and then determine or obtain a prediction result for prediction processing for the unit to be processed based on the motion information.
[0131] Optionally, in one embodiment, the processing device first determines or obtains a prediction result for a sub-processing unit within the unit to be processed based on the motion information of the sub-processing unit, and then obtains or determines a prediction result for the unit to be processed based on the prediction result of the sub-processing unit. Optionally, if the unit to be processed has four sub-processing units, the processing device first obtains or determines a prediction result for each of the four sub-processing units based on their respective motion information, and then obtains or determines a prediction result for the entire unit to be processed based on the prediction results of the four sub-processing units.
[0132] Optionally, after the processing device determines or obtains the prediction processing result of the unit to be processed in a sample-by-sample manner according to the above process, the processing device as an encoder can further subtract the sample value of the pixel in the current image block from the prediction value of the corresponding pixel in the predicted image block (the chrominance prediction result or the luminance prediction result of the unit to be processed) to obtain the residual value of the pixel and the residual block corresponding to the image block. After that, the residual block will be transformed and quantized, and then encoded by the entropy encoder to finally form an encoded bit stream. In addition, the encoded bit stream may also include prediction parameters corresponding to the prediction mode determined by the processing device through the above process (packaged into the encoded bit stream after entropy encoding) and related auxiliary information side information. If the determined prediction mode is sub-block-based temporal motion vector prediction SbTMVP, the above prediction parameters include indication information of sub-block-based temporal motion vector prediction SbTMVP.
[0133] Optionally, the transformed and quantized residual block is added to the corresponding prediction block obtained using the prediction mode to obtain a reconstructed block. After obtaining the reconstructed block, the processing device also performs loop filtering on the reconstructed block to reduce distortion. After loop filtering, the processing device can also store the resulting reconstructed image in a coded image buffer so that the reconstructed image can be used for subsequent inter-frame prediction processing.
[0134] Optionally, when the processing device acts as a decoder, it can receive the encoded bit stream transmitted by the processing device acting as an encoder. After the processing device acts as a decoder and receives the bit stream encoded by the encoder, the decoding unit of the decoder parses and decodes the bit stream to obtain prediction parameters. Optionally, 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. Next, the prediction processing unit of the decoder can treat the residual block as the current processing unit that needs to be decoded and perform prediction processing using the prediction parameters, thereby determining the prediction block corresponding to the residual block.
[0135] Optionally, when the decoder uses the same inter-frame prediction mode as that used by the encoder, the decoder may perform prediction processing using the prediction parameters obtained by parsing the bitstream, thereby determining the prediction block corresponding to the residual block. Optionally, the prediction processing includes intra-frame prediction processing and / or inter-frame prediction processing, and / or the intra-frame prediction processing and / or inter-frame prediction processing include at least one prediction mode. For example, based on the indication information in the parsed bitstream, the decoder determines that the prediction mode used for the image block is sub-block-based temporal motion vector prediction. In this way, the decoder can use the sub-block-based temporal motion vector prediction to obtain the prediction block corresponding to the image block.
[0136] Optionally, after determining or obtaining the prediction result for the unit to be processed on a sample-by-sample basis, the processing device acting as a decoder can further add the residual block obtained through parsing to the predicted values of the corresponding pixels in the predicted image block (the chroma prediction result or luma prediction result for the unit to be processed) to obtain a reconstructed block. Finally, the processing device performs loop filtering on the reconstructed block via a loop filtering unit to reduce distortion and improve video quality. The loop-filtered reconstructed blocks are further combined into a decoded image, which is stored in a decoded image buffer or output as a decoded video signal.
[0137] Optionally, since the size of the sub-CU is fixed to 8x8 in the sub-block-based temporal motion vector prediction, and like the affine merge mode, the SbTMVP mode is only used when the CU width and height are both greater than or equal to 8. Therefore, during the sub-block-based temporal motion vector prediction process, the processing device will further divide the unit CU to be processed into at least one sub-processing unit, for example, dividing a coding unit to be processed into sub-coding units of size 8x8. Alternatively, the processing device will further divide other coding blocks into at least one other sub-image block. Optionally, referring to Figure 5, assuming that the unit to be processed is the coding unit CU1, the illustrated sub-coding unit sbCU1 is the sub-processing unit in the coding unit CU1. The coding unit CU1 includes 16 sub-coding units sbCU1 of the same size.
[0138] Optionally, after further dividing the processing unit (CU) into at least one sub-processing unit (sbCU), the processing device calculates the motion information (e.g., motion vector) of the sub-processing unit. After calculating and determining the motion information of the sub-processing unit, the processing device may begin to perform inter-frame prediction on the sub-processing unit to obtain a sub-prediction block of the sub-processing unit. Thereafter, the processing device determines or obtains the prediction unit (or prediction block) of the entire processing unit based on the obtained sub-prediction blocks of all sub-processing units, and then performs subsequent encoding or decoding processing.
[0139] Optionally, when the processing device performs prediction processing on the unit to be processed based on the sub-block temporal motion vector prediction technology, it can also combine other intra-frame and / or inter-frame prediction technologies to perform encoding and decoding processing.
[0140] In this embodiment, an image processing method proposed in this application performs prediction processing on a unit to be processed based on inter-frame prediction by a processing device, and in this process, divides the unit to be processed into at least one sub-processing unit, and calculates and determines the motion information of the sub-processing unit, thereby determining or obtaining the prediction result of the entire unit to be processed based on the motion information of the sub-processing unit in the unit to be processed - the prediction unit (or prediction block) of the unit to be processed, that is, based on the motion information of each sub-processing unit in the unit to be processed, the respective sub-prediction blocks of all sub-processing units are obtained, and then the prediction unit (or prediction block) of the entire unit to be processed is determined or obtained. In this way, the trajectory represented by the motion offset parameters determined for the unit to be processed during the image encoding and decoding process can be made consistent or similar to the actual motion trajectory of the unit to be processed, thereby effectively improving the prediction accuracy and / or efficiency of video encoding.
[0141] Second embodiment
[0142] In this embodiment, the execution subject of the image processing method provided by this application can still be the above-mentioned processing device. In this embodiment, when the processing device uses inter-frame prediction to predict the processing unit, optionally, the sub-processing unit is located in the current image, which is the current image to be encoded / decoded, and the co-located sub-processing unit is located in the co-located image of the current image. The motion information of the sub-processing unit can be motion offset information, which is used to indicate the position offset between the sub-processing unit and the co-located sub-processing unit.
[0143] Optionally, if the position of the sub-processing unit in the current image is (x, y), and / or the position offset between the sub-processing unit and the co-located sub-processing unit is 0, then the position of the co-located sub-processing unit in the co-located image of the current image is also (x, y). Optionally, if the position of the sub-processing unit in the current image is (x, y), and / or the position offset between the sub-processing unit and the co-located sub-processing unit is (-1, -1), then the position of the co-located sub-processing unit in the co-located image of the current image is (x-1, y-1). Optionally, the above-mentioned position offset can be represented by a motion vector.
[0144] Optionally, referring to FIG6 , when the processing device is performing encoding or decoding processing, the current image is the image currently being encoded or decoded, and the co-located image is the image that has been encoded or decoded and is temporally adjacent to the current image. Optionally, when constructing a sub-block-based merge candidate list and an Advanced Motion Vector Prediction (AMVP) candidate list, the two reference images with the smallest distance in their picture order number (POC) from the current image are designated as co-located images of the current image. Optionally, the picture order number (POC), also known as the picture order number, is primarily used to identify the playback order of images, and is also used to mark the initial picture order number of the reference image when decoding an image block using inter-frame prediction.
[0145] Optionally, the processing device may also specify a collocated image of the current image based on predefined rules at the encoding end. Optionally, the rules that the processing device may follow may be defined based on different design requirements of actual applications, and the image processing method provided in this application is not limited to the specific content of the rules.
[0146] Optionally, the aforementioned collocated sub-processing unit is a sub-processing unit that is located at the same position as the sub-processing unit in the collocated image. Optionally, if the collocated sub-processing unit is a sub-processing unit that is located at the same position as the sub-processing unit in the collocated image, then when the sub-processing unit position is (x0, y0), the collocated sub-processing unit position is also (x0, y0).
[0147] Optionally, the aforementioned co-located sub-processing unit is a sub-processing unit corresponding to the position of the sub-processing unit in the co-located image. Optionally, if there is a sub-processing unit sbCU0′ in the co-located image whose characteristics are similar to those of the sub-processing unit sbCU0 of the unit to be processed in the current image, the processing device may designate the sub-processing unit sbCU0′ as the co-located sub-processing unit of the sub-processing unit sbCU0.
[0148] Optionally, in this embodiment, the motion information of the sub-processing unit may be acquired or determined in at least one of the following ways:
[0149] The first method is to obtain or determine the motion information according to the co-located processing unit of the unit to be processed.
[0150] Optionally, when the processing device calculates and determines the motion information of any sub-processing unit in the unit to be processed, if the motion information of the same-position processing unit of the entire unit to be processed can be calculated and determined, the processing device can directly use the motion information of the unit to be processed as the motion information of the sub-processing unit.
[0151] Optionally, the processing device may calculate and determine the motion information of the co-located unit to be processed based on the motion vectors corresponding to the adjacent area, adjacent areas, adjacent samples and / or adjacent samples of the unit to be processed in the current image.
[0152] The second method is to obtain or determine the motion information according to the co-located sub-processing unit of the sub-processing unit.
[0153] Optionally, when the processing device calculates and determines the motion information of any sub-processing unit in the unit to be processed, if the motion information of the same-position sub-processing unit of the sub-processing unit can be calculated and determined, the processing device can directly use the motion information of the sub-processing unit as the motion information of the sub-processing unit.
[0154] Optionally, the processing device may calculate and determine the motion information of the co-located sub-processing unit based on the motion vectors corresponding to the adjacent regions, adjacent regions, adjacent samples and / or adjacent samples of the unit to be processed in the current image.
[0155] Optionally, please refer to Figures 7a and 7b. In Figure 7a, R1 to R8 are adjacent areas of the unit to be processed CU1. R1' and R2' are adjacent areas of the sub-processing unit sbCU1. Optionally, the adjacent areas may be composed of at least one row or at least one column of pixel samples. The technical solution of the present application imposes specific restrictions on the shape of the adjacent areas. Optionally, in Figure 7a, the upper adjacent area of the unit to be processed CU1 includes 4 areas of the same size and shape, namely R1 to R4, and the left adjacent area of the unit to be processed CU1 also includes 4 areas of the same size and shape, namely R5 to R8. Optionally, the adjacent areas of the unit to be processed CU1 may also include areas of other numbers and other shapes. The adjacent areas may also be located on the upper right and upper left sides of the unit to be processed (such as the adjacent areas ER1 and ER2 in Figure 7b).
[0156] Optionally, referring to FIG8 , the adjacent samples of the processing unit and the sub-processing unit are pixel samples adjacent to the processing unit and the sub-processing unit. As shown in FIG8 , A0, A1, B0, B1, and B2 are the lower left adjacent sample, left adjacent sample, upper right adjacent sample, upper adjacent sample, and upper left adjacent sample of the processing unit CU1, while A0', A1', B0', B1', and B2' are the lower left adjacent sample, left adjacent sample, upper right adjacent sample, upper adjacent sample, and upper left adjacent sample of the sub-processing unit sbCU1.
[0157] Optionally, the aforementioned adjacent region is similar to the adjacent region.
[0158] Optionally, the adjacent area is an area close to the processing unit and is not adjacent to the unit to be processed.
[0159] Optionally, the adjacent area is N sampling distances away from the processing unit, where N may be 1 to 4 samples.
[0160] As shown in FIG9 , the unit to be processed and the adjacent regions R10 to R80 and ER10 to ER20 are not adjacent but are at a certain distance from each other. Similarly, the sub-processing unit and the adjacent regions R10' to R20' are not adjacent but are at a certain distance from each other. Optionally, there may be several rows or columns of pixel samples between the unit to be processed and the adjacent regions; there may be several rows or columns of pixel samples between the sub-processing unit and the adjacent regions. Optionally, there is also a certain distance between the unit to be processed and the adjacent samples. Optionally, there is also a certain distance between the sub-processing unit and the adjacent samples. Optionally, there may be one or more pixel samples between the unit to be processed and the adjacent samples; there may be one or more pixel samples between the sub-processing unit and the adjacent samples.
[0161] Optionally, after the processing device obtains or determines the adjacent areas, adjacent areas, adjacent samples or adjacent samples of the unit to be processed or the sub-processing unit as shown in Figures 7a, 7b, 8 and / or 9, the processing device can calculate and determine the motion vectors corresponding to the adjacent areas, adjacent areas, adjacent samples and / or adjacent samples, and then determine the motion information of the sub-processing unit in the sub-unit to be processed based on these motion vectors, that is, calculate and determine the motion vector of the sub-processing unit based on these motion vectors.
[0162] Optionally, when determining the adjacent region, adjacent region, adjacent sample, or adjacent sample of the unit to be processed or the sub-processing unit, the processing device may also select the adjacent region or adjacent sample to obtain a more appropriate motion vector as the motion information of the sub-processing unit when the determined adjacent region or adjacent sample is unavailable. Therefore, compared with determining the adjacent region or adjacent sample, the processing device has greater flexibility in determining the adjacent region or adjacent sample.
[0163] Optionally, the above sampling refers to pixel sampling in the current image.
[0164] A third method: obtaining or determining the motion information according to a preset sub-block merging candidate list;
[0165] Optionally, when calculating and determining the motion information of any sub-processing unit in the unit to be processed, the processing device may further use a candidate motion vector (or motion vector predictor) corresponding to a preset sub-block merging candidate list as the motion information of the sub-processing unit. Optionally, the motion information corresponds to the first entry in the sub-block merging candidate list.
[0166] Optionally, the processing device can use an array to construct a sub-block merge candidate list. For example, the processing device sets the sub-block merge candidate list subblockMergeCandList[i] (i=0,1,...,n. n is the number of entries in the list). The sub-block merge candidate list subblockMergeCandList[i] is an array. Then, the processing device associates the sub-block merge candidate list subblockMergeCandList[0] with the motion vector of the co-located processing unit of the unit to be processed, or with the motion vector of the co-located sub-processing unit of the sub-processing unit, and / or associates subblockMergeCandList[1]~subblockMergeCandList[n] with other candidate motion vectors. In this way, when the above-mentioned association action is completed, the processing device constructs the sub-block merge candidate list.
[0167] Optionally, the sub-block merge candidate list subblockMergeCandList[i] is associated with the motion vector of the co-located processing unit of the unit to be processed, or the motion vector of the co-located sub-processing unit of the sub-processing unit, which means that when the sub-block merge candidate list subblockMergeCandList[0] is selected, the motion vector of the co-located processing unit of the unit to be processed, or the motion vector of the co-located sub-processing unit of the sub-processing unit is used as the motion information of the sub-processing unit.
[0168] Optionally, the processing device can associate the motion information of the sub-processing unit with the first entry of the sub-block merge candidate list, so that the priority of the technical solution of the present application is higher than the priority of the motion vector obtained by other methods, thereby improving the utilization efficiency of the technical solution of the present application and further improving the efficiency of encoding and decoding of video images.
[0169] Fourth method: obtaining or determining the motion information according to a preset flag;
[0170] Optionally, when calculating and determining the motion information of any sub-processing unit in the unit to be processed, the processing device may further use a preset flag to directly determine the motion information (mvL0SbCol[xSbIdx][ySbIdx]) of the co-located sub-processing unit of the sub-processing unit as the motion information of the sub-processing unit. Optionally, the processing device may further use the preset flag to directly determine the motion information (ctrMvLX) of the co-located processing unit of the unit to be processed as the motion information of the sub-processing unit.
[0171] Optionally, the fourth method mentioned above may include:
[0172] If the preset flag is the first value, obtaining or determining the motion information of the sub-processing unit according to the motion information of the co-located sub-processing unit of the sub-processing unit; and / or,
[0173] If the preset flag is the second value, the motion information of the sub-processing unit is acquired or determined according to the motion information of the center sample of the co-located processing unit of the unit to be processed.
[0174] Optionally, the preset flag includes a first value and / or a second value. Based on this, when the processing device determines that the preset flag is the first value through analysis, the processing device can directly determine the motion information (mvL0SbCol[xSbIdx][ySbIdx]) of the co-located sub-processing unit of the sub-processing unit as the motion information of the sub-processing unit. When the processing device determines that the preset flag is the second value through analysis, the processing device can directly determine the motion information (ctrMvLX) of the co-located processing unit of the unit to be processed as the motion information of the sub-processing unit.
[0175] Optionally, the motion information (ctrMvLX) of the co-located processing unit of the unit to be processed may be the motion information of the center sample of the co-located processing unit.
[0176] Optionally, when determining the motion information of any sub-processing unit in the unit to be processed, if the processing device determines that the prediction mode adopted by the co-located sub-processing unit of the sub-processing unit is an intra-frame coding mode, a palette coding mode, or an intra-frame block copy mode (IBC), the processing device determines that the motion information of the current co-located sub-processing unit cannot be directly used as the motion information of the sub-processing unit, or determines that the co-located sub-processing unit does not actually have motion information at this time. In this case, the processing device can determine the motion information of the sub-processing unit based on the motion information of the co-located processing unit of the unit to be processed (such as the motion information of the center sample of the co-located processing unit).
[0177] Optionally, when the motion information of the co-located sub-processing unit is unavailable or does not exist, the processing device sets the preset flag to a first value (e.g., "0"). Thus, when the processing device determines that the preset flag value is "0" upon parsing, the processing device can directly determine the motion information (ctrMvLX) of the co-located processing unit of the unit to be processed as the motion information of the sub-processing unit.
[0178] Fifth mode: obtaining or determining the motion information according to the first motion offset information of the unit to be processed;
[0179] Optionally, when the processing device calculates and determines the motion information of any sub-processing unit in the unit to be processed, if the first motion offset information of the unit to be processed can be directly calculated and determined, the processing device can determine the co-located sub-processing unit of the sub-processing unit based on the first motion offset information of the unit to be processed, thereby obtaining or determining the motion information of the sub-processing unit based on the co-located sub-processing unit.
[0180] Optionally, the first motion offset information of the unit to be processed may be a motion vector.
[0181] A sixth approach is to obtain or determine the motion information based on the second motion offset information of the first image unit or the first sub-image unit in the processed area of the image to be processed.
[0182] Optionally, when calculating and determining the motion information of any sub-processing unit in the unit to be processed, the processing device can also determine at least one first image unit or at least one first sub-image unit in the processed area of the image to be processed where the above-mentioned unit to be processed is located, and then obtain or determine the motion information of the sub-processing unit in the unit to be processed based on the second motion offset information of the first image unit or the first sub-image unit.
[0183] Optionally, the second motion offset information may be a motion vector. The motion vector may be determined by the processing device based on matching costs derived from first image units or first sub-image units in a processed region of the current image to be processed. According to one embodiment, the motion vector of the first image unit or first sub-image unit corresponding to the minimum matching cost among the matching costs derived from at least one first image unit or first sub-image unit may be determined as the motion vector.
[0184] Optionally, the above-mentioned second motion offset information can be determined based on the matching cost derived from at least one first area or at least one first sample of the first image unit in the processed area of the current image; or, the second motion offset information can also be determined based on the matching cost derived from at least one second area or at least one second sample of the first sub-image unit.
[0185] Optionally, the second motion offset information includes motion information of at least one third region in the first image unit or motion information of at least one first sample in the first image unit. Optionally, the motion information of the at least one third region or the motion information of the at least one first sample in the first image unit corresponds to the minimum matching cost of the first image unit.
[0186] Optionally, the second motion offset information includes motion information of at least a fourth region in a first sub-image unit of the first image unit, or motion information of at least a second adjacent sample of the first sub-image unit. Optionally, the motion information of the at least fourth region or the motion information of the at least second adjacent sample corresponds to a minimum matching cost of the first sub-image unit.
[0187] Optionally, if the motion information corresponding to the at least one first region, at least one second region, the third region, the fourth region, the first sample and / or the second sample is not available, the processing device may directly determine that the second motion offset information is a 0 vector.
[0188] Optionally, the at least one first sample includes at least one of a lower left adjacent sample and an upper right adjacent sample of the first image unit. Optionally, the at least one second adjacent sample includes at least one of a lower left adjacent sample and an upper right adjacent sample of the first sub-image unit.
[0189] Optionally, when the processing device determines that the central sub-block and / or central sample of the above-mentioned first image unit adopts unidirectional prediction, the processing device also determines the above-mentioned first motion offset information as a motion vector for unidirectional prediction. Optionally, when the processing device determines that the central sub-block and / or central sample of the above-mentioned first image unit adopts bidirectional prediction, the processing device also determines the above-mentioned first motion offset information as motion information for bidirectional prediction. Optionally, when the processing device determines that the sub-image unit adjacent to the first neighboring area / neighboring sample in the above-mentioned first image unit adopts unidirectional prediction, the processing device also determines the above-mentioned first motion offset information as a motion vector for unidirectional prediction. Optionally, when the processing device determines that the sub-image block adjacent to the first neighboring area / neighboring sample in the above-mentioned first image unit adopts bidirectional prediction, the processing device determines the above-mentioned first motion offset information as motion information for bidirectional prediction.
[0190] A seventh method: obtaining or determining the motion information according to a combination of at least one of the second motion offset information.
[0191] An eighth method: obtaining or determining the motion information according to a motion vector prediction candidate list.
[0192] Optionally, the motion information of the sub-processing unit can be obtained or determined from a motion vector prediction candidate list (also called an MVP list). For example, the motion vector prediction candidate list used to determine the motion information of the sub-processing unit includes multiple motion vector predictors. These motion vector predictors may correspond to the motion offsets in the motion offset information list. For example, these motion vector predictors may be motion vector predictors mvp0, mvp1, and mvp2. Motion vector predictor mvp0 is determined for motion offset candidate 0 in the motion offset information list; motion vector predictor mvp1 is determined for motion offset candidate 1 in the motion offset information list; and motion vector predictor mvp2 is determined for motion offset candidate 2 in the motion offset information list.
[0193] Optionally, the motion information of the sub-processing unit may be a motion vector predictor obtained or determined in a motion vector prediction candidate list (also referred to as an MVP list). In another embodiment, the motion information of the sub-processing unit may be determined by a motion vector predictor obtained or determined in a motion vector prediction candidate list (also referred to as an MVP list) and a motion vector difference (MVD).
[0194] Optionally, the first through eighth methods can be combined with each other. For example, the first method can be combined with the second method. In one embodiment of the present invention, a co-located processing unit of the unit to be processed obtains or determines motion vector predictor 1, and a co-located sub-processing unit of the sub-processing unit determines motion vector predictor 2. Motion information of the sub-processing unit is then determined using motion vector predictor 1 and motion vector predictor 2.
[0195] The first method can be combined with the third method. In one embodiment of the present invention, a motion vector predictor 1 is obtained or determined by a co-located processing unit of the unit to be processed. Then, the motion vector predictor 1 is used as a candidate motion vector or motion vector predictor in the sub-block merging candidate list, and the motion information of the sub-processing unit is further determined based on the sub-block merging candidate list.
[0196] The second method can be combined with the third method. In one embodiment of the present invention, the motion vector predictor 2 is obtained or determined by the co-located sub-processing unit of the sub-processing unit. The motion vector predictor 2 is then used as a candidate motion vector or motion vector predictor in the sub-block merging candidate list, and the motion information of the sub-processing unit is further determined based on the sub-block merging candidate list.
[0197] The first method and the fourth method can be combined. For example, if the preset flag is the second value, the motion information of the sub-processing unit is acquired or determined based on the motion information of the center sample of the co-located processing unit of the unit to be processed.
[0198] The second approach and the fourth approach may be combined. For example, if the preset flag is the first value, the motion information of the sub-processing unit is acquired or determined based on the motion information of the co-located sub-processing unit of the sub-processing unit.
[0199] The first method can be combined with the eighth method. In one embodiment of the present invention, motion vector predictor 1 is obtained or determined by the co-located processing unit of the processing unit. Then, motion vector predictor 1 is used as a motion vector predictor in the motion vector prediction candidate list, and motion information of the sub-processing unit is further determined based on the motion vector prediction candidate list.
[0200] The second method can be combined with the eighth method. In one embodiment of the present invention, motion vector predictor 2 is obtained or determined by a co-located sub-processing unit of the sub-processing unit. Motion vector predictor 2 is then used as a motion vector predictor in a motion vector predictor candidate list, and motion information of the sub-processing unit is further determined based on the motion vector predictor candidate list.
[0201] The fifth method can be combined with the eighth method. That is, in one embodiment of the present invention, the first motion offset information is obtained and determined from a motion offset information list, and the motion information of the sub-processing unit is obtained or determined from a motion vector prediction candidate list (also called an MVP list). At the same time, the motion vector predictor in the above-mentioned motion vector prediction candidate list is determined using the motion offset candidates in the above-mentioned motion offset information list.
[0202] The sixth method can be combined with the fifth method. For example, the first motion offset information is determined based on the second motion offset information of the first image unit or the first sub-image unit in the processed area of the image to be processed. Further, the motion information is obtained or determined based on the first motion offset information. For another example, the first motion offset information is determined based on the second motion offset information of the first image unit or the first sub-image unit in the processed area of the image to be processed. The first motion offset information is a motion offset candidate in the motion offset information list. Further, the motion information of the sub-processing unit is obtained or determined based on the first motion offset information.
[0203] The sixth method can be combined with the seventh method. For example, multiple pieces of second motion offset information corresponding to multiple first image units and / or multiple first sub-image units in a processed area of the image to be processed are determined. Furthermore, appropriate motion offset information is determined from the multiple pieces of second motion offset information, and motion information of the sub-processing unit is determined based on the appropriate motion offset information.
[0204] The sixth method may be combined with the eighth method. For example, based on second motion offset information of a first image unit or a first sub-image unit in a processed area of the image to be processed, a motion vector predictor is determined from a motion vector prediction candidate list based on the second offset information. Furthermore, motion information of the sub-processing unit is determined based on the determined motion vector predictor.
[0205] The sixth method can be combined with the fifth, seventh, and eighth methods. For example, multiple pieces of second motion offset information corresponding to multiple first image units and / or multiple first sub-image units in a processed area of the image to be processed are determined. The multiple pieces of second motion offset information are used to construct a motion offset information list. Further, a suitable motion offset is determined from the motion offset information list. Finally, based on the suitable motion offset, a corresponding motion vector predictor is determined from the motion vector prediction candidate list to determine the motion information of the sub-processing unit.
[0206] The above-mentioned combinations are not exhaustive, and the embodiments of the present invention may also include other combinations of the first to eighth aspects.
[0207] Optionally, when calculating and determining the motion information of any sub-processing unit in the unit to be processed, the processing device may also obtain or determine the motion information of the sub-processing unit in the unit to be processed based on a combination of at least one second offset information after obtaining or determining the above-mentioned second offset information.
[0208] Optionally, the processing device may select at least one second offset information from the at least one second offset information and combine the selected second offset information according to the positional relationship between the processed region corresponding to the at least one second offset information and the co-located sub-processing unit.
[0209] In this embodiment, the processing device uses the motion offset information corresponding to the minimum matching cost to determine the motion offset (or candidate motion offset) of the unit to be processed in the current image, so that the motion trajectory of the unit to be processed obtained by the motion offset (characterized by the temporal motion vector of the unit to be processed obtained by the motion offset) has a smaller error than the actual motion trajectory of the unit to be processed. Specifically, suitable motion offset information is determined from at least one motion offset information of the template image block, and then a suitable area / sample is selected from the adjacent areas, adjacent samples, adjacent areas, and adjacent samples corresponding to the unit to be processed, so that the motion offset information corresponding to the suitable area / suitable sample is used as the motion offset information of the unit to be processed, and the sub-processing block in the unit to be processed is predicted using the motion offset information, thereby improving the prediction accuracy and / or efficiency of video encoding.
[0210] Third embodiment
[0211] In this embodiment, the execution subject of the image processing method provided by this application can still be the above-mentioned processing device. In this embodiment, the above-mentioned second method of obtaining or determining motion information based on the co-located sub-processing unit of the sub-processing unit can include:
[0212] Determine a co-located sub-processing unit according to the position information and motion offset information of the sub-processing unit;
[0213] The motion information of the sub-processing unit is acquired or determined according to the position information of the co-located sub-processing unit and / or the motion information of the center sample of the co-located sub-processing unit.
[0214] Optionally, when determining the motion information of a sub-processing unit based on the motion information of the above-mentioned co-located sub-processing unit, the processing device may first determine the co-located sub-processing unit based on the position information and motion offset information of the sub-processing unit; then, determine the position information of the co-located sub-processing unit and / or the motion information of the center sample of the co-located sub-processing unit, thereby acquiring or determining the motion information of the sub-processing unit based on the position information of the co-located sub-processing unit and / or the motion information of the center sample of the co-located sub-processing unit.
[0215] Optionally, please refer to Figure 10. For the sub-processing unit in the current image (the sub-CU shown in Figure 10), if the motion vectors corresponding to the above-mentioned adjacent areas, adjacent areas, adjacent samples, and adjacent samples are used as the motion vector MV1 in Figure 10, then based on the motion vector MV1 and the position of the sub-CU, a co-located sub-CU can be determined in the co-located image of the current image (the co-located sub-CU is the co-located sub-processing unit of the sub-processing unit).
[0216] Optionally, the fifth method of acquiring or determining motion information according to the first motion offset information of the unit to be processed may include:
[0217] Obtain or determine first motion offset information according to at least one corresponding first motion information of at least one adjacent region, at least one adjacent region, at least one adjacent sample, or at least one adjacent sample;
[0218] The motion information of the sub-processing unit is acquired or determined according to the first motion offset information.
[0219] Optionally, when determining the motion information of the sub-processing unit based on the first motion offset information of the unit to be processed, the processing device may first obtain or determine the first motion offset information based on at least one corresponding first motion information of at least one adjacent area, at least one adjacent area, at least one adjacent sample, and at least one adjacent sample of the unit to be processed; and then determine the co-located sub-processing unit based on the first motion offset information to obtain or determine the motion information of the sub-processing unit.
[0220] Optionally, the first motion offset information may be motion offset information determined by obtaining from a motion offset information list. A plurality of motion offset candidates may be determined by at least one corresponding first motion information of at least one adjacent region, at least one adjacent region, at least one adjacent sample, or at least one adjacent sample. For example, these first motion information may be used as motion offset candidates. Furthermore, these motion offset candidates are used to construct a motion offset information list. That is, the elements in the motion offset information list include motion offset candidates. In addition, the motion offset candidate may also be a motion offset used by an already encoded image block (i.e., historical motion offset information) or may be a motion vector predictor (MVP) used by an already encoded image block.
[0221] Optionally, the at least one adjacent region includes at least one of a lower left adjacent region or an upper right adjacent region of the unit to be processed. The at least one adjacent sample includes at least one of a lower left adjacent sample or an upper right adjacent sample of the unit to be processed. The at least one adjacent region includes at least one of a lower left adjacent region or an upper right adjacent region of the unit to be processed. The at least one adjacent sample includes at least one of a lower left adjacent sample or an upper right adjacent sample of the unit to be processed.
[0222] Optionally, the acquiring or determining the motion information of the sub-processing unit according to the first motion offset information may include:
[0223] determining a co-located sub-processing unit according to the position information of the sub-processing unit and the first motion offset information;
[0224] The motion information of the sub-processing unit is acquired or determined according to the position information and / or motion information of the co-located sub-processing unit.
[0225] Optionally, when determining a co-located sub-processing unit based on the first motion offset information to acquire or determine the motion information of the sub-processing unit, the processing device first determines a co-located sub-processing unit of the sub-processing unit based on the first motion offset information and the position information of the sub-processing unit. Then, the processing device acquires or determines the motion information of the sub-processing unit based on the position information and / or motion information of the co-located sub-processing unit.
[0226] Optionally, the above-mentioned first motion offset information can be a motion vector MVa corresponding to at least one of the adjacent areas, adjacent areas, adjacent samples, and adjacent samples as shown in Figures 7a, 7b, 8 and / or 9. The processing device can determine the co-located sub-processing unit of the sub-processing unit based on the motion vector MVa and the position information of the sub-processing unit.
[0227] Optionally, assuming that the motion vector MVa is (xa, ya) and the position of the sub-processing unit of the unit to be processed in the current image is (x0, y0), the processing device can determine the position of the co-located sub-processing unit of the sub-processing unit as (x0+xa, y0+ya) based on the motion vector MVa and the position (x0, y0). That is, the motion vector MVa indicates: in the reference image (the co-located image of the current image), an area is determined as the co-located sub-processing unit with the position (x0+xa, y0+ya) as the base point. Optionally, the size and aspect ratio of the co-located sub-processing unit are the same as the size and aspect ratio of the sub-processing unit.
[0228] Optionally, the sub-processing unit position (x0, y0) is the position of the sample at the upper left corner of the sub-processing unit.
[0229] Optionally, after the processing device determines the co-located sub-processing unit of the sub-processing unit based on the above-mentioned first motion offset information, the processing device can further obtain or determine the motion vector of the sub-processing unit based on the position information of the co-located sub-processing unit and / or the motion vector of the co-located sub-processing unit.
[0230] Optionally, when determining the motion vector of a sub-processing unit in the current image based on the position information of the co-located sub-processing unit, the processing device first determines a center sample of the co-located sub-processing unit. Thereafter, if the center sample employs inter-frame prediction, the processing device directly uses the motion vector corresponding to the center sample as the motion vector or motion vector candidate of the sub-processing unit of the unit to be processed in the current image.
[0231] Optionally, assuming that the position of the co-located sub-processing unit is (x0+xa, y0+ya) and the size of the co-located sub-processing unit is s1*s1, the processing device can confirm that the center sample of the co-located sub-processing unit is ((x0+xa)+s1 / 2, (y0+ya)+s1 / 2).
[0232] Optionally, assuming that the position of the co-located sub-processing unit is (x0+xa, y0+ya) and the size of the co-located sub-processing unit is H1*W1, the processing device can confirm that the center sample of the co-located sub-processing unit is ((x0+xa)+H1 / 2, (y0+ya)+W1 / 2).
[0233] Optionally, when the above-mentioned first motion offset information is at least one corresponding motion vector MVa of the neighboring area, neighboring area, neighboring sample, and neighboring sample as shown in Figures 7a, 7b, 8 and / or 9, the motion vector MVa can specifically be the motion vector used when the neighboring area, neighboring area, neighboring sample, and neighboring sample perform inter-frame prediction.
[0234] Optionally, when the processing device determines the co-located sub-processing unit of the sub-processing unit based on the motion vector MVa and the position of the sub-processing unit, if the position of the sub-processing unit of the unit to be processed in the current image is (x'0, y'0) (the position (x'0, y'0) of the sub-processing unit is the position of the sample at the upper left corner of the sub-processing unit), the processing device can determine the position of the center sample of the sub-processing unit based on the position (x'0, y'0) of the sub-processing unit. Thereafter, the processing device can determine the position information of the co-located sub-processing unit based on the position of the center sample of the sub-processing unit and the motion vector MVa.
[0235] Optionally, if the size of the sub-processing unit is s'1*s'1, the processing device may determine the position of the center sample of the sub-processing unit to be (x'0+s'1 / 2, y'0+s'1 / 2). Optionally, if the size of the sub-processing unit is H'1*W'1, the processing device may determine the position of the center sample of the sub-processing unit to be (x'0+H'1 / 2, y'0+W'1 / 2). Optionally, H'1 is the height of the sub-coding unit, and W'1 is the width of the sub-coding unit.
[0236] Optionally, if the center sampling position of the sub-processing unit determined by the processing device is (x'0+s'1 / 2, y'0+s'1 / 2) and the motion vector MVa is (x'a, y'a), the processing device can determine that the center sampling position of the co-located sub-processing unit of the sub-processing unit is ((x'0+x'a)+s'1 / 2, (y'0+y'a)+s'1 / 2).
[0237] Optionally, if the center sampling position of the sub-processing unit determined by the processing device is (x'0+H'1 / 2, y'0+W'1 / 2) and the motion vector MVa is (x'a, y'a), the processing device can determine that the center sampling position of the co-located sub-processing unit of the sub-processing unit is ((x'0+x'a)+H'1 / 2, (y'0+y'a)+W'1 / 2).
[0238] Optionally, when acquiring or determining motion information of a sub-processing unit in a unit to be processed based on the co-located processing unit of the unit to be processed, the processing device first determines the co-located processing unit of the unit to be processed based on the position information of the sub-processing unit and at least one corresponding motion vector MVa in the adjacent region, adjacent region, adjacent sample, or adjacent sample as shown in Figures 7a, 7b, 8, and / or 9. The motion vector of the co-located processing unit is then determined based on the position information of the co-located processing unit, and the motion vector is directly used as the motion vector or motion vector candidate of the sub-processing unit of the unit to be processed in the current image.
[0239] Optionally, when the processing device determines the co-located processing unit of the unit to be processed based on the position information of the sub-processing unit in the unit to be processed and the motion vector MVa (the motion vector MVa is also the motion vector used when the above-mentioned adjacent region, adjacent region, adjacent sample, and adjacent sample perform inter-frame prediction), if the motion vector MVa is (xa, ya) and the position of the sub-processing unit of the unit to be processed in the current image is (x0, y0), then the processing device can determine the position of the co-located sub-processing unit of the sub-processing unit as (x0+xa, y0+ya). Then, the processing device can determine the position of the co-located processing unit based on the size of the co-located processing unit of the unit to be processed (the same size as the unit to be processed) and the position of the co-located sub-processing unit.
[0240] Optionally, if the size of the unit to be processed in the current image is 16*16 and the unit to be processed includes four sub-coding units of the same size, the size of each sub-coding unit is 8*8. Thus, when the processing device determines that the sub-processing unit in the unit to be processed is the sub-coding unit located in the first row and second column, the processing device can determine the position of the co-located processing unit of the unit to be processed as (x0+xa-8, y0+ya) based on the above process.
[0241] Optionally, when the processing device determines the motion vector of the co-located processing unit of the unit to be processed, it can also use the motion vector of the center sample of the co-located processing unit as the motion vector of the co-located processing unit. In this way, when the processing device determines the center sample of the co-located processing unit, if the position of the co-located processing unit is (x0+xa-8, y0+ya) and the size of the co-located processing unit is s2*s2, the processing device can determine that the center sample of the co-located processing unit is ((x0+xa-8)+s2 / 2, (y0+ya)+s2 / 2). Afterwards, if the center sample of the co-located processing unit adopts inter-frame prediction, the processing device can directly use the motion vector corresponding to the center sample as the motion vector of the co-located processing unit, and / or synchronously use the motion vector corresponding to the center sample as the motion vector or motion vector candidate of the sub-processing unit of the unit to be processed in the current image.
[0242] Fourth embodiment
[0243] In this embodiment, the image processing method provided by this application may still be executed by the aforementioned processing device. In this embodiment, the sixth method of obtaining or determining motion information based on the second motion offset information of the first image unit or the first sub-image unit in the processed area of the image to be processed may include:
[0244] The first motion offset information is determined according to the second offset information, and the motion information of the sub-processing unit is acquired or determined according to the first motion offset information.
[0245] Optionally, when the processing device obtains or determines the motion information of the sub-processing unit in the unit to be processed based on the second motion offset information of the above-mentioned first image unit or first sub-image unit, the processing device may first determine the first motion offset information according to the second offset information, and then obtain or determine the motion information of the sub-processing unit in the unit to be processed according to the first motion offset information.
[0246] Optionally, when determining the second motion offset information of the above-mentioned first image unit, the processing device may determine the second motion offset information based on the matching cost corresponding to at least one first area in the first image unit, that is, the motion information of the first area corresponding to the minimum matching cost among the matching costs corresponding to at least one first area is determined as the second motion offset information of the first image unit.
[0247] Optionally, assuming that the first image unit is an image block A, the image block A is an image block in the current image that has been encoded or decoded, and / or the image block A is adjacent to or near the position of the unit to be processed that currently needs to be encoded or decoded. Optionally, the image block A is also called a template image block.
[0248] Optionally, the processing device uses the image block A to test the most appropriate motion offset information (or candidate offsets), and then uses the candidate offset (i.e., the first motion offset information) corresponding to the candidate offset (i.e., the second motion offset information) of the image block A for the unit to be processed. In this way, the processing device determines appropriate motion offset information from at least one piece of motion offset information of the image block A, and then selects a suitable region from the adjacent regions or neighboring regions corresponding to the unit to be processed, using the motion information corresponding to the suitable region as the motion offset information of the unit to be processed, to perform prediction processing on the sub-processing unit in the unit to be processed, thereby improving image block prediction accuracy and / or improving video coding efficiency.
[0249] Alternatively, if the candidate offset of image block A (i.e., the second motion offset information) is determined using the motion vector of the upper neighboring region r1 of image block A, then the candidate offset of the unit to be processed (i.e., the first motion offset information) can be determined using the motion vector of the upper neighboring region r1' corresponding to the position of the upper neighboring region r1. Alternatively, if the upper neighboring region r1 is the upper neighboring region of image block A and the first neighboring region from left to right, then the upper neighboring region r1' corresponding to the position of the upper neighboring region r1 is also the first upper neighboring region of the unit to be processed.
[0250] Alternatively, if the candidate offset of image block A (i.e., the second motion offset information) is determined using the motion vector of the left-side adjacent region r2 of image block A, then the candidate offset of the unit to be processed (i.e., the first motion offset information) can be determined using the motion vector of the left-side adjacent region r2' corresponding to the position of the left-side adjacent region r2. Alternatively, if the left-side adjacent region r2 is the second adjacent region from top to bottom, adjacent to the left of image block A, then the left-side adjacent region r2' corresponding to the position of the upper adjacent region r2 is the second adjacent region from top to bottom, adjacent to the left of the unit to be processed.
[0251] Alternatively, if the candidate offset of image block A (i.e., the second motion offset information) is determined using the motion vector of the upper neighboring region r3 of image block A, then the candidate offset of the unit to be processed (i.e., the first motion offset information) can be determined using the motion vector of the upper neighboring region r3' corresponding to the position of the upper neighboring region r1. Alternatively, if the upper neighboring region r3 is the upper neighboring region of image block A and the third neighboring region from left to right, then the upper neighboring region r3' corresponding to the position of the upper neighboring region r3 is the third upper neighboring region of the unit to be processed.
[0252] Alternatively, if the candidate offset of image block A (i.e., the second motion offset information) is determined using the motion vector of the left neighboring region r4 of image block A, then the candidate offset of the unit to be processed (i.e., the first motion offset information) can be determined using the motion vector of the left neighboring region r4' corresponding to the position of the left neighboring region r4. Alternatively, if the left neighboring region r4 is the fourth neighboring region from the top to the left of image block A, then the left neighboring region r4' corresponding to the position of the upper neighboring region r4 is the fourth neighboring region from the top to the left of the unit to be processed.
[0253] Alternatively, if the candidate offset of image block A (i.e., the second motion offset information) is determined by using the motion vector of the upper neighboring sample s1 of image block A, then the candidate offset of the unit to be processed (i.e., the first motion offset information) can be determined by using the motion vector of the upper neighboring sample s1' corresponding to the position of the upper neighboring sample s1. Alternatively, if the position of image block A is (0, 0), the position of the upper neighboring sample s1 is (x, -1), and the position of the unit to be processed is (a, b), then the position of the upper neighboring sample s1' corresponding to the position of the upper neighboring sample s1 is (a+x, b-1).
[0254] Alternatively, if the candidate offset of image block A (i.e., the second motion offset information) is determined by using the motion vector of the left adjacent sample s2 of image block A, then the candidate offset of the unit to be processed (i.e., the first motion offset information) can be determined by using the motion vector of the left adjacent sample s2' corresponding to the position of the left adjacent sample s2. Alternatively, if the position of image block A is (0, 0), the position of the upper adjacent sample s2 is (-1, y), and the position of the unit to be processed is (a, b), then the position of the upper adjacent sample s2' corresponding to the position of the upper adjacent sample s2 is (a-1, b+y).
[0255] Alternatively, if the candidate offset of image block A (i.e., the second motion offset information) is determined using the motion vector of the upper neighboring sample s3 of image block A, then the candidate offset of the unit to be processed (i.e., the first motion offset information) can be determined using the motion vector of the upper neighboring sample s3' corresponding to the position of the upper neighboring sample s3. Alternatively, if the position of image block A is (0, 0), the position of the upper neighboring sample s3 is (x, -2), and the position of the unit to be processed is (a, b), then the position of the upper neighboring sample s3' corresponding to the position of the upper neighboring sample s3 is (a+x, b-2).
[0256] Alternatively, if the candidate offset of image block A (i.e., the second motion offset information) is determined using the motion vector of the left neighboring sample s4 of image block A, then the candidate offset of the unit to be processed (i.e., the first motion offset information) can be determined using the motion vector of the left neighboring sample s4' corresponding to the position of the left neighboring sample s4. Alternatively, if the position of image block A is (0, 0), the position of the upper neighboring sample s4 is (-2, y), and the position of the unit to be processed is (a, b), then the position of the upper neighboring sample s4' corresponding to the position of the upper neighboring sample s4 is (a-2, b+y).
[0257] Optionally, the processing device may further determine appropriate motion offset information from the at least one piece of motion offset information, and then select motion offset information of the same type as the appropriate motion offset information from the at least one piece of motion offset information corresponding to the unit to be processed.
[0258] Alternatively, assume that image block A includes motion offset information X, motion offset information Y, and motion offset information Z, where motion offset information X corresponds to a motion vector sampled at the center of a first region X, motion offset information Y corresponds to a motion vector sampled at the center of the first region Y, and motion offset information Z corresponds to a motion vector sampled at the center of the first region Z. Thus, if, from the three pieces of motion offset information of image block A, motion offset information X is determined to be the motion offset information with the lowest derived matching cost, then when performing prediction processing on the unit to be processed, the processing device may use motion offset information X corresponding to the first region X of the unit to be processed as the selected motion offset information.
[0259] Optionally, in the process of performing predictive processing on the unit to be processed based on the above process, the processing device first sets the reference image with the smallest image sequence distance with the current image as the co-located image of the current image. Then, the processing device determines the image block A used to derive motion offset information in the current image. The image block A is located in the encoded area of the current image and is not located in the current encoding unit, and / or the size of the image block A is the same as the size of the unit to be processed. Then, the processing device sets at least one first area around the image block A. Optionally, the at least one first area is an adjacent area or a neighboring area. Thereafter, the processing device determines at least one motion candidate offset based on the at least one first area. Optionally, the processing device determines the center sample of at least one first area and determines the motion vectors used by these center samples, so that when these motion vectors point to the co-located image, these motion vectors are all used as at least one motion candidate offset.
[0260] After determining at least one motion candidate offset, the processing device determines, for each of the at least one motion candidate offset, at least one co-located image block A' of image block A in the co-located image, or determines a co-located sub-image block a' of the at least one co-located image A' based on the position of image block A / sub-image block a. Optionally, sub-image block a is a sub-image block of image block A, that is, image block A includes sub-image block a. Optionally, sub-image block a is a sub-CU, and / or sub-image block a is also located in a coded area of the current image and not in the current coding unit.
[0261] The processing device determines at least one co-located image block A' of image block A in the co-located image, or after determining the co-located sub-image block a' of the at least one co-located image block A', determines at least one motion vector mva of at least one sub-image block a in image block A using each of the at least one motion vector colsbmv of the at least one co-located sub-image block a'. Furthermore, the processing device uses the at least one motion vector mva to perform inter-frame prediction on the at least one sub-image block a in image block A to obtain a corresponding prediction result. Finally, the processing device compares the difference (e.g., SAD, SATD value representing matching cost) and / or cost (e.g., rate-distortion cost) between the combination of prediction results for the sub-image blocks corresponding to each of the at least one motion candidate offsets (the combination of prediction results for the sub-image block a can serve as the prediction result for image block A) and image block A; or, the processing device compares the difference and / or cost between the prediction results for the sub-image block a corresponding to each of the at least one motion candidate offsets and sub-image block a. Optionally, the processing device may select a candidate offset (i.e., the first motion offset information) for predicting the unit to be processed based on the motion candidate offset (i.e., the second motion offset information) corresponding to the motion vector colsbmv having the smallest difference and / or cost. For example, if the second motion offset information is the motion vector of the left adjacent area of image block A, the first motion offset information is the motion vector of the left adjacent area of the unit to be processed. If the second motion offset information is the motion vector of the upper adjacent area of image block A, the first motion offset information is the motion vector of the upper adjacent area of the unit to be processed.
[0262] Optionally, during subsequent prediction processing of the unit to be processed, the processing device may directly use, in at least one first region of the unit to be processed, a motion vector sampled from the center of the first region corresponding to the selected candidate offset as the first motion offset information of the unit to be processed in order to determine the first motion offset information of the unit to be processed. Prediction processing is then performed on the unit to be processed after determining the first motion offset information.
[0263] Optionally, referring to FIG11 , it is assumed that image block A includes four sub-image blocks, namely, sub-image block sbCU0, sub-image block sbCU1, sub-image block sbCU2, and sub-image block sbCU3. In this case, the processing device selects four adjacent regions (adjacent region R1, adjacent region R2, adjacent region R3, and adjacent region R4) around the image block A as the first region. Optionally, the four adjacent regions selected around the image block A can also be regarded as adjacent regions of the sub-image block a. Optionally, the processing device can also select non-adjacent but adjacent regions as the first region. Then, if the motion vectors corresponding to the center samples of the four adjacent regions all exist and point to the co-located image 1 or the co-located image 2 but not to other reference images, the processing device can confirm that the four adjacent regions are all available. In this way, the processing device can use the four motion vectors corresponding to the four adjacent regions as candidate offset 1, candidate offset 2, candidate offset 3, and candidate offset 4. Then, the processing device determines, for the four candidate offsets, collocated image blocks A1 ′ to A4 ′ with respect to the image block A in the collocated image 1 or the collocated image 2 .
[0264] Optionally, as shown in Figure 12a, after the processing device determines the co-located image blocks A1'~A4' with respect to the image block A, if the motion vectors corresponding to the sub-blocks in the image block A1' determined by the candidate offset 1 are all unidirectionally predicted, and / or the prediction direction of each motion vector is to the left, then the processing device can determine the motion vectors of the sub-image blocks with the same position in the image block A through the motion vector corresponding to each sub-block in the image block A1'.
[0265] Optionally, as shown in Figure 12a, the processing device can use the motion vector of the sub-image block a at the upper left corner of the image block A1 in the co-located image to determine the motion vector of the sub-image block at the upper left corner of the image block A in the current image; and use the motion vector of the sub-image block a at the upper right corner of the image block A1 in the co-located image to determine the motion vector of the sub-image block at the upper right corner of the image block A in the current image; use the motion vector of the sub-image block a at the lower left corner of the image block A1 in the co-located image to determine the motion vector of the sub-image block at the lower left corner of the image block A in the current image; and / or use the motion vector of the sub-image block a at the lower right corner of the image block A1 in the co-located image to determine the motion vector of the sub-image block at the lower right corner of the image block A in the current image.
[0266] Optionally, as shown in Figure 12b, if in the image block A2' determined by the candidate offset 2, the motion vectors corresponding to the sub-blocks exist three unidirectionally predicted motion vectors and one bidirectionally predicted motion vector, then the motion vector corresponding to each sub-block in the image block A2' can be processed to determine the motion vector of the sub-image block with the same position in the image block A.
[0267] Optionally, as shown in Figure 12c, if in the image block A3' determined by the candidate offset 3, there are four unidirectionally predicted motion vectors corresponding to the sub-blocks, and the directions of two of the motion vectors are the same, the processing device interface determines the motion vector of the sub-image block with the same position in the image block A through the motion vector corresponding to each sub-block in the image block A3'.
[0268] Optionally, as shown in Figure 12d, if in the image block A4' determined by the candidate offset 4, there are 4 unidirectionally predicted motion vectors corresponding to the sub-blocks, and / or the directions of these 4 motion vectors are the same, the processing device can determine the motion vector of the sub-image block with the same position in the image block A through the motion vector corresponding to each sub-block in the image block A4'.
[0269] Optionally, the processing device uses each sub-block motion vector of image block A shown in Figures 12a to 12d to perform inter-frame prediction on image block A to obtain a prediction result corresponding to image block A, and determines the optimal candidate offset among candidate offsets 1 to candidate offsets 4 based on a comparison result of the prediction result and image block A, thereby selecting the optimal candidate offset as the candidate offset for prediction processing of the current unit to be processed.
[0270] Optionally, when the processing device determines at least one co-located sub-image block for the at least one candidate offset, it is not necessary to determine the position of the co-located image block.
[0271] Optionally, referring to Figure 13, a candidate offset MV11 is (xmv, ymv), and / or the position of the sub-processing unit of the unit to be processed in the current image is (x0, y0), then the processing device can directly determine the position of the co-located sub-processing unit of the sub-processing unit as (x0+xmv, y0+ymv).
[0272] In this embodiment, since the processing device can directly determine the position of the co-located sub-processing unit in the unit to be processed without determining the position of the co-located image block, the processing device can effectively save its own computing power, thereby improving computing efficiency in the entire image encoding and decoding process.
[0273] Optionally, as shown in FIG13 , the processing device may utilize the first region above image block A to determine a co-located sub-image block of the sub-image block located in the vertical direction of the first region above image block A; or, the processing device may utilize the first region to the left of image block A to determine a co-located sub-image block of the sub-image block located in the horizontal direction of the first region to the left.
[0274] In this embodiment, the processing device determines the co-located sub-processing unit of the sub-processing unit in the unit to be processed by the above-mentioned method of determining the co-located sub-image block of the sub-image block, which can effectively improve the accuracy of determining the motion vector or motion vector candidate of the sub-processing unit.
[0275] Optionally, as shown in FIG13 , since sub-image blocks 1 and 3 of image block A are located below first region R1, collocated sub-image blocks 1′ and 3′ are determined based on candidate offset 1 determined for first region R1. Furthermore, since sub-image blocks 2 and 4 of image block A are located below first region R2, collocated sub-image blocks 2′ and 4′ are determined based on candidate offset 2 determined for first region R2. Furthermore, since sub-image blocks 1 and 2 of image block A are located to the right of first region R3, collocated sub-image blocks 1 and 2 are determined based on candidate offset 3 determined for first region R3. Alternatively, since sub-image blocks 3 and 3 of image block A are located to the right of first region R4, collocated sub-image blocks 3 and 4 are determined based on candidate offset 4 determined for first region R4.
[0276] Optionally, the processing device may obtain motion information of the sub-processing unit in the unit to be processed according to a combination of the at least one candidate offset, and determine a prediction result of the unit to be processed according to the motion information.
[0277] Optionally, the processing device may select a corresponding candidate offset for each sub-image block from at least one candidate offset based on the positional relationship between the first area corresponding to at least one candidate offset and each sub-image block, and combine the corresponding candidate offsets to obtain at least one combination of candidate offsets.
[0278] Optionally, as shown in Figure 14a, the processing device may combine candidate offset 3 and candidate offset 4, and use the motion vectors of the co-located sub-image blocks 1 to 4 corresponding to candidate offset 3 and candidate offset 4 as the motion vectors of sub-image blocks 1 to 4 in image block A.
[0279] Optionally, candidate offset 3 and candidate offset 4 are both candidate offsets obtained from the first area on the left side of image block A.
[0280] Optionally, as shown in Figure 14a, the processing device can also combine candidate offset 1 and candidate offset 2, and use the motion vectors of the co-located sub-image blocks 1'~4' corresponding to candidate offset 1 and candidate offset 2 as the motion vectors of sub-image blocks 1~4 in image block A.
[0281] Optionally, candidate offset 1 and candidate offset 2 are both candidate offsets obtained from the first area above the image block.
[0282] Optionally, after determining the motion vectors of sub-image blocks 1 to 4 in image block A, the processing device may perform inter-frame prediction on the sub-image blocks in image block A using the motion vector of each sub-block of image block A shown in FIG14a to obtain prediction results 1 to 4 corresponding to sub-image blocks 1 to 4. Furthermore, the processing device may combine prediction results 1 to 4 and compare them with image block A to obtain comparison result 1.
[0283] Optionally, the processing device may also use the motion vector of each sub-block of image block A shown in Figure 14b to perform inter-frame prediction on the sub-image blocks in image block A to obtain prediction results 1'~4' corresponding to sub-image blocks 1~4, and then combine the prediction results 1'~4' to obtain a synthesized prediction result, and compare the synthesized prediction result with image block A to obtain comparison result 2.
[0284] Optionally, after obtaining the above-mentioned comparison results 1 and 2, the processing device can determine whether to select candidate offset 3 and candidate offset 4, or select candidate offset 1 and candidate offset 2 as the optimal candidate offsets based on the comparison results 1 and 2.
[0285] Optionally, the process of the processing device performing the above comparison may be: calculating the absolute error and SAD or SATD between the synthesized prediction result and the image block A.
[0286] Optionally, the processing device may further select at least one candidate offset from the at least one candidate offset and jointly determine the candidate offsets of all sub-image blocks in an image block according to a combination of the at least one selected candidate offset.
[0287] Optionally, the candidate offsets selected by the processing device are used to determine candidate offsets of a preset position, a preset direction (such as horizontal direction or vertical direction), a preset range area, and a preset number of sub-image blocks in the image block.
[0288] Optionally, the process of the processing device selecting at least one candidate offset includes:
[0289] At least one composite image block (such as image block A1' in Figure 14a and image block A2' in Figure 14b) is formed based on the co-located sub-image blocks corresponding to at least one candidate offset, and at least one selected candidate offset and its combination are determined based on the comparison result of the prediction results corresponding to each of the at least one composite image blocks.
[0290] Optionally, the image block corresponding to the at least one candidate offset selected in the combination is within a preset range. Optionally, when the size of the image block is greater than a threshold, the at least one candidate offset selected in the combination is used to determine the motion vector of the sub-processing unit of the unit to be processed, and when the size of the image block is less than the threshold, only one candidate offset selected from the at least one candidate offset is used to determine the motion vector of the sub-processing unit of the unit to be processed.
[0291] Optionally, when the size of the image block is smaller than a threshold, the motion vector of the sub-processing unit in the unit to be processed may be determined by only using a preset candidate offset.
[0292] In this embodiment, a good balance between computing power and performance can be achieved by selecting candidate offsets according to the size of the image block to determine the motion vector of the sub-processing unit.
[0293] Optionally, when determining the second motion offset information of the above-mentioned first image unit, the processing device may determine the second motion offset information based on the matching cost corresponding to at least one first sample in the first image unit, that is, the motion information of the first sample corresponding to the minimum matching cost among the matching costs corresponding to at least one first sample is determined as the second motion offset information of the first image unit.
[0294] Optionally, assuming that the first image unit is image block A, image block A is an image block in the current image that has been encoded or decoded, and / or image block A is adjacent to or proximate to a unit to be processed that currently needs to be encoded or decoded. Optionally, image block A is also referred to as a template image block.
[0295] Optionally, the processing device uses the image block A to test the most appropriate motion offset information (or candidate motion offset), and then adopts the candidate offset corresponding to the image block A for the unit to be processed. In this way, the processing device determines appropriate motion offset information from at least one piece of motion offset information of the image block A, and then selects an appropriate sample from the adjacent samples and neighboring samples corresponding to the unit to be processed, so that the motion information corresponding to the appropriate sample serves as the motion offset information of the unit to be processed, and performs prediction processing on the sub-processing unit in the unit to be processed, thereby improving the image block prediction accuracy and / or improving the efficiency of video coding.
[0296] Optionally, the processing device may further determine appropriate motion offset information from the at least one piece of motion offset information, and then select motion offset information of the same type as the appropriate motion offset information from the at least one piece of motion offset information corresponding to the unit to be processed.
[0297] Alternatively, assume that image block A includes motion offset information X, motion offset information Y, and motion offset information Z. Motion offset information X corresponds to a motion vector sampled at the center of the first sample X, motion offset information Y corresponds to a motion vector sampled at the center of the first sample Y, and motion offset information Z corresponds to a motion vector sampled at the center of the first sample Z. Thus, if motion offset information X is determined to be the motion offset information with the lowest derived matching cost among the three pieces of motion offset information for image block A, the processing device may use motion offset information X' corresponding to the first sample X' of the unit to be processed as the selected motion offset information when performing prediction processing on the unit to be processed. Optionally, the positional relationship between the first sample X and image block A is the same as or similar to the positional relationship between the first sample X' and the unit to be processed.
[0298] Optionally, if the first sample X is located above the image block A, the first sample X′ is located above the unit to be processed.
[0299] Optionally, if the first sample X is located at the upper left of the image block A, the first sample X′ is located at the upper left of the unit to be processed.
[0300] Optionally, if the first sample X is located above the image block A, the first sample X′ is located above the unit to be processed.
[0301] Optionally, if the first sample X is not adjacent to the image block A, then the first sample X′ is not adjacent to the unit to be processed.
[0302] Optionally, when performing prediction processing on the unit to be processed based on the above process, the processing device first sets the reference image with the smallest image sequence distance with the current image as the co-located image of the current image. Then, the processing device determines an image block A in the current image for deriving motion offset information. The image block A is located in the encoded area of the current image and is not located in the current encoding unit, and / or the size of the image block A is the same as the size of the unit to be processed. Then, the processing device sets at least one first sample around the image block A. Optionally, the at least one first sample is an adjacent sample or a neighboring sample. Thereafter, the processing device determines at least one motion candidate offset based on the at least one first sample. Optionally, the processing device determines at least one first sample and determines the motion vector used by the at least one first sample, so that when these motion vectors point to the co-located image, these motion vectors are all used as at least one motion candidate offset.
[0303] After determining at least one motion candidate offset, the processing device determines, for each of the at least one motion candidate offset, at least one co-located image block A' of image block A in the co-located image, or determines a co-located sub-image block a' of the at least one co-located image A' based on the position of image block A / sub-image block a. Optionally, sub-image block a is a sub-image block of image block A, that is, image block A includes sub-image block a. Optionally, sub-image block a is a sub-CU, and / or sub-image block a is also located in a coded area of the current image and not in the current coding unit.
[0304] The processing device determines at least one co-located image block A' of image block A in the co-located image, or after determining the co-located sub-image block a' of the at least one co-located image block A', determines at least one motion vector mva of at least one sub-image block a in image block A using each of the at least one motion vectors colsbmv of the at least one co-located sub-image block a'. Furthermore, the processing device uses the at least one motion vector mva to perform inter-frame prediction on the at least one sub-image block a in image block A to obtain a corresponding prediction result. Finally, the processing device compares the difference (e.g., SAD, SATD value representing matching cost) and / or cost (e.g., rate-distortion cost) between the corresponding combination of prediction results for the sub-image blocks (the combination of prediction results for sub-image block a can serve as the prediction result for image block A) of each of the at least one motion candidate offsets and image block A, or compares the difference and / or cost between the corresponding prediction results for sub-image block a of each of the at least one motion candidate offsets and sub-image block a. Optionally, the processing device may use the motion candidate offset corresponding to the motion vector colsbmv having the smallest difference and / or cost as the candidate offset selected for performing prediction processing on the unit to be processed.
[0305] Optionally, in the subsequent process of predictive processing of the unit to be processed, in order to determine the first motion offset information of the unit to be processed, the processing device may directly use the first sampled motion vector corresponding to the above-selected candidate offset in at least one first area of the unit to be processed as the first motion offset information of the unit to be processed, and perform predictive processing on the unit to be processed after determining the first motion offset information.
[0306] Alternatively, referring to FIG. 15 , it is assumed that image block A includes four sub-image blocks, namely, sub-image block sbCU0, sub-image block sbCU1, sub-image block sbCU2, and sub-image block sbCU3. In this case, the processing device selects four adjacent samples (adjacent sample B0, adjacent sample B1, adjacent sample A0, and adjacent sample A1) around image block A as the first sample. Alternatively, the four adjacent samples selected around image block A can also be regarded as adjacent samples of sub-image block a. Alternatively, the processing device can also select non-adjacent but adjacent samples as the first sample.
[0307] Optionally, if the motion vectors corresponding to the four adjacent samples all exist and point to the collocated image 1 or the collocated image 2 but not to other reference images, then these four adjacent samples are all available. If the motion vectors corresponding to one or more of the four adjacent samples do not exist, or the motion vectors corresponding to one or more of the four adjacent samples do not point to the collocated image 1 or the collocated image 2 but to other reference images, then these adjacent samples are not available.
[0308] Optionally, when all four adjacent samples are available, the processing device uses four motion vectors corresponding to the four adjacent samples as candidate offset 1, candidate offset 2, candidate offset 3, and candidate offset 4. Then, the processing device determines, in the collocated image 1 or the collocated image 2, collocated image blocks with respect to the image block A—image block A0, image block A1, image block B0, and image block B1—for the four candidate offsets.
[0309] Optionally, as shown in Figure 16a, if the motion vectors corresponding to each sub-block in the image block A0 determined by the candidate offset A0 are all unidirectional predictions, the processing device determines the motion vectors of the sub-image blocks with the same position in the image block A through the motion vectors corresponding to each sub-block in the image block A0.
[0310] Optionally, as shown in Figure 16b, if there are three unidirectionally predicted motion vectors and one bidirectionally predicted motion vector corresponding to the sub-block in the image block A1 determined by the candidate offset A1, the processing device determines the motion vector of the sub-image block with the same position in the image block A through the motion vector corresponding to each sub-block in the image block A1.
[0311] Optionally, as shown in Figure 16c, if there are four unidirectionally predicted motion vectors corresponding to the sub-block in the image block B0 determined by the candidate offset B0, the processing device determines the motion vector of the sub-image block with the same position in the image block A through the motion vector corresponding to each sub-block in the image block B0.
[0312] Optionally, as shown in Figure 16d, if there are four unidirectionally predicted motion vectors corresponding to the sub-blocks in the image block B1 determined by the candidate offset B1, the processing device determines the motion vector of the sub-image block with the same position in the image block A through the motion vector corresponding to each sub-block in the image block B1.
[0313] Optionally, after determining the motion vector of the processed sub-image block, the processing device similarly uses the motion vector of each sub-block of image block A shown in Figures 12a to 12d to perform inter-frame prediction on image block A to obtain a prediction result corresponding to image block A. The processing device then compares the obtained prediction result with image block A to obtain a comparison result, and based on the comparison result, determines the optimal candidate offset among the candidate offsets A0-A1 and the candidate offsets B0-B1, and selects the optimal candidate offset as the selected candidate offset.
[0314] Optionally, as shown in FIG17 , the processing device may use the first sample above image block A to determine the co-located sub-image block located in the vertical direction of the first sample above the image block; or may use the first sample on the left side of image block A to determine the co-located sub-image block located in the horizontal direction of the first sample.
[0315] In this embodiment, the processing device determines the co-located sub-processing unit of the sub-processing unit in the unit to be processed by the above-mentioned method of determining the co-located sub-image block of the sub-image block, which can effectively improve the accuracy of determining the motion vector or motion vector candidate of the sub-processing unit.
[0316] Optionally, as shown in FIG17 , since sub-image blocks 1 and 3 of image block A are located below first sample B1, the processing device may determine co-located sub-image blocks 1 and 3 based on candidate offset B1 determined for first sample B1. Furthermore, since sub-image blocks 2 and 4 of image block A are located below first sample B2, the processing device may determine co-located sub-image blocks 2 and 4 based on candidate offset B2 determined for first sample B2. Furthermore, since sub-image blocks 1 and 2 of image block A are located to the right of first sample A1, the processing device may determine co-located sub-image blocks 1' and 2' based on candidate offset A1 determined for first sample A1. Alternatively, since sub-image blocks 3 and 3 of image block A are located to the right of first sample A2, the processing device may determine co-located sub-image blocks 3' and 4' based on candidate offset A2 determined for first sample A2.
[0317] Optionally, the processing device may further use the motion vector of the co-located sub-processing unit corresponding to the at least one candidate offset as motion information of at least one unit to be processed, and determine the prediction result of the unit to be processed based on the motion information.
[0318] Optionally, as shown in FIG18a , the processing device may use the motion vectors of the co-located sub-image blocks 1′ to 4′ corresponding to the candidate offsets A0 and A1 as the motion vectors of the sub-image blocks 1 to 4 in the image block A. Optionally, the processing device may also use the motion vectors of the co-located sub-image blocks 1 to 4 corresponding to the candidate offsets B0 and B1 as the motion vectors of the sub-image blocks 1 to 4 in the image block A.
[0319] Optionally, after determining the motion vectors of sub-image blocks 1 to 4 in image block A, the processing device may use the motion vectors of each sub-block of image block A shown in FIG18a to perform inter-frame prediction on the sub-image blocks in image block A, thereby obtaining prediction results 1′ to 4′ corresponding to sub-image blocks 1 to 4. The processing device then combines the prediction results 1′ to 4′ and compares them with image block A to obtain comparison result 11.
[0320] Optionally, the processing device uses the motion vector of each sub-block of image block A shown in FIG18b to perform inter-frame prediction on the sub-image blocks in image block A, and obtains prediction results 1 to 4 corresponding to sub-image blocks 1 to 4. And / or, the processing device combines prediction results 1 to 4 to obtain a synthesized prediction result, and compares the synthesized prediction result with image block A to obtain comparison result 12.
[0321] Optionally, after obtaining the comparison results 11 and 12, the processing device may determine whether to select candidate offset A0 and candidate offset A1, or candidate offset B0 and candidate offset B1 as the optimal candidate offsets according to the comparison results 11 and 13.
[0322] Optionally, the process of the processing device performing the above comparison may be: calculating the absolute error and SAD or SATD between the synthesized prediction result and the image block A.
[0323] Optionally, when determining the second motion offset information of the above-mentioned first image unit, the processing device may also determine the second motion offset information based on the matching cost corresponding to at least one second region of the sub-image unit in the first image unit, that is, the motion information of the second region corresponding to the minimum matching cost among the matching costs corresponding to at least one second region is determined as the second motion offset information of the first image unit.
[0324] Optionally, assuming that the sub-image unit in the above-mentioned first image unit is sub-image block a, the processing device determines appropriate motion offset information from at least one motion offset information of the sub-image block a, and then selects a suitable area from the adjacent areas and neighboring areas corresponding to the sub-processing units in the unit to be processed so that the motion information corresponding to the sampling of the suitable area is used as the second motion offset information of the unit to be processed to perform prediction processing on the sub-processing units in the unit to be processed, thereby improving the prediction accuracy and / or efficiency of video encoding.
[0325] Optionally, the processing device determines appropriate motion offset information from at least one motion offset information, and then selects motion offset information of the same type as the above-mentioned appropriate motion offset information from at least one motion offset information corresponding to the sub-processing unit of the unit to be processed, thereby improving the prediction accuracy and / or efficiency of video encoding.
[0326] Optionally, assuming that sub-image block a includes motion offset information X, motion offset information Y, and motion offset information Z, where motion offset information X corresponds to a motion vector sampled at the center of second region X, motion offset information Y corresponds to a motion vector sampled at the center of second region Y, and motion offset information Z corresponds to a motion vector sampled at the center of second region Z. Thus, if the processing device determines, from among the several pieces of motion offset information for sub-image block a, that motion offset information X is the motion offset information derived with the lowest matching cost, then, when performing prediction processing on a unit to be processed, the processing device may use the motion offset information X' corresponding to the center sample of the second region X' corresponding to the unit to be processed as the motion offset information selected for prediction processing of the unit to be processed. For example, if the motion offset information X determined from at least one piece of motion offset information for sub-image block a is a motion vector of a left adjacent region of sub-image block a, then the motion offset information X' corresponding to the center sample of the second region X' corresponding to the unit to be processed is the motion vector corresponding to the center sample of the left adjacent region of the unit to be processed. If the motion offset information X determined from at least one motion offset information of the sub-image block a is the motion vector of the upper adjacent area of the sub-image block a, then the motion offset information X' corresponding to the center sample of the corresponding second area X' of the unit to be processed is the motion vector of the upper adjacent area of the unit to be processed.
[0327] Optionally, the sub-image block a is a processed sub-image block in the current image, and / or the sub-image block is adjacent to or proximate to the position of the unit to be processed.
[0328] Optionally, when performing prediction processing on the processing unit based on the above process, the processing device first sets the reference image having the smallest image sequence distance with the current image as the co-located image of the current image. Then, the processing device determines a sub-image block a in the current image for deriving motion offset information.
[0329] Optionally, the sub-image block a is located in a processed area of the current image and is not located in the unit to be processed, and / or the size of the sub-image block a is the same as the size of the sub-processing unit in the unit to be processed.
[0330] Optionally, the processing device may determine a sub-image block a in the current image for deriving the motion offset information. Optionally, the processing device may further determine at least one sub-image block a in the current image for deriving the motion offset information.
[0331] Optionally, when the processing device serves as an encoding end device, the processed area is an encoded area, and when the processing device serves as a decoding end, the processed area is a decoded area.
[0332] Optionally, after determining sub-image block a in the current image, the processing device may set at least one second region around the one or more sub-image blocks a. Optionally, the at least one second region is an adjacent or neighboring region of sub-image block a. The processing device then determines at least one first candidate offset from the at least one second region.
[0333] Optionally, the processing device may determine center samples of at least one second region, determine motion vectors used by these center samples, and use these motion vectors as at least one candidate offset when these motion vectors point to the same-position image.
[0334] Optionally, after determining at least one candidate offset, the processing device determines at least one co-located sub-image block a' in the co-located image for each of the at least one candidate offset, based on the position of the sub-image block a. Then, at least one motion vector mva' of the sub-image block a is determined using each of the at least one motion vector colsbmv' of the at least one co-located sub-image block a'. And / or, the at least one motion vector mva' is used to perform inter-frame prediction on the sub-image block a to obtain a prediction result. Thereafter, the processing device compares the difference (such as the SAD or SATD value representing the matching cost) and / or the cost (such as the rate-distortion cost) between the prediction result for the sub-image block a corresponding to each of the at least one candidate offset and the sub-image block a. Thus, the candidate offset type corresponding to the motion vector colsbmv' with the smallest difference and / or cost is selected as the candidate offset type.
[0335] Optionally, after selecting a candidate offset type with the minimum matching cost from at least one candidate offset, the processing device may determine a candidate offset of a subsequent unit to be processed according to the selected candidate offset type for use in predictive processing of the unit to be processed.
[0336] Optionally, the candidate offset selected by the processing device may be used for prediction processing of each sub-processing unit in the unit to be processed.
[0337] Optionally, if the candidate offset selected by the processing device is the motion offset information x corresponding to the second region x, the candidate offset of the unit to be processed may be the motion information of the second region x' corresponding to the unit to be processed and the second region x.
[0338] Optionally, if the second region x is an upper region of the sub-image block a, then the second region x′ corresponding to the second region x is an upper region of the unit to be processed.
[0339] Optionally, if the second region x is the left region of the sub-image block a, then the second region x′ corresponding to the second region x is the left region of the unit to be processed.
[0340] Optionally, the second region x' corresponds to the position of the second region x.
[0341] Optionally, the prediction result obtained in the above process is the best result compared with the prediction results obtained by other prediction methods. The processing device at the encoding end sends at least one flag in the bit stream to instruct the processing device at the decoding end to also use the above process for prediction processing.
[0342] Optionally, as shown in FIG19 , the processing device selects an adjacent / neighboring area in the processed area of the current image as the sub-image block a, the size of which is the same as the size of the sub-processing unit in the unit to be processed.
[0343] Optionally, as shown in FIG20 , the processing device may further select at least one adjacent / neighboring region in the processed region of the current image, the size of which is the same as the size of the sub-processing unit in the unit to be processed, as at least one sub-image block a.
[0344] Optionally, the at least one sub-image block a includes: a sub-image block adjacent to the unit to be processed and a sub-image block not adjacent to the unit to be processed.
[0345] Optionally, the sub-image block a that is not adjacent to the unit to be processed is an image block that is not adjacent to the unit to be processed but is adjacent to it.
[0346] In this embodiment, when a sub-image block adjacent to the unit to be processed is unavailable, the processing device may select a block that is adjacent to but not adjacent to the unit to be processed.
[0347] Optionally, the sub-image block a is: a sub-image block that is not adjacent to the unit to be processed but has image content similar to that of a sub-processing unit in the unit to be processed.
[0348] Optionally, the sub-image block a is: a sub-image block a obtained by intra-block copying the unit to be processed. That is, in this embodiment, the processing device can determine the candidate offset of the current coding unit according to the sub-image block a obtained by intra-block copying.
[0349] Optionally, as shown in FIG21 , the processing device may also select two adjacent regions (adjacent region R1' and adjacent region R2') around sub-image block a as the second region. If the motion vectors corresponding to the center samples of the two adjacent regions both exist and point to the collocated image 1 or collocated image 2 without pointing to other reference images, the processing device can determine that the two adjacent regions are both available. In this way, the processing device uses the two motion vectors corresponding to the two adjacent regions as candidate offset 1 and candidate offset 2. Then, the processing device determines the collocated sub-image blocks a1' to a2' with respect to sub-image block a in the collocated image 1 or collocated image 2 based on the two candidate offsets.
[0350] Optionally, the processing device may also select a non-adjacent but adjacent area as the second area.
[0351] Optionally, as shown in FIG22a , the processing device uses the motion vector of the co-located sub-image block a1′ corresponding to candidate offset 1 as the motion vector of sub-image block a. As shown in FIG22b , the processing device uses the motion vector of the co-located sub-image block a2′ corresponding to candidate offset 2 as the motion vector of sub-image block a. The processing device then uses the sub-block motion vector of sub-image block a shown in FIG22a to perform inter-frame prediction on sub-image block a to obtain a prediction result a1 corresponding to sub-image block a, and compares the prediction result a1 with sub-image block a to obtain a comparison result a1. Similarly, using the sub-block motion vector of sub-image block a shown in FIG22b , the processing device performs inter-frame prediction on sub-image block a to obtain a prediction result a2 corresponding to sub-image block a, and compares the prediction result a2 with sub-image block a to obtain a comparison result a2. Finally, the processing device determines whether to select candidate offset 1 or candidate offset 2 as the optimal candidate offset based on comparison results a1 and a2.
[0352] Optionally, the process of the processing device performing the above comparison may be calculating the absolute difference and SAD or SATD between the synthesized prediction result and the image block A.
[0353] Optionally, when determining the second motion offset information of the above-mentioned first image unit, the processing device can also determine the second motion offset information based on the matching cost derived from at least one second sample of the sub-image block, that is, the motion information of the first sample corresponding to the minimum matching cost among the matching costs corresponding to at least one first sample is determined as the second motion offset information of the first image unit.
[0354] Optionally, the processing device determines appropriate motion offset information from at least one motion offset information of image block A, and then selects a suitable sample from the adjacent samples and neighboring samples corresponding to the sub-processing unit of the unit to be processed, so that the motion offset information corresponding to the suitable sample is used as the motion offset information of the unit to be processed to perform prediction processing on the sub-processing unit in the unit to be processed, thereby improving the prediction accuracy and / or efficiency of video encoding.
[0355] Optionally, the processing device determines appropriate motion offset information from at least one motion offset information, and then selects motion offset information of the same type as the above-mentioned appropriate motion offset information from at least one motion offset information corresponding to the unit to be processed, thereby improving the prediction accuracy and / or efficiency of video encoding.
[0356] Alternatively, assume that image block A includes motion offset information X, motion offset information Y, and motion offset information Z, where motion offset information X corresponds to the motion vector of the second sample X, motion offset information Y corresponds to the motion vector of the second sample Y, and motion offset information Z corresponds to the motion vector of the second sample Z. If the processing device determines, from among the pieces of motion offset information of image block A, that motion offset information X is the motion offset information with the lowest derived matching cost, then when performing prediction processing on the unit to be processed, the processing device may use the motion offset information X corresponding to the second sample X of the unit to be processed as the selected motion offset information.
[0357] Optionally, the image block A is a processed image block in the current image, and / or the image block A is adjacent to or near the position of the current unit to be processed.
[0358] Optionally, during the process of performing prediction processing on the unit to be processed based on the above process, the processing device first sets the reference image having the smallest image sequence distance with the current image as the co-located image of the current image. Then, the processing device determines a sub-image block a in the current image for deriving motion offset information, and sets at least one second sample (at least one second sample is an adjacent or neighboring sample) around one or more sub-image blocks a, thereby determining at least one first candidate offset from the at least one second sample.
[0359] Optionally, the processing device determines at least one second sample and determines motion vectors used by these samples, so that if these motion vectors point to the co-located image, these motion vectors are used as at least one first candidate offset.
[0360] Optionally, after determining at least one candidate offset, the processing device determines at least one co-located sub-image block a' in the co-located image for each of the at least one candidate offset, based on the position of the sub-image block a. Then, at least one motion vector mva' of the sub-image block a is determined using each of the at least one motion vector colsbmv' of the at least one co-located sub-image block a'. And / or, the at least one motion vector mva' is used to perform inter-frame prediction on the sub-image block a to obtain a prediction result. Thereafter, the processing device compares the difference (such as the SAD or SATD value representing the matching cost) and / or the cost (such as the rate-distortion cost) between the prediction result for the sub-image block a corresponding to each of the at least one candidate offset and the sub-image block a. Thus, the candidate offset type corresponding to the motion vector colsbmv' with the smallest difference and / or cost is selected as the candidate offset type.
[0361] Optionally, after selecting a candidate offset type with the minimum matching cost from at least one candidate offset, the processing device may determine a candidate offset of a subsequent unit to be processed according to the selected candidate offset type for use in predictive processing of the unit to be processed.
[0362] Optionally, the candidate offset selected by the processing device may be used for prediction processing of each sub-processing unit in the unit to be processed.
[0363] Optionally, if the candidate offset selected by the processing device is the motion offset information x corresponding to the second region x, the candidate offset of the unit to be processed may be the motion information of the second region x' corresponding to the unit to be processed and the second region x.
[0364] Optionally, if the second region x is an upper region of the sub-image block a, then the second region x′ corresponding to the second region x is an upper region of the unit to be processed.
[0365] Optionally, if the second region x is the left region of the sub-image block a, then the second region x′ corresponding to the second region x is the left region of the unit to be processed.
[0366] Optionally, the second region x' corresponds to the position of the second region x.
[0367] Fifth embodiment
[0368] In this embodiment, the execution subject of the image processing method provided by this application can still be the above-mentioned processing device.
[0369] In this embodiment, optionally, the first image unit is an image unit of the same size as the unit to be processed; and the first sub-image unit is a sub-image unit of the same size as the sub-processing unit. Optionally, the second motion offset information includes motion information of at least one first region and / or at least one first sample of the first image unit or the first sub-image unit. Optionally, the preset flag includes a first value and / or a second value.
[0370] Optionally, when the processing device determines the motion information of the sub-processing unit in the unit to be processed by using the motion vector of the co-located sub-processing unit, assuming that the co-located sub-processing unit is a sub-image block a and the motion vector corresponding to the sub-image block a is colsbmv1, the processing device can calculate and determine the motion vector mv2 of the sub-processing unit of the unit to be processed in the current image according to the following formula (1):
[0371] mv2=t2*colsbmv1 / t1 formula (1)
[0372] Optionally, t1 is the difference between the POCs of the co-located image and the reference image, t2 is the difference between the POCs of the current image and the reference image, and the current image is inter-predicted using information in the reference image.
[0373] Optionally, the processing device may not adopt the unidirectional prediction / bidirectional prediction strategy.
[0374] Optionally, the processing device determines a co-located sub-processing unit of the sub-processing unit in the unit to be processed only according to the candidate offset, and then uses the motion vector of the co-located sub-processing unit as the motion vector of the sub-processing unit.
[0375] Optionally, if the co-located sub-processing unit block adopts unidirectional prediction, the processing device only uses one motion vector as the motion vector of the sub-processing unit in the current image; and / or, if the co-located sub-processing unit adopts bidirectional prediction, the processing device uses both motion vectors as the motion vectors of the sub-processing unit in the current image.
[0376] Optionally, when the processing device adopts the unidirectional prediction / bidirectional prediction selection strategy, it may determine whether to adopt the unidirectional prediction or the bidirectional prediction according to strategy information.
[0377] Alternatively, if the processing device chooses to use unidirectional prediction, then for each co-located sub-processing unit, the processing device selects a motion vector of the co-located sub-processing unit as the motion vector or motion vector candidate for the sub-processing unit in the current image. In this case, if a co-located processing unit uses bidirectional prediction, the processing device may use the motion vector corresponding to co-located image 1 as the motion vector / motion vector candidate for the sub-processing unit in the current image. Optionally, co-located image 1 is located in reference image list 0.
[0378] Alternatively, if the processing device chooses to use bidirectional prediction, then for each co-located sub-processing unit, the processing device selects the two motion vectors of the co-located sub-processing unit as the motion vector / motion vector candidate of the sub-processing unit of the current image. In this case, if a co-located sub-processing unit uses unidirectional prediction, the processing device may use the motion vector corresponding to the unidirectional prediction as one motion vector / motion vector candidate of the sub-processing unit of the current image, and set the other motion vector / motion vector candidate of the sub-processing unit of the current image to a zero vector.
[0379] Optionally, the above-mentioned policy information may be indicated by a flag.
[0380] Optionally, the above-mentioned strategy information can also be determined according to the prediction method adopted by the central sub-block of image block A. Optionally, if the central sub-block of image block A adopts unidirectional prediction, the strategy information indicates that unidirectional prediction is adopted; if the central sub-block of image block A adopts bidirectional prediction, the strategy information indicates that bidirectional prediction is adopted.
[0381] Optionally, the above-mentioned strategy information can also be determined according to the prediction method adopted by the center sample of image block A. Optionally, if the center sample of image block A adopts unidirectional prediction, the strategy information indicates that unidirectional prediction is adopted; if the center sample of image block A adopts bidirectional prediction, the strategy information indicates that bidirectional prediction is adopted.
[0382] Optionally, the above-mentioned strategy information may also be determined based on the prediction method adopted by the edge sub-image block of the image block A. Optionally, if the sub-image block adjacent to the first neighboring region / neighboring sample in the image block A adopts unidirectional prediction, the strategy information indicates that unidirectional prediction is adopted; if the sub-image block adjacent to the first neighboring region / neighboring sample in the image block A adopts bidirectional prediction, the strategy information indicates that bidirectional prediction is adopted.
[0383] 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.
[0384] An embodiment of the present application further provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the image processing method in any of the above embodiments are implemented.
[0385] 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.
[0386] 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 image processing method in the various possible implementation modes described above.
[0387] 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 computer programs from the memory, so that a device equipped with the chip executes the image processing methods in various possible implementations as described above.
[0388] 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.
[0389] 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.
[0390] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0391] The units in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0392] 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.
[0393] 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.
[0394] 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.
[0395] 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, or by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, 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 above, and includes a number of instructions for enabling a processing 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.
[0396] 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)).
[0397] 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, characterized in that: include: Obtaining or determining motion information of a sub-processing unit in the unit to be processed; The brightness / chrominance prediction of the unit to be processed is performed according to the motion information to determine or obtain the prediction result of the unit to be processed.
2. The method according to claim 1, characterized in that The method for obtaining or determining the motion information of the sub-processing unit includes at least one of the following: The first method: obtaining or determining the motion information according to the co-located processing unit of the unit to be processed; The second method: obtaining or determining the motion information according to the co-located sub-processing unit of the sub-processing unit; A third method: obtaining or determining the motion information according to a preset sub-block merging candidate list; Fourth method: obtaining or determining the motion information according to a preset mark; Fifth mode: acquiring or determining the motion information according to the first motion offset information; A sixth method: acquiring or determining the motion information according to second motion offset information of the first image unit or the first sub-image unit in the processed area of the image to be processed; A seventh manner: acquiring or determining the motion information according to a combination of at least one of the second motion offset information; An eighth method: obtaining or determining the motion information according to a motion vector prediction candidate list.
3. The method according to claim 2, characterized in that The second method includes: determining a co-located sub-processing unit according to the third motion offset information and the position information of the sub-processing unit; The motion information of the sub-processing unit is acquired or determined according to the position information of the co-located sub-processing unit and / or the motion information of the center sample of the co-located sub-processing unit.
4. The method according to claim 2, characterized in that The fourth method comprises: If the preset flag is the first value, acquiring or determining the motion information of the sub-processing unit according to the motion information of the co-located sub-processing unit of the sub-processing unit; and / or, If the preset flag is the second value, the motion information of the sub-processing unit is acquired or determined according to the motion information of the center sample of the co-located processing unit of the unit to be processed.
5. The method according to claim 2, characterized in that The fifth method comprises: Acquire or determine first motion offset information according to at least one corresponding first motion information of at least one adjacent region, at least one adjacent region, at least one adjacent sample, or at least one adjacent sample, or acquire or determine first motion offset information according to a motion offset information list; and The motion information of the sub-processing unit is acquired or determined according to the first motion offset information.
6. The method according to claim 5, characterized in that The acquiring or determining the motion information of the sub-processing unit according to the first motion offset information includes: Determine a co-located sub-processing unit according to the position information of the sub-processing unit and the first motion offset information; The motion information of the sub-processing unit is acquired or determined according to the position information and / or motion information of the co-located sub-processing unit.
7. The method according to claim 2, characterized in that The sixth method comprises: The first motion offset information is determined according to the second offset information, and the motion information of the sub-processing unit is acquired or determined according to the first motion offset information.
8. The method according to any one of claims 2 to 7, characterized in that Also includes at least one of the following: The first image unit is an image unit of the same size as the unit to be processed; The first sub-image unit is a sub-image unit having the same size as the sub-processing unit; The second motion offset information includes: motion information of at least one first region and / or at least one first sample of the first image unit or the first sub-image unit; The preset flag includes a first value and / or a second value.
9. A processing device, characterized in that: 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, characterized in that: 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.
Citation Information
Patent Citations
Coding device, decoding device, coding method, and decoding method
CN110692242A
Intra-frame prediction mode coding and decoding method, device and equipment
CN111294602A
Inter-frame prediction method and apparatus
CN112153389A
Coding and decoding method and equipment thereof
CN112584175A
Image processing method, processing equipment and storage medium
CN116095322A
