CN116569554A - Inter-frame prediction method, video encoding and decoding method, device and medium - Google Patents

Inter-frame prediction method, video encoding and decoding method, device and medium Download PDF

Info

Publication number
CN116569554A
CN116569554A CN202080107715.0A CN202080107715A CN116569554A CN 116569554 A CN116569554 A CN 116569554A CN 202080107715 A CN202080107715 A CN 202080107715A CN 116569554 A CN116569554 A CN 116569554A
Authority
CN
China
Prior art keywords
block
pixels
current block
illumination compensation
reference block
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
CN202080107715.0A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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
Priority claimed from PCT/CN2020/133709 external-priority patent/WO2022116119A1/en
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202311171521.9A priority Critical patent/CN117221534A/en
Publication of CN116569554A publication Critical patent/CN116569554A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the disclosure provides an inter-frame prediction method, a video encoding and decoding method, a device and a medium, wherein the inter-frame prediction method disclosed in an example comprises the following steps: determining local illumination compensation parameters according to the acquired available pixel points; the available pixel points comprise pixel points adjacent to a current block and/or pixel points of a reference block of the current block; and carrying out inter-frame prediction on the current block according to the local illumination compensation parameter to obtain a predicted value of the current block.

Description

Inter-frame prediction method, video encoding and decoding method, device and medium
The present application claims priority from PCT application filed on 3 month 12 in 2020, PCT application No. PCT/CN2020/133693 entitled "inter prediction method, video codec method, apparatus and medium", and PCT application filed on 3 month 12 in 2020 entitled "an inter prediction method, encoder, decoder and storage medium", the entire contents of which are incorporated herein by reference.
Technical Field
Embodiments of the present disclosure relate to, but are not limited to, video encoding and decoding technologies, and in particular, to an inter-frame prediction method, a video encoding and decoding device, and a medium.
Background
In order to effectively transmit and store video signals, compression encoding is required for the video signals, and video compression technology is becoming an essential key technology in the field of video application.
The video coding process mainly comprises links such as intra-frame prediction, inter-frame prediction, transformation, quantization, entropy coding, in-loop filtering and the like. Video decoding corresponds to the inverse of video encoding.
The local luminance compensation LIC (Local Illumination Compensation) technique is an inter prediction method for compensating for a luminance difference between a current block and a reference block. The LIC technique constructs an illumination compensation linear model using pixels adjacent to the current block and pixels adjacent to the reference block, and then derives a prediction block of the current block from the illumination compensation linear model.
Since it is necessary to acquire pixels adjacent to the reference block when constructing the illumination compensation linear model. In a hardware implementation, in order to acquire the related information of the neighboring pixels of the reference block, a buffer memory cache is required to store more contents, which greatly increases the overhead and burden of hardware
Summary of The Invention
An embodiment of the present disclosure provides an inter prediction method, including:
Determining local illumination compensation parameters according to the acquired available pixel points; the available pixel points comprise adjacent pixel points of a current block and/or pixel points of a reference block of the current block;
and carrying out inter-frame prediction on the current block according to the local illumination compensation parameter to obtain a predicted value of the current block.
An embodiment of the present disclosure provides an inter prediction apparatus, including: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the inter prediction method described above when executing the computer program.
An embodiment of the present disclosure provides a video encoding method, including:
inter-frame prediction is carried out on the current block according to the inter-frame prediction method to obtain a predicted value of the current block;
and encoding the current block according to the predicted value of the current block.
An embodiment of the present disclosure provides a video encoding apparatus, including: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the video encoding method described above when executing the computer program.
An embodiment of the present disclosure provides a video decoding method, including:
When the local illumination compensation is started, carrying out inter prediction on the current block according to the inter prediction method to obtain a predicted value of the current block;
and decoding the current block according to the predicted value of the current block.
An embodiment of the present disclosure provides a video decoding apparatus including: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the video decoding method described above when executing the computer program.
An embodiment of the present disclosure provides a computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the inter prediction method described above, or implements the video encoding method described above, or implements the video decoding method described above.
Brief description of the drawings
The accompanying drawings are included to provide an understanding of exemplary embodiments of the disclosure, and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the exemplary embodiments of the disclosure, and not constitute a limitation to the embodiments of the disclosure.
FIG. 1 is a schematic diagram of acquiring pixels adjacent to a current block and a reference block in the related art;
Fig. 2 is a flowchart of an inter prediction method according to an exemplary embodiment of the present disclosure;
fig. 3 is a flowchart of an inter prediction method according to an exemplary embodiment of the present disclosure;
FIG. 4a is a schematic diagram of acquiring neighboring pixels of a current block and pixels of a reference block according to an example of the present disclosure;
FIG. 4b is a schematic diagram of acquiring neighboring pixels of a current block and pixels of a reference block according to an example of the present disclosure;
FIG. 4c is a schematic diagram of acquiring neighboring pixels of a current block and pixels of a reference block according to an example of the present disclosure;
FIG. 4d is a schematic diagram of acquiring neighboring pixels of a current block and pixels of a reference block according to an example of the present disclosure;
FIG. 4e is a schematic diagram of acquiring neighboring pixels of a current block and pixels of a reference block according to an example of the present disclosure;
FIG. 4f is a schematic diagram of acquiring a neighboring pixel point of a current block and a pixel point of a reference block according to an example of the present disclosure;
fig. 5 is a schematic structural diagram of an inter prediction apparatus according to an exemplary embodiment of the present disclosure;
fig. 6 is a flowchart of a video encoding method according to an exemplary embodiment of the present disclosure;
fig. 7 is a flowchart of a video encoding method according to an exemplary embodiment of the present disclosure;
Fig. 8 is a schematic structural diagram of a video encoding apparatus according to an exemplary embodiment of the present disclosure;
fig. 9 is a flowchart of a video decoding method according to an exemplary embodiment of the present disclosure;
fig. 10 is a flowchart of a video decoding method according to an exemplary embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of a video decoding apparatus according to an exemplary embodiment of the present disclosure;
FIG. 12 is a block diagram of a video encoder provided in an exemplary embodiment of the present disclosure;
fig. 13 is a block diagram illustrating a video decoder according to an exemplary embodiment of the present disclosure;
FIG. 14a is a schematic diagram of a pixel point with an illumination compensation mode index of IC_TL according to an exemplary embodiment of the disclosure;
FIG. 14b is a schematic diagram of a pixel point with an illumination compensation mode index IC_T according to an exemplary embodiment of the present disclosure;
FIG. 14c is a schematic diagram of a pixel point with an illumination compensation mode index IC_L according to an exemplary embodiment of the present disclosure; the method comprises the steps of carrying out a first treatment on the surface of the
FIG. 15a is a schematic diagram of an available pixel point for the IC_TL mode provided in an exemplary embodiment of the disclosure;
FIG. 15b is a schematic diagram of available pixels in IC_T mode provided by an exemplary embodiment of the present disclosure;
FIG. 15c is a schematic diagram of available pixels in IC_L mode according to an exemplary embodiment of the present disclosure;
fig. 16 is a schematic diagram of acquiring a neighboring pixel point of a current block and a pixel point of a reference block according to an exemplary embodiment of the present disclosure.
Detailed description of the preferred embodiments
The present disclosure describes several embodiments, but the description is illustrative and not limiting, and it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the embodiments described in the present disclosure. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are possible. Any feature or element of any embodiment may be used in combination with or in place of any other feature or element of any other embodiment unless specifically limited.
The present disclosure includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements of the present disclosure that have been disclosed may also be combined with any conventional features or elements to form a unique inventive arrangement as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive arrangements to form another unique inventive arrangement as defined in the claims. Thus, it should be understood that any of the features shown and/or discussed in this disclosure may be implemented alone or in any suitable combination. Accordingly, the embodiments are not to be restricted except in light of the attached claims and their equivalents. Further, various modifications and changes may be made within the scope of the appended claims.
In this disclosure, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment described as "exemplary" or "e.g." in this disclosure should not be taken as preferred or advantageous over other embodiments.
Furthermore, in describing representative embodiments, the specification may have presented the method and/or process as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. Other sequences of steps are possible as will be appreciated by those of ordinary skill in the art. Accordingly, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. Furthermore, the claims directed to the method and/or process should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the embodiments of the present disclosure.
Some concepts involved in the embodiments of the present disclosure are described first below.
Image block: in the video encoding and decoding process, various encoding operations or decoding operations are performed by taking image blocks as basic units. Such as image block based prediction, transformation, entropy coding, etc. The image block may also be referred to as an encoding unit CU (Coding Unit). The image block refers to a two-dimensional sampling point array, and can be a square array or a rectangular array. For example, a 4x8 sized image block can be considered as a square array of 4x8 sampling points of 32 sampling points.
Current block: refers to the image block currently being processed and may also be referred to as the current coding unit CU. For example, in encoding, a current block refers to an image block currently being encoded; in decoding, a current block refers to an image block currently being decoded.
Reference block: refers to an image block providing a reference signal for the current block and may also be referred to as a reference coding unit CU. The pixel points of the reference block refer to the pixel points contained in the reference block.
Prediction block: refers to a block providing prediction for the current block and may also be referred to as a prediction coding unit CU.
In the related art, when constructing the illumination compensation linear model, it is necessary to acquire the pixels adjacent to the reference block. For example, as shown in fig. 1, when constructing the illumination compensation linear model, it is necessary to select a pixel point one row above and one column to the left of the current block (shown by a black circle in the figure), and select a pixel point one row above and one column to the left of the reference block (shown by a black circle in the figure), and then take the reconstructed values of these two groups of pixel points as samples for constructing the linear model.
In the hardware implementation, in order to acquire the related information of the adjacent pixel points of the reference block, the cache is required to store more contents, so that the additional overhead and burden of hardware are greatly increased, and the overhead and burden of bandwidth are also increased.
Some embodiments of the present disclosure provide an inter prediction method, which in an exemplary embodiment, as shown in fig. 2, includes:
step 201, determining local illumination compensation parameters according to the obtained available pixel points; the available pixel points comprise pixel points adjacent to a current block and/or pixel points of a reference block of the current block;
step 202, performing inter prediction on the current block according to the local illumination compensation parameter to obtain a predicted value of the current block.
In an exemplary embodiment, the pixels adjacent to the current block include pixels in a row adjacent to the current block and/or pixels in a column adjacent to the current block.
In an exemplary embodiment, the pixels of the reference block include pixels in a row above the reference block and/or pixels in a column to the left of the reference block.
In an exemplary embodiment, the pixels of the reference block include pixels in a row of the reference block other than the upper row and/or pixels in a column of the reference block to the left.
In an exemplary embodiment, the pixels of the reference block include pixels in a row above the reference block and/or pixels in a column of the reference block other than the left column.
In an exemplary embodiment, the pixels of the reference block include pixels in other rows of the reference block than the upper row and/or pixels in other columns of the reference block than the left column.
In an exemplary embodiment, the pixels in a row include all or part of the pixels in the row; the pixel points in a column comprise all or part of the pixel points in the column;
the partial pixel points are obtained through downsampling and then selection, or are obtained according to a preset position.
In an exemplary embodiment, the local illumination compensation parameters are determined by one or more of the following:
determining local illumination compensation parameters by adopting a preset algorithm according to the reconstruction values of the pixels adjacent to the current block and the reconstruction values of the pixels of the reference block;
determining local illumination compensation parameters by adopting a preset algorithm according to the reconstruction values of the pixels adjacent to the current block and the predicted values of the pixels of the reference block;
wherein the predicted value of the pixel point of the reference block includes one or more of the following:
pixel values of pixel points in the prediction block obtained after the reference block is subjected to motion compensation; and the reference block obtains pixel values of pixel points in the prediction block after motion compensation, bi-directional optical flow BIO or bi-directional gradient correction BGC.
According to the technical scheme of the exemplary embodiment, the pixel points adjacent to the reference block do not need to be selected, so that the content required to be stored by the cache is reduced, and the additional overhead and burden of hardware can be reduced.
Some embodiments of the present disclosure provide an inter prediction method, in an exemplary embodiment, as shown in fig. 3, the method includes:
step 301, obtaining the adjacent pixel points of the current block and the pixel points of the reference block of the current block;
in an exemplary embodiment, prior to step 301, the method further comprises: a reference block of the current block is acquired. The method of determining the reference block is different according to different inter prediction modes. For example, the current block MV is derived by the neighboring block motion vector MV (Motion Vector) in skip/merge mode, thereby determining the reference block. For another example, the normal inter prediction mode derives the current block MV through a motion estimation algorithm, thereby determining the reference block.
In an exemplary embodiment, prior to step 301, the method further comprises:
acquiring an encoded video code stream, and analyzing a current image illumination compensation CU level flag;
if the CU level flag is an invalid value false, the following inter prediction mode does not need local illumination compensation.
If the CU level flag is a valid value true, step 301 is performed.
In an exemplary embodiment, the pixels adjacent to the current block include pixels in a row adjacent to the current block and/or pixels in a column adjacent to the current block; the pixels of the reference block include pixels in a row above the reference block and/or pixels in a column to the left of the reference block.
In an exemplary embodiment, the pixels in a row adjacent to the current block include all pixels in a row adjacent above the current block; the pixel points in the adjacent column of the current block comprise all pixel points in the adjacent column at the left side of the current block;
the pixel points in the row above the reference block comprise all the pixel points in the row above the reference block; the pixel points in the left column of the reference block include all the pixel points in the left column of the reference block.
For example, as shown in fig. 4a, the available pixel selection for the neighboring pixels of the current block includes all 8 pixels in a row neighboring above the current block and all 4 pixels in a column neighboring to the left. The pixels of the reference block can be selected by using the pixels, including all 8 pixels in a row above the reference block and all 4 pixels in a column to the left (shown as black circles).
In an exemplary embodiment, the pixels in a neighboring row of the current block include a portion of pixels in a neighboring row above the current block; the pixel points in the adjacent column of the current block comprise partial pixel points in the adjacent column at the left side of the current block;
the pixel points in the row above the reference block comprise part of pixel points in the row above the reference block; the pixel points in the left column of the reference block comprise part of pixel points in the left column of the reference block;
the partial pixel points are obtained by downsampling and then selecting.
For example, as shown in FIG. 4b, 1/2 downsampled pixels (shown as black circles) may be selected with pixels.
In an exemplary embodiment, the pixels adjacent to the current block include pixels in a row adjacent to the current block and/or pixels in a column adjacent to the current block; the pixels of the reference block include all or part of the pixels in a row above the reference block and/or all or part of the pixels in a column of the reference block other than the left column.
For example, as shown in fig. 4c, all pixels in the upper row of the reference block and all pixels in the second left column (shown as black circles) can be selected by using the pixels.
In an exemplary embodiment, the pixels adjacent to the current block include pixels in a row adjacent to the current block and/or pixels in a column adjacent to the current block; the pixels of the reference block include all or part of the pixels in other rows than the upper row of the reference block, and/or all or part of the pixels in the left column of the reference block.
For example, as shown in fig. 4d, all pixels in the second row above the reference block and all pixels in the left column (shown as black circles) can be selected by using the pixels.
In an exemplary embodiment, the pixels adjacent to the current block include pixels in a row adjacent to the current block and/or pixels in a column adjacent to the current block; the pixels of the reference block include all or part of the pixels in the other rows except the upper row of the reference block, and/or all or part of the pixels in the other columns except the left column of the reference block.
For example, as shown in fig. 4e, all pixels in the upper second row in the reference block and all pixels in the left second column (shown as black circles) can be selected by using the pixels.
In an exemplary embodiment, the pixels in a neighboring row of the current block include a portion of pixels in a neighboring row above the current block; the pixel points in the adjacent column of the current block comprise partial pixel points in the adjacent column at the left side of the current block;
the pixel points in the row above the reference block comprise part of pixel points in the row above the reference block; the pixel points in the left column of the reference block comprise part of pixel points in the left column of the reference block;
wherein, the partial pixel points are selected according to the preset positions.
For example, as shown in fig. 4f, the preset position of the current block is adjacent to the second pixel point and the last pixel point from left to right in a row, and adjacent to the second pixel point and the last pixel point from top to bottom in a column; the preset positions of the reference block are the second pixel point and the last pixel point from left to right in the upper row, and the second pixel point and the last pixel point from top to bottom in the left column (shown by black circles in the figure). The preset position may be preset.
The following are to be noted: in the examples provided in the embodiments of the present disclosure, the positions of the selected pixel points in the reference block are not specifically limited, and the above-mentioned fig. 4a, 4b, 4c, 4d, 4e, and 4f are only exemplary illustrations.
The following are to be noted: the positions of the pixel points selected by the current block and the reference block respectively may not correspond, but the number needs to be consistent.
Step 302, determining a local illumination compensation parameter by adopting a preset algorithm according to the reconstruction value of the pixel points adjacent to the current block and the prediction value or the reconstruction value of the pixel points of the reference block;
in an exemplary embodiment, when the local illumination compensation is performed after the motion compensation MC (Motion Compensatiom), calculating a local illumination compensation parameter using a predicted value of a pixel point of the reference block after the motion compensation is performed as a predicted value of a pixel point of the reference block; when the local illumination compensation is performed before the motion compensation, the local illumination compensation parameter is calculated by using the reconstructed value of the pixel point of the reference block in the reference image as the reconstructed value of the pixel point of the reference block.
In an exemplary embodiment, when the local illumination compensation is performed after the motion compensation MC (Motion Compensatiom) and before the Bi-directional optical flow BIO (Bi-directional Optical flow) and the Bi-directional gradient correction BGC (Bi-directional Gradient Correction), the pixel value of the pixel point in the predicted block obtained after the reference block is subjected to the motion compensation MC is directly used as the predicted value of the pixel point after the motion compensation of the reference block; when the local illumination compensation is performed after the motion compensation MC (Motion Compensatiom) and after the Bi-directional optical flow BIO (Bi-directional Optical flow) and the Bi-directional gradient correction BGC (Bi-directional Gradient Correction), the pixel value of the pixel point in the predicted block obtained after BIO or BGC is used as the predicted value of the pixel point after the motion compensation of the reference block.
In an exemplary embodiment, the local illumination compensation parameters include a parameter a, a being a scaling factor, and a parameter b, b being an offset.
In an exemplary embodiment, the preset algorithm may be any existing algorithm for calculating the parameters of the linear model, which is not limited herein. The preset algorithm may be, for example, a least squares method. The maximum and minimum values can also be derived in a certain way for calculating the linear model parameters a and b, for example by ordering the two sets of data. And for example, after the largest and smallest pixel points are removed, other data are used for calculating the linear model parameters a and b, so that the influence caused by abnormal values is avoided. For example, two points with the minimum value and two points with the maximum value are selected for interpolation to obtain a new maximum value point and a new minimum value point, and the maximum value and the minimum value are used for calculating the linear model parameters a and b according to a certain method. Etc.
In this exemplary embodiment, the preset algorithm is a least square method, and the local illumination compensation parameter includes a scaling factor a and an offset b. The calculation formula is as follows:
wherein 2N represents the number of pixels adjacent to the current block and the number of pixels of the reference block; rec neig A reconstructed pixel value representing a pixel point adjacent to the current block; ref (Ref) inner A predicted pixel value or a reconstructed pixel value representing a pixel point of the reference block.
The predicted pixel value of the pixel point of the reference block is the pixel value of the pixel point in the predicted block obtained after the reference block is subjected to motion compensation; or, the reference block is subjected to motion compensation and bidirectional optical flow BIO or bidirectional gradient correction BGC to obtain the pixel value of the pixel point in the prediction block.
In an exemplary embodiment, the predicted value of the pixel point of the reference block may be preprocessed, and then the local illumination compensation parameter may be determined by using a preset algorithm using the preprocessed predicted value. Wherein the preprocessing includes one or more of the following operations: filtering, smoothing, denoising, etc.
In an exemplary embodiment, the reconstruction values of the pixel points of the reference block may be preprocessed, and then the local illumination compensation parameter may be determined by using a preset algorithm using the preprocessed reconstruction values. Wherein the preprocessing includes one or more of the following operations: filtering, smoothing, denoising, etc.
And step 303, performing inter prediction on the current block according to the local illumination compensation parameter to obtain a predicted value of the current block.
In an exemplary embodiment, the prediction value of the current block may be obtained by performing prediction based on local illumination compensation on the current block according to a linear model including the local illumination compensation parameter.
The linear model may be any existing illumination compensation linear model, and is not limited herein.
In this example, the formula for the linear model is: CU (CU) P (x,y)=a*CU C (x, y) +b, wherein CU P Prediction block representing current block, CU C The current block is represented, (x, y) is the position coordinates.
Among them, the inter prediction method in the exemplary embodiments provided by the present disclosure may be applied to an encoding apparatus and may also be applied to a decoding apparatus.
The encoding apparatus and decoding apparatus may comprise any of a wide range of devices, including desktop computers, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets, tablets, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, and the like. In some cases, the encoding apparatus and the decoding apparatus may be equipped for wireless communication or wired communication.
According to the technical scheme of the exemplary embodiment, the pixel points adjacent to the reference block do not need to be selected, so that the content required to be stored by the cache is reduced, and the additional overhead and burden of hardware can be reduced.
After the image information is acquired to determine the available pixels, the reference block may be further divided into a preset number of reference block sub-blocks, each of which extracts the preset pixels of the sub-block according to the illumination compensation mode index. In an exemplary embodiment, the available pixels further include pixels in an upper row and/or pixels in a left column of the reference block sub-block and pixels in a neighboring row and/or pixels in a neighboring column of the current block.
And performing illumination compensation on the reference block, namely performing linear offset on the predicted image of each reference block sub-block according to the linear model parameters corresponding to each sub-block to obtain the predicted value of the current coding unit.
By sub-block dividing the reference, a linear offset is made. Each sub-block may calculate a linear model separately or may use only one linear model alone.
In an exemplary embodiment, in the inter prediction process at the encoding end, if the IC permission flag is '1', all the following steps are performed; if the IC enable flag is '0', then only (a), (b) and (f) are performed.
(a) The inter-frame prediction firstly traverses all candidate MVs to perform motion compensation, calculates predicted pixels after motion compensation under each MV, and calculates rate distortion cost according to original pixels.
(b) And selecting the optimal MV and a prediction mode such as (SKIP, MERGE/DIRECT or INTER) of the current coding unit according to the minimum MV rate distortion cost principle, and recording optimal information and rate distortion cost information corresponding to the optimal information.
(c) Traversing all candidate MVs again, starting the illumination compensation technology and traversing 3 illumination compensation modes. Firstly, according to a prediction mode and MV, matching the reference block as an initial prediction block, and performing motion compensation on the initial prediction block to obtain the reference block. Dividing the reference block into a plurality of sub-blocks with preset numbers, extracting left and/or upper predicted pixels inside the sub-blocks and left and/or upper reconstructed pixels outside a block to be coded of the current frame by each sub-block according to the illumination compensation mode index, sequencing and averaging the predicted pixels and the reconstructed pixels (the specific operation is as above), and introducing the linear model parameters a and b corresponding to each sub-block into the formula.
In an exemplary embodiment, if the illumination compensation mode index can be denoted as ic_tl, as shown in fig. 14a, the linear model can be calculated using the reference block sub-block and the pixels above the current block in the adjacent row (e.g., above) and/or the pixels in the adjacent column (e.g., to the left); if the illumination compensation mode index is denoted as ic_t, as shown in fig. 14b, only the reference block sub-block and pixels in a row above the current block (e.g., above) can be used to calculate the linear model; if the illumination compensation mode index is denoted as ic_l, as shown in fig. 14c, only the reference block sub-block and the current block can be used to reconstruct the pixel adjacent to one column (e.g., left) to calculate the linear model, and the index numbers are only used for distinguishing. In some embodiments, all the sub-blocks may be only models of ic_tl, so that the encoding end does not need to try the ic_t and ic_l models, and the decoding end does not need to parse the model index values.
(d) And performing illumination compensation on the reference block, namely performing linear offset on the prediction pixels in each reference block sub-block according to the linear model parameters corresponding to each sub-block to obtain the final prediction block of the current coding unit.
(e) And calculating the rate distortion cost information of each MV according to the final predicted pixel and the original pixel which are subjected to the illumination compensation technology, and recording the current illumination compensation mode index, the MV index of the minimum rate distortion cost information, the corresponding prediction mode (such as SKIP, MERGE/DIRECT or INTER) and the corresponding cost value.
(f) If the illumination compensation technology allows the identification bit to be '0', transmitting the MV index and the prediction mode recorded in (b) to a decoding end through a code stream; if the illumination compensation technology allows the identification bit to be '1', comparing the minimum cost value recorded in (b) with the minimum cost value recorded in (e), if the rate distortion cost in (b) is smaller, transmitting the MV index and the prediction mode code recorded in (b) as the optimal information of the current coding unit to a decoding end through a code stream, and transmitting the identification position of the current coding unit of the illumination compensation technology to the decoding end through the code stream if the identification position of the current coding unit of the illumination compensation technology is not, wherein the identification position is not used, and the identification position is transmitted to the decoding end through the code stream without using the illumination compensation technology; if the rate distortion in (b) is smaller, the MV index, the illumination compensation mode index and the prediction mode code recorded in (b) are transmitted to the decoding end as the optimal information of the current coding unit through the code stream, the illumination compensation technology current coding unit identification position is true, and the illumination compensation mode index of the current coding unit block is encoded, which means that the illumination compensation technology is used, and the optimal information is also transmitted to the decoding end through the code stream. The illumination compensation techniques described above are represented in either table 1 or table 2 using an identification syntax.
(f) If the illumination compensation technology allows the identification bit to be '0', transmitting the MV index and the prediction mode recorded in (b) to a decoding end through a code stream; if the illumination compensation technology allows the identification bit to be '1', comparing the minimum cost value recorded in (b) with the minimum cost value recorded in (e), if the rate distortion cost in (b) is smaller, transmitting the MV index and the prediction mode code recorded in (b) as the optimal information of the current coding unit to a decoding end through a code stream, and transmitting the identification position of the current coding unit of the illumination compensation technology to the decoding end through the code stream if the identification position of the current coding unit of the illumination compensation technology is not, wherein the identification position is not used, and the identification position is transmitted to the decoding end through the code stream without using the illumination compensation technology; if the rate distortion in (e) is smaller, the MV index, the illumination compensation mode index and the prediction mode code recorded in (e) are used as the optimal information of the current coding unit and are transmitted to a decoding end through a code stream, and the illumination compensation technology current coding unit identification position is true and the illumination compensation mode index of the current coding unit block is encoded, so that the illumination compensation technology is used and is also transmitted to the decoding end through the code stream. The illumination compensation techniques described above are represented in either table 1 or table 2 using an identification syntax.
And then, superposing the final prediction block and the residual error after inverse transformation and inverse quantization to obtain a reconstructed coding unit block which is used as a prediction reference block of the next coding unit.
Illustratively, the codeword transmission syntax during the illumination compensation process is shown in table 1 or table 2.
TABLE 1
IC_Index IC_flag IC_index0 IC_index1
No_IC 0 - -
IC_TL 1 0 -
IC_T 1 1 0
IC_L 1 1 1
TABLE 2
IC_Index IC_flag IC_index0 IC_index1
No_IC 0 - -
IC_TL 1 1 -
IC_T 1 0 0
IC_L 1 0 1
In an exemplary embodiment, when the reference block is divided into four sub-blocks, the point-taking schematic diagrams are shown in fig. 15a, 15b and 15c, and the available pixel points of the sub-block of the reference block are taken from the inside of each sub-block to calculate the linear model of each sub-block, which is adjacent to the current block with corresponding coordinates.
In an exemplary embodiment, the acquisition of current block neighboring pixels and reference block pixels shown in fig. 16 may also be employed.
In some embodiments of the present disclosure, a specific implementation of the inter prediction portion at the encoding end may further be:
the method comprises the steps that an encoder obtains coding information, including an allowable identification bit of an inter-frame prediction illumination compensation technology (IC) and the like, divides an image into a plurality of CTUs after obtaining image information, further divides the image into a plurality of CUs, performs inter-frame prediction on each independent CU, and can limit the minimum area and the maximum area to perform the IC technology;
in the inter-frame prediction process of the coding end, if the IC permission identification bit is '1', executing the following steps; if the IC enable flag is '0', then only a), b), and f) are performed:
a) The inter-frame prediction firstly traverses all candidate MVs to perform motion compensation, calculates predicted pixels after motion compensation under each MV, and calculates rate distortion cost according to original pixels.
b) And selecting the optimal MV and a prediction mode such as (SKIP, MERGE/DIRECT or INTER) of the current coding unit according to the minimum MV rate distortion cost principle, and recording optimal information and rate distortion cost information corresponding to the optimal information.
c) Traversing all candidate MVs again to perform motion compensation to obtain an intermediate prediction block:
if the current INTER prediction mode is the normal INTER prediction mode (INTER), the illumination compensation technique is turned on and the 3 illumination compensation modes are traversed.
Dividing the middle prediction block into a plurality of sub-blocks with preset numbers, extracting left and/or upper prediction pixels in the sub-blocks and left and/or upper reconstruction pixels outside a block to be coded in the current frame by each sub-block according to the illumination compensation mode index, sequencing and averaging the prediction pixels and the reconstruction pixels (the specific operation is as above), and carrying the linear model parameters a and b of each sub-block into the formula.
The illumination compensation mode index 1 is marked as IC_TL, and a linear model can be calculated by using the left and upper reconstructed pixels of the reference block and the current block; the illumination compensation mode index 2 is marked as IC_T, and only the upper reconstructed pixels of the reference block and the current block can be used for calculating a linear model; the illumination compensation mode index 3 is denoted as ic_l, and only the left reconstructed pixels of the reference block and the current block can be used to calculate a linear model;
If the current inter prediction mode is SKIP mode (SKIP) or MERGE mode (MERGE/DIRECT), the IC use flag and the IC mode index of the neighboring peripheral available blocks of the current coding unit are acquired. If none of the neighboring peripheral blocks of the current frame uses the IC technology, the current coding block does not use the IC technology either; if the adjacent peripheral blocks of the current frame have reconstruction blocks using the IC technology, the IC technology using identification bits and the IC mode index are acquired according to a specific sequence as IC using information of the current coding unit. The above specific order is the order of up-left-right-up-left-down-left. After the IC use information is obtained, the intermediate prediction block is divided into a plurality of sub-blocks with preset numbers, and a scaling factor a and an offset factor b are respectively obtained.
d) And respectively carrying out illumination compensation on each sub-block of the intermediate prediction block, namely, carrying out linear offset on pixels in each prediction block according to corresponding linear model parameters to obtain a final prediction block of the current coding unit.
e) And calculating the rate distortion cost information of each MV according to the final predicted pixel and the original pixel which are subjected to the illumination compensation technology, and recording the current illumination compensation mode index, the MV index of the minimum rate distortion cost information, the corresponding prediction mode (such as SKIP, MERGE/DIRECT or INTER) and the corresponding cost value.
f) If the illumination compensation technique allows the flag bit to be '0', the MV index and the prediction mode recorded in b) are transmitted to the decoding end through the code stream.
If the illumination compensation technique allows the identification bit to be '1', comparing the minimum cost value recorded in b) with the minimum cost value recorded in e):
if the rate distortion cost in b) is smaller, the MV index and the prediction mode code recorded in b) are used as the optimal information of the current coding unit and are transmitted to a decoding end through a code stream. If the current INTER-frame prediction mode is a common INTER-frame prediction mode (INTER), the identification position of the current coding unit of the illumination compensation technology is '0', which means that the illumination compensation technology is not used, and the current coding unit is also transmitted to a decoding end through a code stream, otherwise, the illumination compensation technology is not transmitted, and the identification position and the mode index are used;
if the rate distortion in e) is smaller, if the rate distortion is the normal INTER prediction mode (INTER), transmitting the MV index, the illumination compensation mode index and the prediction mode code recorded in e) as the optimal information of the current coding unit to the decoding end through the code stream, and identifying the position "1" of the current coding unit of the illumination compensation technology and encoding the illumination compensation mode index of the current coding unit block, wherein the indication that the illumination compensation technology is used is also transmitted to the decoding end through the code stream; if the mode is SKIP mode (SKIP) or MERGE Mode (MERGE), only the corresponding MV index and the corresponding inter prediction mode need to be encoded and written into the code stream and transmitted to the decoding end. The illumination compensation techniques described above are represented in either table 1 or table 2 using an identification syntax.
And then, superposing the final prediction block and the residual error after inverse transformation and inverse quantization to obtain a reconstructed coding unit block which is used as a prediction reference block of the next coding unit.
Some embodiments of the present disclosure provide an inter prediction apparatus, in an exemplary embodiment, as shown in fig. 5, including: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the inter prediction method of any of the examples above when the computer program is executed.
Some embodiments of the present disclosure provide a video encoding method, in an exemplary embodiment, as shown in fig. 6, comprising:
step 601, performing inter prediction on a current block according to any of the inter prediction methods to obtain a predicted value of the current block;
and step 602, coding the current block according to the predicted value of the current block.
In an exemplary embodiment, the operation of encoding the current block may be any existing encoding method, which is not limited herein. For example, the current block is encoded by: subtracting the prediction block from the current block to form a residual block; transforming and quantizing the residual block; after quantization, entropy encoding is performed to obtain encoded data.
In an exemplary embodiment, during the encoding process, the method further comprises:
after carrying out local illumination compensation on the current block in various candidate modes in a merging mode, obtaining a new group of prediction modes; the CU level illumination compensation identification flag in the new group of prediction modes is set to be an effective value true;
selecting N groups of modes from prediction modes with the CU-level illumination compensation identification flag as an effective value true to perform rate distortion cost calculation; n is more than or equal to 1;
and selecting a prediction mode corresponding to the current block according to the rate-distortion cost calculation result, and determining whether the current block performs local illumination compensation or not according to the prediction mode corresponding to the current block.
In an exemplary embodiment, N is 6. For example, roughly selecting 6 groups of modes into a rate distortion cost calculation (RDO, rate Distortion Optimization) process in a prediction mode with the CU level illumination compensation identification flag being true; and finally, selecting the optimal prediction mode of the current block through rate distortion cost calculation of the coding end so as to determine whether the current block uses an illumination compensation technology. The technical scheme of the exemplary embodiment provided by the disclosure can reduce the additional overhead and burden of hardware in encoding, is beneficial to the hardware realization of an encoder, and can bring more remarkable performance gain for the existing encoding and decoding standard.
Some embodiments of the present disclosure provide a video encoding method, in an exemplary embodiment, as shown in fig. 7, comprising:
step 701, obtaining a code stream, and determining a prediction mode of a current block as an inter prediction mode;
step 702, determining the coding mode of the current block as a merging mode;
the inter prediction includes two prediction modes, namely a merging mode and a normal mode.
Step 703, deriving a motion information list;
step 704, constructing a merge mode prediction information list according to the motion information list;
in an exemplary embodiment, the sports information list includes one or more of the following: temporal motion information, spatial motion information, HMVP (motion vector prediction based on historical information, history based motion vector) motion information, UMVE (advanced motion vector expression, ultimate motion vector expression) motion information.
Step 705, in the process of traversing the motion information list to construct prediction information, obtaining a reference block according to the motion information and a reference image, and performing motion compensation MC to obtain a prediction block;
step 706, performing local illumination compensation on the motion-compensated prediction block;
in an exemplary embodiment, the performing local illumination compensation on the motion compensated prediction block includes:
Determining local illumination compensation parameters by adopting a preset algorithm according to the reconstruction values of the pixel points adjacent to the current block and the predicted values of the pixel points after the motion compensation of the reference block;
predicting the current block according to a linear model containing the local illumination compensation parameters;
the predicted value of the pixel point after the motion compensation of the reference block is the pixel value of the pixel point in the predicted block obtained after the motion compensation of the reference block.
In an exemplary embodiment, if the current block is in the bi-prediction mode, illumination compensation may be performed on the prediction block in each direction separately, or illumination compensation may be performed on the prediction block after the prediction blocks in the two directions are combined.
Step 707, performing BIO, BGC, interPF (inter prediction filtering, inter prediction filter) processing on the prediction block after the local illumination compensation;
step 708, adding the inter-frame coding information subjected to the illumination compensation technology to a prediction information list;
step 709, judging whether the current block uses the local illumination compensation technology according to the RDO process;
in an exemplary embodiment, if the local illumination compensation technique is used, the current block CU level illumination compensation flag is set to true; otherwise, the current block CU level illumination compensation flag is set to false.
The current block is encoded, step 710.
In another embodiment of the present disclosure, the difference from the encoding method shown in fig. 7 is that the reference block is subjected to local illumination compensation before the motion compensation is performed; and then performing motion compensation on the reference block subjected to the local illumination compensation.
In an exemplary embodiment, performing local illumination compensation on a reference block before performing motion compensation includes:
determining local illumination compensation parameters by adopting a preset algorithm according to the reconstruction values of the pixel points adjacent to the current block and the reconstruction values of the pixel points of the reference block;
and predicting the current block according to the local illumination compensation parameter to obtain a predicted value of the current block.
In another embodiment of the present disclosure, the difference from the encoding method shown in fig. 7 is that the prediction block subjected to BIO, BGC, interPF processing is subjected to local illumination compensation after motion compensation is performed and after the motion-compensated prediction block is subjected to BIO, BGC, interPF processing.
In an exemplary embodiment, the locally illumination compensation of the prediction block processed by BIO, BGC, interPF includes:
determining local illumination compensation parameters by adopting a preset algorithm according to the reconstruction values of the pixel points adjacent to the current block and the predicted values of the pixel points after the motion compensation of the reference block;
Predicting the current block according to a linear model containing the local illumination compensation parameters;
the predicted value of the pixel point after the reference block performs motion compensation is the pixel value of the pixel point in the predicted block obtained after BIO or BGC.
Some embodiments of the present disclosure provide a video encoding apparatus, in an exemplary embodiment, as shown in fig. 8, comprising: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the video encoding method of any of the examples above when executing the computer program.
Some embodiments of the present disclosure provide a video decoding method, in an exemplary embodiment, as shown in fig. 9, comprising:
step 901, when local illumination compensation is started, performing inter prediction on a current block according to any of the inter prediction methods to obtain a predicted value of the current block;
and step 902, decoding the current block according to the predicted value of the current block.
In an exemplary embodiment, the operation of decoding the current block may be any decoding method, which is not limited herein. For example, the current block is decoded by: and performing entropy decoding on the current block, performing inverse quantization and inverse transformation after the entropy decoding to obtain a residual block, adding the predicted block and the residual block, and reconstructing to obtain decoded data.
In an exemplary embodiment, prior to step 901, the method further comprises:
acquiring an encoded video code stream, and analyzing a current image illumination compensation CU level flag;
if the CU level flag is an invalid value false, the subsequent inter-frame prediction mode does not need to carry out local illumination compensation, namely the local illumination compensation is improperly started;
if the CU level flag is a valid value true, local illumination compensation is enabled.
The technical scheme of the exemplary embodiment provided by the disclosure can reduce the additional overhead and burden of hardware in decoding, is beneficial to the hardware realization of a decoder, and can bring more remarkable performance gain for the existing coding and decoding standard.
Some embodiments of the present disclosure provide a video decoding method, in an exemplary embodiment, as shown in fig. 10, including:
step 1001, analyzing the code stream to obtain the frame type of the current image, and determining that the frame type of the current image is P frame or B frame;
step 1002, analyzing the code stream to obtain the coding mode of the current block, and determining the coding mode of the current block as a merging mode;
step 1003, analyzing the code stream to obtain current block motion information;
step 1004, analyzing the code stream to obtain a current CU level illumination compensation identification flag;
step 1005, determining a reference block according to the motion information and the reference image;
Step 1006, performing motion compensation on the reference block to obtain a prediction block;
step 1007, if the current block illumination compensation flag is true, performing local illumination compensation on the motion compensated prediction block; if the illumination compensation identification flag of the current block is false, not carrying out local illumination compensation on the prediction block after the motion compensation;
in an exemplary embodiment, the performing local illumination compensation on the motion compensated prediction block includes:
determining local illumination compensation parameters by adopting a preset algorithm according to the reconstruction values of the pixel points adjacent to the current block and the predicted values of the pixel points after the motion compensation of the reference block;
predicting the current block according to the linear model of the local illumination compensation parameter to obtain a predicted value of the current block;
the predicted value of the pixel point after the motion compensation of the reference block is the pixel value of the pixel point in the predicted block obtained after the motion compensation of the reference block.
In an exemplary embodiment, if the current block is in the bi-prediction mode, illumination compensation may be performed on the prediction block in each direction separately, or illumination compensation may be performed on the prediction block after the prediction blocks in the two directions are combined.
Step 1008, performing BIO, BGC, interPF processing on the predicted block;
step 1009, decoding to obtain the current block.
In another embodiment of the present disclosure, the difference from the decoding method shown in fig. 10 is that the reference block is subjected to local illumination compensation before the motion compensation is performed; and then performing motion compensation on the reference block subjected to the local illumination compensation.
In an exemplary embodiment, performing local illumination compensation on a reference block before performing motion compensation includes:
determining local illumination compensation parameters by adopting a preset algorithm according to the reconstruction values of the pixel points adjacent to the current block and the reconstruction values of the pixel points of the reference block;
and predicting the current block according to the local illumination compensation parameter to obtain a predicted value of the current block.
In another embodiment of the present disclosure, the difference from the decoding method shown in fig. 10 is that, after motion compensation is performed and after BIO, BGC, interPF processing is performed on the motion-compensated prediction block, local illumination compensation is performed on the BIO, BGC, interPF processed prediction block.
In an exemplary embodiment, the locally illumination compensating the prediction block after BIO, BGC, interPF processing includes:
Determining local illumination compensation parameters by adopting a preset algorithm according to the reconstruction values of the pixel points adjacent to the current block and the predicted values of the pixel points after the motion compensation of the reference block;
predicting the current block according to the local illumination compensation parameter to obtain a predicted value of the current block;
the predicted value of the pixel point after the reference block performs motion compensation is the pixel value of the pixel point in the predicted block obtained after BIO or BGC.
Some embodiments of the present disclosure provide a video decoding apparatus, in an exemplary embodiment, as shown in fig. 11, including: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the video decoding method of any of the examples above when executing the computer program.
Some embodiments of the present disclosure also provide a computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the inter prediction method described in any one of the above examples, or implements the video encoding method described in any one of the above examples, or implements the video decoding method described in any one of the above examples.
In an embodiment of the present disclosure, the video encoding method of any of the above examples may be performed by a video encoder.
In an exemplary embodiment, fig. 12 is a block diagram of a video encoder, and as shown in fig. 12, the video encoder 20 includes a video data memory 33, a segmentation unit 35, a prediction processing unit 41, a summer 50, a transform processing unit 52, a quantity unit 54, and an entropy encoding unit 56. The prediction processing unit 41 includes a Motion Estimation Unit (MEU) 42, a Motion Compensation Unit (MCU) 44, an intra prediction processing unit 46, and an Intra Block Copy (IBC) unit 48. Although shown separately in fig. 15 for ease of explanation, it should be understood that MEU42, MCU44, intra-prediction processing unit 46, and IBC unit 48 may in fact be highly integrated. For video block reconstruction, video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, a summer 62, a filter unit 64, and a Decoded Picture Buffer (DPB) 66.
In some embodiments of the present disclosure, a specific implementation of the inter prediction portion at the decoding end may be:
the decoder acquires the code stream and analyzes the code stream to obtain an illumination compensation technology (IC) permission identification bit of the current video sequence.
In the inter-frame prediction decoding process, if the IC technology permission identification bit is '1', executing the following steps; if the IC technology allows the flag to be '0', then only steps a), b), d) and g) are performed:
a) And obtaining a code stream, decoding to obtain residual information, and obtaining time domain residual information through the processes of inverse transformation, inverse quantization and the like.
b) And analyzing the code stream to obtain an inter prediction mode and an MV index of the current decoding block.
c) Analyzing the code stream to obtain an IC use identification bit of the current decoding block, taking grammar of table 1 as an example, if the IC use identification bit of the current decoding block is true, continuing to analyze the code stream to obtain a first bit illumination compensation mode index identification bit of the current decoding block, otherwise, the current decoding unit does not use an illumination compensation technology; if the first illumination compensation mode index identification bit is true; continuing to analyze the second bit illumination compensation mode index identification bit, otherwise setting the illumination compensation mode index to be 1, which means that the first illumination compensation linear model IC_TL is used (the illumination compensation linear model calculation can be performed by using the upper reconstructed pixels and the left reconstructed pixels); if the analysis results in the second illumination compensation mode index identification bit being true, the illumination compensation mode index is set to 3, which means that the third illumination compensation linear mode ic_l (only the left reconstruction pixel can be used for illumination compensation linear model calculation) is used, otherwise, the illumination compensation mode index is set to 2, which means that the second illumination compensation linear mode ic_t (only the upper reconstruction pixel can be used for illumination compensation linear model calculation) is used.
d) And obtaining a reference block of the reference frame as an initial prediction block according to the MV index, the inter prediction mode and other information, and performing motion compensation on the initial prediction block to obtain an intermediate prediction block.
e) If the IC use flag is not no, that is, illumination compensation needs to be performed on the current intermediate prediction block, then:
the current intermediate prediction block is divided into a plurality of sub-blocks (i.e. reference block sub-blocks) with preset numbers, and the selection of the pixel points can be shown by referring to fig. 15a, 15b and 15 c. Each sub-block extracts the left and/or upper predicted pixels inside the sub-block and the left and/or upper reconstructed pixels outside the block to be coded of the current frame according to the illumination compensation mode index, orders and averages the predicted pixels and the reconstructed pixels (the specific operation is as above) and brings the above formula into the above formula to obtain the linear model parameters a and b corresponding to each sub-block. Each sub-block carries out linear offset on all prediction pixels in the sub-block according to the corresponding scaling factor a and offset factor b to obtain a final prediction value;
if the IC use flag bit is negative, the intermediate prediction block is considered to be the final prediction block.
f) And c) superposing the final predicted block with the residual information restored in the step a) to obtain a reconstructed block of the current decoding unit, and outputting the reconstructed block through post-processing.
The above illumination compensation technique may obtain the position and number of reconstructed pixels in the reference frame from any position in the reference block in the reference frame and from an integer number greater than 0, such as the first row and/or the first column in the reference block pointed by the motion vector.
In the process of calculating the linear model parameters, after all pixel values are sequenced, the maximum value and the minimum value are removed, and an average value of the two maximum values and an average value of the two minimum values are obtained, namely the average value is consistent with the average value of the two maximum values and the average value of the two minimum values; or alternatively, the points may be selected at intervals, such as the first point on the upper side and the second last point, the first point on the left side and the second last point, and the average value of the two larger values and the average value of the two smaller values are obtained by sorting, and then the calculation steps are consistent with the foregoing description;
the illumination compensation technique can be applied to any position in other techniques such as bidirectional optical flow (BDOF/BIO), decoding-side motion vector correction (DMVR), bidirectional predictive weighting (BCW/BGC), inter-frame prediction filtering (INTERPF) or inter-frame intra-frame combined prediction (CIIP), for example, the illumination compensation technique is applied before the bidirectional optical flow technique and the bidirectional weighted prediction technique;
the illumination compensation technique can not be applied to the same coding block together with other techniques, if the current block uses the IC technique, the current block is not corrected and compensated by BDOF/BIO;
The illumination compensation technique described above requires a recalculation of the linear model between different color components, e.g., YUV color space requires a calculation of the linear model for three color components for Y, U and V, respectively.
In some embodiments of the present disclosure, a specific implementation of the inter prediction portion at the decoding end may further be:
the decoder acquires the code stream and analyzes the code stream to obtain an illumination compensation technology (IC) permission identification bit of the current video sequence.
In the inter-frame prediction decoding process, if the IC technology permission identification bit is '1', executing the following steps; if the IC technology allows the flag to be '0', then only steps a), b), d) and f) are performed:
a) And obtaining a code stream, decoding to obtain residual information, and obtaining time domain residual information through the processes of inverse transformation, inverse quantization and the like.
b) And analyzing the code stream to obtain an inter prediction mode and an MV index of the current decoding block.
c) If the INTER prediction mode of the current decoding block is a common INTER prediction mode (INTER), analyzing the code stream to obtain an IC use identification bit of the current decoding block, if the IC use identification bit of the current decoding block is true, continuing to analyze the code stream to obtain a first bit illumination compensation mode index identification bit of the current decoding block, otherwise, the current decoding unit does not use an illumination compensation technology; if the first illumination compensation mode index identification bit is true; continuing to analyze the second bit illumination compensation mode index identification bit, otherwise setting the illumination compensation mode index to be 1, which means that the first illumination compensation linear model IC_TL is used (the illumination compensation linear model calculation can be performed by using the upper reconstructed pixels and the left reconstructed pixels); if the analysis results in the second illumination compensation mode index identification bit being true, the illumination compensation mode index is set to 3, which means that the third illumination compensation linear mode ic_l (only the left reconstruction pixel can be used for illumination compensation linear model calculation) is used, otherwise, the illumination compensation mode index is set to 2, which means that the second illumination compensation linear mode ic_t (only the upper reconstruction pixel can be used for illumination compensation linear model calculation) is used.
If the inter prediction mode of the current decoding block is SKIP mode (SKIP) or MERGE mode (MERGE/DIRECT), the IC technology information in the neighboring reconstructed blocks is obtained according to the same sequence as the encoding end as the IC technology usage information of the current decoding unit.
d) And obtaining an initial prediction block according to the prediction mode and the MV index, and performing motion compensation on the initial prediction block to obtain an intermediate prediction block.
e) If the IC usage flag of the current decoding block is not no, then:
dividing the middle prediction block into a plurality of sub-blocks with preset numbers, and obtaining a prediction pixel in the sub-block at a corresponding position and a reconstruction pixel outside a current frame coding unit by each sub-block according to the illumination compensation mode index obtained by analysis to calculate linear model parameters to obtain a scaling factor a and an offset factor b of each sub-block; each sub-block carries out linear offset on all prediction pixels in the sub-block according to the solved scaling factor a and offset factor b to obtain a final prediction block;
and if the IC use identification bit of the current decoding block is NO, taking the intermediate prediction block as a final prediction block.
f) And c) superposing the final predicted block with the residual information restored in the step a) to obtain a reconstructed block of the current decoding unit, and outputting the reconstructed block through post-processing.
The above IC information derivation process at SKIP, MERGE/DIRECT may also bind the mode index of the IC with the neighboring blocks around the reference, if the reference MV comes from the neighboring upper block, the current prediction block uses the illumination compensation mode of the ic_t; if the reference MV comes from the adjacent left block, the current prediction block uses the illumination compensation mode of IC_L; others use the illumination compensation mode of ic_tl.
In an embodiment of the present disclosure, the video decoding method of any of the above examples may be performed by a video decoder.
In an exemplary embodiment, fig. 13 is a block diagram of a video decoder, as shown in fig. 13, video decoder 30 includes video data memory 78, entropy decoding unit 80, prediction processing unit 81, inverse quantization unit 86, inverse transform processing unit 88, summer 90, wave device unit 92, and DPB94. Prediction processing unit 81 includes MCU82 intra prediction processing unit 84 and IBC unit 85. In some examples, video decoder 30 may perform a decoding process that is substantially reciprocal to the encoding process described with respect to video encoder 20 from fig. 12.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed cooperatively by several physical components. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.

Claims (15)

  1. An inter prediction method, comprising:
    determining local illumination compensation parameters according to the acquired available pixel points; the available pixel points comprise pixel points adjacent to a current block and/or pixel points of a reference block of the current block;
    and carrying out inter-frame prediction on the current block according to the local illumination compensation parameter to obtain a predicted value of the current block.
  2. The inter prediction method of claim 1, wherein the pixels adjacent to the current block include pixels in a row adjacent to the current block and/or pixels in a column adjacent to the current block.
  3. The inter prediction method according to claim 1, wherein,
    the pixels of the reference block include pixels in a row above the reference block and/or pixels in a column to the left of the reference block.
  4. The inter prediction method according to claim 1, wherein the pixels of the reference block include pixels in other rows than the upper row of the reference block and/or pixels in a column to the left of the reference block.
  5. The inter prediction method according to claim 1, wherein the pixels of the reference block include pixels in a row above the reference block and/or pixels in a column of the reference block other than the left column.
  6. The inter prediction method according to claim 1, wherein the pixels of the reference block include pixels in other rows than the upper row of the reference block and/or pixels in other columns than the left column of the reference block.
  7. The inter prediction method according to any one of claims 2 to 6, wherein,
    the pixel points in a row comprise all or part of the pixel points in the row; the pixel points in a column comprise all or part of the pixel points in the column;
    the partial pixel points are obtained through downsampling and then selection, or are obtained according to a preset position.
  8. The inter prediction method according to claim 1, wherein the local illumination compensation parameter is determined by one or more of:
    determining local illumination compensation parameters by adopting a preset algorithm according to the reconstruction values of the pixels adjacent to the current block and the reconstruction values of the pixels of the reference block;
    determining local illumination compensation parameters by adopting a preset algorithm according to the reconstruction values of the pixels adjacent to the current block and the predicted values of the pixels of the reference block;
    wherein the predicted value of the pixel point of the reference block includes one or more of the following:
    Pixel values of pixel points in the prediction block obtained after the reference block is subjected to motion compensation; and the reference block obtains pixel values of pixel points in the prediction block after motion compensation, bi-directional optical flow BIO or bi-directional gradient correction BGC.
  9. An inter prediction apparatus, comprising: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the inter prediction method of any of claims 1 to 8 when the computer program is executed.
  10. A video encoding method, comprising:
    inter-predicting a current block according to an inter-prediction method as claimed in any one of claims 1 to 8 to obtain a predicted value of the current block;
    and encoding the current block according to the predicted value of the current block.
  11. The video coding method of claim 10, wherein, in the encoding process, the method further comprises:
    after carrying out local illumination compensation on the current block in various candidate modes in a merging mode, obtaining a new group of prediction modes; the CU level illumination compensation marks of the coding units in the new group of prediction modes are all set to be effective values;
    Selecting N groups of modes from prediction modes with the CU-level illumination compensation mark as an effective value to perform rate distortion cost calculation; n is more than or equal to 1;
    and selecting a prediction mode corresponding to the current block according to the rate-distortion cost calculation result, and determining whether the current block performs local illumination compensation or not according to the prediction mode corresponding to the current block.
  12. A video encoding apparatus, comprising: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the video encoding method of any one of claims 10 to 11 when the computer program is executed.
  13. A video decoding method, comprising:
    when local illumination compensation is enabled, inter-predicting a current block according to the inter-prediction method as claimed in any one of claims 1 to 8 to obtain a predicted value of the current block;
    and decoding the current block according to the predicted value of the current block.
  14. A video decoding apparatus, comprising: a processor and a memory storing a computer program executable on the processor, wherein the processor implements the video decoding method of any of claims 13 when the computer program is executed.
  15. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the inter prediction method of any of claims 1 to 8, or the video encoding method of any of claims 10 to 11, or the video decoding method of claim 13.
CN202080107715.0A 2020-12-03 2020-12-10 Inter-frame prediction method, video encoding and decoding method, device and medium Pending CN116569554A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311171521.9A CN117221534A (en) 2020-12-03 2020-12-10 Inter-frame prediction method, video encoding and decoding method, device and medium

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
CNPCT/CN2020/133709 2020-12-03
PCT/CN2020/133709 WO2022116119A1 (en) 2020-12-03 2020-12-03 Inter-frame predication method, encoder, decoder and storage medium
CNPCT/CN2020/133693 2020-12-03
CN2020133693 2020-12-03
PCT/CN2020/135490 WO2022116246A1 (en) 2020-12-03 2020-12-10 Inter-frame prediction method, video encoding and decoding method, apparatus, and medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202311171521.9A Division CN117221534A (en) 2020-12-03 2020-12-10 Inter-frame prediction method, video encoding and decoding method, device and medium

Publications (1)

Publication Number Publication Date
CN116569554A true CN116569554A (en) 2023-08-08

Family

ID=81853735

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311171521.9A Pending CN117221534A (en) 2020-12-03 2020-12-10 Inter-frame prediction method, video encoding and decoding method, device and medium
CN202080107715.0A Pending CN116569554A (en) 2020-12-03 2020-12-10 Inter-frame prediction method, video encoding and decoding method, device and medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202311171521.9A Pending CN117221534A (en) 2020-12-03 2020-12-10 Inter-frame prediction method, video encoding and decoding method, device and medium

Country Status (3)

Country Link
CN (2) CN117221534A (en)
MX (1) MX2023006442A (en)
WO (1) WO2022116246A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023245349A1 (en) * 2022-06-20 2023-12-28 Oppo广东移动通信有限公司 Local illumination compensation methods, video encoding methods, video decoding methods, apparatuses, and system
CN116128759B (en) * 2023-02-08 2024-01-09 爱芯元智半导体(上海)有限公司 Illumination compensation method and device for image

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10701393B2 (en) * 2017-05-10 2020-06-30 Mediatek Inc. Method and apparatus of reordering motion vector prediction candidate set for video coding
CN107147911B (en) * 2017-07-05 2019-07-26 中南大学 Quick interframe coding mode selection method and device based on local luminance compensation LIC
US10834409B2 (en) * 2018-04-06 2020-11-10 Arris Enterprises Llc System and method of implementing multiple prediction models for local illumination compensation
US11146800B2 (en) * 2018-09-24 2021-10-12 Tencent America LLC Low latency local illumination compensation
CN111526362B (en) * 2019-02-01 2023-12-29 华为技术有限公司 Inter-frame prediction method and device
CN111031319B (en) * 2019-12-13 2022-04-19 浙江大华技术股份有限公司 Local illumination compensation prediction method, terminal equipment and computer storage medium

Also Published As

Publication number Publication date
MX2023006442A (en) 2023-06-15
CN117221534A (en) 2023-12-12
WO2022116246A1 (en) 2022-06-09

Similar Documents

Publication Publication Date Title
US11102515B2 (en) In loop chroma deblocking filter
US10681371B2 (en) Method and device for performing deblocking filtering
EP2168382B1 (en) Method for processing images and the corresponding electronic device
KR20110133597A (en) System and method to process motion vectors of video data
CN109922336B (en) Inter-frame prediction method and device for video data
JP2021523604A (en) Motion compensation for video coding and decoding
WO2020069651A1 (en) A candidate mv construction method for affine merge mode
CN114586366A (en) Inter-frame prediction method, encoder, decoder, and storage medium
CN114830651A (en) Intra prediction method, encoder, decoder, and computer storage medium
CN116569554A (en) Inter-frame prediction method, video encoding and decoding method, device and medium
CN116438796A (en) Image prediction method, encoder, decoder, and computer storage medium
CN116601957A (en) Intra-frame prediction method and device, decoder and encoder
CN114173136A (en) Encoding method, decoding method, encoder, decoder, and encoding system
CN113068026B (en) Coding prediction method, device and computer storage medium
CN113079376A (en) Video coding method and device for static area
CN116472707A (en) Image prediction method, encoder, decoder, and computer storage medium
CN118044184A (en) Method and system for performing combined inter-prediction and intra-prediction
CN116569549A (en) Inter prediction method, encoder, decoder and storage medium
CN112911301B (en) Local brightness compensation method and device and computer readable storage medium
CN116982262A (en) State transition for dependent quantization in video coding
CN116325727A (en) Intra-frame prediction method, encoder, decoder and storage medium
CN116250240A (en) Image encoding method, image decoding method and related devices
CN116762339A (en) Illumination compensation method, encoder, decoder and storage medium
CN111656782A (en) Video processing method and device
US10992942B2 (en) Coding method, decoding method, and coding device

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