Image processing method, processing device and storage medium
By determining the context model based on image patch information, the problem of fixed context model selection in existing technologies is solved, thereby improving the efficiency of video encoding and decoding.
Patent Information
- Application Number
- CN202511386091.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2045-09-25
AI Technical Summary
In existing video coding technologies, the context model selection provided by the geometric partitioning mode (GPM) during image block division is fixed, resulting in low efficiency of entropy coding and entropy decoding, and an inability to flexibly determine or select encoding and decoding modes.
By determining or obtaining a context model based on image patch information, including a first context model, a second context model, and a third context model, and using image patch size parameters, fusion width information, neighborhood information, etc., a suitable context model is selected for encoding and decoding.
It improves the efficiency of video encoding and decoding, reduces encoding redundancy, and enhances the flexibility of encoding and decoding.
Smart Images

Figure CN121125987B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, specifically to an image processing method, processing device, and storage medium. Background Technology
[0002] The video coding techniques proposed by existing video coding standards aim to improve coding performance without significantly increasing computational complexity. Specifically, these techniques include dividing each frame into different blocks during video encoding and decoding, followed by prediction, transformation, and quantization processing, as well as entropy coding or entropy decoding.
[0003] In the process of conceiving and implementing this application, the inventors discovered at least the following problems: When dividing the image block in the image block segmentation stage, the segmentation mode used can be GPM (Geometric Partition Merge). Since the fusion width index judgment logic rules provided by GPM are fixed, the context model cannot be flexibly determined or selected for encoding and / or decoding in the entropy encoding and / or entropy decoding stages, which leads to low efficiency of encoding and / or decoding.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides an image processing method, processing device, and storage medium, aiming to improve the flexibility of determining or selecting a context model, thereby supporting the improvement of encoding and / or decoding efficiency.
[0006] This application provides an image processing method, applicable to a processing device, comprising the following steps: S10, determine or obtain the context model based on image patch information.
[0007] Optionally, the context model includes at least one of a first context model, a second context model, and a third context model.
[0008] Optionally, the image patch information includes at least one of the following: The image block's size parameters, aspect ratio, width, height, perimeter, and area; Image patch fusion width information; First template cost of the image patch; The image patch's fusion region, the index corresponding to the image patch's fusion region, and the flag bit corresponding to the image patch's fusion region; The size, position, and / or shape parameters of the fusion region of the image patch; The sequence resolution corresponding to the image patch; The frame type corresponding to the image patch; The encoding mode corresponding to the image block; Motion complexity corresponding to image patches; Neighborhood information corresponding to the image patch; The image patch's fusion width corresponds to at least one of the following: fusion width difference, index difference, and flag bit difference; The image patch's fusion region corresponds to at least one of the following: fusion region difference, index difference, and flag bit difference.
[0009] Optionally, the image processing method further includes at least one of the following: The first context model includes at least two different fourth context models; The image patch fusion width information includes at least one of the following: the image patch fusion width, the index corresponding to the image patch fusion width, and the flag bit corresponding to the image patch fusion width; Optionally, the neighborhood information includes at least one of the following: A partitioning pattern of at least one of the following: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks; The first fusion width is selected from at least one of the following: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks; The index and / or flag bits corresponding to the first fusion width; The first fusion region is selected from at least one of the following: neighboring block, non-neighboring block, co-located block, temporal block, default block, cross-component block, and candidate block; The index and / or flag bits corresponding to the first fusion region; The size parameters, position parameters, and / or shape parameters corresponding to the first fusion region.
[0010] Optionally, step S10 includes at least one of the following: If the image patch information satisfies the first condition, the first context model is determined or obtained. If the image patch information satisfies the second condition, the second context model is determined or obtained. If the image patch information satisfies the third condition, the third context model is determined or obtained.
[0011] Optionally, the image processing method further includes at least one of the following: Encoding and / or decoding are performed based on the first context model; Encoding and / or decoding are performed based on the second context model and the candidate list index; Encoding and / or decoding are performed based on a third context model and pattern index.
[0012] Optionally, the image processing method further includes at least one of the following: Encoding and / or decoding based on the first context model includes: When the index corresponding to the fusion width of at least one image block is a first value and / or the flag bit is a second value, entropy encoding and / or entropy decoding are performed based on the fourth context model and / or the first bit, and / or when the index corresponding to the fusion width of at least one image block is not a first value and / or the flag bit is not a second value, entropy encoding and / or entropy decoding are performed based on at least two different fourth context models and / or second length bits. The schema index corresponds to at least one decision tree schema; The candidate list corresponding to the candidate list index includes at least one of the following: the offset of the image block, the fusion width difference of the image block, the fusion width of the neighboring block, the fusion width of the non-neighboring block, the fusion width of the co-located block, the fusion width of the temporal block, the fusion width of the default block, the fusion width of the cross-component block, and the fusion width of the candidate block.
[0013] Optionally, the image patch information satisfies a first condition, including at least one of the following: At least one image block information is less than or equal to the first image block information threshold; At least one image patch size parameter is less than or equal to the first image size parameter threshold; At least one image patch size parameter matches the range of the first image size parameter; The cost of the second template corresponding to at least one image patch is less than or equal to the second template cost threshold; The first fusion width information cost is the lowest and corresponds to the first context model; At least one image patch has an inter-frame geometric partitioning fusion width that matches the inter-frame geometric partitioning fusion width of the first context model. The intra-frame geometric partitioning fusion width corresponding to at least one image patch matches the intra-frame geometric partitioning fusion width corresponding to the first context model.
[0014] Optionally, the image patch information satisfies the second condition, including at least one of the following: At least one image block information is less than or equal to the second image block information threshold; At least one image patch size parameter is greater than the first image size parameter threshold, and / or matches the second context model; At least one image patch size parameter and the second image size parameter range match; At least one image patch has a third template cost that is less than or equal to the third template cost threshold. The second fusion width information cost is the lowest and corresponds to the second context model; At least one image patch has an inter-frame geometric partitioning fusion width that matches the inter-frame geometric partitioning fusion width of the second context model. The intra-frame geometric partitioning fusion width corresponding to at least one image patch matches the intra-frame geometric partitioning fusion width corresponding to the second context model.
[0015] Optionally, the image patch information satisfies a third condition, including at least one of the following: At least one image block information is less than or equal to the threshold of the third image block information; At least one image patch size parameter is greater than the first image size parameter threshold, and / or matches the third context model; At least one image patch size parameter and the third image size parameter range match; The third fusion width information has the lowest cost and corresponds to the third context model; At least one image patch has a fourth template cost that is less than or equal to the fourth template cost threshold. At least one image patch has an inter-frame geometric partitioning fusion width that matches the inter-frame geometric partitioning fusion width of the third context model. At least one image patch has an intra-frame geometric partitioning fusion width that matches the intra-frame geometric partitioning fusion width of the third context model.
[0016] Optionally, the first fusion width information, or the second fusion width information, or the third fusion width information includes at least one of the following: The fusion width information that satisfies the fourth condition; The fusion width information is determined or obtained based on image patch information; The fusion width information is determined or obtained based on pre-training information; The fusion width information is determined or obtained based on the first lookup table and / or the first neural network; The minimum required bit length for fused width information; The merge width information after template matching reordering; Based on the fusion width information determined or obtained from the first decision tree model; The specified image block information input under the first judgment condition determines or obtains the fusion width information.
[0017] Optionally, at least one image block information is less than or equal to a first image block information threshold, and / or, at least one image block information is less than or equal to a second image block information threshold, and / or, at least one image block information is less than or equal to a third image block information threshold, including at least one of the following: The size parameter of at least one image block is less than or equal to the threshold of at least one second image size parameter; At least one image patch has an aspect ratio less than or equal to at least one aspect ratio threshold; At least one image patch has a width less than or equal to at least one width threshold; At least one image block has a height less than or equal to at least one height threshold; At least one image patch has a perimeter less than or equal to at least one perimeter threshold; The area of at least one image patch is less than or equal to at least one area threshold; At least one fusion width information is less than or equal to the second fusion width information threshold; The first template cost of at least one image patch is less than or equal to the first template cost threshold; The fusion region of at least one image patch is threshold-matched with at least one first fusion region; The index of the fusion region is less than or equal to at least one image patch of a first index threshold; The flag bit of the fused region is less than or equal to at least one first flag bit threshold of at least one image block; The size parameter of the fusion region is less than or equal to at least one image block of at least one third image size parameter threshold; At least one image patch whose location parameters of the fused region match at least one location parameter threshold; At least one image patch whose shape parameters of the fusion region match at least one shape parameter threshold; At least one image patch corresponds to a sequence resolution that is less than or equal to at least one sequence resolution threshold; At least one image patch corresponds to a frame type that matches at least one first frame type; At least one image block corresponds to a coding pattern that matches at least one first coding pattern; The motion complexity corresponding to at least one image patch is less than or equal to at least one motion complexity threshold; The neighborhood information corresponding to at least one image patch is less than or equal to the threshold of at least one neighborhood information; At least one fusion width difference is less than or equal to the first fusion width difference threshold; The fusion width of at least one image patch and / or the index difference corresponding to the fusion region is less than or equal to at least one first index difference threshold; The fusion width of at least one image block and / or the flag bit difference value corresponding to the fusion region is less than or equal to at least one first flag bit difference value threshold; At least one fusion region difference is less than or equal to the first fusion region difference threshold.
[0018] Optionally, this application also provides an image processing apparatus, comprising: The processing module is used to determine or obtain the context model based on image patch information.
[0019] This application also provides a processing device, including: a memory and a processor, wherein the memory stores an image processing program, and when the image processing program is executed by the processor, it implements the steps of any of the image processing methods described above.
[0020] This application also provides a storage medium storing a computer program that, when executed by a processor, implements the steps of any of the image processing methods described above.
[0021] As described above, the image processing method of this application can be applied to a processing device, including: determining or obtaining a context model based on image patch information. Through the technical solution of this application, when determining or selecting a context model, image patch information can be referenced to flexibly determine or select the context model, thereby supporting improved efficiency in video encoding and / or decoding. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0023] Figure 1 A schematic diagram of the hardware structure of a smart terminal to implement the various embodiments of this application; Figure 2 A communication network system architecture diagram provided for an embodiment of this application; Figure 3 A schematic diagram of the hardware structure of a controller 140 provided in this application; Figure 4 A schematic diagram of the hardware structure of a network node 150 provided in this application; Figure 5 This is a flowchart illustrating the image processing method based on the first embodiment; Figure 6 This is a flowchart illustrating the process of determining the bits corresponding to the fusion width using a context model in the image processing method shown in the second embodiment; Figure 7 This is another flowchart illustrating the process of determining the bits corresponding to the fusion width using a context model in the image processing method shown in the third embodiment; Figure 8 This is another flowchart illustrating the process of determining the bits corresponding to the fusion width using a context model in the image processing method shown in the third embodiment; Figure 9This is another flowchart illustrating the process of determining the bits corresponding to the fusion width using a context model in the image processing method shown in the fourth embodiment; Figure 10 This is a schematic diagram of the prediction module in an image processing device.
[0024] The realization of the objectives, functional features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0026] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0027] It should be understood that although the terms first, second, third, etc., may be used herein to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this document, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word “if” as used herein may be interpreted as “when…” or “in response to determination”. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of the stated feature, step, operation, element, component, item, kind, and / or group, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms “or,” “and / or,” “including at least one of the following,” etc., as used in this application may be interpreted as inclusive, or mean any one or any combination thereof. For example, "including at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C." Similarly, "A, B, or C" or "A, B, and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C." Exceptions to this definition only occur when the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0028] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0029] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”
[0030] It should be noted that step designations such as S10 are used in this document for the purpose of more clearly and concisely describing the corresponding content, and do not constitute a substantial limitation on the order. All of these should be within the scope of protection of this application.
[0031] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0032] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0033] The processing device in this application can be a server, a smart terminal, or other devices. Optionally, the smart terminal can be implemented in various forms. For example, the smart terminal described in this application can include smart terminals such as mobile phones, tablets, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0034] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from elements specifically designed for mobile purposes, the construction according to the embodiments of this application can also be applied to fixed-type terminals.
[0035] Please see Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of this application. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0036] The following is combined Figure 1 A detailed introduction to each component of the mobile terminal: The radio frequency unit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 110; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, and a duplexer. Furthermore, the radio frequency unit 101 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution), 5G, and 6G.
[0037] WiFi is a short-range wireless transmission technology. Mobile terminals, through the WiFi module 102, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 WiFi module 102 is shown, but it is understood that it is not a necessary component of a mobile terminal and can be omitted as needed without changing the nature of the invention.
[0038] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into audio signals and output them as sound when the mobile terminal 100 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the audio output unit 103 can also provide audio output related to specific functions performed by the mobile terminal 100 (e.g., call signal receiving sound, message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.
[0039] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage media) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) in operating modes such as telephone call mode, recording mode, and voice recognition mode, and can process such 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 telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.
[0040] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Optionally, the light sensor includes an ambient light sensor and a proximity sensor. Optionally, the ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light level, and the proximity sensor can turn off the display panel 1061 and / or backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0041] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0042] User input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile terminal. Optionally, user input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as touch screen, can collect touch operations on or near the user (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1071), and drive corresponding connection devices according to a pre-set program. Touch panel 1071 may include two parts: a touch detection device and a touch controller. Optionally, the touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 110, and can receive and execute commands sent by processor 110. In addition, 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. Optionally, other input devices 1072 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., without being specifically limited here.
[0043] Optionally, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal. The specific implementation is not limited here.
[0044] Interface unit 108 serves as an interface through which at least one external device can connect to mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 108 may be used to receive input (e.g., data, power, etc.) from the external device and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and the external device.
[0045] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. Optionally, the program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0046] The processor 110 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. Optionally, the application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.
[0047] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0048] although Figure 1 As not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.
[0049] To facilitate understanding of the embodiments of this application, the communication network system on which the mobile terminal of this application is based is described below.
[0050] Please see Figure 2 , Figure 2 This application provides a communication network system architecture diagram. The communication network system is an LTE system based on the universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and the operator's IP services 204, which are connected in sequence.
[0051] Optionally, UE201 can be the aforementioned mobile terminal 100, which will not be described in detail here.
[0052] E-UTRAN202 includes eNodeB2021 and other eNodeB2022s. Optionally, eNodeB2021 can connect to other eNodeB2022s via backhaul (e.g., X2 interface). eNodeB2021 connects to EPC203 and can provide UE201 with access to EPC203.
[0053] EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving Gateway) 2034, a PGW (Packet Data Network Gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, etc. Optionally, MME2031 is the control node that handles signaling between UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as the Home Location Register (not shown in the figure) and stores user-specific information such as service characteristics and data rates. All user data can be sent through SGW2034. PGW2035 can provide UE 201 IP address allocation and other functions. PCRF2036 is the policy and charging control decision point for service data flow and IP bearer resources. It selects and provides available policy and charging control decisions for the policy and charging enforcement function unit (not shown in the figure).
[0054] IP services 204 may include the Internet, intranet, IMS (IP Multimedia Subsystem), or other IP services.
[0055] Although the above description uses the LTE system as an example, those skilled in the art should know that this application is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, 5G and future new network systems (such as 6G), etc., without limitation.
[0056] Figure 3This is a schematic diagram of the hardware structure of a controller 140 provided in this application. The controller 140 includes a memory 1401 and a processor 1402. The memory 1401 is used to store program instructions, and the processor 1402 is used to call the program instructions in the memory 1401 to execute the steps performed by the controller in the first embodiment of the above method. The implementation principle and beneficial effects are similar, and will not be described again here.
[0057] Optionally, the controller further includes 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 receiving and sending functions of the controller 140.
[0058] Figure 4 This application provides a schematic diagram of the hardware structure of a network node 150. The network node 150 includes a memory 1501 and a processor 1502. The memory 1501 is used to store program instructions, and the processor 1502 is used to call the program instructions in the memory 1501 to execute the steps performed by the first node in the first embodiment of the above method. The implementation principle and beneficial effects are similar, and will not be described again here.
[0059] Optionally, the controller further includes 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 receiving and sending functions of the network node 150.
[0060] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0061] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a storage medium or transmitted from one storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk, SSD), etc.
[0062] Based on the above-described mobile terminal hardware structure and communication network system, various embodiments of this application are proposed.
[0063] Optionally, since the fusion width of GPM (Geometric Partition Merge) in ECM (Enhanced Coding Model) only provides five candidate values (e.g., 0 to 4), its entropy coding will be performed in a multi-level judgment manner, and the selection of its context model is fixed.
[0064] For example, one bit is first used to determine if it is 2. If not, two bits are used to distinguish other fusion widths. However, in actual video sequences, the fusion width of small regions (such as 4x4 image blocks or 8x8 image blocks) is more likely to be the candidate value 0. However, since the first-level discrimination method of this multi-level judgment method is to first determine if it is 2, the probability of entropy encoding and / or entropy decoding based solely on the first bit is low, the coding redundancy increases, and thus affects the overall encoding and / or decoding efficiency.
[0065] Therefore, in the following embodiments of this application, the image processing method can analyze the statistical characteristics of image blocks (such as 4x4 image blocks, 8x8 image blocks), optimize the first-layer judgment strategy of multi-level entropy coding to make it more consistent with the actual distribution (e.g., when the block is small, the width is judged to be 0 first), thereby reducing the average bit rate, and / or combining the actual distribution to select a suitable context model, improving the flexibility of context model selection; and / or designing a fusion width prediction mechanism based on neighborhood information, when adjacent blocks have used GPM and there is an effective fusion width, reusing the width without explicit transmission, and reusing the context model adopted by the neighborhood information, improving the flexibility of context model selection, and achieving more efficient bit saving, so as to improve the efficiency of video encoding and / or decoding.
[0066] For ease of understanding, the GPM that may be involved in the embodiments of this application will be explained below.
[0067] (I) The basic principles of GPM.
[0068] Optionally, for any image and / or image patch, when using GPM mode, the CU (Coding Unit) can be divided into at least two parts by geometrically positioned straight lines or line segments. Each partition after CU division contains separate motion information. Each partition only allows unidirectional prediction, that is, each partition has only one motion vector and one reference index. This constraint ensures that each CU is the same as traditional bidirectional prediction, that is, each CU only needs two motion vectors and a reference frame index.
[0069] Optionally, when using GPM to divide an image and / or image blocks, the fusion width needs to be encoded and / or decoded first, and then fused based on the fusion width in subsequent encoding and / or decoding processes.
[0070] First Embodiment Reference Figure 5 , Figure 5 This is a flowchart illustrating the image processing method based on the first embodiment. The image processing method of this application embodiment can be applied to a processing device, including step S10: Step S10: Determine or obtain the context model based on the image patch information.
[0071] In this embodiment, the processing device can be a smart terminal, such as a mobile phone or computer, or a server, such as a local server or a cloud server. This embodiment and this application primarily use a smart terminal as an example for illustration.
[0072] Optionally, the technical solution of this embodiment can be applied to fields such as image encoding and decoding, video encoding and decoding, hardware video encoding and decoding, dedicated circuit video encoding and decoding, and real-time video encoding and decoding.
[0073] Optionally, the processing device can acquire video image data from a video source and segment each frame of the video image data (e.g., using GPM segmentation) to obtain at least one image block.
[0074] Optionally, the image patch information may be the image patch parameters of at least one image patch, or the neighborhood information of at least one image patch in time and space.
[0075] Optionally, the image patch information includes at least one of the following methods 1 to 12: Method 1, at least one of the following image block size parameters: aspect ratio, width, height, perimeter, and area; Optionally, the size parameters of the image block may include at least one of the aspect ratio, width, height, perimeter, and area of the image block, and may also include variations (such as scaling down or scaling up) or indices corresponding to the aspect ratio, width, height, perimeter, and area of the image block.
[0076] Optionally, the image block information may include at least one of the following: size parameters of at least one image block, aspect ratio, width, height, perimeter, and area.
[0077] Optionally, a context model is determined or obtained based on at least one of the following: size parameters of at least one image patch, aspect ratio, width, height, perimeter, and area, and / or encoding and / or decoding are performed based on at least one context model.
[0078] Optionally, different image patch size parameters can be set to correspond to different context models, or different context models can be determined or selected based on different size parameters. For example, for image patches with a width greater than 8, a context model that is better at processing larger image patches can be determined or selected for encoding and / or decoding.
[0079] Optionally, different aspect ratios of image blocks can be set to correspond to different context models, or different context models can be determined or selected based on different aspect ratios of image blocks. For example, image blocks with an aspect ratio of 8:8 can determine or select the context model with the lowest rate-distortion cost for encoding and / or decoding.
[0080] Optionally, different image patch widths can be set to correspond to different context models, or different context models can be determined or selected based on the width of different image patches. For example, an image patch with a width of 8 can determine or select the context model with the lowest rate-distortion cost for encoding and / or decoding.
[0081] Optionally, different image block heights can be set to correspond to different context models, or different context models can be determined or selected based on the height of different image blocks. For example, an image block with a height of 8 can determine or select the context model with the lowest rate-distortion cost for encoding and / or decoding.
[0082] Optionally, different context models can be set for different image patch perimeters, or different context models can be determined or selected based on the perimeter of different image patches. For example, an image patch with a perimeter of 16 can determine or select the context model with the lowest rate-distortion cost for encoding and / or decoding.
[0083] Optionally, different image patch areas can be set to correspond to different context models, or different context models can be determined or selected based on the area of different image patches. For example, an image patch with an area of 32 can determine or select the context model with the lowest rate-distortion cost for encoding and / or decoding.
[0084] In this approach, at least one of the image block's size parameters, aspect ratio, width, height, perimeter, and area is used as image block information to determine or obtain a context model based on the image block information. In the process of determining or obtaining the context model, at least one of the image block's size parameters, aspect ratio, width, height, perimeter, and area is referenced, which enables flexible determination or selection of the context model.
[0085] Method 2: Image patch fusion width information; Optionally, the image patch fusion width information includes at least one of the image patch fusion width, the index corresponding to the image patch fusion width, and the flag bit corresponding to the image patch fusion width.
[0086] Optionally, the fusion width of the image patch can be the CU partitioning performed using GPM during the inter-frame prediction stage to obtain at least one image patch, or the fusion width determined or obtained when partitioning using GPM.
[0087] Optionally, when using GPM partitioning, a fusion region is determined or obtained, and / or a dividing line can be generated in the fusion region to partition the CU. Therefore, the half-width of the fusion region can be used as the fusion width. For example, the first fusion width of the image block can be the half-width of the fusion region of the CU corresponding to the image block.
[0088] Optionally, a lookup table containing the correspondence between the fusion width of at least one image patch and the index can be used to determine or obtain the index corresponding to the fusion width of the image patch. Alternatively, the fusion width of the image patch can be assigned a corresponding index, such as at least one of 0, 1, 2, 3, 4, or at least one of 1, 2, 3, 4, 5.
[0089] Optionally, a lookup table containing the correspondence between the fusion width of at least one image block and the flag bit can be used to determine or obtain the flag bit corresponding to the fusion width of the image block. Alternatively, the fusion width of the image block can be assigned a corresponding flag bit, such as at least one of 0, 1, 2, 3, 4, or at least one of 1, 2, 3, 4, 5.
[0090] Optionally, the image block information may include the fusion width information of the image block; the image block information may include at least one of the fusion width of the image block, the index corresponding to the fusion width of the image block, and the flag bit corresponding to the fusion width of the image block.
[0091] Optionally, a context model can be determined or obtained based on at least one of the image patch fusion width, the index corresponding to the image patch fusion width, and the flag bit corresponding to the image patch fusion width, and / or encoding and / or decoding can be performed based on at least one context model.
[0092] Optionally, different image patch fusion widths can be set to correspond to different context models, or different context models can be determined or selected based on different image patch fusion widths. For example, for an image patch with a fusion width of 4 (e.g., 4 pixels wide), the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0093] Optionally, different context models can be set for the fusion width index of different image blocks, or different context models can be determined or selected based on the fusion width index of different image blocks. For example, for an image block with an index of 0 corresponding to the fusion width, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0094] Optionally, different context models can be set for different image patch fusion width flags, or different context models can be determined or selected based on different image patch fusion width flags. For example, for an image patch with index 0 corresponding to the fusion width, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0095] In this approach, the fusion width information of image patches is used as image patch information to determine or obtain a context model based on the image patch information. In the process of determining or obtaining the context model, the fusion width information of the image patches is referenced, which enables flexible determination or selection of the context model.
[0096] Method 3, first template cost of image patch; Optionally, the template for the image block can be a pre-set template containing at least one fusion width, which can be L-shaped, T-shaped, or otherwise unrestricted. The template for the image block can be used to approximate the image block.
[0097] Optionally, the first template cost of the image patch can be the template cost of the image patch, which can be the cost obtained by rate-distortion cost calculation on at least one template of the image patch.
[0098] Optionally, the image patch information may include the template cost of the image patch.
[0099] Optionally, a context model can be determined or obtained based on the first template cost of the image patch, and / or encoding and / or decoding can be performed based on at least one context model.
[0100] Optionally, different context models can be set for different image blocks to correspond to different template costs, thereby determining the context model corresponding to the first template cost. Different context models can also be determined or selected based on the first template cost of different image blocks. For example, for the image block with the smallest first template cost, the context model with the smallest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0101] In this approach, the first template cost of the image patch is used as the image patch information to determine or obtain the context model based on the image patch information. In the process of determining or obtaining the context model, the first template cost of the image patch is referenced, which enables flexible determination or selection of the context model.
[0102] Method 4, at least one of the following: the fusion region of the image patch, the index corresponding to the fusion region of the image patch, and the flag bit corresponding to the fusion region of the image patch; Optionally, the fusion region of the image patch can be the CU partitioning performed using GPM during the inter-frame prediction stage to obtain at least one image patch, or the fusion region determined or obtained during GPM partitioning.
[0103] Optionally, at least one dividing line can be generated in the determined or obtained fusion region to perform CU division, resulting in at least one image block. In this case, the at least one image block can have half of the fusion region.
[0104] Optionally, at least two image patches correspond to the same fusion region, and / or half the width of the fusion region can be the fusion width of the image patches.
[0105] Optionally, a context model can be determined or obtained based on at least one of the fusion region of the image patch, the index corresponding to the fusion region of the image patch, and the flag bit corresponding to the fusion region of the image patch, and / or encoding and / or decoding can be performed based on at least one context model.
[0106] Optionally, different context models can be set for the fusion regions of different image blocks, or different context models can be determined or selected based on the fusion regions of different image blocks. For example, if the width and height of the fusion region of an image block are 4x4, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0107] Optionally, different context models can be set for the indices of the fusion regions of different image blocks, or different context models can be determined or selected based on the indices of the fusion regions of different image blocks. For example, for an image block with an index of 0 corresponding to the fusion region, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0108] Optionally, different context models can be set for the flag bits of the fusion region of different image blocks, or different context models can be determined or selected based on the flag bits of the fusion region of different image blocks. For example, for an image block with index 0 corresponding to the fusion region, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0109] In this method, at least one of the image block fusion region, the index corresponding to the image block fusion region, and the flag bit corresponding to the image block fusion region is used as image block information so that the context model can be determined or obtained based on the image block information. In the process of determining or obtaining the context model, at least one of the image block fusion region, the index corresponding to the image block fusion region, and the flag bit corresponding to the image block fusion region is referenced, so that the context model can be flexibly determined or selected.
[0110] Method 5: Size parameters, position parameters, and / or shape parameters corresponding to the fusion region of the image patch; Optionally, the size parameters corresponding to the fusion region of the image patch may include at least one of the aspect ratio, width, height, perimeter, and area of the image patch, and may also include variations (such as scaling down or scaling up) or indices corresponding to the aspect ratio, width, height, perimeter, and area of the image patch.
[0111] Optionally, the image block information may include at least one of the following: size parameters of at least one image block, aspect ratio, width, height, perimeter, and area.
[0112] Optionally, a context model is determined or obtained based on at least one of the size parameters, aspect ratio, width, height, perimeter, and area corresponding to the fusion region of at least one image patch, and / or encoding and / or decoding are performed based on at least one context model.
[0113] Optionally, different size parameters can be set for the fusion region of different image blocks, corresponding to different context models. Alternatively, different context models can be determined or selected based on the size parameters of the fusion region of image blocks of different sizes. For example, for image blocks with a fusion region width greater than 8, a context model that performs better in processing larger image blocks can be determined or selected for encoding and / or decoding.
[0114] Optionally, different aspect ratios of the fusion region of different image blocks can be set to correspond to different context models. Alternatively, different context models can be determined or selected based on the aspect ratio of the fusion region of different image blocks. For example, for image blocks with an aspect ratio of 8:8, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0115] Optionally, different context models can be set for the width of the fusion region of different image blocks, or different context models can be determined or selected based on the width of the fusion region of different image blocks. For example, for an image block with a fusion region width of 8, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0116] Optionally, different context models can be set for the height of the fusion region of different image blocks, or different context models can be determined or selected based on the height of the fusion region of different image blocks. For example, for an image block with a fusion region height of 8, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0117] Optionally, different context models can be set for the perimeter of the fusion region of different image blocks, or different context models can be determined or selected based on the perimeter of the fusion region of different image blocks. For example, for an image block with a fusion region perimeter of 16, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0118] Optionally, different context models can be set for the area of the fusion region of different image blocks, or different context models can be determined or selected based on the area of the fusion region of different image blocks. For example, for an image block with a fusion region area of 32, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0119] Optionally, the position parameter corresponding to the fusion region of the image block can be the position of at least one element in the fusion region within at least one image block, such as the diagonal region within the image block, the region containing the first pixel in the upper left corner, or the region with a specified pixel position in the image block.
[0120] Optionally, the image patch information may include positional parameters corresponding to the fusion region of at least one image patch, and / or may determine or obtain a context model based on the positional parameters corresponding to the fusion region of at least one image patch, and / or encode and / or decode based on at least one context model.
[0121] Optionally, different context models can be set for the position parameters corresponding to the fusion regions of different image blocks. Alternatively, different context models can be determined or selected based on the position parameters corresponding to the fusion regions of different image blocks. For example, if at least one element in the fusion region of an image block is located in the diagonal region within the image block, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0122] Optionally, the shape parameter corresponding to the fusion region of the image patch can be the shape parameter of the fusion region, or it can be the shape parameter of a portion of the fusion region in the image patch.
[0123] Optionally, the shape parameters may include rectangles and non-rectangles, and non-rectangles may include trapezoids, ellipses, etc.
[0124] Optionally, different context models can be set for the shape parameters corresponding to the fusion regions of different image blocks, or different context models can be determined or selected based on the shape parameters corresponding to the fusion regions of different image blocks. For example, for image blocks with rectangular fusion regions, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0125] In this approach, the size parameters, position parameters, and / or shape parameters corresponding to the fusion region of the image patch are used as image patch information to determine or obtain a context model based on the image patch information. In the process of determining or obtaining the context model, the size parameters, position parameters, and / or shape parameters corresponding to the fusion region of the image patch are referenced, which enables flexible determination or selection of the context model.
[0126] Method 6: Sequence resolution corresponding to image patches; Optionally, the sequence resolution corresponding to the image patch can be the pixel size (width x height) of each frame in the video sequence to which the image patch belongs.
[0127] Optionally, the image patch information may include the sequence resolution corresponding to at least one image patch, and / or the context model may be determined or obtained based on the sequence resolution corresponding to at least one image patch, and encoding and / or decoding may be performed based on at least one context model.
[0128] Optionally, different sequence resolutions can be set to correspond to different context models. Thus, the context model can be determined or obtained based on the sequence resolution corresponding to at least one image patch. Different context models can also be determined or selected based on different sequence resolutions corresponding to the image patch. For example, if the sequence resolution corresponding to the image patch is less than a preset sequence resolution threshold (such as a sequence resolution threshold with a width x height of 16x16), the context model with the lowest rate distortion cost can be determined or selected for encoding and / or decoding.
[0129] In this approach, the sequence resolution corresponding to the image patch is used as the image patch information so that the context model can be determined or obtained based on the image patch information. In the process of determining or obtaining the context model, the sequence resolution corresponding to the image patch is referenced, which can enable flexible determination or selection of the context model.
[0130] Method 7, the frame type corresponding to the image block; Optionally, the frame type may include I-frames (Intra Frames, keyframes), P-frames (Predicted Frames), and B-frames (Bi-Predicted Frames), and may also include SI frames for bitrate switching and SP frames for stream switching, etc.
[0131] Optionally, the image patch information includes the frame type corresponding to at least one image patch, and / or a context model can be determined or obtained based on the frame type corresponding to at least one image patch, and encoding and / or decoding can be performed based on at least one context model.
[0132] Optionally, different frame types can be set to correspond to different context models. Thus, the context model can be determined or obtained based on the frame type corresponding to at least one image patch. Different context models can also be determined or selected based on different frame types corresponding to the image patch. For example, if the frame type corresponding to the image patch is an I-frame, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0133] In this approach, the frame type corresponding to the image block is used as the image block information so that the context model can be determined or obtained based on the image block information. In the process of determining or obtaining the context model, the frame type corresponding to the image block is referenced, which enables flexible determination or selection of the context model.
[0134] Method 8, the encoding mode corresponding to the image block; Optionally, the encoding mode corresponding to the image block may include the encoding mode already used by the image block (which may be inter-frame encoding mode, intra-frame encoding mode, GPM mode, etc.).
[0135] Optionally, the image patch information includes the encoding mode corresponding to at least one image patch, and / or a context model can be determined or obtained based on the encoding mode corresponding to at least one image patch, and encoding and / or decoding can be performed based on at least one context model.
[0136] Optionally, if the encoding mode corresponding to the image patch includes the GPM mode, then the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0137] In this approach, the encoding mode corresponding to the image block is used as the image block information so that the context model can be determined or obtained based on the image block information. In the process of determining or obtaining the context model, the encoding mode corresponding to the image block is referenced, which can enable flexible determination or selection of the context model.
[0138] Method 9, motion complexity corresponding to image patches; Optionally, motion complexity can be used to describe the intensity, irregularity, and prediction difficulty of object motion in the video sequence corresponding to the image patch.
[0139] Optionally, the image patch information includes the motion complexity corresponding to at least one image patch, and / or a context model can be determined or obtained based on the motion complexity corresponding to at least one image patch, and encoding and / or decoding can be performed based on at least one context model.
[0140] Optionally, different context models can be set for different motion complexities. At least one context model can be determined or obtained based on the motion complexity of at least one image patch. For example, for image patches with motion complexity less than a preset motion complexity threshold (e.g., 8), the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0141] In this approach, the motion complexity corresponding to an image patch is used as image patch information to determine or obtain a context model based on the image patch information. In the process of determining or obtaining the context model, the motion complexity corresponding to the image patch is referenced, which enables flexible determination or selection of the context model.
[0142] Method 10: Neighborhood information corresponding to the image patch; Optionally, the neighborhood information corresponding to the image patch can be obtained from either the spatial dimension or the temporal dimension.
[0143] Optionally, the neighborhood information includes at least one of the following methods 10.1 to 10.6: Method 10.1, a partitioning mode of at least one of the following: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks; Optionally, the current image block to be entropy encoded and / or entropy decoded can be used as an example.
[0144] Optionally, the default block can be a pre-set block, such as a block with typical pixel characteristics pre-set by the encoder and / or decoder.
[0145] Optionally, the neighboring block can be a block adjacent to the current block, and / or a block that has already been predicted or reconstructed.
[0146] Optionally, a non-neighbor block can be a block that is not adjacent to the current block, and / or a block that has already been predicted or reconstructed.
[0147] Optionally, the co-position block can be an image block in the co-position image that has the same position and size as the current block. Optionally, the co-position image can be the image in the reference image that is closest to the current image in time.
[0148] Optionally, the temporal block can be a block that is distinguished in the time domain, such as an image block in the previous frame. For example, if there is video data containing three frames of images, the first frame is played in the first second, the second frame is played in the second second, and the third frame is played in the third second, if the image block predicted at the current moment (such as the current block) is an image block after the second frame is divided, then the temporal block can be determined or obtained as the image block corresponding to it in the first frame.
[0149] Optionally, the cross-component block can be an image block that is in a different component from at least one current block. For example, if the image block to be predicted is an image block of the Y component, then the cross-component block can be an image block of the U component and / or the V component.
[0150] Optionally, if at least one current block is an image block of the U component, then the cross-component block can be an image block of the Y component and / or the V component.
[0151] Optionally, if at least one current block is an image block of the V component, then the cross-component block can be an image block of the U component and / or the Y component.
[0152] Optionally, block vector calculation is performed on the current block, and candidate blocks corresponding to the current block are determined or obtained based on the block vector calculation results. For example, the pixels corresponding to the block vector calculation results are used as pixels in the candidate blocks.
[0153] Optionally, motion vector calculation is performed on the current block, and candidate blocks corresponding to the current block are determined or obtained based on the motion vector calculation results, such as using the pixels corresponding to the motion vector calculation results as pixels in the candidate blocks.
[0154] Optionally, the partitioning mode can be a partitioning mode in the GPM mode, such as a partitioning mode with different angles (e.g., a diagonal partitioning mode).
[0155] Optionally, the image patch information includes the neighborhood information corresponding to the image patch. The neighborhood information corresponding to at least one image patch may include at least one of the following partitioning modes: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks.
[0156] Optionally, different partitioning modes can be set to correspond to different context models. Based on at least one of the partitioning modes of neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks of an image block, at least one context model can be determined or obtained, and encoding and / or decoding can be performed based on at least one context model.
[0157] In this approach, the partitioning pattern of at least one of the following image blocks—neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks—is used as image block information. This allows for the determination or acquisition of a context model based on the image block information. During the determination or acquisition of the context model, the partitioning pattern of at least one of the following image blocks—neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks—is referenced, enabling flexible determination or selection of the context model.
[0158] Method 10.2, a first fusion width of at least one of the following: neighboring block, non-neighboring block, co-located block, temporal block, default block, cross-component block, and candidate block; Optionally, the first fusion width can be defined similarly to the fusion width of the image patch.
[0159] Optionally, the first fusion width of a neighboring block can be the fusion width of a neighboring block, the first fusion width of a non-neighboring block can be the fusion width of a non-neighboring block, the first fusion width of a co-position block can be the fusion width of a co-position block, the first fusion width of a temporal block can be the fusion width of a temporal block, the first fusion width of a default block can be the fusion width of a default block, the first fusion width of a cross-component block can be the fusion width of a cross-component block, and the first fusion width of a candidate block can be the fusion width of a candidate block.
[0160] Optionally, the image patch information includes neighborhood information corresponding to the image patch, and the neighborhood information corresponding to at least one image patch may include at least one of the following: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks, representing the first fusion width of the image patch.
[0161] Optionally, a context model used by at least one of the neighboring blocks, non-neighboring blocks, co-occurring blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks can be determined or obtained based on a first fusion width of at least one of the neighboring blocks, non-neighboring blocks, co-occurring blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks, and / or encoding and / or decoding can be performed based on this context model.
[0162] Optionally, different context models can be set for different neighbor block fusion widths, or different context models can be determined or selected based on different neighbor block fusion widths. For example, for an image block with a neighbor block fusion width of 4 (e.g., 4 pixels wide), the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0163] Optionally, different context models can be set for different non-neighboring blocks to correspond to different fusion widths, or different context models can be determined or selected based on different non-neighboring blocks to fusion widths. For example, for an image block with a non-neighboring block fusion width of 4 (e.g., 4 pixels wide), the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0164] Optionally, different context models can be set for different fusion widths of co-occurring blocks, or different context models can be determined or selected based on different fusion widths of co-occurring blocks. For example, for an image block with a fusion width of 4 (e.g., 4 pixels wide), the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0165] Optionally, different temporal block fusion widths can be set to correspond to different context models, or different context models can be determined or selected based on different temporal block fusion widths. For example, for an image block with a temporal block fusion width of 4 (e.g., 4 pixels wide), the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0166] Optionally, different default block fusion widths can be set to correspond to different context models, or different context models can be determined or selected based on different default block fusion widths. For example, for an image block with a default block fusion width of 4 (e.g., 4 pixels wide), the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0167] Optionally, different cross-component block fusion widths can be set to correspond to different context models, or different context models can be determined or selected based on different cross-component block fusion widths. For example, for an image block with a cross-component block fusion width of 4 (e.g., 4 pixels wide), the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0168] Optionally, different candidate block fusion widths can be set to correspond to different context models, or different context models can be determined or selected based on different candidate block fusion widths. For example, for an image block with a candidate block fusion width of 4 (e.g., 4 pixels wide), the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0169] In this approach, the first fusion width of at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks of an image block is used as image block information to determine or obtain a context model based on the image block information. In the process of determining or obtaining the context model, the first fusion width of at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks of the image block is referenced, which enables flexible determination or selection of the context model.
[0170] Method 10.3, the index and / or flag bits corresponding to the first fusion width; Optionally, a lookup can be performed in a lookup table containing the correspondence between at least one fusion width and an index to determine or obtain the index corresponding to at least one first fusion width. Alternatively, a corresponding index can be assigned to at least one first fusion width, such as at least one of 0, 1, 2, 3, 4, or at least one of 1, 2, 3, 4, 5.
[0171] Optionally, a lookup table containing the correspondence between at least one fusion width and a flag bit can be used to determine or obtain the flag bit corresponding to at least one first fusion width. Alternatively, a corresponding flag bit can be assigned to at least one first fusion width, such as at least one of 0, 1, 2, 3, 4, or at least one of 1, 2, 3, 4, 5.
[0172] Optionally, the image block information includes the neighborhood information corresponding to the image block. The neighborhood information corresponding to at least one image block may include the index and / or flag bit corresponding to the first fusion width of at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks and candidate blocks of at least one image block.
[0173] Optionally, the context model used by at least one of the neighboring blocks, non-neighboring blocks, co-occurring blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks can be determined or obtained based on the index and / or flag bits corresponding to the first fusion width of at least one of the neighboring blocks, non-neighboring blocks, co-occurring blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks, and / or encoding and / or decoding can be performed based on this context model.
[0174] Optionally, different first fusion width indices can be set to correspond to different context models, or different context models can be determined or selected based on different first fusion width indices. For example, if the index corresponding to the first fusion width of the image patch is 0, the context model with the lowest rate distortion cost can be determined or selected for encoding and / or decoding.
[0175] Optionally, different flag bits for different first fusion widths can be set to correspond to different context models, or different context models can be determined or selected based on different flag bits for different first fusion widths. For example, if the flag bit corresponding to the first fusion width of the image block is 0, the context model with the lowest rate distortion cost can be determined or selected for encoding and / or decoding.
[0176] In this approach, the index and / or flag bits corresponding to the first fusion width are used as image block information to determine or obtain the context model based on the image block information. During the determination or acquisition of the context model, the index and / or flag bits corresponding to the first fusion width are referenced, which enables flexible determination or selection of the context model.
[0177] Method 10.4, a first fusion region consisting of at least one of the following: neighboring block, non-neighboring block, co-located block, temporal block, default block, cross-component block, and candidate block; Optionally, the first fusion region can be defined similarly to the fusion region of the image patch.
[0178] Optionally, the first fusion region of a neighboring block can be the fusion region of a neighboring block, the first fusion region of a non-neighboring block can be the fusion region of a non-neighboring block, the first fusion region of a co-position block can be the fusion region of a co-position block, the first fusion region of a temporal block can be the fusion region of a temporal block, the first fusion region of a default block can be the fusion region of a default block, the first fusion region of a cross-component block can be the fusion region of a cross-component block, and the first fusion region of a candidate block can be the fusion region of a candidate block.
[0179] Optionally, the image patch information includes the neighborhood information corresponding to the image patch. The neighborhood information corresponding to at least one image patch may include a first fusion region of at least one of the following: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks.
[0180] Optionally, a context model used by at least one of the neighboring blocks, non-neighboring blocks, co-occurring blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks can be determined or obtained based on a first fusion region of at least one of the neighboring blocks, non-neighboring blocks, co-occurring blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks, and / or encoding and / or decoding can be performed based on this context model.
[0181] Optionally, different first fusion regions can be set to correspond to different context models, or different context models can be determined or selected based on different first fusion regions. For example, if the width and height of the first fusion region corresponding to the image block is 4x4, then the context model with the lowest rate distortion cost can be determined or selected for encoding and / or decoding.
[0182] In this approach, by using the first fusion region of at least one of the neighboring block, non-neighboring block, co-located block, temporal block, default block, cross-component block, and candidate block as image block information, a context model can be determined or obtained based on the image block information. In the process of determining or obtaining the context model, the first fusion region of at least one of the neighboring block, non-neighboring block, co-located block, temporal block, default block, cross-component block, and candidate block is referenced, which enables flexible determination or selection of the context model.
[0183] Method 10.5, the index and / or flag bits corresponding to the first fusion region; Optionally, a search can be performed in a lookup table containing the correspondence between at least one fused region and an index to determine or obtain the index corresponding to at least one first fused region. Alternatively, at least one first fused region can be assigned a corresponding index, such as at least one of 0, 1, 2, 3, 4, or at least one of 1, 2, 3, 4, 5.
[0184] Optionally, a lookup table containing the correspondence between at least one fusion region and a flag bit can be used to determine or obtain the flag bit corresponding to at least one first fusion region. Alternatively, at least one flag bit can be assigned to at least one first fusion region, such as at least one of 0, 1, 2, 3, 4, or at least one of 1, 2, 3, 4, 5.
[0185] Optionally, the image block information includes the neighborhood information corresponding to the image block. The neighborhood information corresponding to at least one image block may include the index and / or flag bit corresponding to the first fusion region of at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks and candidate blocks of at least one image block.
[0186] Optionally, the context model used by at least one of the neighboring blocks, non-neighboring blocks, co-occurring blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks can be determined or obtained based on the index and / or flag bits corresponding to the first fusion region of at least one of the neighboring blocks, non-neighboring blocks, co-occurring blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks, and / or encoding and / or decoding can be performed based on this context model.
[0187] Optionally, different first fusion regions can be set to correspond to different context models, or different context models can be determined or selected based on the indices of different first fusion regions. For example, if the index of the first fusion region corresponding to the image patch is 0, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0188] Optionally, different flag bits for different first fusion regions can be set to correspond to different context models, or different context models can be determined or selected based on the flag bits of different first fusion regions. For example, if the flag bit corresponding to the first fusion region of the image block is 0, the context model with the lowest rate distortion cost can be determined or selected for encoding and / or decoding.
[0189] In this approach, the index and / or flag bits corresponding to the first fusion region are used as image block information to determine or obtain the context model based on the image block information. In the process of determining or obtaining the context model, the index and / or flag bits corresponding to the first fusion region are referenced, which enables flexible determination or selection of the context model.
[0190] Method 10.6, the size parameters, position parameters and / or shape parameters corresponding to the first fusion region.
[0191] Optionally, the size parameters corresponding to the first fusion region may include at least one of the aspect ratio, width, height, perimeter, and area of at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks of the image patch. It may also include variations (such as scaling down or scaling up) or indices corresponding to the aspect ratio, width, height, perimeter, and area of at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks of the image patch.
[0192] Optionally, the image block information may include at least one of the following: size parameters, aspect ratio, width, height, perimeter, and area of the image block's neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks.
[0193] Optionally, a context model is determined or obtained based on at least one of the following: size parameters (hereinafter referred to as first size parameters), aspect ratio (hereinafter referred to as first aspect ratio), width (hereinafter referred to as first width), height (hereinafter referred to as first height), perimeter (hereinafter referred to as first perimeter), and area (hereinafter referred to as first area) of the image patch: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks; and / or encoding and / or decoding are performed based on at least one context model.
[0194] Optionally, different first size parameters can be set to correspond to different context models, or different context models can be determined or selected based on different first size parameters. For example, if the first size parameter corresponding to the image block includes a width of 8, then a context model that is better at processing larger image blocks can be determined or selected for encoding and / or decoding.
[0195] Optionally, different first aspect ratios can be set to correspond to different context models, or different context models can be determined or selected based on different first aspect ratios. For example, if the first aspect ratio of the image patch is 8:8, the context model with the lowest rate distortion cost can be determined or selected for encoding and / or decoding.
[0196] Optionally, different first widths can be set to correspond to different context models, or different context models can be determined or selected based on different first widths. For example, if the width corresponding to the image patch is 8, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0197] Optionally, different first heights can be set to correspond to different context models, or different context models can be determined or selected based on different first heights. For example, if the height corresponding to an image patch is 8, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0198] Optionally, different first perimeters can be set to correspond to different context models, or different context models can be determined or selected based on different first perimeters. For example, if the perimeter of the image patch is 16, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0199] Optionally, different first areas can be set to correspond to different context models, or different context models can be determined or selected based on different first areas. For example, if the area corresponding to the image patch is 32, the context model with the lowest rate distortion cost can be determined or selected for encoding and / or decoding.
[0200] Optionally, the position parameter corresponding to the first fusion region can be the position of at least one element in the fusion region within at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks of the image block, such as being located in the diagonal region within a neighboring block, the region containing the first pixel in the upper left corner, or the region with a specified pixel position in a neighboring block.
[0201] Optionally, the image patch information may include positional parameters corresponding to the first fused region, and / or may determine or obtain a context model based on the positional parameters corresponding to the first fused region, and / or encode and / or decode based on at least one context model.
[0202] Optionally, different context models can be set for the position parameters corresponding to different first fusion regions, or different context models can be determined or selected based on the position parameters corresponding to different first fusion regions. For example, if at least one element in the first fusion region of a neighboring block is located in the diagonal region within the image block, the context model with the lowest rate-distortion cost can be determined or selected for encoding and / or decoding.
[0203] Optionally, the shape parameter corresponding to the first fusion region can be the shape parameter of the fusion region, or it can be the shape parameter of a portion of the fusion region possessed by at least one of the following: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks of the image patch.
[0204] Optionally, the shape parameters may include rectangles and non-rectangles, and non-rectangles may include trapezoids, ellipses, etc.
[0205] Optionally, different context models can be set for the shape parameters corresponding to different first fusion regions, or different context models can be determined or selected based on the shape parameters corresponding to different first fusion regions. For example, if the first fusion region is a rectangle, the context model with the lowest rate distortion cost can be determined or selected for encoding and / or decoding.
[0206] Optionally, the size, position, and / or shape parameters of the first fusion region, which includes at least one of the neighboring block, non-neighboring block, co-located block, temporal block, default block, cross-component block, and candidate block, can be used to determine or obtain a context model that has been used by at least one of the neighboring block, non-neighboring block, co-located block, temporal block, default block, cross-component block, and candidate block, and / or encoding and / or decoding can be performed based on this context model.
[0207] In this approach, the size parameters, position parameters, and / or shape parameters corresponding to the first fusion region are used as image block information to determine or obtain a context model based on the image block information. In the process of determining or obtaining the context model, the size parameters, position parameters, and / or shape parameters corresponding to the first fusion region are referenced, which enables flexible determination or selection of the context model.
[0208] Optionally, the image patch information includes neighborhood information corresponding to at least one image patch, specifically including neighborhood information determined or obtained by at least one of methods 10.1 to 10.6.
[0209] Optionally, a context model can be determined or obtained based on neighborhood information determined or obtained based on at least one of methods 10.1 to 10.6, and / or encoding and / or decoding can be performed based on the context model.
[0210] In this approach, the neighborhood information corresponding to the image patch is used as the image patch information to determine or obtain the context model based on the image patch information. In the process of determining or obtaining the context model, the neighborhood information corresponding to the image patch is referenced, which enables flexible determination or selection of the context model.
[0211] Method 11, at least one of the following: the fusion width difference, the index difference, and the flag bit difference corresponding to the fusion width of the image patch; Optionally, the fusion width difference corresponding to the fusion width of the image patch can be the difference between the fusion width of the image patch and the first fusion width, or the absolute value of the difference.
[0212] Optionally, the index difference corresponding to the fusion width of the image patch can be the difference between the index of the fusion width of the image patch and the index of the first fusion width, or the absolute value of the difference.
[0213] Optionally, the difference in flag bits corresponding to the fusion width of the image block can be the difference between the flag bit of the fusion width of the image block and the flag bit of the first fusion width, or the absolute value of the difference.
[0214] Optionally, the fusion width difference corresponding to the fusion width of the image patch, the corresponding context model, and / or encoding and / or decoding based on the context model can be found in a lookup table that includes the correspondence between the fusion width difference and the context model.
[0215] Optionally, the index difference corresponding to the fusion width of the image patch, the corresponding context model, and / or encoding and / or decoding based on the context model can be found in a lookup table that includes the correspondence between the index difference and the context model.
[0216] Optionally, the flag bit difference corresponding to the fusion width of the image patch, the corresponding context model, and / or encoding and / or decoding based on the context model can be found in a lookup table that includes the correspondence between flag bit differences and context models.
[0217] In this approach, at least one of the fusion width difference, index difference, and flag bit difference corresponding to the fusion width of the image patch is used as image patch information to determine or obtain a context model based on the image patch information. In the process of determining or obtaining the context model, at least one of the fusion width difference, index difference, and flag bit difference corresponding to the fusion width of the image patch is referenced, which enables flexible determination or selection of the context model.
[0218] Method 12, at least one of the following: the fusion region difference, the index difference, and the flag bit difference corresponding to the fusion region of the image patch.
[0219] Optionally, the difference between the fusion regions corresponding to the fusion regions of the image patch can be the difference between the fusion region of the image patch and the first fusion region or the absolute value of the difference.
[0220] Optionally, the index difference corresponding to the fusion region of the image block can be the difference between the index of the fusion region of the image block and the index of the first fusion region, or the absolute value of the difference.
[0221] Optionally, the difference in flag bits corresponding to the fusion regions of the image blocks can be the difference between the flag bits of the fusion regions of the image blocks and the flag bits of the first fusion region, or the absolute value of the difference.
[0222] Optionally, the fusion region difference corresponding to the fusion region of the image patch, the corresponding context model, and / or encoding and / or decoding based on the context model can be found in a lookup table that includes the correspondence between the fusion region difference and the context model.
[0223] Optionally, the index difference corresponding to the fusion region of the image patch, the corresponding context model, and / or encoding and / or decoding based on the context model can be found in a lookup table that includes the correspondence between the index difference and the context model.
[0224] Optionally, the flag bit difference corresponding to the fusion region of the image patch, the corresponding context model, and / or encoding and / or decoding based on the context model can be found in a lookup table that includes the correspondence between flag bit difference values and context models.
[0225] In this approach, at least one of the fusion region difference, index difference, and flag bit difference corresponding to the fusion region of the image block is used as image block information to determine or obtain a context model based on the image block information. In the process of determining or obtaining the context model, at least one of the fusion region difference, index difference, and flag bit difference corresponding to the fusion region of the image block is referenced, which enables flexible determination or selection of the context model.
[0226] Optionally, the context model can be determined or obtained based on the image block information determined or obtained by any of methods 1 to 12; or the context model can be determined or obtained based on the image block information determined or obtained by any of methods 10.1 to 10.6.
[0227] Optionally, the context model includes at least one of a first context model, a second context model, and a third context model.
[0228] Optionally, the first context model, the second context model, and the third context model may be different.
[0229] Optionally, at least one of the first context model, the second context model, and the third context model can be a context model, and can be at least one of the key-value model, the tagging scheme model, the graph model, the object-oriented model, the logic-based model, and the ontology-based model.
[0230] For example, a first context model can be used to entropy encode and / or entropy decode the fusion width information of at least one image patch; and / or, a second context model can be used to entropy encode and / or entropy decode using a candidate list; and / or, a third context model can be used to entropy encode and / or entropy decode using a decision tree model.
[0231] Optionally, the first context model includes at least two fourth context models, and optionally, the at least two fourth context models are different.
[0232] Optionally, the fourth context model can be a context model, and can be at least one of a key-value model, a tagging scheme model, a graphical model, an object-oriented model, a logic-based model, and an ontology-based model.
[0233] Optionally, the fusion width information of at least one image patch can be entropy encoded and / or entropy decoded based on at least one fourth context model.
[0234] Optionally, if the processing device is an encoding end, the context model can be determined or obtained based on the image block information, and / or the context model can be determined or obtained based on the image block information of any one of modes 1 to 12 or any one of modes 10.1 to 10.6.
[0235] Optionally, if the processing device is a decoding end, the context model can be determined or obtained based on the image block information, and / or the context model can be determined or obtained based on the image block information of any one of modes 1 to 12 or any one of modes 10.1 to 10.6.
[0236] In this embodiment, by determining or obtaining a context model based on image patch information, the context model can be flexibly determined or selected by referring to the image patch information when determining or selecting the context model. Then, encoding and / or decoding can be performed based on the determined or obtained context model, which can support the improvement of video encoding and / or decoding efficiency.
[0237] Second Embodiment Based on the first embodiment, a second embodiment of this application is proposed. In the second embodiment, step S10 includes: if the image patch information satisfies a first condition, determining or obtaining a first context model.
[0238] Optionally, if the image block information based on any one of modes 1 to 12 or any one of modes 10.1 to 10.6 satisfies the first condition, a first context model can be determined or selected in at least one context model, and / or encoding and / or decoding can be performed based on the first context model, such as entropy encoding of the flag bits of the fusion width of at least one image block based on the first context model.
[0239] Optionally, the image patch information satisfying the first condition may include at least one of the following methods 13 to 19: Method 13: At least one image block information is less than or equal to the first image block information threshold; Optionally, the first image block information threshold can be a pre-set threshold, and / or different thresholds can be set based on different image block information. For example, when the image block information includes the width of the image block, the first image block information threshold can be a width threshold, such as 8.
[0240] Optionally, at least one image block information is less than or equal to a first image block information threshold, including at least one of the following methods 13.01 to 13.23: Method 13.01, at least one image block's size parameter is less than or equal to at least one second image size parameter threshold; Optionally, the second image size parameter threshold can be a pre-set threshold, such as setting the aspect ratio to 8:8 as the second image size parameter threshold.
[0241] Optionally, the first image block information threshold includes at least one second image size parameter threshold.
[0242] Optionally, the size parameter of at least one image block can be determined. If the size parameter of at least one image block is less than or equal to at least one second image size parameter threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0243] Optionally, in a scenario, a second image size parameter threshold 1 (e.g., a second image size parameter threshold 1 with a width of 8) can be set. When the size parameter of at least one image block is greater than the second image size parameter threshold 1, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0244] In this approach, when the size parameter of at least one image block is less than or equal to at least one second image size parameter threshold, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold. The image block information satisfies the first condition, and / or when the image block information satisfies the first condition, the first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0245] Method 13.02, at least one image patch has an aspect ratio less than or equal to at least one aspect ratio threshold; Optionally, the aspect ratio threshold can be a pre-set threshold, such as an aspect ratio threshold of 8:8.
[0246] Optionally, the first image block information threshold includes at least one aspect ratio threshold.
[0247] Optionally, the aspect ratio of at least one image block can be determined. If the aspect ratio of at least one image block is less than or equal to at least one aspect ratio threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0248] Optionally, in a scenario, an aspect ratio threshold of 1 (e.g., 4:4) can be set. When the aspect ratio of at least one image block is greater than the aspect ratio threshold of 1, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0249] In this method, when the aspect ratio of at least one image block is less than or equal to at least one aspect ratio threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0250] Method 13.03: The width of at least one image patch is less than or equal to at least one width threshold; Optionally, the wide threshold can be a pre-set threshold, such as a wide threshold of 8.
[0251] Optionally, the first image block information threshold includes at least one wide threshold.
[0252] Optionally, the width of at least one image block can be determined. If the width of at least one image block is less than or equal to at least one width threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0253] Optionally, in a scenario, a width threshold of 1 (e.g., 4) can be set. When the width of at least one image patch is greater than the width threshold of 1, the image patch information satisfies the first condition, and / or when the image patch information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0254] In this method, when the width of at least one image block is less than or equal to at least one width threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0255] Method 13.04: The height of at least one image block is less than or equal to at least one height threshold; Optionally, the high threshold can be a pre-set threshold, such as a high threshold of 8.
[0256] Optionally, the first image block information threshold includes at least one high threshold.
[0257] Optionally, the height of at least one image block can be determined. If the height of at least one image block is less than or equal to at least one height threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0258] Optionally, in a scenario, a high threshold 1 (e.g., 4) can be set. When the height of at least one image block is greater than the high threshold 1, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0259] In this method, when the height of at least one image block is less than or equal to at least one high threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0260] Method 13.05: The perimeter of at least one image patch is less than or equal to at least one perimeter threshold; Optionally, the perimeter threshold can be a pre-set threshold, such as a perimeter threshold of 16.
[0261] Optionally, the first image patch information threshold includes at least a perimeter threshold.
[0262] Optionally, the perimeter of at least one image block can be determined. If the perimeter of at least one image block is less than or equal to at least one perimeter threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0263] Optionally, in a scenario, a perimeter threshold of 1 (e.g., 4) can be set. When the perimeter of at least one image patch is greater than the perimeter threshold of 1, the image patch information satisfies the first condition, and / or when the image patch information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0264] In this method, when the perimeter of at least one image block is less than or equal to at least one perimeter threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0265] Method 13.06: The area of at least one image patch is less than or equal to at least one area threshold; Optionally, the area threshold can be a pre-set threshold, such as an area threshold of 16.
[0266] Optionally, the first image patch information threshold includes at least one area threshold.
[0267] Optionally, the area of at least one image block can be determined. If the area of at least one image block is less than or equal to at least one area threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0268] Optionally, in a scenario, an area threshold 1 (e.g., 4) can be set. When the area of at least one image patch is greater than the area threshold 1, the image patch information satisfies a first condition, and / or when the image patch information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0269] In this approach, when the area of at least one image block is less than or equal to at least one area threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0270] Method 13.07: At least one fusion width information is less than or equal to the second fusion width information threshold; Optionally, if at least one fusion width information includes the fusion width of an image patch, then the second fusion width information threshold can be set to a fusion width threshold, such as 8.
[0271] Optionally, if at least one fusion width information includes the index corresponding to the fusion width of the image patch, then the second fusion width information threshold can be set to an index threshold, such as 2.
[0272] Optionally, if at least one fusion width information includes a flag bit corresponding to the fusion width of the image block, then the second fusion width information threshold can be set to a flag bit threshold, such as 2.
[0273] Optionally, the first image block information threshold includes at least one second fusion width information threshold.
[0274] Optionally, the fusion width information of at least one image block can be determined. If the fusion width information of at least one image block is less than or equal to at least one second fusion width information threshold (e.g., the fusion width of at least one image block is less than or equal to the fusion width threshold, and / or the index corresponding to the fusion width of at least one image block is less than or equal to the index threshold, and / or the flag bit corresponding to the fusion width of at least one image block is less than or equal to the flag bit threshold), then it can be determined that the information of at least one image block is less than or equal to the first image block information threshold, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained, so as to perform encoding and / or decoding based on the first context model.
[0275] Optionally, in a scenario, a second fusion width information threshold 1 (e.g., 4) can be set. When the fusion width information of at least one image block is greater than the second fusion width information threshold 1, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0276] In this approach, when at least one fusion width information is less than or equal to a second fusion width information threshold, it can be determined that at least one image block information is less than or equal to a first image block information threshold, the image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained, which can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0277] Method 13.08, the first template cost of at least one image patch is less than or equal to at least one first template cost threshold; Optionally, the first template cost threshold can be a pre-set, extremely small template cost, such as a template cost of 1.
[0278] Optionally, the first image block information threshold includes at least one first template cost threshold.
[0279] Optionally, the first template cost of at least one image block can be determined. If the first template cost of at least one image block is less than or equal to the first template cost threshold, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0280] In this approach, when the first template cost of at least one image block is less than or equal to the first template cost threshold, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, the first context model is determined or obtained, which can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0281] Method 13.09: The fusion region of at least one image patch is threshold-matched with at least one first fusion region; Optionally, the first fusion region threshold can be a pre-set fusion region, such as a fusion region with a width and height of 4x4.
[0282] Optionally, the first image block information threshold includes at least one first fusion region threshold.
[0283] Optionally, the fusion region of at least one image block can be judged. If the fusion region of at least one image block matches the threshold of at least one first fusion region, it can be determined that the information of at least one image block is less than or equal to the threshold of the first image block information. The image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0284] In this approach, when the fusion region of at least one image block matches at least one first fusion region threshold, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, the first context model is determined or obtained, which can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0285] Method 13.10, the index of the fused region is less than or equal to at least one image patch of at least one first index threshold; Optionally, the first index threshold can be a pre-set index threshold, such as 2.
[0286] Optionally, the first image block information threshold includes at least one first index threshold.
[0287] Optionally, the index of the fusion region of at least one image block can be determined. If the index of the fusion region of at least one image block is less than or equal to a first index threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0288] Optionally, in a scenario, a first index threshold 1 (e.g., 1) can be set. When the index of the fusion region of at least one image block is greater than the first index threshold 1, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0289] In this approach, by determining or obtaining at least one image block whose index of the fusion region is less than or equal to at least one first index threshold, it is possible to determine that at least one image block information is less than or equal to the first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0290] Method 13.11, where the flag bit of the fused region is less than or equal to at least one first flag bit threshold of at least one image block; Optionally, the first flag threshold can be a pre-set flag threshold, such as 2.
[0291] Optionally, the first image block information threshold includes at least one first flag bit threshold.
[0292] Optionally, the flag bits of the fusion region of at least one image block can be judged. If the flag bits of the fusion region of at least one image block are less than or equal to a first flag bit threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold, the image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0293] Optionally, in a scenario, a first flag threshold 1 (e.g., 1) can be set. When the flag of the fusion region of at least one image block is greater than the first flag threshold 1, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0294] In this approach, by determining or obtaining at least one image block whose flag bit of the fusion region is less than or equal to at least one first flag bit threshold, it is possible to determine that at least one image block information is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0295] Method 13.12, where the size parameter of the fusion region is less than or equal to at least one image block of at least one third image size parameter threshold; Optionally, the third image size parameter threshold can be a pre-set size parameter threshold, such as setting the aspect ratio to 8:8 as the third image size parameter threshold.
[0296] Optionally, the third image size parameter threshold can be the same as or different from the second image size parameter threshold.
[0297] Optionally, the first image block information threshold includes at least one third image size parameter threshold.
[0298] Optionally, the size parameter of the fusion region of at least one image block can be determined. If the size parameter of the fusion region of at least one image block is less than or equal to a third image size parameter threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0299] Optionally, in a scenario, a third image size parameter threshold 1 can also be set (e.g., a width of 2 is set as the third image size parameter threshold 1). When the size parameter of the fusion region of at least one image block is greater than the third image size parameter threshold 1, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0300] In this approach, when at least one image block is determined or obtained where the size parameter of the fusion region is less than or equal to at least one third image size parameter threshold, at least one image block information can be determined to be less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0301] Method 13.13, at least one image patch whose location parameters of the fused region match at least one location parameter threshold; Optionally, the position parameter threshold can be a pre-set threshold. For example, the position parameter threshold can be the upper left corner of at least one element in the fused region within the image block, or the position parameter threshold can be the left boundary of the fused region adjacent to at least one image block, etc.
[0302] Optionally, the first image block information threshold includes at least one location parameter threshold.
[0303] Optionally, the position parameters of the fusion region of at least one image block can be determined. If the position parameters of the fusion region of at least one image block match the threshold of at least one position parameter, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0304] In this approach, when determining or obtaining at least one image block whose position parameters of the fusion region match at least one position parameter threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold, the image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained, which can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0305] Method 13.14, at least one image patch whose shape parameters of the fused region match at least one shape parameter threshold; Optionally, the shape parameter threshold can be a pre-set threshold, such as setting a rectangle as the shape parameter threshold, or setting a 2x2 square as the shape parameter threshold.
[0306] Optionally, the first image block information threshold includes at least one shape parameter threshold.
[0307] Optionally, the shape parameters of the fusion region of at least one image block can be determined. If the shape parameters of the fusion region of at least one image block match the shape parameter threshold of at least one image block, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0308] In this approach, by determining or obtaining at least one image block whose shape parameters match at least one shape parameter threshold, it can be determined that at least one image block information is less than or equal to a first image block information threshold, the image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained, which can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0309] Method 13.15, at least one image patch corresponds to a sequence resolution less than or equal to at least one sequence resolution threshold; Optionally, the sequence resolution threshold can be a pre-set threshold, such as a sequence resolution threshold with a width x height of 16x16.
[0310] Optionally, the first image patch information threshold includes at least one sequence resolution threshold.
[0311] Optionally, the sequence resolution corresponding to at least one image block can be determined. If the sequence resolution corresponding to at least one image block is less than or equal to at least one sequence resolution threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0312] In this approach, by determining or obtaining that the sequence resolution corresponding to at least one image block is less than or equal to at least one sequence resolution threshold, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0313] Method 13.16, at least one image patch corresponds to a frame type that matches at least one first frame type; Optionally, the first frame type can be a pre-set frame type, such as an I-frame.
[0314] Optionally, the first image block information threshold includes at least one first frame type.
[0315] Optionally, the frame type corresponding to at least one image block can be determined. If the frame type corresponding to at least one image block matches at least one first frame type, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0316] In this approach, by determining or obtaining that the frame type corresponding to at least one image block matches at least one first frame type, it can be determined that the information of at least one image block is less than or equal to the threshold of the first image block information, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, the first context model is determined or obtained, which can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0317] Method 13.17, at least one image block corresponds to a coding pattern that matches at least one first coding pattern; Optionally, the first encoding mode can be a pre-set encoding mode, such as GPM mode.
[0318] Optionally, the first image block information threshold includes at least one first coding mode.
[0319] Optionally, the encoding mode corresponding to at least one image block can be determined. If the encoding mode corresponding to at least one image block matches at least one first encoding mode, it can be determined that the information of at least one image block is less than or equal to the threshold of the first image block information, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to perform encoding and / or decoding based on the first context model.
[0320] In this approach, by determining or obtaining that the encoding mode corresponding to at least one image block matches at least one first encoding mode, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, the first context model is determined or obtained, which can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0321] Method 13.18, where the motion complexity of at least one image patch is less than or equal to at least one motion complexity threshold; Optionally, the motion complexity threshold can be a pre-set threshold. For example, the motion complexity of an image patch can be approximated by the gradient of the image patch, and the gradient can be set to 50 to approximate the preset motion complexity threshold.
[0322] Optionally, the first image patch information threshold includes at least one motion complexity threshold.
[0323] Optionally, the motion complexity corresponding to at least one image patch can be determined. If the motion complexity corresponding to at least one image patch is less than or equal to at least one motion complexity threshold, then it can be determined that the information of at least one image patch is less than or equal to a first image patch information threshold, the image patch information satisfies a first condition, and / or when the image patch information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0324] In this approach, by determining or obtaining that the motion complexity corresponding to at least one image block is less than or equal to at least one motion complexity threshold, it is possible to determine that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0325] Method 13.19: The neighborhood information corresponding to at least one image patch is less than or equal to the threshold of at least one neighborhood information. Optionally, the neighborhood information threshold can be a pre-set threshold.
[0326] Optionally, when the neighborhood information corresponding to at least one image block includes a partitioning pattern of at least one of the image block's neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks, the neighborhood information threshold may include a first partitioning pattern (such as a diagonal partitioning pattern).
[0327] Optionally, the neighborhood information corresponding to at least one image block includes at least one of the following: neighboring block, non-neighboring block, co-located block, temporal block, default block, cross-component block, and candidate block, with a first fusion width. The neighborhood information threshold may include a first fusion width threshold, such as 8.
[0328] Optionally, when the neighborhood information corresponding to at least one image patch includes the index and / or flag bit corresponding to the first fusion width, the neighborhood information threshold may include an index threshold (e.g., 2) and / or a flag bit threshold (e.g., 2).
[0329] Optionally, when the neighborhood information corresponding to at least one image block includes a first fusion region consisting of at least one of neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks, the neighborhood information threshold may include a first fusion region threshold (e.g., a fusion region with an aspect ratio of 4:4).
[0330] Optionally, when the neighborhood information corresponding to at least one image patch includes the index and / or flag bit corresponding to the first fusion region, the neighborhood information threshold may include an index threshold (e.g., 4) and / or a flag bit threshold (e.g., 4).
[0331] Optionally, when the neighborhood information corresponding to at least one image patch includes the size parameter, position parameter and / or shape parameter corresponding to the first fusion region, the neighborhood information threshold may include a size parameter threshold (e.g., a height of 8), a position parameter threshold (e.g., a position adjacent to the left edge of the image patch) and / or a shape parameter threshold (e.g., a rectangle).
[0332] Optionally, the first image block information threshold includes at least one neighborhood information threshold.
[0333] Optionally, the neighborhood information corresponding to at least one image patch can be judged. If the neighborhood information corresponding to at least one image patch is less than or equal to at least one neighborhood information threshold (e.g., the partitioning pattern of at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks of the image patch matches the first partitioning pattern, and / or, the first fusion width of the neighborhood information corresponding to at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks of the image patch is less than or equal to the first fusion width threshold, and / or, the first fusion width corresponds to...), If the index and / or flag bits are less than or equal to the index threshold and / or flag bit threshold, and / or the neighborhood information corresponding to at least one image block includes the size parameter, position parameter, and / or shape parameter corresponding to the first fusion region, which are less than or equal to at least one of the size parameter threshold, position parameter threshold, and shape parameter threshold, then it can be determined that the information of at least one image block is less than or equal to the first image block information threshold. If the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to perform encoding and / or decoding based on the first context model.
[0334] In this approach, when the neighborhood information corresponding to at least one image block is determined to be less than or equal to a threshold of at least one neighborhood information, it can be determined that the information of at least one image block is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0335] Method 13.20: At least one fusion width difference is less than or equal to a first fusion width difference threshold; Optionally, the first fusion width difference threshold can be a pre-set threshold, such as 4.
[0336] Optionally, the first image block information threshold includes at least one first fusion width difference threshold.
[0337] Optionally, at least one fusion width difference can be judged. If at least one fusion width difference is less than or equal to a first fusion width difference threshold, then at least one image block information can be determined to be less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0338] In this approach, by determining or obtaining at least one fusion width difference that is less than or equal to a first fusion width difference threshold, at least one image block information can be determined to be less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model can be determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0339] Method 13.21, the fusion width of at least one image patch and / or the index difference corresponding to the fusion region is less than or equal to at least one first index difference threshold; Optionally, the first index difference threshold can be a pre-set threshold, such as 2.
[0340] Optionally, the first image block information threshold includes at least one first index difference threshold.
[0341] Optionally, the fusion width and / or index difference corresponding to the fusion region of at least one image block can be determined. If the fusion width and / or index difference corresponding to the fusion region of at least one image block is less than or equal to at least one first index difference threshold, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to perform encoding and / or decoding based on the first context model.
[0342] In this approach, by determining or obtaining that the fusion width of at least one image block and / or the index difference corresponding to the fusion region is less than or equal to at least one first index difference threshold, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold. The image block information satisfies the first condition, and / or when the image block information satisfies the first condition, the first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0343] Method 13.22, the fusion width of at least one image block and / or the flag bit difference value corresponding to the fusion region is less than or equal to at least one first flag bit difference value threshold; Optionally, the threshold for the difference in the first flag bit can be a pre-set threshold, such as 2.
[0344] Optionally, the first image block information threshold includes at least one first flag bit difference threshold.
[0345] Optionally, the fusion width and / or the flag bit difference corresponding to the fusion region of at least one image block can be judged. If the fusion width and / or the flag bit difference corresponding to the fusion region of at least one image block is less than or equal to at least one first flag bit difference threshold, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to perform encoding and / or decoding based on the first context model.
[0346] In this approach, when the fusion width of at least one image block and / or the flag bit difference value corresponding to the fusion region is less than or equal to at least one first flag bit difference value threshold, it can be determined that the information of at least one image block is less than or equal to the first image block information threshold. The image block information satisfies the first condition, and / or when the image block information satisfies the first condition, the first context model is determined or obtained. This can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0347] Method 13.23, at least one fusion region difference is less than or equal to the first fusion region difference threshold.
[0348] Optionally, the threshold for the difference in the first fusion region can be a pre-set threshold, such as 4.
[0349] Optionally, the first image block information threshold includes at least one first flag bit difference threshold.
[0350] Optionally, at least one fusion region difference can be judged. If the difference of at least one fusion region is less than or equal to a first fusion region difference threshold, it can be determined that at least one image block information is less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained so as to encode and / or decode based on the first context model.
[0351] In this approach, when at least one fusion region difference is determined to be less than or equal to a first fusion region difference threshold, at least one image block information can be determined to be less than or equal to a first image block information threshold. The image block information satisfies a first condition, and / or when the image block information satisfies the first condition, a first context model is determined or obtained. This ensures the flexibility of determining or selecting the first context model and / or the accuracy of determining or selecting the first context model.
[0352] In this approach, the first context model can be determined or obtained based on at least one of methods 13.01 to 13.23, where the image block information satisfies the first condition, and / or when the image block information satisfies the first condition. This approach can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0353] Method 14: At least one image block size parameter is less than or equal to the first image size parameter threshold; Optionally, the first image size parameter threshold can be a pre-set threshold, such as setting the aspect ratio to 16:16 as the first image size parameter threshold.
[0354] Optionally, the first image size parameter threshold may be different from the second image size parameter threshold, or it may be different from the third image size parameter threshold.
[0355] Optionally, at least one image block size parameter can be determined. If the at least one image block size parameter is less than or equal to a first image size parameter threshold, then the image block information satisfies the first condition.
[0356] Optionally, if the size parameter of at least one image block is less than or equal to the first image size parameter threshold, and / or the size parameter of the fusion region of at least one image block is less than or equal to the first image size parameter threshold, then the image block information satisfies the first condition.
[0357] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 14, and / or satisfies at least one of modes 13.01 to 13.23.
[0358] For example, if the size parameter of at least one image block is less than both a second image size parameter threshold and a first image size parameter threshold, the image block information satisfies the first condition.
[0359] In this approach, by determining or obtaining a first context model when at least one image block size parameter is less than or equal to a first image size parameter threshold, the image block information satisfies a first condition, and / or when the image block information satisfies the first condition, the flexibility of determining or selecting the first context model can be guaranteed, and / or the accuracy of determining or selecting the first context model can be guaranteed.
[0360] Method 15: At least one image block size parameter matches the range of the first image size parameter; Optionally, the first image size parameter range can be a pre-set image size range (e.g., 0-50), or it can include a range of aspect ratios (e.g., 0 to 8:8), a range of widths (e.g., 0-8), a range of heights (e.g., 0-8), a range of perimeters (e.g., 0-16), or a range of areas (e.g., 0-32).
[0361] Optionally, at least one image block size parameter can be determined. If the at least one image block size parameter matches the range of the first image size parameter, then the image block information satisfies the first condition.
[0362] Optionally, if the size parameter of at least one image block matches the range of the first image size parameter, and / or the size parameter of the fusion region of at least one image block matches the range of the first image size parameter, then the image block information satisfies the first condition.
[0363] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 15, and / or satisfies at least one of modes 13.01 to 13.23.
[0364] For example, if the size parameter of at least one image block is less than the threshold of at least one second image size parameter, and / or matches the range of the first image size parameter, the image block information satisfies the first condition.
[0365] In this approach, by determining or obtaining a first context model when at least one image block size parameter matches the first image size parameter range, and / or when the image block information meets the first condition, the flexibility of determining or selecting the first context model can be guaranteed, and / or the accuracy of determining or selecting the first context model can be guaranteed.
[0366] Method 16: The second template cost corresponding to at least one image patch is less than or equal to the second template cost threshold; Optionally, the second template cost threshold can be a pre-set template cost, such as a template cost of 2.
[0367] Optionally, the template of at least one image patch can be encoded and / or decoded using the first context model, and the resulting template cost can be used as the second template cost.
[0368] Optionally, during the derivation or inference stage, each context model can be used to process the template based on at least one image patch to determine the corresponding template cost (which may be rate-distortion cost), and / or the minimum template cost can be determined. If the context model corresponding to the minimum template cost is the first context model, the first context model can be determined or selected for encoding and / or decoding. If the context model corresponding to the minimum template cost is the second context model, the second context model can be determined or selected for encoding and / or decoding. If the context model corresponding to the minimum template cost is the third context model, the third context model can be determined or selected for encoding and / or decoding.
[0369] Optionally, the second template cost corresponding to at least one image block can be determined. If the second template cost corresponding to at least one image block is less than or equal to the second template cost threshold, then the image block information satisfies the first condition.
[0370] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 16, and / or satisfies at least one of modes 13.01 to 13.23.
[0371] In this approach, by determining or obtaining a first context model when the second template cost corresponding to at least one image block is less than or equal to the second template cost threshold, the image block information satisfies a first condition, and / or when the image block information satisfies the first condition, the first context model can be determined or obtained. This ensures the flexibility of determining or selecting the first context model and / or the accuracy of determining or selecting the first context model.
[0372] Method 17: The first fusion width information has the lowest cost and corresponds to the first context model; Optionally, the first fusion width information includes at least one of the following methods 17.1 to 17.8.
[0373] Method 17.1, satisfying the fourth condition for fusion width information; Optionally, satisfying the fourth condition can be the same as satisfying at least one of the first, second, and third conditions, or it can be different from all of them.
[0374] Optionally, satisfying the fourth condition can be that the width of the image patch is greater than a preset width threshold (e.g., 8).
[0375] Optionally, when at least one image block satisfies the first condition, at least one fusion width can be determined or selected from a candidate list including at least one fusion width as the fusion width information that satisfies the fourth condition.
[0376] Optionally, the candidate list including at least one fusion width may include any pre-set fusion width, or may include at least one fusion width among neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks.
[0377] Optionally, the index corresponding to the fusion width information that satisfies the fourth condition can be determined by searching a list that includes the correspondence between fusion width and index.
[0378] Optionally, the flag corresponding to the fusion width that satisfies the fourth condition can be determined by searching a list that includes the correspondence between fusion width and flag bits.
[0379] Optionally, if the first context model is used to perform entropy encoding and / or entropy decoding with the fusion width information that satisfies the fourth condition, and the cost is the lowest compared to using the second context model and / or the third context model to perform entropy encoding and / or entropy decoding with the fusion width information that satisfies the fourth condition, then it can be determined that the first fusion width information has the lowest cost and corresponds to the first context model, and the image patch information satisfies the first condition.
[0380] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 17.1 and / or satisfies at least one of modes 13.01 to 13.23.
[0381] In this approach, by determining the first fusion width information based on the fusion width information that satisfies the fourth condition, and / or when the cost of the first fusion width information is minimized and it corresponds to the first context model, the image patch information satisfies the first condition, and / or when the image patch information satisfies the first condition, the first context model is determined or obtained, which can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0382] Method 17.2, the fusion width information is determined or obtained based on image patch information; Optionally, at least one fusion width, an index of the fusion width, and / or a flag bit of the fusion width can be derived, determined, or obtained based on the image block information, and used as the fusion width information determined or obtained based on the image block information.
[0383] Alternatively, the image patch information can be derived using neural networks, such as convolutional neural networks.
[0384] Optionally, the fusion width and / or deformation (such as increase or decrease) of at least one of the following: neighboring block, non-neighboring block, co-located block, temporal block, default block, cross-component block, and candidate block can be used as the fusion width within the fusion width information determined or obtained based on image block information.
[0385] Optionally, the index corresponding to the fusion width within the fusion width information can be determined by searching a list that includes the correspondence between fusion width and index.
[0386] Optionally, the flag corresponding to the fusion width in the fusion width information can be determined by searching a list that includes the correspondence between fusion width and flag bits.
[0387] Optionally, if the first context model is used to perform entropy encoding and / or entropy decoding using fusion width information determined or obtained based on image patch information, and the cost is the lowest compared to using the second context model and / or the third context model to perform entropy encoding and / or entropy decoding using fusion width information determined or obtained based on image patch information, then the first fusion width information can be determined to have the lowest cost and correspond to the first context model, and the image patch information satisfies the first condition.
[0388] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 17.2 and / or satisfies at least one of modes 13.01 to 13.23.
[0389] In this approach, the first fusion width information is determined by determining or obtaining fusion width information based on image patch information, and / or the image patch information satisfies the first condition when the cost of the first fusion width information is minimized and corresponds to the first context model, and / or the first context model is determined or obtained when the image patch information satisfies the first condition. This approach can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0390] Method 17.3, the fusion width information is determined or obtained based on pre-training information; Optionally, the fusion width information determined or obtained based on the pre-training information may include at least one of the eighth fusion width derived, determined and / or obtained based on the pre-training information, the index corresponding to the eighth fusion width, and the flag bit.
[0391] Optionally, the pre-training information can be information from offline training in advance. For example, during the offline training phase, the encoder first collects sample data from a large number of video sequences, including features such as the size information of the block to be encoded, motion vector difference, fusion width of neighboring blocks, texture complexity, and brightness changes. The training set is constructed using the actual optimal fusion width as the label. Subsequently, a multi-layer decision tree model is generated using criteria such as information gain or Gini coefficient. Hyperparameters such as maximum depth and minimum number of leaf node samples can be set according to actual needs to obtain a prediction model with good generalization ability (i.e., a decision tree model). And / or the fusion width predicted by the prediction model can be used as at least one of the eighth fusion width, the index corresponding to the eighth fusion width, and the flag bit, which are derived, determined, or obtained based on the pre-training information.
[0392] Optionally, in the offline stage, a lookup table and / or neural network can be used to perform simulation derivation to determine or obtain the fusion width of at least one image patch, and its corresponding index and flag bit, and use them as the eighth fusion width and the index and flag bit corresponding to the eighth fusion width, respectively.
[0393] Optionally, if the first context model uses the fusion width information determined or obtained based on pre-training information to perform entropy encoding and / or entropy decoding, and the cost of entropy encoding and / or entropy decoding is the lowest compared to using the second context model and / or the third context model to perform entropy encoding and / or entropy decoding, then the first fusion width information can be determined to have the lowest cost and correspond to the first context model, and the image patch information satisfies the first condition.
[0394] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 17.3 and / or satisfies at least one of modes 13.01 to 13.23.
[0395] In this approach, the first fusion width information is determined by the fusion width information determined or obtained based on pre-trained information, and / or the image patch information satisfies the first condition when the cost of the first fusion width information is minimized and corresponds to the first context model, and / or the first context model is determined or obtained when the image patch information satisfies the first condition. This approach can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0396] Method 17.4, the fusion width information is determined or obtained based on the first lookup table and / or the first neural network; Optionally, the fusion width information determined or obtained based on the first lookup table and / or the first neural network may include at least one of the ninth fusion width determined or obtained based on the first lookup table and / or the first neural network, the index corresponding to the ninth fusion width, and the flag bit.
[0397] Optionally, the first neural network can be a complete neural network, such as a neural network based on fully connected layers; a neural network based on convolutional layers; a neural network based on Transformer; or a neural network based on a mixture of convolutional and fully connected layers and Transformer, etc.
[0398] Optionally, the first neural network can be a partial neural network structure, such as a 3x3 convolutional layer.
[0399] Optionally, the first lookup table can be a lookup table, such as a table, list, set, etc.
[0400] Optionally, a search can be performed in a first lookup table containing at least one of the following: a fusion width, an index corresponding to the fusion width, and a flag bit, to determine or obtain the ninth fusion width, the index corresponding to the ninth fusion width, and the flag bit.
[0401] For example, the index corresponding to at least one image block information can be input into the first lookup table for searching to obtain the corresponding ninth fusion width, the index corresponding to the ninth fusion width, and the flag bit.
[0402] Optionally, at least one image patch information can be input into the first neural network, and the ninth fusion width, the index and flag corresponding to the ninth fusion width can be determined or obtained based on the output of the neural network. For example, the output result is at least one of the ninth fusion width, the index and flag corresponding to the ninth fusion width.
[0403] Optionally, if the first context model is used to perform entropy encoding and / or entropy decoding based on the fusion width information determined or obtained by the first lookup table and / or the first neural network, and the cost of entropy encoding and / or entropy decoding is the lowest compared to using the second context model and / or the third context model to perform entropy encoding and / or entropy decoding based on the fusion width information determined or obtained by the first lookup table and / or the first neural network, then it can be determined that the first fusion width information has the lowest cost and corresponds to the first context model, and the image patch information satisfies the first condition.
[0404] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 17.4 and / or satisfies at least one of modes 13.01 to 13.23.
[0405] In this approach, the first fusion width information is determined by using the first lookup table and / or the first neural network to determine or obtain the fusion width information, and / or the image patch information satisfies the first condition when the cost of the first fusion width information is minimized and it corresponds to the first context model, and / or the first context model is determined or obtained when the image patch information satisfies the first condition. This approach can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0406] Method 17.5, the minimum required bit length for fused width information; Optionally, the minimum required fusion width information may include at least one of the minimum required 10th fusion width, the index corresponding to the 10th fusion width, and a flag bit.
[0407] Optionally, the fusion width that only requires first-layer encoding can be used as the tenth fusion width with the minimum required bit length, and the index and / or flag bit corresponding to the fusion width that only requires first-layer encoding can be used as the index and / or flag bit corresponding to the tenth fusion width with the minimum required bit length. For example, the bitstream corresponding to at least one of the tenth fusion width, the index corresponding to the tenth fusion width, and the flag bit can be "1".
[0408] Optionally, at least one of the following can be determined or obtained: the minimum required bit length of the tenth fusion width, the index and flag bit corresponding to the tenth fusion width, and at least one of the following: image block, neighboring block, non-neighboring block, co-location block, temporal block, default block, cross-component block and candidate block.
[0409] Optionally, if the first context model is used to perform entropy encoding and / or entropy decoding with the fusion width information that requires the minimum bit length, and the cost of entropy encoding and / or entropy decoding is the minimum compared to using the second context model and / or the third context model with the fusion width information that requires the minimum bit length, then it can be determined that the first fusion width information has the minimum cost and corresponds to the first context model, and the image block information satisfies the first condition.
[0410] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 17.5 and / or satisfies at least one of modes 13.01 to 13.23.
[0411] In this approach, by determining the first fusion width information based on the fusion width information with the minimum required bit length, and / or when the cost of the first fusion width information is minimum and corresponds to the first context model, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, the first context model is determined or obtained, which can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0412] Method 17.6, template matching reordered fusion width information; Optionally, the merge width information after template matching reordering may include at least one of the following: the eleventh merge width after template matching reordering, the index corresponding to the eleventh merge width, and the flag bit.
[0413] Optionally, a candidate list can be used to store at least one of the following: a fusion width, an index corresponding to the fusion width, and a flag bit. Alternatively, at least one element in the candidate list (the fusion width, an index corresponding to the fusion width, and a flag bit) can be matched with a template of the image patch. Based on the matching result, the elements in the candidate list can be reordered to obtain a reordered candidate list. The fusion width in the reordered candidate list can be used as the eleventh fusion width after reordering based on template matching. The index and / or flag bit corresponding to the fusion width in the reordered candidate list can be used as the index and / or flag bit corresponding to the eleventh fusion width after reordering based on template matching.
[0414] Optionally, a template can be set in advance to approximate the image block, for example, the neighboring blocks and / or non-neighboring blocks of the image block can be determined as the template of the image block.
[0415] Optionally, when matching at least one element in the candidate list with the template of the image patch, the cost or expense incurred when the template of the image patch is processed by each fusion width in the candidate list can be determined or obtained, and used as the matching result. Then, the elements in the candidate list are reordered based on the principle of minimum cost or lowest expense, thereby obtaining at least one of the following: the eleventh fusion width after template matching reordering, the index corresponding to the eleventh fusion width, and the flag bit.
[0416] Optionally, if the first context model is used to perform entropy encoding and / or entropy decoding on the reordered fusion width information after template matching, and the cost of entropy encoding and / or entropy decoding is the lowest compared to the second context model and / or the third context model, then it can be determined that the first fusion width information has the lowest cost and corresponds to the first context model, and the image patch information satisfies the first condition.
[0417] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 17.6 and / or satisfies at least one of modes 13.01 to 13.23.
[0418] In this approach, the first fusion width information is determined by reordering the fusion width information based on template matching, and / or the image patch information satisfies the first condition when the cost of the first fusion width information is minimized and it corresponds to the first context model, and / or the first context model is determined or obtained when the image patch information satisfies the first condition. This approach can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0419] Method 17.7, based on the fusion width information determined or obtained from the first decision tree model; Optionally, the fusion width information determined or obtained based on the first decision tree model may include at least one of the twelfth fusion width determined or obtained based on the first decision tree model, the index corresponding to the twelfth fusion width, and the flag bit.
[0420] Optionally, the first decision tree model can be a decision tree model, such as a single decision tree, random forest, gradient boosting tree, classification and regression tree, etc.
[0421] Optionally, the decision tree model can be trained in advance during the offline stage to obtain the first decision tree model, and / or at least one image patch information can be input into the decision tree model to output at least one of the twelfth fusion width, the index corresponding to the twelfth fusion width, and the flag bit.
[0422] Optionally, if the first context model is used to perform entropy encoding and / or entropy decoding using the fusion width information determined or obtained based on the first decision tree model, and the cost of entropy encoding and / or entropy decoding is minimized compared to using the second context model and / or the third context model to perform entropy encoding and / or entropy decoding, then the first fusion width information can be determined to have the minimum cost and correspond to the first context model, and the image patch information satisfies the first condition.
[0423] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 17.7 and / or satisfies at least one of modes 13.01 to 13.23.
[0424] In this approach, the first fusion width information is determined by using the fusion width information determined or obtained based on the first decision tree model, and / or the image block information satisfies the first condition when the cost of the first fusion width information is minimized and it corresponds to the first context model, and / or the first context model is determined or obtained when the image block information satisfies the first condition. This approach can ensure the flexibility of determining or selecting the first context model, and / or ensure the accuracy of determining or selecting the first context model.
[0425] Method 17.8 determines or obtains the fusion width information based on the specified image block information input under the first judgment condition.
[0426] Optionally, the fusion width information determined or obtained by the specified image block information input under the first judgment condition may include at least one of the thirteenth fusion width determined or obtained based on the specified image block information input under the first judgment condition, the index corresponding to the thirteenth fusion width, and the flag bit.
[0427] Optionally, the first judgment condition can be a pre-set condition or other conditions, such as judging whether the image block adopts GPM mode. If so, the first judgment condition is true, and the fusion width information can be determined or obtained based on the input specified image block information.
[0428] Optionally, the first judgment condition can be true, or it can be any one of the first to fourth conditions.
[0429] Optionally, the specified image block information can be image block information determined based on user input instructions, such as using the fusion width of neighboring blocks as the thirteenth fusion width, or using a preset fusion width as the thirteenth fusion width.
[0430] Optionally, if the image patch information satisfies the first judgment condition (e.g., the width of the image patch is greater than a preset width threshold (e.g., 8)), a lookup table or neural network can be used, and / or at least one of the following can be determined or obtained based on the input specified image patch information: the thirteenth fusion width, the index corresponding to the thirteenth fusion width, and the flag bit.
[0431] Optionally, if the first context model is used to determine or obtain the fusion width information based on the specified image block information input under the first judgment condition, and entropy encoding and / or entropy decoding are performed, and the cost of entropy encoding and / or entropy decoding is minimized compared to the second context model and / or the third context model, then the first fusion width information is determined to have the minimum cost and corresponds to the first context model, and the image block information satisfies the first condition.
[0432] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 17.8 and / or satisfies at least one of modes 13.01 to 13.23.
[0433] In this approach, by determining or obtaining fusion width information based on specified image patch information input under the first judgment condition, and / or when the cost of the first fusion width information is minimized and corresponds to the first context model, the image patch information satisfies the first condition, and / or when the image patch information satisfies the first condition, the first context model can be determined or obtained, thereby ensuring the flexibility of determining or selecting the first context model, and / or ensuring the accuracy of determining or selecting the first context model.
[0434] In this approach, by determining or obtaining the first fusion width information based on at least one of methods 17.1 to 17.8, the cost is minimized and it corresponds to the first context model. The image block information satisfies the first condition, and / or the first context model is determined or obtained when the image block information satisfies the first condition. This approach can ensure the flexibility of determining or selecting the first context model and / or ensure the accuracy of determining or selecting the first context model.
[0435] Method 18: The inter-frame geometric partitioning fusion width corresponding to at least one image patch is matched with the inter-frame geometric partitioning fusion width corresponding to the first context model; Optionally, during the inter-frame coding stage, the CU can be geometrically divided into inter-frame regions. When performing inter-frame geometric division, the division mode and the region (i.e., the fusion region) through which the division line segment (i.e., the dividing line) used in the division mode passes are determined in advance, and / or the CU can be divided into regions by the dividing line to obtain at least two regions, which can be used as the divided image blocks, and then the divided image blocks are subjected to subsequent encoding and / or decoding processing.
[0436] Optionally, the inter-frame geometric partitioning fusion width can be half the width of the fusion region.
[0437] For example, if a vertical line is determined or generated to divide the CU, the two units (e.g., 2 pixels) to the left and the two units (e.g., 2 pixels) to the right of the vertical line in the CU can be used as the fusion region. In the subsequent image block fusion processing, the pixels will be weighted and fused in the fusion region. Half of the width of the fusion region can be used as the inter-frame geometric partition fusion width, for example, the inter-frame geometric partition fusion width is two units (e.g., 2 pixels).
[0438] Optionally, a list including the inter-frame geometric partitioning fusion width corresponding to at least one first context model can be set in advance, and / or the inter-frame geometric partitioning fusion width corresponding to at least one image patch can be matched with the list. If the matching result includes the inter-frame geometric partitioning fusion width corresponding to at least one image patch matching the inter-frame geometric partitioning fusion width corresponding to the first context model, then the image patch information satisfies the first condition, and / or when the image patch information satisfies the first condition, the first context model is determined or obtained.
[0439] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 18, and / or satisfies at least one of modes 13.01 to 13.23.
[0440] In this approach, when the inter-frame geometric partitioning fusion width corresponding to at least one image block matches the inter-frame geometric partitioning fusion width corresponding to the first context model, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, the first context model is determined or obtained. This ensures the flexibility of determining or selecting the first context model, and / or the accuracy of determining or selecting the first context model.
[0441] Method 19: The intra-frame geometric partitioning fusion width corresponding to at least one image patch is matched with the intra-frame geometric partitioning fusion width corresponding to the first context model; Optionally, for any image block, different intra-frame geometric partitioning fusion widths can be determined or selected based on the image block information of at least one image block, such as different size parameters to determine or select different intra-frame geometric partitioning fusion widths.
[0442] For example, the intra-frame geometric partitioning fusion width determined or selected for an 8x8 image block is different from that determined or selected for a 4x4 image block. It can be that the intra-frame geometric partitioning fusion width determined or selected for an 8x8 image block is greater than that determined or selected for a 4x4 image block.
[0443] Optionally, different intra-frame geometric partitioning fusion widths can be set to determine or select different context models, and the indices and / or flags corresponding to different intra-frame geometric partitioning fusion widths can be used to determine or select different context models.
[0444] Optionally, a list including the intra-frame geometric partitioning fusion width corresponding to at least one first context model can be set in advance, and / or the intra-frame geometric partitioning fusion width corresponding to at least one image patch can be matched with the list. If the matching result includes the intra-frame geometric partitioning fusion width corresponding to at least one image patch matching the intra-frame geometric partitioning fusion width corresponding to the first context model, then the image patch information satisfies the first condition, and / or when the image patch information satisfies the first condition, the first context model is determined or obtained.
[0445] Optionally, the image block information may satisfy the first condition when at least one image information satisfies at least one of modes 13 to 19, and / or satisfies at least one of modes 13.01 to 13.23.
[0446] In this approach, when the intra-frame geometric partitioning fusion width corresponding to at least one image block matches the intra-frame geometric partitioning fusion width corresponding to the first context model, the image block information satisfies the first condition, and / or when the image block information satisfies the first condition, the first context model is determined or obtained. This ensures the flexibility of determining or selecting the first context model, and / or the accuracy of determining or selecting the first context model.
[0447] Optionally, the processing device may determine or obtain a first context model by at least one of methods 13 to 19, where the image block information satisfies a first condition, and / or when the image block information satisfies the first condition, thereby ensuring the flexibility of determining or selecting the first context model and / or ensuring the accuracy of determining or selecting the first context model.
[0448] Optionally, encoding and / or decoding can be performed based on the first context model.
[0449] Optionally, the fusion width information of at least one image patch can be entropy encoded and / or entropy decoded based on at least one determined or obtained first context model.
[0450] Optionally, the fusion width information of at least one image patch can be entropy encoded and / or entropy decoded based on at least one determined or obtained fourth context model.
[0451] Optionally, encoding and / or decoding based on the first context model includes: when the index corresponding to the fusion width of at least one image block is a first value and / or the flag bit is a second value, performing entropy encoding and / or entropy decoding based on the fourth context model and / or the first bit, and / or when the index corresponding to the fusion width of at least one image block is not the first value and / or the flag bit is not the second value, performing entropy encoding and / or entropy decoding based on at least two different fourth context models and / or second length bits.
[0452] Optionally, the first value and the second value can be the same or different, and / or can be at least one of 0, 1, 2, 3 and 4, or at least one of 1, 2, 3, 4 and 5.
[0453] Optionally, the second length bit is longer than the length of the first bit, where the length of the first bit is 1 bit and the length of the second length bit is 3 bits.
[0454] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 0, entropy encoding and / or entropy decoding are performed based on a first context model (e.g., a fourth context model) and / or the first bit.
[0455] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 1, entropy encoding and / or entropy decoding are performed based on a first context model (e.g., a fourth context model) and / or the first bit.
[0456] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 2, entropy encoding and / or entropy decoding are performed based on a first context model (e.g., a fourth context model) and / or the first bit.
[0457] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 3, entropy encoding and / or entropy decoding are performed based on the first context model (e.g., a fourth context model) and / or the first bit.
[0458] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 4, entropy encoding and / or entropy decoding are performed based on the first context model (e.g., a fourth context model) and / or the first bit.
[0459] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 5, entropy encoding and / or entropy decoding are performed based on a first context model (e.g., a fourth context model) and / or the first bit.
[0460] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 0, entropy encoding and / or entropy decoding are performed based on the first context model and / or the first bit. When the index and / or flag bit corresponding to the fusion width of at least one image block is not 0 (e.g., at least one of 1, 2, 3, 4), entropy encoding and / or entropy decoding can be performed based on the first context model (e.g., at least two different fourth context models) and / or the second length bit.
[0461] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 1, entropy encoding and / or entropy decoding are performed based on the first context model and / or the first bit. When the index and / or flag bit corresponding to the fusion width of at least one image block is not 1 (e.g., at least one of 0, 2, 3, 4, or at least one of 2, 3, 4, 5), entropy encoding and / or entropy decoding can be performed based on the first context model (e.g., at least two different fourth context models) and / or the second length bit.
[0462] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 2, entropy encoding and / or entropy decoding are performed based on the first context model and / or the first bit. When the index and / or flag bit corresponding to the fusion width of at least one image block is not 2 (e.g., at least one of 0, 1, 3, 4, or at least one of 1, 3, 4, 5), entropy encoding and / or entropy decoding can be performed based on the first context model (e.g., at least two different fourth context models) and / or the second length bit.
[0463] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 3, entropy encoding and / or entropy decoding are performed based on the first context model and / or the first bit. When the index and / or flag bit corresponding to the fusion width of at least one image block is not 3 (e.g., at least one of 0, 1, 2, 4, or at least one of 1, 2, 4, 5), entropy encoding and / or entropy decoding can be performed based on the first context model (e.g., at least two different fourth context models) and / or the second length bit.
[0464] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 4, entropy encoding and / or entropy decoding are performed based on the first context model and / or the first bit. When the index and / or flag bit corresponding to the fusion width of at least one image block is not 4 (e.g., at least one of 0, 1, 2, 3, or at least one of 1, 2, 3, 5), entropy encoding and / or entropy decoding can be performed based on the first context model (e.g., at least two different fourth context models) and / or the second length bit.
[0465] Optionally, when the index and / or flag bit corresponding to the fusion width of at least one image block is 5, entropy encoding and / or entropy decoding are performed based on the first context model and / or the first bit. When the index and / or flag bit corresponding to the fusion width of at least one image block is not 5 (e.g., at least one of 1, 2, 3, and 4), entropy encoding and / or entropy decoding can be performed based on the first context model (e.g., at least two different fourth context models) and / or the second length bit.
[0466] Optionally, one bit can be used to determine whether it is 'a' (i.e., whether the index and / or flag bit corresponding to the fusion width of at least one image patch is 'a', where 'a' can be at least one of 0, 1, 2, 3, and 4, or at least one of 1, 2, 3, 4, and 5, such as 'a' being 0). If it is, a fourth context model can be used for encoding. If not, two bits are used to represent the other four numbers, and these two bits can be encoded using two other fourth context models.
[0467] For example, such as Figure 6 As shown, the flag bit corresponding to the fusion width of at least one image patch can be discriminated (or judged, in this application, discrimination is used as an example). For example, a discriminator can be used to discriminate the width flag bit (i.e., the flag bit of the fusion width of the image patch) of at least one image patch to determine or obtain the context model to be used. If the first context model is used, it can be further determined whether the width flag bit of at least one image patch is 2. If so, a fourth context model can be used for encoding to determine or obtain the binarized bitstream "1", and the output bitstream is "1", that is, entropy encoding can be performed with the bitstream "1"; and / or, if not, it can be further determined whether the width flag bit of at least one image patch is less than 2. If so, when the flag bit corresponding to the fusion width of at least one image patch is 0, at least two different fourth context models can be used for encoding to determine or obtain the binarized bitstream "011", and / or the bitstream "011" can be used for entropy encoding. Line entropy encoding, i.e., when the value is 0, the output bitstream is "011"; or when the flag bit corresponding to the fusion width of at least one image block is 1, at least two different fourth context models can be used for encoding to determine or obtain the binarized bitstream "010", and / or entropy encoding can be performed with the bitstream "010", i.e., when the value is 1, the output bitstream is "010"; and / or, if not, when the flag bit corresponding to the fusion width of at least one image block is 3, at least two different fourth context models can be used for encoding to determine or obtain the binarized bitstream "001", and / or entropy encoding can be performed with the bitstream "001", i.e., when the value is 3, the output bitstream is "001"; or when the flag bit corresponding to the fusion width of at least one image block is 4, at least two different fourth context models can be used for encoding to determine or obtain the binarized bitstream "000", and / or entropy encoding can be performed with the bitstream "000", i.e., when the value is 1, the output bitstream is "000".
[0468] If the second first context model is adopted, it can be further determined whether the width flag of at least one image block is 0. If so, a fourth context model can be used for encoding to determine or obtain the binarized bitstream "1", and the output bitstream is "1", that is, entropy encoding can be performed with the bitstream "1"; and / or, if not, it can be further determined whether the width flag of at least one image block is less than 3. If so, when the flag corresponding to the fusion width of at least one image block is 2, at least two different fourth context models can be used for encoding to determine or obtain the binarized bitstream "011", and / or entropy encoding can be performed with the bitstream "011", that is, when it is 2, the output bitstream is "011"; it can also be used when the flag corresponding to the fusion width of at least one image block is 1, at least two different fourth context models can be used for encoding. Encoding with a four-context model can determine or obtain the binarized bitstream "010", and / or entropy encoding can be performed with the bitstream "010", i.e., when the value is 1, the output bitstream is "010"; and / or, if not, when the flag bit corresponding to the fusion width of at least one image block is 3, encoding with at least two different fourth-context models can determine or obtain the binarized bitstream "001", and / or entropy encoding can be performed with the bitstream "001", i.e., when the value is 3, the output bitstream is "001"; or when the flag bit corresponding to the fusion width of at least one image block is 4, encoding with at least two different fourth-context models can determine or obtain the binarized bitstream "000", and / or entropy encoding can be performed with the bitstream "000", i.e., when the value is 1, the output bitstream is "000".
[0469] Optionally, the first first context model and the second first context model can be two different context models, with the first first context model encoding the flag bit 2 and the second first context model encoding the flag bit 0.
[0470] Optionally, a context model (such as the first type of first context model) is determined or selected based on the image patch information for encoding and / or decoding, and / or a flag bit of the fusion width of at least one image patch (such as the flag bit corresponding to the third fusion width of the image patch) can be determined, and it can be determined first whether the flag bit is 2. If it is 2, then the first layer bit (such as the bit stream being "1") of the first type of first context model is used for entropy encoding and / or entropy decoding.
[0471] Optionally, a context model (such as a second first context model) is determined or selected based on the image patch information for encoding and / or decoding, and / or a flag bit of the fusion width of at least one image patch (such as a flag bit corresponding to the third fusion width of the image patch) can be determined, and it can be determined first whether the flag bit is 0. If it is 0, then the first layer bit (such as the bit stream being "1") of a fourth context model of the second first context model is used for entropy encoding and / or entropy decoding.
[0472] In this embodiment, by determining or obtaining a first context model if the image block information satisfies the first condition, and / or by performing encoding and / or decoding based on the first context model, the flexibility of determining or selecting the first context model can be guaranteed, and / or the accuracy of determining or selecting the first context model can be guaranteed, thereby supporting the improvement of encoding and / or decoding efficiency.
[0473] Third Embodiment Based on the first or second embodiment, a third embodiment of this application is proposed. In the third embodiment, step S10 includes: if the image patch information satisfies the second condition, determining or obtaining the second context model.
[0474] Optionally, if the image block information based on any one of methods 1 to 12 or any one of methods 10.1 to 10.6 satisfies the second condition, a second context model can be determined or selected in at least one context model, and / or encoding and / or decoding can be performed based on the second context model, such as entropy encoding of the flag bits of the fusion width of at least one image block based on the second context model.
[0475] Optionally, the image patch information satisfies the second condition, including at least one of the following methods 20 to 26: Method 20: At least one image block information is less than or equal to the second image block information threshold; Optionally, in the first scenario, the information of at least one image block being less than or equal to the second image block information threshold may be different from the information of at least one image block being less than or equal to the first image block information threshold.
[0476] Optionally, the first scenario may be a scenario in which only one judgment process is performed when the context model is determined or obtained, and the image block information is compared with the image block information threshold. In this case, the first image block information threshold and the second image block information threshold are different, and / or the methods 13 and 20 in the second embodiment are different.
[0477] Optionally, in the second scenario, the information of at least one image block being less than or equal to the second image block information threshold can be the same as the information of at least one image block being less than or equal to the first image block information threshold.
[0478] Optionally, the second scenario may involve at least two judgment processes when determining or obtaining the context model. One judgment process includes comparing image block information with an image block information threshold, and the other judgment process includes at least one of methods 14 to 19 in the second embodiment, or at least one of methods 21 to 26. In this case, the first image block information threshold and the second image block information threshold may be the same or different, and / or methods 13 and 20 in the second embodiment may be the same or different.
[0479] Optionally, having at least one image block information less than or equal to the second image block information threshold may include at least one of methods 13.01 to 13.23 in the second embodiment.
[0480] In this approach, by determining or obtaining a second context model when at least one image block information is less than or equal to a second image block information threshold, the flexibility of determining or selecting the second context model can be guaranteed, and / or the accuracy of determining or selecting the second context model can be guaranteed.
[0481] Method 21: At least one image patch size parameter is greater than the first image size parameter threshold, and / or matches the second context model; Optionally, the threshold for the first image size parameter can be referenced in the second embodiment, method 14.
[0482] Optionally, if the cost or expense of encoding and / or decoding the current image patch using the second context model is minimized, then at least one image patch size parameter can be determined to match the second context model.
[0483] Optionally, different image patch size parameters and different context models can be pre-set. If the image patch size parameter of the current image patch corresponds to the second context model, then it can be determined that the second context model is matched.
[0484] Optionally, a discriminator can be set to judge at least one image block size parameter. If the at least one image block size parameter is greater than a first image size parameter threshold and / or matches the second context model, then the image block information satisfies the first condition.
[0485] Optionally, if the size parameter of at least one image block is greater than the first image size parameter threshold and / or matches the second context model, and / or the size parameter of the fusion region of at least one image block is greater than the first image size parameter threshold and / or matches the second context model, then the image block information satisfies the first condition.
[0486] Optionally, the image block information may satisfy the second condition when at least one image information satisfies at least one of modes 20 to 21.
[0487] In this approach, by determining or obtaining a second context model when at least one image block size parameter is greater than a first image size parameter threshold and / or when the image block information matches the second context model, the flexibility of determining or selecting the second context model can be guaranteed, and / or the accuracy of determining or selecting the second context model can be guaranteed.
[0488] Method 22: At least one image patch size parameter and the second image size parameter range are matched; Optionally, the second image size parameter range can be a pre-set image size range (e.g., 0-60), or it can include a range of aspect ratios (e.g., 0 to 8:8), a range of widths (e.g., 0-4), a range of heights (e.g., 0-8), a range of perimeters (e.g., 0-16), or a range of areas (e.g., 0-32).
[0489] Optionally, the second image size parameter range may be the same as or different from the first image size parameter range; no restriction is imposed here.
[0490] Optionally, a discriminator can be set to discriminate at least one image block size parameter. If the at least one image block size parameter matches the range of the second image size parameter, the image block information satisfies the second condition.
[0491] Optionally, if the size parameters of at least one image block match the range of the second image size parameters, and / or the size parameters of the fusion region of at least one image block match the range of the second image size parameters, the image block information satisfies the second condition.
[0492] Optionally, the image block information may satisfy the second condition when at least one image information satisfies at least one of modes 20 to 22.
[0493] In this approach, by determining or obtaining a second context model when at least one image block size parameter and a second image size parameter range are matched, and / or when the image block information satisfies the second condition, the flexibility of determining or selecting the second context model can be guaranteed, and / or the accuracy of determining or selecting the second context model can be guaranteed.
[0494] Method 23: The cost of the third template corresponding to at least one image patch is less than or equal to the third template cost threshold; Optionally, the third template cost threshold can be a pre-set template cost, such as a template cost of 2.
[0495] Optionally, the third template cost threshold may be the same as or different from the first template cost threshold and the second template cost threshold.
[0496] Optionally, the template of at least one image patch can be encoded and / or decoded using a second context model, and the resulting template cost can be used as the second template cost.
[0497] Optionally, the rate-distortion cost of a template for at least one image patch can be determined or selected as a second template cost.
[0498] Optionally, a discriminator can be set to discriminate the third template cost corresponding to at least one image block. If the third template cost corresponding to at least one image block is less than or equal to the third template cost threshold, the image block information satisfies the second condition.
[0499] Optionally, the image block information may satisfy the second condition when at least one image information satisfies at least one of methods 20 to 23.
[0500] In this approach, by determining or obtaining a second context model when the third template cost corresponding to at least one image block is less than or equal to the third template cost threshold, the image block information satisfies the second condition, and / or when the image block information satisfies the second condition, the second context model can be determined or obtained. This ensures the flexibility of determining or selecting the second context model and / or the accuracy of determining or selecting the second context model.
[0501] Method 24 minimizes the cost of the second fusion width information and corresponds to the second context model; Optionally, the second fusion width information is different from the first fusion width information in mode 17 of the second embodiment, and / or the second fusion width information may include at least one of modes 17.1 to 17.8 in the second embodiment.
[0502] Optionally, if the second context model is used to determine or obtain at least one second fusion width information for entropy encoding and / or entropy decoding based on at least one of methods 17.1 to 17.8 in the second embodiment, compared with the use of the first context model and / or the third context model, the cost of determining or obtaining at least one second fusion width information for entropy encoding and / or entropy decoding based on at least one of methods 17.1 to 17.8 in the second embodiment is the minimum, then the cost of determining the second fusion width information is the minimum and corresponds to the second context model, and the image patch information satisfies the second condition.
[0503] Optionally, the image block information may satisfy the second condition when at least one image information satisfies at least one of modes 20 to 24.
[0504] In this approach, by determining or obtaining the second fusion width information at the lowest cost and corresponding to the second context model, the image patch information satisfies the second condition, and / or the second context model is determined or obtained when the image patch information satisfies the second condition. This ensures the flexibility of determining or selecting the second context model and / or the accuracy of determining or selecting the second context model.
[0505] Method 25: The inter-frame geometric partitioning fusion width corresponding to at least one image patch is matched with the inter-frame geometric partitioning fusion width corresponding to the second context model; Optionally, the inter-frame geometric partitioning fusion width can refer to method 18 in the second embodiment.
[0506] Optionally, a list including the inter-frame geometric partitioning fusion width corresponding to at least one second context model can be set in advance, and / or the inter-frame geometric partitioning fusion width corresponding to at least one image patch can be matched with the list. If the matching result includes the inter-frame geometric partitioning fusion width corresponding to at least one image patch matching the inter-frame geometric partitioning fusion width corresponding to the second context model, the image patch information satisfies the second condition, and / or when the image patch information satisfies the second condition, the second context model is determined or obtained.
[0507] Optionally, the image block information may satisfy the second condition when at least one image information satisfies at least one of methods 20 to 25.
[0508] In this approach, by determining or obtaining the second condition when the inter-frame geometric partitioning fusion width corresponding to at least one image patch matches the inter-frame geometric partitioning fusion width corresponding to the second context model, and / or determining or obtaining the second context model when the image patch information meets the second condition, the flexibility of determining or selecting the second context model can be guaranteed, and / or the accuracy of determining or selecting the second context model can be guaranteed.
[0509] Method 26: The intra-frame geometric partitioning fusion width corresponding to at least one image patch is matched with the intra-frame geometric partitioning fusion width corresponding to the second context model; Optionally, the intra-frame geometric partitioning fusion width can refer to method 19 in the second embodiment.
[0510] Optionally, a list including the intra-frame geometric partitioning fusion width corresponding to at least one second context model can be set in advance, and / or the intra-frame geometric partitioning fusion width corresponding to at least one image patch can be matched with the list. If the matching result includes the intra-frame geometric partitioning fusion width corresponding to at least one image patch matching the intra-frame geometric partitioning fusion width corresponding to the second context model, the image patch information satisfies the second condition, and / or when the image patch information satisfies the second condition, the second context model is determined or obtained.
[0511] Optionally, the image block information may satisfy the second condition when at least one image information satisfies at least one of methods 20 to 25.
[0512] In this approach, when the intra-frame geometric partitioning fusion width corresponding to at least one image block matches the intra-frame geometric partitioning fusion width corresponding to the second context model, the image block information satisfies the second condition, and / or when the image block information satisfies the second condition, the second context model is determined or obtained. This ensures the flexibility of determining or selecting the second context model, and / or the accuracy of determining or selecting the second context model.
[0513] Optionally, the processing device can determine or obtain a second context model by at least one of methods 20 to 25, where the image block information satisfies the second condition, and / or when the image block information satisfies the second condition, thereby ensuring the flexibility of determining or selecting the second context model and / or ensuring the accuracy of determining or selecting the second context model.
[0514] Optionally, encoding and / or decoding are performed based on the second context model and the candidate list index.
[0515] Optionally, the candidate list corresponding to the candidate list index includes at least one of the following: the offset of the image block, the fusion width difference of the image block, the fusion width of the neighboring block, the fusion width of the non-neighboring block, the fusion width of the co-located block, the fusion width of the temporal block, the fusion width of the default block, the fusion width of the cross-component block, and the fusion width of the candidate block.
[0516] Optionally, the candidate list corresponding to the candidate list index may include a candidate difference list of offsets corresponding to at least one image block, a candidate offset list of fusion width differences corresponding to at least one image block, and a candidate fusion width list.
[0517] Optionally, the elements in the candidate fusion width list may include at least one of the following: the fusion width of at least one neighboring block and its corresponding index and / or flag bit; the fusion width of at least one non-neighboring block and its corresponding index and / or flag bit; the fusion width of at least one co-located block and its corresponding index and / or flag bit; the fusion width of at least one time-domain block and its corresponding index and / or flag bit; the fusion width of at least one default block and its corresponding index and / or flag bit; the fusion width of at least one cross-component block and its corresponding index and / or flag bit; and the fusion width of at least one candidate block and its corresponding index and / or flag bit.
[0518] Optionally, the offset corresponding to the image block can be the offset between the fusion width of the image block and the fusion width of the neighboring block; the offset between the fusion width of the image block and the fusion width of the non-neighboring block; the offset between the fusion width of the image block and the fusion width of the co-located block; the offset between the fusion width of the image block and the fusion width of the temporal block; the offset between the fusion width of the image block and the fusion width of the default block; the offset between the fusion width of the image block and the fusion width of the cross-component block; or the offset between the fusion width of the image block and the fusion width of the candidate block.
[0519] Optionally, the offset corresponding to at least one image block and its corresponding candidate list index can be stored in the candidate list, that is, the offset corresponding to each image block corresponds to a candidate list index.
[0520] Optionally, a candidate list index corresponding to the fusion width (e.g., the first fusion width) of at least one image patch can be determined or selected in the candidate list (e.g., the candidate offset list) based on the second context model. It is also possible to determine or select a candidate list index corresponding to at least one of the indexes and / or flag bits corresponding to the fusion width of at least one image patch, and / or to perform entropy encoding and / or entropy decoding on the determined or selected candidate list indexes.
[0521] Optionally, the fusion width difference corresponding to the image block can be the fusion width difference between the fusion width of the image block and the fusion width of the neighboring block; the fusion width difference between the fusion width of the image block and the fusion width of the non-neighboring block; the fusion width difference between the fusion width of the image block and the fusion width of the co-located block; the fusion width difference between the fusion width of the image block and the fusion width of the temporal block; the fusion width difference between the fusion width of the image block and the fusion width of the default block; the fusion width difference between the fusion width of the image block and the fusion width of the cross-component block; or the fusion width difference between the fusion width of the image block and the fusion width of the candidate block.
[0522] Optionally, the candidate list can store the fusion width difference corresponding to at least one image block and the corresponding candidate list index, that is, the fusion width difference corresponding to each image block corresponds to a candidate list index.
[0523] Optionally, the candidate list index corresponding to the fusion width of at least one image patch can be determined or selected in the candidate list (e.g., the candidate difference list) based on the second context model (e.g., the candidate list index with the lowest cost). It is also possible to determine or select the candidate list index corresponding to at least one of the index and / or flag bits corresponding to the fusion width of at least one image patch, and / or the determined or selected candidate list index can be entropy encoded and / or entropy decoded.
[0524] Optionally, the candidate list index corresponding to each element in the candidate fusion width list can be determined or obtained, and / or the candidate list index corresponding to the fusion width of at least one image patch can be determined or selected in the candidate list (e.g., the candidate list index with the lowest cost) based on the second context model. It is also possible to determine or select the candidate list index corresponding to at least one of the index and / or flag bits corresponding to the fusion width of at least one image patch, and / or the determined or selected candidate list index can be entropy encoded and / or entropy decoded.
[0525] Optionally, at least one of the following fusion width information (e.g., first fusion width, index and / or flag bit corresponding to the first fusion width) of at least one image block can be stored in at least one candidate list: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks and candidate blocks. On the encoding side, at least one fusion width information can be determined or selected in the candidate list to encode at least one image block (e.g., image fusion processing). In the entropy encoding stage, a second context model can be used to entropy encode the selected candidate list index in the candidate list (i.e., the candidate list index corresponding to the fusion width information used on the encoding side in the candidate list). On the decoding side, entropy decoding can be performed based on the second context model, and then the fusion width information can be obtained in the candidate list based on the decoded candidate list index. Then, the at least one image block can be decoded based on the obtained fusion width information (e.g., image fusion processing).
[0526] Optionally, the difference between the fusion width information (e.g., the first fusion width, the index and / or flag corresponding to the first fusion width) of at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks and candidate blocks of at least one image block and the fusion width information of at least one image block can be stored in at least one candidate list. On the encoding side, at least one fusion width information corresponding to at least one difference can be determined or selected in the candidate list, and the at least one image block can be encoded (e.g., image fusion processing). In the entropy coding stage, the selected candidate list index in the candidate list (i.e., the candidate list index corresponding to the difference of the fusion width information used on the encoding side in the candidate list) can be entropy encoded using a second context model. On the decoding side, entropy decoding can be performed based on the second context model, and then the fusion width information can be obtained in the candidate list based on the decoded candidate list index. Then, the at least one image block can be decoded based on the obtained fusion width information (e.g., image fusion processing).
[0527] Optionally, the decoding end may use at least one of the following as the fusion width of the current image block for fusion processing, without going through the bitstream: the fusion width of the neighboring block, the fusion width of the non-neighboring block, the fusion width of the co-occurring block, the fusion width of the temporal block, the fusion width of the default block, the fusion width of the cross-component block, and the fusion width of the candidate block.
[0528] Optionally, in video encoding, to further reduce the encoding overhead of the GPM fusion width signal, when processing the block to be encoded, the encoder first obtains the information of its neighboring blocks, including the neighboring blocks and / or non-neighboring blocks on the left, the neighboring blocks and / or non-neighboring blocks above, and the neighboring blocks and / or non-neighboring blocks above the left, and determines whether these neighboring blocks have adopted GPM and its fusion width information. When the neighboring blocks have adopted GPM and their fusion width meets the preset unique determination condition, the encoder determines the fusion width of the current block (i.e., the image block) as the fusion width of the neighboring blocks. At this time, since both the encoder and the decoder can derive the fusion width based on the same rule, there is no need to explicitly transmit the fusion width syntax element in the bitstream, thereby saving encoding overhead.
[0529] Optionally, in practical applications, when there is at least one neighboring block that can be used as a reference, it can be determined or selected according to a preset priority order or block reliability to ensure the uniqueness of the derivation result. If the neighboring block cannot meet the unique determination condition, the encoder can still use the traditional method to encode the fusion width, or it can determine or select to transmit a flag bit to indicate that the current block uses neighbor derivation or explicit encoding. In this way, the fusion width of small and medium-sized blocks can be obtained by neighbor derivation in most cases, thereby significantly reducing the code rate.
[0530] For example, such as Figure 7As shown, the flag bit corresponding to the fusion width of at least one image patch can be discriminated (or judged, in this application, discrimination is used as an example). For example, a discriminator can be used to discriminate the width flag bit (i.e., the flag bit of the fusion width of the image patch) of at least one image patch to determine or obtain the context model to be used. If the first context model is used, such as the first type of first context model, it can be further determined whether the width flag bit of at least one image patch is 2. If so, a fourth context model can be used for encoding to determine or obtain the binarized bitstream "1", and the output bitstream is "1", that is, entropy encoding can be performed with the bitstream "1"; and / or, if not, it can be further determined whether the width flag bit of at least one image patch is less than 2. If so, when the flag bit corresponding to the fusion width of at least one image patch is 0, at least two different fourth context models can be used for encoding to determine or obtain the binarized bitstream "011", and / or the bitstream can be "011". Entropy coding can be performed on "011", meaning the output bitstream is "011" when the value is 0. Alternatively, when the flag bit corresponding to the fusion width of at least one image block is 1, encoding can be performed using at least two different fourth context models to determine or obtain the binarized bitstream "010", and / or entropy coding can be performed on the bitstream "010", meaning the output bitstream is "010" when the value is 1. Alternatively, if not, when the flag bit corresponding to the fusion width of at least one image block is 3, encoding can be performed using at least two different fourth context models to determine or obtain the binarized bitstream "001", and / or entropy coding can be performed on the bitstream "001", meaning the output bitstream is "001" when the value is 3. Alternatively, when the flag bit corresponding to the fusion width of at least one image block is 4, encoding can be performed using at least two different fourth context models to determine or obtain the binarized bitstream "000", and / or entropy coding can be performed on the bitstream "000", meaning the output bitstream is "000" when the value is 1.
[0531] If the second context model is used, neighborhood information can be used to deduce that the current width should not output a bitstream.
[0532] For example, such as Figure 8As shown, the flag bit corresponding to the fusion width of at least one image patch can be discriminated (or judged, in this application, discrimination is used as an example). For example, a discriminator can be used to discriminate the width flag bit (i.e., the flag bit of the fusion width of the image patch) of at least one image patch to determine or obtain the context model to be used. If the first context model is used, such as the first type of first context model, it can be further determined whether the width flag bit of at least one image patch is 2. If so, a fourth context model can be used for encoding to determine or obtain the binarized bitstream "1", and the output bitstream is "1", that is, entropy encoding can be performed with the bitstream "1"; and / or, if not, it can be further determined whether the width flag bit of at least one image patch is less than 2. If so, when the flag bit corresponding to the fusion width of at least one image patch is 0, at least two different fourth context models can be used for encoding to determine or obtain the binarized bitstream "011", and / or the bitstream can be "011". Entropy coding can be performed on "011", meaning the output bitstream is "011" when the value is 0. Alternatively, when the flag bit corresponding to the fusion width of at least one image block is 1, encoding can be performed using at least two different fourth context models to determine or obtain the binarized bitstream "010", and / or entropy coding can be performed on the bitstream "010", meaning the output bitstream is "010" when the value is 1. Alternatively, if not, when the flag bit corresponding to the fusion width of at least one image block is 3, encoding can be performed using at least two different fourth context models to determine or obtain the binarized bitstream "001", and / or entropy coding can be performed on the bitstream "001", meaning the output bitstream is "001" when the value is 3. Alternatively, when the flag bit corresponding to the fusion width of at least one image block is 4, encoding can be performed using at least two different fourth context models to determine or obtain the binarized bitstream "000", and / or entropy coding can be performed on the bitstream "000", meaning the output bitstream is "000" when the value is 1.
[0533] Optionally, if a second context model is used, a merged list of width flags can be constructed based on the second context model using neighborhood information and previously encoded information, and the index of the width in the merged list (i.e., the candidate list index) can be output. Then, entropy encoding and / or entropy decoding can be performed on the output candidate list index.
[0534] Optionally, to address situations where neighboring blocks cannot uniquely determine the fusion width of the current block, the encoder may choose to transmit a flag or a merging list in the bitstream to indicate whether the current block (i.e., the image block) uses neighborhood derivation or explicit encoding. When the encoder determines that a neighboring block (e.g., a neighboring block) meets the unique determination condition, it can use the fusion width of the neighboring block without transmitting additional information. However, when the neighborhood derivation condition is not met, the encoder indicates to the decoder whether to use neighborhood derivation for the current block by transmitting a flag, or provides multiple candidate fusion widths for the decoder to determine or select the optimal value by transmitting a merging list, thereby ensuring that the decoder can accurately reconstruct the fusion width information.
[0535] Optionally, in practical applications, the flag bit is usually a single bit, indicating whether neighborhood derivation is used, while the merging list (i.e., candidate list) contains several candidate values for the fusion width of neighboring blocks and their related indices. The encoder can determine or select the optimal fusion width and send it to the decoder. This can ensure the flexibility of encoding and / or the correctness of decoding, and / or improve the overall encoding efficiency, even when there is insufficient neighborhood information or conflicts.
[0536] In this embodiment, by determining or obtaining a second context model if the image patch information satisfies the second condition, and / or by encoding and / or decoding based on the second context model and the candidate list index, the flexibility of determining or selecting the second context model can be guaranteed, and / or the accuracy of determining or selecting the second context model can be guaranteed.
[0537] Fourth embodiment Based on any one of the first to third embodiments, a fourth embodiment of this application is proposed. In the fourth embodiment, step S10 includes: if the image patch information satisfies a third condition, determining or obtaining a third context model.
[0538] Optionally, if the image block information based on any one of methods 1 to 12 or any one of methods 10.1 to 10.6 satisfies the third condition, a third context model can be determined or selected in at least one context model, and / or encoding and / or decoding can be performed based on the third context model, such as entropy encoding of the flag bits of the fusion width of at least one image block based on the third context model.
[0539] Optionally, the image patch information satisfies a third condition, including at least one of the following methods 27 to 33: Method 27: At least one image block information is less than or equal to the threshold of the third image block information; Optionally, in the third scenario, at least one image block information is less than or equal to a third image block information threshold, which may be different from at least one image block information being less than or equal to a first image block information threshold, or it may be different from at least one image block information being less than or equal to a second image block information threshold.
[0540] Optionally, the third scenario may be a scenario in which only one judgment process is performed when the context model is determined or obtained, and the image block information is compared with the image block information threshold. In this case, the first image block information threshold, the second image block information threshold, and the third image block information threshold are all different, and / or the method 13 in the second embodiment, the method 20 in the third embodiment, and the method 27 in this embodiment are different.
[0541] Optionally, in the fourth scenario, at least one image block information is less than or equal to the third image block information threshold, which may be the same as or different from the first image block information threshold, or the same as or different from the second image block information threshold.
[0542] Optionally, the fourth scenario may involve at least two judgment processes when determining or obtaining the context model. One judgment process includes comparing image block information with an image block information threshold. The other judgment process includes at least one of methods 14 to 19 in the second embodiment, or at least one of methods 21 to 26 in the third embodiment, or at least one of methods 28 to 33 in the fourth embodiment. In this case, the first image block information threshold, the second image block information threshold, and the third image block information threshold may be the same or different, and / or methods 13 in the second embodiment, methods 20 in the third embodiment, and / or methods 27 in this embodiment may be the same or different.
[0543] Optionally, having at least one image block information less than or equal to a third image block information threshold may include at least one of methods 13.01 to 13.23 in the second embodiment.
[0544] In this approach, by determining or obtaining a third context model when at least one image block information is less than or equal to a third image block information threshold, the flexibility of determining or selecting the third context model can be guaranteed, and / or the accuracy of determining or selecting the third context model can be guaranteed.
[0545] Method 28: At least one image patch size parameter is greater than the first image size parameter threshold, and / or matches the third context model; Optionally, the threshold for the first image size parameter can be referenced in the second embodiment, method 14.
[0546] Optionally, if the cost or expense of encoding and / or decoding the current image patch using the third context model is minimized, then at least one image patch size parameter can be determined to match the third context model.
[0547] Optionally, different image patch size parameters and different context models can be pre-set. If the image patch size parameter of the current image patch corresponds to the third context model, then it can be determined that it matches the third context model.
[0548] Optionally, a discriminator can be set to judge at least one image block size parameter. If the at least one image block size parameter is greater than the first image size parameter threshold and / or matches the third context model, the image block information satisfies the third condition.
[0549] Optionally, if the size parameter of at least one image block is greater than the first image size parameter threshold and / or matches the third context model, and / or the size parameter of the fusion region of at least one image block is greater than the first image size parameter threshold and / or matches the third context model, the image block information satisfies the third condition.
[0550] Optionally, the image block information may satisfy the third condition when at least one image information satisfies at least one of methods 27 to 28.
[0551] In this approach, by determining or obtaining a third context model when at least one image block size parameter is greater than a first image size parameter threshold and / or matches a third context model, the image block information satisfies a third condition, and / or the third context model is determined or obtained when the image block information satisfies the third condition, the flexibility of determining or selecting the third context model can be guaranteed, and / or the accuracy of determining or selecting the third context model can be guaranteed.
[0552] Method 29: At least one image block size parameter and the third image size parameter range are matched; Optionally, the third image size parameter range can be a pre-set image size range (e.g., 0-70), or it can include a range of aspect ratios (e.g., 0 to 8:8), a range of widths (e.g., 0-4), a range of heights (e.g., 0-8), a range of perimeters (e.g., 0-16), or a range of areas (e.g., 0-32).
[0553] Optionally, the third image size parameter range may be the same as or different from the first and second image size parameter ranges; no restriction is imposed here.
[0554] Optionally, a discriminator can be set to discriminate at least one image block size parameter. If the at least one image block size parameter matches the range of the third image size parameter, the image block information satisfies the third condition.
[0555] Optionally, if the size parameter of at least one image block matches the range of the third image size parameter, and / or the size parameter of the fusion region of at least one image block matches the range of the third image size parameter, the image block information satisfies the third condition.
[0556] Optionally, the image block information may satisfy the third condition when at least one image information satisfies at least one of methods 27 to 29.
[0557] In this approach, by determining or obtaining a third context model when at least one image block size parameter and a third image size parameter range match, the image block information satisfies a third condition, and / or when the image block information satisfies the third condition, the flexibility of determining or selecting the third context model can be guaranteed, and / or the accuracy of determining or selecting the third context model can be guaranteed.
[0558] Method 30 minimizes the cost of the third fusion width information and corresponds to the third context model; Optionally, the third fusion width information is different from the first fusion width information in mode 17 of the second embodiment and also different from the second fusion width information in mode 24 of the third embodiment, and the third fusion width information may include at least one of mode 17.1 to mode 17.8.
[0559] Optionally, if the third context model is used to determine or obtain at least one third fusion width information for entropy encoding and / or entropy decoding based on at least one of methods 17.1 to 17.8 in the second embodiment, compared with the use of the first context model and / or the third context model, the cost of using at least one of methods 17.1 to 17.8 in the second embodiment to determine or obtain at least one third fusion width information for entropy encoding and / or entropy decoding is the lowest. Therefore, it can be determined that the cost of the third fusion width information is the lowest and corresponds to the third context model. At this time, it can also be determined that the image block information satisfies the third condition.
[0560] Optionally, the image block information may satisfy the third condition when at least one image information satisfies at least one of methods 27 to 30.
[0561] In this approach, the image patch information satisfies the third condition when the cost of determining or obtaining the third fusion width information is minimized and corresponds to the third context model, and / or the third context model is determined or obtained when the image patch information satisfies the third condition. This ensures the flexibility of determining or selecting the third context model and / or the accuracy of determining or selecting the third context model.
[0562] Method 31: The cost of the fourth template corresponding to at least one image patch is less than or equal to the cost threshold of the fourth template. Optionally, the fourth template cost threshold can be a pre-set template cost, such as a template cost of 3.
[0563] Optionally, the fourth template cost threshold may be the same as or different from the first template cost threshold, the second template cost threshold, and the third template cost threshold.
[0564] Optionally, the template of at least one image patch can be encoded and / or decoded using a third context model, and the resulting template cost can be used as the fourth template cost.
[0565] Optionally, the rate-distortion cost of a template for at least one image patch can be determined or selected as the fourth template cost.
[0566] Optionally, a discriminator can be set to discriminate the fourth template cost corresponding to at least one image block. If the fourth template cost corresponding to at least one image block is less than or equal to the fourth template cost threshold, the image block information satisfies the third condition.
[0567] Optionally, the image block information may satisfy the third condition when at least one image information satisfies at least one of methods 27 to 31.
[0568] In this approach, by determining or obtaining a third context model when the fourth template cost corresponding to at least one image block is less than or equal to the fourth template cost threshold, the image block information satisfies the third condition, and / or when the image block information satisfies the third condition, the flexibility of determining or selecting the third context model can be guaranteed, and / or the accuracy of determining or selecting the third context model can be guaranteed.
[0569] Method 32: The inter-frame geometric partitioning fusion width corresponding to at least one image patch is matched with the inter-frame geometric partitioning fusion width corresponding to the third context model; Optionally, the inter-frame geometric partitioning fusion width can refer to method 18 in the second embodiment.
[0570] Optionally, a list including the inter-frame geometric partitioning fusion width corresponding to at least one third context model can be set in advance, and / or the inter-frame geometric partitioning fusion width corresponding to at least one image patch can be matched with the list. If the matching result includes the inter-frame geometric partitioning fusion width corresponding to at least one image patch matching the inter-frame geometric partitioning fusion width corresponding to the third context model, the image patch information satisfies the third condition, and / or when the image patch information satisfies the third condition, the third context model is determined or obtained.
[0571] Optionally, the image block information may satisfy the third condition when at least one image information satisfies at least one of methods 27 to 32.
[0572] In this approach, by determining or obtaining the inter-frame geometric partitioning fusion width corresponding to at least one image block that matches the inter-frame geometric partitioning fusion width corresponding to the third context model, the image block information satisfies the third condition, and / or the third context model is determined or obtained when the image block information satisfies the third condition. This ensures the flexibility of determining or selecting the third context model, and / or the accuracy of determining or selecting the third context model.
[0573] Method 33: The intra-frame geometric partitioning fusion width corresponding to at least one image block is matched with the intra-frame geometric partitioning fusion width corresponding to the third context model.
[0574] Optionally, the intra-frame geometric partitioning fusion width can refer to method 19 in the second embodiment.
[0575] Optionally, a list including the intra-frame geometric partitioning fusion width corresponding to at least one third context model can be set in advance, and / or the intra-frame geometric partitioning fusion width corresponding to at least one image patch can be matched with the list. If the matching result includes the intra-frame geometric partitioning fusion width corresponding to at least one image patch matching the intra-frame geometric partitioning fusion width corresponding to the third context model, the image patch information satisfies the third condition, and / or when the image patch information satisfies the third condition, the third context model is determined or obtained.
[0576] Optionally, the image block information may satisfy the third condition when at least one image information satisfies at least one of methods 27 to 33.
[0577] In this approach, by determining or obtaining the third condition when the intra-frame geometric partitioning fusion width corresponding to at least one image block matches the intra-frame geometric partitioning fusion width corresponding to the third context model, and / or determining or obtaining the third context model when the image block information meets the third condition, the flexibility of determining or selecting the third context model can be guaranteed, and / or the accuracy of determining or selecting the third context model can be guaranteed.
[0578] Optionally, the processing device can determine or obtain a third context model by at least one of methods 27 to 33, where the image block information satisfies the third condition, and / or when the image block information satisfies the third condition, thereby ensuring the flexibility of the determination or selection of the third context model and / or ensuring the accuracy of the determination or selection of the third context model.
[0579] Optionally, encoding and / or decoding are performed based on a third context model and a pattern index.
[0580] Optionally, the schema index corresponds to at least one decision tree schema, and different decision tree models use different schema indexes.
[0581] Optionally, at the encoding end, the pattern index corresponding to the decision tree model used at the encoding end can be determined or obtained based on the third context model, and entropy encoding can be performed. The pattern index is transmitted to the decoding end through the bitstream. At the decoding end, the pattern index is obtained by decoding, and / or the fusion width of at least one image block is determined or obtained based on the decision tree model corresponding to the pattern index. The fusion processing of at least one image block is performed based on the fusion width of at least one image block (e.g., fusion processing of at least two reconstructed image blocks).
[0582] For example, such as Figure 9As shown, the flag bit corresponding to the fusion width of at least one image patch can be discriminated (or judged, in this application, discrimination is used as an example). For example, a discriminator can be used to discriminate the width flag bit (i.e., the flag bit of the fusion width of the image patch) of at least one image patch to determine or obtain the context model to be used. If the first context model is used, such as the first type of first context model, it can be further determined whether the width flag bit of at least one image patch is 2. If so, a fourth context model can be used for encoding to determine or obtain the binarized bitstream "1", and the output bitstream is "1", that is, entropy encoding can be performed with the bitstream "1"; and / or, if not, it can be further determined whether the width flag bit of at least one image patch is less than 2. If so, when the flag bit corresponding to the fusion width of at least one image patch is 0, at least two different fourth context models can be used for encoding to determine or obtain the binarized bitstream "011", and / or the bitstream can be "011". Entropy coding can be performed on "011", meaning the output bitstream is "011" when the value is 0. Alternatively, when the flag bit corresponding to the fusion width of at least one image block is 1, encoding can be performed using at least two different fourth context models to determine or obtain the binarized bitstream "010", and / or entropy coding can be performed on the bitstream "010", meaning the output bitstream is "010" when the value is 1. Alternatively, if not, when the flag bit corresponding to the fusion width of at least one image block is 3, encoding can be performed using at least two different fourth context models to determine or obtain the binarized bitstream "001", and / or entropy coding can be performed on the bitstream "001", meaning the output bitstream is "001" when the value is 3. Alternatively, when the flag bit corresponding to the fusion width of at least one image block is 4, encoding can be performed using at least two different fourth context models to determine or obtain the binarized bitstream "000", and / or entropy coding can be performed on the bitstream "000", meaning the output bitstream is "000" when the value is 1.
[0583] Optionally, if a third context model is used, encoding and / or decoding can be performed based on the third context model combined with the pattern index, and the current width (i.e., the fusion width of the image patch) can be derived using the decision tree model corresponding to the pattern index, corresponding to "derive the current width using the decision tree and output: the decision tree flag is 1" in the figure.
[0584] Optionally, a decision tree flag of 1 can be a pattern index.
[0585] Optionally, to further improve the prediction accuracy and coding efficiency of the fusion width, the encoder first collects sample data from a large number of video sequences during the offline training phase. This includes features such as the size information of the block to be encoded, motion vector difference, fusion width of neighboring blocks, texture complexity, and brightness variation. The training set is constructed using the actual optimal fusion width as the label. Subsequently, a multi-layer decision tree model is generated using criteria such as information gain or Gini coefficient. Hyperparameters such as maximum depth and minimum number of leaf node samples can be set according to actual needs to obtain a prediction model with good generalization ability (i.e., a decision tree model).
[0586] During the encoding phase, the encoder extracts the same feature vector as the training phase for the current block to be encoded (i.e. the image block to be entropy encoded) and inputs it into the trained decision tree model to obtain the prediction result of the fusion width of the block. When the prediction is better than the traditional method, the encoder can use the fusion width output by the decision tree and ensure that the decoder can derive it synchronously through the model shared with the decoder, so that the fusion width syntax element does not need to be explicitly transmitted.
[0587] Optionally, through this decision tree prediction mechanism, the encoder can utilize block features and neighborhood information, and / or improve the overall encoding and compression efficiency.
[0588] In this embodiment, by determining or obtaining a third context model if the image block information satisfies the third condition, and / or by encoding and / or decoding based on the third context model, the flexibility of determining or selecting the third context model can be guaranteed, and / or the accuracy of determining or selecting the third context model can be guaranteed.
[0589] Fifth embodiment Based on any one of the first to fourth embodiments, a fifth embodiment of this application is proposed. In this embodiment, step S10 may include at least one of the following: if the image block information satisfies the first condition, determine or obtain a first context model; if the image block information satisfies the second condition, determine or obtain a second context model; if the image block information satisfies the third condition, determine or obtain a third context model. The specific implementation process can refer to at least one of the second to fourth embodiments.
[0590] Optionally, if at least two of the first context model, the second context model, and the third context model are determined simultaneously, the determination or selection can be based on the cost or expense of entropy encoding and / or entropy decoding of the current image patch using at least two of the models, such as determining or selecting the context model with the lowest cost or expense.
[0591] For example, if a first context model and a second context model are determined or obtained simultaneously, and the cost or expense of the first context model is minimized, then the first context model can be determined or selected, and / or encoding and / or decoding can be performed based on the first context model.
[0592] Optionally, if at least two of the first context model, second context model, and third context model are determined simultaneously, encoding and / or decoding can also be performed simultaneously based on the determined at least two of them, such as encoding and / or decoding based on the first context model; encoding and / or decoding based on the second context model and the candidate list index; encoding and / or decoding based on the third context model and the pattern index; and then determining or selecting the encoding and / or decoding result that has the best effect.
[0593] In this embodiment, by determining or obtaining a suitable context model based on image patch information satisfying different conditions (such as at least one of the first, second, and third conditions), encoding and / or decoding can be performed based on the context model, which can ensure the flexibility of context model determination or selection, and / or the accuracy of context model determination or selection.
[0594] Reference Figure 10 This application also provides an image processing apparatus, which includes: Processing module A10 is used to determine or obtain a context model based on image patch information.
[0595] Optionally, the context model includes at least one of a first context model, a second context model, and a third context model; Optionally, the image patch information includes at least one of the following: The image patch includes at least one of the following parameters: size, aspect ratio, width, height, perimeter, and area; fusion width information of the image patch; first template cost of the image patch; fusion region of the image patch, index corresponding to the fusion region of the image patch, and flag bit corresponding to the fusion region of the image patch; size, position, and / or shape parameters corresponding to the fusion region of the image patch; sequence resolution corresponding to the image patch; frame type corresponding to the image patch; encoding mode corresponding to the image patch; motion complexity corresponding to the image patch; neighborhood information corresponding to the image patch; at least one of the following parameters: fusion width difference, index difference, and flag bit difference corresponding to the fusion width of the image patch; and at least one of the following parameters: fusion region difference, index difference, and flag bit difference corresponding to the fusion region of the image patch.
[0596] Optionally, the first context model includes at least two different fourth context models; Optionally, the image patch fusion width information includes at least one of the following: the image patch fusion width, the index corresponding to the image patch fusion width, and the flag bit corresponding to the image patch fusion width; Optionally, the neighborhood information includes at least one of the following: The partitioning pattern of at least one of the following image blocks: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks; the first fusion width of at least one of the following image blocks: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks; the index and / or flag bit corresponding to the first fusion width; the first fusion region of at least one of the following image blocks: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks; the index and / or flag bit corresponding to the first fusion region; and the size parameter, position parameter, and / or shape parameter corresponding to the first fusion region.
[0597] Optionally, processing module A10 is configured to perform at least one of the following: If the image patch information satisfies the first condition, the first context model is determined or obtained. If the image patch information satisfies the second condition, the second context model is determined or obtained. If the image patch information satisfies the third condition, the third context model is determined or obtained.
[0598] Optionally, processing module A10 is configured to perform at least one of the following: Encoding and / or decoding are performed based on the first context model; Encoding and / or decoding are performed based on the second context model and the candidate list index; Encoding and / or decoding are performed based on a third context model and pattern index.
[0599] Optionally, processing module A10 is configured to perform at least one of the following: When the index corresponding to the fusion width of at least one image block is a first value and / or the flag bit is a second value, entropy encoding and / or entropy decoding are performed based on the fourth context model and / or the first bit, and / or when the index corresponding to the fusion width of at least one image block is not a first value and / or the flag bit is not a second value, entropy encoding and / or entropy decoding are performed based on at least two different fourth context models and / or second length bits. The schema index corresponds to at least one decision tree schema; The candidate list corresponding to the candidate list index includes at least one of the following: the offset of the image block, the fusion width difference of the image block, the fusion width of the neighboring block, the fusion width of the non-neighboring block, the fusion width of the co-located block, the fusion width of the temporal block, the fusion width of the default block, the fusion width of the cross-component block, and the fusion width of the candidate block.
[0600] Optionally, the image patch information satisfies a first condition, including at least one of the following: At least one image block information is less than or equal to the first image block information threshold; At least one image patch size parameter is less than or equal to the first image size parameter threshold; At least one image patch size parameter matches the range of the first image size parameter; The cost of the second template corresponding to at least one image patch is less than or equal to the second template cost threshold; The first fusion width information cost is the lowest and corresponds to the first context model; At least one image patch has an inter-frame geometric partitioning fusion width that matches the inter-frame geometric partitioning fusion width of the first context model. At least one image patch has an intra-frame geometric partitioning fusion width that matches the intra-frame geometric partitioning fusion width of the first context model. And / or, the image patch information satisfies the second condition, including at least one of the following: At least one image block information is less than or equal to the second image block information threshold; At least one image patch size parameter is greater than the first image size parameter threshold, and / or matches the second context model; At least one image patch size parameter and the second image size parameter range match; At least one image patch has a third template cost that is less than or equal to the third template cost threshold. The second fusion width information cost is the lowest and corresponds to the second context model; At least one image patch has an inter-frame geometric partitioning fusion width that matches the inter-frame geometric partitioning fusion width of the second context model. At least one image patch has an intra-frame geometric partitioning fusion width that matches the intra-frame geometric partitioning fusion width of the second context model. And / or, the image patch information satisfies a third condition, including at least one of the following: At least one image block information is less than or equal to the threshold of the third image block information; At least one image patch size parameter is greater than the first image size parameter threshold, and / or matches the third context model; At least one image patch size parameter and the third image size parameter range match; The third fusion width information has the lowest cost and corresponds to the third context model; At least one image patch has a fourth template cost that is less than or equal to the fourth template cost threshold. At least one image patch has an inter-frame geometric partitioning fusion width that matches the inter-frame geometric partitioning fusion width of the third context model. At least one image patch has an intra-frame geometric partitioning fusion width that matches the intra-frame geometric partitioning fusion width of the third context model.
[0601] Optionally, the first fusion width information, or the second fusion width information, or the third fusion width information includes at least one of the following: The fusion width information that satisfies the fourth condition; The fusion width information is determined or obtained based on image patch information; The fusion width information is determined or obtained based on pre-training information; The fusion width information is determined or obtained based on the first lookup table and / or the first neural network; The minimum required bit length for fused width information; The merge width information after template matching reordering; Based on the fusion width information determined or obtained from the first decision tree model; The specified image block information input under the first judgment condition determines or obtains the fusion width information.
[0602] Optionally, at least one image block information is less than or equal to a first image block information threshold, and / or, at least one image block information is less than or equal to a second image block information threshold, and / or, at least one image block information is less than or equal to a third image block information threshold, including at least one of the following: The size parameter of at least one image block is less than or equal to the threshold of at least one second image size parameter; At least one image patch has an aspect ratio less than or equal to at least one aspect ratio threshold; At least one image patch has a width less than or equal to at least one width threshold; At least one image block has a height less than or equal to at least one height threshold; At least one image patch has a perimeter less than or equal to at least one perimeter threshold; The area of at least one image patch is less than or equal to at least one area threshold; At least one fusion width information is less than or equal to the second fusion width information threshold; The first template cost of at least one image patch is less than or equal to the first template cost threshold; The fusion region of at least one image patch is threshold-matched with at least one first fusion region; The index of the fusion region is less than or equal to at least one image patch of a first index threshold; The flag bit of the fused region is less than or equal to at least one first flag bit threshold of at least one image block; The size parameter of the fusion region is less than or equal to at least one image block of at least one third image size parameter threshold; At least one image patch whose location parameters of the fused region match at least one location parameter threshold; At least one image patch whose shape parameters of the fusion region match at least one shape parameter threshold; At least one image patch corresponds to a sequence resolution that is less than or equal to at least one sequence resolution threshold; At least one image patch corresponds to a frame type that matches at least one first frame type; At least one image block corresponds to a coding pattern that matches at least one first coding pattern; The motion complexity corresponding to at least one image patch is less than or equal to at least one motion complexity threshold; The neighborhood information corresponding to at least one image patch is less than or equal to the threshold of at least one neighborhood information; At least one fusion width difference is less than or equal to the first fusion width difference threshold; The fusion width of at least one image patch and / or the index difference corresponding to the fusion region is less than or equal to at least one first index difference threshold; The fusion width of at least one image block and / or the flag bit difference value corresponding to the fusion region is less than or equal to at least one first flag bit difference value threshold; At least one fusion region difference is less than or equal to the first fusion region difference threshold.
[0603] The processing device provided in this application embodiment is similar in implementation principle and beneficial effect to the technical solution shown in the corresponding method embodiment above, and will not be described again here.
[0604] This application also provides a processing device, including a memory and a processor. The memory stores an image processing program, and when the image processing program is executed by the processor, it implements the steps of the image processing method in any of the above embodiments.
[0605] This application also provides a storage medium storing an image processing program, which, when executed by a processor, implements the steps of the image processing method in any of the above embodiments.
[0606] In the embodiments of the smart terminal and storage medium provided in this application, all the technical features of any of the above-described image processing method embodiments may be included. The extended and explanatory content of the specification is basically the same as that of the embodiments of the above methods, and will not be repeated here.
[0607] This application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the methods described in the various possible implementations above.
[0608] This application also provides a chip, including a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device with the chip installed performs the methods described in the various possible implementations above.
[0609] It is understood that the above scenarios are merely examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of this application. The technical solutions of this application can also be applied to other scenarios. For example, as those skilled in the art will know, with the evolution of 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.
[0610] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0611] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.
[0612] The units in the device of this application embodiment can be merged, divided, and deleted according to actual needs.
[0613] In this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions are generally described in detail only when they appear for the first time. When they appear again, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, the same or similar terms, concepts, technical solutions and / or application scenario descriptions that are not described in detail later can be referred to their previous relevant detailed descriptions.
[0614] In this application, the descriptions of the various embodiments have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0615] The technical features of the present application can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present application.
[0616] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of this application.
[0617] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a storage medium or transmitted from one storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, storage disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0618] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. An image processing method, characterized in that, Including the following steps: S10, determine or obtain the context model based on image patch information; The context model includes a first context model, which includes at least two different fourth context models; Step S10 includes: If the image patch information satisfies the first condition, a first context model is determined or selected in at least one context model, wherein the image patch information satisfies the first condition including at least one image patch size parameter being less than or equal to a first image size parameter threshold. When the index corresponding to the fusion width of at least one image block is a first value and / or the flag bit is a second value, entropy encoding and / or entropy decoding are performed on the fusion width information of at least one image block based on the fourth context model and the first bit; wherein, the first value and / or the second value is at least one of 0, 1, 2, 3, 4; firstly, it is determined whether the index corresponding to the fusion width of at least one image block is 0, if it is 0, then entropy encoding and / or entropy decoding are performed on the fusion width information of at least one image block based on the fourth context model using the first bit; When the index corresponding to the fusion width of at least one image block is not a first value and / or the flag bit is not a second value, the fusion width information of at least one image block is entropy encoded and / or entropy decoded using a second length bit based on at least two different fourth context models, wherein the second length bit is greater than the length of the first bit.
2. The method as described in claim 1, characterized in that, The context model includes at least one of a second context model and a third context model; and / or, the image patch information includes at least one of the following: The image block's size parameters, aspect ratio, width, height, perimeter, and area; Image patch fusion width information; First template cost of the image patch; The image patch's fusion region, the index corresponding to the image patch's fusion region, and the flag bit corresponding to the image patch's fusion region; The size, position, and / or shape parameters of the fusion region of the image patch; The sequence resolution corresponding to the image patch; The frame type corresponding to the image patch; The encoding mode corresponding to the image block; Motion complexity corresponding to image patches; Neighborhood information corresponding to the image patch; The image patch's fusion width corresponds to at least one of the following: fusion width difference, index difference, and flag bit difference; The image patch's fusion region corresponds to at least one of the following: fusion region difference, index difference, and flag bit difference.
3. The method as described in claim 2, characterized in that, It also includes at least one of the following: The image patch fusion width information includes at least one of the following: the image patch fusion width, the index corresponding to the image patch fusion width, and the flag bit corresponding to the image patch fusion width; Neighborhood information includes at least one of the following: A partitioning pattern of at least one of the following: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks; The first fusion width is selected from at least one of the following: neighboring blocks, non-neighboring blocks, co-located blocks, temporal blocks, default blocks, cross-component blocks, and candidate blocks; The index and / or flag bits corresponding to the first fusion width; The first fusion region is selected from at least one of the following: neighboring block, non-neighboring block, co-located block, temporal block, default block, cross-component block, and candidate block; The index and / or flag bits corresponding to the first fusion region; The size parameters, position parameters, and / or shape parameters corresponding to the first fusion region.
4. The method according to any one of claims 1 to 3, characterized in that, Step S10 also includes at least one of the following: If the image patch information satisfies the second condition, the second context model is determined or obtained. If the image patch information satisfies the third condition, the third context model is determined or obtained.
5. The method as described in claim 4, characterized in that, It also includes at least one of the following: Encoding and / or decoding are performed based on the second context model and the candidate list index; Encoding and / or decoding are performed based on a third context model and pattern index.
6. The method as described in claim 5, characterized in that, It also includes at least one of the following: The schema index corresponds to at least one decision tree schema; The candidate list corresponding to the candidate list index includes at least one of the following: the offset of the image block, the fusion width difference of the image block, the fusion width of the neighboring block, the fusion width of the non-neighboring block, the fusion width of the co-located block, the fusion width of the temporal block, the fusion width of the default block, the fusion width of the cross-component block, and the fusion width of the candidate block.
7. The method as described in claim 4, characterized in that, The image patch information satisfies the first condition and also includes at least one of the following: At least one image block information is less than or equal to the first image block information threshold; At least one image patch size parameter matches the range of the first image size parameter; The cost of the second template corresponding to at least one image patch is less than or equal to the second template cost threshold; The first fusion width information cost is the lowest and corresponds to the first context model; At least one image patch has an inter-frame geometric partitioning fusion width that matches the inter-frame geometric partitioning fusion width of the first context model. At least one image patch has an intra-frame geometric partitioning fusion width that matches the intra-frame geometric partitioning fusion width of the first context model. And / or, the image patch information satisfies the second condition, including at least one of the following: At least one image block information is less than or equal to the second image block information threshold; At least one image patch size parameter is greater than the first image size parameter threshold, and / or matches the second context model; At least one image patch size parameter and the second image size parameter range match; At least one image patch has a third template cost that is less than or equal to the third template cost threshold. The second fusion width information cost is the lowest and corresponds to the second context model; At least one image patch has an inter-frame geometric partitioning fusion width that matches the inter-frame geometric partitioning fusion width of the second context model. At least one image patch has an intra-frame geometric partitioning fusion width that matches the intra-frame geometric partitioning fusion width of the second context model. And / or, the image patch information satisfies a third condition, including at least one of the following: At least one image block information is less than or equal to the threshold of the third image block information; At least one image patch size parameter is greater than the first image size parameter threshold, and / or matches the third context model; At least one image patch size parameter and the third image size parameter range match; The third fusion width information has the lowest cost and corresponds to the third context model; At least one image patch has a fourth template cost that is less than or equal to the fourth template cost threshold. At least one image patch has an inter-frame geometric partitioning fusion width that matches the inter-frame geometric partitioning fusion width of the third context model. At least one image patch has an intra-frame geometric partitioning fusion width that matches the intra-frame geometric partitioning fusion width of the third context model.
8. The method as described in claim 7, characterized in that, The first fusion width information, or the second fusion width information, or the third fusion width information, includes at least one of the following: The fusion width information that satisfies the fourth condition; The fusion width information is determined or obtained based on image patch information; The fusion width information is determined or obtained based on pre-training information; The fusion width information is determined or obtained based on the first lookup table and / or the first neural network; The minimum required bit length for fused width information; The merge width information after template matching reordering; Based on the fusion width information determined or obtained from the first decision tree model; The specified image block information input under the first judgment condition determines or obtains the fusion width information.
9. The method as described in claim 7 or 8, characterized in that, At least one image block information is less than or equal to a first image block information threshold, and / or, at least one image block information is less than or equal to a second image block information threshold, and / or, at least one image block information is less than or equal to a third image block information threshold, including at least one of the following: The size parameter of at least one image block is less than or equal to the threshold of at least one second image size parameter; At least one image patch has an aspect ratio less than or equal to at least one aspect ratio threshold; At least one image patch has a width less than or equal to at least one width threshold; At least one image block has a height less than or equal to at least one height threshold; At least one image patch has a perimeter less than or equal to at least one perimeter threshold; The area of at least one image patch is less than or equal to at least one area threshold; At least one fusion width information is less than or equal to the second fusion width information threshold; The first template cost of at least one image patch is less than or equal to the first template cost threshold; The fusion region of at least one image patch is threshold-matched with at least one first fusion region; The index of the fusion region is less than or equal to at least one image patch of a first index threshold; The flag bit of the fused region is less than or equal to at least one first flag bit threshold of at least one image block; The size parameter of the fusion region is less than or equal to at least one image block of at least one third image size parameter threshold; At least one image patch whose location parameters of the fused region match at least one location parameter threshold; At least one image patch whose shape parameters of the fusion region match at least one shape parameter threshold; At least one image patch corresponds to a sequence resolution that is less than or equal to at least one sequence resolution threshold; At least one image patch corresponds to a frame type that matches at least one first frame type; At least one image block corresponds to a coding pattern that matches at least one first coding pattern; The motion complexity corresponding to at least one image patch is less than or equal to at least one motion complexity threshold; The neighborhood information corresponding to at least one image patch is less than or equal to the threshold of at least one neighborhood information; At least one fusion width difference is less than or equal to the first fusion width difference threshold; The fusion width of at least one image patch and / or the index difference corresponding to the fusion region is less than or equal to at least one first index difference threshold; The fusion width of at least one image block and / or the flag bit difference value corresponding to the fusion region is less than or equal to at least one first flag bit difference value threshold; At least one fusion region difference is less than or equal to the first fusion region difference threshold.
10. A processing apparatus, characterized in that, include: A memory and a processor, wherein the memory stores an image processing program, and the image processing program, when executed by the processor, implements the steps of the image processing method as described in any one of claims 1 to 9.
11. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the image processing method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Method and apparatus for geometric partitioning mode with adaptive mixing
CN119096540A
