IMAGE PROCESSING METHOD, PROCESSING DEVICE AND STORAGE MEDIUM
Patent Information
- Application Number
- BR112025021223
- Authority / Receiving Office
- BR · BR
- Patent Type
- Applications
- Publication Date
- 2026-09-08
Smart Images

Figure 00000145_0000 
Figure 00000146_0000 
Figure 00000146_0001
Description
1 / 137 “IMAGE PROCESSING METHOD, PROCESSING DEVICE AND STORAGE MEDIUM Field of Invention
[001] The present invention relates to the technical field of image processing, specifically to an image processing method, a processing device and a storage medium. Fundamentals of the Invention
[002] The video encoding technology proposed by existing video encoding standards aims to improve encoding performance without significantly increasing computational complexity. Specifically, during video encoding and decoding, each frame is divided into different blocks, followed by prediction, transformation, and quantization processing, as well as entropy encoding or decoding processing.
[003] During the design and implementation process of this application, the inventors discovered at least the following problems:
[004] When performing image block prediction in the image block prediction step, the prediction mode used can be determined by deduction at the end of decoding. Since the accuracy of the probability estimate of each prediction mode, by deriving the prediction mode at the end of decoding, is not high, the prediction effect of the prediction mode determined in this way is low. Therefore, it is necessary to improve the accuracy of the derivation of prediction models during video encoding and decoding. Petition 870250089576, dated 10 / 01 / 2025, page 6 / 161 2 / 137
[005] The preceding descriptions are intended to provide general context and do not necessarily constitute known techniques. Description of the Invention
[006] In response to the above technical problems, the present application provides an image processing method, a processing device and a storage medium, aiming to solve the technical problem of how to improve the accuracy of predictive model derivation during video encoding and decoding.
[007] The present invention provides an image processing method, which can be applied to a processing device, comprising the steps of:
[008] Determine or obtain at least one reference image region according to information from the current block image block, S10;
[009] Determine or obtain a prediction mode of the current block according to at least one reference image region, S20.
[010] Preferably, stage S10 comprises at least one of the following:
[011] Determine or obtain at least one reference image region according to at least one of the following: width, height, block size, block area, image block attribute and image block type of a current block;
[012] Based on information from at least one of the following image blocks corresponding to the current block: neighboring blocks, non-neighboring blocks, homologous blocks, temporal blocks, and standard blocks, at least one is determined or obtained. Petition 870250089576, dated 10 / 01 / 2025, page 7 / 161 3 / 137 a reference image region;
[013] Determine or obtain at least one reference image region of a second component image block of the current block according to information from the image block of the first component image block of the current block;
[014] Based on information from the candidate block image block, determined or obtained from the candidate motion vector or the candidate block vector of the current block, at least one reference image region is determined or obtained;
[015] If the current block satisfies the first condition, determine or obtain at least one reference image region according to a first calculation strategy;
[016] If the current block does not meet the first condition, at least one reference image region will be determined or obtained according to a second calculation strategy.
[017] Preferably, the second calculation strategy is different from the first calculation strategy.
[018] Preferably, the current block meets a first condition, comprising at least one of the following:
[019] The current block width is greater than or equal to a first predefined width limit;
[020] The height of the current block is greater than or equal to a first predefined height limit;
[021] The area of the current block is greater than or equal to a first predefined area limit.
[022] Preferably, stage S20 comprises the following stages:
[023] S21, determine or obtain a first Petition 870250089576, dated 10 / 01 / 2025, page 8 / 161 4 / 137 probability of occurrence of at least one prediction mode based on pixels, image blocks, or image regions in at least one reference image region;
[024] S22: Determine or obtain a prediction mode of the current block according to at least a first probability of occurrence.
[025] Preferably, stage S21 comprises at least one of the following:
[026] Determine or obtain a first magnitude value and a second magnitude value in the same prediction direction based on pixels, image blocks or image regions in at least one reference image region, and determine or obtain a first probability of occurrence based on the first magnitude value and the second magnitude value in the same prediction direction;
[027] Determine or obtain at least one first magnitude value based on pixels, image blocks or image regions in at least one reference image region, and determine or obtain a first probability of occurrence based on the first magnitude value and a scale weighting factor;
[028] Determine or obtain a first probability of occurrence of a prediction direction of at least one prediction mode according to a gradient magnitude value and a gradient direction of a pixel in at least one reference image region;
[029] To determine or obtain a first probability of occurrence of a forecast direction of at least one forecast mode based on a forecast mode corresponding to a Petition 870250089576, dated 10 / 01 / 2025, page 9 / 161 5 / 137 image block or an image region in at least one reference image region and an area of the image block or image region;
[030] To determine or obtain a first-occurrence probability based on at least one position, horizontal distance, vertical distance, and shortest distance between a pixel, an image block, or an image region in at least one reference image region and the current block;
[031] Determine or obtain a first occurrence probability according to a pixel type, an image block type, and an image region type;
[032] If the syntax elements obtained in the code flow meet the second condition, the first probability of occurrence will be determined or obtained based on the first probability of occurrence calculation strategy and on the pixels, image blocks, or image areas in at least one reference image area. If the syntax elements obtained in the code flow do not meet the second condition, the first probability of occurrence will be determined or obtained based on a second probability of occurrence calculation strategy different from the first probability of occurrence calculation strategy and on the pixels, image blocks, or image areas in at least one reference image area.
[033] Preferably, step S22 comprises at least one of the following:
[034] Determine a second probability of occurrence based on the first probability of occurrence and the scale weighting factor, and determine or obtain a prediction method. Petition 870250089576, dated 10 / 01 / 2025, page 10 / 161 6 / 137 for the current block according to the second probability of occurrence;
[035] To determine or obtain a prediction method for a current block according to a first probability of occurrence and a third probability of occurrence of the same prediction direction;
[036] A scale weighting factor of the first probability of occurrence is determined according to the fourth probability of occurrence, and a prediction mode of the current block is determined according to the first probability of occurrence and the scale weighting factor.
[037] Preferably, the scale weighting factor is determined or obtained by at least one of the following:
[038] Determine or obtain a scale weighting factor based on a position between at least one pixel in at least one reference image region, an image block and an image region and the current block;
[039] Determine or obtain a scale weighting factor based on at least one of a first image region, a first image block, and a first pixel that is adjacent and / or non-adjacent to at least one of a pixel, an image block, and an image region in at least one reference image region;
[040] Determine or obtain a scale weighting factor according to an image region type of at least one image region and / or an image block type of at least one image block and / or a pixel type of at least one pixel;
[041] Determine or obtain a scale weighting factor based on a horizontal distance, a vertical distance and / or Petition 870250089576, dated 10 / 01 / 2025, page 11 / 161 7 / 137 a shorter distance between at least one pixel, an image block, and an image region in at least one reference image region and the current block;
[042] If the syntax element obtained in the bitstream meets the third condition, the scale weighting factor will be determined or obtained using the first scale weighting factor calculation strategy; if the syntax element obtained in the bitstream meets the fourth condition, the scale weighting factor will be determined or obtained using a second scale weighting factor calculation strategy different from the first scale weighting factor calculation strategy.
[043] Preferably, the image processing method also comprises at least one of the following:
[044] Determine or obtain at least two different probabilities of occurrence based on at least one of the pixel gradients in different reference image regions, image blocks or areas of image regions, and determine or obtain a prediction mode for a current block based on the at least two different probabilities of occurrence;
[045] The reference image region comprises at least one region of the left image located on the left side of the current block and one region of the top image located above the current block;
[046] The prediction mode of the current block is determined or obtained according to the maximum probability of occurrence of at least one first probability of occurrence.
[047] The present application also provides an image processing device, comprising: Petition 870250089576, dated 10 / 01 / 2025, page 12 / 161 8 / 137
[048] The processing module is configured to determine or obtain at least one reference image region according to the image block information of the current block; and to determine or obtain a prediction mode of the current block according to at least one reference image region.
[049] The present application also provides a processing device comprising: a memory and a processor, in which an image processing program is stored in memory and, when the image processing program is executed by the processor, the steps of any of the image processing methods mentioned above are implemented.
[050] The present application also provides a storage medium that stores a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the image processing methods mentioned above.
[051] As described above, the processing method of the present application can be applied to a processing device, comprising: determining or obtaining at least one reference image area based on the image block information of the current block and determining or obtaining a prediction mode of the current block based on at least one reference image area. Through the present technical scheme, during the prediction phase in video encoding and / or decoding, as in intra-frame prediction, it is possible to determine the prediction mode directly based on at least one reference image region obtained from the image information of the current block. In this way, the relationship between Petition 870250089576, dated 10 / 01 / 2025, page 13 / 161 9 / 137 the reference image region and the current block, making the determined prediction mode more accurate, i.e., improving the accuracy of the prediction mode inference during video encoding and / or decoding, thus increasing the effectiveness of the prediction applied to the current block, such as increasing the prediction accuracy, and consequently improving the efficiency of the prediction in the video encoding and / or decoding process. Brief Description of the Drawings
[052] The figures included in this document are incorporated into the description and form an integral part thereof, illustrating examples of embodiments of the present invention, and are used together with the description to explain the principles of the present application. To explain more clearly the technical scheme of the embodiments of the present invention, a brief introduction of the figures necessary for the description of the embodiments is presented below. It is evident that, for those skilled in the art, without the need for additional creative work, other figures can also be derived from these. Figure 1 is a schematic diagram of the hardware structure of a mobile terminal for implementing various modes of realization of the present application; Figure 2 is a diagram of a communication network system architecture provided by one embodiment of the present application; Figure 3 is a schematic diagram of the hardware structure of a 140 controller provided in this application; Figure 4 is a schematic diagram of the structure of Petition 870250089576, dated 10 / 01 / 2025, page 14 / 161 10 / 137 network node hardware 150 provided in this application; Figure 5 is a schematic flowchart of an image processing method according to the first embodiment; Figure 6 is a schematic diagram of an encoder encoding process in an image processing method according to the first embodiment; Figure 7 is a schematic diagram of a decoding process of a decoder in an image processing method according to the first embodiment; Figure 8 is a schematic diagram of a DIMD model in an image processing method according to a second embodiment; Figure 9 is a schematic diagram of a gradient magnitude in an image processing method according to a second embodiment; Figure 10 is a schematic diagram of a coded area corresponding to a block to be predicted in an image processing method according to a second embodiment; Figure 11 is a schematic diagram of a decoded area corresponding to a block to be predicted in an image processing method according to a second embodiment; Figure 12 is a schematic diagram of an expanded DIMD model in an image processing method according to a second embodiment; Figure 13 is a schematic diagram illustrating an image region being divided into image sub-regions in a Petition 870250089576, dated 10 / 01 / 2025, page 15 / 161 11 / 137 image processing method according to a third embodiment; Figure 14 is a schematic diagram of an image subregion in an image processing method according to a third embodiment; Figure 15 is a schematic diagram of pixels and adjacent pixels in an image processing method according to a third embodiment; Figure 16 is a schematic diagram of a coding block and adjacent coding blocks in an image processing method according to a third embodiment; Figure 17 is a schematic diagram illustrating the distance between a pixel and an actual block in an image processing method according to a third embodiment; Figure 18 is a module diagram of a processing module in an image processing device. The achievement of the objectives, functional characteristics, and advantages of this application will be explained in more detail in conjunction with the embodiments and with reference to the accompanying drawings. The drawings above show the specific embodiments of the present application, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the present invention in any way, but rather to explain the concept of the present invention to those skilled in the art, referring to the specific embodiments. Description of Embodiments of the Invention Petition 870250089576, dated 10 / 01 / 2025, p. 16 / 161 12 / 137
[053] Detailed reference will now be made to examples of embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The embodiments described in the following implementation examples do not represent all embodiments consistent with the present application. Instead, they are merely examples of apparatus and methods consistent with some aspects of the application, as set forth in the accompanying claims.
[054] It should be clarified that, in this document, the terms 'comprise', 'include' or any other variations thereof are intended to encompass non-exclusive inclusions, so that a process, method, article or device comprising a series of elements is not limited only to those elements, but also includes other elements not explicitly listed, as well as elements inherent to such process, method, article or device. In the absence of other restrictions, the elements defined by the phrase comprising a... do not exclude the existence of other identical elements in the process, method, article or device comprising the element. Furthermore, parts, features and elements with the same name in different embodiments of the present invention may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or combined with the context of the specific embodiment.
[055] It should be understood that, although the terms first, Petition 870250089576, dated 10 / 01 / 2025, p. 17 / 161 13 / 137 second, third, etc. may be used in this document to describe various pieces of information; information should not be limited to such terms. These terms are used only to distinguish information of the same type from one another. For example, the first piece of information may also be called the second piece of information, and similarly, the second piece of information may also be called the first piece of information, without departing from the scope of this document. Depending on the context, the term 'if', as used in this document, may be interpreted as 'at the time when...', 'when...', or 'in response to a determination'. Furthermore, as used in this document, the singular forms a, an, and the should also include the plural forms, unless the context indicates otherwise.It should also be understood that the terms 'understand' and 'include' indicate the presence of the characteristics, steps, operations, elements, components, items, types, and / or groups mentioned, but do not exclude the presence, occurrence, or addition of one or more other characteristics, steps, operations, elements, components, items, types, and / or groups. The terms or, and / or, comprising at least one of the following, etc., used in this application may be interpreted as inclusive or meaning any one or any combination thereof. 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 occurs only when a combination of elements, functions, steps, or operations are inherently mutually exclusive of one another. Petition 870250089576, dated 10 / 01 / 2025, page 18 / 161 14 / 137 way.
[056] It should be understood that, although the steps in the flowchart in the implementation modes of this application are presented sequentially, as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict restriction on the order in which these steps are executed, and they may be executed in other orders. Furthermore, at least some of the steps in the Figure may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The order of execution is not necessarily sequential, but may be executed sequentially or alternately with other steps or at least some of the sub-steps or stages of other steps.
[057] Depending on the context, the terms 'if' or 'in case', as used in this document, may be interpreted as 'when', 'at the time when', 'in response to a determination' or 'in response to a detection'. Similarly, depending on the context, the phrases “if determined” or “if (stated condition or event) is detected” may be interpreted as “when determined” or “in response to the determination” or “upon detecting (stated condition or event)” or “in response to the detection (stated condition or event)”.
[058] It is worth noting that, in this document, step codes such as S10 and S20 are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation to the order. When implementing the step, subject matter experts may first execute S20 and Petition 870250089576, dated 10 / 01 / 2025, p. 19 / 161 15 / 137 after S10, etc., but all must be within the scope of protection of this application.
[059] It should be understood that the specific embodiments described in this document are used only to explain the present application and are not intended to limit the present application.
[060] In the following description, the use of suffixes such as module, part, or unit to refer to elements is merely to facilitate the description of the present application and has no specific meaning in itself. Therefore, the terms module, component, or unit may be used interchangeably.
[061] The processing device in this application can be a smart terminal or a server, etc. The smart terminal can be implemented in various forms. For example, the smart terminals described in this application may include smart terminals such as mobile phones, tablets, laptops, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and notebooks.
[062] The following description will be made using a mobile terminal as an example. Those skilled in the art will understand that, in addition to the components specifically used for mobile purposes, the configuration according to the embodiments of the present application can also be applied to fixed-type terminals.
[063] As shown in Figure 1, which is a schematic diagram of the hardware structure of a mobile terminal to implement Petition 870250089576, dated 10 / 01 / 2025, page 20 / 161 16 / 137 various embodiments of the present application. The mobile terminal 100 may include: RF (radio frequency) unit 101, WiFi module 102, audio output unit 103, A / V (audio / video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110 and power supply 111, among other components. Those skilled in the art will understand that the structure of the mobile terminal shown in Figure 1 does not constitute a limitation to the mobile terminal. The mobile terminal may include more or fewer components than those shown in the Figure, or combine certain components, or arrange the components differently.
[064] Next, a detailed introduction to the various components of the mobile terminal together with Figure 1:
[065] Radio frequency unit 101 can be used for receiving and transmitting signals during information exchange or during a call. Specifically, after receiving downlink information from the base station, it is provided to processor 110 for processing; additionally, uplink data is sent to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, among others. In addition, radio frequency unit 101 can also communicate with the network and other devices via wireless communication. The wireless communications mentioned above can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile Communications), GPRS. Petition 870250089576, dated 10 / 01 / 2025, page 21 / 161 17 / 137 (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing - Long-Term Evolution), TDD-LTE (Time Division Duplexing - Long-Term Evolution), 5G and 6G, etc.
[066] Wi-Fi is a short-range wireless transmission technology. The mobile terminal can help users send and receive emails, browse web pages, and access streaming media through the Wi-Fi 102 module, providing users with wireless broadband internet access. Although Figure 1 shows a Wi-Fi 102 module, it is understood that it is not an essential component of the mobile terminal and can be omitted as needed without altering the essence of the invention.
[067] The audio output unit 103 can convert audio data received by the RF unit 101 or the WiFi module 102 or stored in memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal receiving mode, a conversation mode, a recording mode, a voice recognition mode, a transmission receiving mode, etc. In addition, the audio output unit 103 can also provide audio outputs related to a specific function performed by the mobile terminal 100 (e.g., a call signal receiving sound, a message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
[068] The A / V 104 input unit is used to receive audio or video signals. The A / V 104 input unit Petition 870250089576, dated 10 / 01 / 2025, page 22 / 161 18 / 137 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data from a still image or video obtained by an image capture device (e.g., a camera) in a video capture mode or an image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the graphics processor 1041 can be stored in memory 109 (or other storage medium) or transmitted by the RF unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in an operating mode, such as phone call mode, recording mode, voice recognition mode, and can process this sound into audio data.The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in a telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the process of receiving and transmitting audio signals.
[069] The mobile terminal 100 also comprises at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Preferably, the light sensor comprises an ambient light sensor and a proximity sensor. Preferably, the ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light intensity, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 Petition 870250089576, dated 10 / 01 / 2025, page 23 / 161 19 / 137 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes) and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the phone's posture (such as switching screens between landscape and portrait, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, touch), etc.; as for other sensors that can be configured in cell phones, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated in this document.
[070] Display unit 106 is used to display information entered by the user or information provided to the user. 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 similar.
[071] The user input unit 107 can be used to receive input numbers or character information and generate key signal inputs related to user settings and mobile terminal function control. Preferably, the user input unit 107 may include a touch panel 1071 and another input device 1072. The touch panel 1071, also known as a touch screen, can collect touch operations from the user or nearby (e.g., operations performed by the user using a finger, stylus, or any other object or accessory). Petition 870250089576, dated 10 / 01 / 2025, page 24 / 161 20 / 137 suitable on the 1071 touch panel (or nearby) and trigger the corresponding connected device according to a predefined program. The 1071 touch panel may include two parts: a touch detection device and a touch controller. Preferably, the touch detection device detects the direction of the user's touch, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor. 110, capable of receiving commands sent by processor 110 and executing them. Furthermore, 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 also include other input devices 1072. Preferably, other input devices 1072 may include, without limitation, one or more of the following: physical keyboard, function keys (such as volume control keys, power button, etc.), command ball, mouse, controller, among others, the present description not being limited to such examples.
[072] Preferably, the touch panel 1071 may encompass the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits to the processor 110 to determine the type of touch event. The processor 110 then provides the corresponding visual output on the display panel 1061 according to the type of touch event. Although in Figure 1, the touch panel 1071 and the display panel 1061 are two independent components. Petition 870250089576, dated 10 / 01 / 2025, page 25 / 161 21 / 137 to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to implement the input and output functions of the mobile terminal, which is not limited in this document.
[073] 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 headphone jack, an external power supply (or battery charger) input, a wired or wireless data input, a memory card input, an input for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O input, a headphone jack, and the like. Interface unit 108 can 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 it can be used to transmit data between the mobile terminal 100 and an external device.
[074] 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. Preferably, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone. Petition 870250089576, dated 10 / 01 / 2025, page 26 / 161 22 / 137 (such as audio data, a phone book, etc.), etc. In addition, memory 109 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, a flash memory device, or another volatile solid-state storage device.
[075] Processor 110 is the control center of the mobile terminal. It uses various interfaces and lines to connect different parts of the entire mobile terminal. By executing software programs and / or modules stored in memory 109 and accessing data stored in memory 109, it performs various functions of the mobile terminal and processes data, thus monitoring the mobile terminal as a whole. Processor 110 may include one or more processing units; preferably, processor 110 may integrate an application processor and a modem processor. Preferably, the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the aforementioned modem processor cannot be integrated into processor 110.
[076] The mobile terminal 100 may also include a power supply 111 (such as a battery) to provide power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, thus enabling the power management system to manage charging, discharging and power consumption.
[077] Although not shown in Figure 1, the mobile terminal Petition 870250089576, dated 10 / 01 / 2025, page 27 / 161 23 / 137 100 may also include a Bluetooth module, etc., which will not be described in detail in this document.
[078] To facilitate understanding of how this application is implemented, the communication network system on which the mobile terminal of this application is based is described below.
[079] As shown in Figure 2, an architecture diagram of the communication network system provided in one embodiment of the present application. The communication network system is a universal mobile communication technology LTE system. The LTE system comprises a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203 and an operator IP service 204, which are connected sequentially.
[080] Preferably, UE201 may be the terminal 100 mentioned above, which will not be described in detail in this document.
[081] E-UTRAN 202 comprises an eNodeB 2021 and other eNodeBs 2022. Preferably, the eNodeB 2021 can be connected to other eNodeBs 2022 via a backhaul (e.g., an X2 interface). The eNodeB 2021 is connected to the EPC 203, and the eNodeB 2021 can provide UE 201 access to the EPC 203.
[082] The EPC 203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, a SGW (Service Gateway) 2034, a PGW (PDN Gateway) 2035, and a PCRF (Policy and Billing Rules Function) 2036, etc. Preferably, the MME 2031 is a control node that processes signaling between the UE 201 and the EPC 203 and provides carrier management and Petition 870250089576, dated 10 / 01 / 2025, page 28 / 161 24 / 137 connection. The HSS 2032 provides loggers to manage functions such as the residential location logger (not shown) and stores user-specific information such as service resources and data rates. All user data can be sent through the SGW2034. The PGW2035 can provide IP address allocation and other functions for the UE 201. The PCRF2036 is the policy and billing control decision point for service data flows and IP carrier resources. It selects and provides the policy and billing control decisions available to the policy and billing enforcement function unit (not shown in the Figure).
[083] The IP 204 service may include the Internet, an intranet, an IMS (IP Multimedia Subsystem) or other IP services.
[084] Although the above introduction uses the LTE system as an example, experts in the field should know that this application does not apply only to the LTE system, but also 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 to this document.
[085] Figure 3 is a schematic diagram of the hardware structure of a 140 controller provided in this application. The 140 controller comprises: a 1401 memory and a 1402 processor. The 1401 memory is used to store program instructions, and the 1402 processor is used to call the program instructions in the 1401 memory to execute the steps executable by the controller in the first embodiment of the method above. Its implementation principles and beneficial effects are similar and will not be repeated in this application. Petition 870250089576, dated 10 / 01 / 2025, page 29 / 161 25 / 137 document.
[086] Preferably, the controller further comprises a communication interface 1403, which can be connected to the processor 1402 via a bus 1404. The processor 1402 can control the communication interface 1403 to implement the receive and send functions of the controller 140.
[087] Figure 4 is a schematic diagram of the hardware structure of a network node 150 provided in this application. Network node 150 comprises: a memory 1501 and a processor 1502. Memory 1501 is used to store program instructions, and processor 1502 is used to call the program instructions in memory 1501 to execute the steps executable by the first node in the first embodiment of the method above. Their implementation principles and beneficial effects are similar and will not be repeated in this document.
[088] Preferably, the controller further comprises a communication interface 1503, which can be connected to the processor 1502 via a bus 1504. The processor 1502 can control the communication interface 1503 to implement the network node 150's receive and send functions.
[089] The aforementioned integrated modules, implemented in the form of functional software modules, can be stored on a computer-readable storage medium. The aforementioned software function module is stored on a storage medium, comprising a series of instructions to enable a computer device (which may be a personal computer, server, or network device, Petition 870250089576, dated 10 / 01 / 2025, page 30 / 161 26 / 137 etc.) or a processor to execute some steps of the methods of each embodiment of the present application.
[090] In the above embodiments, all or part of them may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the implementation may be in the form of a computer program product. A computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a storage medium or transmitted from one storage medium to another.For example, computer instructions can be transmitted from one site, computer, server, or data center to another site, computer, server, or data center via wired networks (e.g., coaxial cable, fiber optics, digital subscriber line (DSL)) or wireless networks (e.g., infrared, wireless, microwave, etc.). Storage media can be any available medium that can be accessed by a computer or a data storage device, such as a server or data center, that includes one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives, SSDs). Petition 870250089576, dated 10 / 01 / 2025, page 31 / 161 27 / 137
[091] Based on the mobile terminal hardware structure and the communication network system mentioned above, several ways of implementing this application are proposed. First Example of Implementation Mode
[092] With reference to Figure 5, which is a flow diagram of the image processing method illustrated according to the First Embodiment Example, the image processing method of the present embodiment example can be applied to a processing device, comprising steps S10 and S20:
[093] S10, Determine or obtain at least one reference image region according to information from the current block image block;
[094] S20: Determine or obtain a prediction mode of the current block according to at least one reference image region.
[095] In this embodiment, the processing device can be an intelligent terminal, such as a mobile phone, a computer, etc., or a server, such as a local server or a cloud server. In this embodiment and in this application, the processing device is described primarily as an intelligent terminal by way of example.
[096] Preferably, the technical solution of this embodiment can be applied to the fields of image encoding and decoding, video encoding and decoding, hardware video encoding and decoding, dedicated circuit video encoding and decoding, real-time video encoding and decoding, and so on. Petition 870250089576, dated 10 / 01 / 2025, page 32 / 161 28 / 137
[097] Preferably, the processing device can obtain video image data from a video source, segment each frame of the video image data to obtain a plurality of image blocks, and determine an image block to be predicted from among the plurality of image blocks as the current block.
[098] Preferably, the current block can be an image block to be provided in an encoder and / or a decoder.
[099] Preferably, the image block information may include at least one block size, one block area, one image block attribute, and one image block type of the image block used to determine the intra-frame prediction mode or the inter-frame prediction mode.
[100] Preferably, the image block information may also include information relating to the pixels in the image block (e.g., pixel positions, pixel color information (luminance information or chrominance information)).
[101] Preferably, the image block used to determine the intra-frame or inter-frame prediction mode can be an already reconstructed or previously predicted image block. The pixels used to determine the intra-frame or inter-frame prediction mode can be reconstructed or predicted pixels.
[102] Preferably, the block size is the image block area, which is the product of the length and width.
[103] Preferably, the image block attribute may include an image block position or characteristic. Petition 870250089576, dated 10 / 01 / 2025, page 33 / 161 29 / 137 image.
[104] Preferably, the image resource may include image texture.
[105] Preferably, the image block type can be a natural image, a screen content image, or something similar.
[106] Preferably, the reference image area can be an image area used to determine the prediction mode of the current block and can be an image area adjacent or non-adjacent to the current block.
[107] Preferably, the reference image region may include at least one pixel, one image block and an image region used to determine the prediction mode.
[108] Preferably, the forecasting mode can be an intra-frame forecasting mode, such as, for example, an angular forecasting mode.
[109] Preferably, the prediction mode can also be an intra-frame prediction mode, such as an affine motion mode or a sub-block based temporal MV prediction (SbTMVP). Merge mode, Skip mode.
[110] Preferably, when the processing device is an encoder on the encoding side, with reference to Figure 6, the encoder receives input video data from a video source, for example, the encoder receives video images from the video source, determines the image to be predicted in the video, divides the image to be predicted into multiple image blocks (including luminance and chrominance blocks), and uses the temporal and / or spatial correlation between the video images to perform prediction processing on each one. Petition 870250089576, dated 10 / 01 / 2025, page 34 / 161 30 / 137 of the multiple image blocks. Prediction processing includes intra-frame and / or inter-frame prediction processing, and intra-frame and / or inter-frame prediction processing comprises multiple prediction modes. For these prediction modes, the encoder uses, for example, rate-distance optimization to determine the final prediction mode adopted in each of the multiple image blocks; for example, by calculating the rate-distance cost corresponding to each prediction mode or by combining several prediction modes to calculate the rate-distance cost, in order to determine the lowest rate-distance cost among multiple costs, with the prediction mode or combination of prediction modes corresponding to the lowest rate-distance cost being the final prediction mode adopted by the image block.
[111] Preferably, these prediction modes include intra-frame and inter-frame prediction modes: the intra-frame prediction mode can be determined according to the present embodiment, for example, by means of the enhanced DIMD (Decoder-side intramode derivation) mode or the enhanced OBIC mode; the inter-frame prediction mode can also be determined according to the present embodiment.
[112] Preferably, the basic principle of the enhanced DIMD mode may be to analyze the magnitude and direction of the gradient of adjacent pixels, and the basic principle of the enhanced OBIC is to derive the prediction mode of the current block by analyzing the use of the intraframe prediction mode of adjacent image blocks / non-adjacent image blocks. As the enhanced OBIC is also a derivation of the intraframe mode on the decoding side, the enhanced OBIC is a special DIMD. Petition 870250089576, dated 10 / 01 / 2025, page 35 / 161 31 / 137
[113] Next, the encoder uses the determined intra-frame or inter-frame prediction mode to predict the pixel values of the image to be predicted.
[114] Preferably, enhanced DIMD mode can be achieved by performing steps S10 and S20.
[115] Preferably, the enhanced OBIC mode can be achieved by running steps S10 and S20.
[116] Preferably, the derivation of the prediction mode between frames on the decoding side according to the embodiment of the present application can be implemented by executing step S10 and step S20.
[117] Preferably, the derivation of the event-based frame encoding mode according to the implementation method of the present application can be implemented by executing steps S10 and S20.
[118] Preferably, after the prediction mode of the image block to be predicted (i.e., the current block) is determined based on steps S10 and S20, the determined prediction mode can be used to obtain the pixel values of all pixels to be predicted, and the pixel values of the pixel samples in the original image block corresponding to the image block to be predicted are subtracted from the predicted values of the corresponding pixel samples in the prediction block to obtain the residual values of the pixel samples and the residual block corresponding to the original image block. Then, the residual block undergoes transformation and quantization, and is subsequently encoded by the entropy encoder. Finally, an encoded bitstream is formed. In addition, the encoded bitstream may also include parameters of Petition 870250089576, dated 10 / 01 / 2025, page 36 / 161 32 / 137 forecast corresponding to the determined forecasting mode and related secondary information.
[119] Preferably, the prediction parameters are entropy encoded and then packed into the encoded bitstream.
[120] Preferably, relevant auxiliary information may include information indicating the intra-frame mode derivation at the decoding end or the intra-frame encoding mode derivation based on the event in this embodiment mode.
[121] Preferably, the related auxiliary information may include information indicating the decoder-side inter-frame mode derivation or the event-based inter-frame encoding mode derivation, as in the present embodiment.
[122] Preferably, the transformed and quantized residual block will be added to the corresponding prediction data (as the prediction block) obtained using the prediction mode after inverse quantization and inverse transformation to obtain a reconstructed block. After obtaining the reconstructed block, the loop filtering module performs loop filtering on the reconstructed block according to the filter control data to reduce distortion. After the loop filtering process is executed, the reconstructed block after the loop filtering process is stored according to the encoded image buffer.
[123] Preferably, the transformed and quantized residual block is added to the corresponding prediction block obtained using the prediction mode to obtain a block Petition 870250089576, dated 10 / 01 / 2025, page 37 / 161 33 / 137 is rebuilt, and then the rebuilt block is subjected to loop filtering to reduce distortion.
[124] Preferably, when the processing device is a decoder on the decoding side, with reference to Figure 7, after the decoder receives the encoded bitstream, the decoder's entropy decoding unit analyzes and decodes the encoded bitstream to obtain transformation coefficients. The decoder's inverse transformation unit and inverse quantization unit perform inverse transformation and inverse quantization on the transformation coefficients to obtain a residual block. Preferably, the decoder's entropy decoding unit analyzes and decodes the encoded bitstream to obtain prediction data, such as prediction parameters and related auxiliary information. The decoder's prediction processing unit performs prediction processing using prediction parameters, thus determining a prediction block corresponding to the residual block.Preferably, prediction processing includes intra-frame and / or inter-frame prediction processing, with intra-frame and / or inter-frame processing comprising one or a combination of multiple prediction modes. When auxiliary information indicates enhanced DIMD mode, OBIC mode, decoder-side inter-frame derivation mode, or event-based inter-frame encoding derivation mode, the prediction mode corresponding to the residual block can be determined according to steps S10 and S20 mentioned above.
[125] Preferably, after the block prediction mode Petition 870250089576, dated 10 / 01 / 2025, page 38 / 161 34 / 137 of the image to be predicted (i.e., the current block) is determined based on steps S10 and S20. The pixel values of all pixels to be predicted can be acquired using the determined prediction mode. After all pixel samples in the image block to be predicted are determined, a prediction result for the image block to be predicted is obtained.
[126] Preferably, the residual block obtained and the corresponding prediction block (comprising the predicted luminance block and the predicted chrominance block) are added together to obtain a reconstructed block. The loop filtering unit in the decoder performs loop filtering on the reconstructed block according to the filter control data to reduce distortion and improve video quality. The reconstructed block after loop filtering is subsequently combined into a decoded image and stored in a decoded image buffer or output as decoded video data.
[127] Preferably, this method of implementation can determine the forecasting mode of the current block for at least four scenarios.
[128] Preferably, in DIMD mode, at least one reference image region can be determined or obtained based on the image block information of the current block, and the prediction mode of the current block can be determined or obtained based on at least one reference image region.
[129] Preferably, in OBIC mode, at least one reference image region can be determined or obtained based on the image block information of the current block, and the prediction mode of the current block can be determined or obtained based on at least one reference image region. Petition 870250089576, dated 10 / 01 / 2025, page 39 / 161 35 / 137
[130] Preferably, in the derivation mode between modes at the decoding end, at least one reference image region can be determined or obtained based on the image block information of the current block, and the prediction mode of the current block can be determined or obtained based on at least one reference image region.
[131] Preferably, in event-based frame-based encoding mode derivation, at least one reference image region can be determined or obtained based on the current block image block information, and the current block prediction mode can be determined or obtained based on at least one reference image region.
[132] In the context of this application, examples are given using intra-frame derivation modes (DIMD mode, OBIC mode), but the technical solutions mentioned in this application can also be applied to inter-frame derivation modes (e.g., inter-frame derivation mode on the decoder side, event-based inter-frame encoding mode derivation).
[133] Preferably, the processing device can first determine the image block information of the current block and select a reference image area based on that information. For example, when the image block information meets certain conditions, an image area, image block, or pixel adjacent to the current block is selected, and the selected image area adjacent to the current block is used as the reference image area, or the image area where the image block adjacent to the current block is located is used as the reference image area. Or Petition 870250089576, dated 10 / 01 / 2025, page 40 / 161 36 / 137 The area of the image where the pixels adjacent to the current block are located is used as the reference image area.
[134] Preferably, after determining at least one reference image region, a prediction mode associated with at least one reference image region, such as an angle prediction mode, can be determined, and at least one prediction mode can be selected as the prediction mode of the current block. The prediction mode associated with at least one reference image area can be the prediction mode used by the reference image area, the prediction mode used by the image block in the reference image area, the prediction mode used by the pixel in the reference image area, etc., which is not limited in this document.
[135] Preferably, the basic principle of the enhanced DIMD mode may consist of deriving the intra-frame prediction mode of the current block by analyzing the magnitude and direction of the gradient of adjacent pixels or by using intra-frame prediction modes of adjacent and non-adjacent image blocks. The specific implementation process may include determining the gradient magnitude value and gradient direction of pixels in the DIMD model, determining the gradient histogram or statistical results of the DIMD model with respect to the intra-frame prediction direction, and determining the intra-frame prediction direction of the block to be predicted based on the gradient histogram.
[136] For example, as shown in Figure 8, a DIMD model adjacent to the block to be predicted is determined above and to the left of the block to be predicted (i.e., the current block). For example, the three lines to the left and above Petition 870250089576, dated 10 / 01 / 2025, p. 41 / 161 37 / 137 of the block to be planned are composed of several image blocks. The pixel in the pixel row located in the middle of the three rows (e.g., pixel x4) is considered the pixel for calculating the gradient. By calculating the gradient direction of multiple pixels in the pixel row, as well as the magnitude of the horizontal and vertical gradients, the gradient directions of multiple pixels and the gradient magnitude values corresponding to the gradients can be obtained. The gradient magnitude value is the sum of the absolute values of the horizontal and vertical gradient magnitudes. If the gradient magnitude values of several pixels with the same gradient direction are summed, the sum of the gradient magnitude values corresponding to the gradient direction can be obtained.A histogram of gradient magnitude values in different directions can be constructed for multiple pixels, with the prediction direction perpendicular to the direction of the gradient with the highest magnitude chosen as the prediction direction for the current block's intra-frame prediction mode.
[137] Preferably, operators can be used Horizontal 3x3 Sobel and vertical 3x3 Sobel operators are used to calculate the horizontal gradient Gx and the vertical gradient Gy, respectively. For example, the horizontal gradient Gx and the vertical gradient Gy of a pixel x4 in the pixel row can be calculated according to the following formula (1) and formula (2). -1 0 1 Gx = -2 0 2 -1 0 1 Formula (1) ; Formula (2) ; Petition 870250089576, dated 10 / 01 / 2025, p. 42 / 161 38 / 137
[138] Preferably, A may be a matrix consisting of 9 pixels centered at pixel x4, and comprising the top pixel xl, the left pixel x3, the bottom pixel x7, the right pixel x5, the top left pixel x0, the bottom left pixel x6, the top right pixel x2 and the bottom right pixel x8 of pixel x4, as shown in the following formula xl x2 x4 x5 x7 x8 Formula (3) ;
[139] Preferably, the value of the gradient magnitude G is the sum of the absolute values of the horizontal gradient and the vertical gradient, and its calculation formula is shown in formula (4). The direction of the gradient can be calculated using each gradient direction. Formula (4)
[140] Preferably, corresponding to each pixel arctan(Gx / Gy) .
[141] Preferably, it corresponds to a specific gradient direction range, and each gradient direction range is associated with a prediction direction of an intra-frame prediction mode. For multiple pixels in a pixel row, the gradient magnitude values of the multiple pixels with the same gradient direction range can be summed to obtain the sum of the gradient magnitude values corresponding to the gradient direction range.
[142] Preferably, the sum of magnitude values Petition 870250089576, dated 10 / 01 / 2025, p. 43 / 161 39 / 137 of the gradient in the forecast direction of the corresponding intra-frame forecast mode can also be obtained. With reference to Figure 9, the gradient magnitude values corresponding to the forecast directions of each intra-frame forecast mode are included.
[143] Preferably, the basic principle of the enhanced OBIC mode may be to determine the intra-frame prediction mode of the current block by analyzing the use of intra-frame prediction modes used by adjacent coding blocks and / or non-adjacent coding blocks. The specific implementation process may include determining the area magnitude values and intra-frame prediction directions of multiple image blocks, determining the area magnitude histogram or statistical results of the intra-frame prediction directions of multiple image blocks, and determining the intra-frame prediction direction of the block to be predicted based on the area magnitude histogram or statistical results.
[144] Preferably, the use of multi-block image intra-frame prediction modes may first involve determining at least one encoded region or at least one decoded region, and then determining the use of intra-frame prediction modes of the encoded blocks within that region. Alternatively, the use of the intra-frame prediction mode of the decoded blocks in the decoded area is determined. For example, as shown in Figure 10, in the encoded area there is encoding block 4 and encoding block 6 adjacent to the block to be predicted, and encoding block 1, encoding block 2, encoding block Petition 870250089576, dated 10 / 01 / 2025, page 44 / 161 40 / 137 3, encoding block 5, encoding block 7, and encoding block 8 are not adjacent to the block to be predicted. As shown in Figure 11, in the decoded area, there are decoded blocks 4 and 6 adjacent to the block to be predicted. Decoding block 1, decoding block 2, decoding block 3, decoding block 5, decoding block 7, and decoding block 8 are not adjacent to the block to be predicted.
[145] In this embodiment, during the video encoding and / or decoding prediction stage, as intra-frame prediction, the prediction mode can be directly determined based on at least one reference image area determined according to the image information of the current block, taking into account the relationship between the reference image area and the current block, so that the determined prediction mode is more accurate, i.e., the accuracy of the derived prediction mode is improved during the video encoding and / or decoding process, thus improving the prediction effect of the prediction processing for the current block, as improving the prediction accuracy, thus improving the prediction efficiency during the video encoding and / or decoding process. Second Example of Implementation Method
[146] Based on the first embodiment, a second embodiment is proposed.
[147] In this embodiment, step S10 comprises at least one of the following methods 1 to 6. Implementation Mode 1: Determine or obtain at least one reference image region based on at least one of the Petition 870250089576, dated 10 / 01 / 2025, page 45 / 161 41 / 137 following: current block width and height, block size, block area, image block attributes, and image block type:
[148] Preferably, at least one reference image region can be determined or obtained according to the width and height of the current block.
[149] Preferably, for DIMD mode, the number of pixels or image blocks or image areas that need to be expanded in the first image area in the DIMD model can be determined based on at least one of the following: width, height, block size, block area, image block attributes, and image block type of the current block. The first image area in the DIMD model can be an image area where a pixel line, as shown in Figure 8, is located.
[150] Preferably, the number of pixel lines in the DIMD model can be determined according to the block size or the sum of the width and height of the current block. For example, the one-pixel line in Figure 8 is expanded to the four pixel lines in Figure 12 to obtain a reference image region comprising the four pixel lines. Then, the pixel gradients in the four pixel lines in the reference image region are calculated, and the prediction direction of the current block prediction mode is determined based on the maximum gradient magnitude value among the gradient magnitude values of multiple pixels in different directions (such as the gradient magnitude value of pixel A). The prediction mode of the current block is determined according to the determined prediction direction.
[151] Preferably, the number of pixel lines can Petition 870250089576, dated 10 / 01 / 2025, page 46 / 161 42 / 137 to be determined according to an initial mapping table between the block size and the number of pixel rows.
[152] Preferably, the first lookup table can be as shown in Table 1 below: Table 1 Block Size | Number of Pixel Lines | Current Block Size is Less Than X1 | 1 | Current Block Width and Height are Greater Than X1 and Less Than X2 | 2 | Current Block Width and Height are Greater Than X2 and Less Than X3 | 3 | Current Block Width and Height are Greater Than X3 and Less Than X4 | 4
[153] Preferably, the number of pixel rows can be determined according to a second mapping table between the sum of the width and height and the number of pixel rows. Preferably, the first lookup table can be as shown in Table 2 below: Table 2 Sum of width and height Number of pixel lines The width and height of the current block are less than 16 1 The width and height of the current block are greater than 16 and less than 32 2 Petition 870250089576, dated 10 / 01 / 2025, p. 47 / 161 43 / 137 The width and height of the current block are greater than 32 and less than 64. The width and height of the current block are greater than 64 and less than 128.
[154] Preferably, the number of pixel rows can be determined or obtained according to the block size or the sum of the width and height of the current block and a mapping table, and at least one reference image region can be determined or obtained according to the number of pixel rows. For example, the reference image region is a region of the image where the pixel rows, comprising the number of pixel rows, are located.
[155] Preferably, the reference image area or at least one pixel, an image block and an image area in the reference image area can be determined according to the block size or the sum of the width and height of the current block.
[156] Preferably, the reference area or the image area in the reference image area can be an encoded area or a decoded area. Preferably, the reference image area or the image area in the reference image area can be determined according to the current block size and the included block size and the third mapping table.
[157] Preferably, the third mapping table may be as shown in Table 3 below: Table 3 Petition 870250089576, dated 10 / 01 / 2025, page 48 / 161 44 / 137 Block Size The size of the encoded or decoded area The current block size is less than X1' Size AO The current block size is greater than X1' and less than X2' Size BO The current block size is greater than X2' and less than X3' Size CO The current block size is greater than X3' and less than X4' Size D
[158] Preferably, the reference image region or the image region in the reference region can be an encoded region or a decoded region. Preferably, the reference area or the image area in the reference image area can be determined according to the sum of the width and height of the current block and a fourth mapping table containing the sum of the width and height and the image area.
[159] Preferably, the fourth mapping table may be as shown in Table 4 below: Table 4 Sum of width and height. The size of the encoded or decoded area. The width and height of the current block are less than 16. Size AA. The width and height of the current block are greater than 16 and less than 64. Size BA. The width and height of the current block are greater than 64. Size C. Petition 870250089576, dated 10 / 01 / 2025, p. 49 / 161 45 / 137 The width and height of the current block are greater than 128 and less than 256. Size D
[160] Alternatively, the encoded area or the decoded area can be determined by the position of the upper-left corner pixel, the height, and the width of the encoded area or the decoded area. For example, the position of the upper-left corner pixel can be a position N times (N is greater than 1) the height of the image block above the position of the upper-left corner of the current block and N times the width of the image block to the left. The width of the encoded region or the decoded region is an integer multiple of the width of the current block, and the height of the encoded region or the decoded region is an integer multiple of the height of the current block.
[161] Preferably, the number of pixels in the pixel row used to account for gradient direction and magnitude can be determined based on the size of the current block or the sum of its width and height, and then the size of the reference region or the image region within the reference region can be determined based on the number of pixels counted. For example, the number of pixels in the reference region or the image region within the reference region is equal to the number of pixels used to count gradient directions and gradient magnitude values.
[162] Preferably, the number of pixels in the reference region or in the image region of the reference region may also be greater than the number of pixels used to count the gradient direction and gradient magnitude values. Petition 870250089576, dated 10 / 01 / 2025, page 50 / 161 46 / 137 In this embodiment, the number of pixels in the pixel row used to count the gradient direction and magnitude values can be determined based on the block size or the sum of the width and height of the current block. Then, when constructing a histogram of the gradient magnitude values, if the number of counted pixels reaches the number of pixels used for counting mentioned above, the pixel counting process will be stopped. Preferably, the pixels used for statistics can be pixels in the first gradient direction or pixels in the first prediction direction.
[163] Preferably, the number of pixels used to count the gradient direction and magnitude values can be determined according to a fifth mapping table containing a mapping relationship between a block size and the number of pixels used to count the gradient direction and magnitude values.
[164] Preferably, the fifth mapping table may be as shown in Table 5 below: Table 5 Block size The number of pixels used to count the direction and magnitude values of the gradient The current block size is less than X1'' a The current block size is greater than X1'' and less than X2'' b The current block size c Petition 870250089576, dated 10 / 01 / 2025, page 51 / 161 47 / 137 The current block size is greater than X2'' X3'' and less than d.
[165] Preferably, the number of pixels used to count the gradient direction and magnitude values can be determined according to a sixth mapping table containing a mapping relationship between the sum of width and height and the number of pixels used to count the gradient direction and magnitude values.
[166] Preferably, the sixth mapping table can be as shown in Table 6 below: Table 6 Sum of width and height The number of pixels used to count the direction and magnitude values of the gradient The width and height of the current block are less than 16 a The width and height of the current block are greater than 16 and less than 64 b The width and height of the current block are greater than 64 and less than 128 c The width and height d Petition 870250089576, dated 10 / 01 / 2025, p. 52 / 161 48 / 137 The current bloc's figures are greater than 128 and less than 256.
[167] Preferably, the number of image blocks in the pixel row used for counting can be determined based on the size of the current block or the sum of its width and height, and then the size of the image region within at least one reference region can be determined or obtained based on the image blocks counted. For example, the number of image blocks in the reference region or the image region in the reference region is equal to the number of image blocks used for statistics.
[168] Preferably, the number of image blocks in the reference region or in the image region of the reference region may also be greater than the number of image blocks used for counting. In this embodiment, the number of image blocks used for counting in at least one reference region may be determined based on the size of the current block or the sum of its width and height; thus, when constructing the histogram of area magnitude values, if the number of image blocks counted reaches the number of image blocks used for counting, the image block counting process is stopped. Preferably, the image block used for statistics may be an image block using the first prediction direction.
[169] Preferably, the number of image blocks used for statistics can be determined according to a seventh mapping table, comprising a relationship of Petition 870250089576, dated 10 / 01 / 2025, page 53 / 161 49 / 137 mapping between block sizes and the number of image blocks used for statistics.
[170] Preferably, the seventh mapping table may be as shown in Table 7 below: Table 7 Block size The number of image patches used for statistics The current block size is less than X1''' u The current block size is greater than X1''' and less than X2''' v The current block size is greater than X2''' and less than X3''' x The current block size is greater than X3''' and less than X4''' y
[171] Preferably, the number of image blocks used for statistics can be determined according to an eighth mapping table containing a mapping relationship between the sum of width and height and the number of image blocks used for statistics.
[172] Preferably, the eighth mapping table can be as shown in Table 8 below: Table 8 Sum of width and height. The number of image patches used for statistics. The sum of the width and height of the current block is less than u. Petition 870250089576, dated 10 / 01 / 2025, p. 54 / 161 50 / 137 The sum of the width and height of the current block is greater than 16 and less than 64. The sum of the width and height of the current block is greater than 64 and less than 128. The sum of the width and height of the current block is greater than 128 and less than 256.
[173] Preferably, the image block used for statistics is determined by pixels in a reference area.
[174] Preferably, a pixel in a reference area is first determined and then the coordinate position and size of the image block where the pixel is located are determined. The coordinate position of the image block is the coordinate position of the pixel in the upper left corner of the image block, which is used to determine whether the pixel of the adjacent image block is located in the upper area adjacent to the image block, in the left area adjacent to the image block, or in the upper left area adjacent to the image block.
[175] Preferably, the horizontal displacement range between the pixel coordinates and the image block coordinates is 0 to 2x the width of the image block, and the vertical displacement range between the pixel coordinates and the image block coordinates is 0 to 2x the height of the image block.
[176] Preferably, the horizontal displacement and vertical displacement can be predefined. Petition 870250089576, dated 10 / 01 / 2025, p. 55 / 161 51 / 137
[177] Preferably, when a pixel used to determine an adjacent image block is located in an upper area adjacent to an image block, the vertical offset between the pixel coordinates and the image block coordinates is an integer multiple of -1 or -0.5x the image block height, and the horizontal offset range is from 0 to 2x the image block width. When a pixel used to determine an adjacent image block is located in the left area adjacent to the image block, the horizontal offset of the pixel coordinates relative to the image block coordinates is an integer multiple of -1 or -0.5x the image block width, and the vertical offset range is from 0 to 2x the image block height. It is determined or obtained through the above pixels that adjacent image blocks are adjacent to each other and the area formed by the combination of these adjacent image blocks is adjacent to the current block.
[178] Preferably, for OBIC mode, a method similar to DIMD mode can be adopted, such as determining at least one image block in at least one reference image area or the number of image blocks used for statistics in the image area based on the block size or the sum of the width and height of the current block. For example, the number of image blocks used for counting in at least one reference region can be determined from a mapping table that relates the block size or the sum of its width and height to the image block area; subsequently, when constructing the histogram of the area magnitude values, if the number of image blocks found reaches the number of image blocks used for counting, the processing of Petition 870250089576, dated 10 / 01 / 2025, page 56 / 161 52 / 137 image block search is interrupted.
[179] Preferably, the image block used for statistics can be an image block using the first prediction direction.
[180] Preferably, X1~X3, X1'~X3', X1''~X3'', X1'''~X3''' above are integers.
[181] Preferably, the size of the current block or the sum of its width and height can be determined, and based on that size or sum, at least one reference region or at least one image region within at least one reference region can be determined or obtained. For example, a mapping table comprising a mapping relationship between the size or the sum of the width and height of the current block and at least one reference image region can be used to determine or obtain at least one reference image region.
[182] Preferably, for DIMD mode, the current block size or the sum of the width and height may be used. Determine or obtain at least one reference image region or at least one image region of at least one reference image region. In addition, the position of the pixel line in the DIMD model is determined based on at least one determined or obtained reference image area or at least one image area in at least one reference image area, and the histogram of the gradient magnitude value is determined based on the pixels in the pixel line. For OBIC mode, at least one reference image region or at least one image region of at least one reference image region may be determined or obtained according to the Petition 870250089576, dated 10 / 01 / 2025, page 57 / 161 53 / 137 block area of the current block. For example, the determination is made based on the block size and a mapping table comprising a mapping relationship between the block size and the image block or image region. In another example, the determination is made based on the sum of the width and height and a mapping table comprising a mapping relationship between the sum of the width and height and an image block or image region.
[183] Preferably, for DIMD mode, the number of pixels used to count the gradient direction and magnitude values can be determined or obtained according to the size or the sum of the width and height of the current block. Furthermore, the position of the pixel line in the DIMD model is determined based on at least one determined or obtained reference image area or at least one image area in at least one reference image area, and the histogram of the gradient magnitude value is determined based on the pixels in the pixel line. For OBIC mode, at least one reference image region or at least one image region of at least one reference image region can be determined or obtained according to the block area of the current block. For example, the determination is performed based on the block size and a mapping table comprising a mapping relationship between the block size and the image block or image region.In another example, the determination is made based on the sum of the width and height and a mapping table comprising a mapping relationship between the sum of the width and height and an image block or image region.
[184] Preferably, the block properties of Petition 870250089576, dated 10 / 01 / 2025, page 58 / 161 54 / 137 The current block's image can be determined, such as a position or characteristics of the current block's image (such as the texture of the current block's image). Preferably, the position or characteristic of the current block's image can be determined, and at least one reference image region or an image region within at least one reference region can be determined based on the position or characteristic of the current block's image. For example, if the current block's position is in the first position region, the size of at least one reference region or an image region within at least one reference region is defined as smaller than a first threshold; if the current block's position is in the second position region, the size of at least one reference region or an image region within at least one reference region is defined as larger than the first threshold.For another example, if the current block is in the first position area, the position of at least one reference area or the image area of at least one reference area will be defined in the third position area; if the current block is in the second position area, the position of at least one reference area or the image area of at least one reference area will be defined in the fourth position area.
[185] Preferably, when the texture of the image corresponding to the current block is consistent with the texture of the predefined image, pixels, image blocks and / or image areas adjacent to the current block may be selected as pixels, image blocks and / or image areas in the reference image area.
[186] Preferably, when determining or obtaining at least Petition 870250089576, dated 10 / 01 / 2025, page 59 / 161 55 / 137 a reference image area based on the position or characteristics of the current block image, it can also be determined based on other rules, such as determining based on specified input instructions, such as determining the selection of a reference image area within a given range of images, etc.
[187] Preferably, the image block type of the current block can be determined, for example, the image block type of the current block can be a natural image or a screen content image. Different reference image regions can be selected for different image block types. For example, when the image block type of the current block is a natural image, pixels, image blocks and / or image regions adjacent to the current block are selected as pixels, image blocks and / or image regions in the reference image region. When the image block type of the current block is a screen content image, pixels, image blocks and / or image regions that are not adjacent to the current block are selected as pixels, image blocks and / or image regions in the reference image region.
[188] Preferably, by determining or obtaining at least one reference image area based on at least one of the following: block size, block area, image block attributes and image block type of the current block, it is ensured that the determined or obtained reference image area is closely related to the current block, thus ensuring that the subsequent prediction mode determined or obtained based on at least one reference image area is more accurate, thereby improving the prediction effect of the processing. Petition 870250089576, dated 10 / 01 / 2025, pp. 60 / 161 56 / 137 forecast for the current block. Implementation Mode 2: Determine or obtain at least one reference image region based on image block information from at least one of the following: neighboring blocks, non-neighboring blocks, homologous blocks, temporal blocks, and standard blocks corresponding to the current block:
[189] Preferably, based on image block information from at least one of the following corresponding to the current block: neighboring blocks, non-neighboring blocks, homologous blocks, temporal blocks and standard blocks, at least one of these blocks can be used as at least one reference image region.
[190] Preferably, the standard block can be a block defined in advance, for example, a block with typical pixel characteristics predefined by an encoder and / or a decoder.
[191] Preferably, the neighboring block can be a block adjacent to the current block and can be a block that was predicted or reconstructed.
[192] Alternatively, the non-neighboring block may be a block that is not adjacent to the current block and may be a block that has been predicted or reconstructed.
[193] Preferably, the homologous block may be an image block in the homologous image that has the same position and size as the current block; optionally, the homologous image may be the image in the video reference that is temporally closest to the current image.
[194] Preferably, the block in the time domain can be a block distinct from the time domain, such as an image block. Petition 870250089576, dated 10 / 01 / 2025, pp. 61 / 161 57 / 137 in the previous frame. For example, if there is video data containing three image frames, the first image frame will be played in the first second, the second image frame will be played in the second, and the third image frame will be played in the third second. If the image block predicted at the current moment is the image block after the split of the second image frame, the block in the time domain can be determined as the image block corresponding to that in other frame images, except for the second image frame.
[195] Preferably, the neighboring block image block information may include at least one block size, block area, image block attribute, and neighboring block image block type. The neighboring block block size comprises the width and height of the neighboring block. The neighboring block image block attributes include the location of the neighboring block, and the neighboring block image attributes include the texture of the neighboring block image. The neighboring block image block type comprises a natural image or a screen content image, etc.
[196] Preferably, the non-neighboring block image block information may include at least one block size, one block area, one image block attribute, and one non-neighboring block image block type. The block size of a non-neighboring block comprises the width and height of the non-neighboring block. The non-neighboring block image block attributes include the position of the non-neighboring block, and the image block attributes include the texture of the non-neighboring block image. The non-neighboring block image block types include natural images or screen content images, etc. Petition 870250089576, dated 10 / 01 / 2025, page 62 / 161 58 / 137
[197] Preferably, the image block information of the homologous block may include at least one of the following: block size, block area, image block attributes, and image block type. The block size of the homologous block includes its width and height. The image block attributes of the homologous block include its position, and the image block attributes include the texture of the homologous block image. The image block type of the homologous block includes, for example, natural image or screen content.
[198] Preferably, the time-domain block image block information may include at least one block size, one block area, one image block attribute, and one time-domain block image block type. The block size of a time-domain block comprises the width and height of the time-domain block. The time-domain block image block attributes include the position of the time-domain block, and the image block attributes include the texture of the time-domain block image. The time-domain block image block types include natural images or screen content images, etc.
[199] Preferably, the information for the standard block image block may include at least one block size, one block area, one image block attribute, and one standard block image block type. The standard block size comprises the width and height of the standard block. The standard block image block attributes include a standard block position, and the image block attributes include a standard block image texture. The standard block image block types include natural image or screen content image, Petition 870250089576, dated 10 / 01 / 2025, page 63 / 161 59 / 137 etc.
[200] Preferably, the specific implementation of Implementation Mode 2 can follow the procedure of Implementation Mode 1, that is, replacing the current block with neighboring blocks, non-neighboring blocks, homologous blocks, temporal blocks or standard blocks, without needing to repeat the description in this document.
[201] Preferably, at least one pixel may be obtained from at least one of the following corresponding to the current block: standard block, neighboring block, non-neighboring block, homologous block and temporal block; the pixel obtained is considered as the fifth pixel and used to calculate the direction or magnitude of the gradient.
[202] Preferably, at least one image block can be obtained from at least one of the following corresponding to the current block: standard block, neighboring block, non-neighboring block, homologous block and temporal block; the image block obtained is considered as the fifth image block and used to calculate the area magnitude values.
[203] Preferably, at least one image region can be obtained from at least one of the following corresponding to the current block: standard block, neighboring block, non-neighboring block, homologous block and temporal block; the image region obtained is considered as the fifth image region and used to calculate the area magnitude values.
[204] Preferably, one can select from the standard block row, neighboring blocks, non-neighboring blocks, homologous blocks, and temporal blocks: at least one neighboring block and / or non-neighboring block, and / or the image block corresponding to a Petition 870250089576, dated 10 / 01 / 2025, page 64 / 161 60 / 137 motion vector, and / or the image block corresponding to a block vector, choosing a pixel as the fifth pixel, or an image block as the fifth image block, or an image region as the fifth image region.
[205] Preferably, when determining or obtaining at least one reference image region based on image block information from at least one of the following corresponding to the current block: neighboring blocks, non-neighboring blocks, homologous blocks, temporal blocks and standard blocks, it is ensured that the determined or obtained reference image region is closely related to the current block, thus ensuring that the prediction mode determined or obtained from at least one reference image region is more accurate, improving the prediction effect applied to the current block. Implementation Mode 3: Determine or obtain at least one reference image region from the second component image block of the current block according to the information from the image block of the first component image block of the current block:
[206] Preferably, the first image block of the component can be an image block of a chrominance component or an image block of a luminance component.
[207] Preferably, the second image block of the component can be an image block of a chrominance component or an image block of a luminance component.
[208] Preferably, the first component image block and the second component image block are image blocks from different components. Petition 870250089576, dated 10 / 01 / 2025, page 65 / 161 61 / 137
[209] Preferably, at least one reference image region of the second component image block can be determined or obtained based on at least one of the following: block size, block area, image block attribute and image block type of the first component image block.
[210] Preferably, at least one pixel or at least one image block or at least one image area may be selected or specified in the first component image block, and the selected at least one pixel or at least one image block or at least one image area may be used as at least one pixel or at least one image block or at least one image area in at least one reference image area of the second component image block.
[211] Preferably, by determining or obtaining at least one reference image area of the second component image block of the current block based on the information of the image block of the first component image block of the current block, it is guaranteed that the determined or obtained reference image area is closely related to the current block, thus ensuring that the subsequent prediction mode determined or obtained based on at least one reference image area is more accurate, thereby improving the prediction effect of the prediction processing for the current block. Implementation Mode 4: Determine or obtain at least one reference image region based on the image block information of the candidate blocks obtained from the candidate motion vector or the candidate block vector corresponding to the current block:
[212] Preferably, the candidate bloc may be Petition 870250089576, dated 10 / 01 / 2025, page 66 / 161 62 / 137 determined or obtained sequentially according to a plurality of candidate motion vectors or a plurality of candidate block vectors in the current block's candidate list.
[213] Preferably, at least one block size, one block area, one image block attribute, and one image block type of at least one candidate block can be determined. And, based on at least one of the following of the candidate block: block size, block area, image block attributes, and image block type, determine or obtain at least one reference image region. For example, at least one of the following: block size, block area, image block attribute, and image block type of at least one candidate block is used as at least one reference image region.
[214] Preferably, the image block attribute of the candidate block comprises a position of the candidate block, and the image block attribute comprises an image texture of the candidate block. The image block types of the candidate blocks include natural images or screen content images, etc.
[215] Preferably, the specific implementation process of determining or obtaining at least one reference image area based on at least one of the following: block size, block area, image block attribute and image block type of the candidate block may refer to the solution in method one mentioned above, i.e., replacing the current block in method one with the candidate block, which will not be repeated in this document.
[216] Preferably, when determining or obtaining Petition 870250089576, dated 10 / 01 / 2025, page 67 / 161 63 / 137 image block information of a candidate block based on the block vector and / or motion vector of the current block, at least one reference image area is determined or obtained, thus ensuring that the determined or obtained reference image area is closely related to the current block, thus ensuring that the subsequent prediction mode determined or obtained based on at least one reference image area is more accurate, thus improving the prediction effect of the prediction processing for the current block. Implementation Mode 5: If the current block meets the first condition, determine or obtain at least one reference image region according to the first calculation strategy:
[217] Preferably, the first calculation strategy can be any of Modes 1 to 4: that is, the first calculation strategy can consist of determining or obtaining at least one reference image region based on at least one of the following from the current block: block size, block area, image block attributes and image block type; or it can consist of determining or obtaining at least one reference image region based on image block information from at least one of the following corresponding to the current block: neighboring blocks, non-neighboring blocks, homologous blocks, temporal blocks and standard blocks; or it can consist of determining or obtaining at least one reference image region from the second image block of the current block based on image block information from the first image block of the current block;Or it may consist of determining or obtaining at least one reference image region based on image block information from candidate blocks obtained from the block vector; Petition 870250089576, dated 10 / 01 / 2025, pp. 68 / 161 64 / 137 and / or the current block motion vector.
[218] Preferably, the first condition can be defined beforehand and can be defined according to the user's needs. The first condition is not fixed and can be adjusted adaptively according to different scenarios.
[219] Preferably, if the processing device detects that the current block meets the first condition, it may select a first calculation strategy to perform the calculation to determine or obtain at least one reference image region.
[220] Preferably, the current bloc meets a first condition, comprising at least one of the following:
[221] The width of the current block is greater than or equal to a first predefined width limit;
[222] The height of the current block is greater than or equal to a first predefined height limit;
[223] The area of the current block is greater than or equal to a first predefined area limit.
[224] Preferably, the first preset width threshold can be a previously defined image block width value, for example, 128.
[225] Preferably, the first preset height limit can be a predefined image block height limit, for example, 128.
[226] Preferably, the first predefined area limit can be an image block area limit defined in advance.
[227] Preferably, when detecting that the current block Petition 870250089576, dated 10 / 01 / 2025, page 69 / 161 65 / 137 meets the first condition; the processing device can select a first calculation strategy to perform the calculation to determine or obtain at least one reference image region.
[228] Preferably, if there are two image blocks, that is, a second image block and a third image block, and if the block size of the second image block is greater than the block size of the third image block, then the number of pixels included in the reference image area of the second image block is determined to be greater than the number of pixels included in the reference image area of the third image block; or, the number of image blocks included in the reference image area of the second image block is determined to be greater than the number of image blocks included in the reference image area of the third image block; or, the number of image areas included in the reference image area of the second image block is determined to be greater than the number of image areas included in the reference image area of the third image block.Preferably, the current block can be the second image block or the third image block.
[229] Preferably, this embodiment can determine more pixels or image blocks or image areas to determine a prediction mode for an image block with a larger block size or block area.
[230] Preferably, this embodiment can select different numbers of pixels or image blocks or image regions to determine prediction modes for image blocks of different sizes. By relating the size of Petition 870250089576, dated 10 / 01 / 2025, page 70 / 161 66 / 137 block of the current block (e.g., its width and height) and / or the block area with the number of pixels in the reference image region, and / or with the number of image blocks, and / or with the number of image regions, it is possible to ensure that the prediction accuracy of the DIMD or OBIC modes is not affected by variations in the size or area of the current block, thus improving the prediction effect subsequently applied to the current block. Implementation Mode 6: If the current block does not meet the first condition, determine or obtain at least one reference image region according to the second calculation strategy:
[231] Preferably, the first calculation strategy in the fifth approach may be different from the second calculation strategy in the sixth approach.
[232] Preferably, the second calculation strategy may be any of Modes 1 to 4, except the strategy used as the first calculation strategy: that is, the second calculation strategy may consist of determining or obtaining at least one reference image region based on at least one of the following from the current block: block size, block area, image block attributes, and image block type; or it may consist of determining or obtaining at least one reference image region based on image block information from at least one of the following corresponding to the current block: neighboring blocks, non-neighboring blocks, homologous blocks, temporal blocks, and standard blocks; or it may consist of determining or obtaining at least one reference image region from the second image block of the current block based on image block information from the first image block of the current block; or further Petition 870250089576, dated 10 / 01 / 2025, page 71 / 161 67 / 137 may consist of determining or obtaining at least one reference image region based on image block information from candidate blocks obtained from the block vector and / or motion vector of the current block.
[233] Preferably, the current bloc does not meet the first condition, which may include at least one of the following:
[234] The current block width is less than a first predefined width limit;
[235] The height of the current block is less than a first predefined height limit;
[236] The area of the current block is smaller than a first predefined area limit.
[237] Preferably, when the processing device detects that the width of the current block is less than a first predefined width limit, or detects that the height of the current block is less than a first predefined height limit, or detects that the area of the current block is less than a first predefined area limit, it may select a second calculation strategy to perform calculations to determine or obtain at least a reference image area.
[238] Preferably, associating the current block size (such as the current block width and current block height) and / or the current block area with the number of pixels in the reference image area and / or the number of image blocks and / or the number of image areas, when the current block does not meet the first condition, a second calculation strategy is adopted to determine or obtain at least one area of the reference image and then determine or obtain the prediction mode. Petition 870250089576, dated 10 / 01 / 2025, page 72 / 161 68 / 137 of the current block based on at least one area of the reference image, thus ensuring that the accuracy of the DIMD mode or OBIC mode prediction will not be affected by changes in the size or area of the current block, thereby improving the prediction effect of subsequent prediction processing for the current block. Third Example of a Mode of Implementation
[239] Based on any of the above modes of realization, a third mode of realization is proposed.
[240] In this embodiment, step S20 comprises step S21 and step S22.
[241] Step S21, determine or obtain a first probability of occurrence of at least one prediction mode based on pixels, image blocks or image regions in at least one reference image region;
[242] Preferably, at least one reference image region in this embodiment may be the reference image region in the first embodiment, or it may be at least one reference image region determined according to any of the first to sixth methods in the second embodiment.
[243] Preferably, after determining at least one reference image area, the processing device can determine a first probability of occurrence of at least one prediction mode based on at least one reference image area, such as determining a first probability of occurrence of at least one angle prediction mode based on at least one reference image area.
[244] Preferably, for any pixel in at least one reference image area, the gradient value Petition 870250089576, dated 10 / 01 / 2025, page 73 / 161 The horizontal and vertical gradient values of a pixel can be determined, and the sum of the horizontal and vertical gradient values of the same pixel can be used as the pixel's gradient magnitude value. The direction of the pixel's gradient can be determined, and the pixel's prediction direction can be determined based on the gradient direction. For example, a direction perpendicular to the gradient direction can be used as the prediction direction. Preferably, the prediction direction of at least one pixel in at least one reference image region can be determined, and the gradient magnitude values of pixels belonging to the same prediction direction can be accumulated to obtain the sum of the gradient magnitude values in the same prediction direction.
[245] Preferably, when accumulating the gradient magnitude values of pixels in the same prediction direction, different scale weighting factors can be defined for different pixels belonging to the same prediction direction, and the gradient magnitude values of the pixels in the same prediction direction are weighted and summed according to the different scale weighting factors to obtain the sum of the gradient magnitude values in the same prediction direction.
[246] Preferably, a forecast mode can correspond to a forecast direction.
[247] Preferably, for any forecast direction, the sum of the gradient magnitude values in the forecast direction can be used as the first probability of occurrence of the forecast mode in the forecast direction.
[248] Preferably, for any image block in at least one reference image region, the block area Petition 870250089576, dated 10 / 01 / 2025, page 74 / 161 70 / 137 of the image and the corresponding prediction direction for the image block can be determined. The magnitude values of the areas of the image blocks belonging to the same prediction direction can be summed, thus obtaining the sum of the magnitude values of the areas for that prediction direction.
[249] Preferably, the image block area magnitude value can be determined based on the image block area, either by directly using the image block area as the area magnitude value, or by deforming the image block area, such as multiplying the image block area according to a predefined scale weighting factor to obtain the area magnitude value.
[250] Preferably, when the intra-frame prediction mode adopted by the determined image block in the reference image to calculate the area magnitude value is one of the DIMD, OBIC, and spatial geometric partitioning (SGPM) modes, several intra-frame prediction modes exist simultaneously for the determined image block. In this case, the scale weighting factor is determined according to the number of intra-frame prediction modes of the image block. Thus, the area magnitude value of each intra-frame prediction mode becomes S / n. Where, S is the area of the image block and n is the number of intra-frame prediction modes used by the image block or the number of angular prediction modes used by the image block.
[251] For example, if the image block determined in the reference image to calculate the area magnitude values uses the DIMD mode, and the DIMD mode is a fusion mode, the image block can adopt a maximum of five prediction modes. Petition 870250089576, dated 10 / 01 / 2025, p. 75 / 161 71 / 137 intra-quadro angular.
[252] Preferably, when five intra-frame prediction modes are adopted, for each of the five intra-frame prediction modes, the magnitude value of the corresponding area is S / 5. If the image determined in the reference image to calculate the magnitude value of the area adopts the OBIC mode, and the OBIC mode is a fusion mode, the image block will adopt at most five intra-frame angular prediction modes.
[253] Preferably, when five intra-frame prediction modes are adopted, for each of the five intra-frame prediction modes, the magnitude value of the corresponding area is S / 5. If the image used to calculate the area magnitude value determined in the reference image adopts the SGPM mode, the image block will adopt at most two intra-frame prediction modes and, for each of the two intra-frame prediction modes, the magnitude value of the corresponding area will be S / 2. Preferably, n can also be the total number of prediction modes used by the image block. The total number of prediction modes mentioned above comprises the number of non-intra-frame prediction modes and the number of intra-frame prediction modes.
[254] Preferably, for any forecast direction, the sum of the magnitude values of the area in the forecast direction can be used as the first probability of occurrence of the forecast mode in the forecast direction.
[255] Preferably, step S21 comprises at least one of the following methods 10 to 16. Implementation Method 10: Determine or obtain a first magnitude value and a second magnitude value in the same order. Petition 870250089576, dated 10 / 01 / 2025, page 76 / 161 72 / 137 prediction direction based on pixels, image blocks, or image regions in at least one reference image region, and determine or obtain a first probability of occurrence based on the first magnitude value and the second magnitude value in the same prediction direction:
[256] Preferably, the first magnitude value and the second magnitude value may be gradient magnitude values determined according to a DIMD mode, or they may be area magnitude values determined according to an OBIC mode.
[257] Preferably, the magnitude values corresponding to the pixels in at least one reference image area can be determined, and pixels belonging to the same prediction mode among several pixels can be determined, and the gradient magnitude values of the pixels belonging to the same prediction mode can be accumulated to obtain the first probability of occurrence of the prediction mode.
[258] Preferably, different prediction modes correspond to different prediction directions. After determining the gradient magnitude values of a plurality of pixels in at least one reference image region, pixels belonging to a prediction mode in the same prediction direction can be determined, and at least two different pixels belonging to the same prediction direction can be determined. Preferably, the gradient magnitude values of at least two different pixels can be a first magnitude value and a second magnitude value.
[259] Preferably, the first magnitude value and Petition 870250089576, dated 10 / 01 / 2025, page 77 / 161 73 / 137 The second magnitude value of the same forecast direction can be accumulated to obtain a first probability of occurrence of the forecast mode of the forecast direction.
[260] Preferably, the second magnitude value can be deformed according to the first magnitude value in the same prediction direction, and the gradient magnitude values of other pixels in the same prediction direction can be accumulated according to the second deformed magnitude value to obtain the first probability of occurrence of the prediction mode in the prediction direction.
[261] Preferably, the deformation process can be an accumulation process or it can be a process of increasing or decreasing the second magnitude value by a fixed value.
[262] For example, if at least one reference image region is a DIMD model, as shown in Figure 8, the gradient magnitude value of each pixel in a pixel row in the DIMD model can be determined.
[263] Preferably, for any pixel in a line of pixels, a second pixel adjacent or non-adjacent to the pixel can be determined and, if the second pixel is not in the line of pixels or in another line of pixels, the gradient magnitude value of the second pixel and the gradient magnitude value of the pixel can be determined and calculated and, when the prediction direction of the second pixel prediction mode is consistent with the prediction direction of the pixel prediction mode, the gradient magnitude value of the pixel and the gradient magnitude value of the second pixel can be determined as the first magnitude value and the second magnitude value of the same prediction direction and, after determining the first value Petition 870250089576, dated 10 / 01 / 2025, page 78 / 161 74 / 137 magnitude and the second magnitude value of the same forecast direction, the first probability of occurrence of the forecast mode of the forecast direction is determined based on the first magnitude value and the second magnitude value.
[264] Preferably, based on at least one image block or image region in at least one reference image region, the first and second magnitude values for the same prediction direction can be determined according to the OBIC mode; after determining these first and second magnitude values, the first probability of occurrence of the prediction mode for that prediction direction can be determined based on these values.
[265] Preferably, for the OBIC mode, exemplifying with image blocks: if the first magnitude value is obtained from the first image block and the second magnitude value from the second image block, and both image blocks belong to the same prediction direction, the first probability of occurrence of the prediction mode for that prediction direction will be determined based on the first and second magnitude values.
[266] Preferably, the first magnitude value may be a gradient magnitude value determined according to a DIMD mode, and the second magnitude value may be an area magnitude value determined according to an OBIC mode. Alternatively, the first magnitude value may be an area magnitude value determined according to the OBIC mode, and the second magnitude value may be a gradient magnitude value determined according to the DIMD mode.
[267] Preferably, when determining or obtaining a Petition 870250089576, dated 10 / 01 / 2025, page 79 / 161 75 / 137 first magnitude value and a second magnitude value in the same prediction direction based on pixels, image blocks, or image areas in at least one reference image area, and then determine or obtain a first probability of occurrence based on the two magnitude values and determine or obtain a prediction mode of the current block based on the first probability of occurrence, the first probability of occurrence of at least one determined or obtained prediction mode can be improved, thus improving the accuracy of the determined prediction mode and improving the prediction effect of the prediction processing on the current block. Implementation Mode 11: Determine or obtain at least one first magnitude value based on pixels, image blocks, or image regions in at least one reference image region, and determine or obtain a first probability of occurrence based on the first magnitude value and a scale weighting factor;
[268] Preferably, the scale weighting factor can be a weight for performing weighted processing on the magnitude value, or a scale weighting factor, or a weight ratio, etc.
[269] Preferably, at least one gradient magnitude value can be determined or obtained based on the DIMD mode and pixels, image blocks, or image regions in at least one reference image region, and the at least one gradient magnitude value can be used as the first magnitude value. At least one area magnitude value can be determined or obtained based on the OBIC mode and an image block or an image region in at least one region of Petition 870250089576, dated 10 / 01 / 2025, page 80 / 161 76 / 137 reference image, and at least one area magnitude value can be used as the first magnitude value.
[270] Preferably, for pixels within at least one reference image area, the horizontal gradient value and the vertical gradient value of the pixel can be determined, and the sum of the horizontal gradient value and the vertical gradient value of the same pixel is used as the pixel gradient magnitude value, i.e., the first magnitude value.
[271] Preferably, after determining the first magnitude value of any pixel in at least one area of the reference image, it is possible to determine whether the pixel needs to be scaled. If scaling is necessary, the scale weighting factor corresponding to the pixel can be determined, and the first magnitude value of the pixel can be scaled according to the scale weighting factor to obtain a new first magnitude value. For example, the scale weighting factor is multiplied by the first magnitude value of the pixel to obtain a new first magnitude value. Then, the prediction direction corresponding to the pixel is determined, and the magnitude values of all pixels belonging to the prediction direction are summed to obtain a first probability of occurrence of the prediction direction.For example, there are pixels 1, 2, and 3 that belong to the prediction mode of the same prediction direction, and after determining the first magnitude value of pixel 3, the first magnitude value of pixel 3 is multiplied according to the scale weighting factor of pixel 3 to obtain a new first magnitude value, and the magnitude value of the gradient corresponding to pixel 1, the value of. Petition 870250089576, dated 10 / 01 / 2025, page 81 / 161 77 / 137 The magnitude of the gradient corresponding to pixel 2 and the new first magnitude value corresponding to pixel 3 are accumulated to obtain the first probability of occurrence of the prediction mode of the prediction direction.
[272] Preferably, the scale weighting factor corresponding to each pixel can be the same or different.
[273] Preferably, for an image block or image region within at least one reference image region, an area magnitude value corresponding to the image block or image region can be determined, and the area magnitude value corresponding to at least one image block or image region can be used as the first magnitude value.
[274] Preferably, it is possible to determine whether the first magnitude value corresponding to the image block or area needs to be scaled. If necessary, the scale weighting factor corresponding to the image block or area can be obtained, and the first magnitude value can be scaled according to the scale weighting factor to obtain a new first magnitude value. And all area magnitude values of the prediction mode belonging to the same prediction direction are accumulated to obtain the first probability of occurrence of the prediction mode in the prediction direction. Preferably, for example, new first magnitude values corresponding to at least one image block or image region belonging to a prediction mode in the same prediction direction are accumulated. That is, the actual area magnitude values of each image block in the same prediction direction are accumulated.Preferably, after the magnitude value of the image block area has been calculated. Petition 870250089576, dated 10 / 01 / 2025, page 82 / 161 78 / 137 If a scaling weighting factor is used to scale the area magnitude value to obtain a new first magnitude value, the new first magnitude value will be used as the actual area magnitude value. Or, if no weighting factor is used to scale the area magnitude value, this area magnitude value will be considered as the actual area magnitude value, i.e., the first magnitude value will be directly adopted as the actual area magnitude value.
[275] Preferably, the first probability of occurrence is determined or obtained according to the first magnitude value and a scale weighting factor determined according to the third magnitude value.
[276] Preferably, the scale weighting factor corresponding to the first magnitude value can be determined or obtained according to the third magnitude value.
[277] Preferably, at least a third magnitude value is determined or obtained based on pixels, image blocks or image areas in at least one reference image area, and a scale weighting factor is determined based on the third magnitude value and then a first probability of occurrence is determined or obtained based on the scale weighting factor and the first magnitude value.
[278] Preferably, at least two magnitude values, that is, a first magnitude value and a third magnitude value, can be determined or obtained based on pixels, image blocks or image regions in at least one reference image region. Petition 870250089576, dated 10 / 01 / 2025, page 83 / 161 79 / 137
[279] Preferably, the scale factor corresponding to the first magnitude value can be determined or obtained according to the third magnitude value. For example, when the third magnitude value is greater than a predefined magnitude limit, the scale factor is determined as 2. When the third magnitude value is less than the predefined magnitude limit, the scale weighting factor is determined as 8.
[280] Preferably, after determining the first magnitude value and determining the scale weighting factor corresponding to the first magnitude value based on the third magnitude value, the first magnitude value can be scaled according to the scale weighting factor to obtain a new first magnitude value and, based on the new first magnitude value, the first probability of occurrence of the forecast mode in the forecast direction can be determined.
[281] Preferably, by determining or obtaining at least a first magnitude value based on pixels, image blocks or image areas in at least one reference image area, and obtaining a new first magnitude value based on the first magnitude value and a scale weighting factor, determining or obtaining a first probability of occurrence based on the new first magnitude value, and / or determining or obtaining a first probability of occurrence based on the first magnitude value and a scale weighting factor determined based on a third magnitude value, the first probability of occurrence of at least one determined or obtained prediction mode can be improved, improving Petition 870250089576, dated 10 / 01 / 2025, page 84 / 161 80 / 137 thus improves the accuracy of the determined prediction mode and enhances the prediction effect of the prediction processing in the current block. Implementation Mode 12: Determine or obtain a first probability of occurrence of a prediction direction of at least one prediction mode based on a gradient magnitude value and a gradient direction of a pixel in at least one reference image region;
[282] Preferably, after determining or obtaining at least one reference image area based on the image block information of the current block, the processing device may adopt a DIMD mode to determine a first probability of occurrence of a prediction direction of each prediction mode based on pixels in at least one reference image area.
[283] Preferably, an image area where the DIMD model is located can be determined in the reference image area, and at least one pixel row can be determined in the DIMD. For any pixel in at least one pixel row, the horizontal gradient value and the vertical gradient value of the pixel can be determined and calculated, and the horizontal gradient value and the vertical gradient value of the same pixel are added, for example, the absolute value of the horizontal gradient value and the absolute value of the vertical gradient value are added to obtain the magnitude value of the pixel gradient. The prediction direction of the pixel prediction mode can be determined according to the direction of the pixel gradient. For example, the direction perpendicular to the gradient direction is used as the prediction direction of the mode. Petition 870250089576, dated 10 / 01 / 2025, page 85 / 161 81 / 137 pixel prediction.
[284] Preferably, after the gradient magnitude value of any pixel is calculated, the gradient magnitude value can be scaled according to a scale weighting factor corresponding to the pixel to obtain the actual gradient magnitude value of the pixel. Preferably, after calculating the horizontal gradient value and / or the vertical gradient value of the pixel, the scale weighting factor can be multiplied by the horizontal gradient value to obtain a new horizontal gradient value, and the new horizontal gradient value and the vertical gradient value of the pixel can be added to obtain the pixel gradient magnitude value. Alternatively, the scale weighting factor can be multiplied by the vertical gradient value to obtain a new vertical gradient value, and the new vertical gradient value can be added to the horizontal gradient value of the pixel to obtain the pixel gradient magnitude value.
[285] Preferably, after determining the gradient magnitude value corresponding to a pixel in at least one reference image area, the prediction direction corresponding to the pixel can be determined, and different gradient magnitude values belonging to the same prediction direction can be accumulated to obtain a first probability of occurrence of the prediction mode in the prediction direction. Preferably, when accumulating gradient magnitude values, if the pixel's gradient magnitude value is scaled according to a scale weighting factor, the gradient magnitude value after scaling, i.e., the actual gradient magnitude value, is accumulated with the values Petition 870250089576, dated 10 / 01 / 2025, page 86 / 161 82 / 137 of the gradient magnitude of other pixels in the same prediction direction to obtain a first probability of occurrence of the prediction direction of the prediction mode.
[286] Preferably, when accumulating pixel gradient magnitude values in the same prediction direction to determine or obtain the first probability of occurrence of the prediction direction of the prediction mode, a probability threshold can be defined. When it is detected that the probability of occurrence of the prediction direction of at least one prediction mode is greater than the probability threshold, the calculation of the pixel gradient magnitude value can be interrupted, i.e., the calculation of the gradient magnitude value may not be performed on all pixels in the reference image area, and the calculation of the gradient magnitude value may not be performed on all pixels in the pixel row.
[287] Preferably, for the general DIMD mode process, prediction modes for n prediction directions can be determined, and prediction processing can be performed based on the prediction modes for the n prediction directions. A threshold can also be defined. If there are n prediction modes with gradient magnitude values corresponding to the prediction directions greater than the threshold, the calculation of the pixel gradient magnitude value can be interrupted. n is an integer greater than 1.
[288] Preferably, when determining or obtaining the first probability of occurrence of the prediction direction of at least one prediction mode based on the gradient magnitude value and the pixel gradient direction in at least one area of Petition 870250089576, dated 10 / 01 / 2025, p. 87 / 161 83 / 137 reference image, the first probability of occurrence of at least one determined or obtained prediction mode can be improved, thereby improving the accuracy of the determined prediction mode and improving the prediction effect of the prediction processing in the current block. Implementation Mode 13: Determine or obtain the first probability of occurrence of the prediction direction of at least one prediction mode based on the prediction mode corresponding to at least one image block or image region in at least one reference image region, and on the area of the image block or image region.
[289] Preferably, after determining or obtaining at least one reference image area based on the image block information of the current block, the processing device may adopt the OBIC mode to determine the first probability of occurrence of the prediction direction of each prediction mode based on the image block or image area in at least one reference image area.
[290] Preferably, an image block in at least one reference image area can be determined, for example, an image block adjacent to the current block or an image block not adjacent to the current block. The prediction mode adopted by the image block in the reference image area and in the image block area can be determined. Preferably, the image block area can be used directly as the magnitude value of the image block area. A scale weighting factor corresponding to the image block can be determined, and the image block area can be multiplied according to the scale weighting factor to obtain Petition 870250089576, dated 10 / 01 / 2025, page 88 / 161 84 / 137 is a value for the area magnitude of the image block.
[291] Preferably, the area magnitude values of the prediction mode image blocks belonging to the same prediction direction can be accumulated to obtain the first probability of occurrence of the prediction mode's prediction direction.
[292] Preferably, the same image block method in at least one reference image area can be adopted for the image area in at least one reference image area to determine or obtain the first probability of occurrence of the prediction direction of at least one prediction mode.
[293] Preferably, when accumulating the area magnitude values of image blocks or image regions in the same prediction direction to determine or obtain the probability of occurrence of the prediction direction of the prediction mode, a probability threshold may be defined. When it is detected that the probability of occurrence of the prediction direction of at least one prediction mode is greater than the probability threshold, the calculation of the area magnitude value of the image block or image region may be interrupted, i.e., the calculation of the area magnitude value is not performed for all image blocks or image regions in the reference image region.
[294] Preferably, for the general OBIC mode process, forecast modes of n forecast directions can be determined, and forecast processing can be performed based on the forecast modes of the n forecast directions. A limit can also be defined. If there are n forecast modes Petition 870250089576, dated 10 / 01 / 2025, page 89 / 161 85 / 137 whose corresponding area magnitude values are greater than the limit, the calculation of the image block area magnitude value or the image area may be interrupted. n is an integer greater than 1.
[295] Preferably, when determining or obtaining the first probability of occurrence of the prediction direction of at least one prediction mode based on the prediction mode corresponding to the image block or image area in at least one reference image area and the image block or image area, the first probability of occurrence of at least one determined or obtained prediction mode can be improved, thereby improving the accuracy of the determined prediction mode and improving the prediction effect of the prediction processing in the current block. Implementation Mode 14: Determine or obtain a first-occurrence probability based on at least one position, one horizontal distance, one vertical distance, and one shortest distance between a pixel, an image block, or an image region in at least one reference image region and the current block;
[296] Preferably, different strategies are adopted according to the position between pixels or image blocks or image regions in at least one reference image region and the current block to obtain the first probability of occurrence. For example, different scale weighting factors are used to calculate magnitude values for pixels or image blocks or image regions in different positions, in order to determine the first probability of occurrence of the prediction mode in each prediction direction. Petition 870250089576, dated 10 / 01 / 2025, pp. 90 / 161 86 / 137
[297] Preferably, different strategies are adopted based on the distance between an image block or image area in at least one reference image area and the current block (i.e., horizontal distance, vertical distance, or shortest distance) to determine or obtain the actual area magnitude value of the image block or image area, and the area magnitude value of the image block or image area can be accumulated with the area magnitude values of other image blocks or image areas in the same prediction direction to obtain the first probability of occurrence of the prediction direction prediction mode.
[298] Preferably, different strategies can be adopted based on the distance between a pixel in at least one reference image area and the current block (i.e., horizontal distance, vertical distance, or shortest distance) to determine or obtain the actual value of the pixel gradient magnitude, and the actual value of the pixel gradient magnitude can be accumulated with the actual values of the gradient magnitude of other prediction mode pixels in the same prediction direction to obtain the first probability of occurrence of the prediction mode in the prediction direction.
[299] Preferably, if the distance between the pixel and the current block is greater than or equal to a first distance limit (which may be a distance value defined in advance), the first magnitude calculation strategy may be used to calculate the actual value of the pixel gradient magnitude. Or, if the distance between the pixel and the current block is less than the first distance limit, the second magnitude calculation strategy may be used to calculate the actual value. Petition 870250089576, dated 10 / 01 / 2025, page 91 / 161 87 / 137 of the pixel gradient magnitude.
[300] Preferably, the first magnitude calculation strategy may be to determine a pixel that is n times the width and / or n times the width away from the edge of the current block, determine the area and intra-frame prediction mode of the encoded image block or decoded image block where the pixel is located and use the intra-frame prediction mode as a candidate intra-frame prediction mode for the block to be predicted and use the area as the magnitude of the candidate intra-frame prediction mode for the block to be predicted.
[301] Preferably, the second magnitude calculation strategy can be to divide the image region into several image sub-regions. For example, as shown in Figure 13, an image region A and an image region B are included, and image region B is divided into a plurality of image sub-regions 1 and a plurality of image sub-regions 2. Preferably, the sizes of the multiple image sub-regions are the same as the size of the region to be predicted.
[302] Preferably, a larger scale factor is defined for an image subregion close to the block to be predicted (e.g., image subregion 1), and a smaller scale factor is defined for an image subregion distant from the block to be predicted (e.g., image subregion 2).
[303] Preferably, the multiple image sub-regions are divided into fixed-size image sub-sub-regions (e.g., 4x4 image sub-sub-regions in Figure 14).
[304] Preferably, the size of a sub-region of Petition 870250089576, dated 10 / 01 / 2025, page 92 / 161 88 / 137 The size of an image subregion near the block to be predicted (e.g., image subregion 1) is smaller than the size of an image subregion far from the block to be predicted. For example, the size of the image subregion in image subregion 1 is 4x4, and the size of the image subregion in image subregion 2 is 8x8. Next, a pixel in the image subregion (e.g., the pixel in the upper left corner of the subregion) is selected, and the intra-frame prediction mode of the encoded or decoded image block to which that pixel belongs is determined. This intra-frame prediction mode is adopted as the candidate intra-frame prediction mode for the block to be predicted, and the area of the image subregion (e.g., 4x4 or 8x8) is used as the magnitude of the candidate intra-frame prediction mode for the block to be predicted.
[305] Preferably, the closer the image block is to the current block, the greater the similarity between the image block and the current block. Compared with more distant pixels, the intra-frame prediction mode used by the nearest image block is used as the intra-frame prediction mode of the current block for better intra-frame prediction.
[306] Preferably, in DIMD mode, the pixel gradient magnitude is the magnitude used to determine the intra-frame prediction mode of the current block. Since pixels at different distances / positions have different probabilities of similarity to the current block, different magnitude calculation strategies need to be adopted for pixels at different distances / positions. For example, a strategy of Petition 870250089576, dated 10 / 01 / 2025, page 93 / 161 89 / 137 calculation with greater precision is defined for closer pixels, and a calculation strategy with less precision is defined for more distant pixels. In this way, encoding and decoding performance can be improved without significantly increasing computational complexity during the video encoding and decoding process.
[307] Preferably, in OBIC mode, the image block area is used as the magnitude to determine the intra-frame prediction mode of the current block. Therefore, only the size of the image block area will affect the determination of the intra-frame prediction mode of the current block. If the same magnitude calculation strategy is defined for image blocks in different positions but with the same area, the accuracy of the determined intra-frame prediction mode will generally be low. Based on this, a calculation strategy with higher precision is defined for image blocks that are closer in position, and a calculation strategy with lower precision is defined for image blocks that are further apart in position. In this way, encoding and decoding performance can be improved without significantly increasing computational complexity during the video encoding and decoding process.
[308] Preferably, when determining or obtaining a first probability of occurrence based on at least one of the following options: position, horizontal distance, vertical distance and shortest distance between a pixel, an image block or an image area in at least one reference image area and the current block, the effectiveness of the first probability of occurrence determined or obtained can be ensured, Petition 870250089576, dated 10 / 01 / 2025, page 94 / 161 90 / 137 thus improving the effectiveness of the subsequent determination or acquisition of the forecasting model based on the first probability of occurrence and improving the forecasting effect of the forecast based on the forecasting model. Implementation Mode 15: Determine or obtain a first probability of occurrence according to a pixel type of a pixel, an image block type of an image block, and an image region type of an image region;
[309] Optionally, the image region type may include the image region to the left of the current block, the image region above the current block, the image region above and to the left of the current block, the image region that is in the same encoding tree unit as the current block, and the image region that is not in the same encoding tree unit as the current block, among others.
[310] Preferably, the image block type may include an image block to the left of the current block, an image block above the current block, an image block above the left of the current block, an image block in the same encoding tree unit as the current block, an image block that is not in the same encoding tree unit as the current block, etc.
[311] Preferably, the pixel type may include pixels to the left of the current block, pixels above the current block, pixels above the left of the current block, pixels in the same encoding tree unit as the current block, pixels that are not in the same encoding tree unit as the current block, etc.
[312] Preferably, for DIMD mode, a line of Petition 870250089576, dated 10 / 01 / 2025, page 95 / 161 91 / 137 pixels in the reference image area are determined, and by calculating the gradient magnitude value for any pixel in the pixel row, it can be determined whether the pixel's gradient magnitude value needs to be scaled based on the pixel type (for example, when the pixel type is the pixel on the left side of the current block, the pixel's gradient magnitude value is scaled). If scaling is not necessary, the pixel's gradient magnitude value will be used as the actual gradient magnitude value.Or, if scaling is necessary, the gradient magnitude value can be scaled according to the scaling weight factor to obtain the actual gradient magnitude value of the pixel, and the actual gradient magnitude value can be accumulated with the actual gradient magnitude values of other prediction mode pixels in the same prediction direction to obtain the first probability of occurrence of the prediction mode in the prediction direction.
[313] Preferably, for OBIC mode, the need for scaling the area magnitude value can be determined according to the image block type and / or the image region type.
[314] Preferably, when the image block type or image region type is the image block or image region to the left of the current block, the magnitude value of the image block or image region area is scaled. If scaling is not required, the magnitude value of the image block or image region area will be used as the actual gradient magnitude value. Or, if scaling is required, the magnitude value of the area Petition 870250089576, dated 10 / 01 / 2025, page 96 / 161 92 / 137 can be scaled according to the scaling weight factor to obtain the actual pixel area magnitude value, and the actual area magnitude value can be accumulated with the actual area magnitude values of other image blocks or prediction mode image areas in the same prediction direction to obtain the first probability of occurrence of the prediction mode in the prediction direction.
[315] Preferably, by determining or obtaining the first probability of occurrence based on the pixel type of pixel, the image block type of image block and the image area type of image area, the effectiveness of the first probability of occurrence determined or obtained can be guaranteed, thereby improving the effectiveness of the subsequent determination or acquisition of the prediction model based on the first probability of occurrence and improving the prediction effect of the prediction based on the prediction model. Implementation Mode 16: If the syntax element obtained in the code flow meets the second condition, the first probability of occurrence will be determined or obtained based on the first probability of occurrence calculation strategy and on the pixels, image blocks, or image regions in at least one reference image region; if the syntax element obtained in the code flow does not meet the second condition, the first probability of occurrence will be determined or obtained based on a second probability of occurrence calculation strategy different from the first probability of occurrence calculation strategy and on the pixels, image blocks, or image regions in at least one reference image region. Petition 870250089576, dated 10 / 01 / 2025, page 97 / 161 93 / 137
[316] Preferably, the syntax element may include marker information, such as a label and an index. It may be a marker encoded in the bitstream during encoding in the encoder.
[317] Preferably, the syntax element can be a text number, a binary character, or a mark expressed in other forms.
[318] Preferably, the first probability of occurrence calculation strategy and the second probability of occurrence calculation strategy can be at least one of the tenth method to the fifteenth method.
[319] Preferably, the first probability calculation strategy and the second probability calculation strategy are different.
[320] Preferably, when the processing device is a decoder, it can detect whether the syntax elements obtained in the code stream meet the second condition. If the syntax elements meet the second condition, the first probability of occurrence calculation strategy can be used to calculate the pixels, image blocks, or image areas in at least one reference image area to determine or obtain the first probability of occurrence. If the syntax element does not satisfy the fifth condition, a second probability of occurrence calculation strategy can be used to calculate pixels, image blocks, or image regions in at least one reference image region to determine or obtain a first probability of occurrence.
[321] Preferably, when using different strategies of Petition 870250089576, dated 10 / 01 / 2025, page 98 / 161 94 / 137 calculation to calculate the first probability of occurrence based on the syntax elements obtained in the bitstream, the effectiveness of the first probability of occurrence determined or obtained can be guaranteed, thus improving the effectiveness of the subsequent determination or acquisition of the prediction model based on the first probability of occurrence and improving the prediction effect of the prediction based on the prediction model.
[322] Step S22: determine or obtain a prediction mode of the current block according to at least a first probability of occurrence.
[323] Preferably, after determining the first probability of occurrence of at least one prediction mode, a prediction mode can be selected as the prediction mode for the current block according to at least one first probability of occurrence. When making a selection, the selection can be made according to the user's needs or according to standard rules and the first probability of occurrence, such as selecting the prediction mode corresponding to the highest first probability of occurrence as the prediction mode for the current block.
[324] Preferably, when determining or obtaining the prediction mode of the current block based on the first probability of occurrence of pixels, image blocks or image areas in at least one reference image area or in at least one prediction mode obtained, the accuracy of the determined prediction mode is improved, thereby improving the prediction effect of the prediction processing in the current block.
[325] Preferably, step S22 comprises at least one of the following methods 17 to 19. Petition 870250089576, dated 10 / 01 / 2025, page 99 / 161 95 / 137 Implementation Mode 17: Determine a second probability of occurrence based on the first probability of occurrence and the scale weighting factor, and determine or obtain a prediction mode for the current block based on the second probability of occurrence;
[326] Preferably, after determining or obtaining a first probability of occurrence of a prediction direction from at least one prediction mode based on pixels, image blocks or image regions in at least one reference image region, it can be determined whether scaling processing needs to be performed on the first probability of occurrence. If scaling is required, the first probability of occurrence can be multiplied by a scaling weighting factor to obtain a second probability of occurrence.
[327] Preferably, if the first probabilities of occurrence of the prediction directions of all prediction modes are obtained, all first probabilities of occurrence can be scaled using the same scale weighting factor to obtain the second probabilities of occurrence. For example, if the scale weighting factor is 0.5, 0.5 can be multiplied by all first probabilities of occurrence to obtain the second probability of occurrence, and then the amount of data for the second probability of occurrence is less than the first probability of occurrence, which is convenient for subsequently determining or obtaining the prediction mode of the current block based on the second probability of occurrence, thus reducing processing complexity and improving the forecasting efficiency of prediction mode determination. And / or use a smaller value for Petition 870250089576, dated 10 / 01 / 2025, pages 100 / 161 Representing the probability of occurrence (96 / 137) can save storage space. Implementation Mode 18: determine or obtain a prediction mode for a current block according to the first probability of occurrence and the third probability of occurrence of the same prediction direction;
[328] Preferably, the first probability of occurrence and the third probability of occurrence may be two probabilities of occurrence determined or obtained in two different ways for the direction of prediction of the same prediction mode. The first probability of occurrence may be equal to or different from the third probability of occurrence.
[329] Preferably, if the first probability of occurrence and the third probability of occurrence of the prediction direction of the same prediction mode are determined according to the DIMD mode, a DIMD model can be determined according to at least one reference image region, and at least two pixel lines can be determined in the DIMD model. A first probability of occurrence of a prediction direction of the same prediction mode is determined according to at least one pixel line of the at least two pixel lines. A third probability of occurrence of the prediction direction of the same prediction mode is determined according to at least another pixel line of the at least two pixel lines.
[330] For example, if the first probability of occurrence and the third probability of occurrence of the forecast direction of the same forecast mode are determined according to the OBIC model, the first probability of occurrence Petition 870250089576, dated 10 / 01 / 2025, pp. 101 / 161 The 97 / 137 probability and the third probability of occurrence of the prediction direction of the same prediction mode can be determined based on different image blocks or image areas in at least one reference image area. For example, the first probability of occurrence of prediction directions of multiple prediction modes can be determined based on multiple image blocks that are adjacent and / or non-adjacent to the current block in at least one reference image region. The third probability of occurrence of prediction directions of the plurality of prediction modes is determined according to a plurality of image regions that are adjacent and / or non-adjacent to the current block in at least one reference image region. Furthermore, the first probability of occurrence and the third probability of occurrence of the prediction direction belonging to the same prediction mode can be determined.
[331] Preferably, a DIMD mode can be used to calculate and determine the first occurrence probabilities of prediction directions of multiple prediction modes for at least one reference image region. The OBIC mode can be used to calculate and determine the third occurrence probabilities of prediction directions of multiple prediction modes for at least one reference image region. And determine the first occurrence probability and the third occurrence probability of the prediction direction belonging to the same prediction model.
[332] Preferably, the first probability of occurrence and the third probability of occurrence of the same forecast direction can be processed to obtain a fifth. Petition 870250089576, dated 10 / 01 / 2025, pp. 102 / 161 98 / 137 probability of occurrence of the forecast direction. For example, the highest or lowest probability of occurrence is selected as the fifth probability of occurrence, or the first probability of occurrence and the third probability of occurrence in the same forecast direction are weighted and summed to obtain the fifth probability of occurrence. A forecast mode for a forecast direction corresponding to the fifth probability of occurrence is selected according to the fifth probability of occurrence as the forecast mode of the current block. For example, the forecast mode for the forecast direction corresponding to the maximum or minimum probability of occurrence is selected.
[333] Preferably, the forecast mode of the current block is determined or obtained based on the first probability of occurrence and the third probability of occurrence of the same forecast direction, thus ensuring the accuracy of the determined forecast mode and improving the forecast effect of the forecast based on the forecast mode. Implementation Mode 19: A scale weighting factor for the first probability of occurrence is determined according to the fourth probability of occurrence, and a prediction mode for the current block is determined according to the first probability of occurrence and the scale weighting factor.
[334] Preferably, the fourth probability of occurrence may be a probability of occurrence of a prediction direction of a prediction mode determined or obtained by adopting a DIMD mode or an OBIC mode according to at least one reference image region.
[335] Preferably, the direction of prediction of the mode of Petition 870250089576, dated 10 / 01 / 2025, pp. 103 / 161 99 / 137 The prediction corresponding to the fourth probability of occurrence may be the same as the prediction direction of the prediction mode corresponding to the first probability of occurrence.
[336] Preferably, DIMD mode can be used to process at least one reference image area to obtain the first occurrence probabilities of prediction directions from multiple prediction modes, or OBIC mode can be used for processing to obtain the first occurrence probabilities of prediction directions from multiple prediction modes.
[337] Preferably, the need to scale the first probability of occurrence can be determined according to the fourth probability of occurrence. For example, detect if the fourth probability of occurrence is greater than a predefined probability threshold. If so, determine the first probability of occurrence in the same direction as the prediction of the fourth probability of occurrence and scale the first probability of occurrence according to the scale weighting factor to obtain the sixth probability of occurrence. For example, the scale weighting factor is multiplied by the first probability of occurrence to obtain the sixth probability of occurrence. Or, if the fourth probability of occurrence is less than or equal to a predefined probability threshold, it can be determined that the first probability of occurrence does not need to be scaled, or the scale weighting factor is determined directly as 1.
[338] Preferably, the prediction mode of the current block can be determined or obtained according to the first Petition 870250089576, dated 10 / 01 / 2025, pp. 104 / 161 100 / 137 probability of occurrence or the fourth probability of occurrence corresponding to the forecast direction of each forecast mode. For example, the forecast mode corresponding to the maximum probability of occurrence is selected as the forecast mode for the current block.
[339] Preferably, by determining the scale weighting factor of the first probability of occurrence based on the fourth probability of occurrence and determining the forecasting mode of the current block based on the first probability of occurrence and the scale weighting factor, the accuracy of the determined forecasting mode is guaranteed, thus improving the forecasting effect of the forecast based on the forecasting mode.
[340] Preferably, the scale weighting factor is determined or obtained by at least one of the following methods 20 to 24: Implementation Mode 20: Determine or obtain a scale weighting factor based on a position between at least one pixel in at least one reference image region, an image block, and an image region and the current block;
[341] Preferably, a scale weighting factor can be defined based on the position between at least one of the pixels, image blocks and image areas in at least one reference image area and the current block, and the size of the defined scale weighting factor can be different for different positions. For example, the farther the position is from the current block, the smaller the defined scale weighting factor will be, and the closer the position is to the current block, the larger the defined scale weighting factor will be.
[342] Preferably, a mapping table Petition 870250089576, dated 10 / 01 / 2025, pp. 105 / 161 101 / 137 understanding a mapping relationship between positions and scale weighting factors can be determined, and the scale weighting factor can be obtained by consulting the mapping table based on the position between the pixel in at least one reference image area, the image block and at least one item in the image area and the current block.
[343] Preferably, for DIMD mode, a scale weighting factor can be determined based on the position of a pixel used to determine the prediction mode relative to the current block in at least one reference image area, and the calculated gradient magnitude value of the pixel is multiplied by the scale weighting factor to obtain a real gradient magnitude value, and then the prediction mode of the pixel's prediction direction is determined, and the real gradient magnitude value is added to the gradient magnitude value of the prediction mode in the same prediction direction as the pixel to obtain a first probability of occurrence of the prediction mode in the prediction direction. This allows the magnitude value to be closely related to the pixel's position. For example, pixels closer to the current block exhibit a higher degree of similarity to the current block.Compared to pixels further away from the current block, using the prediction mode employed by the closer pixels as the prediction mode for the current block for intra-frame prediction has a better prediction effect.
[344] Preferably, in DIMD mode, the size of the horizontal gradient magnitude value and the vertical gradient magnitude value of the pixel will affect the determination of the prediction mode of the current block. Therefore, a weighting factor of Petition 870250089576, dated 10 / 01 / 2025, pp. 106 / 161 A larger scale of 102 / 137 can be set for pixels closer to the current block's position, and a smaller scale weighting factor can be set for pixels farther from the current block. This way, the gradient magnitude values of the pixels in the reference image area are adjusted, thus increasing the influence of the gradient magnitude values of pixels closer to the current block's position in determining the prediction mode of the current block, and reducing the influence of the gradient magnitude values of pixels farther from the current block's position in determining the prediction mode of the current block, thereby improving the prediction accuracy for the current block.
[345] Preferably, for OBIC mode, the scale weighting factor can be determined based on an image block in at least one reference image region used to determine the prediction mode and / or a position of the image region relative to the current block.
[346] Preferably, the following is explained using an image block as an example: In OBIC mode, the position of the image block will affect the accuracy of the prediction mode determination of the current block. Generally, the image block closest to the position of the current block is more similar to it. Compared to the image block furthest from the position of the current block, the prediction effect of intra-frame prediction using the prediction mode used by the closest image block as the prediction mode of the current block is better.
[347] Preferably, different scale weighting factors can be defined for a plurality of image blocks with different positions but the same block area. For example, the closer the image block is to Petition 870250089576, dated 10 / 01 / 2025, pp. 107 / 161 The greater the current position of the block, the higher the defined scale weighting factor, and the further the image block is from the current position, the lower the defined scale weighting factor. In this way, the area magnitude values of the image blocks in the reference image area are adjusted, thus increasing the influence of the area magnitude values of the image blocks closer to the current position in determining the prediction mode of the current block, and reducing the influence of the area magnitude values of the image blocks further from the current position in determining the prediction mode of the current block, thereby improving the prediction accuracy for the current block.
[348] Preferably, the pixels in the reference image region can be classified according to the position between the pixels in at least one region of the reference image and the current block, and the pixel scale weighting factors can be determined or obtained according to the classification results. For example, if there is a DIMD model in the reference image area and there are four pixel rows in the DIMD model, a different scale weighting factor can be defined for each pixel row, for example, pixel row 1 corresponds to scale weighting factor 1, pixel row 2 corresponds to scale weighting factor 2, pixel row 3 corresponds to scale weighting factor 3, and pixel row 4 corresponds to scale weighting factor 4. If there is a pixel and the pixel position is located in pixel row 2, the pixel scale weighting factor will be scale weighting factor 2.If the pixel is located in pixel row 3, the pixel's scale weighting factor will be scale weighting factor 3. Petition 870250089576, dated 10 / 01 / 2025, pp. 108 / 161 104 / 137
[349] Preferably, image blocks in at least one reference image region can be classified according to the position between the image blocks in the reference image region and the current block, and the scale weighting factors of the image blocks can be determined or obtained according to the classification results. Image areas in the reference image areas can be classified according to a position between the image area in at least one reference image area and the current block, and a scale weighting factor of the image area can be determined or obtained according to the classification result. For example, different scale weighting factors can be defined for different classification results.
[350] Preferably, when determining or obtaining a scale weighting factor based on the position between pixels in at least one reference image area, an image block and at least one item in the image area and the current block, the effectiveness of the determined scale weighting factor is guaranteed, making the subsequent determination of the obtained prediction mode more effective, thus improving the prediction effect of the prediction based on the prediction mode. Emphasis Mode 21: Determine or obtain a scale weighting factor based on at least one of a first image region, a first image block, and a first pixel that is adjacent and / or non-adjacent to at least one of a pixel, an image block, and an image region in at least one reference image region;
[351] Preferably, a scale weighting factor can be determined or obtained based on a first pixel. Petition 870250089576, dated 10 / 01 / 2025, pp. 109 / 161 105 / 137 adjacent and / or non-adjacent to a pixel in at least one area of the reference image. For example, when calculating the gradient magnitude value of pixel 1 in the reference image area, pixel 2 adjacent and / or non-adjacent to pixel 1 can be determined. If the prediction direction of pixel 2 is consistent with the prediction direction of pixel 1, the scale weighting factor of pixel 1 can be set to greater than 1, and / or, if the prediction direction of pixel 2 is inconsistent with the prediction direction of pixel 1, the scale weighting factor of pixel 1 can be set to less than 1. The scale weighting factor can also be set according to the magnitude of the gradient magnitude value of the first pixel. For example, the greater the gradient magnitude value, the greater the scale weighting factor.
[352] Preferably, the adjacent and / or non-adjacent image blocks to which the pixel in the reference image area is located can be determined, and the scale weighting factor can be determined or obtained. For example, if the prediction direction of the prediction mode corresponding to the adjacent and / or non-adjacent image blocks is consistent with the prediction direction of the pixel prediction mode, a larger value, such as 3, can be set for the pixel scale weighting factor. Or, if they are inconsistent, a smaller value, such as 0.5, can be set for the pixel scale weighting factor. The scale weighting factor can also be set according to the area magnitude values of adjacent and / or non-adjacent image blocks. For example, the larger the area magnitude value, the larger the scale weighting factor. Petition 870250089576, dated 10 / 01 / 2025, pp. 110 / 161 106 / 137 scale weighting.
[353] Preferably, an image area in which pixels in a reference image area are located, such as a T-shaped image area, can be determined, and adjacent and / or non-adjacent image areas to the T-shaped image area can be determined, so as to determine or obtain scale weights based on the adjacent and / or non-adjacent image areas. For example, the size of the scale weighting factor can be determined based on the consistency of the prediction directions. The scale weighting factor can also be defined based on the size of the area magnitude values corresponding to adjacent and / or non-adjacent regions of the image. For example, the larger the area magnitude value, the larger the scale weighting factor.
[354] Preferably, the scale weighting factor is determined or obtained based on a first image block that is adjacent and / or non-adjacent to an image block in at least one reference image region. For example, when the prediction direction of the first image block is consistent with the prediction direction of the image block, a larger scale weighting factor, such as a scale weighting factor greater than 1, can be defined and / or, when the prediction direction of the first image block is inconsistent with the prediction direction of the image block, a smaller scale weighting factor, such as a scale weighting factor less than 1, can be defined. The scale weighting factor can also be determined according to the size of the area magnitude value of the first image block. For example, the larger the area magnitude value, the larger the scale weighting factor. Petition 870250089576, dated 10 / 01 / 2025, pp. 111 / 161 107 / 137
[355] Preferably, the scale weighting factor is determined or obtained based on pixels or image areas that are adjacent and / or non-adjacent to an image block in at least one reference image area. For example, different scale weighting factors can be defined according to the pixel gradient magnitude value and / or the image region area magnitude value. For example, the higher the gradient magnitude value or the higher the area magnitude value, the higher the scale weighting factor.
[356] Preferably, the scale weighting factor is determined or obtained based on a first image region that is adjacent and / or non-adjacent to an image region of at least one reference image region. For example, when the prediction direction of the first image area is consistent with the prediction direction of the image area, a larger scale weighting factor, such as a scale weighting factor greater than 1, can be defined; when the prediction direction of the first image area is inconsistent with the prediction direction of the image area, a smaller scale weighting factor, such as a scale weighting factor less than 1, can be defined. The scale weighting factor can also be determined according to the size of the magnitude value of the area of the first image region. For example, the larger the magnitude value of the area, the larger the scale weighting factor.
[357] Preferably, a scale weighting factor is determined or obtained based on the area of the image and / or non-adjacent image pixels or blocks in at least one area of the reference image. For example, different scale weighting factors can be defined based on the value of Petition 870250089576, dated 10 / 01 / 2025, pp. 112 / 161 108 / 137 pixel gradient magnitude and / or image block area magnitude value. For example, the higher the gradient magnitude value or the higher the area magnitude value, the greater the scale weighting factor.
[358] Preferably, for DIMD mode, as shown in Figure 15, if there are pixels A and B in the reference image area of the block to be predicted (i.e., the current block). If the neighboring pixels of pixel A include at least one top pixel, one left pixel, one bottom pixel, and one right pixel, and if there is a pixel between these neighboring pixels that has the same gradient direction as pixel A, or the same predicted direction as pixel A, then the scale weighting factor of pixel A can be set to greater than 1; and / or, if there is a pixel between these neighboring pixels that has a different gradient direction (or a different predicted direction) from pixel A, then the scale weighting factor of pixel A can be set to less than 1.
[359] Preferably, if the adjacent pixels of pixel B include at least one top pixel, one left pixel, one bottom pixel, one right pixel, one top left pixel, one bottom left pixel, one top right pixel, and one bottom right pixel. If there is a pixel between these adjacent pixels that has the same gradient direction as pixel B, or the same predicted direction, the scale weighting factor of pixel B can be set to greater than 1; and / or, if there is a pixel between these adjacent pixels that has a different gradient direction (or different predicted direction) from pixel B, the scale weighting factor of pixel B can be set to greater than 1. Petition 870250089576, dated 10 / 01 / 2025, pp. 113 / 161 109 / 137
[360] Preferably, for OBIC mode, as shown in Figure 16, if the reference image area of the block to be predicted (i.e., the current block) includes a coded area and there is a coding block 1 in the coded area, the coding blocks adjacent to coding block 1 will include at least one of the image blocks top, left, bottom, right, top, left, bottom, left, top, and right. If among these adjacent coded blocks there is at least one block whose gradient or prediction direction is equal to that of coded block 1, the weighting factor of coded block 1 can be set to greater than 1; and / or, if among these adjacent coded blocks there is at least one block whose gradient or prediction direction is different from coded block 1, the weighting factor of coded block 1 can also be set to greater than 1.
[361] Preferably, the encoding block is an image block.
[362] Preferably, when determining or obtaining a scale weighting factor based on at least one of a first image area, a first image block and a first pixel that are adjacent and / or non-adjacent to at least one of a pixel, an image block and an image area in at least one reference image area, the validity of the determined scale weighting factor is guaranteed, which facilitates the subsequent determination of a more effective prediction mode, thus improving the prediction effect of the prediction based on the prediction mode. Implementation Mode 22: Determine or obtain a scale weighting factor according to an image region type of at least Petition 870250089576, dated 10 / 01 / 2025, pp. 114 / 161 110 / 137 an image region and / or an image block type of at least one image block and / or a pixel type of at least one pixel;
[363] Preferably, the pixel type, image block type and image region type may refer to method 15 in the embodiment above and will not be repeated in this document.
[364] Preferably, the scale weighting factor is determined or obtained according to the image region type of at least one image region. It is possible to determine a mapping table containing correspondences between different image area types and scale weighting factors, and the scale weighting factor corresponding to the image area type can be obtained by consulting the mapping table. Other methods can also be used to determine the scale weighting factor based on the image area type.
[365] Preferably, the scale weighting factor is determined or obtained according to an image block type from at least one image block. A mapping table comprising correspondences between image block types and scale weighting factors can be determined, and the scale weighting factor corresponding to the image block type of the image block can be obtained by consulting the mapping table.
[366] Preferably, if the position coordinates of an image block are located to the left of the current block, the image block type of the image block will be the image block to the left of the current block; if the position coordinates of an image block are located above the current block, Petition 870250089576, dated 10 / 01 / 2025, pages 115 / 161 111 / 137 The image block type of the image block will be the image block above the current block; and / or, if the position coordinates of an image block are located above the left side of the current block, the image block type of the image block will be an image block above the left side of the current block. An area magnitude histogram can be constructed for the three image block types, and a smaller scale weighting factor can be set for area magnitude values with smaller values, and a larger scale weighting factor can be set for area magnitude values with larger values. The scale weighting factors of the first two area magnitude values of each area histogram can be set to 1, and the scale weighting factors of the other area magnitude values can be set to 0.Thus, for each of the three area histograms, at most the area magnitude values of two intra-frame forecast directions are obtained. Subsequently, the forecast mode of one or more intra-frame forecast directions that are ultimately adopted is derived according to the six area magnitude values in the three area histograms, that is, the forecast mode of the current block.
[367] Preferably, the scale weighting factor is determined or obtained according to a pixel type of at least one pixel. A mapping table comprising correspondences between pixel types and scale weighting factors can be determined, and the scale weighting factor corresponding to the pixel type can be obtained by consulting the mapping table.
[368] Preferably, if the position coordinates of Petition 870250089576, dated 10 / 01 / 2025, pp. 116 / 161 If 112 / 137 pixels are located on the left side of the current block, the pixel type of the pixel will be determined as a pixel on the left side of the current block.
[369] Preferably, if the position coordinates of a pixel are located above the current block, the pixel type of the pixel will be determined as a pixel above the current block.
[370] Preferably, if the position coordinates of a pixel are located above the left side of the current block, the pixel type of the pixel will be determined as a pixel above the left side of the current block.
[371] Preferably, gradient magnitude histograms can be constructed separately for these three types. For each gradient magnitude histogram, a smaller scale weighting factor is defined for a smaller gradient magnitude value, and a larger scale weighting factor is defined for a larger gradient magnitude value. Preferably, the scale weighting factors of the first two gradient magnitude values of each gradient histogram can be defined as 1, and the scale weighting factors of other gradient magnitude values can be defined as 0. In this way, for each of the three gradient histograms, at most two gradient magnitude values are obtained in the prediction direction.Subsequently, the forecasting mode for one or more intraframe forecasting directions that are ultimately adopted is derived according to the six gradient magnitude values in the three gradient histograms, i.e., the forecasting mode of the current block.
[372] Preferably, when determining or obtaining a factor Petition 870250089576, dated 10 / 01 / 2025, pp. 117 / 161 113 / 137 scale weighting based on the image area type of at least one image area and / or the image block type of at least one image block and / or the pixel type of at least one pixel, the effectiveness of the determined scale weighting factor is guaranteed, making the subsequent determination of a more effective prediction mode more effective, thus improving the prediction effect of the prediction based on the prediction mode. Implementation Mode 23: Determine or obtain a scale weighting factor based on a horizontal distance, a vertical distance, and / or a shortest distance between a current block and at least one pixel, an image block, and an image region in at least one reference image region;
[373] Preferably, the scale weighting factor is determined or obtained according to a horizontal distance between pixels in at least one reference image region and the current block. Different zoom weighting factors can be defined for different horizontal distances. For example, the smaller the horizontal distance, the greater the scale weighting factor.
[374] Preferably, the scale weighting factor is determined or obtained based on a vertical distance between pixels in at least one reference image region and the current block. Different scale weighting factors can be defined according to different vertical distances. For example, the smaller the vertical distance, the larger the scale weighting factor.
[375] Preferably, the scale weighting factor is determined or obtained based on the smallest distance between pixels in at least one reference image region and the current block. Petition 870250089576, dated 10 / 01 / 2025, pp. 118 / 161 114 / 137 Different scale weighting factors can be defined according to different shorter distances. For example, the shorter the shorter distance, the higher the scale weighting factor.
[376] Preferably, for DIMD mode. For example, as shown in Figure 17, for pixel A in a pixel row located above the current block in the DIMD model, the scale weighting factor of pixel A can be determined according to a vertical distance between pixel A and the current block. The vertical distance between a pixel and the current block is the difference between the vertical coordinate of the pixel and the vertical coordinate of the current block. For a pixel B in a pixel row located to the left of the current block in the DIMD model, a scale weighting factor of pixel B can be determined according to a horizontal distance between pixel B and the current block. The horizontal distance between a pixel and the current block is the difference between the horizontal coordinate of the pixel and the horizontal coordinate of the current block.
[377] Preferably, the scale weighting factor is determined or obtained according to a horizontal distance, a vertical distance and / or a shorter distance between an image block in at least one reference image region and the current block.
[378] Preferably, the scale weighting factor is determined or obtained based on a horizontal distance and / or a vertical distance and / or a shorter distance between an image region in at least one reference image region and the current block. For example, the greater the horizontal distance, the smaller the scale weighting factor of the image block. Petition 870250089576, dated 10 / 01 / 2025, pp. 119 / 161 115 / 137 or the image region. The greater the vertical distance, the lower the scale weighting factor of the image block or image region. The greater the shorter distance, the lower the scale weighting factor of the image block or image region.
[379] Preferably, for OBIC mode, the scale weighting factor can be determined or obtained according to at least one horizontal distance, one vertical distance and one shortest distance between the image block and the current block.
[380] Preferably, the scale weighting factor can be determined or obtained based on a first distance between the current block and at least one pixel in at least one reference image region, an image block and an image region. Preferably, the first distance can be determined using the following formula (5) and / or formula (6). d= (x1 - x tf +(yl + y 2)2F6rmula ,5,; d= x1 -x2 + |y1+y2Formula (6);
[381] Preferably, x1 and y1 can be the horizontal and vertical coordinates of the current block, and x2 and y2 can be the horizontal and vertical coordinates of the image block. d can be the first distance.
[382] Preferably, the shorter the first distance, the greater the scale weighting factor, or the first distance may be compared to a predefined distance limit. If the first distance is greater than the predefined distance limit, the scale weighting factor may be set to less than 1; if the first distance is less than or equal to the predefined distance limit, the scale weighting factor may be set to greater than 1. Petition 870250089576, dated 10 / 01 / 2025, pp. 120 / 161 116 / 137
[383] Preferably, a ninth mapping table comprising the correspondence between pixels in at least one reference image area, an image block and at least one item in the image area, the horizontal distance between the current block and the scale weighting factor can be determined to determine or obtain the scale weighting factor. For example, after determining the horizontal distance between the pixel and the current block, a query can be made in the ninth mapping table to obtain the scale weighting factor.
[384] Preferably, the ninth mapping table can be defined according to Table 9 below. Table 9 Horizontal distance Scale weighting factor 4 1 3 1 2 2 1 4
[385] Preferably, a tenth mapping table comprising the correspondence between pixels in at least one reference image area, at least one item in the image block and the image area, the vertical distance between the current block and the scale weighting factor can be determined to determine or obtain the scale weighting factor. For example, after determining the vertical distance between the pixel and the current block, a query can be made on the tenth mapping table to obtain the scale weighting factor.
[386] The tenth mapping table can be defined according to Table 10 below. Table 10 Petition 870250089576, dated 10 / 01 / 2025, pp. 121 / 161 117 / 137 Vertical distance Scale weighting factor 4 1 3 1 2 2 1 4
[387] Preferably, an eleventh mapping table comprising the correspondence between pixels in at least one reference image area, an image block and at least one item in the image area, the shortest distance between the current block and the scale weighting factor can be determined to determine or obtain the scale weighting factor. For example, after determining the shortest distance between a pixel and the current block, a query can be made on the eleventh mapping table to obtain the scale weighting factor.
[388] The eleventh mapping table can be defined according to the following Table eleven. Table 11 Shortest distance Scale weighting factor 4 1 3 1 2 2 1 4
[389] Preferably, a function formula can be defined in advance, and the smallest distance, or horizontal distance, or vertical distance between pixels in at least one reference image area, the image block and at least one item in the image area and the current block can be entered into the function formula for calculation to obtain the scale weighting factor. Petition 870250089576, dated 10 / 01 / 2025, pages 122 / 161 118 / 137
[390] Preferably, the function formula can be as shown in the following formula (7). y=b-ax Formula (7);
[391] Preferably, y is a scale weighting factor, x is a horizontal or vertical distance or a shorter distance, and eaeb are constants, such as a is 0.5 and b is 4.
[392] Preferably, when determining or obtaining a scale weighting factor based on horizontal distance and / or vertical distance and / or the shortest distance between a pixel in at least one reference image area, an image block and at least one item in the image area and the current block, the effectiveness of the determined scale weighting factor is guaranteed, making the subsequent determination of the obtained prediction mode more effective, thus improving the prediction effect of the prediction based on the prediction mode. Implementation Mode 24: If the syntax element obtained in the bitstream meets the third condition, the scaling weight factor will be determined or obtained using the first scaling weight factor calculation strategy; if the syntax element obtained in the bitstream meets the fourth condition, the scaling weight factor will be determined or obtained using a second scaling weight factor calculation strategy that is different from the first scaling weight factor calculation strategy.
[393] Preferably, the syntax elements may refer to method 16 in the embodiment above, which will not be repeated in this document.
[394] Preferably, the third condition and the fourth condition are different. Petition 870250089576, dated 10 / 01 / 2025, pp. 123 / 161 119 / 137
[395] Preferably, the third condition may be that pixels, image blocks or image regions in at least one reference image region are in the same encoding tree as the current block.
[396] Preferably, the fourth condition may be that pixels, image blocks or image regions in at least one reference image region are not in the same encoding tree as the current block.
[397] Preferably, the third condition and the fourth condition can also be two different conditions defined by the user based on needs.
[398] Preferably, the priority of the third condition may be greater than the priority of the fourth condition.
[399] Preferably, the first strategy for calculating the scale weighting factor may include at least one of the following: determining or obtaining the scale weighting factor based on the position between at least one item among pixels, image blocks, and image regions in at least one reference image region and the current block; determining or obtaining the scale weighting factor based on at least one item among first image regions, first image blocks, and first pixels that are adjacent and / or non-adjacent to at least one item among pixels, image blocks, and image regions in at least one reference image region; determining or obtaining the scale weighting factor based on the image region type of at least one image region and / or the image block type of at least one image block and / or the pixel type of at least one pixel; determining or obtaining the scale weighting factor based on horizontal distance and / or vertical distance and / or distance Petition 870250089576, dated 10 / 01 / 2025, pp. 124 / 161 120 / 137 shortest between at least one item among pixels, image blocks and image regions in at least one reference image region and the current block.
[400] Preferably, the second strategy for calculating the scale weighting factor may include at least one of the following: determining or obtaining the scale weighting factor based on the position between at least one item among pixels, image blocks and image regions in at least one reference image region and the current block; determining or obtaining the scale weighting factor based on at least one item among first image regions, first image blocks and first pixels that are adjacent and / or non-adjacent to at least one item among pixels, image blocks and image regions in at least one reference image region; determining or obtaining the scale weighting factor based on the image region type of at least one image region and / or the image block type of at least one image block and / or the pixel type of at least one pixel;Determine or obtain the scale weighting factor based on the horizontal distance and / or vertical distance and / or shortest distance between at least one item among pixels, image blocks, and image regions in at least one reference image region and the current block.
[401] Preferably, when the processing device is a decoder, it can detect whether the syntax element obtained in the code stream meets the third condition. If the syntax element meets the third condition, the first scale weighting factor calculation strategy can be used to determine or obtain the scale weighting factor. Or, if the syntax element does not meet Petition 870250089576, dated 10 / 01 / 2025, pages 125 / 161 121 / 137 to the third condition, it is detected whether the syntax element meets the fourth condition; if the syntax element meets the fourth condition, the second strategy for calculating the scale weighting factor can be used to determine or obtain the scale weighting factor.
[402] Preferably, by selecting different calculation strategies to determine or obtain the scale weighting factor based on the conditions satisfied by the syntax elements obtained in the bitstream, the effectiveness of the determined scale weighting factor is guaranteed, making the subsequent prediction mode more effective and improving the prediction effect of the prediction based on the prediction mode. Fourth Example of a Mode of Implementation
[403] Based on any one of the above embodiments, a fourth embodiment is proposed.
[404] In this embodiment, the image processing method further comprises at least one of the following methods 25 to 27. Implementation Mode 25: Determine or obtain at least two different probabilities of occurrence based on at least one of the pixel gradients in different reference image regions, image blocks, or areas of image regions, and determine or obtain a prediction mode for the current block based on the at least two different probabilities of occurrence;
[405] Preferably, the different reference image regions may include at least two reference image regions, such as a first reference image region and a second reference image region. Petition 870250089576, dated 10 / 01 / 2025, pages 126 / 161 122 / 137
[406] Preferably, for the first reference image area, the magnitude value of the gradient corresponding to each pixel can be determined or obtained based on the gradient of the pixels in the first reference image area, and the first probability of occurrence of the multi-direction prediction mode can be determined or obtained based on the magnitude value of the gradient corresponding to each pixel.
[407] Preferably, for the second reference image area, the area magnitude value of each image block or image area can be determined or obtained based on at least one of the areas of the image blocks or image areas in the second reference image area, and the first probability of occurrence of the multi-direction prediction mode can be determined or obtained based on the area magnitude value of each image block or image area.
[408] Preferably, the value of the image block area magnitude or image area can be determined or obtained based on the image block area or image area in the first reference image area and then the first probability of occurrence of the multi-direction prediction mode can be determined or obtained based on the value of the image block area magnitude or image area.
[409] Preferably, the magnitude value of the image block area or image area can be determined or obtained based on the image block area or image area in the second reference image area, and then the first probability of occurrence of the multi-direction prediction mode can be determined or obtained based on the value of Petition 870250089576, dated 10 / 01 / 2025, pp. 127 / 161 123 / 137 magnitude of the image block area or image area.
[410] Preferably, for the first two probabilities of occurrence of the prediction mode of the same prediction direction (i.e., the first probability of occurrence corresponding to the first reference image area and the first probability of occurrence corresponding to the second reference image area), the maximum probability of occurrence may be selected, or the minimum probability of occurrence may be selected as the actual probability of occurrence of the prediction mode of the prediction direction. And among the actual probabilities of occurrence of the prediction modes in at least one prediction direction, a prediction mode corresponding to the maximum actual probability of occurrence is randomly selected or selected as the prediction mode of the current block.
[411] Preferably, two different occurrence probabilities of prediction modes for the same prediction direction can be calculated for different encoding trees. For example, based on at least one of the pixels, image blocks and image regions in the same encoding tree as the current block, the first occurrence probability of the multi-direction prediction mode is determined or obtained, and based on at least one of the pixels, image blocks and image regions that are not in the same encoding tree as the current block, the first occurrence probability of the multi-direction prediction mode is determined or obtained.
[412] Preferably, after determining two different probabilities of occurrence of the prediction mode Petition 870250089576, dated 10 / 01 / 2025, pp. 128 / 161 124 / 137 for the same forecast direction, the highest probability of occurrence or the lowest probability of occurrence can be selected as the actual probability of occurrence of the forecast mode for the forecast direction. And among the actual probabilities of occurrence of the forecast modes in at least one forecast direction, a forecast mode corresponding to the highest probability of actual occurrence is randomly selected or selected as the forecast mode of the current block.
[413] Preferably, by determining or obtaining at least two different occurrence probabilities based on at least one of the pixel gradients in different reference image regions, image block areas or image regions, and determining or obtaining the current block prediction mode based on at least two different occurrence probabilities, the accuracy of the determined prediction mode is guaranteed, thus improving the prediction effect of the prediction based on the prediction mode. Embodiment Mode 26: Reference image area comprising at least one left image area located to the left of the current block and one top image area located above the current block;
[414] Preferably, after determining that the reference image area is the left image area located on the left side of the current block, steps S21 and S22 in the embodiment above can be performed according to the left image area. That is, a first probability of occurrence of at least one prediction mode is determined or obtained based on pixels, image blocks, or image regions. Petition 870250089576, dated 10 / 01 / 2025, pp. 129 / 161 125 / 137 in the left image region, and a prediction mode for the current block is determined or obtained based on at least one first probability of occurrence.
[415] Preferably, after determining that the reference image area is a top image area located above the current block, steps S21 and S22 in the embodiment above can be performed according to the top image area. That is, a first probability of occurrence of at least one prediction mode is determined or obtained according to pixels, image blocks or image regions in the top image region, and a prediction mode of the current block is determined or obtained according to the at least one first probability of occurrence.
[416] Preferably, the left image area and / or the top image area may be an image area in the same encoding tree as the current block, or they may be an image area that is not in the same encoding tree as the current block.
[417] Preferably, for DIMD mode, the left image area and the top image area can be the image area where the left pixels are located and the image area where the top pixels are located on the same pixel row in the DIMD model, respectively.
[418] Preferably, by determining that the reference image area comprises at least one left image area located to the left of the current block and one top image area located above the current block, the effectiveness of the prediction mode determined or obtained based on the reference image area can be guaranteed, thereby improving the effect of Petition 870250089576, dated 10 / 01 / 2025, pp. 130 / 161 126 / 137 forecast based on the forecast mode. Implementation Mode 27: The prediction mode of the current block is determined or obtained according to the maximum probability of occurrence of at least one first probability of occurrence.
[419] Preferably, after determining or obtaining the first probability of occurrence of at least one prediction mode based on pixels, image blocks or image areas in at least one reference image area, the maximum probability of occurrence is selected from the at least first probability of occurrence, and the prediction mode of the prediction direction corresponding to the maximum probability of occurrence is determined as the prediction mode of the current block.
[420] Preferably, when determining or obtaining the prediction mode of the current block based on the maximum probability of occurrence of at least one first probability of occurrence, the validity of the determined or obtained prediction mode can be ensured, thereby improving the prediction effect of the prediction based on the prediction mode.
[421] Through the technical solution of this embodiment, during the video encoding and / or decoding prediction stage, as intra-frame prediction, the prediction mode can be directly determined based on at least one reference image area determined based on the image information of the current block, taking into account the relationship between the reference image area and the current block, so that the determined prediction mode is more accurate, i.e., the accuracy of the derived prediction mode is improved during the video encoding and / or decoding process, improving Petition 870250089576, dated 10 / 01 / 2025, pages 131 / 161 127 / 137 thus the forecasting effect of forecasting processing for the current block, such as improving forecast accuracy, thereby improving forecast efficiency during the video encoding and / or decoding process.
[422] With reference to Figure 18, the present embodiment also provides an image processing device, comprising:
[423] The A10 processing module is configured to determine or obtain at least one reference image region according to the image block information of the current block; and to determine or obtain a prediction mode of the current block according to at least one reference image region.
[424] Preferably, the A10 processing module is configured to run at least one of the following:
[425] Determine or obtain at least one reference image region according to at least one of the following: width, height, block size, block area, image block attribute and image block type of a current block;
[426] Based on information from at least one of the following image blocks corresponding to the current block: neighboring blocks, non-neighboring blocks, homologous blocks, temporal blocks and standard blocks, at least one reference image region is determined or obtained;
[427] Determine or obtain at least one reference image region of a second component image block of the current block according to information from the image block of the first component image block of the current block;
[428] Based on information from the image block of the block Petition 870250089576, dated 10 / 01 / 2025, pages 132 / 161 128 / 137 candidate, determined or obtained from the candidate motion vector or the candidate block vector of the current block, at least one reference image region is determined or obtained;
[429] If the current block satisfies the first condition, determine or obtain at least one reference image region according to a first calculation strategy;
[430] If the current block does not meet the first condition, at least one reference image region will be determined or obtained according to a second calculation strategy.
[431] Preferably, the second calculation strategy is different from the first calculation strategy.
[432] Preferably, the current bloc meets a first condition, comprising at least one of the following:
[433] The current block width is greater than or equal to a first predefined width limit;
[434] The height of the current block is greater than or equal to a first predefined height limit;
[435] The area of the current block is greater than or equal to a first predefined area limit.
[436] Preferably, the A10 processing module is configured to:
[437] To determine or obtain a first probability of occurrence of at least one prediction mode based on pixels, image blocks or image regions in at least one reference image region; and to determine or obtain a prediction mode of a current block based on at least one first probability of occurrence.
[438] Preferably, the A10 processing module is Petition 870250089576, dated 10 / 01 / 2025, pp. 133 / 161 129 / 137 configured to run at least one of the following:
[439] To determine or obtain a first magnitude value and a second magnitude value in the same prediction direction based on pixels, image blocks or image regions in at least one reference image region, and to determine or obtain a first probability of occurrence based on the first magnitude value and the second magnitude value in the same prediction direction;
[440] Determine or obtain at least one first magnitude value based on pixels, image blocks or image regions in at least one reference image region, and determine or obtain a first probability of occurrence based on the first magnitude value and a scale weighting factor;
[441] To determine or obtain a first probability of occurrence of a prediction direction of at least one prediction mode according to a gradient magnitude value and a gradient direction of a pixel in at least one reference image region;
[442] To determine or obtain a first probability of occurrence of a prediction direction of at least one prediction mode based on a prediction mode corresponding to an image block or an image region in at least one reference image region and an area of the image block or image region;
[443] To determine or obtain a probability of first occurrence based on at least one position, a horizontal distance, a vertical distance and a shortest distance between a pixel, an image block or an image region in Petition 870250089576, dated 10 / 01 / 2025, pp. 134 / 161 130 / 137 at least one reference image region and the current block;
[444] Determine or obtain a first occurrence probability according to a pixel type, an image block type and an image region type;
[445] If the syntax elements obtained in the code flow meet the second condition, the first probability of occurrence will be determined or obtained based on the first probability of occurrence calculation strategy and on the pixels, image blocks, or image areas in at least one reference image area. If the syntax elements obtained in the code flow do not meet the second condition, the first probability of occurrence will be determined or obtained based on a second probability of occurrence calculation strategy different from the first probability of occurrence calculation strategy and on the pixels, image blocks, or image areas in at least one reference image area.
[446] Preferably, the A10 processing module is configured to run at least one of the following:
[447] Determine a second probability of occurrence according to the first probability of occurrence and the scale weighting factor, and determine or obtain a prediction mode for the current block according to the second probability of occurrence;
[448] To determine or obtain a forecast of a current block according to a first probability of occurrence and a third probability of occurrence of the same forecast direction;
[449] A scale weighting factor of the first Petition 870250089576, dated 10 / 01 / 2025, pages 135 / 161 The probability of occurrence (131 / 137) is determined according to the fourth probability of occurrence, and a prediction mode for the current block is determined according to the first probability of occurrence and the scale weighting factor.
[450] Preferably, the scale weighting factor is determined or obtained by at least one of the following:
[451] Determine or obtain a scale weighting factor based on a position between at least one pixel in at least one reference image region, an image block and an image region and the current block;
[452] Determine or obtain a scale weighting factor based on at least one of a first image region, a first image block and a first pixel that is adjacent and / or non-adjacent to at least one of a pixel, an image block and an image region in at least one reference image region;
[453] Determine or obtain a scale weighting factor according to an image region type of at least one image region and / or an image block type of at least one image block and / or a pixel type of at least one pixel;
[454] Determine or obtain a scale weighting factor based on a horizontal distance, a vertical distance and / or a shortest distance between at least one pixel, an image block and an image region in at least one reference image region and the current block;
[455] If the syntax element obtained in the bitstream meets the third condition, the scale weighting factor will be determined or obtained using the first scale weighting factor calculation strategy; if the syntax element obtained in Petition 870250089576, dated 10 / 01 / 2025, pages 136 / 161 If the 132 / 137 bitstream meets the fourth condition, the scaling weight factor will be determined or obtained using a second scaling weight factor calculation strategy different from the first scaling weight factor calculation strategy.
[456] Preferably, the A10 processing module is configured to run at least one of the following:
[457] Determine or obtain at least two different probabilities of occurrence based on at least one of the pixel gradients in different reference image regions, image blocks or areas of image regions, and determine or obtain a prediction mode for a current block based on the at least two different probabilities of occurrence;
[458] The reference image region comprises at least one region of the left image located on the left side of the current block and one region of the top image located above the current block;
[459] The prediction mode of the current block is determined or obtained according to the maximum probability of occurrence of at least one first probability of occurrence.
[460] The image processing device provided in the embodiment of the present application has implementation principles and beneficial effects similar to the technical solutions shown in the embodiments of the corresponding method mentioned above and will not be described in detail here.
[461] One embodiment of the present application further provides a processing device comprising a memory and a processor. The memory stores a program of Petition 870250089576, dated 10 / 01 / 2025, pages 137 / 161 133 / 137 image processing and, when the image processing program is executed by the processor, the steps of the image processing method in any of the embodiments above are implemented.
[462] One embodiment of the present application further provides a storage medium containing a computer program stored therein. When the computer program is executed by a processor, the steps of the image processing method in either of the above embodiments are implemented.
[463] One embodiment of the processing device and storage medium provided in this application, all the technical characteristics of any of the image processing embodiments mentioned above may be included. The expanded and explained content of the specification is basically the same as the embodiments of the methods mentioned above and will not be repeated in this document.
[464] One embodiment of the present application further provides a computer program product, comprising computer program code. When the computer program code is executed on a computer, the computer executes the image processing method in the various possible implementation modes described above.
[465] One embodiment of the present application also provides a chip comprising a memory and a processor, wherein the memory is used to store computer programs, and the processor is used to call and execute computer programs from memory, so that a device equipped with the chip executes the processing methods of Petition 870250089576, dated 10 / 01 / 2025, pp. 138 / 161 134 / 137 image in several possible implementations, as described above.
[466] It is understandable that the above scenarios are merely illustrative and do not constitute a limitation to 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, a person skilled in the art will realize that, with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[467] The serial numbers of the embodiments above in this application are for description purposes only and do not represent the advantages or disadvantages of the embodiments.
[468] The steps in the implementation mode of this application can be adjusted in order, combined and deleted according to actual needs.
[469] The units in the device of the embodiment of the present application can be merged, split and deleted according to actual needs.
[470] In this application, the same or similar terminology, technical solutions and / or descriptions of application scenarios are generally described in detail only the first time they appear. When they reappear later, they are generally not repeated for the sake of brevity. To understand the technical solutions and other content of this application, for the same or similar terminology, technical solutions and / or Petition 870250089576, dated 10 / 01 / 2025, pp. 139 / 161 135 / 137 Application scenario descriptions that are not described in detail later, you can refer to the relevant detailed descriptions above.
[471] In this application, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a given embodiment, see the relevant description of other embodiments.
[472] The various technical features of the technical solution of this application can be combined arbitrarily. 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 within the scope of this application.
[473] Through the description of the above embodiments, those skilled in the art can clearly understand that the above implementation methods can be implemented by means of software plus the necessary general hardware platform and, of course, can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of this application can essentially, or the part that contributes to the state of the art, be embodied in the form of a software product. The computer software product is stored on a storage medium as mentioned above (such as ROM / RAM, disk, CD-ROM) and comprises a series of instructions to enable a terminal device (which may be a mobile phone, computer, server, controlled terminal or device of Petition 870250089576, dated 10 / 01 / 2025, pp. 140 / 161 136 / 137 network, etc.) to execute the method of each implementation mode of this application.
[474] In the above embodiments, all or part of them may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the implementation may be in the form of a computer program product. A computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a storage medium or transmitted from one storage medium to another.For example, computer instructions can be transmitted from one site, computer, server, or data center to another site, computer, server, or data center via wires (such as coaxial cable, fiber optics, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.). Storage media can be any available medium that can be accessed by a computer or a data storage device, such as a server or data center, that includes one or more available media. Available media can be magnetic media (e.g., floppy disks, memory sticks, tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[475] The examples above are merely modes of realization. Petition 870250089576, dated 10 / 01 / 2025, pp. 141 / 161 137 / 137 preferred versions of this application and do not limit the scope of the patent. All equivalent structures or flows obtained based on the description and drawings of this application, or their direct or indirect application in other related technical fields, are also included within the scope of protection of this patent application. Petition 870250089576, dated 10 / 01 / 2025, pages 142 / 161
Claims
1 / 7 CLAIMS 1. Image processing method, characterized in that it comprises the steps of: S10: determining or obtaining at least one reference image region according to information from the current block image block; S20: determining or obtaining a prediction mode of the current block according to at least one reference image region.
2. Method, according to claim 1, characterized in that step S10 comprises at least one of the following: determining or obtaining at least one reference image region according to at least one of the following: width, height, block size, block area, image block attribute and image block type of a current block; based on information from at least one of the following image blocks corresponding to the current block: neighboring blocks, non-neighboring blocks, homologous blocks, temporal blocks and standard blocks, at least one reference image region is determined or obtained; determining or obtaining at least one reference image region of a second component image block of the current block according to information from the image block of the first component image block of the current block;Based on the information from the candidate block image block, determined or obtained from the candidate motion vector or the candidate block vector of the current block, at least one reference image region is determined or obtained; Petition 870250089576, dated 10 / 01 / 2025, pp. 143 / 161 2 / 7 if the current block satisfies the first condition, determine or obtain at least one reference image region according to a first calculation strategy; if the current block does not meet the first condition, at least one reference image region will be determined or obtained according to a second calculation strategy.
3. A method according to claim 2, characterized in that the second computation strategy is different from the first computation strategy; and / or the current block satisfies a first condition, comprising at least one of the following: the width of the current block is greater than or equal to a first predefined width limit; the height of the current block is greater than or equal to a first predefined height limit; the area of the current block is greater than or equal to a first predefined area limit.
4. Method, according to claim 1, characterized in that step S20 comprises the steps of: S21: determining or obtaining a first probability of occurrence of at least one prediction mode based on pixels, image blocks or image regions in at least one reference image region; S22: determining or obtaining a prediction mode of the current block according to at least one first probability of occurrence.
5. Method, according to claim 4, characterized in that step S21 comprises at least one of the following: Petition 870250089576, dated 10 / 01 / 2025, page 144 / 161 3 / 7 determine or obtain a first magnitude value and a second magnitude value in the same prediction direction based on pixels, image blocks or image regions in at least one reference image region, and determine or obtain a first probability of occurrence based on the first magnitude value and the second magnitude value in the same prediction direction; determine or obtain at least one first magnitude value based on pixels, image blocks or image regions in at least one reference image region and determine or obtain a first probability of occurrence based on the first magnitude value and the scale weighting factor;to determine or obtain a first probability of occurrence of a prediction direction of at least one prediction mode according to a gradient magnitude value and a gradient direction of a pixel in at least one reference image region; to determine or obtain a first probability of occurrence of a prediction direction of at least one prediction mode based on a prediction mode corresponding to an image block or an image region in at least one reference image region and an area of the image block or image region; to determine or obtain a first probability of occurrence based on at least one position, a horizontal distance, a vertical distance, and a shortest distance between a pixel, an image block, or an image region in at least one reference image region and the current block;Petition 870250089576, dated 10 / 01 / 2025, page 145 / 161 4 / 7 determine or obtain a first occurrence probability according to a pixel type, an image block type, and an image region type; if the syntax elements obtained in the code flow meet the second condition, the first occurrence probability will be determined or obtained based on the first occurrence probability calculation strategy and on the pixels, image blocks, or image areas in at least one reference image area; if the syntax elements obtained in the code flow do not meet the second condition, the first occurrence probability will be determined or obtained based on a second occurrence probability calculation strategy different from the first occurrence probability calculation strategy and on the pixels, image blocks, or image areas in at least one reference image area.
6. Method, according to claim 4, characterized in that step S22 comprises at least one of the following: determining a second probability of occurrence according to the first probability of occurrence and the scale weighting factor, and determining or obtaining a prediction mode for the current block according to the second probability of occurrence; according to the first probability of occurrence and the third probability of occurrence of the same prediction direction, determining or obtaining the prediction mode of the current block; a scale weighting factor of the first probability of occurrence is determined according to the fourth probability of occurrence, and a prediction mode of the current block is determined according to the first probability of occurrence and the scale weighting factor.
7. Method, according to claim 5 or 6, characterized in that the scale weighting factor is determined or obtained by at least one of the following: pixels, image blocks and image regions in at least one reference image region. At least one item in the position between the current block, determines or obtains a scale weighting factor; determines or obtains a scale weighting factor based on at least one of a first image region, a first image block and a first pixel that is adjacent and / or non-adjacent to at least one of a pixel, an image block and an image region in at least one reference image region; determines or obtains a scale weighting factor according to an image region type of at least one image region and / or an image block type of at least one image block and / or a pixel type of at least one pixel;to determine or obtain a scale weighting factor based on a horizontal distance, a vertical distance, and / or a shortest distance between at least one pixel, an image block, and an image region in at least one reference image region and the current block; if the syntax element obtained in the bitstream meets the third condition, the scale weighting factor will be determined or obtained using the first scale weighting factor calculation strategy; if the syntax element obtained in the bitstream meets the fourth condition, the scale weighting factor will be determined or obtained using a second scale weighting factor calculation strategy different from the first scale weighting factor calculation strategy.
8. Method according to claim 4, characterized in that it further comprises at least one of the following: according to the pixels in different areas of the reference image, determine or obtain at least two different probabilities of occurrence based on at least one of the gradients of the image, the area of the image block or the area of the image region, and determine or obtain a prediction mode for the current block according to the at least two different probabilities of occurrence; the region of the reference image comprises at least one region of the left image located on the left side of the current block and a region of the top image located above the current block; the prediction mode of the current block is determined or obtained according to the maximum probability of occurrence of at least one first probability of occurrence.
9. Processing device, characterized in that it comprises: a memory and a processor, in which an image processing program is stored in memory, and when the image processing program is executed by the processor, the steps of the image processing method, as defined in claim 1, are implemented.
10. Storage medium, characterized in that a computer program is stored in the storage medium (Petition 870250089576, dated 10 / 01 / 2025, pp. 148 / 161 7 / 7) and, when the computer program is executed by a processor, the image processing method step, as defined in claim 1, is implemented (Petition 870250089576, dated 10 / 01 / 2025, pp. 149 / 161).