Processing method, processing device, and storage medium
By utilizing multiple reference line information to optimize pixel prediction during video encoding and decoding, the problem of unsatisfactory pixel prediction results in existing technologies is solved, thus improving encoding and decoding quality.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHENZHEN TRANSSION HLDG CO LTD
- Filing Date
- 2025-09-22
- Publication Date
- 2026-07-30
AI Technical Summary
In existing video coding standards, pixel prediction performance during intra-frame and/or inter-frame prediction is not ideal, resulting in poor encoding and decoding quality.
By using at least one first reference line information, the predicted pixels of the current block are determined or obtained, including preset reference line information, sub-pixel reference line information, fused reference line information, candidate reference line information, reference line set, reference row, reference column, reference pixel information, reference line weight, reference line position and reference line distance, etc., to optimize the video encoding and decoding process.
This improves the accuracy of pixel prediction, thereby enhancing the encoding and decoding quality during video encoding and decoding.
Smart Images

Figure CN2025123034_30072026_PF_FP_ABST
Abstract
Description
Processing methods, processing equipment and storage media Technical Field
[0001] This application relates to the field of image processing technology, specifically to a processing method, processing device, and storage medium. Background Technology
[0002] The existing video coding standard (H.266 / VVC) proposes a video frame coding technique, for example, when encoding and decoding video frames, each frame is divided into different blocks and prediction and encoding / decoding processes are performed.
[0003] In conceiving and implementing this application, the inventors discovered at least the following problems: the prediction effect of pixels is not ideal in the intra-frame prediction and / or inter-frame prediction process, which leads to poor encoding and decoding quality in the video encoding and / or decoding process.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art.
[0005] Application content
[0006] To address the aforementioned technical problems, this application provides a processing method, processing device, and storage medium that can determine or obtain at least one predicted pixel of the current block based on at least one first reference line information, thereby improving the accuracy of pixel prediction and supporting the improvement of encoding and / or decoding quality in the video encoding and / or decoding process.
[0007] This application provides a processing method applicable to a processing device, comprising the following steps:
[0008] S10, based on at least one first reference line information, determine or obtain at least one predicted pixel of the current block.
[0009] Optionally, the first reference line information includes at least one of the following:
[0010] Preset reference line information;
[0011] Pixel-level reference line information;
[0012] Integrate reference line information;
[0013] Candidate reference line information;
[0014] Reference line set;
[0015] Reference line;
[0016] Reference column;
[0017] Reference pixel information;
[0018] Reference line weights;
[0019] Reference line position;
[0020] Reference line distance;
[0021] Reference line index.
[0022] Optionally, the reference line set includes: a first reference line set and / or a second reference line set.
[0023] Optionally, the processing method further includes at least one of the following:
[0024] The size of the first set of reference lines is smaller than the size of the second set of reference lines;
[0025] The size parameters of the first reference line set are preset values;
[0026] The size of the second reference line set is determined or obtained based on the current block information, encoded block information, and / or decoded block information;
[0027] The first set of reference lines and / or the second set of reference lines includes a set of candidate reference lines;
[0028] The reference line set is determined or obtained based on the current block size;
[0029] The position of the reference line is determined or obtained based on the current block size;
[0030] The distance to the reference line is determined or obtained based on the current block size.
[0031] Optionally, the processing method further includes at least one of the following:
[0032] Step S10 includes: determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information and at least one prediction mode;
[0033] Step S10 includes: determining or obtaining at least one reference pixel based on at least one first reference line information, and determining or obtaining at least one predicted pixel of the current block based on at least one reference pixel;
[0034] The first reference line information is determined or obtained based on at least one of the following: the second reference line information, the current block information, the encoded block information, and the decoded block information.
[0035] Optionally, the current block information includes at least one of the following:
[0036] The current block size;
[0037] Preset position pixels related to the current block;
[0038] The current block position;
[0039] Reference template information for the current block;
[0040] The motion vector of the current block;
[0041] Candidate motion vectors for the current block;
[0042] The block vector of the current block;
[0043] The candidate block vector of the current block;
[0044] Intra-frame template matching information for the current block;
[0045] List of prediction modes related to the current block;
[0046] Rate distortion cost of the current block;
[0047] Boundary information of the current block.
[0048] Optionally, the encoded block information includes at least one of the following: the block size of the encoded block, the preset position pixels associated with the encoded block, the position of the encoded block, the reference line information of the encoded block, the reference template information of the encoded block, the motion vector of the encoded block, the candidate motion vector of the encoded block, the block vector of the encoded block, the candidate block vector of the encoded block, the intra-frame template matching information of the encoded block, the prediction mode list associated with the encoded block, the boundary information of the encoded block, and the partitioning information of the encoded block.
[0049] Optionally, the decoded block information includes at least one of the following: the block size of the decoded block, the preset position pixels associated with the decoded block, the position of the decoded block, the reference line information of the decoded block, the reference template information of the decoded block, the motion vector of the decoded block, the candidate motion vector of the decoded block, the block vector of the decoded block, the candidate block vector of the decoded block, the intra-frame template matching information of the decoded block, the prediction mode list associated with the decoded block, the boundary information of the decoded block, and the partitioning information of the decoded block.
[0050] Optionally, the second reference line information includes at least one of the following: at least one set of reference lines, reference line information of the encoded block, at least two reference line weights, and reference lines at preset positions.
[0051] Optionally, the first reference line information is determined or obtained based on the second reference line information, including at least one of the following:
[0052] The first reference line information is determined or obtained based on at least one set of reference lines;
[0053] The first reference line information is determined or obtained based on the reference line information of the encoded block;
[0054] The information of the first reference line is determined or obtained based on the weights of at least two reference lines;
[0055] The first reference line information is determined or obtained based on the reference line at the preset position.
[0056] Optionally, the first reference line information is determined or obtained based on at least one of the current block information, encoded block information, and decoded block information, including at least one of the following:
[0057] The first reference line information is determined or obtained based on the current block size;
[0058] The first reference line information is determined or obtained based on the reference template matching cost of the current block;
[0059] The first reference line information is determined or obtained based on the motion vectors of the current block, the encoded block, and / or the decoded block;
[0060] The first reference line information is determined or obtained based on the candidate motion vectors of the current block, the encoded block, and / or the decoded block;
[0061] The first reference line information is determined or obtained based on the block vector of the current block, the encoded block, and / or the decoded block;
[0062] The first reference line information is determined or obtained based on the candidate block vectors of the current block, the encoded block, and / or the decoded block;
[0063] The first reference line information is determined or obtained based on the intra-frame template matching information of the current block, the encoded block, and / or the decoded block;
[0064] The first reference line information is determined or obtained based on a list of prediction modes and reference line combinations determined or obtained through the current block, encoded blocks, and / or decoded blocks;
[0065] The first reference line information is determined or obtained based on the reference line information of the image block determined or obtained through preset position pixels related to the current block, the encoded block, and / or the decoded block;
[0066] The first reference line information is determined or obtained based on the list of prediction modes related to the current block;
[0067] The first reference line information is determined or obtained based on the rate-distortion cost of the current block;
[0068] The first reference line information is determined or obtained based on the reference line information of the encoded block and / or the decoded block;
[0069] The first reference line information is determined or obtained based on the boundary information of the encoded block and / or the decoded block;
[0070] The first reference line information is determined or obtained based on the division information of the encoded region and / or encoded block;
[0071] The first reference line information is determined or obtained based on the division information of the decoded region and / or decoded block.
[0072] This application also provides a processing device, including: a memory and a processor, wherein the memory stores a processing program, and when the processing program is executed by the processor, it implements the steps of any of the processing methods described above.
[0073] This application also provides a storage medium storing a computer program that, when executed by a processor, implements the steps of any of the processing methods described above.
[0074] As described above, the processing method of this application can be applied to a processing device, including: determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information. Through the technical solution of this application, the accuracy of pixel prediction can be improved, thereby supporting the improvement of encoding and / or decoding quality in the video encoding and / or decoding process. Attached Figure Description
[0075] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0076] Figure 1 is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of this application;
[0077] Figure 2 is a communication network system architecture diagram provided in an embodiment of this application;
[0078] Figure 3 is a schematic diagram of the hardware structure of a controller 140 provided in this application;
[0079] Figure 4 is a schematic diagram of the hardware structure of a network node 150 provided in this application;
[0080] Figure 5 is a flowchart illustrating the processing method according to the first embodiment;
[0081] Figure 6 is a schematic diagram illustrating the basic principle of reference pixel acquisition in the processing method according to the first embodiment;
[0082] Figure 7 is a schematic diagram of the reference pixel and the current block in the processing method shown according to the first embodiment;
[0083] Figure 8 is a schematic diagram of the predicted value correction in the processing method according to the first embodiment;
[0084] Figure 9 is a schematic diagram of reference lines for the MRL pattern in the processing method shown according to the first embodiment;
[0085] Figure 10 is a schematic diagram of the reference lines and reference template of the TMRL mode in the processing method shown according to the first embodiment;
[0086] Figure 11 is a schematic diagram of the encoder's encoding process in the image processing method according to the first embodiment;
[0087] Figure 12 is a schematic diagram of the decoding process of the decoder in the image processing method according to the first embodiment;
[0088] Figure 13 is a schematic diagram of preset position pixels related to the current block according to the third embodiment;
[0089] Figure 14 is a schematic diagram showing the motion vector of the current block and the preset position pixels associated with the current block according to the third embodiment;
[0090] Figure 15 is a schematic diagram showing the block vector of the current block and the preset position pixels associated with the current block according to the third embodiment;
[0091] Figure 16 is a schematic diagram of selecting a reference line based on the boundary information of an encoded block, according to the third embodiment.
[0092] Figure 17 is a schematic diagram 2 showing the selection of reference lines based on the boundary information of the encoded block according to the third embodiment;
[0093] Figure 18 is a schematic diagram of selecting a reference line based on the boundary information of an encoded block, according to the third embodiment.
[0094] Figure 19 is a schematic diagram four illustrating the selection of reference lines based on the boundary information of coded blocks according to the third embodiment;
[0095] Figure 20 is a schematic diagram of the encoded region according to the third embodiment;
[0096] Figure 21 is a schematic diagram of the decoded area according to the third embodiment;
[0097] Figure 22 is a schematic diagram of the processing module of the processing device.
[0098] The realization of the objectives, functional features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0099] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0100] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0101] It should be understood that although the terms first, second, third, etc., may be used herein to describe various information, this information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another; for example, without departing from the scope of this document, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if," as used herein, can be interpreted as "when," "when," or "in response to determination." Furthermore, as used herein, the singular forms "a," "an," and "the" are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms "comprising" or "including" indicate the presence of the stated feature, step, operation, element, component, item, kind, and / or group, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms “or,” “and / or,” and “including at least one of the following” as used in this application may be interpreted as inclusive, or mean any one or any combination thereof. For example, “including at least one of the following: A, B, C” means “any one of the following: A; B; C; A and B; A and C; B and C; A and B and C”, or “A, B or C” or “A, B and / or C” means “any one of the following: A; B; C; A and B; A and C; B and C; A and B and C”. Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0102] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0103] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”
[0104] It should be noted that step designations such as S10 are used in this application for the purpose of more clearly and concisely describing the corresponding content, and do not constitute a substantial limitation on the order.
[0105] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0106] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0107] It should be noted that in this application, letter codes such as N are used, and unless otherwise specified, their values range from 0 to positive integers.
[0108] Processing devices can be implemented in various forms. For example, the processing devices described in this application may include processing devices such as mobile phones, servers, tablet computers, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs and desktop computers.
[0109] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from elements specifically designed for mobile purposes, the construction according to the embodiments of this application can also be applied to fixed-type terminals.
[0110] Please refer to Figure 1, which is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of this application. The mobile terminal 100 may 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 mobile terminal structure shown in Figure 1 does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0111] The following section, with reference to Figure 1, provides a detailed description of each component of the mobile terminal:
[0112] The radio frequency unit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 110; and / or 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, etc. In addition, the radio frequency unit 101 can also communicate with networks and other devices wirelessly. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), TDD-LTE (Time Division Duplexing-Long Term Evolution), 5G, and 6G.
[0113] WiFi is a short-range wireless transmission technology. Mobile terminals using WiFi module 102 can help users send and receive emails, browse web pages, and access streaming media, providing wireless broadband internet access. Although Figure 1 shows WiFi module 102, it is understood that it is not an essential component of the mobile terminal and can be omitted as needed without altering the essence of the invention.
[0114] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into audio signals and output them as sound when the mobile terminal 100 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the audio output unit 103 can also provide audio output related to specific functions performed by the mobile terminal 100 (e.g., call signal receiving sound, message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.
[0115] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) in operating modes such as telephone call mode, recording mode, and voice recognition mode, and can process such sound into audio data. The 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 telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.
[0116] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Optionally, the light sensor includes an ambient light sensor and a proximity sensor. Optionally, the ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light level, and the proximity sensor can turn off the display panel 1061 and / or backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0117] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0118] User input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile terminal. Optionally, user input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1071), and drive corresponding connection devices according to a pre-set program. Touch panel 1071 may include a touch detection device and a touch controller. Optionally, the touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 110, and can receive and execute commands sent by processor 110. In addition, touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Optionally, other input devices 1072 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., without being specifically limited here.
[0119] Optionally, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 according to the type of touch event. Although in FIG. 1, the touch panel 1071 and the display panel 1061 are implemented as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal. The specific implementation is not limited here.
[0120] Interface unit 108 serves as an interface through which at least one external device can connect to mobile terminal 100; for example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 108 may be used to receive input from external devices (e.g., data information, power, etc.) and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and external devices.
[0121] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. Optionally, the program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0122] The processor 110 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. Optionally, the application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.
[0123] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, thereby enabling functions such as charging, discharging and power consumption management through the power management system.
[0124] Although not shown in Figure 1, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.
[0125] To facilitate understanding of the embodiments of this application, the communication network system on which the mobile terminal of this application is based is described below.
[0126] Please refer to Figure 2, which is a communication network system architecture diagram provided in an embodiment of this application. The communication network system is an LTE system based on the universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and the operator's IP services 204, which are connected in sequence.
[0127] Optionally, UE201 can be the aforementioned terminal 100, which will not be described in detail here.
[0128] E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. Optionally, eNodeB2021 can connect to other eNodeB2022 via backhaul (e.g., X2 interface), and eNodeB2021 connects to EPC203, providing access from UE201 to EPC203.
[0129] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gateway) 2034, PGW (Packet Data Network Gateway) 2035, and PCRF (Policy and Charging Rules Function) 2036, etc. Optionally, MME2031 is the control node that handles signaling between UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as the Home Location Register (not shown in the figure) and stores user-specific information such as service characteristics and data rates. All user data can be sent through SGW2034. PGW2035 can provide UE 201 IP address allocation and other functions. PCRF2036 is the policy and charging control decision point for service data flow and IP bearer resources. It selects and provides available policy and charging control decisions for the policy and charging enforcement function unit (not shown in the figure).
[0130] IP services 204 may include the Internet, intranet, IMS (IP Multimedia Subsystem), or other IP services.
[0131] Although the above description uses the LTE system as an example, those skilled in the art should know that this application is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, 5G and future new network systems (such as 6G), etc., without limitation.
[0132] Figure 3 is a schematic diagram of the hardware structure of a controller 140 provided in this application. The controller 140 includes a memory 1401 and a processor 1402. The memory 1401 is used to store program instructions, and the processor 1402 is used to call the program instructions in the memory 1401 to execute the steps performed by the controller in the first embodiment of the above method. The implementation principle and beneficial effects are similar, and will not be described again here.
[0133] Optionally, the controller further includes a communication interface 1403, which can be connected to the processor 1402 via a bus 1404. The processor 1402 can control the communication interface 1403 to implement the receiving and sending functions of the controller 140.
[0134] Figure 4 is a schematic diagram of the hardware structure of a network node 150 provided in this application. The network node 150 includes a memory 1501 and a processor 1502. The memory 1501 is used to store program instructions, and the processor 1502 is used to call the program instructions in the memory 1501 to execute the steps performed by the first node in the above method embodiment. The implementation principle and beneficial effects are similar, and will not be described again here.
[0135] Optionally, the controller further includes a communication interface 1503, which can be connected to the processor 1502 via a bus 1504. The processor 1502 can control the communication interface 1503 to implement the receiving and sending functions of the network node 150.
[0136] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application.
[0137] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A 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 flow or function according to the embodiments of this application is 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 transmitted from one storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk, SSD), etc.
[0138] First Embodiment
[0139] Referring to Figure 5, which is a flowchart illustrating the processing method according to the first embodiment, the processing method of this application embodiment can be applied to a processing device, including step S10:
[0140] Step S10: Determine or obtain at least one predicted pixel of the current block based on at least one first reference line information.
[0141] In this embodiment, the processing device can be a smart terminal, such as a mobile phone or computer, and / or the processing device can be a server, such as a local server or a cloud server. This embodiment and this application primarily use a smart terminal as an example for illustration.
[0142] Optionally, the technical solution of this embodiment can be applied to fields such as image encoding and decoding, video encoding and decoding, hardware video encoding and decoding, dedicated circuit video encoding and decoding, and real-time video encoding and decoding.
[0143] Optionally, the processing device can acquire video image data from a video source, segment each frame of the video image data to obtain at least one image block, and the image block in the at least one image block that is currently being encoded is the current block.
[0144] Optionally, the processing device can decode the data in the bitstream to obtain at least one image block, wherein the image block currently being decoded in the at least one image block is the current block.
[0145] Optionally, the processing device can acquire video image data from a video source, segment each frame of the video image data to obtain at least one image block, and the image block in the at least one image block that is undergoing prediction processing is the current block.
[0146] Optionally, the processing device can decode the data in the bitstream to obtain at least one image block, wherein the image block in which prediction processing is being performed is the current block.
[0147] Optionally, the current block can be the current coding block or the current decoding block. The current coding block refers to the image block that is currently being encoded and processed in the encoder, while the current decoding block refers to the image block that is currently being reconstructed in the decoder.
[0148] Optionally, the current block can also be a Coding Tree Unit (CTU), Coding Unit (CU), Macroblock, etc.
[0149] Optionally, the first reference line information is a set of relevant parameters, attributes, etc. used to describe and identify the reference line used. The first reference line information may include pixel data of at least one reference line itself, and / or the first reference line information may include metadata used to locate, select, and / or manage the reference line, such as reference line position, reference line distance, reference line index, etc.
[0150] Optionally, the predicted pixel is a predicted value of the position of at least one pixel in the current block, determined or obtained through at least one first reference line information.
[0151] Optionally, at least one reference pixel is determined or obtained based on at least one first reference line information, and at least one predicted pixel of the current block is determined or obtained based on the at least one reference pixel.
[0152] Optionally, the reference pixel is encoded pixel data located in the current block space neighborhood that can be used for intra-frame prediction.
[0153] Optionally, the reference pixel is pixel data that is located within the current block space neighborhood, has been reconstructed, and can be used for intra-frame prediction.
[0154] Optionally, the reference pixels include filtered reference pixels and / or unfiltered reference pixels.
[0155] Optionally, for a CU of size N x N, the reference pixels to be acquired include at least one of the following:
[0156] Above Row: A row of pixels immediately above the top edge of the CU, with a length of N+N+1 (i.e., starting from the pixel directly above the top left corner of the CU and extending 2N pixels to the right);
[0157] Left Reference Column: A column of pixels immediately adjacent to the left boundary of the CU, with a length of N+N+1 (that is, starting from the pixel directly to the left of the top left corner of the CU and extending downwards by 2N pixels);
[0158] Top-Left Reference Pixel: The pixel at the intersection of the top reference row and the left reference column.
[0159] Optionally, if neighboring pixels are determined or obtained, smoothing filtering or interpolation filtering is applied to the neighboring pixels to determine or obtain reference pixels for prediction.
[0160] Optionally, since the reference pixels may come from different CUs, it is necessary to check the availability of the reference pixels based on the availability conditions.
[0161] Optionally, the first available condition includes: the CU containing the reference pixel has been coded and reconstructed, and belongs to the same intra-frame image (i.e., the same frame) as the current CU, and cannot be divided into another Slice or Tile.
[0162] Optionally, if a reference pixel is unavailable (e.g., the current CU is located at the image boundary and the reference pixel is in another slice), the encoder will use padding to determine or generate a virtual reference pixel.
[0163] Optionally, the filling method includes at least one of the following:
[0164] Default value padding: Typically, a fixed intermediate value (such as 1 << (bit depth - 1), which is 128 for 8-bit pixels) is used to fill all unavailable reference pixels;
[0165] Available pixel extension: If some pixels are available, fill them with the nearest available pixel value.
[0166] Optionally, the reference lines include reference pixel rows and / or reference pixel columns.
[0167] Optionally, as shown in Figure 6, the method for determining or obtaining the reference line (e.g., the reference line corresponding to the first reference line information) includes:
[0168] Positioning reference pixel;
[0169] Determine if the reference pixel is available;
[0170] If a reference pixel is available, the reference pixel is obtained directly, and / or if the reference pixel is unavailable, the neighboring available pixel is used to fill the gap or the default value is used instead.
[0171] The reference line is determined or obtained based on the determined or obtained reference pixel.
[0172] Optionally, positioning reference pixels includes positioning upper reference pixels and / or left reference pixels.
[0173] Optionally, the reference pixels include at least one of the reference pixels shown in the lower left region A, left side region B, upper left region C, upper top region D, and upper right region E as shown in Figure 7.
[0174] Optionally, the lower left pixel region A, the left pixel region B, the upper left pixel region C, the upper pixel region D, and the upper right pixel region E in the reference line may or may not be adjacent to the current block.
[0175] Optionally, pixels in the reference line are adjacent to each other, or pixel regions in the reference line are adjacent to each other.
[0176] Optionally, at least one predicted pixel of the current block is determined or obtained based on at least one first reference line information and at least one prediction mode.
[0177] Optionally, the prediction mode includes at least one of the following: angle prediction mode, neural network-based intraprediction (NNIP) mode, extrapolation filter-based intraprediction (EIP) mode, block vector prediction mode (BV mode), planar mode, and DC mode.
[0178] Optionally, in DC mode, the predicted value in the current block is determined or obtained based on the average pixel value in the reference line.
[0179] Optionally, in Planar mode, the predicted value of a pixel in the current block is determined or obtained based on the horizontal predicted value calculated from the upper reference row and the vertical predicted value calculated from the left reference column.
[0180] Optionally, in the angle prediction mode, the predicted value of a pixel in the current block is determined or obtained by projecting the pixel in the current block onto the reference line along the corresponding prediction direction. Optionally, if the projection point is located between two reference pixels, an interpolation filter (e.g., linear interpolation, 4-tap Gaussian interpolation, etc.) is used to calculate the weighted average of the two reference pixels as the predicted value of that pixel.
[0181] Optionally, at least one predicted pixel of the current block is determined or obtained based on at least one first reference line information and at least one reference template.
[0182] Optionally, the reference template refers to a set of encoded and reconstructed pixel regions located in the current block space neighborhood, which is used to evaluate the matching degree of candidate prediction results during the prediction mode screening stage.
[0183] Optionally, at least one prediction mode is determined or obtained based on at least one first reference line information and at least one reference template, and at least one predicted pixel of the current block is determined or obtained based on at least one prediction mode and at least one first reference line information.
[0184] Optionally, determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information includes:
[0185] Obtain the reference pixel value of at least one first reference line;
[0186] Based on reference pixel values and at least one prediction mode, determine or obtain the predicted value of the current block;
[0187] The predicted value of the current block is corrected.
[0188] Optionally, determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information includes:
[0189] Obtain the reference pixel value of at least one first reference line;
[0190] Based on the reference pixel value and at least one second prediction mode, determine or obtain the prediction value of the reference template for the current block;
[0191] The predicted values of the reference template are corrected.
[0192] Based on the corrected predicted values from the reference template, determine or obtain the reference template matching cost;
[0193] Based on the cost of matching the reference template, determine or obtain at least one prediction pattern for the current block;
[0194] Based on the reference pixel value of at least one first reference line and at least one prediction mode of the current block, the predicted value of the current block is determined or obtained.
[0195] The predicted value of the current block is corrected.
[0196] Referring to Figure 8, in order to make the predicted value (i.e. the initial predicted value) of the current block determined or obtained above closer to the true value of the original pixel, the initial predicted value can be corrected, including: by using boundary smoothing filtering and / or position dependent intra prediction combination (PDPC) processing methods, the final predicted value can be determined or obtained through the correction processing to improve the prediction accuracy.
[0197] Optionally, the processing method in this application embodiment can be an intra-frame mode derivation method, that is, a method of deriving the most suitable prediction mode for the current block by analyzing the relevant information of the current block.
[0198] Optionally, the processing method in this application embodiment can be MRL (Multiple Reference Line) mode, TMRL (Template-based Multiple Reference Line) mode, improved MRL mode and / or improved TMRL mode.
[0199] Optionally, the processing method of this application embodiment can directly replace the conventional MRL mode and / or TMRL mode when applied to the encoder and / or decoder, and / or the processing method of this application embodiment can be used as a sub-mode of the conventional MRL mode and / or TMRL mode. This application embodiment does not limit this.
[0200] Optionally, the MRL mode is an enhanced intra-frame prediction method that improves prediction accuracy by extending the limitation of traditional intra-frame prediction that uses only a single reference line (such as the row / column of encoded pixels immediately above or to the left). This allows the encoder to select the optimal reference line from at least one candidate reference line to determine or generate the predicted pixel.
[0201] Referring to Figure 9, the working principle of MRL mode is as follows: The encoder configures at least one candidate reference line for the current block, such as reference lines L1, L2, L3 and / or L4 in Figure 9. Each reference line can be used as the input source for prediction. Then, for each reference line, the encoder applies the same or adapted prediction mode to determine or generate a candidate prediction block. The encoder performs rate-distortion optimization evaluation on the candidate prediction blocks determined or generated for each reference line, calculates its corresponding rate-distortion cost, and selects the reference line and its corresponding prediction mode that minimizes the rate-distortion cost as the optimal combination by comparing the costs of each candidate. Then, the encoder entropy encodes the index information (such as L1) of the selected reference line and the prediction mode information and writes it into the encoded bit stream for the decoder to use. After parsing the bit stream, the decoder obtains the corresponding reference line according to the reference line index, and reconstructs the prediction block in combination with the specified prediction mode to complete the decoding process. MRL mode enhances the adaptability of intra-frame prediction to complex textures and edge structures and / or improves prediction efficiency by introducing the selectivity of reference lines.
[0202] Optionally, TMRL mode is an efficient intra-frame prediction decision mechanism that combines multiple reference line selection and template matching techniques to quickly select suitable "prediction mode-reference line" combinations, thereby reducing coding complexity and / or improving prediction accuracy.
[0203] Referring to Figure 10, the working principle of the TMRL mode is as follows: The encoder and / or decoder configures at least one candidate reference line for the current block, such as reference lines L1, L2, and / or L3 in Figure 10. Each reference line can serve as an input source for prediction, breaking through the limitation of traditional intra-frame prediction relying only on a single neighboring reference line. The encoder and / or decoder then utilize the reconstructed pixels in the neighboring region of the current block to form a "reference template." For each "prediction mode-reference line" combination, the encoder and / or decoder determines or generates a prediction block and calculates the matching cost (e.g., SAD and / or SATD, etc.) between the prediction block and the template region. The matching cost is used to measure the prediction result. Based on the similarity to real pixels, the encoder and / or decoder determine or generate prediction results for at least one "prediction mode-reference line" combination, sorts them according to matching cost, selects at least one combination with the minimum matching cost (e.g., the top N) as candidates, and then performs full rate-distortion optimization on them to finally determine the optimal combination. The encoder can encode the index of the best intra-prediction mode and send it to the bitstream, and the decoder parses the index of the intra-prediction mode from the bitstream. By performing the above steps, the reconstructed value of the current block can be obtained. The TMRL mode allows the encoder and decoder to independently and consistently derive the best prediction parameters, which may reduce the number of syntax elements that need to be transmitted.
[0204] Optionally, the processing method in this application embodiment can be used to perform intra-frame prediction processing and / or inter-frame prediction processing on the current block.
[0205] Referring to Figure 11, when the processing device is an encoder on the encoding side, the encoder can receive video data input from a video source. For example, the encoder receives video images from the video source, determines the image to be predicted in the video images, divides the image to be predicted into at least one image block, and performs prediction processing on each of the at least one image block using the temporal and / or spatial correlation between video images. This includes intra-frame prediction processing and / or inter-frame prediction processing. Intra-frame prediction processing and / or inter-frame prediction processing each include at least one prediction mode. For the above prediction modes, the encoder uses, for example, rate-distortion cost to determine the prediction mode finally adopted by each of the at least one image block. For example, it calculates the rate-distortion cost corresponding to each prediction mode or the rate-distortion cost of combining several prediction modes to determine the minimum rate-distortion cost from at least one rate-distortion cost. The prediction mode or combination of prediction modes corresponding to the minimum rate-distortion cost is the prediction mode finally adopted by the image block.
[0206] Optionally, the above prediction modes include: intra-frame prediction mode and inter-frame prediction mode, and the intra-frame prediction mode can be determined using the MRL mode and / or TMRL mode proposed in this application.
[0207] Optionally, by step S10, all predicted pixels of the image block to be predicted (i.e., the current block) are determined or obtained, and then the prediction block corresponding to the image block to be predicted is determined or obtained. The residual block between the prediction block and the current block can be calculated, and the residual block can be transformed and quantized, and then encoded by the entropy encoder to form an encoded bit stream.
[0208] Optionally, the encoded bitstream may include prediction parameters corresponding to the determined or obtained prediction mode and related side information, and the prediction parameters will be entropy encoded and then packaged into the encoded bitstream.
[0209] Optionally, the auxiliary information includes indication information of the prediction mode. For example, if the processing method proposed in the embodiments of this application is adopted, the auxiliary information includes indication information of the intra-frame mode derivation method proposed in the embodiments of this application.
[0210] Optionally, the transformed and quantized residual block can be added to the corresponding prediction data (such as the prediction block) obtained using the prediction mode after inverse quantization and inverse transformation to obtain the reconstructed block. After obtaining the reconstructed block, the loop filtering module performs loop filtering on the reconstructed block according to the filter control parameters to reduce distortion. After the loop filtering is performed, the reconstructed block after loop filtering is stored according to the encoded image buffer.
[0211] Referring to Figure 12, when the processing device is a decoder on the decoding side, after receiving the encoded bit stream, the decoder's entropy decoding unit will parse and / or decode the encoded bit stream to obtain transform coefficients; the decoder's inverse transform unit and inverse quantization unit will perform inverse transform and inverse quantization processing on the transform coefficients to obtain residual blocks.
[0212] Optionally, the entropy decoding unit of the decoder parses and / or decodes the encoded bit stream to obtain prediction data, such as prediction parameters and related auxiliary information. The prediction processing unit of the decoder uses the prediction parameters to perform prediction processing, thereby determining the prediction block corresponding to the residual block.
[0213] Optionally, the prediction processing includes intra-frame prediction processing and / or inter-frame prediction processing, wherein the intra-frame prediction processing and / or inter-frame prediction processing each include one of at least one prediction mode or a combination of at least one prediction mode.
[0214] Optionally, when the auxiliary information indicates that the MRL mode and / or TMRL mode proposed in this application are adopted, the pixel value of the pixel to be predicted of the image block to be predicted is determined or obtained according to the MRL mode and / or TMRL mode proposed in this application, the prediction result of the block to be predicted is determined or obtained according to the pixel value of the pixel to be predicted, and the obtained residual block and the corresponding prediction block (including the predicted luminance block and the predicted chrominance block) are added together to obtain the reconstructed block.
[0215] Optionally, the loop filtering unit of the decoder performs loop filtering on the reconstructed blocks to reduce distortion and improve video quality. The reconstructed blocks after loop filtering are further combined into a decoded image and stored in the decoded image buffer or output as a decoded video signal.
[0216] Optionally, when the processing device is an encoder, the initially obtained prediction value can be the prediction value obtained in the corresponding prediction mode, which can be directly used in the rate-distortion cost process.
[0217] Optionally, when the processing device is a decoder, the initially obtained prediction value can be the prediction value obtained through the prediction mode corresponding to the block to be predicted (i.e., the image block located at the decoding end) indicated by the syntax elements parsed in the bitstream.
[0218] Optionally, the predicted block can be used as the target image block, the residual block between the target image block and the current block can be calculated, and then encoded by an entropy encoder through transformation and quantization to form an encoded bit stream; and / or some corresponding processing can be performed on the predicted block, such as processing it through other models, and the processed image block can be used as the target image block to perform the step of calculating the residual block between the target image block and the current block and subsequent steps.
[0219] In this embodiment, by introducing at least one first reference line information (e.g., reference line index, reference line position, reference line distance, etc.), a suitable reference source can be dynamically selected from at least one candidate reference line based on the at least one first reference line information, thereby enhancing the adaptability of the prediction process to the image content. For example, when dealing with image blocks with complex structures, more representative reference pixels can be determined or obtained based on at least one reference line information, thereby determining or obtaining more accurate pixel prediction results.
[0220] Second Embodiment
[0221] Based on the first embodiment described above, a second embodiment is proposed.
[0222] In this embodiment, the first reference line information includes at least one of the following methods a1 to a12:
[0223] Method a1, reference line index;
[0224] Optionally, a reference line index refers to a number and / or identifier used to uniquely identify a reference line.
[0225] Optionally, the reference line index includes indexes corresponding to various types of reference lines. For example, the reference line index includes: a preset reference line index, a candidate reference line index, a fused reference line index, and / or at least one reference line index from the reference line set.
[0226] Optionally, the reference line indices corresponding to the above-mentioned types of reference lines include: reference line position index and / or reference line related list index.
[0227] Optionally, the reference line position index refers to the index value used to identify the sequential position of the reference line within its predefined set of reference lines.
[0228] Optionally, the reference line-related list index refers to the list item index in the list (e.g., a list of prediction patterns, a list of prediction patterns and reference line combinations, etc.) used to identify a reference line and / or a prediction pattern and reference line combination. The reference line-related list index can identify the reference line and also the prediction pattern associated with the reference line.
[0229] Optionally, at least one predicted pixel of the current block can be determined or obtained based on at least one reference line index.
[0230] Optionally, at least one target reference line is determined or obtained based on at least one reference line index, and at least one predicted pixel of the current block is determined or obtained based on at least one target reference line.
[0231] Optionally, in multi-reference line prediction, each reference line (e.g., preset reference line, candidate reference line, fused reference line, etc.) can be assigned a unique index value (e.g., 0, 1, 2, 3). After determining the target reference line, the encoder uses the index value of the target reference line as one of the prediction parameters, entropy-encoded it, and writes it into the encoded bit stream. After parsing the index, the decoder locates the corresponding reference pixel according to the predefined mapping rules (e.g., index 1 corresponds to the second row above) and extracts the corresponding reference pixel to reconstruct the prediction process.
[0232] In this embodiment, the reference line index can be used to indicate the reference line. Since the reference line index is usually small, it can be encoded with a small number of bits, thereby improving the encoding efficiency. And / or the reference line index can flexibly define non-uniformly distributed reference lines, which facilitates the expansion of reference lines and thus improves the flexibility of the current block prediction.
[0233] Method a2, reference line distance;
[0234] Optionally, the reference line distance can be the spatial relative distance of the reference line with respect to the current block and / or other reference reference lines. The reference line distance can indicate a specific reference line. For example, the reference line distance is the amount of offset between the reference line and the current block in the vertical (above) and / or horizontal (left) directions. For example, the reference line distance of reference line 1 is the amount of offset between reference line 1 and reference line 2 in the vertical (above) and / or horizontal (left) directions of its reference reference line 2.
[0235] Optionally, the distance between reference lines can be measured in pixels. For example, the reference line located in the first row directly above the current block has a distance of 1, and the reference line located in the second row directly above the current block has a distance of 2.
[0236] Optionally, the reference line distance includes the distances of various types of reference lines, such as: preset reference line distance, candidate reference line distance, fused reference line distance, and the distance of at least one reference line in the reference line set.
[0237] Optionally, the reference line distances of the above-mentioned reference lines include at least one of the following: the boundary distance between the reference line and the current block, the center distance between the reference line and the current block, and the distance between the reference line and other reference lines.
[0238] Optionally, at least one predicted pixel of the current block can be determined or obtained based on at least one reference line distance.
[0239] Optionally, at least one target reference line is determined or obtained based on the distance of at least one reference line, and at least one predicted pixel of the current block is determined or obtained based on the at least one target reference line.
[0240] Optionally, at least one target reference line is determined or obtained based on at least one reference line distance and / or at least one reference line index, and at least one predicted pixel of the current block is determined or obtained based on at least one target reference line.
[0241] Optionally, the reference line distance is determined or obtained based on the current block size.
[0242] Optionally, the block size of the current block includes at least one of the following: the width, height, area, and aspect ratio of the current block.
[0243] Optionally, the distance of at least one reference line for determining or obtaining at least one predicted pixel of the current block is determined or obtained based on the block size of the current block.
[0244] Optionally, since image signals typically exhibit spatial local correlation, the pixel values of regions within a certain distance from the current block generally have higher similarity to the current block. However, as the distance increases, the matching degree between the pixel content and the current block may decrease, the prediction gain may saturate, or even introduce noise. Therefore, in order to ensure prediction accuracy and / or reduce computational complexity and / or memory access overhead, the selection of the reference line distance is not infinite but is limited to a reasonable and finite range. Thus, in this embodiment, determining or obtaining the reference line distance based on the block size of the current block can ensure prediction accuracy and / or reduce computational complexity, and / or balance coding efficiency and computational complexity.
[0245] Optionally, the reference line distance determined or obtained based on the current block size can be a set of reference lines consisting of at least one reference line distance, in which the specific reference line can be indicated by the reference line distance in the set of reference lines.
[0246] Optionally, the reference line distance determined or obtained based on the block size of the current block can be an upper limit of the reference line distance for the reference line used to determine or obtain at least one predicted pixel of the current block. For example, if the block size of the current block is less than a preset size threshold, indicating that the block size of the current block is small, then the reference line distance is a first distance, that is, the reference line distance for the reference line used to determine or obtain at least one predicted pixel of the current block is less than or equal to the first distance, and / or, if the block size of the current block is greater than or equal to the size threshold, indicating that the block size of the current block is large, then the reference line distance is a second distance, that is, the reference line distance for the reference line used to determine or obtain at least one predicted pixel of the current block is less than or equal to the second distance, and the second distance is greater than the first distance.
[0247] Optionally, the size threshold can be 16, 32, 64, 128, 256, etc.
[0248] Optionally, the first distance can be 5, 7, 12, etc., and the second distance can be 13, 15, 17, etc., with the second distance being greater than the first distance.
[0249] Optionally, the spatial correlation of image signals (i.e., the similarity of neighboring pixel values) typically decreases with increasing distance. For example, for a 4x4 current block, its height and width are only 4 pixels, while pixels more than 12 rows (or columns) away from the current block have weaker direct correlations in texture and edge information with the current block. Therefore, providing reference lines at distances such as 15 or 17 for small current blocks is usually insufficient to provide valuable reference information and may reduce prediction accuracy and / or increase computational burden due to noise or irrelevant texture interference. For large current blocks (e.g., 64x64), which cover a larger area of the image, there may be smooth gradients spanning tens of pixels and large areas at this scale. For flat areas or long-distance straight / curved edges, it is not enough to rely solely on adjacent reference pixels to accurately predict such large current blocks. For example, when predicting a pixel inside a large block, if its prediction direction points to a distant area with similar brightness, then using pixels on reference lines at distances of 13, 15, or even 17 can provide more valuable long-distance information, thereby determining or generating more accurate prediction results. Therefore, the embodiments of this application determine or obtain the distance of the reference line based on the block size of the current block, which can avoid paying high computational costs for inefficient long-distance reference lines in the prediction of small current blocks, while fully exploring the correlation of large-scale space in the prediction of large current blocks, thus improving prediction accuracy.
[0250] In this embodiment, the reference line distance has a clear physical meaning and can directly reflect the spatial interval between the reference line it indicates and the current block and / or other reference lines, which is convenient for understanding and algorithm design.
[0251] Method a3, reference line position;
[0252] Optionally, the reference line position is coordinate information used to characterize the geometric positioning of the reference line in image space.
[0253] Optionally, the reference line position includes the positions of various types of reference lines, such as: preset reference line position, candidate reference line position, fused reference line position, and the position of at least one reference line in the reference line set.
[0254] Optionally, the reference line position of various reference lines may include at least one of the following: the preset pixel position of the reference line and the endpoint position of the reference line.
[0255] Optionally, the preset pixel position of the reference line is the image coordinate of the reference pixel used to identify the spatial coordinates of the reference line. The preset pixel can be at least one representative position on the reference line, such as the starting point, center point, or corresponding point aligned with at least one boundary of the current block.
[0256] Optionally, the endpoints of the reference line are the coordinates of the start and / or end positions of the reference line in space.
[0257] Optionally, the endpoint positions of the reference line can be determined or obtained based on the angular range of the prediction mode and the distance to the reference line.
[0258] Optionally, at least one predicted pixel of the current block can be determined or obtained based on the position of at least one reference line.
[0259] Optionally, at least one target reference line is determined or obtained based on the position of at least one reference line, and at least one predicted pixel of the current block is determined or obtained based on the at least one target reference line.
[0260] Optionally, at least one target reference line is determined or obtained based on at least one of the following: at least one reference line position, at least one reference line distance, and at least one reference line index; and at least one predicted pixel of the current block is determined or obtained based on the at least one target reference line.
[0261] Optionally, the position of the reference line is determined or obtained based on the block size of the current block.
[0262] Optionally, the block size of the current block includes at least one of the following: the width, height, area, and aspect ratio of the current block.
[0263] Optionally, the position of at least one reference line for determining or obtaining at least one predicted pixel of the current block is determined or obtained based on the block size of the current block.
[0264] Optionally, the reference line position determined or obtained based on the current block size can be a set of reference lines consisting of at least one reference line position, in which the specific reference line can be indicated by the reference line position.
[0265] In this embodiment, the position of the reference line has a clear physical meaning and can directly reflect the spatial relationship between the reference line it indicates and the current block and / or other reference lines, which is convenient for understanding and algorithm design.
[0266] Method a4, referencing pixel information;
[0267] Optionally, the reference pixel information includes at least one of the pixel value and the reference pixel position.
[0268] Optionally, the reference pixel is a specific pixel that constitutes the reference line, and the reference pixel may include at least one pixel that constitutes the reference line.
[0269] Optionally, the reference pixel includes pixels of various reference lines, such as: preset reference pixels, candidate reference pixels, fused reference pixels, and at least one reference pixel in the reference line set.
[0270] Optionally, the reference pixel position is a parameter used to identify the spatial position of a pixel on the reference line in the image coordinate space.
[0271] Optionally, at least one predicted pixel of the current block can be determined or obtained based on at least one reference pixel information.
[0272] Optionally, at least one target reference line is determined or obtained based on at least one of the following: at least one reference pixel information, at least one reference line position, at least one reference line distance, and at least one reference line index; and at least one predicted pixel of the current block is determined or obtained based on the at least one target reference line.
[0273] In this embodiment, the reference pixel information can cover pixels in reference lines of various distances, directions and types, providing rich reference options for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0274] Method a5, reference line;
[0275] Optionally, a reference line refers to a horizontal row of pixels consisting of at least one reference pixel, typically located several pixels above the current block, used as a directional reference for intra-frame prediction.
[0276] Optionally, at least one predicted pixel of the current block can be determined or obtained based on at least one reference row.
[0277] Optionally, at least one target reference line is determined or obtained based on at least one of at least one reference row, at least one reference pixel information, at least one reference line position, at least one reference line distance, and at least one reference line index, and at least one predicted pixel of the current block is determined or obtained based on the at least one target reference line.
[0278] In this embodiment, the reference row helps to improve the prediction accuracy of the current block in the vertical or diagonal direction, and / or the reference row can provide rich reference options for the prediction of the current block, improve the flexibility of the prediction of the current block, and thus improve the accuracy of the prediction of the pixels of the current block.
[0279] Method a6, reference column;
[0280] Optionally, a reference column refers to a vertical row of pixels consisting of at least one reference pixel, typically located several pixels to the left of the current block, used as a directional reference for intra-frame prediction.
[0281] Optionally, at least one predicted pixel of the current block can be determined or obtained based on at least one reference column.
[0282] Optionally, at least one target reference line is determined or obtained based on at least one of at least one reference column, at least one reference row, at least one reference pixel information, at least one reference line position, at least one reference line distance, and at least one reference line index, and at least one predicted pixel of the current block is determined or obtained based on the at least one target reference line.
[0283] In this embodiment, the reference column helps to improve the prediction accuracy of the current block in the horizontal or diagonal direction, and / or the reference column can provide rich reference options for the prediction of the current block, improve the flexibility of the prediction of the current block, and thus improve the accuracy of the prediction of the pixels of the current block.
[0284] Method a7, reference line weight;
[0285] Optionally, at least one fusion reference line can be determined or obtained through at least one reference line and its corresponding reference line weight, whereby the reference line weight represents the relative importance of the reference line in the process of determining or obtaining the fusion reference line.
[0286] Optionally, the reference line weights include the weights corresponding to each reference line. For example, the reference line weights include at least one of the following: preset reference line weights, candidate reference line weights, sub-pixel reference line weights, and the weight of at least one reference line in the reference line set.
[0287] Optionally, at least one prediction pattern for the current block can be determined or obtained based on at least one reference line weight.
[0288] Optionally, at least one fusion reference line for the current block is determined or obtained based on at least one reference line weight, and at least one prediction mode for the current block is determined or obtained based on at least one fusion reference line.
[0289] Optionally, at least one target reference line is determined or obtained based on at least one of the following: at least one reference line weight, at least one reference column, at least one reference row, at least one reference pixel information, at least one reference line position, at least one reference line distance, and at least one reference line index; and at least one predicted pixel of the current block is determined or obtained based on the at least one target reference line.
[0290] Optionally, the reference line weight can be a weight coefficient, and / or the reference line weight can be a weight vector, weight matrix, etc. containing the weight coefficient, representing indicative information used to measure the proportion of different elements in the outcome and / or decision.
[0291] Optionally, the reference line weights may include at least one of the following: a weight coefficient, a weight vector, and a weight matrix. For example, the weight coefficient is 0.5, the weight vector is [0.2, 0.8], and the weight matrix is [0.2, 0.8; 0.1, 0.9; 0.3, 0.7].
[0292] Optionally, the weighting coefficient can be a scalar value that represents the weight of a single reference line. For example, if the reference lines include L1 and L2, and the reference line weighting coefficient of L1 is W1 and the reference line weighting coefficient of L2 is W2, then the fusion reference line L0 determined or obtained through L1 and L2 can be expressed as: L0 = W1 × L1 + W2 × L2.
[0293] Optionally, the weighting coefficients can be fixed values set based on experience, such as W1 = 0.3, W2 = 0.7, and / or the weighting coefficients can be values determined or calculated based on the historical usage count of the reference line. For example, if the historical usage count of reference line L1 is C1 and the historical usage count of reference line L2 is C2, then the weight of reference line L1 is C1 / (C1+C2) and the weight of reference line L2 is C2 / (C1+C2).
[0294] Optionally, the weight vector can be a one-dimensional array containing at least one weight coefficient, each coefficient corresponding to a reference line. For example, it may include three reference lines L1, L2, and L3 to be fused, with a corresponding weight vector w = [W1, W2, W3]. The fusion reference line L0 can be represented as:
[0295] L0 = W1×L1 + W2×L2 + W3×L3.
[0296] Optionally, the weight matrix can be a two-dimensional array, where each element represents the weight coefficient of a reference pixel at a specific location on the reference line. For example, element X in the weight matrix... ij This represents the pixel in the j-th column of the reference line in the i-th row of the current block.
[0297] Optionally, the reference line weight can be determined or obtained based on at least one of the following: the distance of the reference line, the block size of the current block, the matching information of the current block, and the matching cost of the reference template of the current block.
[0298] Optionally, the smaller the distance between the reference lines, the smaller the offset between the reference line and the current block, and the stronger the spatial proximity between the reference line and the current block. Generally, they have higher local correlation. Therefore, reference lines with smaller distances can be given higher weights. In the current block structure with periodic textures and / or long-distance repetition, reference lines at specific distances (e.g., reference line distance = 7, 9, 11, 13, etc.) may be more representative, and their weights can be increased accordingly.
[0299] Optionally, the reference line weight can be determined or obtained based on the distance to the reference line and the block size of the current block.
[0300] Optionally, for small image patches (e.g., the current patch whose size is smaller than a preset size threshold), their spatial correlation is mainly concentrated in the neighboring region. Therefore, reference lines with smaller distances can be assigned higher reference line weights. For large image patches (e.g., the current patch whose size is greater than or equal to a preset size threshold), their internal texture may exhibit gradient or layered characteristics. Relying solely on the nearest reference line may lead to edge mismatch. Therefore, reference lines with moderate (e.g., within a preset distance range) or larger distances can better characterize the overall trend. Thus, their reference line weights can be increased to enhance the prediction effect for larger image patches.
[0301] Optionally, the block size of the current block includes at least one of the following: the width, height, area, and aspect ratio of the current block, and the size threshold can be 16, 32, 64, 128, 256, etc.
[0302] Optionally, the preset distance range can be [5,11], [3,9], [7,13], etc. Optionally, the reference line weight of the reference line within the preset distance range is greater than the reference line weight of the reference line outside the preset distance range.
[0303] Optionally, the matching information of the current block refers to the similarity and / or error between the prediction result (e.g., predicted pixels and / or predicted blocks) of the current block determined or obtained through the reference line and prediction mode and the current block, such as the rate-distortion cost of the prediction result, prediction error, texture similarity, etc.
[0304] Optionally, the matching information for the current block is related to the reference line and its corresponding prediction mode.
[0305] Optionally, the rate-distortion cost of the current block is related to the reference line and its corresponding prediction mode.
[0306] Optionally, the higher the degree of matching between the reference line determined or obtained based on the matching information of the current block and the current block, the greater the weight of the reference line; and / or, the lower the degree of matching between the reference line determined or obtained based on the matching information of the current block and the current block, the smaller the weight of the reference line.
[0307] Optionally, the prediction result of the current block is determined or obtained based on at least one reference line (e.g., reference line, candidate reference line, fusion reference line, sub-pixel reference line, etc.) and the prediction mode associated with at least one reference line. Based on the prediction result of the current block, the matching information of the current block is determined or obtained. The matching information of the current block can measure the degree of matching between the reference line and / or the prediction mode associated with the reference line and the current block.
[0308] Optionally, the matching information for the current block includes: SAD (Sum of Absolute Differences), SATD (Sum of Absolute Transformed Differences), and / or MRSAD (Mean-Removed Sum of Absolute Differences).
[0309] Alternatively, SAD is a simple and straightforward method for measuring the difference between two pixel blocks. It assesses similarity and / or error by calculating the sum of the absolute differences between corresponding pixels in the predicted block and the reference block (or the original block).
[0310] Alternatively, SATD is a more complex matching metric that evaluates similarity and / or error by first transforming the predicted and reference blocks (such as the Hadamard transform) and then calculating the sum of the absolute differences of the transformed coefficients. SATD is primarily used to consider the texture and frequency characteristics of an image.
[0311] Optionally, the smaller the SAD and / or SATD values, the higher the degree of matching between the reference line and the prediction pattern associated with the reference line and the current block, the higher the similarity and / or the smaller the error between the prediction result of the current block determined or obtained through the reference line and the current block, and / or the larger the SAD and / or SATD values, the lower the degree of matching between the reference line and the prediction pattern associated with the reference line and the current block, the lower the similarity and / or the larger the error between the prediction result of the current block determined or obtained through the reference line and the current block.
[0312] Optionally, the reference template matching cost of the current block refers to the similarity and / or error between the prediction result (e.g., predicted pixels and / or predicted blocks) of the current block determined or obtained through the reference line and the reference template of the current block. For example, the reference template matching cost of the current block includes: SAD, SATD and / or MRSAD.
[0313] Optionally, the reference template matching cost of the current block is related to the reference line and its corresponding prediction pattern.
[0314] Optionally, the higher the degree of matching between the reference line determined or obtained based on the reference template matching cost of the current block and the reference template, the greater the weight of the reference line; and / or, the lower the degree of matching between the reference line determined or obtained based on the reference template matching cost of the current block and the reference template, the smaller the weight of the reference line.
[0315] In this embodiment, at least one reference line can be weighted and fused through reference line weights to determine or obtain at least one fused reference line. While retaining the rich spatial information provided by at least one reference line, the weight allocation highlights the reference line that contributes more and suppresses the influence of noise or irrelevant reference lines, thereby constructing a fused reference line that is closer to the true structure of the current block, and thus improving the accuracy of pixel prediction.
[0316] Method a8, preset reference line information;
[0317] Optionally, at least one predicted pixel of the current block can be determined or obtained based on at least one preset reference line information.
[0318] Optionally, the preset reference line information includes at least one of the following: preset reference line distance, preset reference line position, preset reference pixel, preset reference line weight, and preset reference line index.
[0319] Optionally, at least one preset reference line can be determined or obtained through preset reference line information, and at least one predicted pixel of the current block can be determined or obtained based on the at least one preset reference line.
[0320] Optionally, at least one target reference line is determined or obtained based on at least one of the following: at least one preset reference line information, at least one reference line weight, at least one reference column, at least one reference row, at least one reference pixel information, at least one reference line position, at least one reference line distance, and at least one reference line index; and at least one predicted pixel of the current block is determined or obtained based on the at least one target reference line.
[0321] Optionally, the preset reference line is a pre-defined reference line used to determine or obtain at least one reference pixel of the current block.
[0322] Optionally, the preset reference line can be determined or obtained based on the reference line set. For example, the preset reference line is a reference line in the reference line set, and / or the preset reference line can be a reference line outside the reference line set, that is, a reference line that is set in advance outside the reference line set is used as the preset reference line.
[0323] Optionally, the preset reference line distance is the spatial relative distance of the preset reference line to the current block. For example, it is the offset of the preset reference line from the current block in the vertical (above) and / or horizontal (left) directions. Optionally, the preset reference line distance can be measured in pixels. For example, the preset reference line in the first row directly above the current block has a preset reference line distance of 1, and the second row has a distance of 2.
[0324] Optionally, the preset reference line position is coordinate information used to characterize the geometric positioning of the preset reference line in the image space. Optionally, the preset reference line position includes at least one of the preset pixel position of the preset reference line and the endpoint position of the preset reference line.
[0325] Optionally, the preset pixel position of the preset reference line is the image coordinate of the reference pixel used to identify the spatial coordinates of the preset reference line. The preset pixel can be at least one representative position on the preset reference line, such as the starting point, center point, or corresponding point aligned with at least one boundary of the current block.
[0326] Optionally, the endpoint positions of the preset reference line are the coordinates of the start and / or end positions of the preset reference line in space. Optionally, the endpoint positions of the preset reference line can be determined or obtained based on the angle range of the prediction mode and the distance of the preset reference line.
[0327] Optionally, the preset reference pixel is a specific pixel that constitutes the preset reference line, and the preset reference pixel may include at least one pixel that constitutes the preset reference line.
[0328] Optionally, the preset reference line weight is used to characterize the relative importance of the preset reference line in the fusion process. At least one fusion reference line can be determined or obtained through at least one preset reference line and its corresponding preset reference line weight, and the preset reference line weight characterizes the relative importance of the preset reference line in the process of determining or obtaining the fusion reference line.
[0329] Optionally, the preset reference line weight can be a weight coefficient, and / or a weight vector, weight matrix, etc. containing the weight coefficient, representing indication information used to measure the proportion of different elements in the outcome and / or decision.
[0330] Optionally, the preset reference line weights may include at least one of the following: a weight coefficient, a weight vector, and a weight matrix. For example, the weight coefficient is 0.5, the weight vector is [0.2, 0.8], and the weight matrix is [0.2, 0.8; 0.1, 0.9; 0.3, 0.7].
[0331] Optionally, the preset reference line weight can be determined or obtained based on at least one of the following: the distance of the preset reference line, the block size of the current block, the matching information of the current block, and the matching cost of the reference template of the current block.
[0332] Optionally, the preset reference line index refers to an integer number and / or identifier used to uniquely identify a preset reference line.
[0333] Optionally, in multi-reference line prediction, a set of preset reference lines can be pre-set. Each preset reference line is assigned a unique index value (such as 0, 1, 2, 3). After determining the target reference line, the encoder uses the index value of the target reference line as one of the prediction parameters, entropy-encoded, and writes it into the encoded bit stream. After parsing the index, the decoder locates the corresponding reference pixel according to the predefined mapping rules (such as index 1 corresponding to the second row above) and extracts the corresponding reference pixel to reconstruct the prediction process.
[0334] In this embodiment, the preset reference line can cover reference lines of various distances, directions and types, providing a rich selection of reference lines for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0335] Method a9, pixel reference line information;
[0336] Optionally, at least one predicted pixel of the current block can be determined or obtained based on at least one pixel reference line information.
[0337] Optionally, the subpixel reference line information includes at least one of the following: subpixel reference line distance, subpixel reference line position, fractional precision reference pixel, subpixel reference line weight, and subpixel reference line index.
[0338] Optionally, at least one pixel reference line can be determined or obtained through the pixel reference line information, and at least one predicted pixel of the current block can be determined or obtained based on the at least one pixel reference line.
[0339] Optionally, at least one predicted pixel of the current block is determined or obtained based on at least one preset reference line determined or obtained through at least one preset reference line information, and / or at least one sub-pixel reference line determined or obtained through at least one sub-pixel reference line information.
[0340] Optionally, at least one target reference line is determined or obtained based on at least one of the following: at least one preset reference line information, at least one reference line weight, at least one reference column, at least one reference row, at least one reference pixel information, at least one reference line position, at least one reference line distance, and at least one reference line index; and at least one predicted pixel of the current block is determined or obtained based on the at least one target reference line.
[0341] Alternatively, a subpixel reference line refers to a reference line located at a non-integer pixel position (e.g., a half-pixel position, a quarter-pixel position, etc.).
[0342] Optionally, pixel-level reference lines can be determined or obtained by performing reference line interpolation on preset reference lines, candidate reference lines, and / or reference lines in the reference line set.
[0343] Optionally, the pixel reference lines determined or obtained by performing reference line interpolation processing on the reference lines in the preset reference lines, candidate reference lines, and / or reference line set include: pixel reference lines of +1 / 2 pixels and / or pixel reference lines of -1 / 2 pixels of the reference lines in the preset reference lines, candidate reference lines, and / or reference line set.
[0344] Optionally, a +1 / 2 pixel subpixel reference line refers to a reference line located at a position 1 / 2 pixels positively offset from a certain integer pixel reference line in a specific direction (e.g., away from the current block, with the current block's upward and leftward directions as positive directions), and a -1 / 2 pixel subpixel reference line refers to a reference line located at a position 1 / 2 pixels negatively offset from a certain integer pixel reference line in a specific direction (e.g., closer to the current block, with the current block's downward and rightward directions as negative directions).
[0345] Optionally, reference line interpolation processing is performed based on at least one preset reference line determined or obtained through at least one preset reference line information, at least one candidate reference line determined or obtained through at least one candidate reference line information, and / or reference lines in the reference line set to determine or obtain at least one pixel reference line, and at least one predicted pixel of the current block is determined or obtained based on the at least one pixel reference line.
[0346] Optionally, if there are reference lines A0, A1, A2, A3, ..., An, and interpolation is required between A0 and A1, the reference line interpolation can be calculated using the following formula (I): A01 = 0.5 × A0 + 0.5 × A1 Formula (I);
[0347] A01 is a pixel reference line determined or obtained by interpolating reference lines A0 and A1. The pixel reference line A01 is located 1 / 2 pixel above reference line A0 and 1 / 2 pixel below reference line A1.
[0348] Optionally, the pixel reference line can be determined or obtained by the weighting coefficients used in the pixel interpolation during the inter-frame prediction process.
[0349] Optionally, if interpolation is required between the above reference lines A3 and A4, the reference line interpolation can be calculated using the following formulas (II) and / or (III): A34 = round[(A1 - 5*A2 + 20*A3 + 20*A4 - 5*A5 + A6 + 16) / 32] Formula (II); A34 = round[(-A0 + 4*A1 - 11*A2 + 40*A3 + 40*A4 - 11*A5 + 4*A6 - A7) / 32] Formula (III);
[0350] A34 is a reference pixel in the sub-pixel reference line determined or obtained by interpolating reference lines A3 and A4. In the process of determining the sub-pixel reference line including reference pixel A34, the sub-pixel reference line is determined or obtained by using information related to reference lines A1 to A6 and / or A0 to A7 through formula (II) and / or formula (III), thereby providing more accurate prediction information and improving the pixel prediction accuracy of the current block.
[0351] Optionally, based on at least one candidate mode in the prediction mode list related to the current block and at least one candidate reference line in the reference line set, the matching information of the current block related to the combination of at least one prediction mode and reference line is determined or obtained. Based on the matching information of the current block, the target combination of at least one prediction mode and reference line is determined or obtained. Based on the reference line in the target combination of at least one prediction mode and reference line, the at least one sub-pixel reference line corresponding to the reference line in the target combination of at least one prediction mode and reference line is determined or obtained. Based on the at least one sub-pixel reference line and the target combination of at least one prediction mode and reference line, the at least one target reference line and at least one target prediction mode are determined or obtained. Based on the at least one target reference line and the at least one target prediction mode, the at least one predicted pixel of the current block is determined or obtained.
[0352] Optionally, at least one candidate mode in the prediction mode list and at least one candidate reference line in the reference line set related to the current block are combined to obtain a prediction mode and reference line combination consisting of a candidate reference line and a candidate mode. The prediction result of the current block is determined or obtained through the candidate mode and candidate reference line in the prediction mode and reference line combination. Based on the prediction result, the matching information of the current block related to the prediction mode and reference line combination is determined or obtained. For example, the prediction result rate distortion cost, SAD, SATD and / or MRSAD are calculated as the matching information of the current block. The ranking result of the prediction mode and reference line combination is determined or obtained through the matching information of the current block. Based on the ranking result, at least one prediction mode and reference line target combination is determined or obtained from the prediction mode and reference line combination.
[0353] Optionally, the matching information of the current block related to at least one prediction mode and reference line combination is sorted according to a preset sorting rule to determine or obtain the sorting result.
[0354] Optionally, the preset sorting rule can be to sort the values corresponding to the matching information of the current block from smallest to largest, so that the prediction pattern and reference line combination with a higher degree of matching with the current block will be ranked higher.
[0355] Optionally, the matching information of the current block related to the combination of prediction mode and reference line refers to the similarity and / or error between the prediction result of the current block and the current block determined or obtained through the reference line and prediction mode in the combination of prediction mode and reference line, such as the rate distortion cost, SAD, SATD and / or MRSAD of the prediction result.
[0356] Optionally, in conventional MRL mode, at least one predicted pixel of the current block is usually determined or obtained directly based on the combination of mode and reference line target. However, in the embodiments of this application, reference line interpolation processing can be performed on the reference lines in the combination of mode and reference line target to determine or obtain at least one sub-pixel reference line corresponding to the reference line in the combination of mode and reference line target. That is, based on the reference lines in the pre-selected combination of mode and reference line target with a high degree of matching, a new sub-pixel reference line is added. For example, if the reference line in the combination of mode and reference line target is reference line A1 and the predicted mode is B1, then the sub-pixel reference lines A0.5 and A1.5 of reference line A1 can be determined or obtained, thereby obtaining 3 predicted modes and reference lines. Line combinations: B1-A1, B1-A0.5, and B1-A1.5. The matching information of the current block related to the two combinations B1-A0.5 and B1-A1.5 is determined or obtained. If, based on the matching information of the current block, the matching degree of the B1-A0.5 combination is determined to be higher than that of B1-A1 and B1-A1.5, then the original B1-A1 combination is replaced by the B1-A0.5 combination. That is, B1 is used as the target prediction mode, and A0.5 is used as the target reference line. At least one predicted pixel of the current block is determined or obtained through the B1-A1 combination. The prediction accuracy for the current block can be improved by using pixel-level reference lines, and / or the computational overhead of interpolating all reference lines is avoided, and / or computational costs are saved.
[0357] Optionally, pixel reference line A0.5 and pixel reference line A1.5 refer to reference lines that are offset from reference line A1 by ±1 / 2 pixels.
[0358] Optionally, based on the intra-frame template matching information of the current block, at least one prediction mode and reference line combination is determined or obtained. Based on the reference line in the at least one prediction mode and reference line combination, at least one sub-pixel reference line corresponding to the reference line in the at least one prediction mode and reference line combination is determined or obtained. Based on the at least one sub-pixel reference line and the reference template of the current block, the reference template matching cost of the current block related to the at least one sub-pixel reference line is determined or obtained. The intra-frame template matching information of the current block is updated based on the reference template matching cost of the current block related to the at least one sub-pixel reference line. For example, if the reference template matching cost of the current block related to the sub-pixel reference line is less than the reference template matching cost of the current block related to the prediction mode and reference line combination in the intra-frame template matching information of the current block, then the reference line in the prediction mode and reference line combination is replaced by the sub-pixel reference line to obtain the updated intra-frame template matching information of the current block. Based on the updated intra-frame template matching information of the current block, at least one predicted pixel of the current block is determined or obtained.
[0359] Optionally, the intra-frame template matching information of the current block includes: at least one prediction mode and reference line combination whose reference template matching cost determined or obtained through the reference template of the current block satisfies the preset matching cost condition, and / or the reference template matching cost of the current block related to at least one prediction mode and reference line combination. The intra-frame template matching information of the current block is used to guide the subsequent rate-distortion optimization process, narrow the candidate range, and improve coding efficiency.
[0360] Optionally, the reference template matching cost of the current block refers to the similarity and / or error between the prediction result (e.g., predicted pixels and / or predicted blocks) of the current block determined or obtained through the reference line and the reference template of the current block. For example, the reference template matching cost of the current block includes: SAD, SATD and / or MRSAD.
[0361] Optionally, if the reference template matching cost of the current block related to the prediction mode and the reference line combination meets the preset matching cost condition, it indicates that the prediction result of the current block determined or obtained by the prediction mode and the reference line combination has a small error, and / or, if the reference template matching cost of the current block related to the prediction mode and the reference line combination does not meet the preset matching cost condition, it indicates that the prediction result of the current block determined or obtained by the prediction mode and the reference line combination has a large error.
[0362] Optionally, the prediction mode and reference line combination can be sorted according to the value of the reference template matching cost based on the preset sorting rules, and the sorting result can be determined or obtained. Optionally, the preset sorting rules can be to sort the values of the reference template matching cost from small to large, so that the prediction mode and reference line combination with the smaller value of the reference template matching cost (i.e., the higher the degree of matching) ranks higher.
[0363] Optionally, the preset matching cost conditions include: the ranking result of the reference template matching cost is in the top preset position, such as the top 20, top 15, etc.
[0364] Optionally, based on the updated intra-template matching information of the current block, the rate-distortion cost of the prediction mode and reference line combination in the updated intra-template matching information of the current block is determined or obtained; based on the rate-distortion cost, the target combination of the mode and reference line is determined or obtained; and based on the target combination of the mode and reference line, at least one predicted pixel of the current block is determined or obtained.
[0365] Optionally, in conventional TMRL mode, the target combination of mode and reference line is usually determined or obtained directly based on the rate-distortion cost of at least one prediction mode and reference line combination in the intra-frame template matching information of the current block, and used to determine or obtain at least one predicted pixel of the current block. However, in the embodiments of this application, at least one sub-pixel reference line corresponding to the reference line of at least one prediction mode and reference line combination in the intra-frame template matching information of the current block is determined or obtained. For example, if the reference line in the prediction mode and reference line combination is reference line A1 and the prediction mode is B1, then the sub-pixel reference lines A0.5 and A1.5 of reference line A1 can be determined or obtained, thereby obtaining three sub-pixel reference lines. Prediction mode and reference line combination: B1-A1, B1-A0.5, and B1-A1.5. Determine or obtain the reference template matching cost of the current block related to the two combinations B1-A0.5 and B1-A1.5. If the reference template matching cost of the B1-A0.5 combination is less than the reference template matching cost of the B1-A1 combination and B1-A1.5, then replace the original B1-A1 combination with the B1-A0.5 combination to determine or obtain the updated intra-frame template matching information of the current block. The prediction accuracy for the current block can be improved by using pixel-level reference lines, and / or the computational overhead of interpolating all reference lines can be avoided and / or computational costs can be saved.
[0366] Alternatively, the pixel reference line distance can be the spatial relative distance of the pixel reference line to the current block, such as the offset of the pixel reference line from the current block in the vertical (above) and / or horizontal (left) directions.
[0367] Optionally, the distance between subpixel reference lines can be the offset of a subpixel reference line relative to its corresponding reference reference line. For example, when the integer pixel reference line A1 is used as the reference reference line, the offset of subpixel reference line A0.5 located 1 / 2 pixels above it is +1 / 2, and the offset of subpixel reference line A1.5 located 1 / 2 pixels below it is -1 / 2.
[0368] Optionally, the reference reference line is the basis for determining or generating the subpixel reference line, and can be the neighboring subpixel rows or columns on which the interpolation process depends.
[0369] Optionally, the subpixel reference line position is coordinate information used to characterize the geometric positioning of the subpixel reference line in the image space. Optionally, the subpixel reference line position includes at least one of the preset pixel position of the subpixel reference line and the endpoint position of the subpixel reference line.
[0370] Optionally, the preset pixel position of the sub-pixel reference line is the image coordinate of the reference pixel point used to identify the spatial coordinates of the sub-pixel reference line. The preset pixel point can be at least one representative position on the sub-pixel reference line, such as the starting point, center point, or corresponding point aligned with at least one boundary of the current block.
[0371] Optionally, the endpoint positions of the subpixel reference lines are the coordinates of the start and / or end positions of the subpixel reference lines in space. Optionally, the endpoint positions of the subpixel reference lines can be determined or obtained based on the angular range of the prediction mode and the distance of the subpixel reference lines.
[0372] Optionally, the fractional precision reference pixel is a specific pixel that constitutes the fractional pixel reference line, and the fractional precision reference pixel may include at least one pixel that constitutes the fractional pixel reference line.
[0373] Optionally, at least one fusion reference line can be determined or obtained through at least one sub-pixel reference line and its corresponding sub-pixel reference line weight, whereby the sub-pixel reference line weight characterizes the relative importance of the sub-pixel reference line in the process of determining or obtaining the fusion reference line.
[0374] Optionally, the pixel reference line weights can be weight coefficients, and / or weight vectors, weight matrices, etc. containing weight coefficients, representing indicative information used to measure the proportion of different elements in the outcome and / or decision.
[0375] Optionally, the pixel reference line weights may include at least one of a weight coefficient, a weight vector, and a weight matrix. For example, the weight coefficient is 0.5, the weight vector is [0.2, 0.8], and the weight matrix is [0.2, 0.8; 0.1, 0.9; 0.3, 0.7].
[0376] Optionally, the subpixel reference line weight can be determined or obtained based on at least one of the following: the distance of the subpixel reference line, the block size of the current block, the matching information of the current block, and the reference template matching cost of the current block.
[0377] Optionally, a subpixel reference line index refers to a number and / or identifier used to uniquely identify a subpixel reference line.
[0378] In this embodiment, the reference lines used in conventional MRL and / or TMRL modes are often of integer pixel precision. However, the optimal reference position for the current block may not be on an integer line. For example, the optimal reference position for the current block may be at positions such as y-1.25 or y-2.75. In this embodiment, by using sub-pixel reference lines, the reference line can be closer to the optimal solution, thereby providing accurate prediction information for the prediction of the current block and improving the pixel prediction accuracy of the current block.
[0379] Method a10, candidate reference line information;
[0380] Optionally, at least one predicted pixel of the current block can be determined or obtained based on at least one candidate reference line information.
[0381] Optionally, the candidate reference line information includes at least one of the following: candidate reference line distance, candidate reference line position, candidate reference pixel, candidate reference line weight, and candidate reference line index.
[0382] Optionally, at least one candidate reference line can be determined or obtained through the candidate reference line information, and at least one predicted pixel of the current block can be determined or obtained based on the at least one candidate reference line.
[0383] Optionally, at least one target reference line is determined or obtained based on at least one of the following: at least one candidate reference line information, at least one preset reference line information, at least one preset reference line information, at least one reference line weight, at least one reference column, at least one reference row, at least one reference pixel information, at least one reference line position, at least one reference line distance, and at least one reference line index; and at least one predicted pixel of the current block is determined or obtained based on the at least one target reference line.
[0384] Optionally, candidate reference lines are used for evaluation and / or comparison, and may serve as reference lines for the final prediction reference source.
[0385] Optionally, candidate reference lines are used to construct a set of candidate reference lines, and the methods for determining or obtaining candidate reference lines include at least one of the following:
[0386] Determined or obtained from at least one set of reference lines based on the current block size;
[0387] Determined or obtained based on the reference lines corresponding to the encoded and / or decoded blocks;
[0388] Determined or obtained based on a pre-set set of reference lines.
[0389] Optionally, the candidate reference line set is not a pre-set reference line set, but is dynamically generated based on the determination of the candidate reference lines. Therefore, for different current blocks, the candidate reference lines are different, and the candidate reference line set is also different.
[0390] Optionally, candidate reference lines can be dynamically selected and / or generated reference lines, i.e., dynamically determined or generated according to the actual situation, thereby improving the flexibility of reference line selection during the current block prediction process and improving the accuracy of pixel prediction.
[0391] Optionally, the candidate reference line distance is the spatial relative distance of the candidate reference line to the current block. For example, it is the offset of the candidate reference line from the current block in the vertical (above) and / or horizontal (left) directions. Optionally, the candidate reference line distance can be measured in pixels.
[0392] Optionally, the candidate reference line position is coordinate information used to characterize the geometric positioning of the candidate reference line in the image space. Optionally, the candidate reference line position includes at least one of the preset pixel position of the candidate reference line and the endpoint position of the candidate reference line.
[0393] Optionally, the preset pixel position of the candidate reference line is the image coordinate of the reference pixel used to identify the spatial coordinates of the candidate reference line. The preset pixel can be at least one representative position on the candidate reference line, such as the starting point, center point, or corresponding point aligned with at least one boundary of the current block.
[0394] Optionally, the endpoint positions of the candidate reference lines are the coordinates of the starting and / or ending positions of the candidate reference lines in space. Optionally, the endpoint positions of the candidate reference lines can be determined or obtained based on the angular range of the prediction mode and the distance to the candidate reference lines.
[0395] Optionally, the candidate reference pixel is a specific pixel that constitutes the candidate reference line, and the candidate reference pixel may include at least one pixel that constitutes the candidate reference line.
[0396] Optionally, the candidate reference line weight is used to characterize the relative importance of the candidate reference line in the fusion process. At least one fusion reference line can be determined or obtained through at least one candidate reference line and its corresponding candidate reference line weight, and the candidate reference line weight characterizes the relative importance of the candidate reference line in the process of determining or obtaining the fusion reference line.
[0397] Optionally, the candidate reference line weights can be weight coefficients, and / or weight vectors, weight matrices, etc. containing weight coefficients, representing indicative information used to measure the proportion of different elements in the outcome and / or decision.
[0398] Optionally, the candidate reference line weights may include at least one of the following: a weight coefficient, a weight vector, and a weight matrix. For example, the weight coefficient is 0.5, the weight vector is [0.2, 0.8], and the weight matrix is [0.2, 0.8; 0.1, 0.9; 0.3, 0.7].
[0399] Optionally, the candidate reference line index refers to an integer number and / or identifier used to uniquely identify a candidate reference line.
[0400] Optionally, in multi-reference line prediction, a set of candidate reference lines can be pre-set. Each candidate reference line is assigned a unique index value (such as 0, 1, 2, 3). After the encoder determines the target reference line, it uses the index value of the target reference line as one of the prediction parameters, entropy-encoded it, and writes it into the encoded bit stream. After parsing the index, the decoder locates the corresponding reference pixel according to the predefined mapping rules (such as index 1 corresponding to the second row above) and extracts the corresponding reference pixel to reconstruct the prediction process.
[0401] In this embodiment, candidate reference lines can cover reference lines of various distances, directions and types, providing a rich selection of reference lines for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0402] Method a11, integrating reference line information;
[0403] Optionally, at least one predicted pixel of the current block can be determined or obtained based on at least one fusion reference line information.
[0404] Optionally, the fusion reference line information includes at least one of the following: fusion reference pixel, fusion reference line index, and original reference line information used to determine or obtain the fusion reference line. The original reference line information may include at least one of the following: original reference line distance, original reference line position, original reference pixel, original reference line weight, and original reference line index.
[0405] Optionally, the original reference line refers to each reference line participating in the fusion. Optionally, the original reference line includes at least one of the following: preset reference line, candidate reference line, sub-pixel reference line, and reference line in the reference line set.
[0406] Optionally, at least one fusion reference line is determined or obtained based on the original reference line and its corresponding reference line weights, and at least one predicted pixel of the current block is determined or obtained based on the at least one fusion reference line.
[0407] Optionally, at least one fusion reference line can be determined or obtained through the fusion reference line information, and at least one predicted pixel of the current block can be determined or obtained based on the at least one fusion reference line.
[0408] Optionally, a fusion reference line refers to a new composite reference line determined or generated by weighting, linearly transforming, or nonlinearly fusing the pixel values of two or more reference lines. The fusion reference line not only utilizes information from multiple rows and / or columns, but also enhances the ability to express complex spatial correlations through the fusion mechanism. For example, in gradient or blurred regions, fusing the pixels of the upper A0 and A1 rows can determine or generate a more representative reference line, thereby improving prediction stability and accuracy.
[0409] Optionally, at least one target reference line is determined or obtained based on at least one of the following: at least one fusion reference line information, at least one candidate reference line information, at least one preset reference line information, at least one preset reference line information, at least one reference line weight, at least one reference column, at least one reference row, at least one reference pixel information, at least one reference line position, at least one reference line distance, and at least one reference line index. Based on the at least one target reference line, at least one predicted pixel of the current block is determined or obtained.
[0410] Optionally, the fusion reference pixel is a specific pixel that constitutes the fusion reference line, and the fusion reference pixel may include at least one pixel that constitutes the fusion reference line.
[0411] Optionally, the original reference line weight is used to characterize the relative importance of the original reference line in the process of determining or obtaining the fused reference line. At least one fused reference line can be determined or obtained through at least one original reference line and its corresponding original reference line weight, and the original reference line weight characterizes the relative importance of the original reference line in the process of determining or obtaining the fused reference line.
[0412] Optionally, the original reference line weights can be weight coefficients, and / or weight vectors, weight matrices, etc. containing weight coefficients, representing indicative information used to measure the proportion of different elements in the outcome and / or decision.
[0413] Optionally, the original reference line weights may include at least one of the following: a weight coefficient, a weight vector, and a weight matrix. For example, the weight coefficient is 0.5, the weight vector is [0.2, 0.8], and the weight matrix is [0.2, 0.8; 0.1, 0.9; 0.3, 0.7].
[0414] Optionally, the original reference line weight can be determined or obtained based on at least one of the following: the distance of the original reference line, the block size of the current block, the matching information of the current block, and the matching cost of the reference template of the current block.
[0415] Optionally, the smaller the distance of the original reference line, the smaller the offset between the original reference line and the current block, and the stronger the spatial proximity between the original reference line and the current block. Generally, it has a higher local correlation. Therefore, the original reference line with a smaller distance can be given a higher weight. In the current block structure with texture periodicity and / or long-distance repetition, reference lines at specific distances (e.g., distance of the original reference line = 7, 9, 11, 13, etc.) may be more representative, and their weights can be increased accordingly.
[0416] Optionally, if the original reference lines include A0, A1, and A2, and their corresponding original reference line distances are d0, d1, and d2, then based on the original reference line distances, the original reference line weight w0 of the original reference line A0 is determined or obtained as w0 = {(1 / d0) / [(1 / d0)+(1 / d1)+(1 / d2)]}, the original reference line weight w1 of the original reference line A1 is determined or obtained as w1 = {(1 / d1) / [(1 / d0)+(1 / d1)+(1 / d2)]}, and the original reference line weight w2 of the original reference line A2 is determined or obtained as w2 = {(1 / d2) / [(1 / d0)+(1 / d1)+(1 / d2)]}.
[0417] Optionally, the weight of the original reference line can be determined or obtained based on the distance of the original reference line and the block size of the current block.
[0418] Optionally, for small image patches (e.g., current patches whose size is smaller than a preset size threshold), their spatial correlation is mainly concentrated in the neighboring region. Therefore, original reference lines with smaller distances can be assigned higher weights. For large image patches (e.g., current patches whose size is greater than or equal to a preset size threshold), their internal texture may exhibit gradient or layered characteristics. Relying solely on the nearest reference line may lead to edge mismatch. Therefore, original reference lines with moderate (e.g., within a preset distance range) or larger distances can better characterize the overall trend. Thus, their original reference line weights can be increased to enhance the prediction effect for larger image patches.
[0419] Optionally, the block size of the current block includes at least one of the following: the width, height, area, and aspect ratio of the current block, and the size threshold can be 16, 32, 64, 128, 256, etc.
[0420] Optionally, the preset distance range can be [5,11], [3,9], [7,13], etc. Optionally, the original reference line weight of the original reference line within the preset distance range is greater than the original reference line weight of the original reference line outside the preset distance range.
[0421] Optionally, the higher the degree of matching between the original reference line determined or obtained based on the matching information of the current block and the current block, the greater the weight of the original reference line; and / or, the lower the degree of matching between the original reference line determined or obtained based on the matching information of the current block and the current block, the smaller the weight of the original reference line.
[0422] Optionally, the prediction result of the current block is determined or obtained based on at least one reference line (e.g., a preset reference line, a candidate reference line, a sub-pixel reference line, etc.) and a prediction mode associated with at least one reference line. Based on the prediction result of the current block, the matching information of the current block is determined or obtained. The matching information of the current block can measure the degree of matching between the reference line and / or the prediction mode associated with the reference line and the current block.
[0423] Optionally, the matching information for the current block includes: SAD, SATD, and / or MRSAD.
[0424] Optionally, the reference template matching cost for the current block includes: SAD, SATD, and / or MRSAD.
[0425] Optionally, the higher the degree of matching between the original reference line determined or obtained based on the reference template matching cost of the current block and the reference template, the greater the weight of the original reference line; and / or, the lower the degree of matching between the original reference line determined or obtained based on the reference template matching cost of the current block and the reference template, the smaller the weight of the original reference line.
[0426] Optionally, the original reference line index refers to an integer number and / or identifier used to uniquely identify an original reference line.
[0427] Optionally, in multi-reference line prediction, a set of original reference lines can be pre-set, and each original reference line is assigned a unique index value (such as 0, 1, 2, 3). After the encoder determines the target reference line, it uses the index value of the target reference line as one of the prediction parameters, entropy-encoded it and writes it into the encoded bit stream. After parsing the index, the decoder locates the corresponding reference pixel according to the predefined mapping rules (such as index 1 corresponding to the second row above) and extracts the corresponding reference pixel to reconstruct the prediction process.
[0428] Optionally, based on the intra-block template matching information of the current block, at least one prediction mode and reference line combination and its associated reference template matching cost of the current block are determined or obtained. The reference line in the at least one prediction mode and reference line combination is determined as the original reference line. The original reference line weight of the at least one original reference line is determined or obtained based on the reference template matching cost. At least one fused reference line is determined or obtained based on the at least one original reference line and its corresponding original reference line weight. The intra-block template matching information of the current block is updated based on the reference template matching cost of the at least one fused reference line. For example, if the reference template matching cost of the current block associated with the fused reference line is less than the reference template matching cost of the current block associated with the prediction mode and reference line combination in the intra-block template matching information of the current block, then the reference line in the prediction mode and reference line combination is replaced by the fused reference line to obtain the updated intra-block template matching information. At least one predicted pixel of the current block is determined or obtained based on the updated intra-block template matching information.
[0429] Optionally, at least one prediction mode in the updated intra-frame template matching information of the current block is determined or obtained, and the matching information of the current block related to the reference line is determined or obtained. Based on the matching information of the current block, the target reference line is determined or obtained. Based on the target reference line and the prediction mode, at least one predicted pixel of the current block is determined or obtained.
[0430] Optionally, at least one fusion mode can be determined or obtained based on the combination of at least one prediction mode and reference line, a target prediction mode can be determined or obtained based on the matching information of the current block related to the at least one fusion mode (e.g., rate distortion cost), and at least one predicted pixel of the current block can be determined or obtained based on the target prediction mode and the aforementioned target reference line.
[0431] Optionally, the intra-frame template matching information of the current block includes: at least one prediction mode and reference line combination whose reference template matching cost determined or obtained through the reference template of the current block satisfies the preset matching cost condition, and / or the reference template matching cost of the current block related to at least one prediction mode and reference line combination. The intra-frame template matching information of the current block is used to guide the subsequent rate-distortion optimization process, narrow the candidate range, and improve coding efficiency.
[0432] Optionally, if the reference template matching cost of the current block related to the prediction mode and the reference line combination meets the preset matching cost condition, it indicates that the prediction result of the current block determined or obtained by the prediction mode and the reference line combination has a small error, and / or, if the reference template matching cost of the current block related to the prediction mode and the reference line combination does not meet the preset matching cost condition, it indicates that the prediction result of the current block determined or obtained by the prediction mode and the reference line combination has a large error.
[0433] Optionally, the prediction mode and reference line combination can be sorted according to the value of the reference template matching cost based on the preset sorting rules, and the sorting result can be determined or obtained. Optionally, the preset sorting rules can be to sort the values of the reference template matching cost from small to large, so that the prediction mode and reference line combination with the smaller value of the reference template matching cost (i.e., the higher the degree of matching) ranks higher.
[0434] Optionally, at least some of the prediction patterns in the sorting results may be the same as or different from the reference lines in the reference line combination.
[0435] Optionally, the preset matching cost conditions include: the ranking result of the reference template matching cost is in the top preset position, such as the top 3, top 20, top 15, etc.
[0436] Optionally, in conventional TMRL mode, the target combination of mode and reference line is usually determined or obtained directly based on the rate-distortion cost of at least one predicted mode and reference line combination in the intra-frame template matching information of the current block, and used to determine or obtain at least one predicted pixel of the current block. However, in the embodiments of this application, at least one fused reference line is determined or obtained based on the reference line of at least one predicted mode and reference line combination in the intra-frame template matching information of the current block and its corresponding reference line weight. While retaining the rich spatial information provided by at least one reference line, the influence of reference lines that contribute more are highlighted and noise or irrelevant reference lines are suppressed through weight allocation, thereby constructing a fused reference line that is closer to the real structure of the current block, thereby improving the accuracy of pixel prediction and / or avoiding the computational overhead of fusing all reference lines, saving computational resources.
[0437] Optionally, based on the intra-frame template matching information of the current block, a prediction mode and reference line combination is determined or obtained, including: reference line A0-prediction mode B0, reference line A1-prediction mode B1, and reference line A2-prediction mode B2. The reference template matching cost of reference line A0-prediction mode B0 is SATD0, the reference template matching cost of reference line A1-prediction mode B1 is SATD1, and the reference template matching cost of reference line A2-prediction mode B2 is SATD2. Then, the reference line weight w0 of reference line A0 is [SATD1+SATD2 / (SATD0+SATD1+SATD2)], and the reference line weight w1 of reference line A1 is [SATD0+SATD2 / (SATD0+SATD1+SATD2)]. The reference line weight w2 of reference line A2 is [SATD0+SATD1 / (SATD0+SATD1+SATD2)]. Based on the above reference lines A0 to A2 and their corresponding reference line weights, the fusion reference line Ax is determined or obtained. The rate-distortion cost of the prediction result obtained after combining the fusion reference line Ax with the prediction modes B0 to B2 (i.e., Ax-B0, Ax-B1, Ax-B2) is determined or obtained. Through the rate-distortion cost, at least one target reference line and at least one target prediction mode are determined or obtained from the combination of reference lines and modes (i.e., A0-B0, A1-B1, A2-B2, Ax-B0, Ax-B1, Ax-B2). Based on the at least one target reference line and at least one target prediction mode, at least one predicted pixel of the current block is determined or obtained.
[0438] In this embodiment, when the reference region differs significantly from the current block, a single reference line (e.g., the reference line above and / or to the left of the current block) may be insufficient to fully reflect the texture characteristics of the current block. Compared to selecting a single reference line, fusing reference lines avoids the risk of information loss associated with selecting a single reference line. For example, when there is at least one similar but not completely identical texture structure around the current block, more representative reference information can be determined or generated through fusion, improving the accuracy of pixel prediction. And / or the above method does not require additional signaling related to the fusion mode, thus saving bandwidth resources.
[0439] Method a12, reference line set.
[0440] Optionally, the reference line set is a collection of reference lines that can be used for intra-frame prediction, containing at least one reference line for providing spatial context information for the current block to determine or generate predicted pixels.
[0441] Optionally, reference lines in the reference line set can be determined or obtained based on preset reference lines, sub-pixel reference lines, candidate reference lines, and / or fusion reference lines.
[0442] Alternatively, the reference lines in the reference line set can be referred to as candidate reference lines.
[0443] Optionally, at least one reference line in the reference line set can be identified by at least one of the reference line index, reference line distance, and reference line position. For example, the reference line set is defined as {reference line distance = 0, 1, 3, 5, 7, 12}, which means that the 0th, 1st, 3rd, 5th, 7th, and 12th rows above the current block are used as reference lines in the set.
[0444] Optionally, at least one prediction pattern for the current block can be determined or obtained based on at least one set of reference lines.
[0445] Optionally, at least one target reference line is determined or obtained based on at least one set of reference lines, and at least one prediction mode for the current block is determined or obtained based on at least one target reference line.
[0446] Optionally, at least one target reference line is determined or obtained based on at least one of the following: at least one set of reference lines, at least one fused reference line information, at least one candidate reference line information, at least one preset reference line information, at least one preset reference line information, at least one reference line weight, at least one reference column, at least one reference row, at least one reference pixel information, at least one reference line position, at least one reference line distance, and at least one reference line index. Based on the at least one target reference line, at least one predicted pixel of the current block is determined or obtained.
[0447] Optionally, the reference line set includes at least one of the first reference line set, the second reference line set, and the third reference line set.
[0448] Optionally, at least one of the first set of reference lines, the second set of reference lines, and the third set of reference lines includes a candidate set of reference lines, which is a set of candidate reference lines.
[0449] Optionally, the first set of reference lines can be a set of predefined, fixed size parameters (e.g., reference line distances), for example, the first set of reference lines is {reference line distance = 0, 1, 3, 5, 7, 12}.
[0450] Optionally, the size parameters of the first reference line set are preset values.
[0451] Optionally, the size parameters of the reference line set include at least one of the following: the number of reference lines, the distance between reference lines, the upper limit of the distance between reference lines, and the interval between adjacent reference lines.
[0452] Optionally, the number of reference lines in the first reference line set is a preset value, for example, the number of reference lines is 6. Optionally, the distance between reference lines in the first reference line set is a preset value, for example, {reference line distance = 0, 1, 3, 5, 7, 12}. Optionally, the interval between adjacent reference lines in the first reference line set is a preset value, for example, the intervals between adjacent reference lines are 1, 2, 2, 2, 5 respectively.
[0453] Optionally, the second set of reference lines can be a set of predefined reference lines, for example, the second set of reference lines is {reference line distance = 0, 1, 3, 5, 7, 9, 11, 13, 15, 17}.
[0454] Optionally, the size of the first set of reference lines is smaller than the size of the second set of reference lines.
[0455] Optionally, the number of reference lines in the first reference line set is less than the number of reference lines in the second reference line set, and / or the upper limit of the reference line distance in the first reference line set is less than the upper limit of the reference line distance in the second reference line set.
[0456] Optionally, the intervals between adjacent reference lines in the second set of reference lines are the same, for example, the interval is 2.
[0457] Optionally, a set of reference lines is determined or obtained from a first set of reference lines and a second set of reference lines based on the block size of the current block, wherein the size of the first set of reference lines is smaller than the size of the second set of reference lines.
[0458] Optionally, the size of the reference line set can be determined or obtained based on the current block size.
[0459] Optionally, based on the block size of the current block, at least one of the following can be determined or obtained: the number of reference lines in the reference line set, the reference line distance, the upper limit of the reference line distance, and the interval between adjacent reference lines.
[0460] Optionally, if the block size of the current block is less than a preset size threshold, the upper limit of the reference line distance of the reference line set is a first upper limit value, and / or, if the block size of the current block is greater than or equal to the preset size threshold, the upper limit of the reference line distance of the reference line set is a second upper limit value, where the first upper limit value is less than the second upper limit value; and / or, if the block size of the current block is less than the preset size threshold, the interval between adjacent reference lines in the reference line set is a first interval value, and / or, if the block size of the current block is greater than or equal to the preset size threshold, the interval between adjacent reference lines in the reference line set is a second interval value, where the first interval value is less than the second interval value.
[0461] Optionally, the first upper limit value is 7, 12, etc., and the second upper limit value is 13, 15, 17, etc.
[0462] Optionally, the first interval value is 2 and the second interval value is 3. For example, if the block size of the current block is less than a preset size threshold, the reference line set is {reference line distance = 0, 1, 3, 5, 7, 9, 11, 13, 15, 17}, and / or, if the block size of the current block is greater than or equal to the preset size threshold, the reference line set is {reference line distance = 0, 1, 4, 7, 10, 13, 16}.
[0463] Optionally, if the block size of the current block is less than a preset size threshold, then at least one predicted pixel of the current block is determined or obtained according to the first set of reference lines, and / or if the block size of the current block is greater than or equal to the preset size threshold, then at least one predicted pixel of the current block is determined or obtained according to the second set of reference lines.
[0464] Optionally, if the block size of the current block is less than a preset size threshold, the first set of reference lines is applied to the MRL mode and / or the TMRL mode, and / or if the block size of the current block is greater than or equal to the preset size threshold, the second set of reference lines is applied to the MRL mode and / or the TMRL mode.
[0465] Optionally, the block size of the current block includes at least one of the following: the width, height, area, and aspect ratio of the current block, and the size threshold can be 16, 32, 64, 128, 256, etc.
[0466] Optionally, if the block size (e.g., area) of the current block is less than a size threshold (e.g., 64), then at least one predicted pixel of the current block is determined or obtained according to a first set of reference lines {reference line distance = 0, 1, 3, 5, 7, 12}, and / or if the block size (e.g., area) of the current block is greater than or equal to the size threshold (e.g., 64), then at least one predicted pixel of the current block is determined or obtained according to a second set of reference lines {reference line distance = 0, 1, 3, 5, 7, 9, 11, 13, 15, 17}.
[0467] Optionally, if the current block size is smaller than the size threshold, it indicates that the current block is small. The spatial correlation of the image signal (i.e., the similarity of neighboring pixel values) will decrease with increasing distance. For example, for a 4x4 current block, its height and width are only 4, and the texture and / or edge information of pixels more than 12 rows (or columns) away from it is usually weakly correlated with the current block. And / or, if distant reference lines with reference line distances of 15 and 17 are also provided for the small current block, the prediction information they provide is of low value because these reference lines have low correlation with the current block. They may even mislead the prediction results due to noise or irrelevant texture interference. At the same time, the encoder needs to calculate the template matching cost on these distant reference lines when making mode decisions, which will also increase the amount of computation. Therefore, in this embodiment, a smaller first set of reference lines is selected for the small current block, and the interval between 7 and 12 in the reference line distance of the reference line set is increased. This is to further control the set size through a sparsity strategy, while retaining the ability to explore "far away" information.
[0468] Optionally, if the current block size is greater than or equal to a size threshold, it indicates that the current block is large. Large image blocks cover a larger area. At this scale, there may be smooth gradients spanning tens of pixels, large flat areas, or long-distance straight / curved edges. To accurately predict such a large block, relying solely on adjacent reference pixels is insufficient. Therefore, embodiments of this application utilize pixels on distant reference lines with distances of 13, 15, or even 17 in the second reference line set to provide more valuable "long-distance" information, thereby improving the accuracy of the prediction results. The interval between adjacent reference lines in the second reference line set is the same (e.g., 2), and dense sampling ensures accurate evaluation at long distances, thereby improving the accuracy of pixel prediction.
[0469] Optionally, the size of the second reference line set is determined or obtained based on the current block information, the encoded block information, and / or the decoded block information.
[0470] Optionally, the current block information includes at least one of the following: the block size of the current block, the preset position pixels associated with the current block, the position of the current block, the reference template of the current block, the motion vector of the current block, the candidate motion vector of the current block, the block vector of the current block, the candidate block vector of the current block, the intra-frame template matching information of the current block, the prediction mode list associated with the current block, the rate-distortion cost of the current block, and the boundary information of the current block.
[0471] Optionally, the encoded block information includes at least one of the following: the block size of the encoded block, the preset position pixels associated with the encoded block, the position of the encoded block, the reference line information of the encoded block, the reference template of the encoded block, the motion vector of the encoded block, the candidate motion vector of the encoded block, the block vector of the encoded block, the candidate block vector of the encoded block, the intra-frame template matching information of the encoded block, the prediction mode list associated with the encoded block, the boundary information of the encoded block, and the partitioning information of the encoded block.
[0472] Optionally, the decoded block information includes at least one of the following: the block size of the decoded block, the preset position pixels associated with the decoded block, the position of the decoded block, the reference line information of the decoded block, the reference template of the decoded block, the motion vector of the decoded block, the candidate motion vector of the decoded block, the block vector of the decoded block, the candidate block vector of the decoded block, the intra-frame template matching information of the decoded block, the prediction mode list associated with the decoded block, the boundary information of the decoded block, and the partitioning information of the decoded block.
[0473] Optionally, the processing method includes at least one of the following:
[0474] The size of the second reference line set is determined or obtained based on the block size of the current block;
[0475] The size of the second reference line set is determined or obtained based on the size of the reference line set of the image block corresponding to the preset position pixel of the current block;
[0476] The size of the second set of reference lines is determined or obtained based on the size of the reference template of the current block;
[0477] The size of the second reference line set is determined or obtained based on the size of the reference line set of the image block corresponding to the motion vector of the current block or the candidate motion vector;
[0478] The size of the second reference line set is determined or obtained based on the size of the reference line set of the image block corresponding to the block vector of the current block or the candidate block vector;
[0479] The size of the second reference line set is determined or obtained based on the number of intra-frame template matching information of the current block;
[0480] The size of the second reference line set is determined or obtained based on the boundary information of the encoded and / or decoded blocks corresponding to the preset position pixels of the current block;
[0481] The size of the second reference line set is determined or obtained based on the size of the reference line set of the encoded block and / or decoded block corresponding to the preset position pixels of the current block;
[0482] The size of the second reference line set is determined or obtained based on the boundary information of the encoded and / or decoded blocks corresponding to the preset position pixels of the current block.
[0483] Optionally, the third reference line set can be determined or obtained based on at least one of the second reference line information, current block information, encoded block information, and decoded block information.
[0484] Optionally, the third reference line set can be a set consisting of at least one reference line that is dynamically selected and / or generated. The third reference line set is not from a fixed, pre-hard-coded reference line set, but a reference line set that is dynamically constructed according to the actual situation, thereby improving the flexibility of reference line selection in the current block prediction process and improving the accuracy of pixel prediction.
[0485] In this embodiment, the reference line set can cover reference lines of various distances, directions and types, providing a rich selection of reference lines for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0486] Third Embodiment
[0487] Based on any of the above embodiments, a third embodiment is proposed.
[0488] In this embodiment, the first reference line information is determined or obtained according to at least one of the following methods b1 to b4:
[0489] Method b1, current block information;
[0490] Optionally, based on the current block information, first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0491] Optionally, the current block information includes at least one of the following methods c1 to c12:
[0492] Method c1, the block size of the current block;
[0493] Optionally, the block size of the current block includes at least one of the following: the width, height, area, and aspect ratio of the current block.
[0494] Optionally, the current block information includes: the block size of the current block; determining or obtaining first reference line information based on the block size of the current block; the first reference line information includes at least one of methods a1 to a12 in the second embodiment; determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information.
[0495] Optionally, the reference line distance is determined or obtained based on the block size of the current block. In order to ensure prediction accuracy and / or reduce computational complexity and / or memory access overhead, the selection of the reference line distance is not infinite, but is limited to a reasonable and finite range. Therefore, the embodiment of this application determines or obtains the reference line distance based on the block size of the current block, which can ensure prediction accuracy and / or reduce computational complexity, and / or balance coding efficiency and computational complexity.
[0496] Optionally, the reference line distance determined or obtained based on the current block size can be a set of reference lines consisting of at least one reference line distance, in which the specific reference line can be indicated by the reference line distance in the set of reference lines.
[0497] Optionally, the reference line distance determined or obtained based on the block size of the current block can be the upper limit of the reference line distance for the reference line used to determine or obtain at least one predicted pixel of the current block. For example, if the block size of the current block is less than a preset size threshold, it indicates that the block size of the current block is small, and the reference line distance is a first distance, indicating that the reference line distances of the reference lines used to determine or obtain at least one predicted pixel of the current block are all less than or equal to the first distance, and / or, if the block size of the current block is greater than or equal to the size threshold, it indicates that the block size of the current block is large, and the reference line distance is a second distance, indicating that the reference line distances of the reference lines used to determine or obtain at least one predicted pixel of the current block are all less than or equal to the second distance, and the second distance is greater than the first distance.
[0498] Optionally, the size threshold can be 16, 32, 64, 128, 256, etc.
[0499] Optionally, the first distance can be 5, 7, 12, etc., and the second distance can be 13, 15, 17, etc., with the second distance being greater than the first distance.
[0500] Optionally, the position of the reference line can be determined or obtained based on the block size of the current block. The position of the reference line is used to characterize the coordinate information of the geometric positioning of the reference line in the image space, and / or the position of the reference line can reflect the distance relationship between the reference line and the current block. Therefore, the position of the reference line that is adapted to the current block can be determined or obtained based on the block size of the current block.
[0501] Optionally, the reference line weights are determined or obtained based on the current block size. The reference line weights can characterize the relative importance of their corresponding reference lines in the process of determining or obtaining the fusion reference lines.
[0502] Optionally, reference line weights are determined or obtained based on the block size of the current block, at least one fusion reference line is determined or obtained based on at least one original reference line and its corresponding reference line weights, and at least one predicted pixel of the current block is determined or obtained based on the at least one fusion reference line.
[0503] Optionally, the fusion reference line can be determined as at least one of a preset reference line, a candidate reference line, and a reference line from a set of reference lines.
[0504] Optionally, the original reference line includes at least one of the following: a preset reference line, a candidate reference line, a sub-pixel reference line, and a reference line in the reference line set. That is, the reference line weight determined or obtained according to the block size of the current block includes the reference line weight corresponding to at least one of the preset reference line, the candidate reference line, the sub-pixel reference line, and the reference line in the reference line set.
[0505] Optionally, for small image patches (e.g., the current patch whose size is smaller than a preset size threshold), their spatial correlation is mainly concentrated in the neighboring region. Therefore, reference lines with smaller distances can be assigned higher reference line weights. For large image patches (e.g., the current patch whose size is greater than or equal to a preset size threshold), their internal texture may exhibit gradient or layered characteristics. Relying solely on the nearest reference line may lead to edge mismatch. Therefore, reference lines with moderate (e.g., within a preset distance range) or larger distances can better characterize the overall trend. Thus, their reference line weights can be increased to enhance the prediction effect for larger image patches.
[0506] Optionally, the preset distance range can be [5,11], [3,9], [7,13], etc. Optionally, the reference line weight of the reference line within the preset distance range is greater than the reference line weight of the reference line outside the preset distance range.
[0507] Optionally, a set of reference lines is determined or obtained based on the block size of the current block. The set of reference lines can be the set of reference lines corresponding to mode a12 in the second embodiment. For example, the set of reference lines includes: a first set of reference lines, a second set of reference lines, and / or a third set of reference lines.
[0508] Optionally, the first set of reference lines can be a set of predefined, fixed size parameters (e.g., reference line distances), for example, the first set of reference lines is {reference line distance = 0, 1, 3, 5, 7, 12}.
[0509] Optionally, the size parameters of the first reference line set are preset values.
[0510] Optionally, the size parameters of the reference line set include at least one of the following: the number of reference lines, the distance between reference lines, the upper limit of the distance between reference lines, and the interval between adjacent reference lines.
[0511] Optionally, the number of reference lines in the first reference line set is a preset value, for example, the number of reference lines is 6. Optionally, the distance between reference lines in the first reference line set is a preset value, for example, {reference line distance = 0, 1, 3, 5, 7, 12}. Optionally, the interval between adjacent reference lines in the first reference line set is a preset value, for example, the intervals between adjacent reference lines are 1, 2, 2, 2, 5 respectively.
[0512] Optionally, the second set of reference lines can be a set of predefined reference lines, for example, the second set of reference lines is {reference line distance = 0, 1, 3, 5, 7, 9, 11, 13, 15, 17}.
[0513] Optionally, the size of the first set of reference lines is smaller than the size of the second set of reference lines.
[0514] Optionally, the number of reference lines in the first reference line set is less than that in the second reference line set, and / or the upper limit of the reference line distance in the first reference line set is less than the upper limit of the reference line distance in the second reference line set.
[0515] Optionally, the intervals between adjacent reference lines in the second set of reference lines are the same, for example, the interval is 2.
[0516] Optionally, a set of reference lines is determined or obtained from a first set of reference lines and a second set of reference lines based on the block size of the current block, wherein the size of the first set of reference lines is smaller than the size of the second set of reference lines.
[0517] Optionally, the size of the reference line set is determined or obtained based on the block size of the current block. Optionally, the size of the reference line set includes at least one of the following: the number of reference lines, the distance between reference lines, the upper limit of the distance between reference lines, and the interval between adjacent reference lines.
[0518] Optionally, if the block size of the current block is less than a preset size threshold, the upper limit of the reference line distance of the reference line set is a first upper limit value, and / or, if the block size of the current block is greater than or equal to the preset size threshold, the upper limit of the reference line distance of the reference line set is a second upper limit value, where the first upper limit value is less than the second upper limit value; and / or, if the block size of the current block is less than the preset size threshold, the interval between adjacent reference lines in the reference line set is a first interval value, and / or, if the block size of the current block is greater than or equal to the preset size threshold, the interval between adjacent reference lines in the reference line set is a second interval value, where the first interval value is less than the second interval value.
[0519] Optionally, the first upper limit value is 7, 12, etc., and the second upper limit value is 13, 15, 17, etc.
[0520] Optionally, the first interval value is 2 and the second interval value is 3. For example, if the block size of the current block is less than a preset size threshold, the reference line set is {reference line distance = 0, 1, 3, 5, 7, 9, 11, 13, 15, 17}, and / or, if the block size of the current block is greater than or equal to the preset size threshold, the reference line set is {reference line distance = 0, 1, 4, 7, 10, 13, 16}.
[0521] Optionally, if the block size of the current block is less than a preset size threshold, then at least one predicted pixel of the current block is determined or obtained according to the first set of reference lines, and / or if the block size of the current block is greater than or equal to the preset size threshold, then at least one predicted pixel of the current block is determined or obtained according to the second set of reference lines.
[0522] Optionally, if the block size of the current block is less than a preset size threshold, the first set of reference lines is applied to the MRL mode and / or the TMRL mode, and / or if the block size of the current block is greater than or equal to the preset size threshold, the second set of reference lines is applied to the MRL mode and / or the TMRL mode.
[0523] In this embodiment, image blocks of different sizes have different spatial structural characteristics and reference dependency ranges. By determining or obtaining first reference line information for determining or obtaining at least one predicted pixel of the current block based on the block size, the prediction process for the current block can better match the geometric characteristics of the block with the image content distribution, thereby improving the accuracy of pixel prediction.
[0524] Method c2, the preset position pixels related to the current block;
[0525] Optionally, the preset position pixels associated with the current block include: the preset adjacent pixels of the current block and / or the preset non-adjacent pixels of the current block.
[0526] Optionally, the current block information includes: a preset position pixel related to the current block; a first reference line information is determined or obtained based on the preset position pixel related to the current block; the first reference line information includes at least one of the methods a1 to a12 in the second embodiment; at least one predicted pixel of the current block is determined or obtained based on at least one first reference line information.
[0527] Optionally, a first reference line information is determined or obtained based on the reference line information of the image block determined or obtained through the preset position pixels related to the current block. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment.
[0528] Optionally, based on the block size of the current block, a preset position pixel related to the current block can be determined or obtained.
[0529] Optionally, the preset position pixels related to the current block are pixels located within a preset reference area, which is determined or obtained based on the block size of the current block.
[0530] Optionally, if the block size of the current block is less than a preset size threshold, then the preset position pixel associated with the current block is a pixel located within a preset first reference area, and / or, if the block size of the current block is greater than or equal to the preset size threshold, then the preset position pixel associated with the current block is a pixel located within a preset second reference area, wherein the size of the first reference area is less than the size of the second reference area.
[0531] Optionally, the current block information includes: the block size of the current block and / or the preset position pixels associated with the current block.
[0532] Optionally, the first reference line information is determined or obtained based on the reference line information of the image block determined or obtained through the preset position pixels related to the current block.
[0533] Optionally, the image block determined or obtained by the preset position pixels related to the current block can be the image block to which the preset position pixels related to the current block belong.
[0534] Optionally, the image block determined or obtained by the preset position pixel associated with the current block includes: the image block in the coding unit corresponding to the preset position pixel and / or the image block in the prediction unit corresponding to the preset position pixel.
[0535] Optionally, the reference line information of the image block determined or obtained by the preset position pixel related to the current block includes: the reference line information of the image block in the coding unit corresponding to the preset position pixel and / or the reference line information of the image block in the prediction unit corresponding to the preset position pixel.
[0536] Optionally, the reference line information of the image block determined or obtained by the preset position pixels related to the current block includes at least one of the following: pixel sub-reference line of the image block, fusion reference line of the image block, candidate reference line of the image block, reference line set of the image block, reference row of the image block, reference column of the image block, reference pixel information of the image block, reference line weight of the image block, reference line position of the image block, reference line distance of the image block, and reference line index of the image block.
[0537] Optionally, candidate reference lines are determined or obtained based on reference line information of image blocks determined or obtained through preset position pixels related to the current block, and at least one predicted pixel of the current block is determined or obtained based on the candidate reference lines.
[0538] Optionally, a set of reference lines is determined or obtained based on the reference line information of the image block determined or obtained through the preset position pixels related to the current block. For example, a third set of reference lines and / or a set of candidate reference lines are determined or obtained. Based on the set of reference lines, at least one predicted pixel of the current block is determined or obtained.
[0539] Optionally, the reference line of the image block to which the preset position pixel of the current block belongs is determined as a candidate reference line and / or a reference line in the reference line set, and at least one predicted pixel of the current block is determined or obtained based on the candidate reference line and / or the reference line in the reference line set.
[0540] Optionally, the selection of preset position pixels related to the current block can be referred to Figure 13. The solid line block is the current block. The preset adjacent pixels of the current block include pixels located above, to the upper left, and to the left of the current block. The preset non-adjacent pixels of the current block include at least one pixel selected above, to the upper left, to the upper right, to the left, and to the lower left of the current block according to a preset rule. The reference line information of the image block can be determined or obtained based on the preset adjacent pixels and / or the preset non-adjacent pixels of the current block in Figure 13. For example, the current block information includes the reference line information of the image block A to which the preset non-adjacent pixel a of the current block belongs. Based on the current block information, the first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on the at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0541] Optionally, a third set of reference lines is determined or obtained based on the reference lines of the image blocks to which the preset position pixels of the current block belong. For example, referring to FIG13, the reference line L0 of the image block A to which the preset non-adjacent pixel a of the current block belongs is determined as a reference line in the third set of reference lines and / or the candidate set of reference lines. This allows at least one reference line to be stored in the third set of reference lines, and the reference lines in the third set of reference lines are different for each current block, thereby realizing the dynamic generation of the reference line set and improving the accuracy of pixel prediction.
[0542] Optionally, defining a reference line as a set of reference lines (e.g., a first set of reference lines, a second set of reference lines, a third set of reference lines, and / or a set of candidate reference lines, etc.) can be achieved by adding the reference line index of the reference line to the set of reference lines.
[0543] Optionally, the number of times the reference line is used is determined or obtained based on the reference line of the image block to which the preset position pixel of the current block belongs, and a third set of reference lines and / or a set of candidate reference lines is determined or obtained based on the number of times the reference line is used.
[0544] Optionally, the number of times the reference line is used is determined or obtained based on the preset position pixels related to the current block. For example, the image blocks to which the preset position pixels related to the current block belong include: image block a, image block b, image block c, image block d, and image block e. The reference lines for image blocks a and b are both reference lines L1, the reference lines for image blocks c and d are both reference lines L2, and the reference line for image block e is reference line L3. Then, the number of times reference lines L1 and L2 are used is 2, and the number of times reference line L3 is used is 1.
[0545] Optionally, based on the reference lines of the image block to which the preset position pixel belongs, the number of times the reference line is used is determined or obtained. Based on the number of times the reference line is used, and based on at least some of the reference lines of the image block to which the preset position pixel belongs, a third set of reference lines and / or a set of candidate reference lines is determined or obtained.
[0546] Optionally, a preset position pixel related to the current block is determined or obtained based on the preset pixel position related to the current block. The preset pixel position related to the current block includes: the preset adjacent pixel position of the current block and / or the preset non-adjacent pixel position of the current block.
[0547] Optionally, a list of prediction mode and reference line combinations is determined or obtained based on the reference line of the image block determined or obtained through the preset position pixels related to the current block and its corresponding prediction mode. For example, if the reference line of the image block determined or obtained through the preset position pixels related to the current block is L1 (reference line index is not 0) and the prediction mode is B1, then the B1-L1 combination is constructed and added to the list of prediction mode and reference line combinations.
[0548] Optionally, based on the list of predicted mode and reference line combinations and the rate-distortion cost of the current block, a target combination of mode and reference line is determined or obtained, and based on the target combination of mode and reference line, at least one predicted pixel of the current block is determined or obtained.
[0549] In this embodiment, the first reference line information of the current block is determined or obtained based on the preset position pixels related to the current block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0550] Method c3, the position of the current block;
[0551] Optionally, the position of the current block includes: the horizontal position of the current block and / or the vertical position of the current block.
[0552] Optionally, the current block information includes: the position of the current block; determining or obtaining first reference line information based on the position of the current block; the first reference line information includes at least one of methods a1 to a12 in the second embodiment; determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information.
[0553] Optionally, the current block information includes at least one of the following: the position of the current block, the block size of the current block, and the preset position pixels associated with the current block.
[0554] Optionally, at least one reference column is determined or obtained based on the horizontal position of the current block, and at least one predicted pixel of the current block is determined or obtained based on the at least one reference column.
[0555] Optionally, based on the vertical position of the current block, at least one reference row is determined or obtained, and based on the at least one reference row, at least one predicted pixel of the current block is determined or obtained.
[0556] Optionally, reference rows above the current block and / or reference columns to the left of the current block can be selectively used as reference pixel sources based on the position of the current block, such as the horizontal position and / or the vertical position of the current block. This leverages the strong spatial correlation of image pixels in the horizontal and / or vertical directions, avoids the computational complexity of using diagonal and / or distant non-adjacent regions, and / or improves encoding and decoding efficiency.
[0557] In this embodiment, the first reference line information of the current block is determined or obtained based on the position of the current block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0558] Method c4, reference template information for the current block;
[0559] Optionally, the reference template refers to a set of encoded and reconstructed pixel regions located in the current block space neighborhood, which is used to evaluate the matching degree of candidate prediction results during the prediction mode screening stage.
[0560] Optionally, the types of reference templates for the current block include at least one of the following: the upper reference template of the current block, the left reference template of the current block, the upper left reference template of the current block, the block vector reference template determined or obtained by the block vector of the current block, and the candidate block vector reference template determined or obtained by the candidate block vector of the current block.
[0561] Optionally, the reference template information of the current block includes at least one of the following: the reference template size of the current block, the reference template length of the current block, the reference template width of the current block, the reference template information above the current block, the reference template information to the left of the current block, the reference template information to the upper left of the current block, the block vector reference template information determined or obtained by the block vector of the current block, and the candidate block vector reference template information determined or obtained by the candidate block vector of the current block.
[0562] Optionally, the reference template information of the current block can be determined or obtained based on the block size of the current block. For example, the size of the reference template of the current block, the length of the reference template of the current block, and the width of the reference template of the current block can be determined or obtained based on the block size of the current block.
[0563] Optionally, if the block size of the current block is less than a preset size threshold, the size of the reference template of the current block is a first size, and / or if the block size of the current block is greater than or equal to the preset size threshold, the size of the reference template of the current block is a second size, where the first size is less than the second size, for example, the first size is 2 and the second size is 4.
[0564] Referring to Figure 10, the left reference template of the current block can be reference template 1 in Figure 10, the top reference template of the current block can be reference template 2 in Figure 10, and the top left reference template of the current block can be a combination of reference templates 1 and 2 in Figure 10.
[0565] In this embodiment, reference templates are typically used for reference line selection. However, this embodiment expands the reference template of the current block from the conventional upper left reference template to a left reference template and / or an upper reference template, so that the upper reference template and the left reference template can correspond to the spatial correlation in the horizontal and vertical directions, respectively. This achieves adaptive reference template matching for prediction direction, improves the accuracy of reference line selection, and thus improves the accuracy of pixel prediction. By decomposing the conventional reference template as described above, the risk of overall reference template mismatch can be reduced. The above method improves the flexibility of template matching and / or prediction performance without increasing signaling overhead.
[0566] Optionally, the block vector reference template determined or obtained through the block vector of the current block can be used to determine the image block determined or obtained through the block vector of the current block as the block vector reference template. The image block determined or obtained through the block vector of the current block usually has a high degree of similarity to the current block in content. Therefore, the reference template constructed with it (i.e., the block vector reference template) can more accurately reflect the features of the current block, thereby improving the matching degree between the reference line and the current block and improving the accuracy of pixel prediction.
[0567] Optionally, the current block information includes: reference template information of the current block; determining or obtaining first reference line information based on the reference template information of the current block; the first reference line information includes at least one of methods a1 to a12 in the second embodiment; determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information.
[0568] Optionally, the current block information includes at least one of the following: reference template information of the current block, position of the current block, block size of the current block, and preset position pixels related to the current block.
[0569] Optionally, the intra-frame template matching information and / or the reference template matching cost of the current block can be determined or obtained through the reference template information of the current block. At least one target reference line can be determined or obtained based on at least one first reference line information and the intra-frame template matching information and / or the reference template matching cost of the current block. At least one predicted pixel of the current block can be determined or obtained based on the at least one target reference line.
[0570] In this embodiment, the first reference line information of the current block is determined or obtained based on the reference template information of the current block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0571] Method c5, the motion vector of the current block;
[0572] Optionally, the motion vector of the current block refers to the optimal motion vector (MV) finally selected for motion compensation for the currently processed coded block (such as CU, PU) during the encoding or decoding process. It describes the spatial displacement of the current block relative to a certain predicted block in the reference frame in the current frame.
[0573] Optionally, the current block information includes: the motion vector of the current block; based on the motion vector of the current block, first reference line information is determined or obtained; the first reference line information includes at least one of the methods a1 to a12 in the second embodiment; based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0574] Optionally, based on the reference line information of the image block determined or obtained through the motion vector of the current block, first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0575] Optionally, the current block information includes at least one of the following: the motion vector of the current block, the reference template of the current block, the position of the current block, the block size of the current block, and the preset position pixels associated with the current block.
[0576] Optionally, the reference line information of the image block determined or obtained through the motion vector of the current block includes at least one of the following: pixel reference line of the image block, fusion reference line of the image block, candidate reference line of the image block, reference line set of the image block, reference row of the image block, reference column of the image block, reference pixel information of the image block, reference line weight of the image block, reference line position of the image block, reference line distance of the image block, and reference line index of the image block.
[0577] Optionally, a third set of reference lines is determined or obtained based on the reference line information of the image block determined or obtained by the motion vector of the current block, and / or the reference line of the image block to which the preset position pixel of the current block belongs. For example, referring to FIG14, the reference line L1 of the image block F in the reference image indicated by the motion vector (MV) of the current block is determined as the reference line in the third set of reference lines, and / or the reference line L0 of the image block E to which the preset non-adjacent pixel e of the current block belongs is determined as the reference line in the third set of reference lines. This allows at least one reference line to be stored in the third set of reference lines, and the reference lines in the third set of reference lines are different for each current block, thereby realizing the dynamic generation of the reference line set and improving the accuracy of pixel prediction.
[0578] Optionally, based on the reference line of the image block determined or obtained through the motion vector of the current block and its corresponding prediction mode, a list of prediction mode and reference line combination is determined or obtained. For example, if the reference line of the image block determined or obtained through the motion vector of the current block is L1 (reference line index is not 0) and the prediction mode is B1, then the B1-L1 combination is constructed and added to the list of prediction mode and reference line combination.
[0579] Optionally, based on the list of predicted mode and reference line combinations and the rate-distortion cost of the current block, a target combination of mode and reference line is determined or obtained, and based on the target combination of mode and reference line, at least one predicted pixel of the current block is determined or obtained.
[0580] In this embodiment, the first reference line information of the current block is determined or obtained based on the motion vector of the current block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0581] Method c6, candidate motion vector for the current block;
[0582] Optionally, the candidate motion vectors for the current block refer to a set of potential motion vector candidate values extracted from the spatial or temporal neighborhood during the Motion Vector Prediction (MVP) process.
[0583] Optionally, the current block information includes: candidate motion vectors of the current block; first reference line information is determined or obtained based on the candidate motion vectors of the current block; the first reference line information includes at least one of modes a1 to a12 in the second embodiment; at least one predicted pixel of the current block is determined or obtained based on at least one first reference line information.
[0584] Optionally, a first reference line information is determined or obtained based on the reference line information of the image block determined or obtained through the candidate motion vector of the current block. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on the at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0585] Optionally, the current block information includes at least one of the following: the candidate motion vector of the current block, the motion vector of the current block, the reference template of the current block, the position of the current block, the block size of the current block, and the preset position pixels associated with the current block.
[0586] Optionally, the reference line information of the image block determined or obtained through the candidate motion vector of the current block includes at least one of the following: pixel reference line of the image block, fusion reference line of the image block, candidate reference line of the image block, reference line set of the image block, reference row of the image block, reference column of the image block, reference pixel information of the image block, reference line weight of the image block, reference line position of the image block, reference line distance of the image block, and reference line index of the image block.
[0587] Optionally, a third set of reference lines is determined or obtained based on at least one of the following: reference line information of the image block determined or obtained by the candidate motion vector of the current block, reference line information of the image block determined or obtained by the motion vector of the current block, and reference lines of the image block to which the preset position pixels of the current block belong.
[0588] Optionally, based on the reference line of the image block determined or obtained through the candidate motion vector of the current block and its corresponding prediction mode, a list of prediction mode and reference line combination is determined or obtained. For example, if the reference line of the image block determined or obtained through the candidate motion vector of the current block is L1 (reference line index is not 0) and the prediction mode is B1, then the B1-L1 combination is constructed and added to the list of prediction mode and reference line combination.
[0589] Optionally, based on the list of predicted mode and reference line combinations and the rate-distortion cost of the current block, a target combination of mode and reference line is determined or obtained, and based on the target combination of mode and reference line, at least one predicted pixel of the current block is determined or obtained.
[0590] In this embodiment, the first reference line information of the current block is determined or obtained based on the candidate motion vector of the current block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0591] Method c7, the block vector of the current block;
[0592] Optionally, the block vector of the current block refers to the two-dimensional displacement vector determined for the current coded block during the intra-frame prediction process, pointing to a reconstructed block within the same frame. It is used to copy pixel data from the decoded region within the frame as the prediction value of the current block in modes such as intra-frame block copying or template matching.
[0593] Optionally, the current block information includes: the block vector of the current block; determining or obtaining first reference line information based on the block vector of the current block; the first reference line information includes at least one of the methods a1 to a12 in the second embodiment; determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information.
[0594] Optionally, based on the reference line information of the image block determined or obtained through the block vector of the current block, first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0595] Optionally, the current block information includes at least one of the following: the block vector of the current block, the candidate motion vector of the current block, the motion vector of the current block, the reference template of the current block, the position of the current block, the block size of the current block, and the preset position pixels associated with the current block.
[0596] Optionally, the reference line information of the image block determined or obtained through the block vector of the current block includes at least one of the following: pixel reference line of the image block, fusion reference line of the image block, candidate reference line of the image block, reference line set of the image block, reference row of the image block, reference column of the image block, reference pixel information of the image block, reference line weight of the image block, reference line position of the image block, reference line distance of the image block, and reference line index of the image block.
[0597] Optionally, a third set of reference lines can be determined or obtained based on at least one of the following: reference line information of the image block determined or obtained by the block vector of the current block, reference line information of the image block determined or obtained by the candidate motion vector of the current block, reference line information of the image block determined or obtained by the motion vector of the current block, and reference lines of the image block to which the preset position pixel of the current block belongs. For example, referring to FIG15, in the current image, the reference line L1 of the image block C indicated by the block vector (BV) of the current block is determined as a reference line in the third set of reference lines, and / or the reference line L0 of the image block B to which the preset non-adjacent pixel b of the current block belongs is determined as a reference line in the third set of reference lines. This allows at least one reference line to be stored in the third set of reference lines, and the reference lines in the third set of reference lines are different for each current block, thereby realizing the dynamic generation of the reference line set and improving the accuracy of pixel prediction.
[0598] Optionally, a reference template for the current block can be determined or obtained based on the image block determined or obtained through the block vector of the current block.
[0599] Optionally, based on the reference line of the image block determined or obtained through the block vector of the current block and its corresponding prediction mode, a list of prediction mode and reference line combination is determined or obtained. For example, if the reference line of the image block determined or obtained through the block vector of the current block is L1 (reference line index is not 0) and the prediction mode is B1, then the B1-L1 combination is constructed and added to the list of prediction mode and reference line combination.
[0600] Optionally, based on the list of predicted mode and reference line combinations and the rate-distortion cost of the current block, a target combination of mode and reference line is determined or obtained, and based on the target combination of mode and reference line, at least one predicted pixel of the current block is determined or obtained.
[0601] In this embodiment, the first reference line information of the current block is determined or obtained based on the block vector of the current block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0602] Method c8, the candidate block vector for the current block;
[0603] Optionally, the candidate block vector of the current block refers to a set of block vector candidate values that may be used as predictors, extracted from the spatial neighborhood or historical information of the current block during the Block Vector Prediction (BVP) process.
[0604] Optionally, the current block information includes: the candidate block vector of the current block; the first reference line information is determined or obtained based on the candidate block vector of the current block; the first reference line information includes at least one of the methods a1 to a12 in the second embodiment; and at least one predicted pixel of the current block is determined or obtained based on at least one first reference line information.
[0605] Optionally, based on the reference line information of the image block determined or obtained through the candidate block vector of the current block, first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0606] Optionally, the current block information includes at least one of the following: candidate block vector of the current block, block vector of the current block, candidate motion vector of the current block, motion vector of the current block, reference template of the current block, position of the current block, block size of the current block, and preset position pixels related to the current block.
[0607] Optionally, the reference line information of the image block determined or obtained through the candidate block vector of the current block includes at least one of the following: pixel reference line of the image block, fusion reference line of the image block, candidate reference line of the image block, reference line set of the image block, reference row of the image block, reference column of the image block, reference pixel information of the image block, reference line weight of the image block, reference line position of the image block, reference line distance of the image block, and reference line index of the image block.
[0608] Optionally, a third reference line set is determined or obtained based on at least one of the following: reference line information of the image block determined or obtained by the candidate block vector of the current block, reference line information of the image block determined or obtained by the block vector of the current block, reference line information of the image block determined or obtained by the candidate motion vector of the current block, reference line information of the image block determined or obtained by the motion vector of the current block, and reference line of the image block to which the preset position pixel of the current block belongs. This allows at least one reference line to be stored in the third reference line set, and the reference lines in the third reference line set are different for each current block, thereby realizing the dynamic generation of the reference line set and improving the accuracy of pixel prediction.
[0609] Optionally, a reference template for the current block can be determined or obtained based on the image block determined or obtained through the candidate block vector of the current block.
[0610] Optionally, based on the reference line of the image block determined or obtained through the candidate block vector of the current block and its corresponding prediction mode, a list of prediction mode and reference line combination is determined or obtained. For example, if the reference line of the image block determined or obtained through the candidate block vector of the current block is L1 (reference line index is not 0) and the prediction mode is B1, then the B1-L1 combination is constructed and added to the list of prediction mode and reference line combination.
[0611] Optionally, based on the list of predicted mode and reference line combinations and the rate-distortion cost of the current block, a target combination of mode and reference line is determined or obtained, and based on the target combination of mode and reference line, at least one predicted pixel of the current block is determined or obtained.
[0612] In this embodiment, the first reference line information of the current block is determined or obtained based on the candidate block vector of the current block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0613] Method c9, intra-frame template matching information for the current block;
[0614] Optionally, the intra-frame template matching information of the current block includes: at least one prediction mode and reference line combination whose reference template matching cost determined or obtained through the reference template of the current block satisfies the preset matching cost condition, and / or the reference template matching cost of the current block related to at least one prediction mode and reference line combination. The intra-frame template matching information of the current block is used to guide the subsequent rate-distortion optimization process, narrow the candidate range, and improve coding efficiency.
[0615] Optionally, the reference template matching cost of the current block refers to the similarity and / or error between the prediction result (e.g., predicted pixels and / or predicted blocks) of the current block determined or obtained through the reference line and the reference template of the current block. For example, the reference template matching cost of the current block includes: SAD, SATD and / or MRSAD.
[0616] Optionally, if the reference template matching cost of the current block related to the prediction mode and the reference line combination meets the preset matching cost condition, it indicates that the prediction result of the current block determined or obtained by the prediction mode and the reference line combination has a small error, and / or, if the reference template matching cost of the current block related to the prediction mode and the reference line combination does not meet the preset matching cost condition, it indicates that the prediction result of the current block determined or obtained by the prediction mode and the reference line combination has a large error.
[0617] Optionally, the prediction mode and reference line combination can be sorted according to the value of the reference template matching cost based on the preset sorting rules, and the sorting result can be determined or obtained. Optionally, the preset sorting rules can be to sort the values of the reference template matching cost from small to large, so that the prediction mode and reference line combination with the smaller value of the reference template matching cost (i.e., the higher the degree of matching) ranks higher.
[0618] Optionally, the preset matching cost conditions include: the ranking result of the reference template matching cost is in the top preset position, such as the top 3, top 20, top 15, etc.
[0619] Optionally, the intra-frame template matching information of the current block can be determined or obtained based on the reference template information of the current block.
[0620] Optionally, based on the reference template information of the current block, the prediction mode, and at least one reference line, the intra-frame template matching information of the current block is determined or obtained, and based on the intra-frame template matching information of the current block, the first reference line information is determined or obtained, the first reference line information including at least one of mode a1 to mode a12 in the second embodiment.
[0621] Optionally, the intra-frame template matching information of the current block can be determined or obtained based on at least one of the preset reference line information, sub-pixel reference line information, fused reference line information, candidate reference line information and reference line set, as well as the reference template information and prediction mode of the current block.
[0622] Optionally, the prediction mode can be a prediction mode from the list of prediction modes related to the current block.
[0623] Optionally, based on the intra-frame template matching information of the current block, a first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0624] Optionally, the current block information includes at least one of the following: intra-frame template matching information of the current block, candidate block vector of the current block, block vector of the current block, candidate motion vector of the current block, motion vector of the current block, reference template of the current block, position of the current block, block size of the current block, and preset position pixels related to the current block.
[0625] Optionally, the processing method includes:
[0626] Based on the current block size, determine or obtain the reference line set from the first reference line set and the second reference line set;
[0627] Determine or obtain the size of the reference template based on the current block size;
[0628] Based on the reference line set and the prediction mode, determine or obtain the intra-frame template matching information corresponding to the reference template;
[0629] Based on the intra-frame template matching information, at least one first reference line information is determined or obtained;
[0630] The first reference line information includes at least one of modes a1 to a12 in the second embodiment;
[0631] Based on at least one first reference line information, determine or obtain at least one predicted pixel of the current block.
[0632] Optionally, the processing method includes:
[0633] Based on the current block size, determine or obtain the reference line set from the first reference line set and the second reference line set;
[0634] Based on the current block size, determine or obtain the size of the reference template from the first size and the second size;
[0635] Based on the reference line set and prediction mode, determine or obtain intra-frame template matching information corresponding to the size of the reference template;
[0636] Based on the intra-frame template matching information, at least one first reference line information is determined or obtained;
[0637] The first reference line information includes at least one of modes a1 to a12 in the second embodiment;
[0638] Based on at least one first reference line information, determine or obtain at least one predicted pixel of the current block.
[0639] Optionally, if the block size of the current block is less than a preset size threshold, the size of the reference template of the current block is a first size, and / or if the block size of the current block is greater than or equal to the preset size threshold, the size of the reference template of the current block is a second size, where the first size is less than the second size, for example, the first size is 2 and the second size is 4.
[0640] Optionally, if the block size of the current block is less than a preset size threshold, the reference line set is a first reference line set, and / or if the block size of the current block is greater than or equal to the preset size threshold, the reference line set is a second reference line set, and the size of the first reference line set is less than the size of the second reference line set.
[0641] Optionally, the first set of reference lines is {first reference line distance = 0, 1, 3, 5, 7, 12}, and the second set of reference lines is {reference line distance = 0, 1, 3, 5, 7, 9, 11, 13, 15, 17}.
[0642] Optionally, the dimensions of the reference template include at least one of the following: reference template area, reference template length, and reference template width.
[0643] Optionally, the preset size thresholds are 32, 64, etc.
[0644] In this embodiment, for current blocks with larger block sizes (e.g., 32×32, 64×64), their internal textures and structures have higher spatial extensibility. Therefore, larger reference templates can be used to cover richer structural features, enhance the recognition ability of periodic patterns, long edges and / or complex textures, and avoid mismatches caused by insufficient feature expression due to the reference template being too small. For current blocks with smaller block sizes (e.g., 8×8, 16×16), the available pixel area is limited. If an excessively large reference template is used, it is easy to introduce boundary extrapolation errors. Therefore, smaller reference templates can be used to accurately focus local neighborhood information and improve the stability and reliability of the matching process.
[0645] In this embodiment, the first reference line information of the current block is determined or obtained based on the intra-frame template matching information of the current block, so that the processing method of this application embodiment can be combined with the conventional TMRL mode. The intra-frame template matching information of the current block is determined or obtained through the conventional TMRL mode, and at least one first reference information is determined or obtained based on the intra-frame template matching information of the current block. Step S10 is then executed, thereby improving the accuracy of pixel prediction for the current block.
[0646] Method c10: List of prediction modes related to the current block;
[0647] Optionally, the list of prediction patterns associated with the current block includes: a list of the most likely patterns and / or a list of the least likely patterns associated with the current block.
[0648] Optionally, the Most Probable Mode (MPM) list refers to an ordered list of candidate modes pre-generated based on the prediction modes of neighboring encoded blocks when encoding or decoding the intra-prediction mode of the current block. The encoder and / or decoder predict the mode of the current block using this list, requiring only a short index (instead of the full mode number) to be transmitted, which greatly reduces the bit consumption of syntax elements.
[0649] Optionally, the prediction modes in the list of non-most likely modes include at least one of the following: angle prediction mode, intra-frame prediction mode determined or obtained based on neural network, intra-frame prediction mode corresponding to the prediction mode based on extrapolation filter, block vector prediction mode, plane mode, and DC mode.
[0650] Optionally, based on the prediction mode list associated with the current block, at least one of the following can be determined or obtained: a prediction mode, intra-frame template matching information of the current block, rate-distortion cost of the current block, reference template matching cost of the current block, first reference information, and at least one predicted pixel of the current block.
[0651] Optionally, the prediction mode list associated with the current block can help filter target reference lines that match the current block, and at least one predicted pixel of the current block can be determined or obtained based on the prediction mode in the prediction mode list associated with the current block and the target reference line.
[0652] Optionally, based on the prediction mode list related to the current block, first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0653] Optionally, the current block information includes at least one of the following: a prediction mode list related to the current block, intra-frame template matching information of the current block, candidate block vector of the current block, block vector of the current block, candidate motion vector of the current block, motion vector of the current block, reference template of the current block, position of the current block, block size of the current block, and preset position pixels related to the current block.
[0654] Optionally, based on the list of most likely patterns, a list of combinations of prediction patterns and reference lines is determined or obtained, and the first reference line information is determined or obtained based on the list of combinations of prediction patterns and reference lines.
[0655] Optionally, based on the list of most likely patterns, a list of combinations of prediction patterns and reference lines is determined or obtained, and at least one predicted pixel of the current block is determined or obtained based on the list of combinations of prediction patterns and reference lines.
[0656] Optionally, the process of constructing the most likely pattern list for the current block needs to be combined with reference lines. That is, based on the reference lines and the prediction patterns, the matching information of the current block related to the prediction patterns is determined or obtained, such as SAD, SATD, etc. Based on the matching information of the current block, prediction patterns with a high degree of matching with the current block are selected to construct the most likely pattern list. However, the conventional most likely pattern list does not have reference lines corresponding to the prediction patterns. Therefore, in the process of determining the reference lines, it is necessary to reconstruct the combination of prediction patterns and reference lines, and then determine the target combination of patterns and reference lines from it for the prediction of the current block. For example, if the most likely pattern list includes 5 prediction patterns and the candidate reference lines include 5 reference lines, then there will be 25 sets of predicted pattern and reference line combinations that are determined or obtained. This makes the computational workload of determining the target combination of patterns and reference lines large and the processing efficiency low.
[0657] In this embodiment, by reading at least one predicted mode and its corresponding reference line from the most likely mode list, a list of predicted mode and reference line combinations is determined or obtained. The list of predicted mode and reference line combinations includes at least one predicted mode and its corresponding reference line from the most likely mode list. For example, if the most likely mode list includes 5 predicted modes, then the list of predicted mode and reference line combinations determined or obtained includes 5 predicted mode and reference line combinations. The rate-distortion cost of the 5 predicted mode and reference line combinations is determined or obtained. Based on the rate-distortion cost, the target combination of mode and reference line is determined from the 5 predicted mode and reference line combinations. Based on the target combination of mode and reference line, at least one predicted pixel of the current block is determined or obtained. This can ensure prediction accuracy and / or reduce computational load and / or improve processing efficiency.
[0658] Optionally, in TMRL mode, a list of predicted modes and reference line combinations is determined or obtained based on the list of most likely modes associated with the current block; first reference line information is determined or obtained based on the list of predicted modes and reference line combinations; and at least one predicted pixel of the current block is determined or obtained based on at least one first reference line information.
[0659] Optionally, candidate reference lines and / or a set of reference lines are determined or obtained based on the list of most likely patterns. For example, a third set of reference lines is determined or obtained based on the reference line corresponding to at least one predicted pattern in the list of most likely patterns.
[0660] In this embodiment, the prediction mode list associated with the current block can ensure the accuracy of pixel prediction for the current block, and / or reduce the amount of computation and / or improve processing efficiency.
[0661] Method c11, rate-distortion cost of the current block;
[0662] Optionally, at least one prediction result is determined or obtained through at least one reference line and at least one prediction mode, and the rate distortion cost of the current block is determined or obtained based on the residual between the at least one prediction result and the current block.
[0663] Optionally, the rate-distortion cost of the current block is related to the reference line and its corresponding prediction mode.
[0664] Optionally, based on the rate-distortion cost of the current block, a first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0665] Optionally, the current block information includes at least one of the following: rate-distortion cost of the current block, prediction mode list associated with the current block, intra-frame template matching information of the current block, candidate block vector of the current block, block vector of the current block, candidate motion vector of the current block, motion vector of the current block, reference template of the current block, position of the current block, block size of the current block, and preset position pixels associated with the current block.
[0666] Optionally, the reference line with the minimum rate-distortion cost can be determined or obtained from the first reference line information based on the rate-distortion cost of the current block, and used as the target reference line. Based on the target reference line, at least one predicted pixel of the current block can be determined or obtained, thereby improving the accuracy of pixel prediction.
[0667] In this embodiment, the rate-distortion cost of the current block can be used to match a suitable reference line for the current block, thereby improving the pixel prediction accuracy of the current block.
[0668] Method c12, boundary information of the current block;
[0669] Optionally, the boundary information of the current block includes: the boundary pixels of the current block.
[0670] Optionally, based on the boundary information of the current block, first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0671] Optionally, based on the boundary pixels of the current block, at least one of the following can be determined or obtained: a preset reference line, a candidate reference line, a fusion reference line, a reference pixel, and a set of reference lines.
[0672] Optionally, the current block information includes at least one of the following: the boundary information of the current block, the rate-distortion cost of the current block, the prediction mode list associated with the current block, the intra-frame template matching information of the current block, the candidate block vector of the current block, the block vector of the current block, the candidate motion vector of the current block, the motion vector of the current block, the reference template of the current block, the position of the current block, the block size of the current block, and the preset position pixels associated with the current block.
[0673] In this embodiment, the boundary information of the current block originates from the current block itself or its adjacent reconstructed area, thus matching the content of the current block to a high degree. The first reference information determined or obtained based on the boundary information of the current block can more accurately continue and / or reflect the features of the current block, thereby improving the accuracy of pixel prediction.
[0674] Method b2, already encoded block information;
[0675] Optionally, the encoded block information refers to the encoding parameters of neighboring blocks in the current coding tree unit and / or the current coding line that have undergone rate-distortion optimization (RDO) and entropy coding.
[0676] Optionally, based on the encoded block information, first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0677] Optionally, based on the encoded block information and / or the current block information, first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment, and the current block information includes at least one of modes c1 to c12 in the third embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0678] Optionally, the encoded block information can be determined or obtained based on the block size of the current block.
[0679] Optionally, the encoded block is an image block located within a preset reference area, which is determined or obtained based on the block size of the current block.
[0680] Optionally, if the block size of the current block is less than a preset size threshold, the encoded block is an image block located within a preset first reference region, and / or, if the block size of the current block is greater than or equal to the preset size threshold, the encoded block is an image block located within a preset second reference region, where the size of the first reference region is less than the size of the second reference region.
[0681] Optionally, the encoded block information includes at least one of the following methods d1 to d13:
[0682] Method d1, the block size of the encoded block;
[0683] Optionally, the block size of the encoded block includes at least one of the following: the width, height, area, and aspect ratio of the encoded block.
[0684] Optionally, the encoded block information includes: the block size of the encoded block; determining or obtaining first reference line information based on the block size of the encoded block; the first reference line information includes at least one of methods a1 to a12 in the second embodiment; determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information.
[0685] Optionally, the reference line distance is determined or obtained based on the block size of the encoded block. In order to ensure prediction accuracy and / or reduce computational complexity and / or memory access overhead, the selection of the reference line distance is not infinite, but is limited to a reasonable and finite range. Therefore, the embodiment of this application determines or obtains the reference line distance based on the block size of the encoded block, which can ensure prediction accuracy and / or reduce computational complexity, and / or balance coding efficiency and computational complexity.
[0686] Optionally, the reference line distance determined or obtained based on the block size of the encoded block can be a set of reference lines consisting of at least one reference line distance, in which the specific reference line can be indicated by the reference line distance in the set of reference lines.
[0687] Optionally, the reference line distance determined or obtained based on the block size of the encoded block can be the upper limit of the reference line distance for the reference line used to determine or obtain at least one predicted pixel of the current block. For example, if the block size of the encoded block is less than a preset size threshold, it indicates that the block size of the encoded block is small, and the reference line distance is a first distance, indicating that the reference line distances of the reference lines used to determine or obtain at least one predicted pixel of the current block are all less than or equal to the first distance. And / or, if the block size of the encoded block is greater than or equal to the size threshold, it indicates that the block size of the encoded block is large, and the reference line distance is a second distance, indicating that the reference line distances of the reference lines used to determine or obtain at least one predicted pixel of the current block are all less than or equal to the second distance, and the second distance is greater than the first distance.
[0688] Optionally, the reference line distance determined or obtained based on the block size of the encoded block can be the distance between the reference line and the current block and / or the encoded block. For example, if the reference line distance determined or obtained based on the block size of the encoded block is 2, then a reference line with a distance of 2 from the current block is selected.
[0689] Optionally, the size threshold can be 16, 32, 64, 128, 256, etc.
[0690] Optionally, the first distance can be 5, 7, 12, etc., and the second distance can be 13, 15, 17, etc., with the second distance being greater than the first distance.
[0691] Optionally, the reference line position is determined or obtained based on the block size of the encoded block. The reference line position is used to characterize the coordinate information of the reference line's geometric positioning in the image space, and / or the reference line position can reflect the distance relationship between the reference line and the current block and / or the encoded block. Therefore, the reference line position that is compatible with the encoded block and / or the current block can be determined or obtained through the block size of the encoded block.
[0692] Optionally, reference line weights are determined or obtained based on the block size of the encoded block. The reference line weights can characterize the relative importance of their corresponding reference lines in the process of determining or obtaining fusion reference lines.
[0693] Optionally, reference line weights are determined or obtained based on the block size of the encoded block, at least one fused reference line is determined or obtained based on at least one original reference line and its corresponding reference line weights, and at least one predicted pixel of the current block is determined or obtained based on at least one fused reference line.
[0694] Optionally, a set of reference lines is determined or obtained based on the block size of the encoded block. Optionally, the set of reference lines can be method a12 in the second embodiment. For example, the set of reference lines includes: a first set of reference lines, a second set of reference lines, and / or a third set of reference lines.
[0695] Optionally, the first set of reference lines can be a set of predefined, fixed size parameters (e.g., reference line distances), for example, the first set of reference lines is {reference line distance = 0, 1, 3, 5, 7, 12}.
[0696] Optionally, the size parameters of the first reference line set are preset values.
[0697] Optionally, the size parameters of the reference line set include at least one of the following: the number of reference lines, the distance between reference lines, the upper limit of the distance between reference lines, and the interval between adjacent reference lines.
[0698] Optionally, the number of reference lines in the first reference line set is a preset value, for example, the number of reference lines is 6. Optionally, the distance between reference lines in the first reference line set is a preset value, for example, {reference line distance = 0, 1, 3, 5, 7, 12}. Optionally, the interval between adjacent reference lines in the first reference line set is a preset value, for example, the intervals between adjacent reference lines are 1, 2, 2, 2, 5 respectively.
[0699] Optionally, the second set of reference lines can be a set of predefined reference lines, for example, the second set of reference lines is {reference line distance = 0, 1, 3, 5, 7, 9, 11, 13, 15, 17}.
[0700] Optionally, the size of the first set of reference lines is smaller than the size of the second set of reference lines.
[0701] Optionally, the number of reference lines in the first reference line set is less than that in the second reference line set, and / or the upper limit of the reference line distance in the first reference line set is less than the upper limit of the reference line distance in the second reference line set.
[0702] Optionally, the intervals between adjacent reference lines in the second set of reference lines are the same, for example, the interval is 2.
[0703] Optionally, a reference line set is determined or obtained from a first reference line set and a second reference line set based on the block size of the encoded block, wherein the size of the first reference line set is smaller than the size of the second reference line set.
[0704] Optionally, a set of reference lines can be determined or obtained based on the block size of the encoded block, for example, the size of the set of reference lines can be determined or obtained based on the block size of the encoded block.
[0705] Optionally, based on the block size of the encoded block, at least one of the following can be determined or obtained: the number of reference lines, the distance between reference lines, the upper limit of the distance between reference lines, and the interval between adjacent reference lines.
[0706] Optionally, if the block size of the encoded block is less than a preset size threshold, the upper limit of the reference line distance of the reference line set is a first upper limit value, and / or, if the block size of the encoded block is greater than or equal to the preset size threshold, the upper limit of the reference line distance of the reference line set is a second upper limit value, where the first upper limit value is less than the second upper limit value; and / or, if the block size of the encoded block is less than the preset size threshold, the interval between adjacent reference lines of the reference line set is a first interval value, and / or, if the block size of the encoded block is greater than or equal to the preset size threshold, the interval between adjacent reference lines of the reference line set is a second interval value, where the first interval value is less than the second interval value.
[0707] Optionally, the first upper limit value is 7, 12, etc., and the second upper limit value is 13, 15, 17, etc.
[0708] Optionally, the first interval value is 2 and the second interval value is 3. For example, if the block size of the encoded block is less than a preset size threshold, the reference line set is {reference line distance = 0, 1, 3, 5, 7, 9, 11, 13, 15, 17}, and / or, if the block size of the encoded block is greater than or equal to the preset size threshold, the reference line set is {reference line distance = 0, 1, 4, 7, 10, 13, 16}.
[0709] Optionally, if the block size of the encoded block is less than a preset size threshold, then at least one predicted pixel of the current block is determined or obtained according to the first set of reference lines, and / or if the block size of the encoded block is greater than or equal to the preset size threshold, then at least one predicted pixel of the current block is determined or obtained according to the second set of reference lines.
[0710] Optionally, if the block size of the encoded block is less than a preset size threshold, the first reference line set is applied to the MRL mode and / or the TMRL mode, and / or if the block size of the encoded block is greater than or equal to the preset size threshold, the second reference line set is applied to the MRL mode and / or the TMRL mode.
[0711] In this embodiment, image blocks of different sizes have different spatial structure characteristics and reference dependency ranges. By determining or obtaining the first reference line information for determining or obtaining at least one predicted pixel of the current block based on the block size of the encoded block that is related to the current block, the prediction process for the current block can better match the geometric characteristics of the block with the image content distribution, thereby improving the accuracy of pixel prediction.
[0712] Method d2, preset position pixels related to the encoded block;
[0713] Optionally, the preset position pixels associated with the encoded block include: preset adjacent pixels of the encoded block and / or preset non-adjacent pixels of the encoded block.
[0714] Optionally, the encoded block information includes: preset position pixels related to the encoded block; first reference line information is determined or obtained based on the preset position pixels related to the encoded block; the first reference line information includes at least one of methods a1 to a12 in the second embodiment; at least one predicted pixel of the current block is determined or obtained based on at least one first reference line information.
[0715] Optionally, a first reference line information is determined or obtained based on the reference line information of the image block determined or obtained through the preset position pixels associated with the encoded block. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment.
[0716] Optionally, the encoded block information includes: the block size of the encoded block and / or the preset position pixels associated with the encoded block.
[0717] Optionally, the image block determined or obtained by the preset position pixels associated with the encoded block can be the image block to which the preset position pixels associated with the encoded block belong.
[0718] Optionally, the image block determined or obtained by the preset position pixels associated with the encoded block includes: the image block in the encoding unit corresponding to the preset position pixels and / or the image block in the prediction unit corresponding to the prediction position pixels.
[0719] Optionally, the reference line information of the image block determined or obtained through the preset position pixels associated with the encoded block includes: the reference line information of the image block in the encoding unit corresponding to the preset position pixels and / or the reference line information of the image block in the prediction unit corresponding to the prediction position pixels.
[0720] Optionally, the reference line information of the image block determined or obtained through preset position pixels associated with the encoded block includes at least one of the following: pixel-level reference line of the image block, fusion reference line of the image block, candidate reference line of the image block, reference line set of the image block, reference row of the image block, reference column of the image block, reference pixel information of the image block, reference line weight of the image block, reference line position of the image block, reference line distance of the image block, and reference line index of the image block.
[0721] Optionally, candidate reference lines are determined or obtained based on reference line information of image blocks determined or obtained through preset position pixels associated with encoded blocks, and at least one predicted pixel of the current block is determined or obtained based on the candidate reference lines.
[0722] Optionally, a set of reference lines is determined or obtained based on the reference line information of the image block determined or obtained through preset position pixels associated with the encoded block. For example, a third set of reference lines and / or a set of candidate reference lines are determined or obtained. Based on the set of reference lines, at least one predicted pixel of the current block is determined or obtained.
[0723] Optionally, the reference line of the image block to which the pixel at the preset position associated with the encoded block belongs is determined as a candidate reference line and / or a reference line in the reference line set, and at least one predicted pixel of the current block is determined or obtained based on the candidate reference line and / or the reference line in the reference line set.
[0724] Optionally, a third set of reference lines is determined or obtained based on the reference lines of the image block to which the pixels at preset positions related to the encoded block belong. This allows at least one reference line to be stored in the third set of reference lines, and the reference lines in the third set of reference lines are different for each current block, thereby realizing the dynamic generation of the reference line set and improving the accuracy of pixel prediction.
[0725] Optionally, a preset position pixel related to the encoded block is determined or obtained based on the preset pixel position related to the encoded block. The preset pixel position related to the encoded block includes: the preset adjacent pixel position of the encoded block and / or the preset non-adjacent pixel position of the encoded block.
[0726] Optionally, a list of prediction mode and reference line combinations is determined or obtained based on the reference line of the image block determined or obtained through preset position pixels related to the encoded block and its corresponding prediction mode. For example, if the reference line of the image block determined or obtained through preset position pixels related to the encoded block is L1 (reference line index is not 0) and the prediction mode is B1, then the B1-L1 combination is constructed and added to the list of prediction mode and reference line combinations.
[0727] Optionally, based on the list of predicted mode and reference line combinations and the rate-distortion cost of the current block, a target combination of mode and reference line is determined or obtained, and based on the target combination of mode and reference line, at least one predicted pixel of the current block is determined or obtained.
[0728] In this embodiment, the first reference line information of the current block is determined or obtained based on the preset position pixels related to the encoded block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0729] Method d3, the position of the encoded block;
[0730] Optionally, the position of the encoded block includes: the horizontal position of the encoded block and / or the vertical position of the encoded block.
[0731] Optionally, the encoded block information includes: the position of the encoded block; determining or obtaining first reference line information based on the position of the encoded block; the first reference line information includes at least one of modes a1 to a12 in the second embodiment; determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information.
[0732] Optionally, the encoded block information includes at least one of the following: the location of the encoded block, the block size of the encoded block, and the preset position pixels associated with the encoded block.
[0733] Optionally, at least one reference column is determined or obtained based on the horizontal position of the encoded block, and at least one predicted pixel of the current block is determined or obtained based on the at least one reference column.
[0734] Optionally, at least one reference row is determined or obtained based on the vertical position of the encoded block, and at least one predicted pixel of the current block is determined or obtained based on the at least one reference row.
[0735] Optionally, reference rows above and / or reference columns to the left of the encoded block can be selectively used as reference pixel sources, depending on the position of the encoded block, such as the horizontal position and / or the vertical position of the encoded block. This leverages the strong spatial correlation of image pixels in the horizontal and / or vertical directions, avoids the computational complexity of using diagonal and / or distant non-adjacent regions, and / or improves encoding and decoding efficiency.
[0736] In this embodiment, the first reference line information is determined or obtained based on the position of the encoded block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0737] Method d4, reference line information for encoded blocks;
[0738] Optionally, the reference line information of the encoded block includes at least one of the following: pixel reference line of the encoded block, fusion reference line of the encoded block, candidate reference line of the encoded block, reference line set of the encoded block, reference row of the encoded block, reference column of the encoded block, reference pixel information of the encoded block, reference line weight of the encoded block, reference line position of the encoded block, reference line distance of the encoded block, and reference line index of the encoded block.
[0739] Optionally, the reference pixel information of the encoded block includes the boundary pixels of the encoded block and / or the boundary adjacent pixels of the encoded block.
[0740] Optionally, the encoded block information includes: reference line information of the encoded block; determining or obtaining first reference line information based on the reference line information of the encoded block; the first reference line information includes at least one of methods a1 to a12 in the second embodiment; determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information.
[0741] Optionally, the encoded block information includes at least one of the following: reference line information of the encoded block, position of the encoded block, block size of the encoded block, and preset position pixels associated with the encoded block.
[0742] In this embodiment, the first reference line information is determined or obtained based on the reference line information of the encoded block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0743] Method d5, reference template information for the encoded block;
[0744] Optionally, the types of reference templates for encoded blocks include at least one of the following: an upper reference template for an encoded block, a left reference template for an encoded block, a top-left reference template for an encoded block, a block vector reference template determined or obtained by the block vector of an encoded block, and a candidate block vector reference template determined or obtained by the candidate block vector of an encoded block.
[0745] Optionally, the reference template information of the encoded block includes at least one of the following: the reference template size of the encoded block, the reference template length of the encoded block, the reference template width of the encoded block, the upper reference template information of the encoded block, the left reference template information of the encoded block, the upper left reference template information of the encoded block, the block vector reference template information determined or obtained by the block vector of the encoded block, and the candidate block vector reference template information determined or obtained by the candidate block vector of the encoded block.
[0746] Optionally, the reference template information of the encoded block is determined or obtained based on the block size of the encoded block. For example, the size of the reference template of the encoded block, the length of the reference template of the encoded block, and the width of the reference template of the encoded block are determined or obtained based on the block size of the encoded block.
[0747] Optionally, if the block size of the encoded block is less than a preset size threshold, the size of the reference template of the encoded block is a first size, and / or if the block size of the encoded block is greater than or equal to the preset size threshold, the size of the reference template of the encoded block is a second size, wherein the first size is less than the second size.
[0748] In this embodiment, reference templates are typically used for reference line selection. However, this application embodiment expands the reference template of the encoded block from the conventional upper left reference template to a left reference template and / or an upper reference template, so that the upper reference template and the left reference template can correspond to the spatial correlation in the horizontal and vertical directions, respectively. This achieves adaptive reference template matching for prediction direction, improves the accuracy of reference line selection, and thus improves the accuracy of pixel prediction. By decomposing the conventional reference template as described above, the risk of overall reference template mismatch can be reduced. The above method improves the flexibility of template matching and / or prediction performance without increasing signaling overhead.
[0749] Optionally, the block vector reference template determined or obtained through the block vector of the encoded block can be used to determine the image block determined or obtained through the block vector of the encoded block as the block vector reference template. The image block determined or obtained through the block vector of the encoded block usually has a high similarity in content with the encoded block and / or the current block. Therefore, the reference template constructed with it (i.e., the block vector reference template) can more accurately reflect the features of the encoded block and / or the current block, thereby improving the matching degree between the reference line and the current block and improving the accuracy of pixel prediction.
[0750] Optionally, the encoded block information includes: reference template information of the encoded block; determining or obtaining first reference line information based on the reference template information of the encoded block; the first reference line information includes at least one of mode a1 to mode a12 in the second embodiment; determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information.
[0751] Optionally, the encoded block information includes at least one of the following: reference template information of the encoded block, reference line information of the encoded block, position of the encoded block, block size of the encoded block, and preset position pixels related to the encoded block.
[0752] Optionally, the intra-frame template matching information and / or template matching cost of the encoded block can be determined or obtained through the reference template information of the encoded block. At least one target reference line can be determined or obtained based on at least one first reference line information and the intra-frame template matching information and / or template matching cost of the encoded block. At least one predicted pixel of the current block can be determined or obtained based on at least one target reference line.
[0753] In this embodiment, the first reference line information is determined or obtained based on the reference template information of the encoded block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0754] Mode d6, motion vector of the encoded block;
[0755] Optionally, the encoded block information includes: the motion vector of the encoded block; determining or obtaining first reference line information based on the motion vector of the encoded block; the first reference line information includes at least one of mode a1 to mode a12 in the second embodiment; determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information.
[0756] Optionally, a first reference line information is determined or obtained based on the reference line information of the image block determined or obtained through the motion vector of the encoded block. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on the at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0757] Optionally, the encoded block information includes at least one of the following: the motion vector of the encoded block, the reference line information of the encoded block, the reference template of the encoded block, the position of the encoded block, the block size of the encoded block, and the preset position pixels associated with the encoded block.
[0758] Optionally, the reference line information of the image block determined or obtained through the motion vector of the encoded block includes at least one of the following: pixel-level reference line of the image block, fusion reference line of the image block, candidate reference line of the image block, reference line set of the image block, reference row of the image block, reference column of the image block, reference pixel information of the image block, reference line weight of the image block, reference line position of the image block, reference line distance of the image block, and reference line index of the image block.
[0759] Optionally, a third reference line set is determined or obtained based on at least one of the reference line information of the encoded block, the reference line information of the image block determined or obtained by the motion vector of the encoded block, and the reference line of the image block to which the preset position pixel of the encoded block belongs. This allows at least one reference line to be stored in the third reference line set, and the reference lines in the third reference line set are different for each encoded block, thereby realizing the dynamic generation of the reference line set and improving the accuracy of pixel prediction.
[0760] Optionally, a list of prediction mode and reference line combinations is determined or obtained based on the reference line of the image block determined or obtained through the motion vector of the encoded block and its corresponding prediction mode. For example, if the reference line of the image block determined or obtained through the motion vector of the encoded block is L1 (reference line index is not 0) and the prediction mode is B1, then the B1-L1 combination is constructed and added to the list of prediction mode and reference line combinations.
[0761] In this embodiment, the first reference line information is determined or obtained based on the motion vector of the encoded block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0762] Method d7, candidate motion vectors of the encoded block;
[0763] Optionally, based on the candidate motion vectors of the encoded block, first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0764] Optionally, reference line information of an image block is determined or obtained based on the candidate motion vectors of the encoded block, and first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment. At least one predicted pixel of the current block is determined or obtained based on at least one first reference line information.
[0765] Optionally, the encoded block information includes at least one of the following: candidate motion vector of the encoded block, motion vector of the encoded block, reference line information of the encoded block, reference template of the encoded block, position of the encoded block, block size of the encoded block, and preset position pixels associated with the encoded block.
[0766] Optionally, determining or obtaining the reference line information of an image block through the candidate motion vectors of the encoded block includes at least one of the following: pixel-level reference lines of the image block, fusion reference lines of the image block, candidate reference lines of the image block, reference line set of the image block, reference rows of the image block, reference columns of the image block, reference pixel information of the image block, reference line weight of the image block, reference line position of the image block, reference line distance of the image block, and reference line index of the image block.
[0767] Optionally, a third reference line set is determined or obtained based on at least one of the following: reference line information of the image block determined or obtained through the candidate motion vector of the encoded block, reference line information of the encoded block, reference line information of the image block determined or obtained through the motion vector of the encoded block, and reference line of the image block to which the preset position pixel of the encoded block belongs. This allows at least one reference line to be stored in the third reference line set, and the reference lines in the third reference line set are different for each encoded block, thereby realizing the dynamic generation of the reference line set and improving the accuracy of pixel prediction.
[0768] Optionally, based on the reference line of the image block determined or obtained through the candidate motion vector of the encoded block and its corresponding prediction mode, a list of prediction mode and reference line combination is determined or obtained. For example, if the reference line of the image block determined or obtained through the candidate motion vector of the encoded block is L1 (reference line index is not 0) and the prediction mode is B1, then the B1-L1 combination is constructed and added to the list of prediction mode and reference line combination.
[0769] In this embodiment, the first reference line information is determined or obtained based on the candidate motion vector of the encoded block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0770] Mode d8, the block vector of the encoded block;
[0771] Optionally, based on the block vector of the encoded block, first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0772] Optionally, a first reference line information is determined or obtained based on the reference line information of the image block determined or obtained through the block vector of the encoded block. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on the at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0773] Optionally, the encoded block information includes at least one of the following: the block vector of the encoded block, the candidate motion vector of the encoded block, the motion vector of the encoded block, the reference line information of the encoded block, the reference template of the encoded block, the position of the encoded block, the block size of the encoded block, and the preset position pixels associated with the encoded block.
[0774] Optionally, determining or obtaining the reference line information of an image block through the block vector of the encoded block includes at least one of the following: pixel-level reference line of the image block, fusion reference line of the image block, candidate reference line of the image block, reference line set of the image block, reference row of the image block, reference column of the image block, reference pixel information of the image block, reference line weight of the image block, reference line position of the image block, reference line distance of the image block, and reference line index of the image block.
[0775] Optionally, a third reference line set is determined or obtained based on at least one of the following: reference line information of an image block determined or obtained through the block vector of an encoded block, reference line information of an image block determined or obtained through the candidate motion vector of an encoded block, reference line information of an encoded block, reference line information of an image block determined or obtained through the motion vector of an encoded block, and reference line of the image block to which a pixel at a preset position related to the encoded block belongs. This allows at least one reference line to be stored in the third reference line set, and the reference lines in the third reference line set are different for each encoded block, thereby realizing the dynamic generation of the reference line set and improving the accuracy of pixel prediction.
[0776] Optionally, a list of prediction mode and reference line combinations is determined or obtained based on the reference line of the image block determined or obtained through the block vector of the encoded block and its corresponding prediction mode. For example, if the reference line of the image block determined or obtained through the block vector of the encoded block is L1 (reference line index is not 0) and the prediction mode is B1, then the B1-L1 combination is constructed and added to the list of prediction mode and reference line combinations.
[0777] In this embodiment, the first reference line information is determined or obtained based on the block vector of the encoded block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0778] Method d9, candidate block vector of encoded blocks;
[0779] Optionally, based on the candidate block vector of the encoded block, first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0780] Optionally, a first reference line information is determined or obtained based on the reference line information of the image block determined or obtained through the candidate block vector of the encoded block. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on the at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0781] Optionally, the encoded block information includes at least one of the following: candidate block vector of the encoded block, block vector of the encoded block, reference line information of the encoded block, reference template of the encoded block, position of the encoded block, block size of the encoded block, and preset position pixels associated with the encoded block.
[0782] Optionally, determining or obtaining the reference line information of an image block through the candidate block vector of the encoded block includes at least one of the following: pixel-level reference line of the image block, fusion reference line of the image block, candidate reference line of the image block, reference line set of the image block, reference row of the image block, reference column of the image block, reference pixel information of the image block, reference line weight of the image block, reference line position of the image block, reference line distance of the image block, and reference line index of the image block.
[0783] Optionally, a third reference line set is determined or obtained based on at least one of the following: reference line information of image blocks determined or obtained through candidate block vectors of encoded blocks, reference line information of image blocks determined or obtained through block vectors of encoded blocks, reference line information of image blocks determined or obtained through candidate motion vectors of encoded blocks, reference line information of encoded blocks, reference line information of image blocks determined or obtained through motion vectors of encoded blocks, and reference line of the image block to which a pixel at a preset position related to the encoded block belongs. This allows at least one reference line to be stored in the third reference line set, and the reference lines in the third reference line set are different for each encoded block, thereby realizing the dynamic generation of the reference line set and improving the accuracy of pixel prediction.
[0784] Optionally, a list of prediction mode and reference line combinations is determined or obtained based on the reference line of the image block determined or obtained through the candidate block vector of the encoded block and its corresponding prediction mode. For example, if the reference line of the image block determined or obtained through the candidate block vector of the encoded block is L1 (reference line index is not 0) and the prediction mode is B1, then the B1-L1 combination is constructed and added to the list of prediction mode and reference line combinations.
[0785] In this embodiment, the first reference line information is determined or obtained based on the candidate block vector of the encoded block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0786] Method d10, intra-frame template matching information of the encoded block;
[0787] Optionally, the intra-frame template matching information of the coded block includes: at least one prediction mode and reference line combination whose reference template matching cost determined or obtained through the reference template of the coded block satisfies the preset matching cost condition, and / or the reference template matching cost of the coded block related to at least one prediction mode and reference line combination. The intra-frame template matching information of the coded block is used to guide the subsequent rate-distortion optimization process, narrow the candidate range, and improve coding efficiency.
[0788] Optionally, the reference template matching cost of the encoded block refers to the similarity and / or error between the prediction result (e.g., predicted pixels and / or predicted blocks) of the encoded block determined or obtained through the reference line and the reference template of the encoded block. For example, the reference template matching cost of the encoded block includes: SAD, SATD and / or MRSAD.
[0789] Optionally, if the reference template matching cost of the coded block associated with the prediction mode and the reference line combination meets the preset matching cost condition, it indicates that the error of the prediction result of the coded block determined or obtained by the prediction mode and the reference line combination is small, and / or, if the reference template matching cost of the coded block associated with the prediction mode and the reference line combination does not meet the preset matching cost condition, it indicates that the error of the prediction result of the coded block determined or obtained by the prediction mode and the reference line combination is large.
[0790] Optionally, the prediction mode and reference line combination can be sorted according to the value of the reference template matching cost based on the preset sorting rules, and the sorting result can be determined or obtained. Optionally, the preset sorting rules can be to sort the values of the reference template matching cost from small to large, so that the prediction mode and reference line combination with the smaller value of the reference template matching cost (i.e., the higher the degree of matching) ranks higher.
[0791] Optionally, the preset matching cost conditions include: the ranking result of the reference template matching cost is in the top preset position, such as the top 3, top 20, top 15, etc.
[0792] Optionally, the intra-frame template matching information of the encoded block can be determined or obtained based on the reference template information of the encoded block.
[0793] Optionally, the intra-frame template matching information of the coded block can be determined or obtained based on the reference template information, prediction mode, and reference line information of the coded block.
[0794] Optionally, the prediction mode can be a prediction mode from a list of prediction modes associated with the encoded block.
[0795] Optionally, based on the intra-frame template matching information of the encoded block, first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0796] Optionally, the encoded block information includes at least one of the following: intra-frame template matching information of the encoded block, reference line information of the encoded block, candidate block vector of the encoded block, block vector of the encoded block, candidate motion vector of the encoded block, motion vector of the encoded block, reference template of the encoded block, position of the encoded block, block size of the encoded block, and preset position pixels associated with the encoded block.
[0797] In this embodiment, the first reference line information is determined or obtained based on the intra-frame template matching information of the encoded block, so that the processing method of this application embodiment can be combined with the conventional TMRL mode. The intra-frame template matching information of the encoded block is determined or obtained through the conventional TMRL mode, and at least one first reference information is determined or obtained based on the intra-frame template matching information of the current block. Step S10 is then executed, thereby improving the accuracy of pixel prediction for the current block.
[0798] Method d11, a list of prediction modes associated with the encoded block;
[0799] Optionally, the list of predicted patterns associated with the encoded block includes at least one of the most likely pattern list and the least likely pattern list associated with the encoded block.
[0800] Optionally, the prediction modes in the list of non-most likely modes include at least one of the following: angle prediction mode, intra-frame prediction mode determined or obtained based on neural network, intra-frame prediction mode corresponding to the prediction mode based on extrapolation filter, block vector prediction mode, plane mode, and DC mode.
[0801] Optionally, based on a list of prediction modes associated with the encoded block, first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0802] Optionally, the encoded block information includes at least one of the following: a prediction mode list associated with the encoded block, intra-frame template matching information of the encoded block, candidate block vector of the encoded block, block vector of the encoded block, candidate motion vector of the encoded block, motion vector of the encoded block, reference template of the encoded block, position of the encoded block, block size of the encoded block, and preset position pixels associated with the encoded block.
[0803] Optionally, based on the list of most likely patterns associated with the encoded block, a list of combinations of prediction patterns and reference lines is determined or obtained, and the first reference line information is determined or obtained based on the list of combinations of prediction patterns and reference lines.
[0804] Optionally, based on the list of most likely patterns associated with the encoded block, a list of combinations of prediction patterns and reference lines is determined or obtained, and at least one predicted pixel of the current block is determined or obtained based on the list of combinations of prediction patterns and reference lines.
[0805] Optionally, the process of constructing the most likely pattern list related to the encoded block needs to be combined with reference lines. That is, based on the reference lines and the prediction patterns, the matching information of the encoded blocks related to the prediction patterns is determined or obtained, such as SAD, SATD, etc. Based on the matching information of the encoded blocks, prediction patterns with a high degree of matching with the encoded blocks are selected to construct the most likely pattern list. However, the conventional most likely pattern list does not have reference lines corresponding to the prediction patterns. Therefore, in the process of determining the reference lines, it is necessary to reconstruct the combination of prediction patterns and reference lines, and then determine the target combination of patterns and reference lines from it for the current block prediction. For example, if the most likely pattern list includes 5 prediction patterns and the candidate reference lines include 5 reference lines, then there will be 25 sets of predicted pattern and reference line combinations determined or obtained. This makes the computational workload of determining the target combination of patterns and reference lines large and the processing efficiency low.
[0806] In this embodiment, by reading at least one predicted mode and its corresponding reference line from the most probable mode list associated with the encoded block, a list of predicted mode and reference line combinations is determined or obtained. The list of predicted mode and reference line combinations includes at least one predicted mode and its corresponding reference line from the most probable mode list. For example, if the most probable mode list includes 5 predicted modes, then the list of predicted mode and reference line combinations determined or obtained includes 5 predicted mode and reference line combinations. The rate-distortion cost of the 5 predicted mode and reference line combinations is determined or obtained. Based on the rate-distortion cost, the target combination of mode and reference line is determined from the 5 predicted mode and reference line combinations. Based on the target combination of mode and reference line, at least one predicted pixel of the current block is determined or obtained. This can ensure prediction accuracy and / or reduce computational load and / or improve processing efficiency.
[0807] Optionally, in TMRL mode, a list of predicted modes and reference lines is determined or obtained based on the list of most likely modes associated with the encoded block; first reference line information is determined or obtained based on the list of predicted modes and reference lines; and at least one predicted pixel of the current block is determined or obtained based on at least one first reference line information.
[0808] Optionally, candidate reference lines and / or a set of reference lines are determined or obtained based on the list of most likely patterns associated with the encoded block. For example, a third set of reference lines is determined or obtained based on the reference line corresponding to at least one predicted pattern in the list of most likely patterns associated with the encoded block.
[0809] In this embodiment, the prediction mode list associated with the encoded block can ensure the pixel prediction accuracy of the current block, and / or reduce the amount of computation and / or improve processing efficiency.
[0810] Method d12, boundary information of the encoded block;
[0811] Optionally, the boundary information of the encoded block includes: the boundary pixels of the encoded block and / or the boundary adjacent pixels of the encoded block.
[0812] Optionally, the boundary pixels of an image block (e.g., an encoded block, a decoded block, etc.) are pixels located at the inner boundary of the image block, and the boundary adjacent pixels of an image block (e.g., an encoded block, a decoded block, etc.) are pixels adjacent to the boundary of the image block and located outside the image block. The boundary adjacent pixels of one image block can be the boundary pixels of another image block.
[0813] Optionally, based on the boundary information of the encoded block, first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0814] Optionally, a reference line distance is determined or obtained based on the boundary pixels of the encoded block and / or the boundary adjacent pixels of the encoded block. Based on the reference line distance, first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0815] Referring to Figure 16, the upper adjacent encoded block (i.e., image block A2) and the left adjacent encoded block (i.e., image block B2) of the current block are determined or obtained. Based on the lower boundary pixels of image block A2 and / or the right boundary pixels of image block B2, reference line L0 is determined or obtained. Based on the upper boundary adjacent pixels, the left boundary adjacent pixels of image block A2 and / or the left boundary adjacent pixels of image block B2, reference line L1 is determined or obtained. Reference lines L0 and / or L1 are added to the reference line set, for example, the third reference line set and / or the candidate reference line set.
[0816] Referring to Figure 17, the upper adjacent encoded block (i.e., image block A2) and the left adjacent encoded block (i.e., image block B2) of the current block are determined or obtained. Based on the lower boundary pixels of image block A2 and / or the right boundary pixels of image block B2, reference line L0 is determined or obtained. Based on the upper boundary pixels, left boundary pixels of image block A2 and / or the left boundary pixels of image block B2, reference line L1 is determined or obtained. Based on the upper boundary adjacent pixels, left boundary adjacent pixels of image block A2 and / or the left boundary adjacent pixels of image block B2, reference line L2 is determined or obtained. Reference lines L0, L1 and / or L2 are added to the reference line set, for example, the third reference line set and / or the candidate reference line set.
[0817] Referring to Figure 18, the following are determined or obtained: the upper adjacent encoded blocks (i.e., image blocks D1 and F1), the left adjacent encoded block (i.e., image block G1), the upper left adjacent encoded block (i.e., image block B1), the upper non-adjacent encoded blocks (i.e., image blocks E1 and C1), and the upper left non-adjacent encoded block (i.e., image block A1). Based on the boundary pixels of image blocks F1, D1, and / or G1, reference line L0 is determined or obtained. Based on the boundary pixels of image block E1, reference line L1 is determined or obtained. Based on the boundary pixels of image block C1 and / or A1, reference line L2 is determined or obtained. Based on the boundary pixels of image blocks C1, B1, A1, and / or G1, reference line L3 is determined or obtained. At least one of reference lines L0 to L3 is added to the reference line set, for example, the third reference line set and / or the candidate reference line set.
[0818] Optionally, the boundary adjacent pixels of one image block can be the boundary pixels of another image block. For example, the boundary pixel P0 of image block C1 shown in FIG18 is the boundary adjacent pixel of image block E1, and the boundary adjacent pixel P1 of image block F1 shown in FIG18 is the boundary pixel of image block E1.
[0819] Optionally, the first reference line information can be determined or obtained based on the boundary pixels of the first image block and / or the boundary adjacent pixels of the second image block. For example, at least one reference line can be determined or obtained.
[0820] Referring to Figure 19, the upper adjacent encoded blocks (i.e., image blocks D1 and F1), the left adjacent encoded block (i.e., image block G1), the upper left adjacent encoded block (i.e., image block B1), the upper non-adjacent encoded blocks (i.e., image blocks E1 and C1), and the upper left non-adjacent encoded block (i.e., image block A1) of the current block are determined or obtained. Based on the boundary pixels of image blocks F1, D1, and / or G1, a reference template is determined or obtained and applied to the TMRL mode. Based on the boundary pixels of image block E1, a reference line L1 is determined or obtained. Based on the boundary pixels of image block C1 and / or A1, a reference line L2 is determined or obtained. Based on the boundary adjacent pixels of image blocks C1, B1, A1, and / or G1, a reference line L3 is determined or obtained. At least one of the reference lines L1 to L3 is added to the reference line set, for example, a third reference line set and / or a candidate reference line set.
[0821] In this embodiment, the first reference line information is determined or obtained based on the boundary information of the encoded block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0822] Method d13, the partitioning information of the encoded block;
[0823] Optionally, the block partitioning information of the encoded block is the block partitioning information used by the image block that has been encoded during the encoding process.
[0824] Optionally, based on the partitioning information of the encoded block, first reference line information is determined or obtained. The first reference line information includes at least one of the methods a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0825] Optionally, based on the partitioning information of the encoded blocks, the boundary information of the encoded blocks is determined or obtained. The boundary information of the encoded blocks includes: the boundary pixels of the encoded blocks and / or the boundary adjacent pixels of the encoded blocks.
[0826] In this embodiment, the first reference line information is determined or obtained based on the partitioning information of the encoded block, so that the reference line information can cover reference lines of various distances, directions and types, providing rich reference line selection for the prediction of the current block, improving the flexibility of the prediction of the current block, and thus improving the accuracy of the prediction of the pixels of the current block.
[0827] Method b3, decoded block information;
[0828] Optionally, decoded block information refers to information about blocks that have completed the decoding process (e.g., entropy decoding, inverse quantization, inverse transform, prediction reconstruction, etc.) and have been written to the frame buffer.
[0829] Optionally, based on the decoded block information, first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0830] Optionally, based on the decoded block information, the encoded block information, and / or the current block information, first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment, the current block information includes at least one of modes c1 to c12 in the third embodiment, and the encoded block information includes at least one of modes d1 to d13 in the third embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0831] Optionally, the information of the decoded blocks can be determined or obtained based on the block size of the current block.
[0832] Optionally, the decoded block is an image block located within a preset reference area, which is determined or obtained based on the block size of the current block.
[0833] Optionally, if the block size of the current block is less than a preset size threshold, the decoded block is an image block located within a preset first reference region, and / or, if the block size of the current block is greater than or equal to the preset size threshold, the decoded block is an image block located within a preset second reference region, where the size of the first reference region is less than the size of the second reference region.
[0834] Optionally, the decoded block information includes at least one of the following methods e1 to e13:
[0835] Method e1, the block size of the decoded block;
[0836] Optionally, the block size of the decoded block includes at least one of the following: width, height, area, and aspect ratio of the decoded block.
[0837] Optionally, based on the block size of the decoded block, first reference line information is determined or obtained. The first reference line information includes at least one of modes a1 to a12 in the second embodiment. Based on at least one first reference line information, at least one predicted pixel of the current block is determined or obtained.
[0838] Optionally, the reference line distance is determined or obtained based on the block size of the decoded block. Optionally, the reference line distance determined or obtained based on the block size of the decoded block can be a set of reference lines consisting of at least one reference line distance, in which a specific reference line can be indicated by the reference line distance in the set of reference lines.
[0839] Optionally, the reference line distance determined or obtained based on the block size of the decoded block can be the upper limit of the reference line distance for the reference line used to determine or obtain at least one predicted pixel of the current block. For example, if the block size of the decoded block is less than a preset size threshold, it indicates that the block size of the decoded block is small, and the reference line distance is a first distance, indicating that the reference line distances of the reference lines used to determine or obtain at least one predicted pixel of the current block are all less than or equal to the first distance. And / or, if the block size of the decoded block is greater than or equal to the size threshold, it indicates that the block size of the decoded block is large, and the reference line distance is a second distance, indicating that the reference line distances of the reference lines used to determine or obtain at least one predicted pixel of the current block are all less than or equal to the second distance, and the second distance is greater than the first distance.
[0840] Optionally, the reference line distance determined or obtained based on the block size of the decoded block can be the distance between the reference line and the current block and / or the decoded block. For example, if the reference line distance determined or obtained based on the block size of the decoded block is 2, then a reference line with a distance of 2 from the current block is selected.
[0841] Optionally, the reference line position is determined or obtained based on the block size of the decoded block. The reference line position is used to characterize the coordinate information of the reference line's geometric positioning in the image space, and / or the reference line position can reflect the distance relationship between the reference line and the current block and / or the decoded block. Therefore, the reference line position that is compatible with the decoded block and / or the current block can be determined or obtained through the block size of...
Claims
1. A processing method, wherein, Including the following steps: S10, based on at least one first reference line information, determine or obtain at least one predicted pixel of the current block.
2. The processing method as described in claim 1, wherein, The first reference line information includes at least one of the following: Preset reference line information; Pixel-level reference line information; Integrate reference line information; Candidate reference line information; Reference line set; Reference line; Reference column; Reference pixel information; Reference line weights; Reference line position; Reference line distance; Reference line index.
3. The processing method as described in claim 2, wherein, The reference line set includes: a first reference line set and / or a second reference line set; and / or, it also includes at least one of the following: The size of the first set of reference lines is smaller than the size of the second set of reference lines; The size parameters of the first reference line set are preset values; The size of the second reference line set is determined or obtained based on the current block information, encoded block information, and / or decoded block information; The first set of reference lines and / or the second set of reference lines includes a set of candidate reference lines; The reference line set is determined or obtained based on the current block size; The position of the reference line is determined or obtained based on the current block size; The distance to the reference line is determined or obtained based on the current block size.
4. The processing method as described in claim 1, wherein, It also includes at least one of the following: Step S10 includes: determining or obtaining at least one predicted pixel of the current block based on at least one first reference line information and at least one prediction mode; Step S10 includes: determining or obtaining at least one reference pixel based on at least one first reference line information, and determining or obtaining at least one predicted pixel of the current block based on at least one reference pixel; The first reference line information is determined or obtained based on at least one of the following: the second reference line information, the current block information, the encoded block information, and the decoded block information.
5. The processing method as described in claim 4, wherein, The current block information includes at least one of the following: The current block size; Preset position pixels related to the current block; The current block position; Reference template information for the current block; The motion vector of the current block; Candidate motion vectors for the current block; The block vector of the current block; The candidate block vector of the current block; Intra-frame template matching information for the current block; List of prediction modes related to the current block; Rate distortion cost of the current block; Boundary information of the current block.
6. The processing method as described in claim 4, wherein, The encoded block information includes at least one of the following: the block size of the encoded block, the preset position pixels associated with the encoded block, the position of the encoded block, the reference line information of the encoded block, the reference template information of the encoded block, the motion vector of the encoded block, the candidate motion vector of the encoded block, the block vector of the encoded block, the candidate block vector of the encoded block, the intra-frame template matching information of the encoded block, the prediction mode list associated with the encoded block, the boundary information of the encoded block, and the partitioning information of the encoded block; and / or, The decoded block information includes at least one of the following: the block size of the decoded block, the preset position pixels associated with the decoded block, the position of the decoded block, the reference line information of the decoded block, the reference template information of the decoded block, the motion vector of the decoded block, the candidate motion vector of the decoded block, the block vector of the decoded block, the candidate block vector of the decoded block, the intra-frame template matching information of the decoded block, the prediction mode list associated with the decoded block, the boundary information of the decoded block, and the partitioning information of the decoded block.
7. The processing method as described in claim 4, wherein, The second reference line information includes at least one of the following: at least one set of reference lines, reference line information of an encoded block, at least two reference line weights, and reference lines at preset positions; and / or, the first reference line information is determined or obtained based on the second reference line information, including at least one of the following: The first reference line information is determined or obtained based on at least one set of reference lines; The first reference line information is determined or obtained based on the reference line information of the encoded block; The information of the first reference line is determined or obtained based on the weights of at least two reference lines; The first reference line information is determined or obtained based on the reference line at the preset position.
8. The processing method as described in claim 4, wherein, The first reference line information is determined or obtained based on at least one of the current block information, encoded block information, and decoded block information, including at least one of the following: The first reference line information is determined or obtained based on the current block size; The first reference line information is determined or obtained based on the reference template matching cost of the current block; The first reference line information is determined or obtained based on the motion vectors of the current block, the encoded block, and / or the decoded block; The first reference line information is determined or obtained based on the candidate motion vectors of the current block, the encoded block, and / or the decoded block; The first reference line information is determined or obtained based on the block vector of the current block, the encoded block, and / or the decoded block; The first reference line information is determined or obtained based on the candidate block vectors of the current block, the encoded block, and / or the decoded block; The first reference line information is determined or obtained based on the intra-frame template matching information of the current block, the encoded block, and / or the decoded block; The first reference line information is determined or obtained based on a list of prediction modes and reference line combinations determined or obtained through the current block, encoded blocks, and / or decoded blocks; The first reference line information is determined or obtained based on the reference line information of the image block determined or obtained through preset position pixels related to the current block, the encoded block, and / or the decoded block; The first reference line information is determined or obtained based on the list of prediction modes related to the current block; The first reference line information is determined or obtained based on the rate-distortion cost of the current block; The first reference line information is determined or obtained based on the reference line information of the encoded block and / or the decoded block; The first reference line information is determined or obtained based on the boundary information of the encoded block and / or the decoded block; The first reference line information is determined or obtained based on the division information of the encoded region and / or encoded block; The first reference line information is determined or obtained based on the division information of the decoded region and / or decoded block.
9. A processing apparatus, wherein, include: The memory and the processor, wherein the memory stores a processing program, and the processing program, when executed by the processor, implements the steps of the processing method as described in claim 1.
10. A storage medium, wherein, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the processing method as described in claim 1.