Processing method, processing device and storage medium
By determining the partition prediction mode of the current block in video coding and utilizing reference area and gradient information, the problem of unsatisfactory prediction results in local areas of image blocks is solved, thus improving the quality of video coding and decoding.
Patent Information
- Application Number
- PCT/CN2025/101884
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2026-01-02
AI Technical Summary
In existing video coding standards, the prediction performance for local regions of image blocks is not ideal during intra-frame prediction and/or inter-frame prediction, resulting in poor video coding and decoding quality.
By determining the prediction pattern of at least one partition of the current block, and using reference area, gradient information, and weight information, combined with geometric partitioning pattern and bitstream index, a suitable prediction pattern is matched to improve the prediction accuracy of local regions.
It improves the prediction accuracy of local regions in image blocks and enhances the quality of video encoding and decoding.
Smart Images

Figure CN2025101884_02012026_PF_FP_ABST
Abstract
Description
Processing method, processing device and storage medium TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a processing method, a processing device and a storage medium. BACKGROUND
[0002] The existing video coding standard (H.266 / VVC) proposes a coding technology for video frames, for example, when coding and decoding a video frame, the protocol divides each frame into different blocks and performs prediction processing and coding and decoding processing.
[0003] In the process of conceiving and implementing the present application, the inventors have found that at least the following problems exist: in the intra-frame prediction and / or inter-frame prediction process, the prediction effect for the local area of the image block is not ideal, which further causes poor coding and decoding quality in the video coding and / or decoding process.
[0004] The foregoing narrative is intended to provide general background information and does not necessarily constitute prior art. SUMMARY
[0005] To solve the above technical problems, the present application provides a processing method, a processing device and a storage medium, which can match a suitable prediction mode for at least one partition of a current block, thereby supporting improving the prediction accuracy for the local area (e.g., the area corresponding to the partition) of the current block.
[0006] The present application provides a processing method, which can be applied to a processing device, comprising the steps of:
[0007] S10, determining or obtaining a prediction mode of at least one partition of the current block according to at least one reference area
[0008] Optionally, the prediction mode of the at least one partition is determined or obtained according to at least one of the following:
[0009] a sub-reference area;
[0010] first weight information;
[0011] gradient information of the at least one reference area;
[0012] at least one gradient operator;
[0013] at least one gradient histogram.
[0014] Optionally, the processing method further comprises at least one of the following:
[0015] The sub-reference area is related to at least one partition of the current block;
[0016] The sub-reference area is determined or obtained according to the division manner of the current block;
[0017] The first weight information corresponds to at least one partition and / or at least one reference region;
[0018] The gradient histogram is determined or obtained according to at least one reference region of the current block;
[0019] The first weight information is determined or obtained according to a partition mode of the current block;
[0020] The gradient information includes gradient information of pixels in the reference region, and / or overall gradient information of the reference region.
[0021] Optionally, the processing method further comprises at least one of the following:
[0022] The partition mode of the current block is determined or obtained according to at least one geometric partition mode, and / or an index obtained from a bitstream;
[0023] The first weight information includes weight of at least one pixel in at least one reference region;
[0024] The gradient information of at least one reference region, the gradient information of pixels in the reference region, and / or the overall gradient information of the reference region includes gradient amplitude and / or gradient direction.
[0025] Optionally, the weight of at least one pixel in at least one reference region included in the first weight information is determined or obtained according to a distance between the at least one pixel and a partition line corresponding to the partition mode of the current block.
[0026] Optionally, the gradient histogram is determined or obtained according to at least one of the following:
[0027] Gradient information of a sub-reference region related to at least one partition;
[0028] Gradient information of at least one reference region of the current block and the first weight information;
[0029] At least one reference region of the current block and at least one gradient operator.
[0030] Optionally, the processing method further comprises at least one of the following:
[0031] The prediction result of the current block is determined or obtained according to the prediction result of at least one partition;
[0032] The prediction result of the current block is determined or obtained according to a prediction mode of at least one partition and a partition mode of the current block.
[0033] Optionally, at least one reference region is determined or obtained according to at least one of the following:
[0034] at least one of an above neighboring pixel, an above non-neighboring pixel, a left neighboring pixel, a left non-neighboring pixel, a top-left neighboring pixel, and a top-left non-neighboring pixel of the current block;
[0035] at least one of a neighbor block, a non-neighbor block, a collocated block, a temporal block, and a default block corresponding to the current block;
[0036] at least one of a width, a height, a block size, and a block area of the current block;
[0037] a candidate block determined or obtained by a candidate motion vector or a candidate block vector of the current block;
[0038] a partition mode of the current block.
[0039] The application further provides a processing device, comprising a memory and a processor, wherein the memory stores a processing program, and the processing program, when executed by the processor, implements the steps of any of the processing methods.
[0040] The application further provides a storage medium, wherein the storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of any of the processing methods.
[0041] As described above, the processing method of the application can be applied to a processing device, and the prediction mode of at least one partition of a current block is determined or obtained according to at least one reference region of the current block. Through the technical solution of the application, a suitable prediction mode can be matched for at least one partition of the current block, thereby supporting the improvement of the prediction accuracy of a local region (for example, a region corresponding to a partition) of the current block. BRIEF DESCRIPTION OF DRAWINGS
[0042] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application. In order to more clearly illustrate the technical solutions of the embodiments of the application, the drawings needed to be used in the embodiment description will be briefly introduced as follows. Obviously, for those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative work.
[0043] FIG. 1 is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the application;
[0044] FIG. 2 is a schematic diagram of a communication network system architecture provided by an embodiment of the application;
[0045] FIG. 3 is a schematic diagram of the hardware structure of a controller 140 provided by the application;
[0046] FIG. 4 is a schematic diagram of the hardware structure of a network node 150 provided by the application;
[0047] Fig. 5 is a flow diagram of a processing method according to the first embodiment;
[0048] Fig. 6 is a diagram of a division mode not applicable to the embodiments of the present application according to the first embodiment;
[0049] Fig. 7 is a diagram of a division mode applicable to the embodiments of the present application according to the first embodiment;
[0050] Fig. 8 is a diagram of an encoding process of an encoder in the image processing method according to the first embodiment;
[0051] Fig. 9 is a diagram of a decoding process of a decoder in the image processing method according to the first embodiment;
[0052] Fig. 10 is a diagram of division of a reference region according to the second embodiment;
[0053] Fig. 11 is a diagram of first weight information corresponding to a partition according to the second embodiment;
[0054] Fig. 12 is a diagram of first weight information corresponding to another partition according to the second embodiment;
[0055] Fig. 13 is a diagram of a reference region in a DIMD mode in the processing method according to the second embodiment;
[0056] Fig. 14 is a diagram of gradient amplitude in the processing method according to the second embodiment;
[0057] Fig. 15 is a diagram of a processing module of a processing device.
[0058] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. The above-described drawings have shown the specific embodiments of the present application, and will be described in more detail hereinafter. These drawings and the written description are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0059] The exemplary embodiments will be described in detail herein with reference to the accompanying drawings. The following description is presented with reference to the drawings, in which a similar reference number is used throughout to designate similar components in the various drawings in which: The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of apparatuses and methods consistent with some aspects of the present application as detailed in the appended claims.
[0060] It should be noted that, as used in this document, the terms "include," "includes," "including," "has," "have," "having," or the like, are used in the sense of "including" and not by way of rinse, such that a process, method, article, or apparatus that includes items does not include only those items but can include other items not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises a... " does not, without more limitations, foreclose the existence of additional identical elements in the process, method, article, or apparatus that includes the element. Components, features, and / or elements with identical names can have the same or different meanings depending on the context in which they are used.
[0061] It should be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a particular order or hierarchy among the information. These terms are used merely to distinguish one category of information from another. For example, a first information can be termed a second information, and similarly, a second information can be termed a first information without departing from the scope of this document. Depending on the context, the word "if' as used herein can be interpreted to mean "when" or "in response to determining" or "in response to a determination." Also, as used herein, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes," "including," "has," "have," "having," and / or the like, when used herein, specify the presence of stated features, steps, operations, elements, components, items, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, items, and / or groups thereof. As used herein, the term "or" as used herein, or "and / or," "including at least one of," and the like are taken in the inclusive sense, such that "A or B" means "A, B, or both A and B," and "A, B, or C" means "A, B, C, or any combination thereof." Only under circumstances where at least one of the items, functions, steps, or operations is inherently mutually exclusive is an exception to this definition presented.
[0062] It should be understood that, although the steps in the flowcharts in the embodiments of the present application are shown in sequence according to the arrows, the steps are not necessarily executed in sequence according to the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other sequences. Moreover, at least part of the steps in the figures can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be alternately executed with other steps or sub-steps or stages of other steps.
[0063] Depending on the context, the word "if" as used herein can be interpreted as meaning "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if it is determined" or "if (a stated condition or event) is detected" can be interpreted as meaning "when it is determined" or "in response to determining" or "when (a stated condition or event) is detected" or "in response to detecting (a stated condition or event)".
[0064] It should be noted that, in the present document, step codes such as S10 are used for the purpose of more clearly and briefly expressing the corresponding content, and do not constitute a substantial limitation in sequence.
[0065] It should be understood that the specific embodiments described herein are merely intended to explain the present application, and do not limit the present application.
[0066] In the following description, the suffixes such as "module", "part", or "unit" used for an element are merely intended for facilitating explanation of the present application, and do not have specific meaning by themselves. Thus, "module", "part", or "unit" can be mixedly used.
[0067] The processing device can be implemented in various forms, for example, the processing device described in the present application can include a processing device such as a mobile phone, a server, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and a fixed terminal such as a digital TV, a desktop computer.
[0068] In the following description, a mobile terminal will be exemplified, and those skilled in the art will understand that the configuration according to the embodiments of the present application can be applied to a terminal of a fixed type, except for elements particularly used for mobile purposes.
[0069] Referring to FIG. 1, a hardware structure of a mobile terminal to implement various embodiments of the present application can 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. It will be understood by those skilled in the art that the mobile terminal structure shown in FIG. 1 does not constitute a limitation on the mobile terminal, and the mobile terminal can include more or less components than those shown, or some components can be combined, or different components can be arranged.
[0070] The components of the mobile terminal will be described in detail below with reference to FIG. 1.
[0071] The RF unit 101 can be used for receiving and transmitting signals in an information or communication process. Specifically, the RF unit 101 receives downlink information from a base station and processes the received downlink information for the processor 110, and / or transmits uplink data to the base station. Typically, the RF unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the RF unit 101 can communicate with a network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution), 5G and 6G, etc.
[0072] The WiFi belongs to a short-range wireless transmission technology, and the mobile terminal can help the user to send and receive e-mails, browse web pages, and access streaming media, etc. through the WiFi module 102, which provides the user with wireless broadband Internet access. Although the WiFi module 102 is shown in FIG. 1, it is understood that it does not belong to the necessary components of the mobile terminal, and can be omitted as needed without changing the essence of the application.
[0073] The audio output unit 103 can convert audio data, which is received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109, into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, and the like. Also, the audio output unit 103 can provide audio output related to a particular function (e.g., call signal reception sound, message reception sound, etc.) performed by the mobile terminal 100. The audio output unit 103 can include a speaker, a buzzer, and the like.
[0074] The A / V input unit 104 receives audio or video signals. The A / V input unit 104 can include a graphic processor (GPU) 1041 and a microphone 1042. The graphic processor 1041 processes image data of a still picture or a video obtained by an image capture device (e.g., a camera) in a video call mode or an image call mode of the mobile terminal 100. Processed image frames can be displayed on the display unit 106. The image frames processed by the graphic processor 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 receives sound (audio data) in a phone call mode, a recording mode, a voice recognition mode, and the like via the microphone 1042, and can process the sound into audio data. Processed audio (voice) data can be converted into a format transmittable to a mobile communication base station in a phone call mode, and transmitted to the base station via the radio frequency unit 101. The microphone 1042 can implement various noise removal (or cancellation) algorithms for removing (or canceling) noise generated in the process of receiving and transmitting audio signals.
[0075] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. The light sensor includes an ambient light sensor and a proximity sensor, which can optionally adjust the brightness of the display panel 1061 according to the brightness of ambient light, and turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and detect the magnitude and direction of gravity when at rest, which can be used for applications such as identifying the posture of the mobile phone (such as switching between landscape and portrait screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, taps), and the like. As for the fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor and other sensors that can be configured on the mobile phone, they will not be described here.
[0076] The display unit 106 is configured to display information input by a user or information provided to the user. The display unit 106 can include a display panel 1061, which can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0077] The user input unit 107 can be configured to receive input digital or character information, and generate key signal input related to user settings and function control of the mobile terminal. The user input unit 107 can include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect user touch operations (such as user operations on or near the touch panel 1071 using a finger, a stylus, or any suitable object or accessory) and drive the corresponding connection device according to the pre-set program. The touch panel 1071 can include a touch detection device and a touch controller. The touch detection device detects the user's touch position and detects the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch coordinates, and sends it to the processor 110, and can receive commands from the processor 110 and execute them. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 can also include other input devices 1072. The other input devices 1072 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, on / off keys, etc.), trackballs, mice, joysticks, and the like, without limitation.
[0078] Optionally, the touch panel 1071 can cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or in the vicinity thereof, transmits to the processor 110 to determine the type of touch event, and then the processor 110 provides corresponding visual output on the display panel 1061 according to the type of touch event. Although in FIG. 1, the touch panel 1071 and the display panel 1061 are implemented as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, which is not limited here.
[0079] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100; for example, the external device can include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 can be used to receive input (e.g., data information, power, etc.) from the external device and to transmit the received input to one or more elements within the mobile terminal 100, or can be used to transmit data between the mobile terminal 100 and the external device.
[0080] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a storage program area and a storage data area, and optionally, the storage program area can store operating systems, application programs (such as sound play functions, image play functions, etc.) required by at least one function, etc.; the storage data area can store data (such as audio data, phone books, etc.) created according to the use of the mobile phone, etc. In addition, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.
[0081] The processor 110 is the control center of the mobile terminal, connects all parts of the mobile terminal through various interfaces and lines, executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the memory 109, and calling data stored in the memory 109, thereby overall monitoring the mobile terminal. The processor 110 can include one or more processing units; preferably, the processor 110 can integrate an application processor and a modem processor, and optionally, the application processor mainly processes operating systems, user interfaces and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 110.
[0082] The mobile terminal 100 can further include a power supply 111, such as a battery, for powering the various components of the mobile terminal 100. Preferably, the power supply 111 is logically connected to the processor 110 via a power management system, whereby the power management system enables management of charging, discharging, and power consumption management, among other functions.
[0083] Although not shown in FIG. 1, the mobile terminal 100 can further include a Bluetooth module, among other components, which will not be described herein.
[0084] In order to facilitate understanding of the embodiments of the present application, a communication network system based on which the mobile terminal of the present application is described as follows.
[0085] Referring to FIG. 2, FIG. 2 is a diagram illustrating an architecture of a communication network system according to an embodiment of the present application. The communication network system is a LTE system of the universal mobile telecommunications technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an operator's IP service 204, which are connected in sequence.
[0086] Optionally, the UE 201 can be the terminal 100 described above, which will not be described herein.
[0087] The E-UTRAN 202 includes an eNode B 2021 and other eNode Bs 2022. Optionally, the eNode B 2021 can be connected to the other eNode Bs 2022 via a backhaul (e.g., an X2 interface). The eNode B 2021 is connected to the EPC 203, and can provide access to the EPC 203 for the UE 201.
[0088] The EPC 203 can include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving Gate Way) 2034, a PGW (PDN Gate Way) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. Optionally, the MME 2031 is a control node for processing signaling between the UE 201 and the EPC 203, and provides bearer and connection management. The HSS 2032 is configured to provide some registers to manage functions such as a home location register (not shown in the figure), and stores some user-specific information about service features, data rates, and the like. All user data can be transmitted through the SGW 2034, the PGW 2035 can provide IP address allocation for the UE 201 and other functions, and the PCRF 2036 is a policy and charging control policy decision point for service data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function unit (not shown in the figure).
[0089] The IP service 204 can include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services, and the like.
[0090] Although the above describes the LTE system as an example, those skilled in the art should know that the present application is not only applicable to the LTE system, but also applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, 5G, and future new network systems (such as 6G), and the like, which are not limited here.
[0091] FIG. 3 is a schematic diagram of a hardware structure of a controller 140 provided by the present application. The controller 140 includes a memory 1401 and a processor 1402, the memory 1401 is configured to store program instructions, and the processor 1402 is configured to invoke the program instructions in the memory 1401 to execute the steps performed by the controller in the above method embodiment one, the implementation principles and beneficial effects are similar, and will not be described here.
[0092] Optionally, the above controller further includes a communication interface 1403, which can be connected with the processor 1402 through a bus 1404. The processor 1402 can control the communication interface 1403 to realize the functions of receiving and sending of the controller 140.
[0093] Fig. 4 is a schematic diagram of a hardware structure of a network node 150 according to an embodiment of the present application. The network node 150 comprises a memory 1501 and a processor 1502. The memory 1501 is configured to store program instructions. The processor 1502 is configured to invoke the program instructions stored in the memory 1501 to execute the steps performed by the first node in the method embodiment described above. The implementation principle and the beneficial effects are similar, and will not be described here again.
[0094] Optionally, the controller further comprises a communication interface 1503, which can be connected with the processor 1502 through the bus 1504. The processor 1502 can control the communication interface 1503 to realize the receiving and sending functions of the network node 150.
[0095] The integrated modules implemented in the form of software function modules described above can be stored in a computer readable storage medium. The software function modules described above are stored in a storage medium, and include a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute part of the steps of the method embodiments of the present application.
[0096] In the above embodiments, all or part of the embodiments can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part of the embodiments can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a storage medium or transferred from one storage medium to another storage medium, for example, the computer instructions can be transferred from one website site, computer, server or data center to another website site, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available media. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), optical medium (for example, DVD), or semiconductor medium (for example, solid state disk, SSD) and the like.
[0097] First embodiment
[0098] Referring to Fig. 5, Fig. 5 is a flowchart of a processing method according to the first embodiment. The processing method of the embodiment of the present application can be applied to a processing device, comprising the following steps S10:
[0099] Step S10, determining or obtaining a prediction mode of at least one partition of the current block according to the at least one reference region.
[0100] In the embodiment, the processing device can be a smart terminal such as a mobile phone, a computer, etc., or a server such as a local server or a cloud server. In the embodiment and the present application, the processing device is mainly illustrated as a smart terminal.
[0101] Optionally, the technical solution of the embodiment can be applied to the fields of image coding, video coding, hardware video coding, special circuit video coding, real-time video coding, etc.
[0102] Optionally, the processing device can obtain video image data from a video source, segment each frame of image in the video image data to obtain at least one image block, and determine an image block to be predicted in the at least one image block as the current block.
[0103] Optionally, in order to improve the prediction accuracy of the local region of the current block, at least one partition of the current block can be determined or obtained, for example, by dividing the current block to determine or obtain at least one partition of the current block, the at least one partition including a rectangular partition and / or a non-rectangular partition.
[0104] Optionally, the at least one partition of the current block is determined or obtained according to a division manner of the current block.
[0105] Optionally, the division manner of the current block is determined or obtained according to at least one geometric partitioning mode and / or an index obtained from a bitstream.
[0106] Optionally, the geometric partitioning mode (GPM) is a prediction mode adopted by a next-generation video compression standard (VVC) for the boundary part of a moving object in an image. The GPM mode can perform more fine division on the boundary of the moving object in the image, fit the division line and the boundary of the moving object, divide the edge code unit of the moving object into non-rectangular sub-code units (for example, partitions) for single-direction prediction, and thus obtain the prediction value of the entire code unit.
[0107] Optionally, the at least one partition of the current block is determined or obtained according to at least one geometric partitioning mode, and the at least one partition is a non-rectangular partition.
[0108] Optionally, the number of partitions determined or obtained according to the division manner of the current block can be 1, 2, 3, 4, etc., and the sizes of the partitions are the same or different.
[0109] Optionally, each partition determined or obtained according to the partitioning manner of the current block is adjacent to a reference region and / or a sub-reference region position in the reference region.
[0110] Referring to FIG. 6, the current block is divided into partitions A to D and the reference region of the current block is divided into sub-reference regions A to C according to the partitioning manner corresponding to the partitioning line, the partition A is adjacent to the sub-reference region A, the partition B is adjacent to the sub-reference region B, the partition C is adjacent to the sub-reference region C, and the partition D is not adjacent to the reference region and the sub-reference region, thus, the partitioning manner shown in FIG. 6 is not the partitioning manner indicated in the embodiments of the present application, but is not applicable to the embodiments of the present application.
[0111] Referring to FIG. 7, the current block is divided into partitions A to D and the reference region of the current block is divided into sub-reference regions A to C according to the partitioning manner corresponding to the partitioning line, the partition A is adjacent to the sub-reference region A, the partition B is adjacent to the sub-reference region B, the partition C is adjacent to the sub-reference region C, and the partition D is adjacent to the sub-reference region D, thus, the partitioning manner shown in FIG. 7 is the partitioning manner indicated in the embodiments of the present application, i.e., is applicable to the embodiments of the present application.
[0112] Optionally, the reference region is a region having a strong correlation with the current block and can be used for the prediction processing of the current block, and the partition is a part of the current block and inherits the position and partial characteristics of the current block in the image, thus, the prediction mode of at least one partition can be determined or obtained by using the common correlation between the current block and the reference region and the partition, and is used for the prediction processing of the at least one partition, and since the local region of the image usually has similar characteristics, the prediction mode of the partition can be determined by using the reference region of the current block, so that the local characteristics can be better used to obtain the prediction mode with higher adaptation to the partition, thereby improving the prediction accuracy.
[0113] Optionally, the reference region includes at least one of a reference pixel, a reference block and a reference template.
[0114] Optionally, the prediction mode of at least one partition determined or obtained includes at least one of an intra prediction mode, an inter prediction mode and an intra block copy prediction mode.
[0115] Optionally, the prediction mode of at least one partition determined or obtained can be one or more.
[0116] Optionally, if the current block includes multiple partitions, the prediction modes of the partitions can be different or at least partially the same.
[0117] Optionally, the intra prediction mode is to predict pixel values of the current block using intra-coded neighboring pixels (e.g., reconstructed pixels above, to the left, or above-left of the current block) of the same frame, without relying on other frames, the core idea of the intra prediction mode is to derive the texture or directional features of the current block from the neighboring pixels by spatial correlation.
[0118] Optionally, the intra prediction mode includes at least one of: an angular prediction mode, a non-angular prediction mode, and a derived mode.
[0119] Optionally, the inter prediction mode is to predict pixel values of the current block by motion compensation using a region in a reference frame (e.g., a previous or subsequent frame of the current frame to which the current block belongs), the core of the inter prediction mode is to indicate the matching position of the current block in the reference frame by a motion vector (MV).
[0120] Optionally, the intra block copy is a special form of the intra prediction mode that allows copying a pixel block from an already decoded region (e.g., a reconstructed part of the current frame to which the current block belongs) of the same frame to predict the current block, similar to “intra motion compensation”.
[0121] Optionally, the angular prediction mode is a technique for predicting a current pixel block by propagating the values of neighboring pixels along a specific direction to generate a prediction block, the angular prediction mode is mainly used to handle 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 prediction mode includes 33 angular 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 angular mode is extended to 65, and new directions are more intensive to more accurately capture edges in natural video.
[0122] Optionally, the non-angular prediction mode can be a prediction mode other than the angular prediction mode, for example, the non-angular prediction mode includes at least one of the following: a DC mode (direct current mode), a Planar mode (planar mode), a neural network-based prediction mode.
[0123] Optionally, the derivation mode is a mode used for deriving the intra prediction mode, and the derivation mode is a method of deriving the prediction mode matched by the current block by analyzing the related information of the current block. For example, the derivation mode includes at least one of the following: a decoder side intra mode derivation (DIMD) mode, an occurrence-based intra coding mode derivation (OBIC) mode, and a template-based intra mode derivation (TIMD) mode.
[0124] Optionally, the processing method of the embodiments of the present application can be an improved DIMD mode. The gradient histogram of at least one partition of the current block is determined or obtained according to the gradient information of at least one reference region. The prediction mode of at least one partition is determined or obtained according to the gradient histogram of at least one partition.
[0125] Optionally, the processing method further includes the following mode A1 and / or mode A2:
[0126] Mode A1, the prediction result of the current block is determined or obtained according to the prediction result of at least one partition.
[0127] Optionally, the prediction result of at least one partition is determined or obtained by performing prediction processing on at least one partition according to the prediction mode of at least one partition. The prediction result of the current block is determined or obtained according to the prediction result of at least one partition.
[0128] Optionally, the target prediction result of at least one partition is determined or obtained by performing prediction processing on at least one partition according to at least one prediction mode of at least one partition. The target prediction result of at least one partition is determined or obtained according to at least one prediction result of at least one partition. The prediction result of the current block is determined or obtained according to the target prediction result of at least one partition.
[0129] Optionally, the target prediction result of at least one partition can be determined or obtained by performing fusion processing on at least one prediction result of at least one partition. The fusion processing can include weighted fusion. By fusion, the advantages of different prediction modes can be combined to improve the prediction accuracy.
[0130] Optionally, the prediction result of at least one partition includes the prediction value of the pixel corresponding to at least one partition.
[0131] Optionally, the prediction result of at least one partition includes the prediction value of the pixel corresponding to at least one partition, which means that the prediction result of at least one partition only contains the pixel values actually covered by it, and the uncovered area can be invalid value (for example, filled with 0 or undefined).
[0132] Optionally, in the case that the prediction result of at least one partition includes the prediction value of the corresponding pixel of the at least one partition, the prediction result of the at least one partition can be directly spliced to determine or obtain the prediction result of the current block.
[0133] Optionally, in the case that the prediction result of at least one partition includes the prediction value of the corresponding pixel of the at least one partition, the prediction result of the at least one partition can be directly spliced, and the boundary after splicing can be fused to determine or obtain the prediction result of the current block.
[0134] Optionally, the prediction result of at least one partition can be fused by weighted processing according to the first fusion weight to determine or obtain the prediction result of the current block.
[0135] Optionally, the first fusion weight can include at least one of a weight coefficient, a weight vector and a weight matrix.
[0136] Optionally, the weight coefficient can be a scalar value, which can represent the weight of a single prediction result. For example, the prediction result of a partition includes result P1 and result P2, and the corresponding weight coefficients of result P1 and result P2 are W1 and W2 respectively, and then the prediction block P0 of the current block determined or obtained can be represented as: P0=W1×P1+W2×P2.
[0137] Optionally, the weight vector can be a one-dimensional array containing multiple weight coefficients, each coefficient corresponding to the prediction result of a partition. For example, the prediction result of a partition includes result P1, result P2 and result P3, and the corresponding weight vector is w=[W1, W2, W3], and then the prediction block P0 of the current block determined or obtained can be represented as:
[0138] Optionally, the weight matrix can be a two-dimensional array, and each element in the weight matrix represents the weight coefficient of a specific position pixel, which is usually the same size as the current block. For example, the prediction result of a partition includes result P1 and result P2, and result P1 and result P2 both include the prediction value of each pixel of the current block. The weight matrix W[i,j,k] represents the weight of the i-th row and i-th column pixel point on the k-th result (k=1 or 2), and then each pixel of the prediction block P0 of the current block determined or obtained can be represented as: P0[i,j]=W[i,j,1]×P1[i,j]+W[i,j,2]×P2[i,j]+c;
[0139] Optionally, c is a bias term, and c is equal to 0.
[0140] Optionally, if the prediction result of N partitions is included, the value of k is 1-N, and i, j are integers greater than 0.
[0141] Optionally, the first fusion weight can be determined or obtained according to a partition manner of the current block.
[0142] Optionally, the first fusion weight of the current block is pre-configured in a storage unit of the encoder and / or the decoder.
[0143] Optionally, the first fusion weight corresponds to pixels in at least one partition of the current block, and a weight value of the first fusion weight is determined according to a distance between the pixels in the at least one partition and a partition line adjacent to the at least one partition.
[0144] Optionally, the first fusion weight includes a weight associated with the at least one partition and / or a prediction result of the at least one partition, for example, the current block includes a first partition and a second partition, the first fusion weight includes a weight 1 associated with the first partition and / or a prediction result of the first partition, and a weight 2 associated with the second partition and / or a prediction result of the second partition, a sum of the weight 1 and the weight 2 is a preset threshold, and the preset threshold is 1, 8, 16, or other numbers that are multiples of 2.
[0145] In this embodiment, the prediction result of the at least one partition is determined or obtained according to the suitable prediction mode matched for the at least one partition of the current block, so as to improve the prediction accuracy of a local region (for example, a region corresponding to a partition) of the current block, and then the prediction result of the current block is determined or obtained according to the prediction result of the at least one partition, thereby supporting to improve the prediction accuracy of the current block.
[0146] Optionally, the prediction result of the current block is determined or obtained according to the prediction mode of the at least one partition and the partition manner of the current block.
[0147] Optionally, the at least one first prediction result of the current block is determined or obtained according to the prediction mode of the at least one partition, the second fusion weight is determined or obtained according to the partition manner of the current block, and the prediction result of the current block is determined or obtained according to the at least one first prediction result and the second fusion weight.
[0148] Optionally, the second fusion weight can include at least one of a weight coefficient, a weight vector, and a weight matrix.
[0149] Optionally, the weight coefficient can be a scalar value, which can represent a weight of a single prediction result, for example, the first prediction result includes a result P a and a result P b , and the respective weight coefficients of the result P a and the result P b are W a and W b, and the determined or obtained prediction block P0 of the current block can be represented as: P0=W a ×P a +W b ×P b .
[0150] Optionally, the weight vector can be a one-dimensional array, and the weight vector includes a plurality of weight coefficients, and each weight coefficient corresponds to a first prediction result. For example, the first prediction results include a result P a , a result P b , and a result P c , and the corresponding weight vector is w=[W a , W b , W c ], and the determined or obtained prediction block P0 of the current block can be represented as:
[0151] Optionally, the weight matrix can be a two-dimensional array, and each element in the weight matrix represents a weight coefficient of a pixel at a specific position, and the weight matrix is usually the same size as the current block. For example, the first prediction results include a result P a and a result P b , and the results P a and P b each include a prediction value corresponding to each pixel of the current block, and the weight matrix W[i,j,k] represents the weight of the pixel at the i-th row and the i-th column on the k-th result (k=a or b), and each pixel of the determined or obtained prediction block P0 of the current block can be represented as: P0[i,j]=W[i,j,a]×P a [i,j]+W[i,j,b]×P b [i,j]+c.
[0152] Optionally, c is a bias term, and optionally, c is equal to 0.
[0153] Optionally, if the N first prediction results are included, the value of k is 1-N, and i and j are integers greater than 0.
[0154] Optionally, the second fusion weight is determined or obtained according to a division manner of the current block, and the second fusion weight is the same as or different from the first fusion weight.
[0155] Optionally, the second fusion weight includes a weight associated with at least one first prediction result. For example, the first prediction results include a result A and a result B, the second fusion weight includes a weight A associated with the result A and a weight B associated with the result B, and the sum of the weight A and the weight B is a preset threshold. The preset threshold can be 1, 8, 16, or other multiples of 2.
[0156] In the embodiment, the current block is predicted according to the suitable prediction mode matched for at least one partition of the current block, at least one first prediction result of the current block is determined or obtained, since the accuracy of the at least one first prediction result for the corresponding part of the partition in the current block associated with the at least one first prediction result is higher, the second fusion weight determined or obtained by the division mode of the current block is used to fuse the at least one first prediction result, and the prediction result of the current block is determined or obtained, thereby supporting to improve the prediction accuracy of the current block.
[0157] Referring to FIG. 8, when the processing device is an encoder at the encoding side, the encoder can receive video source input video data, such as the encoder receiving video images from a video source, determining a to-be-predicted image in the video images, dividing the to-be-predicted image into at least one image block, performing prediction processing on each of the at least one image block by using the temporal and / or spatial correlation between the video images, including intra prediction processing and / or inter prediction processing, and the intra prediction processing and / or the inter prediction processing includes derivation 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, calculating the rate-distortion cost corresponding to each prediction mode or the rate-distortion cost of the combination of several prediction modes, to determine the minimum rate-distortion cost from the at least one rate-distortion cost, and the prediction mode corresponding to the minimum rate-distortion cost or the combination of the prediction modes is the prediction mode finally adopted by the image block, and the prediction mode of at least one partition of the current block can be determined or obtained according to at least one reference region.
[0158] Optionally, after the prediction mode of at least one partition of the current block is determined or obtained, the at least one partition and / or the current block are predicted by using the at least one prediction mode, and a prediction block (i.e., a prediction result) of the to-be-predicted image block is determined or obtained.
[0159] Optionally, a residual block between the prediction block and the current block can be calculated, the residual block can be subjected to transformation and quantization processing, and then encoded by an entropy encoder to form an encoded bitstream.
[0160] Optionally, the prediction parameters corresponding to the determined prediction mode and the related side information can be included in the encoded bitstream.
[0161] Optionally, the prediction parameters are packaged into the encoded bitstream after being subjected to entropy encoding.
[0162] Optionally, the prediction parameters include indication information of the prediction mode.
[0163] Optionally, the transformed quantized residual block can be added to corresponding prediction data (e.g., a prediction block) obtained using the prediction mode after inverse quantization and inverse transformation to obtain a reconstructed block. After obtaining the reconstructed block, the loop filter module performs loop filtering on the reconstructed block according to the filter control parameter to reduce distortion.
[0164] Optionally, the reconstructed block after the loop filtering is stored in the coded picture buffer.
[0165] Referring to FIG. 9, when the processing device is a decoder, after receiving the coded bitstream, the entropy decoding unit of the decoder parses and decodes the coded bitstream to obtain the transform coefficients. The inverse transform unit and the inverse quantization unit of the decoder perform inverse transform and inverse quantization on the transform coefficients to obtain the residual block.
[0166] Optionally, the entropy decoding unit of the decoder parses and decodes the coded bitstream to obtain prediction data, such as prediction parameters and related auxiliary information.
[0167] Optionally, the prediction processing unit of the decoder performs prediction processing using the prediction parameters to determine a prediction block corresponding to the residual block.
[0168] Optionally, the prediction processing includes intra prediction processing and / or inter prediction processing, and the intra prediction processing and / or the inter prediction processing includes at least one derivation mode and / or at least one prediction mode in a combined manner.
[0169] Optionally, the processing method includes determining or obtaining a prediction mode of at least one partition of the current block according to at least one reference region.
[0170] Optionally, the prediction processing is performed on the to-be-predicted image block and / or the at least one partition according to the at least one prediction mode to determine or obtain a prediction block of the to-be-predicted image block. The obtained residual block and the corresponding prediction block (including a prediction luma block and a prediction chroma block) are added to obtain a reconstructed block. The loop filter unit of the decoder performs loop filtering on the reconstructed block to reduce distortion and improve video quality.
[0171] Optionally, the processing method further includes that the reconstructed block after the loop filtering is further combined into a decoded image and stored in a decoded picture buffer or output as a decoded video signal.
[0172] Optionally, when the processing device is an encoder, the initially obtained prediction value can be a prediction value obtained in a corresponding prediction mode, which can be directly used in the rate-distortion cost process.
[0173] Optionally, when the processing device is a decoder, the prediction value obtained initially can be a prediction value obtained in a prediction mode corresponding to a to-be-predicted block (i.e., an image block at a decoding end) indicated by a syntax element parsed from the bitstream.
[0174] Optionally, the target image block can be a prediction block, and a residual block between the target image block and the current block can be calculated, and then the residual block can be processed by transformation and quantization, and encoded by an entropy encoder to form an encoded bitstream. The prediction block can also be processed by other models, and the image block processed by the other models can be taken as the target image block, and the step of calculating the residual block between the target image block and the current block can be performed.
[0175] In this embodiment, a suitable prediction mode can be matched for at least one partition of the current block according to at least one reference region of the current block, and the at least one partition can independently select the matched prediction mode, thereby avoiding the limitation of a global unified mode of the current block, and thereby supporting improvement of prediction accuracy of a local region (e.g., a region corresponding to a partition) of the current block, and thereby supporting improvement of prediction accuracy of the current block determined or obtained based on a prediction result of the local region.
[0176] Second embodiment
[0177] Based on the first embodiment, the second embodiment is provided.
[0178] In this embodiment, the prediction mode of the at least one partition is determined or obtained according to at least one of the following modes one to five:
[0179] Mode one, a sub-reference region;
[0180] Optionally, the step S10 includes: determining or obtaining the prediction mode of the at least one partition according to the sub-reference region.
[0181] Optionally, the prediction mode of the at least one partition is determined or obtained according to a sub-reference region in the at least one reference region.
[0182] Optionally, the sub-reference region is at least part of the at least one reference region of the current block, and the sub-reference region is related to the at least one partition of the current block, for example, the current block includes a partition A and a partition B, and the reference region of the current block includes a sub-reference region A and a sub-reference region B, the sub-reference region A is related to the partition A, and the sub-reference region B is related to the partition B.
[0183] Optionally, the sub-reference region related to the at least one partition includes one or more.
[0184] Optionally, the sub-reference region associated with one partition of the current block does not overlap with the sub-reference region associated with other partitions of the current block. The non-overlapping can be that the sub-reference region associated with one partition contains different pixels from the sub-reference region associated with other partitions, or there is no common pixel. For example, each pixel in the reference region of the current block is only classified into a single sub-reference region associated with one partition.
[0185] Referring to FIG. 10, the current block includes two partitions: partition A and partition B, and the sub-reference region includes one sub-reference region A and two sub-reference regions B. The partition A is associated with the sub-reference region A, and the partition B is associated with the two sub-reference regions B. The sub-reference region A and the two sub-reference regions B do not overlap.
[0186] Optionally, the sub-reference region can focus on the local content related to at least one partition in the reference region, and / or eliminate the background or interference region unrelated to at least one partition in the reference region, so that the sub-reference region has stronger correlation with the partition than the reference region of the current block, thereby being able to match a more suitable prediction mode for at least one partition, and improving the prediction accuracy of the local region of the current block.
[0187] Optionally, the sub-reference region is determined or obtained according to the division manner of the current block. Optionally, the division manner of the current block is determined or obtained according to at least one geometric division mode and / or an index obtained from a bitstream.
[0188] Optionally, in one division manner, the current block has only one split line.
[0189] Optionally, at least one sub-reference region is determined or obtained by dividing at least one reference region of the current block according to the split line corresponding to the division manner of the current block.
[0190] Optionally, the split line of the reference region is determined or obtained according to the split line corresponding to the division manner of the current block, and at least one sub-reference region is determined or obtained by dividing at least one reference region of the current block according to the split line of the reference region.
[0191] Optionally, the split line of the reference region is determined or obtained by extending the split line corresponding to the division manner of the current block.
[0192] Optionally, at least one partition and at least one sub-reference region associated with the at least one partition are determined or obtained according to the division manner of the current block.
[0193] Optionally, in the reference region, the pixels on the split line do not belong to any sub-reference region of the reference region.
[0194] Optionally, if the current block includes two partitions, each of the two partitions and its associated sub-reference region are located on the same side of the partition line corresponding to the partition manner of the current block.
[0195] Optionally, the at least one partition-related sub-reference region includes one or more.
[0196] Optionally, if the current block includes two partitions, each of the at least one partition of the two partitions and its associated one or more sub-reference regions are located on the same side of the partition line corresponding to the partition manner of the current block.
[0197] Optionally, if the current block includes two partitions, the sub-reference regions corresponding to the first partition of the at least one partition of the two partitions are located on one side of the partition line corresponding to the partition manner of the current block, and the sub-reference regions corresponding to the second partition of the at least one partition of the two partitions are located on the other side of the partition line corresponding to the partition manner of the current block.
[0198] Referring to FIG. 10, determining or obtaining a partition line according to the partition manner of the current block, dividing the current block into two partitions, including a partition A and a partition B, according to the partition line, dividing the reference region of the current block into a plurality of sub-reference regions, including one sub-reference region A and two sub-reference regions B, and the partition A and its associated sub-reference region A are located on one side of the partition line (for example, the upper left of the partition line), and the partition B and its associated two sub-reference regions B are located on the other side of the partition line (for example, the lower right of the partition line).
[0199] Optionally, determining or obtaining a partition gradient histogram corresponding to the at least one partition according to the gradient information of the at least one partition-related sub-reference region, and determining or obtaining a prediction mode of the at least one partition according to the partition gradient histogram.
[0200] In this embodiment, the partition gradient histogram related to the at least one partition can be obtained through the gradient information of the sub-reference region, and the partition gradient histogram can reflect the texture directionality of the partition, thereby matching a suitable prediction mode for the partition.
[0201] Optionally, the gradient information includes a gradient direction and / or a gradient amplitude, the gradient direction represents a direction in which a gray value changes most quickly at a certain pixel point in an image (for example, the at least one reference region), that is, a direction perpendicular to an edge, and the gradient amplitude represents an intensity of the gray value change at the pixel point, that is, a degree of significance of the edge.
[0202] Optionally, determining or obtaining the gradient information of the sub-reference region according to at least one gradient operator and the at least one partition-related sub-reference region.
[0203] Optionally, the gradient operator is a tool and / or method for determining or obtaining at least one gradient information, which is capable of extracting gradient information from an image through convolution operation or other mathematical operation, and the gradient information optionally includes gradient direction and / or gradient magnitude.
[0204] Optionally, the at least one gradient operator includes at least one pair of mutually perpendicular gradient operators.
[0205] Optionally, the first pair of mutually perpendicular gradient operators includes a 0° gradient operator and a 90° gradient operator, and the horizontal gradient Gx and the vertical gradient Gy can be calculated using a 3x3 horizontal (0°) Sobel operator and a vertical (90°) Sobel operator, for example, the horizontal (0°) gradient Gx and the vertical (90°) gradient Gy of a pixel x4 in a pixel line can be calculated according to the following formula (I) and formula (II).
[0206] Optionally, A can be a matrix composed of 9 pixels, i.e., the pixel x4 as the center, the pixel x1 above the pixel x4, the pixel x3 to the left of the pixel x4, the pixel x7 below the pixel x4, the pixel x5 to the right of the pixel x4, the pixel x0 above and to the left of the pixel x4, the pixel x6 below and to the left of the pixel x4, the pixel x2 above and to the right of the pixel x4, and the pixel x8 below and to the right of the pixel x4, as shown in the following formula (III).
[0207] Optionally, the G gradient magnitude value is the sum of the absolute values of the horizontal gradient and the vertical gradient, and the calculation formula is shown in the following formula (IV): G = |Gx| + |Gy| Formula (IV).
[0208] Optionally, the gradient direction of the pixel can be calculated by arctan(Gx / Gy) or arctan(Gy / Gx).
[0209] Optionally, the gradient information of the sub-reference region includes gradient information of each pixel in the sub-reference region, and the gradient information of the pixel is the gradient direction and / or gradient magnitude of each pixel in the reference region, which reflects the local change characteristics of the pixel.
[0210] Optionally, the gradient information of the sub-reference region includes overall gradient information of the sub-reference region, and the overall gradient information is the statistical and / or aggregated gradient information of all pixels in the sub-reference region, which reflects the global change trend of the region.
[0211] Optionally, the gradient information of the sub-reference region includes the gradient information of the pixel and / or the overall gradient information.
[0212] Optionally, the gradient information of the pixel includes a first pixel gradient component, a second pixel gradient component, a pixel gradient direction, and / or a pixel gradient magnitude.
[0213] Optionally, the gradient information of at least one pixel in the sub-reference region is determined or obtained according to at least one pair of mutually perpendicular gradient operators, the at least one pair of mutually perpendicular gradient operators comprising a first gradient operator (e.g., a horizontal gradient operator Gx) and a second gradient operator (e.g., a vertical gradient operator Gy) corresponding to different directions, a value determined or obtained according to the first gradient operator being a first pixel gradient component (e.g., a value of Gx), and a value determined or obtained according to the second gradient operator being a second pixel gradient component (e.g., a value of Gy).
[0214] Optionally, the pixel gradient direction and / or the pixel gradient magnitude are determined or obtained according to the first pixel gradient component and the second pixel gradient component.
[0215] Optionally, the gradient information comprises a first gradient component (e.g., the first pixel gradient component and / or the first overall gradient component), a second gradient component (e.g., the second pixel gradient component and / or the second overall gradient component), a gradient direction (e.g., the pixel gradient direction and / or the overall gradient direction), and / or a gradient magnitude (e.g., the pixel gradient magnitude and / or the overall gradient magnitude).
[0216] Optionally, the overall gradient information comprises a first overall gradient component, a second overall gradient component, an overall gradient direction, and / or an overall gradient magnitude.
[0217] Optionally, the manner of determining or obtaining the overall gradient information of the sub-reference region comprises determining or obtaining gradient information of at least one pixel in the sub-reference region, the gradient information of the at least one pixel comprising a first pixel gradient component and a second pixel gradient component, determining or obtaining the first overall gradient component according to a sum of the first pixel gradient components corresponding to the sub-reference region, determining or obtaining the second overall gradient component according to a sum of the second pixel gradient components corresponding to the sub-reference region, determining or obtaining the overall gradient magnitude according to a sum of absolute values of the first overall gradient component and the second overall gradient component, and determining or obtaining the overall gradient direction according to the first overall gradient component and the second overall gradient component.
[0218] Optionally, the direct summation in the above manner can preserve the directional statistical characteristics, and the result after the synthesis can represent the overall gradient vector.
[0219] Optionally, the gradient information of at least one pixel in the sub-reference region is determined or obtained, comprising a first pixel gradient component (Gx1, Gx2,..., Gx n ) and a second pixel gradient component (Gy1, Gy2,..., Gy n ), the first overall gradient component being determined or obtained according to a sum of the first pixel gradient components corresponding to the sub-reference region, i.e., Gx sum =Gx1+Gx2+...+Gx n, the second overall gradient component Gy is determined or obtained according to the sum of the second pixel gradient components corresponding to the sub-reference region sum = Gy1 + Gy2 +... + Gy n , the overall gradient amplitude AMP is determined or obtained according to the sum of the absolute values of the first overall gradient component and the second overall gradient component sum , that is, the overall gradient amplitude AMP sum = |Gx sum | + |Gy sum |, and the overall gradient direction is calculated by arctan (Gx sum / Gy sum ) or arctan (Gy sum / Gx sum ).
[0220] Optionally, the determination or obtaining manner of the overall gradient information of the sub-reference region comprises: determining or obtaining the gradient information of at least one pixel in the sub-reference region, including: the first pixel gradient component, the second pixel gradient component, the pixel gradient direction and the pixel gradient amplitude, determining or obtaining the overall gradient amplitude according to the sum of the absolute values of the first pixel gradient component and the second pixel gradient component corresponding to the sub-reference region, and / or the number of corresponding pixel gradient amplitudes that are non-zero in the pixel gradient direction of the sub-reference region, determining or obtaining the first overall gradient component according to the sum of the first pixel gradient components corresponding to the sub-reference region, determining or obtaining the second overall gradient component according to the sum of the second pixel gradient components corresponding to the sub-reference region, and determining or obtaining the overall gradient direction according to the first overall gradient component and the second overall gradient component.
[0221] Optionally, the determination or obtaining manner of the gradient information of at least one pixel in the sub-reference region comprises: the first pixel gradient component (Gx1, Gx2,... Gxn) and the second pixel gradient component (Gy1, Gy2,... Gyn), the pixel gradient direction and the pixel gradient amplitude, the overall gradient amplitude AMP is determined or obtained according to the sum of the absolute values of the first pixel gradient component and the second pixel gradient component corresponding to the sub-reference region, and the number of corresponding pixel gradient amplitudes that are non-zero in the pixel gradient direction of the sub-reference region, that is, the overall gradient amplitude AMP sum = |Gx1| + |Gx2| +... + |Gx n | + |Gy1| + |Gy2| +... + |Gy n |, or the overall gradient amplitude AMP sum = (|Gx1| + |Gx2| +... + |Gx n | + |Gy1| + |Gy2| +... + |Gy nGx1+Gx2+...+Gx
[0222] Gy1+Gy2+...+Gy sum Gx1+Gx2+...+Gx n Gy1+Gy2+...+Gy sum Gx1+Gx2+...+Gx n Gy1+Gy2+...+Gy sum Gx1+Gx2+...+Gx sum Gy1+Gy2+...+Gy sum Gx1+Gx2+...+Gx sum Gy1+Gy2+...+Gy
[0223] Optionally, the average of the absolute values can be obtained by the above-mentioned manner, which can resist direction interference and stably measure gradient strength.
[0224] Optionally, in the case of determining or obtaining the overall gradient information of the sub-reference region according to the sum of the absolute values of the first pixel gradient component and the second pixel gradient component corresponding to the sub-reference region, if the overall gradient information is directly fused with the gradient information of the pixel corresponding to the sub-reference region, the overall gradient amplitude corresponding to the overall gradient information in the partition gradient histogram to be determined or obtained will be the maximum amplitude in the histogram, thereby interfering with the selection of the prediction mode of the partition. To avoid the influence of the overall gradient amplitude information, the partition gradient histogram can be determined or obtained according to the overall gradient information, the weight information corresponding to the overall gradient amplitude and the gradient information of at least one pixel of the sub-reference region, thereby ensuring fair competition of the gradient information, balancing the consistency requirements of the strength and the direction, and / or determining the prediction mode corresponding to the overall gradient direction in the overall gradient information as mode 1, determining or obtaining the partition gradient histogram according to the gradient information of at least one pixel of the sub-reference region, determining or obtaining at least one mode 2 according to the partition gradient histogram, and determining mode 1 and the at least one mode 2 as the prediction modes of the partition.
[0225] Optionally, the overall gradient information includes the overall gradient direction and the overall gradient amplitude, the partition gradient histogram 1 is determined or obtained according to the gradient information of at least one pixel corresponding to the sub-reference region, the gradient amplitude corresponding to the same direction as the overall gradient direction in the partition gradient histogram 1 is replaced with the overall gradient amplitude, the partition gradient histogram 2 is determined or obtained, and at least one prediction mode is determined or obtained according to the partition gradient histogram 2.
[0226] Optionally, the prediction modes include: a prediction mode corresponding to the overall gradient information, a prediction mode determined or obtained according to the partition gradient histogram, and / or a non-angular prediction mode.
[0227] Optionally, in the case that the prediction mode determined or obtained according to the partition gradient histogram includes the prediction mode corresponding to the overall gradient information, the weight information corresponding to the at least one prediction mode is determined or obtained according to the weight information corresponding to the prediction mode corresponding to the overall gradient information, and the prediction modes include: the prediction mode corresponding to the overall gradient information, the prediction mode determined or obtained according to the partition gradient histogram, and / or the non-angular prediction mode.
[0228] Optionally, in the case that a certain prediction mode is determined as a partitioned prediction mode, the weight information corresponding to the prediction mode when it is used as a prediction mode can be determined or obtained according to the weight information corresponding to the prediction mode.
[0229] Optionally, in the case that a certain prediction mode is determined as a partitioned prediction mode, the weight information corresponding to the prediction mode when it is used as a prediction mode is determined as the weight information corresponding to the prediction mode.
[0230] Optionally, the weight information corresponding to a prediction mode can be the same as or different from the weight information corresponding to the prediction mode when it is determined as a prediction mode.
[0231] Optionally, the prediction mode determined or obtained according to the partition gradient histogram determined or obtained according to the gradient information of at least one pixel in the sub-reference region includes: mode a1, mode a2, and mode a3, the respective weights of mode a1, mode a2, and mode a3 can be determined according to the sum of the respective gradient magnitudes in the partition gradient histogram, for example, the weight value of mode a1 is 0.4, the weight value of mode a2 is 0.3, and the weight value of mode a3 is 0.3 according to the sum of the respective gradient magnitudes in the partition gradient histogram, and mode a1 is the prediction mode corresponding to the overall gradient information, the weight values of mode a2 and mode a3 are adjusted according to the weight value of mode a1, for example, since the prediction mode corresponding to the overall gradient information is used as a prediction mode by default, the weight value of mode a1 is modified from the weight value determined according to the sum of the respective gradient magnitudes in the partition gradient histogram to a fixed weight value corresponding to the overall gradient information, the value of the fixed weight value is a preset value, and the respective weights of mode a2 and mode a3 are determined according to the fixed weight value and the sum of the gradient magnitudes of mode a2 and mode a3 in the partition gradient histogram, for example, if the fixed weight value is 0.6, the sum of the gradient magnitudes of mode a2 is 50, and the sum of the gradient magnitudes of mode a3 is 50, the weight of mode a2 is 0.2, and the weight of mode a3 is 0.2.
[0232] Optionally, the prediction modes include a prediction mode determined or obtained according to a partitioned gradient histogram and a planar mode, the prediction mode determined or obtained according to the partitioned gradient histogram includes a prediction mode corresponding to the overall gradient information, in this embodiment, the prediction mode determined or obtained according to the partitioned gradient histogram determined or obtained according to the gradient information of at least one pixel in the sub-reference region includes a mode a1, a mode a2 and a mode a3, the mode a1 is the prediction mode corresponding to the overall gradient information, a fixed weight is used for the prediction mode corresponding to the overall gradient information, for example, the fixed weight is equal to 0.2, the planar mode uses a fixed weight 0.3, the weight of the mode a2 and the mode a3 is determined by the sum of the gradient amplitude values corresponding to the mode a2 and the mode a3 in the partitioned gradient histogram, if the sum of the gradient amplitude values of the mode a2 is 20, the sum of the gradient amplitude values of the mode a3 is 30, the weight corresponding to the mode a2 is 0.2, the weight corresponding to the mode a3 is 0.3, the weight of the mode a2 can be determined according to formula (five); W a2 a2 a1 -W planar a1 a2 *(AMP a2 a2 a3 / (AMP a1 a2 a2 +AMP a3 a3 ); Formula (five);
[0233] Wa2 is the weight of the mode a2, W a1 a1 is the weight of the mode a1, AMP a2 a2 is the sum of the gradient amplitude values of the mode a2, AMP a3 a3 is the sum of the gradient amplitude values of the mode a3.
[0234] The weight of the mode a3 can be determined according to formula (six); W a3 a2 a1 -W planar a1 a3 *(AMP a2 a3 / (AMP a3 a2 +AMP a1 a3 ); Formula (six);
[0235] Wa2 is the weight of the mode a2, W a1 a1 is the weight of the mode a1, AMP a2 a2 is the sum of the gradient amplitude values of the mode a2, AMP a3 a3 is the sum of the gradient amplitude values of the mode a3.
[0236] Optionally, the prediction modes include a prediction mode determined or obtained according to the partition gradient histogram and a planar mode, the prediction mode determined or obtained according to the partition gradient histogram does not include a prediction mode corresponding to the overall gradient information, in this embodiment, a fixed weight is used for the prediction mode corresponding to the overall gradient information, for example, the fixed weight is equal to 0.2, a fixed weight 0.3 is used for the planar mode, on this basis, the weight of mode a2 and mode a3 is determined by the sum of the gradient amplitudes corresponding to mode a2 and mode a3 in the partition gradient histogram, if the sum of the gradient amplitudes corresponding to mode a2 is 20, the sum of the gradient amplitudes corresponding to mode a3 is 30, the weight corresponding to mode a2 is 0.2, and the weight corresponding to mode a3 is 0.3, optionally, the weight corresponding to mode a2 and mode a3 can be determined or obtained by the above formula (five) and formula (six).
[0237] In this embodiment, by combining the gradient information of the pixels and / or the overall gradient information, the determined or obtained partition gradient histogram can take into account both local details and global structure, and then at least one prediction mode determined or obtained based on the partition gradient histogram can be consistent with the content of the partition, thereby improving the prediction accuracy of the prediction mode determined or obtained based on the prediction mode for the partition.
[0238] Optionally, if the first partition of the current block uses an intra prediction mode, a partition gradient histogram is established according to the gradient information of the sub-reference region associated with the first partition, and is used to determine the intra prediction mode of the first partition, and / or if the second partition of the current block uses an inter prediction mode or an intra block copy prediction mode, no partition gradient histogram is constructed.
[0239] Optionally, the adjusted first gradient information of the pixels in the sub-reference region is determined or obtained according to the gradient information of the pixels in the sub-reference region related to at least one partition and second weight information, the gradient histogram of the sub-reference region related to at least one partition is determined or obtained according to the adjusted first gradient information of the pixels in the sub-reference region, and the prediction mode of at least one partition is determined or obtained according to the gradient histogram of the sub-reference region related to at least one partition.
[0240] Optionally, the second weight information corresponds to the pixels in the sub-reference region, the second weight information includes the weight corresponding to at least one pixel in the sub-reference region, and the second weight information is determined or obtained according to the distance between the at least one pixel in the sub-reference region and the partition line corresponding to the division mode of the current block.
[0241] Optionally, the second weight information can be used to adjust the gradient amplitude in the gradient information, and optionally, the second weight information ≤1.
[0242] Optionally, the adjusted first gradient information comprises: adjusted first gradient magnitude = first gradient magnitude * second weight information.
[0243] Optionally, the second weight information is in positive proportion and / or positive correlation with the distance between the pixel and the partition line corresponding to the partition mode of the current block. If the distance between the pixel and the partition line corresponding to the partition mode of the current block in the sub-reference region is closer, the weight value corresponding to the pixel is smaller; and / or, if the distance between the pixel and the partition line corresponding to the partition mode of the current block in the sub-reference region is farther, the weight value corresponding to the pixel is larger.
[0244] In the embodiment, the boundary (for example, the pixel close to the partition line in the sub-reference region) interference can be inhibited by the second weight information, and the internal feature of the region is highlighted, thereby supporting improving the prediction accuracy of the prediction mode of the partition determined or obtained according to the adjusted first gradient information.
[0245] Optionally, according to the gradient information and the third weight information of the sub-reference region related to at least one partition, adjusted second gradient information of the sub-reference region is determined or obtained, and the prediction mode of the at least one partition is determined or obtained according to the adjusted second gradient information of the sub-reference region.
[0246] Optionally, according to the partition mode of the current block, target gradient information of the sub-reference region related to at least one partition is determined, the target gradient information is adjusted according to the third weight information, and adjusted second gradient information of the sub-reference region is determined or obtained, and the prediction mode of the at least one partition is determined or obtained according to the adjusted second gradient information of the sub-reference region.
[0247] Optionally, the target gradient information is determined or obtained according to the gradient direction corresponding to the partition mode of the current block and the gradient magnitude of the gradient direction, and / or the target gradient information is determined or obtained according to the gradient direction perpendicular to the gradient direction corresponding to the partition mode of the current block and the gradient magnitude of the perpendicular gradient direction.
[0248] Optionally, the gradient direction corresponding to the partition mode of the current block and the gradient magnitude of the gradient direction, and / or the gradient direction perpendicular to the gradient direction corresponding to the partition mode of the current block and the gradient magnitude of the perpendicular gradient direction are determined as the target gradient information.
[0249] Optionally, the third weight information is a preset value.
[0250] Optionally, assuming that the gradient direction corresponding to the partition mode of the current block is 10°, the gradient magnitude of the gradient direction is 50, and the third weight information is 1.1, the adjusted second gradient information comprises: the gradient direction is 10°, and the gradient magnitude is 55.
[0251] Optionally, the gradient information of the at least one partition-related sub-reference region comprises at least one of gradient information of pixels in the at least one partition-related sub-reference region and gradient information of a gradient histogram of the at least one partition-related sub-reference region.
[0252] Optionally, if the gradient information of the at least one partition-related sub-reference region is the gradient information of the pixels in the at least one partition-related sub-reference region, the adjusted second gradient information is used to determine or obtain a gradient histogram of the at least one partition-related sub-reference region, and the gradient histogram of the at least one partition-related sub-reference region is used to determine or obtain the at least one prediction mode of the current block.
[0253] Optionally, if the gradient information of the at least one partition-related sub-reference region is the gradient information of the gradient histogram of the at least one partition-related sub-reference region, the adjusted second gradient information is used to determine or obtain an adjusted gradient histogram of the at least one partition-related sub-reference region, and the adjusted gradient histogram of the at least one partition-related sub-reference region is used to determine or obtain the at least one prediction mode of the current block.
[0254] Optionally, if the gradient information of the at least one partition-related sub-reference region is the gradient information of the pixels in the at least one partition-related sub-reference region, the third weight information corresponds to the sub-reference region, and the third weight information comprises a weight corresponding to at least one pixel in the sub-reference region.
[0255] Optionally, if the gradient information of the at least one partition-related sub-reference region is the gradient information of the pixels in the at least one partition-related sub-reference region, the third weight information corresponds to the sub-reference region, and the third weight information comprises a weight corresponding to at least one gradient direction in a gradient histogram of the sub-reference region.
[0256] Optionally, the at least one gradient direction comprises a first gradient direction corresponding to a partition manner of the current block, a second gradient direction perpendicular to the gradient direction corresponding to the partition manner of the current block, and a third gradient direction within an angle difference range of the first gradient direction and / or the second gradient direction.
[0257] Optionally, the at least one pixel comprises a pixel in the sub-reference region having the gradient direction corresponding to the partition manner of the current block.
[0258] Optionally, the number of the gradient information of the at least one partition-related sub-reference region can be multiple.
[0259] Optionally, if the number of the gradient information of the at least one partition-related sub-reference region is multiple, the number of the third weight information is also multiple.
[0260] Optionally, the third weight information is determined or obtained according to an angle difference between a gradient direction of at least one pixel in the sub-reference region and a direction of a partition line corresponding to the partition mode of the current block.
[0261] Optionally, the angle difference corresponds to a preset angle.
[0262] Optionally, the third weight information is used to adjust a gradient magnitude in the gradient information.
[0263] Optionally, the adjusted second gradient information comprises: adjusted second gradient magnitude = first gradient magnitude * third weight information.
[0264] Optionally, if the angle difference between the gradient direction of the pixel in the sub-reference region and the direction of the partition line corresponding to the partition mode of the current block is 0° (e.g., parallel) or 90° (e.g., perpendicular), the weight value corresponding to the pixel in the third weight information is set to weight value a, and if the angle difference between the gradient direction of the pixel in the sub-reference region and the direction of the partition line corresponding to the partition mode of the current block is not 0° (e.g., parallel) or 90° (e.g., perpendicular), the weight value corresponding to the pixel in the third weight information is set to weight value b.
[0265] Optionally, the weight value a and the weight value b have the same or different values.
[0266] Optionally, the weight value a and the weight value b are both greater than 1.
[0267] Optionally, the weight a is 1.1 and the weight b is 1.2.
[0268] Optionally, the weight information of the third gradient direction within an angle difference range of the first gradient direction and / or the second gradient direction is determined or obtained according to an angle difference between the third gradient direction and the first gradient direction and / or the second gradient direction.
[0269] In the embodiment, since the selected partition mode of the current block is similar to the texture of the current block, the first gradient direction corresponding to the partition mode of the current block, the second gradient direction perpendicular to the gradient direction corresponding to the partition mode of the current block, and the third gradient direction similar to the first gradient direction and / or the second gradient direction have relatively higher matching degrees with the current block than other gradient directions, and thus the gradient magnitudes corresponding to the first gradient direction, the second gradient direction and / or the third gradient direction can be enhanced by the third weight information, so as to improve the probability that the prediction mode corresponding to the above gradient direction is selected to perform the prediction processing on the current block.
[0270] Optionally, the third gradient direction comprises a gradient direction within a preset angle difference range of the first gradient direction and / or the second gradient direction.
[0271] Optionally, the preset angle difference range includes [-5°, 5°].
[0272] Optionally, the adjusted gradient information of the sub-reference region is determined or obtained according to the gradient information of the sub-reference region related to the at least one partition and the second weight information and / or the third weight information, and the prediction mode of the at least one partition is determined or obtained according to the adjusted gradient information of the sub-reference region.
[0273] Optionally, the partition gradient histogram is determined or obtained according to the adjusted gradient information of the sub-reference region related to the at least one partition, the adjusted first gradient information and / or the adjusted second gradient information, and the prediction mode of the at least one partition is determined or obtained according to the partition gradient histogram.
[0274] In the embodiment, the sub-reference region can focus on the local content related to the at least one partition in the reference region and / or eliminate the background or interference region irrelevant to the at least one partition in the reference region, so that the sub-reference region has stronger correlation with the partition than the reference region of the current block, thereby matching a more suitable prediction mode for the at least one partition and improving the prediction accuracy of the local region of the current block.
[0275] Optionally, the first weight information is determined according to the at least one reference region.
[0276] Optionally, the step S10 includes determining or obtaining the prediction mode of the at least one partition of the current block according to the first weight information and the at least one reference region.
[0277] Optionally, the first weight information corresponds to the at least one partition and / or the at least one reference region.
[0278] Optionally, the first weight information includes the weight of at least one pixel in the at least one reference region, and optionally, the first weight information includes the weight of each pixel in the at least one reference region.
[0279] Optionally, the first weight information can be used to adjust the gradient amplitude in the gradient information, for example, to adjust the gradient amplitude of at least one pixel in the at least one reference region.
[0280] Optionally, the sum of the first weight information corresponding to each partition included in the current block is a predetermined threshold, for example, the predetermined threshold is 1, 8, 16 or other multiples of 2.
[0281] Optionally, the sum of the weight values corresponding to the same pixel in the first weight information corresponding to each partition included in the current block is a predetermined threshold, for example, the predetermined threshold is 1, the current block includes a partition A and a partition B, the weight value corresponding to the pixel X in the first weight information corresponding to the partition A is a, the weight value corresponding to the pixel X in the first weight information corresponding to the partition B is b, and a+b=1.
[0282] Referring to FIG. 11 and FIG. 12, the predetermined threshold is 1, the current block includes a partition A and a partition B, FIG. 11 shows the first weight information corresponding to the partition A, and FIG. 12 shows the first weight information corresponding to the partition B, the first weight information includes a weight of each pixel in the reference region of the current block, in the first weight information corresponding to the partition A in FIG. 11, the weight value corresponding to the pixel X is 1, and in the first weight information corresponding to the partition B in FIG. 12, the weight value corresponding to the pixel X is 0.
[0283] Optionally, the partition gradient histogram of the at least one partition of the current block is determined or obtained according to the first weight information corresponding to the at least one partition and the at least one reference region, and the prediction mode of the at least one partition of the current block is determined or obtained according to the partition gradient histogram of the at least one partition.
[0284] Optionally, the adjusted gradient information of the at least one reference region associated with the at least one partition is determined or obtained according to the first weight information and the gradient information (for example, the gradient information before adjustment) of the at least one reference region, the partition gradient histogram of the at least one partition of the current block is determined or obtained according to the adjusted gradient information of the at least one reference region associated with the at least one partition, and the prediction mode of the at least one partition of the current block is determined or obtained according to the partition gradient histogram of the at least one partition.
[0285] Optionally, the current block includes a partition A and a partition B, the first weight information includes first weight information A corresponding to the partition A and first weight information B corresponding to the partition B, the gradient information before adjustment of the at least one reference region of the current block is determined or obtained according to at least one gradient operator, the gradient amplitude in the gradient information before adjustment of the at least one reference region is adjusted according to the first weight information A, the adjusted gradient information A of the at least one reference region associated with the partition A is determined or obtained, the gradient amplitude in the gradient information before adjustment of the at least one reference region is adjusted according to the first weight information B, the adjusted gradient information B of the at least one reference region associated with the partition B is determined or obtained, the partition gradient histogram A is determined or obtained according to the adjusted gradient information A of the at least one reference region, the partition gradient histogram B is determined or obtained according to the adjusted gradient information B of the at least one reference region, the prediction mode of the partition A is determined or obtained according to the gradient histogram A, and the prediction mode of the partition B is determined or obtained according to the gradient histogram B.
[0286] Optionally, the first weight information is determined or obtained according to the division mode of the current block.
[0287] Optionally, the division mode of the current block is determined or obtained according to at least one geometric division mode and / or an index obtained from a bitstream.
[0288] Optionally, the first weight information comprises a weight of at least one pixel in at least one reference region, and the weight of the at least one pixel is determined or obtained according to a distance between the at least one pixel and a split line corresponding to the partitioning manner of the current block.
[0289] Optionally, in the first weight information corresponding to the partition, a weight of a pixel located on a same side of a split line corresponding to the partitioning manner of the current block is in a positive proportional relationship and / or a positive correlation with a distance between the pixel and the split line, for example, the closer the distance between the pixel and the split line, the smaller the weight; and / or, the farther the distance between the pixel and the split line, the larger the weight.
[0290] Optionally, in the first weight information corresponding to the partition, a weight of a pixel located on a different side of a split line corresponding to the partitioning manner of the current block is in an inverse proportional relationship and / or a negative correlation with a distance between the pixel and the split line, for example, the closer the distance between the pixel and the split line, the larger the weight; and / or, the farther the distance between the pixel and the split line, the smaller the weight.
[0291] Optionally, in the first weight information corresponding to the partition, a weight of a pixel located on a same side of a split line corresponding to the partitioning manner of the current block is in a positive proportional relationship and / or a positive correlation with a distance between the pixel and the split line, for example, the closer the distance between the pixel and the split line, the smaller the weight; and / or, the farther the distance between the pixel and the split line, the larger the weight.
[0292] Referring to FIGS. 11 and 12, the current block comprises a partition A and a partition B, FIG. 11 shows the first weight information corresponding to the partition A, and FIG. 12 shows the first weight information corresponding to the partition B, the first weight information comprises a weight of each pixel in a reference region of the current block, in FIGS. 11 and 12, a weight of a pixel with a distance less than a preset distance threshold to a split line is 0.5, a weight of a pixel with a distance greater than or equal to the preset distance threshold to the split line is 1 if the pixel is located on a same side of the split line as the partition A, and the weight is 0 if the pixel is located on a different side of the split line as the partition A, and a weight of a pixel with a distance less than the preset distance threshold to the split line is 0.5, a weight of a pixel with a distance greater than or equal to the preset distance threshold to the split line is 1 if the pixel is located on a same side of the split line as the partition B, and the weight is 0 if the pixel is located on a different side of the split line as the partition B.
[0293] In the embodiment, the first weight information can be used to adjust the gradient contribution of pixels in at least one reference region to different partitions, retain or enhance the gradient information of pixels with stronger correlation to the partitions, and weaken or eliminate the gradient information of pixels with weaker correlation to the partitions, so that a prediction mode more suitable for at least one partition can be matched, and the prediction accuracy of a local region of the current block can be improved.
[0294] The fourth aspect of the present application provides a method for determining a prediction mode of at least one partition of a current block, the method comprising the following steps:
[0295] Optionally, the step S10 comprises: determining or obtaining the prediction mode of at least one partition of the current block according to the gradient information of at least one reference region.
[0296] Optionally, the prediction mode of at least one partition of the current block is determined or obtained according to the gradient information of at least one reference region determined or obtained by at least one gradient operator.
[0297] Optionally, the gradient information of the reference region comprises gradient information of each pixel in the reference region, and the gradient information of the pixel is a gradient direction and / or a gradient amplitude of each pixel point in the reference region calculated independently, reflecting the local variation characteristics of the point.
[0298] Optionally, the third gradient information after adjustment is determined or obtained according to the gradient information of at least one reference region and the first weight information corresponding to at least one partition, the partition gradient histogram of at least one partition is determined or obtained according to the third gradient information after adjustment, and the at least one prediction mode is determined or obtained according to the partition gradient histogram of at least one partition.
[0299] Optionally, at least one partition-related sub-reference region is determined or obtained according to the division mode of the current block and at least one reference region, the gradient information of the at least one partition-related sub-reference region is determined or obtained according to at least one gradient operator, the partition gradient histogram of at least one partition is determined or obtained according to the gradient information of the at least one partition-related sub-reference region, and the at least one prediction mode is determined or obtained according to the partition gradient histogram of at least one partition.
[0300] In the embodiment, according to the gradient information of at least one reference region of the current block, a suitable prediction mode can be matched for at least one partition of the current block, and the at least one partition can independently select the matched prediction mode, avoiding the limitation of the global unified mode of the current block, thereby supporting improving the prediction accuracy of a local region (for example, a region corresponding to a partition) of the current block, and supporting improving the prediction accuracy of the current block determined or obtained based on the prediction result of the local region.
[0301] The fourth aspect of the present application provides a method for determining a prediction mode of at least one partition of a current block, the method comprising the following steps:
[0302] Optionally, the step S10 comprises determining or obtaining the at least one prediction mode of the current block according to the at least one reference region and the at least one gradient operator.
[0303] Optionally, gradient information of the at least one reference region is determined or obtained according to the at least one reference region and the at least one gradient operator, and the at least one prediction mode of the current block is determined or obtained according to the gradient information of the at least one reference region.
[0304] Optionally, at least one sub-reference region related to the at least one partition is determined or obtained according to the partitioning manner of the current block and the at least one reference region, gradient information of the at least one sub-reference region is determined or obtained according to the at least one gradient operator, a partition gradient histogram of the at least one partition is determined or obtained according to the gradient information of the at least one sub-reference region related to the at least one partition, and the at least one prediction mode is determined or obtained according to the partition gradient histogram of the at least one partition.
[0305] Optionally, the at least one gradient operator comprises at least one pair of mutually perpendicular gradient operators.
[0306] Optionally, the first pair of mutually perpendicular gradient operators comprises a 0° gradient operator and a 90° gradient operator, and the horizontal gradient Gx and the vertical gradient Gy can be calculated by using a 3x3 horizontal (0°) Sobel operator and a vertical (90°) Sobel operator, for example, the horizontal (0°) gradient Gx and the vertical (90°) gradient Gy of a pixel x4 in a pixel line can be calculated according to the following formula (I) and formula (II).
[0307] Optionally, A can be a matrix composed of 9 pixels, i.e., the pixel x4 as the center, the pixel x1 above the pixel x4, the pixel x3 left to the pixel x4, the pixel x7 below the pixel x4, the pixel x5 right to the pixel x4, the pixel x0 left above the pixel x4, the pixel x6 left below the pixel x4, the pixel x2 right above the pixel x4, and the pixel x8 right below the pixel x4, as shown in the following formula (III):
[0308] Optionally, the G gradient amplitude value is the sum of the absolute values of the horizontal gradient and the vertical gradient, and the calculation formula is shown in the following formula (IV):
[0309] Optionally, the gradient direction corresponding to the pixel can be calculated by arctan(Gx / Gy) or arctan(Gy / Gx).
[0310] In the embodiment, gradient information of at least one reference region of the current block and / or gradient information of at least one sub-reference region related to the at least one partition can be determined or obtained according to at least one gradient operator, and a suitable prediction mode can be matched for the at least one partition, and the matched prediction mode can be selected independently for the at least one partition, thereby avoiding the limitation of the global unified mode of the current block, supporting improving the prediction accuracy of the local region (for example, the region corresponding to the partition) of the current block, and supporting improving the prediction accuracy of the current block determined or obtained based on the prediction result of the local region.
[0311] Optionally, the gradient histogram is determined or obtained according to the gradient information of the at least one sub-reference region related to the at least one partition.
[0312] Optionally, the step S10 comprises: determining or obtaining at least one gradient histogram according to the at least one reference region, and determining or obtaining the prediction mode of the at least one partition of the current block according to the at least one gradient histogram.
[0313] Optionally, the gradient histogram is determined or obtained according to the gradient information of the at least one sub-reference region related to the at least one partition.
[0314] Optionally, the gradient histogram is determined or obtained according to the gradient information of the at least one reference region of the current block and the first weight information.
[0315] Optionally, the gradient histogram is determined or obtained according to the at least one reference region and the at least one gradient operator.
[0316] Optionally, the gradient information of the at least one reference region is determined or obtained according to the at least one reference region and the at least one gradient operator, the at least one gradient histogram is determined or obtained according to the gradient information of the at least one reference region, and the prediction mode of the at least one partition of the current block is determined or obtained according to the at least one gradient histogram.
[0317] Optionally, the at least one sub-reference region related to the at least one partition is determined or obtained according to the at least one reference region and the partition mode of the current block, the gradient information of the at least one sub-reference region related to the at least one partition is determined or obtained according to the at least one gradient operator, the at least one gradient histogram (that is, the partition gradient histogram) is determined or obtained according to the gradient information of the at least one sub-reference region related to the at least one partition, and the prediction mode of the at least one partition is determined or obtained according to the at least one partition gradient histogram.
[0318] Optionally, the at least one partition is determined or obtained according to the partition mode of the current block, the at least one partition gradient histogram is determined or obtained according to the first weight information corresponding to the at least one partition and the gradient information of the at least one reference region, and the prediction mode of the at least one partition is determined or obtained according to the at least one partition gradient histogram.
[0319] Optionally, the gradient histogram is a statistical tool for describing the distribution of gradient amplitudes of the current block in different directions, which is obtained by calculating the gradient amplitude values of each pixel in the at least one reference region and / or sub-reference region in the direction corresponding to each intra prediction mode, and counting the distribution of the gradient amplitude values, thereby obtaining a histogram containing the gradient amplitude values corresponding to each prediction direction.
[0320] Optionally, in the prediction modes of the intra prediction, different prediction modes correspond to different prediction directions, for example, the vertical mode corresponds to the vertical direction, the horizontal mode corresponds to the horizontal direction, and the diagonal mode corresponds to the diagonal direction, each prediction mode has a specific direction for describing its prediction direction.
[0321] Optionally, for each prediction direction, the sum of the gradient amplitude values of each pixel in the at least one reference region of the current block in the direction is calculated, and the sum value reflects the overall gradient strength of the current block in the prediction direction, and the gradient histogram records the sum of the gradient amplitude values corresponding to each prediction direction.
[0322] Optionally, according to the at least one gradient histogram, it is judged whether the sum of the gradient amplitude values related to the at least one prediction direction corresponding to the prediction mode contained in the gradient histogram satisfies a first preset condition, and in the case of satisfying the preset condition, at least one prediction mode is determined or obtained.
[0323] Optionally, the first preset condition can be whether the sum of the gradient amplitudes is one of the sums of the N gradient amplitudes with the largest gradient amplitudes in the gradient histogram, for example, according to whether the sum of the gradient amplitude values related to the at least one prediction direction corresponding to the prediction mode contained in the at least one gradient histogram is one of the sums of the N gradient amplitudes with the largest gradient amplitudes in the gradient histogram, at least one prediction mode is determined or obtained.
[0324] Optionally, the sums of the gradient amplitudes in the gradient histogram are sorted in ascending order or descending order, and the sums of the gradient amplitudes located in the first N gradient amplitudes in the ascending order or the sums of the gradient amplitudes located in the last N gradient amplitudes in the descending order are determined or obtained, for example, after sorting in ascending order, the prediction modes corresponding to the prediction directions with the sums of the gradient amplitudes in the first 3 are determined as the prediction modes of the at least one partition.
[0325] Optionally, the gradient amplitudes in the gradient histogram are compared, and the sum of the N gradient amplitudes with the largest gradient amplitudes in the gradient histogram is determined or obtained, and according to the prediction mode corresponding to the sum of the N gradient amplitudes with the largest gradient amplitudes, the prediction mode of the at least one partition is determined or obtained.
[0326] Optionally, the gradient histogram of the at least one reference region with respect to the intra prediction direction can be determined or obtained according to the gradient magnitude value and the gradient direction of the pixels in the at least one reference region of the current block, the corresponding intra prediction direction is determined according to the gradient histogram, and the prediction mode of the at least one partition is determined or obtained.
[0327] Optionally, the processing method in the embodiments of the present application can be a DIMD mode and / or an improved DIMD mode.
[0328] Referring to FIG. 13, the processing steps of the DIMD mode, the processing steps of the improved DIMD mode and / or the determination or obtaining manner of the gradient histogram include determining the reference template adjacent to the to-be-predicted block (current block) above and on the left side of the to-be-predicted block, i.e. three pixel lines / pixel rows / pixel columns on the left side and above the to-be-predicted block, and then taking the pixel (for example, pixel A) in the middle line as the pixel for calculating the gradient, so that the gradient direction of the at least one pixel and the gradient magnitude value corresponding to the gradient can be obtained by calculating the direction of the gradient of the at least one pixel and the absolute values of the horizontal gradient and the vertical gradient.
[0329] Optionally, the gradient magnitude value is the sum of the absolute values of the horizontal gradient and the vertical gradient, and the sum of the gradient magnitude values corresponding to the gradient directions can be obtained by adding the gradient magnitude values of the at least one pixel with the same gradient direction.
[0330] Optionally, the histogram of the gradient magnitude values with respect to different gradient directions of the at least one pixel can be established, and the prediction direction perpendicular to the gradient direction of the maximum gradient magnitude value can be used as the prediction direction of the intra prediction mode of the current block and / or the prediction direction of the candidate mode.
[0331] Optionally, the 3X3 horizontal Sobel operator and the vertical Sobel operator can be used to calculate the horizontal gradient Gx and the vertical gradient Gy, for example, the horizontal gradient Gx and the vertical gradient Gy of the pixel x4 in the pixel line can be calculated according to the following formula (I) and formula (II).
[0332] Optionally, A can be a matrix composed of the pixel x4 as the center, the pixel x1 above the pixel x4, the pixel x3 on the left side of the pixel x4, the pixel x7 below the pixel x4, the pixel x5 on the right side of the pixel x4, the pixel x0 on the upper left side of the pixel x4, the pixel x6 on the lower left side of the pixel x4, the pixel x2 on the upper right side of the pixel x4 and the pixel x8 on the lower right side of the pixel x4, as shown in the following formula (III):
[0333] Optionally, the G gradient magnitude value is the sum of the absolute values of the horizontal gradient and the vertical gradient, and the calculation formula is shown in the following formula (IV):
[0334] Optionally, the gradient direction corresponding to the pixel can be calculated by arctan(Gx / Gy) or arctan(Gy / Gx).
[0335] Optionally, since each gradient direction corresponds to a specific gradient direction range, and each gradient direction range corresponds to a prediction direction of an intra prediction mode, for at least one pixel in the pixel line, the gradient magnitude values of the at least one pixel with the same gradient direction range can be added to obtain the sum of the gradient magnitude values corresponding to the gradient direction range.
[0336] Optionally, the sum of the gradient magnitude values corresponding to the prediction direction of the corresponding intra prediction mode can also be obtained.
[0337] Referring to FIG. 14, the gradient magnitude values corresponding to the gradient magnitudes of each intra prediction mode prediction direction are included. Optionally, according to FIG. 14, the finally selected intra prediction mode is mode 30.
[0338] Optionally, at least one candidate mode is determined or obtained according to at least one gradient histogram, and a prediction mode of at least one partition is determined or obtained according to matching information of the at least one candidate mode relative to at least one reference region and / or sub-reference region.
[0339] Optionally, the matching information refers to information used to evaluate the matching degree between different prediction modes and reference regions, and the corresponding current block and / or sub-reference region and the corresponding partition, and the matching information can indicate the matching degree between different prediction modes and reference regions based on various indicators, such as rate-distortion cost of prediction results, prediction error, texture similarity, etc.
[0340] Optionally, the matching information includes SAD, SATD and / or MRSAD, and optionally, the smaller the SAD value, SATD value and / or MRSAD value, the higher the matching degree; and / or, the larger the SAD value, SATD value and / or MRSAD value, the lower the matching degree.
[0341] Optionally, the matching information includes the gradient magnitude value or the sum of the gradient magnitude values corresponding to the prediction mode in the gradient histogram, and optionally, the larger the gradient magnitude value, the higher the matching degree; and / or, the smaller the gradient magnitude, the lower the matching degree.
[0342] Optionally, the matching information includes confidence information, and optionally, the larger the confidence, the higher the matching degree; and / or, the smaller the confidence, the lower the matching degree.
[0343] Optionally, at least one candidate mode is determined or obtained according to the prediction mode corresponding to the prediction direction satisfying the first prediction condition in at least one gradient histogram, and at least one prediction mode is determined from the at least one candidate mode according to the matching information of the at least one candidate mode relative to at least one reference region.
[0344] In the embodiment, the gradient histogram can accurately capture the dominant prediction direction (e.g., vertical, horizontal or diagonal) related to at least one reference region, so as to match the appropriate prediction mode for at least one partition of the current block.
[0345] Third embodiment
[0346] Based on any of the above embodiments, a third embodiment is proposed.
[0347] In the embodiment, the gradient information (e.g., gradient information of the reference region and / or gradient information of the sub-reference region) includes first gradient information and / or second gradient information.
[0348] Optionally, the mode indexes of the candidate modes corresponding to the first gradient information and the second gradient information are adjacent.
[0349] Optionally, the adjacent mode indexes refer to the modes whose prediction mode numbers are continuous in numerical value or close in geometric angle.
[0350] Optionally, the adjacent mode indexes include left adjacent mode indexes and / or right adjacent mode indexes, for example, for each mode index i, the left adjacent index i-1 and / or the right adjacent index i+1 are included, and optionally, part of the candidate modes only have unilaterally adjacent candidate modes.
[0351] Optionally, at least one gradient histogram (e.g., partition gradient histogram) is determined or obtained according to the gradient information of the at least one reference region and / or the gradient information of the sub-reference region, at least one candidate mode is determined or obtained according to the at least one gradient histogram, if there are candidate modes with adjacent mode indexes in the at least one candidate mode, the gradient information corresponding to the candidate modes with adjacent mode indexes is determined as the first gradient information and / or the second gradient information.
[0352] Optionally, if there are at least one pair of candidate modes with adjacent mode indexes in the at least one candidate mode determined or obtained according to the at least one gradient histogram, for example, the candidate modes with adjacent mode indexes are mode 1 and mode 2, the gradient information corresponding to mode 1 is determined as the first gradient information, and the gradient information corresponding to mode 2 is determined as the second gradient information.
[0353] Optionally, if there are at least one group of candidate modes with adjacent mode indexes in the at least one candidate mode determined or obtained according to the at least one gradient histogram, for example, the candidate modes with adjacent mode indexes are mode 1, mode 2 and mode 3, the gradient information corresponding to any mode (e.g., mode 1) in the group of candidate modes with adjacent mode indexes is determined as the first gradient information, and the gradient information corresponding to the remaining modes (e.g., mode 2 and mode 3) is determined as the second gradient information.
[0354] Optionally, the candidate mode with the highest corresponding gradient magnitude among the candidate modes adjacent to the one group and / or one pair of mode indexes is determined as the first gradient information, and the corresponding gradient information of the remaining candidate modes is determined as the second gradient information.
[0355] Optionally, the step S10 comprises: determining or obtaining the prediction mode of the at least one partition according to the adjusted first gradient information and / or the adjusted second gradient information.
[0356] Optionally, the step S10 comprises: determining or obtaining the gradient information of the at least one reference region according to the at least one reference region and the at least one gradient operator, determining or obtaining the at least one gradient histogram according to the gradient information of the at least one reference region, determining or obtaining the at least one candidate mode according to the at least one gradient histogram, determining or obtaining the adjusted first gradient information and / or the adjusted second gradient information according to the at least one candidate mode, determining or obtaining the at least one adjusted gradient histogram according to the adjusted first gradient information and / or the adjusted second gradient information, and determining or obtaining the prediction mode of the at least one partition of the current block according to the at least one adjusted gradient histogram.
[0357] Optionally, the step S10 comprises: determining or obtaining the at least one partition-related sub-reference region according to the at least one reference region and the partitioning manner of the current block, determining or obtaining the gradient information of the at least one partition-related sub-reference region according to the at least one gradient operator, determining or obtaining the at least one gradient histogram (i.e., partition gradient histogram) according to the gradient information of the at least one partition-related sub-reference region, determining or obtaining the at least one candidate mode according to the at least one partition gradient histogram, determining or obtaining the adjusted first gradient information and / or the adjusted second gradient information according to the at least one candidate mode, determining or obtaining the at least one adjusted gradient histogram according to the adjusted first gradient information and / or the adjusted second gradient information, and determining or obtaining the prediction mode of the at least one partition of the current block according to the at least one adjusted gradient histogram.
[0358] Optionally, in the conventional technology, the mode with the largest gradient magnitude or the multiple modes with the top ranking gradient magnitudes in the gradient histogram are usually determined as the prediction mode, but if the directions of the several prediction modes with the largest gradient magnitudes are similar (e.g., adjacent in mode index), the above-mentioned method will ignore other potential effective non-similar direction modes, resulting in lack of diversity in mode selection and possibly failing to adapt to complex and variable image scenes. Therefore, in order to enrich the mode selection, the at least one prediction mode determined or obtained can be changed according to the adjusted first gradient information and / or the adjusted second gradient information, so as to enrich the mode selection and improve the prediction accuracy.
[0359] Optionally, the first gradient information is adjusted according to fourth weight information, to determine or obtain adjusted first gradient information.
[0360] Optionally, the second gradient information is adjusted according to fifth weight information, to determine or obtain adjusted second gradient information.
[0361] Optionally, the fourth weight information and / or the fifth weight information can be a preset fixed value, and / or can be adaptively adjusted according to different scenes, and optionally, the fourth weight information and / or the fifth weight information are the same or different.
[0362] Optionally, the fourth weight information and / or the fifth weight information include weight Wi and / or weight Wj, and the first gradient information and / or the second gradient information are adjusted by the weight Wi and / or the weight Wj to obtain the adjusted first gradient information and / or the adjusted second gradient information.
[0363] Optionally, adjusting the first gradient information and / or the second gradient information includes adjusting the gradient amplitudes of the first gradient information and the second gradient information.
[0364] Optionally, the fourth weight information and / or the fifth weight information include weight Wi and / or weight Wj, and weight Wj = 1-weight Wj, for example, assuming that the weight Wi is 0.3 and the weight Wj is 0.7, the adjusted first gradient = first gradient amplitude + Wi*second gradient amplitude, and the adjusted second gradient amplitude = Wj*second gradient amplitude.
[0365] Optionally, adjusting the first gradient information and / or the second gradient information includes adjusting the gradient amplitudes of the first gradient information and the gradient amplitudes of the non-first gradient information.
[0366] Optionally, the weight Wi is 0.3, the weight Wj is 1, the adjusted first gradient = first gradient amplitude + Wi*second gradient amplitude, and the second gradient amplitude remains unchanged.
[0367] Optionally, adjusting the first gradient information and / or the second gradient information includes adjusting the gradient amplitudes of the second gradient information and the gradient amplitudes of the non-first gradient information.
[0368] Optionally, the weight Wi is 0, the weight Wj is 0, the adjusted second gradient amplitude = 0, and the first gradient amplitude remains unchanged.
[0369] Optionally, the gradient information corresponding to any mode (e.g., the mode with the highest gradient amplitude) in a group of candidate modes with adjacent mode indexes is determined as the first gradient information, and the gradient information corresponding to the remaining at least one mode is determined as the second gradient information, and optionally, the group of candidate modes with adjacent mode indexes includes 2 or 3 candidate modes.
[0370] Optionally, gradient information corresponding to any mode (e.g., the mode with the highest gradient magnitude) in the set of mode index adjacent candidate modes is determined as the second gradient information, and gradient information corresponding to the remaining at least one mode is determined as the first gradient information. Optionally, the set of mode index adjacent candidate modes includes 2 or 3 candidate modes.
[0371] Optionally, the adjusted second gradient information is determined or obtained according to the fifth weight and the second gradient information, the fifth weight < 1, the adjusted first gradient information is determined or obtained according to the fourth weight and the first gradient information, the fourth weight < 1, the fifth weight and the fourth weight are different, and the prediction mode of the at least one partition is determined or obtained according to the adjusted first gradient information and the adjusted second gradient information. By weakening the gradient magnitudes corresponding to at least part of the candidate modes to different degrees through the fourth weight and the fifth weight, the prediction mode determined or obtained can be changed, and the diversity of mode selection can be improved.
[0372] Optionally, the adjusted second gradient information is determined or obtained according to the fifth weight and the second gradient information, the fifth weight < 1, and the prediction mode of the at least one partition is determined or obtained according to the adjusted second gradient information. By weakening the gradient magnitudes corresponding to at least part of the candidate modes in the index adjacent candidate modes through the fifth weight, the diversity of mode selection can be improved on the basis of retaining at least one originally selected prediction mode. Since at least one originally selected prediction mode is retained, and the difference between the prediction results corresponding to the prediction mode and its adjacent modes is small, weakening part of the similar modes through the fifth weight will not affect the coding quality.
[0373] Optionally, the adjusted first gradient information is determined or obtained according to the fourth weight and the first gradient information, the fourth weight < 1, and the prediction mode of the at least one partition is determined or obtained according to the adjusted first gradient information.
[0374] Optionally, the adjusted second gradient information is determined or obtained according to the fifth weight and the second gradient information, the fifth weight < 1, the adjusted first gradient information is determined or obtained according to the fourth weight and the first gradient information, the fourth weight > 1, the fifth weight and the fourth weight are different, and the prediction mode of the at least one partition is determined or obtained according to the adjusted first gradient information and the adjusted second gradient information. By weakening the gradient magnitudes corresponding to at least part of the candidate modes through the fourth weight, and by enhancing the gradient magnitudes corresponding to at least part of the candidate modes through the fifth weight, the prediction mode determined or obtained can be changed, and the diversity of mode selection can be improved. According to the initial gradient histogram, at least one set of index adjacent candidate modes can be obtained, and the fourth weight and / or the fifth weight of each set of index adjacent candidate modes is the same or different. Therefore, the prediction mode determined or obtained can be changed, and the diversity of mode selection can be improved.
[0375] Optionally, the adjusted second gradient information is determined or obtained according to the fifth weight and the second gradient information, the fifth weight>1, the adjusted first gradient information is determined or obtained according to the fourth weight and the first gradient information, the fourth weight<1, the fifth weight and the fourth weight are different, and the prediction mode of the at least one partition is determined or obtained according to the adjusted first gradient information and the adjusted second gradient information.
[0376] Optionally, the gradient information corresponding to the mode with the highest gradient amplitude in the candidate modes adjacent to the group of mode indexes is determined as the first gradient information, the gradient information corresponding to the remaining at least one mode is determined as the second gradient information, the adjusted second gradient information is determined or obtained according to the fifth weight and the second gradient information, the fifth weight<1 (for example, the fifth weight=0), the at least one adjusted gradient histogram is determined or obtained according to the adjusted second gradient information, and the at least one prediction mode is determined or obtained according to the at least one adjusted gradient histogram. Optionally, the gradient amplitude corresponding to at least part of the candidate modes adjacent to the index in the candidate modes is weakened by the fifth weight, so as to improve the diversity of mode selection on the basis of retaining at least one originally selected prediction mode. Since at least one originally selected prediction mode is retained, and the difference between the prediction results corresponding to the prediction mode and its adjacent modes is small, the fifth weight weakens part of the similar modes, and thus does not affect the coding quality.
[0377] In the embodiment, the prediction mode determined or obtained can be changed according to the adjusted first gradient information and / or the adjusted second gradient information, so as to improve the diversity of mode selection.
[0378] Optionally, the reference region is determined or obtained according to at least one of the following modes B1 to B5:
[0379] Mode B1, at least one of the following: an upper adjacent pixel, an upper non-adjacent pixel, a left adjacent pixel, a left non-adjacent pixel, an upper left adjacent pixel, and an upper left non-adjacent pixel of the current block.
[0380] Optionally, the reference region includes: a reference pixel, a reference block, and / or a reference template.
[0381] Optionally, the reference region of the current block is determined or obtained according to at least one of the following: an upper adjacent pixel, an upper non-adjacent pixel, a left adjacent pixel, a left non-adjacent pixel, an upper left adjacent pixel, and an upper left non-adjacent pixel of the current block.
[0382] Optionally, the step S10 comprises: determining or obtaining at least one reference region of the current block according to at least one of the above-mentioned adjacent pixels, the above-mentioned non-adjacent pixels, the left-adjacent pixels, the left-non-adjacent pixels, the top-left-adjacent pixels and the top-left-non-adjacent pixels of the current block, and determining or obtaining the prediction mode of at least one partition of the current block according to the at least one reference region.
[0383] Optionally, the above-mentioned adjacent pixels can be pixels adjacent to the current block in the same frame image.
[0384] Optionally, the above-mentioned non-adjacent pixels can be pixels not adjacent to the current block in the same frame image.
[0385] Optionally, the left-adjacent pixels can be pixels adjacent to the current block in the same frame image.
[0386] Optionally, the left-non-adjacent pixels can be pixels not adjacent to the current block in the same frame image.
[0387] Optionally, the top-left-adjacent pixels can be pixels adjacent to the current block in the same frame image.
[0388] Optionally, the top-left-non-adjacent pixels can be pixels not adjacent to the current block in the same frame image.
[0389] Optionally, the at least one of the above-mentioned adjacent pixels, the above-mentioned non-adjacent pixels, the left-adjacent pixels, the left-non-adjacent pixels, the top-left-adjacent pixels and the top-left-non-adjacent pixels can be a reconstructed pixel or a predicted pixel.
[0390] Optionally, the at least one of the above-mentioned adjacent pixels, the above-mentioned non-adjacent pixels, the left-adjacent pixels, the left-non-adjacent pixels, the top-left-adjacent pixels and the top-left-non-adjacent pixels can be directly used as the reference region, or the at least one pixel can be derived or calculated to obtain the reference region.
[0391] Optionally, the reference region of the current block can be obtained according to a preset mapping / correspondence rule.
[0392] Optionally, the reference region can be selected from the above-mentioned adjacent pixels, the above-mentioned non-adjacent pixels, the left-adjacent pixels, the left-non-adjacent pixels, the top-left-adjacent pixels and the top-left-non-adjacent pixels of the current block according to a prediction model.
[0393] Optionally, if some positions lack valid pixel data, the adjacent valid pixels can be used to fill the positions.
[0394] In the embodiment, since the current block has higher similarity with at least one of the above-mentioned neighboring pixels and / or non-neighboring pixels, the reference region determined according to the neighboring pixels and / or non-neighboring pixels can improve the prediction accuracy of the current block and / or its partitions.
[0395] Optionally, at least one of the neighbor block, the non-neighbor block, the collocated block, the temporal block and the default block corresponding to the current block is taken as the at least one reference region.
[0396] Optionally, at least one of the neighbor block, the non-neighbor block, the collocated block, the temporal block and the default block corresponding to the current block is taken as the at least one reference region.
[0397] Optionally, the at least one reference region is determined or obtained according to the image block information of at least one of the neighbor block, the non-neighbor block, the collocated block, the temporal block and the default block corresponding to the current block.
[0398] Optionally, the step S10 comprises: determining or obtaining the at least one reference region of the current block according to at least one of the neighbor block, the non-neighbor block, the collocated block, the temporal block and the default block corresponding to the current block, and determining or obtaining the prediction mode of the at least one partition of the current block according to the at least one reference region.
[0399] Optionally, the image block information can comprise at least one of the block size, the block area, the image block attribute and the image block type.
[0400] Optionally, the block size comprises the width, the height, the proportion, the depth, the area, the resolution and the pixel number of the block, the image block attribute can comprise the position and / or the image texture of the block, and the image block type can comprise the natural image or the screen content image.
[0401] Optionally, the at least one reference region is determined or obtained according to at least one of the above-mentioned neighboring pixels and / or non-neighboring pixels of at least one of the neighbor block, the non-neighbor block, the collocated block, the temporal block and the default block corresponding to the current block.
[0402] Optionally, at least one of the above-mentioned neighboring pixels and / or non-neighboring pixels of at least one of the neighbor block, the non-neighbor block, the collocated block, the temporal block and the default block corresponding to the current block is taken as the at least one reference region.
[0403] Optionally, the at least one reference region is determined or obtained according to at least one of the width, the height, the block size and the block area of at least one of the neighbor block, the non-neighbor block, the collocated block, the temporal block and the default block corresponding to the current block.
[0404] Optionally, the neighbor block can be a block adjacent to the current block, and can be a block that has been predicted or reconstructed.
[0405] Optionally, the non-neighbor block can be a block not adjacent to the current block, and can be a block that has been predicted or reconstructed.
[0406] Optionally, the collocated block can be a block in a collocated picture, which has the same position and size as the current block. And the collocated picture can be a picture closest in time to the current picture in the reference pictures.
[0407] Optionally, the temporal block can be a block distinguished in the time domain, such as a block in a picture of a frame other than the current frame. For example, there is video data including a first frame picture, a second frame picture and a third frame picture played in the first second, the second second and the third second, and the current block is a block divided from the second frame picture, then the temporal block corresponding to the current block can be determined as a corresponding block in a picture of a frame other than the second frame.
[0408] Optionally, the default block can be a block set in advance, for example, a block with typical pixel features set in advance by the encoder and / or the decoder.
[0409] In the embodiment, at least one reference region is determined or obtained according to at least one of the neighbor block, the non-neighbor block, the collocated block, the temporal block and the default block corresponding to the current block, which ensures that the reference region determined or obtained is closely related to the current block and / or its partitions, and thus the prediction result obtained according to the reference region is more accurate.
[0410] Optionally, the at least one reference region is determined or obtained according to at least one of the width, the height, the block size and the block area of the current block.
[0411] Optionally, the step S10 comprises: determining or obtaining at least one reference region of the current block according to at least one of the width, the height, the block size and the block area of the current block, and determining or obtaining the prediction mode of at least one partition of the current block according to the at least one reference region.
[0412] Optionally, the at least one reference region can be determined or obtained according to the width, the height of the current block and a first mapping table. Optionally, the first mapping table can be shown in Table 1 as follows:
[0413] Table 1
[0414] Optionally, the height of the at least one reference region is equal to the height of the current block multiplied by a first preset multiple, and the width of the at least one reference region is equal to the width of the current block multiplied by a second preset multiple.
[0415] Optionally, the reference region or the image region in the reference region can be an encoded region or a decoded region.
[0416] Optionally, the coded region or the decoded region can be determined by the position of the top-left pixel, the height and the width of the coded region or the decoded region, for example, the position of the top-left pixel can be the position of the top-left of the current block upward N (N is greater than 1) times the height of the image block and leftward N times the width of the image block, the width of the coded region or the decoded region is an integer multiple of the width of the current block, and the height of the coded region or the decoded region is an integer multiple of the height of the current block.
[0417] Optionally, the reference region can be determined according to the block size of the current block and the second mapping table.
[0418] Optionally, the second mapping table can be shown in Table 2 as follows:
[0419] Table 2
[0420] Optionally, the block size includes at least one of the width, the height, the proportion, the depth, the area, the resolution and the number of pixels of the block, and X4 to X7 can be preset threshold values corresponding to at least one of the width, the height, the proportion, the depth, the area, the resolution and the number of pixels of the block.
[0421] Optionally, the reference region can be determined according to the block area of the current block and the third mapping table, and the third mapping table can be shown in Table 3 as follows:
[0422] Table 3
[0423] Optionally, the position of the reference region, the reference block and / or the reference pixel can be determined or obtained according to the upper neighboring pixel, the left neighboring pixel and the top-left neighboring pixel of the current block, and the size of the reference region can be determined according to the width and the height of the current block and the first mapping table.
[0424] Optionally, the reference region of the current block includes a first region adjacent to the top of the current block, a second region adjacent to the left of the current block and a third region adjacent to the top-left of the current block, the width of the first region is equal to 2 times the width of the current block, the height of the second region is equal to 2 times the height of the current block, if the width and the height of the current block are both greater than or equal to 8, the height of the first region is 8, the width of the second region is 8, and the width and the height of the third region are both 8, or if any one of the width and the height of the current block is less than 8, the height of the first region is 4, the width of the second region is 4, and the width and the height of the third region are both 4.
[0425] In the embodiment, the reference region, the reference block and / or the reference pixel are determined or obtained according to at least one of the width, the height, the block size and the block area of the current block, which ensures that the reference region is closely associated with the current block and / or its sub-region, and further makes the prediction result obtained according to the reference region more accurate.
[0426] a candidate block determined or obtained according to the candidate motion vector or the candidate block vector of the current block;
[0427] Optionally, the step S10 comprises: determining or obtaining at least one reference region of the current block according to a candidate block determined or obtained according to the candidate motion vector or the candidate block vector of the current block, and determining or obtaining the prediction mode of at least one partition of the current block according to the at least one reference region.
[0428] Optionally, the candidate block can be determined or obtained according to at least one candidate motion vector or at least one candidate block vector in the candidate list of the current block, and the at least one reference region can be the candidate block.
[0429] Optionally, the candidate block can be determined or obtained according to the candidate motion vector or the candidate block vector of the current block, and the at least one reference region can be determined or obtained according to at least one of the following: an upper neighboring pixel, an upper non-neighboring pixel, a left neighboring pixel, a left non-neighboring pixel, an upper-left neighboring pixel and an upper-left non-neighboring pixel of the candidate block.
[0430] Optionally, the candidate block can be determined or obtained according to the candidate motion vector or the candidate block vector of the current block, and the at least one reference region can be at least one of the following: an upper neighboring pixel, an upper non-neighboring pixel, a left neighboring pixel, a left non-neighboring pixel, an upper-left neighboring pixel and an upper-left non-neighboring pixel of the candidate block.
[0431] Optionally, the candidate block can be determined or obtained according to the candidate motion vector or the candidate block vector of the current block, and the at least one reference region can be determined or obtained according to at least one of the following: a width, a height, a block size and a block area of the candidate block. The specific implementation process can refer to the scheme in the above-mentioned mode F, that is, the current block in the mode F is replaced by the candidate block, which is not repeated here.
[0432] Optionally, the candidate block can be determined or obtained according to the candidate motion vector or the candidate block vector of the current block, and the at least one reference region can be determined or obtained according to at least one of the following: a neighbor block, a non-neighbor block, a collocated block, a temporal block and a default block corresponding to the candidate block.
[0433] Optionally, the candidate block can be determined or obtained according to the candidate motion vector or the candidate block vector of the current block, and the at least one reference region can be at least one of the following: a neighbor block, a non-neighbor block, a collocated block, a temporal block and a default block corresponding to the candidate block.
[0434] In the embodiment, the candidate block determined or obtained according to the candidate motion vector or the candidate block vector of the current block ensures that the determined or obtained reference region is closely related to the current block and / or its partition, and further makes the subsequent prediction result obtained according to the reference region more accurate.
[0435] a partition mode of the current block is determined or obtained according to the at least one reference region.
[0436] Optionally, the step S10 comprises: determining or obtaining at least one reference region of the current block according to the partition mode of the current block, and determining or obtaining the partition mode of at least one partition of the current block according to the at least one reference region.
[0437] Optionally, the reference region comprises a sub-reference region corresponding to at least one partition of the current block.
[0438] Optionally, the at least one partition and / or the at least one sub-reference region of the current block are determined or obtained according to the partition mode of the current block.
[0439] Optionally, the partition mode of the current block is determined or obtained according to at least one geometric partition mode and / or an index obtained from a bitstream.
[0440] Optionally, in one partition mode, the current block has only one split line.
[0441] Optionally, the at least one sub-reference region is determined or obtained by dividing the at least one reference region of the current block according to the split line corresponding to the partition mode of the current block.
[0442] Optionally, the split line of the reference region is determined or obtained according to the split line corresponding to the partition mode of the current block, and the at least one sub-reference region is determined or obtained by dividing the at least one reference region of the current block according to the split line of the reference region.
[0443] Optionally, the split line of the reference region is determined or obtained by extending the split line corresponding to the partition mode of the current block.
[0444] Optionally, the at least one partition and the at least one sub-reference region related to the at least one partition are determined or obtained according to the partition mode of the current block, and the at least one partition and the at least one sub-reference region related to the at least one partition are located on the same side of the split line corresponding to the partition mode of the current block.
[0445] Optionally, the at least one sub-reference region related to the at least one partition comprises one or more.
[0446] Optionally, the at least one partition and the one or more sub-reference regions related to the at least one partition are located on the same side of the split line corresponding to the partition mode of the current block.
[0447] Optionally, the sub-reference regions corresponding to the first partition in the at least one partition are located on one side of the split line corresponding to the partition mode of the current block, and the sub-reference regions corresponding to the second partition in the at least one partition are located on the other side of the split line corresponding to the partition mode of the current block.
[0448] In the embodiment, the sub-reference region corresponding to the at least one partition of the current block can be determined or obtained according to the division manner of the current block. The sub-reference region can focus on the local content related to the at least one partition in the reference region and / or eliminate the background or interference region irrelevant to the at least one partition in the reference region, so that the sub-reference region has stronger relevance to the partition than the reference region of the current block, thereby matching a more suitable prediction mode for the at least one partition and improving the prediction accuracy of the local region of the current block.
[0449] Fourth embodiment
[0450] The embodiments of the present application further provide a processing device. Please refer to FIG. 15, which is a functional module schematic diagram of the processing device of the present application. The processing device can be arranged in or be the processing device. The processing device comprises:
[0451] The processing module A10 is configured to determine or obtain the prediction mode of the at least one partition of the current block according to the at least one reference region.
[0452] Optionally, the prediction mode of the at least one partition is determined or obtained according to at least one of the following:
[0453] The sub-reference region;
[0454] The first weight information;
[0455] The gradient information of the at least one reference region;
[0456] The at least one gradient operator;
[0457] The at least one gradient histogram.
[0458] Optionally, the processing device further comprises at least one of the following:
[0459] The sub-reference region is related to the at least one partition of the current block;
[0460] The sub-reference region is determined or obtained according to the division manner of the current block;
[0461] The first weight information corresponds to the at least one partition and / or the at least one reference region;
[0462] The gradient histogram is determined or obtained according to the at least one reference region of the current block;
[0463] The first weight information is determined or obtained according to the division manner of the current block;
[0464] The gradient information comprises the gradient information of the pixels in the reference region and / or the overall gradient information of the reference region.
[0465] Optionally, the processing device further comprises at least one of the following:
[0466] The partitioning manner of the current block is determined or derived according to at least one geometric partition mode and / or an index obtained from a bitstream;
[0467] The first weight information comprises weight of at least one pixel in at least one reference region;
[0468] The gradient information of the at least one reference region, the gradient information of the pixels in the reference region and / or the overall gradient information of the reference region comprises gradient magnitude and / or gradient direction.
[0469] Optionally, the weight of at least one pixel in at least one reference region comprised in the first weight information is determined or derived according to distance between the at least one pixel and a partition line corresponding to the partitioning manner of the current block.
[0470] Optionally, the gradient histogram is determined or derived according to at least one of the following:
[0471] Gradient information of at least one sub-reference region related to the at least one partition;
[0472] Gradient information of at least one reference region of the current block and the first weight information;
[0473] At least one reference region of the current block and at least one gradient operator.
[0474] Optionally, the processing device further comprises at least one of the following:
[0475] The prediction result of the current block is determined or derived according to the prediction result of the at least one partition;
[0476] The prediction result of the current block is determined or derived according to the prediction mode of the at least one partition and the partitioning manner of the current block.
[0477] Optionally, the at least one reference region is determined or derived according to at least one of the following:
[0478] At least one of the following: an above neighboring pixel, an above non-neighboring pixel, a left neighboring pixel, a left non-neighboring pixel, a top-left neighboring pixel and a top-left non-neighboring pixel of the current block;
[0479] At least one of the following: a neighbor block, a non-neighbor block, a collocated block, a temporal block and a default block corresponding to the current block;
[0480] At least one of the following: width, height, block size and block area of the current block;
[0481] A candidate block determined or derived by a candidate motion vector or a candidate block vector of the current block;
[0482] The partitioning manner of the current block.
[0483] The processing device provided in the embodiments of the present application and the technical solutions shown in the corresponding method embodiments described above have similar implementation principles and beneficial effects, which will not be repeated here.
[0484] The embodiments of the present application further provide a processing device, comprising a memory and a processor, the memory storing a processing program, and the processing program being executed by the processor to implement the steps of the processing method in any of the embodiments described above.
[0485] The embodiments of the present application further provide a storage medium, the storage medium storing a processing program, and the processing program being executed by the processor to implement the steps of the processing method in any of the embodiments described above.
[0486] In the embodiments of the processing device and the storage medium provided in the present application, all the technical features of any of the processing method embodiments described above can be included, and the description and explanation content is basically the same as that of the above-mentioned method embodiments, which will not be repeated here.
[0487] The embodiments of the present application further provide a computer program product, the computer program product comprising computer program code, which, when run on a computer, causes the computer to perform the method in any of the possible embodiments described above.
[0488] The embodiments of the present application further provide a chip, comprising a memory and a processor, the memory being configured to store a computer program, and the processor being configured to call and run the computer program from the memory, so that the device installed with the chip performs the method in any of the possible embodiments described above.
[0489] It can be understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided in the embodiments of the present application. The technical solutions of the present application can also be applied to other scenarios. For example, those skilled in the art can know that, as the system architecture evolves and new business scenarios emerge, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0490] The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0491] The steps in the embodiments of the present application can be adjusted, combined and reduced in sequence according to actual needs.
[0492] The units in the embodiments of the present application can be combined, divided and reduced according to actual needs.
[0493] In the present application, for the same or similar term concept, technical scheme and / or application scene description, generally only the first time is described in detail, and the repeated description is not repeated in order to be brief. When understanding the technical scheme of the present application, the same or similar term concept, technical scheme and / or application scene description which is not described in detail can be referred to the related description before.
[0494] In the present application, the description of each embodiment has its own focus, and the part not described or recorded in a certain embodiment can be referred to the related description of other embodiments.
[0495] The technical features of the technical scheme of the present application can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the range recorded in the present application.
[0496] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical scheme of the present application can be embodied in the form of software product, which is stored in the above-mentioned storage medium (such as ROM / RAM, magnetic disc, optical disc), including a plurality of instructions to make a terminal device (which can be a mobile phone, computer, server, controlled terminal, or network device, etc.) execute the method of each embodiment of the present application.
[0497] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a storage medium or transferred from one storage medium to another storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, storage disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk (SSD)) and the like.
[0498] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A processing method, wherein, The method comprises the steps of: S10, determining or obtaining a prediction mode of at least one partition of the current block according to at least one reference region.
2. The treatment method of claim 1, wherein, The prediction mode of the at least one partition is determined or obtained according to at least one of the following: a sub-reference region; first weight information; gradient information of the at least one reference region; at least one gradient operator; at least one gradient histogram.
3. The treatment method of claim 2, wherein, Further comprising at least one of the following: the sub-reference region is related to the at least one partition of the current block; the sub-reference region is determined or obtained according to a partition mode of the current block; the first weight information corresponds to the at least one partition and / or the at least one reference region; the gradient histogram is determined or obtained according to the at least one reference region of the current block; the first weight information is determined or obtained according to the partition mode of the current block; the gradient information comprises gradient information of pixels in the reference region and / or overall gradient information of the reference region.
4. The treatment method of claim 3, wherein, Further comprising at least one of the following: the partition mode of the current block is determined or obtained according to at least one geometric partition mode and / or an index obtained from a bitstream; the first weight information comprises weight of at least one pixel in the at least one reference region; the gradient information of the at least one reference region, the gradient information of the pixels in the reference region and / or the overall gradient information of the reference region comprises gradient amplitude and / or gradient direction.
5. The treatment method of claim 4, wherein, The weight of the at least one pixel in the at least one reference region included in the first weight information is determined or obtained according to a distance between the at least one pixel and a partition line corresponding to the partition mode of the current block.
6. The treatment method of claim 2, wherein, The gradient histogram is determined or obtained according to at least one of the following: gradient information of the sub-reference region related to the at least one partition; gradient information of the at least one reference region of the current block and the first weight information; the at least one reference region of the current block and the at least one gradient operator.
7. The treatment method of claim 1, wherein, Further comprising at least one of the following: determining or obtaining a prediction result of the current block according to the prediction result of the at least one partition; determining or obtaining a prediction result of the current block according to the prediction mode of the at least one partition and the partition mode of the current block.
8. The treatment method of claim 1, wherein, The at least one reference region is determined or obtained according to at least one of the following: at least one of the following: an above neighboring pixel, an above non-neighboring pixel, a left neighboring pixel, a left non-neighboring pixel, a top-left neighboring pixel and a top-left non-neighboring pixel of the current block; at least one of the following: a neighbor block, a non-neighbor block, a collocated block, a temporal block and a default block corresponding to the current block; at least one of the following: a width, a height, a block size and a block area of the current block; a candidate block determined or obtained by a candidate motion vector or a candidate block vector of the current block; the partition mode of the current block.
9. A processing device, wherein, The apparatus comprises: a memory and a processor, wherein the memory stores a processing program, and the processing program is executed by the processor to implement the steps of the processing method according to claim 1.
10. A storage medium, wherein, a storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the processing method according to claim 1.