Processing method, processing equipment and storage medium
By determining the prediction mode of the sub-block based on the reference area of the image block, the problem of poor prediction effect of local areas of the multi-motion direction object in the prior art is solved, and higher video encoding and decoding quality is achieved.
Patent Information
- Application Number
- CN202510329460.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-20
AI Technical Summary
When processing image blocks, the conventional single prediction mode is poor in predicting local areas of multiple objects with inconsistent motion directions, resulting in poor encoding and decoding quality.
By determining or obtaining the prediction mode of at least one sub-block of the current block based on at least one reference area of the current block, using the gradient histogram of the sub-block and the candidate prediction mode, the most suitable prediction mode is selected to improve prediction accuracy.
It effectively improves the prediction accuracy of local areas of the image block and improves the encoding and decoding quality during video encoding and decoding.
Smart Images

Figure CN120186338A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly relates to a processing method, a processing device, and a storage medium. Background Art
[0002] The existing video coding standard (H.266 / VVC) proposes a video frame coding technology. For example, when encoding and decoding a video frame, the protocol divides each frame into different blocks and performs prediction processing and encoding / decoding processing.
[0003] In the process of conceiving and implementing this application, the inventors found that at least the following problems exist: when an image block contains multiple objects with inconsistent motion directions, the prediction effect of the conventional single prediction mode on the local area of the image block is not ideal, and thus the encoding / decoding quality in the video encoding and / or decoding process is poor.
[0004] The foregoing description is for providing general background information and does not necessarily constitute prior art. Summary of the Invention
[0005] In view of the above technical problems, this application provides a processing method, a processing device, and a storage medium, which can effectively improve the prediction accuracy of the local area of an image block, and thus can support improving the prediction effect of video encoding and / or decoding.
[0006] This application provides a processing method, which can be applied to a processing device and includes the steps of:
[0007] S10. Determine or obtain the prediction mode of at least one sub-block of the current block according to at least one reference region of the current block.
[0008] Optionally, step S10 includes at least one of the following:
[0009] Determine or obtain the prediction mode of at least one sub-block according to at least one reference region of the current block and a candidate prediction mode;
[0010] Determine or obtain the prediction mode of at least one sub-block according to the histogram of gradients corresponding to at least one sub-block determined or obtained through at least one reference region of the current block.
[0011] Optionally, determining or obtaining the prediction mode of at least one sub-block according to at least one reference region of the current block and a candidate prediction mode includes at least one of the following:
[0012] Determine or obtain the prediction mode of at least one sub-block according to the prediction result of the current block determined or obtained through at least one reference region of the current block and a candidate prediction mode;
[0013] Determine or obtain a prediction mode of at least one sub-block according to a prediction result of at least one sub-block determined or obtained through at least one reference area of the current block and a candidate prediction mode;
[0014] The prediction mode of at least one sub-block is determined or obtained according to the matching information of each candidate prediction mode determined or obtained through at least one reference area of the current block and the candidate prediction mode with respect to at least one sub-block.
[0015] Optionally, the processing method further includes at least one of the following:
[0016] The prediction result of at least one sub-block is determined or obtained according to the prediction result of the current block determined or obtained by using the candidate prediction mode and at least one reference area of the current block;
[0017] The prediction result of at least one sub-block is determined or obtained according to at least one reference region of at least one sub-block determined or obtained through the candidate prediction mode and based on at least one reference region of the current block.
[0018] Optionally, the candidate prediction mode is determined or obtained according to at least one of the following:
[0019] First mode list;
[0020] Non-first mode list;
[0021] Non-angular prediction mode.
[0022] Optionally, the reference area is determined or obtained by at least one of the following:
[0023] Determine or obtain at least one reference area according to at least one of an upper adjacent pixel, an upper non-adjacent pixel, a left adjacent pixel, a left non-adjacent pixel, an upper left adjacent pixel, and an upper left non-adjacent pixel of the current block;
[0024] Determine or obtain at least one reference area according to at least one of a neighboring block, a non-neighboring block, a co-located block, a time domain block, and a default block corresponding to the current block;
[0025] Determine or obtain at least one reference area according to at least one of the width, height, block size and block area of the current block;
[0026] Determine or obtain at least one reference area according to the candidate block determined or obtained based on the candidate motion vector or the candidate block vector of the current block;
[0027] If the first information of the current block satisfies the first condition, the reference area is the first reference area;
[0028] If the first information of the current block does not satisfy the first condition, the reference area is the second reference area.
[0029] Optionally, the processing method further includes at least one of the following:
[0030] If the second condition is satisfied, determine or obtain the target prediction result of the current block according to the prediction mode of the current block;
[0031] If the second condition is not satisfied, determine or obtain the target prediction result of the current block according to the prediction mode of the current block and / or the sub-block result of the first sub-block determined or obtained through the prediction mode of the first sub-block.
[0032] Optionally, determining or obtaining the target prediction result of the current block according to the prediction mode of the current block and / or the sub-block result of the first sub-block determined or obtained through the prediction mode of the first sub-block includes at least one of the following:
[0033] Replace the prediction result corresponding to the first sub-block in the prediction result of the current block determined or obtained using the prediction mode of the current block with the sub-block result of the first sub-block to determine or obtain the target prediction result of the current block;
[0034] Determine or obtain the target prediction result of the current block according to the sub-block result of the first sub-block, at least one weight information, and the prediction result of the current block determined or obtained using the prediction mode of the current block.
[0035] The present application also provides a processing device, including: a memory and a processor, where a processing program is stored on the memory, and when the processing program is executed by the processor, the steps of any of the above processing methods are implemented.
[0036] The present application also provides a storage medium, where the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above processing methods are implemented.
[0037] As described above, the processing method of the present application can be applied to a processing device, including: determining or obtaining the prediction mode of at least one sub-block of the current block according to at least one reference region of the current block. Through the technical solution of the present application, it is possible to determine an adapted prediction mode for at least one sub-block of the current block, and further support improving the prediction accuracy of the local region of the image block (such as the region corresponding to the sub-block), and support improving the encoding and decoding quality in the video encoding and / or decoding process. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and are used together with the specification 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 will briefly introduce the drawings required for the description of the embodiments. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0039] Figure 1 Schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present application;
[0040] Figure 2 Architecture diagram of a communication network system provided by an embodiment of the present application;
[0041] Figure 3 Schematic diagram of the hardware structure of a controller 140 provided by the present application;
[0042] Figure 4 Schematic diagram of the hardware structure of a network node 150 provided by the present application;
[0043] Figure 5 Flowchart of a processing method shown according to the first embodiment;
[0044] Figure 6 Flowchart of the encoding process of the encoder in the processing method shown according to the first embodiment;
[0045] Figure 7 Flowchart of the decoding process of the decoder in the processing method shown according to the first embodiment;
[0046] Figure 8 Schematic diagram of the reference area in the processing method shown according to the second embodiment Figure 1 ;
[0047] Figure 9 Schematic diagram of the reference area in the processing method shown according to the second embodiment Figure 2 ;
[0048] Figure 10 Schematic diagram of the reference area in the processing method shown according to the second embodiment Figure 3 ;
[0049] Figure 11 Schematic diagram of the gradient magnitude in the processing method shown according to the second embodiment;
[0050] Figure 12 Schematic diagram of the reference area in the processing method shown according to the second embodiment Figure 4 ;
[0051] Figure 13 Schematic diagram of the reference area in the processing method shown according to the second embodiment Figure 5 ;
[0052] Figure 14 Schematic diagram of the reference area in the processing method shown according to the second embodiment Figure 6 ;
[0053] Figure 15Schematic of pixel sampling in the processing method shown in the third embodiment Figure 1 ;
[0054] Figure 16 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 2 ;
[0055] Figure 17 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 3 ;
[0056] Figure 18 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 4 ;
[0057] Figure 19 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 5 ;
[0058] Figure 20 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 6 ;
[0059] Figure 21 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 7 ;
[0060] Figure 22 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 8 ;
[0061] Figure 23 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 9 ;
[0062] Figure 24 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 10 ;
[0063] Figure 25 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 10 One;
[0064] Figure 26 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 10 Two;
[0065] Figure 27 Schematic of pixel sampling in the processing method shown in the third embodiment Figure 10 Three;
[0066] Figure 28 Schematic of the reference region in the processing method shown in the third embodimentFigure 7 ;
[0067] Figure 29 It is a schematic diagram of a scenario for replacing a prediction result in the processing method shown in the third embodiment;
[0068] Figure 30 It is a schematic diagram of a processing module of a processing device.
[0069] The realization of the objectives, functional features, and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Through the above-mentioned drawings, specific embodiments of this application have been shown, and there will be more detailed descriptions hereinafter. These drawings and written descriptions are not intended to limit the scope of the concept of this application in any way, but to illustrate the concept of this application to those skilled in the art by referring to specific embodiments. Specific Embodiments
[0070] Here, exemplary embodiments will be described in detail, and their examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numerals in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. On the contrary, they are merely examples of devices and methods consistent with some aspects of this application as detailed in the appended claims.
[0071] It should be noted that in this document, the term "comprising", "including", or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article, or device comprising that element. In addition, components, features, and elements with the same name in different embodiments of this application may have the same meaning or different meanings, and their specific meanings need to be determined based on their explanations in the specific embodiments or further in combination with the context of the specific embodiments.
[0072] 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, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining". Furthermore, as used herein, the singular forms "a", "an", and "the" are also intended to include the plural forms unless the context indicates otherwise. It should be further understood that the terms "comprising", "including" indicate the presence of the stated features, steps, operations, elements, components, items, kinds, and / or groups, but do not preclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms "or", "and / or", "including at least one of the following", etc. used in this application may be interpreted inclusively, or mean any one or any combination. For example, "including at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C", and again, "A, B or C" or "A, B and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C". An exception to this definition occurs only when the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0073] It should be understood that although the steps in the flowchart in the embodiments of this application are shown sequentially according to the indication of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear indication in this document, the execution of these steps has no strict order limitation, and they can be executed in other orders. Moreover, at least a part of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same moment, but can be executed at different moments, and their execution order is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0074] Depending on the context, the words "if", "when" as used herein may be interpreted as "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detecting (stated condition or event)" may be interpreted as "when determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)".
[0075] It should be noted that in this document, step codes such as S10 are used. The purpose is to more clearly and briefly express the corresponding content and do not constitute a substantial limitation in terms of sequence.
[0076] It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0077] In subsequent descriptions, suffixes such as "module", "component", or "unit" used to represent elements are only for the convenience of explaining this application and have no specific meaning in themselves. Therefore, "module", "component", or "unit" can be used interchangeably.
[0078] The processing device can be implemented in various forms. For example, the processing device described in this application can include processing devices such as mobile phones, servers, tablet computers, laptop computers, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0079] In the subsequent description, a mobile terminal will be used as an example for illustration. Those skilled in the art will understand that, except for elements specifically for mobile purposes, the structure according to the embodiments of this application can also be applied to fixed-type terminals.
[0080] Please refer to Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of this application. The mobile terminal 100 can 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 can understand that Figure 1 the mobile terminal structure shown in does not constitute a limitation on the mobile terminal. The mobile terminal can include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0081] Next, in combination with Figure 1 each component of the mobile terminal will be specifically introduced:
[0082] The radio frequency unit 101 can be used for receiving and transmitting information or signals during a call. Specifically, after receiving the downlink information from the base station, it is sent to the processor 110 for processing; in addition, the uplink data is sent to the base station. Generally, the radio frequency unit 101 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. In addition, the radio frequency unit 101 can communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution), 5G, and 6G, etc.
[0083] WiFi belongs to short-distance wireless transmission technology. The mobile terminal can help users send and receive emails, browse the web, and access streaming media through the WiFi module 102. It provides users with wireless broadband Internet access. Although Figure 1 the WiFi module 102 is shown, it can be understood that it is not an essential component of the mobile terminal and can be omitted entirely within the scope of not changing the essence of the invention according to needs.
[0084] The audio output unit 103 can convert the audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, etc. Moreover, the audio output unit 103 can provide an audio output related to a specific function executed by the mobile terminal 100 (such as a call signal reception sound, a message reception sound, etc.). The audio output unit 103 can include a speaker, a buzzer, etc.
[0085] 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 the image data of a still picture or video obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage media) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in operation modes such as a phone call mode, a recording mode, a voice recognition mode, etc., and can process such sound into audio data. The processed audio (voice) data can be output in a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in the case of the phone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) the noise or interference generated during the reception and transmission of audio signals.
[0086] The mobile terminal 100 further 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 kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used in applications for identifying the posture of the mobile phone (such as landscape / portrait screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as a pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., they will not be elaborated here.
[0087] The display unit 106 is used to display the information input by the user or the information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 can be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), etc.
[0088] The user input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to the user settings and function controls of the mobile terminal. Optionally, the user input unit 107 can include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect touch operations of the user thereon or nearby (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel 1071), and drive corresponding connection devices according to a preset program. The touch panel 1071 can include two parts: a touch detection device and a touch controller. Optionally, the touch detection device detects the touch orientation of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 can include other input devices 1072. Optionally, the other input devices 1072 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc., and specific details are not limited here.
[0089] Optionally, the touch panel 1071 can cover the display panel 1061. After the touch panel 1071 detects a touch operation thereon or nearby, it transmits the operation to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in Figure 1 the touch panel 1071 and the display panel 1061 are implemented as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, and specific details are not limited here.
[0090] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device can include a wired or wireless headset port, an external power 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 headset port, and so on. The interface unit 108 can be used to receive inputs from an external device (such as data information, power, etc.) and transmit the received inputs to one or more components within the mobile terminal 100 or can be used to transmit data between the mobile terminal 100 and the external device.
[0091] The memory 109 can be used to store software programs and various data. The memory 109 mainly includes a program storage area and a data storage area. Optionally, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory 109 can include high-speed random access memory and can include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0092] The processor 110 is the control center of the mobile terminal, connecting various parts of the entire mobile terminal through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it executes various functions of the mobile terminal and processes data, thereby monitoring the mobile terminal as a whole. The processor 110 can include one or more processing units; preferably, the processor 110 can integrate an application processor and a modulation / demodulation processor. Optionally, the application processor mainly processes the operating system, user interface, and application programs, etc., and the modulation / demodulation processor mainly processes wireless communication. It can be understood that the above modulation / demodulation processor may not be integrated into the processor 110.
[0093] The mobile terminal 100 can include a power source 111 (such as a battery) for supplying power to each component. Preferably, the power source 111 can be logically connected to the processor 110 through a power management system, thereby realizing functions such as management of charging, discharging, and power consumption management through the power management system.
[0094] Although Figure 1 not shown, the mobile terminal 100 can include a Bluetooth module, etc., which will not be elaborated here.
[0095] To facilitate the understanding of the embodiments of the present application, the communication network system on which the mobile terminal of the present application is based will be described below.
[0096] Please refer to Figure 2 , Figure 2 which is an architecture diagram of a communication network system provided by an embodiment of the present application. This communication network system is an LTE system of the general mobile communication technology. This LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and the operator's IP service 204 that are sequentially communicatively connected.
[0097] Optionally, the UE 201 may be the above-mentioned terminal 100, which will not be elaborated here.
[0098] The E-UTRAN 202 includes an eNodeB 2021 and other eNodeBs 2022, etc. Optionally, the eNodeB 2021 may be connected to other eNodeBs 2022 through a backhaul (such as the X2 interface), the eNodeB 2021 is connected to the EPC 203, and the eNodeB 2021 may provide access for the UE 201 to the EPC 203.
[0099] The 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, a PCRF (Policy and Charging Rules Function) 2036, etc. Optionally, the MME 2031 is a control node that processes the signaling between the UE 201 and the EPC 203 and provides bearer and connection management. The HSS 2032 is used to provide some registers to manage functions such as a home location register (not shown in the figure) and stores some user-specific information such as service characteristics and data rates. All user data can be sent through the SGW 2034. The PGW 2035 may provide IP address allocation for the UE 201 and other functions. The PCRF 2036 is a policy and charging control policy decision point for service data flows and IP bearer resources, and it selects and provides available policy and charging control decisions for a policy and charging enforcement functional unit (not shown in the figure). The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services, etc.
[0100] Although the above has been described by taking the LTE system as an example, those skilled in the art should be aware that the present application is not only applicable to the LTE system, but also applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, 5G, and future new network systems (such as 6G), etc., which are not limited here.
[0101] Figure 3Schematic diagram of the hardware structure of a controller 140 provided for this application. The controller 140 includes: a memory 1401 and a processor 1402. The memory 1401 is used to store program instructions, and the processor 1402 is used to call the program instructions in the memory 1401 to execute the steps performed by the controller in the first method embodiment above. The implementation principle and beneficial effects are similar and will not be elaborated here.
[0102] Optionally, the above controller further includes a communication interface 1403, and this communication interface 1403 can be connected to the processor 1402 through a bus 1404. The processor 1402 can control the communication interface 1403 to implement the receiving and sending functions of the controller 140.
[0103] Figure 4 Schematic diagram of the hardware structure of a network node 150 provided for this application. The network node 150 includes: a memory 1501 and a processor 1502. The memory 1501 is used to store program instructions, and the processor 1502 is used to call the program instructions in the memory 1501 to execute the steps performed by the first node in the first method embodiment above. The implementation principle and beneficial effects are similar and will not be elaborated here.
[0104] Optionally, the above controller further includes a communication interface 1503, and this communication interface 1503 can be connected to the processor 1502 through a bus 1504. The processor 1502 can control the communication interface 1503 to implement the receiving and sending functions of the network node 150.
[0105] The integrated module implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above software functional module is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods in various embodiments of this application.
[0106] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, 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 processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a storage medium or transmitted from one storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
[0107] The first embodiment
[0108] Referring to Figure 5 , Figure 5 is a flowchart of a processing method shown according to the first embodiment. The processing method of the embodiments of the present application can be applied to a processing device and includes:
[0109] Step S10, determining or obtaining a prediction mode of at least one sub-block of the current block according to at least one reference region of the current block.
[0110] In this embodiment, the processing device can be a smart terminal such as a mobile phone or a computer, or a server such as a local server or a cloud server. In this embodiment and the present application, the processing device is mainly exemplified by a smart terminal.
[0111] Optionally, the technical solution of this embodiment can be applied to fields such as image coding and decoding, video coding and decoding, hardware video coding and decoding, dedicated circuit video coding and decoding, and real-time video coding and decoding.
[0112] Optionally, the processing device can obtain video image data from a video source, segment each frame of the video image data to obtain at least one image block, and determine the image block to be predicted in the at least one image block as the current block.
[0113] Optionally, in order to improve the prediction accuracy of a local area of the current block, at least one sub-block of the current block may be determined or obtained. For example, by dividing the current block, at least one sub-block of the current block may be determined or obtained.
[0114] Optionally, the reference area is an area that has a strong correlation with the current block and can be used for the prediction process of the current block. And the sub-block is a part of the current block, which inherits the position and some characteristics of the current block in the image. Therefore, the common correlation between the current block and its reference area and sub-block can be utilized to determine or obtain the prediction mode of at least one sub-block for the prediction process of at least one sub-block. Also, since the local areas of an image often have similar characteristics, determining the prediction mode of the sub-block through the reference area of the current block can better utilize these local characteristics and obtain a prediction mode with a higher degree of adaptation to the sub-block, thereby improving the prediction accuracy.
[0115] Optionally, the reference area refers to a pixel area or a pixel sampling area of a reconstructed or encoded area adjacent or non-adjacent to the left, upper, or upper-left of the current block, and the pixel values or features of these areas can be used for the prediction or other processing of the current block.
[0116] Optionally, the reference area may include: a template, a reference block, and / or reference pixels.
[0117] Optionally, the current block may be an image block to be predicted in an encoder and / or a decoder. For example, the current block is a coding unit, and the sub-block is a sub-block within the coding unit. For the sub-block, the corresponding syntax elements and coding information are derived from the syntax elements and coding information of the current block. For example, the width-to-height ratio of the sub-block is the same as that of the current block.
[0118] Optionally, the coding mode of the sub-block is the same as that of the current block.
[0119] Optionally, the sub-block does not need to send signaling to indicate the syntax elements or coding information of the sub-block.
[0120] Optionally, the current block includes 4 sub-blocks with the same area. When the current block is divided into 4 sub-blocks of the same size, it means that unified algorithms and parameter settings can be applied when encoding and decoding each sub-block, without the need for separate adjustment for different sizes, thereby simplifying the calculation and determination process of the coding information, prediction information, and syntax elements of the sub-block.
[0121] Optionally, the number of sub-blocks included in the current block is set according to the actual situation. For example, the current block includes: 1, 2, 4, 8, 16 sub-blocks, etc. The sizes of the sub-blocks can be at least partially the same or different.
[0122] Optionally, the current block can be divided into 4 sub-blocks of the same size, and according to the preset processing order, the prediction mode of each sub-block is determined or obtained, and / or prediction processing is performed on each sub-block.
[0123] Optionally, the prediction mode corresponding to the current block can be different from or at least partially the same as the prediction modes corresponding to the sub-blocks of the current block.
[0124] Optionally, the prediction mode corresponding to the current block and / or the prediction mode corresponding to the sub-block includes: an angular prediction mode, a non-angular prediction mode, and / or a prediction derivation mode.
[0125] Optionally, the angular prediction mode is a technique for predicting the current pixel block. It determines or generates a prediction block by propagating the values of adjacent pixels along a specific direction. The angular prediction mode is mainly used to process the directional texture in the image, which can effectively reduce spatial redundancy and improve compression efficiency. In the HEVC (High Efficiency Video Coding) standard, the intra prediction mode includes 33 angular prediction modes. These modes cover different angles from horizontal to vertical, ensuring accurate prediction of various texture directions. The angular prediction mode predicts the pixel values of the current block by selecting a specific angle and extracting values from adjacent pixels along this direction. For example, if a 45-degree angle is selected, the predicted value will be extracted from adjacent pixels in the upper left or lower right corner.
[0126] Optionally, the non-angular prediction mode can be a prediction mode other than the angular prediction mode. Exemplarily, the non-angular prediction mode includes: Neural Network-based Intra Prediction (NNIP) mode, extrapolation filter-based Intra Prediction (EIP) mode, Block Vector Prediction (BV) mode, planar mode, and / or DC mode.
[0127] Optionally, the prediction derivation mode is a method of deriving the most suitable prediction mode for the current block by analyzing the relevant information of the current block. Exemplarily, the prediction derivation mode includes: Decoder side intramode derivation (DIMD) mode, Occurrence-based Intra Coding (OBIC) mode, and / or template-based intramode derivation (TIMD) mode.
[0128] Optionally, in the prediction derivation mode, at least one non-angle predictor is determined or obtained through a neural network-based prediction mode. Optionally, based on the at least one non-angle predictor and / or at least one angle predictor, the prediction result of at least one sub-block of the current block is determined or generated.
[0129] Optionally, in the prediction derivation mode, based on the first prediction result and the second prediction result, the prediction result of at least one sub-block of the current block is determined or generated.
[0130] Optionally, the first prediction result is determined or obtained through at least one first non-angle predictor and / or at least one first angle predictor, and the second prediction result is determined or obtained through at least one second non-angle predictor and / or at least one second angle predictor.
[0131] Optionally, the first prediction result and the second prediction result are different.
[0132] Optionally, at least one first non-angle predictor and at least one second non-angle predictor are different, and at least one first angle predictor and at least one second angle predictor are different.
[0133] Optionally, the first prediction result and the second prediction result are respectively determined or obtained through a neural network-based prediction mode and a non-neural network-based prediction mode. Optionally, the non-neural network-based prediction mode includes: an angle prediction mode, a DC mode, and / or a Planar mode.
[0134] Optionally, the prediction result of at least one sub-block of the current block can be determined or generated by fusing the first prediction result and the second prediction result.
[0135] Optionally, in the intra-frame prediction mode, based on the first prediction result and the second prediction result, the prediction result of at least one sub-block of the current block is determined or generated. Optionally, the first prediction result is determined or obtained through a neural network-based prediction mode, and the second prediction result is determined or obtained through the prediction derivation mode.
[0136] Optionally, the above prediction derivation mode includes at least one of a DIMD mode, an OBIC mode, and a TIMD mode.
[0137] Optionally, based on the prediction result of at least one sub-block of the current block, the prediction result of the current block is determined or obtained. Optionally, the size of at least one sub-block of the current block can be the same as or different from the size of the current block.
[0138] Optionally, if the size of at least one sub-block of the current block is the same as the size of the current block, then based on the prediction result obtained by fusing the first prediction result and the second prediction result, the prediction result of the current block is determined or obtained.
[0139] Optionally, if the size of at least one sub-block of the current block is different from the size of the current block, the prediction result of the current block is determined or obtained by splicing and / or fusing the first prediction result and the second prediction result.
[0140] Optionally, at least one candidate prediction mode can be determined or obtained according to at least one reference region of the current block, and the optimal selection after comparing and evaluating various candidate prediction modes is determined as the prediction mode of the sub-block, so as to implement a mode that minimizes the prediction error and improves the coding efficiency. Optionally, the prediction mode of the sub-block can be one or more.
[0141] Optionally, step S10 further includes: determining or obtaining at least one mode list of the current block and / or at least one sub-block of the current block according to at least one reference region of the current block, and determining or obtaining the prediction mode of the current block and / or the prediction mode of at least one sub-block of the current block according to the at least one mode list of the at least one sub-block.
[0142] Optionally, the prediction mode of at least one sub-block of the current block can be further determined by the determined prediction mode of the current block. The candidate prediction modes in the at least one mode list include: angular prediction mode, non-angular prediction mode, and / or prediction derivation mode.
[0143] Optionally, the prediction derivation mode includes the prediction derivation mode of the current block and the prediction derivation mode of at least one sub-block of the current block. For example, the prediction derivation mode of the current block includes: the DIMD mode, OBIC mode, and / or TIMD mode of the current block, and the prediction derivation mode of the sub-block of the current block includes: the decoding-side intra-mode derivation DIMD mode, OBIC mode, and / or TIMD mode of the sub-block of the current block. Optionally, the sub-block prediction derivation mode involved in the embodiments of the present application can be in the same mode list as the prediction derivation mode of the current block.
[0144] Optionally, for the current block, the best candidate mode (i.e., the prediction mode) in the at least one mode list can be determined according to the matching information in the at least one mode list, and then the best candidate mode is compared with other candidate prediction modes not in the at least one mode list to determine the prediction mode adopted by the current block.
[0145] Optionally, for the sub-block of the current block, the best candidate mode (i.e., the prediction mode) in the at least one mode list can be determined according to the matching information or rate-distortion cost in the at least one mode list, and then the best candidate mode is compared with other candidate prediction modes not in the at least one mode list to determine the prediction mode adopted by the sub-block of the current block.
[0146] Optionally, the prediction mode corresponding to the aforementioned current block and / or the prediction mode corresponding to the sub-block can be used as candidate prediction modes in at least one mode list. For example, the candidate prediction modes in at least one mode list can include the candidate prediction mode of the current block and the candidate prediction modes of at least one sub-block of the current block.
[0147] Optionally, the target prediction mode of the current block can be determined or obtained based on the candidate prediction modes in at least one mode list and the candidate prediction modes not in the at least one mode list.
[0148] Optionally, the candidate prediction mode with a relatively high probability can be put into the at least one mode list, and other candidate prediction modes not in the at least one mode list can be determined according to the attributes of the current block (e.g., the size of the current block, the size of adjacent blocks, the prediction modes of adjacent blocks, and the situation of used prediction modes). Then, based on the candidate prediction modes in the at least one mode list and the candidate prediction modes not in the at least one mode list, the target prediction mode of the current block can be determined or obtained, so as to enrich the diversity of candidate prediction modes by using other candidate prediction modes not in the at least one mode.
[0149] Optionally, based on the candidate prediction modes in at least one mode list and the candidate prediction modes not in the at least one mode list, the target prediction mode of the sub-block of the current block can be determined or obtained.
[0150] Optionally, the candidate prediction mode with a relatively high probability can be put into the at least one mode list, and other candidate prediction modes not in the at least one mode list can be determined according to the attributes of the current block and / or the sub-block of the current block (e.g., the size of the current block, the size of the sub-block of the current block, the size of adjacent blocks, the size of the sub-blocks of adjacent blocks, the prediction modes of adjacent blocks and / or the sub-blocks of adjacent blocks, and the situation of used prediction modes of coding units or sub-blocks of coding units). Then, based on the candidate prediction modes in the at least one mode list and the candidate prediction modes not in the at least one mode list, the target prediction mode of the sub-block of the current block can be determined or obtained, so as to enrich the diversity of candidate prediction modes by using other candidate prediction modes not in the at least one mode.
[0151] Optionally, for the current block, the best candidate mode (i.e., the prediction mode) in at least one mode list can be determined according to the matching information in at least one mode list. Then, the best candidate mode is compared with other candidate prediction modes not in the at least one mode list to determine the prediction mode adopted by the current block.
[0152] Optionally, for the sub-blocks of the current block, at least one best candidate mode (i.e., prediction mode) in at least one mode list can be determined according to the matching information in the at least one mode list. Furthermore, the best candidate mode can be compared with other candidate prediction modes not in the at least one mode list to determine the prediction mode adopted by the sub-block of the current block.
[0153] Optionally, the first prediction mode in at least one mode list can be compared with other candidate prediction modes not in the at least one mode list to determine the prediction mode adopted by the current block or the sub-block of the current block. For example, if the performance corresponding to the first prediction mode in at least one mode list is better than the performance corresponding to other candidate prediction modes not in the at least one mode list, the best candidate mode in the at least one mode list is used as the prediction mode adopted by the current block or the sub-block of the current block; or, if the performance corresponding to other candidate prediction modes not in the at least one mode list is better than the performance corresponding to the first prediction mode in the at least one mode list, the other candidate prediction modes not in the at least one mode list are used as the prediction mode of the current block or the sub-block of the current block.
[0154] Optionally, the candidate prediction modes in at least one mode list can include the candidate prediction modes of the current block and the candidate prediction modes of the sub-blocks of the current block. The candidate prediction mode of the current block can be used as the first prediction mode for performance comparison with other candidate prediction modes not in the at least one mode list.
[0155] Optionally, if the prediction effect of the candidate prediction modes in at least one mode list is not good, then other candidate prediction modes selected and not in the at least one candidate prediction mode list are processed to determine a suitable prediction mode for the current block from the other candidate prediction modes.
[0156] Optionally, the prediction mode of the sub-block can be determined or obtained from at least one candidate prediction mode through the rate-distortion cost related to each candidate prediction mode. For example, the mode with the minimum rate-distortion cost is selected as the prediction mode of the sub-block.
[0157] Optionally, the sub-block can be predicted through the prediction mode of the sub-block to determine or obtain the prediction result of the sub-block. Further, the prediction result of the current block can be determined or obtained according to the prediction results of each sub-block to improve the prediction accuracy of the current block. Optionally, the prediction result can be a predicted pixel, a predicted sub-block, etc.
[0158] Optionally, the prediction mode can be used for intra-frame prediction processing and / or inter-frame prediction processing of the current block.
[0159] Refer to Figure 6, when the processing device is an encoder on the encoding side, the encoder can receive video data input from a video source. For example, the encoder receives a video image from the video source, determines a to-be-predicted image in the video image, divides the to-be-predicted image into at least one image block, and uses the temporal and / or spatial correlation between video images to perform prediction processing on each of the at least one image block, including intra prediction processing and / or inter prediction processing. And the intra prediction processing and / or inter prediction processing respectively include at least one prediction mode. For these prediction modes, the encoder uses, for example, rate-distortion cost to determine the final adopted prediction mode for each of the at least one image block. For example, calculate the rate-distortion cost corresponding to each prediction mode or the rate-distortion cost of a combination of several prediction methods to determine the minimum rate-distortion cost from multiple rate-distortion costs. The prediction mode or combination of prediction modes corresponding to the minimum rate-distortion cost is the final adopted prediction mode for the image block.
[0160] Optionally, these prediction modes include intra prediction modes and inter prediction modes, and the intra prediction modes can be determined by using the DIMD mode or TIMD mode proposed in this application.
[0161] Optionally, after determining the prediction mode of at least one sub-block of the to-be-predicted image block (i.e., the current block) through step S10, the prediction mode can be used to perform prediction processing on the sub-block to determine or obtain the predicted sub-block corresponding to the sub-block, and further determine or obtain the predicted block corresponding to the to-be-predicted image block.
[0162] Optionally, the residual block between the predicted block and the current block can be calculated, and the residual block can be subjected to transformation and quantization processing, and then encoded by an entropy encoder to form an encoded bitstream.
[0163] Optionally, the encoded bitstream can include prediction parameters corresponding to the determined prediction mode and related side information; the prediction parameters are packed into the encoded bitstream after entropy encoding.
[0164] Optionally, the prediction parameters include indication information of the prediction mode.
[0165] Optionally, the transformed and quantized residual block can be added to the corresponding predicted data (such as the predicted block) obtained by using the prediction mode after inverse quantization and inverse transformation to obtain a reconstructed block. After obtaining the reconstructed block, the loop filter module performs loop filtering processing on the reconstructed block according to the filter control parameters to reduce distortion. After performing the loop filtering processing, the loop-filtered reconstructed block is stored according to the coded picture buffer.
[0166] Refer to Figure 7, when the processing device is a decoder on the decoding side, after the decoder receives the encoded bitstream, the entropy decoding unit of the decoder parses and decodes the encoded bitstream to obtain transform coefficients; the inverse transform unit and the inverse quantization unit of the decoder perform inverse transform and inverse quantization processing on the transform coefficients to obtain residual blocks.
[0167] Optionally, the entropy decoding unit of the decoder parses and decodes the encoded bitstream to obtain prediction data, such as prediction parameters and related auxiliary information, and the prediction processing unit of the decoder uses the prediction parameters for prediction processing to determine a prediction block corresponding to the residual block.
[0168] Optionally, the prediction processing includes intra prediction processing and / or inter prediction processing, and the intra prediction processing and / or inter prediction processing respectively include one or a combination of at least one prediction mode in at least one prediction mode.
[0169] Optionally, when the auxiliary information indicates to adopt the DIMD mode or the TIMD mode proposed in this application, the prediction mode corresponding to the residual block is determined according to the DIMD mode or the TIMD mode proposed in this application.
[0170] Optionally, after determining the prediction mode of at least one sub-block of the image block to be predicted (i.e., the current block) through step S10, the prediction mode is used to perform prediction processing on the sub-blocks to determine or obtain the prediction sub-blocks corresponding to the sub-blocks, and further determine or obtain the prediction block corresponding to the image block to be predicted, and then add the obtained residual block and the corresponding prediction block (including the prediction luminance block and the prediction chrominance block) to obtain a reconstructed block.
[0171] Optionally, the loop filtering unit of the decoder performs loop filtering processing on the reconstructed block to reduce distortion and improve video quality, and the reconstructed block after loop filtering processing is further combined into a decoded image and stored in the decoded image buffer or output as a decoded video signal.
[0172] Optionally, when the processing device is an encoder, the initially obtained prediction value can be the prediction value obtained under the corresponding prediction mode, and this prediction value can be directly used in the rate-distortion cost process.
[0173] Optionally, when the processing device is a decoder, the initially obtained prediction value can be the prediction value obtained under the prediction mode corresponding to the image block to be predicted (i.e., the image block located at the decoding end) indicated by the syntax element parsed from the bitstream.
[0174] Optionally, a predicted block can be used as the target image block, the residual block between the target image block and the current block can be calculated, and then through transformation and quantization processing, it is encoded by an entropy encoder to form an encoded bitstream; and / or some corresponding processing can be performed on the predicted block. For example, it is processed by other models, the processed image block is used as the target image block, and the steps of calculating the residual block between the target image block and the current block and subsequent steps are executed.
[0175] In this embodiment, by determining an appropriate prediction mode for at least one sub-block of the current block, the prediction accuracy of the local area of the image block (such as the area corresponding to the sub-block) is effectively improved, and thus the encoding and decoding quality in the video encoding and / or decoding process is improved.
[0176] Second Embodiment
[0177] Based on the first embodiment, the second embodiment is proposed.
[0178] In this embodiment, step S10 includes Method 1 and / or Method 2:
[0179] Method 1: Determine or obtain the prediction mode of at least one sub-block according to the gradient histogram corresponding to at least one sub-block determined or obtained through at least one reference region of the current block.
[0180] Optionally, according to the gradient histogram corresponding to at least one sub-block determined or obtained through at least one reference region of the current block, determine or obtain the prediction mode of at least one sub-block according to the gradient histogram.
[0181] Optionally, the gradient histogram is a statistical tool used to describe the gradient magnitude distribution of an image block (such as the current block, at least one sub-block of the current block, etc.) in different directions. It calculates the gradient magnitude values of each pixel in the reference region (such as a template) of the image block in the directions corresponding to the prediction modes within each frame, and statistically analyzes the distribution of these gradient magnitude values, thereby obtaining a histogram containing the gradient magnitude values corresponding to each prediction direction. Optionally, in intra-frame prediction, different prediction modes correspond to different prediction directions. For example, the vertical mode corresponds to the vertical direction, the horizontal mode corresponds to the horizontal direction, and the diagonal mode corresponds to the diagonal direction.
[0182] Optionally, each prediction mode has a specific direction used to describe its prediction direction. For each prediction direction, calculate the sum of the gradient magnitude values of each pixel in the reference region of the current block in this direction. This sum value reflects the overall gradient intensity of the image block in this prediction direction, and the gradient histogram records the sum of the gradient magnitude values corresponding to each prediction direction.
[0183] Optionally, determine or obtain the prediction mode of at least one sub-block according to at least one prediction mode corresponding to the prediction direction in which the sum of gradient magnitude values in the gradient histogram corresponding to the at least one sub-block satisfies a third condition.
[0184] Optionally, determine or obtain the prediction mode of at least one sub-block according to the matching information of at least one prediction mode corresponding to the prediction direction in which the sum of gradient magnitude values in the gradient histogram corresponding to the at least one sub-block satisfies a third condition with respect to the at least one sub-block.
[0185] Optionally, the matching information refers to the information used to evaluate the matching degree between different prediction modes and the block to be predicted (e.g., at least one sub-block of the current block). The matching information can be based on at least one metric, such as the rate-distortion cost, prediction error, texture similarity, etc., of the prediction result, to indicate the similarity and / or error between the prediction results determined or generated based on different prediction modes and the block to be predicted.
[0186] Optionally, the higher the matching degree between the prediction mode and the block to be predicted, the higher the accuracy of the prediction result of the block to be predicted obtained by using this prediction mode.
[0187] Optionally, at least one reference region of the current block can be predicted by a candidate prediction mode to obtain a predicted value, and the matching information of the candidate prediction mode with respect to the current block is determined according to the obtained predicted value and the reconstructed value of the at least one reference region.
[0188] Optionally, the current block can be predicted by a candidate prediction mode to obtain a predicted value, and the matching information of the candidate prediction mode with respect to the current block is determined according to the obtained predicted value and the original value of the current block.
[0189] Optionally, at least one reference region of the sub-block can be predicted by a candidate prediction mode to obtain a predicted value, and the matching information of the candidate prediction mode with respect to the sub-block is determined according to the obtained predicted value and the reconstructed value of the at least one reference region of the sub-block.
[0190] Optionally, the sub-block can be predicted by a candidate prediction mode to obtain a predicted value, and the matching information of the candidate prediction mode with respect to the sub-block is determined according to the obtained predicted value and the original value of the sub-block.
[0191] Optionally, the matching information includes: SAD (Sum of Absolute Differences), SATD (Sum of Absolute Transformed Differences), and / or MRSAD (Mean-Removed Sum of Absolute Differences).
[0192] Optionally, SAD is a simple and direct method for measuring the difference between two pixel blocks. It evaluates the matching degree by calculating the sum of the absolute differences of the corresponding pixels between the predicted block and the reference block (or the original block).
[0193] Optionally, SATD is a more complex matching metric. It evaluates the matching degree by first transforming the predicted block and the reference block (such as Hadamard transform), and then calculating the sum of the absolute differences of the transformed coefficients; SATD is mainly used to consider the texture and frequency characteristics of the image.
[0194] Optionally, the smaller the SAD value and / or the SATD value, the higher the matching degree. Conversely, the larger the SAD value and / or the SATD value, the lower the matching degree.
[0195] Optionally, the gradient magnitude value and the gradient direction of the pixels in at least one template (i.e., the reference region) of the current block can be determined, the gradient histogram of the at least one template of the current block with respect to the intra-frame prediction direction can be determined, the gradient histogram of at least one sub-block can be determined or obtained according to the gradient histogram of the current block and the at least one template of the at least one sub-block, the corresponding intra-frame prediction direction can be determined according to the gradient histogram of the at least one sub-block, and at least one prediction mode can be determined or obtained.
[0196] Optionally, at least one template of the current block refers to a group of neighboring pixels around the current block. The reasons for these neighboring pixels can provide important clues about the edge and texture orientation of the block to be predicted. Therefore, the intra-frame prediction mode of the current block can be analyzed and deduced based on these pixels.
[0197] Optionally, the method for determining or obtaining at least one prediction mode of at least one sub-block according to the gradient histogram corresponding to at least one sub-block determined or obtained through at least one reference region of the current block proposed in the embodiments of the present application can be an improved DIMD mode. Its basic principle can be to deduce the intra-frame prediction mode of the sub-block by analyzing the gradient magnitude and direction of adjacent pixels, or the usage of the intra-frame prediction modes of adjacent image blocks / non-adjacent image blocks.
[0198] Optionally, the implementation process of the improved DIMD mode may include: determining the gradient magnitude value and gradient direction of the pixels in the DIMD template, determining the gradient histogram or statistical result of the DIMD template with respect to the intra prediction direction, and determining or obtaining the prediction mode of the sub-block according to the intra prediction direction of the sub-block determined by the gradient histogram.
[0199] Optionally, according to at least one reference region of the current block, determine or obtain the gradient histogram corresponding to the current block; according to the gradient histogram corresponding to the current block, determine or obtain the gradient histogram corresponding to at least one sub-block.
[0200] Optionally, the gradient magnitude value of each pixel in the reference region of at least one sub-block in each direction corresponding to the intra prediction mode can be determined or obtained from the gradient histogram corresponding to the current block, so as to determine or obtain the gradient histogram corresponding to at least one sub-block.
[0201] Referring to Figure 8 , the block to be predicted (current block) includes sub-block A. Determine the template adjacent to the block to be predicted above and to the left of the block to be predicted, that is, the three lines above and to the left of the block to be predicted. Take the pixels in the middle line (for example, pixel A) as the pixels for calculating the gradient. By calculating the direction of the gradient of at least one pixel in the middle line, as well as the magnitudes of the horizontal gradient and the vertical gradient, the gradient direction of at least one pixel and the gradient magnitude value corresponding to the gradient can be obtained.
[0202] Optionally, the gradient magnitude value is the sum of the absolute values of the horizontal gradient and the vertical gradient. If the gradient magnitude values with the same gradient direction in at least one pixel are added together, the sum of the gradient magnitude values corresponding to the gradient direction can be obtained.
[0203] Optionally, a histogram of the gradient magnitude values of different gradient directions of at least one pixel (i.e., the gradient histogram corresponding to the current block) can be established, and the gradient histogram corresponding to sub-block A can be determined or obtained according to the reference region of sub-block A and the gradient histogram corresponding to the current block.
[0204] Exemplarily, in the process of predicting and processing the current block through the improved DIMD mode involved in the embodiments of the present application, the selection of the reference region of the current block can refer to Figure 8 , the selection of the reference region of the sub-block of the current block can refer to Figure 9, the solid line is the current block, which is divided into sub-block A, sub-block B, sub-block C, and sub-block D. The reference regions of sub-blocks A to D are respectively at least part of the reference region of the current block. Therefore, the gradient histogram corresponding to at least one sub-block can be determined or obtained through at least one reference region of the current block, and / or the reference region of at least one sub-block can be determined or obtained through at least one reference region of the current block. According to the reference region of at least one sub-block, the gradient histogram corresponding to at least one sub-block can be determined or obtained.
[0205] Exemplarily, in the process of performing prediction processing on the current block through the improved DIMD mode involved in the embodiments of the present application, the selection of the reference template (i.e., the reference region) of at least one sub-block of the current block can refer to Figure 10 , the solid line is the current block, which is divided into sub-block A, sub-block B, sub-block C, and sub-block D. The reference template of sub-block A is the external region adjacent to sub-block A (i.e., a part of the reference region of the current block). In the embodiments of the present application, the sub-blocks can be encoded or decoded in a preset order. When encoding the subsequent sub-block, the sampling of the previous sub-block in the preset encoding order can be used as a reference. Therefore, for the subsequent sub-block B, the left reference template corresponding to sub-block B can be determined or obtained by using the prediction result and / or the reconstructed block of sub-block A, and then the upper reference template can be determined or obtained according to the external region adjacent to sub-block B. For sub-block C, the upper reference template corresponding to sub-block C can also be determined or obtained by using the prediction result and / or the reconstructed block of sub-block A, and then the left reference template can be determined or obtained according to the external region adjacent to sub-block C. For sub-block D, the reference template corresponding to sub-block D can be determined or obtained by using the prediction results and / or the reconstructed blocks of sub-blocks A, B, and C respectively.
[0206] Optionally, the 3X3 horizontal Sobel operator and the vertical Sobel operator can be used to calculate the horizontal gradient Gx and the vertical gradient Gy respectively. For example, the horizontal gradient Gx and the vertical gradient Gy of a pixel x4 in a pixel line can be calculated according to the following formulas (1) and (2):
[0207]
[0208] Optionally, A can be a matrix composed of a total of 9 pixels centered on the pixel x4, including the upper pixel x1, the left pixel x3, the lower pixel x7, the right pixel x5, the upper left pixel x0, the lower left pixel x6, the upper right pixel x2, and the lower right pixel x8 of the pixel x4, as shown in the following formula (3):
[0209]
[0210] Optionally, the G gradient magnitude value is the sum of the absolute values of the horizontal gradient and the vertical gradient, and its calculation formula is as shown in formula (4):
[0211] G = |Gx| + |Gy|, Formula (4);
[0212] Optionally, the gradient direction corresponding to the pixel can be calculated by arctan(Gx / Gy).
[0213] Optionally, since each gradient direction corresponds to a specific gradient direction range, and each gradient direction range corresponds to a prediction direction of an intra prediction mode, for at least one pixel in the pixel line, the gradient amplitude values with the same gradient direction range in the at least one pixel can be added together to obtain the sum of the gradient amplitude values corresponding to the gradient direction range.
[0214] Optionally, the sum of the gradient amplitude values corresponding to the prediction direction of the corresponding intra prediction mode can also be obtained.
[0215] Referring to Figure 11 shown, is the gradient histogram corresponding to at least one sub - block, including the gradient amplitude values corresponding to the gradient amplitudes of the prediction directions of each intra prediction mode; according to Figure 11 , the mode 3 with the largest sum of gradient amplitude values can be selected as the prediction mode of the at least one sub - block.
[0216] Optionally, the improved DIMD mode involved in the embodiments of the present application can compete with conventional TIMD modes, OBIC modes, NNIP modes, DIMD modes, sub - block TIMD modes, etc., and the final mode is determined or obtained according to the rate - distortion cost of each mode applied to the current block.
[0217] Optionally, in this embodiment, the way to determine or obtain the reference region includes at least one of ways D to I in the third embodiment.
[0218] In this embodiment, since the gradient histogram can reflect the texture direction and intensity distribution of the image, therefore, by analyzing the gradient histogram of the sub - block, the embodiments of the present application can more accurately capture the change trend and texture details of the pixels in the sub - block, so as to select a prediction mode more suitable for the texture characteristics of the sub - block and improve the prediction accuracy of the local area of the image block.
[0219] Way 2: Determine or obtain the prediction mode of at least one sub - block according to at least one reference region and candidate prediction modes of the current block;
[0220] Optionally, the candidate prediction modes can be predefined possible prediction modes, and these modes can be applied to the prediction of the sub - block. Optionally, the candidate prediction modes include angle prediction modes, non - angle prediction modes, and / or prediction derivation modes.
[0221] Optionally, the angular prediction mode is a technique for predicting the current pixel block, which determines or generates a prediction block by propagating the values of adjacent pixels along a specific direction; the angular prediction mode is mainly used to process directional textures in images, which can effectively reduce spatial redundancy and improve compression efficiency.
[0222] In the HEVC standard, the intra prediction mode includes 33 angular prediction modes, which cover different angles from horizontal to vertical, ensuring accurate prediction of various texture directions. The angular prediction mode predicts the pixel values of the current block by selecting a specific angle and extracting values from adjacent pixels along that direction. For example, if a 45-degree angle is selected, the predicted value will be extracted from adjacent pixels in the upper left or lower right corner.
[0223] Optionally, the non-angular prediction mode can be a prediction mode other than the angular prediction mode. Exemplarily, the non-angular prediction mode includes at least one of the NNIP mode, EIP mode, BV mode, planar mode, and DC mode.
[0224] Optionally, the prediction derivation mode is a method of deriving the most suitable prediction mode for the current block by analyzing the relevant information of the current block. Exemplarily, the prediction derivation mode includes at least one of the DIMD mode, OBIC mode, and TIMD mode.
[0225] Optionally, according to at least one reference region of the current block, the prediction mode of at least one sub-block is determined or obtained from the candidate prediction modes. Optionally, since the reference region is a region with a strong correlation with the current block and can be used for the prediction processing of the current block, and the sub-block is a part of the current block, inheriting the position and some characteristics of the current block in the image, therefore, the common correlation between the current block and its reference region and sub-block can be utilized to select a suitable prediction mode for the sub-block of the current block from the candidate prediction modes to improve the prediction accuracy of the sub-block.
[0226] Optionally, the first candidate prediction mode can be determined or obtained according to the candidate prediction modes, and at least one prediction mode of the current block is determined or obtained from the first candidate prediction mode according to at least one reference region of the current block.
[0227] Optionally, in this embodiment, the method for determining or obtaining the reference region includes at least one of methods D to I in the third embodiment.
[0228] Optionally, in this embodiment, the candidate prediction modes can be determined or obtained according to at least one of methods A to C in the third embodiment.
[0229] Optionally, the solution for determining or obtaining the prediction mode of at least one sub-block according to at least one reference region and candidate prediction mode of the current block proposed in the embodiments of the present application can be an improved TIMD mode (hereinafter, for the sake of distinction, referred to as sub-block TIMD mode). Its basic principle is to determine or generate a prediction value by using the candidate prediction mode as a template (for example, at least one reference region of the current block), then calculate the SATD between the template prediction value and the reconstructed value, and select the mode with the smallest SATD as the TIMD mode and use it for the prediction of at least one sub-block of the current block. However, the present invention is not limited thereto, and the present invention can also be applied to other improved prediction derivation modes (such as DIMD mode, OBIC mode, etc.). Only TIMD is taken as an example for illustration here.
[0230] Optionally, the reference region includes a template.
[0231] Referring to Figure 12 , the block to be predicted (i.e., the current block) includes sub-block A, and the specific implementation process of the sub-block TIMD mode can include: determining the template of the block to be predicted; the template can be constructed by using the reconstructed pixels on the left or above the block to be predicted. By using the candidate prediction mode (for example, each mode in the MPM) in combination with the reference pixels of the template, a prediction value is determined or generated for the template. According to the SATD between the prediction value and the reconstructed value, the mode with the smallest SATD value is selected from the candidate prediction modes as the prediction mode of sub-block A.
[0232] Optionally, the template can be used as a reference benchmark for mode selection to simulate the local features (such as edge direction, texture) of the current block.
[0233] Optionally, the reference pixels of the template are used to determine or generate the prediction value of the template, and in combination with the candidate prediction modes in the MPM, the prediction result of the template is derived.
[0234] Optionally, the sub-block TIMD mode involved in the embodiments of the present application can compete with conventional TIMD mode, OBIC mode, NNIP mode, DIMD mode (such as the TIMD mode, OBIC mode, NNIP mode, DIMD mode of the current block), etc. According to the rate-distortion cost of each mode applied to the current block, the final mode is determined or obtained. Optionally, in the case where the final mode is the sub-block TIMD mode involved in the present application, the step of determining or obtaining the prediction mode of at least one sub-block according to at least one reference region and candidate prediction mode of the current block is executed.
[0235] Optionally, when the processing device is an encoder on the encoding side, the rate-distortion cost corresponding to each prediction mode (e.g., TIMD mode, sub-block TIMD mode, OBIC mode, NNIP mode, etc.) can be determined or obtained. Based on the rate-distortion cost corresponding to each prediction mode, the target mode is determined or obtained and used for predicting and processing the current block.
[0236] Optionally, when the processing device is an encoder on the encoding side, the rate-distortion cost corresponding to each prediction mode except the sub-block TIMD mode can be determined or obtained. When the determined or obtained target mode is the TIMD mode and the prediction modes of each sub-block of the current block are different from the prediction mode of the current block, the sub-block TIMD mode is replaced with the target mode. When the determined or obtained target mode is the TIMD mode and the prediction modes of each sub-block of the current block are the same as the prediction mode of the current block, the current block is predicted and processed with the TIMD mode as the target mode.
[0237] Optionally, when the processing device is an encoder on the encoding side, based on the SAD, SATD, and / or MRSAD corresponding to the sub-block TIMD mode and the TIMD mode, the first alternative mode is determined or obtained from the sub-block TIMD mode and the TIMD mode. Then, the rate-distortion cost corresponding to each of the first alternative mode and other prediction modes is determined. Based on the rate-distortion cost, the target mode is determined from the first alternative mode and other prediction modes and used for predicting and processing the current block.
[0238] Optionally, based on the prediction mode derived from the TIMD mode of the current block and the prediction mode derived from the sub-block TIMD mode, the prediction mode of the current block and / or at least one sub-block of the current block is determined or obtained. Optionally, the TIMD mode and the sub-block TIMD mode are a prediction derivation mode, which is a method of deriving the most suitable prediction mode for the current block by analyzing the relevant information of the current block. Therefore, the prediction mode of the current block and / or at least one sub-block of the current block can be determined or obtained through the prediction mode derived from the TIMD mode and the prediction mode derived from the sub-block TIMD mode.
[0239] Optionally, if the prediction mode derived from the TIMD mode of the current block is different from the prediction mode derived from the sub-block TIMD mode, then based on the prediction mode derived from the sub-block TIMD mode, the prediction mode of at least one sub-block is determined or obtained. Since the sub-block TIMD mode can select a more suitable prediction mode for at least one sub-block of the current block, therefore, when the prediction mode derived from the TIMD mode of the current block is different from the prediction mode derived from the sub-block TIMD mode, selecting the prediction mode derived from the sub-block TIMD mode can improve the prediction accuracy of the local area of the current block.
[0240] Optionally, in the case of competition in TIMD mode, OBIC mode, NNIP mode, DIMD mode, sub-block TIMD mode, etc., the TIMD mode can be compared with other modes except the sub-block TIMD mode. When the mode comparison result is the selected mode TIMD mode, the current block is predicted by the sub-block TIMD mode.
[0241] Optionally, since the sub-block TIMD mode is an improved TIMD mode and has better prediction effect than the TIMD mode, in the comparison process with other modes, the conventional TIMD mode can be directly used to compare with other modes. When the mode comparison result is other modes, other modes are used to predict the current block. When the mode comparison result is the TIMD mode, the sub-block TIMD mode replaces the TIMD mode and is used to predict the current block, thereby effectively reducing the computational amount and / or improving the prediction effect.
[0242] Optionally, the TIMD mode, OBIC mode, NNIP mode, DIMD mode, and sub-block TIMD mode are in the first candidate list, and the above-mentioned other modes (i.e., modes other than the TIMD mode, OBIC mode, NNIP mode, DIMD mode, and sub-block TIMD mode) are not in the first candidate list.
[0243] Optionally, the prediction mode of the current block includes the first mode.
[0244] Optionally, when the first mode includes the TIMD mode, the sub-block TIMD mode replaces the TIMD mode.
[0245] Optionally, the first mode can be the prediction mode in the mode comparison result.
[0246] In this embodiment, by setting the candidate prediction mode, the search range of the prediction mode can be reduced, the computational complexity is reduced, and then combined with the correlation between at least one reference region of the current block and at least one sub-block of the current block, a suitable prediction mode is determined for at least one sub-block, thereby effectively improving the prediction accuracy of the local region of the image block.
[0247] Optionally, determining or obtaining the prediction mode of at least one sub-block according to at least one reference region of the current block and the candidate prediction mode includes at least one of the following methods 3 to 5:
[0248] Method 3: Determine or obtain the prediction mode of at least one sub-block according to the prediction result of the current block determined or obtained by at least one reference region of the current block and the candidate prediction mode;
[0249] Optionally, according to at least one reference region of the current block and the candidate prediction modes, determine or obtain the prediction result of the current block, and according to the prediction result of the current block, determine or obtain the prediction modes of at least one sub-block.
[0250] Optionally, according to at least one reference region of the current block and the candidate prediction modes, determine or obtain the prediction result of the current block, and from the candidate prediction modes, determine or obtain the prediction modes of at least one sub-block according to the prediction result of the current block.
[0251] Optionally, according to at least one reference region of the current block and the candidate prediction modes, determine or obtain the prediction result of the current block, determine or obtain a first candidate prediction mode according to the candidate prediction modes, and from the first candidate prediction mode, determine or obtain the prediction modes of at least one sub-block according to the prediction result of the current block.
[0252] Optionally, determine or obtain the prediction result of the current block according to at least one reference region of the current block and the candidate prediction modes, and determine or obtain the matching information of each candidate prediction mode with respect to the current block according to the prediction result of the current block. For example, perform prediction on at least one reference region of the current block using the candidate prediction modes to obtain prediction values, and determine the matching information according to the obtained prediction values and the reconstruction values of at least one reference region.
[0253] Optionally, the matching information is the SAD and SATD values regarding the reconstruction values and the prediction values.
[0254] Optionally, determine or obtain the prediction modes of at least one sub-block from each candidate prediction mode according to the matching information of each candidate prediction mode with respect to the current block.
[0255] Optionally, the prediction result of the current block can represent the matching degree of each candidate prediction mode with the current block, and the higher the matching degree of a candidate prediction mode, the higher the accuracy of the prediction result of the current block obtained by using this candidate prediction mode. Also, since the sub-block is a part of the current block and inherits the position and some characteristics of the current block in the image, therefore, the possibility that the candidate prediction mode with a higher matching degree with the current block has a higher matching degree with at least one sub-block of the current block is also greater, and thus the prediction modes of at least one sub-block can be determined or obtained based on this.
[0256] Optionally, determine or obtain the prediction result of the current block according to at least one reference region of the current block and the candidate prediction modes, determine or obtain the prediction results of at least one sub-block according to the prediction result of the current block, and determine or obtain the prediction modes of at least one sub-block from the candidate prediction modes according to the prediction results of at least one sub-block. Compared with calculating the prediction results of the sub-blocks separately, directly determining or obtaining the prediction results corresponding to the sub-blocks from the prediction result of the current block can reduce the amount of calculation to a certain extent.
[0257] Optionally, the prediction result of at least one sub-block can be determined or obtained according to the reference region of at least one sub-block and the prediction result of the current block.
[0258] Optionally, the candidate prediction mode of the current block corresponds to at least one first reference region, and the candidate prediction mode of the sub-block of the current block corresponds to at least one second reference region. For example, if the candidate prediction mode of the current block is the TIMD mode and the candidate prediction mode of the sub-block of the current block is the sub-block TIMD mode, then the reference region A of the current block corresponds to the TIMD mode of the current block, and the reference region A' of the sub-block of the current block corresponds to the sub-block TIMD mode. The sizes and / or positions of the reference region A and the reference region A' are different; again, if the candidate prediction mode of the current block is the DIMD mode and the candidate prediction mode of the sub-block of the current block is the sub-block DIMD mode, then the reference region B of the current block corresponds to the DIMD mode of the current block, and the reference region B' of the sub-block of the current block corresponds to the sub-block DIMD mode. The sizes and / or positions of the reference region B and the reference region B' are different.
[0259] Optionally, the prediction value corresponding to at least one first reference region of the current block can be determined by using the candidate prediction mode of the at least one reference region of the current block. Since at least one second reference region of the sub-block of the current block is included in at least one first reference region of the current block, the prediction value of at least one second reference region of the sub-block can be determined by the prediction value corresponding to the first reference region. Furthermore, according to the above prediction value, the matching information of the sub-block of the current block can be determined, and according to the matching information of the sub-block of the current block, it can be determined whether to use the candidate prediction mode of the sub-block of the current block to perform prediction processing on the sub-block to obtain the prediction value of the sub-block, so as to determine or obtain the prediction value of the current block through the prediction value of the sub-block.
[0260] Optionally, by finding the sub-block prediction result corresponding to the reference region of the sub-block in the prediction result corresponding to at least one reference region of the current block, the computational complexity can be reduced to a certain extent.
[0261] During the prediction process of the image block, all prediction modes are traversed respectively, and the prediction results in each mode are calculated. The prediction results include the prediction results of the DIMD mode, the TIMD mode, the LIC mode, the NNIP mode, etc. The processing method of the sub-block TIMD mode proposed in this application can at least partially reuse these prediction results of the image blocks. For example, through the conventional TIMD mode, according to at least one reference region of the current block, the prediction result of the current block is determined or obtained, and according to the reference region of at least one sub-block and the prediction result of the current block, the prediction result of at least one sub-block is determined or obtained, realizing at least partial reuse of information without increasing additional computational amount.
[0262] Exemplarily, in the process of performing prediction processing on the current block through the sub-block TIMD mode involved in the embodiments of the present application, the selection of the reference region of the current block can refer to Figure 12 , and the selection of the reference region of the sub-block of the current block can refer to Figure 13 , the solid line is the current block, which is divided into sub-block A, sub-block B, sub-block C, and sub-block D, and the reference regions of sub-blocks A to D are respectively at least part of the reference region of the current block. Therefore, the sub-block prediction result corresponding to the reference region of the sub-block can be found from the prediction results corresponding to at least one reference region of the current block, so as to reduce the calculation amount.
[0263] Exemplarily, in the process of performing prediction processing on the current block through the sub-block TIMD mode involved in the embodiments of the present application, the selection of the reference template of at least one sub-block of the current block can refer to Figure 14 , the solid line is the current block, which is divided into sub-block A, sub-block B, sub-block C, and sub-block D; the reference template of sub-block A is the external region adjacent to sub-block A (i.e., a part of the reference region of the current block).
[0264] Optionally, the embodiments of the present application can perform encoding or decoding processing on the sub-blocks in a preset order. When encoding the subsequent sub-block, the sampling of the previous sub-block in the preset encoding order can be referred to. Therefore, in Figure 14 , for the subsequent sub-block B, the prediction result and / or reconstructed block of sub-block A can be used to determine or obtain a partial reference template corresponding to sub-block B, and the remaining reference template can be determined or obtained according to the external region adjacent to sub-block B. For sub-block C, the prediction result and / or reconstructed block of sub-block A can also be used to determine or obtain a partial reference template corresponding to sub-block C, and then the remaining reference template can be determined or obtained according to the external region adjacent to sub-block C. For sub-block D, the prediction results and / or reconstructed blocks of sub-blocks A, B, and C can be used respectively to determine or obtain the reference template corresponding to sub-block D.
[0265] Optionally, the current block includes a first sub-block and a second sub-block, and the first sub-block and / or the second sub-block can correspond to one or at least one of the above-mentioned sub-blocks.
[0266] Optionally, according to at least one reference region of the current block and the candidate prediction mode, the prediction result of the current block is determined or obtained. According to the reference region corresponding to the first sub-block and the prediction result of the current block, the prediction result of the first sub-block is determined or obtained. According to the prediction result of the first sub-block, the matching information of each candidate prediction mode with respect to the first sub-block is determined or obtained. According to the matching information of each candidate prediction mode with respect to the first sub-block, the prediction mode of the first sub-block is determined or obtained. According to the prediction mode of the current block, the prediction mode of the second sub-block is determined or obtained.
[0267] Optionally, by using the sub-block TIMD mode, the prediction mode of at least a part of the sub-blocks of the current block is determined or obtained, and another part of the current block (e.g., the second sub-block) can use the prediction mode of the current block, so as to effectively improve the prediction accuracy of at least a part of the local area in the current block while reducing the computational complexity.
[0268] Refer to Figure 13 , the solid line is the current block, which is divided into sub-block A, sub-block B, sub-block C, and sub-block D. According to at least one reference region and candidate prediction modes of the current block, the prediction result of the current block is determined or obtained. According to the reference region corresponding to sub-block A and the prediction result of the current block, the prediction result of sub-block A is determined or obtained. According to the prediction result of sub-block A, the matching information (e.g., SAD, SATD, and / or MRSAD) of each candidate prediction mode with respect to sub-block A is determined or obtained. According to the matching information of each candidate prediction mode with respect to sub-block A, the prediction mode of sub-block A is determined or obtained. According to the prediction result of the current block, the matching information of each candidate prediction mode with respect to the current block is determined or obtained. According to the matching information of each candidate prediction mode with respect to the current block, the prediction mode of the current block is determined or obtained. The prediction mode of the current block is used as the prediction modes of sub-blocks B, C, and D. Through the above solution, the prediction accuracy of at least a part of the local area (e.g., sub-block A) in the current block can be effectively improved, and the computational complexity can be reduced to a certain extent.
[0269] Optionally, according to the prediction result of the current block, the first prediction result of the sub-block whose corresponding at least one reference region belongs to the reference region corresponding to at least a part of the current block can be determined or obtained, while for the sub-block whose corresponding at least one reference region belongs to the current internal region, the sampling of the previous sub-block with a preset coding order in front can be used, and according to the prediction result of the previous sub-block and / or the reconstructed block, the second prediction result of the sub-block whose corresponding at least one reference region belongs to the current internal region can be determined or obtained.
[0270] Optionally, when the reference region of the sub-block includes both the part that coincides with the reference region of the current block and the part located in the internal region of the current block, the final prediction result of the sub-block can be determined or obtained according to the above first prediction result and second prediction result.
[0271] Refer to Figure 14 , the solid line is the current block, which is divided into sub-block A, sub-block B, sub-block C, and sub-block D. The reference region of sub-block A coincides with the reference region of the current block. Therefore, the prediction result of sub-block A can be determined or obtained according to the prediction result of the current block and the reference region of sub-block A. The upper reference region of sub-block B coincides with the reference region of the current block. Therefore, the prediction result corresponding to the upper reference region of sub-block B (i.e., the first prediction result) can be determined or obtained according to the prediction result of the current block and the upper reference region of sub-block B.
[0272] Optionally, referring to Figure 14 , the left reference region of sub-block B is inside the current block, that is, inside sub-block A. According to the preset coding order, sub-block A is the previous sub-block of sub-block B (i.e., the sub-block with a previous coding order). Therefore, the prediction result corresponding to the left reference region of sub-block B (i.e., the second prediction result) can be determined or obtained based on the prediction result and / or the reconstructed block of sub-block A. Furthermore, based on the first prediction result and the second prediction result of sub-block B, the final prediction result corresponding to sub-block B can be determined or obtained. For sub-block C, similarly, the first prediction result corresponding to the left reference region can be determined or obtained based on the prediction result of the current block, and the prediction result corresponding to the upper reference region of sub-block C (i.e., the second prediction result) can be determined or obtained through the prediction result and / or the reconstructed block of sub-block A, which belongs to the previous sub-block of sub-block C. Furthermore, based on the first prediction result and the second prediction result of sub-block C, the final prediction result corresponding to sub-block C can be determined or obtained. For sub-block D, the prediction results corresponding to the upper and left reference regions of sub-block D can be determined or obtained respectively through the prediction results and / or the reconstructed blocks of sub-blocks B and C, which belong to the previous sub-blocks of sub-block D, and used as the final prediction result of sub-block D.
[0273] Optionally, in this embodiment, the method for determining or obtaining the reference region includes at least one of Method D to Method I in the third embodiment.
[0274] Optionally, in this embodiment, the candidate prediction mode can be determined or obtained according to at least one of Method A to Method C in the third embodiment.
[0275] In this embodiment, determining or obtaining the prediction mode of at least one sub-block based on the prediction result of the current block determined or obtained through at least one reference region of the current block and the candidate prediction mode can better utilize the local characteristics in these image blocks, obtain a prediction mode with a higher degree of adaptation to the sub-block, and thus improve the prediction accuracy.
[0276] Method Four: Determine or obtain the prediction mode of at least one sub-block based on the prediction result of at least one sub-block determined or obtained through at least one reference region of the current block and the candidate prediction mode;
[0277] Optionally, based on the prediction result of at least one sub-block determined or obtained through at least one reference region of the current block and the candidate prediction mode, determine or obtain the prediction mode of at least one sub-block according to the prediction result of at least one sub-block.
[0278] Optionally, based on the prediction result of at least one sub-block determined or obtained through at least one reference region of the current block and the candidate prediction mode, determine or obtain the prediction mode of at least one sub-block from the candidate prediction mode according to the prediction result of at least one sub-block.
[0279] Optionally, according to the candidate prediction mode and at least one reference region of the current block, determine or obtain the prediction result of the current block. According to the prediction result of the current block, determine or obtain the prediction results of at least one sub-block. According to the prediction results of at least one sub-block, determine or obtain the prediction mode of at least one sub-block. Optionally, the candidate prediction mode may include the TIMD mode and the sub-block TIMD mode. Determine or obtain the prediction result of the current block through the TIMD mode, and then determine the prediction results corresponding to the at least one reference region of the sub-blocks in the prediction result of the current block as the prediction results of the at least one sub-block, so as to realize at least partial reuse of the prediction results of other modes. Compared with separately calculating the prediction results of each sub-block, in the embodiments of the present application, by obtaining the prediction results of the sub-blocks from the prediction result of the current block, at least partial reuse of the results in other prediction modes is realized without increasing additional computational complexity.
[0280] Optionally, according to at least one reference region of the current block, determine or obtain at least one reference region of at least one sub-block; according to the candidate prediction mode and at least one reference region of at least one sub-block, determine or obtain the prediction result of at least one sub-block, and according to the prediction result of at least one sub-block, determine or obtain the prediction mode of at least one sub-block.
[0281] Exemplarily, in the process of performing prediction processing on the current block through the sub-block TIMD mode involved in the embodiments of the present application, the selection of the reference region of the current block may refer to Figure 12 , and the selection of the reference region of the sub-blocks of the current block may refer to Figure 13 , the solid line is the current block, which is divided into sub-block A, sub-block B, sub-block C, and sub-block D, and the reference regions of sub-blocks A to D are respectively at least part of the reference region of the current block.
[0282] Optionally, according to the candidate prediction mode and at least one reference region of the current block, determine or obtain the prediction result of the current block. According to at least one reference region of the current block, determine or obtain at least one reference region of at least one sub-block; according to the candidate prediction mode and at least one reference region of at least one sub-block, determine or obtain the prediction result of at least one sub-block, and according to the obtained prediction result of at least one sub-block, determine or obtain the prediction mode of at least one sub-block.
[0283] Optionally, in this embodiment, the method for determining or obtaining the reference region includes at least one of methods D to I in the third embodiment.
[0284] Optionally, in this embodiment, the candidate prediction mode may be determined or obtained according to at least one of methods A to C in the third embodiment.
[0285] In this embodiment, according to the prediction results of at least one sub-block determined or obtained based on at least one reference region of the current block and candidate prediction modes, determining or obtaining the prediction mode of at least one sub-block can better utilize the local characteristics in these image blocks, obtain a prediction mode with a higher adaptation degree to the sub-block, and thus improve the prediction accuracy.
[0286] Method 5: determining or obtaining the prediction mode of at least one sub-block according to the matching information of each candidate prediction mode with respect to at least one sub-block determined or obtained based on at least one reference region of the current block and candidate prediction modes;
[0287] Optionally, according to at least one reference region of the current block and candidate prediction modes, determining or obtaining the matching information of each candidate prediction mode with respect to at least one sub-block, and according to the matching information, determining or obtaining at least one sub-block's prediction mode from each candidate prediction mode.
[0288] Optionally, the matching information refers to the information used to evaluate the matching degree between different prediction modes and the block to be predicted (for example, at least one sub-block of the current block). The matching information can be based on at least one metric, such as the rate-distortion cost of the prediction result, prediction error, texture similarity, etc., to indicate the similarity and / or error between the prediction results determined or generated based on different prediction modes and the block to be predicted. Optionally, the higher the matching degree between the prediction mode and the block to be predicted, the higher the accuracy of the prediction result of the block to be predicted obtained using this prediction mode.
[0289] Optionally, the matching information includes: SAD, SATD, and / or MRSAD.
[0290] Optionally, according to the candidate prediction modes and at least one reference region of the current block, determining or obtaining the prediction results of the current block under each candidate prediction mode, according to the prediction results of the current block, determining or obtaining the prediction results of at least one sub-block under each candidate prediction mode, and according to the prediction results of at least one sub-block, determining or obtaining the matching information of each candidate prediction mode with respect to at least one sub-block. For example, according to the prediction results of at least one sub-block, determining or obtaining the predicted values (i.e., prediction results) obtained by predicting at least one reference region of the sub-block using the candidate prediction mode, and according to the predicted values and the reconstructed values of at least one reference region of the sub-block, determining the matching information of the candidate prediction mode with respect to at least one sub-block.
[0291] Optionally, the matching information is the SAD, SATD, and / or MRSAD values regarding the reconstructed values and predicted values. According to the matching information, a candidate prediction mode with a higher matching degree can be selected as the prediction mode of at least one sub-block.
[0292] Optionally, through the above solution of the embodiments of the present application, the rate-distortion cost can be calculated for the current block and the sub-blocks respectively in the sub-block TIMD mode, so as to determine the prediction modes of the current block and the sub-blocks respectively, improving the processing efficiency.
[0293] Optionally, according to a preset sorting rule, the candidate prediction modes can be sorted based on the matching information with respect to at least one sub-block to obtain a mode sorting result, and according to the mode sorting result, the prediction mode of at least one sub-block can be determined or obtained.
[0294] Optionally, the prediction mode of at least one sub-block can be determined or obtained based on the value range corresponding to the matching information of each candidate prediction mode with respect to at least one sub-block.
[0295] Optionally, the prediction mode of at least one sub-block can be determined or obtained based on the comparison result between at least two values corresponding to the matching information of each candidate prediction mode with respect to at least one sub-block.
[0296] Exemplarily, the candidate prediction modes within a preset sorting position and / or a preset sorting range in the mode sorting result are determined as the prediction mode of at least one sub-block.
[0297] Optionally, in this embodiment, the method for determining or obtaining the reference region includes at least one of Method D to Method I in the third embodiment.
[0298] Optionally, in this embodiment, the candidate prediction modes can be determined or obtained according to at least one of Method A to Method C in the third embodiment.
[0299] In this embodiment, according to the matching information of each candidate prediction mode with respect to at least one sub-block determined or obtained based on at least one reference region of the current block and the candidate prediction modes, the prediction mode of at least one sub-block is determined or obtained, which can better utilize the local characteristics in these image blocks, obtain a prediction mode with a higher degree of adaptation to the sub-blocks, and thus improve the prediction accuracy.
[0300] Third Embodiment
[0301] Based on any of the above embodiments, a third embodiment is proposed.
[0302] In this embodiment, the candidate prediction modes are determined or obtained according to at least one of the following Method A to Method C:
[0303] Method A, the first mode list;
[0304] Optionally, the mode list (i.e., the first mode list and / or the non-first mode list) is a set for storing at least one prediction mode, providing multiple possible mode options for the prediction of the current block. By comparing the prediction effects of different modes in the mode list, an appropriate prediction mode can be matched for the current block and / or at least one sub-block of the current block, so as to improve the prediction accuracy for the current block and / or at least one sub-block of the current block. Optionally, there can be one or more mode lists, and the candidate prediction modes in each mode list can be different or at least partially the same.
[0305] Optionally, the first mode list is a list for separately determining the prediction mode of the current block, and can also be a list for separately determining the prediction mode of at least one sub-block within the current block, or can also be a list for determining the prediction mode of the current block and a list for the prediction mode of at least one sub-block within the current block.
[0306] Optionally, the first mode list may include an MPM list. Optionally, the first mode list in the embodiments of the present application may be an improved MPM list.
[0307] Optionally, the MPM list is a set containing several prediction modes, and these modes are considered to be the most likely prediction modes applicable to the prediction of the current block. The determination or generation of the MPM list is based on the neighborhood information of the current block (such as the prediction modes of the upper block and the left block) and statistical information (such as the probability of mode occurrence). In this way, the MPM list can reduce the amount of mode information that the encoder needs to transmit, and at the same time improve the prediction accuracy of the decoder for the prediction mode.
[0308] Optionally, the candidate prediction mode is a specific prediction mode option in the mode list, and is a prediction mode that the current block and / or at least one sub-block of the current block may adopt during the prediction process.
[0309] Optionally, in intra prediction, the candidate prediction modes in the first mode list may include: at least one angular prediction mode, at least one non-angular prediction mode, and / or at least one prediction derivation mode.
[0310] Optionally, based on the candidate prediction modes in the first mode list and at least one reference region of the current block, the prediction mode of at least one sub-block is determined or obtained.
[0311] Optionally, based on the prediction result of the current block determined or obtained through at least one reference region of the current block and the candidate prediction modes in the first mode list, the prediction mode of at least one sub-block is determined or obtained;
[0312] Determine or obtain the prediction mode of at least one sub-block according to the prediction result of at least one sub-block determined or obtained based on at least one reference region of the current block and candidate prediction modes in the first mode list.
[0313] Determine or obtain the prediction mode of at least one sub-block according to the matching information of each candidate prediction mode relative to at least one sub-block determined or obtained based on at least one reference region of the current block and candidate prediction modes in the first mode list.
[0314] In this embodiment, the first mode list can provide candidate prediction modes with better adaptability for the current block and its sub-blocks, so as to improve the prediction effect of the current block and its sub-blocks; at the same time, the setting of the first mode list effectively narrows the search range of candidate prediction modes and effectively improves the processing efficiency.
[0315] Method B, non-first mode list;
[0316] Optionally, the non-first mode list includes prediction modes located outside the first mode list.
[0317] Optionally, the non-first mode list can be a second mode list. Optionally, the non-first mode list is a list for separately determining the prediction mode of the current block, and the non-first mode list can also be a list for separately determining the prediction mode of at least one sub-block within the current block. The non-first mode list can also be a list for determining the prediction mode of the current block and a list for the prediction mode of at least one sub-block within the current block.
[0318] In this embodiment, the setting of the non-first mode list further improves the richness of candidate prediction modes and provides candidate prediction modes with better adaptability for the current block and its sub-blocks, so as to improve the prediction effect of the current block and its sub-blocks.
[0319] Optionally, the candidate prediction modes in the first mode list and the non-first mode list can be determined or obtained according to at least one of the following:
[0320] Method a1, prediction modes corresponding to sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks and / or coded picture blocks at preset positions of the current block;
[0321] Optionally, the current block, adjacent blocks, non-adjacent blocks, co-located blocks, coded picture blocks at the prediction position are image regions at the same partitioning level; sub-blocks of the current block, adjacent blocks, co-located blocks, coded picture blocks at the prediction position are image regions at the same partitioning level, and sub-blocks of the current block, adjacent blocks, co-located blocks, coded picture blocks at the prediction position are respectively image regions at the next partitioning level of the current block, adjacent blocks, non-adjacent blocks, co-located blocks, coded picture blocks at the prediction position.
[0322] Optionally, in video coding and decoding technology, it is necessary to perform block partitioning on an image. For example, an image can be partitioned into at least one strip, a strip can be partitioned into at least one coding unit, and a coding unit can be partitioned into at least one sub-block; different strips are at the same partitioning level, different coding units are at the same partitioning level, different sub-blocks are at the same partitioning level, while a strip and a coding unit belong to different partitioning levels, and a coding unit and a sub-block belong to different partitioning levels.
[0323] Optionally, the current block includes at least one sub-block. The sub-block is a part of the current block and inherits the position and some characteristics of the current block in the image. Therefore, it can provide a reference for the prediction mode of the current block. Furthermore, at least one candidate prediction mode in the mode list can be determined according to the prediction mode corresponding to the sub-block of the current block.
[0324] Optionally, an adjacent block of the current block refers to an image block that is directly adjacent to the current block in space, and the adjacent block can be a block that has been predicted or reconstructed. The adjacent block has a high spatial correlation with the current block. Therefore, the prediction mode and texture features of the adjacent block are often similar to those of the current block. By analyzing the prediction mode of the adjacent block, a reference can be provided for the prediction mode of the current block and the prediction accuracy of the current block can be further improved. Exemplarily, the adjacent blocks include image blocks located at the upper, left, and / or upper-left adjacent positions of the current block.
[0325] Referring to Figure 15 , the solid-line block is the current block and is partitioned into sub-block A, sub-block B, sub-block C, and sub-block D; some adjacent blocks of the current block are used as pixel samplings, and the prediction modes corresponding to the pixel samplings will be analyzed to determine or obtain at least one candidate prediction mode in the mode list.
[0326] Optionally, referring to Figure 15 , the pixel samplings of the adjacent blocks of the current block used to determine or obtain the candidate prediction mode may include at least one of the following positions: left (L), up (A), bottom-left (BL), top-right (AR), and top-left (AL).
[0327] Optionally, a co-located block can be an image block in a co-located image that has the same position and size as the current block, and the co-located image can be the image that is closest in time to the current image in the reference image. Since there is a strong temporal correlation between the co-located block and the current block, using the prediction mode of the co-located block as the candidate prediction mode can better capture the motion characteristics in the video sequence and improve the prediction accuracy.
[0328] Optionally, a non-adjacent block of the current block refers to an image block that is not directly adjacent to the current block spatially but may be within a certain range or have a certain correlation. Moreover, the non-adjacent block can also be a block that has been predicted or reconstructed. Although the non-adjacent block is not directly adjacent to the current block, there may still be a certain correlation between them. Therefore, it has certain reference value for the selection of the target prediction mode of the current block and the prediction of the current block.
[0329] Optionally, the encoded image blocks at preset positions refer to the encoded blocks at certain positions preset according to specific rules or algorithms. These positions can be fixed (such as the upper left corner block) or dynamically determined according to the image content. Although the non-adjacent blocks and the encoded image blocks at preset positions may be at a relatively far spatial distance from the current block, they may contain some unique texture or pattern information, and this information can supplement the information of adjacent blocks and co-located blocks to further optimize the selection of the prediction mode.
[0330] Optionally, determine or obtain candidate prediction modes in at least one mode list according to the prediction modes corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at preset positions of the current block.
[0331] Optionally, determine at least some of the prediction modes corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at preset positions of the current block as candidate prediction modes in at least one mode list.
[0332] Optionally, determine or obtain candidate prediction modes in at least one mode list according to the prediction modes corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at preset positions of the current block, and determine or obtain the target prediction mode of the current block according to the candidate prediction modes in at least one mode list.
[0333] Optionally, the prediction modes corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at preset positions of the current block include at least one of: angular prediction mode, non-angular prediction mode, and prediction derivation mode.
[0334] Optionally, the non-angular prediction mode can be a prediction mode other than the angular prediction mode. Exemplarily, the non-angular prediction mode includes at least one of: NNIP mode, EIP mode, BV mode, planar mode, and DC mode.
[0335] Optionally, the prediction derivation mode is a method of deriving the most suitable prediction mode for the current block by analyzing the relevant information of the current block. Exemplarily, the prediction derivation mode includes at least one of: DIMD mode, OBIC mode, and TIMD mode.
[0336] Optionally, determine the angular prediction mode corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded picture blocks at a preset position of the current block as candidate prediction modes in at least one mode list.
[0337] Optionally, determine or obtain at least one first angular prediction mode according to the non-angular prediction mode and / or prediction derivation mode corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded picture blocks at a preset position of the current block, and determine the at least one first angular prediction mode as candidate prediction modes in at least one mode list.
[0338] Optionally, when the prediction mode corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded picture blocks at a preset position of the current block is a non-angular prediction mode and / or a prediction derivation mode, at least one possible angular prediction mode can be derived according to the above non-angular prediction mode and / or prediction derivation mode and used in the transformation process during encoding. In the embodiments of the present application, the angular prediction mode determined or obtained based on the above non-angular prediction mode and / or prediction derivation mode is also used as candidate prediction modes in at least one mode list, thereby increasing the diversity of candidate prediction modes in the mode list, improving the probability of selecting the optimal mode, and further improving the prediction accuracy.
[0339] Optionally, determine or obtain candidate prediction modes in at least one mode list according to the adjacent prediction modes of the prediction mode corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded picture blocks at a preset position of the current block. Optionally, the adjacent prediction modes of the prediction mode may satisfy adjacent in pattern and / or adjacent in value.
[0340] Optionally, adjacent in pattern means other patterns that are adjacent to a certain specific pattern (for example, the first prediction mode) in terms of direction or type in the definition or arrangement of the prediction mode. These patterns are usually logically or functionally associated with the first prediction mode and may have similar prediction directions or texture features.
[0341] Optionally, adjacent in value means other patterns that are adjacent to a certain specific pattern in terms of the numerical representation or index of the pattern. These patterns usually have consecutive index values in the coding standard, indicating that they are similar in function or direction. Exemplarily, in the HEVC standard, the angular mode is represented by an index value. If the index of the first possible mode is n, then the patterns adjacent in value may be n - 1 and n + 1.
[0342] In this embodiment, determining or obtaining candidate prediction modes in at least one mode list according to the prediction modes corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position of the current block can improve the fitness between the candidate prediction modes and the current block, thereby improving the prediction effect of the current block. At the same time, compared with screening candidate prediction modes in a full range, the embodiments of the present application utilize the existing information, that is, the prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position, effectively narrowing the search range of the candidate prediction modes and reducing the computational complexity.
[0343] Method a2, the prediction modes corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position of the current block;
[0344] Optionally, the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position of the current block include: sub-blocks of the adjacent blocks of the current block, sub-blocks of the non-adjacent blocks, sub-blocks of the co-located blocks and / or sub-blocks of the encoded image blocks at a preset position.
[0345] Optionally, the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position of the current block may also include at least one sub-block. The above sub-blocks are part of the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position, and they inherit the positions and some characteristics of the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position in the image. Therefore, they can also provide a reference for the prediction mode of the current block.
[0346] Optionally, determine or obtain candidate prediction modes in at least one mode list according to the prediction modes corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position of the current block.
[0347] Optionally, determine at least some of the prediction modes corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position of the current block as candidate prediction modes in at least one mode list.
[0348] Optionally, determine or obtain candidate prediction modes in at least one mode list according to the prediction modes corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position of the current block, and determine or obtain the target prediction mode of the current block according to the candidate prediction modes in at least one mode list.
[0349] Optionally, the prediction modes corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at a preset position of the current block include at least one of an angular prediction mode, a non-angular prediction mode, and a prediction derivation mode.
[0350] Optionally, determine the angular prediction mode corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks, and / or the encoded image blocks at the preset positions of the current block as candidate prediction modes in at least one mode list.
[0351] Optionally, determine or obtain at least one first angular prediction mode according to the non-angular prediction mode and / or prediction derivation mode (such as TIMD mode, OBIC mode, and / or DIMD mode) corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks, and / or the encoded image blocks at the preset positions of the current block, and determine the at least one first angular prediction mode as candidate prediction modes in at least one mode list.
[0352] Optionally, when the prediction mode corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks, and / or the encoded image blocks at the preset positions of the current block is a non-angular prediction mode and / or a prediction derivation mode, at least one possible angular prediction mode can be derived according to the above non-angular prediction mode and / or prediction derivation mode and used in the transformation process during encoding. In the embodiments of the present application, the angular prediction mode determined or obtained based on the above non-angular prediction mode and / or prediction derivation mode is also used as candidate prediction modes in at least one mode list, so as to increase the diversity of candidate prediction modes in the mode list, improve the probability of selecting the optimal mode, and further improve the prediction accuracy.
[0353] Exemplarily, the prediction mode corresponding to the adjacent block of the current block is the TIMD mode, and the actually used angular prediction mode of the adjacent block in the TIMD mode is mode A. Then, mode A can be used as candidate prediction modes in at least one mode list.
[0354] Exemplarily, the adjacent block of the current block includes 4 sub-blocks (hereinafter referred to as adjacent sub-blocks), and the prediction mode corresponding to the adjacent block of the current block is the TIMD mode; in the TIMD mode, mode B, mode C, mode D, mode E, and mode F, that is, 5 different angular prediction modes are used for the adjacent block and the 4 adjacent sub-blocks respectively. Then, at least one of mode B to mode F can be determined as candidate prediction modes in at least one mode list to increase the diversity of candidate prediction modes in the mode list and improve the probability of selecting the optimal mode.
[0355] Optionally, determine or obtain candidate prediction modes in at least one mode list according to the adjacent prediction modes of the prediction modes corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks, and / or the encoded image blocks at the preset positions of the current block. Optionally, the adjacent prediction modes of the prediction modes can satisfy adjacent in mode and / or adjacent in value.
[0356] In this embodiment, determining or obtaining candidate prediction modes in at least one mode list according to the prediction modes corresponding to adjacent blocks, non-adjacent blocks, co-located blocks, and / or sub-blocks of encoded image blocks at a preset position of the current block can improve the fitness between the candidate prediction modes and the current block, thereby improving the prediction effect of the current block. At the same time, compared with screening candidate prediction modes in a full range, the embodiments of the present application utilize existing information, that is, the prediction modes corresponding to adjacent blocks, non-adjacent blocks, co-located blocks, and / or sub-blocks of encoded image blocks at a preset position, to effectively narrow the search range of candidate prediction modes and reduce the computational complexity.
[0357] Method a3, the prediction modes corresponding to adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at a preset position of the sub-blocks of the current block;
[0358] Optionally, the adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at a preset position of the sub-blocks of the current block include: adjacent blocks of the sub-blocks of the current block, non-adjacent blocks of the sub-blocks of the current block, co-located blocks of the sub-blocks of the current block, and / or encoded image blocks at a preset position of the sub-blocks of the current block.
[0359] Optionally, determine the prediction modes corresponding to adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at a preset position of the sub-blocks of the current block as candidate prediction modes in at least one mode list.
[0360] Optionally, the adjacent block of the sub-block of the current block refers to an image block that is directly adjacent to the sub-block of the current block in space, and the adjacent block can be a block that has been predicted or reconstructed. The adjacent block has a high degree of correlation with the sub-block of the current block in space. Therefore, the prediction mode and / or texture feature of the adjacent block tend to be similar to those of the sub-block of the current block and the current block. Therefore, the prediction mode corresponding to the adjacent block of the sub-block of the current block can be used as a reference for screening candidate prediction modes, so as to improve the fitness between the candidate prediction modes in the mode list and the current block.
[0361] Optionally, the co-located block of the sub-block of the current block can be an image block with the same position and size as the sub-block of the current block in the co-located image, and the co-located image can be the image that is closest in time to the current image in the reference image. Since there is a strong temporal correlation between the co-located block and the sub-block, the prediction mode of the co-located block of the sub-block can be used as a reference for screening candidate prediction modes, so as to improve the fitness between the candidate prediction modes in the mode list and the current block.
[0362] Optionally, a non-adjacent block of a sub-block of the current block refers to an image block that is not directly adjacent to the sub-block spatially, but may be within a certain range or have a certain correlation. Moreover, the non-adjacent block can also be a block that has been predicted or reconstructed. Although the non-adjacent block is not directly adjacent to the current block, there may still be a certain correlation between it and the sub-block as well as the current block. Therefore, it can play a certain reference role in determining the candidate prediction mode.
[0363] Optionally, an encoded image block at a preset position refers to an encoded block at certain positions preset according to specific rules or algorithms; these positions can be fixed (such as the upper left corner block), or can be dynamically determined according to the image content. Although the non-adjacent block and the encoded image block at the preset position may have a relatively large spatial distance from the sub-block, they may contain some unique texture or pattern information, and this information can be used as a supplement to the information of adjacent blocks and co-located blocks to further optimize the selection of the candidate prediction mode.
[0364] Optionally, determine or obtain a candidate prediction mode in at least one mode list according to the prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at preset positions of the sub-block of the current block.
[0365] Optionally, determine at least some of the prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at preset positions of the sub-block of the current block as candidate prediction modes in at least one mode list.
[0366] Optionally, determine or obtain a candidate prediction mode in at least one mode list according to the prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at preset positions of the sub-block of the current block, and determine or obtain the target prediction mode of the current block according to the candidate prediction mode in at least one mode list.
[0367] Optionally, the prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at preset positions of the sub-block of the current block include at least one of: an angular prediction mode, a non-angular prediction mode, and a prediction derivation mode.
[0368] Optionally, determine the angular prediction mode corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at preset positions of the sub-block of the current block as a candidate prediction mode in at least one mode list.
[0369] Optionally, according to the non - angular prediction mode and / or prediction derivation mode (e.g., TIMD mode, OBIC mode, and / or DIMD mode) corresponding to the adjacent blocks, non - adjacent blocks, co - located blocks, and / or pre - set position of the coded image blocks of the sub - blocks of the current block, determine or obtain at least one first - angle prediction mode, and determine the at least one first - angle prediction mode as a candidate prediction mode in at least one mode list.
[0370] Optionally, when the prediction mode corresponding to the adjacent blocks, non - adjacent blocks, co - located blocks, and / or pre - set position of the coded image blocks of the sub - blocks of the current block is a non - angular prediction mode and / or prediction derivation mode, at least one possible angle prediction mode can be derived according to the above non - angular prediction mode and / or prediction derivation mode and used in the transformation process during encoding. In the embodiments of the present application, the angle prediction mode determined or obtained based on the above non - angular prediction mode and / or prediction derivation mode is also used as a candidate prediction mode in at least one mode list, thereby increasing the diversity of candidate prediction modes in the mode list, improving the probability of selecting the optimal mode, and further improving the accuracy of prediction.
[0371] Exemplarily, some adjacent blocks and / or non - adjacent blocks of each sub - block of the current block are used as pixel samplings. The selection of pixel samplings can refer to Figure 16 , where the solid - line block is the current block and is divided into sub - blocks A, B, C, and D. For sub - block A, according to the adjacent pixel points (a1 to a5) of sub - block A, determine or obtain the prediction mode corresponding to sub - block A and use it to determine or obtain a candidate prediction mode in at least one mode list.
[0372] As Figure 15 shown, the prediction modes corresponding to the pixel samplings adjacent to the left (L), top (A), bottom - left (BL), top - right (AR), and top - left (AL) positions of the current block can be used as candidate prediction modes. Since Figure 15 the pixel sampling at the top - left (AL) position of the current block in is the same as the pixel sampling at the a1 position of sub - block A, therefore, the prediction mode corresponding to the pixel sampling at the a1 position of sub - block A can be directly determined when determining the prediction mode corresponding to the adjacent blocks of the current block, while the prediction modes corresponding to the remaining pixel samplings at the a2 to a5 positions of sub - block A need to be determined separately or find the prediction modes of these pixel samplings and used as the prediction modes corresponding to the adjacent blocks of sub - block A.
[0373] Referring to Figure 16 , the prediction modes of the pixel samplings at the a2 to a5 positions of sub - block A are the prediction modes of its corresponding coding unit or prediction unit. Determine or obtain a candidate prediction mode in at least one mode list according to the prediction mode corresponding to the adjacent blocks of sub - block A.
[0374] Referring to Figure 16, this application can encode or decode sub - blocks in a preset order. When encoding the subsequent sub - block, the pixel sampling of the previous sub - block with a preset encoding order can be referred to. Therefore, for the subsequent sub - block B, the prediction result of sub - block A can be used to determine or obtain the prediction mode of the adjacent pixel sampling b2. Since the prediction modes corresponding to the pixel samplings at the b3 and b4 positions of sub - block B can be directly determined when determining the prediction mode corresponding to the adjacent block of the current block, the computational complexity can be effectively reduced. For the pixel sampling at the b1 position of sub - block B, it is necessary to separately determine or search for the prediction modes of these pixel samplings and use them as the prediction mode corresponding to the adjacent block of sub - block B.
[0375] Optionally, the prediction mode of the pixel sampling at the b1 position of sub - block B is the prediction mode of the coding unit or prediction unit where it is located, and then the candidate prediction modes in at least one mode list are determined or obtained according to the prediction mode corresponding to the adjacent block of sub - block B.
[0376] Refer to Figure 16 , for sub - block C, the prediction results of sub - block A and B can be used to separately determine or obtain the prediction modes corresponding to the pixel samplings at the c4 and c5 positions. The prediction modes corresponding to the pixel samplings at the c2 and c3 positions of sub - block C can be directly determined when determining the prediction mode corresponding to the adjacent block of the current block. For the pixel sampling at the c1 position of sub - block C, it is necessary to separately determine or search for the prediction modes of these pixel samplings and use them as the prediction mode corresponding to the adjacent block of sub - block C. Optionally, the prediction mode of the pixel sampling at the c1 position of sub - block C is the prediction mode of the coding unit or prediction unit where it is located.
[0377] Refer to Figure 16 , for sub - block D, the prediction modes corresponding to the pixel samplings at the d1, d9, d10, d4, and d6 positions (i.e., non - adjacent blocks) of sub - block D can be directly determined when determining the prediction mode corresponding to the adjacent block of the current block. For the pixel samplings at the d2, d3, d7, and d8 positions of sub - block D, it is necessary to separately determine or search for the prediction modes of these pixel samplings and add them to the prediction mode corresponding to the non - adjacent block of sub - block D. Optionally, the prediction modes of the pixel samplings at the d2, d3, d7, and d8 positions of sub - block B are the prediction modes of the coding units or prediction units where each pixel sampling is located. Optionally, the candidate prediction modes in at least one mode list are determined or obtained according to the prediction mode corresponding to the non - adjacent block of sub - block D.
[0378] Exemplarily, some adjacent blocks of each sub - block of the current block are used as pixel samplings, and the selection of pixel samplings can refer to Figure 17 , the solid - line block is the current block and is divided into sub - block A, sub - block B, sub - block C, and sub - block D. For sub - blocks A to C, the selection of adjacent pixel samplings is the same asFigure 16 are the same. For sub-block D, the prediction modes of the adjacent pixel samplings of the adjacent blocks of sub-block D can be determined or obtained by using the prediction modes of sub-blocks A to C, so as to obtain the prediction modes corresponding to the adjacent blocks of sub-block D, and determine or obtain the candidate prediction modes in at least one mode list.
[0379] Exemplarily, some adjacent blocks and / or some non-adjacent blocks of each sub-block of the current block are used as pixel samplings, and the selection of the pixel samplings can refer to Figure 18 , the solid-line block is the current block and is divided into sub-block A, sub-block B, sub-block C, and sub-block D. For sub-block A, different from the selection of the prediction mode corresponding to the adjacent block of sub-block A in Figure 16 , sub-block A does not use the prediction mode of the pixel sampling at position a3 in Figure 16 , because both position a2 and position a3 of sub-block A are adjacent to the left edge of the current block and are both located at the midpoint position, and the probability that the image blocks where the two positions are located are the same image block is relatively large. To reduce redundant operations, only the prediction mode of one of the two positions is used to determine the candidate prediction mode.
[0380] Optionally, for sub-block D, different from the selection of the prediction mode corresponding to sub-block D in Figure 16 , sub-block D does not use the prediction modes of the pixel samplings at positions d3 and d8 in Figure 16 , because both position d2 and position d3 of sub-block D are adjacent to the left edge of the current block and are both located at the edge midpoint position, and the probability that the image blocks where the two positions are located are the same image block is relatively large. Both position d7 and position d8 of sub-block D are adjacent to the upper edge of the current block and are both located at the edge midpoint position. To reduce redundant operations, only the prediction mode of one of the two positions is used to determine the candidate prediction mode.
[0381] Exemplarily, the selection of the pixel samplings of the adjacent blocks and / or non-adjacent blocks of the current block (hereinafter referred to as adjacent pixel samplings and non-adjacent pixel samplings for distinction) can refer to Figure 19 , the solid-line block is the current block. The adjacent pixel samplings of the current block include the pixel samplings at the upper, upper-left, and left positions of the current block, while the non-adjacent pixel samplings of the current block include at least one pixel sampling selected above, upper-left, upper-right, left, and lower-left according to a preset rule with the current block as the center. The candidate prediction modes in at least one mode list can be determined or obtained according to the prediction modes corresponding to the adjacent pixel samplings and non-adjacent pixel samplings in Figure 19 .
[0382] Exemplarily, in the case where the current block includes at least one sub-block, the selection of the pixel samplings of the adjacent blocks and / or non-adjacent blocks of each sub-block can refer to Figure 20, the solid block is the current block and is divided into 4 sub - blocks, including sub - block A, as Figure 19 and 20 shown. For sub - block A, since the pixel samplings adjacent to the current block are also adjacent to sub - block A, at least some of the pixel samplings adjacent to the current block can be used as the adjacent pixel samplings of sub - block A. Optionally, non - adjacent pixel samplings of sub - block A can be selected centered on the current block, and then at least some of the non - adjacent pixel samplings of the current block can be used as the non - adjacent pixel samplings of sub - block A. Then, according to the prediction modes corresponding to the adjacent pixel samplings and non - adjacent pixel samplings of sub - block A, candidate prediction modes in at least one mode list are determined or obtained.
[0383] Exemplarily, the selection method of pixel samplings of adjacent blocks and / or non - adjacent blocks of at least one sub - block of the current block can refer to Figure 21 , the solid block is the current block and is divided into 4 sub - blocks. For sub - block A, different from Figure 20 the selection method of pixel samplings around sub - block A therein, the non - adjacent pixel samplings of sub - block A are not selected centered on the current block, but centered on sub - block A, and at least one pixel sampling is selected from above, upper - left, upper - right, left, and lower - left according to a preset rule. Then, according to the prediction modes corresponding to the adjacent pixel samplings and non - adjacent pixel samplings of sub - block A, candidate prediction modes in at least one mode list are determined or obtained.
[0384] Exemplarily, the selection method of pixel samplings of adjacent blocks and / or non - adjacent blocks of at least one sub - block of the current block can refer to Figure 22 , the solid block is the current block and is divided into 4 sub - blocks, including sub - block B, as Figure 19 and 22 shown. For sub - block B, non - adjacent pixel samplings of sub - block B can be selected centered on the current block, and then at least some of the non - adjacent pixel samplings of the current block can be used as the non - adjacent pixel samplings of sub - block B, and the pixel samplings located above and upper - left of sub - block B are selected as the adjacent pixel samplings of sub - block B. Since the present application can encode or decode sub - blocks in a preset order, when encoding a subsequent sub - block, the pixel samplings of the previous sub - block in the preset encoding order can be referred to and utilized. Therefore, for sub - block B in the subsequent order, the prediction result of the previous sub - block can be used to select the pixel samplings inside the current block as the adjacent pixel samplings on the left side of sub - block B. Then, according to the prediction modes corresponding to the adjacent pixel samplings and non - adjacent pixel samplings of sub - block B, candidate prediction modes in at least one mode list are determined or obtained.
[0385] Exemplarily, the selection method of pixel samplings of adjacent blocks and / or non - adjacent blocks of at least one sub - block of the current block can refer to Figure 23, the solid block is the current block and is divided into 4 sub - blocks. For sub - block B, the difference in the selection method of pixel sampling around sub - block B compared with Figure 22 is that the selection of non - adjacent pixel sampling is no longer centered on the current block, but centered on sub - block B, and at least one pixel sampling is selected according to a preset rule above, above - left, above - right, left, and below - left. Optionally, since the sub - blocks on the left side of sub - block B have been encoded or decoded, the non - adjacent pixel sampling of sub - block B can include pixel sampling located inside the current block. Then, according to the prediction modes corresponding to the adjacent and non - adjacent pixel sampling of sub - block B, a candidate prediction mode in at least one mode list is determined or obtained.
[0386] Exemplarily, the selection method of pixel sampling of adjacent blocks and / or non - adjacent blocks of at least one sub - block of the current block can refer to Figure 24 , the solid block is the current block and is divided into 4 sub - blocks, including sub - block C, as Figure 19 and 24 shown. For sub - block C, the selection of non - adjacent pixel sampling of sub - block C can be centered on the current block. Then, at least part of the non - adjacent pixel sampling of the current block can be used as the non - adjacent pixel sampling of sub - block C, and the pixel sampling located on the left and above - left of sub - block C is selected as the adjacent pixel sampling of sub - block C. Since the present application can encode or decode sub - blocks in a preset order, when encoding the subsequent sub - block, the pixel sampling of the previous sub - block in the preset encoding order can be referred to and utilized. Therefore, for the subsequent sub - block C in the order, the prediction result of the previous sub - block can be used to select the pixel sampling located inside the current block as the adjacent pixel sampling above sub - block C. Then, according to the prediction modes corresponding to the adjacent and non - adjacent pixel sampling of sub - block C, a candidate prediction mode in at least one mode list is determined or obtained.
[0387] Exemplarily, the selection method of pixel sampling of adjacent blocks and / or non - adjacent blocks of at least one sub - block of the current block can refer to Figure 25 , the solid block is the current block and is divided into 4 sub - blocks. For sub - block C, the difference in the selection method of pixel sampling around sub - block C compared with Figure 24 is that the selection of non - adjacent pixel sampling is no longer centered on the current block, but centered on sub - block C, and at least one pixel sampling is selected according to a preset rule above, above - left, above - right, left, and below - left. Optionally, since the sub - blocks above and above - right of sub - block C have been encoded or decoded, the non - adjacent pixel sampling of sub - block C can include pixel sampling located inside the current block. Then, according to the prediction modes corresponding to the adjacent and non - adjacent pixel sampling of sub - block C, a candidate prediction mode in at least one mode list is determined or obtained.
[0388] Exemplarily, the selection manner of pixel samplings of adjacent blocks and / or non-adjacent blocks of at least one sub-block of the current block may refer to Figure 26 , the solid-line block is the current block and is divided into 4 sub-blocks, including sub-block D, as Figure 19 and 26 shown. For sub-block D, non-adjacent pixel samplings of sub-block D may be selected with the current block as the center, and then at least part of the non-adjacent pixel samplings of the current block may be used as the non-adjacent pixel samplings of sub-block D. Since the present application can encode or decode the sub-blocks in a preset order, when encoding the subsequent sub-block, the pixel samplings of the previous sub-block in the preset encoding order can be referred to and utilized. Therefore, for the subsequent-order sub-block D, the prediction result of the previous sub-block can be used to select the pixel samplings located inside the current block as the adjacent pixel samplings above, upper left, and left of sub-block D, and then at least one candidate prediction mode in the at least one mode list can be determined or obtained according to the prediction modes corresponding to the adjacent pixel samplings and non-adjacent pixel samplings of sub-block D.
[0389] Exemplarily, the selection manner of pixel samplings of adjacent blocks and / or non-adjacent blocks of at least one sub-block of the current block may refer to Figure 27 , the solid-line block is the current block and is divided into 4 sub-blocks. The difference in the selection manner of the pixel samplings around sub-block D from that in Figure 26 is that the selection of non-adjacent pixel samplings is no longer centered on the current block, but centered on sub-block D, and at least one pixel sampling is selected above, upper left, upper right, left, and lower left according to a preset rule. Optionally, since the sub-blocks above, upper left, and left of sub-block D have been encoded or decoded, the non-adjacent pixel samplings of sub-block D may include the pixel samplings located inside the current block, and then at least one candidate prediction mode in the at least one mode list can be determined or obtained according to the prediction modes corresponding to the adjacent pixel samplings and non-adjacent pixel samplings of sub-block D.
[0390] Optionally, at least one candidate prediction mode in the at least one mode list is determined or obtained according to the adjacent prediction modes of the prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at preset positions of the sub-blocks of the current block. Optionally, the adjacent prediction modes of the prediction modes may satisfy adjacent in mode and / or adjacent in value.
[0391] In this embodiment, determining or obtaining candidate prediction modes in at least one mode list according to the prediction modes corresponding to the neighboring blocks, non-neighboring blocks, co-located blocks, and / or sub-blocks of the encoded image blocks at preset positions of the current block can improve the fitness between the candidate prediction modes and the current block, thereby improving the prediction effect of the current block. At the same time, compared with screening candidate prediction modes in a full range, the embodiments of the present application utilize the existing information, that is, the prediction modes corresponding to the neighboring blocks, non-neighboring blocks, co-located blocks, and / or sub-blocks of the encoded image blocks at preset positions, effectively narrowing the search range of the candidate prediction modes and reducing the computational complexity.
[0392] Method a4, pattern matching information related to at least one reference region of the current block;
[0393] Optionally, the reference region refers to a pixel region or a pixel sampling region of the reconstructed or encoded region adjacent or non-adjacent to the left, upper, or upper-left of the current block. The pixel values or features of these regions can be used for the prediction or other processing of the current block. Optionally, the reference region may include: templates, reference blocks, and / or reference pixels.
[0394] Optionally, the pattern matching information refers to the information used to evaluate the matching degree between different prediction modes and the reference region and its corresponding current block. The pattern matching information can be based on at least one metric, such as the rate-distortion cost of the prediction result, prediction error, texture similarity, etc., to indicate the similarity and / or error between the prediction results determined or generated based on different prediction modes and the current block and / or the reference region of the current block. Optionally, the higher the matching degree between the prediction mode and the current block and / or at least one reference region of the current block, the higher the accuracy of the prediction result of the current block obtained by using the prediction mode. For example, the prediction value is obtained by predicting at least one reference region of the current block using the prediction mode, and the relevant pattern matching information is determined according to the obtained prediction value and the reconstructed value of the at least one reference region.
[0395] Optionally, the pattern matching information includes: SAD, SATD, and / or MRSAD.
[0396] Optionally, according to the pattern matching information related to at least one reference region of the current block, candidate prediction modes in at least one mode list are determined or obtained from each prediction mode.
[0397] Optionally, according to the pattern matching information related to at least one reference region of the current block, candidate prediction modes in at least one mode list are determined or obtained, and according to the candidate prediction modes in at least one mode list, the target prediction mode of the current block is determined or obtained.
[0398] Optionally, the pattern matching information related to at least one reference region of the current block is at least one pattern matching information.
[0399] Optionally, a reference region of the current block can be matched with at least one prediction mode to determine or obtain at least one pattern matching information related to the reference region.
[0400] In this embodiment, the matching degree between the prediction mode and at least one reference region corresponding to the current block is quantified by the pattern matching information, so that the mode that is more matched with the current block can be quickly screened out as a candidate prediction mode in at least one mode list, which can improve the adaptability between the candidate prediction mode in the mode list and the current block, and improve the adaptability between the target prediction mode determined or obtained based on the candidate prediction mode and the current block, thereby improving the prediction effect of the current block. At the same time, the screening method of the pattern matching information can also save computing resources, reduce the computational complexity, and improve the coding efficiency.
[0401] Method a5, pattern matching information related to at least one reference region of a sub-block of the current block;
[0402] Optionally, the reference region refers to a pixel region or a pixel sampling region of a reconstructed or encoded region adjacent or non-adjacent to the left, upper, or upper-left of a sub-block of the current block, and the pixel values or features of these regions can be used for prediction or other processing of the current block and / or its sub-blocks. Optionally, the reference region may include: a template, a reference block, and / or reference pixels.
[0403] Optionally, the pattern matching information includes: SAD, SATD, and / or MRSAD.
[0404] Optionally, according to the pattern matching information related to at least one reference region of a sub-block of the current block, at least one candidate prediction mode in at least one mode list is determined or obtained from each prediction mode.
[0405] Optionally, according to the pattern matching information related to at least one reference region of a sub-block of the current block, at least one candidate prediction mode in at least one mode list is determined or obtained, and according to the at least one candidate prediction mode in the at least one mode list, the target prediction mode of the current block is determined or obtained.
[0406] Optionally, the pattern matching information related to at least one reference region of a sub-block of the current block is at least one pattern matching information. Optionally, a reference region of a sub-block of the current block can be matched with at least one prediction mode to determine or obtain at least one pattern matching information related to a reference region of the sub-block.
[0407] In this embodiment, the matching degree between the prediction mode and at least one reference area of the current block sub-block is quantified by pattern matching information, so that the mode that is more matched with the current block and its sub-block can be quickly screened out as a candidate prediction mode in at least one pattern list, which can improve the fitness between the candidate prediction mode in the pattern list and the current block, and improve the fitness between the target prediction mode determined or obtained based on the candidate prediction mode and the current block, thereby improving the prediction effect of the current block; and / or, the screening method of pattern matching information can also save computing resources, reduce computing complexity, and improve coding efficiency.
[0408] Optionally, in this embodiment, the pattern matching information includes at least one of the following modes b1 to b9:
[0409] Mode b1, first matching information related to at least one reference area of the current block according to a prediction mode corresponding to a sub-block, an adjacent block, a non-adjacent block, a co-located block and / or an encoded image block at a preset position of the current block;
[0410] Optionally, prediction modes corresponding to sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at preset positions of the current block are determined as candidate modes to implement a primary screening among various prediction modes, and pattern matching information related to at least one reference area of the current block is determined according to the candidate modes as first matching information, and then a secondary screening is performed based on the first matching information to determine or obtain a candidate prediction mode in at least one mode list from each candidate mode.
[0411] Optionally, the candidate mode refers to a prediction mode determined or obtained through a single screening from a set of all possible prediction modes.
[0412] Optionally, a single mode in the set of all possible prediction modes may be referred to as an initial mode, and the alternative modes are modes selected from the initial mode through certain rules and conditions.
[0413] Optionally, the candidate prediction mode may be a mode selected from the candidate modes through further rule and condition screening, and the target prediction mode may be a mode further screened from the candidate prediction modes and finally used for the prediction process of the current block.
[0414] Optionally, the pattern matching information refers to information used to evaluate the degree of matching between different prediction modes and reference regions and their corresponding current blocks. The pattern matching information can indicate the degree of matching between different prediction modes and reference regions based on at least one indicator, such as rate distortion cost, prediction error, texture similarity, etc. of the prediction result, for example, predicting at least one reference region of the current block using an alternative mode to obtain a prediction value, and determining the corresponding second matching information based on the obtained prediction value and the reconstructed value of at least one reference region.
[0415] Optionally, the matching information is the SAD, SATD, and / or MRSAD values for the reconstructed value and the predicted value.
[0416] Optionally, an adjacent block of the current block refers to an image block that is directly adjacent to the current block spatially, and the adjacent block can be a block that has been predicted or reconstructed; the adjacent block has a high spatial correlation with the current block. Therefore, the prediction mode and / or texture feature of the adjacent block tend to be similar to those of the current block. Thus, the prediction mode corresponding to the adjacent block of the current block can be used as an alternative mode to screen the candidate prediction modes, thereby improving the fitness between the candidate prediction modes in the mode list and the current block.
[0417] Optionally, a co-located block can be an image block in the co-located image that has the same position and size as the current block, and the co-located image can be the image in the reference images that is closest to the current image in time. Since there is a strong temporal correlation between the co-located block and the current block, the prediction mode of the co-located block can be used as an alternative mode to screen the candidate prediction modes, thereby improving the fitness between the candidate prediction modes in the mode list and the current block.
[0418] Optionally, a non-adjacent block of the current block refers to an image block that is not directly adjacent to the current block spatially but may be within a certain range or have a certain correlation, and the non-adjacent block can also be a block that has been predicted or reconstructed. Although the non-adjacent block is not directly adjacent to the current block, there may still be a certain correlation between it and the current block. Therefore, it can play a certain reference role in determining the candidate prediction mode.
[0419] Optionally, the encoded image blocks at the preset positions refer to the encoded blocks at certain positions preset according to specific rules or algorithms; these positions can be fixed (such as the upper left corner block) or dynamically determined according to the image content. Although the non-adjacent blocks and the encoded image blocks at the preset positions may be spatially far from the current block, they may contain some unique texture or pattern information, and this information can be used as a supplement to the information of the adjacent blocks and co-located blocks to further optimize the selection of the candidate prediction modes.
[0420] Optionally, the prediction modes corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at the preset positions of the current block include at least one of: angular prediction mode, non-angular prediction mode, and prediction derivation mode.
[0421] Optionally, the non-angular prediction mode can be a prediction mode other than the angular prediction mode. Exemplarily, the non-angular prediction mode includes at least one of: NNIP mode, EIP mode, BV mode, planar mode, and DC mode.
[0422] Optionally, the prediction derivation mode is a method for deriving the most suitable prediction mode for the current block by analyzing the relevant information of the current block. Exemplarily, the prediction derivation mode includes at least one of the DIMD mode, the OBIC mode, and the TIMD mode.
[0423] Optionally, determine the angular prediction modes corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at preset positions of the current block as alternative modes, and determine or obtain the mode matching information related to at least one reference region of the current block for each alternative mode as the first matching information; according to the first mode matching information, determine or obtain the candidate prediction modes in at least one mode list, and determine or obtain the target prediction mode of the current block according to the candidate prediction modes in at least one mode list.
[0424] Optionally, determine or obtain the first angular prediction mode according to the non-angular prediction mode and / or prediction derivation mode corresponding to the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at preset positions of the current block, determine the first angular prediction mode as an alternative mode, and determine or obtain the mode matching information related to at least one reference region of the current block for each alternative mode as the first matching information. According to the first mode matching information, determine or obtain the candidate prediction modes in at least one mode list, and determine or obtain the target prediction mode of the current block according to the candidate prediction modes in at least one mode list.
[0425] Optionally, determine or obtain the candidate prediction modes in at least one mode list according to the first matching information related to at least one reference region of the current block corresponding to the prediction modes of the sub-blocks, adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at preset positions of the current block, and determine or obtain the target prediction mode of the current block according to the candidate prediction modes in at least one mode list.
[0426] In this embodiment, the candidate prediction modes are determined through the first matching information. On the one hand, the richness of the candidate prediction modes in the mode list and the adaptability to the current block are improved. On the other hand, using the existing information, the search range of the candidate prediction modes is effectively reduced, and the computational complexity is reduced.
[0427] Method b2, the second matching information related to at least one reference region of the sub-block of the current block determined or obtained according to the prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks, and / or encoded image blocks at preset positions of the sub-block of the current block;
[0428] Optionally, the adjacent blocks, non - adjacent blocks, co - located blocks, and / or encoded picture blocks at a preset position of the sub - blocks of the current block include: the adjacent blocks of the sub - blocks of the current block, the non - adjacent blocks of the sub - blocks of the current block, the co - located blocks of the sub - blocks of the current block, and / or the encoded picture blocks at the preset position of the sub - blocks of the current block.
[0429] Optionally, determine the prediction modes corresponding to the adjacent blocks, non - adjacent blocks, co - located blocks, and / or encoded picture blocks at a preset position of the sub - blocks of the current block as alternative modes to achieve a first - stage screening among various prediction modes, and determine the mode - matching information related to at least one reference region of the sub - blocks of the current block according to the alternative modes as the second matching information. Then, based on the second matching information, perform a second - stage screening to determine or obtain the candidate prediction modes in at least one mode list from the alternative modes.
[0430] Optionally, the adjacent blocks of the sub - blocks of the current block refer to the picture blocks that are directly adjacent to the sub - blocks of the current block in space, and the adjacent blocks can be the blocks that have been predicted or reconstructed. The adjacent blocks have a high degree of spatial correlation with the sub - blocks of the current block. Therefore, the prediction modes and / or texture features of the adjacent blocks tend to be similar to those of the sub - blocks of the current block and the current block. Thus, the prediction modes corresponding to the adjacent blocks of the sub - blocks of the current block can be used as alternative modes for screening candidate prediction modes, so as to improve the fitness between the candidate prediction modes in the mode list and the current block.
[0431] Optionally, the co - located blocks of the sub - blocks of the current block can be the picture blocks with the same position and size as the sub - blocks of the current block in the co - located picture, and the co - located picture can be the picture that is closest in time to the current picture in the reference pictures. Since there is a strong temporal correlation between the co - located blocks and the sub - blocks, the prediction modes of the co - located blocks of the sub - blocks can be used as alternative modes for screening candidate prediction modes, so as to improve the fitness between the candidate prediction modes in the mode list and the current block.
[0432] Optionally, the non - adjacent blocks of the sub - blocks of the current block refer to the picture blocks that are not directly adjacent to the sub - blocks in space but may be within a certain range or have a certain correlation, and the non - adjacent blocks can also be the blocks that have been predicted or reconstructed. Although the non - adjacent blocks are not directly adjacent to the current block, there may still be a certain correlation between them and the sub - blocks and the current block. Therefore, they can play a certain reference role in determining the candidate prediction modes.
[0433] Optionally, the encoded image blocks at preset positions refer to the encoded blocks at certain positions preset according to specific rules or algorithms. These positions can be fixed (such as the upper left corner block) or dynamically determined according to the image content. Although the non-adjacent blocks and the encoded image blocks at preset positions may have a relatively large spatial distance from the sub-blocks, they may contain some unique texture or pattern information, and this information can be used as a supplement to the information of adjacent blocks and co-located blocks to further optimize the selection of candidate prediction modes.
[0434] Optionally, the prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at preset positions of the sub-blocks of the current block include at least one of an angular prediction mode, a non-angular prediction mode and a prediction derivation mode.
[0435] Optionally, the non-angular prediction mode can be a prediction mode other than the angular prediction mode. Exemplarily, the non-angular prediction mode includes at least one of an NNIP mode, an EIP mode, a BV mode, a planar mode and a DC mode.
[0436] Optionally, the prediction derivation mode is a method of deriving the most suitable prediction mode for the current block by analyzing the relevant information of the current block. Exemplarily, the prediction derivation mode includes at least one of a DIMD mode, an OBIC mode and a TIMD mode.
[0437] Optionally, determine the angular prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at preset positions of the sub-blocks of the current block as alternative modes, and determine or obtain the mode matching information related to at least one reference region of the sub-blocks of the current block for each alternative mode as the second matching information. According to the first mode matching information, determine or obtain the candidate prediction modes in at least one mode list, and according to the candidate prediction modes in at least one mode list, determine or obtain the target prediction mode of the current block.
[0438] Optionally, according to the non-angular prediction mode and / or prediction derivation mode corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks and / or encoded image blocks at preset positions of the sub-blocks of the current block, determine or obtain the first angular prediction mode, determine the first angular prediction mode as an alternative mode, and determine or obtain the mode matching information related to at least one reference region of the sub-blocks of the current block for each alternative mode as the second matching information; according to the first mode matching information, determine or obtain the candidate prediction modes in at least one mode list, and according to the candidate prediction modes in at least one mode list, determine or obtain the target prediction mode of the current block.
[0439] Optionally, according to the second matching information related to the prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks, and / or the coded image blocks at the preset positions of the sub-blocks of the current block and at least one reference region of the sub-blocks of the current block, determine or obtain the candidate prediction modes in at least one mode list, and according to the candidate prediction modes in at least one mode list, determine or obtain the target prediction mode of the current block.
[0440] In this embodiment, by determining the candidate prediction modes through the second matching information, on the one hand, the richness of the candidate prediction modes in the mode list and the adaptability to the current block are improved, and on the other hand, using the existing information, the search range of the candidate prediction modes is effectively reduced, and the computational complexity is reduced.
[0441] Mode b3, the third matching information related to at least one reference region of the current block determined or obtained according to the prediction modes corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks, and / or the coded image blocks at the preset positions of the current block;
[0442] Optionally, the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks, and / or the coded image blocks at the preset positions of the current block include: the sub-blocks of the adjacent blocks of the current block, the sub-blocks of the non-adjacent blocks of the current block, the sub-blocks of the co-located blocks of the current block, and / or the sub-blocks of the coded image blocks at the preset positions of the current block.
[0443] Optionally, determine the prediction modes corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks, and / or the coded image blocks at the preset positions of the current block as the alternative modes to achieve a primary screening among various prediction modes, and determine the mode matching information related to at least one reference region of the current block according to the alternative modes as the third matching information; and then perform a secondary screening based on the third matching information to determine or obtain the candidate prediction modes in at least one mode list from each alternative mode.
[0444] Optionally, the prediction modes corresponding to the sub-blocks of the adjacent blocks, non-adjacent blocks, co-located blocks, and / or the coded image blocks at the preset positions of the current block include: at least one of an angular prediction mode, a non-angular prediction mode, and a prediction derivation mode.
[0445] Optionally, the non-angular prediction mode may be a prediction mode other than the angular prediction mode. Exemplarily, the non-angular prediction mode includes: at least one of the NNIP mode, the EIP mode, the BV mode, the planar mode, and the DC mode.
[0446] Optionally, the prediction derivation mode is a method of deriving the most suitable prediction mode for the current block by analyzing the relevant information of the current block. Exemplarily, the prediction derivation mode includes: at least one of the DIMD mode, the OBIC mode, and the TIMD mode.
[0447] Optionally, determine the angular prediction modes corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks, and / or sub-blocks of the encoded image blocks at preset positions of the current block as alternative modes, and determine or obtain the mode matching information related to at least one reference region of the current block for each alternative mode as the third matching information. According to the first mode matching information, determine or obtain the candidate prediction modes in at least one mode list, and according to the candidate prediction modes in at least one mode list, determine or obtain the target prediction mode of the current block.
[0448] Optionally, determine or obtain the first angular prediction mode according to the non-angular prediction mode and / or prediction derivation mode corresponding to the adjacent blocks, non-adjacent blocks, co-located blocks, and / or sub-blocks of the encoded image blocks at preset positions of the current block. Determine the first angular prediction mode as an alternative mode, and determine or obtain the mode matching information related to at least one reference region of the current block for each alternative mode as the third matching information. According to the first mode matching information, determine or obtain the candidate prediction modes in at least one mode list, and according to the candidate prediction modes in at least one mode list, determine or obtain the target prediction mode of the current block.
[0449] Optionally, determine or obtain the candidate prediction modes in at least one mode list according to the third matching information related to at least one reference region of the current block corresponding to the prediction modes of the adjacent blocks, non-adjacent blocks, co-located blocks, and / or sub-blocks of the encoded image blocks at preset positions of the current block, and according to the candidate prediction modes in at least one mode list, determine or obtain the target prediction mode of the current block.
[0450] In this embodiment, the candidate prediction modes are determined through the third matching information. On the one hand, the richness of the candidate prediction modes in the mode list and the adaptability to the current block are improved. On the other hand, using the existing information effectively narrows the search range of the candidate prediction modes and reduces the computational complexity.
[0451] Method b4: the fourth matching information related to at least one reference region of the sub-block of the current block determined or obtained according to the prediction modes of the adjacent blocks, non-adjacent blocks, co-located blocks, and / or sub-blocks of the sub-block of the current block;
[0452] Optionally, the adjacent blocks, non-adjacent blocks, co-located blocks, and / or sub-blocks of the sub-block of the current block include: sub-blocks of the adjacent blocks of the sub-block of the current block, sub-blocks of the non-adjacent blocks of the sub-block of the current block, sub-blocks of the co-located blocks of the sub-block of the current block, and / or sub-blocks of the encoded image blocks at the preset positions of the sub-block of the current block.
[0453] Optionally, determine the prediction modes corresponding to the adjacent blocks, non - adjacent blocks, co - located blocks of the sub - blocks of the current block, and / or the sub - blocks of the encoded image blocks at preset positions as alternative modes to achieve a first - stage screening among various prediction modes. Then, determine the mode - matching information related to at least one reference region of the sub - blocks of the current block according to the alternative modes as the fourth matching information. Furthermore, perform a second - stage screening based on the fourth matching information to determine or obtain the candidate prediction modes in at least one mode list from each alternative mode.
[0454] Optionally, the prediction modes corresponding to the adjacent blocks, non - adjacent blocks, co - located blocks of the sub - blocks of the current block, and / or the sub - blocks of the encoded image blocks at preset positions include at least one of an angular prediction mode, a non - angular prediction mode, and a prediction derivation mode.
[0455] Optionally, the non - angular prediction mode can be a prediction mode other than the angular prediction mode. Exemplarily, the non - angular prediction mode includes at least one of an NNIP mode, an EIP mode, a BV mode, a planar mode, and a DC mode.
[0456] Optionally, the prediction derivation mode is a method of deriving the most suitable prediction mode for the current block by analyzing the relevant information of the sub - blocks of the current block. Exemplarily, the prediction derivation mode includes at least one of a DIMD mode, an OBIC mode, and a TIMD mode.
[0457] Optionally, determine the angular prediction modes corresponding to the adjacent blocks, non - adjacent blocks, co - located blocks of the sub - blocks of the current block, and / or the sub - blocks of the encoded image blocks at preset positions as alternative modes, and determine or obtain the mode - matching information related to at least one reference region of the sub - blocks of the current block for each alternative mode as the fourth matching information. According to the first mode - matching information, determine or obtain the candidate prediction modes in at least one mode list. According to the candidate prediction modes in at least one mode list, determine or obtain the target prediction mode of the sub - blocks of the current block.
[0458] Optionally, according to the non - angular prediction mode and / or the prediction derivation mode corresponding to the adjacent blocks, non - adjacent blocks, co - located blocks of the sub - blocks of the current block, and / or the sub - blocks of the encoded image blocks at preset positions, determine or obtain a first angular prediction mode, determine the first angular prediction mode as an alternative mode, and determine or obtain the mode - matching information related to at least one reference region of the sub - blocks of the current block for each alternative mode as the fourth matching information. According to the first mode - matching information, determine or obtain the candidate prediction modes in at least one mode list. According to the candidate prediction modes in at least one mode list, determine or obtain the target prediction mode of the sub - blocks of the current block.
[0459] Optionally, based on fourth matching information related to at least one reference area of the sub-block of the current block and prediction modes corresponding to adjacent blocks, non-adjacent blocks, co-located blocks and / or sub-blocks of the encoded image block at a preset position of the sub-block of the current block, a candidate prediction mode in at least one mode list is determined or obtained, and based on the candidate prediction modes in at least one mode list, a target prediction mode of the sub-block of the current block is determined or obtained.
[0460] In this embodiment, the candidate prediction mode is determined by the fourth matching information, which on the one hand improves the richness of the candidate prediction modes in the mode list and the degree of adaptability to the current block. On the other hand, it utilizes the existing information to effectively narrow the search range of the candidate prediction modes and reduce the computational complexity.
[0461] Mode b5, determining or obtaining fifth matching information related to at least one reference area of the current block according to a prediction mode corresponding to a gradient histogram, an area histogram and / or a usage count histogram of a coded image block of the current block;
[0462] Optionally, at least one histogram of the current block is determined or obtained, and the histogram includes a gradient histogram, an area histogram and / or a usage count histogram of an encoded image block and a histogram obtained by adjusting or merging the above histograms. At least one prediction mode is determined or obtained based on the at least one histogram of the current block and determined as an alternative mode to achieve a primary screening of the prediction mode, and then pattern matching information related to each alternative mode and at least one reference area of the current block is determined as fifth matching information, and then a secondary screening is performed based on the fifth matching information to determine or obtain at least one candidate prediction mode in the pattern list from each alternative mode.
[0463] Optionally, a gradient histogram is a statistical tool for describing the distribution of gradient amplitudes of the current block in different directions. It calculates the gradient amplitude value of each pixel in a reference area (e.g., a template) of the current block in directions corresponding to each intra-frame prediction mode, and statistically calculates the distribution of these gradient amplitude values, thereby obtaining a histogram containing the gradient amplitude values corresponding to each prediction direction.
[0464] Optionally, in intra-frame prediction, different prediction modes correspond to different prediction directions, for example, the vertical mode corresponds to the vertical direction, the horizontal mode corresponds to the horizontal direction, and the diagonal mode corresponds to the diagonal direction, and each prediction mode has a specific direction for describing its prediction direction.
[0465] Optionally, for each prediction direction, the sum of the gradient amplitude values of each pixel in the reference area of the current block in this direction is calculated. This sum reflects the overall gradient strength of the current block in this prediction direction, and the gradient histogram records the sum of the gradient amplitude values corresponding to each prediction direction.
[0466] Optionally, a prediction mode corresponding to a prediction direction whose sum of gradient amplitude values in the gradient histogram satisfies condition one is determined as an alternative mode, and fifth matching information related to the alternative mode and at least one reference area of the current block is determined. Exemplarily, condition one may be that the gradient amplitude value is located in a front preset sorting position, for example, a prediction mode corresponding to a prediction direction whose gradient amplitude values in the gradient histogram are in the top 3 is determined as an alternative mode.
[0467] Optionally, the gradient magnitude and gradient direction of pixels in at least one template of the current block may be determined, a gradient histogram of at least one template with respect to an intra-frame prediction direction may be determined, the corresponding intra-frame prediction direction may be determined based on the gradient histogram, and at least one prediction mode may be determined or obtained.
[0468] Optionally, at least one template of the current block refers to a group of neighboring pixels surrounding the current block, and these neighboring pixels can provide important clues about the edge and texture direction of the block to be predicted, so the intra-frame prediction mode of the current block can be analyzed and derived based on these pixels.
[0469] Optionally, a prediction mode corresponding to a prediction direction whose gradient amplitude value in the gradient histogram satisfies condition one is determined as an alternative mode, and fifth matching information related to the alternative mode and at least one reference area of the current block is determined. Exemplarily, condition one may be a gradient amplitude value that is at a front position or order after the gradient amplitude value is sorted according to a preset sorting rule; and / or condition one may be a gradient amplitude value that is within a preset position or a preset order range after the gradient amplitude value is sorted according to a preset sorting rule. For example, the preset sorting may be a sorting rule that arranges the gradient amplitude values from large to small, and the prediction mode corresponding to the prediction direction whose gradient amplitude value in the gradient histogram is in the top 3 is determined as the alternative mode.
[0470] Optionally, an area histogram is used to describe the area amplitude distribution of at least one adjacent coding block and / or non-adjacent coding block of the current block in different intra-frame prediction directions. A statistical histogram or statistical result can be determined or generated by analyzing the relationship between the area amplitude value of each coding block (for example, the size of the block or the texture coverage) and the intra-frame prediction direction.
[0471] Optionally, the area amplitude value can represent the size of the coding block, texture coverage or other area-related features. It reflects the texture distribution intensity of the coding block in a specific direction, and each coding block has a corresponding intra-frame prediction direction (for example, vertical, horizontal, diagonal, etc.). The area histogram counts the area amplitude values in these directions. By analyzing the distribution of area amplitude values in different intra-frame prediction directions recorded on the area histogram, it can be determined which prediction directions are statistically more consistent with the texture characteristics of the current block.
[0472] Optionally, determine the prediction mode corresponding to the prediction direction whose area amplitude value in the area histogram meets Condition 2 as the alternative mode, and determine the fifth matching information related to at least one reference region of the current block for the alternative mode. Exemplarily, Condition 2 can be the area amplitude value whose position or order is relatively forward after being sorted according to the preset sorting rule; and / or Condition 2 can be the area amplitude value within the preset position or preset order range after being sorted according to the preset sorting rule. For example, the preset sorting can be a sorting rule that arranges the area amplitude values from largest to smallest, and determine the prediction modes corresponding to the prediction directions with the top 3 area amplitude values in the area histogram as the alternative modes.
[0473] Optionally, the usage frequency histogram of the encoded image block records the usage frequencies of different intra prediction modes in the encoded image block. By using the usage frequencies of different intra prediction modes recorded in the usage frequency histogram, it is possible to determine which prediction modes are frequently used in the encoded region.
[0474] Optionally, determine the prediction mode corresponding to the prediction direction whose usage frequency meets Condition 3 in the usage frequency histogram as the alternative mode, and determine the fifth matching information corresponding to at least one reference region of the current block according to the alternative mode. For example, use the alternative mode to predict the at least one reference region of the current block to obtain a predicted value, and determine the corresponding fifth matching information according to the obtained predicted value and the reconstructed value of the at least one reference region. Exemplarily, Condition 3 can be the usage frequency whose position or order is relatively forward after being sorted according to the preset sorting rule; and / or Condition 4 can be the usage frequency within the preset position or preset order range after being sorted according to the preset sorting rule. For example, the preset sorting can be a sorting rule that arranges the usage frequencies from largest to smallest, and determine the prediction modes corresponding to the prediction directions with the top 3 usage frequencies in the usage frequency histogram as the alternative modes.
[0475] Optionally, determine or obtain the candidate prediction modes in at least one mode list according to the fifth matching information related to at least one reference region of the current block determined or obtained according to the prediction modes corresponding to the gradient histogram, area histogram, and / or usage frequency histogram of the encoded image block of the current block, and determine or obtain the target prediction mode of the current block according to the candidate prediction modes in at least one mode list.
[0476] In this embodiment, determining the candidate prediction modes through the fifth matching information not only improves the richness of the candidate prediction modes in the mode list and the adaptability to the current block, but also effectively narrows the search range of the candidate prediction modes and reduces the computational complexity by using the existing information.
[0477] Mode b6, sixth matching information related to at least one reference region of a sub-block of the current block determined or obtained according to a prediction mode corresponding to a gradient histogram, an area histogram, and / or a histogram of the number of times an encoded image block is used of the sub-block of the current block;
[0478] Optionally, determine or obtain at least one histogram of a sub-block of the current block, where the histogram includes a gradient histogram, an area histogram, and / or a histogram of the number of times an encoded image block is used, as well as a histogram obtained by adjusting or combining the above histograms. Determine at least one prediction mode determined or obtained according to at least one histogram of a sub-block of the current block as an alternative mode to perform a primary screening of the prediction mode, and then determine the mode matching information related to at least one reference region of a sub-block of the current block for each alternative mode as the sixth matching information. Further, based on the sixth matching information, perform a secondary screening to determine or obtain a candidate prediction mode in at least one mode list from each alternative mode.
[0479] Optionally, calculate the gradient magnitude values of each pixel in the reference region (e.g., template) of a sub-block of the current block in the corresponding direction of each intra-frame prediction mode, and count the distribution of these gradient magnitude values, so as to obtain a histogram including the gradient magnitude values corresponding to each prediction direction.
[0480] Optionally, determine the prediction mode corresponding to the prediction direction whose sum of gradient magnitude values in the gradient histogram satisfies Condition 1 as an alternative mode, and determine the sixth matching information related to at least one reference region of a sub-block of the current block for the alternative mode. Exemplarily, Condition 1 may be that the gradient magnitude value is in the previous preset sorting position. For example, determine the prediction modes corresponding to the top 3 prediction directions with the largest gradient magnitudes in the gradient histogram as alternative modes.
[0481] Optionally, it is possible to determine the gradient magnitude values and gradient directions of the pixels in at least one template of a sub-block of the current block, determine the gradient histogram of at least one template with respect to the intra-frame prediction direction, determine the corresponding intra-frame prediction direction according to the gradient histogram, and determine or obtain at least one prediction mode.
[0482] Optionally, at least one template of a sub-block of the current block refers to a group of neighboring pixels surrounding the sub-block of the current block. The reasons for these neighboring pixels can provide important clues about the edge and texture orientation of the block to be predicted. Therefore, the intra-frame prediction mode of the sub-block of the current block can be analyzed and deduced based on these pixels.
[0483] Optionally, determine the prediction mode corresponding to the prediction direction in the gradient histogram whose gradient magnitude value satisfies Condition 1 as the alternative mode, and determine the sixth matching information related to at least one reference region of the sub-block of the current block. Exemplarily, Condition 1 can be the gradient magnitude value whose position or order is relatively high after being sorted according to the preset sorting rule; and / or Condition 1 can be the gradient magnitude value within the preset position or preset order range after being sorted according to the preset sorting rule. For example, the preset sorting can be a sorting rule that arranges the gradient magnitude values from large to small, and determine the prediction modes corresponding to the prediction directions with the top 3 gradient magnitude values in the gradient histogram as the alternative modes.
[0484] Optionally, the area histogram is used to describe the area amplitude distribution of at least one adjacent coding block and / or non-adjacent coding block of the sub-block of the current block in different intra-frame prediction directions. A statistical histogram or statistical result can be determined or generated by analyzing the relationship between the area amplitude value of each coding block (e.g., the size of the block or the texture coverage range) and the intra-frame prediction direction.
[0485] Optionally, determine the prediction mode corresponding to the prediction direction in the area histogram whose area amplitude value satisfies Condition 2 as the alternative mode, and determine the sixth matching information related to at least one reference region of the sub-block of the current block. Exemplarily, Condition 2 can be the area amplitude value whose position or order is relatively high after being sorted according to the preset sorting rule; and / or Condition 2 can be the area amplitude value within the preset position or preset order range after being sorted according to the preset sorting rule. For example, the preset sorting can be a sorting rule that arranges the area amplitude values from large to small, and determine the prediction modes corresponding to the prediction directions with the top 3 area amplitude values in the area histogram as the alternative modes.
[0486] Optionally, determine the prediction mode corresponding to the prediction direction in the usage frequency histogram whose usage frequency satisfies Condition 3 as the alternative mode, and determine the sixth matching information corresponding to at least one reference region of the sub-block of the current block according to the alternative mode. For example, use the alternative mode to predict the at least one reference region of the sub-block of the current block to obtain a predicted value, and determine the corresponding sixth matching information according to the obtained predicted value and the reconstructed value of the at least one reference region. Exemplarily, Condition 3 can be the usage frequency whose position or order is relatively high after being sorted according to the preset sorting rule; and / or Condition 3 can be the usage frequency within the preset position or preset order range after being sorted according to the preset sorting rule. For example, the preset sorting can be a sorting rule that arranges the usage frequencies from large to small, and determine the prediction modes corresponding to the prediction directions with the top 3 usage frequencies in the usage frequency histogram as the alternative modes.
[0487] Optionally, the sixth matching information related to at least one reference area of the sub-block of the current block is determined or obtained according to the prediction mode corresponding to the gradient histogram, the area histogram and / or the usage count histogram of the sub-block of the current block and the encoded image block, and the candidate prediction mode in at least one mode list is determined or obtained, and the target prediction mode of the sub-block of the current block is determined or obtained according to the candidate prediction mode in at least one mode list.
[0488] In this embodiment, the candidate prediction mode is determined by the sixth matching information. On the one hand, the richness of the candidate prediction modes in the mode list and the degree of adaptability to the current block are improved. On the other hand, the existing information is used to effectively narrow the search range of the candidate prediction modes and reduce the computational complexity.
[0489] Mode b7, determining or obtaining seventh matching information related to at least one reference area of the current block according to a prediction mode corresponding to a gradient histogram, an area histogram of an adjacent block of the current block and / or a usage count histogram of an encoded image block;
[0490] Optionally, at least one histogram of adjacent blocks of the current block is determined or obtained, and the histogram includes a gradient histogram, an area histogram and / or a usage count histogram of encoded image blocks. At least one prediction mode is determined or obtained based on the at least one histogram of the adjacent blocks and determined as an alternative mode to achieve a primary screening of the prediction mode, and then pattern matching information related to each alternative mode and at least one reference area of the current block is determined as seventh matching information, and then a secondary screening is performed based on the seventh matching information to determine or obtain at least one candidate prediction mode in the pattern list from each alternative mode.
[0491] Optionally, the current block, adjacent blocks, non-adjacent blocks, co-located blocks, and coded image blocks at the predicted position are image regions of the same division level, sub-blocks of the current block, sub-blocks of adjacent blocks, sub-blocks of the co-located blocks, and sub-blocks of the coded image blocks at the predicted position are image regions of the same division level, and the sub-blocks of the current block, sub-blocks of adjacent blocks, sub-blocks of the co-located blocks, and sub-blocks of the coded image blocks at the predicted position are image regions of the next division level of the current block, adjacent blocks, non-adjacent blocks, co-located blocks, and coded image blocks at the predicted position, respectively.
[0492] Optionally, in video coding and decoding technology, it is necessary to divide the image into blocks. For example, the image can be divided into at least one strip, the strip can be divided into at least one coding unit, the coding unit can be divided into at least one sub-block, different strips are at the same division level, different coding units are at the same division level, and different sub-blocks are at the same division level; while strips and coding units belong to different division levels, and coding units and sub-blocks belong to different division levels.
[0493] Optionally, candidate prediction modes in at least one mode list may be determined or obtained according to prediction modes corresponding to a gradient histogram, an area histogram, and / or a histogram of the number of times an encoded image block is used of non-adjacent blocks of the current block and pattern matching information related to at least one reference region of the current block.
[0494] Optionally, candidate prediction modes in at least one mode list may be determined or obtained according to prediction modes corresponding to a gradient histogram, an area histogram, and / or a histogram of the number of times an encoded image block is used of co-located blocks of the current block and pattern matching information related to at least one reference region of the current block.
[0495] Optionally, candidate prediction modes in at least one mode list may be determined or obtained according to prediction modes corresponding to a gradient histogram, an area histogram, and / or a histogram of the number of times an encoded image block is used of encoded image blocks at a preset position of the current block and pattern matching information related to at least one reference region of the current block.
[0496] Optionally, a prediction mode corresponding to a prediction direction in which the sum of gradient magnitude values in the gradient histogram of adjacent blocks of the current block satisfies Condition 1 is determined as an alternative mode, and seventh matching information related to at least one reference region of the current block is determined for the alternative mode. Exemplarily, Condition 1 may be that the gradient magnitude value is in a pre-set sorted position. For example, a prediction mode corresponding to a prediction direction in which the gradient magnitudes in the gradient histogram are in the top 3 is determined as an alternative mode.
[0497] Optionally, a prediction mode corresponding to a prediction direction in which the area magnitude value in the area histogram of adjacent blocks of the current block satisfies Condition 2 is determined as an alternative mode, and seventh matching information related to at least one reference region of the current block is determined for the alternative mode. Exemplarily, Condition 2 may be that the area magnitude value is in a pre-set sorted position. For example, a prediction mode corresponding to a prediction direction in which the area magnitudes in the area histogram are in the top 3 is determined as an alternative mode.
[0498] Optionally, a prediction mode corresponding to a prediction direction in which the number of times of use in the histogram of the number of times of use of adjacent blocks of the current block satisfies Condition 3 is determined as an alternative mode, and seventh matching information related to at least one reference region of the current block is determined for the alternative mode. Exemplarily, Condition 3 may be that the number of times of use is in a pre-set sorted position. For example, a prediction mode corresponding to a prediction direction in which the numbers of times of use in the histogram of the number of times of use are in the top 3 is determined as an alternative mode.
[0499] Optionally, based on the prediction mode corresponding to the gradient histogram, area histogram and / or usage count histogram of the adjacent blocks of the current block and the seventh matching information related to at least one reference area of the current block, a candidate prediction mode in at least one mode list is determined or obtained, and based on the candidate prediction mode in at least one mode list, a target prediction mode of the current block is determined or obtained.
[0500] In this embodiment, the candidate prediction mode is determined based on the seventh matching information. On the one hand, the richness of the candidate prediction modes in the mode list and the degree of compatibility with the current block are improved. On the other hand, the existing information is used to effectively narrow the search range of the candidate prediction modes and reduce the computational complexity.
[0501] Mode b8, determining or obtaining eighth matching information related to at least one reference area of the current block according to a prediction mode corresponding to a gradient histogram, an area histogram of a sub-block of an adjacent block of the current block and / or a usage count histogram of an encoded image block;
[0502] Optionally, at least one histogram of sub-blocks of adjacent blocks of the current block is determined or obtained, and the histogram includes a gradient histogram, an area histogram and / or a usage count histogram of encoded image blocks; at least one prediction mode determined or obtained based on at least one histogram of sub-blocks of the adjacent blocks is determined as an alternative mode to achieve a primary screening of the prediction mode, and then determine pattern matching information related to each alternative mode and at least one reference area of the current block as eighth matching information; and then perform a secondary screening based on the eighth matching information to determine or obtain at least one candidate prediction mode in the pattern list from each alternative mode.
[0503] Optionally, the current block, adjacent blocks, non-adjacent blocks, co-located blocks, and coded image blocks at the predicted position are image regions of the same division level; sub-blocks of the current block, sub-blocks of adjacent blocks, sub-blocks of co-located blocks, and sub-blocks of the coded image blocks at the predicted position are image regions of the same division level, and the sub-blocks of the current block, sub-blocks of adjacent blocks, sub-blocks of co-located blocks, and sub-blocks of the coded image blocks at the predicted position are image regions of the next division level of the current block, adjacent blocks, non-adjacent blocks, co-located blocks, and coded image blocks at the predicted position, respectively.
[0504] Optionally, in video coding and decoding technology, it is necessary to divide the image into blocks. For example, the image can be divided into at least one strip, the strip can be divided into at least one coding unit, the coding unit can be divided into at least one sub-block, different strips are at the same division level, different coding units are at the same division level, and different sub-blocks are at the same division level; while strips and coding units belong to different division levels, and coding units and sub-blocks belong to different division levels.
[0505] Optionally, candidate prediction modes in at least one mode list may be determined or obtained according to the mode matching information related to at least one reference region of the current block and the prediction modes corresponding to the gradient histogram, area histogram, and / or usage frequency histogram of the coded image blocks of the non-adjacent blocks of the current block.
[0506] Optionally, candidate prediction modes in at least one mode list may be determined or obtained according to the mode matching information related to at least one reference region of the current block and the prediction modes corresponding to the gradient histogram, area histogram, and / or usage frequency histogram of the coded image blocks of the co-located blocks of the current block.
[0507] Optionally, candidate prediction modes in at least one mode list may be determined or obtained according to the mode matching information related to at least one reference region of the current block and the prediction modes corresponding to the gradient histogram, area histogram, and / or usage frequency histogram of the coded image blocks at the preset position of the current block.
[0508] Optionally, the prediction modes corresponding to the prediction directions for which the sum of the gradient magnitude values in the gradient histogram of the sub-blocks of the adjacent blocks of the current block satisfies Condition 1 are determined as alternative modes, and the eighth matching information related to at least one reference region of the current block and the alternative modes is determined. Exemplarily, Condition 1 may be that the gradient magnitude values are located in the previous preset sorting positions. For example, the prediction modes corresponding to the prediction directions for which the gradient magnitudes in the gradient histogram are among the top 3 are determined as alternative modes.
[0509] Optionally, the prediction modes corresponding to the prediction directions for which the area magnitude values in the area histogram of the sub-blocks of the adjacent blocks of the current block satisfy Condition 2 are determined as alternative modes, and the eighth matching information related to at least one reference region of the current block and the alternative modes is determined. Exemplarily, Condition 2 may be that the area magnitude values are located in the previous preset sorting positions. For example, the prediction modes corresponding to the prediction directions for which the area magnitudes in the area histogram are among the top 3 are determined as alternative modes.
[0510] Optionally, the prediction modes corresponding to the prediction directions for which the usage frequencies in the usage frequency histogram of the sub-blocks of the adjacent blocks of the current block satisfy Condition 3 are determined as alternative modes, and the eighth matching information related to at least one reference region of the current block and the alternative modes is determined. Exemplarily, Condition 3 may be that the usage frequencies are located in the previous preset sorting positions. For example, the prediction modes corresponding to the prediction directions for which the usage frequencies in the usage frequency histogram are among the top 3 are determined as alternative modes.
[0511] Optionally, based on the eighth matching information related to at least one reference area of the current block and the prediction mode corresponding to the gradient histogram, the area histogram and / or the usage count histogram of the sub-blocks of the adjacent blocks of the current block, the candidate prediction mode in at least one mode list is determined or obtained, and based on the candidate prediction mode in the at least one mode list, the target prediction mode of the current block is determined or obtained.
[0512] In this embodiment, the candidate prediction mode is determined based on the eighth matching information. On the one hand, the richness of the candidate prediction modes in the mode list and the degree of compatibility with the current block are improved. On the other hand, the existing information is used to effectively narrow the search range of the candidate prediction modes and reduce the computational complexity.
[0513] Mode b9, determining or obtaining ninth matching information related to at least one reference area of a subblock of the current block according to a prediction mode corresponding to a gradient histogram, an area histogram of an adjacent block of a subblock of the current block and / or a usage count histogram of an encoded image block;
[0514] Optionally, at least one histogram of adjacent blocks of a sub-block of the current block is determined or obtained, the histogram including a gradient histogram, an area histogram and / or a usage count histogram of an encoded image block, and at least one prediction mode determined or obtained based on the at least one histogram of the adjacent blocks is determined as an alternative mode to achieve a primary screening of the prediction mode, and then pattern matching information related to each alternative mode and at least one reference area of the sub-block of the current block is determined as ninth matching information, and then a secondary screening is performed based on the ninth matching information to determine or obtain at least one candidate prediction mode in a pattern list from each alternative mode.
[0515] Optionally, the current block, adjacent blocks, non-adjacent blocks, co-located blocks, and coded image blocks at the predicted position are image regions of the same division level, sub-blocks of the current block, sub-blocks of adjacent blocks, sub-blocks of the co-located blocks, and sub-blocks of the coded image blocks at the predicted position are image regions of the same division level, and the sub-blocks of the current block, sub-blocks of adjacent blocks, sub-blocks of the co-located blocks, and sub-blocks of the coded image blocks at the predicted position are image regions of the next division level of the current block, adjacent blocks, non-adjacent blocks, co-located blocks, and coded image blocks at the predicted position, respectively.
[0516] Optionally, in video coding and decoding technology, it is necessary to divide the image into blocks. For example, the image can be divided into at least one strip, the strip can be divided into at least one coding unit, the coding unit can be divided into at least one sub-block, different strips are at the same division level, different coding units are at the same division level, different sub-blocks are at the same division level, while strips and coding units belong to different division levels, and coding units and sub-blocks belong to different division levels.
[0517] Optionally, a candidate prediction mode in at least one mode list can be determined or obtained based on the prediction mode corresponding to the gradient histogram, area histogram and / or usage count histogram of the non-adjacent blocks of the sub-blocks of the current block and the pattern matching information related to at least one reference area of the sub-blocks of the current block.
[0518] Optionally, a candidate prediction mode in at least one mode list can be determined or obtained based on the prediction mode corresponding to the gradient histogram, area histogram and / or usage count histogram of the co-located block of the sub-block of the current block and the pattern matching information related to at least one reference area of the sub-block of the current block.
[0519] Optionally, a candidate prediction mode in at least one mode list can be determined or obtained based on the prediction mode corresponding to the gradient histogram, area histogram and / or usage count histogram of the encoded image block at a preset position of the sub-block of the current block and the pattern matching information related to at least one reference area of the sub-block of the current block.
[0520] Optionally, a prediction mode corresponding to a prediction direction in which the sum of gradient amplitude values in a gradient histogram of adjacent blocks of a sub-block of the current block satisfies condition one is determined as an alternative mode, and ninth matching information related to the alternative mode and at least one reference area of the sub-block of the current block is determined. Exemplarily, condition one may be that the gradient amplitude value is located in a front preset sorting position, for example, a prediction mode corresponding to a prediction direction in which the gradient amplitude values in the gradient histogram are in the top 3 is determined as an alternative mode.
[0521] Optionally, a prediction mode corresponding to a prediction direction in which the area amplitude value in the area histogram of the adjacent blocks of the sub-block of the current block satisfies condition two is determined as an alternative mode, and ninth matching information related to the alternative mode and at least one reference area of the sub-block of the current block is determined. Exemplarily, condition two may be that the area amplitude value is located in a front preset sorting position, for example, the prediction mode corresponding to the prediction direction in which the area amplitude value in the area histogram is in the top 3 is determined as the alternative mode.
[0522] Optionally, a prediction mode corresponding to a prediction direction whose usage count in a usage count histogram of adjacent blocks of a sub-block of the current block satisfies condition three is determined as an alternative mode, and ninth matching information related to the alternative mode and at least one reference area of the sub-block of the current block is determined. Exemplarily, condition three may be that the usage count is in a front preset sorting position, for example, a prediction mode corresponding to a prediction direction whose usage count is in the top 3 in the usage count histogram is determined as an alternative mode.
[0523] Optionally, a candidate prediction mode in at least one mode list is determined or obtained according to the ninth matching information corresponding to the gradient histogram, area histogram, and / or usage frequency histogram of the coded image blocks of the adjacent blocks of the sub-blocks of the current block, and the target prediction mode of the current block is determined or obtained according to the candidate prediction mode in at least one mode list.
[0524] In this embodiment, determining the candidate prediction mode according to the ninth matching information improves the richness of the candidate prediction modes in the mode list and the adaptation degree to the current block on the one hand, and on the other hand, uses the existing information to effectively narrow the search range of the candidate prediction modes and reduce the computational complexity.
[0525] Optionally, a candidate prediction mode is determined or obtained according to the mode matching information related to at least one reference region of the current block and / or according to the mode matching information related to at least one reference region of the sub-blocks of the current block, including at least one of the following methods c1 to c3:
[0526] Method c1, determining or obtaining a candidate prediction mode according to the value range corresponding to at least one mode matching information;
[0527] Optionally, the mode matching information refers to the information used to evaluate the matching degree between different prediction modes and the reference region and the corresponding current block. The mode matching information can be based on at least one metric, such as the rate-distortion cost of the prediction result, prediction error, texture similarity, etc., to indicate the matching degree between different prediction modes and the reference region.
[0528] Optionally, the mode matching information includes: SAD, SATD, and / or MRSAD, and the value range corresponding to the mode matching information can be the value range in which the values of SAD, SATD, and / or MRSAD included in the mode matching information are located.
[0529] Optionally, the smaller the SAD value, SATD value, and / or MRSAD value, the higher the matching degree. Conversely, the larger the SAD value, SATD value, and / or MRSAD value, the lower the matching degree.
[0530] Optionally, the prediction mode in which the relevant mode matching information is within a preset value range is determined as the candidate prediction mode in at least one mode list.
[0531] Optionally, the prediction mode in which the relevant mode matching information is greater than a preset value threshold is determined as the candidate prediction mode in at least one mode list.
[0532] Optionally, a prediction pattern with relevant pattern matching information within a preset value range is determined as the first alternative pattern; then, according to the pattern sorting result associated with the first alternative pattern, a candidate prediction pattern is determined or obtained, and the candidate prediction pattern is placed in the candidate prediction pattern list according to the pattern sorting result.
[0533] Optionally, a prediction pattern with relevant pattern matching information greater than a preset value threshold is determined as the first alternative pattern, and then, according to the pattern sorting result associated with the first alternative pattern, a candidate prediction pattern is determined or obtained.
[0534] Optionally, in this embodiment, the pattern matching information includes at least one of the methods b1 to b9 in the third embodiment.
[0535] Optionally, according to the value range corresponding to at least one pattern matching information, a candidate prediction pattern in at least one pattern list is determined or obtained, and according to the candidate prediction pattern in at least one pattern list, a target prediction pattern of the current block is determined or obtained.
[0536] In this embodiment, since the pattern matching information represents the matching degree between different prediction patterns and the reference region, therefore, determining the candidate prediction pattern according to the value corresponding to the pattern matching information can effectively ensure that the candidate prediction pattern in the pattern list has a high matching degree with the current block, thereby improving the adaptability between the target prediction pattern determined or obtained according to the candidate prediction pattern and the current block, and enhancing the prediction effect of the current block.
[0537] Method c2, determining or obtaining a candidate prediction pattern according to the comparison result between at least two values corresponding to at least one pattern matching information;
[0538] Optionally, the pattern matching information refers to the information used to evaluate the matching degree between different prediction patterns and the reference region and its corresponding current block.
[0539] Optionally, the pattern matching information can be based on at least one metric, such as the rate-distortion cost of the prediction result, the prediction error, the texture similarity, etc., to indicate the matching degree between different prediction patterns and the reference region.
[0540] Optionally, the pattern matching information includes: SAD, SATD, and / or MRSAD, and the value range corresponding to the pattern matching information can be the value range in which the values of SAD, SATD, and / or MRSAD included in the pattern matching information are located.
[0541] Optionally, the smaller the SAD value, SATD value, and / or MRSAD value, the higher the matching degree; on the contrary, the larger the SAD value, SATD value, and / or MRSAD value, the lower the matching degree.
[0542] Optionally, the values corresponding to the pattern matching information related to determining or obtaining at least one prediction pattern may be compared, and according to the comparison result, a candidate prediction pattern may be determined or obtained.
[0543] Optionally, the prediction pattern with a smaller value corresponding to the pattern matching information is determined as the candidate prediction pattern.
[0544] Exemplarily, the values corresponding to the pattern matching information include the first SAD value corresponding to pattern A, the second SAD value corresponding to pattern B, and the third SAD value corresponding to pattern C; the values corresponding to the above pattern matching information are compared, and the comparison result is: the first SAD value < the second SAD value < the third SAD value. Since the smaller the SAD value, the higher the matching degree, therefore, according to the comparison result, pattern A with a higher matching degree, or pattern A and B may be used as the candidate prediction pattern.
[0545] Optionally, the prediction patterns in which the relevant pattern matching information is within a preset value range are determined as the first alternative patterns, and then according to the comparison result between the values corresponding to the pattern matching information related to the multiple first alternative patterns, a candidate prediction pattern may be determined or obtained.
[0546] Optionally, in this embodiment, the pattern matching information includes at least one of the methods b1 to b9 in the third embodiment.
[0547] Optionally, according to the comparison result between at least two values corresponding to at least one pattern matching information, a candidate prediction pattern is determined or obtained, and according to the candidate prediction pattern in at least one pattern list, the target prediction pattern of the current block is determined or obtained.
[0548] In this embodiment, since the pattern matching information represents the matching degree between different prediction patterns and the reference region, therefore, according to the comparison result between the values corresponding to the pattern matching information, candidate prediction patterns with a higher matching degree with the current block can be screened out, thereby improving the adaptability between the target prediction pattern determined or obtained according to the candidate prediction pattern and the current block, and enhancing the prediction effect of the current block.
[0549] Method c3, determining or obtaining a candidate prediction pattern according to the pattern sorting result associated with at least one pattern matching information;
[0550] Optionally, at least one pattern matching information is sorted according to a preset sorting rule to determine or obtain a pattern sorting result. Optionally, the preset sorting rule may be to sort the values corresponding to the pattern matching information from small to large, so that the prediction patterns with smaller values (i.e., higher matching degrees) corresponding to the pattern matching information are ranked higher. Optionally, the preset sorting rule and / or is to sort the values corresponding to the pattern matching information from large to small, so that the prediction patterns with larger values (i.e., lower matching degrees) corresponding to the pattern matching information are ranked higher.
[0551] Optionally, at least one prediction pattern within a preset sorting position and / or a preset sorting range may be determined as a candidate prediction pattern according to the pattern sorting result.
[0552] Optionally, in this embodiment, the pattern matching information includes at least one of the methods b1 to b9 in the third embodiment.
[0553] Optionally, a candidate prediction pattern is determined or obtained according to the pattern sorting result associated with at least one pattern matching information, and a target prediction pattern of the current block is determined or obtained according to the candidate prediction pattern in at least one pattern list.
[0554] In this embodiment, since the pattern matching information represents the matching degree between different prediction patterns and the reference area, therefore, according to the comparison result between the values corresponding to the pattern matching information, candidate prediction patterns with a higher matching degree with the current block can be screened out, thereby improving the adaptability between the target prediction pattern determined or obtained according to the candidate prediction pattern and the current block, and enhancing the prediction effect of the current block.
[0555] Optionally, the pattern list includes a first pattern list and / or a non-first pattern list (for example, a second pattern list). Optionally, the pattern list and / or further includes a third pattern list, a fourth pattern list, etc.
[0556] Optionally, at least one pattern list and / or are respectively set with different list priorities. When determining or obtaining the target prediction pattern of the current block according to the candidate prediction pattern in at least one pattern list, the selection order of the pattern list can be determined according to the list priority. For example, first screen the target prediction pattern from the pattern list with the highest list priority. In the case where the target prediction pattern has not been determined or obtained, then screen the target prediction pattern from the pattern list with the second highest list priority and subsequent priorities. This setting of multiple list priorities can achieve hierarchical screening, reduce the amount of calculation and computational complexity, and at the same time maintain a high prediction accuracy.
[0557] In this embodiment, by setting at least one mode list, more abundant candidate prediction modes can be provided, for example, covering different types of prediction modes, including angle prediction modes, non-angle prediction modes and / or prediction derivation modes, so as to ensure that there are more options when selecting the target prediction mode, thereby improving the adaptability between the target prediction mode and the current block, and further improving the prediction accuracy of the current block.
[0558] Optionally, determining or obtaining a candidate prediction mode according to a mode ranking result associated with at least one mode matching information includes at least one of the following methods d1 to d4:
[0559] Mode d1, determining or obtaining a candidate prediction mode in the first mode list according to at least one first prediction mode located in a preset sorting position and / or within a preset sorting range in the mode sorting result;
[0560] Optionally, the first mode list and the second mode list (ie, non-first mode list) include different candidate prediction modes.
[0561] Optionally, at least one pattern matching information can be sorted according to a preset sorting rule to determine or obtain a pattern sorting result, and at least one first prediction mode in the pattern sorting result that is located at a preset sorting position (for example, the first, second, third, etc. position) and / or within a preset sorting range (for example, the first to sixth) can be determined as a candidate prediction mode in the first pattern list.
[0562] Optionally, the preset sorting position and / or the preset sorting range can be determined or obtained based on the actual preset sorting rule (for example, forward order, reverse order) and / or the degree of match between the prediction mode and the current block. Exemplarily, when the preset sorting rule includes sorting in forward order according to the mode matching information, in order to obtain a higher degree of match, a prediction mode with a high ranking (for example, top 6, top 3, etc.) can be selected as the first prediction mode, and the candidate prediction modes in the first mode list can be determined or obtained.
[0563] Optionally, the length of the first pattern list is a first length and corresponds to the number of candidate prediction patterns that can be accommodated in the list. Optionally, if the number of first prediction patterns located at a preset sorting position and / or within a preset sorting range in the pattern sorting result is greater than the number of patterns that can be accommodated in the first column, the first prediction patterns that meet the number of patterns that can be accommodated in the first column will be determined as candidate prediction patterns in the first pattern list, and the remaining first prediction patterns will be determined as candidate prediction patterns in the second pattern list.
[0564] Optionally, in this embodiment, the pattern matching information includes at least one of the methods 1 to 9 in the third embodiment.
[0565] Optionally, the candidate prediction patterns in the first pattern list may include a first possible pattern and / or a second possible pattern; at least one first prediction pattern within a preset sorting position and / or a preset sorting range in the pattern sorting result is used to determine or obtain the candidate prediction patterns in the first pattern list, and based on the pattern matching information associated with each of the candidate prediction patterns in the first pattern list, the first possible pattern and / or the second possible pattern is determined or obtained.
[0566] In this embodiment, by setting at least one pattern list, richer candidate prediction patterns can be provided, ensuring more options when selecting the target prediction pattern, thereby improving the fitness between the target prediction pattern and the current block, and further enhancing the prediction accuracy of the current block.
[0567] Method d2: at least one second prediction pattern after the first prediction pattern in the pattern sorting result is used to determine or obtain the candidate prediction patterns in the second pattern list;
[0568] Optionally, the first pattern list and the second pattern list include different candidate prediction patterns.
[0569] Optionally, at least one pattern matching information may be sorted according to a preset sorting rule to determine or obtain the pattern sorting result, and at least one second prediction pattern after the first prediction pattern in the pattern sorting result is determined as the candidate prediction pattern in the second pattern list.
[0570] Optionally, when the preset sorting rule includes sorting in ascending order according to the pattern matching information, at least one first prediction pattern within a preset sorting position and / or a preset sorting range in the pattern sorting result is used to determine or obtain the candidate prediction patterns in the first pattern list, so that the first pattern list contains candidate prediction patterns with a higher matching degree with the current block, while the patterns after the first prediction pattern, that is, the patterns with a slightly lower matching degree, can be placed in the second pattern list.
[0571] Optionally, when the preset sorting rule includes sorting in descending order according to the pattern matching information, at least one first prediction pattern within a preset sorting position and / or a preset sorting range in the pattern sorting result is used to determine or obtain the candidate prediction patterns in the first pattern list, so that the first pattern list contains candidate prediction patterns with a lower matching degree with the current block, while the patterns after the first prediction pattern, that is, the patterns with a higher matching degree, can be placed in the second pattern list.
[0572] Optionally, the length of the second mode list is the second length and corresponds to the number of candidate prediction modes that can be accommodated in the list. Optionally, if the number of second prediction modes after the first prediction mode in the mode sorting result is greater than the number of modes that can be accommodated in the second column, then the second prediction modes that satisfy the number of modes that can be accommodated in the second column are determined as the candidate prediction modes in the second mode list, and the remaining second prediction modes are determined as the candidate prediction modes in the third list.
[0573] Optionally, in this embodiment, the pattern matching information includes at least one of the nine methods from Method 1 to Method 9 in the third embodiment.
[0574] In this embodiment, determining or obtaining the candidate prediction modes in the second mode list according to at least one second prediction mode after the first prediction mode in the mode sorting result can enable the first mode list and the second mode list to include different candidate prediction modes, so as to ensure that there are more options when selecting the target prediction mode, improve the fitness between the target prediction mode and the current block, and further improve the prediction accuracy of the current block.
[0575] Method d3: determining or obtaining the candidate prediction modes in the second mode list according to at least one third prediction mode outside the preset sorting position and / or the preset sorting range in the mode sorting result;
[0576] Optionally, the first mode list and the second mode list include different candidate prediction modes.
[0577] Optionally, at least one pattern matching information can be sorted according to a preset sorting rule to determine or obtain the mode sorting result, and at least one third prediction mode outside the preset sorting position and / or the preset sorting range in the mode sorting result is determined as the candidate prediction mode in the second mode list.
[0578] Optionally, the sorting position of the third prediction mode in the mode sorting result can be after and / or before the first prediction mode. Therefore, the matching degree between the third prediction mode and the current block may be higher or lower than that of the first prediction mode.
[0579] Optionally, the preset sorting position and / or the preset sorting range can be determined or obtained according to the actual preset sorting rule (for example, ascending order, descending order) and / or the matching degree between the prediction mode and the current block.
[0580] Optionally, determining or obtaining the candidate prediction modes in the second mode list according to at least one third prediction mode after the first prediction mode in the mode sorting result.
[0581] Optionally, the length of the second pattern list is a second length and corresponds to the number of candidate prediction patterns that can be accommodated in the list. Optionally, if the number of third prediction patterns outside the preset sorting position and / or preset sorting range in the pattern sorting result is greater than the number of patterns that can be accommodated in the second column, then the third prediction patterns that satisfy the number of patterns that can be accommodated in the second column are determined as the candidate prediction patterns in the second pattern list, and the remaining third prediction patterns are determined as the candidate prediction patterns in the third list.
[0582] Optionally, in this embodiment, the pattern matching information includes at least one of the nine methods from Method 1 to Method 9 in the third embodiment.
[0583] In this embodiment, determining or obtaining the candidate prediction patterns in the second pattern list according to at least one third prediction pattern outside the preset sorting position and / or preset sorting range in the pattern sorting result can enable the first pattern list and the second pattern list to contain different candidate prediction patterns, thereby ensuring more options when selecting the target prediction pattern, improving the adaptability between the target prediction pattern and the current block, and further enhancing the prediction accuracy of the current block.
[0584] Method d4: determining or obtaining the candidate prediction patterns in the second pattern list according to at least one fourth prediction pattern determined or obtained by the first prediction pattern;
[0585] Optionally, at least one fourth prediction pattern determined or obtained according to the first prediction pattern is determined as the candidate prediction pattern in the second pattern list.
[0586] Optionally, at least one second prediction pattern after the first prediction pattern in the pattern sorting result is determined as the candidate prediction pattern in the second pattern list. At least one third prediction pattern outside the preset sorting position and / or preset sorting range in the pattern sorting result is determined as the candidate prediction pattern in the second pattern list.
[0587] Optionally, the fourth prediction pattern adjacent to the first prediction pattern in pattern sorting and / or numerically adjacent is determined as the candidate prediction pattern in the second pattern list.
[0588] Optionally, being adjacent in pattern means other patterns that are adjacent to a certain specific pattern (for example, the first prediction pattern) in terms of direction or type in the definition or arrangement of prediction patterns. These patterns are usually logically or functionally related to the first prediction pattern and may have similar prediction directions or texture features.
[0589] Optionally, numerically adjacent means other patterns that are numerically adjacent to a specific pattern in the numerical representation or index of the pattern. These patterns usually have consecutive index values in the coding standard, indicating that they are similar in function or direction. Exemplarily, in the HEVC standard, the angular patterns are represented by index values. If the index of the first possible pattern is n, then the numerically adjacent patterns may be n-1 and n+1.
[0590] Optionally, at least one fourth prediction mode determined or obtained through the first prediction mode in the first quantity is determined as a candidate prediction mode in the second mode list. The second quantity of second prediction modes and / or third prediction modes are determined as candidate prediction modes in the second column.
[0591] Optionally, the second prediction mode and / or third prediction mode with a higher matching degree with the current block can be determined as a candidate prediction mode in the second column.
[0592] Optionally, according to a preset sorting rule, the pattern matching information related to the second prediction mode, the third prediction mode, and the fourth prediction mode is sorted to determine or obtain a pattern sorting result. At least one fifth prediction mode located within the preset first sorting position and / or the preset first sorting range in the pattern sorting result is determined or obtained as a candidate prediction mode in the second mode list.
[0593] Optionally, the remaining prediction modes can be further added to the third mode list.
[0594] In this embodiment, determining or obtaining a candidate prediction mode in the second mode list according to at least one fourth prediction mode determined or obtained through the first prediction mode can enable the first mode list and the second mode list to contain different candidate prediction modes, thereby ensuring more options when selecting a target prediction mode, improving the adaptability between the target prediction mode and the current block, and further enhancing the prediction accuracy of the current block.
[0595] Mode C, non-angular prediction mode;
[0596] Optionally, the non-angular prediction mode can be a prediction mode other than the angular prediction mode. Exemplarily, the non-angular prediction modes include: NNIP mode, EIP mode, BV mode, planar mode, and / or DC mode.
[0597] Optionally, the non-angular prediction mode can also include a prediction derivation mode, for example, OBIC mode, TIMD mode, sub-block TIMD mode, and / or DIMD mode.
[0598] In this embodiment, at least one possible angle prediction mode can be derived according to the above non-angle prediction mode and used to determine the candidate prediction mode, so as to increase the diversity of the candidate prediction modes, improve the probability of selecting the optimal mode, and further improve the prediction accuracy.
[0599] Optionally, the method for determining or obtaining the reference region includes at least one of the following methods D to I:
[0600] Method D: determining or obtaining at least one reference region according to at least one of the upper adjacent pixel, upper non-adjacent pixel, left adjacent pixel, left non-adjacent pixel, upper left adjacent pixel, and upper left non-adjacent pixel of the current block;
[0601] Optionally, the upper adjacent pixel may be a pixel located above and adjacent to the current block in the same frame image.
[0602] Optionally, the upper non-adjacent pixel may be a pixel located above the current block but not adjacent to the current block in the same frame image.
[0603] Optionally, the left adjacent pixel may be a pixel located to the left and adjacent to the current block in the same frame image.
[0604] Optionally, the left non-adjacent pixel may be a pixel located to the left of the current block but not adjacent to the current block in the same frame image.
[0605] Optionally, the upper left adjacent pixel may be a pixel located in the upper left and adjacent to the current block in the same frame image.
[0606] Optionally, the upper left non-adjacent pixel may be a pixel located in the upper left of the current block but not adjacent to the current block in the same frame image.
[0607] Optionally, at least one of the upper adjacent pixel, upper non-adjacent pixel, left adjacent pixel, left non-adjacent pixel, upper left adjacent pixel, and upper left non-adjacent pixel may be a reconstructed pixel or a predicted pixel.
[0608] Optionally, at least one of the upper adjacent pixel, upper non-adjacent pixel, left adjacent pixel, left non-adjacent pixel, upper left adjacent pixel, and upper left non-adjacent pixel may be directly used as the reference region, or at least one obtained pixel may be derived or calculated to obtain the reference region.
[0609] Optionally, the reference region of the current block may be obtained according to a preset mapping / corresponding rule.
[0610] Optionally, according to the prediction model, a reference region can be selected from the adjacent pixels above the current block, non - adjacent pixels above, adjacent pixels on the left, non - adjacent pixels on the left, adjacent pixels in the upper - left corner, and non - adjacent pixels in the upper - left corner of the current block.
[0611] Refer to Figure 28 , the adjacent pixels above the current block are determined as reference region 2; the adjacent pixels on the left of the current block are determined as reference region 1; the adjacent pixels in the upper - left corner of the current block are determined as reference region 3, and the adjacent pixels above, on the left, and in the upper - left corner each include at least one pixel.
[0612] Optionally, if there is a lack of valid pixel data at certain positions, adjacent valid pixels can be used for filling.
[0613] In this embodiment, by determining or obtaining a reference region according to at least one of the adjacent pixels above the current block, non - adjacent pixels above, adjacent pixels on the left, non - adjacent pixels on the left, adjacent pixels in the upper - left corner, and non - adjacent pixels in the upper - left corner of the current block, since the current block usually has a high similarity with at least one of the adjacent pixels above the current block, non - adjacent pixels above, adjacent pixels on the left, non - adjacent pixels on the left, adjacent pixels in the upper - left corner, and non - adjacent pixels in the upper - left corner of the current block, the reference region determined according to these adjacent pixels and / or non - adjacent pixels can improve the matching degree of the prediction mode related to the sub - block during the prediction process, thereby improving the prediction accuracy of the current block.
[0614] Method E: Determine or obtain at least one reference region according to at least one of the neighbor blocks, non - neighbor blocks, co - located blocks, temporal blocks, and default blocks corresponding to the current block;
[0615] Optionally, use at least one of the neighbor blocks, non - neighbor blocks, co - located blocks, temporal blocks, and default blocks corresponding to the current block as at least one reference region.
[0616] Optionally, determine or obtain at least one reference region according to the image block information of at least one of the neighbor blocks, non - neighbor blocks, co - located blocks, temporal blocks, and default blocks corresponding to the current block.
[0617] Optionally, the image block information can include at least one of the block size, block area, image block attribute, and image block type.
[0618] Optionally, the block size includes the width, height, ratio, depth, area, resolution, number of pixels, etc. of the block. The image block attribute can include the position of the block and / or the image texture. The image block type can include natural images or screen content images, etc.
[0619] Optionally, at least one reference region may be determined or obtained according to at least one of the upper adjacent pixels, upper non - adjacent pixels, left adjacent pixels, left non - adjacent pixels, upper - left adjacent pixels, and upper - left non - adjacent pixels of at least one of the neighbor blocks, non - neighbor blocks, co - located blocks, temporal blocks, and default blocks corresponding to the current block.
[0620] Optionally, at least one of the upper adjacent pixels, upper non - adjacent pixels, left adjacent pixels, left non - adjacent pixels, upper - left adjacent pixels, and upper - left non - adjacent pixels of at least one of the neighbor blocks, non - neighbor blocks, co - located blocks, temporal blocks, and default blocks corresponding to the current block may be used as at least one reference region.
[0621] Optionally, at least one reference region may be determined or obtained according to at least one of the width, height, block size, and block area of at least one of the neighbor blocks, non - neighbor blocks, co - located blocks, temporal blocks, and default blocks corresponding to the current block.
[0622] Optionally, a neighbor block may be a block adjacent to the current block and may be a block that has been predicted or reconstructed.
[0623] Optionally, a non - neighbor block may be a block not adjacent to the current block and may be a block that has been predicted or reconstructed.
[0624] Optionally, a co - located block may be an image block in the co - located image that has the same position and size as the current block, and the co - located image may be the image in the reference image that is closest in time to the current image.
[0625] Optionally, a temporal block may be a block distinguished in the time domain, such as an image block in other frames before or after the current frame. For example, there is video data containing the first - frame image, second - frame image, and third - frame image played at the first second, second second, and third second respectively, and the current block is a block divided from the second - frame image, then the temporal block corresponding to the current block may be determined as the corresponding image block in other frames except the second frame.
[0626] Optionally, a default block may be a pre - set block, for example, a block with typical pixel characteristics pre - set by an encoder and / or a decoder.
[0627] In this embodiment, determining or obtaining at least one reference region according to at least one of the neighbor blocks, non - neighbor blocks, co - located blocks, temporal blocks, and default blocks corresponding to the current block ensures a close association between the determined or obtained reference region and the current block, thereby improving the matching degree of the prediction mode related to the sub - block and enhancing the prediction accuracy of the current block during the prediction process.
[0628] Method F: Determine or obtain at least one reference region according to at least one of the width, height, block size, and block area of the current block;
[0629] Optionally, at least one of pixels, image blocks, and image regions in at least one reference region is determined or obtained according to at least one of the width, height, block size, and block area of the current block.
[0630] Optionally, at least one reference region can be determined or obtained according to the width, height, and first mapping table of the current block. Optionally, the first mapping table can be as shown in Table 1 below:
[0631] Table 1
[0632] Width, height Dimensions of the reference area <![CDATA[Either the width or the height of the current block is less than X1]]> <![CDATA[Dimension A1]]> <![CDATA[The width and height of the current block are both greater than or equal to X1, and either the width or the height is less than X2]]> <![CDATA[Dimension A2]]> <![CDATA[The width and height of the current block are both greater than or equal to X2]]> <![CDATA[Size A3]]> <![CDATA[The width and height of the current block are both greater than or equal to X2, and either the width or the height is less than X3]]> <![CDATA[Size A4]]>
[0633] Optionally, the height of at least one reference region is equal to the height of the current block multiplied by a first preset multiple. Optionally, the width of at least one reference region is equal to the width of the current block multiplied by a second preset multiple.
[0634] Optionally, the reference region or the image region in the reference region can be an encoded region or a decoded region.
[0635] Optionally, the encoded region or the decoded region can be determined by the position of the top-left pixel, the height and width of the encoded region or the decoded region. For example, the position of the top-left pixel can be the position at N (N>1) times the height of the image block above the top-left position of the current block and N times the width of the image block to the left; the width of the encoded region or the decoded region is an integer multiple of the width of the current block, and the height of the encoded region or the decoded region is an integer multiple of the height of the current block.
[0636] Optionally, the reference region can be determined according to the block size of the current block and the second mapping table. Optionally, the second mapping table can be as shown in Table 2 below:
[0637] Table 2
[0638]
[0639]
[0640] Optionally, the block size includes at least one of the width, height, ratio, depth, area, resolution, and number of pixels of the block. Optionally, X4 to X7 can be preset thresholds corresponding to at least one of the width, height, ratio, depth, area, resolution, and number of pixels in the block size.
[0641] Optionally, the reference region can be determined according to the block area of the current block and the third mapping table. Optionally, the third mapping table can be as shown in Table 3 below:
[0642] Table 3
[0643] Block area Area of the reference area <![CDATA[The block area of the current block is less than X8]]> <![CDATA[Area C1]]> <![CDATA[The block area of the current block is greater than X8 and less than X9]]> <![CDATA[Area C2]]> <![CDATA[The block area of the current block is greater than X9 and less than X 10 > <![CDATA[Area C3]]> <![CDATA[The block area of the current block is greater than X 10 and less than X 11 > <![CDATA[Area C4]]>
[0644] Optionally, the position of the reference region can be determined or obtained based on the pixels adjacent above, adjacent to the left, and adjacent to the upper left of the current block, and then the size of the reference region can be determined according to the width and height of the current block and the first mapping table.
[0645] Exemplarily, the reference region of the current block includes: a first region adjacent above the current block, a second region adjacent to the left of the current block, and a third region adjacent to the upper left of the current block.
[0646] Exemplarily, the width of the first region is equal to 2 times the width of the current block, the height of the second region is equal to 2 times the height of the current block. If both the width and height of the current block are greater than or equal to 8, the height of the first region is 8, the width of the second region is 8, and both the width and height of the third region are 8; or, if either the width or height of the current block is less than 8, the height of the first region is 4, the width of the second region is 4, and both the width and height of the third region are 4.
[0647] In this embodiment, by determining or obtaining at least one reference region according to at least one of the width, height, block size, and block area of the current block, it is ensured that the determined or obtained reference region is closely related to the current block, so that the matching degree of the prediction mode related to the sub-block can be improved during the prediction process, thereby enhancing the prediction accuracy of the current block.
[0648] Method G: determining or obtaining at least one reference region based on the candidate block determined or obtained according to the candidate motion vector or candidate block vector of the current block;
[0649] Optionally, the candidate block can be determined or obtained according to at least one candidate motion vector or at least one candidate block vector in the candidate list of the current block and used as at least one reference region.
[0650] Optionally, the candidate block can be determined or obtained according to the candidate motion vector or candidate block vector of the current block, and at least one reference region can be determined or obtained according to at least one of the pixels adjacent above, non-adjacent above, adjacent to the left, non-adjacent to the left, adjacent to the upper left, and non-adjacent to the upper left of the determined candidate block.
[0651] Optionally, the candidate block can be determined or obtained according to the candidate motion vector or candidate block vector of the current block, and at least one of the pixels adjacent above, non-adjacent above, adjacent to the left, non-adjacent to the left, adjacent to the upper left, and non-adjacent to the upper left of the determined candidate block can be used as at least one reference region.
[0652] Optionally, the candidate block can be determined or obtained according to the candidate motion vector or candidate block vector of the current block, and at least one reference region can be determined or obtained according to at least one of the width, height, block size, and block area of the candidate block.
[0653] Optionally, a candidate block may be determined or obtained according to a candidate motion vector or a candidate block vector of a current block, and at least one reference region may be determined or obtained according to at least one of a neighbor block, a non-neighbor block, a co-located block, a temporal block, and a default block corresponding to the candidate block. For the specific implementation process, reference may be made to the solution in the above-mentioned Method 2, that is, replacing the current block in Method 2 with the candidate block, which will not be repeated here.
[0654] Optionally, a candidate block may be determined or obtained according to a candidate motion vector or a candidate block vector of a current block, and at least one of a neighbor block, a non-neighbor block, a co-located block, a temporal block, and a default block corresponding to the candidate block may be used as at least one reference region.
[0655] In this embodiment, the candidate block determined or obtained according to the candidate motion vector or the candidate block vector of the current block ensures that the determined or obtained reference region is closely related to the current block, so that the matching degree of the prediction mode related to the sub-block can be improved during the prediction process, and further the prediction accuracy of the current block can be enhanced.
[0656] Method H: If the first information of the current block satisfies the first condition, the reference region is the first reference region;
[0657] Optionally, the first information may be at least one of flag information, syntax elements, indication information, an index regarding a list, an aspect ratio of the current block, a width / height value range, and an area value range of the current block.
[0658] Optionally, the flag information may be used to indicate a specific state or option. For example, it is used to control the behavior of an encoder or a decoder.
[0659] Optionally, the syntax elements refer to a series of parameters and data structures defined in a video coding and decoding standard, which are used to describe the specific coding information of video frames and blocks.
[0660] Optionally, the indication information is information used to indicate a certain state or condition, and may include flag information or more complex syntax elements.
[0661] Optionally, the index regarding a list refers to an integer value used to identify a specific item in a certain list, and these lists may include candidate motion vectors, reference frame indices, transform coefficients, etc. The specific item in the list can be quickly searched and accessed through the index.
[0662] Optionally, the first information may be at least one of methods C to F, that is, the first information may be determining or obtaining at least one reference area based on at least one of the upper adjacent pixels, upper non-adjacent pixels, left adjacent pixels, left non-adjacent pixels, upper left adjacent pixels and upper left non-adjacent pixels of the current block; may be determining or obtaining at least one reference area based on at least one of the neighboring blocks, non-neighboring blocks, co-located blocks, time domain blocks and default blocks corresponding to the current block; may be determining or obtaining at least one reference area based on at least one of the width, height, block size and block area of the current block; may be determining or obtaining at least one reference area based on a candidate block determined or obtained according to a candidate motion vector or candidate block vector of the current block.
[0663] Optionally, the first condition may be a condition set in advance. Optionally, the first condition is not fixed and may be adaptively adjusted according to different scenarios.
[0664] Optionally, if the processing device detects that the current block satisfies the first condition, the first information may be selected for calculation to determine or obtain at least one reference area.
[0665] Optionally, the current block satisfies the first condition, including at least one of the following:
[0666] The value of the first information is a first value;
[0667] The value of the first information is within a first numerical range;
[0668] The value of the first information is greater than or equal to the first threshold;
[0669] The value of the first information is less than or equal to the second threshold.
[0670] Optionally, the value of the first information may be at least one of the width, height, block size and block area of the current block.
[0671] Optionally, the first value may be a value of at least one of a width, a height, a block size and a block area of the image block set in advance.
[0672] Optionally, the first numerical interval may be a numerical interval of at least one of a width, a height, a block size and a block area of the image block set in advance.
[0673] Optionally, the first threshold may be a threshold of at least one of width, height, block size and block area of the image block set in advance.
[0674] Optionally, the second threshold may be a threshold of at least one of width, height, block size and block area of the image block set in advance.
[0675] Optionally, when the processing device detects that the first information of the current block satisfies the first condition, it may select the first information for calculation to determine or obtain at least one reference region.
[0676] Optionally, the first reference region may be a reference region that satisfies at least one of Mode C to Mode F.
[0677] In this embodiment, by selecting the reference region through the first information, the similarity between the reference region and the current block can be improved (for example, the similarity of texture features, pixel features, etc.), so that the matching degree between the prediction mode and the sub-block can be improved during the prediction process, and further the prediction accuracy of the current block can be improved.
[0678] Mode I, if the first information of the current block does not satisfy the first condition, the reference region is the second reference region;
[0679] Optionally, the first reference region and the second reference region are different.
[0680] Optionally, the first reference region may be a partial region of at least one of the left adjacent region, upper adjacent region, and upper left adjacent region of the current block, and the second reference region may be a region different from the first reference region among the above regions.
[0681] In this embodiment, by selecting the reference region through the first information, the similarity between the reference region and the current block can be improved (for example, the similarity of texture features, pixel features, etc.), so that the matching degree between the prediction mode and the sub-block can be improved during the prediction process, and further the prediction accuracy of the current block can be improved.
[0682] Fourth Embodiment
[0683] Based on any of the above embodiments, a fourth embodiment is proposed.
[0684] In this embodiment, the following Mode Six and / or Mode Seven are further included:
[0685] Mode Six, if the second condition is satisfied, determine or obtain the target prediction result of the current block according to the prediction mode of the current block;
[0686] Optionally, when the second condition is satisfied, use the prediction mode of the current block to perform prediction processing on the current block and / or at least one sub-block of the current block to determine or obtain the target prediction result of the current block.
[0687] Optionally, the second condition may be at least one of the following: the prediction modes of the current block and each sub-block of the current block are the same, and the comparison result between the first value corresponding to the prediction mode of the current block with respect to the matching information of the current block and the second value corresponding to the prediction modes of each sub-block of the current block with respect to the matching information of each sub-block satisfies the fourth condition.
[0688] Optionally, when the prediction modes of the current block and each sub-block of the current block are the same, the prediction results obtained using the prediction mode of the current block or the prediction mode of the sub-blocks are the same. Therefore, the target prediction result of the current block can be determined or obtained according to the prediction mode of the current block.
[0689] Optionally, the first value corresponding to the prediction mode of the current block with respect to the matching information of the current block refers to the SAD, SATD, and / or MRSAD value between the predicted value determined or obtained by using the prediction mode of the current block for at least one reference region of the current block and the reconstructed value of at least one reference region of the current block.
[0690] Optionally, the second value corresponding to the prediction mode of each sub-block of the current block with respect to the matching information of each sub-block refers to the SAD, SATD, and / or MRSAD value between the predicted value of each sub-block determined or obtained by using the prediction mode of each sub-block for at least one reference region of each sub-block and the reconstructed value of at least one reference region of each sub-block.
[0691] Optionally, when the comparison result between the first value corresponding to the prediction mode of the current block with respect to the matching information of the current block and the second value corresponding to the prediction modes of each sub-block of the current block with respect to the matching information of each sub-block satisfies the fourth condition, it indicates that the rate-distortion cost between the prediction result determined or obtained by using the prediction mode of the current block and the prediction result determined or obtained by using the prediction modes of each sub-block is relatively close. In this case, the prediction mode of the current block can be used to perform prediction processing on the current block and / or at least one sub-block of the current block. Compared with the need to separately send a signaling to indicate the adoption of this mode for each sub-block, using the same prediction mode only requires one signaling to indicate the prediction mode of the current block, greatly saving the signaling overhead in the encoding and decoding process.
[0692] In this embodiment, if the second condition is satisfied, the target prediction result of the current block is determined or obtained according to the prediction mode of the current block. By using the same prediction mode to perform prediction processing on the current block and / or at least one sub-block of the current block, only one signaling is required to indicate the prediction mode of the current block, greatly saving the signaling overhead in the encoding and decoding process.
[0693] Mode Seven: If the second condition is not satisfied, determine or obtain the target prediction result of the current block based on the prediction mode of the current block and / or the sub-block result of the first sub-block determined or obtained through the prediction mode of the first sub-block.
[0694] Optionally, when the second condition is not satisfied, determine or obtain the target prediction result of the current block according to the prediction mode of the current block.
[0695] Optionally, when the second condition is not satisfied, determine or obtain the target prediction result of the current block according to the sub-block result of the first sub-block determined or obtained through the prediction mode of the first sub-block.
[0696] Optionally, when the second condition is not satisfied, determine or obtain the target prediction result of the current block according to the prediction mode of the current block and the sub-block result of the first sub-block determined or obtained through the prediction mode of the first sub-block.
[0697] Optionally, when the second condition is not satisfied, determine or obtain the prediction result of the current block according to the prediction mode of the current block, and determine or obtain the target prediction result of the current block according to the prediction result of the current block and the sub-block result of the first sub-block determined or obtained through the prediction mode of the first sub-block. For example, the prediction result of the current block and the sub-block result of the first sub-block can be fused to determine or obtain the target prediction result.
[0698] Optionally, the first sub-block can be a sub-block whose corresponding prediction mode is different from that of the current block.
[0699] Optionally, if the prediction mode of the current block is different from the prediction mode of the first sub-block of the current block, determine or obtain the target prediction result of the current block based on the prediction mode of the current block and / or the sub-block result of the first sub-block determined or obtained through the prediction mode of the first sub-block.
[0700] Optionally, the second condition can be at least one of the following: the prediction modes of the current block and each sub-block of the current block are the same; the comparison result between the first value corresponding to the prediction mode of the current block with respect to the matching information of the current block and the second value corresponding to the prediction modes of each sub-block of the current block with respect to the matching information of each sub-block satisfies the fourth condition.
[0701] Optionally, different parameters can be used to mark each prediction mode. During the prediction process, if the prediction modes corresponding to each sub-block included in the current block are all different from the prediction mode of the current block, the sub-block results of each sub-block can be determined or obtained according to the prediction modes corresponding to each sub-block, and the target prediction result of the current block can be determined or obtained according to the sub-block results of each sub-block.
[0702] In this embodiment, if the second condition is not satisfied, it indicates that there is a large difference between the target prediction results determined or obtained through the prediction mode of the current block and the prediction mode of the first sub-block. Therefore, in order to improve the prediction accuracy, different prediction modes can be used to obtain the final target prediction result to improve the prediction accuracy of the current block.
[0703] Optionally, determining or obtaining the target prediction result of the current block according to the prediction mode of the current block and / or the sub-block result of the first sub-block determined or obtained through the prediction mode of the first sub-block includes the following method eight and / or method nine:
[0704] Method eight: Replace the prediction result corresponding to the first sub-block in the prediction result of the current block determined or obtained by using the prediction mode of the current block with the sub-block result of the first sub-block to determine or obtain the target prediction result of the current block;
[0705] Optionally, when the second condition is not satisfied, according to the prediction mode of the current block, the prediction result of the current block is determined or obtained, and according to the prediction mode corresponding to the first sub-block, the sub-block result of the first sub-block is determined or obtained. Since the first sub-block is a part of the current block, therefore, in the current prediction result, the part corresponding to the first sub-block can be replaced with the sub-block result of the first sub-block.
[0706] Optionally, the replacement can be to replace the pixel (for example, a) in the corresponding position of the first sub-block in the prediction result of the current block with the predicted pixel (for example, a = value1) in the sub-block result.
[0707] Refer to Figure 29 , the current block is a 4×4 image block, the prediction result of the current block predicted according to the prediction mode of the current block is a 4×4 first matrix, and the first sub-block corresponds to the upper left 2×2 area in this matrix. The sub-block result of the first sub-block, that is, a 2×2 second matrix, is determined or obtained through the prediction mode of the first sub-block. Then, the values in the second matrix are directly replaced with the values in the corresponding positions in the first matrix to obtain the target prediction result.
[0708] Optionally, when the second condition is not met, it indicates that the rate-distortion cost of the prediction result of the first sub-block determined or obtained through the prediction mode of the current block is relatively large, that is, the prediction accuracy is relatively low. However, the rate-distortion cost of the prediction results of other sub-blocks determined or obtained through the prediction mode of the current block may be relatively small. Therefore, in order to improve the prediction accuracy of the local area of the current block and improve the processing efficiency, the prediction result of the current block can be determined or obtained through the prediction mode of the current block, and then the part with relatively low accuracy of the prediction result obtained by using the prediction mode of the current block (i.e., the part corresponding to the first sub-block) is replaced with the sub-block result of the first sub-block determined or obtained by using the prediction mode of the first sub-block. Through at least partial result replacement, the prediction accuracy of the current block can be improved on the basis of improving the processing efficiency.
[0709] In this embodiment, at least partial result replacement is achieved through the above method, thereby improving the prediction accuracy of the current block on the basis of ensuring the prediction processing efficiency.
[0710] Method 9: Determine or obtain the target prediction result of the current block according to the sub-block result of the first sub-block, at least one weight information, and the prediction result of the current block determined or obtained by using the prediction mode of the current block;
[0711] Optionally, in order to further improve the prediction effect of the image block, especially the prediction effect at the boundary between the sub-block and the current block, the target prediction result of the current block can be determined or obtained according to the sub-block result of the first sub-block, at least one weight information, and the prediction result of the current block determined or obtained by using the prediction mode of the current block; compared with direct replacement, the weight information can assign different weight values to the sub-block result and the prediction result of the current block, thereby comprehensively considering the prediction results of the two prediction modes, making full use of their respective advantages, and improving the prediction accuracy and robustness.
[0712] Optionally, the weight information may be the proportion information of the contribution of each result to the final target prediction result in the process of combining the prediction result of the current block and the sub-block result. For example, the weight information may be a weight coefficient, and the weight information may also be an indication information such as a weight vector and a weight matrix containing weight coefficients, which are used to measure the proportion of different elements (such as prediction values) in the result or decision.
[0713] Optionally, the weight information can reflect the reliability and / or correlation of each prediction result. The higher the reliability and / or correlation of the prediction result, the larger the value in the corresponding weight information.
[0714] Optionally, weighted processing can be performed based on the sub-block result of the first sub-block, at least one weight information, and the prediction result of the current block determined or obtained using the prediction mode of the current block. Weighting refers to multiplying by a weight, that is, multiplying by a coefficient. By weighting, the weight information is applied to adjust the importance of each prediction result, thereby determining or generating a more accurate target prediction result.
[0715] Optionally, the weight information may include at least one of: a weight coefficient, a weight vector, and a weight matrix.
[0716] Optionally, the weight coefficient can be a scalar value, which can represent the weight of a single prediction result (including the prediction result of the current block and the sub-block result). For example, if the prediction result of the current block is P1 and the sub-block result is P2, the weight coefficients corresponding to P1 and P2 are W1 and W2 respectively; then the final target prediction result P0 can be expressed as: P0 = W1×P1 + W2×P2. Optionally, the weight coefficient can be a fixed value set according to experience, such as W1 = 0.3 and W2 = 0.7, or it can be a value dynamically calculated according to a certain algorithm.
[0717] Optionally, th...
Claims
1. A processing method, characterized in that: Includes steps: S10, determining or obtaining a prediction mode of at least one sub-block of the current block according to at least one reference area of the current block.
2. The processing method according to claim 1, characterized in that: Step S10 includes at least one of the following: Determine or obtain a prediction mode of at least one sub-block according to at least one reference region and candidate prediction modes of the current block; A prediction mode of at least one sub-block is determined or obtained according to a gradient histogram corresponding to at least one sub-block determined or obtained through at least one reference area of the current block.
3. The processing method according to claim 2, characterized in that: Determining or obtaining a prediction mode of at least one sub-block according to at least one reference area and candidate prediction modes of the current block includes at least one of the following: Determine or obtain a prediction mode of at least one sub-block according to a prediction result of the current block determined or obtained through at least one reference area of the current block and a candidate prediction mode; Determine or obtain a prediction mode of at least one sub-block according to a prediction result of at least one sub-block determined or obtained through at least one reference area of the current block and a candidate prediction mode; The prediction mode of at least one sub-block is determined or obtained according to the matching information of each candidate prediction mode determined or obtained through at least one reference area of the current block and the candidate prediction mode with respect to at least one sub-block.
4. The processing method according to claim 3, characterized in that: Also includes at least one of the following: The prediction result of at least one sub-block is determined or obtained according to the prediction result of the current block determined or obtained by using the candidate prediction mode and at least one reference area of the current block; The prediction result of at least one sub-block is determined or obtained according to at least one reference region of at least one sub-block determined or obtained through the candidate prediction mode and based on at least one reference region of the current block.
5. The processing method according to any one of claims 2 to 4, characterized in that: The candidate prediction mode is determined or obtained according to at least one of the following: First mode list; Non-first mode list; Non-angular prediction mode.
6. The processing method according to any one of claims 2 to 4, characterized in that: The method of determining or obtaining the reference area includes at least one of the following: Determine or obtain at least one reference area according to at least one of an upper adjacent pixel, an upper non-adjacent pixel, a left adjacent pixel, a left non-adjacent pixel, an upper left adjacent pixel, and an upper left non-adjacent pixel of the current block; Determine or obtain at least one reference area according to at least one of a neighboring block, a non-neighboring block, a co-located block, a time domain block, and a default block corresponding to the current block; Determine or obtain at least one reference area according to at least one of the width, height, block size and block area of the current block; Determine or obtain at least one reference area according to the candidate block determined or obtained based on the candidate motion vector or the candidate block vector of the current block; If the first information of the current block satisfies the first condition, the reference area is the first reference area; If the first information of the current block does not satisfy the first condition, the reference area is the second reference area.
7. The processing method according to any one of claims 1 to 4, characterized in that: Also includes at least one of the following: If the second condition is met, determining or obtaining a target prediction result of the current block according to the prediction mode of the current block; If the second condition is not met, the target prediction result of the current block is determined or obtained according to the prediction mode of the current block and / or the sub-block result of the first sub-block determined or obtained by the prediction mode of the first sub-block.
8. The processing method according to claim 7, characterized in that: Determining or obtaining a target prediction result of the current block according to the prediction mode of the current block and / or a sub-block result of the first sub-block determined or obtained by the prediction mode of the first sub-block includes at least one of the following: Replacing the prediction result corresponding to the first sub-block in the prediction result of the current block determined or obtained using the prediction mode of the current block with the sub-block result of the first sub-block, so as to determine or obtain the target prediction result of the current block; A target prediction result of the current block is determined or obtained according to the sub-block result of the first sub-block, at least one weight information, and the prediction result of the current block determined or obtained using the prediction mode of the current block.
9. A processing device, characterized in that: 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, characterized in that: 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, coding method, decoding method and device
CN116074519A
Video encoding / decoding method and apparatus
CN117917072A
Intra-frame filtering prediction method, transformation method, video encoding and decoding method and device
CN118803273A
Cited By
Image processing method, processing equipment and storage medium
CN121357328A
Processing method, processing device and storage medium
WO2026001802A3
