Image processing method, processing device and storage medium
Patent Information
- Application Number
- CN202510831888.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2045-06-19
AI Technical Summary
[0003]在构思及实现本申请过程中,发明人发现至少存在如下问题:在帧内预测和/或帧间预测过程中,针对索引的编码策略,存在冗余的码字长度,和/或信令编码效率不高,因此有必要进行优化
[0069]如上所述,本申请的图像处理方法,可应用于处理设备,包括:根据指示信息对应的第一模式(例如,预测模式和/划分模式),确定或得到目标图像块。通过本申请技术方案,能降低平均码长和/或提升信令编码效率。
Smart Images

Figure CN120568063B_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 existing video coding standard (H.266 / VVC) proposes a video frame coding technique. For example, when encoding and decoding video frames, the protocol divides each frame into different blocks and performs prediction processing and encoding / decoding processing.
[0003] In the process of conceiving and implementing this application, the inventors discovered at least the following problems: in the intra-frame prediction and / or inter-frame prediction process, the coding strategy for the index has redundant codeword lengths and / or low signaling coding efficiency, so it is necessary to optimize it.
[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 that can reduce the average code length and / or improve signaling coding efficiency.
[0006] This application provides a processing method applicable to a processing device, comprising the following steps:
[0007] Based on the first mode corresponding to the instruction information, the target image block is determined or obtained.
[0008] Optionally, the indication information includes at least one of the following:
[0009] The index corresponding to the first pattern;
[0010] The codeword of the index corresponding to the first mode;
[0011] The index of the index group corresponding to the first pattern;
[0012] The index-related codewords of the index group corresponding to the first mode;
[0013] The first schema is the index within the index group;
[0014] The first mode contains index-related codewords in the index grouping;
[0015] Information used to indicate the first mode;
[0016] Information used to indicate the sub-pattern of the first pattern;
[0017] Information used to indicate the first pattern in the first pattern list;
[0018] Information used to indicate the partitioning patterns in the partitioning pattern list.
[0019] Optionally, the processing method further includes at least one of the following:
[0020] The codeword corresponding to the index of the first mode is determined based on the selection probability of the first mode corresponding to the index;
[0021] The codeword corresponding to the first mode index is determined based on the unary code with a variable code length and the truncated binary code with a variable incrementing step size.
[0022] The codewords related to the index of the index group corresponding to the first mode are determined based on the selection probability of the index group corresponding to the first mode.
[0023] The codewords related to the index in the first mode are determined based on the selection probability of the index in the index group;
[0024] The length of the codeword is inversely proportional to the probability of selection.
[0025] The codewords corresponding to the first mode are updated by the selection probability of the codewords during the image encoding and / or decoding process;
[0026] The index-related codewords of the index group corresponding to the first mode are updated by the selection probability of the codewords during the image encoding and / or decoding process;
[0027] The first mode updates the index-related codewords in the index grouping by the selection probability of the codewords during the image encoding or decoding process.
[0028] Optionally, the processing method further includes at least one of the following:
[0029] The indication information is determined or obtained from the bitstream.
[0030] The indication information is determined or obtained based on the rate-distortion optimization process;
[0031] The indication information is determined or obtained through the selection probability;
[0032] The indication information is located in the bitstream.
[0033] Optionally, the processing method further includes at least one of the following:
[0034] The instruction information is located in the instruction information group within the instruction information list;
[0035] The list of indication information corresponds to at least one first candidate pattern.
[0036] Optionally, the processing method further includes at least one of the following:
[0037] The list of instructions includes at least one group of instructions.
[0038] The instruction information list includes at least one level of instruction information grouping;
[0039] The indicator information list is updated during image encoding and / or image decoding based on the selection probability of the indicator information in the indicator information list during image encoding and / or decoding.
[0040] The instruction information list includes at least one instruction information list;
[0041] The at least one first candidate pattern corresponding to the indication information list is determined by the matching cost corresponding to at least one second pattern.
[0042] Optionally, the processing method further includes at least one of the following:
[0043] At least one instruction information group includes at least one instruction information;
[0044] At least one level of instruction information group includes at least one instruction information group;
[0045] The list of indication information includes first indication information with the same index but different codewords related to the index;
[0046] The indication information grouping includes the index grouping;
[0047] The instruction information list includes an index list;
[0048] The number of indications in at least one level of indication information group corresponds to at least one predetermined selection probability range;
[0049] The number of instruction messages in different levels of instruction message groups is different;
[0050] The information length of the first-level instruction information is longer than that of the second-level instruction information;
[0051] The number of instructions at the first level is higher than the number of instructions at the second level;
[0052] The first-level instructions are located later in the instruction list than the second-level instructions.
[0053] The number of instruction messages in the same level instruction message group is the same;
[0054] The process of updating the instruction information list includes replacing at least one first instruction information group with a second instruction information group;
[0055] The process of updating the instruction information list includes merging the instruction information in the predefined instruction information list into groups based on the range of selection probabilities.
[0056] The process of updating the instruction information list includes updating the length of the instruction information in the instruction information group;
[0057] The probability of selecting the instruction or instruction group in the first position of the instruction information list is higher than the probability of selecting the instruction or instruction group in the second position.
[0058] The length of the instruction information or instruction information group in the first position of the instruction information list is less than the length of the instruction information or instruction information in the second position;
[0059] The list of indication information corresponding to the target image patch is determined based on the selection probability of at least one index.
[0060] Optionally, the processing method further includes at least one of the following:
[0061] In the list of indicator information, the probability of selecting the indicator information in the last indicator information group is lower than the probability of selecting any other indicator information group in the list.
[0062] In the list of indication information, the number of indication information in the last indication information group is greater than the number of indication information in any other indication information group in the list of indication information.
[0063] In the instruction information list, the number of instruction information in the last instruction information group is equal to the sum of the number of instruction information in all instruction information groups preceding the last instruction information group in the instruction information list;
[0064] In the indication information list, the codeword lengths of the index-related codewords in the first-position indication information group increase sequentially.
[0065] The position of each level instruction information group in the instruction information list is determined based on the total number of instruction information in the instruction information list and the predetermined number of instruction information.
[0066] The hierarchy of at least one level of indication information group is determined by the length of the codeword related to the index of the index group corresponding to the first mode, and / or the group number of each indication information group corresponds to the index of the index group corresponding to the first mode.
[0067] This application also provides a processing device, including: a memory and a processor, wherein the memory stores a processing program, and when the processing program is executed by the processor, it implements the steps of any of the image processing methods described above.
[0068] 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.
[0069] As described above, the image processing method of this application can be applied to a processing device, including: determining or obtaining a target image block according to a first mode (e.g., a prediction mode and / or a segmentation mode) corresponding to indication information. The technical solution of this application can reduce the average code length and / or improve signaling coding efficiency. Attached Figure Description
[0070] 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.
[0071] Figure 1 A schematic diagram of the hardware structure of a mobile terminal to implement the various embodiments of this application;
[0072] Figure 2 A communication network system architecture diagram provided for an embodiment of this application;
[0073] Figure 3 A schematic diagram of the hardware structure of a controller 140 provided in this application;
[0074] Figure 4 A schematic diagram of the hardware structure of a network node 150 provided in this application;
[0075] Figure 5 This is a flowchart illustrating the image processing method according to the first embodiment;
[0076] Figure 6 A schematic diagram of the data flow when the processing device is an encoder, as provided in this application;
[0077] Figure 7 This application provides a schematic diagram of the data flow when the processing device is a decoder;
[0078] Figure 8 A schematic diagram of angle distribution provided for the first embodiment;
[0079] Figure 9 A method for providing an angle in the first embodiment The diagram below shows the four corresponding offsets;
[0080] Figure 10A schematic diagram of a partitioning pattern provided for the first embodiment;
[0081] Figure 11 This is a schematic diagram of an index selection probability distribution shown in the third embodiment;
[0082] Figure 12 This is a schematic diagram illustrating a tile division method and column and row boundaries in the fourth embodiment;
[0083] Figure 13 This is a schematic diagram of various preset angle directions in the fourth embodiment;
[0084] Figure 14 This is a schematic diagram illustrating the composition of an image in the fourth embodiment, where the image can be divided into several slices or tiles.
[0085] Figure 15 This is a schematic diagram illustrating the hierarchical relationship between Slice, CTU, and CU in the fourth embodiment;
[0086] Figure 16 This is a schematic diagram of the index selection probability distribution of the first type of candidate indication information list shown in the sixth embodiment;
[0087] Figure 17 This is a schematic diagram of the index selection probability distribution of the second type of candidate indication information list shown in the sixth embodiment;
[0088] Figure 18 This is a schematic diagram of the index selection probability distribution of the third candidate indication information list shown in the sixth embodiment;
[0089] Figure 19 This application provides a schematic diagram of the index selection probability distribution of an indicator information list.
[0090] 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
[0091] 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.
[0092] 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.
[0093] It should be understood that although the terms first, second, third, etc., may be used herein to describe various information, this 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 can be interpreted as "when," "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 preclude 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,” and “including at least one of the following” 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”, or “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 will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0094] 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. And / or, at least some of the steps in the figures may include at least one sub-step or at least one stage. 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.
[0095] 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).”
[0096] It should be noted that step designations such as S10 are used in this paper to more clearly and concisely describe the corresponding content, and do not constitute a substantial restriction on the order.
[0097] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0098] 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.
[0099] The processing device can be implemented in various forms. For example, the processing device described in this application may include processing devices such as mobile phones, servers, tablet computers, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs and desktop computers.
[0100] 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.
[0101] 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.
[0102] The following is combined with Figure 1 A detailed introduction to each component of the mobile terminal:
[0103] 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; and / or 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, a duplexer, etc. In addition, the radio frequency unit 101 can also communicate with networks and other devices wirelessly. 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.
[0104] WiFi is a short-range wireless transmission technology. Mobile terminals using 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.
[0105] 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. And / or, 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.
[0106] 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 medium) 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.
[0107] 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, an 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.
[0108] 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.
[0109] 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 a touch screen, can collect touch operations performed by the user on or near it (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 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.
[0110] 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.
[0111] 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, etc. Interface unit 108 may be used to receive input (e.g., data information, power, etc.) from the external device and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and the external device.
[0112] 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.
[0113] 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 at least one processing unit; 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.
[0114] 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.
[0115] 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.
[0116] 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.
[0117] 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.
[0118] Optionally, UE201 can be the aforementioned terminal 100, which will not be described in detail here.
[0119] E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. Optionally, eNodeB2021 can connect to other eNodeB2022 via backhaul (e.g., X2 interface), and eNodeB2021 connects to EPC203, providing access from UE201 to EPC203.
[0120] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gateway) 2034, PGW (Packet Data Network Gateway) 2035, and 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).
[0121] IP services 204 may include the Internet, intranet, IMS (IP Multimedia Subsystem), or other IP services.
[0122] 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.
[0123] Figure 3 This 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.
[0124] 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.
[0125] 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.
[0126] 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.
[0127] 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.
[0128] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of 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.
[0129] First Embodiment
[0130] Reference Figure 5 , Figure 5This is a flowchart illustrating the processing method according to the first embodiment. The image processing method of this application embodiment can be applied to a processing device, including step S10:
[0131] Step S10: Determine or obtain the target image block according to the first mode corresponding to the instruction information.
[0132] 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.
[0133] 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.
[0134] Optionally, refer to Figure 6 When the processing device is an encoder on the encoding side, the encoder can receive video data from a video source, such as receiving video images from the video source, determining the image to be predicted in the video images, dividing the image to be predicted into at least one image block, and using the temporal and / or spatial correlation between video images, performing prediction processing on each of the at least one image block, including intra-frame prediction processing and / or inter-frame prediction processing, and the intra-frame prediction processing and / or inter-frame prediction processing includes a derivation mode of at least one prediction mode and / or at least one prediction mode. For the prediction mode, the encoder uses, for example, rate-distortion cost to determine the prediction mode finally adopted by each of the at least one image block. For example, it calculates the rate-distortion cost corresponding to each prediction mode or the rate-distortion cost of combining several prediction methods to determine the minimum rate-distortion cost from at least one rate-distortion cost. The prediction mode or combination of prediction modes corresponding to the minimum rate-distortion cost is the prediction mode finally adopted by the image block. The target image block, i.e., the prediction block, can be determined or obtained according to the first mode (e.g., prediction mode and / or partitioning mode) corresponding to the indication information.
[0135] Optionally, a residual block between the predicted block and the current block can be calculated. The residual block can be transformed and quantized, and then encoded by an entropy encoder to form an encoded bit stream.
[0136] Optionally, the encoded bitstream may include prediction parameters and / or related side information corresponding to the determined prediction mode.
[0137] Optionally, the prediction parameters are entropy-encoded and then packed into the encoded bitstream.
[0138] Optionally, the prediction parameters may include at least information indicating the prediction mode.
[0139] Optionally, the transformed and quantized residual block can be added to the corresponding prediction data (such as the prediction block) obtained using the prediction mode after inverse quantization and inverse transformation to obtain the reconstruction block. After obtaining the reconstruction block, the loop filtering module performs loop filtering on the reconstruction block according to the filter control parameters to reduce distortion.
[0140] Optionally, after performing loop filtering, the reconstructed block after loop filtering is stored according to the encoded image buffer.
[0141] In this embodiment, through the image processing method applied to the encoder end, the encoder can perform efficient image prediction processing on the received video data, determine and select the best prediction mode, and then encode the prediction parameters and indication information of the prediction mode to form a bit stream and send it to the decoder to complete the transmission of the indication information, so that the decoding end can decode it to form the target image block.
[0142] Optionally, refer to Figure 7 When the processing device is a decoder on the decoding side, after receiving the encoded bit stream, the decoder's entropy decoding unit will parse and decode the encoded bit stream to obtain the transform coefficients. The decoder's inverse transform unit and inverse quantization unit will perform inverse transform and inverse quantization processing on the transform coefficients to obtain the residual block.
[0143] Optionally, the decoder's entropy decoding unit parses and decodes the encoded bitstream to obtain prediction data, such as prediction parameters and / or related auxiliary information.
[0144] Optionally, the decoder's prediction processing unit performs prediction processing using prediction parameters to determine the prediction block corresponding to the residual block.
[0145] Optionally, the prediction processing includes intra-frame prediction processing and / or inter-frame prediction processing, and the intra-frame prediction processing and / or inter-frame prediction processing includes a combination of at least one derivation mode and / or at least one prediction mode.
[0146] Optionally, the processing method includes: determining or obtaining a target image block, i.e., a prediction block, based on a first mode (e.g., a prediction mode and / or a segmentation mode) corresponding to the indication information.
[0147] Optionally, the indication information includes at least one of the following:
[0148] The index corresponding to the first pattern;
[0149] The codeword of the index corresponding to the first mode;
[0150] The index of the index group corresponding to the first pattern;
[0151] The index-related codewords of the index group corresponding to the first mode;
[0152] The first schema is the index within the index group;
[0153] The first mode contains index-related codewords in the index grouping;
[0154] Information used to indicate the first mode;
[0155] Information used to indicate the sub-pattern of the first pattern;
[0156] Information used to indicate the first pattern in the first pattern list;
[0157] Syntax elements related to the first pattern and / or image blocks.
[0158] Optionally, the obtained residual block and the corresponding prediction block (including the predicted luminance block and the predicted chrominance block) are added together to obtain the reconstructed block. The loop filtering unit of the decoder performs loop filtering on the reconstructed block to reduce distortion and improve video quality.
[0159] Optionally, the processing method further includes: the reconstructed blocks after loop filtering are further combined into a decoded image and stored in a decoded image buffer or output as a decoded video signal.
[0160] Optionally, when the processing device is an encoder, the initially obtained prediction value can be the prediction value obtained in the corresponding prediction mode, which can be directly used in the rate-distortion cost process.
[0161] Optionally, when the processing device is a decoder, the initially obtained prediction value can be the prediction value obtained through the prediction mode corresponding to the block to be predicted (i.e., the image block located at the decoding end) indicated by the syntax elements parsed in the bitstream.
[0162] Optionally, the predicted block can be used as the target image block, the residual block between the target image block and the current block can be calculated, and then encoded by an entropy encoder through transformation and quantization to form an encoded bitstream. Alternatively, the predicted block can be processed accordingly, for example, by using other models, and the processed image block can be used as the target image block, and the steps of calculating the residual block between the target image block and the current block and subsequent steps can be performed.
[0163] In this embodiment, through the image processing method applied to the decoder, the encoder can decode the received bitstream to obtain the corresponding indication information and the optimal prediction mode, and perform image prediction based on the prediction mode to obtain the corresponding predicted image block and then determine the target image block, thus completing the entire image processing process and improving image quality.
[0164] Optionally, the processing device can acquire video image data from a video source, divide each frame of the video image data into at least one image block, and determine the image block to be predicted at the current time in the at least one image block as the current block.
[0165] Optionally, the first mode includes a prediction mode and / or a partitioning mode.
[0166] Optionally, in intra-frame prediction, the prediction mode may include: at least one angular prediction mode, at least one non-angular prediction mode, and a prediction mode determined or obtained using at least one derived mode.
[0167] Optionally, the partitioning pattern may include: the partitioning pattern in the GPM pattern and the sub-patterns in the prediction pattern.
[0168] Optionally, the derivation mode is a derivation mode used to derive intra-frame prediction modes.
[0169] Optionally, angle prediction mode is a technique for predicting the current pixel block. It generates the predicted block by propagating the values of neighboring pixels along a specific direction. Angle prediction mode is mainly used to process directional textures in images, which can effectively reduce spatial redundancy and improve compression efficiency. In the H.265 / HEVC (High Efficiency Video Coding) standard, the intra-frame prediction mode includes 33 angle prediction modes, which cover different angles from horizontal to vertical, ensuring accurate prediction of various texture directions. In the H.266 / VVC (Versatile Video Coding) standard, the angle modes are expanded to 65, with more densely added directions to more accurately capture edges in natural video.
[0170] Optionally, the non-angle prediction mode can be a prediction mode other than the angle prediction mode. For example, the non-angle prediction mode includes at least one of the following: DC mode, Planar mode, and neural network-based prediction mode.
[0171] Optionally, the derivation mode is a mode used to determine or obtain the prediction mode and / or candidate mode. The derivation mode is a method of deriving the prediction mode matching the current block by analyzing the relevant information of the current block. For example, the derivation mode includes at least one of the following: Decoder side intra mode derivation (DIMD) mode, Occurrence-based Intra Coding (OBIC) mode, and template-based intra mode derivation (TIMD) mode.
[0172] Optionally, the indication information is information used to indicate the prediction mode, so as to indicate what prediction mode the processing device needs to adopt when processing the current image patch.
[0173] Optionally, the prediction mode may include one of the following modes: intra-frame prediction mode, inter-frame prediction mode, sub-mode of intra-frame prediction mode, sub-mode of inter-frame prediction mode, geometric partitioning mode, most likely mode, non-most likely mode, TIMD mode, DIMD mode, OBIC mode, CCP (Cross-Component Prediction) mode, neural network-based prediction mode, and at least one of the prediction modes in the prediction mode list.
[0174] Optionally, the indication information includes the index corresponding to the prediction mode and / or the partitioning mode, where the index corresponding to the prediction mode is a sequence number used to characterize the prediction mode.
[0175] Optionally, the indication information may be located in an indication information list, which includes the prediction mode and the index corresponding to the prediction mode. The indexes may be arranged in ascending order, and the index numbers may include natural numbers between 0 and N0.
[0176] Optionally, the indication information may be located in an indication information list, which includes the partitioning mode and the index corresponding to the partitioning mode. The indexes may be arranged in ascending order, and the index numbers may include natural numbers between 0 and N1.
[0177] Alternatively, N0 and N1 can be 31, 64, or other natural numbers.
[0178] Optionally, the indication information includes codewords corresponding to the prediction mode and / or partitioning mode. The codewords corresponding to the index refer to the encoding of the index when the encoding end sends the indication information to the decoding end. The encoding is sent to the bitstream in binary form and transmitted to the decoding end. The decoding end then decodes the binary encoding and restores it back to the index form.
[0179] Optionally, the indication information includes the index of the index group corresponding to the prediction mode and / or partitioning mode. The indication information can exist in the indication information list in the form of groups, that is, according to the sorting relationship of the index number corresponding to the indication information, each indication information and each index are grouped, and then the index of each index group is determined. The index of the index group can be re-encoded. For example, index 0-3 corresponds to an index group with an index of 0, and index 4-7 corresponds to an index group with an index of 1.
[0180] Optionally, the indication information includes index-related codewords for the index groups corresponding to the prediction pattern and / or partitioning pattern.
[0181] Optionally, the index-related codeword refers to the code corresponding to the index of the index group when the encoding end sends the indication information to the decoding end. For example, the index of the index group in the form of natural numbers is converted into the form of binary code to obtain the index code.
[0182] Optionally, the indication information includes the index of the prediction pattern and / or partitioning pattern in the index group. Each indication information in the same index group can be assigned an additional index. For example, if an index group includes indices 4-7, indices 0-3 can be assigned within that index group to indicate the position of these indices within the index group.
[0183] Optionally, as shown in Table 1 below, the index is divided into at least one index group such as 0-3, 4-7, 8-11, etc. Optionally, in index group 1, index 0-3 is assigned index 0-3; in index group 2, index 4-7 is assigned index 0-3; and in index group 3, index 8-11 is assigned index 0-3.
[0184] Table 1
[0185]
[0186]
[0187] Optionally, the indication information includes index-related codewords in the index grouping for the prediction pattern and / or partitioning pattern.
[0188] Optionally, the index-related codeword in the index group refers to the code corresponding to the index in the index group when the encoding end sends the indication information to the decoding end. For example, the index in the index group in the form of natural numbers is converted into the form of binary code to obtain the corresponding code.
[0189] Optionally, the indication information includes information for indicating the prediction pattern and / or partitioning pattern.
[0190] Optionally, the prediction mode information characterizes which prediction mode it is. For example, the prediction mode information may include one of the following prediction modes: intra-frame prediction mode, inter-frame prediction mode, sub-mode of intra-frame prediction mode, sub-mode of inter-frame prediction mode, geometric partitioning mode, most likely mode, non-most likely mode, TIMD mode, DIMD mode, OBIC mode, CCP mode, neural network-based prediction mode, and at least one of the prediction modes in the prediction mode list.
[0191] Optionally, the partitioning pattern information indicates which partitioning pattern it is. For example, the partitioning pattern information may include at least one of the 64 partitioning patterns in the GPM pattern.
[0192] Optionally, the indication information includes information on sub-modes for indicating the prediction mode. The prediction mode may further include its sub-modes, such as GPM (Geometric Partitioning Mode). The GPM model may also include 64 different sub-modes (e.g., partitioning modes), with different sub-modes corresponding to different partitioning positions and partitioning angles.
[0193] Optionally, refer to Figure 8 , Figure 9 , Figure 10 , Figure 8 This is a diagram showing the distribution of angles. Each dividing line corresponds to a different angle, and the angles are marked as... Figure 8 Not all angles are shown. There are a maximum of four offsets for each angle, such as... Figure 9 As shown, Figure 9 This application provides an embodiment of an angle... The diagram below shows the four corresponding offsets. The offsets are labeled ρ (j = 0j ~ 3), resulting in 64 possible partitioning patterns, such as... Figure 10 As shown, Figure 10 This is a schematic diagram of a partitioning mode provided in an embodiment of this application. The partitioning mode includes at least one partitioning method composed of different angles and offsets. Under different partitioning angles and different offsets, the position of the partitioning line is different, and the number of partitioning lines that can be used for the image block is also different. Any one of the partitioning lines is an implementation of the GPM mode applied to the image block.
[0194] Optionally, the offset ρj and angle can be determined based on the GPM mode index.
[0195] Optionally, the prediction mode information in the prediction mode list is used to indicate which prediction mode the decoder should use to predict when processing the current image patch.
[0196] Optionally, the information of the prediction pattern includes one or more of the following: the name of the prediction pattern, index, codeword, etc.
[0197] Optionally, the indication information includes information for indicating the partitioning patterns in the partitioning pattern list.
[0198] Optionally, the partitioning information in the partitioning pattern list is used to indicate which partitioning pattern in the GPM partitioning pattern should be used for prediction when the decoder processes the current image patch.
[0199] Optionally, the partitioning pattern information includes one or more of the following: the partitioning pattern index, codeword, etc.
[0200] Optionally, the indication information includes syntax elements related to the prediction mode, segmentation mode, and / or image patch.
[0201] Optionally, syntax elements are the basic data structures for encoding video streams; they are data structures used to describe how video data is organized, encoding parameters, and actual content.
[0202] Optionally, grammatical elements can be in various forms such as numbers, English, numbers and / or binary codes.
[0203] Optionally, encoding or decoding is performed based on the indication information corresponding to the prediction mode and / or partitioning mode in the indication information list. The indication information list includes the indexes corresponding to various prediction modes and / or partitioning modes and the correspondence between the corresponding codewords. The corresponding codeword can be directly determined based on the index of the prediction mode and / or partitioning mode during encoding or decoding.
[0204] The technical solution in this embodiment can reduce the average code length and / or improve the signaling coding efficiency.
[0205] Second Embodiment
[0206] Based on the first embodiment described above, a second embodiment is proposed.
[0207] In this embodiment of the application, the image processing method further includes at least one of steps S20 to S90:
[0208] Step S20: Determine the codeword corresponding to the index of the first mode based on the selection probability of the first mode corresponding to the index;
[0209] Optionally, the first mode includes a prediction mode and / or a partitioning mode.
[0210] Optionally, in the image processing method of this application embodiment, the codeword corresponding to the index of the first mode is determined according to the selection probability of the first mode corresponding to the index. The selection probability of the first mode refers to the TM cost corresponding to the first mode. The smaller the TM cost, the greater the corresponding selection probability.
[0211] Optionally, based on the TM cost corresponding to the first mode, a target indication information list is determined from at least one candidate indication information list, and the codeword corresponding to the index of the first mode is determined based on the target indication information list.
[0212] Optionally, the target indication information list is determined or obtained based on at least one of the following: the within-group variance, the range of the mean within-group selection probability, the sum of the squared errors of the mean within-group selection probability, and the selection probability corresponding to at least one indication information in the group under the grouping scheme of the grouping result corresponding to the TM cost corresponding to the first mode.
[0213] Optionally, embodiments of this application provide an encoding strategy based on statistical selection probability distribution characteristics, which allocates codewords according to the probability distribution characteristics of the first mode corresponding to the index during the encoding stage.
[0214] Optionally, the selection probability of the first mode is used to determine the frequency of index occurrence in each stage of the first mode selection process. Combined with the encoding characteristics of the interval and stage position, a variable-length encoding method that can reduce the average code length is designed. This encoding method maintains the compression rate while taking into account the decoding complexity, and achieves an effective balance between code stream saving and real-time performance.
[0215] Optionally, before determining the codeword of the index corresponding to the first mode based on the selection probability of the first mode corresponding to the index, the actual distribution characteristics of each index are analyzed. Data sampling and statistics are performed on the usage of GPM partitioning modes on the encoder side, including: running the ECM16 (Exploration of Coding Model) reference software with all available configurations on the test sequence, recording the GPM partitioning indexes that are finally selected after sorting in each CU (Coding Unit); and accumulating the selection frequency of each index (0 to 31).
[0216] Optionally, before obtaining the selection probability of each index, it is necessary to modify the decoder code of the standard ECM16 software. In the InterPrediction::deriveGpmSplitMode function, the pu.geoSplitDir of each CU is obtained, which is the sorted GPM partition index selected by the encoder. This is output to a CSV (Comma-Separated Values) file. The encoder is run on the official standard test set of Class A, Class B, Class C, Class D, and Class F configured as RA (Random Access). Then, the modified decoder is run to obtain the raw data. Python (a high-level programming language) is used to count the frequency of the 32 indices from 0 to 31 and generate the occurrence probability. Finally, the average code length is calculated according to the formula Average Length = ...
[0217] In this embodiment, the codeword of the corresponding index is determined according to the selection probability of the index. This allows for flexible encoding of the index based on the selection probability, overcoming the shortcomings of the fixed encoding strategy in the prior art. It also allows for determining the codeword of the index in accordance with the actual application scenario, thereby reducing the average code length.
[0218] Step S30: Determine the codeword corresponding to the index of the first mode based on the unary code with a variable code length and the truncated binary code with a variable incrementing step size.
[0219] Optionally, the first mode includes a prediction mode and / or a partitioning mode.
[0220] Optionally, the codeword corresponding to the index of the first mode is determined based on a unary code with a variable code length and a truncated binary code with a variable incrementing step size. The unary code with a variable code length is used as the prefix of the codeword, and the truncated binary code with a variable incrementing step size is used as the suffix of the codeword. Optionally, the length of the unary code and the length of the truncated binary code can also be related to the selection probability of the codeword. The higher the selection probability, the shorter the code length.
[0221] Optionally, when determining the codewords for the index corresponding to the first mode, certain principles need to be followed, including: assigning shorter codewords to high-probability indices and longer codewords to low-probability indices, and / or minimizing group transitions to avoid coding redundancy where "probabilities are similar but code lengths differ greatly"; the codeword structure must have a unique prefix to adapt to the lookup table structure of the entropy decoder; and the ultimate goal is to generate an average code length shorter than that of traditional schemes; the formula for calculating the average code length is: Average Length refers to the average code length. i Rate is the code length of index i. iLet be the selection probability of index i; any set of codewords that allows the decoder to decode unambiguously has a code length {L}. i All} must satisfy a basic rule: all 2 -L i The sum of powers cannot exceed 1 (i.e., ∑2-Li≤1), which can be understood as the total "encoding space" occupied by all codewords cannot exceed 100%.
[0222] Optionally, based on the aforementioned prefix and suffix codeword formation, in order to achieve codeword encoding and decoding, it is necessary to modify the source code of the ECM encoder and decoder accordingly. Optionally, during the modification of the encoder, it is necessary to first segment the index value using a new prefix-suffix structure in the encoder's CABACWriter::geoModeIdx function according to the probability statistics of the GPM index. This includes: firstly, determining the prefix interval to which the index value to be encoded belongs based on the index value to be encoded. The prefix can be set to a maximum length of 3 bits (e.g., 0, 10, 110, 111, etc.). If the first bit is 0, the prefix parsing ends directly. After the prefix is determined, the corresponding length of the suffix code is extracted by combining the actual index value in the interval, and the complete codeword is written into the bitstream. Here, it is necessary to ensure that the combination result of the prefix and suffix is unique and mapped to 32 GPM indices, consistent with the corresponding indication information list. During the modification of the decoding end, the decoding logic symmetrical to that of the encoding end is implemented in the CABACReader::geoModeIdx function of the decoder. Specifically, during decoding, the prefix part is read sequentially from the bit stream, with a maximum length of 3 bits, or the prefix ends early when 0 is encountered. Then, based on the parsed prefix, the range of the current index is determined, and the number of suffix bits is determined accordingly. Then, the suffix code of the corresponding length is read, concatenated with the prefix, and mapped back to the unique GPM index to achieve unambiguous codeword restoration. Under the above rules, no additional signaling transmission is required, and the prefix and suffix structure is pre-determined by both the encoder and decoder.
[0223] Optionally, after modifying the code on the encoder and decoder, the standard test sequences recommended by ECM are selected, covering five major categories: Class A, Class B, Class C, Class D, and Class F, to ensure that the samples cover multiple resolutions and motion complexities. The encoding configuration uniformly adopts the RA mode. After embedding the new variable-length encoding scheme integrated in step 3 into the ECM software, the above five standard sequences are fully encoded to compare performance and select the optimal scheme.
[0224] Optionally, determining the codeword corresponding to the first mode index can employ an independent encoding scheme. This method treats each possible value (e.g., index 0-31) as an independent symbol, and then directly applies the Huffman algorithm to generate a unique codeword with the theoretically shortest average code length for each index's global probability. The advantage of this method is its high efficiency; the disadvantage is that when the number of symbols is large, the generated code table may lack structural regularity, and a large lookup table needs to be stored during implementation.
[0225] Optionally, when applying the Huffman algorithm to determine the codeword for each index, first construct the corresponding Huffman tree based on the selection probability of at least one index, then assign binary values to each leaf node in the Huffman tree based on the position of each leaf node in the Huffman tree, and finally determine the codeword corresponding to at least one index based on the binary values on the path from the root node to each leaf node of the Huffman tree.
[0226] Optionally, when applying the Huffman algorithm to determine the codeword for each index, first construct a Huffman tree (optimal binary tree), then initialize each character as a leaf node, with the node weight being its frequency, then merge nodes, selecting the two nodes with the smallest current weight to merge, generating a new parent node whose weight is the sum of the weights of its child nodes, then add the new node to the queue, repeating this process until only one root node remains; tree structure characteristics include: high-frequency characters are close to the root node (shorter path), low-frequency characters are far from the root node (longer path); then generate codewords, assign binary values, starting from the root node, mark 0 for the left branch and 1 for the right branch (or vice versa); finally read the codewords: the path sequence from the root node to each character leaf node is its codeword, optionally, high-frequency characters use short codes, low-frequency characters use long codes (100), the overall average code length is reduced; this codeword has unique decodability, the generated codeword is a prefix code, that is, no codeword is a prefix of another codeword), ensuring that decoding will not produce ambiguity.
[0227] In this embodiment, the codeword of the index corresponding to the first mode is determined based on the unary codeword with a variable code length and the truncated binary code with a variable incrementing step size. Compared with the traditional binary code determination method with a fixed incrementing step size, the codeword length can be flexibly allocated from the level of the prefix (corresponding to the unary codeword) and the suffix (corresponding to the binary codeword) of the codeword, so as to allocate an appropriate codeword length for each index with the goal of reducing the average codeword length.
[0228] Step S40: Determine the index-related codewords of the index group corresponding to the first mode based on the selection probability of the index group corresponding to the first mode;
[0229] Optionally, the first mode includes a prediction mode and / or a partitioning mode.
[0230] Optionally, the codewords associated with the index of the index group corresponding to the prediction mode and / or partitioning mode are determined based on the selection probability. In order to reduce the average code length, the codeword length can be determined based on the selection probability of the index group. The higher the selection probability, the shorter the code length.
[0231] Optionally, the selection probability of the index group of the first mode is determined or obtained based on the TM cost corresponding to at least one third mode. For example, the selection probability of the index group of the first mode is the sum of the TM costs corresponding to at least one third mode in the same index group. At least one third mode includes the first mode. For example, at least one third mode includes mode 0 to mode N, and the first mode is mode 0.
[0232] Optionally, based on the sum of TM costs corresponding to at least one third mode in the same index group, a target indication information list is determined from at least one candidate indication information list, and based on the target indication information list, the index-related codewords of the index group corresponding to the first mode are determined.
[0233] Optionally, each of the at least one candidate indication information list includes a preset selection probability of the index group. The sum of the absolute differences of the index group is determined or obtained based on the difference between the sum of the TM costs of each index group in the candidate indication information list (e.g., the sum of the TM costs corresponding to at least one third mode in each index group) and the preset selection probability of the index group. Based on the sum of the absolute differences of the index groups corresponding to each candidate indication information list, a target indication information list is determined from the at least one candidate indication information list (e.g., the candidate indication information list with the smallest sum of the absolute differences of the index groups, i.e., the target indication information list).
[0234] In this embodiment, the codewords related to the index are determined from the perspective of the selection probability of the index group. The index is grouped, which is more conducive to exploring the distribution law of the selection probability of the index group. It is also easier to uniformly assign the same prefix to the indexes of the same index group. The codeword structure keeps the prefix unique and is more suitable for the lookup table structure of the entropy decoder.
[0235] Step S50: Determine the codeword related to the index of the first mode in the index group based on the selection probability of the index in the index group;
[0236] Optionally, the first mode includes a prediction mode and / or a partitioning mode.
[0237] Optionally, the codewords related to the index in the index group of the prediction mode and / or partitioning mode are determined based on the selection probability of the index in the index group. Similarly, in order to reduce the average code length, the codeword length can be determined based on the selection probability of the index in the index group. The higher the selection probability, the shorter the code length.
[0238] Optionally, the indication information list includes an index list, which includes index groups, where the index groups are prefixes of the indexes and the indexes in the index list are suffixes of the indexes.
[0239] Optionally, the selection probability of an index in an index group is determined or obtained based on the selection probability of the index group of the first mode and the TM cost corresponding to the third mode. For example, the selection probability of the index group of the first mode is the sum of the TM costs corresponding to at least one third mode in the same index group, and the selection probability of the index of the first mode in the index group is the ratio of the TM cost corresponding to the third mode to the selection probability of the index group of the first mode. At least one third mode includes the first mode. For example, at least one third mode includes mode 0 to mode N, and the first mode is mode 0.
[0240] Optionally, based on the selection probability of an index in the index group, a target indication information list is determined from at least one candidate indication information list, and based on the target indication information list, the codeword related to the index of the first mode in the index group is determined.
[0241] Each of the at least one candidate indication information list includes a preset selection probability of each index in the index group. Based on the difference between the absolute values of the preset selection probabilities of each index in the index group (e.g., the ratio of the TM cost corresponding to the third mode to the selection probability of the index group of the first mode) and the preset selection probabilities of each index in the index group, the sum of the absolute value differences of each index in the index group is determined or obtained. Based on the sum of the absolute value differences of each index in the index group corresponding to each candidate indication information list, the target indication information list is determined from the at least one candidate indication information list (e.g., the candidate indication information list with the smallest sum of the absolute value differences of each index in the index group, i.e., the target indication information list).
[0242] In this embodiment, determining the codewords related to the index of the first mode in the index group from the dimension of the selection probability of each index in the index group is more conducive to exploring the grouping distribution pattern of the selection probability of each index in the index group, and is more able to support the rapid adaptation of the entropy decoder lookup table structure.
[0243] Step S60: Update the codeword corresponding to the index of the first mode by the selection probability of the codeword in the image encoding and / or decoding process;
[0244] Optionally, the codeword of the index corresponding to the first mode is updated by the selection probability of the codeword during the image encoding and / or decoding process. In order to improve the encoding and decoding efficiency when processing each image block, the codeword of the index can be updated in real time during the image encoding and decoding process, and the indication information list in which the indication information of the first mode is located can also be updated in real time. This allows the indication list to be adjusted to the optimal state periodically or in real time, so that the average code length when the encoder sends the indication information to the decoder is relatively the lowest, thereby improving the signaling encoding efficiency.
[0245] Optionally, during the process of updating the codewords of the index corresponding to the first mode based on the selection probability, the codewords of the index with a higher selection probability are updated to relatively shorter codewords, and the codewords of the index with a lower selection probability are updated to relatively longer codewords.
[0246] In this embodiment, the codewords of the index of the first mode are updated in real time according to the selection probability of the codewords, which achieves the effect of adjusting the encoding strategy in real time, improving the real-time performance of the encoding and decoding strategy, and further reducing the average length of the index codewords.
[0247] Step S70: Update the index-related codewords of the index group corresponding to the first mode by the selection probability of codewords in the image encoding and / or decoding process;
[0248] Optionally, the codewords related to the index of the index group corresponding to the first mode are updated in real time during the image encoding and / or decoding process by updating the selection probability of the codewords. This allows for real-time updates of the codewords related to the index of the index group and the indicator information list where the indicator information of the first mode is located. This periodically or in real time adjusts the indicator list to the optimal state, resulting in the lowest average code length when the encoder sends the indicator information to the decoder, thus improving the efficiency of signaling encoding.
[0249] Optionally, during the process of updating the index-related codewords of the index group corresponding to the first mode based on the selection probability, the index-related codewords of the index group with a higher selection probability are updated to relatively shorter codewords, and the index-related codewords of the index group with a lower selection probability are updated to relatively longer codewords.
[0250] In this embodiment, the codewords of the index of the first mode are updated in real time according to the selection probability of the codewords, which achieves the effect of adjusting the encoding strategy in real time, improving the real-time performance of the encoding and decoding strategy, making it more suitable for the application scenario at that time, and further reducing the average length of the codewords related to the index group.
[0251] Step S80: Update the index-related codewords of the first mode in the index group by the selection probability of codewords during the image encoding or decoding process;
[0252] Optionally, the codewords related to the index in the index group of the first mode are updated by the selection probability of the codewords during the image encoding or decoding process. During the image encoding and decoding process, the codewords related to the index in the index group of the first mode can be updated, or the indication information list of the indication information of the first mode can be updated in real time, so that the indication list is adjusted to the optimal state periodically or in real time, so that the average code length when the encoder sends the indication information to the decoder is relatively the lowest, thereby improving the signaling coding efficiency.
[0253] Optionally, during the process of updating the index-related codewords of the first mode in the index group based on the selection probability, the index-related codewords of the first mode in the index group with a higher selection probability are updated to relatively shorter codewords, and the index-related codewords of the first mode in the index group with a lower selection probability are updated to relatively longer codewords.
[0254] In this embodiment, the codewords of the index of the first mode are updated in real time according to the selection probability of the codewords, which achieves the effect of adjusting the encoding strategy in real time, improving the real-time performance of the encoding and decoding strategy, making it more suitable for the application scenario at that time, and further reducing the average length of the index-related codewords of the first mode in the index group.
[0255] Optionally, in the embodiments of this application, the indication information can be determined or obtained through at least one of the following methods one to four:
[0256] Method 1: The indication information is determined or obtained from the bitstream;
[0257] Optionally, the indication information is determined or obtained from the bitstream. The bitstream refers to the information bitstream sent from the encoding end to the decoding end during image processing. The decoding end can obtain the indication information sent by the encoding end from the bitstream and determine the first mode.
[0258] In the embodiments of this application, the decoder can directly obtain indication information from the bitstream, perform subsequent decoding and image prediction processes, and obtain high-quality target image blocks.
[0259] Method 2: The indication information is determined or obtained based on the rate-distortion optimization process;
[0260] Optionally, the indication information is determined or obtained through a rate-distortion optimization (RDO) process. RDO is a core technique that uses mathematical modeling to balance compression rate and reconstruction distortion. Its goal is to minimize distortion under a given rate constraint, or to minimize the rate under a defined distortion constraint, thereby optimizing compression efficiency. During RDO, it can be determined which first mode should be used for image prediction, thus obtaining the indication information corresponding to that first mode.
[0261] In the embodiments of this application, the first mode is determined through the rate-distortion process. Essentially, it trades algorithmic complexity for a breakthrough in compression performance. At the efficiency level, it dynamically balances the bit rate distortion, saving 30% to 50% bit rate compared to the fixed mode (HEVC vs. H.264). At the quality level, it combines HVS (Human Visual System) to suppress subjective distortion, improving PSNR (Peak Signal-to-Noise Ratio) by 0.5 to 2 dB at the same bit rate.
[0262] Method 3: The indication information is determined or obtained through the selection probability;
[0263] Optionally, the indication information is determined or obtained through the selection probability. Specifically, an indication information list is determined based on the selection probability corresponding to various predicted modes, and then each index is encoded according to the indication information list to obtain the indication information. The indication information list includes the correspondence between the indices corresponding to various first modes and the corresponding codewords. The corresponding codeword can be directly determined based on the index of the first mode during encoding.
[0264] In this embodiment, an indication information list is formed based on the selection probability of the index of the indication information, and the index is then encoded based on the indication information list. This achieves the effect of adjusting the encoding strategy in real time according to the selection probability of the index, which can effectively select a better encoding strategy based on the distribution of the selection probability, reduce the average field of the index codeword, and improve the signaling encoding and decoding efficiency.
[0265] Method 4: The indication information is located in the bitstream;
[0266] Optionally, the indication information is located in the bitstream, which can be the bitstream sent from the encoding end to the decoding end. The decoder can obtain the codewords of the indication information from the bitstream and obtain the corresponding indication information through decoding operations.
[0267] In this embodiment of the application, the encoding end encodes the indication information and sends it to the bit stream for the decoding end to perform decoding processing. For example, the decoding end determines the indication information and the corresponding first mode from the bit stream to obtain a high-quality target image block.
[0268] In this embodiment, the indication information corresponding to the first mode can be placed in the code stream. Since the indication information can be determined according to the selection probability, the amount of data of the indication information obtained by the decoding end can be adjusted in real time. Thus, the indication information with higher selection probability and higher frequency corresponds to shorter codewords. Without increasing the implementation complexity, the average code length can be reduced, thereby improving the signaling compression efficiency.
[0269] Third Embodiment
[0270] Based on any of the above embodiments, a third embodiment is proposed.
[0271] In the embodiments of this application, the image processing method may also adopt a grouping strategy to group each indication information, so as to group indexes with the same or similar selection probability into the same group.
[0272] Optionally, the indication information is located in the indication information group of the indication information list. The indication information list contains multiple indication information and the corresponding index, codeword, indication information group, etc. The indication information group is to minimize group jumps, avoid coding redundancy with similar probabilities but large differences in code length, and is also more conducive to hierarchical coding according to the grouping and standardization of the indication information.
[0273] Optionally, before assigning the indication information to the indication information grouping of the indication information list, an independent code length allocation strategy is adopted, using optimization methods such as bit permutation, to determine a theoretically optimal, non-uniform code length allocation scheme. At this stage, only the optimal length of each index is considered independently, without being bound by any grouping structure. The goal is to find the code length allocation scheme that minimizes the average code length. After obtaining this ideal code length allocation, the indexes are grouped according to their code lengths, with the index code lengths in each group being equal. Finally, a corresponding codeword is assigned to each index.
[0274] Optionally, the index codes within each group are of equal length, and for indices within the same group, the prefixes are the same and the suffixes are of the same length.
[0275] Alternatively, the optimization method of bit permutation can also be understood as the iterative optimization method of code rate budget. The core idea is to find a path that "sacrifices A, subsidizes B, and ultimately benefits the whole" on a baseline scheme with no room for optimization through mathematical calculation. Specifically, the specific goal of this method is to find a new code length {Li′} code length allocation scheme under the condition of "unique codeword prefix" (i.e., Kraft inequality ∑2-Li≤1) so that its average code length ∑Pi×Li′ reaches the minimum.
[0276] Optionally, to improve optimization efficiency, optimization can begin with the traditional indicator information list (as shown in Table 1 below). The baseline code lengths in the traditional indicator information list include: {L=3 (4 in total), L=4 (4 in total), L=5 (4 in total), L=6 (4 in total), L=8 (16 in total)}, and the code rate budget is already fully utilized (Crawford and ∑2-Li=1.0). To optimize, the code rate budget needs to be reduced first. To free up the budget, the length of a certain code must be extended. To minimize the operation cost and reduce the number of operations, the index 3 (probability 12.8%) with the lowest probability among the short codes can be selected as the sacrifice target, and its code length can be increased from 3 bits to 4 bits. Calculations show that the cost of this operation is an increase of +0.128 in the average code length, while the code rate budget gain includes: obtaining 1 / 16 of the coding space budget. After obtaining the above coding space budget, the goal is to use it to shorten other code lengths to obtain the maximum average code length return. Therefore, the longest codes with the highest probability are selected for "subsidy". For example, for the longest code in the baseline scheme (index 16-31 with a code length of 8), shortening a code from 8 to 7 requires 1 / 256 of the budget, hence 1 / 16 of the budget. The system can subsidize 16 such codes. Calculations show that this can shorten the code length of all 16 codes with a length of 8 to 7. In the final settlement, the total return is a reduction of -0.141 in the average code length. The final net profit is the sum of the initial cost and the final return, i.e., +0.128 - 0.141 = -0.013. This successfully reduces the average code length. The final average code length is the baseline average code length plus the net profit, i.e., 4.210 - 0.013 = 4.197, thus achieving an overall performance improvement.
[0277] Table 2
[0278]
[0279] Optionally, as shown in Table 2 above, the instruction information list includes an index list, which includes at least one index starting from 0 and can be represented in the form of a sequence number.
[0280] Optionally, in addition to the index, as shown in Table 2 above, the indicator information list also includes various information such as prefix, suffix, binary codeword, code length, selection probability rate, average code length Avg, and total / average length, to more comprehensively display multi-dimensional indicator information.
[0281] Optionally, the indication information list corresponds to at least one first candidate mode. The indication information list may include one or more first candidate modes for use as a reference during the encoding of the indices of these first candidate modes. Then, the codeword is sent to the decoding end, which restores the codeword to the index to determine the corresponding first candidate mode and applies the first candidate mode to the image block processing for inter-frame / intra-frame prediction.
[0282] In this embodiment of the application, the instruction information list may include at least one of the following methods five to nine:
[0283] Method 5: The instruction information list includes at least one instruction information group;
[0284] Optionally, the instruction information list includes at least one instruction information group. During the process of sorting each instruction information group in the instruction information list, it can be divided into at least one instruction information group. The number of instruction information groups is determined by the distribution of the selection probability of each first candidate pattern index in the instruction information list. For example, the instruction information corresponding to indices with similar selection probabilities can be assigned to the same instruction information group. Similar selection probabilities can be determined by setting a difference threshold. For example, different difference thresholds such as 4%, 2%, and 1% can be set according to the position of the instruction information. If the difference between the selection probabilities of two indices is less than the difference threshold, they can be considered similar.
[0285] In this embodiment of the application, the list of indication information is presented in the form of indication information groups, and the selection probability in different indication information groups is similar. The codewords of corresponding code lengths can be assigned to each index through different indication information groups, which can effectively avoid group jumps.
[0286] Method Six: The instruction information list includes at least one level of instruction information grouping;
[0287] Optionally, the instruction information list includes at least one level of instruction information grouping. In the process of grouping the instruction information in the instruction information list, hierarchical grouping can be carried out, and the number of instruction information contained in the instruction information grouping at different levels is different. For example, the number of instruction information contained in the first level instruction information grouping is half of the number of instruction information in all instruction information groups, the number of instruction information contained in the second level instruction information grouping is one-quarter of the number of instruction information in all instruction information groups, and so on, forming multiple levels of different instruction information grouping.
[0288] Optionally, the relationship between the multi-level instruction information groups in the instruction information list is not one of mutual inclusion. For example, an instruction information list may include one first-level instruction information group, one second-level instruction information group, and two third-level instruction information groups.
[0289] In this embodiment of the application, the indication information list is presented in the form of hierarchical indication information groups. Different levels of indication information groups correspond to different numbers of indication information, which facilitates targeted code length and codeword allocation according to different hierarchical groups.
[0290] Method 7: The indicator information list is updated during the image encoding and / or image decoding process based on the selection probability of the indicator information in the indicator information list during the image encoding and / or decoding process.
[0291] Optionally, the indicator information list is updated during image encoding and / or image decoding based on the selection probability of the indicator information in the indicator information list during image encoding and / or decoding. In order to make the indicator information list more adaptable to the prediction task of the currently processed image block, the indicator information list is updated in real time during image encoding and decoding. During the update process, it is mainly based on the selection probability of the indicator information, and / or, the updated indicator information list still follows the rule that the codeword length is inversely proportional to the selection probability, so that the average code length is further reduced.
[0292] Optionally, after updating the list of indication information, the encoding rules of the encoding and decoding indexes need to be replaced synchronously at both the encoding and decoding ends.
[0293] Optionally, the rules corresponding to the original codewords are replaced in the encoder and decoder, which has the effect of introducing an updated list of indication information, thereby realizing a new index encoding mechanism. Specifically, at the encoding end, during the GPM partitioning mode index encoding process, the encoder reads the corresponding codeword from the predefined fixed codeword mapping rules and writes it into the bitstream according to the new codeword rules; at the decoding end, the decoder adopts the same codeword rules as the encoder, parses the codeword bit by bit according to the same parsing rules in the input bitstream, and quickly restores the corresponding partitioning sorting index value. In the entire process above, the encoding and decoding ends share the same codeword rules, without transmitting any additional signaling to indicate the current encoding scheme, thereby ensuring the compactness of the encoding and the consistency of the implementation.
[0294] Optionally, the indication information list is updated during the image encoding and / or image decoding process based on the selection probability of the indication information in the indication information list during the image encoding and / or image decoding process. The indication information list is updated according to the selection probability of the index of the first mode corresponding to the image block within a predetermined range. The predetermined range can be the already encoded image blocks adjacent to the currently processed image block, or it can be the encoded image blocks that are in the same coding tree unit, rectangular coding unit or other optional coding unit as the current image block.
[0295] In this embodiment of the application, the indication information list is updated during the image encoding and / or image decoding process based on the selection probability of the indication information in the indication information list during the image encoding and / or image decoding process, which improves the real-time performance of the selection probability statistics and can update the latest indication information list according to the real-time selection probability.
[0296] Method 8: The instruction information list includes at least one instruction information list;
[0297] Optionally, the indicator information list includes at least one indicator information list, and the indicator information list may also include at least one candidate indicator information list. During the image encoding and decoding process, at least one candidate indicator information list can be preset, and then, based on the statistical distribution of indicator information, an optimal indicator information list is selected from the candidate indicator information list to encode the index of the first mode.
[0298] In the embodiments of this application, an optimal list of indication information can be determined through at least one list of candidate indication information, which increases the flexibility of the selection of the indication information list.
[0299] Method 9: The at least one first candidate pattern corresponding to the information list is determined by the matching cost corresponding to at least one second pattern;
[0300] Optionally, at least one first candidate pattern (e.g., a first predicted pattern and / or a first partitioning pattern) corresponding to the indication information list is determined by the matching cost corresponding to at least one second pattern (e.g., a second predicted pattern and / or a second partitioning pattern). The second pattern refers to all the patterns to be filtered. Taking the GPM pattern as an example, the GPM pattern includes M second patterns (e.g., Figure 10 The GPM partitioning pattern shown can be used to filter first candidate patterns from at least one first pattern. The filtering can be based on the matching cost, which can be the TM (Template Matching) cost. The TM cost of each of the M second patterns is calculated. The GPM partitioning patterns are reordered in ascending order based on the TM cost, and the best N model GPM partitioning patterns are determined as the first candidate patterns (e.g., the first candidate prediction pattern and / or the first candidate partitioning pattern).
[0301] Alternatively, N can be 32, 29, or 36, and M can be 64.
[0302] Optionally, the probability of being selected can be approximated by the TM cost of the prediction mode and / or the partitioning mode. The smaller the TM cost, the greater the corresponding selection probability, and the easier it is to be selected as the first candidate mode.
[0303] In this embodiment of the application, the probability of a prediction mode and / or partition mode being selected is approximately corresponding to the TM cost of the prediction mode and / or partition mode. Finally, at least one optimal candidate prediction mode and / or candidate partition mode is selected to form an indication information list, and candidate modes with excessively high TM costs or low selection probabilities are discarded.
[0304] Optionally, at least one indication information group includes at least one indication information, and an indication information group includes one or more indication information.
[0305] Optionally, at least one level indication information group includes at least one indication information group, and the level indication information group includes one or more indication information.
[0306] Optionally, the indication information list includes first indication information with the same index but different codewords associated with the index. The indexes are sorted in the same way in different indication information lists. For example, the indexes in each indication information list are 0-32, but the codewords associated with each index in different indication information lists are not the same, and the corresponding selection probabilities are not necessarily the same.
[0307] Optionally, the indication information grouping includes index grouping. Index grouping is a strategy for grouping indexes. For example, in Table 3 below, Inex is the index, Binary is the codeword, Prefix is the prefix in the codeword, and Suffix is the suffix in the codeword. The index is divided into multiple groups such as 0-3, 4-7, 8-11, and 38-31.
[0308] Table 3
[0309]
[0310] Optionally, the number of indications in at least one level of indication information group corresponds to at least one predetermined selection probability range.
[0311] In this embodiment of the application, the selection probability of the index corresponding to the indicator information in different indicator information groups is within a certain predetermined selection range, so as to reflect the distribution of the selection probability of each index through the indicator information grouping. The predetermined selection probability range is a pre-set selection probability, such as a group of less than 1%, a group of 1%-2%, a group of 2%-4%, etc.
[0312] Alternatively, one possible distribution of the selection probability of each index is as follows: Figure 11 As shown, Figure 11 This displays the actual probability distribution of index selection during the encoding process, with the horizontal axis representing the index and the vertical axis representing the selection probability. Figure 11As can be seen, this distribution exhibits a clear skewed structure, with the following main characteristics: High concentration: the cumulative probability of the first four indices (Index 0-3) exceeds 54%, with a selection frequency far higher than other indices; Long tail distribution: although the probability of the tail indices (Index 20-31) is lower, they still have a non-zero selection probability, resulting in a wide overall coverage; Non-uniform step-like decay: the probability difference between each step is large. To address this, since the selection probability of the last 16 indices (16-31) is all below 1%, these 16 indices can be evenly distributed into the same index group. In this case, the number of indications in this index group is 16. The selection probabilities of indices 12-15 are all between 1% and 2%, and the number of indications in this index group is 4. The selection probabilities of indices 8-11 are all between 2% and 4%, and the number of indications in this index group is 4, and so on.
[0313] Optionally, the number of instruction information in different levels of instruction information groups is different, and the instruction information groups at different levels are determined by different grouping methods. For example, the first-level instruction information group is obtained by directly grouping based on the original instruction information, and the second-level instruction information group is obtained by grouping after the first-level grouping. The scope of each level of instruction information group is different, and the number of instruction information included in the instruction information group is also different.
[0314] Optionally, with Figure 11 Taking the selection probabilities of each index (0-31) as an example, when grouping, they can first be divided into two groups. The indexes with a selection probability of less than 1% are divided into one first-level indicator information group. The other indexes with a selection probability of more than 1% are then grouped a second time, with indexes 10-15 divided into a second-level indicator information group. The other indexes with a selection probability of more than 4% are then grouped a third time, with indexes 4-7 divided into a third-level indicator information group and indexes 0-3 divided into a third-level indicator information group. In the above indicator information grouping, the higher the level, the fewer the corresponding indicator information.
[0315] Optionally, the information length of the first-level indicator information is higher than that of the second-level indicator information. The first-level indicator information is usually the indicator information that is divided first. In the actual index selection probability distribution, the lower the selection probability of the indicator information, the longer the information length can be allocated. In the index with a high selection probability, the selection probability of these indicator information with larger levels is high. In order to reduce the average code length, they are allocated a shorter information length.
[0316] Optionally, the number of indications at the first level is higher than the number of indications at the second level. The first-level indications are typically those that are segmented first. In the actual index selection probability distribution, the lower the selection probability, the more pronounced the long-tail distribution. For example, in... Figure 11In the selected probability distribution shown, the last 16 indices (16-31) are all assigned to the same indicator information group, resulting in a large number of indicator information. In contrast, the selected probabilities of the first 16 indices (0-15) differ significantly, requiring further indicator information grouping. Furthermore, the earlier the indicator information appears, the finer the grouping (e.g., the fewer indicator information items are in the group). The higher the level number corresponding to the indicator information, the fewer indicator information items are contained in the indicator information group.
[0317] Optionally, the first-level instruction information is positioned later in the instruction information list than the second-level instruction information.
[0318] In the embodiments of this application, the first level and the second level are used to represent different size relationships between two levels. They indicate that the larger the level number, the shorter the information length and the higher the number of indication information. This also applies to other levels, such as the second level and the third level, the second level and the fourth level, the third level and the fourth level, etc.
[0319] Optionally, the number of indications in the same level group is the same. In hierarchical grouping, the number of indications in the statistical indications is the same. For example, in hierarchical grouping, a dichotomy method can be used to divide the indications into groups. After the first grouping, two first-level groups are obtained, and the number of indications in the two first-level groups is 16. After the second grouping of one of the first-level groups, two second-level groups are obtained, and the number of indications in the two second-level groups is 8, and so on.
[0320] Optionally, after classifying and grouping the indication information, there is no mutual inclusion relationship between the groups at each level. For example, if a first-level group is divided into two second-level groups, the first-level group no longer exists and is replaced by the two second-level groups. If a second-level group is divided into two third-level groups, the second-level group no longer exists and is replaced by the two third-level groups.
[0321] Optionally, each instruction message belongs to only one group. If it belongs to a second-level group, it will not belong to other first-level or third-level groups.
[0322] Optionally, the process of updating the instruction information list includes replacing at least one first instruction information group with a second instruction information group, wherein the second instruction information group is an instruction information group in the updated instruction information list, and the first instruction information group is an instruction information group in the previous instruction information list. In this application embodiment, a new method for generating an instruction information list is proposed, which includes merging the instruction information groups in a predetermined instruction information list (e.g., a traditional instruction information list) to obtain a new first instruction information group, thereby obtaining an updated instruction information list.
[0323] Optionally, the update process of the information list employs a non-uniform grouping method, which divides values from different segments into groups of varying sizes based on obvious stratification or "cliffs" in the actual probability distribution. During the design process, a unique, decodable prefix needs to be designed for these groups of varying sizes to serve as "group numbers," and the suffix code length within each group may also differ. This approach better reflects the irregular probability distribution of real-world data, thus making it more efficient. Adjacent groups can be merged based on the phenomenon that the probability changes little, resulting in new improved schemes such as merging 2 or 3 groups.
[0324] Optionally, during the process of merging indicator information groups, a threshold can be preset to determine whether there are stratifications or cliffs in the actual selection probability distribution. For example, in areas with low selection probability, 0.5% can be set as the threshold, and in areas with high selection probability, 2% or 1% can be set as the threshold. The threshold can be set according to the actual situation.
[0325] Optionally, when the selection probability of two adjacent indications is greater than a preset threshold, they are divided into two different groups; when the selection probability of two adjacent indications is not greater than a preset threshold, they are grouped into the same group.
[0326] In this embodiment of the application, the process of updating the indicator information list includes steps a1 and / or a2:
[0327] Step a1: Group and merge the indication information in the predefined indication information list according to the range of the selection probability.
[0328] Optionally, the process of updating the instruction information list includes merging the instruction information in the predetermined instruction information list into groups according to the range of selection probabilities. At least one range of selection probabilities can be preset based on past experience or historical distribution data of selection probabilities, such as below 1%, 1%-2%, 2%-4%, 4%-10%, above 10%, etc. The selection probabilities of the indices of each instruction information in the instruction information list before the update are merged and grouped according to the above range of values to obtain the updated instruction information list.
[0329] In this embodiment of the application, the updated instruction information list is obtained by merging the instruction information groups in the predetermined instruction information list (such as the traditional instruction information list). This is based on the current relatively better instruction information list, and has a good foundation, so it can further obtain a better updated instruction information list.
[0330] Step a2: Update the length of the indication information in the indication information group;
[0331] Optionally, the process of updating the instruction information list includes updating the length of the instruction information in the instruction information group. The difference between the updated instruction information list and the original instruction information list is that the grouping method is different. The different grouping method will result in different prefixes for each group and different suffixes for each index in each group, ultimately resulting in different codewords and code lengths for each index.
[0332] In this embodiment, the average code length is reduced by updating the length of the indication information in the indication information group. Encoding is then performed using the updated indication information list, which effectively reduces the average code length of the transmitted indication information codewords and improves signaling coding efficiency.
[0333] In this embodiment of the application, the instruction information or grouping of instruction information at each position in the instruction information list further includes at least one of the following:
[0334] Optionally, the probability of selection of the instruction or instruction group at the first position in the instruction information list is higher than that of the instruction or instruction group at the second position. Optionally, the first position is earlier than the second position. When the index is sorted, it is arranged in descending order of selection probability. Therefore, in the instruction information list, the earlier the position of the instruction or instruction group, the greater the corresponding selection probability.
[0335] Optionally, the length of the indication information or indication information group at the first position in the indication information list is shorter than the length of the indication information or indication information at the second position. Optionally, the first position is earlier than the second position because the indexes are sorted in descending order of selection probability. Therefore, in the indication information list, the earlier the position of the indication information or indication information group, the higher the corresponding selection probability. In order to reduce the average code length, the length of the indication information of the index with a higher selection probability needs to be reduced. Therefore, in the indication information list, the earlier the position of the indication information or indication information group, the shorter the corresponding information length.
[0336] Optionally, the indication information list corresponding to the target image block is determined based on the selection probability of at least one index. Optionally, the indication information list of the target image block is determined based on the selection probability of at least one index. The selection probability of at least one index reflects the distribution of the selection probability of at least one index. These selection probability distributions determine the grouping of the indication information list. The principle of grouping is to group indices with similar selection probabilities into the same group as much as possible, avoid jumps in the selection probability of indices within the group, thereby better allocating the codeword length of each index group by group and reducing the average code length.
[0337] In this application embodiment, the instruction information list and / or instruction information grouping includes at least one of methods ten to sixteen:
[0338] Method 10: In at least one or more first-level indicator information groups included in the indicator information list, the probability of selection of the indicator information in the last indicator information group is lower than the probability of selection of any other indicator information group in the indicator information list.
[0339] Optionally, in the at least one or at least one level of indicator information group included in the indicator information list, the probability of selection of the indicator information corresponding to the last indicator information group is lower than the probability of selection of any other indicator information group in the indicator information list. This is because in the actual selection probability distribution, the indicator information groups are grouped according to the arrangement of each index. The larger the index number, the lower the selection probability. Moreover, the larger the index number, the later the corresponding indicator information group is.
[0340] In this embodiment of the application, the last indicator information group includes at least one index with the lowest selection probability, so the selection probability of the index is lower than the selection probability of any indicator information group in the indicator information list.
[0341] Method 11: In at least one or more first-level instruction information groups included in the instruction information list, the number of instruction information in the last instruction information group is greater than the number of instruction information in any other instruction information group in the instruction information list;
[0342] Optionally, in at least one or more first-level indicator information groups included in the indicator information list, the number of indicator information in the last indicator information group is greater than the number of indicator information in any other indicator information group in the indicator information list. The actual index selection probability distribution is that the selection probability decreases sequentially as the index number increases.
[0343] In this embodiment of the application, since the long-tail distribution characteristics of each index are obvious, the number of indication information in the last group of indication information is the largest and is greater than any of the preceding groups of indication information. The indication information list determined in this way is more in line with the long-tail distribution characteristics of the selection probability distribution.
[0344] Method 12: In at least one or more first-level instruction information groups included in the instruction information list, the number of instruction information in the last instruction information group at a given position is equal to the sum of the number of instruction information in all instruction information groups preceding the last instruction information group at that position in the instruction information list;
[0345] Optionally, based on the actual index selection probability distribution, a binary grouping strategy can be adopted. According to the long-tail distribution of the selection probability, the latter half of all indicator information is divided into the same indicator information group. Under this grouping method, the number of indicator information in the last position indicator information group is equal to the sum of the number of indicator information in the preceding indicator information groups.
[0346] In this embodiment, the number of indications in the last indication group at the same level is further defined, which further reflects the distribution characteristics of the index probability distribution and makes the indication grouping strategy more closely match the characteristics of the selection probability binary grouping.
[0347] Method 13: In at least one or more first-level indication information groups included in the indication information list, the codeword lengths of the index-related codewords in the first indication information group increase sequentially.
[0348] Optionally, in order to further reduce the average code length, the codeword length of the index-related codeword in the first index group in the index information list can be further reduced, because the selection probability of these indices is much higher than that of the codewords of subsequent indices, and reducing their code length can achieve the best code length reduction effect.
[0349] Optionally, as shown in Table 4 below, the codeword lengths of each index in the first indication information group are allocated as 2, 3, 4, 5, and 5. In this table, the first indication information group includes 5 indices from 0 to 4.
[0350] Optionally, the first indication information group is prefixed with 0.
[0351] Table 4
[0352]
[0353]
[0354] Optionally, as shown in Table 4 above, the codeword length of the index in the first indicator information group is not fixed, the second indicator information group includes 8 indices with a fixed codeword length of 5 (prefix length 2, suffix length 3), and the third indicator information group includes 16 indices with a fixed codeword length of 6 (prefix length 2, suffix length 4). The difference between the third and second indicator information groups is that the prefixes are different.
[0355] Optionally, as shown in Table 4 above, the length of the suffix in each instruction information group can be the same or different. In the same instruction information group and / or the same instruction information, the suffix length is greater than the prefix length.
[0356] Optionally, in the list of indication information, the suffix of the index codeword can be a variable-length code or a fixed-length code. As shown in Table 4 above, the first indication information group has a variable-length code as its suffix, while the other indication information groups have fixed-length codes as their suffixes.
[0357] Optionally, in the list of indication information, the suffix of each indication information group increases with the index of the index group, and the suffix length of the fixed-length encoding form remains unchanged or increases by 1.
[0358] Optionally, the number of indices in this instruction information list is 29, compared to 32 in a conventional instruction information list.
[0359] Alternatively, another feasible list of indication information is shown in Table 5 below. The codeword lengths of each index in the first indication information group are 2, 3, 4, and 4. In this table, the first indication information group includes four indices from 0 to 3.
[0360] Table 5
[0361]
[0362]
[0363] Optionally, in Table 5 above, the codeword length of the index in the first indicator information group is not fixed, the second indicator information group includes 4 indices with a fixed codeword length of 4 (prefix length 2, suffix length 2), the third indicator information group includes 8 indices with a fixed codeword length of 6 (prefix length 3, suffix length 3), and the fourth indicator information group includes 16 indices with a fixed codeword length of 7 (prefix length 3, suffix length 4).
[0364] Optionally, in the list of indication information, the codeword lengths of fixed-length codes for different groups of indication information are different.
[0365] Optionally, in the list of indication information, the suffix of each indication information group increases by 1 as the index of the index group increases.
[0366] Optionally, the difference in suffix length between adjacent indication information groups using fixed-length encoding is 1.
[0367] Alternatively, another feasible list of indication information is shown in Table 6 below. The codeword lengths of each index in the first indication information group are 2, 3, 4, and 4. In this table, the first indication information group includes four indices, 0-3.
[0368] Table 6
[0369] 0 28.52% 0 0 2 1 14.86% 0 10 3 2 13.02% 0 110 4 3 11.33% 0 111 4 4 3.41% 10 000 5 5 2.88% 10 001 5 6 2.64% 10 010 5 7 2.73% 10 011 5 8 1.67% 10 100 5 9 1.46% 10 101 5 10 1.4% 10 110 5 11 1.5% 10 111 5 12 1.22% 110 000 6 13 1.1% 110 001 6 14 1.09% 110 010 6 15 1.09% 110 011 6 16 0.81% 110 100 6 17 0.77% 110 101 6 18 0.71% 110 110 6 19 0.72% 110 111 6 20 0.89% 111 0000 7 21 0.77% 111 0001 7 22 0.82% 111 0010 7 23 0.82% 111 0011 7 24 0.48% 111 0100 7 25 0.48% 111 0101 7 26 0.49% 111 0110 7 27 0.47% 111 0111 7 28 0.47% 111 1000 7 29 0.47% 111 1001 7 30 0.45% 111 1010 7 31 0.47% 111 1011 7 32 … 111 1100 7 33 … 111 1101 7 34 … 111 1110 7 35 … 111 1111 7
[0370] Optionally, in Table 6 above, the codeword length of the index in the first indicator information group is not fixed, the second indicator information group includes 8 indices with a fixed codeword length of 5 (prefix length 2, suffix length 3), the third indicator information group includes 8 indices with a fixed codeword length of 6 (prefix length 3, suffix length 3), and the fourth indicator information group includes 16 indices with a fixed codeword length of 7 (prefix length 3, suffix length 4).
[0371] In this application embodiment, a method is provided to flexibly determine the prefix length and suffix length within each indication information group. In particular, in the first indication information group, each index with a relatively high selection probability is assigned a variable-length encoded suffix. Furthermore, the total number of indexes in the indication information list is not limited to 32, but can be reduced or increased according to the actual situation to minimize the average code length of the index codewords.
[0372] Method Fourteen: The position of each level instruction information group in the instruction information list is determined based on the total number of instruction information in the instruction information list and the predetermined number of instruction information;
[0373] Optionally, a fixed grouping method can be adopted in the embodiments of this application, that is, all indication information is grouped according to a predetermined number of indication information (such as 4). When the total number of indication information is 32, it can be divided into 32 / 4 = 8 groups. The positions of each group are arranged sequentially. For example, the first group of indication information includes indices 0-3, the second group of indication information includes indices 4-7, the third group of indication information includes indices 8-11, the fourth group of indication information includes indices 12-15, the fifth group of indication information includes indices 16-19, and so on.
[0374] Alternatively, when grouping the indication information, a uniform grouping method can be adopted, that is, the number of indication information in all groups is the same. For example, when using the Columbus-Leys code algorithm, a fixed group size (divisor M) is selected, the quotient of the value is used as the prefix (represented by unary code), and the remainder is used as the suffix (represented by fixed-length binary code), which is very suitable for encoding data with regular geometric probability distribution.
[0375] Optionally, when applying the Columbus-Rice code algorithm for grouping, the sequence number of each index is divided by the preset group length to obtain the quotient and remainder corresponding to each index. Then, the quotient corresponding to each index is converted into unary code form to obtain the prefix of each index. Then, the remainder corresponding to each index is converted into binary form to obtain the suffix of each index. Based on the prefix and suffix of each index, the codeword corresponding to each index is obtained by combining them.
[0376] In this embodiment, the position of each level of indicator information group in the indicator information group is determined directly based on the total number of indicator information in the indicator information list and the predetermined number of indicator information. The grouping method is simple, the algorithm complexity is low, and multiple index groups can be obtained faster.
[0377] Method 15: The position of each level instruction information group in the instruction information list is determined based on the total number of instruction information in the instruction information list and the predetermined number of instruction information;
[0378] In this embodiment, the larger the index of the index group corresponding to the first mode, the longer the length of the related codeword, the later the indication information group is, the lower the probability of selecting the later indication information group, and the smaller the number of levels of the corresponding indication information group; the larger the index of the index group corresponding to the first mode, the later the indication information group is, and therefore the larger the corresponding group number is.
[0379] Method 16: The hierarchy of at least one level of indication information group is determined by the length of the codeword related to the index of the index group corresponding to the first mode, and / or the group number of each indication information group corresponds to the index of the index group corresponding to the first mode;
[0380] In this embodiment, the level of the indication information group is determined by the length of the codeword related to the index of the index group corresponding to the first mode. Due to the long-tail distribution characteristics, the higher the level of the index group, the higher the selection probability of the index group, and the shorter the codeword length. In addition, the smaller the index of the index group corresponding to the first mode, the earlier the arrangement position, and the smaller the group number of the corresponding indication information group.
[0381] This application proposes an image processing method based on the statistical index selection probability and the cost distribution characteristics of each first candidate mode. By accurately analyzing the selection probability distribution characteristics of the index corresponding to each first candidate mode in the encoding stage, the code length of the codeword is flexibly allocated, thereby realizing a more efficient codeword allocation strategy.
[0382] In this embodiment, probability statistics are used to determine the frequency of index occurrence in each stage of the selection process of prediction mode and / or partitioning mode for each image block, and to determine the selection probability of each index. Combined with the interval of the selection probability distribution and the coding characteristics of the stage position, an adaptively changing list of indication information is determined, thereby providing an adaptive coding method that can reduce the average code length. By adopting this coding method, the compression rate can be maintained while taking into account the decoding complexity, achieving an effective balance between code stream saving and real-time performance, and improving signaling coding efficiency.
[0383] Fourth embodiment
[0384] Based on any of the above embodiments, a fourth embodiment is proposed.
[0385] The image processing method in this application embodiment further includes step S11:
[0386] S11, determine or obtain the indication information of the second image block based on the indication information of the first image block.
[0387] Optionally, the first image block is an image block that has been processed by the processing device during the image processing process, and the second image block is an image block that the processing device is currently processing during the image processing process.
[0388] Optionally, the second image block is the target image block in the first embodiment.
[0389] In the embodiments of this application, the technical solution of this application can determine the indication information according to the actual situation of the encoded image block, thereby supporting the improvement of signaling coding efficiency and / or flexibility.
[0390] Optionally, in embodiments of this application, the image processing method further includes at least one of steps S12 to S17:
[0391] Step S12: Determine or obtain the indication information of the second image block according to the indication information list;
[0392] Optionally, the indication information of the second image block is determined or obtained according to the indication information list. Optionally, the second image block is the image block currently being processed and / or predicted by the processing device. The second image block can be an image tree unit (CTU, Coding Tree Unit) or a coding unit (CU). During the processing of the second image block, it is necessary to obtain the corresponding indication information to determine the prediction mode and / or partitioning mode corresponding to the indication information, so as to facilitate the prediction of the second image block to obtain the predicted image block and further determine the target image block. Optionally, at the decoding end, the encoded first indication information (e.g., the encoded version of the binary codeword in Table 2) is determined or obtained from the bitstream, and the decoded first indication information (e.g., the binary codeword in Table 2) is determined or obtained through entropy decoding. According to the decoded first indication information and the indication information list (e.g., the indication information list shown in Table 2), the second indication information of the second image (e.g., the index shown in Table 2) is determined or obtained. According to the second indication information, the prediction mode and / or partitioning mode of the target image block (e.g., the prediction mode and / or partitioning mode corresponding to the index in Table 2) is determined or obtained.
[0393] In this embodiment of the application, when the second image block is predicted, the received codewords are decoded based on the indication information list to directly determine the prediction mode and / or partitioning mode corresponding to the indication information, so that the decoding end can perform image prediction based on the prediction mode and / or partitioning mode to obtain a high-quality target image block.
[0394] Step S13: Determine or obtain a list of indication information based on the indication information of the first image block;
[0395] Optionally, the indication information list is determined or obtained based on the indication information of the first image block, and the indication information list includes an indication information list for the second image block.
[0396] Optionally, the first image block includes at least one other encoded image block associated with the second image block, these first image blocks corresponding to a prediction mode and / or partitioning mode, each prediction mode and / or partitioning mode corresponding to an index, and an indication information list is adaptively determined or generated based on the selection probability of each index.
[0397] In this embodiment of the application, the indication information list corresponding to the second image block will adaptively change according to the selection status of the indication information of the processed first image block, so as to realize the real-time update of the indication information list of the second image block.
[0398] Optionally, if at least one list of indication information exists, before determining the list of indication information for the second image block, the frequency of occurrence of indication information (e.g., index) of the prediction mode and / or segmentation mode corresponding to each first image block is first counted, and the selection probability corresponding to each indication information (e.g., index) is calculated through these frequencies, so as to determine the optimal list of indication information from at least one list of indication information based on the selection probability.
[0399] In this embodiment of the application, the indication information list of the second image block is determined or obtained based on the indication information of the first image block, so that the determined indication information list is more in line with the current status of the second image block. When sending the codewords of the index corresponding to the prediction mode and / or partitioning mode in the indication information, it is not limited to a fixed indication information list, thereby improving the coding flexibility.
[0400] Optionally, before determining the indication information list of the second image block, the frequency of the indication information (e.g., index) of the prediction mode and / or division mode corresponding to each first image block is counted, and the selection probability corresponding to each indication information (e.g., index) is calculated through these frequencies. The indication information list of the first image block is then adjusted according to the selection probability to obtain the indication information list of the second image block.
[0401] Optionally, before determining the indication information list of the second image block, a first indication information list is determined or obtained according to the Columbus-Rice coding method, and the frequency of occurrence of the indication information (e.g., index) of the prediction mode and / or partitioning mode corresponding to each first image block is counted, and the selection probability corresponding to each indication information (e.g., index) is calculated through these frequencies, thereby adjusting the first indication information list according to the selection probability to determine or obtain the indication information list of the second image block.
[0402] Optionally, for different image patches, the same prediction mode and / or segmentation mode may correspond to different indication information.
[0403] Optionally, both image block A and image block B adopt prediction mode A. The prediction mode A corresponding to image block A is represented by indication information A, and the prediction mode corresponding to image block B is represented by indication information B. The indication information A and indication information B are different.
[0404] Optionally, both image block A and image block B adopt prediction mode A. The prediction mode A corresponding to image block A is represented by index A, and the prediction mode corresponding to image block B is represented by index B. Index A and index B are different, and the codewords corresponding to index A and index B are different.
[0405] Optionally, in GPM mode, both image block A and image block B adopt partitioning mode A. The prediction mode A corresponding to image block A is represented by indication information A, and the prediction mode corresponding to image block B is represented by indication information B. Indication information A and indication information B are different.
[0406] Optionally, both image block A and image block B adopt partitioning mode A. The prediction mode A corresponding to image block A is represented by index A, and the partitioning mode corresponding to image block B is represented by index B. Index A and index B are different, and the codewords corresponding to index A and index B are different.
[0407] In this embodiment, for each image patch, when filtering candidate prediction modes from at least one prediction mode, the filtering can be based on the matching cost, which can be the TM (Template Matching) cost. The at least one prediction mode is reordered in ascending order based on the TM cost, and N prediction modes are determined as candidate prediction modes. Since the TM cost is different for different image patches, the sorting results of the prediction modes are different. Therefore, when mapping the indication information list using the sorting results of the prediction modes, different prediction modes correspond to different indication information for the same image patch, and even if the same prediction mode is used for different image patches, the corresponding indication information may be different.
[0408] In this embodiment, for each image block, when filtering candidate partitioning modes from at least one partitioning mode, the filtering can be based on the matching cost, which can be the TM (Template Matching) cost. The at least one partitioning mode is reordered in ascending order based on the TM cost, and N partitioning modes are determined as candidate partitioning modes. Since the TM cost is different when filtering different image blocks, the sorting results of the partitioning modes are different. Therefore, when mapping the indication information list through the sorting results of the partitioning modes, different partitioning modes correspond to different indication information for the same image block, and even if the same partitioning mode is used, the corresponding indication information may be different for different image blocks.
[0409] In this embodiment of the application, the first indication information list is adjusted according to the indication information of the first image block to determine or obtain the indication information list of the second image block, so that the determined indication information list is more in line with the current status of the second image block. When sending the codewords of the index corresponding to the prediction mode and / or partitioning mode in the indication information, it is not limited to a fixed indication information list, thereby improving the coding flexibility.
[0410] Step S14: Determine the timing of updating the instruction information list based on the predetermined update location;
[0411] Optionally, the update timing of the information list is determined according to the predetermined update position. During the processing of the first image block, it can be updated periodically. Specifically, when the processing device processes an image, it first divides the image into several slices or tiles. Each slice or tile is an independently decodeable unit. Each tile includes at least one CTU, and each CTU includes at least one CU. The update timing determined by the predetermined update position can be one or more of the following: performing an update action once every preset number of CTUs, performing an update action once every preset number of CUs, or performing an update action at a fixed position of a CU in each CTU.
[0412] Optionally, the default quantity is 20.
[0413] Optionally, Figure 12 This illustrates one way of dividing the image into tiles. The entire image is divided into 9 tiles, each of which is rectangular. During encoding, all tiles in the image are processed in scanning order. The CTUs within each tile are encoded in raster scan order. Raster scan of CTUs means scanning from left to right and from top to bottom, completing one row before moving to the beginning of the next row. Therefore, for each second image block, the image blocks to its left and above are already encoded and can be used as the first image block.
[0414] Optionally, the indication information list includes an updated indication information list. In order to minimize the reduction of indication information of the second image block during transmission, the indication information list needs to be updated in real time / periodically. The updated indication information list can be adaptively updated according to the actual situation of the processing node of the first image block.
[0415] In this embodiment, the list of indication information updated according to the predetermined update position is more in line with the current status of the second image block. When sending the codewords of the index corresponding to the prediction mode and / or partitioning mode in the indication information, it is not limited to a fixed list of indication information, thereby improving the encoding flexibility of the index.
[0416] Step S15: Determine the timing of updating the instruction information list based on the difference between the instruction information list before and after the update.
[0417] Optionally, the timing of updating the instruction information list is determined based on the differences between the instruction information list before and after the update.
[0418] Optionally, based on the second instruction information list determined or obtained in step S13, the second instruction information list is used as the updated instruction information list, and the timing of updating the instruction list is determined based on the difference between the instruction information list before the update and the second instruction information list.
[0419] Optionally, the difference between the previous and updated indicator information lists can be determined by subtracting the previous and updated indicator information lists. The greater the difference, the more necessary the update is. In the process of subtracting the previous and updated indicator information lists, the codewords of each index in the indicator information list are subtracted. The resulting difference includes a sequence of differences corresponding to at least one index. The greater the sum or average of the absolute values of each item in this sequence, the greater the difference between the previous and updated indicator information lists, and the worse the matching degree between the previous indicator information list and the currently processed first image block, the more necessary it is to update the indicator information list.
[0420] Optionally, when determining the timing of the update based on the difference between the pre-update and post-update instruction information lists, a difference threshold can be preset. If the difference is greater than the difference threshold, it can be determined that the update timing of the instruction information list has been triggered. If the difference is less than the difference threshold, it can be determined that the update timing of the instruction information list has not been triggered.
[0421] In this embodiment, the timing of updating the indicator information list is determined based on the difference between the indicator information list before and after the update. This allows for adaptive updating of the indicator information list when the difference is large, avoiding redundancy in coding length caused by the unupdated indicator information list not being compatible with the current coding scenario of the second image block, and reducing the average code length.
[0422] Step S16: Determine or obtain an update indication information list by using the index of the first image block in at least one first image unit group associated with the second image block;
[0423] Optionally, the update instruction information list is determined or obtained by the index of the first image block in at least one first image unit group associated with the second image block. Optionally, the at least one first image unit group associated with the second image block refers to the image unit group associated with the second image block through a preset rule, which can reflect the association between the first image unit group and the second image block.
[0424] Optionally, the first image unit group can be formed by combining one or more of the following image blocks: image blocks in the coding tree unit where the second image block is located, image blocks in the coding tree unit adjacent to the coding tree unit where the second image block is located, image blocks in the slice where the second image block unit is located, and image blocks in the slice adjacent to the slice where the second image block unit is located to obtain at least one image block, and these image blocks are combined into an image unit group.
[0425] Optionally, the first image unit group can be a combination of one or more coding units, coding tree units, coding tree units adjacent to the coding tree unit where the second image block is located, a slice where the second image block unit is located, a slice adjacent to the slice where the second image block unit is located, a tile where the second image block unit is located, and a tile adjacent to the tile where the second image block unit is located to obtain at least one image unit group.
[0426] Optionally, the preset rules for determining the image unit group associated with the second image block include at least one of the following:
[0427] Identify the image block, coding unit, coding tree unit, slice, and / or stripe associated with the second image block;
[0428] By combining associated image blocks, coding units, coding tree units, slices, and / or stripes, at least one image unit group can be determined or obtained;
[0429] The at least one image unit group is designated as the first image unit group.
[0430] Identifying associated image blocks, coding units, coding tree units, slices, and / or stripes includes:
[0431] The image block in the coding unit where the second image block is located is taken as the image block associated with the second image block;
[0432] The image blocks in the adjacent coding tree units of the coding unit where the second image block is located are taken as the image blocks associated with the second image block;
[0433] The image block in the Slice containing the second image block is taken as the image block associated with the second image block;
[0434] The image block in the Slice adjacent to the Slice where the second image block unit is located is taken as the image block associated with the second image block;
[0435] The coding unit where the second image block is located is taken as the coding unit associated with the second image block;
[0436] The adjacent coding tree units of the coding unit where the second image block is located are taken as the coding tree units associated with the second image block;
[0437] The slice containing the second image block is designated as the slice associated with the second image block.
[0438] The slice adjacent to the slice where the second image block unit is located is taken as the slice associated with the second image block;
[0439] The tile where the second image block unit is located is taken as the tile associated with the second image block;
[0440] The tile containing the second image block unit is used as the tile associated with the second image block.
[0441] Optionally, the coding tree unit adjacent to the coding tree unit where the second image block is located may be the coding tree unit located to the left and / or above the coding tree unit where the second image block is located, and the slice adjacent to the slice where the second image block is located may be the slice located to the left and / or above the coding tree unit where the second image block is located.
[0442] In this embodiment, an updated indication information list is determined or obtained by using the index of the first image block in the associated first image unit group. This allows the updated indication information list to better reflect the distribution of the selection probability of the index of the first image block in at least one first image unit group associated with the second image block. Furthermore, the first image unit group associated with the second image block is more in line with the index encoding scenario of the prediction mode and / or partitioning mode of the second image block, which can further improve the flexibility of the statistical range of the index selection probability.
[0443] Step S17: Determine or obtain an update indication information list by using the index of the first image block in at least one first image unit group within the predetermined range where the second image block is located.
[0444] Optionally, the update instruction information list is determined or obtained by the index of the first image block in at least one first image unit group within the predetermined range where the second image block is located. The index of the first image block in the first image unit group corresponds to a prediction mode and / or a division mode. The update instruction information list is determined by statistically analyzing the frequency of the index of the prediction mode and / or division mode corresponding to each first image block contained in each first image unit group, based on the selection probability of this index.
[0445] Optionally, in practical application scenarios, when counting the frequency of the index of the prediction mode corresponding to each first image block contained in each first image unit group, a maximum of M prediction modes and / or M partitioning modes are involved.
[0446] Alternatively, N can be 32, 29, or 36, and M can be 64.
[0447] Optionally, the predetermined range can be adaptively set according to the actual situation, and it can reflect the frequency distribution of various candidate prediction modes and / or candidate partitioning modes when the second image block is encoded in the image prediction mode and / or partitioning mode.
[0448] Optionally, the preset range is L times the width and / or height of the second image block.
[0449] Optionally, L can be 4 to 10.
[0450] In this embodiment of the application, by determining or obtaining the index of the first image block in at least one first image unit group within the predetermined range of the second image block, the indicator information list for the index encoding of the prediction mode and / or partitioning mode of the first image block can be adaptively updated and determined, so that the average code length of the codeword of the index of the encoded prediction mode and / or partitioning mode is shorter, thereby improving the signaling encoding and decoding efficiency.
[0451] Optionally, the first image unit group associated with the first image block in step S16 includes an encoded image unit group located within at least one predetermined angular direction and a predetermined step size of the image unit group containing the first image block. The predetermined angular direction may include at least one, and the predetermined step size can be represented by a natural number. For example, if 0° is taken as directly above, the predetermined angular direction may include 0°, 15°, 270°, and 315°, etc., and can be further refined into at least one angle, such as... Figure 13 As shown, the preset angle direction can include at least one direction from number -14 to 80. The predetermined step size can be understood as the number of adjacent image unit groups (e.g., CTUs). For example, the step size of the image unit group directly adjacent to the image unit group where the first image block is located is 1, the step size of the image unit group adjacent to the image unit group where the first image block is located is 2, and so on.
[0452] Optionally, the predetermined step size is 1 to 20.
[0453] Optionally, in step S17, the first image unit group within the predetermined range where the first image block is located includes the encoded image unit group that is in the same strip and / or the same matrix coding unit as the first image block. Optionally, "in the same strip" means "in the same slice" and "in the same matrix coding unit" means "in the same tile".
[0454] Optionally, such as Figure 14 As shown, an image can be divided into several slices or tiles, each of which is an independently decodeable unit, such as... Figure 15As shown, each Slic includes one or more Tiles and one or more CTUs (such as CTU0, CTU1, CTU2, CTU3), and each CTU includes at least one CU.
[0455] Optionally, Figure 12 The document provides a method for dividing the image into nine tiles, with each tile being a rectangle. During encoding, all tiles in the image are processed in the scanning order. The CTUs in each tile are encoded in the order of raster scanning. Raster scanning of CTUs means scanning from left to right and from top to bottom, completing one row before moving to the starting position of the next row.
[0456] Optionally, since a slice may contain at least one tile or a tile may contain at least one slice, the predetermined range may include all CTUs (coding tree units) that have been fully encoded in the slice or tile containing the current CU.
[0457] Optionally, the update indication information list is determined or obtained by the frequency of the index of the first image block in at least one first image unit group. After determining the predetermined range, the CUs within the range that select the prediction mode and / or division mode as the best mode for encoding are statistically analyzed, and the number of occurrences of the 0-31 indices is accumulated to calculate the selection probability.
[0458] In this embodiment, the selection probability is determined by the frequency of the index corresponding to the prediction mode and / or partitioning mode of each CU within a predetermined range. This is more flexible than the traditional fixed statistical range and can be adaptively updated to follow the CU currently being encoded, making it easier to determine the optimal list of indication information based on the latest selection probability distribution.
[0459] Optionally, the updated indication information list is determined or obtained by weighting the frequency of the index of the first image block in at least one first image unit group based on the distance between the second image block and the first image block in at least one first image unit group. After determining a predetermined range, the prediction mode indication information of the CUs within that range is statistically analyzed. The number of occurrences of each indication information in the N prediction mode indication information is accumulated, and the total number of occurrences of the N indication information is calculated. Based on the number of occurrences of each indication information and the total number of occurrences, the selection probability of each indication information is calculated. When accumulating the number of occurrences of each indication information, the number of occurrences can be appropriately weighted according to the distance between the statistical CU and the current CU. The closer the CU is to the current CU, the greater the weight of the occurrence, that is, the information of the statistical CU that is closer to the current CU is more reliable.
[0460] Optionally, the updated indication information list is determined or obtained by weighting the frequency of the index of the first image block in at least one first image unit group based on the distance between the second image block and the first image block in at least one first image unit group. After determining a predetermined range, the division mode indication information of the CUs within that range is statistically analyzed. The number of occurrences of each indication information in the N division mode indication information is accumulated, and the total number of occurrences of the N indication information is calculated. Based on the number of occurrences of each indication information and the total number of occurrences, the selection probability of each indication information is calculated. When accumulating the number of occurrences of each indication information, the number of occurrences can be appropriately weighted according to the distance between the statistical CU and the current CU. The closer the CU is to the current CU, the greater the weight of the occurrence, that is, the information of the statistical CU that is closer to the current CU is more reliable.
[0461] Optionally, the N indices include indices with indices N0 to N1, where N0 equals 0 and N1 equals 1.
[0462] In this embodiment of the application, by further weighting the statistical index frequencies according to the distance, the reliability of the statistical index selection probability can be further improved.
[0463] In this embodiment of the application, the update instruction information list is determined by at least one of methods seventeen to nineteen:
[0464] Method 17: Determine or obtain an updated list of instruction information by the selection probability of at least one index;
[0465] Optionally, the indicator information list is updated during image encoding and / or image decoding based on the selection probability of the indicator information in the indicator information list during image encoding and / or decoding. In order to make the indicator information list more adaptable to the prediction task of the currently processed image block, the indicator information list is updated in real time during image encoding and decoding. During the update process, it is mainly based on the selection probability of the indicator information, and / or, the updated indicator information list still follows the rule that the codeword length is inversely proportional to the selection probability, so that the average code length is further reduced.
[0466] Optionally, after updating the list of indication information, the encoding rules of the encoding and decoding indexes need to be replaced synchronously at both the encoding and decoding ends.
[0467] Optionally, the rules corresponding to the original codewords are replaced in the encoder and decoder, which has the effect of introducing an updated list of indication information, thereby realizing a new index encoding mechanism. Specifically, at the encoding end, during the GPM partitioning mode index encoding process, the encoder reads the corresponding codeword from the predefined fixed codeword mapping rules and writes it into the bitstream according to the new codeword rules; at the decoding end, the decoder adopts the same codeword rules as the encoder, parses the codeword bit by bit according to the same parsing rules in the input bitstream, and quickly restores the corresponding partitioning sorting index value. In the entire process above, the encoding and decoding ends share the same codeword rules, without transmitting any additional signaling to indicate the current encoding scheme, thereby ensuring the compactness of the encoding and the consistency of the implementation.
[0468] Optionally, the indication information list is updated during the image encoding and / or image decoding process based on the selection probability of the indication information in the indication information list during the image encoding and / or image decoding process. The indication information list is updated according to the selection probability of the index of the prediction mode and / or partitioning mode corresponding to the image block within a predetermined range. The predetermined range can be the already encoded image blocks adjacent to the currently processed image block, or it can be the encoded image blocks that are in the same coding tree unit, rectangular coding unit or other optional coding unit as the current image block.
[0469] Optionally, the preset range is L times the width and / or height of the second image block.
[0470] Optionally, L can be 4 to 10.
[0471] In this embodiment of the application, the indication information list is updated during the image encoding and / or image decoding process based on the selection probability of the indication information in the indication information list during the image encoding and / or image decoding process, which improves the real-time performance of the selection probability statistics and can update the latest indication information list according to the real-time selection probability.
[0472] Method 18: Determine or obtain the list of update indication information by using the code length and codeword of at least one index;
[0473] Optionally, optimization techniques such as bit permutation can be used to determine a theoretically optimal, non-uniform code length allocation scheme. At this stage, only the optimal length of each index is of independent concern, and it is not bound by any grouping structure. The goal is to find the code length allocation scheme that minimizes the average code length. After obtaining this ideal code length allocation, the indexes are grouped according to their code lengths, with the code lengths of the indices in each group being equal. Finally, the corresponding codewords are assigned to each index.
[0474] Optionally, the index codes within each group are of equal length, and for indices within the same group, the prefixes are the same and the suffixes are of the same length.
[0475] Alternatively, the optimization method of bit permutation can also be understood as the iterative optimization method of code rate budget. The core idea is to find a path that "sacrifices A, subsidizes B, and ultimately benefits the whole" on a baseline scheme with no room for optimization through mathematical calculation. Specifically, the specific goal of this method is to find a new code length {Li′} code length allocation scheme under the condition of "unique codeword prefix" (i.e., Kraft inequality ∑2-Li≤1) so that its average code length ∑Pi×Li′ reaches the minimum effect.
[0476] Method 19: Determine or obtain an updated list of instruction information from at least one candidate list of instruction information;
[0477] Optionally, the indicator information list includes at least one indicator information list, and the indicator information list may also include at least one candidate indicator information list. During the image encoding and decoding process, at least one candidate indicator information list can be preset, and then, based on the statistical distribution of the selection probability of the indicator information, an optimal indicator information list is selected from the candidate indicator information list to encode the index of the prediction mode and / or the segmentation mode.
[0478] In the embodiments of this application, an optimal list of indication information can be determined through at least one list of candidate indication information, which increases the flexibility of the selection of the indication information list.
[0479] Optionally, the method for integrating the technical solution of this application embodiment into the VVC (Versatile Video Coding) encoding and decoding process is as follows: Encoder-side integration: First, a CTU-level syntax element Gpm_split_mode_coding_rule is constructed. Then, before the first CU to be encoded in each CTU attempts to test the GPM mode, the adaptive encoding scheme generation module is called. If the GPM mode is selected, the codewords of the split mode index are output according to the generated encoding scheme. Finally, the encoding result is directly written to the bitstream without the need for additional indicators or flags. Decoder-side integration process includes: Before starting the decoding of the current new CTU, the decoder first performs statistics on the GPU split index information of the generated blocks and adaptively generates the same encoding scheme according to the same rules as the encoder. Finally, the codewords are parsed according to the generated encoding table and the sorting index is restored, thereby restoring the GPM split mode.
[0480] Optionally, the steps of adding the adaptive generation encoding scheme mechanism to the codec may include: first, clarifying the scope of statistical data acquisition, obtaining the relevant syntax elements of the Tile and Slice where the current CTU is located, including the starting position and size, to determine which is the smallest unit. Taking the Tile as the smallest unit as an example: traversing all CUs in all CTUs that are not the current CTU within the Tile, if the encoding method selected by the CU being checked is the traditional GPM mode, there will be a valid GPM split mode index. This index and the position of the CU being checked are collected into a syntax element Gpm_Split_Mode_Set of the CTU.
[0481] Optionally, considering that the information of the inspected CU is more relevant the closer it is to the current CTU, it should be given greater weight. Therefore, different values are used for cumulative counting based on the position. For example, the indices of the CUs in the closest ring above, to the left, to the upper right, and to the lower left of the current CTU are cumulatively counted using the first cumulative value, the second ring outwards is cumulatively counted using the second cumulative value, and the ring outwards again is cumulatively counted using the third cumulative value. Finally, normalization is performed to generate the selection probability of each index from 0 to 32.
[0482] Optionally, considering that the information of the inspected CU is more relevant the closer it is to the current CU, it should be given greater weight. Therefore, different values are used for cumulative counting based on position. For example, the indices of the CUs in the closest ring above, to the left, to the upper right, and to the lower left of the current CU are counted using the first cumulative value, the second ring outwards is counted using the second cumulative value, and the ring outwards again is counted using the third cumulative value. Finally, normalization is performed to generate the selection probability of each index from 0 to 32.
[0483] Optionally, the first cumulative value is 5, the second cumulative value is 3, and the third cumulative value is 1. That is, for each occurrence of the index of the nearest ring of CUs above, to the left, to the upper right, and to the lower left of the current CTU or CU, the count is increased by 5. For each occurrence of the index of the second ring of CUs, the count is increased by 3. For each occurrence of the index of the ring of CUs further out, the count is increased by 1. Finally, the values are normalized to generate the selection probability of each index from 0 to 32.
[0484] Optionally, the distance between the first ring, the second ring, and the outermost ring is L times the width or height of the current block.
[0485] Optionally, L can be 1 to 3.
[0486] Optionally, to ensure statistical effectiveness, an update threshold is set. The adaptive generation encoding scheme can only be used when the number of checked CUs with valid GPM partitioning patterns exceeds the update threshold; otherwise, the original encoding scheme is retained.
[0487] Optionally, the method for automatically traversing the update indication information list exemplified in the embodiment includes: trying the original encoding scheme, trying the improved encoding scheme, trying to merge similar probability groups, etc., and saving the scheme with the shortest average code length as the GPM partitioning mode index encoding scheme of the CTU. Since there may be many ways to try traversing, in order to appropriately reduce the encoding and decoding complexity, an early stopping mechanism can be introduced: based on the average code length of the original encoding scheme, when the average code length is reduced to 0.1 of the benchmark (or other threshold), the traversal of other generation methods is stopped.
[0488] Optionally, during the code modification process, the syntax element `Gpm_Split_Mode_Set` is added at the CTU level to store the GPM split mode index and CU position of the valid checked CU in a structure-type variable. Before processing the new CTU, add the following code to the encoder's `xCheckRDCostMergeGeoComb2Nx2N`: statistical code for traversing and counting relevant CUs, and code for traversing the fixed code table generation method. This function generates the optimal index encoding scheme for the CTU. Since this function processes CUs, only the first CU within the CTU suitable for GPM mode needs to perform this step; that is, a CTU-level syntax element is used to mark whether the adaptive generation of the index encoding scheme has been completed. The decoder adds the same processing code to `xdecompressCTU`. Finally, modify the transmitted bitstream code in the encoder's `CABACWriter::geoModeIdx` function and the decoder's `(CABACReader::geoModeIdx)` function.
[0489] This application proposes a mechanism that can synchronously and automatically generate the optimal encoding scheme in real time at the encoding and decoding ends. Specifically, during the encoding process, the encoding end dynamically and in real time calculates the actual selection probability distribution of each index based on the statistical information of the GPM partition index in the current and historical encoded blocks (CTU / CU). The encoding end then uses this probability distribution to adaptively adjust the encoding scheme of the index to maximize the approximation of the statistical characteristics of the current video content, effectively reducing the average bit length and improving compression efficiency.
[0490] Fifth embodiment
[0491] Based on any of the above embodiments, a fifth embodiment is proposed.
[0492] The image processing method in this application embodiment further includes step S21:
[0493] Step S21: Determine or obtain instruction information based on the candidate instruction information list.
[0494] Optionally, the target image patch, such as the predicted value of the target image patch, is determined or obtained according to the first mode corresponding to the above-mentioned indication information.
[0495] Optionally, the first mode includes a prediction mode and / or a partitioning mode.
[0496] Optionally, the candidate indication information list may include at least one candidate indication information list, and the indication information includes information for instructing the decoding segment to perform image prediction according to the first mode. During the image encoding and decoding process, an optimal indication information list is selected from at least one candidate indication information list to encode the index corresponding to the first mode to obtain the corresponding indication information.
[0497] In this embodiment of the application, the image processing method further includes at least one of steps S22 to S24:
[0498] Step S22: Determine the codeword corresponding to the index of the first mode based on the selection probability of the first mode corresponding to the index;
[0499] Optionally, the first mode includes a prediction mode and / or a partitioning mode.
[0500] Optionally, in the image processing method of this application embodiment, the codeword corresponding to the index of the prediction mode and / or partitioning mode is determined according to the selection probability of the prediction mode and / or partitioning mode corresponding to the index. The selection probability of the prediction mode and / or partitioning mode refers to the historical selection probability of the prediction mode and / or partitioning mode in the historical image processing process. The selection probability is determined by the frequency of various prediction modes and / or partitioning modes used by at least one image block in the processing process within a certain period of time. The higher the frequency, the higher the corresponding selection probability. When determining the codeword corresponding to the index of the prediction mode and / or partitioning mode, the codeword length is determined according to the selection probability. The higher the selection probability, the shorter the codeword length, which can reduce the average codeword length.
[0501] Optionally, embodiments of this application provide an encoding strategy based on statistical selection probability distribution characteristics, which allocates codewords according to the probability distribution characteristics of the prediction mode and / or partitioning mode corresponding to the index during the encoding stage.
[0502] Optionally, the selection probability of the prediction mode and / or partitioning mode is used to determine the frequency of index occurrence in each stage of the prediction mode and / or partitioning mode selection process. Combined with the coding characteristics of the interval and stage position, a variable-length coding method that can reduce the average code length is designed. This coding method maintains the compression rate while taking into account the decoding complexity, and achieves an effective balance between code stream saving and real-time performance.
[0503] Optionally, before determining the codewords of the indexes corresponding to the prediction mode and / or partition mode based on the selection probability of the prediction mode and / or partition mode corresponding to the index, the true distribution characteristics of each index are analyzed. Data sampling and statistics are performed on the GPM mode usage on the encoder side, including: running the ECM16 (Exploration of Coding Model) reference software with all available configurations on the test sequence, recording the GPM partition mode indexes that are finally selected after sorting in each CU (Coding Unit); and accumulating the selection frequency of each index (e.g., 0 to 31).
[0504] Optionally, before obtaining the selection probability of each index, it is necessary to modify the decoder code of the standard ECM16 software. In the `InterPrediction::deriveGpmSplitMode` function, obtain the `pu.geoSplitDir` of each CU, which is the sorted GPM partition index selected by the encoder. Output it to a CSV (Comma-Separated Values) file. Run the encoder on the official standard test set of Class A, Class B, Class C, Class D, and Class F configured as RA (Random Access). Then run the modified decoder to obtain the raw data. Use Python (a high-level programming language) to count the probability of the index (e.g., index 0-31) to generate the occurrence probability. Finally, calculate the probability according to the formula. Calculate the average code length.
[0505] In this embodiment, the codewords of the index corresponding to the prediction mode and / or partition mode are determined according to the selection probability of the prediction mode and / or partition mode corresponding to the index. This allows for flexible encoding of the index based on the selection probability of the prediction mode and / or partition mode, overcoming the shortcomings of the fixed encoding strategy in the prior art, determining the codewords of the index in accordance with the actual application scenario, and reducing the average code length.
[0506] Step S23: Determine the codewords related to the index of the index group corresponding to the first mode based on the selection probability of the index group corresponding to the first mode;
[0507] Optionally, the first mode includes a prediction mode and / or a partitioning mode.
[0508] Optionally, the codewords associated with the index of the index group corresponding to the prediction mode and / or partitioning mode are determined based on the selection probability of the index group of the prediction mode and / or partitioning mode corresponding to the index. In order to reduce the average code length, the codeword length can be determined based on the selection probability of the index group. The higher the selection probability, the shorter the code length.
[0509] In this embodiment, the codewords related to the index are determined from the perspective of the selection probability of the index group. The index is grouped, which is more conducive to exploring the distribution law of the selection probability of the index group. It is also easier to uniformly assign the same prefix to the indexes of the same index group. The codeword structure keeps the prefix unique and is more suitable for the lookup table structure of the entropy decoder.
[0510] Step S24: Determine the codeword related to the index of the first mode in the index group based on the selection probability of the first mode corresponding to the index in the index group.
[0511] Optionally, the first mode includes a prediction mode and / or a partitioning mode.
[0512] Optionally, the codewords related to the prediction mode and / or partitioning mode in the index group are determined based on the selection probability of the prediction mode and / or partitioning mode of the corresponding index in the index group. Similarly, in order to reduce the average code length, the codeword length can be determined based on the selection probability of the index group. The higher the selection probability, the shorter the code length.
[0513] Optionally, the length of the codeword is inversely proportional to the magnitude of the selection probability. The codeword may be the codeword of the index corresponding to the prediction mode and / or partition mode, the index-related codeword of the index group corresponding to the prediction mode and / or partition mode, or the index-related codeword of the prediction mode and / or partition mode in the index group.
[0514] In this embodiment, shorter codewords are assigned to indices with high selection probability and longer codewords are assigned to indices with low selection probability. This can reduce the average codeword length from the perspective of selection probability. Since indices with high selection probability are encoded and sent codewords more frequently, reducing their codeword length can effectively reduce the overall average codeword length.
[0515] Optionally, in the embodiments of this application, the instruction information can be determined or obtained through at least one of the following methods 20 to 27:
[0516] Method 20: The instruction information is determined or obtained from the bitstream;
[0517] Optionally, the indication information is determined or obtained from the bitstream. The bitstream refers to the information bitstream sent from the encoding end to the decoding end during image processing. The decoding end can obtain the indication information sent by the encoding end from the bitstream to determine the prediction mode and / or partitioning mode.
[0518] In the embodiments of this application, the decoder can directly obtain indication information from the bitstream, perform subsequent decoding and image prediction processes, and obtain high-quality target image blocks.
[0519] Method 21: The instruction information is determined or obtained based on the rate-distortion optimization process;
[0520] Optionally, the indication information is determined or obtained based on the rate-distortion optimization (RDO) process. RDO is a core technique that uses mathematical modeling to balance compression bitrate and reconstruction distortion. Its goal is to minimize distortion under a given bitrate constraint, or to minimize bitrate under a defined distortion constraint, to achieve optimal compression efficiency. During RDO, it is possible to determine which prediction mode and / or partitioning mode should be used for image prediction, thereby obtaining the indication information corresponding to the prediction mode and / or partitioning mode.
[0521] In the embodiments of this application, the prediction mode and / or partitioning mode are determined through the rate-distortion process. Essentially, this trades algorithmic complexity for a breakthrough in compression performance. At the efficiency level, it dynamically balances rate-distortion, saving 30% to 50% of the bit rate compared to a fixed mode (HEVC vs. H.264). At the quality level, it combines HVS (Human Visual System) to suppress subjective distortion, improving PSNR (Peak Signal-to-Noise Ratio) by 0.5 to 2 dB at the same bit rate.
[0522] Method 22: The indication information is determined or obtained through the selection probability;
[0523] Optionally, the indication information is determined or obtained through the selection probability. Specifically, an indication information list is determined based on the selection probability corresponding to various prediction modes, and then each index is encoded according to the indication information list to obtain the indication information. The indication information list includes the correspondence between the indices corresponding to various prediction modes and / or partitioning modes and the corresponding codewords. The corresponding codeword can be directly determined based on the index of the prediction mode and / or partitioning mode during encoding.
[0524] In this embodiment, an indication information list is formed based on the selection probability of the index of the indication information, and the index is then encoded based on the indication information list. This achieves the effect of adjusting the encoding strategy in real time according to the selection probability of the index, which can effectively select a better encoding strategy based on the distribution of the selection probability, reduce the average codeword of the index, and improve the signaling encoding and decoding efficiency.
[0525] Method 23: The indication information is located in the bitstream;
[0526] Optionally, the indication information is located in the bitstream, which can be the bitstream sent from the encoding end to the decoding end. The decoder can obtain the codewords of the indication information from the bitstream and obtain the corresponding indication information through decoding operations.
[0527] In this embodiment, the encoding end encodes the indication information and sends it to the bitstream for the decoding end to perform decoding processing, determine the indication information and the corresponding prediction mode and / or segmentation mode, and obtain a high-quality target image patch.
[0528] In this embodiment, the indication information is determined based on the selection probability corresponding to the index of each indication information. Furthermore, when transmitting codewords, indication information with higher selection probabilities and higher frequencies corresponds to shorter codewords. This achieves multiple fixed or adaptive group codeword rules based on probability distribution and index structure, optimizing the original variable-length encoding method. It reduces the average code length and improves signaling compression efficiency without increasing implementation complexity.
[0529] Method 24: The instruction information is determined based on a target instruction information list from at least one candidate instruction information list;
[0530] Optionally, before determining the target indication information list, a relatively optimal target indication information list is selected from at least one candidate indication information list. Then, the index of the prediction mode and / or partitioning mode corresponding to the image block is encoded according to the target indication information list to obtain the corresponding codeword. The codeword of the index is also one of the indication information. The codeword is sent to the code stream for transmission to the decoding end. The decoding end decodes according to the target indication information list to obtain the index corresponding to the codeword, thereby determining the corresponding prediction mode and / or partitioning mode.
[0531] In this embodiment of the application, the indication information is determined from the best target indication information list from at least one candidate indication information list, so that the indication information can be sent with the shortest code length during the transmission of the code stream, avoiding code length redundancy and improving signaling encoding and decoding efficiency.
[0532] Method 25: The instruction information is included in a group of instruction information in the target instruction information list;
[0533] Optionally, the target indication information list includes one or more indication information groups, and the indication information list contains multiple indication information items and corresponding indexes, codewords, indication information groups, etc.
[0534] Optionally, the indicator information list includes at least one indicator information group. During the process of sorting each indicator information group in the indicator information list, it can be divided into at least one indicator information group. The number of indicator information groups is determined by the distribution of the selection probability of each candidate prediction mode and / or candidate partitioning mode index in the indicator information list. For example, the indicator information corresponding to indices with similar selection probabilities can be assigned to the same indicator information group. Similar selection probabilities can be determined by setting a difference threshold. For example, different difference thresholds such as 4%, 2%, and 1% can be set according to the position of the indicator information. If the difference between the selection probabilities of two indices is less than the difference threshold, they can be considered similar.
[0535] In this embodiment of the application, the list of indication information is presented in the form of indication information groups, and the selection probability in different indication information groups is similar. The codewords of corresponding code lengths can be assigned to each index through different indication information groups, which can effectively avoid group jumps.
[0536] Method 26: The list of indication information corresponds to at least one first candidate pattern;
[0537] Optionally, the first mode includes a prediction mode and / or a partitioning mode.
[0538] Optionally, the indication information list corresponds to at least one candidate prediction mode and / or candidate partitioning mode. The indication information list may include one or more candidate prediction modes and / or candidate partitioning modes for use as a reference during the encoding of the indices of these candidate prediction modes and / or candidate partitioning modes. Then, the codeword is sent to the decoding end, which restores the codeword to the index, thereby determining the corresponding candidate prediction mode and / or candidate partitioning mode, and applying the candidate prediction mode and / or candidate partitioning mode to the image block processing for inter-frame / intra-frame prediction.
[0539] Optionally, at least one candidate prediction mode and / or candidate partitioning mode corresponding to the indication information list is determined by the matching cost corresponding to at least one second mode (e.g., a second prediction mode and / or a second partitioning mode). The second mode refers to all modes to be screened. Taking the GPM mode as an example, it includes 64 second modes (i.e., 64 GPM partitioning modes). When screening candidate prediction modes and / or candidate partitioning modes from at least one prediction mode and / or partitioning mode, the screening can be performed according to the matching cost. The matching cost can be the TM (Temporal Masking Cost). The TM cost of each of these M second modes is calculated. The GPM partitioning modes are reordered in ascending order according to the TM cost, and the optimal N models are determined as candidate prediction modes and / or candidate partitioning modes.
[0540] Alternatively, N can be 32, 29, or 36, and M can be 64.
[0541] Optionally, when determining the matching cost of the prediction pattern and / or partitioning pattern, the probability of its selection is approximated by the TM cost of the index. The smaller the TM cost, the greater the corresponding selection probability, and the easier it is to be selected as a candidate prediction pattern and / or candidate partitioning pattern.
[0542] In this embodiment, the overall selection strategy follows the matching principle, that is, based on the TM cost of the index to approximate its probability of being selected, and finally selects at least one best candidate prediction mode and / or candidate partitioning mode to form an indication information list, discarding candidate modes with excessively high TM costs or low selection probabilities.
[0543] Method 27: The instruction information list includes first instruction information with the same index but different codewords related to the index.
[0544] Optionally, the indication information list includes first indication information with the same index but different codewords associated with the index. The indexes are sorted in the same way in different indication information lists. For example, the indexes in each indication information list are 0-32, but the codewords associated with each index in different indication information lists are not the same, and the corresponding selection probabilities are not necessarily the same.
[0545] Optionally, the indication information grouping includes index grouping, which is a strategy for grouping indexes. For example, in Table 7 below, the indexes are divided into multiple groups such as index, codeword, prefix in codeword, and suffix in codeword. The indexes are divided into multiple groups such as 0-3, 4-7, 8-11, and 38-31.
[0546] Table 7
[0547]
[0548] Optionally, the number of indications in at least one level of indication information group corresponds to at least one predetermined selection probability range. In this embodiment of the application, the selection probability corresponding to the index of the indication information in different indication information groups is within a certain predetermined selection range, so as to reflect the distribution of the selection probability of each index through the indication information group. The predetermined selection probability range is a pre-set selection probability, such as a group of less than 1%, a group of 1%-2%, a group of 2%-4%, etc.
[0549] In this embodiment of the application, by setting multiple indicator index groups and indicator information contained in the index group in the indicator information list, the indicator information with different selection probability distributions is grouped into the same group, which makes it easier to determine a unified prefix and different suffixes in each group according to the index group.
[0550] Optionally, as shown in Table 8 below, the instruction information list includes an index list, which includes at least one index starting from 0 and can be represented in the form of a sequence number.
[0551] Table 8
[0552]
[0553] Optionally, in addition to the index, as shown in Table 8 above, the indicator information list also includes various information such as prefix, suffix, codeword, code length, selection probability, average code length (Avg), and the total / average length of all indices, providing a more comprehensive display of multi-dimensional indicator information.
[0554] Optionally, the indication information list corresponds to at least one candidate prediction mode and / or candidate partitioning mode. The indication information list may include one or more candidate prediction modes and / or candidate partitioning modes for use as a reference during the encoding of the indices of these candidate prediction modes and / or candidate partitioning modes. Then, the codeword is sent to the decoding end, which restores the codeword to the index, thereby determining the corresponding candidate prediction mode and / or candidate partitioning mode, and applying the candidate prediction mode and / or candidate partitioning mode to the image block processing for inter-frame / intra-frame prediction.
[0555] The probability of selecting an instruction or instruction group at the first position in the instruction information list is higher than that at the second position. Optionally, the first position is earlier than the second position. When the index is sorted, it is arranged in descending order of selection probability. Therefore, in the instruction information list, the earlier the position of the instruction or instruction group, the greater the corresponding selection probability.
[0556] Optionally, the length of the indication information or indication information group at the first position in the indication information list is shorter than the length of the indication information or indication information at the second position. Optionally, the first position is earlier than the second position because the indexes are sorted in descending order of selection probability. Therefore, in the indication information list, the earlier the position of the indication information or indication information group, the higher the corresponding selection probability. In order to reduce the average code length, the length of the indication information of the index with a higher selection probability needs to be reduced. Therefore, in the indication information list, the earlier the position of the indication information or indication information group, the shorter the corresponding information length.
[0557] Optionally, the indication information list corresponding to the target image block is determined based on the selection probability of at least one index. Optionally, the indication information list of the target image block is determined based on the selection probability of at least one index. The selection probability of at least one index reflects the distribution of the selection probability of at least one index. These selection probability distributions determine the grouping of the indication information list. The principle of grouping is to group indices with similar selection probabilities into the same group as much as possible, avoid jumps in the selection probability of indices within the group, thereby better allocating the codeword length of each index group by group and reducing the average code length.
[0558] Sixth Embodiment
[0559] Based on any of the above embodiments, a sixth embodiment is proposed.
[0560] In this embodiment of the application, the image processing method further includes at least one of steps S25 to S28:
[0561] Step S25: Match the index with at least one candidate indication information list according to the selection probability corresponding to the index, and determine or obtain the target indication information list;
[0562] Optionally, the target indicator information list is determined or obtained based on the matching result of whether the selection probability corresponding to the index matches in at least one candidate indicator information list.
[0563] Optionally, in the process of matching the target indicator information list from the candidate indicator information list, the selection probability of the index is mainly used as the basis. In different candidate indicator information lists, they are mainly grouped according to the distribution of the selection probability of the index. Therefore, when matching the target indicator information list, the matching can be based on the distribution of the selection probability of the index, and the candidate indicator information list with the closest distribution of the selection probability of the index can be selected.
[0564] Optionally, the candidate indication information list may include at least one, as shown in Table 9 below:
[0565] Table 9
[0566]
[0567]
[0568] Optionally, as shown in Table 9 above, the indicator information list also includes various other information such as Index, Prefix, Suffix, Code, Len, Selection Probability Rate, Average Code Length Avg, and Total / Average Length, to more comprehensively display multi-dimensional indicator information.
[0569] Optionally, the difference between the suffix lengths of at least one adjacent indication information group using fixed-length encoding is greater than or equal to 1.
[0570] Optionally, the difference between the suffix lengths of at least one adjacent indication information group using fixed-length encoding is 2.
[0571] Optionally, the index binary encoding rules and statistical characteristics in Table 9 above are as follows: Figure 16 As shown in the first candidate indication information table (where the horizontal axis represents the index and the vertical axis represents the code length), indices 0-3 are assigned 3-bit codewords, 4-7 are assigned 4-bit codewords, indices 8-15 are uniformly assigned 6-bit codewords, and indices 16-31 are uniformly assigned 7-bit codewords, with a boundary only between 8-15 and 16-31. Therefore, this scheme is suitable for situations where the probability of selecting indices 8-15 and 16-31 within a group is very similar, but the probability differs significantly between groups.
[0572] Optionally, the candidate instruction information list may also include Table 10:
[0573] Table 10
[0574]
[0575]
[0576] Optionally, as shown in Table 10 above, the indicator information list also includes various information such as Index, Prefix, Suffix, Code, Len, Selection Probability Rate, Average Code Length Avg, and Total / AverageLength, to more comprehensively display multi-dimensional indicator information.
[0577] Optionally, the difference between the suffix lengths of at least one adjacent indication information group using fixed-length encoding is greater than or equal to 1.
[0578] Optionally, the difference between the suffix lengths of at least one adjacent indication information group using fixed-length encoding is 2.
[0579] Optionally, the index binary encoding rules and statistical characteristics in Table 10 above are as follows: Figure 17 (The horizontal axis represents the index, and the vertical axis represents the code length.) As shown in the second candidate indication information table, indices 0-3 are assigned 3-bit codewords, 4-7 are assigned 4-bit codewords, indices 8-11 are assigned 5-bit codewords, 12-15 are assigned 6-bit codewords, and 16-31 are all uniformly assigned 8-bit codewords. Therefore, this scheme is suitable for situations where the probability of selecting indices 8-11, 12-15, and 16-31 within a group is very similar, while the probability between groups differs significantly.
[0580] Optionally, the candidate indication information list may also include, for example, Figure 18 (The horizontal axis represents the index, and the vertical axis represents the code length) shows the third candidate indicator information table based on the binary encoding rules and statistical characteristics of the indices. In this table, indices 0-2 are assigned 3-bit codewords, 3-7 are assigned 4-bit codewords, 8-11 are uniformly assigned 5-bit codewords, 12-15 are assigned 6-bit codewords, and 16-31 are all uniformly assigned 6-bit codewords. Therefore, this scheme is suitable for situations where the probability of selecting indices 0-3, 4-7, 8-11, 12-15, and 16-31 within a group is very similar, while the probability between groups is significantly different.
[0581] Optionally, a table indicating the index binary encoding rules and statistical characteristics of the information list is provided. Figure 19 (The horizontal axis represents the index, and the vertical axis represents the code length.) As shown in the table, indices 8-31 are further subdivided into 5 groups, assigned 5, 6, 7, 8, and 9-bit codewords. Therefore, this scheme is suitable for situations where the probability of selecting indices 8-11, 12-15, 16-19, 20-23, and 24-31 within a group is very similar, while the probability between groups differs significantly. However, the average code length of this table is too long. Therefore, Tables 9 and 10 above are used instead. Figure 16 , Figure 17 , Figure 18 The table corresponding to the index binary encoding rules and statistical characteristics shown is used as a candidate indication information list (the average codeword length of all indexes is lower than the average codeword length of all indexes in the traditional indication information list), which can effectively reduce the average code length and improve the signaling encoding and decoding efficiency.
[0582] In this embodiment, by constructing similarity indices between various probability distributions and code length distributions, the merits of grouping schemes for each candidate indication information list are comprehensively evaluated from at least one perspective. By measuring the concentration of probabilities within a group and the similarity of probabilities between groups, both local consistency and overall distinguishability are taken into account. Finally, based on the above criteria, each scheme is scored or compared, and the candidate indication information list corresponding to the grouping scheme that best matches the actual distribution characteristics is selected as the target indication information list, thereby optimizing the adaptability and efficiency of code length design.
[0583] Step S26: Match the candidate indication information list with the selection probability corresponding to the index group to determine or obtain the target indication information list;
[0584] Optionally, the target indicator information list is determined or obtained based on the matching result of whether the selection probability corresponding to the index group matches in at least one candidate indicator information list.
[0585] Optionally, when the indicator information group includes an index group, the selection probability corresponding to the index group can be used to match the candidate indicator information list, and the candidate indicator information list whose selection probability of the index group is most similar to the selection probability distribution in the candidate indicator information list can be selected as the target indicator information list.
[0586] Optionally, the list of instruction information may include Tables 9 and 10 above, or may include... Figure 16 , Figure 17 , Figure 18 The table shows the index binary encoding rules and statistical characteristics.
[0587] In this embodiment, the target indication information list is determined or obtained by matching the selection probability corresponding to the index group in at least one candidate indication information list. Since the selection probability distribution of the index group is taken into account, the determined or obtained target indication information list is more suitable for the current encoding and decoding scenario.
[0588] Step S27: Determine or obtain the target indication information list by grouping the selection probability corresponding to at least one index according to the grouping scheme of at least one candidate indication information list.
[0589] Optionally, in order to directly determine which candidate indicator information list has the closest selection probability to each index that has been statistically analyzed, the selection probabilities corresponding to each index are first grouped according to the grouping scheme of each candidate indicator information list. The grouping results include at least one index group, and each index group includes one or more indexes, as well as the probability corresponding to each index.
[0590] Optionally, taking three candidate indicator information lists as an example, after grouping the selection probability corresponding to at least one index according to the grouping scheme of the three candidate indicator information lists, three grouping results are obtained. These three grouping results correspond to three candidate indicator information lists. In each index group of each grouping result, if the probability distribution within the group is closer, it indicates that the matching degree between the grouping result and the corresponding candidate indicator information list is higher. Finally, the matching degree of the grouping results corresponding to the three candidate indicator information lists is determined, and the candidate indicator information list with the highest matching degree is taken as the target indicator information list.
[0591] In this embodiment, the selection probability corresponding to each index is first grouped according to the grouping scheme of each candidate indication information list. The matching degree between the selection probability distribution and the candidate indication information list is determined based on the grouping results, which can obtain the target indication information list more intuitively and quickly.
[0592] Step S28: Determine or obtain the target indication information list based on at least one of the following: the within-group variance, the range of the mean within-group selection probabilities, the sum of the squared errors of the mean within-group selection probabilities, and the selection probability corresponding to at least one indication information in the grouping scheme of the grouping result ...
[0593] Optionally, this application provides a method for filtering the optimal target indication information list based on multiple parameters corresponding to the grouping results under a grouping scheme with at least one candidate indication information list, based on the selection probability corresponding to the index. Parameters such as the variance within the group, the range of the mean selection probability within the group, the sum of squared errors of the mean selection probability within the group, and the selection probability corresponding to at least one indication information within the group are all directly read or calculated from the grouping results under each grouping scheme.
[0594] Optionally, when determining or obtaining the target indication information list based on the range of the within-group variance and the mean of the within-group selection probability, the target indication information list is mainly matched based on the group similarity of the difference between the within-group variance and the mean of the between-groups. For example, firstly, the probabilities of the 32 indices are assigned to these indices according to different grouping schemes of each candidate indication information list, resulting in at least one grouping result. Then, the mean and variance of the probability of each group in each grouping result are calculated. Next, the sum of the variances of all groups (to reflect the degree of difference in probability within groups) and the range of the mean of probability of each group (to reflect the degree of separation of probability between groups) are calculated. Finally, the following formula is used: Score = Sum of within-group variances - λ × Range of mean of between groups (λ is a weight parameter, which can be taken as 1 based on experience) to calculate the score for the three schemes. The grouping scheme with the lowest score is selected as the current optimal grouping scheme, and the candidate indication information list corresponding to the current optimal grouping scheme is used as the target indication information list.
[0595] In this embodiment, the basic screening target indication information list based on the within-group variance and the mean of the within-group selection probability takes into account both the uniformity of the probability within the group and the separation of the probability between groups, thus ensuring that the final selected candidate indication information list best matches the actual probability distribution.
[0596] Optionally, when determining or obtaining the target indication information list by summing the squared errors of the mean of the selected probabilities within each group, the main consideration is minimizing the segmentation error. For each grouping result, the current probability distribution is fitted to a constant value within each group (i.e., each group's probability is approximated by the group mean). Then, the sum of squared errors between the actual values of all 32 index probabilities and their respective group means is calculated. Finally, the candidate indication information list corresponding to the grouping scheme with the smallest error is selected as the target indication information list.
[0597] The embodiments of this application are actually equivalent to minimizing the dispersion of the probability within a group. This can also effectively reflect the adaptability of the grouping scheme to the actual probability distribution and help select the optimal code length allocation rule to obtain a target indication information list with a relatively high matching degree.
[0598] Optionally, when determining or obtaining the target indication information list based on the selection probability corresponding to at least one indication information within a group, the matching is mainly based on the boundary characteristics of the probability of the first index of each group. First, for the grouping results of each grouping scheme, the probability value of the first index (i.e., the grouping boundary point) of each group is recorded. Then, the boundary point probabilities of each grouping scheme are compared. For example, the scheme where the grouping boundary falls exactly at the position of the probability change is preferred, that is, there is a significant difference between the first probability value of a group and the last probability value of the previous group. In the quantitative calculation, the "maximum boundary jump method" can be used, that is, the probability difference of all group boundary points of each scheme is counted, and the candidate indication information list corresponding to the scheme with the maximum group boundary probability difference is selected as the target indication information list that best matches the current probability distribution.
[0599] In this embodiment, the best candidate indication information list is selected based on the difference in grouping boundaries. The difference in grouping boundaries reflects the distinguishability between groups and can also help to select the best code length allocation rule to a certain extent, so as to obtain a target indication information list with a relatively high matching degree.
[0600] Optionally, considering the three dimensions of consistency within groups, segregation between groups, and boundary sensitivity, a scoring function can be further constructed: Score = α × sum of within-group probability variances - β × range of between-group means - γ × intensity of group boundary jumps. Optionally, within-group variance measures the uniformity of index probabilities within the same group, the range of between-group means reflects the degree of separation between groups, and boundary jumps are used to capture the alignment of probability mutation points with group boundaries. Finally, the score value is calculated by applying the above formula to the grouping results corresponding to the candidate indicator information list, and the lowest score is selected as the target indicator information list.
[0601] This application embodiment combines multi-dimensional evaluation indicators to filter the target indication information list. It combines the advantages of the aforementioned three indicators, avoids randomness, improves the stability of the matching degree of the filtered target indication information list, and has strong robustness.
[0602] Optionally, the method for integrating the technical solution of this application embodiment into the VVC (Versatile Video Coding) encoding and decoding process is as follows: In the GPM mode sorting stage of each CU (after TM cost sorting), the adaptive selection module is called to select the most suitable codeword rule according to the TM cost distribution characteristics and the designed selection rules, and output the codeword. The encoding result is directly written into the bitstream without the need for additional indicators or flags. The decoder-side integration process includes: Before parsing the bitstream of the GPM partitioning mode, the decoder first completes the TM cost calculation of the 64 partitioning modes of the CU and selects the top 32 items for sorting to generate a sorting index and its corresponding TM cost. Finally, the most suitable codeword rule is selected according to the TM cost distribution characteristics and the designed selection rules.
[0603] This application's embodiment is equivalent to introducing an adaptive coding scheme selection mechanism based on the cost distribution of prediction patterns and / or partitioning patterns. The encoder statistically analyzes the costs of 32 indices, observing their stepped distribution characteristics. This distribution is then matched against a pre-defined list of multiple candidate indication information to select the closest coding strategy for the selected TM index and output the bitstream. This process adaptively adjusts based on the concentration of costs, tail probability decay, and distribution width, thereby improving overall coding efficiency. The decoder employs a completely symmetrical strategy: it first reconstructs the costs of the 32 TMs and analyzes their distribution, then selects the same strategy as the encoder to decode the bitstream, ensuring consistency and correctness between encoding and decoding. This application's adaptive coding scheme selection strategy requires no additional signaling overhead and automatically selects the optimal scheme based on the actual distribution, combining flexibility and robustness.
[0604] This application also provides a processing device, including a memory and a processor. The memory stores a processing program, and when the processing program is executed by the processor, it implements the steps of the processing method in any of the above embodiments.
[0605] This application also provides a storage medium storing a processing program, which, when executed by a processor, implements the steps of the processing method in any of the above embodiments.
[0606] In the embodiments of the processing device and storage medium provided in this application, all the technical features of any of the above-described 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 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., a 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, wherein, Including the following steps: Based on the first pattern corresponding to the instruction information, determine or obtain the target image block; The indication information includes at least the codewords related to the index in the index group of the first mode. The codewords are determined according to the selection probability of the index in the index group. The length of the codeword is inversely proportional to the magnitude of the selection probability. The indexes in the same index group have the same prefix. The difference between the selection probabilities of the indexes in the same index group is less than a preset difference threshold. The indexes in the indication information are grouped based on the similarity of the selection probabilities.
2. The image processing method as described in claim 1, wherein, The instruction information includes at least one of the following: The index corresponding to the first pattern; The codeword of the index corresponding to the first mode; The index of the index group corresponding to the first pattern; The index-related codewords of the index group corresponding to the first mode; The first schema is the index within the index group; Information used to indicate the first mode; Information used to indicate the sub-pattern of the first pattern; Information used to indicate the first pattern in the first pattern list.
3. The image processing method as described in claim 2, wherein, It also includes at least one of the following: The codeword corresponding to the index of the first mode is determined based on the selection probability of the first mode corresponding to the index; The codeword corresponding to the first mode index is determined based on the unary code with a variable code length and the truncated binary code with a variable incrementing step size. The codewords related to the index group corresponding to the first mode are determined based on the selection probability of the index group corresponding to the first mode. The codewords corresponding to the first mode are updated by the selection probability of the codewords during the image encoding and / or decoding process; The index-related codewords of the index group corresponding to the first mode are updated by the selection probability of the codewords during the image encoding and / or decoding process; The first mode updates the index-related codewords in the index grouping by the selection probability of the codewords during the image encoding or decoding process.
4. The image processing method as described in claim 1, wherein, It also includes at least one of the following: The indication information is determined or obtained from the bitstream; The indication information is determined or obtained based on the rate-distortion optimization process; The indication information is determined or obtained through the selection probability; The indication information is located in the bitstream.
5. The image processing method as described in claim 1, wherein, It also includes at least one of the following: The instruction information is located in the instruction information group within the instruction information list; The list of indication information corresponds to at least one first candidate pattern.
6. The image processing method as described in claim 5, wherein, It also includes at least one of the following: The list of instructions includes at least one group of instructions. The instruction information list includes at least one level of instruction information grouping; The indicator information list is updated during image encoding and / or image decoding based on the selection probability of the indicator information in the indicator information list during image encoding and / or decoding. The instruction information list includes at least one instruction information list; The at least one first candidate pattern corresponding to the indication information list is determined by the matching cost corresponding to at least one second pattern.
7. The image processing method as described in claim 6, wherein, It also includes at least one of the following: At least one instruction information group includes at least one instruction information; At least one level of instruction information group includes at least one instruction information group; The list of indication information includes first indication information with the same index but different codewords related to the index; The indication information grouping includes the index grouping; The instruction information list includes an index list; The number of indications in at least one level of indication information group corresponds to at least one predetermined selection probability range; The number of instruction messages in different levels of instruction message groups is different; The information length of the first-level instruction information is longer than that of the second-level instruction information; The number of instructions at the first level is higher than the number of instructions at the second level; The first-level instructions are located later in the instruction list than the second-level instructions. The number of instruction messages in the same level instruction message group is the same; The process of updating the instruction information list includes replacing at least one first instruction information group with a second instruction information group; The process of updating the instruction information list includes merging the instruction information in the predefined instruction information list into groups based on the range of selection probabilities. The process of updating the instruction information list includes updating the length of the instruction information in the instruction information group; The probability of selecting the instruction or instruction group in the first position of the instruction information list is higher than the probability of selecting the instruction or instruction group in the second position. The length of the instruction information or instruction information group in the first position of the instruction information list is less than the length of the instruction information or instruction information in the second position; The list of indication information corresponding to the target image patch is determined based on the selection probability of at least one index.
8. The image processing method as described in claim 6, wherein, It also includes at least one of the following: In the list of indicator information, the probability of selecting the indicator information in the last indicator information group is lower than the probability of selecting any other indicator information group in the list. In the list of indication information, the number of indication information in the last indication information group is greater than the number of indication information in any other indication information group in the list of indication information. In the list of indication information, the number of indication information in the last indication information group is equal to the sum of the number of indication information in all indication information groups preceding the last indication information group in the list of indication information. In the indication information list, the codeword lengths of the index-related codewords in the first indication information group increase sequentially. The position of each level instruction information group in the instruction information list is determined based on the total number of instruction information in the instruction information list and the predetermined number of instruction information. The hierarchy of at least one level of indication information group is determined by the length of the codeword related to the index of the index group corresponding to the first mode, and / or the group number of each indication information group corresponds to the index of the index group corresponding to the first mode.
9. A processing apparatus, wherein, include: The system includes 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 the image processing method as described in claim 1.
10. A storage medium, wherein, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the image processing method as described in claim 1.
Citation Information
Patent Citations
Intra prediction and intra mode coding
CN107736022A
Video processing method and device
CN113170144A
Prediction coding method, prediction decoding method and terminal
CN116614623A