Processing method, processing device, and storage medium
By employing a personalized pixel-level prediction method in video encoding, and using weight parameters and reference pixels for weighted calculation, the problem of pixel differences not being reflected in existing technologies is solved, thereby improving the efficiency of video encoding and decoding.
Patent Information
- Application Number
- PCT/CN2024/095333
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2025-11-27
AI Technical Summary
In existing video coding standards, intra-frame angle prediction is based on the same weighting coefficient for all pixels within a block, which fails to fully reflect the differences between individual pixels, resulting in reduced video coding and decoding efficiency.
The method employs personalized prediction or reconstruction of each pixel based on reference pixels and weight parameters within the current block, and performs weighted calculations using a weight matrix and offset table to achieve pixel-level differentiation.
It improves the prediction accuracy of video encoding and decoding, avoids the signaling overhead caused by reducing block size, and improves encoding and decoding efficiency.
Smart Images

Figure CN2024095333_27112025_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, in particular to a processing method, a processing device and a storage medium. BACKGROUND
[0002] The existing multi-functional video coding standard protocol (Versatile Video Coding, VVC), also known as H.266, proposes a coding technology for video frames to improve coding performance without significantly increasing computational complexity, for example, when coding and decoding video frames, each frame is divided into different blocks, and prediction, transformation and quantization processing are performed, and then coding and decoding processing is performed.
[0003] In the process of conceiving and implementing the present application, the inventors have found at least the following problems:
[0004] In the prediction stage, when performing intra angular prediction, the prediction of all pixels in the block is based on the same weight coefficient, which cannot fully reflect the difference between each pixel. However, if the size of the block is infinitely reduced so that the same set of weight coefficients is applied to fewer pixels, the signaling overhead will be increased, and / or the subsequent quantization and transformation effect will be deteriorated, thereby reducing the efficiency of video coding and / or decoding.
[0005] The foregoing narrative is to provide general background information and does not necessarily constitute prior art.
[0006] SUMMARY
[0007] In view of the above technical problems, the present application provides a processing method, a processing device and a storage medium, aiming to solve the technical problem of how to improve the prediction accuracy of video coding and / or decoding, and thereby improve the efficiency of video coding and / or decoding.
[0008] The present application provides a processing method, which can be applied to a processing device, comprising the steps of:
[0009] S10, predicting or reconstructing the first pixel according to the reference pixel of the first pixel in the current block and the weight parameter.
[0010] Optionally, step S10 comprises the steps of:
[0011] S11, determining or obtaining the weight array and / or weight table of the to-be-predicted pixel according to the weight matrix and / or weight table of the current block;
[0012] S12, predicting or reconstructing the to-be-predicted pixel according to the reference pixel of the to-be-predicted pixel, and at least one weight parameter in the weight array and / or weight table of the to-be-predicted pixel.
[0013] Optionally, step S12 comprises the following steps:
[0014] S13, determining at least one reference pixel of the to-be-predicted pixel, and / or determining at least one reference pixel in a block corresponding to a motion vector of the to-be-predicted pixel, and / or determining at least one reference pixel in a block corresponding to a block vector of the to-be-predicted pixel;
[0015] S14, predicting or reconstructing the to-be-predicted pixel according to the at least one reference pixel, and a weight parameter corresponding to the at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel.
[0016] Optionally, step S14 comprises at least one of the following:
[0017] when the to-be-predicted pixel is a second pixel of a first component, predicting or reconstructing the to-be-predicted pixel according to reference pixels of at least two second components corresponding to the second pixel, and weight parameters corresponding to the reference pixels of the at least two second components;
[0018] predicting or reconstructing the to-be-predicted pixel according to at least two reference pixels in the same component as the to-be-predicted pixel, and weight parameters corresponding to the at least two reference pixels in the same component;
[0019] predicting or reconstructing the to-be-predicted pixel according to at least one reference pixel in the same component as the to-be-predicted pixel, at least one reference pixel across components from the to-be-predicted pixel, a weight parameter corresponding to the at least one reference pixel in the same component, and a weight parameter corresponding to the at least one reference pixel across components.
[0020] Optionally, the manner of determining or obtaining the prediction or reconstruction result of the pixel comprises at least one of the following:
[0021] determining or obtaining an offset array and / or an offset table of the to-be-predicted pixel according to an offset matrix and / or an offset table corresponding to the current block, performing weighted calculation according to at least one offset parameter in the offset array and / or the offset table of the to-be-predicted pixel, and a weight parameter corresponding to at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel, and determining or obtaining the prediction or reconstruction result of the pixel according to a result of the weighted calculation;
[0022] performing weighted calculation according to at least one weight parameter corresponding to at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel, and an offset constant corresponding to the current block and the at least one reference pixel, and determining or obtaining the prediction or reconstruction result of the pixel according to a result of the weighted calculation;
[0023] According to the weight parameters corresponding to the at least one reference pixel in the weight array and / or the weight table of the pixel to be predicted and the at least one reference pixel, weighted processing is performed, and according to the offset array and / or the offset table of the pixel to be predicted in the offset matrix and / or the offset table corresponding to the current block and the at least one offset parameter in the offset array and / or the offset table, and the weighted processing result, the prediction or reconstruction result of the pixel is determined or obtained.
[0024] According to the weight parameters corresponding to the at least one reference pixel in the weight array and / or the weight table of the pixel to be predicted and the at least one reference pixel, weighted processing is performed, and according to the offset array and / or the offset table of the pixel to be predicted in the offset matrix and / or the offset table corresponding to the current block and the at least one offset parameter in the offset array and / or the offset table, and the weighted processing result, the prediction or reconstruction result of the pixel is determined or obtained.
[0025] Optionally, the processing method further comprises:
[0026] According to the prediction or reconstruction result of the at least one pixel in the current block, and at least one of the offset matrix and / or the offset table, the offset constant, the clipping parameter and the deformation parameter corresponding to the current block, the prediction or reconstruction result of the current block is determined or obtained.
[0027] Optionally, the processing method further comprises at least one of:
[0028] When the prediction flag obtained in the bitstream is in the first range, the reconstruction of the current block is performed according to the reference pixel and the weight parameter corresponding to the first pixel in the current block;
[0029] When the prediction flag obtained in the bitstream is in the second range, the reconstruction of the current block is performed according to the distance between the first pixel and the reference pixel corresponding to the first pixel in the current block;
[0030] When the prediction flag obtained in the bitstream is in the third range, the reconstruction of the current block is performed according to the prediction mode of the block vector or the motion vector;
[0031] When the prediction flag obtained in the bitstream is in the fourth range, it is determined that the number of weight parameters of the pixel to be predicted in the current block matches the first number of weight parameters, and the reconstruction of the current block is performed according to the reference pixel of the pixel to be predicted in the current block and the weight parameters of the first number of weight parameters;
[0032] When the prediction flag obtained in the bitstream is in the fifth range, it is determined that the number of weight parameters of the pixel to be predicted in the current block matches the second number of weight parameters, and the reconstruction of the current block is performed according to the reference pixel of the pixel to be predicted in the current block and the weight parameters of the second number of weight parameters;
[0033] A candidate prediction mode list containing at least one prediction mode is obtained, and the prediction mode for the current block is determined or obtained according to the candidate prediction mode list.
[0034] Optionally, a candidate prediction mode list including at least one prediction mode is obtained, including at least one of the following:
[0035] The third pixel corresponding to the first pixel in the approximation block / template block of the current block is determined, and the cost value of at least one prediction mode calculated according to the reference pixel corresponding to the third pixel and the weight parameter is determined or obtained to determine the candidate prediction mode list.
[0036] The third pixel corresponding to the first pixel in the approximation block / template block of the current block is determined, and the cost value of at least one prediction mode calculated according to the distance between the third pixel and the reference pixel is determined or obtained to determine the candidate prediction mode list.
[0037] The third pixel corresponding to the first pixel in the approximation block / template block of the current block is determined, and the cost value of at least one prediction mode calculated according to at least one reference pixel in the block corresponding to the motion vector and / or block vector of the third pixel and the weight parameter is determined or obtained to determine the candidate prediction mode list.
[0038] When the cost label obtained in the code stream is the first value, the third pixel corresponding to the first pixel in the approximation block / template block of the current block is determined, and the first cost value of at least one prediction mode calculated according to the reference pixel corresponding to the third pixel and the weight parameter, and / or the first cost value of at least one prediction mode calculated according to the distance between the third pixel and the reference pixel, and / or the first cost value of at least one prediction mode calculated according to at least one reference pixel in the block corresponding to the motion vector and / or block vector of the third pixel and the weight parameter is determined or obtained to determine the candidate prediction mode list.
[0039] When the cost label obtained in the code stream is the second value, the third pixel corresponding to the first pixel in the approximation block / template block of the current block is determined, and the second cost value of at least one prediction mode calculated according to the reference pixel corresponding to the third pixel and the weight parameter, and / or the second cost value of at least one prediction mode calculated according to the distance between the third pixel and the reference pixel, and / or the second cost value of at least one prediction mode calculated according to at least one reference pixel in the block corresponding to the motion vector and / or block vector of the third pixel and the weight parameter is determined or obtained to determine the candidate prediction mode list.
[0040] determining a third pixel corresponding to the first pixel in the approximation block / template block of the current block, calculating at least two different third costs of at least one prediction mode according to a reference pixel corresponding to the third pixel and a weight parameter, and / or calculating at least two different third costs of at least one prediction mode according to a distance between the third pixel and the reference pixel, and / or calculating at least two different third costs of at least one prediction mode according to at least one reference pixel in a block corresponding to a motion vector and / or a block vector of the third pixel and the weight parameter, determining or obtaining a fourth cost according to the at least two different third costs, and determining or obtaining the candidate prediction mode list according to the fourth cost.
[0041] Optionally, the processing method further comprises at least one of the following:
[0042] performing prediction on the first pixel in the current block according to a reference pixel corresponding to the first pixel in the current block and a weight parameter, and writing a prediction flag in the first range into the bitstream if a cost of the prediction result is minimum;
[0043] determining the weight parameter according to a distance between the first pixel in the current block and a reference pixel corresponding to the first pixel, and performing prediction on the current block according to the weight parameter and the reference pixel, and writing a prediction flag in the second range into the bitstream if a cost of the prediction result is minimum;
[0044] performing prediction on the current block in a prediction mode based on a block vector or a motion vector, and writing a prediction flag in the third range into the bitstream if a cost of the prediction result is minimum;
[0045] performing prediction on the current block according to a reference pixel of a pixel to be predicted in the current block and a weight parameter, and writing a prediction flag in the fourth range into the bitstream if a cost of the prediction result when the number of the weight parameters matches a first number of weight parameters is minimum;
[0046] performing prediction on the current block according to a reference pixel of a pixel to be predicted in the current block and a weight parameter, and writing a prediction flag in the fifth range into the bitstream if a cost of the prediction result when the number of the weight parameters matches a second number of weight parameters is minimum.
[0047] The application further provides a processing device, comprising:
[0048] a processing module configured to perform prediction or reconstruction on the first pixel in the current block according to a reference pixel of the first pixel in the current block and a weight parameter.
[0049] The application further provides a processing apparatus, 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.
[0050] The processing apparatus in the application can be a smart terminal or a server.
[0051] The application further provides a computer readable storage medium, which stores a computer program, and the computer program, when executed by a processor, implements the steps of the processing method according to any one of the above.
[0052] According to the technical scheme of the application, the first pixel in the current block is predicted or reconstructed according to the reference pixel and the weight parameter of the first pixel, which can directly predict or reconstruct each pixel in the block in the prediction or reconstruction stage of video coding, realizes the prediction or reconstruction from the pixel level, and further improves the prediction or reconstruction accuracy. Moreover, the first pixel is predicted or reconstructed according to the reference pixel and the weight parameter of the first pixel, the weight parameter is not fixed, and the corresponding weight parameter can be matched according to the difference between the pixels, so that the difference between the pixels in the current block can be reflected, and / or the size of the block does not need to be reduced, so that the signaling overhead is not increased, the prediction accuracy of video coding and / or decoding is improved, and the efficiency of video coding and / or decoding is further improved. BRIEF DESCRIPTION OF DRAWINGS
[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and serve to explain the principles of the application. In order to more clearly illustrate the technical scheme of the embodiments of the application, the drawings needed to be used in the embodiment description will be briefly introduced as follows. Obviously, for those of ordinary skill in the art, other drawings can also be obtained without creative labor based on these drawings.
[0054] FIG. 1 is a hardware structure schematic diagram of an intelligent terminal for implementing various embodiments of the application;
[0055] FIG. 2 is a communication network system architecture diagram provided by an embodiment of the application;
[0056] FIG. 3 is a hardware structure schematic diagram of a controller 140 provided by the application;
[0057] FIG. 4 is a hardware structure schematic diagram of a network node 150 provided by the application;
[0058] FIG. 5 is a flowchart of a processing method according to a first embodiment;
[0059] FIG. 6 is an encoding framework diagram in the processing method according to the first embodiment;
[0060] FIG. 7 is a specific flowchart of block prediction in the processing method according to the first embodiment;
[0061] FIG. 8 is a flowchart of a processing method according to a second embodiment;
[0062] Fig. 9 is a schematic diagram illustrating the principle of training a weight matrix based on a neural network in a processing method according to a second embodiment;
[0063] Fig. 10 is a schematic diagram illustrating a flow of a processing method according to a third embodiment;
[0064] Fig. 11 is a schematic diagram illustrating inter-frame prediction based on a pixel-wise weight matrix in a processing method according to the third embodiment;
[0065] Fig. 12 is a schematic diagram illustrating intra-inter hybrid prediction based on a pixel-wise weight matrix in a processing method according to the third embodiment;
[0066] Fig. 13 is a schematic diagram illustrating cross-component prediction based on a pixel-wise weight matrix in a processing method according to the third embodiment;
[0067] Fig. 14 is a schematic diagram illustrating same-component prediction based on a pixel-wise weight matrix in a processing method according to the third embodiment;
[0068] Fig. 15 is a schematic diagram illustrating determination of a list of candidate prediction modes in a processing method according to a sixth embodiment;
[0069] Fig. 16 is a schematic diagram of a processing apparatus according to an embodiment of the present application.
[0070] 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
[0071] The exemplary embodiments will be described in detail herein below with reference to the drawings. The following description refers to the accompanying drawings which show by way of examples specific embodiments of the present application. Wherever possible, the same reference indicators will be used throughout the drawings and the following description. The following exemplary embodiments described in the following description are not meant to be exhaustive or to be limited to the precise forms disclosed. They are chosen and described so that others skilled in the art can appreciate and understand the present application.
[0072] It should be noted that, as used in this document, the terms "include," "includes," "including," "has," "have," "having," or the like, are used in the sense of "including" and not by way of rinse, such that a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. In this document, the terms "first," "second," "third," etc. are used merely as identifiers for distinct elements, steps, operations, components, etc., and can not necessarily have a temporal or chronological significance. In the present document, the term "coupled" is used to express a relationship between or among multiple elements, components, or steps, and can refer to an indirect, direct, electrical, mechanical, optical, or other relationship or connection in some way, manner, or degree, and can include without limitation the coupling of content, physical components, or busses that permit information to be shared, transferred, or otherwise passed between multiple elements or components. In the present document, the term "a" or "an" entity or element refers to one or more than one of that entity or element, unless otherwise indicated.
[0073] It should be understood that, although terms first, second, third, etc. can be used herein to describe various information, the information should not be limited to these terms. These terms are used only to distinguish one category of information from another category of information. For example, a first information can be termed a second information, and, similarly, a second information can be termed a first information, without departing from the scope hereof. As used herein, the word "if' can be construed to mean "when" or "upon" or "in response to determining" 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," "has," "have," "having," and the like, when used in this document, specify the presence of stated features, steps, operations, elements, components, items, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, items, and / or groups thereof. As used herein, the term "or," "and / or," "and / or at least one of," and the like as used herein, can be construed in the alternative (i.e., one of, or any one of), or in the
[0074] It should be understood that, although the steps in the flowcharts in the embodiments of the present application are shown in sequence according to the arrows, the steps are not necessarily executed in sequence according to the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other sequences. Moreover, at least part of the steps in the figures can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be alternately executed with other steps or sub-steps or stages of other steps.
[0075] Depending on the context, the word "if" as used herein can be interpreted as meaning "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if it is determined" or "if (a stated condition or event) is detected" can be interpreted as meaning "when it is determined" or "in response to determining" or "when (a stated condition or event) is detected" or "in response to detecting (a stated condition or event)".
[0076] It should be noted that, in the present document, step codes such as S10, S20, etc. are used for the purpose of more clearly and briefly expressing the corresponding content, and do not constitute substantial restrictions in sequence. Those skilled in the art may, in specific implementation, perform S20 before performing S10, etc., but these should be within the protection scope of the present application.
[0077] It should be understood that the specific embodiments described herein are merely intended to explain the present application, and do not limit the present application.
[0078] In the following description, the suffixes such as "module", "part", or "unit" used for an element are merely intended for facilitating the description of the present application, and do not have a specific meaning by themselves. Thus, "module", "part", or "unit" can be mixedly used.
[0079] The processing device can be implemented in various forms. For example, the processing device described in the present application can include a smart terminal such as a mobile phone, a tablet, a notebook, a palmtop, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, etc., and a fixed terminal such as a digital TV, a desktop computer, etc.
[0080] In the following description, the smart terminal will be taken as an example for illustration, and those skilled in the art will understand that the structure according to the embodiments of the present application can also be applied to terminals of a fixed type, except for elements specifically used for mobile purposes.
[0081] Referring to FIG. 1, a hardware structure of a smart terminal according to an embodiment of the present application is shown. The smart terminal 100 can include an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (audio / video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that the structure of the smart terminal shown in FIG. 1 does not constitute a limitation on the smart terminal, and the smart terminal can include more or fewer components than those shown, or combine certain components, or arrange different components.
[0082] The various components of the smart terminal will be described in detail below in conjunction with FIG. 1:
[0083] 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. In addition, the radio frequency unit 101 transmits uplink data to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can communicate with a network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution), 5G, and 6G, and the like.
[0084] WiFi belongs to 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, and the like. The WiFi module 102 provides the user with wireless broadband Internet access. Although the WiFi module 102 is shown in FIG. 1, it can be understood that it does not belong to the essential components of the smart terminal, and can be omitted as needed without changing the essence of the application.
[0085] 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 as sound when the smart terminal 100 is in a call signal receiving mode, a speech mode, a recording mode, a voice recognition mode, a broadcast reception mode, and the like. Moreover, the audio output unit 103 can provide audio output related to a particular function performed by the smart terminal 100 (e.g., a call signal reception sound, a message reception sound, and the like). The audio output unit 103 can include a speaker, a buzzer, and the like.
[0086] 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.
[0087] The intelligent terminal 100 further includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Optionally, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light. The proximity sensor can turn off the display panel 1061 and / or the backlight when the intelligent 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 can detect the magnitude and direction of gravity when at rest. The accelerometer sensor can be used in applications for identifying the posture of the mobile phone (e.g., switching between landscape and portrait screens, related games, magnetometer posture calibration), vibration recognition related functions (e.g., pedometer, tapping), and the like. The intelligent terminal 100 can further include 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 are not described herein.
[0088] 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.
[0089] The user input unit 107 can be used to receive input digital or character information and to generate key signal input with respect to user's setting of the intelligent 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 a user's touch operation (such as the user's operation on or near the touch panel 1071 using a finger, a stylus, or any suitable object or accessory) and drive a corresponding connection device according to a pre-set program. The touch panel 1071 can include a touch detection device and a touch controller. Optionally, the touch detection device detects a user's touch position and detects a signal caused by the touch operation and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch coordinates and sends it to the processor 110, and can receive a command from the processor 110 and execute it. 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, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, on / off keys, etc.), a trackball, a mouse, a joystick, etc., without limitation.
[0090] Optionally, the touch panel 1071 can cover the display panel 1061, and when the touch panel 1071 detects a touch operation on or near it, 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 intelligent 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 intelligent terminal, without limitation.
[0091] The interface unit 108 serves as an interface through which at least one external device can be connected to the intelligent 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 transmit the received input to one or more elements within the intelligent terminal 100 or can be used to transmit data between the intelligent terminal 100 and the external device.
[0092] 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 non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.
[0093] The processor 110 is a control center of the intelligent terminal, connects all parts of the intelligent terminal through various interfaces and lines, executes various functions of the intelligent 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 monitors the intelligent terminal as a whole. The processor 110 can include one or more processing units; preferably, the processor 110 can integrate an application processor and a 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.
[0094] The intelligent 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 of managing charging, discharging, and power consumption management, and the like through the power management system.
[0095] Although not shown in FIG. 1, the intelligent terminal 100 can also include a Bluetooth module, and the like, which will not be described here.
[0096] In order to facilitate the understanding of the embodiments of the present application, the communication network system based on the intelligent terminal of the present application is described below.
[0097] Please refer to FIG. 2, which is a communication network system architecture provided by the embodiments of the present application. The communication network system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an operator's IP service 204, which are sequentially connected in communication.
[0098] Optionally, the UE 201 can be the terminal 100 described above, which will not be described here again.
[0099] The E-UTRAN 202 includes eNode Bs 2021 and other eNode Bs 2022. Optionally, the eNode Bs 2021 can be connected to each other 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.
[0100] 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).
[0101] The IP service 204 can include the Internet, an intranet, an IMS (IP Multimedia Subsystem), or other IP services.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a storage medium or transferred from one storage medium to another storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available media sets. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), optical medium (for example, DVD), or semiconductor medium (for example, solid state disk (SSD)) and the like.
[0109] Based on the above intelligent terminal hardware structure and communication network system, various embodiments of the present application are proposed.
[0110] First embodiment
[0111] Referring to FIG. 5, FIG. 5 is a flowchart of a processing method according to the first embodiment of the present application. The processing method according to the embodiment of the present application can be applied to a processing device, including the following steps:
[0112] S10: predicting or reconstructing the first pixel according to the reference pixel of the first pixel in the current block and the weight parameter.
[0113] In the embodiment, the processing device can be an intelligent terminal such as a mobile phone, a computer, etc., or a server such as a local server or a cloud server. In the embodiment and the present application, the processing device is mainly taken as an intelligent terminal for illustration.
[0114] Optionally, the technical solution of the embodiment can be applied to the fields of image coding, video coding, hardware video coding, special circuit video coding, real-time video coding, etc.
[0115] Optionally, for the convenience of understanding, first introduce the coding architecture. Referring to FIG. 6, in the coding framework, the input video frame can be segmented into blocks for operation, obtaining a plurality of blocks, each block is processed by a frame transformation module, and the transformed video frame is input into a transformation, quantization, intra-frame prediction, inter-frame coding, inverse quantization, inverse transformation, loop filtering and other modules, the video frame processed by the quantization module is entropy coded, and bits such as 01011100 are output. According to the video frame obtained by the loop filtering processing and the video frame processed by the frame transformation, motion estimation is performed to obtain motion information, and inter-frame prediction is performed according to the motion information. Optionally, at the encoding end, the video frame is input into a frame processing module, the module performs a certain selection rule, and then performs one or more operations such as geometric transformation, downsampling, linear transformation, nonlinear transformation, and pre-filtering processing (in the case of filtering processing, there can be no mode information) on the frame, and outputs the transformed frame. The transformed frame is input into subsequent transformation, quantization, intra-frame prediction, inter-frame coding, inverse quantization, inverse transformation and other modules. The above processing result is input into a frame inverse transformation module, and after inverse geometric transformation, upsampling, filtering processing and the like, a decoded image is output. Optionally, the loop filtering can be regarded as part of the frame inverse transformation module. Optionally, at the decoding end, the code stream is read, and the transformation mode information (in the case of filtering, there can be no mode information) is parsed; the video stream is inverse quantized, transformed, inter-frame predicted, intra-frame predicted, and the like, and a video frame (transformed at the encoding end) is decoded; the decoded image is output after the above video frame is inverse transformed according to the mode information, and the frame inverse transformation includes inverse geometric transformation, upsampling, filtering processing and the like. Optionally, the loop filtering can be regarded as part of the frame inverse transformation module.
[0116] Optionally, in a prediction algorithm, the prediction of all pixels in a block (which can be an image block) is based on the same coefficient, and the prediction processing is based on the same weight for all pixels in a block. For example, when performing intra-frame angle prediction, pred=(pixel 1+pixel 2+pixel 3+...+pixel n) / n. n is an integer greater than 1, that is, n pixels are angle predicted with the same weight. Optionally, all pixels in the block use the same weight array, for example, in cross-component CCCM prediction, that is:
[0117] pred Chroma Val=c0*C+c1*N+c2*S+c3*E+c4*W+c5*P+c6*B, the weight coefficients c0-c6 are applied to all pixels. Optionally, in a prediction mode, the weight is calculated in real time according to the coordinates / positions of the pixels, such as the angle prediction which calculates the weight of the pixels according to the distance.
[0118] In the prediction, the selected weight is the weight for the whole block, that is, the weight corresponding to all pixels in the block is the same, which cannot fully reflect the difference between each pixel. If the block is infinitely reduced, so that the same weight is applied to fewer pixels, although the prediction result will be more accurate, but it will increase the signaling overhead, making the subsequent quantization and transformation effect worse.
[0119] Optionally, in the embodiment, different weight parameters can be used for each pixel to more accurately predict the pixel. Optionally, the weight parameter can be a weight coefficient, such as a weight value corresponding to a pixel, which can be a weight parameter. Optionally, the weight parameter can be set in advance offline (such as obtained by training according to a neural network), and the weight parameter is obtained and used online during encoding or decoding. The weight parameter can be generated directly online, that is, the corresponding weight parameter is calculated by the neighbor pixels during encoding or decoding, and the weight parameter is used.
[0120] Optionally, the current block can be a block being encoded or decoded at the current time. The current block can be an image, or an image block obtained by cutting an image, which is not limited here. Optionally, the processing device can store various images and videos in advance, and can select a frame of image to be predicted as the current block from the images, or cut the selected image to obtain an image block as the current block. Alternatively, a frame of image can be extracted from a video sequence of a video as the current block, or the extracted frame of image can be cut to obtain an image block as the current block. Alternatively, the processing device receives an input image or video, extracts a frame of image from the image or video as the current block, or cuts the extracted frame of image to obtain an image block as the current block.
[0121] Optionally, the first pixel can include a pixel to be predicted or reconstructed in the current block. Optionally, the reference pixel can be a pixel having a certain association relationship with the first pixel, such as a neighbor pixel, a non-neighbor pixel, a cross-component pixel, etc. The number of reference pixels can be at least one. Optionally, the weight parameter can be a weight coefficient used for pixel prediction, and the number of weight parameters can be at least one. Optionally, each reference pixel can correspond to at least one weight parameter.
[0122] Optionally, when the processing device performs prediction, such as inter prediction and / or intra prediction, on the current block, pixel-level prediction or reconstruction can be performed on each pixel in the current block. Optionally, any pixel to be predicted or reconstructed in the current block can be regarded as a first pixel, and when prediction or reconstruction of the first pixel is performed, the prediction can be performed according to a reference pixel corresponding to the first pixel and a weight parameter. The weight parameter corresponding to the first pixel can be determined by different prediction modes. For example, the weight parameter corresponding to the first pixel can be determined by an angle prediction mode, or can be determined by a prediction mode based on a pixel-level weight matrix, and the like. After the weight parameter corresponding to the first pixel and the reference pixel corresponding to the first pixel are determined, the prediction or reconstruction of the first pixel can be performed according to the weight parameter and the reference pixel. Further, the prediction or reconstruction result of the current block can be determined according to the prediction or reconstruction result of the first pixel.
[0123] Optionally, when the processing device is an encoding end, the first pixel in the current block is predicted according to the reference pixel and the weight parameter.
[0124] Optionally, for each pixel to be predicted in the current block, the pixel to be predicted can be regarded as the first pixel to perform the operation in step S10. Optionally, the prediction of the first pixel in the current block can be performed according to at least one reference pixel corresponding to the first pixel and a weight parameter corresponding to the at least one reference pixel, to obtain a prediction result of the pixel. The prediction result of the current block can be determined or obtained according to the prediction result of the pixel corresponding to each pixel in the current block. Optionally, the prediction results of the pixels can be arranged and summarized according to the pixel positions of the first pixels in the current block, to obtain the prediction result of the current block.
[0125] Optionally, when the processing device is a decoding end, the first pixel in the current block is reconstructed according to the reference pixel and the weight parameter.
[0126] Optionally, the reconstruction process of the first pixel performed by the decoding end is similar to the prediction process of the first pixel performed by the encoding end. For each pixel to be reconstructed in the current block, the pixel to be reconstructed can be regarded as the first pixel to perform the operation in step S10. Optionally, the reconstruction of the first pixel in the current block can be performed according to at least one reference pixel corresponding to the first pixel and a weight parameter corresponding to the at least one reference pixel, to obtain a reconstruction result of the pixel. The reconstruction result of the current block can be determined or obtained according to the reconstruction result of the pixel corresponding to each pixel in the current block. Optionally, the prediction results of the pixels can be arranged and summarized according to the pixel positions of the first pixels in the current block, to obtain the reconstruction result of the current block.
[0127] Optionally, the number and type of reference pixels corresponding to each first pixel in the current block can be different, partially the same or completely the same. Optionally, the selected weight parameters can be different or the same when predicting or reconstructing each first pixel. For example, when predicting or reconstructing the first first pixel at the top left corner of the current block, the reference pixels corresponding to the first first pixel can be determined first, such as selecting the neighboring pixels in the adjacent block of the current block as the reference pixels. For example, 6 reference pixels are selected, and the weight parameters corresponding to each reference pixel can be determined. The weight parameters corresponding to each reference pixel are different. Then, the prediction result or reconstruction result of the first pixel is determined or obtained by performing weighted processing according to each reference pixel and the weight parameter corresponding to each reference pixel. Optionally, the weight parameter corresponding to each reference pixel can be directly obtained offline, such as determining the reference weight corresponding to each reference pixel by model training through a neural network or a mathematical model in advance. The weight parameter corresponding to each reference pixel can also be generated online directly. For example, the pixel distance between the first pixel and each reference pixel is determined, and different pixel distances correspond to different weight parameters.
[0128] For example, referring to FIG. 7, for the first pixel p(x, y) at the coordinate (x, y) in the current block P, the corresponding reference pixels are obtained by the reference pixel module according to the preset mapping / correspondence rule. For example, the reference pixels r0, r1,..., rn of the first pixel are obtained according to the prediction mode corresponding to the first pixel in the current block B. For example, 4 pixels in the left reference region of the first pixel are selected as the reference pixels. The n+1 weights w0, w1,..., wn are obtained from the multi-dimensional weight matrix W (one type of weight matrix) by the weight obtaining module according to the prediction mode of the current block P, the information (such as the size) of the current block, and the first pixel p(x, y). Optionally, the offset parameters corresponding to each reference pixel, such as b0,..., b5, can also be obtained. Then, the corresponding prediction result pred(x, y) is obtained by the weighted calculation module through weighted calculation. Optionally, the prediction result can be the prediction result of the first pixel.
[0129] Optionally, when predicting the first pixel, the following formulas (1)-(5) can be used to obtain the prediction result pred(x, y) of the first pixel.
[0130] Optionally, the weighted calculation can be performed according to the reference pixels and the weight parameters of the first pixel, and the weighted calculation result is taken as the prediction result of the first pixel, that is, the weighted calculation is performed according to the following formula (1).
[0131] Optionally, the weighted calculation result can be clipped according to formula (2) to obtain the prediction result of the first pixel. The clip is a clipping function, which can limit the prediction result within a reasonable pixel value range.
[0132] Optionally, the weighted calculation result can be warped according to formula (3) to obtain the prediction result of the first pixel. wbits is a positive integer, representing the number of right shifts, which is a warping operation of division.
[0133] Optionally, the weighted calculation result can be offset according to formula (4) to obtain the prediction result of the first pixel. C is an offset constant, which can be optionally determined according to the pixel bit number.
[0134] Optionally, the weighted calculation result can be offset according to formula (5) to obtain the prediction result of the first pixel.
[0135] Optionally, the offset parameter bi can be determined or obtained according to the offset matrix and / or offset table corresponding to the current block set in advance.
[0136] According to the first embodiment of the present application, the first pixel in the current block is predicted or reconstructed according to the reference pixel and the weight parameter of the first pixel, which can directly predict or reconstruct each pixel in the block during the prediction or reconstruction stage of video encoding and decoding, realize prediction or reconstruction from the pixel level, and improve the accuracy of prediction or reconstruction. Moreover, since the first pixel is predicted or reconstructed according to the reference pixel and the weight parameter of the first pixel, the weight parameter is not fixed and can be matched with the corresponding weight parameter according to the difference between pixels, and / or the size of the block does not need to be reduced, so that the signaling overhead is not increased, the prediction accuracy of video encoding and / or decoding is improved, and the efficiency of video encoding and / or decoding is improved.
[0137] Second embodiment
[0138] On the basis of the first embodiment of the present application, the second embodiment of the present application is proposed. In the second embodiment, referring to FIG. 8, step S10 includes:
[0139] Step S11, determining or obtaining the weight array and / or weight table of the to-be-predicted pixel according to the weight matrix and / or weight table of the current block;
[0140] Step S12, predicting or reconstructing the to-be-predicted pixel according to the reference pixel of the to-be-predicted pixel and at least one weight parameter in the weight array and / or weight table of the to-be-predicted pixel.
[0141] Optionally, the weight array and / or the weight table and / or the weight matrix of the to-be-predicted pixel are determined or obtained according to the weight array and / or the weight table and / or the weight matrix of the current block, and the to-be-predicted pixel is predicted or reconstructed according to the reference pixel of the to-be-predicted pixel and at least one weight parameter in the weight array and / or the weight table and / or the weight matrix of the to-be-predicted pixel. Optionally, the weight array / weight table / weight matrix of the current block and the to-be-predicted pixel are alternative names of each other. Optionally, the elements stored in the weight array / weight table / weight matrix of the to-be-predicted pixel can be a transformation of the weight parameter, can be the weight parameter directly, or can be a query index for querying the weight parameter. For example, an integer approximation of the weight parameter is stored, and for example, 0.3*a is equal to 0.3*a*64>>6, which is approximately equal to 19*a>>6, so the weight parameter 0.3 can be stored in the weight matrix / weight table / weight matrix of the to-be-predicted pixel as a transformation, such as 19.
[0142] Optionally, the weight table of the current block can be taken as a first weight table, and the weight table of the pixel can be taken as a second weight table. The to-be-predicted pixel can be the first pixel in the above embodiments.
[0143] Optionally, a plurality of weight arrays and / or second weight tables can be set in the weight matrix and / or the first weight table of the current block. Optionally, one weight array or second weight table can be set for each element in the weight matrix and / or the first weight table of the current block. Optionally, at least one weight value can be set in the weight array, and at least one weight value can be set in the second weight table. Optionally, the weight matrix and / or the first weight table of the current block can be set with multiple dimensions, such as a first dimension corresponding to the width of the block, a second dimension corresponding to the height of the block, and a third dimension corresponding to the weight array of a certain pixel. At least one weight array and / or second weight table is set in the same dimension in the weight matrix and / or the first weight table of the current block. For example, a weight array y and / or a second weight table z can be set in the x dimension in the weight matrix and / or the first weight table of the current block. And the pixel corresponding to the x dimension is pixel q, then the weight array and / or the weight table of pixel q can be determined as the weight array y and / or the second weight table z.
[0144] Optionally, the weight matrix and / or the first weight table corresponding to each block in an image can be different. Optionally, the weight array and / or the weight table corresponding to different pixels in the same block can be different. Optionally, the number of weight parameters in the weight array and / or the weight table corresponding to different pixels can be different, and the value of each weight parameter can be different. For example, a weight array corresponding to one pixel contains 5 weight values, and a weight array corresponding to another pixel contains 6 weight values.
[0145] Optionally, the weight array and / or the weight table of the to-be-predicted pixel can be a weight array and / or a weight table corresponding to the to-be-predicted pixel in the weight matrix and / or the first weight table of the current block.
[0146] Optionally, the pixel-level weight suitable for intra-frame and / or inter-frame prediction is trained by using the neural network. For example, for a block of 8x8, four kinds of weights are generated. In the first kind of weight, each of the 64 pixels has a weight data with a length of 6, i.e., a total of 64*6=384 weights, which are stored in the form of a weight array or a weight table of 8x8x6. In the second kind of weight, each of the 64 pixels has a weight data with a length of 12, i.e., a total of 64*12=764 weights, which are stored in the form of a weight array or a weight table of 8x8x12. The third and fourth kinds of weights are generated in a similar manner, which are not described herein. Optionally, the weight data can include a weight value. Optionally, all the weight arrays or weight tables can be stored in the weight matrix and / or the weight table corresponding to the block of 8x8.
[0147] Optionally, the weight matrix of the current block can be a pixel-level weight matrix. The weight matrix and / or the weight table of the current block can be applied to intra-frame prediction, each to-be-predicted pixel corresponds to multiple reference pixels (such as neighbor pixels), and a weight array and / or a weight table of a pixel is associated. The weight matrix and / or the weight table of the current block can be applied to cross-component prediction, each to-be-predicted pixel corresponds to multiple reference pixels (such as cross-component neighbor pixels), and a weight array and / or a weight table of a pixel is associated. The weight matrix and / or the weight table of the current block can be applied to inter-frame prediction and / or intra-block copy, each to-be-predicted pixel corresponds to at least one reference pixel, and a weight array and / or a weight table of a pixel is associated.
[0148] Optionally, the method (before step S11) further comprises: inputting at least one reference pixel corresponding to each pixel in the current block into the neural network or the mathematical model to obtain an output result, and determining or obtaining the weight matrix and / or the weight table of the current block according to the output result.
[0149] Optionally, the reference block or the reference frame corresponding to each pixel in the current block can be determined first, and at least one reference pixel corresponding to the pixel is obtained in the reference block or the reference frame. The at least one reference pixel is input into the neural network or the mathematical model for training to obtain an output result. The output result can be the weight matrix and / or the weight table of the current block. The weight matrix and / or the weight table of the current block includes a weight array and / or a weight table of multiple pixels (such as reference pixels).
[0150] Optionally, a training data set is established from a video set, the neural network is trained, and then a multi-dimensional weight matrix is generated. For example, as shown in FIG. 9, for each video frame, assuming the resolution is 832x480, and the width and height of each block are both set to 16, the Y component of the frame can be divided into 52x30 blocks. Similarly, the U component and the V component of the frame are divided into 52x30 8x8 blocks. For each pixel in each current block, four reference pixels are set from the corresponding reference area. If prediction is needed for the to-be-predicted pixels p1 and p2 in the current block, the corresponding reference pixels can be determined first. For example, the reference pixels of p1 are r0, r1, r2, and r3. The reference pixels of p2 are r8, r9, r10, and r11. Each reference pixel is taken as an input matrix and input into the neural network. In the neural network structure, there are weight parameters w0,..., w3, w8,..., w11, and the output result (i.e., the prediction result of the neural network for the pixels p1 and p2) is:
[0151] Optionally, the prediction or reconstruction result of p1 can be pred1, and the prediction or reconstruction result of p2 can be pred2.
[0152] Then, according to the pred(x, y) result of the neural network and the original image p(x, y) input, the loss can be obtained:
[0153] Optionally, width is the width of the block, height is the height of the block, p(x, y) is the pixel value of the pixel located at the (x, y) coordinate in the block P, and pred(x, y) is the prediction value of the pixel located at the (x, y) coordinate in the block.
[0154] Optionally, the gradient descent method can be used to train the neural network model to minimize the loss, and a trained neural network is obtained.
[0155] Optionally, the same method can be used to process all the frames in the video set, and the weights in the neural network corresponding to each frame are output to form a weight matrix.
[0156] Optionally, after the weight matrix and / or the weight table of the current block are determined or obtained, a query table can be constructed.
[0157] Optionally, the query table can include the correspondence between each pixel and the pixel weight position. The pixel weight position can be the position of the weight array and / or the weight table corresponding to the pixel in the weight matrix and / or the weight table of the current block.
[0158] In the process of predicting or reconstructing the to-be-predicted pixel in the current block, the weight array and / or the weight table of the to-be-predicted pixel can be queried in the query table, and the weight array and / or the weight table of the to-be-predicted pixel are obtained at the position of the weight matrix and / or the weight table of the current block.
[0159] Optionally, for step S11, the weight array and / or the weight table of the to-be-predicted pixel are determined or obtained according to the weight matrix and / or the weight table of the current block.
[0160] Optionally, the weight matrix and / or the weight table corresponding to the current block can be determined from the plurality of stored weight matrices and / or weight tables. Optionally, the to-be-predicted pixel in the current block can be determined. The first pixel can be the to-be-predicted pixel. The weight array and / or the weight table corresponding to the to-be-predicted pixel are queried in the weight matrix and / or the weight table corresponding to the current block.
[0161] Optionally, the query method can be directly querying in the weight matrix and / or the weight table corresponding to the current block according to the to-be-predicted pixel. Alternatively, the query method can be indirectly querying through the query table. Alternatively, other methods can be used, which are not limited herein.
[0162] Optionally, for step S12, the to-be-predicted pixel is predicted or reconstructed according to the reference pixel of the to-be-predicted pixel and at least one weight parameter in the weight array and / or the weight table of the to-be-predicted pixel.
[0163] Optionally, the reference block or the reference frame corresponding to the current block is determined, and the reference pixel corresponding to the to-be-predicted pixel is obtained in the reference block or the reference frame. The number of reference pixels can be one or more, which is not limited herein.
[0164] Optionally, the prediction or reconstruction of the to-be-predicted pixel can be determined or obtained by performing corresponding calculation according to the reference pixel of the to-be-predicted pixel and at least one weight parameter in the weight array and / or the weight table of the to-be-predicted pixel.
[0165] According to the technical scheme of the embodiment, the weight array and / or the weight table of the to-be-predicted pixel are determined or obtained according to the weight matrix and / or the weight table of the current block. In the process of predicting or reconstructing the to-be-predicted pixel, the reference pixel of the to-be-predicted pixel is determined, at least one weight parameter in the weight array and / or the weight table of the to-be-predicted pixel is determined, and the to-be-predicted pixel is predicted or reconstructed according to the reference pixel of the to-be-predicted pixel and at least one weight parameter. Thus, different weight parameters can be used for different pixels in the process of predicting the current block, which reflects the difference between the pixels in the current block, improves the accuracy of predicting or reconstructing the current block, improves the prediction accuracy of video encoding and / or decoding, and further improves the efficiency of video encoding and / or decoding.
[0166] Third embodiment
[0167] On the basis of any one of the above embodiments of the present application, the third embodiment of the present application is proposed. Referring to FIG. 10, in the third embodiment, step S12 includes the following step S13 and step S14:
[0168] Step S13, determining at least one reference pixel of the to-be-predicted pixel, and / or determining at least one reference pixel in the block corresponding to the motion vector of the to-be-predicted pixel, and / or determining at least one reference pixel in the block corresponding to the block vector of the to-be-predicted pixel;
[0169] Step S14, predicting or reconstructing the to-be-predicted pixel according to the at least one reference pixel, and the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the to-be-predicted pixel.
[0170] Optionally, when the processing device is an encoding end, if the current block is subjected to intra prediction, at least one reference pixel of the to-be-predicted pixel can be determined, and the to-be-predicted pixel can be predicted according to the at least one reference pixel, and the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the to-be-predicted pixel.
[0171] Optionally, the prediction result of the first pixel can be obtained by performing weighted calculation according to the at least two reference pixels of the to-be-predicted pixel, and the weight parameters (such as weight values) corresponding to the at least two reference pixels in the weight array and / or weight table of the to-be-predicted pixel.
[0172] Optionally, the reference pixel can be a reconstructed or predicted pixel, and can be a neighbor pixel adjacent to the position of the first pixel, or a non-neighbor pixel not adjacent to the position of the first pixel. It can also be a pixel in a reference frame corresponding to the current block.
[0173] Optionally, if the current block is subjected to inter prediction, at least one reference pixel in the block corresponding to the motion vector of the to-be-predicted pixel can be determined, and the to-be-predicted pixel can be predicted according to the at least one reference pixel, and the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the to-be-predicted pixel.
[0174] Optionally, for the first pixel in the current block, the prediction result of the first pixel can be obtained by performing weighted calculation according to at least one reference pixel in the block corresponding to the motion vector of the first pixel, and according to the at least one reference pixel, and the weight parameter (such as weight value) corresponding to the at least one reference pixel in the weight array and / or weight table of the first pixel.
[0175] For example, as shown in FIG. 11, for each pixel in the current block of the current frame (i-th frame), a plurality of reference pixels can be obtained from a reference block (located in a reference frame (such as i-1-th frame)) pointed by the block vector (motion vector MV) of the current block according to a set rule. For example, the 2 reference pixels of the to-be-predicted pixel p1 are r0 and r1. The reference pixels of the to-be-predicted pixel p2 are r2, r3, r4 and r5. That is, both the to-be-predicted pixels p1 and p2 are predicted by using inter-frame prediction.
[0176] Optionally, according to the coordinates of the to-be-predicted pixels p1 and p2 and the prediction mode of the current block, the weights w0-w5 corresponding to the reference pixels r0-r5 are obtained in the multi-dimensional weight matrix W.
[0177] Optionally, the prediction mode of the current block can determine the positions and quantities of the reference pixels of the to-be-predicted pixels.
[0178] Optionally, the prediction results pred1 and pred2 of the to-be-predicted pixels p1 and p2 can be calculated according to the obtained reference pixels and weight array. The calculation can be performed according to the following formulas (8) and (9).
[0179] Optionally, the reconstruction process of the to-be-predicted pixels can refer to the prediction process, and the reconstruction results of the to-be-predicted pixels can be obtained by performing weighted calculation in a manner similar to the formulas (8) and (9).
[0180] Optionally, if the current block is predicted by using Intra Block Copy (IBC), at least one reference pixel in the block corresponding to the block vector of the to-be-predicted pixel can be determined, and the to-be-predicted pixel can be predicted according to the at least one reference pixel, and the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the to-be-predicted pixel.
[0181] Optionally, for a first pixel in the current block, the prediction result of the first pixel can be obtained by performing weighted calculation according to at least one reference pixel in the block corresponding to the block vector of the first pixel, and the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the first pixel.
[0182] Optionally, the block vector can indicate the direction and distance of copying pixel data from one position to another position in the same frame. The block corresponding to the block vector of the to-be-predicted pixel can be a reference block pointed by the to-be-predicted pixel in the current block in the same frame. At least one pixel in the reference block that has been predicted is used as a reference pixel.
[0183] Optionally, if the current block is predicted by at least two of the intra prediction, the inter prediction and the intra block copy, multiple reference pixels can be obtained simultaneously. For example, if the current block is predicted by all of the intra prediction, the inter prediction and the intra block copy, at least one reference pixel of the to-be-predicted pixel can be determined, at least one reference pixel in the block corresponding to the motion vector of the to-be-predicted pixel can be determined, and at least one reference pixel in the block corresponding to the block vector of the to-be-predicted pixel can be determined. Then, the to-be-predicted pixel can be predicted according to all the determined reference pixels, and the weight parameters corresponding to the reference pixels in the weight array and / or the weight table of the to-be-predicted pixel.
[0184] For example, as shown in FIG. 12, when the current block is predicted by the intra-inter hybrid prediction based on the pixel-level weight matrix, for each pixel of the current block in the current frame (the i-th frame), multiple reference pixels can be obtained from the reference region of the current frame according to a preset rule. For example, the two reference pixels r6 and r7 of the to-be-predicted pixel p1, and the reference pixels r8, r9, r10 and r11 of the to-be-predicted pixel p2. Optionally, multiple reference pixels can also be obtained from the reference block (in the reference frame (for example, the i-1-th frame)) pointed by the block vector (motion vector MV) of the current block according to a preset rule. For example, the two reference pixels r0 and r1 of the to-be-predicted pixel p1, and the reference pixels r2,..., r5 of the to-be-predicted pixel p2. Finally, the reference pixels of the to-be-predicted pixel p1 are determined as r0, r1, r6 and r7, and the reference pixels of the to-be-predicted pixel p2 are determined as r2, r3, r4, r5, r8, r9, r10 and r11. That is, the to-be-predicted pixels p1 and p2 are both predicted by the intra-inter hybrid prediction.
[0185] Optionally, the weight parameters w0-w11 corresponding to the reference pixels r1-r11 can be obtained from the multi-dimensional weight matrix W according to the coordinates of the to-be-predicted pixels p1 and p2 and the prediction mode of the current block.
[0186] Optionally, the prediction mode of the current block can determine the positions and quantities of the reference pixels of the to-be-predicted pixels.
[0187] Optionally, the prediction results pred1 and pred2 of the to-be-predicted pixels p1 and p2 can be calculated according to the obtained reference pixels and the weight array. The calculation can be performed according to the following formulas (10) and (11).
[0188] Optionally, the reconstruction process of the to-be-predicted pixels can be performed by referring to the prediction process, and the reconstruction results of the to-be-predicted pixels can be obtained by performing the weighted calculation in a manner similar to the formulas (10) and (11).
[0189] Optionally, when the processing device is a decoding end, the to-be-predicted pixels can be pixels to be reconstructed.
[0190] Optionally, if the current block is predicted by intra prediction, at least one reference pixel of the to-be-predicted pixel can be determined, and the to-be-predicted pixel is reconstructed according to the at least one reference pixel, and a weight parameter corresponding to the at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel. If the current block is predicted by inter prediction, at least one reference pixel in a block corresponding to a motion vector of the to-be-predicted pixel can be determined, and the to-be-predicted pixel is reconstructed according to the at least one reference pixel, and a weight parameter corresponding to the at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel. If the current block is predicted by intra block copy, at least one reference pixel in a block corresponding to a block vector of the to-be-predicted pixel can be determined, and the to-be-predicted pixel is reconstructed according to the at least one reference pixel, and a weight parameter corresponding to the at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel.
[0191] Optionally, the reconstruction process of the pixel at the decoding end is similar to the prediction process of the pixel at the encoding end, and details can be referred to the prediction process of the pixel at the encoding end, which will not be described herein.
[0192] In the embodiment, the to-be-predicted pixel is predicted or reconstructed according to the at least one reference pixel and the weight parameter corresponding to the at least one reference pixel, so that the prediction or reconstruction can be performed at the pixel level, and the accuracy of the prediction or reconstruction of the current block is improved. When the reference pixel is determined, at least one reference pixel of the to-be-predicted pixel is determined, and / or at least one reference pixel in a block corresponding to a motion vector of the to-be-predicted pixel is determined, and / or at least one reference pixel in a block corresponding to a block vector of the to-be-predicted pixel is determined. When the weight parameter corresponding to the reference pixel is determined, the weight parameter is determined from the weight array and / or the weight table of the to-be-predicted pixel. Therefore, when the to-be-predicted pixel is predicted, different reference pixels can be selected, and different weight parameters can be used for different reference pixels, that is, the weight parameters corresponding to each reference pixel can be different, so that the difference between different reference pixels can be reflected, and the accuracy of the prediction or reconstruction of the to-be-predicted pixel and / or the current block is improved, and the prediction accuracy and / or efficiency of video encoding and / or decoding is improved.
[0193] Optionally, the step S14 comprises at least one of the following modes one to three:
[0194] In mode one, when the to-be-predicted pixel is a second pixel of a first component, the to-be-predicted pixel is predicted or reconstructed according to reference pixels of at least two second components corresponding to the second pixel, and weight parameters corresponding to the reference pixels of the at least two second components.
[0195] Optionally, the first component and the second component are different, and each of the first component and the second component can be at least one of a Y component, a U component and a V component. For example, when the first component is a Y component, the second component is at least one of a U component and a V component. When the first component is a V component, the second component is at least one of a Y component and a U component. The second pixel can be a pixel in a first component block corresponding to the current block.
[0196] Optionally, when the processing device is an encoding end, the pixel to be predicted is a second pixel of a first component, and the pixel to be predicted is predicted according to reference pixels of at least two second components corresponding to the second pixel and weight parameters corresponding to the reference pixels of the at least two second components.
[0197] Optionally, when the pixel to be predicted is a second pixel of a first component, at least two reference pixels of the pixel to be predicted can be determined in a second component of the current block. Then, weight parameters corresponding to the at least two reference pixels of the second component are determined in a weight array and / or a weight table of the pixel to be predicted, and a weighted calculation result is obtained according to the determined reference pixels and the corresponding weight parameters. The prediction result of the pixel to be predicted is determined or obtained according to the weighted calculation result.
[0198] Optionally, when the processing device is a decoding end, the pixel to be predicted is a second pixel of a first component, and the pixel to be predicted is reconstructed according to reference pixels of at least two second components corresponding to the second pixel and weight parameters corresponding to the reference pixels of the at least two second components.
[0199] Optionally, for example, as shown in FIG. 13, a plurality of reference pixels can be obtained from the reference area in FIG. 13 for each pixel of the current block. For example, 12 reference pixels of the pixel to be predicted p1 are r0,..., r7, r16,..., r19. The reference pixels r0,..., r7 are pixels in the reference area in the Cb component. The reference pixels r16,..., r19 are pixels in the reference area in the Luma component. For example, 8 reference pixels of the pixel to be predicted p2 are r8,..., r15. The reference pixels r8,..., r11 are pixels in the reference area in the Cb component. The reference pixels r12,..., r15 are pixels in the reference area in the Luma component.
[0200] Optionally, the weight parameters corresponding to the respective reference pixels, such as the weight parameters w0,..., w19 corresponding to the reference pixels r0,..., r19, can be obtained from a multi-dimensional weight matrix W according to the coordinates of p1 and p2 and the prediction mode of the current block. Optionally, the prediction mode of the current block can determine the positions and quantities of the reference pixels of the pixel to be predicted.
[0201] Optionally, the prediction results pred1 and pred2 of the pixels to be predicted, p1 and p2, can be calculated based on the obtained reference pixels and weight array. The calculation can be performed according to the following formulas (12) and (13).
[0202] Optionally, the reconstruction process of the pixel to be predicted can be carried out with reference to the prediction process, and weighted calculation can be performed in a manner similar to formulas (12) and (13) to obtain the reconstruction result of the pixel to be predicted.
[0203] Optionally, in a scenario, when the pixel to be predicted is the second pixel of the first component, at least one reference pixel of the second component corresponding to the second pixel can be determined, and at least one reference pixel of the third component corresponding to the second pixel can be determined. Weight parameters corresponding to at least one reference pixel of the second component and weight parameters corresponding to at least one reference pixel of the third component are determined in the weight array and / or weight table of the second pixel. A weighted calculation is performed based on the at least one reference pixel of the second component, the weight parameters corresponding to the at least one reference pixel of the second component, and the weight parameters corresponding to the at least one reference pixel of the third component. The prediction or reconstruction result of the pixel to be predicted is determined based on the weighted calculation result. For example, the weighted calculation result can be directly used as the prediction or reconstruction result, or the weighted calculation result can be offset to obtain the prediction or reconstruction result of the pixel to be predicted.
[0204] Optionally, the first component, the second component, and the third component are all different. For example, the first component is the Y component, the second component is the U component, and the third component is the V component.
[0205] In this embodiment, when the pixel to be predicted is the second pixel of the first component, the pixel to be predicted can be predicted or reconstructed based on at least two reference pixels of the second component and their corresponding weight parameters. This enables cross-component processing during the prediction or reconstruction of the pixel to be predicted, improving the accuracy of the prediction or reconstruction of the pixel to be predicted and / or the current block, thereby improving the prediction accuracy and / or efficiency of video encoding and / or decoding.
[0206] Method 2: Predict or reconstruct the pixel to be predicted based on at least two reference pixels that are in the same component as the pixel to be predicted, and the weight parameters corresponding to at least two reference pixels in the same component.
[0207] Optionally, at least two reference pixels in the same component can be pixels that are in the same component as the pixel to be predicted and have already been predicted or reconstructed. For example, the pixel to be predicted and at least two reference pixels in the same component are both in the Y component.
[0208] Optionally, when the processing device is an encoding end, the to-be-predicted pixel is predicted according to at least two reference pixels in the same component as the to-be-predicted pixel and weight parameters corresponding to the at least two reference pixels in the same component in the weight array and / or the weight table of the to-be-predicted pixel.
[0209] Optionally, when the pixel is predicted, the to-be-predicted pixel can be obtained by performing weighted calculation on two reference pixels in the same component as the to-be-predicted pixel and weight parameters corresponding to the two reference pixels.
[0210] Optionally, when the processing device is a decoding end, the to-be-predicted pixel is reconstructed according to at least two reference pixels in the same component as the to-be-predicted pixel and weight parameters corresponding to the at least two reference pixels in the same component in the weight array and / or the weight table of the to-be-predicted pixel.
[0211] For example, as shown in FIG. 14, for each pixel in the current block, a plurality of reference pixels can be obtained from a reference region corresponding to the current block, such as reference pixels of to-be-predicted pixels p1 and p2, which can be obtained from a reference region in the same component as the current block. The reference region in the same component can be a region in a block adjacent to the to-be-predicted pixel in the current block. Optionally, the reference pixels of the to-be-predicted pixel p1 can be r0, r1, r2, r3, r4, r5, r6, and r7. The reference pixels of the to-be-predicted pixel p2 can be r8, r9, r10, and r11.
[0212] Optionally, the corresponding weight parameters can be obtained from a multi-dimensional weight matrix W according to the coordinates of the to-be-predicted pixels p1 and p2 and the prediction mode of the current block. For example, the weight parameters w0,..., w7 corresponding to the reference pixels r0-r7 in the weight array of p1, and the weight parameters w8,..., w11 corresponding to the reference pixels r8-r11 in the weight array of p2.
[0213] Optionally, the prediction mode of the current block can determine the positions and quantities of the reference pixels of the to-be-predicted pixels.
[0214] Optionally, the prediction results pred1 and pred2 of the to-be-predicted pixels p1 and p2 can be calculated according to the obtained reference pixels and the weight array. The calculation can be performed according to the following formulas (14) and (15).
[0215] Optionally, the reconstruction process of the to-be-predicted pixel can refer to the prediction process, and the weighted calculation can be performed in a manner similar to the formulas (14) and (15) to obtain the reconstruction result of the to-be-predicted pixel.
[0216] In the embodiment, the pixel to be predicted is predicted or reconstructed according to at least one reference pixel in the same component and the weight parameter corresponding to the at least one reference pixel, so that the at least one reference pixel in the same component and the weight parameter corresponding to the at least one reference pixel can be quickly determined when the pixel to be predicted is predicted or reconstructed, the prediction or reconstruction accuracy of the pixel to be predicted and / or the current block is improved, and the prediction accuracy or efficiency of video encoding and / or decoding is improved.
[0217] In the third mode, the pixel to be predicted is predicted or reconstructed according to at least one reference pixel in the same component, at least one reference pixel in the cross component, the weight parameter corresponding to the at least one reference pixel in the same component, and the weight parameter corresponding to the at least one reference pixel in the cross component.
[0218] Optionally, the at least one reference pixel in the same component is in the same component as the pixel to be predicted and has been predicted or reconstructed. For example, the pixel to be predicted and the at least one reference pixel in the same component are both in the U component. The at least one reference pixel in the cross component is in a different component from the pixel to be predicted and has been predicted or reconstructed. For example, the pixel to be predicted is in the U component of the current block, and the at least one reference pixel in the cross component can be a pixel in the V component or the Y component of the current block which has been predicted or reconstructed.
[0219] Optionally, when the processing device is an encoding end, the pixel to be predicted is predicted according to the at least one reference pixel in the same component, the at least one reference pixel in the cross component, the weight parameter corresponding to the at least one reference pixel in the same component, and the weight parameter corresponding to the at least one reference pixel in the cross component in the weight array and / or the weight table of the pixel to be predicted, to obtain a corresponding prediction result.
[0220] Optionally, the pixel to be predicted is predicted by weighting the at least one reference pixel in the same component, the at least one reference pixel in the cross component, the weight parameter corresponding to the at least one reference pixel in the same component, and the weight parameter corresponding to the at least one reference pixel in the cross component.
[0221] For example, when the pixel to be predicted is a pixel in the Y component of the current block, the at least one reference pixel in the same component can also be at least one neighbor pixel in the Y component of the current block which has been predicted or reconstructed. The at least one reference pixel in the cross component can include at least one pixel in the U component of the current block which has been predicted or reconstructed, and / or at least one pixel in the V component of the current block which has been predicted or reconstructed. Then, the pixel to be predicted is predicted by weighting the at least one reference pixel in the Y component, the at least one reference pixel in the U component and / or the V component, and the weight parameter corresponding to each reference pixel.
[0222] Optionally, when the processing device is a decoding end, according to at least one reference pixel in the same component as the pixel to be predicted, at least one reference pixel in the cross component as the pixel to be predicted, reconstructing the weight parameters corresponding to the at least one reference pixel in the same component as the pixel to be predicted and the weight parameters corresponding to the at least one reference pixel in the cross component as the pixel to be predicted in the weight array and / or the weight table of the pixel to be predicted, a corresponding reconstruction result is obtained.
[0223] According to the embodiment, the pixel to be predicted is predicted or reconstructed according to at least one reference pixel in the same component as the pixel to be predicted and the weight parameters corresponding to the at least one reference pixel, and at least one reference pixel in the cross component as the pixel to be predicted and the weight parameters corresponding to the at least one reference pixel, so that the reference pixel is determined without being limited to the same component, and the accuracy of the determined reference pixel, the weight parameters corresponding to the reference pixel, and / or the pixel to be predicted and / or the current block is improved, and the prediction accuracy or / and the efficiency of video encoding and / or decoding is improved.
[0224] Fourth embodiment
[0225] On the basis of any one of the above embodiments of the present application, the fourth embodiment is proposed. In the embodiment, the manner of determining or obtaining the prediction or reconstruction result of the pixel includes at least one of the following manners four to seven:
[0226] Manner four, determining or obtaining the offset array and / or the offset table of the pixel to be predicted according to the offset matrix and / or the offset table corresponding to the current block, performing weighted calculation according to at least one offset parameter in the offset array and / or the offset table of the pixel to be predicted and the weight parameters corresponding to at least one reference pixel in the weight array and / or the weight table of the reference pixel and the pixel to be predicted, and determining or obtaining the prediction or reconstruction result of the pixel according to the weighted calculation result;
[0227] Optionally, the offset array and / or the offset table and / or the offset matrix of the pixel to be predicted is determined or obtained according to the offset matrix and / or the offset table and / or the offset array of the current block, and at least one offset parameter in the offset array and / or the offset table and / or the offset matrix of the pixel to be predicted is determined.
[0228] Optionally, the offset array / offset table / offset matrix of the current block or the pixel to be predicted are alternative names. Optionally, the elements stored in the offset array / offset table / offset matrix of the pixel to be predicted can be a deformation of the offset parameter, can be the offset parameter directly, or can be a query index for querying the offset parameter. For example, the integer approximation form of the offset parameter 0.3*a is equal to 0.3*a*64>>6, which is approximately equal to 19*a>>6, so the deformation of the offset parameter 0.3, such as 19, can be stored in the offset array / offset table / offset matrix of the pixel to be predicted.
[0229] Optionally, the offset table corresponding to the current block can be set as the first offset table, and the offset table of the to-be-predicted pixel can be set as the second offset table. The offset parameter can include at least one offset value.
[0230] Optionally, a plurality of offset arrays and / or the second offset table can be set in the offset matrix and / or the first offset table of the current block. Optionally, one offset array or the second offset table can be set in each element in the offset matrix and / or the first offset table of the current block. Optionally, at least one offset value can be set in the offset array, and at least one offset value can be set in the second offset table. Optionally, the offset matrix and / or the first offset table of the current block can be set with a plurality of dimensions, and each dimension corresponds to one pixel. At least one offset array and / or the second offset table can be set in the same dimension in the offset matrix and / or the first offset table of the current block. For example, one offset array y and / or the second offset table z can be set in the x dimension in the offset matrix and / or the first offset table of the current block. If the pixel corresponding to the x dimension is pixel q, the offset array and / or the offset table of pixel q can be determined as the offset array y and / or the second offset table z.
[0231] Optionally, the offset matrix and / or the first offset table corresponding to each block in one frame of image can be the same or different. Optionally, the offset array and / or the offset table corresponding to different pixels in the same block can be the same or different. Optionally, the number of offset parameters in the offset array and / or the offset table corresponding to different pixels can be different, and the value of each offset parameter can be different. For example, the offset array corresponding to one pixel includes 5 offset values, and the offset array corresponding to another pixel includes 6 offset values.
[0232] Optionally, the offset array and / or the offset table of the to-be-predicted pixel can be the offset array and / or the second offset table corresponding to the to-be-predicted pixel in the offset matrix and / or the first offset table of the current block.
[0233] Optionally, the offset matrix and / or offset table corresponding to the plurality of blocks can be set offline in advance, and the offset matrix and / or offset table corresponding to the current block can be determined when the prediction of the current block is performed. When the pixel to be predicted in the current block is predicted, the position of the offset array and / or offset table corresponding to the pixel to be predicted can be determined according to the mapping table set in advance. Optionally, the mapping table is set in advance with a one-to-one correspondence between all the first pixels in the current block and the positions of the offset array and / or offset table. Optionally, the position of the offset array and / or offset table can be the position of the pixel in the offset array and / or offset table in the offset matrix and / or offset table corresponding to the current block. Optionally, the offset array and / or offset table of the pixel to be predicted can also be directly determined or obtained by searching in the offset matrix and / or offset table corresponding to the current block.
[0234] Optionally, when the at least one offset parameter in the offset array and / or offset table of the pixel to be predicted is determined, the at least one offset parameter can be randomly selected in the offset array and / or offset table of the pixel to be predicted. The at least one offset parameter can also be determined or obtained in the offset array and / or offset table of the pixel to be predicted according to the at least one reference pixel corresponding to the pixel to be predicted. For example, the correspondence between different pixels and offset parameters can be set in the offset array and / or offset table, and the offset parameter corresponding to the at least one reference pixel in the offset array and / or offset table of the pixel to be predicted is determined, and the offset parameter is selected for the prediction or reconstruction processing of the pixel to be predicted.
[0235] Optionally, after the at least one offset parameter of the pixel to be predicted, and the at least one reference pixel and the weight parameter corresponding to the at least one reference pixel are determined, the weighted calculation can be performed according to the at least one offset parameter, the at least one reference pixel and the weight parameter, and the prediction or reconstruction result of the pixel can be determined or obtained according to the weighted calculation result. For example, the weighted calculation result can be directly taken as the prediction or reconstruction result of the pixel. Or the weighted calculation result is format-converted or data-converted to obtain the prediction or reconstruction result of the pixel. For example, if there is one reference pixel, it is assumed that y=ax, a is the weight, x is the reference pixel, and y can be the prediction result. Or y=ax+b, y can be the prediction result, a is the weight, x is the reference pixel, and b is the offset parameter.
[0236] Optionally, when the processing device performs intra prediction on the current block, at least one reference pixel of the to-be-predicted pixel can be determined. The offset array and / or offset table of the to-be-predicted pixel are determined or obtained according to the offset matrix and / or offset table corresponding to the current block. At least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel is determined. For example, the offset parameter corresponding to the reference pixel can be determined. Then, the weighted calculation is performed according to the offset parameter, the at least one reference pixel, and the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the to-be-predicted pixel. The result of the weighted calculation can be used as the prediction result of the pixel, or the result of the weighted calculation can be converted and the converted result can be used as the prediction or reconstruction result of the pixel.
[0237] Optionally, when the processing device performs inter prediction on the current block, at least one reference pixel in the block corresponding to the motion pixel of the to-be-predicted pixel can be determined. The offset array and / or offset table of the to-be-predicted pixel are determined or obtained according to the offset matrix and / or offset table corresponding to the current block. The weighted calculation is performed according to at least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel, and the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the reference pixel and the to-be-predicted pixel. The prediction or reconstruction result of the pixel is determined or obtained according to the result of the weighted calculation.
[0238] Optionally, when the processing device performs intra block copy on the current block, at least one reference pixel in the block corresponding to the block vector of the to-be-predicted pixel can be determined. The offset array and / or offset table of the to-be-predicted pixel are determined or obtained according to the offset matrix and / or offset table corresponding to the current block. The weighted calculation is performed according to at least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel, and the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the reference pixel and the to-be-predicted pixel. The prediction or reconstruction result of the pixel is determined or obtained according to the result of the weighted calculation.
[0239] Optionally, mode one and mode four can also be combined, that is, when the to-be-predicted pixel is a second pixel of a first component, at least two reference pixels of second components corresponding to the second pixel are determined, and the weight parameter corresponding to the at least two reference pixels of second components in the weight array and / or weight table of the to-be-predicted pixel is determined. The offset array and / or offset table of the to-be-predicted pixel are determined or obtained according to the offset matrix and / or offset table corresponding to the current block. The weighted calculation is performed according to at least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel, and the at least two reference pixels of second components and the weight parameter corresponding to the at least two reference pixels of second components. The prediction or reconstruction result of the pixel is determined or obtained according to the result of the weighted calculation.
[0240] Optionally, the second mode can be combined with the fourth mode, i.e., at least two reference pixels in the same component as the pixel to be predicted are determined, and the weight parameters corresponding to the at least two reference pixels in the same component in the weight array and / or weight table of the pixel to be predicted are determined. The at least one offset parameter in the offset array and / or offset table of the pixel to be predicted, the at least two reference pixels in the same component, and the weight parameters corresponding to the at least two reference pixels in the same component are used for weighted calculation, and the prediction result of the pixel is determined or obtained according to the weighted calculation result.
[0241] Optionally, the third mode can be combined with the fourth mode, i.e., at least one reference pixel in the same component as the pixel to be predicted is determined, at least one reference pixel in the cross component as the pixel to be predicted is determined, the weight parameters corresponding to the at least one reference pixel in the same component and the at least one reference pixel in the cross component in the weight array and / or weight table of the pixel to be predicted are determined. The at least one offset parameter in the offset array and / or offset table of the pixel to be predicted, the at least one reference pixel in the same component, the at least one reference pixel in the cross component, the weight parameters corresponding to the at least one reference pixel in the same component, and the weight parameters corresponding to the at least one reference pixel in the cross component are used for weighted calculation, and the prediction or reconstruction result of the pixel is determined or obtained according to the weighted calculation result.
[0242] In the embodiment, the offset array and / or offset table of the pixel to be predicted is determined or obtained according to the offset matrix and / or offset table corresponding to the current block, at least one offset parameter is determined or obtained in the offset array and / or offset table of the pixel to be predicted, the weight parameters corresponding to the reference pixel are determined in the weight array and / or weight table of the pixel to be predicted, and the weighted calculation is performed according to the at least one offset parameter, the reference pixel, and the weight parameters corresponding to the reference pixel, and the prediction or reconstruction result of the pixel is determined or obtained according to the weighted calculation result. That is, when determining the prediction or reconstruction result of the pixel, not only the reference pixel of the pixel to be predicted and the corresponding weight parameters are limited, but also at least one offset parameter is determined or obtained according to the offset array and / or offset table corresponding to the pixel to be predicted, and then the weighted calculation is directly performed according to the offset parameter, the weight parameter, and the reference pixel in the process of prediction or reconstruction, so as to determine or obtain the prediction or reconstruction result of the pixel. The accuracy of the prediction or reconstruction result of the pixel and / or the current block can be improved, and the prediction accuracy and / or efficiency of video encoding and / or decoding can be improved.
[0243] The fifth mode is to perform weighted calculation according to the weight parameters corresponding to the at least one reference pixel in the weight array and / or weight table of the pixel to be predicted, and the offset constant and the at least one reference pixel corresponding to the current block, and determine or obtain the prediction or reconstruction result of the pixel according to the weighted calculation result.
[0244] Optionally, the offset constant can be a fixed value set in advance, such as 512, i.e. 2^9, etc. The number of offset constants can be multiple or one, which is not limited here.
[0245] Optionally, the offset constant set in advance can be obtained, and after determining the at least one reference pixel of the pixel to be predicted and the weight parameter corresponding to the at least one reference pixel, the at least one offset parameter, the at least one reference pixel and the weight parameter can be used for weighted calculation, and the prediction or reconstruction result of the pixel can be determined or obtained according to the weighted calculation result. For example, the weighted calculation result is directly taken as the prediction or reconstruction result of the pixel. Or the weighted calculation result is format-converted or data-converted to obtain the prediction or reconstruction result of the pixel. For example, if there is one reference pixel, assuming that y=ax, a is the weight, x is the reference pixel, and y can be the prediction result. Or y=ax+b, y can be the prediction result, a is the weight, x is the reference pixel, and b is the offset parameter or offset constant.
[0246] Optionally, when the processing device performs intra prediction on the current block, at least one reference pixel of the pixel to be predicted can be determined. The weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the pixel to be predicted, and the offset constant corresponding to the current block and the reference pixel are used for weighted calculation, and the prediction or reconstruction result of the pixel is determined or obtained according to the weighted calculation result.
[0247] Optionally, when the processing device performs inter prediction on the current block, at least one reference pixel in the block corresponding to the motion vector of the pixel to be predicted can be determined. The weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the pixel to be predicted, and the offset constant corresponding to the current block and the reference pixel are used for weighted calculation, and the prediction or reconstruction result of the pixel is determined or obtained according to the weighted calculation result.
[0248] Optionally, when the processing device performs intra block copy on the current block, at least one reference pixel in the block corresponding to the block vector of the pixel to be predicted can be determined. The weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the pixel to be predicted, and the offset constant corresponding to the current block and the reference pixel are used for weighted calculation, and the prediction or reconstruction result of the pixel is determined or obtained according to the weighted calculation result.
[0249] Optionally, the first mode and the fifth mode can also be combined, that is, when the pixel to be predicted is a second pixel of a first component, at least two reference pixels corresponding to the second pixel of the first component are determined, and the weight parameters corresponding to the at least two reference pixels of the second pixel in the weight array and / or the weight table of the pixel to be predicted are determined. According to the at least two reference pixels of the first component, the weight parameters corresponding to the at least two reference pixels of the first component, and the offset constant corresponding to the current block, a weighted calculation is performed, and the prediction or reconstruction result of the pixel is determined or obtained according to the weighted calculation result.
[0250] Optionally, the second mode and the fifth mode can also be combined, that is, at least one reference pixel in the same component as the pixel to be predicted is determined, and the weight parameters corresponding to the at least two reference pixels of the same component in the weight array and / or the weight table of the pixel to be predicted are determined. According to the at least two reference pixels of the same component, the weight parameters corresponding to the at least two reference pixels of the same component, and the offset constant corresponding to the current block, a weighted calculation is performed, and the prediction or reconstruction result of the pixel is determined or obtained according to the weighted calculation result.
[0251] Optionally, the third mode and the fifth mode can also be combined, that is, at least one reference pixel in the same component as the pixel to be predicted is determined, and at least one reference pixel in the cross-component as the pixel to be predicted is determined. The weight parameters corresponding to the at least one reference pixel of the same component and the weight parameters corresponding to the at least one reference pixel of the cross-component in the weight array and / or the weight table of the pixel to be predicted are determined. According to the offset constant corresponding to the current block, and the at least one reference pixel of the same component, the at least one reference pixel of the cross-component, the weight parameters corresponding to the at least one reference pixel of the same component, and the weight parameters corresponding to the at least one reference pixel of the cross-component, a weighted calculation is performed, and the prediction or reconstruction result of the pixel is determined or obtained according to the weighted calculation result.
[0252] In the embodiment, the prediction or reconstruction result of the pixel is determined or obtained by performing a weighted calculation on the at least one reference pixel according to the weight parameters corresponding to the at least one reference pixel in the weight array and / or the weight table of the pixel to be predicted, the offset constant corresponding to the current block, and the at least one reference pixel. The accuracy of the prediction or reconstruction result of the pixel and / or the current block can be improved, and the prediction accuracy and / or efficiency of video encoding and / or decoding can be improved.
[0253] The sixth mode is to perform a weighted processing on the at least one reference pixel according to the weight parameters corresponding to the at least one reference pixel in the weight array and / or the weight table of the pixel to be predicted, and the at least one reference pixel, and to determine or obtain the prediction or reconstruction result of the pixel according to the at least one offset parameter in the offset array and / or the offset table of the pixel to be predicted in the offset matrix and / or the offset table corresponding to the current block, and the weighted processing result.
[0254] Optionally, the offset matrix and / or offset table corresponding to the current block in the present embodiment can be the same as the offset matrix and / or offset table corresponding to the current block in the fourth mode, which will not be described herein. The offset array and / or offset table of the to-be-predicted pixel can also refer to the related description in the fourth mode, which will not be described herein. Optionally, the offset parameter can include at least one offset value.
[0255] Optionally, the offset array and / or offset table of the to-be-predicted pixel can be determined or obtained by screening in the offset matrix and / or offset table corresponding to the current block. At least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel can be randomly selected. At least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel can also be determined or obtained according to at least one reference pixel corresponding to the to-be-predicted pixel.
[0256] Optionally, after determining at least one offset parameter of the to-be-predicted pixel and at least one reference pixel of the to-be-predicted pixel and the weight parameter corresponding to the at least one reference pixel, the prediction or reconstruction result of the pixel can be determined or obtained by first performing weighting processing according to the at least one reference pixel and the weight parameter corresponding to the at least one reference pixel, and then performing offset processing on the result of the weighting processing according to the at least one offset parameter. Optionally, when performing the weighting processing, the product of each reference pixel and the weight parameter corresponding to the reference pixel can be calculated, and all the products can be added, and then the result of the addition is divided by the sum of all the weight values to obtain the result of the weighting processing.
[0257] Optionally, when the processing device performs intra prediction on the current block, at least one reference pixel of the to-be-predicted pixel can be determined. The offset array and / or offset table of the to-be-predicted pixel can be determined or obtained according to the offset matrix and / or offset table corresponding to the current block. At least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel can be determined. The weighting processing result can be obtained by performing weighting processing according to at least one reference pixel and the weight parameter corresponding to the at least one reference pixel in the weight array. The prediction or reconstruction result of the pixel can be determined or obtained by performing offset processing on the result of the weighting processing according to the at least one offset parameter.
[0258] Optionally, when the processing device performs inter prediction on the current block, at least one reference pixel in the block corresponding to the motion pixel of the to-be-predicted pixel can be determined. The offset array and / or offset table of the to-be-predicted pixel can be determined or obtained according to the offset matrix and / or offset table corresponding to the current block. At least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel can be determined. The weighting processing result can be obtained by performing weighting processing according to at least one reference pixel and the weight parameter corresponding to the at least one reference pixel in the weight array. The prediction or reconstruction result of the pixel can be determined or obtained by performing offset processing on the result of the weighting processing according to the at least one offset parameter.
[0259] Optionally, when the processing device performs the intra block copy on the current block, at least one reference pixel in a block corresponding to the block vector of the to-be-predicted pixel can be determined. The offset array and / or offset table of the to-be-predicted pixel are determined or obtained according to the offset matrix and / or offset table corresponding to the current block. At least one offset parameter is determined in the offset array and / or offset table of the to-be-predicted pixel. The weighted processing result is obtained by performing the weighted processing according to the at least one reference pixel and the weight parameter corresponding to the at least one reference pixel in the weight array, and the prediction or reconstruction result of the pixel is determined or obtained by performing the offset processing on the weighted processing result according to the at least one offset parameter.
[0260] Optionally, the mode one and the mode six can also be combined, that is, when the to-be-predicted pixel is the second pixel of the first component, the reference pixels of at least two second components corresponding to the second pixel are determined, and the weight parameter corresponding to the reference pixels of the at least two second components in the weight array and / or weight matrix of the to-be-predicted pixel is determined. The offset array and / or offset table of the to-be-predicted pixel are determined or obtained according to the offset matrix and / or offset table corresponding to the current block. At least one offset parameter is determined in the offset array and / or offset table of the to-be-predicted pixel. The weighted processing result is obtained by performing the weighted processing according to the reference pixels of the at least two second components and the weight parameter corresponding to the reference pixels of the at least two second components, and the prediction or reconstruction result of the pixel is determined or obtained by performing the offset processing on the weighted processing result according to the at least one offset parameter.
[0261] Optionally, the mode two and the mode six can also be combined, that is, at least two reference pixels in the same component as the to-be-predicted pixel are determined, and the weight parameter corresponding to the reference pixels of the same component in the weight array and / or weight table of the to-be-predicted pixel is determined. The offset array and / or offset table of the to-be-predicted pixel are determined or obtained according to the offset matrix and / or offset table corresponding to the current block. At least one offset parameter is determined in the offset array and / or offset table of the to-be-predicted pixel. The weighted processing result is obtained by performing the weighted processing according to the reference pixels of the same component and the weight parameter corresponding to the reference pixels of the same component, and the prediction or reconstruction result of the pixel is determined or obtained by performing the offset processing on the weighted processing result according to the at least one offset parameter.
[0262] Optionally, the third mode can be combined with the sixth mode, i.e., determining at least one reference pixel in the same component as the to-be-predicted pixel, determining at least one reference pixel in the cross component as the to-be-predicted pixel, determining the weight parameter corresponding to the at least one reference pixel in the same component and the weight parameter corresponding to the at least one reference pixel in the cross component in the weight array and / or weight table of the to-be-predicted pixel, determining or obtaining the offset array and / or offset table of the to-be-predicted pixel according to the offset matrix and / or offset table corresponding to the current block, determining at least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel, performing weighted processing on the at least one reference pixel, the weight parameter corresponding to the at least one reference pixel in the same component, the at least one reference pixel in the cross component, and the weight parameter corresponding to the at least one reference pixel in the cross component, obtaining a weighted processing result, and performing offset processing on the weighted processing result according to the at least one offset parameter to determine or obtain the prediction or reconstruction result of the pixel.
[0263] In the embodiment, the offset array and / or offset table of the to-be-predicted pixel are determined or obtained according to the offset matrix and / or offset table corresponding to the current block, at least one offset parameter is determined or obtained in the offset array and / or offset table of the to-be-predicted pixel, the weight parameter corresponding to the at least one reference pixel is determined in the weight array and / or weight table of the to-be-predicted pixel, weighted processing is performed on the reference pixel and the weight parameter corresponding to the reference pixel, and offset processing is performed on the weighted processing result according to the at least one offset parameter to determine or obtain the prediction or reconstruction result of the pixel. That is, when determining the prediction or reconstruction result of the pixel, the reference pixel of the to-be-predicted pixel and the corresponding weight parameter are not limited, at least one offset parameter is determined or obtained according to the offset array and / or offset table corresponding to the to-be-predicted pixel, and then the prediction or reconstruction process can be directly performed according to the offset parameter, the weight parameter and the reference pixel to determine or obtain the prediction or reconstruction result of the pixel. The accuracy of the prediction or reconstruction result of the pixel and / or the current block can be improved, and the prediction accuracy and / or efficiency of video encoding and / or decoding can be improved.
[0264] The seventh mode is to perform weighted processing on at least one reference pixel according to the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the to-be-predicted pixel, and to determine or obtain the prediction or reconstruction result of the pixel according to at least one of the offset constant, the clipping parameter and the deformation parameter corresponding to the current block and the weighted processing result.
[0265] Optionally, the related features of the offset constant can be referred to the description of the offset constant in the fifth mode, which will not be described herein.
[0266] Optionally, the clipping parameter can be determined according to the position of the pixel to be predicted, and the clipping parameter can be used to limit the prediction or reconstruction result of the pixel within a reasonable range. Optionally, the processing of the weighted processing result according to the clipping reference can be performed according to the formula (2) in the first embodiment.
[0267] Optionally, the deformation parameter can be determined according to the position of the pixel to be predicted, and the deformation parameter can be used to deform the weighted processing result, such as right shifting the weighted processing result by a number of bits, to obtain the prediction or reconstruction result of the pixel. Optionally, the processing of the weighted processing result according to the deformation parameter can be performed according to the formula (3) in the first embodiment.
[0268] Optionally, after the offset constant corresponding to the current block, the at least one reference pixel, and the weight parameter corresponding to the at least one reference pixel are determined, the at least one reference pixel and the weight parameter corresponding to the at least one reference pixel can be weighted first to obtain the corresponding weighted processing result.
[0269] Optionally, the weighted processing result is processed according to at least one of the offset constant, the clipping parameter, and the deformation parameter to determine or obtain the prediction or reconstruction result of the pixel. For example, if the at least one reference pixel includes reference pixel r1 and reference pixel r2, the weight parameter corresponding to the at least one reference pixel includes the weight parameter w1 corresponding to the reference pixel r1, the weight parameter w2 corresponding to the reference pixel r2, and an offset constant b. The weighted processing result obtained by weighting can be (r1*w1+r2*w2) / (w1+w2). The offset of the weighted processing result according to the offset constant can be (r1*w1+r2*w2) / (w1+w2)+b.
[0270] Optionally, when the processing device performs intra prediction on the current block, at least one reference pixel of the pixel to be predicted can be determined. The at least one reference pixel is weighted according to the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the pixel to be predicted, and the at least one reference pixel to obtain the weighted processing result. The prediction or reconstruction result of the pixel is determined or obtained according to at least one of the offset constant, the clipping parameter, and the deformation parameter corresponding to the current block and the weighted processing result.
[0271] Optionally, when the processing device performs inter prediction on the current block, at least one reference pixel in the block corresponding to the block vector of the pixel to be predicted can be determined. The at least one reference pixel is weighted according to the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the pixel to be predicted, and the at least one reference pixel to obtain the weighted processing result. The prediction or reconstruction result of the pixel is determined or obtained according to at least one of the offset constant, the clipping parameter, and the deformation parameter corresponding to the current block and the weighted processing result.
[0272] Optionally, when the processing device performs the intra block copy on the current block, at least one reference pixel in a block corresponding to the block vector of the to-be-predicted pixel can be determined. According to the weight parameter corresponding to the at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel, the at least one reference pixel is weighted to obtain a weighted result. According to at least one of the offset constant, the clipping parameter and the deformation parameter corresponding to the current block and the weighted result, the prediction or reconstruction result of the pixel is determined or obtained.
[0273] Optionally, mode one and mode seven can also be combined, that is, when the to-be-predicted pixel is a second pixel of a first component, at least two reference pixels of second components corresponding to the second pixel are determined, and the weight parameter corresponding to the at least two reference pixels of second components in the weight array and / or the weight table of the to-be-predicted pixel is determined. According to the at least two reference pixels of second components, the at least two reference pixels of second components are weighted to obtain a weighted result. According to at least one of the offset constant, the clipping parameter and the deformation parameter corresponding to the current block and the weighted result, the prediction or reconstruction result of the pixel is determined or obtained.
[0274] Optionally, mode two and mode seven can also be combined, that is, at least two reference pixels in the same component as the to-be-predicted pixel are determined, and the weight parameter corresponding to the at least two reference pixels in the same component in the weight array and / or the weight table of the to-be-predicted pixel is determined. According to the at least two reference pixels in the same component, the weight parameter corresponding to the at least two reference pixels in the same component is weighted to obtain a weighted result. According to at least one of the offset constant, the clipping parameter and the deformation parameter corresponding to the current block and the weighted result, the prediction or reconstruction result of the pixel is determined or obtained.
[0275] Optionally, mode three and mode seven can also be combined, that is, at least one reference pixel in the same component as the to-be-predicted pixel is determined, and at least one reference pixel in the cross-component as the to-be-predicted pixel is determined. The weight parameter corresponding to the at least one reference pixel in the same component and the weight parameter corresponding to the at least one reference pixel in the cross-component in the weight array and / or the weight table of the to-be-predicted pixel are determined. According to the at least one reference pixel in the same component, the weight parameter corresponding to the at least one reference pixel in the same component, the at least one reference pixel in the cross-component, and the weight parameter corresponding to the at least one reference pixel in the cross-component, the weighted calculation result is obtained. According to at least one of the offset constant, the clipping parameter and the deformation parameter corresponding to the current block and the weighted result, the prediction or reconstruction result of the pixel is determined or obtained.
[0276] According to the weight parameters corresponding to at least one reference pixel in the weight array and / or the weight table of the pixel to be predicted and the at least one reference pixel, the weight processing is performed, and then at least one of the offset constant, the clipping parameter and the deformation parameter corresponding to the current block is used to perform processing on the weight processing result again, so as to determine or obtain the prediction or reconstruction result of the pixel, thereby ensuring the accuracy of the obtained prediction or reconstruction result of the pixel and / or the current block, and improving the prediction accuracy and / or efficiency of video encoding and / or decoding.
[0277] Fifth embodiment
[0278] On the basis of any one of the above embodiments of the present application, the fifth embodiment is provided. In the embodiment, the processing method further comprises: determining or obtaining the prediction or reconstruction result of the current block according to the prediction or reconstruction result of at least one pixel in the current block and at least one of the offset matrix and / or the offset table, the offset constant, the clipping parameter and the deformation parameter corresponding to the current block.
[0279] Optionally, the offset matrix, the offset constant, the clipping parameter and the deformation parameter in the embodiment can refer to the offset matrix and / or the offset table, the offset constant, the clipping parameter and the deformation parameter in the fourth embodiment, which are not described herein.
[0280] Optionally, the prediction result of the current block can be determined or obtained according to the prediction result of at least one pixel in the current block and at least one of the offset matrix and / or the offset table, the offset constant, the clipping parameter and the deformation parameter corresponding to the current block. For example, after the prediction results of all the pixels in the current block are determined, the prediction results are arranged according to the pixel positions corresponding to all the pixels in the current block, to obtain an arrangement result. Then, at least one of the offset matrix and / or the offset table, the offset constant, the clipping parameter and the deformation parameter corresponding to the current block is used to perform corresponding processing on the arrangement result, to obtain the prediction result of the current block.
[0281] Optionally, the offset parameter of a block can be determined according to the offset matrix and / or the offset table corresponding to the current block, and the prediction result of the current block can be obtained by performing offset processing on the arrangement result according to the offset parameter. Optionally, the prediction result of the current block can be obtained by directly performing offset processing on the arrangement result according to the offset constant corresponding to the current block. Optionally, the prediction result of the current block can be obtained by performing clipping processing on the arrangement result according to the clipping parameter corresponding to the current block, so that the arrangement result is within a reasonable range. Optionally, the prediction result of the current block can be obtained by performing deformation processing on the arrangement result according to the deformation parameter corresponding to the current block, such as adjusting the overall data size and format. Optionally, the process of determining or obtaining the reconstruction result of the current block is similar to that of determining or obtaining the prediction result of the current block, which is not described herein.
[0282] According to the embodiment, the prediction or reconstruction result of the current block is determined or obtained according to the prediction or reconstruction result of at least one pixel in the current block, and at least one of the offset matrix corresponding to the current block, the offset table, the offset constant, the clipping parameter and the deformation parameter. The prediction or reconstruction result of the block level is determined by the prediction or reconstruction result of the pixel level, the accuracy of the prediction or reconstruction result of the current block is improved, and the prediction accuracy and / or efficiency of the video encoding and / or decoding is improved.
[0283] Sixth embodiment
[0284] On the basis of any one of the above embodiments of the present application, a sixth embodiment is proposed. In the sixth embodiment, the processing device can be a decoding end, and can perform the steps of any one of the above embodiments. That is, when the processing device is a decoding end, the processing method comprises: reconstructing the first pixel according to the reference pixel of the first pixel and the weight parameter.
[0285] Optionally, the step of reconstructing the first pixel according to the reference pixel of the first pixel and the weight parameter comprises: determining or obtaining the weight array and / or weight table of the to-be-predicted pixel according to the weight matrix and / or weight table of the current block; and reconstructing the to-be-predicted pixel according to the reference pixel of the to-be-predicted pixel and at least one weight parameter in the weight array and / or weight table of the to-be-predicted pixel.
[0286] Optionally, the step of reconstructing the to-be-predicted pixel according to the reference pixel of the to-be-predicted pixel and at least one weight parameter in the weight array and / or weight table of the to-be-predicted pixel comprises: determining at least one reference pixel of the to-be-predicted pixel, and / or determining at least one reference pixel in the block corresponding to the motion vector of the to-be-predicted pixel, and / or determining at least one reference pixel in the block corresponding to the block vector of the to-be-predicted pixel; and reconstructing the to-be-predicted pixel according to at least one reference pixel and at least one weight parameter corresponding to the reference pixel in the weight array and / or weight table of the to-be-predicted pixel.
[0287] Optionally, the step of reconstructing the to-be-predicted pixel according to at least one reference pixel and at least one weight parameter corresponding to the reference pixel in the weight array and / or weight table of the to-be-predicted pixel comprises at least one of the following:
[0288] When the to-be-predicted pixel is a second pixel of a first component, the to-be-predicted pixel is reconstructed according to the reference pixels of at least two second components corresponding to the second pixel and the weight parameters corresponding to the reference pixels of the at least two second components;
[0289] The to-be-predicted pixel is reconstructed according to at least two reference pixels in the same component as the to-be-predicted pixel and the weight parameters corresponding to the at least two reference pixels in the same component;
[0290] The at least one reference pixel in the same component and the at least one reference pixel across components are used to reconstruct the to-be-predicted pixel according to weight parameters corresponding to the at least one reference pixel in the same component and weight parameters corresponding to the at least one reference pixel across components.
[0291] Optionally, the manner of determining or obtaining the reconstruction result of the pixel comprises at least one of the following:
[0292] The offset array and / or offset table of the to-be-predicted pixel are determined or obtained according to the offset matrix and / or offset table corresponding to the current block, and the weight array and / or weight table of the reference pixel and the to-be-predicted pixel are used for weighted calculation according to at least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel and weight parameters corresponding to the at least one reference pixel in the weight array and / or weight table, and the reconstruction result of the pixel is determined or obtained according to a result of the weighted calculation.
[0293] The weight array and / or weight table of the to-be-predicted pixel are used for weighted calculation according to weight parameters corresponding to the at least one reference pixel and at least one of the offset constant and the at least one reference pixel corresponding to the current block, and the reconstruction result of the pixel is determined or obtained according to a result of the weighted calculation.
[0294] The weight array and / or weight table of the to-be-predicted pixel are used for weighted calculation according to weight parameters corresponding to the at least one reference pixel and the at least one reference pixel, and the offset array and / or offset table of the to-be-predicted pixel in the offset matrix and / or offset table corresponding to the current block are used for weighted calculation according to at least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel and a result of the weighted calculation, and the reconstruction result of the pixel is determined or obtained.
[0295] The weight array and / or weight table of the to-be-predicted pixel are used for weighted calculation according to weight parameters corresponding to the at least one reference pixel and the at least one reference pixel, and the offset array and / or offset table of the to-be-predicted pixel in the offset matrix and / or offset table corresponding to the current block are used for weighted calculation according to at least one offset parameter in the offset array and / or offset table of the to-be-predicted pixel and a result of the weighted calculation, and the reconstruction result of the pixel is determined or obtained.
[0296] Optionally, the reconstruction result of the current block is determined or obtained according to the reconstruction result of the at least one pixel in the current block and at least one of the offset matrix and / or offset table, the offset constant, the clipping parameter and the deformation parameter corresponding to the current block.
[0297] Optionally, when the processing device is a decoding end, the to-be-predicted pixel can be a pixel to be reconstructed.
[0298] Optionally, in the embodiment, the processing method further comprises at least one of the following modes eight to nineteen:
[0299] Mode eight, when the prediction flag obtained in the code stream is in the first range, the reconstruction of the current block is performed according to the reference pixel and the weight parameter corresponding to the first pixel in the current block.
[0300] Optionally, the prediction mark can be a mark encoded into the code stream when encoding at the encoding end. Optionally, the prediction mark can be a binary character, a text number, or a mark represented in other forms. The first range can be a range associated with the prediction mark set in advance by the user. The first range can be a range containing scattered mark values such as 0, 2, 4, 6, i.e., the first range is {0, 2, 4, 6}. The first range can also be a range containing a single mark value, i.e., the first range is {2}. The first range can also be a numerical interval, such as a numerical interval corresponding to 1-5, i.e., the first range is {1, 2, 3, 4, 5}.
[0301] Optionally, the processing device can obtain the prediction mark from the code stream. The range corresponding to the prediction mark is determined. When the prediction mark is in the first range, it can be determined that the reconstruction of the pixels in the current block can be performed in a manner based on the weight matrix, i.e., directly performing the step of reconstructing the current block according to the reference pixels corresponding to the first pixel in the current block and the weight parameters. For any to-be-reconstructed pixel in the current block, the weight array and / or weight table of the to-be-reconstructed pixel can be determined or obtained according to the weight matrix and / or weight table of the current block, and the to-be-reconstructed pixel is reconstructed according to the reference pixels of the to-be-reconstructed pixel and at least one weight parameter in the weight array and / or weight table of the to-be-reconstructed pixel. That is, the to-be-reconstructed pixel is taken as a prediction pixel to perform the steps in any one of the first embodiment to the fifth embodiment.
[0302] Optionally, after the reconstruction of the first pixel in the current block is completed, the reconstruction of the current block can be determined according to the reconstructed pixels in the current block. For example, the reconstructed pixels in the current block are arranged and aggregated according to the pixel positions determined in advance in the current block to obtain the reconstruction result of the current block.
[0303] In the embodiment, when the prediction mark obtained from the code stream by the processing device at the decoding end is in the first range, the reconstruction of the current block is performed according to the reference pixels corresponding to the first pixel in the current block and the weight parameters, so that the reconstruction of the block can be performed from the pixel level, and the accuracy of the reconstruction result of the current block determined is improved.
[0304] Ninth, when the prediction mark obtained from the code stream is in the second range, the reconstruction of the current block is performed according to the distance between the first pixel in the current block and the reference pixels corresponding to the first pixel.
[0305] Optionally, the second range is different from the first range. When intra-frame encoding is performed, the range outside the first range can be taken as the second range. A range interval can also be selected from the range outside the first range as the second range.
[0306] Optionally, the processing device can acquire a prediction flag from the bitstream. The detection determines a range corresponding to the prediction flag. When the prediction flag is in the second range, it is determined that the current block adopts the direct on-line calculation manner to determine the weight parameter of any pixel to be reconstructed in the current block, and the pixel is reconstructed according to the weight parameter, and then the reconstruction of the current block is completed.
[0307] Optionally, when the reconstruction operation is performed, the weight parameter prediction of each pixel in the current block can be performed in the angular prediction mode, and then the calculation is performed according to the predicted weight parameter to determine the reconstructed pixel, and the reconstructed pixel is aggregated to obtain the reconstruction result of the current block.
[0308] Optionally, for the first pixel in the current block, at least one reference pixel corresponding to the first pixel in the current block can be determined. Optionally, the reference pixel can be a pixel already reconstructed in a neighboring block adjacent to the current block, can be a pixel already reconstructed in a non-neighboring block not adjacent to the current block, can be a pixel already reconstructed in a block corresponding to a motion vector of the first pixel, and can be a pixel already reconstructed in a block corresponding to a block vector of the first pixel. Optionally, when the first pixel is a second pixel of the first component, the reference pixel can be a pixel already reconstructed in the first component, the second component and / or the third component. Optionally, when the first component is a luminance component, the second component and the third component can be two different types of chroma components. When the first component is a chroma component, the second component and the third component can be a luminance component and another type of chroma component, respectively.
[0309] Optionally, for each reference pixel, the pixel position where the reference pixel is located and the pixel position where the first pixel is located can be determined, the shortest distance between the pixel position where the first pixel is located and the pixel position where the reference pixel is located is calculated, and the weight parameter corresponding to the reference pixel is determined according to the shortest distance, such as setting an correspondence table between different distance intervals and preset weight parameters in advance, determining the distance interval in the correspondence table that matches the shortest distance, and taking the preset weight parameter corresponding to the matched distance interval as the weight parameter corresponding to the reference pixel. Optionally, the current block is reconstructed according to the reference pixel and the weight parameter corresponding to the first pixel in the current block. For example, the weighted calculation result between the reference pixel and the weight parameter is directly calculated, and the weighted calculation result is taken as the reconstruction result of the first pixel. Optionally, the weighted calculation result can be processed according to at least one of the offset matrix and / or offset table, offset constant, clipping parameter and deformation parameter corresponding to the current block to obtain the reconstruction result of the first pixel.
[0310] Optionally, after the reconstruction result of the first pixels is determined, the reconstruction result of the current block can be determined according to the reconstruction result of the first pixels in the current block. For example, when the current block contains 20 first pixels, the reconstruction results of the 20 first pixels can be arranged and aggregated according to the pixel positions of the first pixels to obtain the reconstruction result of the current block.
[0311] In the embodiment, when the prediction flag obtained from the bitstream by the processing device is in the second range, the reconstruction of the current block can be performed according to the distance between the first pixel in the current block and the corresponding reference pixel of the first pixel, that is, the online calculation can be directly performed to determine the weight parameter corresponding to the reference pixel of the current block, and then the reconstruction of the current block is performed according to the reference pixel and the weight parameter, thereby ensuring the accuracy of the determined reconstruction result of the current block.
[0312] Optionally, the third range is different from the first range and the second range. When the inter-frame encoding and / or the intra-frame block copy is performed, one range interval in the range other than the first range can be selected as the third range.
[0313] Optionally, the third range is different from the first range and the second range. When the inter-frame encoding and / or the intra-frame block copy is performed, one range interval in the range other than the first range can be selected as the third range.
[0314] Optionally, according to the prediction mode of the block vector, the prediction or reconstruction of the current block can be performed according to a reconstructed area of the frame in which the current block is located and which is pointed to by the block vector, for example, IBC. Optionally, IBC is a block-level encoding mode, and the CU encoded by IBC is regarded as a third prediction mode in addition to the inter-frame or intra-frame prediction mode. In the block-level encoding mode, the motion search, such as block matching (BM), is performed by the encoding end to find the best block vector or motion vector for each CU. Optionally, the block vector is used to indicate the displacement from the current block to the reference block. Optionally, the best block vector of IBC is searched in the reconstructed area of the frame in which the current CU is located, and the motion vector of the inter-frame can be searched in the adjacent reference frame.
[0315] Optionally, according to the prediction mode of the motion vector, the prediction of the current block can be performed according to a reconstructed area of the reference frame in which the current block is located and which is pointed to by the motion vector. For example, the motion estimation and the local illumination compensation are both inter-frame predictions based on the motion vector.
[0316] Optionally, the processing device can acquire the prediction flag from the bitstream. The detection determines the range corresponding to the prediction flag. When the prediction flag is in the third range, it is determined that the current block adopts the prediction mode of the block vector or the motion vector to reconstruct the current block. Optionally, the third range includes a first sub-range interval and a second sub-range interval. For example, when the third range is [20-40], the first sub-range interval can be [20-30], and the second sub-range interval can be (30, 40]. Optionally, the first sub-range interval and the second sub-range interval are different.
[0317] Optionally, when the prediction flag is in the first sub-range interval of the third range, it can be determined that the current block is inter-coded, and the reconstruction of the current block is performed according to the prediction mode of the motion vector. When the prediction flag is in the second sub-range interval of the third range, it can be determined that the current block is intra-block copy coded, and the reconstruction of the current block is performed according to the prediction mode of the block vector.
[0318] In the embodiment, by performing the reconstruction of the current block according to the prediction mode of the block vector or the motion vector when the prediction flag acquired by the processing device from the bitstream is in the third range, the effective reconstruction of the current block can be ensured, and the accuracy of the determined reconstruction result of the current block is improved.
[0319] Eleventh, when the prediction flag acquired from the bitstream is in the fourth range, it is determined that the number of weight parameters of the to-be-predicted pixels in the current block matches the first weight number, and the reconstruction of the current block is performed according to the reference pixels of the to-be-predicted pixels in the current block and the weight parameters of the first weight number.
[0320] Optionally, the fourth range can be a range interval set in advance by the user, which can match the same as the first range, the second range, or the third range, or can be different. This is not limited herein. Optionally, the first weight number is the number of weight parameters set in advance by the user.
[0321] Optionally, the processing device can acquire the prediction flag from the bitstream, and determine the range corresponding to the prediction flag. When the prediction flag is in the fourth range, it can be determined that the number of weight parameters required for the current block reconstruction is small. That is, the number of weight parameters of the to-be-predicted pixels in the current block matches the first number of weight parameters. When the to-be-predicted pixels in the current block are reconstructed, the weight parameters of the first number of weight parameters can be determined first, the reference pixels of the to-be-predicted pixels are weighted according to the weight parameters, and the weighted processing result is obtained. The weighted processing result is used as the reconstruction result of the to-be-predicted pixels. Optionally, the weighted processing result can be processed according to at least one of the offset matrix and / or offset table corresponding to the current block, the offset constant, the clipping parameter, and the deformation parameter to obtain the reconstruction result of the to-be-predicted pixels. The reconstruction processing is performed on all to-be-predicted pixels (i.e., pixels to be reconstructed) in the current block to obtain the reconstruction result corresponding thereto. The reconstruction results of the pixels are aggregated to obtain the reconstruction result of the current block.
[0322] Optionally, the eighth mode and the eleventh mode can be combined for processing. That is, when the prediction flag acquired from the bitstream is in the first range and the fourth range, it is determined that the number of weight parameters of the to-be-predicted pixels in the current block matches the first number of weight parameters. The to-be-predicted pixels in the current block are reconstructed according to the reference pixels corresponding to the to-be-predicted pixels and the weight parameters of the first number of weight parameters to obtain the reconstruction result of the pixels. The reconstruction result of the current block is determined or obtained according to the reconstruction result of the pixels.
[0323] Optionally, the ninth mode and the eleventh mode can be combined for processing. That is, when the prediction flag acquired from the bitstream is in the second range and the fourth range, the weight parameters can be determined according to the distance between the to-be-predicted pixels in the current block and the reference pixels corresponding to the to-be-predicted pixels. The to-be-predicted pixels are reconstructed according to the reference pixels corresponding to the to-be-predicted pixels and the weight parameters of the first number of weight parameters to obtain the reconstruction result of the pixels. The reconstruction result of the current block is determined or obtained according to the reconstruction result of the pixels.
[0324] Optionally, the tenth mode and the eleventh mode can be combined for processing. That is, when the prediction flag acquired from the bitstream is in the third range and the fourth range, the current block can be reconstructed according to the prediction mode of the block vector or the motion vector. When the processing according to the prediction mode of the block vector or the motion vector is performed, the number of weight parameters corresponding to the weight parameters is equal to the first number of weight parameters.
[0325] In the embodiment, when the prediction flag obtained from the bitstream by the processing device is in the fourth range, it is determined that the number of weight parameters of the to-be-predicted pixels in the current block matches the first number of weights, and the reconstruction of the current block is performed according to the reference pixels of the to-be-predicted pixels and the weight parameters of the first number of weights, thereby ensuring the effective reconstruction of the current block and improving the accuracy of the determined reconstruction result of the current block.
[0326] Twelfth, when the prediction flag obtained from the bitstream is in the fifth range, it is determined that the number of weight parameters of the to-be-predicted pixels in the current block matches the second number of weights, and the reconstruction of the current block is performed according to the reference pixels of the to-be-predicted pixels in the current block and the weight parameters of the second number of weights.
[0327] Optionally, the fifth range can be a range interval set in advance by a user, which can be the same as or different from the first range, the second range or the third range, and the fifth range is different from the fourth range. Optionally, the second number of weights is the number of weight parameters set in advance by the user, and the second number of weights is greater than the first number of weights.
[0328] Optionally, the processing device can obtain the prediction flag from the bitstream, detect and determine the range corresponding to the prediction flag, and when the prediction flag is in the fifth range, it can be determined that a large number of weight parameters are needed for the reconstruction of the current block. That is, it is determined that the number of weight parameters of the to-be-predicted pixels in the current block matches the second number of weights. When the reconstruction of the to-be-predicted pixels in the current block is performed, the weight parameters of the second number of weights can be determined first, and the reference pixels of the to-be-predicted pixels are weighted according to these weight parameters to obtain a weighted processing result, which is taken as the reconstruction result of the to-be-predicted pixels. Optionally, the weighted processing result can be processed according to at least one of the offset matrix and / or offset table, the offset constant, the clipping parameter and the deformation parameter corresponding to the current block to obtain the reconstruction result of the to-be-predicted pixels. The reconstruction of all to-be-predicted pixels (i.e., pixels to be reconstructed) in the current block is performed to obtain the corresponding reconstruction result, and the reconstruction results of the pixels are aggregated to obtain the reconstruction result of the current block.
[0329] Optionally, the eighth mode and the twelfth mode can be combined, that is, when the prediction flag obtained from the bitstream is in the first range and the fifth range, it is determined that the number of weight parameters of the to-be-predicted pixels in the current block matches the second number of weights, and the reconstruction of the to-be-predicted pixels is performed according to the reference pixels corresponding to the to-be-predicted pixels in the current block and the weight parameters of the second number of weights to obtain the reconstruction result of the pixels, and the reconstruction result of the current block is determined or obtained according to the reconstruction result of the pixels.
[0330] Optionally, the mode nine and the mode twelve can be combined, that is, when the prediction flag obtained from the bitstream is in the second range and in the fifth range, the weight parameter can be determined according to the distance between the to-be-predicted pixel in the current block and the reference pixel corresponding to the to-be-predicted pixel, the to-be-predicted pixel is reconstructed according to the reference pixel corresponding to the to-be-predicted pixel and the second weight number of weight parameters, the reconstruction result of the pixel is obtained, and the reconstruction result of the current block is determined or obtained according to the reconstruction result of the pixel.
[0331] Optionally, the mode ten and the mode twelve can be combined, that is, when the prediction flag obtained from the bitstream is in the third range and in the fifth range, the current block is reconstructed according to the prediction mode of the block vector or the motion vector, and when the processing according to the prediction mode of the block vector or the motion vector is performed, the weight parameter number corresponding to the weight parameter is equal to the second weight number.
[0332] In the embodiment, when the processing device determines that the weight parameter number of the to-be-predicted pixel in the current block matches the second weight number when the prediction flag obtained from the bitstream is in the fifth range, the current block is reconstructed according to the reference pixel of the to-be-predicted pixel and the second weight number of weight parameters, and thus the effective reconstruction of the current block can be ensured, and the accuracy of the reconstruction result of the current block determined and obtained is improved.
[0333] Mode thirteen, obtaining a candidate prediction mode list containing at least one prediction mode, and determining or obtaining the prediction mode for the current block according to the candidate prediction mode list.
[0334] Optionally, the candidate prediction mode list can be a most probable list, and the most probable list stores the prediction mode most probably used by the current block. Optionally, when the processing device is a decoding end, the prediction mode is determined according to the flag bit obtained from the bitstream, for example, when the flag bit matches a candidate prediction mode in the candidate prediction mode list, the matched candidate prediction mode is taken as the prediction mode of the current block.
[0335] Optionally, when the intra prediction is performed, the elements in the candidate prediction mode list can include a prediction mode based on a pixel-level weight matrix, an angle prediction mode, a direct current mode, and a plane mode. When the inter prediction or the intra block copy is performed, the elements in the candidate prediction mode list can include a prediction mode based on a pixel-level weight matrix and a prediction mode based on a block vector or a motion vector.
[0336] Optionally, referring to FIG. 15, the most probable list is generated in the two types of prediction mode modes of the candidate to reduce the signaling overhead. The most probable list is taken as the candidate prediction mode list.
[0337] Optionally, if four angle prediction methods are obtained, their corresponding numbers are 0, 1, 2, and 3 respectively. Five pixel-level weight prediction methods are obtained, their corresponding numbers are 4, 5, 6, 7, and 8 respectively. The cost of each prediction method is calculated respectively. The cost corresponding to each prediction method is obtained.
[0338] Optionally, one prediction method corresponds to one prediction mode. For example, an angle prediction method corresponds to an angle prediction mode, such as the prediction mode in mode nine, which reconstructs the current block according to the distance between the first pixel in the current block and the reference pixel corresponding to the first pixel. A pixel-level weight prediction method corresponds to a pixel-level weight-based prediction mode, such as the prediction mode in mode eight, which reconstructs the current block according to the reference pixel corresponding to the first pixel in the current block and the weight parameter.
[0339] Optionally, since the current block at the decoding end does not exist, when the processing device is at the decoding end, the calculation of the SAD of the current block can be replaced by the calculation of the SAD of at least one neighbor block of the current block.
[0340] Optionally, for any block, when calculating the SAD, an "L" shaped template composed of the left, top, and top-left pixels of the block can be used instead. For example, cost(5) = 23043, cost(1) = 132454, cost(0) = 13232, cost(3) = 433433, cost(7) = 54545, cost(4) = 75973, cost(2) = 102366, cost(6) = 200548, and cost(8) = 545232. Optionally, for the nine costs, they are sorted in ascending order, and the top five corresponding modes are obtained, resulting in a candidate representation method list [0, 5, 7, 4, 2]. At this time, the candidate representation method list contains two angle prediction methods, 0 and 2, and three pixel-level weight prediction methods, 5, 7, and 4. The candidate representation method list can be a candidate prediction mode list.
[0341] In this embodiment, by obtaining the candidate prediction mode list and determining or obtaining the prediction mode for the current block according to the candidate prediction mode list, i.e., the prediction mode is embodied in the form of the candidate prediction mode list, the signaling overhead is reduced, and the accuracy and effectiveness of determining or obtaining the prediction mode for the current block are improved.
[0342] In a feasible embodiment, for the above-mentioned mode thirteen, obtaining the candidate prediction mode list containing at least one prediction mode can include at least one of mode fourteen to mode nineteen.
[0343] In the fourteenth mode, a third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, and the cost value of at least one prediction mode calculated according to the reference pixel corresponding to the third pixel and the weight parameter is determined or obtained to obtain the candidate prediction mode list.
[0344] Optionally, when the cost value is calculated, different cost functions can be used, such as SAD (Sum of Absolute Differences), SATD (Sum of Transformed Absolute Differences), MRSAD (Mean Removal SAD), MRSATD (Mean-Removed Sum of Absolute Transformed Differences), etc.
[0345] Optionally, when the cost value of at least one prediction mode is calculated in the embodiment, all the pixels used are reconstructed pixels. Optionally, the approximate block / template block of the current block can be a block in a reconstructed neighbor region of the current block, can also be a reconstructed block in a frame pointed by the block vector and in which the current block is located, or can also be a block in a reconstructed region in a frame parallel to the frame in which the current block is located.
[0346] Optionally, a pixel similar or identical to the first pixel in the approximate block / template block of the current block is determined and used as the third pixel, that is, each first pixel of the current block has a corresponding third pixel in the approximate block / template block of the current block.
[0347] Optionally, the cost of any prediction mode can be calculated in the following manner, that is, the prediction value of the first pixel can be obtained by performing pixel prediction according to the reference pixel corresponding to the third pixel and the weight parameter. The reconstructed value of the third pixel can be obtained by performing pixel reconstruction according to the reference pixel corresponding to the third pixel and the weight parameter. The prediction value and the reconstructed value of the third pixel are input into the cost function to calculate the cost value, and the cost value of the prediction mode is obtained.
[0348] Optionally, the manner of performing pixel prediction or reconstruction on the third pixel can be the same as the manner of performing pixel prediction or reconstruction on the first pixel in any of the above embodiments, which will not be described in detail here.
[0349] Optionally, after the cost values of at least one prediction mode are determined, the cost values can be arranged in ascending order according to their sizes, and some or all of the prediction modes are selected according to the arranged cost values to obtain the candidate prediction mode list.
[0350] Optionally, the cost value of the at least one prediction mode is calculated according to the reference pixel corresponding to the third pixel in the approximation block / template block of the current block and the weight parameter, and at least one offset parameter in the offset array and / or offset table corresponding to the third pixel. Optionally, the cost value of the at least one prediction mode is calculated according to the reference pixel corresponding to the third pixel in the approximation block / template block of the current block and the weight parameter and an offset constant. Optionally, the cost value of the at least one prediction mode is calculated according to the reference pixel in the same component as the third pixel in the approximation block / template block of the current block, and / or according to the reference pixel in the cross component as the third pixel in the approximation block / template block of the current block, and the weight parameter corresponding to each reference pixel. Optionally, the cost value of the at least one prediction mode is calculated according to the reference pixel in the neighbor block corresponding to the third pixel in the approximation block / template block of the current block and the weight parameter.
[0351] Optionally, when predicting or reconstructing the at least one first pixel in the current block, the prediction mode used in the prediction can be determined or obtained from the candidate prediction mode list. The candidate prediction mode list stores the prediction modes in a sequence according to the cost value of each prediction mode. After determining the prediction mode in the candidate prediction mode list, the first pixel can be predicted according to the selected prediction mode. For example, if the selected prediction mode is the prediction mode based on the pixel-level weight matrix, when predicting or reconstructing the first pixel, the reference pixel corresponding to the first pixel can be determined, and the weight parameter corresponding to the reference pixel can be determined or obtained according to the weight matrix and / or weight array and / or weight table corresponding to the first pixel. Then, the prediction or reconstruction result of the first pixel is obtained by weighted calculation according to the reference pixel corresponding to the first pixel and the weight parameter corresponding to the reference pixel.
[0352] In the embodiment, the candidate prediction mode list is determined or obtained by determining the third pixel corresponding to the first pixel in the approximation block / template block of the current block, and calculating the cost value of the at least one prediction mode according to the reference pixel corresponding to the third pixel and the weight parameter, thereby ensuring the accuracy and effectiveness of the obtained candidate prediction mode list.
[0353] Fifteenth, the candidate prediction mode list is determined or obtained by determining the third pixel corresponding to the first pixel in the approximation block / template block of the current block, and calculating the cost value of the at least one prediction mode according to the distance between the third pixel and the reference pixel.
[0354] Optionally, when the cost value of the at least one prediction mode is calculated, the third pixel similar or close or designated to the first pixel in the approximate block / template block of the current block is determined, the weight parameter of the reference pixel corresponding to the third pixel is determined according to the distance between the third pixel and the reference pixel corresponding to the third pixel, and the calculation is performed according to the weight parameter and the reference pixel to obtain the calculation result. Optionally, for the reference pixel corresponding to each third pixel, the pixel position of the reference pixel and the pixel position of the third pixel are determined, the shortest distance between the pixel position of the third pixel and the pixel position of the reference pixel is calculated, the weight parameter corresponding to the reference pixel is determined according to the shortest distance, such as setting the corresponding relationship table between different distance intervals and preset weight parameters in advance, and the distance interval matched with the shortest distance in the corresponding relationship table is determined, and the preset weight parameter corresponding to the matched distance interval is taken as the weight parameter corresponding to the reference pixel.
[0355] Optionally, the prediction of the pixel is performed according to the reference pixel corresponding to the third pixel and the weight parameter to obtain the prediction value of the first pixel. The reconstruction of the pixel is performed according to the reference pixel corresponding to the third pixel and the weight parameter to obtain the reconstruction value of the third pixel. The prediction value and the reconstruction value of the third pixel are input into the cost function to calculate the cost value of the prediction mode.
[0356] Optionally, after the cost values of the at least one prediction mode are determined, the cost values are arranged from small to large according to the size of the cost values, and part or all of the prediction modes are selected according to the arranged cost values to aggregate and construct the candidate prediction mode list.
[0357] In the embodiment, the candidate prediction mode list is determined or obtained by determining the third pixel corresponding to the first pixel in the approximate block / template block of the current block, and calculating the cost value of the at least one prediction mode according to the distance between the third pixel and the reference pixel in the current block, thereby ensuring the accuracy and effectiveness of the obtained candidate prediction mode list.
[0358] Sixteenth, the third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, and the cost value of the at least one prediction mode is calculated according to at least one reference pixel in the block corresponding to the motion vector and / or block vector of the third pixel and the weight parameter, and the candidate prediction mode list is determined or obtained.
[0359] Optionally, when the cost value of the at least one prediction mode is calculated, the third pixel similar or close or designated to the first pixel in the approximate block / template block of the current block is determined, the at least one reference pixel of the third pixel is determined according to different prediction modes, and the weight parameter corresponding to the reference pixel is determined.
[0360] Optionally, for the block vector-based prediction mode, at least one reference pixel in the block corresponding to the block vector of the third pixel can be determined according to the prediction mode of the block vector, and then the weight parameter corresponding to the at least one reference pixel can be determined or obtained in the weight matrix and / or the weight array of the third pixel.
[0361] Optionally, the prediction of the pixel can be performed according to the reference pixel and the weight parameter corresponding to the third pixel, to obtain the prediction value of the first pixel. The reconstruction of the pixel can be performed according to the reference pixel and the weight parameter corresponding to the third pixel, to obtain the reconstruction value of the third pixel. The prediction value and the reconstruction value of the third pixel are input into the cost function to calculate the cost value, to obtain the cost value of the block vector-based prediction mode.
[0362] Optionally, for the motion vector-based prediction mode, at least one reference pixel in the block corresponding to the motion vector of the first pixel in the current block can be determined according to the prediction mode of the motion vector, and then the weight parameter corresponding to the at least one reference pixel can be determined or obtained in the weight matrix and / or the weight array of the first pixel.
[0363] Optionally, the prediction of the pixel can be performed according to the reference pixel and the weight parameter corresponding to the third pixel, to obtain the prediction value of the first pixel. The reconstruction of the pixel can be performed according to the reference pixel and the weight parameter corresponding to the third pixel, to obtain the reconstruction value of the third pixel. The prediction value and the reconstruction value of the third pixel are input into the cost function to calculate the cost value, to obtain the cost value of the motion vector-based prediction mode.
[0364] Optionally, the same calculation method as above can also be used for other prediction modes. After the cost values of the at least one prediction mode are determined, the cost values can be arranged in ascending order according to their sizes, and some or all of the prediction modes can be selected according to the arranged cost values to aggregate and construct the candidate prediction mode list.
[0365] In this embodiment, the candidate prediction mode list is determined or obtained according to the cost values of the at least one prediction mode calculated according to the at least one reference pixel in the block corresponding to the motion vector and / or the block vector of the third pixel and the weight parameter, thereby ensuring the accuracy and effectiveness of the obtained candidate prediction mode list.
[0366] Seventeenth, when the cost label obtained in the bitstream is the first value, the third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, the first cost value of the at least one prediction mode calculated according to the reference pixel and the weight parameter corresponding to the third pixel, and / or the first cost value of the at least one prediction mode calculated according to the distance between the third pixel and the reference pixel, and / or the first cost value of the at least one prediction mode calculated according to the at least one reference pixel in the block corresponding to the motion vector and / or the block vector of the third pixel and the weight parameter, are used to determine or obtain the candidate prediction mode list.
[0367] Optionally, when the processing device is a decoding end, the cost flag can be acquired from the bitstream, and when the cost flag is determined to be the first value, the target cost function corresponding to the first value can be determined. Optionally, different cost functions can be set in advance to correspond to different cost flag values. For example, when the cost flag value is the first value, the cost function can be SATD. When the cost flag value is the second value, the cost function can be SAD. Alternatively, when the cost flag value is the first value, the cost function can be SAD. When the cost flag value is the second value, the cost function can be SATD.
[0368] Optionally, when the first cost value of the at least one prediction mode is determined, any one of the above-mentioned modes 14 to 16 can be referred to for the determination. For example, a third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, the prediction value and the reconstructed value of the third pixel are determined according to the reference pixel corresponding to the third pixel and the weight parameter, and the prediction value and the reconstructed value of the third pixel are input into the cost function corresponding to the first value for calculation to obtain the first cost value of the prediction mode.
[0369] Optionally, after the first cost value of the at least one prediction mode is determined, the first cost values can be arranged in ascending order according to their sizes, and some or all of the prediction modes are selected according to the arranged first cost values to aggregate and construct the candidate prediction mode list.
[0370] In the embodiment, when the processing device is a decoding end, the cost value calculation of the prediction mode is performed according to the cost flag acquired from the bitstream, and when the cost flag is the first value, the first cost value of the at least one prediction mode can be calculated in different ways, and then the candidate prediction mode list can be determined or obtained according to the first cost value of the at least one prediction mode, so that the accuracy of the obtained candidate prediction mode list can be ensured.
[0371] Mode 18, when the cost flag acquired from the bitstream is the second value, a third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, the second cost value of the at least one prediction mode is calculated according to the reference pixel corresponding to the third pixel and the weight parameter, and / or the second cost value of the at least one prediction mode is calculated according to the distance between the third pixel and the reference pixel, and / or the second cost value of the at least one prediction mode is calculated according to at least one reference pixel in the block corresponding to the motion vector and / or the block vector of the third pixel and the weight parameter, and the candidate prediction mode list is determined or obtained;
[0372] Optionally, when the processing device is a decoding end, a cost flag can be acquired from the bitstream, and when the cost flag is determined to be the second value, a target cost function corresponding to the second value can be determined. Optionally, different cost functions can be set in advance to correspond to different cost flag values. For example, when the cost flag value is the first value, the cost function can be SATD. When the cost flag value is the second value, the cost function can be SAD. Alternatively, when the cost flag value is the first value, the cost function can be SAD. When the cost flag value is the second value, the cost function can be SATD. Optionally, the first value is different from the second value, and the cost function corresponding to the first value is also different from the cost function corresponding to the second value.
[0373] Optionally, when the second cost value of the at least one prediction mode is determined, any one of the above-mentioned modes fourteen to seventeen can be referred to for the determination. For example, a third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, the prediction value and the reconstructed value of the third pixel are determined according to the reference pixel corresponding to the third pixel and the weight parameter, and the prediction value and the reconstructed value of the third pixel are input into the cost function corresponding to the first value for calculation to obtain the second cost value of the prediction mode.
[0374] Optionally, after the second cost value of the at least one prediction mode is determined, the second cost values can be arranged in ascending order according to their sizes, and some or all of the prediction modes are selected according to the arranged second cost values to aggregate and construct a candidate prediction mode list.
[0375] In the embodiment, when the processing device is a decoding end, the cost value calculation of the prediction mode is performed according to the cost flag acquired from the bitstream, and when the cost flag is the second value, the second cost value of the at least one prediction mode is calculated in different ways, and then the candidate prediction mode list is determined or obtained according to the second cost value of the at least one prediction mode, so that the accuracy of the obtained candidate prediction mode list can be ensured.
[0376] Mode nineteen, a third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, at least two different third cost values of the at least one prediction mode are calculated according to the reference pixel corresponding to the third pixel and the weight parameter, and / or at least two different third cost values of the at least one prediction mode are calculated according to the distance between the third pixel and the reference pixel, and / or at least two different third cost values of the at least one prediction mode are calculated according to at least one reference pixel in the block corresponding to the motion vector and / or the block vector of the third pixel and the weight parameter, and the fourth cost value determined or obtained according to the at least two different third cost values is used to determine or obtain the candidate prediction mode list.
[0377] Optionally, a third pixel corresponding to the first pixel in the approximate block / template block of the current block can be determined, a prediction value and a reconstructed value of the third pixel can be determined according to the reference pixel corresponding to the third pixel and the weight parameter, the prediction value and the reconstructed value of the third pixel can be input into the cost function corresponding to the first value for calculation, and at least two different third cost values, for example, SAD and SATD, can be obtained. Optionally, the same cost function can also be used for multiple times of cost value calculation to obtain at least two different third cost values, but in the multiple times of cost value calculation using the same cost function, the reference pixel and / or the weight parameter input into the cost function each time are different.
[0378] Optionally, after the at least two different third cost values are determined, the at least two different third cost values can be calculated to obtain a fourth cost value of the prediction mode. For example, a weighted calculation is performed, different weights are set for different third cost values, and then the weighted calculation is performed according to the weights and the at least two different third cost values to obtain the fourth cost value, for example, cost4=w3a*cost3a+w3b*cost3b, where cost4 is the fourth cost value, cost3a is the first third cost value, w3a is the weight of cost3a, cost3b is the second third cost value, and w3b is the weight of cost3b. Alternatively, screening is performed in the at least two different third cost values, and the maximum or minimum third cost value is selected as the fourth cost value.
[0379] Optionally, after the fourth cost value of the at least one prediction mode is determined, the fourth cost values can be arranged from small to large according to the size of the fourth cost values, and some or all of the prediction modes are selected according to the arranged fourth cost values to obtain a candidate prediction mode list.
[0380] According to the technical solutions of the embodiment, the at least two different third cost values of the at least one prediction mode are calculated according to the reference pixel corresponding to the third pixel and the weight parameter, and then the fourth cost value is determined or obtained according to the at least two different third cost values, the arrangement order of each prediction mode is determined or obtained, the candidate prediction mode list is determined according to the arrangement order, and the accuracy of the obtained candidate prediction mode list can be ensured.
[0381] Seventh Embodiment
[0382] On the basis of any of the above embodiments of the present application, the seventh embodiment is proposed. In the seventh embodiment, the processing device can be an encoding end, and can perform the steps of any of the above embodiments. That is, when the processing device is an encoding end, the processing method comprises: predicting the first pixel according to the reference pixel of the first pixel and the weight parameter in the current block.
[0383] Optionally, the step of predicting the first pixel according to the reference pixels and the weight parameters of the first pixel in the current fast includes: determining or obtaining a weight array and / or a weight table of the to-be-predicted pixel according to a weight matrix and / or a weight table of the current block; and predicting the to-be-predicted pixel according to the reference pixels of the to-be-predicted pixel and at least one weight parameter in the weight array and / or the weight table of the to-be-predicted pixel.
[0384] Optionally, the step of predicting the to-be-predicted pixel according to the reference pixels of the to-be-predicted pixel and at least one weight parameter in the weight array and / or the weight table of the to-be-predicted pixel includes the following steps:
[0385] Optionally, the step of predicting the to-be-predicted pixel according to the reference pixels of the to-be-predicted pixel and at least one weight parameter in the weight array and / or the weight table of the to-be-predicted pixel includes the following steps:
[0386] Optionally, the step of predicting the to-be-predicted pixel according to the reference pixels of the to-be-predicted pixel and at least one weight parameter in the weight array and / or the weight table of the to-be-predicted pixel includes at least one of the following:
[0387] Optionally, the step of predicting the to-be-predicted pixel according to the reference pixels of the to-be-predicted pixel and at least one weight parameter in the weight array and / or the weight table of the to-be-predicted pixel includes the following steps:
[0388] Optionally, the step of predicting the to-be-predicted pixel according to the reference pixels of the to-be-predicted pixel and at least one weight parameter in the weight array and / or the weight table of the to-be-predicted pixel includes the following steps:
[0389] Optionally, the step of predicting the to-be-predicted pixel according to the reference pixels of the to-be-predicted pixel and at least one weight parameter in the weight array and / or the weight table of the to-be-predicted pixel includes the following steps:
[0390] Optionally, the step of determining or obtaining the prediction result of the pixel includes at least one of the following:
[0391] Optionally, the step of determining or obtaining the prediction result of the pixel includes at least one of the following:
[0392] According to the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the pixel to be predicted, and the offset constant corresponding to the current block, the at least one reference pixel is weighted calculated, and the prediction result of the pixel is determined or obtained according to the weighted calculation result;
[0393] According to the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the pixel to be predicted, and the at least one reference pixel, the weighted processing is performed, and the prediction result of the pixel is determined or obtained according to the offset array and / or offset table of the pixel to be predicted in the offset matrix and / or offset table corresponding to the current block and / or at least one offset parameter in the offset array and / or offset table, and the weighted processing result.
[0394] According to the weight parameter corresponding to the at least one reference pixel in the weight array and / or weight table of the pixel to be predicted, and the at least one reference pixel, the weighted processing is performed, and the prediction result of the pixel is determined or obtained according to the at least one of the offset constant, the clipping parameter and the deformation parameter corresponding to the current block and the weighted processing result.
[0395] Optionally, the prediction result of the current block is determined or obtained according to the prediction result of the at least one pixel in the current block, and at least one of the offset matrix and / or offset table, the offset constant, the clipping parameter and the deformation parameter corresponding to the current block.
[0396] Optionally, when the processing device is a decoding end, the pixel to be predicted can be a pixel in the current block which has not been predicted.
[0397] Optionally, in the embodiment, the processing method further comprises at least one of the following twenty to twenty-fourth modes:
[0398] The twentyth mode is that the prediction of the first pixel in the current block is performed according to the reference pixel and the weight parameter corresponding to the first pixel in the current block, and if the cost of the prediction result is minimum, the prediction mark in the first range is written into the code stream.
[0399] Optionally, when the prediction of the current block is performed, the prediction mode of the current block is determined. For example, when the current block is predicted by intra prediction, the pixel-level prediction of each pixel in the current block can be performed. Optionally, when the pixel to be predicted in the current block is predicted, the prediction of the pixel can be performed according to the reference pixel and the weight parameter corresponding to the pixel. Optionally, the weight parameter can be determined or obtained by different modes (such as various prediction modes). Optionally, the cost of determining the weight parameter corresponding to the pixel to be predicted in the current block by various prediction modes can be determined and calculated. For example, the prediction mode based on the pixel-level weight matrix and the angle prediction mode are performed, and the encoding cost of each mode is obtained, and the prediction mode with smaller cost is selected, and when the selected prediction mode is the prediction mode based on the pixel-level weight matrix, the mark in the first range is written into the code stream.
[0400] Optionally, the prediction mode based on the pixel-level weight matrix can be to perform the prediction of the first pixel in the current block according to the reference pixel corresponding to the first pixel in the current block and the weight parameter.
[0401] Optionally, when the processing device performs the intra prediction of the current block, the pixel-level prediction can be performed on each to-be-predicted pixel in the current block. And when the pixel-level prediction is performed on the to-be-predicted pixel, the prediction of the to-be-predicted pixel can be performed according to the reference pixel corresponding to the to-be-predicted pixel and the weight parameter. When the weight parameter is determined, if the prediction result of the first pixel is minimum according to the determined weight parameter and the reference pixel when the prediction of the first pixel is performed based on the pixel-level weight matrix, it can be determined that the processing mode based on the pixel-level weight matrix is adopted, such as performing the prediction of the first pixel in the current block according to the reference pixel corresponding to the first pixel in the current block and the weight parameter. And the prediction flag in the first range can be written into the code stream.
[0402] Optionally, the prediction of the first pixel in the current block according to the reference pixel corresponding to the first pixel in the current block and the weight parameter includes: determining or obtaining the weight array and / or weight table of the to-be-predicted pixel according to the weight matrix and / or weight table of the current block, and performing the prediction of the to-be-predicted pixel according to the reference pixel of the to-be-predicted pixel and at least one weight parameter in the weight array and / or weight table of the to-be-predicted pixel.
[0403] In the embodiment, when the processing device is the encoding end, and it is determined that the prediction result of the first pixel in the current block according to the reference pixel corresponding to the first pixel in the current block and the weight parameter is minimum, the prediction flag in the first range can be written into the code stream, so that the prediction cost of the current block can be guaranteed to be minimum, and the accurate prediction flag can also be written into the code stream.
[0404] The twenty-first mode is to determine the weight parameter according to the distance between the first pixel in the current block and the reference pixel corresponding to the first pixel, and perform the prediction of the current block according to the weight parameter and the reference pixel, and if the prediction result is minimum, the prediction flag in the second range is written into the code stream.
[0405] Optionally, when the prediction of the current block is performed, the prediction mode of the current block can be determined. For example, when the intra prediction of the current block is performed, the pixel-level prediction can be performed on each pixel in the current block. Optionally, when the prediction of the to-be-predicted pixel in the current block is performed, the prediction of the pixel can be performed according to the reference pixel corresponding to the to-be-predicted pixel and the weight parameter, and the prediction result of the pixel is obtained.
[0406] Optionally, the weight parameter can be determined or obtained in different manners (e.g., according to various prediction modes). Optionally, the cost of determining the weight parameter corresponding to the pixel to be predicted in the current block using various prediction modes can be determined and calculated. For example, the prediction mode based on the pixel-level weight matrix, the angle prediction mode, and the prediction mode of directly calculating the weight on the line are performed, and the cost of encoding is obtained respectively. The prediction mode with the smaller cost is selected. When the selected prediction mode is the prediction mode of directly calculating the weight on the line, it can be determined that the weight parameter is determined according to the distance between the first pixel in the current block and the reference pixel corresponding to the first pixel. The prediction of the current block is performed according to the weight parameter and the reference pixel. The cost of the prediction result is the smallest, and the prediction marker in the second range is written into the bitstream.
[0407] In the embodiment, when the processing device is the encoding end, the weight parameter is determined according to the distance between the first pixel in the current block and the reference pixel corresponding to the first pixel, and the prediction of the current block is performed according to the weight parameter and the reference pixel. The cost of the prediction result is the smallest. The prediction marker in the second range is written into the bitstream. Therefore, the prediction marker can be accurately written into the bitstream while ensuring that the cost of the prediction of the current block is the smallest.
[0408] Twenty-second, when the current block is predicted based on the prediction mode of the block vector or the motion vector, and the cost of the prediction result is the smallest, the prediction marker in the third range is written into the bitstream.
[0409] Optionally, when the inter-frame prediction or the intra-frame block copy of the current block is performed, the weight parameter needs to be determined when the pixel to be predicted in the current block is predicted. When the weight parameter is determined, different prediction modes can be used to determine or obtain the weight parameter. Optionally, the cost of determining the weight parameter corresponding to the pixel to be predicted in the current block using various prediction modes can be determined and calculated. For example, the prediction mode based on the pixel-level weight matrix, the angle prediction mode, and the prediction mode based on the block vector or the motion vector are performed, and the cost of encoding is obtained respectively. The prediction mode with the smaller cost is selected. When the selected prediction mode is the prediction mode based on the block vector or the motion vector, it can be determined that the cost of the prediction result is the smallest when the prediction mode based on the block vector or the motion vector is used to predict the pixel to be predicted. The prediction marker in the third range can be written into the bitstream.
[0410] In the embodiment, when the processing device is the encoding end, the weight parameter is determined according to the distance between the first pixel in the current block and the reference pixel corresponding to the first pixel, and the prediction of the current block is performed according to the weight parameter and the reference pixel. The cost of the prediction result is the smallest. The prediction marker in the second range is written into the bitstream. Therefore, the prediction marker can be accurately written into the bitstream while ensuring that the cost of the prediction of the current block is the smallest.
[0411] Method 23: Predict the current block based on the reference pixel and weight parameters of the pixel to be predicted in the current block. If the cost of the prediction result is minimized when the number of weight parameters matches the number of first weights, then write the prediction marker in the fourth range into the bitstream.
[0412] Optionally, when predicting the current block, the prediction mode for the current block is determined, such as intra-frame prediction or inter-frame prediction. Optionally, when predicting within the current block, pixel-level prediction can be performed for each first pixel within the current block. For example, for the pixel to be predicted within the current block, prediction for the current block can be performed based on the reference pixel and weight parameters of the pixel to be predicted. Furthermore, when performing prediction, the number of weight parameters to be used needs to be determined.
[0413] Optionally, the number of weight parameters to be used can be determined according to the prediction mode of the current block, and for different numbers of weight parameters, the cost of the prediction result generated when the pixel to be predicted is predicted can be calculated, and the number of weight parameters corresponding to the prediction result with the minimum cost can be determined.
[0414] Optionally, if the number of weight parameters corresponding to the prediction result with the lowest cost is small and close to or equal to the number of pre-set first weights, then the prediction markers in the fourth range can be written into the bitstream.
[0415] In this embodiment, when the processing device is the encoding end, the current block is predicted based on the reference pixel and weight parameters of the pixel to be predicted in the current block. The prediction result with the minimum cost when the number of weight parameters matches the number of first weights is written into the bitstream. Thus, the prediction mark in the fourth range is written into the bitstream while ensuring that the prediction cost of the current block is minimized.
[0416] Method 24: Predict the current block based on the reference pixel and weight parameters of the pixel to be predicted in the current block. If the cost of the prediction result is minimized when the number of weight parameters matches the number of second weights, then write the prediction marker in the fifth range into the bitstream.
[0417] Optionally, the number of second weights is greater than the number of first weights.
[0418] Optionally, when predicting the current block, the prediction mode for the current block is determined, such as intra-frame prediction or inter-frame prediction. Optionally, when predicting within the current block, pixel-level prediction can be performed for each first pixel within the current block. For example, for the pixel to be predicted within the current block, prediction for the current block can be performed based on the reference pixel and weight parameters of the pixel to be predicted. Furthermore, when performing prediction, the number of weight parameters to be used needs to be determined.
[0419] Optionally, the number of weight parameters used can be determined according to the prediction mode of the current block, and the cost of the prediction result generated when the pixel to be predicted is predicted is calculated for different numbers of weight parameters, and the number of weight parameters corresponding to the prediction result with the minimum cost is determined.
[0420] Optionally, if the number of weight parameters corresponding to the prediction result with the minimum cost is relatively large and close to or equal to the second number of weights set in advance, the prediction flag in the fourth range can be written into the code stream.
[0421] Optionally, in the embodiment, when the processing device is an encoding end, a candidate prediction mode list of at least one prediction mode is obtained, and the prediction mode of the current block is determined or obtained according to the candidate prediction mode list.
[0422] Optionally, each candidate prediction mode in the candidate prediction mode list can be determined according to the calculated cost, and each candidate prediction mode in the candidate prediction mode list can be arranged in order from small to large according to the cost.
[0423] According to the technical scheme of the embodiment, when the processing device is an encoding end, the prediction of the current block is performed according to the reference pixel of the pixel to be predicted in the current block and the weight parameter, and the cost of the prediction result when the number of weight parameters matches the second number of weights is the minimum, the prediction flag in the fifth range is written into the code stream, and thus accurate prediction flags can be written into the code stream while ensuring that the prediction cost of the current block is the minimum.
[0424] The embodiment of the application further provides a processing device, please refer to FIG. 16, FIG. 16 is a functional module schematic diagram of the processing device of the application, which can be arranged in or is a processing device, and the processing device comprises:
[0425] The processing module A10 is configured to predict or reconstruct the first pixel according to the reference pixel of the first pixel in the current block and the weight parameter.
[0426] Optionally, the processing module A10 is further configured to:
[0427] determine or obtain the weight array and / or the weight table of the pixel to be predicted according to the weight matrix and / or the weight table of the current block;
[0428] predict or reconstruct the pixel to be predicted according to the reference pixel of the pixel to be predicted and at least one weight parameter in the weight array and / or the weight table of the pixel to be predicted.
[0429] Optionally, the processing module A10 is further configured to:
[0430] determining at least one reference pixel of the to-be-predicted pixel, and / or determining at least one reference pixel in a block corresponding to a motion vector of the to-be-predicted pixel, and / or determining at least one reference pixel in a block corresponding to a block vector of the to-be-predicted pixel;
[0431] predicting or reconstructing the to-be-predicted pixel according to the at least one reference pixel, and a weight parameter corresponding to the at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel.
[0432] Optionally, the processing module A10 is further configured to perform at least one of the following:
[0433] when the to-be-predicted pixel is a second pixel of a first component, predicting or reconstructing the to-be-predicted pixel according to reference pixels of at least two second components corresponding to the second pixel, and weight parameters corresponding to the reference pixels of the at least two second components;
[0434] predicting or reconstructing the to-be-predicted pixel according to at least two reference pixels of the same component as the to-be-predicted pixel, and weight parameters corresponding to the at least two reference pixels of the same component;
[0435] predicting or reconstructing the to-be-predicted pixel according to at least one reference pixel of the same component as the to-be-predicted pixel, at least one reference pixel of a cross component as the to-be-predicted pixel, a weight parameter corresponding to the at least one reference pixel of the same component, and a weight parameter corresponding to the at least one reference pixel of the cross component.
[0436] Optionally, the manner of determining or obtaining the prediction or reconstruction result of the pixel comprises at least one of the following:
[0437] determining or obtaining an offset array and / or an offset table of the to-be-predicted pixel according to an offset matrix and / or an offset table corresponding to the current block, performing weighted calculation according to at least one offset parameter in the offset array and / or the offset table of the to-be-predicted pixel, and a weight parameter corresponding to at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel, and determining or obtaining the prediction or reconstruction result of the pixel according to a result of the weighted calculation;
[0438] performing weighted calculation according to at least one reference pixel and an offset constant corresponding to the current block, and a weight parameter corresponding to the at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel, and determining or obtaining the prediction or reconstruction result of the pixel according to a result of the weighted calculation;
[0439] performing weighted processing according to at least one reference pixel and a weight parameter corresponding to the at least one reference pixel in the weight array and / or the weight table of the to-be-predicted pixel, and determining or obtaining the prediction or reconstruction result of the pixel according to at least one offset parameter in an offset array and / or an offset table of the to-be-predicted pixel in an offset matrix and / or an offset table corresponding to the current block, and a result of the weighted processing;
[0440] According to the weight parameters corresponding to the at least one reference pixel in the weight array and / or the weight table of the pixel to be predicted and the at least one reference pixel, weighted processing is performed, and according to at least one of the offset constant, the clipping parameter and the deformation parameter corresponding to the current block and the weighted processing result, a prediction or reconstruction result of the pixel is determined or obtained.
[0441] Optionally, the processing module A10 is further configured to:
[0442] According to the prediction or reconstruction result of at least one pixel in the current block and at least one of the offset matrix and / or the offset table, the offset constant, the clipping parameter and the deformation parameter corresponding to the current block, a prediction or reconstruction result of the current block is determined or obtained.
[0443] Optionally, the processing module A10 is further configured to at least one of:
[0444] When the prediction flag obtained in the bitstream is in the first range, the reconstruction of the current block is performed according to the reference pixel corresponding to the first pixel in the current block and the weight parameter;
[0445] When the prediction flag obtained in the bitstream is in the second range, the reconstruction of the current block is performed according to the distance between the first pixel and the reference pixel corresponding to the first pixel in the current block;
[0446] When the prediction flag obtained in the bitstream is in the third range, the reconstruction of the current block is performed according to the prediction mode of the block vector or the motion vector;
[0447] When the prediction flag obtained in the bitstream is in the fourth range, it is determined that the number of weight parameters of the pixel to be predicted in the current block matches the first number of weights, and the reconstruction of the current block is performed according to the reference pixel of the pixel to be predicted in the current block and the weight parameters of the first number of weights;
[0448] When the prediction flag obtained in the bitstream is in the fifth range, it is determined that the number of weight parameters of the pixel to be predicted in the current block matches the second number of weights, and the reconstruction of the current block is performed according to the reference pixel of the pixel to be predicted in the current block and the weight parameters of the second number of weights;
[0449] A candidate prediction mode list containing at least one prediction mode is obtained, and according to the candidate prediction mode list, a prediction mode for the current block is determined or obtained.
[0450] Optionally, obtaining a candidate prediction mode list containing at least one prediction mode includes at least one of:
[0451] determining a third pixel corresponding to the first pixel in the approximation block / template block of the current block, determining or obtaining the candidate prediction mode list according to a cost value of at least one prediction mode calculated based on a reference pixel corresponding to the third pixel and a weight parameter;
[0452] determining a third pixel corresponding to the first pixel in the approximation block / template block of the current block, determining or obtaining the candidate prediction mode list according to a cost value of at least one prediction mode calculated based on a distance between the third pixel and a reference pixel;
[0453] determining a third pixel corresponding to the first pixel in the approximation block / template block of the current block, determining or obtaining the candidate prediction mode list according to a cost value of at least one prediction mode calculated based on at least one reference pixel in a block corresponding to a motion vector and / or a block vector of the third pixel and a weight parameter;
[0454] when the cost flag obtained from the bitstream is the first value, determining a third pixel corresponding to the first pixel in the approximation block / template block of the current block, and determining or obtaining the candidate prediction mode list according to a first cost value of at least one prediction mode calculated based on a reference pixel corresponding to the third pixel and a weight parameter, and / or, a first cost value of at least one prediction mode calculated based on a distance between the third pixel and the reference pixel, and / or, a first cost value of at least one prediction mode calculated based on at least one reference pixel in a block corresponding to a motion vector and / or a block vector of the third pixel and the weight parameter;
[0455] when the cost flag obtained from the bitstream is the second value, determining a third pixel corresponding to the first pixel in the approximation block / template block of the current block, and determining or obtaining the candidate prediction mode list according to a second cost value of at least one prediction mode calculated based on a reference pixel corresponding to the third pixel and a weight parameter, and / or, a second cost value of at least one prediction mode calculated based on a distance between the third pixel and the reference pixel, and / or, a second cost value of at least one prediction mode calculated based on at least one reference pixel in a block corresponding to a motion vector and / or a block vector of the third pixel and the weight parameter;
[0456] determining a third pixel corresponding to the first pixel in the approximation block / template block of the current block, determining or obtaining the candidate prediction mode list according to at least two different third cost values of at least one prediction mode calculated based on a reference pixel corresponding to the third pixel and a weight parameter, and / or, at least two different third cost values of at least one prediction mode calculated based on a distance between the third pixel and the reference pixel, and / or, at least two different third cost values of at least one prediction mode calculated based on at least one reference pixel in a block corresponding to a motion vector and / or a block vector of the third pixel and the weight parameter, and determining or obtaining the candidate prediction mode list according to a fourth cost value determined based on the at least two different third cost values.
[0457] Optionally, the processing module A10 is further configured to perform at least one of the following:
[0458] performing prediction for the first pixel in the current block according to the reference pixel corresponding to the first pixel in the current block and the weight parameter, and writing the prediction flag in the second range into the bitstream if the cost of the prediction result is minimum;
[0459] determining the weight parameter according to the distance between the first pixel in the current block and the reference pixel corresponding to the first pixel, and performing prediction for the current block according to the weight parameter and the reference pixel, and writing the prediction flag in the second range into the bitstream if the cost of the prediction result is minimum;
[0460] performing prediction for the current block based on the prediction mode of the block vector or the motion vector, and writing the prediction flag in the third range into the bitstream if the cost of the prediction result is minimum;
[0461] performing prediction for the current block according to the reference pixel of the pixel to be predicted in the current block and the weight parameter, and writing the prediction flag in the fourth range into the bitstream if the cost of the prediction result when the number of the weight parameters matches the first number of the weight parameters is minimum;
[0462] performing prediction for the current block according to the reference pixel of the pixel to be predicted in the current block and the weight parameter, and writing the prediction flag in the fifth range into the bitstream if the cost of the prediction result when the number of the weight parameters matches the second number of the weight parameters is minimum.
[0463] The processing device provided by the embodiments of the present application and the technical solutions shown in the corresponding method embodiments have similar implementation principles and beneficial effects, which will not be repeated here.
[0464] The embodiments of the present application further provide a processing device, comprising a memory and a processor, and the memory stores a processing program, and the processing program is executed by the processor to implement the steps of the processing method in any of the embodiments.
[0465] The embodiments of the present application further provide a storage medium, and the storage medium stores a processing program, and the processing program is executed by the processor to implement the steps of the processing method in any of the embodiments.
[0466] In the embodiments of the processing device and the storage medium provided by the present application, all the technical features of any of the above processing method embodiments can be included, and the description and explanation contents are basically the same as those of the above method embodiments, which will not be repeated here.
[0467] The embodiments of the present application further provide a computer program product, and the computer program product comprises computer program code, which causes the computer to execute the method in various possible embodiments when the computer program code runs on the computer.
[0468] The embodiment of the present application further provides a chip comprising a memory and a processor, the memory is used for storing a computer program, and the processor is used for calling and running the computer program from the memory, so that a device installed with the chip executes the method in the various possible embodiments.
[0469] It can be understood that the above scenarios are only examples and do not constitute a limitation on the application scenarios of the technical solutions provided by the embodiments of the present application. The technical solutions provided by the embodiments of the present application are also applicable to other scenarios. For example, those skilled in the art can know that, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0470] The above sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0471] The steps in the method of the embodiments of the present application can be adjusted in sequence, combined and deleted according to actual needs.
[0472] The units in the device of the embodiments of the present application can be combined, divided and deleted according to actual needs.
[0473] In the present application, for the same or similar term concept, technical solution and / or application scenario description, generally only the first time is described in detail, and for the sake of brevity, the repeated description is generally not repeated, and for the understanding of the technical solutions of the present application, the same or similar term concept, technical solution and / or application scenario description which is not described in detail can be referred to the previous related description.
[0474] In the present application, the description of each embodiment has its own emphasis, and the part not described or recorded in a certain embodiment can be referred to the related description of other embodiments.
[0475] The technical features of the technical solutions of the present application can be combined arbitrarily, in order to make the description simple, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combination of these technical features does not exist contradictory, it should be considered as the range recorded in the present application.
[0476] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, a controlled terminal, or a network device) to execute the method of each embodiment of the present application.
[0477] In the above embodiments, all or part of the embodiments can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part of the embodiments can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a storage medium or transferred from one storage medium to another storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) mode. The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a storage disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0478] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A processing method, wherein, The method comprises the steps of: S10, predicting or reconstructing a first pixel in a current block according to a reference pixel of the first pixel and a weight parameter.
2. The method of claim 1, wherein, Step S10 comprises the steps of: S11, determining or obtaining a weight array and / or a weight table of the pixel to be predicted according to a weight matrix and / or a weight table of the current block; S12, predicting or reconstructing the pixel to be predicted according to a reference pixel of the pixel to be predicted and at least one weight parameter in the weight array and / or the weight table of the pixel to be predicted.
3. The method of claim 2, wherein, Step S12 comprises the steps of: S13, determining at least one reference pixel of the pixel to be predicted, and / or determining at least one reference pixel in a block corresponding to a motion vector of the pixel to be predicted, and / or determining at least one reference pixel in a block corresponding to a block vector of the pixel to be predicted; S14, predicting or reconstructing the pixel to be predicted according to at least one reference pixel and at least one weight parameter corresponding to the at least one reference pixel in the weight array and / or the weight table of the pixel to be predicted.
4. The method of claim 3, wherein, Step S14 comprises at least one of the following: When the pixel to be predicted is a second pixel of a first component, predicting or reconstructing the pixel to be predicted according to reference pixels of at least two second components corresponding to the second pixel and weight parameters corresponding to the reference pixels of the at least two second components; Predicting or reconstructing the pixel to be predicted according to at least two reference pixels in the same component as the pixel to be predicted and weight parameters corresponding to the at least two reference pixels in the same component; Predicting or reconstructing the pixel to be predicted according to at least one reference pixel in the same component as the pixel to be predicted, at least one reference pixel across components, weight parameters corresponding to the at least one reference pixel in the same component, and weight parameters corresponding to the at least one reference pixel across components.
5. The method of claim 3, wherein, The manner of determining or obtaining the prediction or reconstruction result of the pixel comprises at least one of the following: Determining or obtaining an offset array and / or an offset table of the pixel to be predicted according to an offset matrix and / or an offset table corresponding to the current block, performing weighted calculation according to at least one offset parameter in the offset array and / or the offset table of the pixel to be predicted, reference pixels, and weight parameters corresponding to at least one reference pixel in the weight array and / or the weight table of the pixel to be predicted, and determining or obtaining the prediction or reconstruction result of the pixel according to the weighted calculation result; Performing weighted calculation according to at least one weight parameter corresponding to at least one reference pixel in the weight array and / or the weight table of the pixel to be predicted, and an offset constant and at least one reference pixel corresponding to the current block, and determining or obtaining the prediction or reconstruction result of the pixel according to the weighted calculation result; Performing weighted processing on at least one reference pixel according to weight parameters corresponding to the at least one reference pixel in the weight array and / or the weight table of the pixel to be predicted, and determining or obtaining the prediction or reconstruction result of the pixel according to at least one offset parameter in the offset array and / or the offset table of the pixel to be predicted in the offset matrix and / or the offset table corresponding to the current block and the weighted processing result. According to the weight parameters corresponding to the at least one reference pixel in the weight array and / or weight table of the pixel to be predicted and the at least one reference pixel, weighted processing is performed, and according to at least one of the offset constant, clipping parameter and deformation parameter corresponding to the current block and the weighted processing result, a prediction or reconstruction result of the pixel is determined or obtained.
6. The method of claim 1, wherein, Further comprising at least one of the following: When the prediction flag obtained from the bitstream is in the first range, the reconstruction of the current block is performed according to the reference pixel corresponding to the first pixel in the current block and the weight parameter; When the prediction flag obtained from the bitstream is in the second range, the reconstruction of the current block is performed according to the distance between the first pixel and the reference pixel corresponding to the first pixel in the current block; When the prediction flag obtained from the bitstream is in the third range, the reconstruction of the current block is performed according to the prediction mode of the block vector or motion vector; When the prediction flag obtained from the bitstream is in the fourth range, it is determined that the number of weight parameters of the pixel to be predicted in the current block matches the first number of weight parameters, and the reconstruction of the current block is performed according to the reference pixel of the pixel to be predicted in the current block and the weight parameters of the first number of weight parameters; When the prediction flag obtained from the bitstream is in the fifth range, it is determined that the number of weight parameters of the pixel to be predicted in the current block matches the second number of weight parameters, and the reconstruction of the current block is performed according to the reference pixel of the pixel to be predicted in the current block and the weight parameters of the second number of weight parameters; According to the prediction or reconstruction result of at least one pixel in the current block and at least one of the offset matrix and / or offset table, the offset constant, the clipping parameter and the deformation parameter corresponding to the current block, a prediction or reconstruction result of the current block is determined or obtained. The candidate prediction mode list containing at least one prediction mode is obtained, and according to the candidate prediction mode list, a prediction mode for the current block is determined or obtained.
7. The method of claim 6, wherein, The candidate prediction mode list containing at least one prediction mode is obtained, and according to the candidate prediction mode list, a prediction mode for the current block is determined or obtained. The third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, and at least one prediction mode is determined or obtained according to the cost value of the at least one prediction mode calculated according to the reference pixel corresponding to the third pixel and the weight parameter; The third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, and at least one prediction mode is determined or obtained according to the cost value of the at least one prediction mode calculated according to the distance between the third pixel and the reference pixel; The third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, and at least one prediction mode is determined or obtained according to the cost value of the at least one prediction mode calculated according to at least one reference pixel in the block corresponding to the motion vector and / or block vector of the third pixel and the weight parameter; When the cost flag obtained from the bitstream is the first value, a third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, a first cost value of at least one prediction mode calculated according to a reference pixel corresponding to the third pixel and a weight parameter, and / or a first cost value of at least one prediction mode calculated according to a distance between the third pixel and the reference pixel, and / or a first cost value of at least one prediction mode calculated according to at least one reference pixel in a block corresponding to a motion vector and / or a block vector of the third pixel and the weight parameter, are used to determine or obtain a candidate prediction mode list; When the cost flag obtained from the bitstream is the second value, a third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, a second cost value of at least one prediction mode calculated according to a reference pixel corresponding to the third pixel and a weight parameter, and / or a second cost value of at least one prediction mode calculated according to a distance between the third pixel and the reference pixel, and / or a second cost value of at least one prediction mode calculated according to at least one reference pixel in a block corresponding to a motion vector and / or a block vector of the third pixel and the weight parameter, are used to determine or obtain a candidate prediction mode list; A third pixel corresponding to the first pixel in the approximate block / template block of the current block is determined, at least two different third cost values of at least one prediction mode calculated according to a reference pixel corresponding to the third pixel and a weight parameter, and / or at least two different third cost values of at least one prediction mode calculated according to a distance between the third pixel and the reference pixel, and / or at least two different third cost values of at least one prediction mode calculated according to at least one reference pixel in a block corresponding to a motion vector and / or a block vector of the third pixel and the weight parameter, a fourth cost value determined according to the at least two different third cost values, are used to determine or obtain a candidate prediction mode list.
8. The method of claim 1, wherein, Further comprising at least one of the following: performing prediction of the first pixel in the current block according to a reference pixel corresponding to the first pixel in the current block and a weight parameter, and if a cost of the prediction result is the smallest, writing a prediction flag in the first range into the bitstream; determining the weight parameter according to a distance between the first pixel in the current block and a reference pixel corresponding to the first pixel, and performing prediction of the current block according to the weight parameter and the reference pixel, and if a cost of the prediction result is the smallest, writing a prediction flag in the second range into the bitstream; when the current block is predicted based on a prediction mode of a block vector or a motion vector, and if a cost of the prediction result is the smallest, writing a prediction flag in the third range into the bitstream; performing prediction of the current block according to a reference pixel of a to-be-predicted pixel in the current block and a weight parameter, and if a cost of the prediction result when the number of weight parameters matches the first number of weight parameters is the smallest, writing a prediction flag in the fourth range into the bitstream; performing prediction of the current block according to a reference pixel of a to-be-predicted pixel in the current block and a weight parameter, and if a cost of the prediction result when the number of weight parameters matches the second number of weight parameters is the smallest, writing a prediction flag in the fifth range into the bitstream.
9. A processing device, wherein, A memory, a processor, the memory has a processing program stored thereon, the processing program is executed by the processor to implement the steps of the processing method in claim 1.
10. A computer readable storage medium, wherein, A computer readable storage medium, the computer readable storage medium has a processing program stored thereon, the processing program is executed by a processor to implement the steps of the processing method in claim 1.
Citation Information
Patent Citations
Video coding method and device, electronic device and computer readable storage medium
CN113891074A
Video coding and decoding method and device, computer readable medium and electronic equipment
CN114885160A
Video processing method and related equipment
CN115633168A
Image processing method, processing equipment and storage medium
CN116847088A
Encoding and decoding method and apparatus, encoding device, decoding device and storage medium
WO2023141781A1