CN112291558B - Encoding and decoding method, device and equipment thereof - Google Patents

Encoding and decoding method, device and equipment thereof Download PDF

Info

Publication number
CN112291558B
CN112291558B CN201910668356.5A CN201910668356A CN112291558B CN 112291558 B CN112291558 B CN 112291558B CN 201910668356 A CN201910668356 A CN 201910668356A CN 112291558 B CN112291558 B CN 112291558B
Authority
CN
China
Prior art keywords
sub
block
prediction mode
intra
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.)
Active
Application number
CN201910668356.5A
Other languages
Chinese (zh)
Other versions
CN112291558A (en
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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202310489496.2A priority Critical patent/CN116405697A/en
Priority to CN201910668356.5A priority patent/CN112291558B/en
Priority to PCT/CN2020/103326 priority patent/WO2021013153A1/en
Publication of CN112291558A publication Critical patent/CN112291558A/en
Application granted granted Critical
Publication of CN112291558B publication Critical patent/CN112291558B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Landscapes

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

Abstract

The application provides a coding and decoding method, a device and equipment thereof, wherein the method comprises the following steps: when determining to start joint prediction based on sub-blocks for a current block, acquiring block division information of the current block; dividing the current block into at least two sub-blocks according to the block division information; obtaining prediction mode information corresponding to the at least two sub-blocks respectively; obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information; and obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks. Through the technical scheme of the method and the device, the prediction accuracy can be improved, and the prediction performance is improved.

Description

Encoding and decoding method, device and equipment thereof
Technical Field
The present disclosure relates to the field of coding and decoding technologies, and in particular, to a coding and decoding method, device, and apparatus thereof.
Background
For the purpose of saving space, the video images are transmitted after being encoded, and the complete video encoding method can comprise the processes of prediction, transformation, quantization, entropy encoding, filtering and the like. Among other things, predictive coding may include intra-coding and inter-coding. Furthermore, inter-frame coding utilizes the correlation of video time domain, and uses pixels adjacent to the coded image to predict the current pixel, so as to achieve the purpose of effectively removing video time domain redundancy. In addition, intra-frame coding refers to using the correlation of the video spatial domain to predict the current pixel by using the pixel of the already coded block of the current frame image, so as to achieve the purpose of removing the video spatial redundancy.
In inter coding, a Motion Vector (MV) may be used to represent the relative displacement of a current block of a current frame picture from a reference block of a reference frame picture. For example, when the current block A1 of the image a needs to be transmitted, motion search can be performed in the image B to find the reference block B1 that is most matched with the current block A1, and the relative displacement between the current block A1 and the reference block B1, that is, the motion vector of the current block A1, is determined.
In the prior art, the current block is rectangular, while the edges of the actual object tend not to be rectangular, and for the current block at the edges of the object, there tend to be two different objects (e.g., an object with a foreground and a background). In this case, only a single prediction mode is used for predicting the current block, and there are problems such as poor prediction effect, large coding residual error, and poor coding performance.
Disclosure of Invention
The application provides a coding and decoding method, a coding and decoding device and equipment thereof, which improve the accuracy of prediction.
The application provides a coding and decoding method, which comprises the following steps:
when determining to start joint prediction based on sub-blocks for a current block, acquiring block division information of the current block;
Dividing the current block into at least two sub-blocks according to the block division information;
obtaining prediction mode information corresponding to the at least two sub-blocks respectively;
obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information;
and obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks.
The application provides a coding and decoding method, which comprises the following steps:
when determining that a current block starts target weighted prediction, acquiring a target predicted value of the current block, wherein the target predicted value is used for encoding or decoding the current block by the following steps:
acquiring a first prediction mode and a second prediction mode corresponding to the current block;
determining a first predicted value corresponding to the current block according to the first predicted mode;
determining a second predicted value corresponding to the current block according to the second predicted mode;
and carrying out weighting processing according to the first predicted value and the second predicted value to obtain a target predicted value of the current block.
The present application provides a codec apparatus, the apparatus comprising:
the acquisition module is used for acquiring block division information of the current block when determining that the joint prediction based on the sub-blocks is started on the current block;
The processing module is used for dividing the current block into at least two sub-blocks according to the block division information;
the acquisition module is further used for acquiring prediction mode information corresponding to the at least two sub-blocks respectively; obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information; and obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks.
The present application provides a codec apparatus, the apparatus comprising: the acquisition module is used for acquiring a first prediction mode and a second prediction mode corresponding to the current block when determining that the current block starts target weighted prediction;
the determining module is used for determining a first predicted value corresponding to the current block according to the first predicted mode; determining a second predicted value corresponding to the current block according to the second predicted mode;
and the processing module is used for carrying out weighting processing according to the first predicted value and the second predicted value to obtain a target predicted value of the current block, wherein the target predicted value is used for encoding or decoding the current block.
The application provides a decoding end device, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor;
The processor is configured to execute machine-executable instructions to perform the steps of:
when determining to start joint prediction based on sub-blocks for a current block, acquiring block division information of the current block; dividing the current block into at least two sub-blocks according to the block division information; obtaining prediction mode information corresponding to the at least two sub-blocks respectively; obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks; or alternatively, the process may be performed,
when determining that a current block starts target weighted prediction, acquiring a first prediction mode and a second prediction mode corresponding to the current block; determining a first predicted value corresponding to the current block according to the first predicted mode; determining a second predicted value corresponding to the current block according to the second predicted mode; and carrying out weighting processing according to the first predicted value and the second predicted value to obtain a target predicted value of the current block, wherein the target predicted value is used for decoding the current block.
An encoding end device, a processor, and a machine-readable storage medium storing machine-executable instructions executable by the processor;
The processor is configured to execute machine-executable instructions to perform the steps of:
when determining to start joint prediction based on sub-blocks for a current block, acquiring block division information of the current block; dividing the current block into at least two sub-blocks according to the block division information; obtaining prediction mode information corresponding to the at least two sub-blocks respectively; obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks; or alternatively, the process may be performed,
when determining that a current block starts target weighted prediction, acquiring a first prediction mode and a second prediction mode corresponding to the current block; determining a first predicted value corresponding to the current block according to the first predicted mode; determining a second predicted value corresponding to the current block according to the second predicted mode; and carrying out weighting processing according to the first predicted value and the second predicted value to obtain a target predicted value of the current block, wherein the target predicted value is used for encoding the current block.
As can be seen from the above technical solutions, in the embodiments of the present application, when determining that the joint prediction based on the sub-blocks is started for the current block, the current block may be divided into at least two sub-blocks, and the predicted values corresponding to the at least two sub-blocks are obtained, and the predicted value of the current block is obtained according to the predicted values corresponding to the at least two sub-blocks. In the above manner, prediction can be performed for at least two sub-blocks, so that prediction accuracy, prediction performance, coding performance and coding residual error can be improved.
Drawings
FIG. 1 is a schematic diagram of a video encoding framework in one embodiment of the present application;
FIG. 2 is a flow chart of a method of encoding and decoding in one embodiment of the present application;
3A-3H are schematic illustrations of partitioning of a current block in one embodiment of the present application;
FIGS. 4A-4D are schematic diagrams of intra block copy prediction modes and intra block copy prediction modes;
FIGS. 5A-5H are schematic diagrams of intra block copy prediction mode and inter prediction mode;
FIGS. 5I-5L are schematic diagrams of determining an intra block copy prediction mode and an inter prediction mode based on surrounding block prediction modes;
FIGS. 6A-6H are schematic diagrams of intra block copy prediction modes and intra prediction modes;
7A-7D are schematic diagrams of determining an intra block copy prediction mode and an intra prediction mode based on surrounding block prediction modes;
FIGS. 8A-8D are schematic diagrams of intra prediction modes and intra prediction modes;
FIGS. 9A-9D are schematic diagrams of intra prediction modes and inter prediction modes;
FIGS. 10A-10D are schematic diagrams of determining an intra prediction mode and an inter prediction mode based on surrounding block prediction modes;
FIGS. 11A-11D are schematic diagrams of inter prediction modes and inter prediction modes;
FIGS. 12A-12F are schematic diagrams of a predicted value acquisition process in one embodiment of the present application;
FIG. 13 is a flow chart of a method of encoding and decoding in one embodiment of the present application;
fig. 14 is a schematic structural view of a codec device according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a codec device in an embodiment of the present application;
FIG. 16 is a hardware configuration diagram of a decoding side device in an embodiment of the present application;
fig. 17 is a hardware configuration diagram of an encoding end device in an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples and claims herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to any or all possible combinations including one or more of the associated listed items. It should be understood that although the terms first, second, third, etc. may be used in embodiments of the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of embodiments of the present application. Depending on the context, furthermore, the word "if" used may be interpreted as "at … …" or "at … …" or "in response to a determination".
The embodiment of the application provides a coding and decoding method, a device and equipment thereof, which can relate to the following concepts:
intra-prediction, inter-prediction (intra prediction and inter prediction) and IBC (intra block copy) prediction:
intra prediction refers to predicting a current pixel by using pixels of a coded block of a current image by utilizing correlation of a video spatial domain, so as to achieve the purpose of removing video spatial redundancy. In intra prediction, a plurality of prediction modes are defined, each prediction mode corresponds to one texture direction (except for a DC mode), and a current block prediction pixel is generated by a boundary reconstruction pixel value of an adjacent block in the prediction direction. For example, if the texture of the image is in a horizontally-oriented arrangement, the horizontal prediction mode may better predict the image information.
Inter-frame prediction refers to the fact that based on correlation of video time domains, because a video sequence contains strong correlation of the time domains, pixels of a current image are predicted by using pixels adjacent to encoded images, and the purpose of effectively removing video time domain redundancy can be achieved. The inter prediction part of the video coding standard uses block-based motion compensation techniques, the main principle being to find a best matching block in the previously coded picture for each pixel block of the current picture, a process called motion estimation (Motion Estimation, ME).
Intra Block Copy (IBC) refers to allowing co-frame reference, the reference data of the current Block comes from the same frame, and Intra Block Copy may also be referred to as Intra Block Copy. In the screen content coding (Screen Content Coding) extension standard of HEVC (High Efficiency Video Coding ), an intra block copy technique is proposed to use block vectors to obtain the prediction value of the current block. Based on the characteristic that a large number of repeatedly-appearing textures exist in the same frame in the screen content, when the predicted value of the current block is obtained by adopting the block vector, the compression efficiency of the screen content sequence can be remarkably improved. Subsequently, during VVC (Versatile Video Coding, general video coding) standard formulation, intra block copy techniques are adopted again.
Motion Vector (MV): in inter-coding, a motion vector may be used to represent the relative displacement between a current block of a current frame video image and a reference block of a reference frame video image. Each divided block has a corresponding motion vector to be transmitted to the decoding end, and if the motion vector of each block is independently encoded and transmitted, particularly divided into a large number of blocks of small size, a considerable number of bits are consumed. In order to reduce the number of bits used to encode the motion vector, spatial correlation between neighboring blocks may be utilized to predict the motion vector of the current block to be encoded from the motion vector of the neighboring encoded block, and then the prediction difference is encoded, so that the number of bits representing the motion vector may be effectively reduced. Further, in the process of encoding the motion vector of the current block, the motion vector of the current block may be predicted by using the motion vectors of the neighboring encoded blocks, and then the Difference (MVD, motionVector Difference) between the predicted value (MVP, motion Vector Prediction) of the motion vector and the true estimate of the motion vector may be encoded, thereby effectively reducing the number of encoding bits of the motion vector.
Motion information (Motion Information): since the motion vector represents a positional offset between the current block and a certain reference block, in order to accurately acquire information directed to the block, index information of reference frame images is required to represent which reference frame image the current block uses in addition to the motion vector. In the video coding technology, for a current frame image, a reference frame image list may be generally established, and reference frame image index information indicates what reference frame image in the reference frame image list is adopted by the current block. In addition, many coding techniques support multiple reference picture lists, and therefore, an index value, which may be referred to as a reference direction, may also be used to indicate which reference picture list is used. In summary, in the video encoding technology, information related to motion such as a motion vector, a reference frame index, a reference direction, and the like may be collectively referred to as motion information.
Block Vector (BV): the block vector is applied to an intra block copy technology, and the intra block copy technology uses the block vector to perform motion compensation, namely, obtains a predicted value of a current block by adopting the block vector. Unlike motion vectors, block vectors represent the relative displacement between the current block and the best matching block in the current frame's coded block. Based on the characteristic that a large number of repeated textures exist in the same frame, the compression efficiency can be remarkably improved when the predicted value of the current block is obtained by adopting a block vector.
Intra prediction mode: in intra coding, intra prediction modes may be used for motion compensation, i.e. intra prediction modes are used to obtain the prediction value of the current block. For example, the intra prediction mode may include Planar mode, DC mode, and 33 angle modes. Referring to table 1, for an example of intra prediction modes, planar mode corresponds to mode 0, dc mode corresponds to mode 1, and the remaining 33 angle modes correspond to modes 1-34. The Planar mode is applied to a region where a pixel value is slowly changed, uses two linear filters in a horizontal direction and a vertical direction, and takes an average value of the two as a predicted value of a current block pixel. The DC mode is applied to a large-area flat region, and an average value of surrounding pixels of the current block is taken as a predicted pixel value of the current block. The angular pattern may have 33 angles, pattern 26 representing a vertical direction and pattern 10 representing a horizontal direction. In the newly established new generation of codec standard VVC, more sub-divided angular directions, such as 67 angular patterns in total, are employed.
TABLE 1
Intra prediction mode Intra prediction mode
0 Planar mode
1 DC mode
2…34 angular2…angular34
Rate distortion principle (Rate-Distortion Optimized): there are two major indicators for evaluating coding efficiency: the smaller the bit stream, the larger the compression ratio and the larger the PSNR, the better the reconstructed image quality, and the discrimination formula is essentially the integrated evaluation of the two in mode selection. For example, the cost of pattern correspondence: j (mode) =d+λ×r, where D represents Distortion, which can be measured generally using an SSE index, which is the mean square sum of the differences between the reconstructed image block and the source image; λ is the lagrangian multiplier, and R is the actual number of bits required for coding an image block in this mode, including the sum of bits required for coding mode information, motion information, residuals, etc.
Video coding framework: referring to fig. 1, the processing flow of the encoding end of the embodiment of the present application may be implemented by using a video encoding framework, and in addition, a schematic diagram of a video decoding framework is similar to that of fig. 1, and a detailed description is not repeated here. In particular, in the video encoding framework and the video decoding framework, modules such as intra-frame prediction, motion estimation/motion compensation, reference image buffers, in-loop filtering, reconstruction, transformation, quantization, inverse transformation, inverse quantization, entropy encoder, and the like can be included. At the encoding end, the processing flow of the encoding end can be realized through the coordination among the modules, and at the decoding end, the processing flow of the decoding end can be realized through the coordination among the modules.
The following describes the codec method in detail with reference to several embodiments.
Example 1: referring to fig. 2, a flow chart of a coding and decoding method in an embodiment of the present application is shown, where the coding and decoding method may be applied to a decoding end or an encoding end, and the coding and decoding method may include the following steps:
in step 201, when it is determined that the subblock-based joint prediction is started for the current block, block partition information of the current block is obtained.
Step 202, dividing the current block into at least two sub-blocks according to the block division information.
For convenience of description, in the embodiment of the present application, the current block is divided into two sub-blocks, that is, the current block is divided into a first sub-block and a second sub-block according to the block division information. In the case of dividing the current block into three or more sub-blocks, the implementation process is similar to the implementation process of two sub-blocks, and will not be described in detail later.
And 203, obtaining prediction mode information corresponding to at least two sub-blocks respectively.
For example, prediction mode information corresponding to a first sub-block is obtained, and prediction mode information corresponding to a second sub-block is obtained.
Step 204, according to the prediction mode information corresponding to the at least two sub-blocks, obtaining the prediction values corresponding to the at least two sub-blocks. For example, a prediction value corresponding to a first sub-block is obtained according to prediction mode information corresponding to the first sub-block, and a prediction value corresponding to a second sub-block is obtained according to prediction mode information corresponding to the second sub-block.
Step 205, obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks.
As can be seen from the above technical solutions, in this embodiment, when determining to start joint prediction based on sub-blocks for a current block, the current block may be divided into at least two sub-blocks, and the predicted values corresponding to the at least two sub-blocks are obtained, and the predicted value of the current block is obtained according to the predicted values corresponding to the at least two sub-blocks. In the above manner, prediction can be performed for at least two sub-blocks, so that prediction accuracy, prediction performance, coding performance and coding residual error can be improved.
In step 201, the decoding end or the encoding end needs to determine whether to start subblock-based joint prediction for the current block. If the joint prediction based on the sub-block is started for the current block, the encoding and decoding methods of the embodiments of the present application may be adopted. If the joint prediction based on the sub-block is not started for the current block, the encoding and decoding method of the embodiment of the application may not be adopted.
For example, it may be determined whether the characteristic information of the current block satisfies a specific condition; if yes, determining to start the joint prediction based on the sub-blocks for the current block; if not, it is determined that the subblock-based joint prediction is not to be enabled for the current block. The characteristic information may include, but is not limited to, one or any combination of the following: the frame type of the current frame where the current block is located, the size information of the current block and the switch control information. The switch control information may be SPS (sequence level) switch control information, PPS (picture parameter level) switch control information, or TILE (slice level) switch control information.
For example, if the feature information is the frame type of the current frame where the current block is located, the frame type of the current frame where the current block is located meets a specific condition, which may include, but is not limited to: if the frame type of the current frame where the current block is located is a B frame, determining that the frame type meets a specific condition; or if the frame type of the current frame where the current block is located is an I frame, determining that the frame type meets a specific condition.
For example, if the feature information is size information of the current block, and the size information includes a width of the current block and a height of the current block, the size information of the current block satisfies a specific condition, which may include, but is not limited to: if the width of the current block is larger than or equal to the first value and the height of the current block is larger than or equal to the second value, determining that the size information of the current block meets a specific condition. Or if the width of the current block is greater than or equal to the third value, the height of the current block is greater than or equal to the fourth value, the width of the current block is less than or equal to the fifth value, and the height of the current block is less than or equal to the sixth value, determining that the size information of the current block meets the specific condition.
Illustratively, the above values may be empirically configured, such as 8, 16, 32, 64, 128, etc., without limitation. In one possible implementation, the first value may be 8, the second value may be 8, the third value may be 8, the fourth value may be 8, the fifth value may be 64, and the sixth value may be 64. Of course, the foregoing is merely an example, and is not limiting. In summary, if the width of the current block is greater than or equal to 8 and the height of the current block is greater than or equal to 8, it is determined that the size information of the current block satisfies the specific condition. Or if the width of the current block is greater than or equal to 8, the height of the current block is greater than or equal to 8, the width of the current block is less than or equal to 64, and the height of the current block is less than or equal to 64, determining that the size information of the current block meets the specific condition.
For example, if the characteristic information is switch control information, the switch control information satisfies a specific condition, which may include, but is not limited to: if the switch control information is enabled, determining that the switch control information meets a specific condition. For example, a piece of switch control information can be added to the geometric partitioning mode, if the switch control information is enabled, the fact that the geometric partitioning mode is enabled is allowed is indicated, at this time, the switch control information meets a specific condition, and the joint prediction based on the sub-blocks can be started for the current block.
For example, if the feature information is the frame type of the current frame where the current block is located and the size information of the current block, the frame type satisfies a specific condition, and when the size information satisfies the specific condition, it is determined that the feature information of the current block satisfies the specific condition. If the characteristic information is the frame type and the switch control information of the current frame where the current block is located, the frame type meets the specific condition, and when the switch control information meets the specific condition, the characteristic information of the current block is determined to meet the specific condition. If the characteristic information is the size information and the switch control information of the current block, the size information meets a specific condition, and when the switch control information meets the specific condition, the characteristic information of the current block is determined to meet the specific condition. If the characteristic information is the frame type of the current frame where the current block is located, the size information of the current block and the switch control information, the frame type meets the specific condition, the size information meets the specific condition, and the switch control information meets the specific condition, the characteristic information of the current block is determined to meet the specific condition.
In step 201 and step 202, the decoding end or the encoding end needs to acquire block division information of the current block, and divide the current block into at least two sub-blocks according to the block division information, where the at least two sub-blocks include a first sub-block and a second sub-block. For example, the shape of the first sub-block may be the same as the shape of the second sub-block; alternatively, the shape of the first sub-block may be different from the shape of the second sub-block. The first sub-block may include, but is not limited to, one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks; the second sub-block may include, but is not limited to, one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks.
For example, in the triangle prediction mode (TPM, triangle Partition Mode), the current block may be divided into two triangle sub-blocks. Referring to fig. 3A, in an example of dividing the current block into two triangular sub-blocks according to a main diagonal manner, that is, dividing the current block into two triangular sub-blocks according to a direction forming an angle of 45 degrees with a horizontal right direction, that is, the first sub-block may be a triangular sub-block, and the second sub-block may be a triangular sub-block. Referring to fig. 3B, in an example of dividing the current block into two triangular sub-blocks in a sub-diagonal manner, i.e., dividing the current block into two triangular sub-blocks in a direction having an angle of 135 degrees with respect to the horizontal right direction, that is, the first sub-block may be a triangular sub-block and the second sub-block may be a triangular sub-block.
For another example, in the geometric division mode (GEO, geometrical Partitioning), the GEO may support more directional division, the current block may be divided into one triangle sub-block and one trapezoid sub-block, the current block may be divided into two trapezoid sub-blocks, and the current block may be divided into one triangle sub-block and one pentagon sub-block, unlike the division of two triangle sub-blocks. Of course, the above are just a few examples of more directional partitioning, and no limitation is imposed on the partitioning direction. In the geometric partitioning mode, the current block may also be partitioned into two sub-blocks of arbitrary shape, just to mention a few partitioning possibilities.
Referring to fig. 3C and 3D, the current block is divided into one triangle sub-block and one trapezoid sub-block, i.e., the first sub-block is a triangle sub-block and the second sub-block is a trapezoid sub-block. Referring to fig. 3E and 3F, the current block is divided into two trapezoidal sub-blocks, i.e., a first sub-block is a trapezoidal sub-block and a second sub-block is a trapezoidal sub-block. Referring to fig. 3G and 3H, the current block is divided into one triangle sub-block and one pentagon sub-block, i.e., the first sub-block is a triangle sub-block and the second sub-block is a pentagon sub-block.
For example, a switching decision may be added to whether to use the triangulation mode or the geometric partitioning mode.
In summary, the decoding end or the encoding end may select one block partition information from fig. 3A to 3H, and if fig. 3A is selected, the current block is divided into the first sub-block and the second sub-block by using the block partition information shown in fig. 3A. Further, in order to obtain the block partition information of the current block, the decoding end and the encoding end may obtain the block partition information of the current block in the following manner:
in the first mode, the encoding end uses a certain block division information by default through protocol convention, and the decoding end uses the block division information by default through protocol convention. For example, the encoding end uses the block division information shown in fig. 3A by default through protocol convention, the decoding end uses the block division information shown in fig. 3A by default through protocol convention, the encoding end divides the current block into a first triangle sub-block and a second triangle sub-block according to the block division information shown in fig. 3A, and the decoding end divides the current block into the first triangle sub-block and the second triangle sub-block according to the block division information shown in fig. 3A. For another example, the encoding end uses the block division information shown in fig. 3C by default through protocol convention, the decoding end uses the block division information shown in fig. 3C by default through protocol convention, the encoding end divides the current block into a first triangle sub-block and a second trapezoid sub-block according to the block division information shown in fig. 3C, and the decoding end divides the current block into a first triangle sub-block and a second trapezoid sub-block according to the block division information shown in fig. 3A. Of course, the foregoing is merely an example, and is not limiting.
In the second mode, several block division information are agreed by a protocol, such as partial block division information or all block division information in fig. 3A-3H, the coding end determines the rate distortion cost corresponding to each block division information, for example, based on each block division information, each group of prediction mode information, and candidates in each group of prediction mode information, the current block is jointly predicted to obtain prediction information of the current block, and the rate distortion cost of the current block is determined by using the rate distortion principle and the prediction information, so that the process is not limited. Then, the coding end selects the minimum rate distortion cost from all the rate distortion costs, takes the block division information corresponding to the minimum rate distortion cost as target block division information, and divides the current block into at least two sub-blocks through the target block division information. For example, if the rate distortion cost of the block division information shown in fig. 3A is minimum, the encoding end divides the current block into a first triangle sub-block and a second triangle sub-block according to the block division information shown in fig. 3A. If the rate distortion cost of the block division information shown in fig. 3C is minimum, the encoding end divides the current block into a first triangle sub-block and a second trapezoid sub-block according to the block division information shown in fig. 3C.
When the encoding end transmits the encoded bit stream to the decoding end, the encoded bit stream may carry indication information of block division information, where the indication information is used to indicate the block division information of the current block. After receiving the coded bit stream, the decoding end can acquire the indication information of the block division information from the coded bit stream, and determine the block division information of the current block according to the indication information. For example, if the indication information is used to indicate the block division information shown in fig. 3A, the decoding end divides the current block into a first triangle sub-block and a second triangle sub-block according to the block division information shown in fig. 3A. If the indication information is used for indicating the block division information shown in fig. 3C, the decoding end divides the current block into a first triangle sub-block and a second trapezoid sub-block according to the block division information shown in fig. 3C.
In step 203, after dividing the current block into at least two sub-blocks, the encoding end or the decoding end may obtain prediction mode information corresponding to the at least two sub-blocks, where the prediction mode information may include, but is not limited to: intra block copy prediction mode (i.e., IBC mode), intra prediction mode, inter prediction mode. For example, after dividing the current block into a first sub-block and a second sub-block, prediction mode information of the first sub-block may be acquired, and prediction mode information of the second sub-block may be acquired.
For example, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an intra prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an inter prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an intra block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra prediction mode, and the prediction mode information of the second sub-block may be an intra prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra prediction mode, and the prediction mode information of the second sub-block may be an inter prediction mode. Or, the prediction mode information of the first sub-block is an inter prediction mode, and the prediction mode information of the second sub-block is an inter prediction mode.
For another example, the prediction mode information of the first sub-block may be an intra prediction mode, and the prediction mode information of the second sub-block may be an intra block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an inter prediction mode, and the prediction mode information of the second sub-block may be an intra block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an intra block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra prediction mode, and the prediction mode information of the second sub-block may be an intra prediction mode. Alternatively, the prediction mode information of the first sub-block may be an inter prediction mode, and the prediction mode information of the second sub-block may be an intra prediction mode. Or, the prediction mode information of the first sub-block is an inter prediction mode, and the prediction mode information of the second sub-block is an inter prediction mode.
In summary, the prediction mode information of the first sub-block may be an intra-block copy prediction mode, or an intra-prediction mode, or an inter-prediction mode, and the prediction mode information of the second sub-block may be an intra-block copy prediction mode, or an intra-prediction mode, or an inter-prediction mode, so as to obtain the prediction mode information of the first sub-block and the prediction mode information of the second sub-block, which are as follows:
in the first mode, the encoding end defaults to use the prediction mode information a as the prediction mode information of the first sub-block and uses the prediction mode information B (same as or different from the prediction mode information a) as the prediction mode information of the second sub-block by protocol convention. The decoding end defaults to use the prediction mode information A as the prediction mode information of the first sub-block and the prediction mode information B as the prediction mode information of the second sub-block through protocol convention. For example, the encoding end defaults to using the intra block copy prediction mode as the prediction mode information of the first sub-block and using the intra prediction mode as the prediction mode information of the second sub-block by protocol convention, and the decoding end defaults to using the intra block copy prediction mode as the prediction mode information of the first sub-block and using the intra prediction mode as the prediction mode information of the second sub-block by protocol convention. Based on this, for the encoding side and decoding side, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an intra prediction mode.
Mode two, several sets of prediction mode information are agreed by the protocol, for example, the following 6 sets of prediction mode information are agreed: the prediction mode information of the first sub-block is an intra-block copy prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode; the prediction mode information of the first sub-block is an intra-block copy prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode; the prediction mode information of the first sub-block is an intra-block copy prediction mode, and the prediction mode information of the second sub-block is an intra-block copy prediction mode; the prediction mode information of the first sub-block is an intra-frame prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode; the prediction mode information of the first sub-block is an intra prediction mode, and the prediction mode information of the second sub-block is an inter prediction mode; the prediction mode information of the first sub-block is an inter prediction mode, and the prediction mode information of the second sub-block is an inter prediction mode.
The encoding end determines the rate distortion cost corresponding to each group of prediction mode information, for example, based on each piece of partition information, each group of prediction mode information and candidates in each group of prediction mode information, performs joint prediction on the current block to obtain the prediction information of the current block, and determines the rate distortion cost of the current block by using the rate distortion principle and the prediction information, without limitation to the process. And then selecting the minimum rate distortion cost from all the rate distortion costs, taking the prediction mode information corresponding to the minimum rate distortion cost as target prediction mode information, and acquiring the prediction mode information of the first sub-block and the prediction mode information of the second sub-block through the target prediction mode information. For example, if the rate distortion cost of the first set of prediction mode information is minimum, the encoding end determines that the prediction mode information of the first sub-block is an intra-block copy prediction mode and the prediction mode information of the second sub-block is an intra-prediction mode.
For example, it is assumed that block division information A1 and block division information A2 are included, and the above-described 6 sets of prediction mode information are included.
Firstly, for the block partition information A1 and the first set of prediction mode information (intra block copy prediction mode+intra prediction mode), traversing one candidate of the intra block copy prediction mode (i.e. a block vector, the acquisition mode of the block vector is referred to in the subsequent embodiment, which will not be described in detail herein) and one candidate of the intra prediction mode (i.e. the intra sub prediction mode, the acquisition mode of the intra sub prediction mode is referred to in the subsequent embodiment, which will not be described in detail herein), performing joint prediction on the current block based on the two candidates to obtain prediction information of the current block, and determining the rate distortion cost of the current block by using the rate distortion principle and the prediction information. And by analogy, for each candidate of the intra-frame block copy prediction mode and each candidate of the intra-frame prediction mode, the current block can be subjected to joint prediction to obtain the prediction information of the current block, and finally the rate distortion cost of the current block is obtained based on the rate distortion principle.
Then, for the block partition information A1 and the second set of prediction mode information (intra block copy prediction mode+inter prediction mode), traversing one candidate of the intra block copy prediction mode (i.e. block vector) and one candidate of the inter prediction mode (i.e. motion information, the motion information is obtained in a manner which will not be described in detail herein, see the following embodiments), performing joint prediction on the current block based on the two candidates to obtain prediction information of the current block, and determining a rate-distortion cost of the current block by using a rate-distortion principle and the prediction information. And by analogy, for each candidate of the intra-frame block copy prediction mode and each candidate of the inter-frame prediction mode, the current block can be subjected to joint prediction to obtain the prediction information of the current block, and finally the rate distortion cost of the current block is obtained.
The above processing is performed for the block division information A1 and the third group prediction mode information, the block division information A1 and the fourth group prediction mode information, the block division information A1 and the fifth group prediction mode information, the block division information A1 and the sixth group prediction mode information, the block division information A2 and the first group prediction mode information, the block division information A2 and the second group prediction mode information, the block division information A2 and the third group prediction mode information, the block division information A2 and the fourth group prediction mode information, the block division information A2 and the fifth group prediction mode information, and the block division information A2 and the sixth group prediction mode information, to obtain the rate distortion cost of the current block.
After traversing to obtain all rate-distortion costs, selecting the smallest rate-distortion cost from all rate-distortion costs, and dividing the current block into a first sub-block and a second sub-block based on the block-division information A1 assuming that the smallest rate-distortion cost is the rate-distortion cost corresponding to the block-division information A1, the first set of prediction mode information, the first candidate of the intra-block copy prediction mode, and the second candidate of the intra-frame prediction mode. The prediction mode information corresponding to the minimum rate distortion cost is the first group of prediction mode information, namely the prediction mode information of the first sub-block is the intra-block copy prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode. The target candidates corresponding to the smallest rate-distortion cost are the first candidate for the intra block copy prediction mode (i.e., block vector) and the second candidate for the intra prediction mode (i.e., intra sub-prediction mode). Of course, the above is just one example of rate distortion cost determination, and is not limited thereto.
When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream may carry indication information of the prediction mode information. After receiving the coded bit stream, the decoding end can acquire indication information of prediction mode information from the coded bit stream, and acquire the prediction mode information of the first sub-block and the prediction mode information of the second sub-block according to the indication information. For example, if the instruction information is used to instruct the first set of prediction mode information in the 6 sets of prediction mode information, the decoding end determines that the prediction mode information of the first sub-block is an intra-block copy prediction mode and the prediction mode information of the second sub-block is an intra-prediction mode.
Example 2: for step 204 in embodiment 1, if the prediction mode information of the first sub-block is the intra block copy prediction mode and the prediction mode information of the second sub-block is the intra block copy prediction mode, then embodiment 2 may be employed for implementation, and for other procedures, see embodiment 1. In embodiment 2, a block vector candidate list including a plurality of candidate block vectors is constructed; selecting one candidate block vector from the candidate list of block vectors as a first target block vector of a first sub-block, and selecting another candidate block vector from the candidate list of block vectors as a second target block vector of a second sub-block; then, a predicted value corresponding to the first sub-block is obtained according to the first target block vector, and a predicted value corresponding to the second sub-block is obtained according to the second target block vector.
For example, a block vector candidate list is constructed for the current block, the candidate block vectors in the block vector candidate list including, but not limited to: the construction process of the block vector candidate list is not limited by the block vector of the spatial neighboring block of the current block, the historical block vector in the HMVP (History-based motion vector prediction) list corresponding to the current block, the default block vector, and the like. The historical block vectors in the HMVP list refer to: in the HMVP mode, a plurality of block vectors corresponding to the current block need to be acquired, and for convenience of distinction, the block vectors in the HMVP mode are called history block vectors, and the number of the history block vectors is determined according to needs, so that the method is not limited. HMVP mode is a technology adopted in the new generation of video coding standard, the principle of which is to predict the block vector of the current block using the block vector of the coded block. For example, a list of HMVP's may be created for the current block, which is used to hold block vectors of the encoded block, which may be referred to as historical block vectors.
After constructing the block vector candidate list for the current block, one candidate block vector may be selected from the block vector candidate list as a first target block vector for the first sub-block and another candidate block vector may be selected from the block vector candidate list as a second target block vector for the second sub-block, which may be different, for example.
After the first target block vector of the first sub-block is determined, a predicted value corresponding to the first sub-block may be obtained according to the first target block vector, and the process of obtaining the predicted value is not limited. After determining the second target block vector of the second sub-block, a predicted value corresponding to the second sub-block may be obtained according to the second target block vector, and the process of obtaining the predicted value is not limited.
Illustratively, when the first sub-block/second sub-block adopts the MMVD sub-mode in the intra block copy prediction mode, then the block vector candidate list may include a block vector candidate list of the MMVD sub-mode, that is, the block vector candidate list includes a block vector resulting from shifting an original block vector, which may include, but is not limited to: block vectors of spatial neighboring blocks of the current block, historical block vectors in an HMVP list corresponding to the current block, default block vectors, and the like. For example, the block vector A1 of the spatial neighboring block A1, the block vector A2 of the spatial neighboring block A2, and the history block vectors B1 to B3 in the HMVP list may be acquired, and the block vector A1, the block vector A2, the history block vector B1, the history block vector B2, and the history block vector B3' obtained by shifting the history block vector B3 may be added to the block vector candidate list. Alternatively, the block vector A1, the block vector A2 'obtained by shifting the block vector A2, the history block vector B1, the history block vector B2, and the history block vector B3' obtained by shifting the history block vector B3 are added to the block vector candidate list. Of course, the above manner is merely two examples, and is not limited thereto, as long as the block vector candidate list includes at least one block vector obtained by shifting an original block vector.
MMVD is to perform a fixed direction, fixed vector difference offset on the original block vector, so as to obtain a new block vector, for example, by obtaining a new block vector in the following manner, where the new block vector may be added to the block vector candidate list to participate in the determination process of the target block vector. BV (new) =bv (original) +offset; alternatively, BV (new) =bv (original) -offset.
BV (new) represents a new block vector obtained after offset, BV (original) represents an original block vector, offset represents a fixed vector difference, and the value of offset can be arbitrarily configured, such as +1, -1, +2, -2, etc., without limitation.
The encoding/decoding end selects one candidate block vector from the candidate list of block vectors as a first target block vector of a first sub-block, and selects another candidate block vector from the candidate list of block vectors as a second target block vector of a second sub-block, which may include:
the first mode, the encoding end performs joint prediction on the current block based on each block dividing information, each group of prediction mode information and candidates in each group of prediction mode information to obtain prediction information of the current block, and determines rate distortion cost of the current block by using a rate distortion principle and the prediction information. The prediction mode information corresponding to the assumed minimum rate distortion cost includes: the prediction mode information of the first sub-block is an intra-block copy prediction mode, the prediction mode information of the second sub-block is an intra-block copy prediction mode, and for each candidate block vector in the block vector candidate list, the candidate block vector with the minimum rate distortion cost is used as a first target block vector of the first sub-block. And on the basis of excluding the first target block vector, taking the candidate block vector with the minimum rate distortion cost as a second target block vector of the second sub-block.
When the encoding end sends an encoding bit stream to the decoding end, the encoding bit stream carries indication information of a target block vector, wherein the indication information is used for indicating index information of a first target block vector and index information of a second target block vector. The index information of the first target block vector is used to indicate which candidate block vector in the block vector candidate list the first target block vector is, and the index information of the second target block vector is used to indicate which candidate block vector in the block vector candidate list the second target block vector is.
The decoding end receives the coded bit stream from the coding end and analyzes the indication information from the coded bit stream. Based on index information of the first target block vector, a candidate block vector corresponding to the index information is selected from a block vector candidate list, the candidate block vector being the first target block vector of the first sub-block. Based on the index information of the second target block vector, a candidate block vector corresponding to the index information is selected from a block vector candidate list, the candidate block vector being the second target block vector of the second sub-block.
In the second mode, the encoding end defaults the first target block vector and the second target block vector through protocol convention, and the decoding end uses the first target block vector and the second target block vector through protocol convention, so that the indication information of the target block vector does not need to be carried in the encoded bit stream, and the encoding cost for transmitting the indication information of the target block vector can be saved.
For example, the encoding end agrees with a first candidate block vector of the default block vector candidate list as a first target block vector of the first sub-block by the protocol, and uses a second candidate block vector of the block vector candidate list as a second target block vector of the second sub-block. The decoding end agrees with a first candidate block vector of a default block vector candidate list through a protocol to serve as a first target block vector of a first sub-block, and a second candidate block vector of the block vector candidate list serves as a second target block vector of a second sub-block.
Based on embodiment 2, when the current frame where the current block is located is a B frame or an I frame, the current block may be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block may be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block may be trapezoidal sub-blocks, and the first sub-block and the second sub-block may be triangular sub-blocks and pentagonal sub-blocks, respectively, which does not limit the division manner of the current block. For example, the prediction mode information of the first sub-block may be an intra block copy prediction mode, and the prediction mode information of the second sub-block may be an intra block copy prediction mode. Referring to fig. 4A to 4D, which are examples of a first sub-block employing an intra block copy prediction mode and a second sub-block employing an intra block copy prediction mode, the shapes of the first sub-block and the second sub-block are not limited, and fig. 4A to 4D are only examples.
In embodiment 2, it is assumed that there are two regions in the current block, one region 1 is the screen content, and the other region 2 is the screen content, however, region 1 needs to refer to the reference block a in the current frame in which the current block is located, region 2 needs to refer to the reference block B in the current frame in which the current block is located, in this application scenario, the current block is divided into a first sub-block (i.e., the sub-block of the region) and a second sub-block (i.e., the sub-block of region 2), and the prediction mode information of the first sub-block is the intra-block copy prediction mode, and the prediction mode information of the second sub-block is the intra-block copy prediction mode, based on the characteristic that there are a large number of repeated textures in the same frame in the screen content, both the first sub-block and the second sub-block adopt the intra-block copy prediction mode, so that the coding effect can be improved.
Example 3: for step 204 in embodiment 1, if the prediction mode information of the first sub-block is the intra block copy prediction mode and the prediction mode information of the second sub-block is the inter prediction mode, then embodiment 3 may be used for implementation, and for other procedures, see embodiment 1. In embodiment 3, a block vector candidate list is constructed, the block vector candidate list including a plurality of candidate block vectors; one candidate block vector is selected from the block vector candidate list as the target block vector of the first sub-block. Constructing a motion information candidate list, wherein the motion information candidate list comprises at least one candidate motion information; one candidate motion information is selected from the motion information candidate list as target motion information of the second sub-block. Obtaining a predicted value corresponding to the first sub-block according to the target block vector; and obtaining a predicted value corresponding to the second sub-block according to the target motion information.
For example, a block vector candidate list is constructed for the current block, the candidate block vectors in the block vector candidate list including, but not limited to: the construction process of the block vector candidate list is not limited by the block vector of the airspace adjacent block of the current block, the historical block vector, the default block vector and the like in the HMVP list corresponding to the current block. After constructing a candidate list of block vectors for the current block, one candidate block vector is selected from the candidate list of block vectors as the target block vector of the first sub-block. After determining the target block vector of the first sub-block, a predicted value corresponding to the first sub-block may be obtained according to the target block vector, and the process of obtaining the predicted value is not limited.
Illustratively, when the first sub-block adopts the MMVD sub-mode in the intra block copy prediction mode, then the block vector candidate list may include a block vector candidate list of the MMVD sub-mode, that is, the block vector candidate list includes at least one block vector obtained by shifting an original block vector, and the original block vector may include, but is not limited to: block vectors of spatial neighboring blocks of the current block, historical block vectors in an HMVP list corresponding to the current block, default block vectors, and the like.
The encoding/decoding side obtains the target block vector of the first sub-block from the block vector candidate list, which may include, but is not limited to:
In the first mode, the encoding end performs joint prediction on the current block based on each block division information, each group of prediction mode information and candidates in each group of prediction mode information to obtain prediction information of the current block, and determines rate distortion cost of the current block by using a rate distortion principle and the prediction information. The prediction mode information corresponding to the assumed minimum rate distortion cost includes: the prediction mode information of the first sub-block is an intra-block copy prediction mode, the prediction mode information of the second sub-block is an inter-prediction mode, and for each candidate block vector in the block vector candidate list, the candidate block vector with the minimum rate distortion cost is used as a target block vector of the first sub-block. When the encoding end sends the encoding bit stream to the decoding end, the encoding bit stream may carry indication information of the target block vector, where the indication information is used to indicate index information of the target block vector, and the index information is used to indicate what candidate block vector in the block vector candidate list the target block vector is. The decoding end receives the coded bit stream from the coding end and analyzes the indication information from the coded bit stream. Based on index information of the target block vector, a candidate block vector corresponding to the index information, which is the target block vector of the first sub-block, is selected from a block vector candidate list.
In the second mode, the encoding end agrees with the default target block vector through the protocol, the decoding end agrees with the default target block vector through the protocol, and the encoding bit stream does not carry indication information of the target block vector, so that encoding cost is saved. For example, the encoding end agrees with the first candidate block vector of the default block vector candidate list as the target block vector of the first sub-block through the protocol, and the decoding end agrees with the first candidate block vector of the default block vector candidate list as the target block vector of the first sub-block through the protocol.
For example, a motion information candidate list is constructed for the current block, the motion information candidate list including at least one candidate motion information, and the construction process of the motion information candidate list is not limited. After constructing a motion information candidate list for the current block, one candidate motion information is selected from the motion information candidate list as target motion information of the second sub-block. After the target motion information of the second sub-block is determined, a predicted value corresponding to the second sub-block may be obtained according to the target motion information, which is not limited.
For example, when the second sub-block adopts a normal Merge sub-mode (i.e., a Merge sub-mode) of the inter prediction modes, then the motion information candidate list includes a motion information candidate list of the normal Merge sub-mode. The conventional merge sub-mode may establish a motion information candidate list for the second sub-block, where a plurality of candidate motion information (e.g., motion vectors and reference frame information) exists in the motion information candidate list, such as spatial candidate motion information, temporal candidate motion information, historical motion information, default motion information, and the like.
For example, when the second sub-block adopts the MMVD sub-mode in the inter prediction mode, the motion information candidate list may include a motion information candidate list of the MMVD sub-mode, that is, the motion information candidate list may include motion information obtained by shifting original motion information, which may include, but is not limited to: the motion information of the spatial neighboring block of the current block, the motion information of the temporal block of the current block, default motion information, etc., and the original motion information is not limited. For example, motion information of a plurality of spatial neighboring blocks, such as motion information C1-motion information C4, is acquired, and motion information C1, motion information C2, motion information C3 'obtained by shifting motion information C3, and motion information C4' obtained by shifting motion information C4 are added to the motion information candidate list. Of course, the above manner is merely an example, and is not limited thereto, as long as the motion information candidate list includes at least one motion information obtained by shifting original motion information.
MMVD is to perform a fixed direction, fixed vector difference offset on the original motion information, so as to obtain new operation information. For example, new motion information may be added to the motion information candidate list by obtaining the new motion information as follows.
MV (new) =mv (original) +offset; alternatively, MV (new) =mv (original) -offset. MV (new) represents a new motion vector obtained after the offset (new motion vector may be obtained based on the new motion vector), MV (original) represents an original motion vector (i.e., the original motion vector included in the original motion vector), offset represents a fixed vector difference, and the value of the offset may be arbitrarily configured, such as +1, -1, +2, -2, etc., and the value of the offset is not limited.
For example, when the second sub-block adopts an affine merge sub-mode (affine merge sub-mode) in the inter prediction mode, then the motion information candidate list may include a motion information candidate list of the affine merge sub-mode, that is, the motion information candidate list of the current block is created using the affine merge sub-mode, and the candidate motion information in the motion information candidate list may include, but is not limited to: the motion information constructed based on the motion information of the spatial neighboring block of the current block, the motion information constructed based on the motion information of the temporal block of the current block, the motion information constructed using a fixed rule, the default motion information, and the like are not limited thereto.
Affine merge sub-mode is a sub-block based prediction technique from which motion information for each sub-block can be derived. Based on this, after one candidate motion information is selected from the motion information candidate list as the target motion information of the second sub-block, motion information of each sub-block of the second sub-block may be derived based on the target motion information and the motion parameter model for each sub-block of the second sub-block, and a prediction value of each sub-block may be determined according to the motion information of each sub-block of the second sub-block, and then the prediction value of the second sub-block may be obtained. For example, the second sub-block is divided into sub-block 1 and sub-block 2, the motion information of sub-block 1 and the motion information of sub-block 2 may be derived based on the target motion information and the motion parameter model of the second sub-block, and then the prediction value of sub-block 1 may be determined according to the motion information of sub-block 1, the prediction value of sub-block 2 may be determined according to the motion information of sub-block 2, and the prediction value of sub-block 1 and the prediction value of sub-block 2 may be combined into the prediction value of the second sub-block.
For example, when the second sub-block adopts an ATMVP (Alternative Temporal Motion Vector Prediction, optional temporal motion vector prediction) sub-mode of the inter prediction mode, the motion information candidate list may include a motion information candidate list of the ATMVP sub-mode, that is, candidate motion information is acquired using the ATMVP sub-mode. For example, a reference frame corresponding to the current block is determined by specifying motion information, a reference block corresponding to the current block is obtained from the reference frame, then candidate motion information of the current block is determined by using the motion information of the reference block, for example, the motion information of the reference block is subjected to telescopic change, and the changed motion information is used as the candidate motion information of the current block, which is not limited. After obtaining the candidate motion information of the current block, the candidate motion information may be added to a motion information candidate list of the ATMVP sub-mode. If the motion information candidate list of the ATMVP sub-mode only comprises one piece of candidate motion information, the candidate motion information is used as target motion information of a second sub-block; if the motion information candidate list of the ATMVP sub-mode includes one of the candidate motion information and includes other candidate motion information (the addition manner of the other candidate motion information is not limited), one candidate motion information may be selected from the motion information candidate list of the ATMVP sub-mode as the target motion information of the second sub-block.
For example, when the second sub-block adopts the ATMVP sub-mode of the inter prediction mode, the reference frame corresponding to the current block may be determined by specifying the motion information, and the reference block corresponding to the current block may be obtained from the reference frame, and then the motion information of the reference block may be used to determine the candidate motion information of the current block, for example, the motion information of the reference block may be subjected to a telescopic change, and the changed motion information may be used as the candidate motion information of the current block, which is not limited. After the candidate motion information of the current block is obtained, the candidate motion information may be directly used as the target motion information of the second sub-block.
In the above embodiments, the ATMVP sub-mode may also be referred to as an SBTMVP (sub-block TMVP) sub-mode.
The encoding/decoding side obtains the target motion information of the second sub-block from the motion information candidate list, including but not limited to:
in the first mode, the encoding end performs joint prediction on the current block based on each block division information, each group of prediction mode information and candidates in each group of prediction mode information to obtain prediction information of the current block, and determines rate distortion cost of the current block by using a rate distortion principle and the prediction information. The prediction mode information corresponding to the assumed minimum rate distortion cost includes: the prediction mode information of the first sub-block is an intra-block copy prediction mode, the prediction mode information of the second sub-block is an inter-frame prediction mode, and the candidate motion information with the minimum rate distortion cost is used as target motion information of the second sub-block for each candidate motion information in the motion information candidate list. When the encoding end sends the encoding bit stream to the decoding end, the encoding bit stream carries indication information of target motion information, the indication information is used for indicating index information of the target motion information, and the index information is used for indicating which candidate motion information in a motion information candidate list the target motion information is. The decoding end receives the coded bit stream from the coding end and analyzes the indication information from the coded bit stream. Candidate motion information corresponding to the index information is selected from a motion information candidate list based on the index information of the target motion information, the candidate motion information being the target motion information of the second sub-block.
In the second mode, the encoding end agrees with default target motion information through a protocol, and the decoding end agrees with default target motion information through the protocol, so that the indication information of the target motion information can not be carried in the encoded bit stream, and encoding cost is saved.
For example, the encoding end may agree on the first candidate motion information of the default motion information candidate list as the target motion information of the second sub-block through the protocol, and the decoding end may agree on the first candidate motion information of the default motion information candidate list as the target motion information of the second sub-block through the protocol. Of course, the above manner is merely an example, and is not limited thereto.
Based on embodiment 3, when the current frame where the current block is located is a B frame or an I frame, the current block may be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block may be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block may be trapezoidal sub-blocks, and the first sub-block and the second sub-block may be triangular sub-blocks and pentagonal sub-blocks, respectively, which does not limit the division manner of the current block. For example, the prediction mode information of the first sub-block may be an intra block copy prediction mode (IBC), and the prediction mode information of the second sub-block may be an Inter prediction mode (Inter). Referring to fig. 5A to 5H, which are examples of a first sub-block employing an intra block copy prediction mode and a second sub-block employing an inter prediction mode, the shapes of the first sub-block and the second sub-block are not limited, and fig. 5A to 5H are only examples.
For example, when the first sub-block adopts the intra block copy prediction mode and the second sub-block adopts the inter prediction mode, the partition direction and which sub-block adopts the intra block copy prediction mode, which sub-block adopts the inter prediction mode, i.e., which sub-block is the first sub-block and which sub-block is the second sub-block, may also be determined by the prediction mode information of the surrounding blocks of the current block.
Referring to fig. 5I, N0 and N1 are two surrounding blocks of the current block, and based on prediction mode information of the two surrounding blocks, when both the first sub-block and the second sub-block are triangle sub-blocks, if the prediction mode information of N0 is an intra block copy prediction mode and the prediction mode information of N1 is an intra block copy prediction mode, one of 3 partition directions shown in fig. 5I may be adopted, and fig. 5I shows which sub-block adopts the intra block copy prediction mode and which sub-block adopts the inter prediction mode.
Referring to fig. 5J, N0 and N1 are two surrounding blocks of the current block, and based on prediction mode information of the two surrounding blocks, when both the first sub-block and the second sub-block are triangle sub-blocks, if the prediction mode information of N0 is not an intra block copy prediction mode, the prediction mode information of N1 is not an intra block copy prediction mode, one of 3 partition directions shown in fig. 5J is adopted, and fig. 5J shows which sub-block adopts the intra block copy prediction mode and which sub-block adopts the inter prediction mode.
Referring to fig. 5K, N0 and N1 are two surrounding blocks of the current block, and based on prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangle sub-blocks, if the prediction mode information of N0 is an intra block copy prediction mode and the prediction mode information of N1 is not an intra block copy prediction mode, one of 3 partition directions shown in fig. 5K is adopted, and fig. 5K shows which sub-block adopts the intra block copy prediction mode and which sub-block adopts the inter prediction mode.
Referring to fig. 5L, N0 and N1 are two surrounding blocks of the current block, and based on prediction mode information of the two surrounding blocks, when both the first sub-block and the second sub-block are triangle sub-blocks, if the prediction mode information of N0 is not intra block copy prediction mode and the prediction mode information of N1 is intra block copy prediction mode, one of 3 partition directions shown in fig. 5L is adopted, and fig. 5L shows which sub-block adopts intra block copy prediction mode and which sub-block adopts inter prediction mode.
Of course, fig. 5I-5L are only examples, and when other shapes are adopted, for example, the first sub-block and the second sub-block are respectively triangular sub-blocks and trapezoidal sub-blocks, or the first sub-block and the second sub-block are respectively triangular sub-blocks and pentagonal sub-blocks, the implementation manner can be seen in fig. 5I-5L, and the detailed description is omitted.
In embodiment 3, assuming that there are two regions in the current block, one region 1 is the screen content and the other region 2 has a strong temporal correlation, in this application scenario, by dividing the current block into a first sub-block (i.e., the sub-block of region 1) and a second sub-block (i.e., the sub-block of region 2), and the prediction mode information of the first sub-block is the intra-block copy prediction mode, the prediction mode information of the second sub-block is the inter-prediction mode, the coding effect can be improved based on the characteristic that there are a large number of repeated textures in the same frame in the screen content, because the first sub-block uses the intra-block copy prediction mode. Because the second sub-block uses the inter prediction mode, the purpose of effectively removing video time domain redundancy can be achieved, and the coding effect can be improved.
Example 4: for step 204 in embodiment 1, if the prediction mode information of the first sub-block is the intra block copy prediction mode and the prediction mode information of the second sub-block is the intra prediction mode, then embodiment 4 may be used for implementation, and for other procedures, see embodiment 1. In embodiment 3, a block vector candidate list is constructed, the block vector candidate list including a plurality of candidate block vectors; one candidate block vector is selected from the block vector candidate list as the target block vector of the first sub-block. And obtaining a target intra-frame sub-prediction mode of the second sub-block. Obtaining a predicted value corresponding to the first sub-block according to the target block vector; and obtaining a predicted value corresponding to the second sub-block according to the target intra-frame sub-prediction mode.
For example, a block vector candidate list is constructed for the current block, the candidate block vectors in the block vector candidate list including, but not limited to: the construction process of the block vector candidate list is not limited by the block vector of the airspace adjacent block of the current block, the historical block vector, the default block vector and the like in the HMVP list corresponding to the current block. After constructing a candidate list of block vectors for the current block, one candidate block vector is selected from the candidate list of block vectors as the target block vector of the first sub-block. After determining the target block vector of the first sub-block, a predicted value corresponding to the first sub-block may be obtained according to the target block vector, and the process of obtaining the predicted value is not limited.
Illustratively, when the first sub-block adopts the MMVD sub-mode in the intra block copy prediction mode, then the block vector candidate list may include a block vector candidate list of the MMVD sub-mode, that is, the block vector candidate list includes at least one block vector obtained by shifting an original block vector, and the original block vector may include, but is not limited to: block vectors of spatial neighboring blocks of the current block, historical block vectors in an HMVP list corresponding to the current block, default block vectors, and the like.
For example, the target intra-prediction mode of the second sub-block may be acquired, and after the target intra-prediction mode is obtained, a prediction value corresponding to the second sub-block may be acquired according to the target intra-prediction mode, and the manner of acquiring the prediction value is not limited. Illustratively, the obtaining the target intra sub-prediction mode of the second sub-block may include, but is not limited to, the following:
Mode one, a specified intra sub-prediction mode is determined as a target intra sub-prediction mode for a second sub-block. That is, the encoding end determines the specified intra-sub-prediction mode as the target intra-sub-prediction mode of the second sub-block, and the decoding end determines the specified intra-sub-prediction mode as the target intra-sub-prediction mode of the second sub-block. For example, the encoding end determines the Planar mode as the target intra-sub-prediction mode of the second sub-block by default through protocol convention, and the decoding end determines the Planar mode as the target intra-sub-prediction mode of the second sub-block by default through protocol convention. For another example, the encoding end determines the DC mode as the target intra-sub-prediction mode of the second sub-block by default through protocol convention, and the decoding end determines the DC mode as the target intra-sub-prediction mode of the second sub-block by default through protocol convention. Of course, the Planar mode and the DC mode described above are only one example, and various angle prediction modes may be determined as the target intra-prediction mode of the second sub-block by default through protocol convention, which is not limited.
Constructing an intra-frame sub-prediction mode candidate list, wherein the intra-frame sub-prediction mode candidate list can comprise a plurality of candidate intra-frame sub-prediction modes; and selecting one candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a target intra-frame sub-prediction mode of the second sub-block. For example, an intra sub-prediction mode candidate list is constructed for the current block, and candidate intra sub-prediction modes in the intra sub-prediction mode candidate list include, but are not limited to: planar mode, DC mode, vertical angle mode, horizontal angle mode, etc., the construction process of the intra sub-prediction mode candidate list is not limited, and the intra sub-prediction mode candidate list may further include candidate intra sub-prediction modes of other angles. After the intra-frame sub-prediction mode candidate list is constructed for the current block, selecting one candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a target intra-frame sub-prediction mode of the second sub-block, and acquiring a predicted value corresponding to the second sub-block according to the target intra-frame sub-prediction mode, wherein the acquisition process is not limited.
The encoding/decoding side obtains the target intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list, including but not limited to:
the method A comprises the steps that an encoding end carries out joint prediction on a current block based on each block division information, each group of prediction mode information and candidates in each group of prediction mode information to obtain prediction information of the current block, and a rate distortion principle and the prediction information are utilized to determine rate distortion cost of the current block. The prediction mode information corresponding to the assumed minimum rate distortion cost includes: the prediction mode information of the first sub-block is an intra-block copy prediction mode, the prediction mode information of the second sub-block is an intra-frame prediction mode, and for each candidate intra-frame sub-prediction mode in the intra-frame sub-prediction mode candidate list, the candidate intra-frame sub-prediction mode with the minimum rate distortion cost is used as the target intra-frame sub-prediction mode of the second sub-block. When the encoding end sends the encoding bit stream to the decoding end, the encoding bit stream carries indication information of a target intra-frame sub-prediction mode, the indication information is used for indicating index information of the target intra-frame sub-prediction mode, and the index information is used for indicating the number of candidate intra-frame sub-prediction modes in an intra-frame sub-prediction mode candidate list. The decoding end receives the coded bit stream from the coding end and analyzes the indication information from the coded bit stream. And selecting a candidate intra-frame sub-prediction mode corresponding to the index information from an intra-frame sub-prediction mode candidate list based on the index information of the target intra-frame sub-prediction mode, wherein the candidate intra-frame sub-prediction mode is the target intra-frame sub-prediction mode of the second sub-block.
In the mode B, the encoding end agrees with a default target intra-frame sub-prediction mode through a protocol, and the decoding end agrees with the default target intra-frame sub-prediction mode through the protocol, so that the encoding bit stream does not carry indication information of the target intra-frame sub-prediction mode, and encoding cost is saved. For example, the encoding end agrees with the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode of the second sub-block through the protocol, and the decoding end agrees with the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode of the second sub-block through the protocol.
Mode three, the intra-frame sub-prediction mode of the neighboring block of the second sub-block is determined as the target intra-frame sub-prediction mode of the second sub-block. For example, for the encoding end, if the neighboring block of the second sub-block predicts using a certain intra-frame sub-prediction mode, the encoding end may obtain the intra-frame sub-prediction mode of the neighboring block of the second sub-block, and determine the intra-frame sub-prediction mode of the neighboring block of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block. For the decoding end, if the adjacent block of the second sub-block adopts a certain intra-frame sub-prediction mode for prediction, the decoding end may obtain the intra-frame sub-prediction mode of the adjacent block of the second sub-block, and determine the intra-frame sub-prediction mode of the adjacent block of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block.
Based on embodiment 4, when the current frame where the current block is located is a B frame or an I frame, the current block may be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block may be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block may be trapezoidal sub-blocks, and the first sub-block and the second sub-block may be triangular sub-blocks and pentagonal sub-blocks, respectively, which does not limit the division manner of the current block. For example, the prediction mode information of the first sub-block may be an Intra block copy prediction mode (IBC), and the prediction mode information of the second sub-block may be an Intra prediction mode (Intra). Referring to fig. 6A to 6H, which are examples of a first sub-block employing an intra block copy prediction mode and a second sub-block employing an intra prediction mode, the shapes of the first sub-block and the second sub-block are not limited, and fig. 6A to 6H are only examples.
For example, when the first sub-block adopts the intra-block copy prediction mode and the second sub-block adopts the intra-prediction mode, the partition direction and which sub-block adopts the intra-block copy prediction mode, which sub-block adopts the intra-prediction mode, i.e., which sub-block is the first sub-block and which sub-block is the second sub-block, may also be determined by the prediction mode information of the surrounding blocks of the current block.
Referring to fig. 7A, N0 and N1 are two surrounding blocks of the current block, and if the prediction mode information of N0 is an intra prediction mode and the prediction mode information of N1 is an intra prediction mode when both the first sub-block and the second sub-block are triangle sub-blocks based on the prediction mode information of the two surrounding blocks, one of the 3 partition directions shown in fig. 7A may be adopted, and fig. 7A shows which sub-block adopts an intra block copy prediction mode and which sub-block adopts an intra prediction mode.
Referring to fig. 7B, N0 and N1 are two surrounding blocks of the current block, and when both the first sub-block and the second sub-block are triangle sub-blocks based on prediction mode information of the two surrounding blocks, if the prediction mode information of N0 is not intra prediction mode and the prediction mode information of N1 is not intra prediction mode, one of the 3 partition directions shown in fig. 7B may be adopted, and fig. 7B shows which sub-block adopts intra block copy prediction mode and which sub-block adopts intra prediction mode.
Referring to fig. 7C, N0 and N1 are two surrounding blocks of the current block, and when the first sub-block and the second sub-block are both triangle sub-blocks based on the prediction mode information of the two surrounding blocks, if the prediction mode information of N0 is an intra prediction mode and the prediction mode information of N1 is not an intra prediction mode, one of the 3 partition directions shown in fig. 7C may be adopted, and fig. 7C shows which sub-block adopts an intra block copy prediction mode and which sub-block adopts an intra prediction mode.
Referring to fig. 7D, N0 and N1 are two surrounding blocks of the current block, and when the first sub-block and the second sub-block are both triangle sub-blocks based on prediction mode information of the two surrounding blocks, if the prediction mode information of N0 is not intra prediction mode and the prediction mode information of N1 is intra prediction mode, one of the 3 partition directions shown in fig. 7D may be adopted, and fig. 7D shows which sub-block adopts intra block copy prediction mode and which sub-block adopts intra prediction mode.
Of course, fig. 7A to 7D are only examples, and when other shapes are adopted, for example, the first sub-block and the second sub-block are respectively triangular sub-blocks and trapezoidal sub-blocks, or the first sub-block and the second sub-block are respectively triangular sub-blocks and pentagonal sub-blocks, the implementation manner can be seen in fig. 7A to 7D, and the detailed description is omitted.
In embodiment 4, assuming that there are two regions in the current block, one region 1 is screen content and the other region 2 has natural texture, in this application scenario, by dividing the current block into a first sub-block (i.e., the sub-block of region 1) and a second sub-block (i.e., the sub-block of region 2), and the prediction mode information of the first sub-block is intra-block copy prediction mode, the prediction mode information of the second sub-block is intra-prediction mode, and the coding effect can be improved due to the characteristic that the first sub-block uses intra-block copy prediction mode based on the fact that there are a large number of repeated textures in the same frame in the screen content. Because the intra-frame prediction mode corresponds to the texture direction, when the second sub-block uses the intra-frame prediction mode, the purpose of effectively removing video redundancy can be achieved, and the coding effect can be improved.
Example 5: for step 204 in embodiment 1, if the prediction mode information of the first sub-block is the intra prediction mode and the prediction mode information of the second sub-block is the intra prediction mode, then embodiment 5 may be used for implementation, and for other procedures, see embodiment 1. In embodiment 5, a first target intra-frame sub-prediction mode of a first sub-block, a second target intra-frame sub-prediction mode of a second sub-block, the first target intra-frame sub-prediction mode being different from the second target intra-frame sub-prediction mode; obtaining a predicted value corresponding to a first sub-block according to the first target intra-frame sub-prediction mode; and obtaining a predicted value corresponding to the second sub-block according to the second target intra-frame sub-prediction mode.
For example, a first target intra-frame sub-prediction mode of a first sub-block and a second target intra-frame sub-prediction mode of a second sub-block are obtained, a predicted value corresponding to the first sub-block is obtained according to the first target intra-frame sub-prediction mode, a predicted value corresponding to the second sub-block is obtained according to the second target intra-frame sub-prediction mode, and the obtaining mode of the predicted value is not limited. Illustratively, the obtaining the first target intra sub-prediction mode and the second target intra sub-prediction mode may include, but is not limited to, the following:
In the first mode, the first intra sub-prediction mode is determined as a first target intra sub-prediction mode of the first sub-block, and the second intra sub-prediction mode is determined as a second target intra sub-prediction mode of the second sub-block. That is, the encoding end may determine the specified first intra sub-prediction mode as a first target intra sub-prediction mode of the first sub-block and the specified second intra sub-prediction mode as a second target intra sub-prediction mode of the second sub-block, and the decoding end may determine the specified first intra sub-prediction mode as the first target intra sub-prediction mode of the first sub-block and the specified second intra sub-prediction mode as a second target intra sub-prediction mode of the second sub-block. For example, the encoding end may determine the Planar mode as a first target intra-sub-prediction mode of the first sub-block by protocol convention defaults, and determine the DC mode as a second target intra-sub-prediction mode of the second sub-block by protocol convention defaults. The decoding end can determine the Planar mode as a first target intra-frame sub-prediction mode of the first sub-block by protocol convention defaults, and determine the DC mode as a second target intra-frame sub-prediction mode of the second sub-block by protocol convention defaults. Of course, the above manner is merely an example, and other conventions may be made without limitation.
Constructing an intra-frame sub-prediction mode candidate list, wherein the intra-frame sub-prediction mode candidate list can comprise a plurality of candidate intra-frame sub-prediction modes; one candidate intra-prediction mode is selected from the intra-prediction mode candidate list as a first target intra-prediction mode for the first sub-block, and another candidate intra-prediction mode is selected from the intra-prediction mode candidate list as a second target intra-prediction mode for the second sub-block. For example, an intra sub-prediction mode candidate list is constructed for the current block, and candidate intra sub-prediction modes in the intra sub-prediction mode candidate list include, but are not limited to: planar mode, DC mode, vertical angle mode, horizontal angle mode, etc., the construction process of the intra sub-prediction mode candidate list is not limited, and the intra sub-prediction mode candidate list may further include candidate intra sub-prediction modes of other angles. After the intra-frame sub-prediction mode candidate list is constructed for the current block, selecting one candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a first target intra-frame sub-prediction mode of the first sub-block, and acquiring a predicted value corresponding to the first sub-block according to the first target intra-frame sub-prediction mode, wherein the acquisition process is not limited. On the basis of excluding the first target intra-frame sub-prediction mode, selecting another candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a second target intra-frame sub-prediction mode of the second sub-block, and acquiring a prediction value corresponding to the second sub-block according to the second target intra-frame sub-prediction mode, without limitation to the acquisition process.
The encoding/decoding side obtains the target intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list, including but not limited to:
the method A comprises the steps that an encoding end carries out joint prediction on a current block based on each block division information, each group of prediction mode information and candidates in each group of prediction mode information to obtain prediction information of the current block, and a rate distortion principle and the prediction information are utilized to determine rate distortion cost of the current block. The prediction mode information corresponding to the assumed minimum rate distortion cost includes: the prediction mode information of the first sub-block is an intra-frame prediction mode, the prediction mode information of the second sub-block is an intra-frame prediction mode, and the candidate intra-frame sub-prediction mode with the minimum rate distortion cost is taken as a first target intra-frame sub-prediction mode of the first sub-block aiming at each candidate intra-frame sub-prediction mode in the intra-frame sub-prediction mode candidate list. And on the basis of excluding the first target intra-frame sub-prediction mode, taking the candidate intra-frame sub-prediction mode with the minimum rate distortion cost as a second target intra-frame sub-prediction mode of the second sub-block.
When the encoding end sends the encoding bit stream to the decoding end, the encoding bit stream carries indication information of a target intra-frame sub-prediction mode, the indication information is used for indicating index information of a first target intra-frame sub-prediction mode, and the index information is used for indicating which candidate intra-frame sub-prediction mode in an intra-frame sub-prediction mode candidate list the first target intra-frame sub-prediction mode is. The indication information is further used for indicating index information of the second target intra-frame sub-prediction mode, wherein the index information is used for indicating the number of candidate intra-frame sub-prediction modes in the intra-frame sub-prediction mode candidate list.
The decoding end receives the coded bit stream from the coding end and analyzes the indication information from the coded bit stream. Based on index information of the first target intra-prediction mode, a candidate intra-prediction mode corresponding to the index information is selected from an intra-prediction mode candidate list, the candidate intra-prediction mode being the first target intra-prediction mode of the first sub-block. Based on index information of the second target intra-prediction mode, a candidate intra-prediction mode corresponding to the index information is selected from an intra-prediction mode candidate list, the candidate intra-prediction mode being the second target intra-prediction mode of the second sub-block.
The mode B, the encoding end defaults the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode through protocol convention, and the decoding end defaults the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode through protocol convention, so that the encoding bit stream does not carry indication information of the target intra-frame sub-prediction mode, and encoding cost is saved. For example, the encoding end agrees with a first candidate intra-prediction mode in the default intra-prediction mode candidate list as a first target intra-prediction mode of the first sub-block, and a second candidate intra-prediction mode in the intra-prediction mode candidate list as a second target intra-prediction mode of the second sub-block. The decoding end agrees with a first candidate intra-frame sub-prediction mode in a default intra-frame sub-prediction mode candidate list to serve as a first target intra-frame sub-prediction mode of a first sub-block, and a second candidate intra-frame sub-prediction mode in the intra-frame sub-prediction mode candidate list serves as a second target intra-frame sub-prediction mode of a second sub-block.
In the third aspect, if the intra-prediction mode of the first neighboring block of the first sub-block is different from the intra-prediction mode of the second neighboring block of the second sub-block, the intra-prediction mode of the first neighboring block may be determined as the first target intra-prediction mode of the first sub-block, and the intra-prediction mode of the second neighboring block may be determined as the second target intra-prediction mode of the second sub-block. Alternatively, if the intra sub-prediction mode of the first neighboring block is the same as the intra sub-prediction mode of the second neighboring block, the intra sub-prediction mode of the first neighboring block may be determined as a first target intra sub-prediction mode of the first sub-block, and another intra sub-prediction mode different from the first target intra sub-prediction mode may be determined as a second target intra sub-prediction mode of the second sub-block. Alternatively, if the intra sub-prediction mode of the first neighboring block is the same as the intra sub-prediction mode of the second neighboring block, the intra sub-prediction mode of the second neighboring block may be determined as the second target intra sub-prediction mode of the second sub-block, and another intra sub-prediction mode different from the second target intra sub-prediction mode may be determined as the first target intra sub-prediction mode of the first sub-block.
For example, for the encoding end or the decoding end, if the first neighboring block of the first sub-block uses the intra-frame sub-prediction mode a for prediction, the second neighboring block of the second sub-block uses the intra-frame sub-prediction mode B for prediction, when the intra-frame sub-prediction mode a is different from the intra-frame sub-prediction mode B, the intra-frame sub-prediction mode a may be determined as the first target intra-frame sub-prediction mode of the first sub-block, and the intra-frame sub-prediction mode B may be determined as the second target intra-frame sub-prediction mode of the second sub-block.
When the intra sub-prediction mode a is the same as the intra sub-prediction mode B, the intra sub-prediction mode a is determined as a first target intra sub-prediction mode of the first sub-block, and another intra sub-prediction mode C different from the intra sub-prediction mode a is determined as a second target intra sub-prediction mode of the second sub-block. For example, the intra sub-prediction mode C may be an intra sub-prediction mode of a neighboring block of the second neighboring block, and for example, if the intra sub-prediction mode a is Planar mode, the intra sub-prediction mode C may be DC mode, which is not limited as long as the intra sub-prediction mode C is different from the intra sub-prediction mode a.
When the intra sub-prediction mode a is the same as the intra sub-prediction mode B, the intra sub-prediction mode B is determined as a second target intra sub-prediction mode of the second sub-block, and another intra sub-prediction mode D different from the intra sub-prediction mode B is determined as a first target intra sub-prediction mode of the first sub-block. For example, the intra sub-prediction mode D may be an intra sub-prediction mode of a neighboring block of the first neighboring block, and for example, if the intra sub-prediction mode B is Planar mode, the intra sub-prediction mode D may be DC mode, which is not limited as long as the intra sub-prediction mode D is different from the intra sub-prediction mode B.
For example, for the encoding end or the decoding end, if the first neighboring block of the first sub-block uses the intra-prediction mode a for prediction, the second neighboring block of the second sub-block does not use the intra-prediction mode for prediction, the intra-prediction mode a is determined as the first target intra-prediction mode of the first sub-block, and another intra-prediction mode C different from the intra-prediction mode a is determined as the second target intra-prediction mode of the second sub-block. For example, the intra sub-prediction mode C is an intra sub-prediction mode of a neighboring block of the second neighboring block, and for example, if the intra sub-prediction mode a is Planar mode, the intra sub-prediction mode C may be DC mode, which is not limited as long as the intra sub-prediction mode C is different from the intra sub-prediction mode a.
For example, for the encoding end or the decoding end, if the second neighboring block of the second sub-block is predicted by using the intra-prediction mode B, the first neighboring block of the first sub-block is not predicted by using the intra-prediction mode, the intra-prediction mode B is determined as the second target intra-prediction mode of the second sub-block, and another intra-prediction mode D different from the intra-prediction mode B is determined as the first target intra-prediction mode of the first sub-block. For example, the intra sub-prediction mode D is an intra sub-prediction mode of a neighboring block of the first neighboring block, and for example, if the intra sub-prediction mode B is Planar mode, the intra sub-prediction mode D may be DC mode, which is not limited as long as the intra sub-prediction mode D is different from the intra sub-prediction mode B.
Based on embodiment 5, when the current frame where the current block is located is a B frame or an I frame, the current block may be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block may be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block may be trapezoidal sub-blocks, and the first sub-block and the second sub-block may be triangular sub-blocks and pentagonal sub-blocks, respectively, which does not limit the division manner of the current block. For example, the prediction mode information of the first sub-block may be an Intra prediction mode (Intra), and the prediction mode information of the second sub-block may be an Intra prediction mode (Intra), but the first target Intra sub-prediction mode of the first sub-block may be different from the second target Intra sub-prediction mode of the second sub-block, and the first target Intra sub-prediction mode and the second target Intra sub-prediction mode may be fixed or derived from surrounding blocks. Referring to fig. 8A to 8D, which are examples of the first sub-block using the intra prediction mode and the second sub-block using the intra prediction mode, the shapes of the first sub-block and the second sub-block are not limited, and fig. 8A to 8D are only examples.
In embodiment 5, it is assumed that there are two regions in the current block, one region 1 has a natural texture and the other region 2 also has a natural texture, but the natural texture of region 1 is different from the natural texture of region 2, and it is necessary to correspond to different intra sub-prediction modes, and in this application scenario, the current block is divided into a first sub-block (i.e., the sub-block of region 1) and a second sub-block (i.e., the sub-block of region 2), and the prediction mode information of the first sub-block is the intra prediction mode, and the prediction mode information of the second sub-block is the intra prediction mode. Because the first sub-block uses the intra-frame prediction mode and the second sub-block uses the intra-frame prediction mode, the purpose of effectively removing video redundancy can be achieved, and the coding effect can be improved.
Example 6: for step 204 in embodiment 1, if the prediction mode information of the first sub-block is the inter prediction mode and the prediction mode information of the second sub-block is the intra prediction mode, then embodiment 6 may be used for implementation, and for other procedures, see embodiment 1. In embodiment 6, a motion information candidate list is constructed, the motion information candidate list including at least one candidate motion information; selecting one candidate motion information from the motion information candidate list as target motion information of the first sub-block; acquiring a target intra-frame sub-prediction mode of the second sub-block; obtaining a predicted value corresponding to the first sub-block according to the target motion information; and obtaining a predicted value corresponding to the second sub-block according to the target intra-frame sub-prediction mode.
For example, a motion information candidate list is constructed for the current block, the motion information candidate list including at least one candidate motion information, and the construction process of the motion information candidate list is not limited. After constructing a motion information candidate list for the current block, one candidate motion information is selected from the motion information candidate list as target motion information of the first sub-block. After the target motion information of the first sub-block is determined, a predicted value corresponding to the first sub-block may be obtained according to the target motion information, which is not limited.
For example, when the first sub-block adopts a normal merge sub-mode of the inter prediction modes, then the motion information candidate list includes a motion information candidate list of the normal merge sub-mode. When the first sub-block adopts the MMVD sub-mode in the inter prediction mode, then the motion information candidate list may include a motion information candidate list of the MMVD sub-mode. When the first sub-block adopts an affine merge sub-mode (affine merge sub-mode) in the inter prediction mode, then the motion information candidate list may include a motion information candidate list of affine merge sub-modes. When the first sub-block adopts an ATMVP sub-mode in the inter prediction mode, the motion information candidate list includes a motion information candidate list of the ATMVP sub-mode.
The encoding/decoding side obtains the target motion information of the first sub-block from the motion information candidate list, including but not limited to:
in the first mode, the encoding end performs joint prediction on the current block based on each block division information, each group of prediction mode information and candidates in each group of prediction mode information to obtain prediction information of the current block, and determines rate distortion cost of the current block by using a rate distortion principle and the prediction information. The prediction mode information corresponding to the assumed minimum rate distortion cost includes: the prediction mode information of the first sub-block is inter prediction mode, the prediction mode information of the second sub-block is intra prediction mode, and the candidate motion information with the minimum rate distortion cost is taken as the target motion information of the first sub-block for each candidate motion information in the motion information candidate list. When the encoding end sends the encoding bit stream to the decoding end, the encoding bit stream can carry indication information of target motion information, the indication information is used for indicating index information of the target motion information, and the index information is used for indicating which candidate motion information in a motion information candidate list the target motion information is. The decoding end receives the coded bit stream from the coding end and analyzes the indication information from the coded bit stream. Candidate motion information corresponding to the index information is selected from a motion information candidate list based on the index information of the target motion information, the candidate motion information being the target motion information of the first sub-block.
In the second mode, the encoding end agrees with default target motion information through a protocol, and the decoding end agrees with default target motion information through the protocol, so that the indication information of the target motion information can not be carried in the encoded bit stream, and encoding cost is saved.
For example, the encoding end may agree on the first candidate motion information of the default motion information candidate list by the protocol as the target motion information of the first sub-block, and the decoding end may agree on the first candidate motion information of the default motion information candidate list by the protocol as the target motion information of the first sub-block. Of course, the above manner is merely an example, and is not limited thereto.
For example, the target intra-prediction mode of the second sub-block may be acquired, and after the target intra-prediction mode is obtained, a prediction value corresponding to the second sub-block may be acquired according to the target intra-prediction mode, and the manner of acquiring the prediction value is not limited. Illustratively, the obtaining the target intra sub-prediction mode of the second sub-block may include, but is not limited to, the following:
mode one, a specified intra sub-prediction mode is determined as a target intra sub-prediction mode for a second sub-block.
Illustratively, the encoding end determines the specified intra-sub-prediction mode as the target intra-sub-prediction mode of the second sub-block, and the decoding end determines the specified intra-sub-prediction mode as the target intra-sub-prediction mode of the second sub-block.
Constructing an intra-frame sub-prediction mode candidate list, wherein the intra-frame sub-prediction mode candidate list can comprise a plurality of candidate intra-frame sub-prediction modes; and selecting one candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a target intra-frame sub-prediction mode of the second sub-block. For example, an intra sub-prediction mode candidate list is constructed for the current block, and candidate intra sub-prediction modes in the intra sub-prediction mode candidate list include, but are not limited to: planar mode, DC mode, vertical angle mode, horizontal angle mode, etc. And selecting one candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a target intra-frame sub-prediction mode of the second sub-block, and acquiring a prediction value corresponding to the second sub-block according to the target intra-frame sub-prediction mode.
The encoding/decoding side obtains the target intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list, including but not limited to:
the method A comprises the steps that an encoding end carries out joint prediction on a current block based on each block division information, each group of prediction mode information and candidates in each group of prediction mode information to obtain prediction information of the current block, and a rate distortion principle and the prediction information are utilized to determine rate distortion cost of the current block. The prediction mode information corresponding to the assumed minimum rate distortion cost includes: the prediction mode information of the first sub-block is inter prediction mode, the prediction mode information of the second sub-block is intra prediction mode, and the candidate intra-frame sub-prediction mode with the minimum rate distortion cost is taken as the target intra-frame sub-prediction mode of the second sub-block aiming at each candidate intra-frame sub-prediction mode in the intra-frame sub-prediction mode candidate list. When the encoding end sends the encoding bit stream to the decoding end, the encoding bit stream carries indication information of a target intra-frame sub-prediction mode, the indication information is used for indicating index information of the target intra-frame sub-prediction mode, and the index information is used for indicating the number of candidate intra-frame sub-prediction modes in an intra-frame sub-prediction mode candidate list. The decoding end receives the coded bit stream from the coding end and analyzes the indication information from the coded bit stream. And selecting a candidate intra-frame sub-prediction mode corresponding to the index information from an intra-frame sub-prediction mode candidate list based on the index information of the target intra-frame sub-prediction mode, wherein the candidate intra-frame sub-prediction mode is the target intra-frame sub-prediction mode of the second sub-block.
And the coding end agrees with a default target intra-frame sub-prediction mode through a protocol, and the decoding end agrees with the default target intra-frame sub-prediction mode through the protocol. For example, the encoding end agrees with the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode of the second sub-block through the protocol, and the decoding end agrees with the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode of the second sub-block through the protocol.
Mode three, the intra-frame sub-prediction mode of the neighboring block of the second sub-block is determined as the target intra-frame sub-prediction mode of the second sub-block. For example, the encoding end acquires an intra-sub-prediction mode of a neighboring block of the second sub-block, and determines the intra-sub-prediction mode of the neighboring block of the second sub-block as a target intra-sub-prediction mode of the second sub-block. The decoding end obtains the intra-frame sub-prediction mode of the adjacent block of the second sub-block, and determines the intra-frame sub-prediction mode of the adjacent block of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block.
Based on embodiment 6, when the current frame where the current block is located is a B frame or an I frame, the current block may be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block may be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block may be trapezoidal sub-blocks, and the first sub-block and the second sub-block may be triangular sub-blocks and pentagonal sub-blocks, respectively, which does not limit the division manner of the current block. For example, the prediction mode information of the first sub-block may be an Inter prediction mode (Inter), and the prediction mode information of the second sub-block may be an Intra prediction mode (Intra). Referring to fig. 9A to 9D, which are examples of the first sub-block using the inter prediction mode and the second sub-block using the intra prediction mode, the shapes of the first sub-block and the second sub-block are not limited, and fig. 9A to 9D are only examples, which illustrate examples that the first sub-block and the second sub-block are both trapezoidal sub-blocks, and do not illustrate other cases that the first sub-block and the second sub-block are both triangular sub-blocks.
For example, when the first sub-block adopts the inter prediction mode and the second sub-block adopts the intra prediction mode, the partition direction and which sub-block adopts the inter prediction mode, which sub-block adopts the intra prediction mode, i.e., which sub-block is the first sub-block and which sub-block is the second sub-block, may also be determined by the prediction mode information of the surrounding blocks of the current block.
Referring to fig. 10A, N0 and N1 are two surrounding blocks of the current block, and if the prediction mode information of N0 is an intra prediction mode and the prediction mode information of N1 is an intra prediction mode when both the first and second sub-blocks are triangle sub-blocks based on the prediction mode information of the two surrounding blocks, one of the 3 partition directions shown in fig. 10A may be adopted, and fig. 10A shows which sub-block adopts an inter prediction mode and which sub-block adopts an intra prediction mode.
Referring to fig. 10B, N0 and N1 are two surrounding blocks of the current block, and when both the first sub-block and the second sub-block are triangle sub-blocks based on prediction mode information of the two surrounding blocks, if the prediction mode information of N0 is not intra prediction mode and the prediction mode information of N1 is not intra prediction mode, one of the 3 partition directions shown in fig. 10B may be adopted, and fig. 10B shows which sub-block adopts inter prediction mode and which sub-block adopts intra prediction mode.
Referring to fig. 10C, N0 and N1 are two surrounding blocks of the current block, and when the first and second sub-blocks are both triangle sub-blocks based on prediction mode information of the two surrounding blocks, if the prediction mode information of N0 is intra prediction mode and the prediction mode information of N1 is not intra prediction mode, one of the 3 partition directions shown in fig. 10C may be adopted, and fig. 10C shows which sub-block adopts inter prediction mode and which sub-block adopts intra prediction mode.
Referring to fig. 10D, N0 and N1 are two surrounding blocks of the current block, and when the first and second sub-blocks are both triangle sub-blocks based on prediction mode information of the two surrounding blocks, if the prediction mode information of N0 is not intra prediction mode and the prediction mode information of N1 is intra prediction mode, one of the 3 partition directions shown in fig. 10D may be adopted, and fig. 10D shows which sub-block adopts inter prediction mode and which sub-block adopts intra prediction mode.
Of course, fig. 10A to 10D are only examples, and when other shapes are adopted, for example, the first sub-block and the second sub-block are respectively triangular sub-blocks and trapezoidal sub-blocks, or the first sub-block and the second sub-block are respectively triangular sub-blocks and pentagonal sub-blocks, the implementation manner can be seen in fig. 10A to 10D, and the detailed description is omitted.
In embodiment 6, it is assumed that there are two regions in the current block, one region 1 has a strong temporal correlation, and the other region 2 has a natural texture, and in this application scenario, the current block is divided into a first sub-block (i.e., the sub-block of region 1) and a second sub-block (i.e., the sub-block of region 2), and the prediction mode information of the first sub-block is the inter prediction mode, and the prediction mode information of the second sub-block is the intra prediction mode. Because the first sub-block uses the inter prediction mode, the purpose of effectively removing video time domain redundancy can be achieved, and the coding effect can be improved. Since the second sub-block uses the intra prediction mode, the encoding effect can be improved.
Example 7: for step 204 in embodiment 1, if the prediction mode information of the first sub-block is the inter prediction mode and the prediction mode information of the second sub-block is the inter prediction mode, then embodiment 7 can be used for implementation, and for other procedures, see embodiment 1. In embodiment 7, a first motion information candidate list of a first sub-mode in the inter prediction mode is constructed, the first motion information candidate list including at least one candidate motion information; one candidate motion information is selected from the first motion information candidate list as target motion information of the first sub-block. Constructing a second motion information candidate list of a second sub-mode in the inter prediction mode, the second motion information candidate list including at least one candidate motion information; selecting one candidate motion information from the second motion information candidate list as target motion information of the second sub-block; wherein the first sub-mode and the second sub-mode may be different. Acquiring a predicted value corresponding to the first sub-block according to the target motion information of the first sub-block; and obtaining a predicted value corresponding to the second sub-block according to the target motion information of the second sub-block.
The first sub-mode includes, but is not limited to, one of the following sub-modes: a conventional merge sub-mode, an MMVD sub-mode, an affine merge sub-mode, and an ATMVP sub-mode; the second sub-mode includes, but is not limited to, one of the following sub-modes: conventional merge sub-mode, MMVD sub-mode, affine merge sub-mode, ATMVP sub-mode. Of course, the above is just a few examples, and is not limited thereto, as long as it is a sub-mode in the inter prediction mode. The first sub-mode may be different from the second sub-mode, for example, when the first sub-mode is a normal merge sub-mode, the second sub-mode is not a normal merge sub-mode, is one of an MMVD sub-mode, an affine merge sub-mode, an ATMVP sub-mode, when the first sub-mode is an MMVD sub-mode, the second sub-mode is not an MMVD sub-mode, is one of a normal merge sub-mode, an affine merge sub-mode, an ATMVP sub-mode, and so on.
For example, a first motion information candidate list of a first sub-mode in the inter prediction mode is constructed for the current block, the first motion information candidate list including at least one candidate motion information; the construction process is not limited. After the first motion information candidate list is constructed for the current block, selecting one candidate motion information from the first motion information candidate list as target motion information of the first sub-block, and acquiring a predicted value corresponding to the first sub-block according to the target motion information, wherein the process is not limited.
For example, when the first sub-mode is the normal merge sub-mode, then the first motion information candidate list includes a motion information candidate list of the normal merge sub-mode. When the first sub-mode is an MMVD sub-mode, then the first motion information candidate list comprises a motion information candidate list of MMVD sub-modes. When the first sub-mode is an affine merge sub-mode, then the first motion information candidate list comprises a motion information candidate list of affine merge sub-modes. When the first sub-mode is an ATMVP sub-mode, then the first motion information candidate list comprises a motion information candidate list of the ATMVP sub-mode.
The encoding/decoding side obtains the target motion information of the first sub-block from the first motion information candidate list, including but not limited to:
in the first mode, the encoding end performs joint prediction on the current block based on each block division information, each group of prediction mode information and candidates in each group of prediction mode information to obtain prediction information of the current block, and determines rate distortion cost of the current block by using a rate distortion principle and the prediction information. The prediction mode information corresponding to the assumed minimum rate distortion cost includes: the prediction mode information of the first sub-block is an inter prediction mode, the prediction mode information of the second sub-block is an inter prediction mode, and the candidate motion information with the minimum rate distortion cost is used as the target motion information of the first sub-block for each candidate motion information in the first motion information candidate list. When the encoding end sends the encoding bit stream to the decoding end, the encoding bit stream may carry indication information of target motion information, where the indication information is used to indicate index information of target motion information of the first sub-block, and the index information is used to indicate which candidate motion information in the first motion information candidate list the target motion information is. The decoding end receives the coded bit stream from the coding end and analyzes the indication information from the coded bit stream. Candidate motion information corresponding to index information is selected from the first motion information candidate list based on the index information of the target motion information, and the candidate motion information is the target motion information of the first sub-block.
And the second mode is that the encoding end agrees with default target motion information through a protocol, and the decoding end agrees with the default target motion information through the protocol. For example, the encoding end may agree on the first candidate motion information of the default first motion information candidate list as the target motion information of the first sub-block through a protocol, and the decoding end may agree on the first candidate motion information of the default first motion information candidate list as the target motion information of the first sub-block through the protocol. Of course, the above manner is merely an example, and is not limited thereto.
For example, a second motion information candidate list of a second sub-mode in the inter prediction mode is constructed for the current block, the second motion information candidate list including at least one candidate motion information; the construction process is not limited. After the second motion information candidate list is constructed for the current block, selecting one candidate motion information from the second motion information candidate list as target motion information of the second sub-block, and acquiring a predicted value corresponding to the second sub-block according to the target motion information, wherein the process is not limited.
For example, when the second sub-mode is the normal merge sub-mode, the second motion information candidate list includes a motion information candidate list of the normal merge sub-mode. When the second sub-mode is an MMVD sub-mode, then the second motion information candidate list comprises a motion information candidate list of MMVD sub-modes. When the second sub-mode is an affine merge sub-mode, then the second motion information candidate list includes a motion information candidate list of affine merge sub-modes. When the second sub-mode is an ATMVP sub-mode, then the second motion information candidate list comprises a motion information candidate list of the ATMVP sub-mode.
The encoding/decoding side obtains the target motion information of the second sub-block from the second motion information candidate list, including but not limited to:
in the first mode, the encoding end performs joint prediction on the current block based on each block division information, each group of prediction mode information and candidates in each group of prediction mode information to obtain prediction information of the current block, and determines rate distortion cost of the current block by using a rate distortion principle and the prediction information. The prediction mode information corresponding to the assumed minimum rate distortion cost includes: the prediction mode information of the first sub-block is an inter prediction mode, the prediction mode information of the second sub-block is an inter prediction mode, and the candidate motion information with the minimum rate distortion cost is used as the target motion information of the second sub-block for each candidate motion information in the second motion information candidate list. When the encoding end sends the encoding bit stream to the decoding end, the encoding bit stream may carry indication information of target motion information, where the indication information is used to indicate index information of target motion information of the second sub-block, and the index information is used to indicate which candidate motion information in the second motion information candidate list the target motion information is. The decoding end receives the coded bit stream from the coding end and analyzes the indication information from the coded bit stream. Candidate motion information corresponding to the index information is selected from the second motion information candidate list based on the index information of the target motion information, and the candidate motion information is the target motion information of the second sub-block.
And the second mode is that the encoding end agrees with default target motion information through a protocol, and the decoding end agrees with the default target motion information through the protocol. For example, the encoding end may agree on the second candidate motion information of the default second motion information candidate list as the target motion information of the second sub-block through the protocol, and the decoding end may agree on the second candidate motion information of the default second motion information candidate list as the target motion information of the second sub-block through the protocol. Of course, the above manner is merely an example, and is not limited thereto.
Based on embodiment 7, when the current frame where the current block is located is a B frame or an I frame, the current block may be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block may be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block may be trapezoidal sub-blocks, and the first sub-block and the second sub-block may be triangular sub-blocks and pentagonal sub-blocks, respectively, which does not limit the division manner of the current block. For example, the prediction mode information of the first sub-block may be an Inter prediction mode (Inter), and the prediction mode information of the second sub-block may be an Inter prediction mode (Inter). Referring to fig. 11A to 11D, which are examples of the first sub-block using the inter prediction mode and the second sub-block using the inter prediction mode, the shapes of the first sub-block and the second sub-block are not limited, and fig. 11A to 11D are only examples, and show examples in which the first sub-block and the second sub-block are both trapezoidal sub-blocks, and do not show other cases in which the first sub-block and the second sub-block are both triangular sub-blocks. For example, when the first sub-block adopts the inter prediction mode and the second sub-block adopts the inter prediction mode, one sub-mode may be selected from the conventional merge sub-mode, the triangular prediction sub-mode, the MMVD sub-mode, the affine merge sub-mode, and the ATMVP sub-mode as the first sub-mode of the first sub-block. One sub-mode may be selected from a regular merge sub-mode, a triangular prediction sub-mode, an MMVD sub-mode, an affine merge sub-mode, an ATMVP sub-mode as a second sub-mode of the second sub-block.
For example, the first sub-pattern of the first sub-block may be different from the second sub-pattern of the second sub-block.
In embodiment 7, it is assumed that there are two regions in the current block, one region 1 has a strong temporal correlation, and the other region 2 also has a strong temporal correlation, however, the reference block corresponding to region 1 is different from the reference block corresponding to region 2, and different motion information is required, and in this application scenario, the current block is divided into a first sub-block (i.e., the sub-block of region 1) and a second sub-block (i.e., the sub-block of region 2), and the prediction mode information of the first sub-block is an inter prediction mode, and the prediction mode information of the second sub-block is an inter prediction mode. Because the first sub-block uses the inter prediction mode and the second sub-block uses the inter prediction mode, the purpose of effectively removing video time domain redundancy can be achieved, and the coding effect can be improved.
Example 8: for step 204 in embodiment 1, if the prediction mode information of the first sub-block is the inter prediction mode and the prediction mode information of the second sub-block is the inter prediction mode, then embodiment 3 may be used for implementation, and for other procedures, see embodiment 1. In embodiment 8, a motion information candidate list of an inter prediction mode is constructed for a current block, the motion information candidate list including at least one candidate motion information, without limitation to the construction process; one candidate motion information is selected from the motion information candidate list as target motion information of a first sub-block, and the other candidate motion information is selected from the motion information candidate list as target motion information of a second sub-block, the target motion information of the first sub-block being different from the target motion information of the second sub-block. Acquiring a predicted value corresponding to the first sub-block according to the target motion information of the first sub-block; and obtaining a predicted value corresponding to the second sub-block according to the target motion information of the second sub-block. The motion information candidate list may include, but is not limited to, a motion information candidate list based on the following sub-patterns: a conventional merge sub-mode, an MMVD sub-mode, an affine merge sub-mode, and an ATMVP sub-mode; of course, the above is just a few examples of sub-modes, and the sub-modes are not limited as long as they are sub-modes in the inter prediction mode.
For example, when the first sub-block and the second sub-block each employ a conventional merge sub-mode of the inter prediction modes, then the motion information candidate list includes a motion information candidate list of the conventional merge sub-mode. When the first sub-block and the second sub-block both adopt the MMVD sub-mode in the inter prediction mode, then the motion information candidate list includes a motion information candidate list of the MMVD sub-mode. When the first sub-block and the second sub-block both adopt affine merging sub-modes in the inter prediction mode, then the motion information candidate list includes a motion information candidate list of affine merging sub-modes. When the first sub-block and the second sub-block both adopt an ATMVP sub-mode in the inter prediction mode, then the motion information candidate list includes a motion information candidate list of the ATMVP sub-mode.
The encoding/decoding side obtains the target motion information from the motion information candidate list, which may include, but is not limited to:
in the first mode, the encoding end performs joint prediction on the current block based on each block division information, each group of prediction mode information and candidates in each group of prediction mode information to obtain prediction information of the current block, and determines rate distortion cost of the current block by using a rate distortion principle and the prediction information. The prediction mode information corresponding to the assumed minimum rate distortion cost includes: the prediction mode information of the first sub-block is inter prediction mode, the prediction mode information of the second sub-block is inter prediction mode, and the candidate motion information with the minimum rate distortion cost is taken as the target motion information of the first sub-block for each candidate motion information in the motion information candidate list. And on the basis of excluding the target motion information of the first sub-block from the motion information candidate list, taking the candidate motion information with the minimum rate distortion cost as the target motion information of the second sub-block. When the encoding end sends the encoding bit stream to the decoding end, the encoding bit stream can carry indication information of target motion information, the indication information is used for indicating index information of target motion information of a first sub-block and index information of target motion information of a second sub-block, the index information of the target motion information of the first sub-block is used for indicating the candidate motion information of the first sub-block in the motion information candidate list, and the index information of the target motion information of the second sub-block is used for indicating the candidate motion information of the second sub-block in the motion information candidate list.
The decoding end receives the coded bit stream from the coding end and analyzes the indication information from the coded bit stream. Based on the index information of the target motion information of the first sub-block, the decoding end selects candidate motion information corresponding to the index information from a motion information candidate list, wherein the candidate motion information is the target motion information of the first sub-block.
Based on the index information of the target motion information of the second sub-block, the decoding end selects candidate motion information corresponding to the index information from a motion information candidate list, wherein the candidate motion information is the target motion information of the second sub-block.
And the second mode is that the encoding end agrees with default target motion information through a protocol, and the decoding end agrees with the default target motion information through the protocol. For example, the encoding end may agree on the first candidate motion information of the default motion information candidate list as the target motion information of the first sub-block by the protocol, the second candidate motion information of the motion information candidate list as the target motion information of the second sub-block, and the decoding end may agree on the first candidate motion information of the default motion information candidate list as the target motion information of the first sub-block by the protocol, and the second candidate motion information of the motion information candidate list as the target motion information of the second sub-block.
Based on embodiment 8, when the current frame where the current block is located is a B frame or an I frame, the current block is divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block may be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block may be trapezoidal sub-blocks, and the first sub-block and the second sub-block may be triangular sub-blocks and pentagonal sub-blocks, respectively, so that the dividing manner of the current block is not limited. For example, the prediction mode information of the first sub-block may be an Inter prediction mode (Inter), and the prediction mode information of the second sub-block may be an Inter prediction mode (Inter). Referring to fig. 11A to 11D, which are examples of the first sub-block using the inter prediction mode and the second sub-block using the inter prediction mode, the shapes of the first sub-block and the second sub-block are not limited, and fig. 11A to 11D are only examples, and show examples in which the first sub-block and the second sub-block are both trapezoidal sub-blocks, and do not show other cases in which the first sub-block and the second sub-block are both triangular sub-blocks.
For example, when the first sub-block adopts the inter prediction mode and the second sub-block adopts the inter prediction mode, one sub-mode may be selected from the conventional merge sub-mode, the triangular prediction sub-mode, the MMVD sub-mode, the affine merge sub-mode, and the ATMVP sub-mode as the first sub-mode of the first sub-block. One sub-mode may be selected from a regular merge sub-mode, a triangular prediction sub-mode, an MMVD sub-mode, an affine merge sub-mode, an ATMVP sub-mode as a second sub-mode of the second sub-block.
For example, the first sub-pattern of the first sub-block may be the same as the second sub-pattern of the second sub-block. For example, the first sub-mode of the first sub-block and the second sub-mode of the second sub-block are both conventional merge sub-modes, and the target motion information of the first sub-block is different from the target motion information of the second sub-block. For another example, the first sub-mode of the first sub-block and the second sub-mode of the second sub-block are both MMVD sub-modes, the target motion information of the first sub-block is different from the target motion information of the second sub-block, and so on.
In embodiment 8, it is assumed that there are two regions in the current block, one region 1 has a strong temporal correlation, and the other region 2 also has a strong temporal correlation, however, the reference block corresponding to region 1 is different from the reference block corresponding to region 2, and different motion information is required to be corresponding, and in this application scenario, the current block is divided into a first sub-block (i.e., the sub-block of region 1) and a second sub-block (i.e., the sub-block of region 2), and the prediction mode information of the first sub-block is an inter prediction mode, and the prediction mode information of the second sub-block is an inter prediction mode. Because the first sub-block uses the inter prediction mode and the second sub-block uses the inter prediction mode, the purpose of effectively removing video time domain redundancy can be achieved, and the coding effect can be improved.
For each of the above embodiments, in order to obtain the prediction value of the first sub-block and the prediction value of the second sub-block, the current block may be divided into a first region block, a second region block, and a third region block, the first region block being located within the first sub-block, the second region block being located within the second sub-block, a distance between a center of each sub-block within the third region block and a division line being smaller than a preset threshold, and the division line being determined based on the block division information. For example, referring to fig. 12A, taking the first sub-block as a triangle sub-block, the second sub-block is also a triangle sub-block as an example, and the division line determined based on the block division information is from the upper left corner to the lower right corner. The triangular sub-block at the upper right corner is a first sub-block, the triangular sub-block at the lower left corner is a second sub-block, the first region block is positioned in the first sub-block, the second region block is positioned in the second sub-block, and the distance between the center of each sub-block (such as the sub-blocks shown as block 1, block 2, block 4, block 6 and block 7) in the third region block and the dividing line is smaller than a preset threshold (which can be configured empirically).
And obtaining a predicted value corresponding to the first sub-block according to the first predicted mode information corresponding to the first sub-block, and obtaining a predicted value corresponding to the second sub-block according to the second predicted mode information corresponding to the second sub-block. Based on the information, in this embodiment, a target prediction value corresponding to the first region block is obtained according to the first prediction mode information; acquiring a target predicted value corresponding to the second region block according to the second prediction mode information; and acquiring a target predicted value corresponding to the third region block according to the first predicted mode information and/or the second predicted mode information. Exemplary, obtaining the target prediction value corresponding to the third region block according to the first prediction mode information and/or the second prediction mode information includes: acquiring a target predicted value corresponding to the third region block according to the first predicted mode information; or, obtaining a target predicted value corresponding to the third region block according to the second predicted mode information; or acquiring a first predicted value corresponding to the third region block according to the first predicted mode information, acquiring a second predicted value corresponding to the third region block according to the second predicted mode information, and carrying out weighting processing on the first predicted value and the second predicted value to obtain a target predicted value corresponding to the third region block.
For example, referring to fig. 12A, the predicted value corresponding to the first sub-block may be obtained according to the first prediction mode information corresponding to the first sub-block, and the specific obtaining manner is referred to the above embodiment, and will not be repeated here. Because the first region block is located in the first sub-block, and the partial region in the third region block is located in the first sub-block, when the predicted value corresponding to the first sub-block is obtained according to the first prediction mode information, the predicted value corresponding to the first region block, that is, the predicted value of each pixel point in the first region block, may be referred to as the target predicted value corresponding to the first region block for convenience of distinction. In summary, the target prediction value corresponding to the first region block may be obtained according to the first prediction mode information.
For example, referring to fig. 12A, the predicted value corresponding to the second sub-block may be obtained according to the second prediction mode information corresponding to the second sub-block, and the specific obtaining manner is referred to the above embodiment, and will not be repeated here. Because the second region block is located in the second sub-block, and the partial region in the third region block is located in the second sub-block, when the predicted value corresponding to the second sub-block is obtained according to the second prediction mode information, the predicted value corresponding to the second region block, that is, the predicted value of each pixel point in the second region block, may be obtained, for convenience of distinction, the predicted value corresponding to the second region block may be referred to as the target predicted value corresponding to the second region block. In summary, the target prediction value corresponding to the second region block may be obtained according to the second prediction mode information.
For example, referring to fig. 12A, for the third region block (e.g., the sub-blocks shown in block 1, block 2, block 4, block 6, and block 7), in order to obtain the target prediction value corresponding to the third region block, the following manner may be adopted:
according to the first mode, a target predicted value corresponding to the third region block is obtained according to the first predicted mode information.
For example, the partial region (e.g., the entire region of the block 6 or 7, the upper right corner region of the block 4, and the following referred to as the partial region a for convenience of description) in the third region block is located in the first sub-block, and when the predicted value corresponding to the first sub-block is obtained according to the first prediction mode information, the predicted value corresponding to the partial region a, that is, the predicted value of each pixel point in the partial region a, may be obtained, and for convenience of distinction, the predicted value corresponding to the partial region a may be referred to as the target predicted value. The remaining regions in the third region block (e.g., the entire regions of block 1 and block 2, the lower left corner region of block 4, and the following referred to as a partial region B for convenience of description) are located in the second sub-block, so that the predicted value corresponding to the partial region B, that is, the predicted value of each pixel point in the partial region B, may also be obtained according to the first prediction mode information, and the predicted value corresponding to the partial region B may be referred to as a target predicted value for convenience of distinction. When the target predicted value corresponding to the partial area B is obtained according to the first prediction mode information, the implementation manner is referred to as "obtaining the predicted value corresponding to the first sub-block according to the first prediction mode information", and a detailed description thereof is omitted.
And obtaining a target predicted value corresponding to the third region block according to the second prediction mode information.
For example, the partial region B (e.g., the entire region of the block 1 or the block 2, or the lower left corner region of the block 4) in the third region block is located in the second sub-block, and when the predicted value corresponding to the second sub-block is obtained according to the second prediction mode information, the predicted value corresponding to the partial region B, that is, the predicted value of each pixel point in the partial region B may be obtained, and for convenience of distinction, the predicted value corresponding to the partial region B is referred to as the target predicted value. The remaining area a in the third area block (e.g., all areas of the block 6 and the block 7, the upper right corner area of the block 4) is located in the first sub-block, and the predicted value corresponding to the partial area a, that is, the predicted value of each pixel point in the partial area a, may be obtained according to the second prediction mode information. When the target predicted value corresponding to the partial area a is obtained according to the second prediction mode information, the implementation manner is referred to as "obtaining the predicted value corresponding to the second sub-block according to the second prediction mode information", and the description thereof is not repeated here.
In a third aspect, a first prediction value corresponding to a third region block is obtained according to the first prediction mode information (the prediction value of the third region block obtained according to the first prediction mode information is referred to as a first prediction value), a second prediction value corresponding to the third region block is obtained according to the second prediction mode information (the prediction value of the third region block obtained according to the second prediction mode information is referred to as a second prediction value), and the first prediction value and the second prediction value are weighted to obtain a target prediction value corresponding to the third region block.
For example, the partial region a in the third region block is located in the first sub-block, the partial region B in the third region block is located in the second sub-block, and when the prediction value corresponding to the first sub-block is obtained according to the first prediction mode information, the first prediction value corresponding to the partial region a, that is, the first prediction value of each pixel point in the partial region a, and when the prediction value corresponding to the second sub-block is obtained according to the second prediction mode information, the second prediction value corresponding to the partial region B, that is, the second prediction value of each pixel point in the partial region B, may be obtained. Then, the first prediction value corresponding to the partial area B may be obtained according to the first prediction mode information, that is, the first prediction value of each pixel point in the partial area B, and the implementation manner is referred to as "obtaining the prediction value corresponding to the first sub-block according to the first prediction mode information", which is not repeated herein. The second prediction value corresponding to the partial area a may be obtained according to the second prediction mode information, that is, the second prediction value of each pixel point in the partial area a, and the implementation manner is referred to as "obtaining the prediction value corresponding to the second sub-block according to the second prediction mode information", which is not repeated herein.
In summary, the first predicted value of each pixel point in the third region block (i.e., the partial region a and the partial region B) can be obtained, the second predicted value of each pixel point in the third region block can be obtained, and the first predicted value and the second predicted value are weighted to obtain the target predicted value corresponding to the third region block. For example, for each pixel point in the third region block, the first predicted value of the pixel point and the second predicted value of the pixel point may be weighted, so as to obtain the target predicted value of the pixel point. After the above processing is performed on each pixel, the target prediction value corresponding to the third region block can be obtained.
For example, when the first predicted value of the pixel point and the second predicted value of the pixel point are weighted, the weight value of the first predicted value may be the same as or different from the weight value of the second predicted value. For example, if the pixel point is located in the first sub-block, the weight value of the first predicted value may be greater than the weight value of the second predicted value; if the pixel point is located in the second sub-block, the weight value of the first predicted value can be smaller than the weight value of the second predicted value; if the pixel point is located at the dividing line, the weight value of the first predicted value may be equal to the weight value of the second predicted value. Of course, the above is only an example of the weight value size, and is not limited thereto.
For example, for each sub-block in the third area block, the sub-block may be 1*1, that is, a single pixel block, or may be n×m sub-blocks, where N is greater than or equal to 1, and M is greater than or equal to 1. Referring to fig. 12A, the third region block includes a sub-block denoted by 1, a sub-block denoted by 2, a sub-block denoted by 4, a sub-block denoted by 6, and a sub-block denoted by 7.
For each sub-block marked 7, hereinafter referred to as sub-block 7, the predicted value P1 of the sub-block 7 may be determined according to the first prediction mode information, and the predicted value P2 of the sub-block 7 may be determined according to the second prediction mode information, where assuming that the weight value of the predicted value P1 is a and the weight value of the predicted value P2 is b, the target predicted value of the sub-block 7 is: p1+p2×b. The sub-block 7 is located in the first sub-block, the weight value a is greater than the weight value b, and if a is 7/8 and b is 1/8, the target predicted value is: P1.7/8+P2.1/8.
For each sub-block marked 6, hereinafter referred to as sub-block 6, the predicted value P1 of the sub-block 6 may be determined according to the first prediction mode information, and the predicted value P2 of the sub-block 6 may be determined according to the second prediction mode information, where assuming that the weight value of the predicted value P1 is a and the weight value of the predicted value P2 is b, the target predicted value of the sub-block 6 is: p1+p2×b. The sub-block 6 is located in the first sub-block, the weight a is greater than the weight b, and since the sub-block 6 is closer to the second sub-block than the sub-block 7, the weight a of the sub-block 6 may be smaller than the weight a of the sub-block 7, and assuming that a is 6/8 and b is 2/8, the target predicted value is: p1.times.6/8+p2.times.2/8.
For each sub-block marked 4, hereinafter referred to as sub-block 4, the predicted value P1 of the sub-block 4 may be determined according to the first prediction mode information, and the predicted value P2 of the sub-block 4 may be determined according to the second prediction mode information, where assuming that the weight value of the predicted value P1 is a and the weight value of the predicted value P2 is b, the target predicted value of the sub-block 4 is: p1+p2×b. The sub-block 4 is located on the dividing line, the weight value a is equal to the weight value b, and the target predicted value is: p1.times.4/8+p2.times.4/8.
For each sub-block marked 2, hereinafter referred to as sub-block 2, the predicted value P1 of the sub-block 2 may be determined according to the first prediction mode information, and the predicted value P2 of the sub-block 2 may be determined according to the second prediction mode information, where assuming that the weight value of the predicted value P1 is a and the weight value of the predicted value P2 is b, the target predicted value of the sub-block 2 is: p1+p2×b. The sub-block 2 is located in the second sub-block, the weight value a is smaller than the weight value b, and if a is 2/8 and b is 6/8, the target predicted value is: p1.times.2/8+p2.times.6/8.
For each sub-block marked 1, hereinafter referred to as sub-block 1, the predicted value P1 of the sub-block 1 may be determined according to the first prediction mode information, and the predicted value P2 of the sub-block 1 may be determined according to the second prediction mode information, where assuming that the weight value of the predicted value P1 is a and the weight value of the predicted value P2 is b, the target predicted value of the sub-block 1 is: p1+p2×b. The sub-block 1 is located in the second sub-block, the weight a is smaller than the weight b, and since the sub-block 1 is closer to the first sub-block than the sub-block 2, the weight a of the sub-block 1 is smaller than the weight a of the sub-block 2, and assuming that a is 1/8 and b is 7/8, the target predicted value is: P1.1/8+P2.7/8.
In the above embodiment, the sum of the weight value a and the weight value b of each sub-block may be 1. The weight value a is larger as the first sub-block is closer, the weight value b is smaller as the second sub-block is closer, and the weight value b is larger.
Of course, the weight value a and the weight value b described above are only one example, and the weight value a and the weight value b are not limited thereto.
The predicted values P1 and P2 may be luminance predicted values, and the target predicted value is a luminance target predicted value. Referring to fig. 12B, for each sub-block within the third region block, it is also possible to determine the chroma prediction value P3 of the sub-block according to the first prediction mode information and determine the chroma prediction value P4 of the sub-block according to the second prediction mode information. For each sub-block, the chroma target prediction value of the sub-block is p3×c+p4×d. For example, the weight value c of the sub-block 7 is 7/8, the weight value d of the sub-block 7 is 1/8, the weight value c of the sub-block 4 is 4/8, the weight value d of the sub-block 4 is 4/8, the weight value c of the sub-block 1 is 1/8, and the weight value d of the sub-block 1 is 7/8. Of course, the above is only an example of the weight value c and the weight value d, and this is not a limitation.
For example, the magnitude relation of the weight values may be determined according to prediction mode information of neighboring blocks of the current block. For example, if prediction mode information of a neighboring block of the current block is identical to prediction mode information of the first sub-block (or the second sub-block), a weight value corresponding to a prediction value of the first sub-block (or the second sub-block) may be increased.
For example, the determination of the weight value a and the weight value b is based on the weight values described above, i.e., see the above embodiments. If the first sub-block adopts an intra-block copy prediction mode, the second sub-block adopts an intra-frame prediction mode, and if both the adjacent block of the first sub-block and the adjacent block of the second sub-block adopt an intra-frame block copy prediction mode, the weight value corresponding to the predicted value of the first sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt intra prediction modes, a weight value corresponding to the predicted value of the second sub-block may be increased. If the adjacent block of the first sub-block and the adjacent block of the second sub-block adopt the intra-block copy prediction mode and the inter-prediction mode respectively, the weight value corresponding to the prediction value of the first sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block adopt the intra prediction mode and the inter prediction mode, respectively, the weight value corresponding to the prediction value of the second sub-block may be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block adopt an intra block copy prediction mode and an intra prediction mode, respectively, the weight value may be kept unchanged. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the inter prediction mode, the weight value may be kept unchanged. Of course, the foregoing is merely a few examples and is not limiting in this regard.
If the first sub-block adopts an intra-block copy prediction mode, the second sub-block adopts an inter-frame prediction mode, and if both the adjacent block of the first sub-block and the adjacent block of the second sub-block adopt an intra-block copy prediction mode, the weight value corresponding to the predicted value of the first sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the inter prediction mode, the weight value corresponding to the predicted value of the second sub-block may be increased. If the adjacent block of the first sub-block and the adjacent block of the second sub-block adopt the intra-block copy prediction mode and the intra-prediction mode, respectively, a weight value corresponding to the prediction value of the first sub-block may be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block adopt the intra prediction mode and the inter prediction mode, respectively, the weight value corresponding to the prediction value of the second sub-block may be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt an intra-block copy prediction mode and an inter-prediction mode, the weight value can be kept unchanged. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the intra prediction mode, the weight value may be kept unchanged. Of course, the foregoing is merely a few examples and is not limiting in this regard.
If the first sub-block adopts an inter prediction mode, the second sub-block adopts an intra prediction mode, and if the adjacent block of the first sub-block and the adjacent block of the second sub-block both adopt an inter prediction mode, a weight value corresponding to the predicted value of the first sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt intra prediction modes, a weight value corresponding to the predicted value of the second sub-block may be increased. If the adjacent block of the first sub-block and the adjacent block of the second sub-block adopt the inter prediction mode and the intra block copy prediction mode respectively, the weight value corresponding to the prediction value of the first sub-block can be increased. If the adjacent block of the first sub-block and the adjacent block of the second sub-block adopt an intra prediction mode and an intra block copy prediction mode, respectively, a weight value corresponding to the predicted value of the second sub-block may be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt the inter prediction mode and the intra prediction mode, the weight value can be kept unchanged. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block are both intra-block copy prediction modes, the weight value may be kept unchanged. Of course, the above are just a few examples of the weight value size, and this is not a limitation.
In summary, for the target prediction value of each sub-block in the third region block (i.e., each sub-block near the partition line, for example, n×n sub-blocks near the partition line, N is empirically configured, for example, 4, etc.), the target prediction value may be obtained by weighting the prediction values obtained by the two prediction mode information (i.e., the first prediction mode information and the second prediction mode information) respectively, or the prediction value obtained by one prediction mode information may be selected as the target prediction value according to a fixed rule, which is described below:
in case one, referring to fig. 12C, it is assumed that the current block is divided into a first sub-block and a second sub-block, and the first sub-block and the second sub-block are both triangle sub-blocks. For each sub-block (block 1, block 2, block 4, block 6, block 7) in the third region block, determining a first prediction value of the sub-block according to the first prediction mode information, determining a second prediction value of the sub-block according to the second prediction mode information, and weighting the first prediction value of the sub-block and the second prediction value of the sub-block to obtain a target prediction value of the sub-block.
In case two, referring to fig. 12D, it is assumed that the current block is divided into a first sub-block and a second sub-block, and the first sub-block and the second sub-block are both triangle sub-blocks. For each sub-block within the third region block, the target prediction value of the sub-block may be determined according to the first prediction mode information, i.e., the sub-block labeled P2 in fig. 12D is determined according to the first prediction mode information. For each sub-block within the third region block, the target prediction value of the sub-block may be determined according to the second prediction mode information, i.e., the sub-block labeled P1 in fig. 12D is determined according to the second prediction mode information.
In case three, referring to fig. 12E, it is assumed that the current block is divided into a first sub-block, which is a triangle sub-block, and a second sub-block, which is a pentagon sub-block. For each sub-block (block 2, block 4, block 6, block 7) in the third region block, determining a first prediction value of the sub-block according to the first prediction mode information, determining a second prediction value of the sub-block according to the second prediction mode information, and weighting the first prediction value of the sub-block and the second prediction value of the sub-block to obtain a target prediction value of the sub-block.
In case four, referring to fig. 12F, it is assumed that the current block is divided into a first sub-block, which is a triangle sub-block, and a second sub-block, which is a pentagon sub-block. For each sub-block within the third region block, a target prediction value for the sub-block may be determined based on the first prediction mode information, and the sub-block labeled P2 in fig. 12F is the target prediction value for the sub-block determined based on the first prediction mode information. For each sub-block within the third region block, a target prediction value for the sub-block may be determined based on the second prediction mode information, and the sub-block labeled P1 in fig. 12F is the target prediction value for the sub-block determined based on the second prediction mode information.
Of course, the above cases one through four are merely illustrative, and not exclusive, of predicting pixel processes.
In step 205, a prediction value of the current block may be obtained according to prediction values respectively corresponding to the at least two sub-blocks. For example, the encoding end/decoding end may combine the target prediction value of the first region block, the target prediction value of the second region block, and the target prediction value of the third region block to form the prediction value of the current block, which will not be described in detail.
Example 9: referring to fig. 13, a flowchart of a coding and decoding method in an embodiment of the present application is shown, where the coding and decoding method may be applied to a decoding end or an encoding end, and when determining that a current block starts target weighted prediction, the method may include:
step 1301, a first prediction mode and a second prediction mode corresponding to the current block are obtained.
In step 1302, a first prediction value corresponding to the current block is determined according to the first prediction mode.
In step 1303, a second prediction value corresponding to the current block is determined according to the second prediction mode.
In step 1304, weighting is performed according to the first predicted value and the second predicted value, so as to obtain the target predicted value of the current block.
As can be seen from the above technical solutions, in this embodiment, two prediction modes of the current block may be obtained, prediction values are respectively obtained according to the two prediction modes, and the prediction value of the current block is obtained according to the two prediction values. In the above mode, the two prediction modes can be used for prediction respectively, so that the prediction accuracy, the prediction performance, the coding performance and the coding residual error can be improved.
In step 1301, the decoding end or the encoding end needs to determine whether to initiate target weighted prediction for the current block. If the target weighted prediction is started for the current block, the encoding and decoding method of the embodiment of the present application may be adopted. If the target weighted prediction is not started for the current block, the encoding and decoding methods of the embodiments of the present application may not be adopted, and the implementation manner of this case is not limited.
For example, it may be determined whether the characteristic information of the current block satisfies a specific condition; if so, it is determined to initiate target weighted prediction for the current block. If not, it is determined that the target weighted prediction is not enabled for the current block. The characteristic information may include, but is not limited to, one or any combination of the following: the frame type of the current frame where the current block is located, the size information of the current block and the switch control information. The switch control information may be SPS (sequence level) switch control information, PPS (picture parameter level) switch control information, or TILE (slice level) switch control information.
For example, if the feature information is the frame type of the current frame where the current block is located, the frame type of the current frame where the current block is located meets a specific condition, which may include, but is not limited to: if the frame type of the current frame where the current block is located is a B frame, determining that the frame type meets a specific condition; or if the frame type of the current frame where the current block is located is an I frame, determining that the frame type meets a specific condition.
For example, if the feature information is size information of the current block, and the size information includes a width of the current block and a height of the current block, the size information of the current block satisfies a specific condition, which may include, but is not limited to: if the width of the current block is larger than or equal to the first value and the height of the current block is larger than or equal to the second value, determining that the size information of the current block meets a specific condition. Or if the width of the current block is greater than or equal to the third value, the height of the current block is greater than or equal to the fourth value, the width of the current block is less than or equal to the fifth value, and the height of the current block is less than or equal to the sixth value, determining that the size information of the current block meets the specific condition.
Illustratively, the above values may be empirically configured, such as 8, 16, 32, 64, 128, etc., without limitation. In one possible implementation, the first value may be 8, the second value may be 8, the third value may be 8, the fourth value may be 8, the fifth value may be 64, and the sixth value may be 64. Of course, the foregoing is merely an example, and is not limiting. In summary, if the width of the current block is greater than or equal to 8 and the height of the current block is greater than or equal to 8, it is determined that the size information of the current block satisfies the specific condition. Or if the width of the current block is greater than or equal to 8, the height of the current block is greater than or equal to 8, the width of the current block is less than or equal to 64, and the height of the current block is less than or equal to 64, determining that the size information of the current block meets the specific condition.
For example, if the characteristic information is switch control information, the switch control information satisfies a specific condition, which may include, but is not limited to: if the switch control information is enabled, determining that the switch control information meets a specific condition.
For example, if the feature information is the frame type of the current frame where the current block is located and the size information of the current block, the frame type satisfies a specific condition, and when the size information satisfies the specific condition, it is determined that the feature information of the current block satisfies the specific condition. If the characteristic information is the frame type and the switch control information of the current frame where the current block is located, the frame type meets the specific condition, and when the switch control information meets the specific condition, the characteristic information of the current block is determined to meet the specific condition. If the characteristic information is the size information and the switch control information of the current block, the size information meets a specific condition, and when the switch control information meets the specific condition, the characteristic information of the current block is determined to meet the specific condition. If the characteristic information is the frame type of the current frame where the current block is located, the size information of the current block and the switch control information, the frame type meets the specific condition, the size information meets the specific condition, and the switch control information meets the specific condition, the characteristic information of the current block is determined to meet the specific condition.
In step 1301, the decoding end or the encoding end acquires a first prediction mode and a second prediction mode corresponding to the current block, where the first prediction mode and the second prediction mode may be the same, and the first prediction mode and the second prediction mode may also be different. Illustratively, the first prediction mode may include, but is not limited to, one of the following prediction modes: conventional merging inter prediction mode, triangular inter prediction mode, intra block copy prediction mode, intra prediction mode, MMVD inter prediction mode, affine merging inter prediction mode, ATMVP inter prediction mode. The second prediction mode may include, but is not limited to, one of the following prediction modes: conventional merging inter prediction mode, triangular inter prediction mode, intra block copy prediction mode, intra prediction mode, MMVD inter prediction mode, affine merging inter prediction mode, ATMVP inter prediction mode.
For example, when the first prediction mode is a conventional merge inter prediction mode, the second prediction mode may be one of a triangular inter prediction mode, an intra block copy prediction mode, an intra prediction mode, an MMVD inter prediction mode, an affine merge inter prediction mode, and an ATMVP inter prediction mode. When the first prediction mode is a triangular inter prediction mode, the second prediction mode may be one of a conventional merged inter prediction mode, an intra block copy prediction mode, an intra prediction mode, an MMVD inter prediction mode, an affine merged inter prediction mode, and an ATMVP inter prediction mode. When the first prediction mode is an intra block copy prediction mode, the second prediction mode may be one of a normal merge inter prediction mode, a delta inter prediction mode, an intra prediction mode, an MMVD inter prediction mode, an affine merge inter prediction mode, and an ATMVP inter prediction mode. When the first prediction mode is an intra prediction mode, the second prediction mode may be one of a normal merge inter prediction mode, a triangular inter prediction mode, an intra block copy prediction mode, an MMVD inter prediction mode, an affine merge inter prediction mode, and an ATMVP inter prediction mode. When the first prediction mode is an MMVD inter prediction mode, the second prediction mode may be one of a normal merge inter prediction mode, a delta inter prediction mode, an intra block copy prediction mode, an intra prediction mode, an affine merge inter prediction mode, and an ATMVP inter prediction mode. When the first prediction mode is an affine-merge inter prediction mode, the second prediction mode may be one of a regular-merge inter prediction mode, a triangular inter prediction mode, an intra block copy prediction mode, an intra prediction mode, an MMVD inter prediction mode, and an ATMVP inter prediction mode. When the first prediction mode is an ATMVP inter prediction mode, the second prediction mode may be one of a normal merge inter prediction mode, a delta inter prediction mode, an intra block copy prediction mode, an intra prediction mode, an MMVD inter prediction mode, and an affine merge inter prediction mode.
For another example, when the first prediction mode is a normal merge inter prediction mode, the second prediction mode may be a normal merge inter prediction mode. When the first prediction mode is a delta inter prediction mode, the second prediction mode may be a delta inter prediction mode. When the first prediction mode is an intra block copy prediction mode, the second prediction mode may be an intra block copy prediction mode. When the first prediction mode is an intra prediction mode, the second prediction mode may be an intra prediction mode. When the first prediction mode is an MMVD inter prediction mode, the second prediction mode may be an MMVD inter prediction mode. When the first prediction mode is an affine-merge inter prediction mode, the second prediction mode may be an affine-merge inter prediction mode. When the first prediction mode is an ATMVP inter prediction mode, the second prediction mode may be an ATMVP inter prediction mode.
In determining the first predicted value corresponding to the current block and the second predicted value corresponding to the current block, the first predicted value determining process is related to the first prediction mode, and the specific determining process is described in the above embodiment, but in the above embodiment, the predicted values of the two sub-blocks are determined, and in this embodiment, the encoding end/decoding end determines the predicted value of the current block. The determination process of the second prediction value is related to the second prediction mode, and the detailed description of the determination process is omitted herein, except that in the above embodiment, the prediction values of the two sub-blocks are determined, and in this embodiment, the encoding end/decoding end determines the prediction value of the current block.
In the first aspect, assuming that the first prediction mode is different from the second prediction mode, the determining the first prediction value corresponding to the current block according to the first prediction mode and the determining the second prediction value corresponding to the current block according to the second prediction mode may include:
if the first prediction mode is a conventional merge inter prediction mode, a motion information candidate list of the conventional merge inter prediction mode may be constructed for the current block, where a plurality of candidate motion information (such as motion vectors and reference frame information) exists in the motion information candidate list, such as spatial candidate motion information, temporal candidate motion information, historical motion information, default motion information, and the like. After the motion information candidate list is constructed for the current block, selecting one candidate motion information from the motion information candidate list as target motion information of the current block, and acquiring a first predicted value corresponding to the current block according to the target motion information, which is not described in detail.
If the first prediction mode is a delta inter prediction mode, a motion information candidate list of the delta inter prediction mode is constructed for the current block, wherein the motion information candidate list comprises a plurality of candidate motion information (such as unidirectional motion information), and the construction process of the motion information candidate list is not limited. Dividing the current block into a first triangle sub-block and a second triangle sub-block, selecting one candidate motion information from the motion information candidate list as the target motion information of the first triangle sub-block, and selecting the other candidate motion information from the motion information candidate list as the target motion information of the second triangle sub-block, wherein the target motion information of the first triangle sub-block is different from the target motion information of the second triangle sub-block. The method comprises the steps of determining a predicted value of a first triangle sub-block according to target motion information of the first triangle sub-block, determining a predicted value of a second triangle sub-block according to target motion information of the second triangle sub-block, and obtaining a first predicted value corresponding to a current block according to the predicted value of the first triangle sub-block and the predicted value of the second triangle sub-block, wherein the process is not repeated.
If the first prediction mode is an intra block copy prediction mode, a block vector candidate list is constructed for the current block, the block vector candidate list including a plurality of candidate block vectors, the candidate block vectors in the block vector candidate list including but not limited to: the construction process of the block vector candidate list is not limited by the block vector of the airspace adjacent block of the current block, the historical block vector, the default block vector and the like in the HMVP list corresponding to the current block. Then, a candidate block vector is selected from the block vector candidate list to serve as a target block vector of the current block, and a first predicted value corresponding to the current block is obtained according to the target block vector, and the process is not repeated.
If the first prediction mode is an intra-frame prediction mode, a target intra-frame sub-prediction mode of the current block is obtained, and a first prediction value corresponding to the current block is obtained according to the target intra-frame sub-prediction mode, and the process is not repeated. In order to acquire the target intra sub-prediction mode of the current block, the following manner may be adopted: the specified intra sub-prediction mode is determined as a target intra sub-prediction mode of the current block. Alternatively, an intra sub-prediction mode candidate list is constructed for the current block, and the intra sub-prediction mode candidate list includes a plurality of candidate intra sub-prediction modes, such as Planar mode, DC mode, vertical angle mode, horizontal angle mode, etc., without limitation; and selecting one candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a target intra-frame sub-prediction mode of the current block. Alternatively, the intra sub-prediction modes of neighboring blocks of the current block are determined as target intra sub-prediction modes of the current block.
If the first prediction mode is an MMVD inter prediction mode, a motion information candidate list of the MMVD inter prediction mode may be constructed for the current block, where the motion information candidate list includes a plurality of candidate motion information, and the motion information candidate list includes motion information obtained by shifting original motion information, and a construction process of the motion information candidate list is not limited. Illustratively, the raw motion information may include, but is not limited to: the motion information of the spatial neighboring block of the current block, the motion information of the temporal block of the current block, default motion information, etc., and the original motion information is not limited. For example, motion information of a plurality of spatial neighboring blocks, such as motion information C1-motion information C4, is acquired, and motion information C1, motion information C2, motion information C3 'obtained by shifting motion information C3, and motion information C4' obtained by shifting motion information C4 are added to the motion information candidate list. Then, selecting one candidate motion information from the motion information candidate list as target motion information of the current block, and acquiring a first predicted value corresponding to the current block according to the target motion information, which is not described in detail.
If the first prediction mode is an affine-merge inter prediction mode, a motion information candidate list of affine-merge inter prediction modes may be constructed for the current block, the motion information candidate list including a plurality of candidate motion information, the motion information candidate list including, but not limited to: the construction process of the motion information candidate list is not limited, such as motion information constructed based on motion information of spatial neighboring blocks of the current block, motion information constructed based on motion information of temporal blocks of the current block, motion information constructed using a fixed rule, default motion information, and the like. Then, one candidate motion information is selected from the motion information candidate list as target motion information of the current block. Affine merge inter prediction mode is a sub-block based prediction technique by which motion information for each sub-block can be derived, and thus, after target motion information is selected from a motion information candidate list, motion information for each sub-block of a current block can be derived based on the target motion information and the motion parameter model. For each sub-block, the motion information for that sub-block may be used to determine the prediction value for that sub-block. Further, based on the predicted value of each sub-block, a first predicted value corresponding to the current block may be obtained.
If the first prediction mode is an ATMVP inter prediction mode, determining a reference frame corresponding to the current block by specifying motion information, acquiring a reference block corresponding to the current block from the reference frame, and determining target motion information of the current block according to the motion information of the reference block, for example, performing telescopic change on the motion information of the reference block, and taking the changed motion information as the target motion information of the current block. The first predicted value corresponding to the current block is obtained according to the target motion information, and the process is not repeated.
If the second prediction mode is a conventional combined inter prediction mode, a triangular inter prediction mode, an intra block copy prediction mode, an intra prediction mode, an MMVD inter prediction mode, an affine combined inter prediction mode, or an ATMVP inter prediction mode, the process of obtaining the second prediction value corresponding to the current block is referred to the above embodiments and will not be repeated herein.
In the second case, assuming that the first prediction mode is the same as the second prediction mode, the determining the first prediction value corresponding to the current block according to the first prediction mode and the determining the second prediction value corresponding to the current block according to the second prediction mode may include:
If the first prediction mode and the second prediction mode are both conventional merge inter prediction modes, a motion information candidate list of the conventional merge inter prediction modes may be constructed for the current block, the motion information candidate list including a plurality of candidate motion information. One candidate motion information is selected from the motion information candidate list to serve as first target motion information of the current block, the other candidate motion information is selected from the motion information candidate list to serve as second target motion information of the current block, a first predicted value corresponding to the current block is obtained according to the first target motion information, and a second predicted value corresponding to the current block is obtained according to the second target motion information.
If the first prediction mode and the second prediction mode are both intra block copy prediction modes, a block vector candidate list may be constructed for the current block, the block vector candidate list including a plurality of candidate block vectors, the candidate block vectors in the block vector candidate list including, but not limited to: block vectors of spatial neighboring blocks of the current block, historical block vectors in an HMVP list corresponding to the current block, default block vectors, and the like. Selecting one candidate block vector from the block vector candidate list as a first target block vector of the current block, selecting another candidate block vector from the block vector candidate list as a second target block vector of the current block, acquiring a first predicted value corresponding to the current block according to the first target block vector, and acquiring a second predicted value corresponding to the current block according to the second target block vector.
If the first prediction mode and the second prediction mode are intra-frame prediction modes, a first target intra-frame sub-prediction mode and a second target intra-frame sub-prediction mode of the current block can be obtained, a first prediction value corresponding to the current block is obtained according to the first target intra-frame sub-prediction mode, and a second prediction value corresponding to the current block is obtained according to the second target intra-frame sub-prediction mode.
The manner of obtaining the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode may include, but is not limited to, the following manners: the specified first intra-sub-prediction mode is determined as a first target intra-sub-prediction mode of the current block, and the specified second intra-sub-prediction mode is determined as a second target intra-sub-prediction mode of the current block. Alternatively, an intra sub-prediction mode candidate list is constructed for the current block, and the intra sub-prediction mode candidate list may include a plurality of candidate intra sub-prediction modes, such as Planar mode, DC mode, vertical angle mode, horizontal angle mode, and the like; one candidate intra-prediction mode is selected from the intra-prediction mode candidate list as a first target intra-prediction mode of the current block, and another candidate intra-prediction mode is selected from the intra-prediction mode candidate list as a second target intra-prediction mode of the current block. Or pushing the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode of the current block according to the intra-frame sub-prediction modes of the adjacent blocks of the current block; for example, an intra-prediction mode of a first neighboring block of the current block and an intra-prediction mode of a second neighboring block of the current block are acquired, and if the intra-prediction mode of the first neighboring block is different from the intra-prediction mode of the second neighboring block, the intra-prediction mode of the first neighboring block is determined to be a first target intra-prediction mode of the current block, and the intra-prediction mode of the second neighboring block is determined to be a second target intra-prediction mode of the current block; if the intra-prediction mode of the first neighboring block is the same as the intra-prediction mode of the second neighboring block, the intra-prediction mode of the first neighboring block is determined as a first target intra-prediction mode of the current block, and another intra-prediction mode different from the first target intra-prediction mode is determined as a second target intra-prediction mode of the current block. Of course, the above-described manner is merely a few examples, and is not limited in this regard.
Of course, the foregoing is merely an example, and the determination manners of the prediction values of the current block are different in different combinations of the first prediction mode and the second prediction mode, which are not described herein. For example, the first prediction mode and the second prediction mode are affine-merged inter prediction modes, the first prediction mode and the second prediction mode are MMVD inter prediction modes, and the like, and the prediction value determination process is referred to above as an example.
In step 1304, the encoding/decoding end may perform weighting processing according to the first predicted value and the second predicted value to obtain a target predicted value of the current block. For example, the target predicted value of the current block is obtained by performing weighting processing according to the first predicted value, the first weight value corresponding to the first predicted value, the second predicted value and the second weight value corresponding to the second predicted value. The first weight value and the second weight value may be different or the same. The determination methods of the first weight value and the second weight value are not limited.
For example, the magnitude relation of the weight values may be determined according to prediction mode information of neighboring blocks of the current block. For example, if prediction mode information of neighboring blocks of the current block is the same as the first prediction mode, the first weight value may be increased. If the prediction mode information of the neighboring blocks of the current block is the same as the second prediction mode, the second weight value may be increased.
For example, if the first prediction mode is a normal merge mode, the second prediction mode is an intra prediction mode, and if the prediction mode information of the neighboring block of the current block is a normal merge mode, the first weight value is increased; if the prediction mode information of the adjacent blocks of the current block is an intra-frame prediction mode, adding a second weight value; of course, the foregoing is merely a few examples and is not limiting in this regard.
Based on the same application concept as the above method, the embodiment of the present application further provides a codec device, where the codec device is applied to an encoding end or a decoding end, as shown in fig. 14, and is a structure diagram of the device, and includes: an obtaining module 1401, configured to obtain block partition information of a current block when determining that the subblock-based joint prediction is started for the current block; a processing module 1402, configured to divide the current block into at least two sub-blocks according to the block division information; the obtaining module 1401 is further configured to obtain prediction mode information corresponding to the at least two sub-blocks respectively; obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information; and obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks.
Illustratively, the at least two sub-blocks include a first sub-block and a second sub-block; the prediction mode information of the first sub-block is an intra-block copy prediction mode; the prediction mode information of the second sub-block is an intra prediction mode, or an inter prediction mode, or an intra block copy prediction mode.
If the prediction mode information of the first sub-block is an intra-block copy prediction mode, and the prediction mode information of the second sub-block is an intra-block copy prediction mode, the obtaining module 1401 is specifically configured to, when obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information: building a block vector candidate list comprising a plurality of candidate block vectors; selecting one candidate block vector from the block vector candidate list as a first target block vector of the first sub-block, and selecting another candidate block vector from the block vector candidate list as a second target block vector of the second sub-block; obtaining a predicted value corresponding to the first sub-block according to the first target block vector; and obtaining a predicted value corresponding to the second sub-block according to the second target block vector.
If the prediction mode information of the first sub-block is an intra-block copy prediction mode, the prediction mode information of the second sub-block is an inter-prediction mode, and the obtaining module 1401 is specifically configured to, when obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information: building a block vector candidate list comprising a plurality of candidate block vectors; selecting a candidate block vector from the block vector candidate list as a target block vector of the first sub-block; constructing a motion information candidate list, wherein the motion information candidate list comprises at least one candidate motion information; selecting one candidate motion information from the motion information candidate list as target motion information of the second sub-block; obtaining a predicted value corresponding to the first sub-block according to the target block vector; and obtaining a predicted value corresponding to the second sub-block according to the target motion information.
If the prediction mode information of the first sub-block is an intra-block copy prediction mode, the prediction mode information of the second sub-block is an intra-frame prediction mode, and the obtaining module 1401 is specifically configured to, when obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information: building a block vector candidate list comprising a plurality of candidate block vectors; selecting a candidate block vector from the block vector candidate list as a target block vector of the first sub-block; acquiring a target intra-frame sub-prediction mode of the second sub-block; obtaining a predicted value corresponding to the first sub-block according to the target block vector; and obtaining a predicted value corresponding to the second sub-block according to the target intra-frame sub-prediction mode.
The at least two sub-blocks include a first sub-block and a second sub-block; the prediction mode information of the first sub-block is an intra-frame prediction mode, the prediction mode information of the second sub-block is an intra-frame prediction mode, and the obtaining module 1401 is specifically configured to, when obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information: acquiring a first target intra-frame sub-prediction mode of the first sub-block and a second target intra-frame sub-prediction mode of the second sub-block, wherein the first target intra-frame sub-prediction mode is different from the second target intra-frame sub-prediction mode; obtaining a predicted value corresponding to the first sub-block according to the first target intra-frame sub-prediction mode; and obtaining a predicted value corresponding to the second sub-block according to the second target intra-frame sub-prediction mode.
The acquiring module 1401 is specifically configured to, when acquiring the first target intra-frame sub-prediction mode of the first sub-block and the second target intra-frame sub-prediction mode of the second sub-block: determining a specified first intra-sub-prediction mode as a first target intra-sub-prediction mode for the first sub-block and a specified second intra-sub-prediction mode as a second target intra-sub-prediction mode for the second sub-block; alternatively, an intra-sub-prediction mode candidate list is constructed, wherein the intra-sub-prediction mode candidate list comprises a plurality of candidate intra-sub-prediction modes; selecting one candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a first target intra-frame sub-prediction mode of the first sub-block, and selecting another candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a second target intra-frame sub-prediction mode of the second sub-block; or if the intra-frame sub-prediction mode of the first adjacent block of the first sub-block is different from the intra-frame sub-prediction mode of the second adjacent block of the second sub-block, determining the intra-frame sub-prediction mode of the first adjacent block as the first target intra-frame sub-prediction mode of the first sub-block, and determining the intra-frame sub-prediction mode of the second adjacent block as the second target intra-frame sub-prediction mode of the second sub-block; if the intra-frame sub-prediction mode of the first adjacent block is the same as the intra-frame sub-prediction mode of the second adjacent block, determining the intra-frame sub-prediction mode of the first adjacent block as a first target intra-frame sub-prediction mode of the first sub-block, and determining another intra-frame sub-prediction mode different from the first target intra-frame sub-prediction mode as a second target intra-frame sub-prediction mode of the second sub-block.
The at least two sub-blocks include a first sub-block and a second sub-block; the prediction mode information of the first sub-block is an inter prediction mode, the prediction mode information of the second sub-block is an intra prediction mode, and the obtaining module 1401 is specifically configured to, when obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information: constructing a motion information candidate list, wherein the motion information candidate list comprises at least one candidate motion information; selecting one candidate motion information from the motion information candidate list as target motion information of the first sub-block; acquiring a target intra-frame sub-prediction mode of the second sub-block; acquiring a predicted value corresponding to the first sub-block according to the target motion information; and obtaining a predicted value corresponding to the second sub-block according to the target intra-frame sub-prediction mode.
The acquiring module 1401 is specifically configured to, when acquiring the target intra sub-prediction mode of the second sub-block: determining a specified intra sub-prediction mode as a target intra sub-prediction mode for the second sub-block; alternatively, an intra-sub-prediction mode candidate list is constructed, wherein the intra-sub-prediction mode candidate list comprises a plurality of candidate intra-sub-prediction modes; selecting a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a target intra-frame sub-prediction mode of the second sub-block; alternatively, the intra sub-prediction mode of the neighboring block of the second sub-block is determined as the target intra sub-prediction mode of the second sub-block.
The at least two sub-blocks include a first sub-block and a second sub-block; the prediction mode information of the first sub-block is an inter prediction mode, the prediction mode information of the second sub-block is an inter prediction mode, and the obtaining module 1401 is specifically configured to, when obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information: constructing a first motion information candidate list of a first sub-mode in the inter prediction mode, the first motion information candidate list including at least one candidate motion information; selecting one candidate motion information from the first motion information candidate list as target motion information of the first sub-block; constructing a second motion information candidate list of a second sub-mode in the inter prediction mode, the second motion information candidate list including at least one candidate motion information; selecting one candidate motion information from the second motion information candidate list as target motion information of the second sub-block; the first sub-mode is different from the second sub-mode; acquiring a predicted value corresponding to the first sub-block according to the target motion information of the first sub-block; acquiring a predicted value corresponding to the second sub-block according to the target motion information of the second sub-block; wherein the first sub-mode is one of the following sub-modes: a conventional merge sub-mode, an MMVD sub-mode, an affine merge sub-mode, and an ATMVP sub-mode; the second sub-mode is one of the following sub-modes: conventional merge sub-mode, MMVD sub-mode, affine merge sub-mode, ATMVP sub-mode.
Illustratively, the shape of the first sub-block is the same as the shape of the second sub-block; alternatively, the shape of the first sub-block is different from the shape of the second sub-block. The first sub-block is one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks; the second sub-block is one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks.
Illustratively, when the first sub-block employs an MMVD sub-mode of the intra block copy prediction modes, the block vector candidate list includes a block vector candidate list of MMVD sub-modes.
For example, when the second sub-block or the first sub-block adopts a normal merge sub-mode of inter prediction modes, the motion information candidate list includes a motion information candidate list of the normal merge sub-mode; or when the second sub-block or the first sub-block adopts an MMVD sub-mode in an inter prediction mode, the motion information candidate list comprises a motion information candidate list of the MMVD sub-mode; or when the second sub-block or the first sub-block adopts an affine merging sub-mode in an inter prediction mode, the motion information candidate list comprises a motion information candidate list of affine merging sub-mode; or, when the second sub-block or the first sub-block adopts an ATMVP sub-mode in an inter prediction mode, the motion information candidate list includes a motion information candidate list of the ATMVP sub-mode.
The at least two sub-blocks include a first sub-block and a second sub-block, the first sub-block corresponds to first prediction mode information, the second sub-block corresponds to second prediction mode information, and the obtaining module 1401 is specifically configured to, when obtaining prediction values corresponding to the at least two sub-blocks respectively according to the prediction mode information: dividing the current block into a first area block, a second area block and a third area block; the first area block is located in the first sub-block, the second area block is located in the second sub-block, the distance between the center of each sub-block in the third area block and a dividing line is smaller than a preset threshold, and the dividing line is determined based on the block dividing information; acquiring a target predicted value corresponding to the first region block according to the first predicted mode information; acquiring a target predicted value corresponding to the second region block according to the second predicted mode information; and acquiring a target predicted value corresponding to the third region block according to the first predicted mode information and/or the second predicted mode information.
The obtaining module 1401 is specifically configured to, when obtaining the target prediction value corresponding to the third region block according to the first prediction mode information and/or the second prediction mode information: acquiring a target predicted value corresponding to the third region block according to the first predicted mode information; or, obtaining a target predicted value corresponding to the third region block according to the second predicted mode information; or, acquiring a first predicted value corresponding to the third region block according to the first predicted mode information, acquiring a second predicted value corresponding to the third region block according to the second predicted mode information, and performing weighting processing on the first predicted value and the second predicted value to obtain a target predicted value corresponding to the third region block.
Based on the same application concept as the above method, the embodiment of the present application further provides a codec device, where the codec device is applied to an encoding end or a decoding end, as shown in fig. 15, and is a structure diagram of the device, and includes:
an obtaining module 1501, configured to obtain a first prediction mode and a second prediction mode corresponding to a current block when determining that the current block starts a target weighted prediction; a determining module 1502, configured to determine a first prediction value corresponding to the current block according to the first prediction mode; determining a second predicted value corresponding to the current block according to the second predicted mode; and a processing module 1503, configured to perform weighting processing according to the first predicted value and the second predicted value, to obtain a target predicted value of the current block, where the target predicted value is used for encoding or decoding the current block.
Illustratively, the first prediction mode is one of the following prediction modes: conventional merging inter prediction mode, triangular inter prediction mode, intra block copy prediction mode, intra prediction mode, MMVD inter prediction mode, affine merging inter prediction mode, ATMVP inter prediction mode; the second prediction mode is one of the following prediction modes: conventional merging inter prediction mode, triangular inter prediction mode, intra block copy prediction mode, intra prediction mode, MMVD inter prediction mode, affine merging inter prediction mode, ATMVP inter prediction mode.
Based on the same application concept as the above method, the decoding end device provided in the embodiment of the present application may specifically refer to fig. 16 for a schematic diagram of a hardware architecture of the decoding end device in terms of a hardware layer. Comprising the following steps: a processor 1601 and a machine-readable storage medium 1602, wherein: the machine-readable storage medium 1602 stores machine-executable instructions executable by the processor 1601; the processor 1601 is configured to execute machine executable instructions to implement the methods disclosed in the above examples of the present application.
For example, the processor 1601 is configured to execute machine executable instructions to implement the following steps:
when determining to start joint prediction based on sub-blocks for a current block, acquiring block division information of the current block; dividing the current block into at least two sub-blocks according to the block division information; obtaining prediction mode information corresponding to the at least two sub-blocks respectively; obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks; or alternatively, the process may be performed,
when determining that a current block starts target weighted prediction, acquiring a first prediction mode and a second prediction mode corresponding to the current block; determining a first predicted value corresponding to the current block according to the first predicted mode; determining a second predicted value corresponding to the current block according to the second predicted mode; and carrying out weighting processing according to the first predicted value and the second predicted value to obtain a target predicted value of the current block, wherein the target predicted value is used for decoding the current block.
Based on the same application concept as the above method, the hardware architecture schematic diagram of the encoding end device provided in the embodiment of the present application may be specifically shown in fig. 17 in terms of hardware level. Comprising the following steps: a processor 1701 and a machine-readable storage medium 1702, wherein: the machine-readable storage medium 1702 stores machine-executable instructions executable by the processor 1701; the processor 1701 is configured to execute machine-executable instructions to implement the methods disclosed in the above examples of the present application.
For example, the processor 1701 is configured to execute machine executable instructions to implement the steps of:
when determining to start joint prediction based on sub-blocks for a current block, acquiring block division information of the current block; dividing the current block into at least two sub-blocks according to the block division information; obtaining prediction mode information corresponding to the at least two sub-blocks respectively; obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks; or alternatively, the process may be performed,
when determining that a current block starts target weighted prediction, acquiring a first prediction mode and a second prediction mode corresponding to the current block; determining a first predicted value corresponding to the current block according to the first predicted mode; determining a second predicted value corresponding to the current block according to the second predicted mode; and carrying out weighting processing according to the first predicted value and the second predicted value to obtain a target predicted value of the current block, wherein the target predicted value is used for encoding the current block.
Based on the same application concept as the above method, the embodiments of the present application further provide a machine-readable storage medium, where a number of computer instructions are stored, where the computer instructions can implement the method disclosed in the above example of the present application when executed by a processor. Wherein the machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, or the like. For example, a machine-readable storage medium may be: RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, a storage drive (e.g., hard drive), a solid state drive, any type of storage disk (e.g., optical disk, dvd, etc.), or a similar storage medium, or a combination thereof.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or a combination of any of these devices. For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present application.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. The present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (7)

1. A method of encoding and decoding, the method comprising:
when determining to start joint prediction based on sub-blocks for a current block, acquiring block division information of the current block;
dividing the current block into at least two sub-blocks according to the block division information;
obtaining prediction mode information corresponding to the at least two sub-blocks respectively;
obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information;
obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks;
wherein the at least two sub-blocks include a first sub-block and a second sub-block; the current block comprises a first area block, a second area block and a third area block, the first area block is positioned in the first sub-block, the second area block is positioned in the second sub-block, the distance between the center of each sub-block in the third area block and a dividing line is smaller than a preset threshold, and the dividing line is determined based on the block dividing information; if the prediction mode information of the first sub-block is an inter prediction mode and the prediction mode information of the second sub-block is an intra prediction mode, then:
The obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information includes:
constructing a motion information candidate list, wherein the motion information candidate list comprises at least one candidate motion information; selecting one candidate motion information from the motion information candidate list as target motion information of the first sub-block;
acquiring a target intra-frame sub-prediction mode of the second sub-block;
acquiring a target predicted value corresponding to the first region block according to the target motion information;
acquiring a target predicted value corresponding to the second region block according to the target intra-frame sub-prediction mode;
acquiring a first predicted value corresponding to the third region block according to the target motion information, acquiring a second predicted value corresponding to the third region block according to the target intra-frame sub-prediction mode, and carrying out weighting processing on the first predicted value and the second predicted value to obtain a target predicted value corresponding to the third region block;
wherein the first sub-block is one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks; the second sub-block is one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the obtaining the target intra sub-prediction mode of the second sub-block includes:
determining a specified intra sub-prediction mode as a target intra sub-prediction mode for the second sub-block; or alternatively, the process may be performed,
constructing an intra-frame sub-prediction mode candidate list, wherein the intra-frame sub-prediction mode candidate list comprises a plurality of candidate intra-frame sub-prediction modes; selecting a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as a target intra-frame sub-prediction mode of the second sub-block; or alternatively, the process may be performed,
an intra-sub-prediction mode of a neighboring block of a second sub-block is determined as a target intra-sub-prediction mode of the second sub-block.
3. The method of claim 1, wherein the shape of the first sub-block is the same as the shape of the second sub-block; alternatively, the shape of the first sub-block is different from the shape of the second sub-block.
4. The method of claim 1, wherein the step of determining the position of the substrate comprises,
when the first sub-block adopts a conventional merging sub-mode in an inter prediction mode, the motion information candidate list comprises a motion information candidate list of the conventional merging sub-mode; or alternatively, the process may be performed,
When the first sub-block adopts an MMVD sub-mode in an inter prediction mode, the motion information candidate list comprises a motion information candidate list of the MMVD sub-mode; or alternatively, the process may be performed,
when the first sub-block adopts an affine merging sub-mode in an inter prediction mode, the motion information candidate list comprises a motion information candidate list of the affine merging sub-mode; or alternatively, the process may be performed,
when the first sub-block adopts an ATMVP sub-mode in an inter prediction mode, the motion information candidate list includes a motion information candidate list of the ATMVP sub-mode.
5. A codec apparatus, the apparatus comprising:
the acquisition module is used for acquiring block division information of the current block when determining that the joint prediction based on the sub-blocks is started on the current block;
the processing module is used for dividing the current block into at least two sub-blocks according to the block division information;
the acquisition module is further used for acquiring prediction mode information corresponding to the at least two sub-blocks respectively; obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks;
Wherein the at least two sub-blocks include a first sub-block and a second sub-block; the current block comprises a first area block, a second area block and a third area block, the first area block is positioned in the first sub-block, the second area block is positioned in the second sub-block, the distance between the center of each sub-block in the third area block and a dividing line is smaller than a preset threshold, and the dividing line is determined based on the block dividing information; if the prediction mode information of the first sub-block is an inter prediction mode and the prediction mode information of the second sub-block is an intra prediction mode, then: the obtaining module is specifically configured to, when obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information:
constructing a motion information candidate list, wherein the motion information candidate list comprises at least one candidate motion information; selecting one candidate motion information from the motion information candidate list as target motion information of the first sub-block;
acquiring a target intra-frame sub-prediction mode of the second sub-block;
acquiring a target predicted value corresponding to the first region block according to the target motion information;
acquiring a target predicted value corresponding to the second region block according to the target intra-frame sub-prediction mode;
Acquiring a first predicted value corresponding to the third region block according to the target motion information, acquiring a second predicted value corresponding to the third region block according to the target intra-frame sub-prediction mode, and carrying out weighting processing on the first predicted value and the second predicted value to obtain a target predicted value corresponding to the third region block;
wherein the first sub-block is one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks; the second sub-block is one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks.
6. A decoding end apparatus, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor;
the processor is configured to execute machine-executable instructions to perform the steps of:
when determining to start joint prediction based on sub-blocks for a current block, acquiring block division information of the current block; dividing the current block into at least two sub-blocks according to the block division information; obtaining prediction mode information corresponding to the at least two sub-blocks respectively; obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks;
Wherein the at least two sub-blocks include a first sub-block and a second sub-block; the current block comprises a first area block, a second area block and a third area block, the first area block is positioned in the first sub-block, the second area block is positioned in the second sub-block, the distance between the center of each sub-block in the third area block and a dividing line is smaller than a preset threshold, and the dividing line is determined based on the block dividing information; if the prediction mode information of the first sub-block is an inter prediction mode and the prediction mode information of the second sub-block is an intra prediction mode, then:
the obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information includes:
constructing a motion information candidate list, wherein the motion information candidate list comprises at least one candidate motion information; selecting one candidate motion information from the motion information candidate list as target motion information of the first sub-block;
acquiring a target intra-frame sub-prediction mode of the second sub-block;
acquiring a target predicted value corresponding to the first region block according to the target motion information;
acquiring a target predicted value corresponding to the second region block according to the target intra-frame sub-prediction mode;
Acquiring a first predicted value corresponding to the third region block according to the target motion information, acquiring a second predicted value corresponding to the third region block according to the target intra-frame sub-prediction mode, and carrying out weighting processing on the first predicted value and the second predicted value to obtain a target predicted value corresponding to the third region block;
wherein the first sub-block is one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks; the second sub-block is one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks.
7. An encoding end device, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor;
the processor is configured to execute machine-executable instructions to perform the steps of:
when determining to start joint prediction based on sub-blocks for a current block, acquiring block division information of the current block; dividing the current block into at least two sub-blocks according to the block division information; obtaining prediction mode information corresponding to the at least two sub-blocks respectively; obtaining prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information; obtaining the predicted value of the current block according to the predicted values respectively corresponding to the at least two sub-blocks;
Wherein the at least two sub-blocks include a first sub-block and a second sub-block; the current block comprises a first area block, a second area block and a third area block, the first area block is positioned in the first sub-block, the second area block is positioned in the second sub-block, the distance between the center of each sub-block in the third area block and a dividing line is smaller than a preset threshold, and the dividing line is determined based on the block dividing information; if the prediction mode information of the first sub-block is an inter prediction mode and the prediction mode information of the second sub-block is an intra prediction mode, then:
the obtaining the prediction values corresponding to the at least two sub-blocks according to the prediction mode information includes:
constructing a motion information candidate list, wherein the motion information candidate list comprises at least one candidate motion information; selecting one candidate motion information from the motion information candidate list as target motion information of the first sub-block;
acquiring a target intra-frame sub-prediction mode of the second sub-block;
acquiring a target predicted value corresponding to the first region block according to the target motion information;
acquiring a target predicted value corresponding to the second region block according to the target intra-frame sub-prediction mode;
Acquiring a first predicted value corresponding to the third region block according to the target motion information, acquiring a second predicted value corresponding to the third region block according to the target intra-frame sub-prediction mode, and carrying out weighting processing on the first predicted value and the second predicted value to obtain a target predicted value corresponding to the third region block;
wherein the first sub-block is one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks; the second sub-block is one of the following sub-blocks: triangle sub-blocks, trapezoid sub-blocks, pentagon sub-blocks.
CN201910668356.5A 2019-07-23 2019-07-23 Encoding and decoding method, device and equipment thereof Active CN112291558B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202310489496.2A CN116405697A (en) 2019-07-23 2019-07-23 Encoding and decoding method, device and equipment thereof
CN201910668356.5A CN112291558B (en) 2019-07-23 2019-07-23 Encoding and decoding method, device and equipment thereof
PCT/CN2020/103326 WO2021013153A1 (en) 2019-07-23 2020-07-21 Encoding and decoding method and device and apparatus therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910668356.5A CN112291558B (en) 2019-07-23 2019-07-23 Encoding and decoding method, device and equipment thereof

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202310489496.2A Division CN116405697A (en) 2019-07-23 2019-07-23 Encoding and decoding method, device and equipment thereof

Publications (2)

Publication Number Publication Date
CN112291558A CN112291558A (en) 2021-01-29
CN112291558B true CN112291558B (en) 2023-06-27

Family

ID=74192832

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202310489496.2A Pending CN116405697A (en) 2019-07-23 2019-07-23 Encoding and decoding method, device and equipment thereof
CN201910668356.5A Active CN112291558B (en) 2019-07-23 2019-07-23 Encoding and decoding method, device and equipment thereof

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202310489496.2A Pending CN116405697A (en) 2019-07-23 2019-07-23 Encoding and decoding method, device and equipment thereof

Country Status (2)

Country Link
CN (2) CN116405697A (en)
WO (1) WO2021013153A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002463B (en) * 2022-07-15 2023-01-13 深圳传音控股股份有限公司 Image processing method, intelligent terminal and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070027236A (en) * 2005-09-06 2007-03-09 삼성전자주식회사 Method and apparatus for intra prediction of video
CN101415121A (en) * 2007-10-15 2009-04-22 华为技术有限公司 Self-adapting method and apparatus for forecasting frame
CN102907100A (en) * 2010-05-17 2013-01-30 Sk电信有限公司 Image coding/decoding device using coding block in which intra block and inter block are mixed, and method thereof
WO2015133866A1 (en) * 2014-03-06 2015-09-11 삼성전자 주식회사 Inter-layer video decoding method and apparatus therefor performing sub-block-based prediction, and inter-layer video encoding method and apparatus therefor performing sub-block-based prediction
WO2018026118A1 (en) * 2016-08-01 2018-02-08 한국전자통신연구원 Image encoding/decoding method
CN109862369A (en) * 2018-12-28 2019-06-07 杭州海康威视数字技术股份有限公司 A kind of decoding method and its equipment

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100716999B1 (en) * 2005-06-03 2007-05-10 삼성전자주식회사 Method for intra prediction using the symmetry of video, method and apparatus for encoding and decoding video using the same
KR20100095992A (en) * 2009-02-23 2010-09-01 한국과학기술원 Method for encoding partitioned block in video encoding, method for decoding partitioned block in video decoding and recording medium implementing the same
JP6187826B2 (en) * 2014-02-04 2017-08-30 パナソニックIpマネジメント株式会社 Moving picture coding apparatus and moving picture coding method
US11876999B2 (en) * 2016-07-05 2024-01-16 Kt Corporation Method and apparatus for processing video signal
CN117041569A (en) * 2016-11-29 2023-11-10 韩国电子通信研究院 Image encoding/decoding method and recording medium for storing bit stream
KR102549178B1 (en) * 2016-12-07 2023-06-29 주식회사 케이티 Method and apparatus for processing a video signal
US10757420B2 (en) * 2017-06-23 2020-08-25 Qualcomm Incorporated Combination of inter-prediction and intra-prediction in video coding
US20190014325A1 (en) * 2017-07-05 2019-01-10 Industrial Technology Research Institute Video encoding method, video decoding method, video encoder and video decoder
US10567772B2 (en) * 2017-07-11 2020-02-18 Google Llc Sub8×8 block processing
EP3484148A1 (en) * 2017-11-09 2019-05-15 Thomson Licensing Automated scanning order for sub-divided blocks
WO2019098758A1 (en) * 2017-11-16 2019-05-23 한국전자통신연구원 Image encoding/decoding method and device, and recording medium storing bitstream

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070027236A (en) * 2005-09-06 2007-03-09 삼성전자주식회사 Method and apparatus for intra prediction of video
CN101415121A (en) * 2007-10-15 2009-04-22 华为技术有限公司 Self-adapting method and apparatus for forecasting frame
CN102907100A (en) * 2010-05-17 2013-01-30 Sk电信有限公司 Image coding/decoding device using coding block in which intra block and inter block are mixed, and method thereof
WO2015133866A1 (en) * 2014-03-06 2015-09-11 삼성전자 주식회사 Inter-layer video decoding method and apparatus therefor performing sub-block-based prediction, and inter-layer video encoding method and apparatus therefor performing sub-block-based prediction
WO2018026118A1 (en) * 2016-08-01 2018-02-08 한국전자통신연구원 Image encoding/decoding method
CN109862369A (en) * 2018-12-28 2019-06-07 杭州海康威视数字技术股份有限公司 A kind of decoding method and its equipment

Also Published As

Publication number Publication date
CN112291558A (en) 2021-01-29
CN116405697A (en) 2023-07-07
WO2021013153A1 (en) 2021-01-28

Similar Documents

Publication Publication Date Title
CN111385569B (en) Coding and decoding method and equipment thereof
CN112565781B (en) Coding and decoding method and equipment thereof
CN113794878B (en) Encoding and decoding method, device and equipment
CN113055684B (en) Encoding and decoding method, device and equipment
CN112291558B (en) Encoding and decoding method, device and equipment thereof
CN112449181B (en) Encoding and decoding method, device and equipment
CN113794883B (en) Encoding and decoding method, device and equipment
CN112055220B (en) Encoding and decoding method, device and equipment

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
GR01 Patent grant
GR01 Patent grant