Processing method, processing device and storage medium
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2026-04-02
AI Technical Summary
The prediction accuracy of image blocks in existing video coding standards is low, resulting in unsatisfactory prediction results.
The current block is processed by using a first prediction mode and a second prediction mode. The second prediction mode includes a wide-angle mode. The prediction mode is determined by statistical histogram and gradient operator. The matching is evaluated based on the reference region and gradient information of the current block.
It improves the prediction accuracy of image patches and enhances the compression efficiency and quality of video coding.
Smart Images

Figure CN2025101874_02042026_PF_FP_ABST
Abstract
Description
Processing method, processing device and storage medium TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and particularly relates to a processing method, a processing device and a storage medium. BACKGROUND
[0002] The existing video coding standard (H.266 / VVC) proposes a coding technology for video frames, for example, when coding and decoding a video frame, the protocol divides each frame into different blocks and performs prediction processing and coding and decoding processing.
[0003] In the process of conceiving and implementing the present application, the inventors have found that there are at least the following problems: the prediction accuracy of the image block is low, resulting in an unsatisfactory prediction effect of the image block.
[0004] The foregoing description is intended to provide general background information and does not necessarily constitute prior art. SUMMARY
[0005] To solve the above technical problems, the present application provides a processing method, a processing device and a storage medium, which can improve the prediction accuracy of the current block.
[0006] The present application provides a processing method, which can be applied to a processing device, comprising the steps of:
[0007] S10, performing prediction processing on the current block according to the first prediction mode.
[0008] Optionally, the processing method further comprises at least one of the following:
[0009] performing prediction processing on the current block according to the second prediction mode determined or obtained according to the first prediction mode;
[0010] The second prediction mode includes a wide-angle mode;
[0011] The first prediction mode is determined or obtained according to at least one of the following:
[0012] At least one statistical histogram corresponding to the current block is determined or obtained according to at least one reference region of the current block;
[0013] The first mode list;
[0014] At least one gradient operator;
[0015] The statistical histogram includes at least one of the following:
[0016] A gradient histogram;
[0017] An area histogram;
[0018] A number of times of using a prediction mode corresponding to the coded image block.
[0019] Optionally, the step S10 comprises at least one of:
[0020] If the first prediction mode and / or the current block satisfies the first condition, the current block is predicted according to a second prediction mode determined or obtained by the first prediction mode;
[0021] If the first prediction mode and / or the current block does not satisfy the first condition, the current block is predicted according to the first prediction mode.
[0022] Optionally, the first condition is satisfied when a size of the current block satisfies a second condition; and / or, the first condition is satisfied when a pixel position of a pixel corresponding to gradient information of the first prediction mode satisfies a third condition.
[0023] Optionally, the third condition is satisfied when at least one of:
[0024] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the first position information;
[0025] The pixel position of the pixel corresponding to the gradient information of the first prediction mode is located within a first preset range and / or a first reference region;
[0026] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to a first statistical histogram;
[0027] The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to second position information;
[0028] The pixel position of the pixel corresponding to the gradient information of the first prediction mode is located outside a second preset range and / or a second reference region;
[0029] The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to a second statistical histogram.
[0030] Optionally, the statistical histogram is determined or obtained according to at least one of:
[0031] Gradient information of at least one reference region of the current block;
[0032] Area information of at least one reference region of the current block;
[0033] At least one gradient operator corresponding to at least one lookup table;
[0034] Weight information corresponding to at least one pair of gradient operators;
[0035] Weight information corresponding to gradient information of at least one reference region of the current block;
[0036] at least one reference region of the current block and at least one lookup table.
[0037] Optionally, the at least one gradient operator comprises at least one pair of mutually perpendicular gradient operators, and / or the gradient information comprises at least one of:
[0038] gradient information of pixels in the reference region;
[0039] overall gradient information of the reference region;
[0040] The gradient information, the gradient information of pixels in the reference region and / or the overall gradient information of the reference region comprises gradient magnitude and / or gradient direction.
[0041] Optionally, the at least one reference region is determined or obtained according to at least one of:
[0042] at least one of top neighboring pixels, top non-neighboring pixels, left neighboring pixels, left non-neighboring pixels, top-left neighboring pixels and top-left non-neighboring pixels of the current block;
[0043] at least one of a neighbor block, a non-neighbor block, a collocated block, a temporal block and a default block corresponding to the current block;
[0044] at least one of width, height, block size and block area of the current block;
[0045] a candidate block determined or obtained by a candidate motion vector or a candidate block vector of the current block.
[0046] The application further provides a processing device, comprising a memory and a processor, wherein the memory stores a processing program, and the processing program is executed by the processor to implement the steps of any one of the processing methods.
[0047] The application further provides a storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of any one of the processing methods.
[0048] As described above, the processing method of the application can be applied to a processing device, comprising: performing prediction processing on a current block according to a first prediction mode. Through the technical solution of the application, the prediction accuracy of the current block can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0049] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application. In order to clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced as follows. Obviously, the drawings can also provide other drawings based on these drawings without any creative effort.
[0050] Fig. 1 is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of the present application;
[0051] Fig. 2 is a schematic diagram of a communication network system architecture provided by an embodiment of the present application;
[0052] Fig. 3 is a schematic diagram of the hardware structure of a controller 140 provided by the present application;
[0053] Fig. 4 is a schematic diagram of the hardware structure of a network node 150 provided by the present application;
[0054] Fig. 5 is a schematic diagram of a processing method according to a first embodiment;
[0055] Fig. 6 is a schematic diagram of an intra prediction direction according to the first embodiment;
[0056] Fig. 7 is a schematic diagram of the encoding process of an encoder in an image processing method according to the first embodiment;
[0057] Fig. 8 is a schematic diagram of the decoding process of a decoder in an image processing method according to the first embodiment;
[0058] Fig. 9 is a schematic diagram of a reference region corresponding to a block to be predicted in an image processing method according to a second embodiment;
[0059] Fig. 10 is a schematic diagram of a reference region of a DIMD mode in a processing method according to a third embodiment;
[0060] Fig. 11 is a schematic diagram of a gradient amplitude in a processing method according to the third embodiment;
[0061] Fig. 12 is a schematic diagram of a coded region corresponding to a block to be predicted in a processing method according to the third embodiment;
[0062] Fig. 13 is a schematic diagram of a decoded region corresponding to a block to be predicted in a processing method according to the third embodiment;
[0063] Fig. 14 is a schematic diagram of a reference region of a neural network model in a processing method according to a fifth embodiment;
[0064] Fig. 15 is a schematic diagram of the structure of a neural network model based on a full connection layer according to the fifth embodiment;
[0065] Fig. 16 is a structural schematic diagram of a neural network model based on convolutional layers according to a fifth embodiment;
[0066] Fig. 17 is a structural schematic diagram of a neural network model based on mixed convolutional and fully connected layers according to a fifth embodiment;
[0067] Fig. 18 is a schematic diagram of a processing module of a processing device.
[0068] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. The above-described drawings have shown the specific embodiments of the present application, and the following detailed description will be more detailed. These drawings and the detailed description are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0069] The exemplary embodiments will be described in detail herein with reference to the accompanying drawings. The following description is presented with reference to the accompanying drawings, in which the same numbers represent the same or similar elements throughout the several drawings. The implementations described in this exemplary embodiment section do not represent all implementations consistent with the present application. Instead, they are merely examples consistent with some aspects of the present application as detailed in the appended claims.
[0070] It should be noted that, in this document, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element. In addition, components, features, elements with the same name in different embodiments of the present application can have the same meaning or different meanings, and the specific meaning thereof should be determined in the light of its explanation in the specific embodiment or further in the light of the context in the specific embodiment.
[0071] It should be understood that, although terms, first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a particular order or hierarchy among the information, but to distinguish one piece of information from another. Thus, a first information can be termed a second information, and similarly, a second information can be termed a first information without departing from the scope of the present disclosure. As used herein, the term "if' can be construed to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Also, as used herein, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes," "including," or "has," "having," and the like, when used herein, specify the presence of stated features, steps, operations, elements, components, items, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, items, and / or groups thereof. The term "or," "and / or," "and / or including at least one of," and the like as used herein can be construed in the inclusive sense, and / or it can be construed in the exclusive sense, i.e., it can be construed to mean "one or the other, but not both," depending on the context. Only terms clearly indicated to the contrary, such as "only one of or "exactly one of," carry the exclusive sense.
[0072] It should be understood that, although various steps in the flowcharts of the present embodiments are shown in a particular order, the steps are not necessarily performed in that order. Unless explicitly stated, the steps can be performed in any order, and the steps can be performed in parallel. Also, at least some of the steps shown in the flowcharts can include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, and which can be performed in any order.
[0073] As used herein, the term "if' can be construed to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if determined" or "if detecting (a stated condition or event)" can be construed to mean "when determined" or "in response to determining" or "when detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)," depending on the context.
[0074] It is noted that, in the present document, step codes such as S10 are used for the purpose of more clearly and concisely describing the corresponding content, and do not constitute substantial limitations in order.
[0075] It should be understood that the specific embodiments described herein merely exemplify the application and should not be used to limit the application.
[0076] In the following description, the suffixes used for elements, such as "module", "part", or "unit", are merely intended for facile and convenient description, and are not used to limit the actually meaning of the application. Therefore, "module", "part", or "unit" can be mixedly used.
[0077] The processing device can be implemented in various forms, for example, the processing device described in the present application can include a processing device such as a mobile phone, a server, a tablet computer, a notebook computer, a palmtop computer, a personal digital assistant (PDA), a portable media player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and a fixed terminal such as a digital TV, a desktop computer.
[0078] In the following description, a mobile terminal will be exemplified, and those skilled in the art will understand that the configuration according to the embodiments of the present application can be applied to a fixed type terminal, except for elements particularly used for mobile purposes.
[0079] Referring to FIG. 1, a hardware structure of a mobile terminal according to an embodiment of the present application is illustrated. The mobile terminal 100 can include a RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (audio / video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that the structure of the mobile terminal illustrated in FIG. 1 does not limit the mobile terminal, and the mobile terminal can include more or less or different components, or combine certain components, or arrange the components differently.
[0080] The components of the mobile terminal will be described in detail with reference to FIG. 1.
[0081] The radio frequency unit 101 can be used for receiving and transmitting signals in the process of transmitting or receiving information or a call. Specifically, the radio frequency unit 101 receives downlink information from a base station and provides the received information to the processor 110 for processing, and / or transmits uplink data 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 a network and other devices through wireless communications. The wireless communications can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution), 5G, and 6G, etc.
[0082] WiFi is a short-range wireless transmission technology. The WiFi module 102 can help the user to send and receive e-mails, browse web pages, and access streaming media, etc. It provides the user with wireless broadband Internet access. Although the WiFi module 102 is shown in FIG. 1, it is understood that it is not a necessary component of the mobile terminal, and can be omitted without changing the essence of the application.
[0083] The audio output unit 103 can convert audio data, which is received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109, into an audio signal and output the audio signal 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. In addition, the audio output unit 103 can provide audio output related to a particular function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 can include a speaker, a buzzer, etc.
[0084] The A / V input unit 104 is configured to receive audio or video signals. The A / V input unit 104 can include a graphics processor (GPU) 1041 and a microphone 1042. The graphics processor 1041 processes image data of a still picture or a video obtained by an image capture device (e.g., a camera) in a video capture mode or an image capture mode. Processed image frames can be displayed on the display unit 106. Processed image frames can be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, or the like, and can process such sound into audio data. Processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in the case of the telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the process of receiving and transmitting audio signals.
[0085] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. The light sensor includes an ambient light sensor and a proximity sensor, which can optionally adjust the brightness of the display panel 1061 according to the brightness of ambient light, and turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and detect the magnitude and direction of gravity when at rest, which can be used for applications that recognize the posture of the mobile terminal (such as switching between landscape and portrait screens, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, tapping), and the like. The mobile terminal can also be configured with a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and other sensors, which will not be described here.
[0086] The display unit 106 is configured to display information input by a user or information provided to the user. The display unit 106 can include a display panel 1061, which can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0087] The user input unit 107 can be used to receive input numerals or character information, and to generate key signal inputs related to user settings of the mobile terminal and control of functions. Optionally, the user input unit 107 can include a touch panel 1071 and other input devices 1072. The touch panel 1071, also called a touch screen, can collect touch operations of a user on or proximity thereto (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or in proximity to the touch panel 1071), and drive corresponding connection devices according to a pre-set program. The touch panel 1071 can include two parts, a touch detecting device and a touch controller. The touch detecting device detects the user's touch position and detects signals resulting from touch operations, and transmits the signals to the touch controller; the touch controller receives touch information from the touch detecting device, and converts it into touch coordinates, and sends it to the processor 110, and can receive commands from the processor 110 and execute them. In addition, the touch panel 1071 can be implemented in various types such as a resistive type, a capacitive type, an infrared type, and a surface acoustic wave type. 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 one or more of, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a trackball, a mouse, a joystick, etc.
[0088] Optionally, the touch panel 1071 can cover the display panel 1061, and when the touch panel 1071 detects a touch operation on or in proximity thereto, it transmits to the processor 110 to determine the type of touch event, and then the processor 110 provides corresponding visual output on the display panel 1061 according to the type of touch event. Although in FIG. 1, the touch panel 1071 and the display panel 1061 are implemented as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal, without being limited specifically herein.
[0089] The interface unit 108 serves as an interface through which at least one external device can be connected with 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 having an identification module, an audio input / output (I / O) port, a video I / O port, an earphone port, etc. The interface unit 108 can be used to receive input (e.g., data information, power, etc.) from an external device, and to transmit the received input to one or more elements within the mobile terminal 100, or can be used to transmit data between the mobile terminal 100 and the external device.
[0090] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area, and the program storage area can store an operating system, application programs required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; and the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), and the like. In addition, the memory 109 can include a high-speed random access memory, and can also include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.
[0091] The processor 110 is a control center of the mobile terminal, connects all parts of the mobile terminal through various interfaces and lines, executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the memory 109 and calling data stored in the memory 109, and thus performs overall monitoring on the mobile terminal. The processor 110 can include one or more processing units; preferably, the processor 110 can integrate an application processor and a modem processor, and the application processor can mainly process an operating system, a user interface, and application programs, and the like, and the modem processor can mainly process wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 110.
[0092] The mobile terminal 100 can also include a power supply 111 (such as a battery) for supplying power to various components; preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system.
[0093] Although not shown in FIG. 1, the mobile terminal 100 can also include a Bluetooth module, and the like, which will not be described here.
[0094] In order to facilitate understanding of the embodiments of the present application, the communication network system based on the mobile terminal of the present application is described below.
[0095] Referring to FIG. 2, FIG. 2 is a communication network system architecture diagram provided by an embodiment of the present application, and the communication network system is an LTE system of a general mobile communication technology, which includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an operator's IP service 204 which are sequentially connected in communication.
[0096] Optionally, the UE 201 can be the terminal 100 described above, which will not be repeated here.
[0097] The E-UTRAN 202 includes eNode Bs 2021 and other eNode Bs 2022. Optionally, the eNode B 2021 can be connected to the other eNode B 2022 through backhaul (for example, an X2 interface), the eNode B 2021 is connected to the EPC 203, and the eNode B 2021 can provide access for the UE 201 to the EPC 203.
[0098] The EPC 203 can include a MME (Mobility Management Entity) 2031, a HSS (Home Subscriber Server) 2032, other MMEs 2033, a SGW (Serving Gate Way) 2034, a PGW (PDN Gate Way) 2035, and a PCRF (Policy and Charging Rules Function) 2036. Optionally, the MME 2031 is a control node that processes 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 to save some user-specific information about service features, data rates, etc. All user data can be transmitted through the SGW 2034, the PGW 2035 can provide IP address allocation and other functions for the UE 201, and the PCRF 2036 is a policy and charging control policy decision point for service data flow and IP bearer resources, which selects and provides available policy and charging control decisions for policy and charging enforcement function elements (not shown in the figure).
[0099] The IP service 204 can include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services.
[0100] Although the above describes the LTE system as an example, those skilled in the art should know that the present application is not only applicable to the LTE system, but also applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, 5G, and future new network systems (such as 6G), etc., which are not limited here.
[0101] Figure 3 is a schematic diagram of a hardware structure of a controller 140 according to an embodiment of the present application. The controller 140 comprises a memory 1401 and a processor 1402. The memory 1401 is configured to store program instructions. The processor 1402 is configured to invoke the program instructions stored in the memory 1401 to perform the steps executed by the controller in the method embodiment one. The implementation principle and the beneficial effects are similar, and will not be repeated here.
[0102] Optionally, the controller further comprises a communication interface 1403. The communication interface 1403 can be connected with the processor 1402 through the bus 1404. The processor 1402 can control the communication interface 1403 to realize the receiving and sending functions of the controller 140.
[0103] Figure 4 is a schematic diagram of a hardware structure of a network node 150 according to an embodiment of the present application. The network node 150 comprises a memory 1501 and a processor 1502. The memory 1501 is configured to store program instructions. The processor 1502 is configured to invoke the program instructions stored in the memory 1501 to perform the steps executed by the first node in the method embodiment one. The implementation principle and the beneficial effects are similar, and will not be repeated here.
[0104] Optionally, the controller further comprises a communication interface 1503. The communication interface 1503 can be connected with the processor 1502 through the bus 1504. The processor 1502 can control the communication interface 1503 to realize the receiving and sending functions of the network node 150.
[0105] The integrated modules implemented in the form of software function modules can be stored in a computer readable storage medium. The software function modules are stored in a storage medium, and include a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute part of the steps of the method embodiments of the present application.
[0106] In the above embodiments, all or part can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a storage medium or transferred from one storage medium to another, for example, the computer instructions can be transferred from one website site, computer, server or data center to another website site, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The storage medium can be any available medium that the computer can access or a data storage device such as a server, data center, etc. containing one or more available media sets. The available media can be magnetic media (for example, floppy disk, hard disk, magnetic tape), optical media (for example, DVD), or semiconductor media (for example, solid state disk (SSD)) and the like.
[0107] First embodiment
[0108] Referring to FIG. 5, FIG. 5 is a flowchart of a processing method according to the first embodiment, and the processing method of the embodiments of the present application can be applied to a processing device, including:
[0109] In step S10, the current block is predicted according to the first prediction mode.
[0110] In the present embodiment, the processing device can be a smart terminal such as a mobile phone, a computer, etc., or a server such as a local server or a cloud server. In the present embodiment and the present application, the processing device is mainly illustrated as a smart terminal.
[0111] Optionally, the technical solutions of the present embodiment can be applied to the fields of image coding, video coding, hardware video coding, special circuit video coding, real-time video coding, etc.
[0112] Optionally, the processing device can obtain video image data from a video source, segment each frame of image in the video image data to obtain at least one image block, and determine an image block to be predicted in the at least one image block as the current block.
[0113] Optionally, the first prediction mode is a mode for predicting the current block, and the current block is predicted according to the first prediction mode to determine or obtain a prediction result of the current block.
[0114] Optionally, the current block is predicted according to the first prediction mode and at least one reference region of the current block.
[0115] Optionally, the reference region comprises at least one of a reference pixel, a reference block and a reference template.
[0116] Optionally, the at least one reference region of the current block is determined or obtained according to a size of the current block.
[0117] Optionally, the first prediction mode can be at least one of an angular prediction mode (e.g., a non-wide angle mode), a non-angular prediction mode, a wide angle mode and a derivation mode.
[0118] Optionally, the angular prediction mode (e.g., the non-wide angle mode) is a technique for predicting a current pixel block by propagating the values of neighboring pixels along a specific direction to generate a prediction block, which is mainly used to handle directional textures in images, can effectively reduce spatial redundancy and improve compression efficiency, in the H.265 / HEVC (High Efficiency Video Coding) standard, there are 33 angular prediction modes in the intra prediction mode, which cover different angles from horizontal to vertical, ensuring accurate prediction of various texture directions, in the H.266 / VVC (Versatile Video Coding) standard, the angular mode is expanded to 65, and new directions are more intensive to more accurately capture the edges in natural video.
[0119] Optionally, the non-angular prediction mode can be a prediction mode other than the angular prediction mode, for example, the non-angular prediction mode comprises at least one of the following: a DC mode (direct current mode), a Planar mode (plane mode), a neural network-based prediction mode.
[0120] Optionally, the derivation mode is a mode for determining or obtaining a prediction mode, the derivation mode is a method for deriving a prediction mode matched by the current block by analyzing the related information of the current block, for example, the derivation mode comprises at least one of the following: a decoder side intra mode derivation (DIMD) mode, an occurrence-based intra coding mode derivation (OBIC) mode and a template-based intra mode derivation (TIMD) mode.
[0121] Optionally, the wide-angle mode is an extension technique of intra prediction in a video coding standard, aiming to improve compression efficiency by increasing the number of prediction directions and the range of angles to more accurately match the complex texture directions in the image. In the traditional intra prediction (such as H.265 / HEVC), for example, in the case of horizontal left as 0° direction, 135°-225° is covered in a counterclockwise direction, and the wide-angle mode further extends the range of directions, as shown in FIG. 6, which describes 93 intra prediction directions, wherein the dashed direction corresponds to the wide-angle mode applicable to non-square blocks.
[0122] Optionally, the step S10 comprises: performing prediction processing on the current block according to the second prediction mode determined or obtained according to the first prediction mode.
[0123] In the embodiment, the second prediction mode is further determined or obtained based on the first prediction mode and is used for the prediction processing of the current block, so as to realize the accuracy improvement of the prediction mode and further support the improvement of the prediction accuracy of the current block.
[0124] Optionally, the first prediction mode comprises at least one prediction mode, and the second prediction mode comprises at least one prediction mode.
[0125] Optionally, the second prediction mode comprises a wide-angle mode and / or a non-wide-angle mode, and the first prediction mode comprises at least one of a non-wide-angle mode, a non-angle prediction mode and a derivation mode.
[0126] Optionally, the prediction directions of the first prediction mode and the second prediction mode are opposite.
[0127] Optionally, the non-wide-angle mode comprises an angle prediction mode covering a first angle range in a counterclockwise direction.
[0128] Optionally, the wide-angle mode comprises an angle prediction mode opposite to the direction of the non-wide-angle mode, and the wide-angle mode comprises an angle prediction mode covering a second angle range in a counterclockwise direction. Optionally, the first angle range and the second angle range are different.
[0129] Optionally, the first angle range and the second angle range are adjacent in the counterclockwise direction or the counterclockwise direction.
[0130] Optionally, the derivation mode is a derivation mode for deriving an intra prediction mode.
[0131] Optionally, the first prediction mode is the derivation mode, the second prediction mode is determined or obtained according to at least one candidate mode determined or obtained according to the derivation mode, and the current block is predicted according to the second prediction mode.
[0132] Optionally, the second prediction mode is determined or derived according to the at least one candidate mode determined or derived by the deriving mode, and the predicting the current block according to the second prediction mode comprises: if the gradient information of the at least one candidate mode satisfies the first condition, predicting the current block according to the second prediction mode determined or derived according to the at least one candidate mode.
[0133] Optionally, if the gradient information of the first prediction mode satisfies the first condition, the current block is predicted according to the second prediction mode determined or derived according to the first prediction mode; and / or, if the gradient information of the first prediction mode does not satisfy the first condition, the current block is predicted according to the first prediction mode.
[0134] Optionally, if the gradient information of the first prediction mode satisfies the first condition, the current block is predicted according to the second prediction mode determined or derived according to the first prediction mode; and / or, if the gradient information of the first prediction mode does not satisfy the first condition, the current block is predicted according to the second prediction mode determined or derived according to the first prediction mode.
[0135] Optionally, if the gradient information of the first prediction mode satisfies the first condition, the current block is predicted according to the second prediction mode; and / or, if the gradient information of the first prediction mode does not satisfy the first condition, the current block is predicted according to the first prediction mode, and the prediction direction of the second prediction mode is opposite to that of the first prediction mode.
[0136] Optionally, if the gradient information of the first prediction mode satisfies the first condition, the current block is predicted according to the second prediction mode; and / or, if the gradient information of the first prediction mode does not satisfy the first condition, the current block is predicted according to the second prediction mode, and the prediction direction of the second prediction mode is opposite to that of the first prediction mode.
[0137] Optionally, the first condition is satisfied when the pixel position of the pixel corresponding to the gradient information of the first prediction mode satisfies a third condition.
[0138] Optionally, the first condition is satisfied when the pixel position of the pixel corresponding to the gradient information of the first prediction mode satisfies a third condition.
[0139] Optionally, the second prediction mode determined or derived according to the first prediction mode comprises: determining or deriving the mode index and / or mode number of the second prediction mode according to the mode index and / or mode number of the first prediction mode.
[0140] Optionally, the first prediction mode comprises a derivation mode, the second prediction mode is determined or derived according to at least one candidate mode determined or derived by the derivation mode and matching information of the candidate mode related to the current block, and the current block is predicted according to the second prediction mode.
[0141] Optionally, the matching information refers to information used for evaluating matching degrees between different prediction modes and the current block and at least one reference region corresponding to the current block, and the matching information can indicate the matching degrees between different prediction modes and the reference region based on various indexes such as rate-distortion cost of a prediction result, prediction error, texture similarity, etc.
[0142] Optionally, the matching information of the candidate mode / prediction mode related to the current block can be matching information of the candidate mode / prediction mode related to at least one reference region of the current block.
[0143] Optionally, the reference region used for determining or deriving the matching information of the at least one prediction mode is the same as or different from the reference region used for determining or deriving the at least one prediction mode of the current block.
[0144] Optionally, the matching information comprises SAD (Sum of Absolute Differences), SATD (Sum of Absolute Transformed Differences) and / or MRSAD (Mean-Removed Sum of Absolute Differences).
[0145] Optionally, the smaller the SAD value, the SATD value and / or the MRSAD value, the higher the matching degree; and / or the larger the SAD value, the SATD value and / or the MRSAD value, the lower the matching degree.
[0146] Optionally, the matching information comprises a gradient amplitude value or a sum of gradient amplitude values corresponding to the prediction mode of a gradient histogram, and optionally, the larger the gradient amplitude value, the higher the matching degree; and / or the smaller the gradient amplitude, the lower the matching degree.
[0147] Optionally, the matching information comprises confidence information, and optionally, the larger the confidence, the higher the matching degree; and / or the smaller the confidence, the lower the matching degree.
[0148] Optionally, the first prediction mode comprises a derivation mode, at least one candidate mode is determined or derived according to the derivation mode, a target candidate mode is determined or derived from the at least one candidate mode according to matching information related to the current block and the at least one candidate mode, the second prediction mode is determined or derived according to the target candidate mode, for example, the target candidate mode is a non-wide-angle mode, the non-wide-angle mode is switched to a wide-angle mode corresponding to the non-wide-angle mode as the second prediction mode, and the current block is predicted according to the second prediction mode.
[0149] Optionally, the first prediction mode comprises a derivation mode, at least one candidate mode is determined or derived according to the derivation mode and pixels in a first reference region of the current block, a target candidate mode is determined or derived from the at least one candidate mode according to matching information related to a second reference region of the current block and the at least one candidate mode, and the current block is predicted according to the second prediction mode determined or derived by the target candidate mode.
[0150] Optionally, the first reference region and the second reference region are the same or different.
[0151] Optionally, the matching information is matching information between predicted pixel values of the second reference region with respect to the at least one candidate mode and reconstructed pixel values corresponding to a prediction mode adopted by the second reference region.
[0152] Optionally, the reconstructed pixel values corresponding to the prediction mode adopted by the second reference region are reconstructed pixel values of reconstructed pixels obtained in an encoding or decoding process of the second reference region itself.
[0153] Optionally, the first prediction mode comprises a derivation mode, first matching information related to the current block and at least one prediction mode is determined or derived according to the derivation mode, at least one candidate mode is determined or derived according to the first matching information, second matching information related to a second reference region of the current block and the at least one candidate mode is determined according to the at least one candidate mode, a target candidate mode is determined or derived from the at least one candidate mode according to the first matching information and / or the second matching information, and the current block is predicted according to the second prediction mode determined or derived by the target candidate mode.
[0154] Optionally, a first mode list is determined or derived according to first matching information related to the current block and a prediction mode, the first prediction mode is determined or derived according to corresponding first matching information and / or corresponding second matching information of candidate modes in the first mode list, and the current block is predicted according to the second prediction mode determined or derived by the first prediction mode.
[0155] Optionally, the first matching information and / or the second matching information comprises at least one of a gradient magnitude value or a sum of corresponding gradient magnitude values of the gradient histogram corresponding to the prediction mode, confidence information, SAD, SATD and / or MRSAD, and the first matching information and the second matching information are different.
[0156] Optionally, the first matching information is a gradient magnitude value or a sum of corresponding gradient magnitude values of the gradient histogram corresponding to the prediction mode, and the second matching information is at least one of SAD, SATD and / or MRSAD.
[0157] Optionally, the first matching information is confidence information, and the second matching information is at least one of SAD, SATD and / or MRSAD.
[0158] Optionally, the manner of determining or obtaining the first prediction mode according to the corresponding first matching information and / or the corresponding second matching information of the candidate modes in the first mode list comprises: determining or obtaining the first prediction mode according to a sorting result and / or a comparison result about the first matching information and / or the second matching information.
[0159] Optionally, the manner of determining or obtaining the first mode list of the current block according to the first matching information of the prediction modes related to the current block comprises: determining whether to take the prediction mode corresponding to the first matching information as a candidate mode in the first mode list of the current block according to a sorting result and / or a comparison result about the first matching information.
[0160] Optionally, the manner of determining or obtaining the first prediction mode and / or the target candidate mode according to the first matching information comprises: determining whether to take the prediction mode corresponding to the first matching information as the first prediction mode and / or the target candidate mode according to a sorting result and / or a comparison result about the first matching information.
[0161] Optionally, the sorting result comprises: sorting the at least one prediction mode according to the size of the first matching information or the second matching information of the at least one prediction mode, and determining or obtaining the sorting information about the at least one prediction mode, for example, if the matching degree corresponding to the first matching information or the second matching information of the second prediction mode is higher than the matching degree corresponding to the first matching information or the second matching information of the first prediction mode, the first matching information or the second matching information of the prediction mode is sorted in descending order, and then in the sorted mode list, the second prediction mode is located before the first prediction mode; and / or, if the matching degree corresponding to the first matching information or the second matching information of the second prediction mode is higher than the matching degree corresponding to the first matching information or the second matching information of the first prediction mode, the first matching information or the second matching information of the prediction mode is sorted in ascending order, and then in the sorted mode list, the second prediction mode is located after the first prediction mode.
[0162] Optionally, the comparison result comprises: determining N prediction modes with the maximum or minimum value of the first matching information or the second matching information according to the numerical value of the first matching information or the second matching information of each prediction mode of the current block.
[0163] Optionally, the at least one candidate mode is determined or obtained according to the first prediction mode (for example, the first prediction mode is a derived mode), the target candidate mode is determined or obtained according to the matching information related to the current block of the at least one candidate mode, and the second prediction mode is determined or obtained according to the target candidate mode.
[0164] In the embodiment, compared with determining the prediction mode / candidate mode only by the derived mode (for example, DIMD mode, OBIC mode, TIMD mode, etc.), the embodiment of the application first determines at least one potential effective candidate mode by the derived mode, and then directly verifies the actual performance of the mode by the matching information related to the current block of the candidate mode, so as to perform secondary screening, determine or obtain the target candidate mode, and then make the second prediction mode determined or obtained according to the target candidate mode have higher accuracy.
[0165] Optionally, the at least one candidate mode is determined or obtained according to the first prediction mode (for example, the first prediction mode is a derived mode), the second prediction mode and the weight information corresponding to the second prediction mode are determined or obtained according to the at least one candidate mode and the matching information related to the current block of the at least one candidate mode, and the target prediction result of the current block is determined or obtained according to the second prediction mode and the weight information corresponding to the second prediction mode.
[0166] Optionally, the second prediction mode comprises at least one prediction mode, and the weight information corresponding to the second prediction mode comprises weight information corresponding to the at least one prediction mode comprised in the second prediction mode.
[0167] Optionally, the current block is predicted according to the at least one prediction mode comprised in the second prediction mode, at least one prediction result of the current block is determined or obtained, and the target prediction result of the current block is determined or obtained by fusing the at least one prediction result of the current block according to the weight information corresponding to the second prediction mode.
[0168] Optionally, the weight information can be proportion information of the at least one prediction mode to the target prediction result, for example, the weight information can be a weight coefficient, and optionally, the weight information can also be a weight vector and a weight matrix containing a weight coefficient, and the like, which is indicative information for measuring the proportion of different elements (for example, prediction values) in a result or a decision.
[0169] Optionally, the confidence of the at least one prediction mode and the weight information corresponding thereto are in a positive proportional relationship and / or a positive correlation.
[0170] Optionally, the weight information can comprise at least one of a weight coefficient, a weight vector and a weight matrix.
[0171] Optionally, the weight information corresponding to the second prediction mode is determined or obtained according to matching information related to the at least one candidate mode and the current block.
[0172] Optionally, the weight information corresponding to the second prediction mode and the matching information related to the at least one candidate mode and the current block are in a positive proportional relationship and / or a positive correlation, that is, the higher the matching degree, the greater the weight value corresponding to the weight information.
[0173] Optionally, the first prediction mode is a derivation mode, the candidate mode determined or obtained according to the first prediction mode comprises a candidate mode 1 and a candidate mode 2, the second prediction mode determined or obtained according to the candidate mode comprises a prediction mode 1 and a prediction mode 2, the weight information corresponding to the second prediction mode comprises weight information 1 corresponding to the prediction mode 1 determined or obtained according to matching information related to the candidate mode 1 and the current block, and weight information 2 corresponding to the prediction mode 2 determined or obtained according to matching information related to the candidate mode 2 and the current block, the prediction processing of the current block according to the second prediction mode to determine or obtain a prediction result comprises result 1 and result 2, and the target prediction result of the current block is determined or obtained according to the result 1, the result 2, the weight information 1 and the weight information 2.
[0174] Optionally, the first prediction mode is a derivation mode, the candidate modes determined or obtained according to the first prediction mode include: a candidate mode 1, a candidate mode 2 and a candidate mode 3, the target candidate mode is determined according to the matching information of the candidate mode 1, the candidate mode 2 and the candidate mode 3 respectively related to the current block, and the target candidate mode includes: the candidate mode 1 and the candidate mode 2, the second prediction mode determined or obtained according to the target candidate mode includes: a prediction mode 1 and a prediction mode 2, the weight information corresponding to the second prediction mode includes: weight information 1 corresponding to the prediction mode 1 determined or obtained according to the matching information of the candidate mode 1 related to the current block, and weight information 2 corresponding to the prediction mode 2 determined or obtained according to the matching information of the candidate mode 2 related to the current block, the prediction processing is performed on the current block according to the second prediction mode, and the prediction result is determined or obtained, including: a result 1 and a result 2, and the target prediction result of the current block is determined or obtained according to the result 1, the result 2, the weight information 1 and the weight information 2.
[0175] Optionally, the target prediction result of the current block is determined or obtained by weighted fusion of at least one prediction result of the current block, and the weighted fusion refers to assigning different weight information to at least one prediction result according to the confidence of the at least one prediction result and / or the confidence of at least one prediction mode corresponding to the at least one prediction result, and fusing based on the weight information, for example, a prediction result and / or a prediction mode corresponding thereto has higher confidence, and the prediction result can be given higher weight information; and / or a prediction result and / or a prediction mode corresponding thereto has lower confidence, and the prediction result is given lower weight information.
[0176] Optionally, the at least one prediction result is fused by the weight information, so as to combine the advantages of different prediction modes and improve the prediction accuracy.
[0177] In the embodiment, at least one potential effective candidate mode is determined by the derivation mode, and then the actual performance of the mode is directly verified by the matching information of the candidate mode related to the current block, and the mode fusion is realized, so as to improve the prediction accuracy of the current block.
[0178] Optionally, the candidate modes determined or obtained according to the first prediction mode include modes belonging to a first number of prediction modes and / or modes belonging to a second number of prediction modes, and the first number and the second number are the same or different, for example, the candidate modes include prediction modes in 67 prediction modes and / or prediction modes in 131 prediction modes.
[0179] Optionally, the first number is 35, 67 or 131, for example, the first number is 131.
[0180] Optionally, the first number is greater than 35, 67 or 131.
[0181] Optionally, the second number is 35, 67 or 131, for example, the second number is 67.
[0182] Optionally, the second number is less than or equal to 35, 67 or 131.
[0183] Optionally, the first number and the second number are the same, for example, the number of modes in the first number of prediction modes and the number of modes in the second number of prediction modes are the same, but the types of the respective prediction modes are at least partially different.
[0184] Optionally, the first number and the second number are different.
[0185] Optionally, the first number is greater than the second number, and by increasing the number of prediction modes (for example, angular prediction modes), the candidate modes are more fitted to the actual edge direction of the current block, and the prediction accuracy for the current block is improved.
[0186] Optionally, the second prediction mode is determined or obtained according to a first prediction mode determined or obtained according to the size of the current block, and the first prediction mode includes at least one derived mode.
[0187] Optionally, the first prediction mode includes at least one derived mode, at least one candidate mode is determined or obtained according to the prediction mode corresponding to the at least one derived mode, and the second prediction mode is determined or obtained according to the at least one candidate mode.
[0188] Optionally, in the intra prediction and / or inter prediction process, the same derived mode is used for image blocks of different sizes, resulting in that the prediction effect of the candidate mode / prediction mode based on the derived mode is not ideal for image blocks of some sizes, and thus the encoding and / or decoding quality in the video encoding and / or decoding process is poor, and by the technical solution of the present application, a suitable derived mode can be matched for a current block of different sizes, and then a suitable candidate mode and / or second prediction mode can be further matched for the current block based on the derived mode, and thus the prediction accuracy of the current block can be improved.
[0189] Optionally, a first prediction mode is determined or obtained according to the size of the current block, and the first prediction mode includes at least one derived mode.
[0190] Optionally, if the size of the current block satisfies a condition A, the first prediction mode is a first derived mode, at least one candidate mode is determined or obtained according to the first derived mode, and the second prediction mode is determined or obtained according to the at least one candidate mode.
[0191] Optionally, the size of the current block includes at least one of the width, height, ratio, depth, area, resolution and number of pixels of the current block.
[0192] Optionally, the condition A can be a condition set in advance, and optionally, the condition A is not fixed and can be adaptively adjusted according to different scenes.
[0193] Optionally, the condition A can be set according to a value of the quantization parameter or the quantization information.
[0194] Optionally, when the quantization parameter is a first quantization parameter (for example, the value of the quantization parameter is 37), the condition A is that the width x height of the current block is greater than a first threshold, and the first threshold can be 1024, 512, etc. For example, the first condition is that the width x height of the current block > 1024, or the first condition is that the width x height of the current block > 512.
[0195] Optionally, when the quantization parameter is a second quantization parameter (for example, the value of the quantization parameter is 22), the first condition is that the width x height of the current block is greater than a second threshold, and the second threshold can be 1024, 512, etc. For example, the first condition is that the width x height of the current block > 1024, or the first condition is that the width x height of the current block > 512.
[0196] Optionally, the first quantization parameter and the second quantization parameter are different, and the first threshold and the second threshold are different.
[0197] Optionally, the size of the current block satisfies the condition A, including at least one of the following:
[0198] The value of the size of the current block is a first numerical value;
[0199] The value of the size of the current block is in a first numerical value interval;
[0200] The value of the size of the current block is greater than or equal to a first threshold.
[0201] Optionally, the first numerical value can be a size of an image block set in advance, for example, a numerical value of at least one of the width, the height, the block size, and the block area.
[0202] Optionally, the first numerical value can be a numerical value of the width and / or height of the image block, for example, the first numerical value can be 32, 64, 128, 256, etc.
[0203] Optionally, the first numerical value can be a numerical value of the block area of the image block, for example, the first numerical value can be 256, 512, 1024, etc.
[0204] Optionally, the first numerical value interval can be a size of an image block set in advance, for example, a numerical value interval of at least one of the width, the height, the block size, and the block area.
[0205] Optionally, the first numerical value interval can be a numerical value interval of the width and / or height of the image block, for example, the first numerical value interval is [32, 256].
[0206] Optionally, the first numerical interval can be a numerical interval of a block area of the image block, for example, the first numerical interval is [256, 1024].
[0207] Optionally, the first threshold value can be a size of the image block set in advance, for example, a threshold value of at least one of width, height, block size and block area.
[0208] Optionally, the first threshold value can be a threshold value of width and / or height of the image block, for example, the first threshold value can be 32, 64, 128, 256, etc.
[0209] Optionally, the first threshold value can be a threshold value of block area of the image block, for example, the first threshold value can be 256, 512, 1024, etc.
[0210] Optionally, if the size of the current block is greater than or equal to the first threshold value, the first prediction mode is the first derived mode.
[0211] Optionally, the number of prediction modes corresponding to the first derived mode is the first number, if the size of the current block is greater than or equal to the first threshold value, indicating that the current block belongs to a large size image block, the first prediction mode is the first derived mode, and at least one candidate mode is determined or obtained according to the first derived mode, and the second prediction mode is determined or obtained according to the at least one candidate mode.
[0212] Optionally, the first number is greater than 67, and optionally, the first number is 131.
[0213] Optionally, the first derived mode includes at least one of the following: DIMD mode, OBIC mode, TIMD mode, improved DIMD mode, improved OBIC mode and improved TIMD mode.
[0214] Optionally, the number of prediction modes corresponding to the improved DIMD mode is greater than the number of prediction modes corresponding to the DIMD mode.
[0215] Optionally, the number of prediction modes corresponding to the improved OBIC mode is greater than the number of prediction modes corresponding to the OBIC mode.
[0216] Optionally, the number of prediction modes corresponding to the improved TIMD mode is greater than the number of prediction modes corresponding to the TIMD mode.
[0217] Optionally, the number of prediction modes corresponding to each of the DIMD mode, the OBIC mode and the TIMD mode is 67, and the number of prediction modes corresponding to each of the improved DIMD mode, the improved OBIC mode and the improved TIMD mode is 131.
[0218] Optionally, the processing method of the improved DIMD mode is different from or at least partially the same as the processing method of the DIMD mode.
[0219] Optionally, the processing method of the improved OBIC mode is different from or at least partially the same as the processing method of the OBIC mode.
[0220] Optionally, the processing method of the improved TIMD mode is different from or at least partially the same as the processing method of the TIMD mode.
[0221] Optionally, increasing the number of prediction modes can improve prediction accuracy, but more mode signaling needs to be transmitted, resulting in an increase in bit stream overhead. However, in the derivation mode, the mode index does not need to be explicitly transmitted, so increasing the number of prediction modes corresponding to the derivation mode will not increase the signaling amount, but may increase the calculation complexity. Different sizes of image blocks have different sensitivities to the number of prediction modes. For example, large-size image blocks with a size greater than or equal to a first threshold have a wider range of pixels covered by the reference region, so the accuracy of angle prediction in the prediction mode is more sensitive to the texture direction. Increasing the number of angle prediction modes in the prediction mode can more finely match the actual texture direction. Small-size image blocks with a size less than the first threshold have a limited number of pixels covered by the reference region, and the local correlation of adjacent pixels is stronger. Therefore, the sensitivity to the number of angle prediction modes in the prediction mode is lower. Therefore, using the first derivation mode with a larger number of prediction modes for large-size image blocks with a size greater than or equal to the first threshold can achieve higher benefits.
[0222] Optionally, in the H.266 / VVC standard, the number of prediction modes is 67, which has low prediction accuracy for large-size image blocks. Therefore, in the case where the size of the current block is greater than a first threshold, the first prediction mode of the current block is determined to be a first derivation mode, and the number of prediction modes of the first derivation mode is a first number, which is greater than 67, for example, the first number is 131. Since the number of prediction modes corresponding to the first derivation mode is greater than 67, the angle prediction mode corresponding to the first derivation mode can better fit the actual edge direction of the large-size image block, thereby improving the prediction accuracy for the current block.
[0223] Optionally, at least one candidate mode is determined or obtained according to the prediction mode corresponding to the first derivation mode.
[0224] Optionally, the prediction directions corresponding to the prediction modes corresponding to the first derivation mode at least partially cover the prediction directions corresponding to the 67 prediction modes in the H.266 / VVC standard, and the number of prediction modes is increased by filling the angle intervals between the angle prediction modes in the original prediction modes.
[0225] Optionally, the first derivation mode is associated with the corresponding prediction mode by a first lookup table.
[0226] Optionally, the first lookup table is a predefined static table storing the mapping relationship between the first derivation mode and the corresponding prediction mode, avoiding real-time calculation.
[0227] Optionally, in the first derivation mode, the prediction mode index is mapped by the first lookup table, the prediction mode is determined according to the prediction mode index, and the prediction mode is used as a candidate mode.
[0228] Optionally, the first lookup table includes a prediction mode lookup table and / or a prediction angle lookup table.
[0229] Optionally, the prediction mode lookup table stores the mapping relationship between the index of the prediction mode and the corresponding prediction direction.
[0230] Optionally, the prediction angle lookup table stores the specific geometric direction corresponding to the angle prediction mode, for example, 0° to +45°.
[0231] In the embodiment, by determining the first prediction mode as the first derivation mode when the size of the current block meets condition A, and then determining or obtaining at least one candidate mode according to the first derivation mode, and determining or obtaining the second prediction mode according to the at least one candidate mode, a suitable derivation mode is matched for the current block of different sizes, and then a suitable candidate mode and / or prediction mode can be further matched for the current block based on the derivation mode, so as to improve the prediction accuracy of the current block, and thus the coding quality in the video encoding and / or decoding process can be improved.
[0232] Optionally, if the size of the current block does not meet condition A, the first prediction mode is a second derivation mode, at least one candidate mode is determined or obtained according to the second derivation mode, and the second prediction mode is determined or obtained according to the at least one candidate mode.
[0233] Optionally, the second derivation mode and the first derivation mode are the same or different.
[0234] Optionally, the number of prediction modes corresponding to the second derivation mode and the first derivation mode is different, and / or the derivation mode type to which the second derivation mode and the first derivation mode belong is different.
[0235] Optionally, the size of the current block includes at least one of the width, height, area and width-height ratio of the current block.
[0236] Optionally, condition A can be a pre-set condition, and optionally, condition A is not fixed and can be adaptively adjusted according to different scenes.
[0237] Optionally, the condition A can be set according to a value of the quantization parameter or the quantization information.
[0238] Optionally, when the quantization parameter is a first quantization parameter (for example, the value of the quantization parameter is 37), the condition A is that the width x height of the current block is greater than a first threshold, and the first threshold can be 1024, 512, etc. For example, the first condition is that the width x height of the current block > 1024, or the first condition is that the width x height of the current block > 512.
[0239] Optionally, when the quantization parameter is a second quantization parameter (for example, the value of the quantization parameter is 22), the first condition is that the width x height of the current block is greater than a second threshold, and the second threshold can be 1024, 512, etc. For example, the first condition is that the width x height of the current block > 1024, or the first condition is that the width x height of the current block > 512.
[0240] Optionally, the first quantization parameter and the second quantization parameter are different, and the first threshold and the second threshold are different.
[0241] Optionally, the size of the current block does not satisfy the condition A, including at least one of the following:
[0242] The value of the size of the current block is not a first value;
[0243] The value of the size of the current block is not in a first value interval;
[0244] The value of the size of the current block is less than the first threshold.
[0245] Optionally, the first value can be a size of an image block, for example, a value of at least one of the width, height, block size, and block area of the image block.
[0246] Optionally, the first value can be a value of the width and / or height of the image block, for example, the first value can be 32, 64, 128, 256, etc.
[0247] Optionally, the first value can be a value of the block area of the image block, for example, the first value can be 256, 512, 1024, etc.
[0248] Optionally, the first value interval can be a size of an image block, for example, a value interval of at least one of the width, height, block size, and block area of the image block.
[0249] Optionally, the first value interval can be a value interval of the width and / or height of the image block, for example, the first value interval is [32, 256].
[0250] Optionally, the first numerical interval can be a numerical interval of a block area of the image block, for example, the first numerical interval is [256, 1024].
[0251] Optionally, the first threshold value can be a size of the image block set in advance, for example, a threshold value of at least one of width, height, block size and block area.
[0252] Optionally, the first threshold value can be a threshold value of width and / or height of the image block, for example, the first threshold value can be 32, 64, 128, 256, etc.
[0253] Optionally, the first threshold value can be a threshold value of block area of the image block, for example, the first threshold value can be 256, 512, 1024, etc.
[0254] Optionally, if the size of the current block is less than the first threshold value, the first prediction mode is the second derivation mode.
[0255] Optionally, the number of prediction modes corresponding to the second derivation mode is a second number, if the size of the current block is less than the first threshold value, it indicates that the current block belongs to a small size image block, and the first prediction mode is the second derivation mode, and at least one prediction mode of the current block is determined or obtained according to the second derivation mode.
[0256] Optionally, the number of prediction modes corresponding to the first derivation mode is a first number, and the number of prediction modes corresponding to the second derivation mode is a second number, and the first number and the second number are the same or different.
[0257] Optionally, the first number is 35, 67 or 131, for example, the first number is 131.
[0258] Optionally, the first number is greater than 35, 67 or 131.
[0259] Optionally, the second number is 35, 67 or 131, for example, the second number is 67.
[0260] Optionally, the second number is less than or equal to 35, 67 or 131.
[0261] Optionally, the second number is less than the first number, and optionally, the second number is greater than 67.
[0262] Optionally, the second derivation mode includes at least one of the following: DIMD mode, OBIC mode, TIMD mode, improved DIMD mode, improved OBIC mode and improved TIMD mode.
[0263] Optionally, the number of the prediction modes corresponding to the improved DIMD mode is greater than the number of the prediction modes corresponding to the DIMD mode, and / or the number of the prediction modes corresponding to the improved OBIC mode is greater than the number of the prediction modes corresponding to the OBIC mode, and / or the number of the prediction modes corresponding to the improved TIMD mode is greater than the number of the prediction modes corresponding to the TIMD mode.
[0264] Optionally, the number of the prediction modes corresponding to each of the DIMD mode, the OBIC mode and the TIMD mode is 67, and the number of the prediction modes corresponding to each of the improved DIMD mode, the improved OBIC mode and the improved TIMD mode is greater than 67.
[0265] Optionally, the processing method of the improved DIMD mode is different from or at least partially the same as the processing method of the DIMD mode, the processing method of the improved OBIC mode is different from or at least partially the same as the processing method of the OBIC mode, and the processing method of the improved TIMD mode is different from or at least partially the same as the processing method of the TIMD mode.
[0266] Optionally, the number of the prediction modes corresponding to the first derivation mode is a first number, the number of the prediction modes corresponding to the second derivation mode is a second number, the first number is greater than the second number, and the number of the prediction modes corresponding to the first derivation mode is greater than the number of the prediction modes corresponding to the second derivation mode. If the size of the current block satisfies a condition A, for example, the value of the size of the current block is greater than or equal to a first threshold, indicating that the current block belongs to a large-size image block, the first prediction mode of the current block is the first derivation mode corresponding to the more prediction modes, and at least one candidate mode is determined or obtained according to the first derivation mode. The candidate mode belongs to one of the prediction modes of the first number, and the second prediction mode determined or obtained according to the candidate mode can also be one of the prediction modes of the first number, so as to meet the prediction requirement of the large-size image block which is more sensitive to the texture direction in terms of the accuracy of the angle prediction in the prediction mode, more finely match the actual texture direction of the current block, and improve the prediction accuracy. If the size of the current block does not satisfy the condition A, for example, the value of the size of the current block is less than the first threshold, indicating that the current block belongs to a small-size image block, the first prediction mode of the current block is the second derivation mode corresponding to the less prediction modes, and at least one candidate mode of the current block is determined or obtained according to the second derivation mode. The candidate mode belongs to one of the prediction modes of the second number, and the second prediction mode determined or obtained according to the candidate mode can also be one of the prediction modes of the second number, so as to avoid increasing the calculation complexity.
[0267] Optionally, at least one candidate mode is determined or obtained according to the prediction mode corresponding to the second derivation mode.
[0268] Optionally, the first number is greater than the second number, and the second number is greater than or equal to 67.
[0269] Optionally, the number of the prediction modes corresponding to the second derivation mode is a second number, and the second number is 67, and the number of the prediction modes corresponding to the first derivation mode is a first number, and the first number is 131.
[0270] Optionally, the prediction directions corresponding to the prediction modes corresponding to the second derivation mode at least partially cover the prediction directions corresponding to the 67 prediction modes in the H.266 / VVC standard, and the number of the prediction modes is increased by filling the angle intervals between the angle prediction modes in the original prediction modes.
[0271] Optionally, the second derivation mode and the prediction mode corresponding thereto are associated through a second lookup table.
[0272] Optionally, the second lookup table is a pre-defined static table that stores the mapping relationship between the second derivation mode and the prediction mode corresponding thereto, avoiding real-time calculation, and the first lookup table can be implemented through a storage unit.
[0273] Optionally, in the second derivation mode, the prediction mode index is mapped through the second lookup table, the prediction mode is determined according to the prediction mode index, and the prediction mode is used as a candidate mode.
[0274] Optionally, the second lookup table includes a prediction mode lookup table and / or a prediction angle lookup table, and the number of the second lookup table can be one or more.
[0275] Optionally, the prediction mode lookup table stores the mapping relationship between the index of the prediction mode and the corresponding prediction direction.
[0276] Optionally, the prediction angle lookup table stores the specific geometric direction corresponding to the angle prediction mode, for example, 0° to +45°.
[0277] In the embodiment, by determining the first prediction mode as the second derivation mode in the case that the size of the current block does not satisfy the condition A, and then determining or obtaining at least one candidate mode according to the second derivation mode, and determining or obtaining the second prediction mode according to the at least one candidate mode, a suitable derivation mode is matched for the current block of different sizes, and then a suitable candidate mode and / or prediction mode can be further matched for the current block based on the derivation mode, so as to improve the prediction accuracy of the current block, and thus the coding quality in the video encoding and / or decoding process can be improved.
[0278] Optionally, the first prediction mode is a derivation mode, and the manner of determining or obtaining at least one candidate mode according to the derivation mode includes at least one of the following: at least one statistical histogram of the current block corresponding to at least one reference region of the current block, a first mode list, and at least one gradient operator corresponding to at least one lookup table.
[0279] Referring to FIG. 7, when the processing device is an encoder at the encoding side, the encoder can receive video source input video data, such as the encoder receiving video pictures from a video source, determine a to-be-predicted picture in the video pictures, divide the to-be-predicted picture into at least one image block, perform prediction processing on each of the at least one image block by using temporal and / or spatial correlation between the video pictures, including intra-prediction processing and / or inter-prediction processing, and the intra-prediction processing and / or the inter-prediction processing includes derivation of at least one prediction mode and / or at least one prediction mode, for the prediction mode, the encoder determines a prediction mode finally adopted for each of the at least one image block by using, for example, a rate-distortion cost, such as calculating a rate-distortion cost corresponding to each prediction mode or a rate-distortion cost in a manner of combining several prediction modes, to determine a minimum rate-distortion cost from the at least one rate-distortion cost, and the prediction mode or the combination of the prediction modes corresponding to the minimum rate-distortion cost is the prediction mode finally adopted for the image block, and the current block can be predicted according to the second prediction mode.
[0280] Optionally, after the second prediction mode of the to-be-predicted image block (i.e., the current block) is determined or obtained, the to-be-predicted image block is predicted by using the second prediction mode to determine or obtain a prediction block (i.e., a prediction result) of the to-be-predicted image block.
[0281] Optionally, a residual block between the prediction block and the current block can be calculated, the residual block can be subjected to a transform and quantization processing, and then encoded by an entropy encoder to form an encoded bitstream.
[0282] Optionally, the encoded bitstream can include prediction parameters corresponding to the determined prediction mode and related side information.
[0283] Optionally, the prediction parameters are packed into the encoded bitstream after being subjected to entropy encoding.
[0284] Optionally, the prediction parameters include indication information of the prediction mode.
[0285] Optionally, the transformed and quantized residual block can be added to corresponding prediction data (such as the prediction block) obtained by using the prediction mode after being subjected to inverse quantization and inverse transform to obtain a reconstructed block, and after the reconstructed block is obtained, a loop filtering module performs loop filtering processing on the reconstructed block according to a filter control parameter to reduce distortion.
[0286] Optionally, after the loop filtering processing is performed, the reconstructed block subjected to the loop filtering processing is stored according to a coded picture buffer.
[0287] Referring to FIG. 8, when the processing device is a decoder, after receiving the encoded bitstream, the entropy decoding unit of the decoder parses and decodes the encoded bitstream to obtain the transform coefficients. The inverse transform unit and the inverse quantization unit of the decoder perform inverse transform and inverse quantization on the transform coefficients to obtain the residual block.
[0288] Optionally, the entropy decoding unit of the decoder parses and decodes the encoded bitstream to obtain the prediction data, such as the prediction parameters and the related auxiliary information.
[0289] Optionally, the prediction processing unit of the decoder performs prediction processing using the prediction parameters to determine the prediction block corresponding to the residual block.
[0290] Optionally, the prediction processing includes intra prediction processing and / or inter prediction processing, and the intra prediction processing and / or the inter prediction processing includes at least one derivation mode and / or at least one prediction mode in a combined manner.
[0291] Optionally, the processing method includes: performing prediction processing on the current block according to the second prediction mode.
[0292] Optionally, the prediction processing on the to-be-predicted image block according to the second prediction mode determines or obtains the prediction block of the to-be-predicted image block, the obtained residual block and the corresponding prediction block (including the predicted luma block and the predicted chroma block) are added to obtain the reconstructed block, and the loop filtering unit of the decoder performs loop filtering processing on the reconstructed block to reduce distortion and improve video quality.
[0293] Optionally, the processing method further includes: the reconstructed block after the loop filtering processing is further combined into a decoded image and stored in a decoded image buffer or output as a decoded video signal.
[0294] Optionally, when the processing device is an encoder, the initially obtained prediction value can be a prediction value obtained in a corresponding prediction mode, which can be directly used in the rate-distortion cost process.
[0295] Optionally, when the processing device is a decoder, the initially obtained prediction value can be a prediction value obtained in a prediction mode corresponding to a to-be-predicted block (i.e., an image block at the decoding end) indicated by a syntax element parsed from the bitstream.
[0296] Optionally, the prediction block can be taken as a target image block, the residual block between the target image block and the current block can be calculated, and then the transform and quantization processing can be performed, and the entropy encoder can be used for encoding to form the encoded bitstream. The prediction block can also be processed in some corresponding manner, for example, processed by using other models, the image block processed by using the other models can be taken as a target image block, and the steps of calculating the residual block between the target image block and the current block and the subsequent steps can be performed.
[0297] In the embodiment, the second prediction mode is further determined or obtained based on the first prediction mode and is used for the prediction processing of the current block, so that the accuracy of the prediction mode is improved. For example, in the case that the second prediction mode is a wide-angle mode, the direction range of the prediction angle is expanded, and the asymmetric reference pixel sampling is introduced to adapt to the wider diagonal texture, so that the prediction accuracy of the current block can be improved.
[0298] Second embodiment
[0299] Based on the first embodiment, the second embodiment is provided.
[0300] In the embodiment, the step S10 includes the following mode one and / or mode two.
[0301] Mode one, if the first prediction mode and / or the current block satisfies the first condition, the current block is predicted based on the second prediction mode determined or obtained by the first prediction mode.
[0302] Optionally, the first condition is satisfied includes that the size of the current block satisfies the second condition, and / or the pixel position of the pixel corresponding to the gradient information of the first prediction mode satisfies the third condition.
[0303] Optionally, the first condition is satisfied includes that the index number of the first prediction mode satisfies the preset range, for example, the preset range includes 2-15 and 53-66, and the mode 2-mode 15 and the mode 53-mode 66 satisfy the condition.
[0304] Optionally, the first condition is satisfied includes that the index number of the first prediction mode satisfies the preset range, and the pixel position of the pixel corresponding to the gradient information of the first prediction mode satisfies the third condition, and / or the size of the current block satisfies the second condition.
[0305] Optionally, if the index number of the first prediction mode does not satisfy the preset range, the current block is predicted based on the first prediction mode.
[0306] Optionally, if the size of the current block satisfies the second condition, and / or the pixel position of the pixel corresponding to the gradient information of the first prediction mode satisfies the third condition, the current block is predicted based on the second prediction mode determined or obtained by the first prediction mode.
[0307] Optionally, the second prediction mode includes a wide-angle mode.
[0308] Optionally, the size of the current block includes at least one of the width, height, area and aspect ratio of the current block.
[0309] Optionally, if the first prediction mode and / or the current block do not satisfy the first condition, the current block is predicted according to a second prediction mode determined or obtained according to the first prediction mode, and if the first prediction mode and / or the current block satisfy the first condition, the current block is predicted according to the first prediction mode.
[0310] Optionally, the first condition is satisfied when at least one of the following conditions is satisfied:
[0311] The size of the current block does not satisfy a second condition;
[0312] The size of the current block satisfies a third condition;
[0313] The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not satisfy a fourth condition;
[0314] The pixel position of the pixel corresponding to the gradient information of the first prediction mode satisfies a fifth condition.
[0315] Optionally, the size of the current block satisfying the second condition includes at least one of the following conditions:
[0316] The size of the current block has a second value;
[0317] The size of the current block has a value in a second value range;
[0318] The size of the current block has a value greater than or equal to a third threshold value;
[0319] The size of the current block has a value less than or equal to a fourth threshold value.
[0320] Optionally, the size of the current block satisfying the third condition includes at least one of the following conditions:
[0321] The size of the current block has a value of a value A;
[0322] The size of the current block has a value in a value range A;
[0323] The size of the current block has a value greater than or equal to a fourth threshold value;
[0324] The size of the current block has a value less than or equal to a third threshold value.
[0325] Optionally, the size of the current block can be at least one of the width, height, aspect ratio and block area of the current block.
[0326] Optionally, the second value and / or the value A can be a value of at least one of the width, height, aspect ratio and block area of the image block set in advance.
[0327] Optionally, the second value and / or the value A can be a value of the aspect ratio of the image block, for example, the second value can be a number other than 1, such as 0.2, 1.3, 1.5, etc.
[0328] Optionally, the second numerical interval and / or the numerical interval A can be a numerical interval of at least one of the width, height, width-to-height ratio and block area of the image block.
[0329] Optionally, the second numerical interval and / or the numerical interval A can be a numerical interval of the width-to-height ratio of the image block, for example, the second numerical interval is (1, 1.8], [0.2, 1).
[0330] Optionally, the third threshold and / or the fourth threshold can be a threshold of at least one of the width, height, width-to-height ratio and block area of the image block.
[0331] Optionally, the third threshold and / or the fourth threshold can be a threshold of the width-to-height ratio of the image block, for example, the third threshold can be 1, 1.1, 1.2, etc., and the fourth threshold can be 0.3, 0.5, 1, etc.
[0332] Optionally, the size of the current block is 4x32, which belongs to a vertical long strip block. If the current block contains diagonal texture, the traditional mode can be forced to select a suboptimal direction due to insufficient angle, while the wide-angle mode can directly match a large inclination angle, thereby improving the prediction accuracy.
[0333] In the embodiment, in the case that the size of the current block satisfies the second condition, for example, in the case that the width and height of the current block are not equal, the current block is rectangular, the limited angle range of the traditional intra prediction is difficult to accurately match, resulting in an increase in prediction residual, and the wide-angle mode expands the direction coverage and can better adapt to the geometric characteristics of such blocks, thereby improving the prediction accuracy of the current block.
[0334] Optionally, the pixel position of the pixel corresponding to the gradient information of the first prediction mode satisfies the third condition, including at least one of the following:
[0335] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the first position information;
[0336] The pixel position of the pixel corresponding to the gradient information of the first prediction mode is located in the first preset range and / or the first reference region;
[0337] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the first statistical histogram;
[0338] The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to the second position information;
[0339] The pixel position of the pixel corresponding to the gradient information of the first prediction mode is located outside the second preset range and / or the second reference region;
[0340] The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to the first position information.
[0341] Optionally, the condition three that the pixel position of the pixel corresponding to the gradient information of the first prediction mode satisfies at least one of the following:
[0342] The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to the first position information.
[0343] The pixel position of the pixel corresponding to the gradient information of the first prediction mode is outside the first preset range and / or the first reference region.
[0344] The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to the first statistical histogram.
[0345] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the second position information.
[0346] The pixel position of the pixel corresponding to the gradient information of the first prediction mode is in the second preset range and / or the second reference region.
[0347] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the second statistical histogram.
[0348] Optionally, in the intra prediction, each angle mode represents a specific prediction direction, and the prediction direction corresponding to the first prediction mode (i.e., the vertical direction of the gradient direction) can be the dominant texture direction of the current block, and the position of the pixel in the at least one reference region of the current block corresponding to the gradient direction of the first prediction mode is the pixel position of the pixel corresponding to the gradient information of the first prediction mode.
[0349] Optionally, the first position information and / or the second position information are at least one fixed coordinate position in the reference region, and if the pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the first position information, for example, is in the region indicated by the first position information, the second prediction mode determined or obtained through the first prediction mode is used to predict the current block, and if the pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to the second position information, for example, is outside the region indicated by the second position information, the second prediction mode determined or obtained through the first prediction mode is used to predict the current block.
[0350] Optionally, the first preset range and / or the second preset range refer to a spatial range (such as a rectangular, circular or angular sector region) defined in the reference region, and are used to define a distribution range of pixel positions of the pixels corresponding to the gradient information, and if the pixel position of the pixel corresponding to the gradient information of the first prediction mode is within the first preset range, the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode, and if the pixel position of the pixel corresponding to the gradient information of the first prediction mode is outside the second preset range, the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode.
[0351] Optionally, the first reference region and / or the second reference region refer to a reference pixel set in a preset pixel position or coordinate range on the left or above the current block, and the prediction pixel position or coordinate range of the first reference region and the second reference region are different or do not coincide, and if the number of pixels with the gradient direction corresponding to the first prediction mode in the first reference region satisfies a preset condition, the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode, or if the number of pixels with the gradient direction corresponding to the first prediction mode in the first reference region does not satisfy the preset condition, the current block is predicted according to the first prediction mode.
[0352] Optionally, the first reference region and / or the second reference region refer to a reference pixel set in a preset pixel position or coordinate range on the left or above the current block, and the prediction pixel position or coordinate range of the first reference region and the second reference region are different or do not coincide, and if the number of pixels with the gradient direction corresponding to the first prediction mode in the first reference region satisfies a preset condition, the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode, or if the number of pixels with the gradient direction corresponding to the first prediction mode in the first reference region does not satisfy the preset condition, the current block is predicted according to the first prediction mode.
[0353] Optionally, the first reference region and / or the second reference region refer to a reference pixel set in a preset pixel position or coordinate range on the left or above the current block, and the prediction pixel position or coordinate range of the first reference region and the second reference region are different or do not coincide, and if the number of pixels with the gradient direction corresponding to the first prediction mode in the first reference region satisfies a preset condition, the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode, or if the number of pixels with the gradient direction corresponding to the first prediction mode in the first reference region does not satisfy the preset condition, the current block is predicted according to the first prediction mode.
[0354] Optionally, the third condition is satisfied when a ratio between a number of pixels having the gradient direction corresponding to the first prediction mode located in the first reference region and a number of pixels having the gradient direction corresponding to the first prediction mode located in the second reference region is greater than or equal to a threshold value a.
[0355] Optionally, the third condition is satisfied when a ratio between a number of pixels having the gradient direction corresponding to the first prediction mode located in the first reference region and a number of pixels having the gradient direction corresponding to the first prediction mode located in the second reference region is greater than or equal to a threshold value a.
[0356] Optionally, the third condition is satisfied when a ratio between a number of pixels having the gradient direction corresponding to the first prediction mode located in the first reference region and a number of pixels having the gradient direction corresponding to the first prediction mode located in the second reference region is greater than or equal to a threshold value a.
[0357] Optionally, the third condition is satisfied when a ratio between a number of pixels having the gradient direction corresponding to the first prediction mode located in the first reference region and a number of pixels having the gradient direction corresponding to the first prediction mode located in the second reference region is greater than or equal to a threshold value a.
[0358] Optionally, the threshold value a is determined according to a number of pixels having the gradient direction corresponding to the first prediction mode in a third reference region, the third reference region comprising the first reference region and the second reference region.
[0359] Optionally, the threshold value a is 0.75 times of the number of pixels having the gradient direction corresponding to the first prediction mode in the third reference region.
[0360] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate position above the current block, the third condition is satisfied when a ratio between a number of pixels having the gradient direction corresponding to the first prediction mode located in the first reference region and a number of pixels having the gradient direction corresponding to the first prediction mode located in the second reference region is greater than a threshold value a (e.g., threshold value a = 2), and if the number of pixels having the gradient direction corresponding to the first prediction mode located in the first reference region satisfies the third condition, the current block is predicted according to a second prediction mode (e.g., prediction mode -14 -1) determined or obtained by the first prediction mode (e.g., prediction mode 53-66), as shown in FIG. 6, the prediction mode -14 -1 is a wide-angle mode, and the prediction direction of the prediction mode -14 -1 is opposite to the prediction direction of the prediction mode 52-66.
[0361] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate range above the current block, the third condition is satisfied when the number of pixel positions corresponding to the gradient direction of the first prediction mode (e.g., prediction modes 53-66) in the first reference region is greater than a threshold value a, and the threshold value a is 0.75 times the number of pixels in the third reference region corresponding to the gradient direction of the first prediction mode. If the number of pixel positions corresponding to the gradient direction of the first prediction mode in the first reference region satisfies the third condition, the current block is predicted according to the second prediction mode (e.g., prediction modes -14 to -1) determined or obtained by the first prediction mode (e.g., prediction modes 53-66). As shown in FIG. 6, the prediction modes -14 to -1 are wide-angle modes, and the prediction directions of the prediction modes -14 to -1 are opposite to the prediction directions of the prediction modes 53-66. The index numbers of the prediction modes 67-80 are different from the index numbers of the prediction modes 2-15 by a first value (e.g., 67 or other predetermined value).
[0362] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate range above the current block, the third condition is satisfied when the number of pixel positions corresponding to the gradient direction of the first prediction mode (e.g., prediction modes 53-66) in the first reference region is greater than a threshold value a, and the threshold value a is 0.75 times the number of pixels in the third reference region corresponding to the gradient direction of the first prediction mode. If the number of pixel positions corresponding to the gradient direction of the first prediction mode in the first reference region does not satisfy the third condition, the current block is predicted according to the first prediction mode (e.g., prediction modes 53-66).
[0363] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate range above the current block, the third condition is satisfied when the number of pixel positions corresponding to the gradient direction of the first prediction mode (e.g., prediction modes 53-66) in the first reference region is greater than a threshold value a, and the threshold value a is 0.75 times the number of pixels in the third reference region corresponding to the gradient direction of the first prediction mode. If the number of pixel positions corresponding to the gradient direction of the first prediction mode in the first reference region does not satisfy the third condition, the current block is predicted according to the first prediction mode (e.g., prediction modes 53-66).
[0364] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate range above the current block, the third condition includes that the number of pixel positions with a gradient direction corresponding to the first prediction mode (e.g., prediction modes 2-15) in the first reference region is greater than a threshold value a, the threshold value a is 0.75 times the number of pixels with the gradient direction corresponding to the first prediction mode in the third reference region, and if the number of pixel positions with the gradient direction corresponding to the first prediction mode in the first reference region satisfies the third condition, the current block is predicted according to the first prediction mode (e.g., prediction modes 2-15).
[0365] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate range above the current block, the third condition includes that the number of pixel positions with a gradient direction corresponding to the first prediction mode (e.g., prediction modes 2-15) in the first reference region is greater than a threshold value a, the threshold value a is 0.75 times the number of pixels with the gradient direction corresponding to the first prediction mode in the third reference region, and if the number of pixel positions with the gradient direction corresponding to the first prediction mode in the first reference region does not satisfy the third condition, the current block is predicted according to a second prediction mode (e.g., prediction modes 67-80) determined or obtained by the first prediction mode (e.g., prediction modes 2-15), as shown in FIG. 6, the prediction modes 67-80 are wide-angle modes, the prediction directions of the prediction modes 67-80 are opposite to the prediction directions of the prediction modes 2-15, and the index numbers of the prediction modes 67-80 differ from the index numbers of the prediction modes 2-15 by a second value (e.g., 65 or other predetermined value).
[0366] Optionally, the mode index and / or mode number of the second prediction mode can be determined or obtained according to the mode index and / or mode number of the first prediction mode and the first value, or the mode index and / or mode number of the second prediction mode can be determined or obtained according to the mode index and / or mode number of the first prediction mode and the second value.
[0367] Optionally, the second prediction mode includes a wide-angle mode, and the first condition, the second condition, and / or the third condition can be a triggering condition for switching between wide-angle modes.
[0368] Optionally, the first position information, the second position information, the first preset range, the second preset range, the first reference region, and / or the second reference region are determined or obtained according to the prediction direction corresponding to the first prediction mode.
[0369] Optionally, the first position information, the second position information, the first preset range, the second preset range, the first reference region and / or the second reference region are determined or obtained according to a dominant reference region to which a prediction direction corresponding to the first prediction mode belongs.
[0370] Optionally, the dominant reference region to which the prediction direction corresponding to the first prediction mode belongs includes an image region corresponding to a coordinate range of reference samples used by the first prediction mode to derive the prediction pixels of the current block.
[0371] Optionally, the dominant reference region refers to a source of reference pixels mainly relied on by a specific angular prediction mode. For example, the dominant reference region of modes 2-15 includes a left reference region, i.e., the prediction direction of modes 2-15 mainly extends from the left reference region to the upper right or lower right, and the left pixels are preferentially used when calculating the prediction value.
[0372] Optionally, in the angular prediction mode, the dominant reference region to which the prediction direction corresponding to the prediction mode belongs includes a left reference region and an upper reference region. For example, in the 67 prediction modes, the image region corresponding to the coordinate range of reference samples used by modes 2-15 to derive the prediction pixels of the current block includes the left reference region, and thus the dominant reference region corresponding to modes 2-15 includes the left reference region. The image region corresponding to the coordinate range of reference samples used by modes 53-66 to derive the prediction pixels of the current block includes the upper reference region, and thus the dominant reference region corresponding to modes 53-66 includes the upper reference region.
[0373] Optionally, the first position information, the second position information, the first preset range, the second preset range, the first reference region and / or the second reference region are determined or obtained according to a dominant reference region to which a prediction direction corresponding to the first prediction mode belongs.
[0374] Optionally, the second position information, the second reference region and / or the second preset range are located on the same side of the dominant reference region to which the prediction direction corresponding to the prediction mode belongs, e.g., both are located on the left side of the current block or both are located on the upper side of the current block.
[0375] Referring to FIG. 9, the reference region of the block to be predicted (the current block) includes a left sub-region and an upper sub-region. In the 67 prediction modes, the dominant reference region of modes 2-15 is the left reference region, and thus in an embodiment, the second position information, the second preset range and / or the second reference region in the third condition associated with modes 2-15 are determined or obtained according to the dominant reference region of modes 2-15, i.e., the left reference region. In an embodiment, the second position information, the second preset range and / or the second reference region in the third condition associated with modes 53-66 are determined or obtained according to the dominant reference region of modes 53-66, i.e., the upper reference region.
[0376] Optionally, the second position information, the second reference region and / or the second preset range are determined or obtained according to a dominant reference region to which a prediction direction corresponding to the first prediction mode belongs, and the first position information, the first reference region and / or the first preset range are determined or obtained according to the second position information, the second reference region and / or the second preset range.
[0377] Optionally, the first position information and the second position information are different, the first preset range and the second preset range are different, the first reference region and the second reference region are different, and the first statistical histogram and the second statistical histogram are different.
[0378] Optionally, the at least one first gradient histogram and / or the at least one second gradient histogram are determined or obtained according to at least one sub-region determined or obtained through the at least one reference region of the current block.
[0379] Optionally, the at least one sub-region includes the first reference region and / or the second reference region.
[0380] Optionally, the at least one sub-region is determined or obtained according to the at least one reference region of the current block, for example, a left sub-region and an upper sub-region, and the at least one first statistical histogram and / or the at least one second statistical histogram are determined or obtained according to the at least one sub-region, and the first statistical histogram and / or the second statistical histogram can reflect the distribution of the first prediction mode in different sub-regions, so as to determine whether it is necessary to switch to the wide-angle mode.
[0381] Optionally, the first statistical histogram is determined or obtained according to the first reference region, and the second statistical histogram is determined or obtained according to the second reference region, and the statistical histogram includes a gradient histogram.
[0382] Optionally, the pixel position of the pixel corresponding to the gradient information of the prediction mode includes that the gradient amplitude of the gradient direction corresponding to the prediction mode in the statistical histogram satisfies a preset condition.
[0383] Optionally, the gradient amplitude satisfying the preset condition includes that the gradient amplitude is greater than a preset threshold.
[0384] Optionally, if the gradient amplitude of the gradient direction corresponding to the first prediction mode in the first gradient histogram satisfies the preset condition, the current block is predicted according to a second prediction mode determined or obtained through the first prediction mode, and if the gradient amplitude of the gradient direction corresponding to the first prediction mode in the second gradient histogram satisfies the preset condition, the current block is predicted according to the first prediction mode.
[0385] Optionally, the preset condition that the gradient amplitude satisfies includes that the gradient amplitude of the gradient direction corresponding to the first prediction mode in the first gradient histogram of the first sub-region is greater than a preset threshold.
[0386] Optionally, the preset threshold is determined according to a gradient amplitude of the gradient direction corresponding to the first prediction mode in the gradient histogram of the other sub-region of the reference region, or a gradient amplitude of the gradient direction corresponding to the first prediction mode in the gradient histogram of the reference region.
[0387] Optionally, the preset threshold is equal to a1* the gradient amplitude of the gradient direction corresponding to the first prediction mode in the gradient histogram of the other sub-region, or equal to a2* the gradient amplitude of the gradient direction corresponding to the first prediction mode in the gradient histogram of the reference region, and optionally, a1 is greater than 1, and a2 is greater than 0 and less than 1.
[0388] Referring to FIG. 9, the reference region of the to-be-predicted block (current block) includes a left sub-region and an upper sub-region, and among the 67 prediction modes, the dominant reference region to which modes 2-15 belong is the left reference region, and the second statistical histogram in the third condition related to modes 2-15 is determined or obtained according to the left sub-region in the reference region, and the first statistical histogram is determined or obtained according to the upper sub-region in the reference region.
[0389] In the embodiment, the prediction accuracy for diagonal texture is improved by the wide-angle mode, and the adaptability to complex natural scenes is improved, and the pixel position of the pixel corresponding to the gradient information of the first prediction mode can represent the distribution of the gradient information of the first prediction mode, so as to accurately match the texture demand and reduce the false touch of the wide-angle mode, thereby improving the prediction accuracy.
[0390] In a second mode, if the first prediction mode and / or the current block do not satisfy the first condition, the current block is predicted according to the first prediction mode.
[0391] Optionally, the first condition is not satisfied includes that the size of the current block does not satisfy the second condition, and / or the pixel position of the pixel corresponding to the gradient information of the first prediction mode does not satisfy the third condition.
[0392] Optionally, if the first prediction mode and / or the current block do not satisfy the first condition, the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode, and if the first prediction mode and / or the current block satisfy the first condition, the current block is predicted according to the first prediction mode.
[0393] Optionally, if the size of the current block does not satisfy the second condition, and / or the pixel position of the pixel corresponding to the gradient information of the first prediction mode does not satisfy the third condition, no mode switching is performed, and the current block is predicted according to the first prediction mode.
[0394] Optionally, the first condition is not satisfied includes at least one of the following:
[0395] the size of the current block satisfies a second condition;
[0396] the size of the current block does not satisfy the second condition;
[0397] a pixel position of a pixel corresponding to the gradient information of the first prediction mode satisfies a third condition;
[0398] the pixel position of the pixel corresponding to the gradient information of the first prediction mode does not satisfy the third condition.
[0399] Optionally, the first prediction mode comprises a non-wide angle mode.
[0400] Optionally, the size of the current block comprises at least one of a width, a height, an area and an aspect ratio of the current block.
[0401] Optionally, the size of the current block does not satisfy the second condition comprises at least one of:
[0402] the size of the current block does not take a second value;
[0403] the size of the current block does not take a value in a second value range;
[0404] the size of the current block takes a value less than a third threshold value;
[0405] the size of the current block takes a value greater than a fourth threshold value.
[0406] Optionally, the size of the current block does not satisfy the second condition comprises at least one of:
[0407] the size of the current block does not take a value A;
[0408] the size of the current block does not take a value in a value range A;
[0409] the size of the current block takes a value less than a fourth threshold value;
[0410] the size of the current block takes a value greater than a third threshold value.
[0411] Optionally, the size of the current block is 32x32, which is a square, so that textures in any direction are distributed relatively uniformly within the block, and traditional angle modes (such as 45°, horizontal, vertical and other non-wide angle modes) can well cover most common texture directions, and thus there is no need to switch to a wide angle mode.
[0412] In the embodiment, when the size of the current block does not satisfy the second condition, for example, the current block is a square, at this time, the texture in any direction is relatively evenly distributed within the block, and the traditional angle mode (such as a 45°, horizontal, vertical, and the like, which is a non-wide angle mode) can better cover most common texture directions, thus, it is not necessary to switch to the wide angle mode, and the first prediction mode of the non-wide angle mode is used for prediction processing of the current block, to avoid false triggering of the wide angle mode, and to improve the prediction accuracy for the current block.
[0413] Optionally, the pixel position of the pixel corresponding to the gradient information of the first prediction mode does not satisfy the third condition, including at least one of the following:
[0414] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the first position information;
[0415] The pixel position of the pixel corresponding to the gradient information of the first prediction mode is located outside the first preset range and / or the first reference region;
[0416] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the first statistical histogram;
[0417] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the second position information;
[0418] The pixel position of the pixel corresponding to the gradient information of the first prediction mode is located in the second preset range and / or the second reference region;
[0419] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the second statistical histogram.
[0420] Optionally, the pixel position of the pixel corresponding to the gradient information of the first prediction mode does not satisfy the third condition, including at least one of the following:
[0421] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the first position information;
[0422] The pixel position of the pixel corresponding to the gradient information of the first prediction mode is located outside the first preset range and / or the first reference region;
[0423] The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the first statistical histogram;
[0424] The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to the second position information;
[0425] The pixel position of the pixel corresponding to the gradient information of the first prediction mode is located outside the second preset range and / or the second reference region;
[0426] The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to the second statistical histogram.
[0427] Optionally, in the intra prediction, each angle mode represents a specific prediction direction, the prediction direction corresponding to the determined or obtained first prediction mode can be a dominant texture direction of the current block, and the position of the pixel in the at least one reference region of the current block, which is consistent with the prediction direction corresponding to the first prediction mode, is the pixel position of the pixel corresponding to the gradient information of the first prediction mode.
[0428] Optionally, the first position information and / or the second position information is at least one fixed coordinate position in the reference region, if the pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to the first position information, for example, is located outside the region indicated by the first position information, the current block is predicted according to the first prediction mode, and if the pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the second position information, for example, is located within the region indicated by the second position information, the current block is predicted according to the first prediction mode.
[0429] Optionally, the first preset range and / or the second preset range refer to a spatial range (such as a rectangular, circular or angular sector region) defined in the reference region, which is used to limit the distribution range of the pixel position of the pixel corresponding to the gradient information, if the pixel position of the pixel corresponding to the gradient information of the first prediction mode is located outside the first preset range, the current block is predicted according to the first prediction mode, and if the pixel position of the pixel corresponding to the gradient information of the first prediction mode is located within the second preset range, the current block is predicted according to the first prediction mode.
[0430] Optionally, the first reference region and / or the second reference region refer to a set of reference pixels in a preset pixel position or coordinate range located on the left or above the current block, the prediction pixel position or coordinate range of the first reference region and the second reference region is different or does not coincide, if the pixel position of the pixel corresponding to the gradient information of the first prediction mode is located within the first reference region, the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode, or if the pixel position of the pixel corresponding to the gradient information of the first prediction mode is located outside the second reference region, the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode.
[0431] Optionally, the first reference region and / or the second reference region refer to a set of reference pixels in a preset pixel position or coordinate range located at the left or above the current block, the preset pixel position or coordinate range of the first reference region and the second reference region are different or do not coincide, if the number of pixels with the gradient direction corresponding to the first prediction mode located in the first reference region satisfies a preset condition, the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode, or if the number of pixels with the gradient direction corresponding to the first prediction mode located in the first reference region does not satisfy the preset condition, the current block is predicted according to the first prediction mode.
[0432] Optionally, the first reference region and / or the second reference region refer to a set of reference pixels in a preset pixel position or coordinate range located at the left or above the current block, the preset pixel position or coordinate range of the first reference region and the second reference region are different or do not coincide, if the number of pixels with the gradient direction corresponding to the first prediction mode located in the second reference region satisfies a preset condition, the current block is predicted according to the first prediction mode, or if the number of pixels with the gradient direction corresponding to the first prediction mode located in the second reference region does not satisfy the preset condition, the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode.
[0433] Optionally, the third condition is satisfied when the ratio between the number of pixels with the gradient direction corresponding to the first prediction mode located in the first reference region and the number of pixels with the gradient direction corresponding to the first prediction mode located in the second reference region is greater than or equal to a threshold value a.
[0434] Optionally, the third condition is satisfied when the ratio between the number of pixels with the gradient direction corresponding to the first prediction mode located in the first reference region and the number of pixels with the gradient direction corresponding to the first prediction mode located in the second reference region is less than or equal to a threshold value b.
[0435] Optionally, the third condition is satisfied when the number of pixels with the gradient direction corresponding to the first prediction mode located in the first reference region is greater than the threshold value a.
[0436] Optionally, the third condition is satisfied when the number of pixels with the gradient direction corresponding to the first prediction mode located in the first reference region is less than the threshold value a.
[0437] Optionally, the threshold value a is determined according to the number of pixels with the gradient direction corresponding to the first prediction mode in a third reference region, and the third reference region includes the first reference region and the second reference region.
[0438] Optionally, the threshold value a is 0.75 times the number of pixels with the gradient direction corresponding to the first prediction mode in the third reference region.
[0439] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate range above the current block, the third condition is satisfied when the ratio of the number of pixel positions corresponding to the gradient direction of the first prediction mode (e.g., prediction modes 53-66) in the first reference region to the number of pixels corresponding to the gradient direction of the first prediction mode in the second reference region is greater than a threshold value a (e.g., threshold value a = 2). If the number of pixels corresponding to the gradient direction of the first prediction mode in the first reference region satisfies the third condition, the current block is predicted according to a second prediction mode (e.g., prediction modes -14 to -1) determined or obtained through the first prediction mode (e.g., prediction modes 53-66), as shown in FIG. 6. The prediction modes -14 to -1 are wide-angle modes, and the prediction directions of the prediction modes -14 to -1 are opposite to the prediction directions of the prediction modes 52-66.
[0440] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate range above the current block, the third condition is satisfied when the ratio of the number of pixel positions corresponding to the gradient direction of the first prediction mode (e.g., prediction modes 53-66) in the first reference region to the number of pixels corresponding to the gradient direction of the first prediction mode in the second reference region is equal to a threshold value a (e.g., threshold value a = 0). If the number of pixels corresponding to the gradient direction of the first prediction mode in the first reference region satisfies the third condition, the current block is predicted according to the first prediction mode (e.g., prediction modes 53-66).
[0441] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate range above the current block, the third condition is satisfied when the number of pixel positions corresponding to the gradient direction of the first prediction mode (e.g., prediction modes 53-66) in the first reference region is greater than a threshold value a, and the threshold value a is 0.75 times the number of pixels corresponding to the gradient direction of the first prediction mode in a third reference region. If the number of pixels corresponding to the gradient direction of the first prediction mode in the first reference region satisfies the third condition, the current block is predicted according to a second prediction mode (e.g., prediction modes -14 to -1) determined or obtained through the first prediction mode (e.g., prediction modes 53-66), as shown in FIG. 6. The prediction modes -14 to -1 are wide-angle modes, and the prediction directions of the prediction modes -14 to -1 are opposite to the prediction directions of the prediction modes 52-66. The index numbers of the prediction modes 67-80 differ from the index numbers of the prediction modes 2-15 by a first value (e.g., 67 or other predetermined value).
[0442] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate position above the current block, the third condition is satisfied when the number of pixel positions corresponding to the gradient direction of the first prediction mode (e.g., prediction modes 53-66) in the first reference region is greater than a threshold value a, the threshold value a being 0.75 times the number of pixels in the third reference region having the gradient direction corresponding to the first prediction mode, and the current block is predicted according to the first prediction mode (e.g., prediction modes 53-66) if the number of pixel positions corresponding to the gradient direction of the first prediction mode in the first reference region does not satisfy the third condition.
[0443] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate position above the current block, the third condition is satisfied when the number of pixel positions corresponding to the gradient direction of the first prediction mode (e.g., prediction modes 2-15) in the first reference region is greater than a threshold value a, the threshold value a being 0.75 times the number of pixels in the third reference region having the gradient direction corresponding to the first prediction mode, and the current block is predicted according to the first prediction mode (e.g., prediction modes 2-15) if the number of pixel positions corresponding to the gradient direction of the first prediction mode in the first reference region satisfies the third condition.
[0444] Optionally, if the first reference region is a set of reference pixels in a preset pixel position or coordinate range on the left side of the current block, and the second reference region is a set of reference pixels in a preset pixel position or coordinate position above the current block, the third condition is satisfied when the number of pixel positions corresponding to the gradient direction of the first prediction mode (e.g., prediction modes 2-15) in the first reference region is greater than a threshold value a, the threshold value a being 0.75 times the number of pixels in the third reference region having the gradient direction corresponding to the first prediction mode, and the current block is predicted according to a second prediction mode (e.g., prediction modes 67-80) determined or obtained by the first prediction mode (e.g., prediction modes 2-15) if the number of pixel positions corresponding to the gradient direction of the first prediction mode in the first reference region does not satisfy the third condition, as shown in FIG. 6, the prediction modes 67-80 are wide-angle modes, the prediction directions of the prediction modes 67-80 are opposite to the prediction directions of the prediction modes 2-15, and the index numbers of the prediction modes 67-80 differ from the index numbers of the prediction modes 2-15 by a second value (e.g., 65 or other predetermined value).
[0445] Optionally, the mode index and / or number of the second prediction mode can be determined or obtained according to the mode index and / or number of the first prediction mode and the first value, or the mode index and / or number of the second prediction mode can be determined or obtained according to the mode index and / or number of the first prediction mode and the second value.
[0446] Optionally, the second prediction mode comprises a wide-angle mode, and the first condition, the second condition and / or the third condition can be a trigger condition of a wide-angle mode switching.
[0447] Optionally, the first position information, the second position information, the first preset range, the second preset range, the first reference region and / or the second reference region are determined or obtained according to a prediction direction corresponding to the first prediction mode.
[0448] Optionally, the first position information, the second position information, the first preset range, the second preset range, the first reference region and / or the second reference region are determined or obtained according to a dominant reference region to which a prediction direction corresponding to the first prediction mode belongs.
[0449] Optionally, the dominant reference region to which the prediction direction corresponding to the first prediction mode belongs comprises an image region corresponding to a coordinate range of reference samples used by the first prediction mode when deriving the prediction pixels of the current block.
[0450] Optionally, the dominant reference region refers to a source of reference pixels mainly relied on by a specific angle prediction mode, for example, the dominant reference region of modes 2-15 comprises a left reference region, i.e., the prediction direction of modes 2-15 mainly extends from the left reference region to the upper right or lower right, and the left pixels are preferentially used when calculating the prediction values.
[0451] Optionally, in the angle prediction mode, the dominant reference region to which the prediction direction corresponding to the prediction mode belongs comprises a left reference region and an upper reference region, for example, in the 67 prediction modes, the image region corresponding to the coordinate range of reference samples used by modes 2-15 when deriving the prediction pixels of the current block comprises the left reference region, and thus the dominant reference region corresponding to modes 2-15 comprises the left reference region, and the image region corresponding to the coordinate range of reference samples used by modes 53-66 when deriving the prediction pixels of the current block comprises the upper reference region, and thus the dominant reference region corresponding to modes 53-66 comprises the upper reference region.
[0452] Optionally, the first position information, the second position information, the first preset range, the second preset range, the first reference region and / or the second reference region are determined or obtained according to a dominant reference region to which a prediction direction corresponding to the prediction mode belongs.
[0453] Optionally, the second position information, the second reference region and / or the second preset range are located on the same side of the dominant reference region to which the prediction direction corresponding to the prediction mode belongs, for example, are located on the left side of the current block or are located on the upper side of the current block.
[0454] Referring to FIG. 9, the reference region of the to-be-predicted block (current block) includes a left sub-region and an above sub-region, and the dominant reference region of modes 2-15 belongs to the left reference region in the 67 prediction modes, and thus, in an embodiment, the second position information, the second preset range and / or the second reference region in the third condition associated with modes 2-15 are determined or obtained according to the dominant reference region, i.e., the left reference region, to which the modes 2-15 belong, and in an embodiment, the second position information, the second preset range and / or the second reference region in the third condition associated with modes 53-66 are determined or obtained according to the dominant reference region, i.e., the above reference region, to which the modes 53-66 belong.
[0455] Optionally, the second position information, the second reference region and / or the second preset range are determined or obtained according to the dominant reference region to which the prediction direction corresponding to the first prediction mode belongs, and the first position information, the first reference region and / or the first preset range are determined or obtained according to the second position information, the second reference region and / or the second preset range.
[0456] Optionally, the first position information and the second position information are different, the first preset range and the second preset range are different, the first reference region and the second reference region are different, and the first statistical histogram and the second statistical histogram are different.
[0457] Optionally, at least one first gradient histogram and / or at least one second gradient histogram are determined or obtained according to at least one sub-region determined or obtained through at least one reference region of the current block.
[0458] Optionally, the at least one sub-region includes the first reference region and / or the second reference region.
[0459] Optionally, at least one sub-region, e.g., a left sub-region and an above sub-region, is determined or obtained according to at least one reference region of the current block, and at least one first statistical histogram and / or at least one second statistical histogram are determined or obtained according to the at least one sub-region, and the first statistical histogram and / or the second statistical histogram can reflect the distribution of the first prediction mode in different sub-regions, so as to determine whether it is necessary to switch to a wide-angle mode.
[0460] Optionally, the first statistical histogram is determined or obtained according to the first reference region, and the second statistical histogram is determined or obtained according to the second reference region, and the statistical histogram includes a gradient histogram.
[0461] Optionally, the pixel position of the pixel corresponding to the gradient information of the prediction mode includes that the gradient amplitude of the gradient direction corresponding to the prediction mode in the statistical histogram satisfies a preset condition, and optionally, the gradient amplitude satisfying the preset condition includes that the gradient amplitude is greater than a preset threshold.
[0462] Optionally, if the gradient amplitude of the gradient direction corresponding to the first prediction mode in the first gradient histogram satisfies a preset condition, the current block is predicted according to a second prediction mode determined or obtained through the first prediction mode, and if the gradient amplitude of the gradient direction corresponding to the first prediction mode in the second gradient histogram satisfies the preset condition, the current block is predicted according to the first prediction mode.
[0463] Optionally, the preset condition satisfied by the gradient amplitude includes that the gradient amplitude of the gradient direction corresponding to the first prediction mode in the first gradient histogram of the first sub-region is greater than a preset threshold.
[0464] Optionally, the preset threshold is determined according to the gradient amplitude of the gradient direction corresponding to the first prediction mode in the gradient histogram of the other sub-region of the reference region or the gradient amplitude of the gradient direction corresponding to the first prediction mode in the gradient histogram of the reference region.
[0465] Optionally, the preset threshold is equal to a1*the gradient amplitude of the gradient direction corresponding to the first prediction mode in the gradient histogram of the other sub-region or equal to a2*the gradient amplitude of the gradient direction corresponding to the first prediction mode in the gradient histogram of the reference region, and optionally, a1 is greater than 1, and a2 is greater than 0 and less than 1.
[0466] Referring to FIG. 9, the reference region of the to-be-predicted block (current block) includes a left sub-region and an upper sub-region, the dominant reference region of modes 2-15 among the 67 prediction modes is the left reference region, the second statistical histogram in the third condition related to modes 2-15 is determined or obtained according to the left sub-region in the reference region, and the first statistical histogram is determined or obtained according to the upper sub-region in the reference region.
[0467] In this embodiment, the prediction accuracy for diagonal texture is improved through the wide-angle mode, and the adaptability to complex natural scenes is improved, and the pixel position of the pixel corresponding to the gradient information corresponding to the first prediction mode can represent the distribution of the gradient information corresponding to the first prediction mode, so as to accurately match the texture demand and reduce the false touch of the wide-angle mode, thereby improving the prediction accuracy.
[0468] Third Embodiment
[0469] Based on any one of the above embodiments, a third embodiment is provided.
[0470] In this embodiment, the first prediction mode is determined or obtained according to at least one of the following modes A1-A3:
[0471] Mode A1, at least one statistical histogram corresponding to the current block is determined or obtained according to at least one reference region of the current block.
[0472] Optionally, the step S10 comprises: determining or obtaining the first prediction mode according to at least one statistical histogram corresponding to the current block and determined or obtained according to at least one reference region of the current block; if the first prediction mode and / or the current block satisfies a first condition, performing the prediction processing on the current block according to a second prediction mode determined or obtained according to the first prediction mode; if the first prediction mode and / or the current block does not satisfy the first condition, performing the prediction processing on the current block according to the first prediction mode.
[0473] Optionally, the first prediction mode comprises at least one prediction mode, and the at least one prediction mode is determined or obtained according to at least one statistical histogram corresponding to the current block and determined or obtained according to at least one reference region of the current block.
[0474] Optionally, the statistical histogram comprises at least one of a gradient histogram, an area histogram and a histogram of the number of times of using the prediction mode corresponding to the coded image block, and a histogram obtained by adjusting or merging the above histograms.
[0475] Optionally, the gradient histogram is a statistical tool used to describe the distribution of the gradient amplitude of the current block in different directions, which is obtained by calculating the gradient amplitude value of each pixel in the at least one reference region of the current block in the direction corresponding to each intra prediction mode and counting the distribution of the gradient amplitude values, thereby obtaining a histogram containing the gradient amplitude values corresponding to each prediction direction.
[0476] Optionally, in the prediction modes of the intra prediction, different prediction modes correspond to different prediction directions, for example, the vertical mode corresponds to the vertical direction, the horizontal mode corresponds to the horizontal direction, and the diagonal mode corresponds to the diagonal direction, each prediction mode has a specific direction for describing the prediction direction thereof.
[0477] Optionally, for each prediction direction, the sum of the gradient amplitude values of the pixels in the at least one reference region of the current block in the direction is calculated, and the sum value reflects the overall gradient strength of the current block in the prediction direction. The gradient histogram records the sum of the gradient amplitude values corresponding to each prediction direction.
[0478] Optionally, according to at least one gradient histogram corresponding to the current block, it is judged whether the sum of the gradient amplitude values corresponding to at least one prediction direction related to the prediction mode and contained in the gradient histogram satisfies a preset condition, and the first prediction mode is determined or obtained in the case of satisfying the preset condition.
[0479] Optionally, the preset condition can be whether the sum of the gradient amplitudes is one of the sums of the N gradient amplitudes with the largest amplitudes in the gradient histogram, for example, determining or obtaining the first prediction mode according to whether the sum of the gradient amplitudes related to the prediction directions corresponding to the prediction modes contained in the at least one gradient histogram is one of the sums of the N gradient amplitudes with the largest amplitudes in the gradient histogram.
[0480] Optionally, the sums of the gradient amplitudes in the gradient histogram are sorted in ascending order or descending order, and the first prediction mode is determined or obtained according to the N sums of the gradient amplitudes at the front in the ascending order or the N sums of the gradient amplitudes at the back in the descending order, for example, after sorting in ascending order, the prediction mode corresponding to the prediction direction with the sum of the gradient amplitudes at the front 3 is determined as the first prediction mode.
[0481] Optionally, the N gradient amplitudes with the largest amplitudes in the gradient histogram are determined or obtained by comparing the gradient amplitudes in the gradient histogram, and the first prediction mode is determined or obtained according to the prediction mode corresponding to the N sums of the gradient amplitudes with the largest amplitudes.
[0482] Optionally, the gradient histogram of the at least one reference region with respect to the intra prediction direction can be determined or obtained according to the gradient amplitudes and gradient directions of the pixels in the at least one reference region of the current block, the corresponding intra prediction direction is determined according to the gradient histogram, and the first prediction mode is determined or obtained.
[0483] Optionally, the at least one reference region of the current block includes at least one of the reference pixels, the reference block and the reference template, the reference region refers to a group of adjacent pixels around the current block, which can provide important clues about the edges and texture trends of the block to be predicted, so the target derivation mode can analyze and derive the intra prediction mode of the current block based on these pixels.
[0484] Optionally, the processing method in the embodiments of the present application can be the DIMD mode and / or the improved DIMD mode.
[0485] Referring to FIG. 10, the processing steps of the DIMD mode, the processing steps of the improved DIMD mode and / or the determination or obtaining method of the gradient histogram include determining the reference template adjacent to the block to be predicted (the current block) above and on the left of the block to be predicted, i.e. three pixel lines / pixel rows / pixel columns on the left and above the block to be predicted, and then taking the pixels in the middle line (for example, pixel A) as the pixels for calculating the gradient, so that the gradient direction of the at least one pixel and the gradient amplitude value corresponding to the gradient can be obtained by calculating the direction of the gradient of the at least one pixel and the amplitudes of the horizontal gradient and the vertical gradient.
[0486] Optionally, the gradient magnitude value is the sum of the absolute values of the horizontal gradient and the vertical gradient, and if the gradient magnitude values of the at least one pixel with the same gradient direction are added, the sum of the gradient magnitude values corresponding to the gradient direction can be obtained.
[0487] Optionally, a histogram of the gradient magnitude values of different gradient directions of the at least one pixel can be established, and the prediction direction perpendicular to the gradient direction of the maximum gradient magnitude value can be used as the prediction direction of the intra prediction mode of the current block and / or the prediction direction of the first prediction mode.
[0488] Optionally, the 3X3 horizontal Sobel operator and the vertical Sobel operator can be used to calculate the horizontal gradient Gx and the vertical gradient Gy, for example, the horizontal gradient Gx and the vertical gradient Gy of the pixel x4 in the pixel line can be calculated according to the following formula (I) and formula (II).
[0489] Optionally, A can be a matrix composed of the pixel x4 as the center, and the pixels x1 above the pixel x4, the pixel x3 on the left side of the pixel x4, the pixel x7 below the pixel x4, the pixel x5 on the right side of the pixel x4, the pixel x0 on the upper left side of the pixel x4, the pixel x6 on the lower left side of the pixel x4, the pixel x2 on the upper right side of the pixel x4, and the pixel x8 on the lower right side of the pixel x4, a total of 9 pixels, as shown in the following formula (III).
[0490] Optionally, the G gradient magnitude value is the sum of the absolute values of the horizontal gradient and the vertical gradient, and the calculation formula is shown in formula (IV). G = |Gx| + |Gy| Formula (IV);
[0491] Optionally, the gradient direction corresponding to the pixel can be calculated by arctan(Gx / Gy) or arctan(Gy / Gx).
[0492] 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 the at least one pixel in the pixel line, the gradient magnitude values of the at least one pixel with the same gradient direction range can be added, and the sum of the gradient magnitude values corresponding to the gradient direction range can be obtained.
[0493] Optionally, the sum of the gradient magnitude values corresponding to the prediction direction of the intra prediction mode can also be obtained.
[0494] Referring to FIG. 11, the gradient magnitude value containing the gradient magnitude corresponding to the prediction direction of each intra prediction mode can be selected as the final intra prediction mode according to FIG. 11, and the final selected intra prediction mode is mode 30.
[0495] Optionally, the number of the prediction modes corresponding to the DIMD mode is 67, and the number of the prediction modes corresponding to the improved DIMD mode is greater than 67, for example, 131. Optionally, at least part of the prediction directions corresponding to the prediction modes of the improved DIMD mode cover the prediction directions corresponding to the 67 prediction modes of the DIMD mode, and the number of the prediction modes is increased by filling the angle intervals between the angle prediction modes in the original prediction modes.
[0496] In the embodiment, the gradient histogram can accurately capture the dominant prediction direction (such as vertical, horizontal or diagonal) of at least one reference region of the current block, so as to match the current block with the appropriate first prediction mode and / or second prediction mode.
[0497] Optionally, the area histogram is used to describe at least one reference region of the current block, for example, the area amplitude distribution of the adjacent coding blocks and / or the non-adjacent coding blocks in different intra prediction directions. Optionally, the reference region can be the coded region or the decoded region.
[0498] Optionally, the area histogram or the statistical result can be generated by analyzing the relationship between the area amplitude value (for example, the size or texture coverage range of the block) of each coding block and the intra prediction direction.
[0499] Optionally, the area amplitude value can represent the size, texture coverage range or other area-related features of the coding block, which reflects the texture distribution intensity of the coding block in a certain direction, and each coding block has a corresponding intra prediction direction (for example, vertical, horizontal, diagonal, etc.). The area histogram counts the area amplitude values in these directions. By analyzing the distribution of the area amplitude values in different intra prediction directions recorded in the area histogram, it can be determined which prediction directions are more consistent with the texture characteristics of the current block in statistics.
[0500] Optionally, the processing method in the embodiment can be the OBIC mode and / or the improved OBIC mode.
[0501] Optionally, the first prediction mode is determined or obtained according to the prediction mode corresponding to the prediction direction whose area amplitude value in the area histogram satisfies the fourth condition.
[0502] Optionally, the fourth condition can be an area amplitude value in a position or order in front after sorting the area amplitude values according to a preset sorting rule, and / or the fourth condition can be an area amplitude value in a preset position (e.g., the preset position is the first place) or a preset order range (e.g., the preset order range is the first to third places) after sorting the area amplitude values according to a preset sorting rule, for example, the preset sorting can be a sorting rule of arranging the area amplitude values from large to small, and the prediction mode corresponding to the prediction direction with the area amplitude value in the first three positions in the area histogram is determined as the first prediction mode.
[0503] Optionally, the basic principle of improving the OBIC mode can be to determine the first prediction mode by analyzing the usage of the intra prediction modes of the adjacent coding blocks and / or the non-adjacent coding blocks.
[0504] Optionally, the implementation process of improving the OBIC mode can include: determining the intra prediction mode usage of at least one reference region (including at least one adjacent coding block and / or non-adjacent coding block of the current block) of the current block, calculating the area amplitude value and the intra prediction direction of the at least one reference region, determining at least one area amplitude histogram or statistical result, and determining the first prediction mode according to the area amplitude histogram or statistical result.
[0505] Optionally, determining the intra prediction mode usage of the coding block includes: determining an encoded region and / or a decoded region, determining the intra prediction mode usage of the encoded blocks in the encoded region, and / or determining the intra prediction mode usage of the decoded blocks in the decoded region.
[0506] Optionally, the coding unit includes coding blocks of three color components, the three color components including a luminance component and two chrominance components.
[0507] Optionally, determining the intra prediction mode usage of at least one reference region (including at least one adjacent coding block and / or non-adjacent coding block of the current block) of the current block can include: determining at least one encoded region or at least one decoded region, determining the intra prediction mode usage of the encoded blocks in the encoded region, and / or determining the intra prediction mode usage of the decoded blocks in the decoded region, for example, as shown in FIG. 12, there are coding blocks 4 and 6 adjacent to the to-be-predicted block (i.e., the current block) and coding blocks 1, 2, 3, 5, 7, and 8 not adjacent to the to-be-predicted block in the encoded region, and as shown in FIG. 13, there are decoded blocks 4 and 6 adjacent to the to-be-predicted block and decoded blocks 1, 2, 3, 5, 7, and 8 not adjacent to the to-be-predicted block in the decoded region.
[0508] Optionally, the number of the prediction modes corresponding to the OBIC mode is 67, and the number of the prediction modes corresponding to the improved OBIC mode is greater than 67, for example, 131.
[0509] Optionally, the at least part of the prediction directions corresponding to the prediction modes corresponding to the improved OBIC mode covers the prediction directions corresponding to the 67 prediction modes corresponding to the OBIC mode, and the number of the prediction modes is increased by filling the angle intervals between the angle prediction modes in the original prediction modes.
[0510] In the embodiment, the dominant prediction direction related to the at least one reference region of the current block can be accurately captured by the area histogram, so that the appropriate first prediction mode and / or the second prediction mode are matched for the current block.
[0511] Optionally, the coded image block corresponding to the current block is a neighboring or reference image block that has been coded (or decoded) before the current block, and these blocks can provide the prediction information in space and / or time for the prediction of the current block.
[0512] Optionally, the usage frequency histogram of the prediction modes of the coded image block records the usage frequencies of different intra-prediction modes in the coded image block, and the usage frequencies of the different intra-prediction modes recorded in the usage frequency histogram can be used to determine which prediction modes are frequently used in the coded region.
[0513] Optionally, the first prediction mode is determined or obtained according to the prediction mode corresponding to the prediction direction whose usage frequency satisfies the fifth condition in the usage frequency histogram.
[0514] Optionally, the fifth condition can be the usage frequency that is in a front position or order after being sorted according to a preset sorting rule, and / or the fifth condition can be the usage frequency that is in a preset position (for example, the preset position is the first place) or a preset order range (for example, the preset order range is the first to third places) after being sorted according to a preset sorting rule, for example, the preset sorting rule can be a sorting rule of arranging the usage frequencies from large to small, and the prediction mode corresponding to the prediction direction whose usage frequency is in the first three in the usage frequency histogram is determined as the first prediction mode.
[0515] In the embodiment, the prediction mode with a higher usage frequency in the coded image block related to the current block can be accurately captured by the usage frequency histogram, so that the appropriate first prediction mode and / or the second prediction mode are matched for the current block.
[0516] Mode A2, at least one gradient operator.
[0517] Optionally, the step S10 comprises: determining or obtaining the first prediction mode according to the at least one gradient operator; if the first prediction mode and / or the current block satisfies the first condition, performing the prediction processing on the current block according to a second prediction mode determined or obtained by the first prediction mode; if the first prediction mode and / or the current block does not satisfy the first condition, performing the prediction processing on the current block according to the first prediction mode.
[0518] Optionally, the first prediction mode comprises at least one prediction mode, and the at least one prediction mode in the first prediction mode is determined or obtained according to the at least one gradient operator.
[0519] Optionally, the gradient operator is a tool and / or method for determining or obtaining at least one gradient information, and is capable of extracting pixel gradient information from an image through convolution operation or other mathematical operation, and the gradient information comprises gradient direction and / or gradient amplitude.
[0520] Optionally, the at least one gradient operator comprises at least one pair of mutually perpendicular gradient operators.
[0521] In the embodiment, the gradient operator can accurately capture the dominant prediction direction (such as vertical, horizontal or diagonal line) related to the current block and / or at least one reference region thereof, so as to match the appropriate first prediction mode and / or second prediction mode for the current block.
[0522] Mode A3, the first mode list.
[0523] Optionally, the step S10 comprises: determining or obtaining the first prediction mode according to the first mode list; if the first prediction mode and / or the current block satisfies the first condition, performing the prediction processing on the current block according to a second prediction mode determined or obtained by the first prediction mode; if the first prediction mode and / or the current block does not satisfy the first condition, performing the prediction processing on the current block according to the first prediction mode.
[0524] Optionally, the step S10 comprises: determining or obtaining the first prediction mode according to at least one of the at least one statistical histogram corresponding to the current block, the at least one gradient operator and the first mode list; if the first prediction mode and / or the current block satisfies the first condition, performing the prediction processing on the current block according to a second prediction mode determined or obtained by the first prediction mode; if the first prediction mode and / or the current block does not satisfy the first condition, performing the prediction processing on the current block according to the first prediction mode.
[0525] Optionally, the first prediction mode comprises at least one prediction mode, and the at least one prediction mode in the first prediction mode is determined or obtained according to the first mode list.
[0526] Optionally, the first mode list is a set of at least one prediction mode, providing a plurality of possible mode options for the prediction of the current block, and by comparing the prediction effects of different modes in the first mode list, an appropriate prediction mode can be matched for the current block to improve the prediction accuracy for the current block.
[0527] Optionally, the first mode list is at least one mode list, and the prediction modes in the at least one mode list are different or at least partially the same.
[0528] Optionally, the first mode list includes an MPM (Most Probable Mode) list. Optionally, the first mode list in the embodiments of the present application can be an improved MPM list.
[0529] Optionally, the MPM list is a set of a plurality of prediction modes, which are considered to be the most likely prediction modes suitable for the current block, and the determination or obtaining of the MPM list is based on the neighborhood information (such as the prediction modes of the above block and the left block) and the statistical information (such as the probability of mode occurrence) of the current block. In this way, the MPM list can reduce the amount of mode information that needs to be transmitted by the encoder, and at the same time improve the prediction accuracy of the prediction mode by the decoder.
[0530] Optionally, the first prediction mode is determined or obtained according to the candidate modes in the first mode list.
[0531] Optionally, the candidate mode is a specific prediction mode option in the mode list, which is a prediction mode that can be used in the prediction process of the current block.
[0532] Optionally, in the intra prediction, the candidate modes in the first mode list can include at least one angular prediction mode, at least one non-angular prediction mode and / or at least one derived mode of the prediction mode.
[0533] Optionally, the candidate modes in the first mode list include prediction modes belonging to a first number of prediction modes and / or prediction modes belonging to a second number of prediction modes.
[0534] Optionally, the first prediction mode is determined or obtained according to the candidate modes in the first mode list and at least one reference region of the current block.
[0535] Optionally, the first mode list is determined or obtained according to the gradient information of at least one reference region of the current block.
[0536] Optionally, the first mode list is determined or obtained according to at least one reference region of the current block and a neural network model.
[0537] Optionally, the first mode list is determined or obtained according to pixels of at least one reference region of the current block and the neural network model.
[0538] Optionally, the first mode list is determined or obtained according to pixels of at least one reference region of the current block, gradient information of the at least one reference region and the neural network model.
[0539] Optionally, the first mode list is determined or obtained according to at least one prediction mode and / or confidence of the at least one prediction mode in the first number and / or the second number, which are determined or obtained by taking at least one reference region of the current block, pixels of the at least one reference region and / or gradient information of the at least one reference region as inputs of the neural network model, and according to the at least one prediction mode and / or the confidence of the at least one prediction mode output by the neural network model.
[0540] Optionally, the first mode list is determined or obtained according to at least one candidate mode, which is determined or obtained from the at least one prediction mode in the first number and / or the second number output by the neural network model according to the confidence of the at least one prediction mode determined or obtained by the neural network model.
[0541] Optionally, the confidence is a quantitative index of certainty degree of the model to the current prediction result.
[0542] In the embodiment, the first mode list can provide the current block with the first prediction mode having a better fitting degree, effectively narrows the search range of the first prediction mode, improves the processing efficiency, and improves the prediction effect of the current block.
[0543] Fourth embodiment
[0544] Based on any one of the above embodiments, a fourth embodiment is provided.
[0545] In the embodiment, the statistical histogram is determined or obtained according to at least one of the following manners B1 to B6:
[0546] Manner B1, gradient information of at least one reference region of the current block.
[0547] Optionally, the statistical histogram includes a gradient histogram, and the first prediction mode includes at least one prediction mode.
[0548] Optionally, the step S10 includes: determining or obtaining at least one gradient histogram corresponding to the current block according to gradient information of at least one reference region of the current block, determining or obtaining the first prediction mode according to the at least one gradient histogram, if the first prediction mode and / or the current block satisfy a first condition, performing prediction processing on the current block according to a second prediction mode determined or obtained by the first prediction mode, and if the first prediction mode and / or the current block do not satisfy the first condition, performing prediction processing on the current block according to the first prediction mode.
[0549] Optionally, the gradient information comprises a gradient direction and / or a gradient magnitude, the gradient direction representing a direction in which a gray value changes most rapidly at a pixel in the image (e.g., the at least one reference region), i.e., a direction perpendicular to an edge, and the gradient magnitude representing an intensity of the gray value change at the pixel, i.e., a degree of saliency of the edge.
[0550] Optionally, the gradient information of the at least one reference region comprises gradient information of pixels in the at least one reference region, and the gradient information of the pixels in the at least one reference region comprises quantized gradient directions.
[0551] Optionally, an initial gradient direction of a pixel in the at least one reference region is determined or obtained, and a quantized gradient direction of the pixel is determined or obtained according to an angle difference between the determined or obtained initial gradient direction and a gradient direction adjacent to the initial gradient direction in the at least one lookup table.
[0552] Optionally, the angle difference can be information representing an angle difference associated with the gradient direction.
[0553] Optionally, the initial gradient direction is compared with gradient directions adjacent to the initial gradient direction on the left and right in the at least one lookup table, and if an angle difference between the initial gradient direction and a gradient direction adjacent to the initial gradient direction on the left is smaller than an angle difference between the initial gradient direction and a gradient direction adjacent to the initial gradient direction on the right, the quantized gradient direction of the pixel is the gradient direction adjacent to the initial gradient direction on the left; and / or, if the angle difference between the initial gradient direction and the gradient direction adjacent to the initial gradient direction on the left is greater than the angle difference between the initial gradient direction and the gradient direction adjacent to the initial gradient direction on the right, the quantized gradient direction of the pixel is the gradient direction adjacent to the initial gradient direction on the right.
[0554] Optionally, an initial gradient direction of a pixel is determined or obtained, initial gradient direction information associated with the initial gradient direction of the pixel is determined or obtained, and quantized gradient direction information of the pixel is determined or obtained according to a difference value between the determined or obtained initial gradient direction information and gradient direction information adjacent to the initial gradient direction information in the at least one lookup table.
[0555] Optionally, the initial gradient direction information is compared with gradient direction information adjacent to the initial gradient direction information on the left and right in the at least one lookup table, and if a difference value between the initial gradient direction information and gradient direction information adjacent to the initial gradient direction information on the left is smaller than a difference value between the initial gradient direction information and gradient direction information adjacent to the initial gradient direction information on the right, the quantized gradient direction information of the pixel is the gradient direction information adjacent to the initial gradient direction information on the left; and / or, if the difference value between the initial gradient direction information and the gradient direction information adjacent to the initial gradient direction information on the left is greater than the difference value between the initial gradient direction information and the gradient direction information adjacent to the initial gradient direction information on the right, the quantized gradient direction information of the pixel is the gradient direction information adjacent to the initial gradient direction information on the right.
[0556] Optionally, the gradient direction information is a tangent value of the gradient direction or a scaled tangent value.
[0557] Optionally, if the gradient direction x in the gradient information is between the first gradient direction and the second gradient direction in the at least one lookup table, the at least one gradient histogram corresponding to the current block is determined or obtained according to an angle difference or a difference value between the gradient direction information x and the first gradient direction information and the second gradient direction information.
[0558] Optionally, if the gradient direction x in the gradient information is between the first gradient direction and the second gradient direction in the at least one lookup table, the gradient direction X is decomposed into a gradient direction A and a gradient direction B according to an angle difference or a difference value between the gradient direction information and the first gradient direction information and the second gradient direction information, and the at least one gradient histogram corresponding to the current block is determined or obtained according to the gradient direction A and the gradient direction B.
[0559] Optionally, a first weight related to the gradient direction A is determined or obtained according to an angle difference or a difference value between the gradient direction information x corresponding to the gradient direction X and the first gradient direction information, a second weight related to the gradient direction B is determined or obtained according to an angle difference or a difference value between the gradient direction information x corresponding to the gradient direction X and the second gradient direction information, a gradient magnitude MA of the gradient direction A is determined or obtained according to the first weight and the gradient magnitude M corresponding to the gradient direction X, and a gradient magnitude MB of the gradient direction B is determined or obtained according to the second weight and the gradient magnitude M corresponding to the gradient direction X, for example, the gradient magnitude MA is equal to the first weight * the gradient magnitude M, and the gradient magnitude MB is equal to the second weight * the gradient magnitude M.
[0560] Optionally, the gradient direction A is the first gradient direction, and the gradient direction B is the second gradient direction, and the first weight is equal to a difference value between the gradient direction information x and the second gradient direction information or a difference value between the first gradient direction information and the second gradient direction information, and the second weight is equal to a difference value between the gradient direction information x and the first gradient direction information or a difference value between the first gradient direction information and the second gradient direction information.
[0561] Optionally, if the gradient direction in the gradient information is between the first direction and the second direction in the at least one lookup table, weight information corresponding to the first direction and the second direction is determined or obtained according to an angle difference between the gradient direction and the first direction and the second direction, and the at least one gradient histogram is determined or obtained according to the gradient magnitude in the gradient information and the weight information corresponding to the first direction and the second direction.
[0562] Optionally, if the gradient direction in the gradient information is a, located between a first direction (e.g., a1) and a second direction (e.g., a2) in the at least one lookup table, the weight information corresponding to a1 and a2 is determined or obtained according to the angle difference between a and a1 and a2, for example, a1 corresponds to weight w1, and a2 corresponds to weight w2, the gradient magnitude in the gradient information is b, and the at least one gradient histogram is determined or obtained according to the gradient magnitude b and the weight information w1 and w2 corresponding to the first direction and the second direction, the gradient magnitude corresponding to the first direction a1 in the gradient histogram is b*w1, and the gradient magnitude corresponding to the second direction a2 is b*w2. Optionally, the weight w1 is equal to the angle difference between a and a2 or the angle difference between a1 and a2, and the weight w2 is equal to the angle difference between a and a1 or the angle difference between a1 and a2.
[0563] In the embodiment, when the gradient direction is located between two prediction directions, the gradient magnitude is allocated according to the angle difference between the gradient direction and the prediction direction, so that the error caused by hard classification can be avoided, and the accuracy of angle prediction is improved.
[0564] Optionally, the gradient information of the reference region includes the gradient information of at least one pixel in the reference region and / or the overall gradient information of the reference region.
[0565] Optionally, the at least one gradient histogram is determined or obtained according to the overall gradient information and / or the gradient information of the pixel of the at least one reference region of the current block.
[0566] Optionally, the gradient information of the pixel is the gradient direction and / or the gradient magnitude of each pixel point in the reference region, which reflects the local change characteristics of the point.
[0567] Optionally, the overall gradient information of the reference region is the statistical and / or aggregation of the gradient information of all pixels in the reference region, which reflects the global change trend of the region.
[0568] Optionally, the gradient information of the pixel includes: a first pixel gradient component, a second pixel gradient component, a pixel gradient direction and / or a pixel gradient magnitude.
[0569] Optionally, the gradient information of at least one pixel in the reference region is determined or obtained according to at least one pair of mutually perpendicular gradient operators, and the at least one pair of mutually perpendicular gradient operators includes: a first gradient operator (e.g., a horizontal gradient operator Gx) and a second gradient operator (e.g., a vertical gradient operator Gy) corresponding to different directions, the value determined or obtained according to the first gradient operator is a first pixel gradient component (e.g., the value of Gx), and the value determined or obtained according to the second gradient operator is a second pixel gradient component (e.g., the value of Gy).
[0570] Optionally, the pixel gradient direction and / or the pixel gradient magnitude are determined or obtained according to the first pixel gradient component and the second pixel gradient component.
[0571] Optionally, the gradient information comprises: a first gradient component (e.g., a first pixel gradient component and / or a first overall gradient component), a second gradient component (e.g., a second pixel gradient component and / or a second overall gradient component), a gradient direction (e.g., a pixel gradient direction and / or an overall gradient direction), and / or a gradient magnitude (e.g., a pixel gradient magnitude and / or an overall gradient magnitude).
[0572] Optionally, the overall gradient information comprises: a first overall gradient component, a second overall gradient component, an overall gradient direction, and / or an overall gradient magnitude.
[0573] Optionally, the manner of determining or obtaining the overall gradient information of the reference region comprises: determining or obtaining gradient information of at least one pixel in the reference region, the gradient information of the at least one pixel comprising: a first pixel gradient component and a second pixel gradient component, determining or obtaining the first overall gradient component according to a sum of the first pixel gradient components corresponding to the reference region, determining or obtaining the second overall gradient component according to a sum of the second pixel gradient components corresponding to the reference region, determining or obtaining an overall gradient magnitude according to a sum of absolute values of the first overall gradient component and the second overall gradient component, and determining or obtaining an overall gradient direction according to the first overall gradient component and the second overall gradient component.
[0574] Optionally, the direct summation in the above manner can preserve the directional statistical characteristics, and the result after the synthesis can represent the overall gradient vector.
[0575] Optionally, the gradient information of the at least one pixel in the reference region comprises: a first pixel gradient component (Gx1, Gx2,..., GxN) and a second pixel gradient component (Gy1, Gy2,..., GyN), the first overall gradient component is determined or obtained according to a sum of the first pixel gradient components corresponding to the reference region, i.e., Gx = Gx1+Gx2+...+GxN, the second overall gradient component is determined or obtained according to a sum of the second pixel gradient components corresponding to the reference region, i.e., Gy = Gy1+Gy2+...+GyN, an overall gradient magnitude AMP is determined or obtained according to a sum of absolute values of the first overall gradient component and the second overall gradient component, i.e., AMP = |Gx|+|Gy|, and an overall gradient direction is determined or obtained according to the first overall gradient component and the second overall gradient component. n n sum n sum n sum sum sum sum I, the overall gradient direction is calculated by arctan(Gx sum / Gy sum ) or arctan(Gy sum / Gx sum ).
[0576] Optionally, the determining or obtaining manner of the overall gradient information of the reference region comprises: determining or obtaining gradient information of at least one pixel in the reference region, including: a first pixel gradient component, a second pixel gradient component, a pixel gradient direction, and a pixel gradient amplitude; determining or obtaining an overall gradient amplitude according to a sum of absolute values of the first pixel gradient component and the second pixel gradient component corresponding to the reference region, and / or a number of corresponding pixel gradient amplitudes that are not zero in the pixel gradient direction of the reference region and the sum of absolute values of the first pixel gradient component and the second pixel gradient component corresponding to the reference region; determining or obtaining a first overall gradient component according to a sum of the first pixel gradient components corresponding to the reference region; determining or obtaining a second overall gradient component according to a sum of the second pixel gradient components corresponding to the reference region; and determining or obtaining an overall gradient direction according to the first overall gradient component and the second overall gradient component.
[0577] Optionally, the determining or obtaining manner of the gradient information of at least one pixel in the reference region comprises: a first pixel gradient component (Gx1, Gx2,..., Gxn) and a second pixel gradient component (Gy1, Gy2,..., Gyn), a pixel gradient direction, and a pixel gradient amplitude; and the overall gradient amplitude is determined or obtained according to a sum of absolute values of the first pixel gradient component and the second pixel gradient component corresponding to the reference region, and a number of corresponding pixel gradient amplitudes that are not zero in the pixel gradient direction of the reference region, that is, the overall gradient amplitude AMP sum = |Gx1| + |Gx2| +... + |Gx n | + |Gy1| + |Gy2| +... + |Gy n |, or the overall gradient amplitude AMP sum = (|Gx1| + |Gx2| +... + |Gx n | + |Gy1| + |Gy2| +... + |Gy n |) / n, where n is the number of corresponding pixel gradient amplitudes that are not zero in the pixel gradient direction of the reference region, for example, if there are 10 directions in the pixel gradient direction of the reference region corresponding to pixel gradient amplitudes that are not zero, then n is 10; a first overall gradient component is determined or obtained according to a sum of the first pixel gradient components corresponding to the reference region, that is, the first overall gradient component Gx sum = Gx1 + Gx2 +... + Gx n ; a second overall gradient component is determined or obtained according to a sum of the second pixel gradient components corresponding to the reference region, that is, the second overall gradient component Gy sum= Gy1+ Gy2+... + Gy n The overall gradient direction is calculated by arctan(Gx sum / Gy sum ) or arctan(Gy sum / Gx sum ).
[0578] Optionally, the average value of the absolute value can be obtained by the above manner, and the gradient strength can be stably measured and anti-interference.
[0579] Optionally, in the case where the overall gradient information of the reference region is determined or obtained according to the sum of the absolute values of the first pixel gradient component and the second pixel gradient component corresponding to the reference region, if the overall gradient information is directly fused with the gradient information of the pixel corresponding to the reference region, the overall gradient amplitude corresponding to the overall gradient information in the gradient histogram determined or obtained will be the maximum amplitude in the histogram, thereby interfering with the selection of the first prediction mode. In order to avoid the influence of the overall gradient amplitude information, the gradient histogram can be determined or obtained according to the overall gradient information, the weight information corresponding to the overall gradient amplitude, and the gradient information of at least one pixel of the reference region, thereby ensuring the fair competition of the gradient information, balancing the consistency requirements of the strength and the direction, and / or determining the prediction mode corresponding to the overall gradient direction in the overall gradient information as mode 1, determining or obtaining the gradient histogram according to the gradient information of at least one pixel of the reference region, determining or obtaining at least one mode 2 according to the gradient histogram, and determining the first prediction mode as mode 1 and at least one mode 2.
[0580] Optionally, if the first prediction mode and / or the current block satisfies the first condition, the second prediction mode (e.g., mode 1' and at least one mode 2') determined or obtained according to the first prediction mode (e.g., mode 1 and at least one mode 2) is determined or obtained, at least one prediction result 1 of the current block is determined or obtained according to mode 1', at least one prediction result 2 of the current block is determined or obtained according to at least one mode 2', and the target prediction result of the current block is determined or obtained according to the at least one prediction result 1, the at least one prediction result 2, and the weight information corresponding to the at least one prediction result 1.
[0581] Optionally, the overall gradient information includes the overall gradient direction and the overall gradient amplitude, the gradient histogram 1 is determined or obtained according to the gradient information of at least one pixel corresponding to the reference region, the gradient amplitude corresponding to the same direction as the overall gradient direction in the gradient histogram 1 is replaced with the overall gradient amplitude, the gradient histogram 2 is determined or obtained, and the first prediction mode is determined or obtained according to the gradient histogram 2.
[0582] Optionally, the first prediction mode includes: the prediction mode corresponding to the overall gradient information, the prediction mode determined or obtained according to the gradient histogram, and / or the non-angle prediction mode.
[0583] Optionally, in the case that the prediction mode determined or obtained according to the gradient histogram comprises the prediction mode corresponding to the overall gradient information, the weight information corresponding to the first prediction mode is determined or obtained according to the weight information corresponding to the prediction mode corresponding to the overall gradient information, the first prediction mode comprising: the prediction mode corresponding to the overall gradient information, the prediction mode determined or obtained according to the gradient histogram and / or the non-angular prediction mode.
[0584] Optionally, in the case that a certain first prediction mode is determined as the prediction mode of the current block, the weight information corresponding to the second prediction mode determined or obtained according to the first prediction mode can be determined or obtained according to the weight information corresponding to the first prediction mode.
[0585] Optionally, in the case that a certain first prediction mode is determined as the prediction mode of the current block, the weight information corresponding to the first prediction mode is determined as the weight information corresponding to the second prediction mode determined or obtained according to the first prediction mode.
[0586] Optionally, the weight information corresponding to the first prediction mode and the weight information corresponding to the second prediction mode determined or obtained according to the first prediction mode can be the same or different.
[0587] Optionally, the prediction mode determined or obtained according to the gradient histogram determined or obtained according to the gradient information of at least one pixel in the reference region comprises: mode a1, mode a2 and mode a3, the weight of each of mode a1, mode a2 and mode a3 can be determined according to the sum of the gradient magnitudes corresponding to each of them in the gradient histogram, for example, the weight value of mode a1 is 0.4, the weight value of mode a2 is 0.3, and the weight value of mode a3 is 0.3 according to the sum of the gradient magnitudes corresponding to each of them in the gradient histogram, and mode a1 is the prediction mode corresponding to the overall gradient information, the weight values of mode a2 and mode a3 are adjusted according to the weight value of mode a1, for example, since the prediction mode corresponding to the overall gradient information is taken as the first prediction mode by default, the weight value of mode a1 can be modified from the weight determined according to the sum of the gradient magnitudes corresponding to each of them in the gradient histogram to a fixed weight corresponding to the overall gradient information, the value of the fixed weight being a preset value, the weights of mode a2 and mode a3 are determined according to the fixed weight and the sum of the gradient magnitudes of mode a2 and mode a3 in the gradient histogram, for example, if the fixed weight is 0.6, the sum of the gradient magnitudes of mode a2 and mode a3 is 50, then the weight of mode a2 is 0.2, and the weight of mode a3 is 0.2.
[0588] Optionally, the first prediction mode includes: a prediction mode determined or obtained according to a gradient histogram and a planar mode, the prediction mode determined or obtained according to the gradient histogram includes a prediction mode corresponding to overall gradient information, in this embodiment, the prediction mode determined or obtained according to the gradient histogram determined or obtained according to gradient information of at least one pixel in the reference region includes: mode a1, mode a2 and mode a3, the mode a1 is the prediction mode corresponding to the overall gradient information, a fixed weight is used for the prediction mode corresponding to the overall gradient information, for example, the fixed weight is equal to 0.2, the planar mode uses a fixed weight 0.3, the weight of the mode a2 and the mode a3 is determined by the sum of gradient amplitudes corresponding to the mode a2 and the mode a3 in the gradient histogram, if the sum of gradient amplitudes of the mode a2 is 20, the sum of gradient amplitudes of the mode a3 is 30, the weight corresponding to the mode a2 is 0.2, the weight corresponding to the mode a3 is 0.3, the weight of the mode a2 can be determined according to formula (five); W a2 = (1 - W a1 -W planar )*(AMP a2 / (AMP a2 + AMP a3 )) ; Formula (five)
[0589] Wa2 is the weight of the mode a2, W a1 is the weight of the mode a1, AMP a2 is the sum of gradient amplitudes of the mode a2, AMP a3 is the sum of gradient amplitudes of the mode a3.
[0590] The weight of the mode a3 can be determined according to formula (six); W a3 = (1 - W a1 -W planar )*(AMP a3 / (AMP a2 + AMP a3 )) ; Formula (six)
[0591] Wa2 is the weight of the mode a2, W a1 is the weight of the mode a1, AMP a2 is the sum of gradient amplitudes of the mode a2, AMP a3 is the sum of gradient amplitudes of the mode a3.
[0592] Optionally, the first prediction mode comprises: a prediction mode determined or obtained according to the gradient histogram and a planar mode, the prediction mode determined or obtained according to the gradient histogram does not comprise a prediction mode corresponding to the overall gradient information, in this embodiment, a fixed weight is adopted for the prediction mode corresponding to the overall gradient information, for example, the fixed weight is equal to 0.2, the planar mode adopts a fixed weight of 0.3, on this basis, the weights of mode a2 and mode a3 are determined by the sum of the gradient amplitudes corresponding to mode a2 and mode a3 in the gradient histogram, if the sum of the gradient amplitudes of mode a2 is 20, the sum of the gradient amplitudes of mode a3 is 30, the weight corresponding to mode a2 is 0.2, and the weight corresponding to mode a3 is 0.3, optionally, the weights corresponding to mode a2 and mode a3 can be determined or obtained by the above formula (five) and formula (six).
[0593] In this embodiment, by combining the gradient information and / or the overall gradient information of the pixels, the gradient histogram determined or obtained can take into account both local details and global structure, and the first prediction mode determined or obtained based on the gradient histogram can be consistent with the content of the current block, thereby improving the prediction accuracy of the second prediction mode determined or obtained based on the first prediction mode.
[0594] Mode B2, at least one reference region of the current block and at least one lookup table.
[0595] Optionally, the at least one lookup table comprises: a lookup table A and / or a lookup table B, the number of prediction modes corresponding to the lookup table A is a first number, the number of prediction modes corresponding to the lookup table B is a second number, the first number and the second number are the same or different.
[0596] Optionally, the first number is 35, 67 or 131, for example, the first number is 131.
[0597] Optionally, the first number is greater than 35, 67 or 131.
[0598] Optionally, the second number is 35, 67 or 131, for example, the second number is 67.
[0599] Optionally, the second number is less than or equal to 35, 67 or 131.
[0600] Optionally, the first number and the second number are the same, that is, the number of prediction modes corresponding to the lookup table A is the same as the number of prediction modes corresponding to the lookup table B, for example, the number of prediction modes corresponding to the lookup table A and the lookup table B is the same, but the types of the prediction modes corresponding to each other are at least partially different.
[0601] Optionally, the first number and the second number are different, for example, the first number is greater than the second number.
[0602] Optionally, the prediction mode corresponding to the look-up table A is different from the prediction mode corresponding to the look-up table B, or the prediction mode corresponding to the look-up table A is at least partially the same as the prediction mode corresponding to the look-up table B.
[0603] Optionally, the look-up table A is a look-up table corresponding to 37 prediction modes or a look-up table corresponding to 131 prediction modes.
[0604] Optionally, the look-up table B is a look-up table corresponding to 37 prediction modes or a look-up table corresponding to 131 prediction modes.
[0605] Optionally, the step S10 comprises: determining or obtaining at least one statistical histogram according to the at least one reference region of the current block and the at least one look-up table, determining or obtaining a first prediction mode according to the at least one statistical histogram, the first prediction mode comprising at least one prediction mode, if the first prediction mode and / or the current block satisfy a first condition, performing prediction processing on the current block according to a second prediction mode determined or obtained through the first prediction mode, and if the first prediction mode and / or the current block do not satisfy the first condition, performing prediction processing on the current block according to the first prediction mode.
[0606] Optionally, the number of the prediction modes corresponding to the look-up table A is a first number, and at least one statistical histogram A is determined or obtained according to the at least one reference region of the current block and the look-up table A, the number of the prediction modes corresponding to the statistical histogram A being the first number.
[0607] Optionally, the number of the prediction modes corresponding to the look-up table B is a second number, and at least one statistical histogram B is determined or obtained according to the at least one reference region of the current block and the look-up table B, the number of the prediction modes corresponding to the statistical histogram B being the second number.
[0608] Optionally, at least one statistical histogram A is determined or obtained according to the at least one reference region of the current block and the look-up table A, at least one statistical histogram B is determined or obtained according to the at least one reference region of the current block and the look-up table B, and a first prediction mode is determined or obtained according to the at least one statistical histogram A and the at least one statistical histogram B.
[0609] Optionally, at least one gradient histogram is determined or obtained according to the gradient information of the at least one reference region of the current block and the at least one look-up table, the gradient information comprising: pixel gradient information and / or overall gradient information, the gradient information, the pixel gradient information and / or the overall gradient information comprising: at least one of gradient amplitude and gradient direction.
[0610] Optionally, the at least one lookup table comprises: a lookup table A, the number of prediction modes corresponding to the lookup table A is a first number, for example, 131, and at least one gradient histogram A is determined or obtained according to the gradient information of the at least one reference region of the current block and the lookup table A, the number of prediction modes corresponding to the gradient histogram A is the first number.
[0611] Optionally, the at least one lookup table comprises: a lookup table B, the number of prediction modes corresponding to the lookup table B is a second number, for example, 67, and at least one gradient histogram B is determined or obtained according to the gradient information of the at least one reference region of the current block and the lookup table B, the number of prediction modes corresponding to the gradient histogram B is the second number.
[0612] Optionally, the at least one lookup table comprises: a lookup table A and a lookup table B, the number of prediction modes corresponding to the lookup table A is a first number, for example, 131, the number of prediction modes corresponding to the lookup table B is a second number, for example, 67, at least one gradient histogram A is determined or obtained according to the gradient information of the at least one reference region of the current block and the lookup table A, the number of prediction modes corresponding to the gradient histogram A is the first number, and at least one gradient histogram B is determined or obtained according to the gradient information of the at least one reference region of the current block and the lookup table B, the number of prediction modes corresponding to the gradient histogram B is the second number.
[0613] Optionally, the processing method of the embodiments of the present application can be applied to an intra prediction module of a codec, and the upstream and downstream modules of the intra prediction module, for example, the upstream modules such as reference pixel management and mode candidate list generation, and the downstream modules such as residual transformation, entropy coding, loop filtering, and the like, which need to adjust parameters according to the prediction mode, the number of prediction modes corresponding to the modules may be the same as or different from the number of prediction modes corresponding to the intra prediction module, in the case that the number of prediction modes corresponding to the intra prediction module is different from the number of prediction modes corresponding to the upstream and downstream modules, mode index remapping can be performed, for example, the index in the 131 prediction modes in the intra prediction module is mapped to the 67 prediction modes, the mode index remapping can be realized by table lookup or rule derivation to achieve compatibility, and optionally, part of the modes can trigger specific residual correction, and the 131 modes can be converted into compatible correction parameters before mapping.
[0614] In the embodiments, according to the at least one reference region of the current block and the at least one lookup table, the statistical histogram corresponding to different prediction modes can be determined or obtained, the statistical histogram can be used to quickly exclude irrelevant prediction modes, improve the prediction efficiency, and accurately capture the dominant prediction direction related to the at least one reference region of the current block, thereby matching the appropriate first prediction mode and / or second prediction mode for the current block.
[0615] Optionally, the at least one lookup table comprises: a lookup table A, the number of prediction modes corresponding to the lookup table A is a first number, for example, 131, and at least one gradient histogram A is determined or obtained according to the gradient information of the at least one reference region of the current block and the lookup table A, the number of prediction modes corresponding to the gradient histogram A is the first number.
[0616] Optionally, the statistical histogram comprises a gradient histogram, and the step S10 comprises: determining or obtaining at least one gradient histogram according to at least one gradient operator corresponding to at least one reference region of the current block and at least one lookup table, determining or obtaining the first prediction mode according to the at least one gradient histogram, if the first prediction mode and / or the current block satisfy a first condition, performing the prediction processing on the current block according to a second prediction mode determined or obtained through the first prediction mode, and if the first prediction mode and / or the current block do not satisfy the first condition, performing the prediction processing on the current block according to the first prediction mode.
[0617] Optionally, the at least one lookup table comprises: a lookup table A and / or a lookup table B, a number of prediction modes corresponding to the lookup table A is a first number, and a number of prediction modes corresponding to the lookup table B is a second number, the first number and the second number are same or different.
[0618] Optionally, the first number is 35, 67 or 131, for example, the first number is 131.
[0619] Optionally, the first number is greater than 35, 67 or 131.
[0620] Optionally, the second number is 35, 67 or 131, for example, the second number is 67.
[0621] Optionally, the second number is less than or equal to 35, 67 or 131.
[0622] Optionally, the first number and the second number are same, that is, the number of prediction modes corresponding to the lookup table A is same as the number of prediction modes corresponding to the lookup table B, for example, the number of prediction modes corresponding to the lookup table A and the number of prediction modes corresponding to the lookup table B are same, but the types of the prediction modes corresponding to the lookup table A and the prediction modes corresponding to the lookup table B are at least partially different.
[0623] Optionally, the first number and the second number are different, for example, the first number is greater than the second number.
[0624] Optionally, the lookup table A corresponds to gradient operators A1 and A2, the lookup table B corresponds to gradient operators B1 and B2, and the gradient operators A1-A2 and the gradient operators B1-B2 are all different.
[0625] Optionally, the prediction modes corresponding to the lookup table A and the prediction modes corresponding to the lookup table B are different, or the prediction modes corresponding to the lookup table A and the prediction modes corresponding to the lookup table B are at least partially same.
[0626] Optionally, the lookup table A can be a lookup table corresponding to 37 prediction modes or a lookup table corresponding to 131 prediction modes.
[0627] Optionally, the look-up table B can be a look-up table corresponding to 37 prediction modes or a look-up table corresponding to 131 prediction modes.
[0628] Optionally, the gradient information of the at least one reference region of the current block is determined or obtained according to at least one gradient operator corresponding to the at least one reference region of the current block and the at least one look-up table, and the at least one gradient histogram is determined or obtained according to the gradient information of the at least one reference region of the current block.
[0629] Optionally, the first number is greater than the second number, and the prediction directions corresponding to the prediction modes corresponding to the look-up table A at least partially cover the prediction directions corresponding to the prediction modes corresponding to the look-up table B, and the gradient operators need to match different directions to accurately calculate the gradient information, so that, in the case that the first number and the second number are different, the gradient information of the at least one reference region of the current block can be determined or obtained by using the at least one gradient operator corresponding to the look-up table A and / or the at least one gradient operator corresponding to the look-up table B, and the at least one gradient histogram is determined or obtained according to the gradient information of the at least one reference region of the current block.
[0630] Optionally, the first number is 131, the gradient information A of the at least one reference region of the current block is determined or obtained according to the at least one gradient operator corresponding to the look-up table A, and the at least one gradient histogram A is determined or obtained according to the gradient information A of the at least one reference region, and the gradient histogram A includes the gradient amplitude change of the at least one reference region in the prediction directions corresponding to the 131 prediction modes.
[0631] Optionally, the second number is 67, the gradient information B of the at least one reference region of the current block is determined or obtained according to the at least one gradient operator corresponding to the look-up table B, and the at least one gradient histogram B is determined or obtained according to the gradient information B of the at least one reference region, and the gradient histogram B includes the gradient amplitude change of the at least one reference region in the prediction directions corresponding to the 67 prediction modes.
[0632] Optionally, the first prediction mode is determined or obtained according to the at least one gradient histogram A and / or the at least one gradient histogram B.
[0633] Optionally, the gradient operator is a tool and / or a method for determining or obtaining the at least one gradient information, and is capable of extracting pixel gradient information, including a gradient direction and / or a gradient amplitude, from an image by using a convolution operation or other mathematical operations.
[0634] Optionally, the at least one gradient operator includes at least one pair of mutually perpendicular gradient operators.
[0635] Optionally, the mutually perpendicular gradient operators include a first pair of mutually perpendicular gradient operators and / or a second pair of mutually perpendicular gradient operators, and the first pair of gradient operators and the second pair of gradient operators are different.
[0636] Optionally, a first gradient information is determined or obtained based on a first pair of mutually perpendicular gradient operators, and at least one gradient histogram is determined or obtained based on the first gradient information.
[0637] Optionally, a second gradient information is determined or obtained based on a second pair of mutually perpendicular gradient operators, and at least one gradient histogram is determined or obtained based on the second gradient information.
[0638] Optionally, the first pair of mutually perpendicular gradient operators includes a 0° gradient operator and a 90° gradient operator. The horizontal gradient Gx and vertical gradient Gy can be calculated using a 3x3 horizontal (0°) Sober operator and a vertical (90°) Sober operator. For example, the horizontal (0°) gradient Gx and vertical (90°) gradient Gy for a pixel x4 in a pixel line can be calculated according to the following formulas (I) and (II).
[0639] Optionally, A can be a matrix consisting of nine pixels, centered on pixel x4, and including the pixel x1 above it, the pixel x3 to its left, the pixel x7 below it, the pixel x5 to its right, the pixel x0 to its upper left, the pixel x6 to its lower left, the pixel x2 to its upper right, and the pixel x8 to its lower right, as shown in Formula (III) below.
[0640] Optionally, the magnitude of gradient G is the sum of the absolute values of the horizontal and vertical gradients, and its calculation formula is shown in Formula (IV). G = |Gx| + |Gy| Formula (IV);
[0641] Alternatively, the gradient direction of a pixel can be calculated using arctan(Gx / Gy) or arctan(Gy / Gx).
[0642] Optionally, the second pair of mutually perpendicular gradient operators includes a +45° gradient operator and a -45° gradient operator, and the +45° gradient G can be calculated using the Prewitt operator, the Scharr operator, and / or the Sobel operator. +45° and -45° gradient G -45° For example, for a pixel x 4 in a pixel line, G +45° gradient and G -45° The gradient can be calculated using any pair of operators from Equation (VII) to Equation (XII).
[0643] Formulas (VII) and (VIII) are Prevet operators that can directly respond to diagonal edges through a reference template.
[0644] The formula (nine) and the formula (ten) are Sobel operators, the center pixel weight is 0, and the weights on both sides are symmetrically increased and decreased, which can enhance the diagonal edge response.
[0645] The formula (eleven) and the formula (twelve) are Scharr operators, which are more accurate in diagonal gradient calculation.
[0646] Optionally, A can be a matrix composed of the pixel x4 as the center, and the pixels x1 above the pixel x4, the pixel x3 on the left side of the pixel x4, the pixel x7 below the pixel x4, the pixel x5 on the right side of the pixel x4, the pixel x0 on the upper left side of the pixel x4, the pixel x6 on the lower left side of the pixel x4, the pixel x2 on the upper right side of the pixel x4, and the pixel x8 on the lower right side of the pixel x4, a total of 9 pixels, as shown in the following formula (three).
[0647] Optionally, the G gradient amplitude value is the sum of the absolute values of the horizontal gradient and the vertical gradient, and the calculation formula is shown in the formula (four). G = |Gx| + |Gy| Formula (four);
[0648] Optionally, the gradient direction corresponding to the pixel can be calculated by arctan(Gx / Gy) or arctan(Gy / Gx).
[0649] Optionally, only the gradient operators in the horizontal direction and the vertical direction are applied to determine the gradient histogram, and the prediction accuracy in the diagonal direction is low, therefore, the ±45° gradient operator is introduced in the embodiments of the present application to effectively improve the prediction accuracy in the diagonal direction.
[0650] Optionally, at least one gradient histogram of the current block is determined or obtained according to a first pair of gradient operators corresponding to at least one reference region of the current block and at least one lookup table, the at least one lookup table includes the lookup table A and / or the lookup table B, and the first pair of gradient operators includes a 0° (horizontal direction) gradient operator and a 90° (vertical direction) gradient operator.
[0651] Optionally, at least one gradient information of the current block is determined or obtained according to a first pair of gradient operators corresponding to at least one reference region of the current block and at least one lookup table, at least one gradient histogram is determined or obtained according to the at least one gradient information, the at least one lookup table includes the lookup table A and / or the lookup table B, and the first pair of gradient operators includes a 0° (horizontal direction) gradient operator and a 90° (vertical direction) gradient operator.
[0652] Optionally, at least one gradient information of the current block is determined or obtained according to at least one reference region of the current block and a second pair of mutually perpendicular gradient operators corresponding to at least one lookup table, and at least one gradient histogram of the current block is determined or obtained according to the at least one gradient information, the at least one lookup table comprises the lookup table A and / or the lookup table B, and the second pair of gradient operators comprises a +45° gradient operator and a -45° gradient operator.
[0653] Optionally, a prediction direction a corresponding to arctan(Gx / Gy) or arctan(Gy / Gx) is determined or obtained, and a prediction direction corresponding to arctan(Gx / Gy) or arctan(Gy / Gx) is determined or obtained according to an angle difference between each prediction direction in the at least one lookup table and the prediction direction a, for example, a direction with the smallest absolute angle difference is determined as the prediction direction corresponding to arctan(Gx / Gy) or arctan(Gy / Gx).
[0654] Optionally, the gradient direction can be determined or obtained through the lookup table, for example, a lookup table about arctan(a) is used to determine two indexes index1 and index2 closest to arctan(Gx / Gy) or arctan(Gy / Gx), and a prediction direction corresponding to the pixel is determined according to an angle difference between arctan(Gx / Gy) or arctan(Gy / Gx) and the index1 and the index2.
[0655] Optionally, if the gradient direction corresponding to arctan(Gx / Gy) or arctan(Gy / Gx) is located between a first direction and a second direction in the at least one lookup table according to the gradient information, at least one gradient histogram is determined or obtained according to an angle difference between the gradient direction corresponding to arctan(Gx / Gy) or arctan(Gy / Gx) and the first direction and the second direction.
[0656] Optionally, if the gradient direction corresponding to arctan(Gx / Gy) or arctan(Gy / Gx) is located between a first direction and a second direction in the at least one lookup table according to the gradient information, weight information corresponding to the first direction and the second direction is determined or obtained according to an angle difference between the gradient direction corresponding to arctan(Gx / Gy) or arctan(Gy / Gx) and the first direction and the second direction, and at least one gradient histogram is determined or obtained according to the weight information corresponding to the first direction and the second direction.
[0657] Optionally, if the gradient direction corresponding to arctan(Gx / Gy) or arctan(Gy / Gx) is located between the first direction and the second direction in the at least one look-up table, the weight information corresponding to the first direction and the second direction is determined or obtained according to the angle difference between the gradient direction corresponding to arctan(Gx / Gy) or arctan(Gy / Gx) and the first direction and the second direction, the gradient magnitude is determined or obtained according to the gradient information, and the at least one gradient histogram is determined or obtained according to the gradient magnitude and the weight information corresponding to the first direction and the second direction.
[0658] Optionally, if the gradient direction corresponding to arctan(Gx / Gy) or arctan(Gy / Gx) is a, located between the first direction (for example, a1) and the second direction (for example, a2) in the at least one look-up table, the weight information corresponding to a1 and a2 is determined or obtained according to the angle difference between a and a1 and a2, for example, a1 corresponds to weight w1, and a2 corresponds to weight w2, the gradient magnitude b is determined or obtained according to the gradient information, and the at least one gradient histogram is determined or obtained according to the gradient magnitude b and the weight information w1 and w2 corresponding to the first direction and the second direction, the gradient magnitude corresponding to the first direction a1 in the gradient histogram is b*w1, and the gradient magnitude corresponding to the second direction a2 in the gradient histogram is b*w2.
[0659] In the embodiment, the prediction accuracy of the gradient histogram in the diagonal direction is low only by applying the gradient operators in the horizontal direction and the vertical direction, and therefore, the gradient operators in different directions, for example, ±45°, are introduced in the embodiment to effectively improve the prediction accuracy in the diagonal direction.
[0660] Optionally, the weight information corresponding to the at least one pair of gradient operators is determined or obtained according to the gradient information of the at least one reference region of the current block.
[0661] Optionally, the statistics histogram includes the gradient histogram, the step S10 includes: determining or obtaining the at least one gradient histogram according to the at least one reference region of the current block and the weight information of the at least one pair of gradient operators, determining or obtaining the first prediction mode according to the at least one gradient histogram, the first prediction mode including at least one prediction mode, if the first prediction mode and / or the current block satisfy the first condition, performing the prediction processing on the current block according to the second prediction mode determined or obtained through the first prediction mode, and if the first prediction mode and / or the current block do not satisfy the first condition, performing the prediction processing on the current block according to the first prediction mode.
[0662] Optionally, at least one gradient histogram is determined or obtained according to the at least one reference region of the current block, the at least one pair of gradient operators corresponding to the at least one lookup table, and the weight information corresponding to the at least one pair of gradient operators, and the first prediction mode is determined or obtained according to the at least one gradient histogram.
[0663] Optionally, gradient information of the at least one reference region of the current block is determined or obtained according to the at least one reference region of the current block and the weight information corresponding to the at least one pair of gradient operators, at least one gradient histogram is determined or obtained according to the at least one gradient information, and the first prediction mode is determined or obtained according to the at least one gradient histogram.
[0664] Optionally, gradient information of the at least one reference region of the current block is determined or obtained according to the at least one reference region of the current block, the at least one pair of gradient operators corresponding to the at least one lookup table, and the weight information corresponding to the at least one pair of gradient operators, at least one gradient histogram is determined or obtained according to the at least one gradient information, and the first prediction mode is determined or obtained according to the at least one gradient histogram.
[0665] Optionally, the at least one lookup table comprises a lookup table A and / or a lookup table B, the number of prediction modes corresponding to the lookup table A is a first number, the number of prediction modes corresponding to the lookup table B is a second number, and the first number and the second number are the same or different.
[0666] Optionally, the first number is 35, 67 or 131, for example, the first number is 131.
[0667] Optionally, the first number is greater than 35, 67 or 131.
[0668] Optionally, the second number is 35, 67 or 131, for example, the second number is 67.
[0669] Optionally, the second number is less than or equal to 35, 67 or 131.
[0670] Optionally, the first number and the second number are the same, that is, the number of prediction modes corresponding to the lookup table A is the same as the number of prediction modes corresponding to the lookup table B, for example, the number of prediction modes corresponding to the lookup table A and the lookup table B is the same, but the types of the prediction modes corresponding to the lookup table A and the lookup table B are at least partially different.
[0671] Optionally, the first number and the second number are different, for example, the first number is greater than the second number.
[0672] Optionally, the prediction modes corresponding to the lookup table A and the prediction modes corresponding to the lookup table B are different, or the prediction modes corresponding to the lookup table A and the prediction modes corresponding to the lookup table B are at least partially the same.
[0673] Optionally, the look-up table A can be a look-up table corresponding to 37 prediction modes or a look-up table corresponding to 131 prediction modes.
[0674] Optionally, the look-up table B can be a look-up table corresponding to 37 prediction modes or a look-up table corresponding to 131 prediction modes.
[0675] Optionally, the mutually perpendicular gradient operators include: a first pair of mutually perpendicular gradient operators and / or a second pair of mutually perpendicular gradient operators, the first pair of gradient operators and the second pair of gradient operators are different, for example, the first pair of gradient operators includes a 0° (horizontal direction) gradient operator and a 90° (vertical direction) gradient operator, and the second pair of gradient operators includes a +45° gradient operator and a -45° gradient operator.
[0676] Optionally, the first gradient information is determined or obtained according to the first pair of mutually perpendicular gradient operators, and the at least one gradient histogram is determined or obtained according to the first gradient information.
[0677] Optionally, the second gradient information is determined or obtained according to the second pair of mutually perpendicular gradient operators, and the at least one gradient histogram is determined or obtained according to the second gradient information.
[0678] Optionally, the first pair of gradient operators and the second pair of gradient operators are different, the third gradient information is determined or obtained according to the first gradient information and the second gradient information, and the at least one gradient histogram is determined or obtained according to the third gradient information.
[0679] Optionally, the third gradient information is determined or obtained according to the first gradient information, weight information corresponding to the first pair of gradient operators, the second gradient information, and weight information corresponding to the second pair of gradient operators, and the at least one gradient histogram is determined or obtained according to the third gradient information.
[0680] Optionally, the third gradient information can be gradient information determined or obtained by fusing the first gradient information and the second gradient information through weight information corresponding to at least one pair of gradient operators, for example, including gradient direction and / or gradient amplitude.
[0681] Optionally, gradient information of at least one reference region of the current block is determined or obtained according to mutually perpendicular gradient operators corresponding to at least one look-up table, at least one gradient histogram corresponding to the current block is determined or obtained according to the gradient information of the at least one reference region of the current block, the first prediction mode is determined or obtained according to the at least one gradient histogram, the at least one look-up table includes the look-up table A and / or the look-up table B, the mutually perpendicular gradient operators include a first pair of mutually perpendicular gradient operators and / or a second pair of mutually perpendicular gradient operators, and the first pair of gradient operators and the second pair of gradient operators are different.
[0682] Optionally, the first gradient information of the at least one reference region of the current block is determined or obtained according to the at least one reference region of the current block, the at least one lookup table and the first pair of gradient operators perpendicular to each other, the second gradient information of the at least one reference region of the current block is determined or obtained according to the at least one reference region of the current block, the at least one lookup table and the second pair of gradient operators perpendicular to each other, and the at least one gradient histogram is determined or obtained according to the first gradient information of the at least one reference region, the second gradient information of the at least one reference region, weight information corresponding to the first pair of gradient operators perpendicular to each other and weight information corresponding to the second pair of gradient operators perpendicular to each other.
[0683] Optionally, the first gradient information of the at least one reference region of the current block is determined or obtained according to the first pair of gradient operators perpendicular to each other corresponding to the at least one lookup table, the at least one gradient histogram C corresponding to the current block is determined or obtained according to the first gradient information of the at least one reference region of the current block, and the first prediction mode is determined or obtained according to the at least one gradient histogram C.
[0684] Optionally, the second gradient information of the at least one reference region of the current block is determined or obtained according to the second pair of gradient operators perpendicular to each other corresponding to the at least one lookup table, the at least one gradient histogram D corresponding to the current block is determined or obtained according to the second gradient information of the at least one reference region of the current block, and the first prediction mode is determined or obtained according to the at least one gradient histogram D.
[0685] Optionally, the at least one third gradient information of the at least one reference region of the current block is determined or obtained according to the at least one gradient histogram C and the at least one gradient histogram D, the at least one gradient histogram E is determined or obtained according to the at least one third gradient information, and the first prediction mode is determined or obtained according to the at least one gradient histogram E.
[0686] Optionally, the first prediction mode is determined or obtained according to the at least one gradient histogram C and the at least one gradient histogram D.
[0687] Optionally, the step of determining or obtaining the first prediction mode according to the at least one gradient histogram C and the at least one gradient histogram D comprises: fusing the at least one gradient histogram C and the at least one gradient histogram D according to weight information corresponding to the at least one pair of gradient operators to determine or obtain the at least one third gradient information of the at least one reference region of the current block, determining or obtaining the at least one gradient histogram E according to the at least one third gradient information, and determining or obtaining the first prediction mode according to the at least one gradient histogram E, and optionally, the number of prediction modes corresponding to the fused gradient histogram C and the gradient histogram D is the same.
[0688] Optionally, the at least one gradient histogram C and the at least one gradient histogram D are fused according to weight information corresponding to the at least one pair of gradient operators to determine or obtain at least one gradient histogram E, and the first prediction mode is determined or obtained according to the at least one gradient histogram E. The weight information corresponding to the gradient operators includes: first weight information, the first weight information being weight information corresponding to gradient amplitudes of each gradient direction in the gradient histogram, including: weight information corresponding to gradient amplitudes of the at least one gradient histogram C and / or weight information corresponding to gradient amplitudes of the at least one gradient histogram D. Optionally, the gradient histogram C and the gradient histogram D are different.
[0689] Optionally, the first weight information includes weight values corresponding to gradient amplitudes of each prediction direction (i.e. a vertical direction of the gradient direction) in the gradient histogram, and the weight values corresponding to the gradient amplitudes of each prediction direction in the gradient histogram are inversely proportional and / or negatively correlated to the angle difference between the prediction direction and the direction of the gradient operator corresponding to the gradient histogram. For example, if the direction of the gradient operator corresponding to the gradient histogram is 0° and 90°, the weight value corresponding to the direction with a smaller angle difference between the horizontal or vertical direction and the prediction direction in the gradient histogram is larger, and / or the weight value corresponding to the direction with a larger angle difference between the horizontal or vertical direction and the prediction direction in the gradient histogram is smaller.
[0690] Optionally, the first pair of gradient operators perpendicular to each other includes a 0° gradient operator and a 90° gradient operator, the weight value corresponding to the gradient amplitude of mode 3 in the gradient histogram C is 0.9, the gradient amplitude is C1, the weight value corresponding to the gradient amplitude of mode 3 in the gradient histogram D is 0.1, the gradient amplitude is D1, and then the gradient histogram C and the gradient histogram D are fused to determine or obtain third gradient information and / or a gradient histogram E. The gradient direction of the third gradient information is the gradient direction corresponding to mode 3, the gradient amplitude is C1*0.9+D1*0.1, and / or the gradient amplitude value corresponding to mode 3 in the gradient histogram E is C1*0.9+D1*0.1.
[0691] Optionally, since the operator design direction (i.e. the first direction and / or the second direction described above) is consistent with the prediction edge direction, the convolution response is maximized, and the most accurate detection is obtained. Therefore, the accuracy of the obtained prediction mode can be effectively improved by setting the first weight information.
[0692] Optionally, the first pair of mutually perpendicular gradient operators comprises a 0° gradient operator and a 90° gradient operator, the second pair of mutually perpendicular gradient operators comprises a +45° gradient operator and a -45° gradient operator, the gradient histogram C is determined or obtained according to the first pair of mutually perpendicular gradient operators, and the gradient histogram D is determined or obtained according to the second pair of mutually perpendicular gradient operators. Since the gradient histogram C has higher accuracy for horizontal edges and vertical edges, the value of the weight information corresponding to the gradient amplitude in the horizontal direction and the vertical direction in the gradient histogram C is greater than the value of the weight information corresponding to the gradient amplitude in the horizontal direction and the vertical direction in the gradient histogram D. Since the gradient histogram D has higher accuracy for diagonal edges, the value of the weight information corresponding to the gradient amplitude in the diagonal direction in the gradient histogram D is greater than the value of the weight information corresponding to the gradient amplitude in the diagonal direction in the gradient histogram C.
[0693] Optionally, the first weight information corresponding to the gradient amplitude in the prediction direction of the gradient histogram C is as shown in Table 1 below:
[0694] Table 1
[0695] Optionally, the first weight information corresponding to the gradient amplitude in the prediction direction of the gradient histogram D is as shown in Table 2 below:
[0696] Table 2
[0697] Optionally, the first pair of mutually perpendicular gradient operators comprises a 0° gradient operator and a 90° gradient operator, the second pair of mutually perpendicular gradient operators comprises a +45° gradient operator and a -45° gradient operator, the gradient histogram C is determined or obtained according to the first pair of mutually perpendicular gradient operators, and the gradient histogram D is determined or obtained according to the second pair of mutually perpendicular gradient operators. The weight value corresponding to the gradient amplitude in the prediction direction of the gradient histogram D, in which the angle difference between the horizontal direction or the vertical direction is less than the first angle difference threshold, is 0. The weight value corresponding to the gradient amplitude in the prediction direction of the gradient histogram D, in which the angle difference between 45°, 135° and -45° is less than the second angle difference threshold, is 1. Optionally, the first angle difference threshold and the second angle difference threshold are different.
[0698] Optionally, only applying the gradient operators in horizontal and vertical directions to determine the gradient histogram has lower prediction accuracy for diagonal directions, therefore, the embodiments of the present application introduce ±45° gradient operators to effectively improve the prediction accuracy in diagonal directions. Since in natural scenes, horizontal (such as horizon, buildings) and vertical (such as trees, people) structures are dominant, and diagonal textures (such as 45° diagonal lines) are relatively less, for the prediction directions close to 0° and 90°, the gradient operators corresponding to the 0° gradient operator and the 90° gradient operator have higher accuracy, therefore, by setting the weight values as described above, the prediction accuracy of the obtained prediction mode can be effectively improved.
[0699] Optionally, the mutually perpendicular gradient operators include a first pair of mutually perpendicular gradient operators and / or a second pair of mutually perpendicular gradient operators, the first pair of gradient operators and the second pair of gradient operators are different.
[0700] Optionally, the first pair of mutually perpendicular gradient operators includes a 0° gradient operator and a 90° gradient operator, and the second pair of mutually perpendicular gradient operators includes a +45° gradient operator and a -45° gradient operator, the at least one first gradient information of the at least one reference region of the current block is determined or obtained according to the at least one reference region of the current block and the first pair of mutually perpendicular gradient operators, and the at least one second gradient information of the at least one reference region of the current block is determined or obtained according to the at least one reference region of the current block and the second pair of mutually perpendicular gradient operators, the second gradient information includes a gradient component G +45° corresponding to +45°, a gradient component G -45° corresponding to -45°, a gradient component G +45° corresponding to 0°, and a gradient component G -45° corresponding to 90°. x1 y1 x1 y1 The gradient components D x2 and D y2 are calculated according to the following formula (thirteen) and formula (fourteen):
[0701] Optionally, the first gradient information includes a gradient component D x2 corresponding to 0°, a gradient component D y2 corresponding to 90°, the weight information corresponding to the first pair of mutually perpendicular gradient operators, the weight information corresponding to the second pair of mutually perpendicular gradient operators, the gradient component D x1 , the gradient component D y1 , the gradient component D x2 , and the gradient component D y2determine or obtain at least one fusion gradient information, the fusion gradient information comprising: a 0° corresponding fusion gradient component and a 90° corresponding fusion gradient component, and determine or obtain at least one gradient histogram according to the at least one fusion gradient information.
[0702] Optionally, the 0° corresponding target gradient component Gx and the 90° corresponding target gradient component Gy are calculated according to the following formula (fifteen) and formula (sixteen): Gx = w a *D x1 +w b *D x2 Formula (fifteen); Gy = w a *D y1 +w b *D y2 Formula (sixteen);
[0703] Optionally, w a is weight information corresponding to the second pair of gradient operators perpendicular to each other, and w b is weight information corresponding to the first pair of gradient operators perpendicular to each other. Optionally, the weight corresponding to the above weight information is a preset fixed value, and / or the above weight value can be adaptively adjusted according to different scenes.
[0704] Optionally, the weight information corresponding to the gradient operator comprises: weight information corresponding to the first pair of gradient operators perpendicular to each other and / or weight information corresponding to the second pair of gradient operators perpendicular to each other.
[0705] Optionally, the fusion gradient information of each pixel can be calculated in the above manner, so that the distribution of the fusion gradient components of the local region of the reference region can be determined, and at least part of the pixels in the reference region are enhanced according to the distribution of the fusion gradient components of the local region of the reference region.
[0706] Optionally, the weight information corresponding to the gradient information of at least one reference region is determined or obtained according to the fusion gradient information of the at least one reference region.
[0707] In the embodiment, by fusing the gradient operators in the horizontal, vertical and diagonal directions, all dominant edge directions in the current block can be accurately detected, the blind area of the single direction operator is avoided, and the prediction accuracy for the current block is effectively improved.
[0708] Optionally, the weight information corresponding to the gradient information of at least one reference region of the current block is determined or obtained.
[0709] Optionally, the statistical histogram comprises a gradient histogram, and the step S10 comprises: determining or obtaining at least one gradient histogram according to weight information corresponding to gradient information of at least one reference region of the current block; determining or obtaining the first prediction mode according to the at least one gradient histogram; the first prediction mode comprises at least one second prediction mode; if the first prediction mode and / or the current block satisfies a first condition, performing the prediction processing on the current block according to a second prediction mode determined or obtained through the first prediction mode; and if the first prediction mode and / or the current block does not satisfy the first condition, performing the prediction processing on the current block according to the first prediction mode.
[0710] Optionally, the at least one gradient histogram is determined or obtained according to the gradient information of the at least one reference region of the current block and weight information corresponding to the gradient information.
[0711] Optionally, the at least one gradient histogram is determined or obtained according to the weight information corresponding to the gradient information of the at least one reference region of the current block and at least one lookup table.
[0712] Optionally, the at least one gradient histogram is determined or obtained according to the weight information corresponding to the gradient information of the at least one reference region of the current block and at least one gradient operator corresponding to the at least one lookup table.
[0713] Optionally, the at least one gradient histogram is determined or obtained according to the weight information corresponding to the gradient information of the at least one reference region of the current block and weight information corresponding to at least one pair of gradient operators.
[0714] Optionally, the gradient information of the at least one reference region of the current block is determined or obtained according to the at least one reference region of the current block and at least one gradient operator corresponding to the at least one lookup table, and the at least one gradient histogram is determined or obtained according to the gradient information of the at least one reference region of the current block and weight information corresponding to the gradient information.
[0715] Optionally, the gradient information of the at least one reference region of the current block is determined or obtained according to the at least one reference region of the current block, at least one gradient operator corresponding to the at least one lookup table and weight information corresponding to at least one pair of gradient operators, and the at least one gradient histogram is determined or obtained according to the gradient information of the at least one reference region of the current block and weight information corresponding to the gradient information.
[0716] Optionally, the weight information corresponding to the gradient information comprises second weight information and / or third weight information, the second weight information is weight information based on a spatial distance, and the third weight information is weight based on direction consistency.
[0717] Optionally, the second weight information (i.e., the weight based on the spatial distance) of the pixel in the at least one reference region of the current block and the distance between the pixel and the center of the current block are inversely proportional and / or negatively correlated, that is, the farther the distance between the pixel and the center of the current block, the smaller the weight value of the second weight information of the pixel, and the closer the distance between the pixel and the center of the current block, the greater the weight value of the second weight information of the pixel. The above-mentioned weight based on the spatial distance can suppress the interference of the edge pixels and strengthen the dominance of the center region.
[0718] Optionally, the weight information corresponding to the gradient information includes: second weight information, the gradient information of the at least one reference region of the current block includes: a gradient direction 1 of a pixel a, a gradient amplitude x of the pixel a, a gradient direction 2 of a pixel b, and a gradient amplitude y of the pixel a, because the distance between the pixel a and the center of the current block is less than the distance between the pixel b and the center of the current block, the second weight information w1 of the pixel a is greater than the second weight information w2 of the pixel b, according to the gradient information of the at least one reference region of the current block and the weight information corresponding to the gradient information of the at least one reference region of the current block, the gradient amplitude of the pixel a in the gradient direction 1 is x*w1, and the gradient amplitude of the pixel b in the gradient direction 2 is y*w2, and the at least one gradient histogram is determined or obtained according to the gradient amplitude x*w1 of the pixel a in the gradient direction 1 and the gradient amplitude y*w2 of the pixel b in the gradient direction 2.
[0719] Optionally, the third weight information (i.e., the weight based on the direction consistency) of the pixel in the at least one reference region of the current block and the gradient direction consistency between the pixel and at least one pixel in its adjacent region are positively proportional and / or positively correlated, for example, the stronger the consistency between the gradient direction of a pixel A in a reference region and the gradient direction of at least one pixel in the adjacent region of the pixel A, the greater the weight value of the third weight information, and the weaker the consistency between the gradient direction of the pixel A in the reference region and the gradient direction of at least one pixel in the adjacent region of the pixel A, the smaller the weight value of the third weight information, and the above-mentioned weight based on the direction consistency can strengthen the statistical weight of the local consistent texture direction and improve the prominence of the dominant edge mode.
[0720] Optionally, the smaller the angle difference between the gradient direction of a pixel and the gradient direction of at least one pixel in its adjacent region, the stronger the gradient direction consistency, and the greater the angle difference between the gradient direction of the pixel and the gradient direction of at least one pixel in its adjacent region, the weaker the gradient direction consistency.
[0721] Optionally, the third weight information of the pixel in the at least one reference region of the current block is determined or obtained according to the fused gradient information of at least one pixel in the at least one reference region of the current block.
[0722] Optionally, the weight information corresponding to the gradient information comprises third weight information, the gradient information of the at least one reference region of the current block comprises a gradient direction 1 of pixel a, a gradient amplitude x of pixel a, a gradient direction 2 of pixel b and a gradient amplitude y of pixel a, since the gradient direction consistency between pixel a and at least one pixel in the adjacent region of pixel a is stronger than the gradient direction consistency between pixel b and at least one pixel in the adjacent region of pixel b, the third weight information w3 of pixel a is greater than the third weight information w4 of pixel b, according to the gradient information of the at least one reference region of the current block and the weight information corresponding to the gradient information of the at least one reference region of the current block, the gradient amplitude of pixel a in the gradient direction 1 is x*w3, the gradient amplitude of pixel b in the gradient direction 2 is y*w4, and the at least one gradient histogram is determined or obtained according to the gradient amplitude x*w3 of pixel a in the gradient direction 1 and the gradient amplitude y*w4 of pixel b in the gradient direction 2.
[0723] Optionally, the weight information corresponding to the gradient information comprises second weight information and third weight information, the gradient information of the at least one reference region of the current block comprises a gradient direction 1 of pixel a, a gradient amplitude x of pixel a, a gradient direction 2 of pixel b and a gradient amplitude y of pixel a, since the angle difference between pixel a and the center of the current block is smaller than the angle difference between pixel b and the center of the current block, the second weight information w1 of pixel a is greater than the second weight information w2 of pixel b, since the gradient direction consistency between pixel a and at least one pixel in the adjacent region of pixel a is stronger than the gradient direction consistency between pixel b and at least one pixel in the adjacent region of pixel b, the third weight information w3 of pixel a is greater than the third weight information w4 of pixel b, according to the gradient information of the at least one reference region of the current block and the weight information corresponding to the gradient information of the at least one reference region of the current block, the gradient amplitude of pixel a in the gradient direction 1 is x*w1*w3, the gradient amplitude of pixel b in the gradient direction 2 is y*w2*w4, and the at least one gradient histogram is determined or obtained according to the gradient amplitude x*w1*w3 of pixel a in the gradient direction 1 and the gradient amplitude y*w2*w4 of pixel b in the gradient direction 2.
[0724] In the embodiment, the at least one gradient histogram can be determined or obtained based on the second weight information (i.e. the weight based on the spatial distance) and / or the third weight information (i.e. the weight based on the direction consistency), the interference of the edge pixels can be inhibited and the dominance of the center region can be strengthened by the weight based on the spatial distance, the statistical weight of the local consistent texture direction can be strengthened and the prominence of the dominant edge mode can be improved by the weight based on the direction consistency, and thus the accuracy of the first prediction mode and / or the second prediction mode determined or obtained based on the at least one gradient histogram can be improved, and the prediction accuracy of the prediction mode for the current block can be improved.
[0725] B6, the area information of at least one reference region of the current block.
[0726] Optionally, the statistical histogram comprises an area histogram, and the step S10 comprises: determining or obtaining at least one area histogram according to the area information of at least one reference region of the current block, determining or obtaining the first prediction mode according to the at least one area histogram, the first prediction mode comprising at least one prediction mode, if the first prediction mode and / or the current block satisfy a first condition, performing the prediction processing on the current block according to a second prediction mode determined or obtained through the first prediction mode, and if the first prediction mode and / or the current block do not satisfy the first condition, performing the prediction processing on the current block according to the first prediction mode.
[0727] Optionally, the at least one area histogram is determined or obtained according to the area information of at least one reference region of the current block, and the first prediction mode is determined or obtained according to the at least one area histogram and the at least one gradient histogram.
[0728] Optionally, the area information of at least one reference region of the current block is determined or obtained according to the usage of the intra prediction mode of the at least one reference region, the area information comprising: an area amplitude value and an intra prediction direction, and the at least one area histogram is determined or obtained according to the area information of the at least one reference region.
[0729] Optionally, the at least one reference region comprises at least one neighboring coded block and / or at least one non-neighboring coded block of the current block, and the area information of the at least one reference region comprises: an area amplitude value and an intra prediction direction of the at least one neighboring coded block, and / or an area amplitude value and an intra prediction direction of the at least one non-neighboring coded block.
[0730] Referring to FIG. 12, the reference region of the to-be-predicted block (i.e. the current block) in the coded region comprises the coded block 4 and the coded block 6 adjacent to the to-be-predicted block, and the coded block 1, the coded block 2, the coded block 3, the coded block 5, the coded block 7 and the coded block 8 not adjacent to the to-be-predicted block, and as shown in FIG. 13, the decoded block 4 and the decoded block 6 adjacent to the to-be-predicted block exist in the decoded region, and the decoded block 1, the decoded block 2, the decoded block 3, the decoded block 5, the decoded block 7 and the decoded block 8 not adjacent to the to-be-predicted block exist in the decoded region, and the at least one area histogram is determined or obtained according to the area amplitude value and the intra prediction direction of the at least one coded block and / or the at least one decoded block.
[0731] Optionally, the number of the prediction modes corresponding to the area histogram is the first number or the second number.
[0732] Optionally, the at least one area histogram is determined or obtained according to the at least one lookup table and the area information of at least one reference region of the current block.
[0733] Optionally, the at least one lookup table comprises: a lookup table A and / or a lookup table B, the number of the prediction modes corresponding to the lookup table A is a first number, the number of the prediction modes corresponding to the lookup table B is a second number, and the first number and the second number are the same or different.
[0734] Optionally, the first number is 35, 67 or 131, for example, the first number is 131.
[0735] Optionally, the first number is greater than 35, 67 or 131.
[0736] Optionally, the second number is 35, 67 or 131, for example, the second number is 67.
[0737] Optionally, the second number is less than or equal to 35, 67 or 131.
[0738] Optionally, the first number and the second number are the same, that is, the number of the prediction modes corresponding to the lookup table A is the same as the number of the prediction modes corresponding to the lookup table B, for example, the number of the prediction modes corresponding to the lookup table A and the number of the prediction modes corresponding to the lookup table B are the same, but the types of the prediction modes corresponding to the lookup table A and the lookup table B are at least partially different.
[0739] Optionally, the first number and the second number are different, for example, the first number is greater than the second number.
[0740] Optionally, if the prediction mode corresponding to at least one neighboring coded block and / or non-neighboring coded block of the current block is determined or obtained according to the lookup table A, the number of the prediction modes corresponding to the lookup table A is the first number, and the number of the prediction modes corresponding to at least one area histogram determined or obtained according to the area information of at least one reference region of the current block is the first number, for example, the first number is 131.
[0741] Optionally, if the prediction mode corresponding to at least one neighboring coded block and / or non-neighboring coded block of the current block is determined or obtained according to the lookup table B, the number of the prediction modes corresponding to the lookup table B is the second number, and the number of the prediction modes corresponding to at least one area histogram determined or obtained according to the area information of at least one reference region of the current block is the second number, for example, the second number is 67.
[0742] In the embodiment, the area and direction information of the neighboring and / or non-neighboring blocks of the current block is used to quickly infer the possible edge structure of the current block, and an area histogram is established, and then the first prediction mode is directly screened through the area histogram, for example, the high-frequency prediction direction is reserved, so that the matching accuracy of the prediction mode is improved, and the prediction accuracy for the current block is improved.
[0743] Optionally, the way of determining or obtaining the first prediction mode according to the at least one statistical histogram comprises the following way a1 and / or way a2:
[0744] The first prediction mode is determined or obtained according to the third statistical histogram of the current block in the first number of prediction modes and / or the fourth statistical histogram of the current block in the second number of prediction modes.
[0745] Optionally, the statistical histogram comprises at least one of a gradient histogram, an area histogram, and a prediction mode usage frequency histogram corresponding to the coded image block, and a histogram obtained by adjusting or merging the above histograms.
[0746] Optionally, the step S10 comprises: determining or obtaining the first prediction mode according to the third statistical histogram of the current block in the first number of prediction modes and / or the fourth statistical histogram of the current block in the second number of prediction modes, if the first prediction mode and / or the current block satisfy a first condition, performing prediction processing on the current block according to a second prediction mode determined or obtained through the first prediction mode, and if the first prediction mode and / or the current block do not satisfy the first condition, performing prediction processing on the current block according to the first prediction mode.
[0747] Optionally, the third statistical histogram and the fourth statistical histogram are of the same or different histogram types, for example, the third statistical histogram is a gradient histogram and the fourth statistical histogram is an area histogram.
[0748] Optionally, the first prediction mode is determined or obtained according to the third statistical histogram of the current block in the first number of prediction modes, and the obtained first prediction mode is one of the first number of prediction modes.
[0749] Optionally, the first number is 131, the first gradient histogram of the at least one reference region of the current block in the 131 prediction modes is determined or obtained, the first gradient histogram records gradient amplitudes of the at least one reference region of the current block in gradient directions corresponding to the 131 prediction modes, the first prediction mode is determined or obtained according to the gradient amplitudes in the gradient directions in the first gradient histogram, for example, the mode corresponding to the gradient direction with the top 3 gradient amplitudes is determined as the first prediction mode.
[0750] Optionally, the first number is 67, the first gradient histogram of the at least one reference region of the current block in the 67 prediction modes is determined or obtained, the first gradient histogram records gradient amplitudes of the at least one reference region of the current block in gradient directions corresponding to the 67 prediction modes, the first prediction mode is determined or obtained according to the gradient amplitudes in the gradient directions in the first gradient histogram, for example, the mode corresponding to the gradient direction with the top 3 gradient amplitudes is determined as the first prediction mode.
[0751] Optionally, the first prediction mode is determined or derived according to a fourth statistic histogram of the current block in the second number of prediction modes, and the derived first prediction mode is one of the second number of prediction modes.
[0752] Optionally, the second number is 67, the second gradient histogram of the at least one reference region of the current block in 67 prediction modes is determined or derived, the second gradient histogram records gradient amplitudes of the at least one reference region of the current block in gradient directions corresponding to the 67 prediction modes, and the first prediction mode is determined or derived according to the gradient amplitudes in the gradient directions in the second gradient histogram, for example, the mode corresponding to the gradient direction with the top 3 gradient amplitudes is determined as the first prediction mode.
[0753] Optionally, the second number is 131, the second gradient histogram of the at least one reference region of the current block in 131 prediction modes is determined or derived, the second gradient histogram records gradient amplitudes of the at least one reference region of the current block in gradient directions corresponding to the 131 prediction modes, and the at least one prediction mode is determined or derived according to the gradient amplitudes in the gradient directions in the second gradient histogram, for example, the mode corresponding to the gradient direction with the top 3 gradient amplitudes is determined as the prediction mode of the current block.
[0754] Optionally, the first number is different from the second number, for example, the first number is greater than the second number, if the size of the current block satisfies a condition A, the first prediction mode is determined or derived according to the third statistic histogram of the current block in the first number of prediction modes, and if the size of the current block does not satisfy the condition A, the first prediction mode is determined or derived according to the fourth statistic histogram of the current block in the second number of prediction modes.
[0755] Optionally, the first number is different from the second number, for example, the first number is greater than the second number, if the size of the current block satisfies a condition A, the first prediction mode is determined or derived according to the third statistic histogram of the current block in the first number of prediction modes and / or the fourth statistic histogram of the current block in the second number of prediction modes, and if the size of the current block does not satisfy the condition A, the first prediction mode is determined or derived according to the fourth statistic histogram of the current block in the second number of prediction modes.
[0756] Optionally, the first number is different from the second number, if the size of the current block satisfies a condition A, the first prediction mode is determined or derived according to the third statistic histogram of the current block in the first number of prediction modes, and if the size of the current block does not satisfy the condition A, the first prediction mode is determined or derived according to the third statistic histogram of the current block in the first number of prediction modes and / or the fourth statistic histogram of the current block in the second number of prediction modes.
[0757] Optionally, the first number and the second number are different, and the first prediction mode is determined or obtained according to a third statistical histogram of the current block in the first number of prediction modes and a fourth statistical histogram of the current block in the second number of prediction modes.
[0758] Optionally, the first number and the second number are different, at least one prediction mode A is determined or obtained according to the third statistical histogram of the current block in the first number of prediction modes, at least one prediction mode B is determined or obtained according to the fourth statistical histogram of the current block in the second number of prediction modes, and the first prediction mode is determined or obtained from the at least one prediction mode A and the at least one prediction mode B according to matching information of the at least one prediction mode A and the at least one prediction mode B each related to at least one reference region of the current block.
[0759] Optionally, the matching information refers to information used to evaluate the matching degree between different prediction modes and reference regions and corresponding current blocks, and the matching information can indicate the matching degree between different prediction modes and reference regions based on various indicators such as rate-distortion cost of prediction results, prediction error, texture similarity, etc.
[0760] Optionally, the matching information includes SAD, SATD and / or MRSAD, and optionally, the smaller the SAD value, the SATD value and / or the MRSAD value, the higher the matching degree; and / or, the larger the SAD value, the SATD value and / or the MRSAD value, the lower the matching degree.
[0761] In the embodiment, the third statistical histogram in the first number of prediction modes and / or the fourth statistical histogram of the current block in the second number of prediction modes meet the prediction mode matching requirements of current blocks of different sizes. For example, large size image blocks are more sensitive to the texture direction of the accuracy of the angle prediction in the prediction mode, and therefore, the number of angle prediction modes in the prediction mode can be increased to more finely match the actual texture direction and improve the prediction accuracy. Small size image blocks are less sensitive to the number of angle prediction modes in the prediction mode, and therefore, a statistical histogram with a small number of prediction modes can be used to determine the prediction mode to improve the prediction efficiency.
[0762] Mode a2, at least one first mode is determined or obtained according to the fourth statistical histogram of the current block in the second number of prediction modes, and the first prediction mode is determined or obtained according to at least one second mode of the current block in the first number of prediction modes determined or obtained by the at least one first mode.
[0763] Optionally, the first condition is determined or derived according to a fourth statistical histogram of the current block in the second number of prediction modes, at least one first mode is determined or derived according to the fourth statistical histogram, at least one second mode of the current block in the first number of prediction modes is determined or derived according to the at least one first mode, the first prediction mode is determined or derived according to the at least one second mode, the first prediction mode comprises at least one prediction mode, if the first prediction mode and / or the current block satisfies the first condition, the current block is predicted according to a second prediction mode determined or derived according to the first prediction mode, if the first prediction mode and / or the current block does not satisfy the first condition, the current block is predicted according to the first prediction mode.
[0764] Optionally, the statistical histogram comprises at least one of a gradient histogram, an area histogram, and a histogram of the number of times of using prediction modes corresponding to the coded image block, and a histogram obtained by adjusting or merging the above-mentioned histograms.
[0765] Optionally, the first number is greater than the second number, at least one first mode is determined or derived according to a fourth statistical histogram of the current block in the second number of prediction modes, the first mode is one of the second number of prediction modes, and the first prediction mode is determined or derived according to at least one second mode of the current block in the first number of prediction modes determined or derived according to the at least one first mode.
[0766] Optionally, the first number is 131 and the second number is 67, the prediction modes in the first number completely cover the prediction modes in the second number, and the number of prediction modes is increased by filling the angle intervals between the angle prediction modes in the original second number, and step S10 comprises: determining or deriving a second gradient histogram of at least one reference region of the current block in the 67 prediction modes, wherein the second gradient histogram records the gradient amplitudes of the at least one reference region of the current block in the gradient directions corresponding to the 67 prediction modes, determining or deriving at least one first mode according to the gradient amplitudes in the gradient directions in the second gradient histogram, for example, the modes corresponding to the gradient directions with the top 3 gradient amplitudes are determined as the first mode, converting the first mode into the corresponding mode in the 131 prediction modes to obtain at least one second mode, for example, the mode 23 (i.e. the first mode) in the 67 prediction modes corresponds to the mode 44 (i.e. the second mode) in the 131 prediction modes, and determining or deriving the first prediction mode according to the at least one second mode.
[0767] Optionally, at least one second mode of the current block in the first number of prediction modes is determined or derived according to at least one mapping table and at least one first mode, the mapping table comprises a first mapping table and / or a second mapping table.
[0768] Optionally, the first number is 131 and the second number is 67, the conversion from the 67 prediction modes to the 131 prediction modes can be determined or derived according to a first mapping table, the first mapping table is referred to in Table 3 below:
[0769] Table 3
[0770] Optionally, the first number is 131 and the second number is 67, the conversion from the 131 prediction modes to the 67 prediction modes can be determined or derived according to a second mapping table, the second mapping table is referred to in Table 4 below:
[0771] Table 4
[0772] Optionally, the step of determining or deriving the first prediction mode according to the at least one second mode comprises: determining or deriving the first prediction mode according to the at least one second mode and / or at least one second mode adjacent mode of the first number of prediction modes.
[0773] Optionally, in the first number and / or the second number of prediction modes, each mode corresponds to a discretized direction, for example, in the 67 prediction modes, mode 18 is 0° (horizontal direction) and mode 34 is 45° diagonal line, therefore, the adjacent mode can be at least one prediction mode closest to the angle value angle of the prediction mode and / or closest to the index, for example, in the 67 prediction modes, the prediction mode is mode 34 (45°), then the adjacent mode can be mode 33 and mode 35.
[0774] Optionally, the at least one first mode, for example, a1 and a2, is determined or derived according to a fourth statistical histogram of the current block in the 67 prediction modes, the at least one second mode, for example, b1 and b2, of the current block in the first number of prediction modes is determined or derived according to the at least one first mode, the adjacent mode of the at least one second mode in the first number of prediction modes, for example, b1 is adjacent to b1' and b1", b2 is adjacent to b2' and b2", the first prediction mode is determined or derived according to the at least one second mode and the adjacent mode of the at least one second mode in the first number of prediction modes, for example, the first prediction mode is determined or derived from b1, b1', b1", b2, b2' and b2" according to the matching information of the at least one second mode and the adjacent mode of the at least one second mode in the first number of prediction modes respectively related to at least one reference region of the current block.
[0775] Optionally, the matching information refers to information used to evaluate the matching degree between different prediction modes and the reference region and the corresponding current block, and the matching information can indicate the matching degree between different prediction modes and the reference region based on various indexes such as rate-distortion cost of a prediction result, prediction error, texture similarity, etc.
[0776] Optionally, the matching information includes SAD, SATD and / or MRSAD.
[0777] In the embodiment, the at least one first mode is determined or obtained according to the fourth statistical histogram of the current block in the second number of prediction modes, and the first prediction mode is determined or obtained according to the at least one second mode of the current block in the first number of prediction modes determined or obtained through the at least one first mode, which can reduce the number of statistical histograms to be established and reduce the calculation complexity, while meeting the prediction mode matching requirements of current blocks of different sizes, matching appropriate prediction modes for current blocks of different sizes, and thus supporting to improve the prediction accuracy of the current block and supporting to improve the coding quality in the video encoding and / or decoding process.
[0778] Fifth embodiment
[0779] Based on any of the above embodiments, a fifth embodiment is provided.
[0780] In the embodiment, the first mode list is determined or obtained according to the following mode b:
[0781] Mode b, at least one reference region of the current block and a neural network model.
[0782] Optionally, the step S10 includes: determining or obtaining the first mode list according to the at least one reference region of the current block and the neural network model, determining or obtaining the first prediction mode according to the first mode list, the first prediction mode including at least one prediction mode, if the first prediction mode and / or the current block meet the first condition, performing prediction processing on the current block according to a second prediction mode determined or obtained through the first prediction mode, and if the first prediction mode and / or the current block do not meet the first condition, performing prediction processing on the current block according to the first prediction mode.
[0783] Optionally, the 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, and through comparing the prediction effects of different modes in the first mode list, an appropriate prediction mode can be matched for the current block to improve the prediction accuracy for the current block.
[0784] Optionally, the first mode list is at least one mode list, and the prediction modes in the at least one mode list are different or at least partially the same.
[0785] Optionally, the first mode list comprises a MPM (Most Probable Modes) list. Optionally, the first mode list in the embodiments of the present application can be a modified MPM list.
[0786] Optionally, the MPM list is a set of prediction modes that are considered to be most likely to be applicable to the current block, and the MPM list is determined or obtained based on the neighborhood information (such as the prediction modes of the above block and the left block) and the statistical information (such as the probability of the occurrence of the modes) of the current block. In this way, the MPM list can reduce the amount of mode information that needs to be transmitted by the encoder, and improve the prediction accuracy of the prediction mode by the decoder.
[0787] Optionally, the first prediction mode is determined or obtained according to the candidate modes in the first mode list.
[0788] Optionally, the candidate modes are specific prediction mode options in the mode list, and are prediction modes that can be used in the prediction process of the current block.
[0789] Optionally, in the intra prediction, the candidate modes in the first mode list can include at least one angular prediction mode, at least one non-angular prediction mode and / or at least one derived mode of the prediction mode.
[0790] Optionally, the first mode list is determined or obtained according to the pixels of the at least one reference region of the current block and the neural network model.
[0791] Optionally, the first mode list is determined or obtained according to the gradient information of the at least one reference region of the current block and the neural network model.
[0792] Optionally, the first mode list is determined or obtained according to the pixels, the gradient information of the at least one reference region of the current block and the neural network model.
[0793] Optionally, the first mode list is determined or obtained according to the at least one prediction mode and / or the confidence of the at least one prediction mode output by the neural network model, by taking the pixels and / or the gradient information of the at least one reference region of the current block as the input of the neural network model.
[0794] Optionally, the at least one candidate mode is determined or obtained from the at least one prediction mode output by the neural network model in the first number and / or the second number according to the confidence of the at least one prediction mode determined or obtained by the neural network model, and the first mode list is determined or obtained according to the at least one candidate mode.
[0795] Optionally, the confidence is a quantitative indicator of the certainty degree of the model for the current prediction result.
[0796] Optionally, the neural network model is a computational model that mimics the way neurons in the human brain process information, it learns complex patterns and features in data to perform various tasks, the neural network model is composed of at least one level of neurons, including an input layer, at least one hidden layer and an output layer, each neuron receives input signals, and then generates output through a nonlinear activation function after weighted summation, the weights of these connected neurons determine the degree of influence of input signals on output, and the bias is used to adjust the activation threshold of the neuron, the activation function, such as ReLU, Sigmoid or Tanh, can give the neural network the ability of nonlinear modeling, so that it can solve the problems that linear models cannot solve.
[0797] Referring to FIG. 14, the specific implementation process of determining or obtaining the first mode list by the neural network model can include: determining or obtaining the neural network model corresponding to the current block, determining or obtaining the reference template of the neural network model according to at least one reference region of the current block (for example, the reference template 1 on the left, the reference template 2 on the top and the reference template 3 on the top left in FIG. 14), taking the reconstructed reference pixels of the reference template as the input of the neural network model, and obtaining the output of the neural network model, such as at least one candidate mode and / or the confidence of at least one candidate mode under the first number and / or the second number, by using the correlation between the current block and its reference template learned by the neural network model.
[0798] Optionally, the reference region includes a reference block, a reference pixel, a reference frame and / or a reference template.
[0799] Optionally, the reference region can be an image region adjacent to the current block, or a non-adjacent image region of the current block, and optionally, the reference region can be a region composed of coded and reconstructed pixels or blocks from the same frame and / or different frames.
[0800] Optionally, since there is a high correlation (for example, temporal correlation, spatial correlation, etc.) between the reference region and the current block, by using these correlations, the embodiments of the present application can significantly improve the matching degree between the obtained candidate mode and the current block, and improve the accuracy of the prediction result of the current block determined or obtained according to the candidate mode (i.e., the first prediction mode) as the prediction mode and / or determining or obtaining the second prediction mode.
[0801] Optionally, the reference block can be a pixel block corresponding to the current block extracted from a reference frame (also referred to as a reference image) or a current frame (also referred to as a current image), the reference block can have the same size as the current block, and the reference block can be used to generate a prediction block of the current block. By using the reference block, the encoder can utilize temporal or spatial correlation to reduce redundant information in the current frame, thereby achieving efficient compression.
[0802] Optionally, at least one reference block of the current block is determined or obtained according to an index obtained from the bitstream.
[0803] Optionally, the reference frame refers to a frame (also referred to as an image) that has been encoded and reconstructed, which can be a forward reference frame (i.e., a frame / image located before the current frame in the playback order) or a backward reference frame (i.e., a frame / image located after the current frame in the playback order).
[0804] Optionally, the neural network model can include an input layer, a hidden layer, a dropout layer, and an output layer.
[0805] Optionally, the input layer (Input Layer) is the first layer that receives input data, in which each node (or neuron) usually represents a feature of the input data.
[0806] Optionally, the hidden layer (Hidden Layers) is a layer between the input layer and the output layer, and the hidden layer can have multiple layers, which process the input data through weighting.
[0807] Optionally, the hidden layer includes at least one of a dense or fully connected layer, a convolutional layer, a pooling layer, a recurrent layer, and a dropout layer.
[0808] Optionally, in the dense or fully connected layer (Dense or Fully Connected Layer), each neuron is connected to each neuron of the previous layer.
[0809] Optionally, the convolutional layer (Convolutional Layer) is used to extract local features in the input data and is commonly used in image processing.
[0810] Optionally, the pooling layer (Pooling Layer) is used for downsampling to reduce ...
Claims
1. A processing method, wherein, Including the following steps: S10, perform prediction processing on the current block according to the first prediction mode.
2. The processing method as described in claim 1, wherein, It also includes at least one of the following: The current block is predicted based on the second prediction model determined or obtained from the first prediction model. The second prediction model includes a wide-angle model; The first prediction model is determined or obtained based on at least one of the following: Based on at least one reference region of the current block, or at least one statistical histogram corresponding to the current block is determined or obtained; First pattern list; At least one gradient operator; A statistical histogram includes at least one of the following: Gradient histogram; Area histogram; Histogram of the number of times the prediction mode is used for the encoded image patch.
3. The processing method as described in claim 2, wherein, Step S10 includes at least one of the following: If the first prediction mode and / or the current block meets the first condition, then the current block is predicted according to the second prediction mode determined or obtained through the first prediction mode; If the first prediction mode and / or the current block does not meet the first condition, then the current block is predicted according to the first prediction mode.
4. The processing method as described in claim 3, wherein, The first condition is satisfied if the size of the current block satisfies the second condition; and / or, the first condition is satisfied if the pixel position of the pixel corresponding to the gradient information of the first prediction mode satisfies the third condition.
5. The processing method as described in claim 4, wherein, The third condition includes at least one of the following: The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the first position information; The pixel position of the pixel corresponding to the gradient information of the first prediction mode is located in the first preset range and / or the first reference area; The pixel position of the pixel corresponding to the gradient information of the first prediction mode corresponds to the first statistical histogram. The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to the second position information; The pixel position of the pixel corresponding to the gradient information of the first prediction mode is outside the second preset range and / or the second reference area; The pixel position of the pixel corresponding to the gradient information of the first prediction mode does not correspond to the second statistical histogram.
6. The processing method as described in claim 2, wherein, Statistical histograms are determined or obtained based on at least one of the following: Gradient information of at least one reference region of the current block; Area information of at least one reference region for the current block; At least one gradient operator corresponding to at least one lookup table; At least one pair of gradient operators corresponding to weight information; The weight information corresponding to the gradient information of at least one reference region of the current block; The current block has at least one reference region and at least one lookup table.
7. The processing method as described in claim 6, wherein, At least one gradient operator includes at least one pair of mutually perpendicular gradient operators, and / or, the gradient information includes at least one of the following: Gradient information of pixels in the reference region; Overall gradient information for the reference region; Gradient information, gradient information of pixels in the reference region, and / or overall gradient information of the reference region, including gradient magnitude and / or gradient direction.
8. The processing method as described in claim 2, wherein, At least one reference region is determined or obtained based on at least one of the following: At least one of the following: the pixel above the current block, the non-adjacent pixel above the current block, the pixel to the left of the current block, the non-adjacent pixel to the left of the current block, the pixel above the left of the current block, and the non-adjacent pixel above the left of the current block; The current block is selected from at least one of the following: neighboring block, non-neighboring block, sibling block, temporal block, and default block; The current block's width, height, block size, and block area must be at least one of these. The candidate motion vector or candidate block vector of the current block is determined or the candidate block is obtained.
9. A processing apparatus, wherein, include: The memory and the processor, wherein the memory stores a processing program, and the processing program, when executed by the processor, implements the steps of the processing method as described in claim 1.
10. A storage medium, wherein, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the processing method as described in claim 1.
Citation Information
Patent Citations
Decoding method, encoding method, decoding device, and encoding device
CN118923106A
Improved method and apparatus for decoder deriving intra prediction in video coding system
CN119032564A
Image encoding / decoding method and apparatus, and recording medium having bitstream stored therein
EP4478708A1
Decoding method, encoding method, decoder, and encoder
US20250039452A1