CN115834902A - Prediction method, encoding method, decoding method of coding unit and apparatus thereof - Google Patents

Prediction method, encoding method, decoding method of coding unit and apparatus thereof Download PDF

Info

Publication number
CN115834902A
CN115834902A CN202211193669.8A CN202211193669A CN115834902A CN 115834902 A CN115834902 A CN 115834902A CN 202211193669 A CN202211193669 A CN 202211193669A CN 115834902 A CN115834902 A CN 115834902A
Authority
CN
China
Prior art keywords
prediction
coding unit
prediction information
region
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211193669.8A
Other languages
Chinese (zh)
Inventor
方诚
林聚财
江东
殷俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202211193669.8A priority Critical patent/CN115834902A/en
Publication of CN115834902A publication Critical patent/CN115834902A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The application discloses a prediction method, an encoding method, a decoding method and equipment of a coding unit. The prediction method comprises the following steps: determining a dividing line region in the coding unit based on the image information of the coding unit; acquiring first prediction information of a parting line region in a first prediction mode and second prediction information of the parting line region in a second prediction mode; and acquiring third prediction information of the dividing line region based on the first prediction information and the second prediction information. By the mode, the width of the dividing line region can be flexibly set based on the image information of the coding unit, and the prediction method has better adaptability to coding units with different image information and can improve the image quality.

Description

Prediction method, encoding method, decoding method of coding unit and apparatus thereof
Technical Field
The present application relates to the field of video coding prediction technologies, and in particular, to a prediction method, an encoding method, a decoding method, and devices for a coding unit.
Background
In video coding, when an image frame is coded, the image frame needs to be divided into a plurality of maximum coding units, then coding units with different sizes are divided for each maximum coding unit, and the video coding is carried out by taking the coding units as units.
Currently, a geometric partitioning mode exists in the partitioning of the maximum coding unit, the mode divides the coding unit into two geometric blocks by cutting a cut, the position of a partition line between the two geometric blocks is mathematically obtained according to an angle parameter and an offset parameter of a specific partition, and the two parts partitioned by the coding unit are predicted in respective prediction modes and respectively obtain respective prediction information. However, for the pixels near the dividing line and the pixels in the area of the dividing line, it needs to predict once by using two prediction methods and then carry out weighting. However, in this mode, the width of the dividing line region is fixed, and the optimum image quality cannot be provided when performing the coding prediction for coding units of different sizes and different types of contents.
Disclosure of Invention
The application provides a prediction method, an encoding method, a decoding method and equipment of an encoding unit, which can determine a dividing line region based on image information of the encoding unit so as to improve the image quality of encoding prediction.
In order to solve the technical problem, the application adopts a technical scheme that: there is provided a prediction method of a coding unit, the method including:
determining a dividing line region in the coding unit based on the image information of the coding unit; acquiring first prediction information of a parting line region in a first prediction mode and second prediction information of the parting line region in a second prediction mode; and acquiring third prediction information of the dividing line region based on the first prediction information and the second prediction information.
In a possible implementation manner, the coding unit further includes a first coding region located on a first side of the partition line region and a second coding region located on a second side of the partition line region, and after obtaining third prediction information of the partition line region based on the first prediction information and the second prediction information, the prediction method further includes:
acquiring fourth prediction information of the first coding region in a first prediction mode and fifth prediction information of the second coding region in a second prediction mode; prediction information of the coding unit is acquired based on the third prediction information, the fourth prediction information, and the fifth prediction information.
In one possible implementation, the prediction method of the coding unit further includes:
setting a plurality of width parameters based on image information of the encoding unit; determining cost values corresponding to at least part of the width parameters in the width parameters; the cost value is determined based on the associated partition line region and the prediction information; and predicting other coding units according to the width parameter corresponding to the minimum value in the determined cost values, wherein the other coding units are positioned in the same image frame with the coding unit.
In a possible implementation manner, the dividing line region includes a first dividing region and a second dividing region located at two sides of the dividing line, and the width parameter includes a width value of the first dividing region and the second dividing region, or a first width ratio of the first dividing region to the second dividing region.
In one possible implementation manner, the encoding unit includes a first sub-encoding unit and a second sub-encoding unit located on both sides of the dividing line, the first sub-encoding unit includes a first encoding region and a first dividing line region, the second sub-encoding unit includes a second encoding region and a second dividing line region, the first dividing line region and the second dividing line region are disposed close to the dividing line to form the dividing line region, and determining the dividing line region in the encoding unit based on the image information of the encoding unit includes:
acquiring a second width ratio between the first divided area and the second divided area based on the image information of the first sub-coding unit and the image information of the second sub-coding unit; determining the width of the first division area and the width of the second division area based on the reference width and the second width ratio; and determining a dividing line region in the coding unit based on the dividing line, the width of the first dividing region and the width of the second dividing region.
In one possible implementation manner, obtaining a second width ratio between the first divided region and the second divided region based on the image information of the first sub-coding unit and the image information of the second sub-coding unit includes:
acquiring a first area of the first sub-coding region and a second area of the second sub-coding unit, and calculating an area ratio between the first area and the second area; the second width ratio is obtained based on the area ratio.
In one possible implementation manner, obtaining a second width ratio between the first divided region and the second divided region based on the image information of the first sub-coding unit and the image information of the second sub-coding unit includes:
acquiring a first distance from each pixel block in the first sub-coding unit to the dividing line, and acquiring a second distance from each pixel block in the second sub-coding unit to the dividing line; calculating the distance proportion between the maximum value in the first distance and the maximum value in the second distance; a second width ratio is obtained based on the distance ratio.
In one possible implementation, the size relationship between the width of the first partition region and the width of the second partition region is consistent with the size relationship between the first area of the first sub-coding unit and the second area of the second sub-coding region.
In one possible implementation, determining a dividing line region in a coding unit based on image information of the coding unit includes:
acquiring the size of the coding unit based on the image information of the coding unit; the width of the dividing line region in the coding unit is acquired based on the size, and the dividing line region in the coding unit is determined based on the dividing line and the width of the coding unit.
In one possible implementation, the size of the coding unit is positively correlated to the width of the dividing line region in the coding unit.
In one possible implementation, the prediction method of the coding unit further includes:
acquiring the rate distortion cost value of a coding unit after prediction; judging whether the rate distortion cost value is smaller than a preset threshold value or not; and in response to the rate distortion cost value being smaller than a preset threshold value, predicting the coding unit by adopting the prediction information of the coding unit.
In one possible implementation, the prediction method further includes: predicting the coding unit by using the first prediction mode and the second prediction mode to respectively obtain sixth prediction information and seventh prediction information of the coding unit; in one possible implementation, the sixth prediction information includes the first prediction information, and the seventh prediction information includes the second prediction information.
In a possible implementation manner, obtaining third prediction information of the partition line region based on the first prediction information and the second prediction information includes:
and inputting the sixth prediction information and the seventh prediction information into a neural network prediction model for prediction to obtain third prediction information of the parting line region.
The coding unit further includes a first coding region located at a first side of the partition line region and a second coding region located at a second side of the partition line region, and acquires third prediction information of the partition line region based on the first prediction information and the second prediction information, including:
in a possible implementation manner, mask processing is performed on the sixth prediction information and the seventh prediction information to obtain first prediction information and second prediction information; and inputting the first prediction information and the second prediction information obtained after the mask processing into a neural network prediction model for prediction to obtain third prediction information of the parting line region.
The coding unit further comprises a first coding region located at a first side of the partition line region and a second coding region located at a second side of the partition line region, and the prediction method further comprises:
acquiring fourth prediction information of the first coding region in a first prediction mode and fifth prediction information of the second coding region in a second prediction mode;
acquiring third prediction information of the dividing line region based on the first prediction information and the second prediction information, wherein the third prediction information comprises:
obtaining eighth prediction information of the coding unit in the first prediction mode based on the fourth prediction information, the fifth prediction information, and the first prediction information;
obtaining ninth prediction information of the coding unit in the second prediction mode based on the fourth prediction information, the fifth prediction information and the second prediction information;
inputting the eighth prediction information and the ninth prediction information into the neural network prediction model for prediction to obtain third prediction information of the parting line region.
In order to solve the technical problem, the application adopts a technical scheme that: providing an encoding method, which comprises the steps of acquiring third prediction information of a coding unit partition line region in the prediction method; and encoding the third prediction information of the dividing line region into the code stream of the coding unit.
In a possible implementation manner, the encoding method further includes defining a syntax element of the image based on the rate-distortion cost value predicted by the encoding unit; in one possible implementation, when the rate-distortion cost value is smaller than a preset threshold, the syntax element is defined as a preset identifier, so as to predict the coding unit by using the prediction information of the coding unit based on the preset identifier.
In order to solve the technical problem, the application adopts a technical scheme that: providing a decoding method, wherein the decoding method comprises the steps of obtaining a code stream, and in a possible implementation mode, the code stream is obtained by coding third prediction information obtained by the coding method; the code stream is decoded.
In order to solve the technical problem, the application adopts a technical scheme that: providing an encoder comprising a processor and a memory; the memory stores therein a computer program, and the processor is configured to execute the computer program to implement the prediction method or the encoding method of the encoding unit described above.
In order to solve the technical problem, the application adopts a technical scheme that: providing a decoder comprising a processor and a memory; the memory stores a computer program, and the processor is used for executing the computer program to realize the decoding method.
In order to solve the above technical problem, another technical solution adopted by the present application is: there is provided a computer-readable storage medium having stored therein program instructions that are executed to implement the prediction method of the above-described coding unit or the above-described coding method or decoding method.
The beneficial effect of this application is: different from the prior art, when the prediction method of the coding unit encodes the dividing line region of the coding unit, firstly, the dividing line region in the coding unit is determined based on the image information of the coding unit, and first prediction information of the dividing line region in a first prediction mode and second prediction information of the dividing line region in a second prediction mode are respectively obtained, and finally, third prediction information of the dividing line region is obtained based on the first prediction information and the second prediction information.
Drawings
FIG. 1 is a schematic diagram of a geometric partition mode partition coding unit;
FIG. 2 is a diagram of a partial partition mode of a geometric partition mode partition coding unit;
FIG. 3 is a schematic diagram of a coding unit partitioned based on a geometric partitioning mode;
FIG. 4 is a diagram of a partition line region partitioned by a coding unit based on a geometric partition mode;
FIG. 5 is a flowchart illustrating a first embodiment of a prediction method for a coding unit of the present application;
FIG. 6 is a block diagram illustrating a first embodiment of obtaining third prediction information of a partition line region according to the present application;
FIG. 7 is a flowchart illustrating a second embodiment of a prediction method for a coding unit according to the present application;
FIG. 8 is a block diagram illustrating a second embodiment of the present application for obtaining third prediction information of a partition line region;
FIG. 9 is a block diagram of an embodiment of a residual block of the present application;
FIG. 10 is a block diagram of a first embodiment of the present application;
FIG. 11 is a block diagram of a second embodiment of the whole coding unit prediction information input of the present application;
FIG. 12 is a flowchart illustrating a third embodiment of a prediction method for a coding unit according to the present application;
FIG. 13 is a schematic flow chart of a first embodiment of step S101 in FIG. 5;
FIG. 14 is a schematic flow chart diagram of the first embodiment of step S401 in FIG. 13;
FIG. 15 is a schematic flow chart of a second embodiment of step S401 in FIG. 13;
FIG. 16 is a schematic view of an embodiment of the present application for determining the width of a scribe line region;
FIG. 17 is a schematic flow chart of a second embodiment of step S101 in FIG. 5;
FIG. 18 is a flowchart illustrating a fourth embodiment of a prediction method for a coding unit according to the present application;
FIG. 19 is a schematic block diagram of an embodiment of an encoder provided herein;
FIG. 20 is a block diagram of an embodiment of a decoder provided herein;
FIG. 21 is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In video coding, a plurality of image frames are input, but when one frame of image is coded, one frame needs to be divided into a plurality of maximum coding units, then coding units with different sizes are divided for each coding unit, and the video coding is carried out by taking the coding unit as a unit.
Referring to FIG. 1, FIG. 1 is a diagram of a geometric partitioning mode partition coding unit. As shown in FIG. 1, in a Geometric partitioning mode (Geometric partitioning mod)e, GPM), a coding unit for coding prediction is divided into two geometric blocks through a dividing line, and then the two geometric blocks are respectively predicted. The position of the dividing line as shown in FIG. 1 (a) is mathematically based on the angular parameter of the particular partition
Figure BDA0003869973440000071
And an offset parameter p, as shown in fig. 1 (b), GPM specifies 24 angles to be quantized at unequal intervals of 360 °, and as shown in fig. 1 (c), the division line has a maximum of 4 offsets at each angle.
Referring to fig. 2, fig. 2 is a schematic diagram of a partial partition mode of a geometric partition mode partition coding unit. In the geometric mode, by combining two parameters of the angle parameter and the offset parameter, a total of 64 division modes can be combined.
Referring to fig. 3, fig. 3 is a diagram illustrating a coding unit partitioned based on a geometric partition mode. After the coding units are divided, the divided two coding units are predicted by respective prediction modes, and respective prediction values are obtained.
But for the pixels near the dividing line, it needs to predict once by both prediction methods and then perform weighting. The weight of a pixel near the dividing line is determined based on its own coordinates and the distance to the dividing line. As shown in fig. 3, assuming that the pixel coordinate is (x, y), the distance d (x, y) from the pixel to the dividing line can be obtained by calculation. After the distance d (x, y) from the pixel to the dividing line is calculated and obtained, the weights of two predicted values corresponding to the two prediction modes can be respectively calculated.
Referring to fig. 4, fig. 4 is a schematic diagram of a partition line region partitioned by a coding unit based on a geometric partition mode. By calculating the weights of the two predicted values corresponding to the two prediction modes, it is found that the pixels to be weighted are in the fixed range at the two sides of the dividing line, that is, the width of the dividing line area is fixed. As shown in fig. 4, the pixels within the broken line, that is, the pixels within the dividing line region need to be weighted, and the first and second dividing regions are symmetrical about the dividing line, and in the geometric division mode, the width θ of the first and second dividing regions on both sides of the dividing line is usually set to 2 pixels.
When coding units with different sizes and different contents, if the widths of all the dividing line regions are fixed, it is not necessary to provide better image quality.
To solve the above problems, the present application first proposes a prediction method for a coding unit, please refer to fig. 5, as shown in fig. 5, fig. 5 is a flowchart illustrating a first embodiment of the prediction method for a coding unit according to the present application. The method specifically comprises the following steps S101 to S103:
step S101: the dividing line region in the coding unit is determined based on the image information of the coding unit.
When coding units with different sizes and different contents are coded, the width of the dividing line region in the coding unit needs to be changed so as to improve the image quality in the coding process.
The electronic device may determine the partition line region in the coding unit based on the image information of the coding unit. In this embodiment, the image information of the coding unit includes, but is not limited to, size information of the coding unit, a division mode of the coding unit, an area ratio of the coding unit after division, a distance ratio of the farthest pixel to the division line after division of the coding unit, and the like. The electronic device may further select an optimal width coefficient with the minimum coding cost by traversing the plurality of width coefficients based on the plurality of width coefficients of the image information of the coding unit to determine the width of the partition line region in the coding unit, so as to determine the partition line region in the coding unit.
Step S102: first prediction information of the dividing line region in a first prediction mode and second prediction information of the dividing line region in a second prediction mode are acquired.
The electronic device determines a dividing line region in the coding unit based on the image information of the coding unit, and then respectively acquires first prediction information of the dividing line region in a first prediction mode and second prediction information of the dividing line region in a second prediction mode. Further, different prediction information is hereinafter denoted as prediction information of different areas in different prediction modes.
In an embodiment of the present application, the first prediction mode and the second prediction mode are different inter prediction modes, where the prediction modes include, but are not limited to, a Merge mode, an AMVP mode, or a Skip mode in the Merge mode.
Step S103: and acquiring third prediction information of the dividing line region based on the first prediction information and the second prediction information.
After acquiring the first prediction information and the second prediction information of the dividing line region, the electronic device needs to weight the first prediction information and the second prediction information to acquire final third prediction information of the dividing line region. In this embodiment, a neural network model method may be adopted to obtain final third prediction information of the partition line region. The main information input in the neural network model is the first prediction information and the second prediction information of the partition line region, and the side information includes, but is not limited to, angle parameter and offset parameter information of the GPM, quantization parameter information, block size information, and the like.
And inputting the main information and the side information into the neural network model at the same time to obtain third prediction information of the parting line region.
Different from the prior art, when the prediction method of the coding unit encodes the dividing line region of the coding unit, firstly, the dividing line region in the coding unit is determined based on the image information of the coding unit, and first prediction information of the dividing line region in a first prediction mode and second prediction information of the dividing line region in a second prediction mode are respectively obtained, and finally, third prediction information of the dividing line region is obtained based on the first prediction information and the second prediction information.
Optionally, in this embodiment, before step S102, the coding unit prediction method of this embodiment further includes the following steps:
predicting the coding unit by using the first prediction mode and the second prediction mode to respectively obtain sixth prediction information and seventh prediction information of the coding unit; wherein the sixth prediction information includes the first prediction information and the seventh prediction information includes the second prediction information.
In this embodiment, in order to obtain the third prediction information of the dividing line region, the first prediction information of the dividing line region in the first prediction mode and the second prediction information of the dividing line region in the second prediction mode need to be input into the neural network model.
In order to input the first prediction information of the partition line region in the first prediction mode and the second prediction information of the partition line region in the second prediction mode into the neural network model, in this embodiment, the electronic device may first predict the coding unit by using the first prediction mode and the second prediction mode, and obtain the sixth prediction information of the coding unit in the first prediction mode and the seventh prediction information of the coding unit in the second prediction mode in a whole block respectively; first prediction information of the dividing line region is acquired from the sixth prediction information, and second prediction information of the dividing line region is acquired from the seventh prediction information.
The coding unit further comprises a first coding region positioned on the first side of the dividing line region and a second coding region positioned on the second side of the dividing line region.
When the third prediction information of the dividing line region is obtained based on the first prediction information and the second prediction information, that is, when the first prediction information and the second prediction information are input into the neural network model to obtain the third prediction information, the electronic device may perform mask processing on the first coding region and the second coding region of the sixth prediction information and the seventh prediction information to obtain the first prediction information and the second prediction information of the dividing line region, and input the first prediction information and the second prediction information obtained after the mask processing into the neural network prediction model to perform prediction to obtain the third prediction information of the dividing line region.
Referring to fig. 6, fig. 6 is a schematic diagram of a first embodiment of the present application for obtaining third prediction information of a partition line region.
As shown in fig. 6, the first coding region on the first side of the partition line region is a left region, and the second coding region on the second side of the partition line region is a right region, and the first coding region, the second coding region, the first side, and the second side in the following embodiments are all shown in fig. 6, and will not be described again.
In this embodiment, only the first prediction information and the second prediction information of the pixels in the dividing line region are input. Since the neural network model generally inputs a rectangular image, the input image may be rectangular by performing mask processing on the sixth prediction information and the seventh prediction information of the entire block of the coding unit, after the mask processing, both the first coding region and the second coding region except for the dividing line region of the sixth prediction information and the seventh prediction information are set to 0, and at this time, the prediction information of the coding unit after the mask processing only includes the first prediction information and the second prediction information in the dividing line region.
The main information comprises first prediction information and second prediction information which are obtained after mask processing, and the two prediction information can be input into the neural network model by two branches or combined into a three-dimensional tensor input neural network model.
The main information is first prediction information and second prediction information acquired after mask processing is input, namely when only the first prediction information of the dividing line region in the first prediction mode and the second prediction information of the dividing line region in the second prediction mode are input, one piece of quantization parameter information needs to be input into the side information. A simple neural network model is shown in fig. 6. In fig. 6, first prediction information for the partition line region prediction in the first prediction mode is denoted by P0, and second prediction information for the partition line region prediction in the second prediction mode is denoted by P1. And masking the first coding region and the second coding region, wherein all the masking values are set to be 0.
If the main information of the neural network model only inputs the first prediction information of the dividing line region in the first prediction mode and the second prediction information of the dividing line region in the second prediction mode, the output prediction information of the neural network model is also a mask image block, and only the third prediction information of the dividing line region is effective, so that the dividing line region is scratched out and copied into the dividing line region of the current coding unit, and the final prediction information of the coding unit can be obtained.
In this embodiment, the input of the main information may be to mask the acquired first prediction information and second prediction information, that is, to input only the first prediction information of the dividing line region in the first prediction mode and the second prediction information in the second prediction mode. Thus, in the embodiment, the neural network model has less input information and less calculation amount, and can be realized by a simpler neural network model.
Optionally, the present application further provides a prediction method of a coding unit, please refer to fig. 7, as shown in fig. 7, fig. 7 is a flowchart illustrating a second embodiment of the prediction method of the coding unit of the present application. The coding unit further comprises a first coding region positioned on the first side of the dividing line region and a second coding region positioned on the second side of the dividing line region. The prediction method specifically includes steps S201 to S205:
step S201: the dividing line region in the coding unit is determined based on the image information of the coding unit.
Step S201 is identical to step S101, and is not described again.
Step S202: first prediction information of the dividing line region in a first prediction mode and second prediction information of the dividing line region in a second prediction mode are acquired.
Step S202 is identical to step S102 and will not be described again.
Step S203: and acquiring third prediction information of the dividing line region based on the first prediction information and the second prediction information.
Step S203 is identical to step S103 and will not be described again.
Step S204: and acquiring fourth prediction information of the first coding region in the first prediction mode and fifth prediction information of the second coding region in the second prediction mode.
After acquiring the third prediction information of the dividing line region, the electronic device needs to acquire fourth prediction information of a first coding region located on one side of the dividing line region and fifth prediction information of a second coding region located on the other side of the dividing line region.
The fourth prediction information and the fifth prediction information may be acquired from the sixth prediction information and the seventh prediction information.
Step S205: prediction information of the coding unit is acquired based on the third prediction information, the fourth prediction information, and the fifth prediction information.
The electronic device copies and fuses the third prediction information, the fourth prediction information of the first coding region and the fifth prediction information of the second coding region to obtain the final prediction information of the coding unit.
Optionally, in this embodiment, the obtaining of the third prediction information of the partition line region may be implemented by the method shown in fig. 8, please refer to fig. 8, and fig. 8 is a schematic frame diagram of a second embodiment of obtaining the third prediction information of the partition line region according to this application.
In this embodiment, the input of the main information may be prediction information of the entire coding unit without performing a masking process. However, in this embodiment, the input information to the neural network model is more, and therefore a more complicated neural network model is required, but the input of the prediction information of the whole coding unit can enable the neural network model to learn the correlation of pixels in a wider range, thereby improving the image quality of the subsequent coding processing. As shown in fig. 9, the present embodiment adopts a neural network model based on a residual block, please refer to fig. 9, and fig. 9 is a schematic structural diagram of an embodiment of a residual block according to the present application.
When prediction information of the entire coding unit is input to the neural network model, the following two schemes are included.
Referring to fig. 10, fig. 10 is a block diagram illustrating a first embodiment of the whole coding unit prediction information input according to the present application. As shown in fig. 10, in the present embodiment, the first branch of the input of the neural network model may be the sixth prediction information of the entire coding unit in the first prediction mode acquired above; the second branch of the input of the neural network model may be the seventh prediction information of the whole coding unit in the second prediction mode, which is obtained above, and the sixth prediction information and the seventh prediction information are input into the neural network prediction model for prediction to obtain the third prediction information of the partition line region.
Wherein, the sixth prediction information of the whole coding unit in the first prediction mode is represented by P2, and the seventh prediction information of the whole coding unit in the second prediction mode is represented by P3.
In this embodiment, the output image block may be directly used as the final prediction information of the coding unit, or the third prediction information of the partition line region may be extracted and copied into the partition line region of the current coding unit to obtain the final prediction information of the coding unit.
In other embodiments, prediction information of an entire block coding unit having a different prediction model may be input into the neural network model. Referring to fig. 11, fig. 11 is a block diagram illustrating a second embodiment of the whole coding unit prediction information input according to the present application.
As shown in fig. 11, the coding unit further includes a first coding region located on the first side of the partition line region and a second coding region located on the second side of the partition line region, and when acquiring the third prediction information of the partition line, first, fourth prediction information P4 of the first coding region in the first prediction mode and fifth prediction information P5 of the second coding region in the second prediction mode are acquired, and eighth prediction information of the coding unit in the first prediction mode is obtained based on the fourth prediction information P4, the fifth prediction information P5 and the first prediction information P0; and ninth prediction information of the coding unit in the second prediction mode is derived based on the fourth prediction information P4, the fifth prediction information P5, and the second prediction information P1.
In this embodiment, the eighth prediction information and the ninth prediction information are input into the neural network prediction model for prediction to obtain the third prediction information of the partition line region, and the input first branch of the neural network model may be the eighth prediction information; the second branch of the input to the neural network model may be the ninth prediction information.
If the main information of the neural network model is input into the prediction information of the whole coding unit, the output prediction information of the neural network model is also a complete image block, the output image block can be directly used as the final prediction information of the coding unit, and the dividing line region can be extracted and copied into the dividing line region of the current coding unit to obtain the final prediction information of the coding unit.
Different from the prior art, the prediction method not only predicts the pixels of the coding dividing line region through the neural network model, but also extracts the prediction information of the pixels of the first coding region and the second coding region on two sides of the dividing line region through the neural network model, so that the manual processing trace of the image can be effectively reduced, and the image quality of coding prediction is improved.
Optionally, the present application may set width parameters of a plurality of segment line regions, and traverse all width parameters to select an optimal width coefficient to improve the quality of the image. Referring to FIG. 12, as shown in FIG. 12, FIG. 12 is a flowchart illustrating a third embodiment of a prediction method for a coding unit of the present application. The encoding unit comprises a first encoding region located on a first side of a partition line region and a second encoding region located on a second side of the partition line region, the partition line region comprises a first partition region and a second partition region located on two sides of the partition line, and the width parameter comprises width values of the first partition region and the second partition region or a first width ratio of the first partition region to the second partition region. The prediction method of the present embodiment further includes steps S301 to S303:
step S301: a plurality of width parameters are set based on image information of the coding unit.
In the present embodiment, a plurality of width parameters may be set correspondingly based on the image information of the encoding unit. The width coefficient may be a preset width value of the first divided area and the second divided area, or a first width ratio of the first divided area and the second divided area and a reference width.
The width parameter may be set based on information such as the size of the coding unit and the division method, or may be set based on experimental experience, which is not limited herein.
Step S302: determining cost values corresponding to at least part of the width parameters in the plurality of width parameters; the cost value is determined based on the associated partition line region and the prediction information.
The electronic equipment can determine cost values corresponding to at least part of the width parameters in the width parameters; wherein the cost value is determined based on the associated partition line region and the prediction information.
The electronic device sets a plurality of width parameters based on the image information of the encoding unit, and when the width parameters are the preset width value of the first division region and the preset width value of the second division region, the electronic device may obtain the corresponding dividing line region and the third prediction information of the dividing line region and the corresponding cost value thereof for at least part of the width parameters in the plurality of width parameters.
In other embodiments, only the cost value corresponding to each of the plurality of width parameters may be determined, which is not limited herein.
Step S303: and predicting other coding units according to the width parameter corresponding to the minimum value in the determined cost values, wherein the other coding units are positioned in the same image frame with the coding unit.
The electronic device compares the third prediction information of the corresponding dividing line region with the original image information, and calculates cost values of the coding units corresponding to at least part of the width parameters of the plurality of width parameters.
And the width parameter corresponding to the minimum value in the various cost values determined by the electronic equipment predicts other coding units, wherein the other coding units and the coding units are positioned in the same image frame.
In other embodiments, the electronic device may also obtain, for each coding unit, a cost value corresponding to the prediction information for each width coefficient, so as to obtain a preset width corresponding to a minimum cost value of each coding unit as the target width parameter.
Different from the prior art, the prediction method of the application can set the width parameter of the partition line region based on the image information of the coding unit, traverse a plurality of width parameters, and calculate the cost value of the prediction information corresponding to at least part of the width parameters in the plurality of width parameters, so as to obtain the target width parameter with the minimum cost value, so that the target width parameter is applied to the coding unit which is positioned in the same image frame with the current coding unit or the coding unit of the same type, and the quality of the video coding image can be improved, and the efficiency of video coding can be properly improved.
Alternatively, the manner of determining the width of the dividing line region based on the image information is shown in fig. 13, please refer to fig. 13, and fig. 13 is a flowchart of the first embodiment of step S101 in fig. 5. The coding unit comprises a first sub-coding unit and a second sub-coding unit which are positioned on two sides of the dividing line, the first sub-coding unit comprises a first coding region and a first dividing line region, the second sub-coding unit comprises a second coding region and a second dividing line region, and the first dividing line region and the second dividing line region are arranged close to the dividing line to form the dividing line region. In this embodiment, step S101 can be implemented by the method shown in fig. 13, and the specific implementation steps include step S401 to step S403:
step S401: and acquiring a second width ratio between the first division area and the second division area based on the image information of the first sub-coding unit and the image information of the second sub-coding unit.
In this application, the dividing line divides the coding unit into two parts, namely a first sub-coding unit and a second sub-coding unit, and when the first sub-coding unit determines the width of the first dividing line region near the dividing line region and the second sub-coding unit determines the width of the second dividing line region near the dividing line region, the electronic device may obtain a second width ratio between the first dividing region and the second dividing region based on the image information of the first sub-coding unit and the image information of the second sub-coding unit. The image information includes the area of the coding region, the distance from the pixel to the dividing line, and the like.
Step S402: the width of the first divided region and the width of the second divided region are determined based on the reference width and the second width ratio.
The electronic device may determine the width of the first divided region and the width of the second divided region based on the reference width and the second width ratio after acquiring the second width ratio.
Step S403: and determining a dividing line region in the coding unit based on the dividing line, the width of the first dividing region and the width of the second dividing region.
After determining the width of the first division region and the width of the second division region, the electronic device may determine the width of the division line region, thereby determining the division line region in the coding unit.
Alternatively, the manner of obtaining the second width ratio is shown in fig. 14, please refer to fig. 14, and fig. 14 is a flowchart of the first embodiment of step S401 in fig. 13. In this embodiment, step S401 can be implemented by the method shown in fig. 14, and the specific implementation steps include step S501 to step S502:
step S501: and acquiring a first area of the first sub-coding region and a second area of the second sub-coding unit, and calculating an area ratio between the first area and the second area.
The electronic device may set based on an area ratio of a first area of the first sub-coding unit to a second area of the second sub-coding unit when setting the width of the dividing line region based on the image information of the coding units. The first area of the first sub-coding region and the second area of the second sub-coding unit are obtained, and the area ratio between the first area and the second area is calculated.
Step S502: the second width ratio is obtained based on the area ratio.
A second width ratio between the first divided region and the second divided region is obtained based on the area ratio, and if the calculated area ratio has a decimal, the width ratio is obtained by rounding the area ratio up or down.
For example, if the first area of the first sub-coding unit is 9 and the second area of the second sub-coding unit is 4, the area ratio of the two sides of the dividing line is 9/4, and the width ratio of the first divided region to the second divided region may be 9/4, and rounded down to 2.
When determining the width of the first divided region and the width of the second divided region based on the reference width and the width ratio, it is necessary to ensure that the magnitude relationship between the width of the first divided region and the width of the second divided region matches the magnitude relationship between the first area of the first sub-coding unit and the second area of the second sub-coding region, that is, the width of the dividing line region on the side larger than the coding region should be larger than the width of the dividing line region on the side smaller than the coding region.
In the above, the area ratio of both sides of the dividing line is 9/4, the obtained width ratio is rounded down to 2, the reference width is 1, the width of the second divided region should be set to 1, the width of the first divided region is set to 2 based on the width ratio, and the width of the entire dividing line region is 3. The size of the reference width may be set based on actual needs and actual situations, and is not limited herein.
Alternatively, the manner of obtaining the second width ratio is shown in fig. 15, please refer to fig. 15, and fig. 15 is a flowchart of the second embodiment of step S401 in fig. 13. In this embodiment, step S401 may be implemented by the method shown in fig. 15, and the specific implementation steps include step S601 to step S603:
step S601: and acquiring a first distance from each pixel block in the first sub-coding unit to the dividing line, and acquiring a second distance from each pixel block in the second sub-coding unit to the dividing line.
When the electronic device sets the width of the dividing line region based on the image information of the coding units, the electronic device may set the width based on the distance ratio between the farthest pixel in the first sub-coding unit and the farthest pixel in the second sub-coding unit on both sides of the dividing line and the dividing line. The first distance from each pixel in the first sub-coding unit at one side of the dividing line area to the dividing line is obtained, and then the second distance from each pixel in the second sub-coding unit at the other side of the dividing line area to the dividing line is obtained.
Step S602: a distance ratio of a maximum value of the first distances to a maximum value of the second distances is calculated.
The electronic device calculates a distance ratio between a maximum value in the first distance and a maximum value in the second distance, and if the calculated distance ratio is a decimal number, rounding up or down to obtain a second width ratio between the first divided area and the second divided area.
Step S603: a second width ratio is obtained based on the distance ratio.
The electronic device may obtain, after obtaining the width ratio of the first divided region to the second divided region with the distance ratio as a width ratio between the first divided region and the second divided region, a width determination of the first divided region and the second divided region based on the reference width to width ratio, thereby determining the width of the dividing line region.
In this embodiment, when determining the width of the first divided region and the width of the second divided region based on the reference width and the width ratio, it is necessary to ensure that the magnitude relationship between the width of the first divided region and the width of the second divided region matches the magnitude relationship between the area of the first sub-coding unit and the area of the second sub-coding unit, that is, the width of the dividing line region on the side larger than the coding region should be larger than the width of the dividing line region on the side smaller than the coding region.
Referring to fig. 16, fig. 16 is a schematic diagram illustrating an embodiment of determining the width of the segment line region according to the present application. In this embodiment, the selection is based on the distance ratio to obtain the width of the region of the dividing line, assuming that the side length of the current coding unit is 8, the position of the dividing line is as shown in fig. 16, the first distance d0=5 from the farthest pixel in the first sub-coding unit to the dividing line in the left side of the dividing line, and the second distance d1=3 from the farthest pixel in the second sub-coding unit to the dividing line in the right side of the dividing line, the obtained distance ratio is calculated to be 5/3, and the width ratio w0, w0=2 is obtained by rounding up. When the above-described size relationship is ensured to be consistent, the second divided region is set to the reference width w1, w1=1, and the first divided region is set to the width 2.
In other embodiments, the size of the reference width may be set based on actual needs and actual situations, and is not limited herein.
Alternatively, referring to fig. 17, fig. 17 is a schematic flowchart of the second embodiment of step S101 in fig. 5. In this embodiment, step S101 can be implemented by the method shown in fig. 17, and the specific implementation steps include step S701 to step S703:
step S701: the size of the coding unit is acquired based on the image information of the coding unit.
The electronic device acquires the size of the encoding unit based on the image information of the encoding unit.
Step S702: the width of the dividing line region in the coding unit is acquired based on the size.
The width of the dividing line region in the coding unit can be obtained based on the size and the preset functional relation. In this embodiment, the predetermined functional relationship is a positive correlation functional relationship, and the size information of the encoded image is positively correlated with the width of the dividing line region in the encoding unit. Wherein, the functional relation of the positive correlation can be linear or nonlinear.
Step S703: and determining a dividing line region in the coding unit based on the dividing line and the width of the coding unit.
After determining the width of the dividing line region, the electronic device may determine the dividing line region in the coding unit based on the dividing line and the width of the coding unit.
For example, in an embodiment, the widths of the first partition area and the second partition area on both sides of the partition line area are set to be consistent, the width of the current coding unit is set to be w, the height of the current coding unit is set to be h, the widths of the first partition area and the second partition area are both set to be θ, and for coding units with the size of 16 × 16 or less, a linear relationship is used, where the width θ and the current block size are in a linear relationship: θ = log 2 (w × h)/4. For coding units with sizes larger than 16 × 16, a nonlinear relation is used, where the coding unit size is larger than 16 × 16, and equal to or smaller than 32 × 32, θ =4, and where the coding unit size is larger than 32 × 32, θ =6.
Alternatively, the prediction method of the coding unit may also be applied by the method shown in fig. 18 in this embodiment. Referring to FIG. 18, FIG. 18 is a flowchart illustrating a fourth embodiment of a prediction method for a coding unit according to the present application. The prediction method of the coding unit of the present embodiment further includes steps S801 to S803:
step S801: and acquiring the rate distortion cost value after the coding unit carries out prediction.
After obtaining the prediction information of the coding unit, the electronic device may obtain a rate-distortion cost value after obtaining the prediction of the coding unit based on the current prediction method.
Step S802: and judging whether the rate distortion cost value is smaller than a preset threshold value or not.
The electronic device determines whether the rate distortion cost value is smaller than a preset threshold, where the preset threshold may be a rate distortion cost obtained by predicting the coding unit according to the prior art.
Step S803: and in response to the rate distortion cost value being smaller than a preset threshold value, predicting the coding unit by adopting the prediction information of the coding unit.
And in response to the fact that the rate distortion cost value is smaller than a preset threshold value, the electronic equipment predicts the coding unit by adopting the prediction information acquired by the prediction method of the coding unit.
The application of the prediction method of the coding unit may include two application schemes.
Scheme one is a scheme of directly replacing the prior art with the prediction method of the coding unit of the present application.
And the second scheme is that the prediction method of the coding unit competes with the scheme in the prior art, and the coding unit is subjected to coding prediction by selecting the rate distortion cost by comparing the rate distortion costs of the two schemes. However, in the second scheme, a flag is transmitted during the encoding process to indicate whether the neural network model of the prediction method of the coding unit of the present application is adopted.
In an application scenario, in an encoding process, a syntax flag switch enable _ cnn _ gpm at a frame level may be set, and for a current frame, enable _ cnn _ gpm is set to 1, which indicates that the current frame may use the neural network model of the present application, and enable _ cnn _ gpm is set to 0, which indicates that the current frame may use the neural network model of the present application.
Different from the prior art, when the prediction method of the coding unit encodes the dividing line region of the coding unit, firstly, the dividing line region in the coding unit is determined based on the image information of the coding unit, and first prediction information of the dividing line region in a first prediction mode and second prediction information of the dividing line region in a second prediction mode are respectively obtained, and finally, third prediction information of the dividing line region is obtained based on the first prediction information and the second prediction information.
Optionally, the present application further provides an encoding method, where the encoding method includes obtaining third prediction information of a partition line region of the coding unit in the above embodiment, and encoding the third prediction information of the partition line region into a code stream of the coding unit.
The encoding is a method of converting data into a number that can be understood by a computer, and the encoding method includes, but is not limited to, arithmetic encoding, side length encoding, and the like.
In the encoding process, the encoding method further comprises defining a syntax element of the image based on the rate-distortion cost value predicted by the encoding unit; and when the rate distortion cost value is smaller than a preset threshold value, defining the syntax element as a preset identifier so as to predict the coding unit by adopting the prediction information of the coding unit based on the preset identifier.
In the encoding process, if the scheme is adopted to compete with the prior art scheme, the encoding unit prediction method of the present application competes with the prior art scheme, after the neural network model is opened, the encoding unit prediction method of the present application competes with the prior art scheme, a syntax element of an image can be defined based on a rate-distortion cost value predicted by the encoding unit, one syntax element apply _ cnn _ gpm is set as a preset identifier, the rate-distortion cost of prediction information of the encoding unit output by the neural network model is set as RDcost1, the rate-distortion cost of the prior art scheme is set as RDcost2, when RDcost1< RDcost2, the transmission apply _ cnn _ gpm =1 represents the neural network model using the prediction method of the encoding unit of the present application, and when RDcost1> RDcost2, the transmission apply _ cnn _ gpm =0 represents the neural network model not using the prediction method of the encoding unit of the present application.
Optionally, the present application further provides a decoding method, where the decoding method includes obtaining a code stream, where the code stream is obtained by encoding third prediction information obtained by the encoding method in the above embodiment; the code stream is then decoded.
Decoding is a process of restoring digital codes to contents represented by the digital codes or converting electric pulse signals, optical signals, radio waves, etc. into information, data, etc. represented by the digital codes by a specific method. Decoding is the process by which the recipient restores the received symbol or code to information, corresponding to the encoding process.
To implement the image encoding method of the above embodiment, the present application provides an encoder, and specifically refer to fig. 19, where fig. 19 is a schematic structural diagram of an embodiment of the encoder provided in the present application.
The encoder 400 comprises a memory 41 and a processor 42, wherein the memory 41 is coupled to the processor 42.
The memory 41 is used for storing a computer program, and the processor 42 is used for executing the computer program to implement the prediction method or the image encoding method of the encoding unit of the above-described embodiments.
In the present embodiment, the processor 42 may also be referred to as a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip having signal processing capabilities. The processor 42 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor 42 may be any conventional processor or the like.
To implement the image decoding method of the above embodiment, the present application provides a decoder, and specifically refer to fig. 20, where fig. 20 is a schematic structural diagram of an embodiment of the decoder provided in the present application.
The decoder 500 comprises a memory 51 and a processor 52, wherein the memory 51 is coupled to the processor 52.
The memory 51 is used for storing a computer program, and the processor 52 is used for executing the computer program to implement the image decoding method of the above-described embodiment.
In the present embodiment, the processor 52 may also be referred to as a CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip having signal processing capabilities. The processor 52 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor 52 may be any conventional processor or the like.
Optionally, the present application further proposes a computer-readable storage medium. Referring to fig. 21, fig. 21 is a schematic structural diagram of an embodiment of a computer-readable storage medium according to the present application.
The computer readable storage medium 300 of the embodiment of the present application stores therein program instructions 310, and the program instructions 310 are executed to implement the prediction method of the coding unit or the coding method or the decoding method described above.
The program instructions 310 may form a program file stored in the storage medium in the form of a software product, so that an electronic device (which may be a personal computer, a server, or a network device) or a processor (processor) executes all or part of the steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or terminal devices, such as a computer, a server, a mobile phone, and a tablet.
The computer-readable storage medium 300 may be, but is not limited to, a usb disk, an SD card, a PD optical drive, a removable hard disk, a high-capacity floppy drive, a flash memory, a multimedia memory card, a server, etc.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of the electronic device from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device performs the steps in the above method embodiments.
In addition, if the above functions are implemented in the form of software functions and sold or used as a standalone product, the functions may be stored in a storage medium readable by a mobile terminal, that is, the present application also provides a storage device storing program data, which can be executed to implement the method of the above embodiments, the storage device may be, for example, a usb disk, an optical disk, a server, etc. That is, the present application may be embodied as a software product, which includes several instructions for causing an intelligent terminal to perform all or part of the steps of the methods described in the embodiments.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing mechanisms, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes additional implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, such as an ordered listing of executable instructions that can be viewed as implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device (e.g., a personal computer, server, network device, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions). For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Further, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are intended to be included within the scope of the present application.

Claims (21)

1. A method for predicting a coding unit, comprising:
determining a dividing line region in the coding unit based on the image information of the coding unit;
acquiring first prediction information of the dividing line region in a first prediction mode and second prediction information of the dividing line region in a second prediction mode;
and acquiring third prediction information of the dividing line region based on the first prediction information and the second prediction information.
2. The prediction method according to claim 1, wherein the coding unit further includes a first coding region located at a first side of the partition line region and a second coding region located at a second side of the partition line region, and wherein the obtaining of the third prediction information of the partition line region based on the first prediction information and the second prediction information comprises:
acquiring fourth prediction information of the first coding region in the first prediction mode and fifth prediction information of the second coding region in the second prediction mode;
obtaining prediction information of the coding unit based on the third prediction information, the fourth prediction information, and the fifth prediction information.
3. The prediction method according to claim 2, further comprising:
setting a plurality of width parameters based on the image information of the encoding unit;
determining cost values corresponding to at least part of the width parameters in the plurality of width parameters; the cost value is determined based on the associated partition line region and the prediction information;
and predicting other coding units according to the width parameter corresponding to the minimum value in the determined cost values, wherein the other coding units are positioned in the same image frame with the coding unit.
4. The prediction method according to claim 3, wherein the dividing line region includes a first dividing region and a second dividing region located on both sides of a dividing line, and the width parameter includes a width value of the first dividing region and the second dividing region or a first width ratio of the first dividing region to the second dividing region.
5. The prediction method according to claim 1, wherein the coding unit includes a first sub-coding unit and a second sub-coding unit located on both sides of a dividing line, the first sub-coding unit includes a first coding region and a first dividing line region, the second sub-coding unit includes a second coding region and a second dividing line region, the first dividing line region and the second dividing line region are disposed close to the dividing line to form the dividing line region, and the determining the dividing line region in the coding unit based on image information of the coding unit includes:
acquiring a second width ratio between the first divided area and the second divided area based on the image information of the first sub-coding unit and the image information of the second sub-coding unit;
determining a width of the first divided region and a width of the second divided region based on a reference width and the second width ratio;
determining a dividing line region in the coding unit based on the dividing line, the width of the first dividing region, and the width of the second dividing region.
6. The prediction method according to claim 5, wherein the obtaining a second width ratio between the first partition and the second partition based on the image information of the first sub-coding unit and the image information of the second sub-coding unit comprises:
acquiring a first area of the first sub-coding region and a second area of the second sub-coding unit, and calculating an area ratio between the first area and the second area;
the second width ratio is obtained based on the area ratio.
7. The prediction method according to claim 5, wherein the obtaining a second width ratio between the first partition and the second partition based on the image information of the first sub-coding unit and the image information of the second sub-coding unit comprises:
acquiring a first distance from each pixel block in the first sub-coding unit to the partition line, and acquiring a second distance from each pixel block in the second sub-coding unit to the partition line;
calculating a distance ratio between a maximum value of the first distances and a maximum value of the second distances;
obtaining the second width ratio based on the distance ratio.
8. The prediction method according to claim 5, wherein a size relationship between a width of the first partition region and a width of the second partition region coincides with a size relationship between a first area of the first sub coding unit and a second area of the second sub coding region.
9. The prediction method according to claim 1, wherein the determining a partition line region in the coding unit based on the image information of the coding unit comprises:
acquiring the size of the coding unit based on the image information of the coding unit;
acquiring the width of a dividing line region in the coding unit based on the size;
determining a partition line region in the coding unit based on a partition line of the coding unit and the width.
10. The prediction method according to claim 9, wherein the size is positively correlated with a width of a dividing line region in the coding unit.
11. The prediction method according to claim 2, further comprising:
acquiring a rate distortion cost value after the coding unit carries out prediction;
judging whether the rate distortion cost value is smaller than a preset threshold value or not;
and in response to the rate distortion cost value being smaller than the preset threshold value, predicting the coding unit by adopting the prediction information of the coding unit.
12. The prediction method according to claim 1, further comprising:
predicting the coding unit by using the first prediction mode and the second prediction mode to respectively obtain sixth prediction information and seventh prediction information of the coding unit; wherein the sixth prediction information comprises the first prediction information and the seventh prediction information comprises the second prediction information.
13. The prediction method according to claim 12, wherein the obtaining third prediction information of the dividing line region based on the first prediction information and the second prediction information includes:
inputting the sixth prediction information and the seventh prediction information into a neural network prediction model for prediction to obtain third prediction information of the dividing line region.
14. The method of claim 12, wherein the coding unit further includes a first coding region located at a first side of the partition line region and a second coding region located at a second side of the partition line region, and wherein the obtaining third prediction information of the partition line region based on the first prediction information and the second prediction information comprises:
masking the sixth prediction information and the seventh prediction information to obtain the first prediction information and the second prediction information;
inputting the first prediction information and the second prediction information obtained after the mask processing into a neural network prediction model for prediction to obtain third prediction information of the dividing line region.
15. The prediction method according to claim 1, wherein the coding unit further includes a first coding region located at a first side of the partition line region and a second coding region located at a second side of the partition line region, the prediction method further comprising:
acquiring fourth prediction information of the first coding region in the first prediction mode and fifth prediction information of the second coding region in the second prediction mode;
the obtaining third prediction information of the dividing line region based on the first prediction information and the second prediction information includes:
obtaining eighth prediction information of the coding unit in the first prediction mode based on the fourth prediction information, the fifth prediction information and the first prediction information;
obtaining ninth prediction information of the coding unit in a second prediction mode based on the fourth prediction information, the fifth prediction information and second prediction information;
inputting the eighth prediction information and the ninth prediction information into a neural network prediction model for prediction to obtain third prediction information of the parting line region.
16. A method of encoding, comprising:
acquiring third prediction information of the partition line region according to any one of claims 1 to 15;
and encoding the third prediction information of the dividing line region into the code stream of the encoding unit.
17. The encoding method of claim 16, further comprising:
defining a syntax element of an image based on a rate-distortion cost value predicted by the coding unit; when the rate distortion cost value is smaller than a preset threshold value, defining the syntax element as a preset identifier, and predicting the coding unit by adopting the prediction information of the coding unit based on the preset identifier.
18. A method of decoding, comprising:
acquiring a code stream, wherein the code stream is obtained by encoding the third prediction information obtained by the encoding method according to any one of claims 1 to 15 or 16 to 17;
and decoding the code stream.
19. An encoder, characterized in that the encoder comprises a processor and a memory; the memory has stored therein a computer program for execution by the processor to implement the prediction method of the coding unit according to any one of claims 1 to 15 or the coding method according to any one of claims 16 to 17.
20. A decoder, comprising a processor and a memory; the memory has stored therein a computer program for execution by the processor to implement the decoding method as claimed in claim 18.
21. A computer-readable storage medium having stored therein program instructions that are executed to implement the prediction method of the coding unit according to any one of claims 1 to 15, the encoding method according to any one of claims 16 to 17, or the decoding method according to claim 18.
CN202211193669.8A 2022-09-28 2022-09-28 Prediction method, encoding method, decoding method of coding unit and apparatus thereof Pending CN115834902A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211193669.8A CN115834902A (en) 2022-09-28 2022-09-28 Prediction method, encoding method, decoding method of coding unit and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211193669.8A CN115834902A (en) 2022-09-28 2022-09-28 Prediction method, encoding method, decoding method of coding unit and apparatus thereof

Publications (1)

Publication Number Publication Date
CN115834902A true CN115834902A (en) 2023-03-21

Family

ID=85524156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211193669.8A Pending CN115834902A (en) 2022-09-28 2022-09-28 Prediction method, encoding method, decoding method of coding unit and apparatus thereof

Country Status (1)

Country Link
CN (1) CN115834902A (en)

Similar Documents

Publication Publication Date Title
CN111526361B (en) Image coding and decoding method and device
US20180227582A1 (en) Method and apparatus for processing a video signal
CN102685478B (en) Encoding method and device, and decoding method and device
JP6316785B2 (en) Pulse coding modulation of video coding and method of palette coding
CN107211131B (en) System and method for mask-based processing of digital image blocks
US20130301716A1 (en) Method and Device for Coding and Decoding Images
JP2017507554A (en) Intrablock copy prediction using approaches for asymmetric partitions and encoder-side search patterns, search ranges, and partitioning
EP3509305B1 (en) Intra-prediction video coding method and device
TW201720160A (en) Video encoding device, video encoding method, video encoding program, video decoding device, video decoding method, video decoding program
US20210243430A1 (en) Method and apparatus for combined intra prediction modes
EP2960854A1 (en) Method and device for determining a set of modifiable elements in a group of pictures
US20190191161A1 (en) Method and device for encoding video data
CN110881125B (en) Intra-frame prediction method, video coding method, video decoding method and related equipment
WO2016189404A1 (en) Foreground motion detection in compressed video data
EP4037314A1 (en) Prediction value determination method, decoder and computer storage medium
CN113039793A (en) Index partitioning method and system
CN114363632A (en) Intra-frame prediction method, encoding and decoding method, encoder and decoder, system, electronic device and storage medium
CN111654696B (en) Intra-frame multi-reference-line prediction method and device, storage medium and terminal
CN115834902A (en) Prediction method, encoding method, decoding method of coding unit and apparatus thereof
CN109660806B (en) Encoding method and device and electronic equipment
EP2938074A1 (en) Methods for encoding and decoding a picture and corresponding devices
CN104365107A (en) Image encoding device, image encoding method, image encoding program, transmission device, transmission method, transmission program, image decoding device, image decoding method, image decoding program, receiving device, receiving method, and receiving program
US20190166373A1 (en) Image encoding/decoding method and apparatus and image processing equipment
CN102685483A (en) Coding method and device, and decoding method and device
EP3499886A1 (en) Method and device for encoding video data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination