Processing method, processing device, and storage medium
By dividing non-rectangular target areas in video frame blocks for intra-frame and inter-frame prediction, the problem of low prediction accuracy of non-vertical or non-horizontal object edges in the existing technology is solved, and higher encoding and decoding efficiency and user experience are achieved. .
Patent Information
- Application Number
- PCT/CN2023/105598
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-15
- Filing Date
- 2023-07-03
- Publication Date
- 2024-09-19
AI Technical Summary
In the case of non-vertical or non-horizontal object edges, the prediction accuracy of existing video coding standard protocols is low, resulting in reduced encoding and decoding efficiency.
By dividing non-rectangular target areas in video frame blocks for intra-frame and inter-frame prediction, more accurate prediction blocks are generated and coding efficiency is improved.
Significantly improves the prediction accuracy and efficiency of video encoding and decoding, improving user experience.
Smart Images

Figure CN2023105598_19092024_PF_FP_ABST
Abstract
Description
Processing method, processing device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 15, 2023, with application number 202310246090.1 and invention name “Processing Method, Processing Equipment and Storage Medium”, the entire contents of which are incorporated by reference into the application. Technical Field
[0002] The present application relates to the field of image processing technology, and in particular to a processing method, a processing device, and a storage medium. Background Art
[0003] The existing High Efficiency Video Coding standard protocol (H.266 / VVC) proposes a video frame encoding technology to improve encoding performance without significantly increasing computational complexity.
[0004] During the process of conceiving and implementing this application, the inventors discovered that there are at least the following problems: when encoding and decoding video frames, the protocol divides each frame into different blocks, performs prediction processing, and then performs encoding and decoding processing. However, there are limitations in the divided blocks, or there are limitations in the prediction method, resulting in low prediction accuracy in the case of non-vertical or non-horizontal object edges, thereby reducing encoding and decoding efficiency.
[0005] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Technical Solutions
[0006] In response to the above technical problems, the present application provides a processing method, a processing device and a storage medium, aiming to solve the technical problem of how to improve the accuracy and / or efficiency of video codec prediction.
[0007] This application provides a processing method that can be applied to a processing device (such as an intelligent terminal or a server, etc.), including the following steps:
[0008] S10: determining at least one target area from the current block, wherein the target area includes a preset area, wherein the preset area includes a non-rectangular area;
[0009] S20: Predict the target area, and determine or generate a prediction block of the current block.
[0010] Optionally, the target area includes a preset area.
[0011] Optionally, step S10 includes at least one of the following:
[0012] Determine or generate at least one segmentation line in the current block, and determine at least one target area from the current block according to the segmentation line, wherein the target area includes a preset area;
[0013] Selecting at least one location point in the current block as a segmentation point, and extending at least two non-overlapping segmentation lines from the segmentation point to the edge of the current block, dividing the current block into at least one target area according to the segmentation lines, wherein the target area includes a preset area;
[0014] At least one preset area consisting of at least two non-preset areas is determined from the current block.
[0015] Optionally, step S20 includes:
[0016] Perform prediction on each target area and determine or generate at least one prediction area;
[0017] All the prediction regions are merged to determine or generate a prediction block for the current block.
[0018] Optionally, the predicting of each target area includes at least one of the following:
[0019] Making predictions for each target area according to at least one prediction model;
[0020] Performing inter-frame prediction and / or intra-frame prediction on each target region;
[0021] Each target region is predicted according to at least one prediction mode and a prediction order corresponding to each region.
[0022] This application also provides a processing method that can be applied to a processing device (such as an intelligent terminal or a server, etc.), comprising the steps of:
[0023] S100: Determine or generate at least one target area according to a block division mode of a current block;
[0024] S200: Predict the target area, reconstruct the current block, and determine or generate a decoding block.
[0025] Optionally, the target area includes a preset area, and step S100 includes at least one of the following:
[0026] Determine or generate at least one segmentation line in the area corresponding to the decoding block, and divide the area into at least one target area according to the segmentation line;
[0027] Selecting at least one position point in the area corresponding to the decoding block as a segmentation point, and extending at least two non-overlapping segmentation lines from the segmentation point to the edge of the area, and dividing the area into at least one target area according to the segmentation lines;
[0028] Dividing the area corresponding to the decoding block into at least one preset area consisting of at least two non-preset areas;
[0029] determining or generating at least one target area according to at least one block partitioning mode;
[0030] Determine or generate a target area corresponding to each block partitioning mode.
[0031] Optionally, the step S200 includes:
[0032] The current block is reconstructed, a prediction region is determined or generated, each prediction region is merged, and a decoding block is determined or generated.
[0033] Optionally, the method of predicting the target area includes at least one of the following:
[0034] Make predictions for each target area based on the prediction model;
[0035] Predicting each target region according to inter-frame prediction and / or intra-frame prediction;
[0036] Each region is predicted according to at least one prediction mode and a prediction order corresponding to each region.
[0037] The present application also provides a processing device, comprising:
[0038] The encoding module is used to determine and divide the current block into at least one target area; predict the target area, and determine or generate a prediction block of the current block.
[0039] The present application also provides a processing device, comprising:
[0040] The decoding module is used to determine or generate at least one target area according to the block division mode of the current block; predict the target area, reconstruct the current block, and determine or generate a decoding block.
[0041] The present application also provides a processing device, including: a memory and a processor, wherein a processing program is stored on the memory, and when the processing program is executed by the processor, the steps of any of the processing methods described above are implemented. The processing device mentioned in the present application can be a smart terminal or a server, etc.
[0042] The present application also provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the processing methods described above are implemented.
[0043] As described above, the processing method of the present application can be applied to a processing device, including the steps of: dividing the current block into at least one target area; predicting the target area to determine or generate a prediction block for the current block. Through the above technical solution, it is possible to perform intra-frame prediction and / or inter-frame prediction on the target area after the current block is divided before encoding the current block, so as to determine or generate a more accurate prediction block, so that the coding efficiency is significantly improved when encoding is performed according to the prediction block. It also includes the steps of: determining or generating at least one target area according to the block division mode; reconstructing the target area to determine or generate a decoding block. It is possible to reconstruct the target area determined or generated according to the block division mode before decoding, so as to more accurately restore the coding block during encoding, that is, the prediction block at the decoding end, so that the decoding efficiency is significantly improved when the decoding block is subsequently determined or generated according to the obtained prediction block. It solves the problem of how to improve the accuracy and / or efficiency of video encoding and decoding prediction, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for describing the embodiments. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without inventive work.
[0045] FIG1 is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present application;
[0046] FIG2 is a diagram of a communication network system architecture provided by an embodiment of the present application;
[0047] FIG3 is a schematic flow chart of a processing method according to the first embodiment;
[0048] FIG4 is a schematic diagram of a block prediction framework based on block partitioning in a processing method according to the first embodiment;
[0049] FIG5 is a schematic diagram of an encoding scenario in a processing method according to the first embodiment;
[0050] FIG6 is a schematic diagram of block division based on a geometric angle α in a processing method according to the first embodiment;
[0051] FIG7 is a schematic diagram showing various offsets d of block division in the processing method according to the first embodiment;
[0052] FIG8 is a schematic diagram of performing block division at a division point in the processing method according to the first embodiment;
[0053] FIG9 is a schematic diagram of intra-frame prediction in the processing method according to the first embodiment;
[0054] FIG10 is a schematic diagram of weights in the processing method according to the first embodiment;
[0055] FIG11 is another schematic diagram of intra-frame prediction in the processing method according to the first embodiment;
[0056] FIG12 is a schematic diagram of intra-frame prediction and inter-frame prediction in the processing method according to the first embodiment;
[0057] FIG13 is a schematic diagram of non-rectangular and non-oblique line division in the processing method according to the first embodiment;
[0058] FIG14 is a schematic diagram of another non-rectangular and non-oblique line partition in the processing method according to the first embodiment;
[0059] FIG15 is a schematic diagram of another non-rectangular and non-oblique line partition in the processing method according to the first embodiment;
[0060] FIG16 is a schematic flow chart of a processing method according to a second embodiment;
[0061] FIG17 is a schematic flow chart of a processing method according to a third embodiment;
[0062] FIG18 is a schematic flow chart of a processing method according to a fourth embodiment;
[0063] FIG19 is a schematic flow chart of a processing method according to a fifth embodiment;
[0064] FIG20 is a schematic diagram of an encoding module according to a processing device;
[0065] FIG21 is a schematic diagram of a decoding module according to a processing device.
[0066] The purpose of this application, its features, and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and the accompanying text are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of this application to those skilled in the art by reference to specific embodiments.
[0067] Implementation Methods of the Application
[0068] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0069] It should be noted that, in this document, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined based on their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0070] It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this document, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the term "if" as used herein may be interpreted as "when," "when," or "in response to a determination." Furthermore, as used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It should be further understood that the terms "comprising" and "including" indicate the presence of the described features, steps, operations, elements, components, items, types, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, types, and / or groups. The terms "or," "and / or," "including at least one of the following," etc., used herein, may be interpreted as inclusive, or mean any one or any combination. For example, “comprising at least one of the following: A, B, C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”; and for another example, “A, B or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”. An exception to this definition will occur only when a combination of elements, functions, steps or operations are inherently mutually exclusive in some manner.
[0071] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are shown in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless clearly stated herein, the execution of these steps is not strictly limited in order, and they can be performed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0072] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0073] It should be noted that in this article, step codes such as S10 and S20 are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the order. When implementing the step, those skilled in the art may execute S20 first and then S10, etc., but these should all be within the scope of protection of this application.
[0074] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0075] In the subsequent description, the use of suffixes such as "module", "component" or "unit" to represent elements is only for the purpose of facilitating the description of the present application and has no specific meaning. Therefore, "module", "component" or "unit" can be used interchangeably.
[0076] The processing devices mentioned in this application may be smart terminals or servers, and the smart terminals may be implemented in various forms. For example, the smart terminals described in this application may include smart terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0077] The subsequent description will be made by taking a mobile terminal as an example. It will be understood by those skilled in the art that, in addition to components specifically used for mobile purposes, the configuration according to the embodiments of the present application can also be applied to fixed-type terminals.
[0078] Please refer to Figure 1, which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present application. The mobile terminal 100 may include components such as an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will understand that the mobile terminal structure shown in Figure 1 does not limit the mobile terminal. The mobile terminal may include more or fewer components than shown, or may combine certain components, or arrange the components differently.
[0079] The following is a detailed introduction to the various components of the mobile terminal in conjunction with Figure 1:
[0080] The RF unit 101 can be used to receive and transmit signals during information transmission or calls. Specifically, it receives downlink information from the base station and transmits it to the processor 110 for processing. Optionally, it can send uplink data to the base station. Typically, the RF unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and more. Furthermore, the RF unit 101 can communicate with the network and other devices via wireless communication. The above-mentioned wireless communications can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution) and 5G, etc.
[0081] WiFi is a short-range wireless transmission technology. A mobile terminal, through WiFi module 102, enables users to send and receive emails, browse web pages, and access streaming media, providing wireless broadband Internet access. Although FIG1 illustrates WiFi module 102, it is understood that it is not a required component of the mobile terminal and can be omitted as needed without altering the essence of the invention.
[0082] The audio output unit 103 can convert audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Furthermore, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, or the like.
[0083] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos captured by an image capture device (e.g., a camera) in video capture mode or image capture mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the GPU 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the RF unit 101 or the WiFi module 102. The microphone 1042 may receive sound (audio data) in operating modes such as a phone call mode, a recording mode, and a voice recognition mode, and may process such sound into audio data. In the phone call mode, the processed audio (voice) data may be converted into a format that can be transmitted to a mobile communication base station via the RF unit 101. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.
[0084] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Optionally, the light sensor includes an ambient light sensor and a proximity sensor. Optionally, the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described here.
[0085] The display unit 106 is used to display information input or provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0086] The user input unit 107 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile terminal. Optionally, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using a finger, stylus, or any other suitable object or accessory on or near the touch panel 1071) and drive the corresponding connection device according to a pre-set program. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Optionally, the touch detection device detects the user's touch direction and detects the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 110. It can also receive commands sent by the processor 110 and execute them. In addition, the touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may further include other input devices 1072. Optionally, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power keys, etc.), a trackball, a mouse, a joystick, etc., and the specifics are not limited here.
[0087] Optionally, the touch panel 1071 may overlay the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. The processor 110 then provides a corresponding visual output on the display panel 1061 based on the type of touch event. Although in FIG1 , the touch panel 1071 and the display panel 1061 are shown as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited to this specific embodiment.
[0088] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
[0089] Memory 109 can be used to store software programs and various data. Memory 109 may primarily include a program storage area and a data storage area. Optionally, the program storage area may store an operating system and at least one application required for a function (such as a sound playback function or an image playback function); the data storage area may store data generated based on the use of the mobile phone (such as audio data, a phone book, etc.). Furthermore, memory 109 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0090] Processor 110 is the control center of the mobile terminal, connecting all components of the mobile terminal using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 109 and accessing data stored in memory 109, it executes various functions of the mobile terminal and processes data, thereby providing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, processor 110 may integrate an application processor and a modem processor. Optionally, the application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 110.
[0091] The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.
[0092] Although not shown in FIG. 1 , the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.
[0093] To facilitate understanding of the embodiments of the present application, the communication network system on which the mobile terminal of the present application is based is described below.
[0094] Please refer to Figure 2, which is a communication network system architecture diagram provided in an embodiment of the present application. The communication network system is an LTE system of universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203 and an operator's IP service 204, which are connected in sequence.
[0095] Optionally, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0096] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022 . Optionally, eNodeB 2021 may be connected to other eNodeBs 2022 via a backhaul (eg, an X2 interface). eNodeB 2021 is connected to EPC 203 , and eNodeB 2021 may provide access from UE 201 to EPC 203 .
[0097] EPC 203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving Gate Way) 2034, a PGW (PDN Gate Way) 2035, and a PCRF (Policy and Charging Rules Function) 2036. Optionally, MME 2031 is a control node that processes signaling between UE 201 and EPC 203, providing bearer and connection management. HSS 2032 provides registers for managing functions such as the Home Location Register (not shown) and stores user-specific information such as service features and data rates. All user data can be sent through SGW2034, PGW2035 can provide IP address allocation and other functions for UE 201, PCRF2036 is the policy and charging control policy decision point for service data flow and IP bearer resources, and it selects and provides available policy and charging control decisions for the policy and charging execution function unit (not shown in the figure).
[0098] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services.
[0099] Although the above introduction takes the LTE system as an example, those skilled in the art should know that this application is not only applicable to the LTE system, but can also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, 5G and future new network systems (such as 6G), etc., which are not limited here.
[0100] Based on the above-mentioned mobile terminal hardware structure and communication network system, various embodiments of the present application are proposed.
[0101] First embodiment
[0102] 3 is a flow chart of a processing method according to a first embodiment. The processing method of the embodiment of the present application can be applied to a processing device (such as a smart terminal or a server), and includes the following steps:
[0103] S10: determining at least one target area from the current block, wherein the target area includes a preset area, wherein the preset area includes a non-rectangular area;
[0104] S20: Predict the target area, and determine or generate a prediction block of the current block.
[0105] In this embodiment, the processing device may first determine a coding block to be predicted. The coding block may be a frame of image or a segmented image block of a frame of image, without limitation. Alternatively, the processing device may be a smart terminal, such as a mobile phone or computer, or a server or cloud server.
[0106] Optionally, the processing device may store various images and videos in advance and select an image to be predicted from each image as a coding block, or segment the selected image and use the segmented image block as the coding block. Alternatively, a frame of image may be extracted from a video sequence as a coding block, or the extracted frame of image may be segmented and processed to obtain the resulting image block as the coding block. Alternatively, the processing device may receive an input image or video and extract a frame of image from the image or video as a coding block, or segment the extracted frame of image to obtain the resulting image block as the coding block. Alternatively, the processing device may receive an image or video sent from another network device and extract a frame of image from the image or video as a coding block, or segment the extracted frame of image to obtain the resulting image block as the coding block. In this case, the processing device may pre-establish a communication connection with a network device on the network side of the mobile communication system in which it is located. Thus, the network device can transmit the image or video to the terminal device via this communication connection, and the terminal device will then receive the image or video.
[0107] Optionally, a division rule is established to divide the coding block to be encoded into at least one non-rectangular region as the current block. Intra-frame prediction and / or inter-frame prediction are performed on these regions separately, and the final results are merged to obtain a more accurate block prediction result, namely the prediction block. Then, each image block is subtracted from the prediction block to obtain a residual block. The residual block is transformed and quantized, and then encoded by an entropy encoder and sent to the decoding end.
[0108] Optionally, for step S10: determining at least one target area from the current block, optionally, the target area includes a preset area, and the preset area includes a non-rectangular area.
[0109] Optionally, after the processing device obtains the coding block, it can determine the current block in the coding block and perform a partitioning process on the current block. When performing the partitioning process, the current block can be divided into at least one target area according to a pre-set block partitioning mode, and the target area includes at least one preset area. Optionally, the block partitioning mode can be a pre-set partitioning rule, and according to the partitioning rule, the current block can be divided into at least one target area, and the target area includes at least one preset area. Optionally, the target area is not limited to the preset area and can also include non-preset areas.
[0110] Optionally, the preset area may include a non-rectangular area. Optionally, the non-rectangular area may include a triangular area, a non-rectangular quadrilateral area, a pentagonal area, or a non-rectangular polygonal area composed of at least two rectangular areas. In addition, the non-rectangular area may also be an irregularly shaped area, which is not limited here.
[0111] Optionally, the target area may be an area to be predicted. In this embodiment, all areas formed after the current block is divided may be selected as target areas, or one or more areas may be selected as target areas, and the selected target areas need to include at least one preset area.
[0112] Optionally, when dividing the current block, the current block may be divided at least once, and the block division mode selected for each division may be the same or different. Optionally, when dividing the current block multiple times, a geometric division method may be combined with a block division mode until the final divided area includes at least one target area, and the target area includes at least one preset area. The geometric division method may include dividing the current block using geometrically positioned segmentation lines.
[0113] Optionally, assuming that there are 10 block division modes, the encoder may select all or some of the block division modes and divide the current block according to the selected block division mode to obtain at least one target region, wherein the target region includes at least one preset region. Furthermore, when selecting the block division mode, an RDCost (rate-distortion cost) value may be calculated for the selected block division mode, and then the smallest RDCost value is selected from the calculated RDCost values. The block division mode corresponding to the smallest RDCost value is selected as the selected block division mode, and the current block is then divided according to the selected block division mode to obtain at least one target region, wherein the target region includes at least one preset region.
[0114] Alternatively, if the current block needs to be divided into three or more regions, the current block can be divided twice or more. The first time, the current block is divided into two regions, and the second time, one of the regions is divided into two more regions. Furthermore, at least one of the three divided regions is a predefined region, such as a non-rectangular region.
[0115] Optionally, for step S20: predict the target area to determine or generate a predicted block of the current block.
[0116] Optionally, after the current block is divided into at least one target region, prediction can be performed on the target region. For example, prediction can be performed on the target region using a prediction module or a pre-set prediction mode. A prediction block for the current block is then determined or generated based on the prediction result of the target region.
[0117] Optionally, prediction can be performed on all regions after the current block is divided, including the target region, and the prediction results of all regions are merged, and the merged result is used as the prediction block of the current block.
[0118] Alternatively, as shown in FIG4 , D in FIG4 is the original pixel block to be predicted, that is, the current block. D1 is the first region segmented by D. D2 is the second region segmented by D. Dn is the nth region segmented by D. is the prediction result of D1. is the prediction result for D2. is the prediction result of Dn. is the prediction result of D. Assuming that the current block is D, the block partitioning module divides D into n non-rectangular regions, namely D1…D n , n≥2. The block partitioning module may include a block partitioning mode, such as a block partitioning mode based on geometric lines, or other optional block partitioning modes. The segmentation result of the current block is:
[0119] The area determined or generated is D1…D n , and input it into the subsequent "regional prediction" module. This module may include at least one prediction mode, such as intra-frame prediction, inter-frame prediction, etc. Optionally, intra-frame prediction can be an angle prediction mode, a DC prediction mode, a plane prediction mode, an intra-block copy (IBC), a matrix weighted prediction technology, etc. Inter-frame prediction can include spatial domain MV prediction, temporal domain MV prediction, inter-frame and intra-frame joint prediction, etc. Optionally, "mode i", "mode j" and "mode k" in Figure 4 can be either an inter-frame prediction mode or an inter-frame prediction mode. The "regional prediction" module will output the prediction result Corresponding to D1…D n The "region merging" module can be considered as the inverse process of "block division", which combines the predicted regions Spliced into That is:
[0120] Optionally, please refer to Figure 5. In the encoding scenario of Figure 5, the current block to be predicted is D, which has a size of 25x32 pixels and can be any rectangular shape (including a square), and the upper neighbor information of the current block D is B (including at least one row of pixels). The left neighbor information of the current block D is C (including at least one column of pixels). The upper left neighbor information of the current block D is A (including at least one pixel). Optionally, as shown in Figure 5, the current block D also has two corresponding reference frames RF1 and RF2. It should be noted that the neighboring pixel blocks A, B, and C of the current block D do not necessarily need to exist. Similarly, the reference frame RF1 and the reference frame RF2 do not necessarily need to exist. Optionally, assuming that at least one of A, B, C, RF1 and RF2 exists, the current block D is segmented and predicted to obtain the prediction block corresponding to the current block D.
[0121] Optionally, when dividing the current block D, as shown in FIG6 , the center of the rectangle D corresponding to the current block D can be used as the center of the circle, and 360 degrees can be divided into equal parts according to α, resulting in 180 / α dividing lines. For example, when α = 22.5, 180 / 22.5 = 8 dividing lines can be obtained, and the current block D can be divided based on these dividing lines.
[0122] Alternatively, based on the segmentation lines calculated in Figure 6, we can select any segmentation line and offset it up and down by d at equal intervals. This segmentation line can then be used to derive multiple segmentation lines. As shown in Figure 7, this segmentation line is offset up and down by d = 5.75 pixels at equal intervals, resulting in seven different segmentation lines, which are used to segment the current block D.
[0123] Optionally, all the segmentation lines in Figure 6 can be offset up and down by d at equal intervals. Therefore, when α = 22.5 and d = 5.75, 8 * 7 = 56 segmentation lines can be obtained. Each segmentation line can divide the current block D into at least two regions. In this case, the current block can be divided according to the 56 segmentation lines.
[0124] Alternatively, as shown in Figure 8 , use any point in rectangle D corresponding to the current block D as an endpoint of a line segment and divide 360 degrees into equal parts according to α, resulting in 360 / α line segments. When α = 22.5, 360 / 22.5 = 16 segmentation segments are obtained. Then, using the n line segments in Figure 7 , rectangle D is divided into n+1 non-rectangular regions.
[0125] Alternatively, as shown in FIG9 , it is assumed that the neighbor information of the current block D includes neighbor pixel blocks A, B, and C. If a middle oblique line (such as the dotted line in FIG9 ) is used as a dividing line to divide the rectangle D, two regions D1 and D2 are obtained. In FIG9 , X1 represents the intra-frame prediction mode / direction that matches the D1 block. The intra-frame prediction mode X1 is performed on D, and the obtained result is The intra prediction mode X1 can be, but is not limited to, the following intra prediction modes: Planar mode, DC mode, and 65 angle prediction modes; cross-component prediction mode; neural network-based intra prediction, etc. Similar to X1, X2 represents the intra prediction mode / direction that matches the D2 block. The intra prediction mode X2 is performed on D, and the result is At this time, the weight matrix can be combined and Get the prediction result for D The merge formula can be:
[0126] W1 means The corresponding weight, W2 represents For example, as shown in Figure 10, the weight matrices corresponding to D1-X1 and D2-X2 are W1 and W2 respectively.
[0127] Alternatively, as shown in FIG11 , assume that the neighbor information of the current block D includes neighbor pixel blocks A, B, and C. If three line segments (such as the dotted lines in FIG11 ) starting from a dividing point in rectangle D are divided into three regions D1, D2, and D3. In FIG11 , X1 represents the intra-frame prediction mode / direction matching the D1 block, and the intra-frame prediction mode X1 is performed on D, the result is The intra prediction mode X1 can be, but is not limited to, the following intra prediction modes: Planar mode, DC mode, and 65 angle prediction modes; cross-component prediction mode; neural network-based intra prediction, etc. Similar to X1, X2 represents the intra prediction mode / direction that matches the D2 block. The intra prediction mode X2 is performed on D, and the result is Similar to X1 and X2, X3 represents the intra prediction mode / direction matching the D3 block. The intra prediction mode X3 is performed on D, and the result is
[0128] At this time, the weight matrix can be combined and Get the prediction result for D The merge formula can be:
[0129] W1 means The corresponding weight, W2 represents The corresponding weight, W3 represents The corresponding weight.
[0130] Optionally, as shown in FIG12 , the current block to be predicted is D, which can be any rectangular shape (including a square), and the upper neighbor information of the current block D is B (including at least one row of pixels). The left neighbor information of the current block D is C (including at least one column of pixels). The upper left neighbor information of the current block D is A (including at least one pixel). Optionally, as shown in FIG12 , the current block D also has two corresponding reference frames RF1 and RF2. If three line segments starting from a dividing point in rectangle D are divided into three regions D1, D2 and D3. MV1 inter-frame prediction can be performed on D to obtain Motion Vector (MV) 1 represents the inter-frame prediction motion vector that matches the D1 block. Similar to MV1, MV2 represents the inter-frame prediction motion vector that matches the D2 block. MV2 inter-frame prediction is performed on D, and we get X3 represents the intra prediction mode / direction that matches the D3 block. The intra prediction mode X3 is performed on D, and we get
[0131] At this time, the weight matrix can be combined and Get the prediction result for D The merge formula can be:
[0132] W1 means The corresponding weight, W2 represents The corresponding weight, W3 represents The corresponding weight.
[0133] Optionally, as shown in FIG13 , the current block to be predicted is D, which can be any rectangular shape (including a square), and the upper neighbor information of the current block D is B (including at least one row of pixels). The left neighbor information of the current block D is C (including at least one column of pixels). The upper left neighbor information of the current block D is A (including at least one pixel). Optionally, as shown in FIG13 , the current block D also has two corresponding reference frames RF1 and RF2. In FIG13 , the current block D is divided into two regions, and the two regions are D1 and D2. The motion vector MV1 represents the inter-frame prediction motion vector that matches the D1 block. MV1 prediction is performed on D to obtain X2 represents the intra-frame prediction mode / direction matching the D2 block. The intra-frame prediction mode X2 is performed on D, and the result is Then use the weight matrix to merge and Get the prediction result for D The merge formula can be:
[0134] W1 means The corresponding weight, W2 represents The corresponding weight.
[0135] Optionally, as shown in FIG14 , the current block to be predicted is D, which can be any rectangular shape (including a square), and the upper neighbor information of the current block D is B (including at least one row of pixels). The left neighbor information of the current block D is C (including at least one column of pixels). The upper left neighbor information of the current block D is A (including at least one pixel). Optionally, as shown in FIG14 , the current block D also has two corresponding reference frames RF1 and RF2. In FIG14 , the current block D is divided into two regions, and the two regions are D1 and D2. The motion vector MV1 represents the inter-frame prediction motion vector that matches the D1 block. MV1 prediction is performed on D to obtain X2 represents the intra-frame prediction mode / direction matching the D2 block. The intra-frame prediction mode X2 is performed on D, and the result is Then use the weight matrix to merge and Get the prediction result for D The merge formula can be:
[0136] W1 means The corresponding weight, W2 represents The corresponding weight.
[0137] Optionally, as shown in FIG15 , the current block to be predicted is D, which can be any rectangular shape (including a square), and the upper neighbor information of the current block D is B (including at least one row of pixels). The left neighbor information of the current block D is C (including at least one column of pixels). The upper left neighbor information of the current block D is A (including at least one pixel). Optionally, as shown in FIG15 , the current block D also has two corresponding reference frames RF1 and RF2. The rectangular area corresponding to the current block D is divided into three non-rectangular areas, namely D1, D2 and D3. The motion vector MV1 represents the inter-frame prediction motion vector that matches the D1 block. The MV1 inter-frame prediction is performed on the current block D to obtain MV2 represents the inter-frame prediction motion vector that matches the D2 block. MV2 inter-frame prediction is performed on the current block D, and the result is X3 represents the intra-frame prediction mode / direction matching the D3 block. The intra-frame prediction mode X3 is performed on the current block D, and the result is At this time, the weight matrix can be combined and Get the prediction result for D The merge formula can be:
[0138] W1 means The corresponding weight, W2 represents The corresponding weight, W3 represents The corresponding weight.
[0139] In this embodiment, through the above-mentioned technical solution, it is possible to perform intra-frame prediction and / or inter-frame prediction on the target area after the current block is divided before encoding the current block, so as to determine or generate a more accurate prediction block, thereby achieving a significant improvement in coding efficiency when subsequent encoding is performed based on the prediction block, thereby improving the user experience.
[0140] In the second embodiment, please refer to FIG16 , which is a schematic diagram of the specific flow of step S10 in the first embodiment of the processing method of this application. In this embodiment, based on any of the above embodiments, step S10 of the processing method may include at least one of the following:
[0141] Method 1: determining or generating at least one segmentation line in the current block, and determining at least one target area from the current block according to the segmentation line, wherein the target area includes a preset area;
[0142] Optionally, the non-preset area may include a rectangular area (including a square area). The preset area may include a non-rectangular area. The target area may be an area to be predicted generated after dividing the current block.
[0143] Optionally, when dividing the current block, at least one segmentation line may be first determined or generated within the current block. The at least one segmentation line may be determined or generated by randomly generating the at least one segmentation line within the current block. Alternatively, the at least one segmentation line may be generated within the current block based on a preset rule. Alternatively, the at least one segmentation line may be generated based on an edge line within the current block. The segmentation line may be a straight line, a line segment, a curve, or the like.
[0144] Optionally, when a non-preset area needs to be divided multiple times, all the dividing lines and the dividing order of each dividing line can be determined first, and then each dividing line can be selected according to the dividing order to divide the current block. Alternatively, the dividing lines can be determined before each division, that is, a dividing line is determined, the current block is divided according to the dividing line, and then another dividing line is determined, and the non-preset area after the division is divided is divided again according to the other dividing line, until a certain number of divisions is reached and at least one pre-set area exists in the divided area.
[0145] Optionally, after determining at least one segmentation line, the current block can be divided along the segmentation line to obtain at least one target area, where the target area includes a predetermined area. For example, assuming the non-preset area is a rectangular area corresponding to the current block, a segmentation line can be formed by connecting two diagonal vertices of the rectangular area as endpoints, and the rectangular area can be divided into two triangular areas along the segmentation line. In this case, the predetermined area can be a triangular area, and the target area can be two triangular areas.
[0146] Method 2: selecting at least one location point in the current block as a segmentation point, and extending at least two non-overlapping segmentation lines from the segmentation point to the edge of the current block, and dividing the current block into at least one target area according to the segmentation lines, wherein the target area includes a preset area;
[0147] Optionally, when dividing the current block, at least one location point may be selected within the current block to generate a segmentation line based on the location point. Optionally, when selecting the location point, the location point may be selected at any location within the current block, such as the center or edge of the current block. The number of location points selected may be one or more.
[0148] Optionally, after selecting at least one position point, the selected position point may be used as a segmentation point, and at least two non-overlapping segmentation lines may be extended from the segmentation point as a starting point to the edge of the current block. Optionally, when the selected position point is any point within the current block, the selected position point may be used as a segmentation point, and at least one segmentation line may be extended from the segmentation point as a starting point to the edge of the current block. Then, with the selected position point as the center of the circle, 360 degrees may be equally divided according to a certain angle to determine the dividing angle. Then, with the selected position point as the starting point, multiple segmentation lines may be generated within the current block based on the segmentation lines and the dividing angles.
[0149] Optionally, when the selected position point is an edge position point of the current block, the selected position point can be used as a segmentation point, and at least one segmentation line can be extended from the segmentation point as a starting point to another edge position point. For example, assuming that the non-preset area corresponding to the current block is a rectangular area, and the four sides of the rectangular area are a, b, c, and d respectively. If the selected position point is at any point on edge a, the selected position point is used as a segmentation point (such as a center point), and the segmentation point is used as a starting point to extend to any point on edge b, and / or to any point on edge c, and / or to any point on edge d, to form at least one segmentation line.
[0150] Optionally, after determining at least one segmentation line, the current block can be divided according to the segmentation line to determine or obtain at least one target area. Furthermore, when dividing the current block, at least one position point can be selected in the current block as a segmentation point, and at least two non-overlapping segmentation lines can be extended from the segmentation point to the edges of the current block. The current block can then be divided according to the segmentation lines. At least one area among all the divided areas can then be selected to again perform the steps of selecting at least one position point as a segmentation point and extending at least two non-overlapping segmentation lines from the segmentation point to the edges of the non-preset area, until no further segmentation processing is performed.
[0151] Method three: determining from the current block at least one preset area consisting of at least two non-preset areas.
[0152] Optionally, when dividing the current block, a non-preset area corresponding to the current block, such as a rectangular area, is first determined. The rectangular area can then be copied, and the length and width of the copied rectangular area can be reduced by a certain ratio. The reduction ratios of the length and width of the rectangle can be the same or different, to obtain a reduced rectangular area. Optionally, the copied rectangular area can be reduced multiple times, and the reduction ratios can be different each time. The multiple reduced rectangular areas are then spliced together to obtain a spliced area. Optionally, the area of the spliced area is smaller than that of the rectangular area, and the spliced area can be a non-rectangular area. The spliced area is then placed on the rectangular area, so that the rectangular area completely covers the spliced area. Line segments within the rectangular area that overlap with all sides of the spliced area can be determined, and the overlapping line segments are used as dividing lines. The rectangular area is then divided according to the dividing lines to obtain a non-rectangular area comprising at least one non-rectangular area composed of at least two rectangular areas, and the composed non-rectangular area is used as the pre-set area.
[0153] Optionally, when dividing the non-preset area corresponding to the current block into at least one preset area consisting of at least two non-preset areas, at least two non-preset areas may be first determined, such as two rectangles of different sizes, and then the two non-preset areas may be combined into one preset area, such as by combining the two rectangles of different sizes into a non-rectangle, such as a convex shape. Furthermore, the non-preset area corresponding to the current block may be divided according to the preset areas, such as by the shapes of the preset areas, so that the non-preset area corresponding to the current block is divided into at least one preset area consisting of the at least two non-preset areas.
[0154] Optionally, the rectangular area corresponding to the current block may be divided into at least two areas according to a preset rule, and optionally, at least one area is a non-rectangular area consisting of at least two rectangular areas. The preset rule may be a division rule set in advance.
[0155] In this embodiment, the non-preset area is divided into at least one target area according to at least one dividing line in the non-preset area corresponding to the current block, and the target area includes a preset area; or, any position point in the current block is used as a dividing point, and at least two non-overlapping dividing lines are extended from the dividing point to the edge of the current block, and then the current block is divided into at least one target area according to the dividing line, and the target area includes a preset area; or, the current block is divided into at least one preset area consisting of at least two non-preset areas, so that the current block can be divided in a variety of ways to ensure the validity of the obtained target area.
[0156] In the third embodiment, please refer to FIG17 , which is a schematic diagram of the specific flow of step S20 in the first embodiment of the processing method of the present application. In this embodiment, based on any of the above embodiments, step S20 of the processing method may include:
[0157] Perform prediction on each target area and determine or generate at least one prediction area;
[0158] All the prediction regions are merged to determine or generate a prediction block for the current block.
[0159] In this embodiment, after the current block is divided to obtain the target region, prediction can be performed based on the target region to determine or generate a prediction block for the current block. Optionally, after determining or generating at least one target region, one or more target regions can be selected for prediction.
[0160] Optionally, when predicting the target region, at least a preset region needs to be predicted. Optionally, prediction can be performed on each target region to determine or generate at least one predicted region. Optionally, the target region can include at least one region having at least one preset region after the current block is divided.
[0161] Optionally, when predicting the target area, each target area may be predicted according to a prediction rule set in advance to determine or generate at least one predicted area.
[0162] Optionally, the prediction rule may be inter-frame prediction and / or intra-frame prediction, or may be other types of rules for prediction.
[0163] Optionally, when predicting multiple target regions, a corresponding prediction rule may be selected for each target region for prediction. The selected prediction rules may be the same or different. For example, there are three target regions, the first two target regions are selected for intra-frame prediction, and the last target region is selected for inter-frame prediction.
[0164] Optionally, a prediction is performed for each target area, including at least one of the following:
[0165] Method 1: predict each target area based on at least one prediction model;
[0166] Optionally, when predicting each target region, at least one prediction mode may be selected for each target region. Optionally, the prediction mode may be an angular prediction mode, a direct current prediction mode, a planar prediction mode, a sub-block-based inter-frame prediction mode, or a prediction mode set by the user based on their own needs, and specifically, no limitation is imposed herein.
[0167] Optionally, before predicting each target area, it is necessary to first select at least one prediction mode from a plurality of prediction modes set in advance. Furthermore, when selecting a prediction mode, at least one prediction mode may be selected from the plurality of prediction modes based on the target area to be predicted. Prediction is then performed on each target area based on the at least one selected prediction mode. Furthermore, when predicting a target area, multiple prediction modes may be selected simultaneously to jointly predict the target area, or only one prediction mode may be selected to predict the target area. For example, assuming there are three target areas to be predicted, one prediction mode may be selected for the first target area, two prediction modes may be selected for the second target area, and three prediction modes may be selected for the third target area.
[0168] Method 2: performing inter-frame prediction and / or intra-frame prediction on each target area;
[0169] Optionally, after determining the target area formed after the current block is divided, inter-frame prediction may be performed on each target area, or intra-frame prediction may be performed, or inter-frame prediction and intra-frame prediction may be performed simultaneously.
[0170] Optionally, intra-frame prediction can utilize the spatial correlation of the image, and based on this spatial correlation, predict the current coding block through the block information of some neighboring image blocks. The block information is a reconstructed block generated after encoding, and the redundancy of spatial information is removed to achieve data compression. The intra-frame prediction process can obtain the reconstructed neighbor information of the coding block to be predicted (for example, the left, top, upper left, upper right, and lower right pixels of the current coding block), and then perform calculations based on the reconstructed neighbor information, and filter the calculation results to obtain the prediction result.
[0171] Optionally, inter-frame prediction can be performed by using an encoded image as a reference image for the current image to obtain motion information of each block of the current image in the reference image, which can be represented by a motion vector and a reference frame index. The reference image can be forward, backward, or bidirectional, and the process of obtaining the motion information of the current block can be to directly inherit the motion information from neighboring blocks, such as searching for matching blocks in the reference image through motion estimation to obtain corresponding motion information, and then obtaining a predicted value of the current block, that is, a prediction result, through a motion compensation process.
[0172] Optionally, intra-frame prediction may include angular prediction mode, direct current prediction mode, planar prediction mode, intra-block copy (IBC), matrix weighted prediction technology, etc. Inter-frame prediction may include spatial MV prediction, temporal MV prediction, inter-frame weighted prediction, inter-frame and intra-frame joint prediction, etc.
[0173] Method three: predict each target area according to at least one prediction mode and a prediction order corresponding to each area.
[0174] Optionally, before predicting each target region, it is necessary to obtain in advance at least one prediction mode corresponding to each target region, and determine a prediction order for performing prediction using the obtained at least one prediction mode.
[0175] Optionally, when selecting a prediction mode, at least one prediction mode set in advance may be determined first, and the RDCost value corresponding to at least one prediction mode may be calculated based on the target area to be predicted. The minimum RDCost value and its corresponding prediction mode may be selected from among the RDCost values, and the target area to be predicted may be predicted based on the selected prediction mode. Optionally, if multiple prediction modes need to be selected to jointly predict the target area to be predicted, selection may also be made from the prediction modes based on the RDCost value.
[0176] Optionally, when determining the prediction order, the prediction order can be determined based on the size of each target area or the position of each target area. After determining the prediction order and at least one prediction mode corresponding to each target area, prediction can be performed for each target area.
[0177] Optionally, after predicting each target region, a corresponding prediction region is obtained. The prediction region can be the prediction result generated after predicting the target region. Each predicted target region has a corresponding prediction region. Once all prediction regions are obtained, they can be merged to determine or generate a prediction block for the current block.
[0178] Optionally, when merging the prediction regions, a weighted addition process may be performed. For example, a different weight ratio is set for each prediction region, and each prediction region is then added together according to the corresponding weight ratio to determine or generate the prediction block of the current block. Alternatively, the predicted pixel values of the prediction regions may be concatenated to determine or generate the prediction block of the current block.
[0179] In this embodiment, each target region is predicted according to at least one prediction mode, or inter-frame prediction and / or intra-frame prediction is performed on each target region, or each target region is predicted according to at least one prediction mode and a prediction order corresponding to each region to determine or generate at least one prediction region, and then all prediction regions are merged to determine or generate a prediction block of the current block, thereby improving the accuracy of the obtained prediction block.
[0180] Fourth embodiment
[0181] Please refer to Figure 18, which is a flowchart of a fourth embodiment of the processing method of the present application. In this embodiment, the processing method of the present application can be applied to a processing device (such as a server or a smart terminal), including the following steps:
[0182] S100: Determine or generate at least one target area according to a block division mode of a current block;
[0183] Optionally, when the processing device is a decoding end, at least one block division mode can be decoded from the bitstream and then at least one target region can be determined or generated based on the block division mode. Alternatively, multiple block division modes, or multiple block division modes and prediction orders, can be decoded from the bitstream. After the decoding end obtains the block division mode through decoding the bitstream, at least one corresponding target region is determined. The target region can be a region determined or generated by the decoding end within a non-preset region based on the block division mode.
[0184] Optionally, the target area includes a preset area, and step S100 includes at least one of the following:
[0185] Method 1: determining or generating at least one segmentation line in the area corresponding to the decoding block, and dividing the area into at least one target area according to the segmentation line;
[0186] Optionally, the non-preset area may include a rectangular area (including a square area). The preset area may include a non-rectangular area. Optionally, the non-rectangular area may include a triangular area, a non-rectangular quadrilateral area, a pentagonal area, or a non-rectangular polygonal area composed of at least two rectangular areas. In addition, the non-rectangular area may also be an irregularly shaped area, which is not limited here.
[0187] After decoding and obtaining the block partitioning pattern at the decoding end, at least one partitioning line can be determined or generated within the region corresponding to the decoded block based on the block partitioning pattern. Optionally, the region corresponding to the decoded block may be a non-preset region. Furthermore, the at least one partitioning line can be determined or generated by randomly generating the at least one partitioning line within the region corresponding to the decoded block. Alternatively, the at least one partitioning line can be generated within the region corresponding to the decoded block based on a preset rule. Alternatively, the at least one partitioning line can be generated based on an edge line within the region corresponding to the decoded block. The partitioning line can be a straight line, a line segment, a curve, or the like.
[0188] Optionally, when the area corresponding to the decoding block needs to be divided multiple times, all the dividing lines and the dividing order of each dividing line can be determined first, and then each dividing line can be selected according to the dividing order to divide the area corresponding to the decoding block. Alternatively, the dividing lines can be determined before each division, that is, a dividing line is determined, and the area corresponding to the decoding block is divided according to the dividing line. Then, another dividing line is determined, and the non-preset area after the division is divided is divided again according to the other dividing line, until a certain number of divisions is reached and the divided area includes the preset area.
[0189] Optionally, after determining at least one segmentation line, the area corresponding to the decoded block can be divided along the segmentation line to obtain at least one target area. For example, assuming the non-preset area is a rectangular area corresponding to the decoded block, a segmentation line can be formed by connecting two diagonal vertices of the rectangular area as endpoints, and the rectangular area can be divided into two triangular areas along the segmentation line. In this case, the pre-set area can be a triangular area, and the target area can be two triangular areas.
[0190] Method 2: selecting at least one position point in the area corresponding to the decoding block as a segmentation point, and extending at least two non-overlapping segmentation lines from the segmentation point to the edge of the area, and dividing the area into at least one target area according to the segmentation lines;
[0191] Optionally, at least one location point may be selected within the region corresponding to the decoded block, so that a segmentation line is generated based on the location point. Optionally, when selecting the location point, the location point may be selected at any location within the region corresponding to the decoded block, such as the center or edge of the region corresponding to the decoded block. The number of location points selected may be one or more.
[0192] Optionally, after selecting at least one position point, the selected position point can be used as a segmentation point, and at least two non-overlapping segmentation lines can be extended from the segmentation point as a starting point to the edge of the area corresponding to the decoding block. Optionally, when the selected position point is any point within the area corresponding to the decoding block, the selected position point can be used as a segmentation point, and at least one segmentation line can be extended from the segmentation point as a starting point to the edge of the area corresponding to the decoding block, and then 360 degrees can be divided into equal parts according to a certain angle with the selected position point as the center of the circle to determine the equal division angle, and then multiple segmentation lines can be generated within the area corresponding to the decoding block based on the segmentation lines and the equal division angles with the selected position point as the starting point.
[0193] Optionally, if the selected position point is an edge position point of the area corresponding to the decoding block, the selected position point can be used as a segmentation point, and at least one segmentation line can be extended from the segmentation point as a starting point to another edge position point. For example, assuming that the area corresponding to the decoding block is a rectangular area, and the four sides of the rectangular area are a, b, c, and d respectively. If the selected position point is any point on side a, the selected position point is used as the segmentation point, and the segmentation line is extended from the segmentation point as a starting point to any point on side b, and / or to any point on side c, and / or to any point on side d, to form at least one segmentation line.
[0194] Optionally, after determining at least one segmentation line, the area corresponding to the decoding block can be divided according to the segmentation line to determine or obtain at least one target area, and the target area includes at least one preset area. Furthermore, when dividing the area corresponding to the decoding block, at least one position point can be selected in the area corresponding to the decoding block as a segmentation point, and at least two non-overlapping segmentation lines can be extended from the segmentation point to the edge of the area corresponding to the decoding block, and the area corresponding to the decoding block can be divided according to the segmentation line. At least one area can be selected from all the divided areas to perform the steps of selecting at least one position point as a segmentation point again and extending at least two non-overlapping segmentation lines from the segmentation point to the edge of the area, until no further segmentation processing is performed.
[0195] Method 3: Divide the area corresponding to the decoding block into at least one preset area consisting of at least two non-preset areas;
[0196] Optionally, when decoding at the decoding end obtains an area corresponding to a decoding block, such as a rectangular area, the rectangular area can be copied, and the length and width of the copied rectangular area can be reduced by a certain ratio to obtain a reduced rectangular area. Optionally, the copied rectangular area can be reduced multiple times, and the ratio of each reduction process may not necessarily be the same. The multiple reduced rectangular areas are then spliced together to obtain a spliced area. Optionally, the area of the spliced area is smaller than the area of the rectangular area, and the spliced area can be a non-rectangular area. The spliced area is then placed on the rectangular area, and the rectangular area completely covers the spliced area. The line segments in the rectangular area that coincide with all sides of the spliced area can be determined, and the overlapping line segments can be used as dividing lines. The rectangular area is then divided according to the dividing lines to obtain a non-rectangular area including at least one non-rectangular area composed of at least two rectangular areas, wherein the target area can include the composed non-rectangular areas.
[0197] Optionally, when dividing the area corresponding to the decoding block into at least one preset area consisting of at least two non-preset areas, at least two non-preset areas may be first determined, such as two rectangles of different sizes, and then the two non-preset areas may be combined into one preset area, such as by combining the two rectangles of different sizes into a non-rectangle, such as a convex shape. Furthermore, the non-preset area corresponding to the decoding block may be divided according to the preset areas, such as by the shape of the preset areas, so that the non-preset area corresponding to the decoding block is divided into at least one preset area consisting of the at least two non-preset areas.
[0198] Method 4: determining or generating at least one target area according to at least one block division mode;
[0199] Optionally, when the decoder obtains at least one block division mode through bitstream decoding, the decoder can directly determine the target region obtained by dividing the current block according to the block division mode at the encoder and use it as the target region at the decoder. Alternatively, at least one target region can be selected from all regions corresponding to the block division mode.
[0200] Method 5: Determine or generate the target area corresponding to each block division pattern.
[0201] Optionally, after obtaining at least one block division mode by decoding the bitstream at the decoding end, since there may be multiple target areas generated or determined based on each block division mode, it is necessary to determine or generate the target area corresponding to each block division mode at the decoding end.
[0202] S200: Predict the target area, reconstruct the current block, and determine or generate a decoding block.
[0203] Optionally, after all target areas are determined at the decoding end, each target area can be predicted, the current block can be reconstructed to obtain a predicted block of the original coding block, and then the predicted block can be filtered and processed to determine or generate a decoding block.
[0204] In this embodiment, the non-preset area corresponding to the decoding block is divided into at least one target area including at least one preset area according to at least one dividing line within the non-preset area; or, any position point within the non-preset area corresponding to the decoding block is used as a dividing point, and at least two non-overlapping dividing lines are extended from the dividing point toward the edge of the non-preset area, and then, according to the dividing lines, the non-preset area is divided into at least one target area including at least one preset area; or, the non-preset area corresponding to the decoding block is divided into a target area including at least one preset area consisting of at least two non-preset areas; or, at least one target area is determined or generated according to at least one block division mode, or, target areas corresponding to each block division mode are determined or generated, and then the target areas are reconstructed to determine or generate decoding blocks. This allows, before decoding, the target areas determined or generated according to the block division modes to be reconstructed separately to more accurately restore these target areas, and then these restored target areas are merged to obtain coding blocks according to the accurate encoding, i.e., prediction blocks at the decoding end. This significantly improves decoding efficiency when subsequently determining or generating decoding blocks based on the obtained prediction blocks, and the determined or generated decoding blocks are more accurate.
[0205] In the fifth embodiment, please refer to FIG19 , which is a schematic diagram of a specific flow chart of step S200 in the fourth embodiment of the processing method of the present application. In this embodiment, based on any of the above embodiments, step S200 of the processing method may include:
[0206] The target area is predicted, the current block is reconstructed, a prediction area is determined or generated, each prediction area is merged, and a decoding block is determined or generated.
[0207] Optionally, after the decoder determines each target region, it can reconstruct the current block corresponding to each target region to determine or generate a prediction region. The reconstruction of the current block can be performed using inter-frame prediction and / or intra-frame prediction, or other prediction modes. After the reconstruction of each target region, at least one prediction region is determined or generated. All prediction regions are then merged to obtain a prediction block for the original coded block. The prediction block is then filtered and subjected to a series of other processes to determine or generate a decoded block.
[0208] Optionally, the method of predicting the target area includes at least one of the following:
[0209] Method 1: Make predictions for each target area based on the prediction model;
[0210] Optionally, the prediction mode can be an angular prediction mode, a DC prediction mode, a planar prediction mode, a sub-block-based inter-frame prediction mode, etc., as well as a prediction mode set by the user based on his or her own needs. Specifically, there is no limitation here.
[0211] Optionally, before predicting each target region, at least one prediction mode used by the encoder to predict the target region may be obtained by decoding the bitstream, and then prediction may be performed on the target region based on the at least one prediction mode. Furthermore, when predicting a target region, multiple prediction modes may be selected simultaneously, or only one prediction mode may be selected.
[0212] Method 2: Predict each target area based on inter-frame prediction and / or intra-frame prediction;
[0213] Optionally, each target region may be predicted through inter-frame prediction, each target region may be predicted through intra-frame prediction, or each target region may be predicted through both inter-frame prediction and intra-frame prediction.
[0214] Method three: predict each target area according to at least one prediction mode and a prediction order corresponding to each target area.
[0215] Optionally, before predicting each target region, the decoder can determine at least one prediction mode corresponding to each target region and a prediction order corresponding to each target region through bitstream decoding, and determine a reconstruction order based on the prediction order. Optionally, the reconstruction order can be the same as or different from the prediction order. Prediction is then performed on each target region sequentially according to the reconstruction order and the at least one prediction mode.
[0216] In this embodiment, each target area is predicted according to a prediction mode, or each target area is predicted according to inter-frame prediction and / or intra-frame prediction, or each target area is predicted according to at least one prediction mode and prediction order to determine or generate a prediction area for the target area, and then the prediction areas are merged to determine or generate a decoding block. This allows the target areas determined or generated according to the block division mode to be predicted separately before decoding, so as to more accurately restore these target areas, and then these restored target areas are merged to obtain more accurately restored coding blocks during encoding, that is, prediction blocks at the decoding end. This achieves that when a decoding block is subsequently determined or generated based on the obtained prediction block, the decoding efficiency is significantly improved, and the determined or generated decoding block is also more accurate.
[0217] The present application also provides a processing device, referring to FIG. 20 . FIG. 20 is a schematic diagram of the functional modules of the processing device of the present application, which can be provided in a processing device or be the processing device itself. The processing device of the present application includes:
[0218] The encoding module A10 is configured to determine at least one target area from the current block, optionally including a preset area; and predict the target area to determine or generate a prediction block of the current block.
[0219] Optionally, the current block is divided into at least one target area. Optionally, the target area includes a preset area, including at least one of the following:
[0220] Determine or generate at least one segmentation line in a current block, and divide the current block into at least one target area according to the segmentation line, wherein the target area includes a preset area;
[0221] Selecting at least one location point in the current block as a segmentation point, and extending at least two non-overlapping segmentation lines from the segmentation point to the edge of the current block, dividing the current block into at least one target area according to the segmentation lines, wherein the target area includes a preset area;
[0222] At least one preset area consisting of at least two non-preset areas is determined from the current block.
[0223] Optionally, the encoding module A10 is configured to:
[0224] Perform prediction on each target area and determine or generate at least one prediction area;
[0225] All the prediction regions are merged to determine or generate a prediction block for the current block.
[0226] Optionally, a prediction is performed for each target area, including at least one of the following:
[0227] Making predictions for each target area according to at least one prediction model;
[0228] Performing inter-frame prediction and / or intra-frame prediction on each target region;
[0229] Each target region is predicted according to at least one prediction mode and a prediction order corresponding to each region.
[0230] The present application also provides a processing device. Referring to FIG. 21 , the processing device includes:
[0231] The decoding module A20 is configured to determine or generate at least one target area according to the block partitioning mode of the current block; predict the target area, reconstruct the current block, and determine or generate a decoding block.
[0232] Optionally, the target area includes a preset area, and determining or generating at least one target area according to the block division mode includes at least one of the following:
[0233] Determine or generate at least one segmentation line in the area corresponding to the decoding block, and divide the area into at least one target area according to the segmentation line;
[0234] Selecting at least one position point in the area corresponding to the decoding block as a segmentation point, and extending at least two non-overlapping segmentation lines from the segmentation point to the edge of the area, and dividing the area into at least one target area according to the segmentation lines;
[0235] Dividing the area corresponding to the decoding block into at least one preset area consisting of at least two non-preset areas;
[0236] determining or generating at least one target area according to at least one block partitioning mode;
[0237] Determine or generate a target area corresponding to each block partitioning mode.
[0238] Optionally, the decoding module A20 is configured to:
[0239] The target area is predicted, the current block is reconstructed, a prediction area is determined or generated, each prediction area is merged, and a decoding block is determined or generated.
[0240] Optionally, the method of predicting the target area includes at least one of the following:
[0241] Make predictions for each target area based on the prediction model;
[0242] Predicting each target region according to inter-frame prediction and / or intra-frame prediction;
[0243] Each target region is predicted according to at least one prediction mode and a prediction order corresponding to each target region.
[0244] An embodiment of the present application further provides a processing device, including a memory and a processor, wherein a processing program is stored in the memory, and when the processing program is executed by the processor, the steps of the processing method in any of the above embodiments are implemented.
[0245] An embodiment of the present application further provides a storage medium having a processing program stored thereon. When the processing program is executed by a processor, the steps of the processing method in any of the above embodiments are implemented.
[0246] In the embodiments of the smart terminal and storage medium provided in this application, all technical features of any of the above-mentioned processing method embodiments may be included. The expanded and explained contents of the specification are basically the same as those of the embodiments of the above-mentioned methods and will not be repeated here.
[0247] An embodiment of the present application further provides a computer program product, which includes computer program code. When the computer program code runs on a computer, the computer executes the methods in the various possible implementation modes described above.
[0248] An embodiment of the present application also provides a chip, including a memory and a processor, wherein the memory is used to store computer programs, and the processor is used to call and run the computer programs from the memory, so that a device equipped with the chip executes the methods in the various possible implementation modes as described above.
[0249] It is understood that the above scenarios are merely examples and do not limit the application scenarios of the technical solutions provided in the embodiments of this application. The technical solutions of this application can also be applied to other scenarios. For example, those skilled in the art will appreciate that with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application will also be applicable to similar technical problems.
[0250] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0251] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0252] The units in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0253] In this application, the same or similar terminology, technical solutions and / or application scenario descriptions are generally only described in detail the first time they appear. When they appear again later, they are generally not repeated for the sake of brevity. When understanding the technical solutions and other contents of this application, for the same or similar terminology, technical solutions and / or application scenario descriptions that are not described in detail later, you can refer to the previous relevant detailed descriptions.
[0254] In this application, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0255] The various technical features of the technical solution of this application can be combined arbitrarily. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0256] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as mentioned above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the method of each embodiment of the present application.
[0257] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a storage medium or transmitted from one storage medium to another storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a storage disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state storage disk Solid State Disk (SSD)).
[0258] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A processing method, wherein: The following steps are involved: S10: determining at least one target area from the current block, wherein the target area includes a preset area, wherein the preset area includes a non-rectangular area; S20: Predict the target area, and determine or generate a prediction block of the current block.
2. The method of claim 1, wherein: The step S10 includes at least one of the following: Determine or generate at least one segmentation line in the current block, and divide the current block into at least one target area according to the segmentation line, wherein the target area includes a preset area; Selecting at least one position point in the current block as a segmentation point, and extending at least two non-overlapping segmentation lines from the segmentation point to the edge of the current block, and dividing the current block into at least one target area according to the segmentation lines, wherein the target area includes a preset area; A preset area including at least one area composed of at least two non-preset areas is determined from the current block.
3. The method of claim 1, wherein: The step S20 comprises: Predict each target area and determine or generate at least one predicted area; All the prediction regions are merged to determine or generate a prediction block for the current block.
4. The method of claim 3, wherein: The predicting of each target area includes at least one of the following: Making predictions for each target area according to at least one prediction mode; Performing inter-frame prediction and / or intra-frame prediction on each target region; Each target region is predicted according to at least one prediction mode and a prediction order corresponding to each region.
5. A processing method, wherein: The following steps are involved: S100: determining or generating at least one target area according to a block division mode of a current block; S200: predicting the target area, reconstructing the current block, and determining or generating a decoding block.
6. The method of claim 5, wherein: The target area includes a preset area, and the step S100 includes at least one of the following: Determine or generate at least one segmentation line in the area corresponding to the decoding block, and divide the area into at least one target area according to the segmentation line; Selecting at least one position point in the area corresponding to the decoding block as a segmentation point, and extending at least two non-overlapping segmentation lines from the segmentation point to the edge of the area, and dividing the area into at least one target area according to the segmentation lines; Dividing the area corresponding to the decoding block into at least one preset area consisting of at least two non-preset areas; Determine or generate at least one target area according to at least one block partitioning mode; Determine or generate a target area corresponding to each block partitioning mode.
7. The method of claim 5, wherein: The step S200 includes: The target area is predicted, the current block is reconstructed, a prediction area is determined or generated, each prediction area is merged, and a decoding block is determined or generated.
8. The method of claim 7, wherein: The method of predicting the target area includes at least one of the following: Make predictions for each target area based on the prediction model; Predicting each target region according to inter-frame prediction and / or intra-frame prediction; Each target region is predicted according to at least one prediction mode and a prediction order corresponding to each target region.
9. A processing device, wherein: include: A memory and a processor, wherein a processing program is stored in the memory, and when the processing program is executed by the processor, the steps of the processing method according to any one of claims 1 to 8 are implemented.
10. A storage medium, wherein: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the processing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Intra-frame prediction method, video encoding method, video decoding method and related equipment
CN110881125A
Coding and decoding method and equipment thereof
CN112584169A
Coding and decoding method, device and equipment
CN115022639A
Processing method, processing equipment and storage medium
CN115955565A
Inter-frame prediction method, encoder, decoder, and storage medium
WO2021196235A1
