CN111669581B - Video coding method and related device - Google Patents

Video coding method and related device Download PDF

Info

Publication number
CN111669581B
CN111669581B CN202010532032.1A CN202010532032A CN111669581B CN 111669581 B CN111669581 B CN 111669581B CN 202010532032 A CN202010532032 A CN 202010532032A CN 111669581 B CN111669581 B CN 111669581B
Authority
CN
China
Prior art keywords
block
current
prediction
current chroma
mode
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
CN202010532032.1A
Other languages
Chinese (zh)
Other versions
CN111669581A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Publication of CN111669581A publication Critical patent/CN111669581A/en
Application granted granted Critical
Publication of CN111669581B publication Critical patent/CN111669581B/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/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/186Methods 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 a colour or a chrominance component
    • 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/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/573Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Landscapes

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

Abstract

The application provides a video coding method and a related device thereof. The video encoding method includes: predicting the current chroma block according to the optimal prediction mode of a brightness sub-block in a brightness block corresponding to the current chroma block to obtain a prediction block of the current chroma block; the current chroma block is encoded based on a prediction block of the current chroma block. The method and the device can enable the current chroma block to have the possibility of prediction in the IBC mode no matter how small the size is when the minimum size limiting condition of the chroma block is met.

Description

Video coding method and related device
Technical Field
The present application relates to the field of coding technologies, and in particular, to a video coding method and a related apparatus.
Background
Because the video image data volume is large, it is usually necessary to encode and compress the video image data, the compressed data is called video code stream, and the video code stream is transmitted to the user end through a wired or wireless network and then decoded and viewed.
The whole video coding flow comprises the processes of prediction, transformation, quantization, coding and the like. Currently, an Intra Block Copy (IBC) mode is not used for small-sized chroma blocks, but an Intra prediction mode or an inter prediction mode is used.
Disclosure of Invention
The application provides a video coding method and a related device thereof, which are used for solving the problem that the prediction accuracy is influenced because an IBC mode is not adopted for a small-size chroma block.
To solve the above problem, the present application provides a video encoding method, including:
predicting the current chroma block according to the optimal prediction mode of a brightness sub-block in a brightness block corresponding to the current chroma block to obtain a prediction block of the current chroma block;
the current chroma block is encoded based on a prediction block of the current chroma block.
The predicting the current chroma block according to the best prediction mode of the brightness sub-block in the brightness block corresponding to the current chroma block comprises the following steps:
and determining that the best prediction mode of at least one luminance sub-block in the luminance block corresponding to the current chrominance block is an IBC mode, and predicting the current chrominance block by using the IBC mode.
The method for predicting the current chroma block by the IBC mode includes the following steps:
and scanning all the brightness sub-blocks in the brightness block corresponding to the current chroma block according to a preset sequence until the brightness sub-blocks predicted by adopting the IBC mode are scanned, and predicting the current chroma block by adopting the IBC mode.
The method for predicting the current chroma block by the best prediction mode of the scanned luma subblock predicted by adopting the IBC mode comprises the following steps:
and IBC mode prediction is carried out on the current chroma block based on the scanned block vector of the brightness subblock coded by the IBC mode.
Wherein, the method further comprises:
calculating a cost value for predicting the current chroma block by adopting each prediction mode except the IBC mode;
encoding a current chroma block based on a prediction block of the current chroma block, comprising: calculating a cost value for predicting the current chroma block by adopting an IBC mode based on a prediction block of the current chroma block;
taking the prediction mode with the minimum cost value as the optimal prediction mode of the current chroma block;
the current chroma block is prediction-coded in the best prediction mode.
The predicting the current chroma block according to the best prediction mode of the brightness sub-block in the brightness block corresponding to the current chroma block comprises the following steps:
and predicting the current chroma block by adopting the optimal prediction mode of the brightness sub-block at the preset position in the brightness block corresponding to the current chroma block.
The method for predicting the current chrominance block by adopting the optimal prediction mode of the luminance sub-block at the preset position in the luminance block corresponding to the current block comprises the following steps:
and when the best prediction mode of the luminance sub-block at the preset position is the IBC mode, carrying out IBC mode prediction on the current chrominance block based on the block vector of the luminance sub-block at the preset position.
And the side length of at least one brightness sub-block in all brightness sub-blocks in the brightness block corresponding to the current chroma block is less than or equal to 4.
Wherein, the method further comprises: encoding the current luminance block;
wherein, the current chroma block and the current luma block are both referred to as a current block, and the encoding of the current block includes: when the residual block of the current block is the difference value between the original block of the current block and the prediction block obtained by IBC mode prediction of the current block, and the number of effective block prediction vectors in the block prediction vector candidate list of the current block is less than or equal to 1, the index of the block prediction vector of the current block is not coded.
When the number of valid block prediction vectors in the block prediction vector candidate list of the current block is less than or equal to 1, the method does not encode the index of the block prediction vector of the current block, and comprises the following steps:
and judging whether the number of the effective block prediction vectors in the block prediction vector candidate list of the current frame is more than 1 by using the identification.
Wherein, the method further comprises: encoding the current luminance block;
wherein, the current chroma block and the current luma block are both referred to as a current block, and the encoding of the current block includes: and when the residual block of the current block is the difference value of the original block of the current block and the prediction block obtained by IBC mode prediction of the current block, and when the x component and the y component of the block vector difference are both 0, the x component and the y component of the block vector difference of the current block are not coded.
Wherein, when both the x-component and the y-component of the block vector difference are 0, the x-component and the y-component of the block vector difference of the current block are not encoded, and previously including:
a first syntax element is added to the encoding result of the current block to indicate whether the block vector difference x component and y component of the current block are both equal to 0.
To solve the above problems, the present application provides a codec including a memory and a processor; the memory has stored therein a computer program for execution by the processor to perform the steps of the above method.
To solve the above problem, the present application provides a readable storage medium on which a computer program is stored, the computer program implementing the steps of the above method when executed by a processor.
The method comprises the following steps: the best prediction mode of the luminance sub-block in the luminance block corresponding to the current chrominance block is used for predicting the current chrominance block, because the best prediction mode of the luminance sub-block in the luminance block corresponding to the current chrominance block can be used for IBC mode prediction no matter how small the size of the luminance block is under the limiting condition of meeting the minimum size of the luminance block, the best prediction mode of the luminance sub-block in the luminance block corresponding to the current chrominance block is used for predicting the current chrominance block, the IBC mode is used for predicting the current chrominance block no matter how small the size is when the limiting condition of meeting the minimum size of the chrominance block, and the problem that the prediction accuracy is influenced because the IBC mode is not adopted for the small-size chrominance block is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic diagram of a chroma block and luma block partitioning method according to the present invention;
FIG. 2 is a schematic diagram of rule IV in the video encoding method of the present application;
FIG. 3 is a schematic flow chart of a first embodiment of the video encoding method of the present application;
FIG. 4 is a flowchart illustrating a second embodiment of the video encoding method of the present application;
FIG. 5 is a diagram of a partition method of luminance blocks and an optimal prediction mode of the luminance sub-blocks in the video coding method of the present application;
FIG. 6 is a flow chart of a third embodiment of the video encoding method of the present application;
FIG. 7 is a diagram illustrating the left, upper left, upper right, and lower left positions of a current block in the video encoding method of the present application;
FIG. 8 is a schematic diagram of a video coding method identification of the present application;
FIG. 9 is a diagram of a first syntax element of the video coding method of the present application;
FIG. 10 is a schematic diagram of the structure of the codec of the present application;
FIG. 11 is a schematic structural diagram of an embodiment of a storage medium readable by the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present application, the video encoding method and related apparatus provided in the present application are described in further detail below with reference to the accompanying drawings and the detailed description.
IBC techniques are generally applied to blocks having a width and height less than or equal to 16.
For a relatively large block that meets the above block size condition, the same partition and prediction mode are used for the luma block and its corresponding chroma block. After the relatively large block which meets the block size condition is divided once or for multiple times, a plurality of relatively small blocks are obtained. If a relatively small luminance block is divided by a certain dividing method corresponding to the luminance block to obtain a luminance sub-block with the side length less than or equal to 4, the relatively small luminance block can be continuously divided, the luminance sub-block in the relatively small luminance block can be predicted by adopting an IBC (inter-band coding) technology, but a chrominance block corresponding to the relatively small luminance block is not divided any more, a chrominance block corresponding to the relatively small luminance block is not predicted and coded by adopting an IBC mode, and a chrominance block corresponding to the relatively small luminance block is predicted and coded by adopting an intra-frame prediction mode or an inter-frame prediction method. And in the coding sequence, all the division modes and prediction modes in the relatively small luminance block are traversed, and the chrominance block is predicted after the optimal division mode and prediction mode are selected.
The specific rule for no longer dividing the chroma blocks is as follows:
I. when the width of the luminance block is 8 and a quadtree partitioning (QT, SPLIT _ QUAD) mode is subsequently adopted, the chrominance blocks are not partitioned;
II. When the width of the luminance block is 8 or the height of the luminance block is 16 and a quadtree horizontal division (SPLIT _ EQT _ HOR) mode is subsequently adopted, the chrominance blocks are not divided any more;
III, when the width of the brightness block is 16 or the height of the brightness block is 8 and a quadtree vertical division (SPLIT _ EQT _ VER) mode is adopted subsequently, the chroma block is not divided any more;
IV, when the height of the brightness block is 8 and a binary tree horizontal partitioning (SPLIT _ BI _ HOR) mode is adopted subsequently, the chroma block is not partitioned any more;
v, when the width of the brightness block is 8 and a binary tree vertical division (SPLIT _ BI _ VER) mode is adopted subsequently, the chroma block is not divided any more;
the above-mentioned various division modes are shown in fig. 1, and from left to right: quadtree partitioning (SPLIT _ QUAD), binary tree vertical partitioning (SPLIT _ BI _ VER), binary tree horizontal partitioning (SPLIT _ BI _ HOR), quadtree vertical partitioning (SPLIT _ EQT _ VER), quadtree horizontal partitioning (SPLIT _ EQT _ HOR).
A chrominance block satisfying the above-described 5 rules may be referred to as a chrominance block that cannot be divided together with a corresponding luminance block. For ease of understanding, the above rule IV is described below in a specific embodiment.
Example 1
In rule IV, let the size of the current coding block be 16 × 8, then the size of the current luma block is also 16 × 8, and the sizes of both chroma blocks are 8*4. And next, the current luminance block is subjected to binary tree horizontal division, the luminance block is divided into two 16 × 4 blocks, and for the two 16 × 4 blocks, the traversal is continued by using various division modes and prediction modes until the optimal division mode and prediction mode are selected. The specific division is shown in fig. 2. But the two 8*4 chroma blocks are not partitioned and are not predicted in IBC mode.
Further, in order to solve the problem that prediction accuracy is affected by the fact that an IBC mode is not adopted to predict a relatively small chroma block, the present application proposes a scheme for predicting a current chroma block by using an optimal prediction mode of a luma sub-block in a luma block corresponding to the current chroma block. The scheme for predicting the current chroma block according to the best prediction mode of the luma sub-block in the luma block corresponding to the current chroma block is described in the following embodiments of the video encoding method.
Referring to fig. 3 in detail, fig. 3 is a flowchart illustrating a video encoding method according to a first embodiment of the present application. The video encoding method of the present embodiment includes the following steps.
S101: and predicting the current chroma block according to the optimal prediction mode of the brightness sub-block in the brightness block corresponding to the current chroma block to obtain a prediction block of the current chroma block.
It is to be understood that the current chroma block is an image block that is currently to be encoded.
In an implementation, the current chroma block may be predicted in the best prediction mode of any luma sub-block in the luma block corresponding to the current chroma block.
In another implementation, the current chroma block may be predicted in a best prediction mode of a luma sub-block at a preset position in a luma block corresponding to the current chroma block.
In another implementation, when the best prediction mode of one luma sub-block in a luma block corresponding to a current chroma block is an IBC mode, the IBC mode may be used to predict the current chroma block.
In yet another implementation, the current chroma block may be predicted in a mode of predicting a maximum number of luma sub-blocks in a luma block corresponding to the current chroma block. For example, the luma block corresponding to the current chroma block is divided into 6 luma sub-blocks, wherein the best prediction mode of 2 luma sub-blocks is an intra prediction mode, the best prediction mode of 3 luma sub-blocks is an IBC prediction mode, the best prediction mode of 1 luma sub-block is an inter prediction mode, and the mode for predicting the maximum luma sub-blocks in the luma block corresponding to the current chroma block is the IBC prediction mode, i.e., the current chroma block is predicted in the IBC prediction mode.
The luminance sub-blocks may be smaller than the current luminance block, i.e., the luminance block corresponding to the current chrominance block may be divided into a plurality of luminance sub-blocks. In addition, in other implementation manners, the size of the luminance sub-block may also be equal to that of the current luminance block, that is, the luminance block corresponding to the current chrominance block is not divided, and the luminance block corresponding to the current chrominance block is directly used as the luminance sub-block in the luminance block corresponding to the current chrominance block.
S102: the current chroma block is encoded based on a prediction block of the current chroma block.
In an implementation, the step of encoding the current chroma block based on the prediction block of the current chroma block may include: and calculating the difference value of the original block and the prediction block of the current chroma block to obtain the residual block of the current chroma block, and coding the residual block of the current chroma block.
In another implementation, the encoding the current chroma block based on a prediction block of the current chroma block may include: calculating a cost value with a prediction block of a current chroma block; and calculating cost values of predicting the current chroma block by other prediction modes, taking the prediction mode with the minimum cost value as the optimal prediction mode of the current chroma block, and performing predictive coding on the current chroma block by the optimal prediction mode of the current chroma block.
In this embodiment, the current chroma block is predicted in the best prediction mode of the luma sub-block in the luma block corresponding to the current chroma block, because the luma block can be predicted in the IBC mode no matter how small the size of the luma block is, under the condition that the limit condition of the minimum size of the luma block is satisfied, so that the best prediction mode of the luma sub-block in the luma block corresponding to the current chroma block is used to predict the current chroma block, and the current chroma block has the possibility of being predicted in the IBC mode no matter how small the size of the luma sub-block is, under the condition that the limit condition of the minimum size of the chroma block is satisfied.
Referring to fig. 4, fig. 4 is a flowchart illustrating a video encoding method according to a second embodiment of the present application. The video encoding method of the present embodiment includes the following steps.
S201: and determining that the best prediction mode of one luminance sub-block exists in the luminance block corresponding to the current chrominance block as an IBC mode, and predicting the current chrominance block by using the IBC mode.
In one implementation, step S201 may include: and scanning all the brightness sub-blocks in the brightness block corresponding to the current chrominance block according to a preset sequence until the brightness sub-blocks predicted by adopting the IBC mode are scanned, and predicting the current chrominance block by adopting the IBC mode. The predetermined sequence may be a coding sequence or a reverse order of the coding sequence, but is not limited thereto. In addition, IBC mode prediction may be performed on the current chroma block based on the scanned block vector of the luma subblock encoded in IBC mode.
For example, if the optimal partition method finally selected by the luma block corresponding to the current chroma block and the optimal prediction mode of each luma sub-block are as shown in fig. 5, if the preset order is the reverse order of the coding order, and if the coding order of the luma blocks is from top to bottom and from left to right (i.e., blocks 1 to 5), all luma sub-blocks in the luma blocks are scanned in the order from block 5 to block 1 until a luma sub-block 2 that is predicted in the IBC mode is scanned, and the IBC mode prediction is performed on the current chroma block based on the block vector of block 2.
The block vector refers to an offset vector between a matching block corresponding to the current chroma block and the current chroma block. In addition, a matching block of the current chroma block is searched for from an area consisting of coded blocks before the current chroma block according to the current chroma block. The matching block of the current chrominance block is the same or very similar block as the current chrominance block.
In another implementation, step S201 may include: and when the number is larger than 0, determining that the best prediction mode of one brightness sub-block exists in the brightness block corresponding to the current chroma block as the IBC mode, and performing IBC mode prediction on the current chroma block by using the block vector of any brightness sub-block adopting the IBC mode in the brightness block corresponding to the current chroma block.
Alternatively, the current chrominance block may be a chrominance block that cannot be divided together with the corresponding luminance block.
S202: the current chroma block is encoded based on a prediction block of the current chroma block.
In one implementation, step S202 may include: and calculating the difference value of the original block and the prediction block of the current chroma block to obtain the residual block of the current chroma block, and coding the residual block of the current chroma block.
In another implementation, step S202 may include: calculating a cost value for predicting the current chroma block by adopting an IBC mode based on a prediction block of the current chroma block; confirming a cost value for predicting the current chroma block by adopting each prediction mode except the IBC mode; and taking the prediction mode with the minimum cost value as the optimal prediction mode of the current chroma block, and performing predictive coding on the current chroma block by using the optimal prediction mode of the current chroma block. It is understood that each prediction mode other than the IBC mode may include an intra prediction mode and an inter prediction mode.
It is understood that, when the current chroma block is encoded according to the second embodiment, a second syntax element may be added to the encoding result of the current chroma block to indicate that the current chroma block is still encoded in the IBC mode when the current chroma block is a chroma block that cannot be divided together with a corresponding luma block.
Referring to fig. 6, fig. 6 is a flowchart illustrating a video encoding method according to a third embodiment of the present application. The video encoding method of the present embodiment includes the following steps.
S301: and predicting the current chroma block by adopting the optimal prediction mode of the brightness sub-block at the preset position in the brightness block corresponding to the current chroma block.
It is understood that the preset position refers to any fixed position such as the upper right corner, the upper left corner, the center, the lower left corner, or the lower right corner of the luminance block corresponding to the current chrominance block.
For example, if the luminance sub-block at the preset position is the luminance sub-block at the lower right corner of the luminance block corresponding to the current chrominance block, for example, the best prediction mode of the luminance sub-block at the lower right corner is the IBC mode, the current chrominance block uses the IBC mode; if the best prediction mode of the lower right-corner luminance sub-block is the traditional intra-frame prediction mode, the current chrominance block uses the traditional intra-frame prediction mode; if the best prediction mode of the bottom-right luma subblock is the conventional inter prediction mode, the current chroma block is in the conventional inter prediction mode.
Alternatively, when the best prediction mode of the luma sub-block at the preset position is the IBC mode, the IBC mode prediction may be directly performed on the current chroma block based on the block vector of the luma sub-block at the preset position.
S302: the current chroma block is encoded based on a prediction block of the current chroma block.
Step S302 may include: and calculating the difference value of the original block and the prediction block of the current chroma block to obtain the residual block of the current chroma block, and coding the residual block of the current chroma block.
Further, the three video coding embodiments described above allow relatively small chroma blocks to be predicted using the IBC prediction mode.
It is to be understood that the block predictor candidate list for the current block is a list constructed based on block vectors of blocks for which the current block has been previously prediction encoded in IBC mode. All BVPs in the BVP candidate list are from the HBVP (historical block prediction vector) list. When the block prediction vector candidate list is constructed, all BVs in the HBVP list are traversed, and when the BVs of the same type exist, the BVs appearing later replace the BVs of the same type in the front and are stored in the BVP candidate list. Next, an array Bvp _ cands is used to represent the BVP candidate list, and 0-6 are the index indices of the corresponding position BVP.
Bvp _ cans [0] holds the BV of the block with width x height >32 in the HBVP list;
bvp _ cands [1] stores BV with same BV in HBVP list occurring more than 2 times;
bvp _ cands [2] stores BV of the block on the left side of the current block in the HBVP list;
bvp _ cands [3] stores BV of the block located at the upper side of the current block in the HBVP list;
bvp _ cans [4] holds the BV of the block in the HBVP list that is located at the top left of the current block;
bvp _ cands [5] stores BV of the block on the top right of the current block in the HBVP list;
bvp _ cans [6] stores BV of the block in HBVP list located at the bottom left of the current block;
the above-mentioned left, upper left, upper right, lower left positions and the positional relationship of the current block are shown in FIG. 7.
BV meeting the above condition may or may not exist, so the BV numbers filled in the BVP candidate list may also be different, and a flag cnt _ hbvp _ cands is actually used to represent the number of valid BV filled in the BVP candidate list, i.e. to represent the number of valid BVPs filled in the BVP candidate list. Wherein, the effective BVP refers to a BVP in which at least one of the x component and the y component is not equal to zero.
In addition, the Block Vector Difference (BVD) refers to a Difference value between the offset Vector of the current Block and a BVP selected from the BVP candidate list.
In addition, when the current luma block or the current chroma block ("both current chroma block" and "current luma block" may be referred to as current block) is prediction-encoded using the IBC prediction mode, there may be a case where the number of valid block prediction vectors in the block prediction vector list of the current block is 1 or 0, but an index of the block prediction vector needs to be encoded. In order to avoid the above situation, when the current block is encoded, if the number of the effective block prediction vectors in the block prediction vector list of the current block is less than or equal to 1, the index of the block prediction vector of the current block is not encoded, and encoding bits are saved. Further, it may be determined whether the number of valid block prediction vectors in the block prediction vector list of the current block is greater than 1 using the flag before the step of not encoding the index of the block prediction vector of the current block if the number of valid block prediction vectors in the block prediction vector list of the current block is less than or equal to 1. It is to be understood that the identification may be a judgment identification. The flag may be specifically a flag for determining whether the number of valid block prediction vectors in the block prediction vector list of the current block is greater than 1, and may be represented as "if (cnt _ hbvp _ cands > 1)" as shown in fig. 8. The judgment flag may be changed from an existing flag cnt _ hbvp _ cands, where the existing flag cnt _ hbvp _ cands is used to record the number of valid BVPs in the BVP candidate list.
In addition, when the current block is prediction-encoded by using the IBC prediction mode, there may be a case where the x component and the y component of the BVD of the current block are still required to be encoded when both the x component and the y component are 0. To avoid this, when encoding the current block, if both the x-component and the y-component of the BVD of the current block are 0, the x-component and the y-component of the BVD of the current block are not encoded, so as to save encoding bits. Further, a first syntax element may be added to the encoding result of the current block to indicate whether both the x-component and the y-component of the BVD of the current block are 0, and transmitted to the decoding end to be known by the decoding end. It is to be understood that the first syntax element may be represented as mv _ diff _ x _ y _ bv _ zero as shown by the box selection of the black bold box in fig. 9. Alternatively, mv _ diff _ x _ y _ bv _ zero =1 represents that both the x and y components of the BVD are 0 and mv _ diff _x _y _bv _zero =0 represents that at least one component of the BVD is not 0.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of a codec of the present application. The codec 10 includes a memory 11 and a processor 12 coupled to each other, the memory 11 is used for storing program instructions, and the processor 12 is used for executing the program instructions to implement the method of any of the above embodiments.
The logical processes of the above-described video encoding method are presented as a computer program which, in terms of a computer program, may be stored in a computer storage medium if it is sold or used as a stand-alone software product, and thus the present application proposes a readable storage medium. Referring to fig. 11, fig. 11 is a schematic structural diagram of an embodiment of a readable storage medium 20 of the present application, in which a computer program 21 is stored, and when the computer program 21 is executed by a processor, the steps in the video encoding method are implemented.
The readable storage medium 20 may be a medium that can store a computer program, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or may be a server that stores the computer program, and the server can send the stored computer program to another device for running or can run the stored computer program by itself. The readable storage medium 20 may be a combination of a plurality of entities from a physical point of view, for example, a plurality of servers, a server plus a memory, or a memory plus a removable hard disk.
The above embodiments are merely examples and are not intended to limit the scope of the present disclosure, and all modifications, equivalents, and flow charts using the contents of the specification and drawings of the present disclosure or those directly or indirectly applied to other related technical fields are intended to be included in the scope of the present disclosure.

Claims (14)

1. A method of video encoding, the method comprising:
dividing a luminance block corresponding to a current chrominance block into a plurality of luminance sub-blocks, and determining the best prediction mode of each luminance sub-block;
under the condition that the current chroma block cannot be divided by adopting the same dividing method as the corresponding brightness block according to a dividing rule, predicting the current chroma block by using the optimal prediction mode of a brightness sub-block in the brightness block corresponding to the current chroma block to obtain a prediction block of the current chroma block;
encoding the current chroma block based on a prediction block of the current chroma block.
2. The video coding method of claim 1, wherein the predicting the current chroma block with the best prediction mode of the luma sub-block in the luma block corresponding to the current chroma block comprises:
and determining that the best prediction mode of at least one luminance sub-block in the luminance block corresponding to the current chrominance block is an IBC mode, and predicting the current chrominance block by using the IBC mode.
3. The method of claim 2, wherein the determining that the best prediction mode for at least one luma sub-block in the luma block corresponding to the current chroma block is an IBC mode, and wherein predicting the current chroma block in the IBC mode comprises:
and scanning all the brightness sub-blocks in the brightness block corresponding to the current chroma block according to a preset sequence until the brightness sub-blocks predicted by adopting an IBC mode are scanned, and predicting the current chroma block by adopting the IBC mode.
4. The video coding method of claim 3, wherein predicting the current chroma block with the best prediction mode of the scanned luma sub-blocks predicted in IBC mode comprises:
IBC mode prediction is carried out on the current chroma block based on the scanned block vector of the brightness subblock coded by the IBC mode.
5. The video coding method of claim 2, wherein the method further comprises:
calculating a cost value for predicting the current chroma block by adopting each prediction mode except an IBC mode;
the encoding the current chroma block based on the prediction block of the current chroma block comprises: calculating a cost value for predicting the current chroma block in an IBC mode based on a prediction block of the current chroma block;
taking the prediction mode with the minimum cost value as the optimal prediction mode of the current chroma block;
and performing predictive coding on the current chroma block in the best prediction mode.
6. The video coding method of claim 1, wherein the predicting the current chroma block with the best prediction mode of the luma sub-block in the luma block corresponding to the current chroma block comprises:
and predicting the current chroma block by adopting the optimal prediction mode of the brightness sub-block at the preset position in the brightness block corresponding to the current chroma block.
7. The video coding method of claim 6, wherein the predicting the current chroma block using the best prediction mode of the luma sub-block at a predetermined position in the luma block corresponding to the current block comprises:
and when the best prediction mode of the brightness sub-block at the preset position is an IBC mode, carrying out IBC mode prediction on the current chroma block based on the block vector of the brightness sub-block at the preset position.
8. The video coding method of claim 1, wherein a side length of at least one of the luma sub-blocks in the luma block corresponding to the current chroma block is less than or equal to 4.
9. The video coding method of claim 1, wherein the method further comprises: encoding the current luminance block;
wherein, the current chroma block and the current luma block are both referred to as a current block, and the encoding the current block includes: when the residual block of the current block is the difference value between the original block of the current block and the prediction block obtained by IBC mode prediction of the current block, and the number of the effective block prediction vectors in the block prediction vector candidate list of the current block is less than or equal to 1, the index of the block prediction vector of the current block is not coded.
10. The video coding method of claim 9, wherein when the number of valid block prediction vectors in the candidate list of block prediction vectors of the current block is less than or equal to 1, the method does not encode the index of the block prediction vector of the current block, and comprises:
and judging whether the number of the effective block prediction vectors in the block prediction vector candidate list of the current block is more than 1 by using the identification.
11. The video coding method of claim 1, wherein the method further comprises: encoding the current luminance block;
wherein, the current chroma block and the current luma block are both referred to as a current block, and the encoding the current block includes: and when the residual block of the current block is the difference value of the original block of the current block and the prediction block obtained by IBC mode prediction of the current block, and when the x component and the y component of the block vector difference are both 0, the x component and the y component of the block vector difference of the current block are not coded.
12. The video coding method of claim 11, wherein the not encoding the x-component and the y-component of the block vector difference for the current block when both the x-component and the y-component of the block vector difference are 0, previously comprises:
adding a first syntax element in an encoding result of the current block to indicate whether an x-component and a y-component of a block vector difference of the current block are both equal to 0.
13. A codec, characterized in that the codec comprises a memory and a processor; the memory has stored therein a computer program for execution by the processor to carry out the steps of the method according to any one of claims 1 to 12.
14. A readable storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 12.
CN202010532032.1A 2020-06-09 2020-06-11 Video coding method and related device Active CN111669581B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2020105194051 2020-06-09
CN202010519405 2020-06-09

Publications (2)

Publication Number Publication Date
CN111669581A CN111669581A (en) 2020-09-15
CN111669581B true CN111669581B (en) 2022-12-20

Family

ID=72387177

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010532032.1A Active CN111669581B (en) 2020-06-09 2020-06-11 Video coding method and related device

Country Status (1)

Country Link
CN (1) CN111669581B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107646195A (en) * 2015-06-08 2018-01-30 Vid拓展公司 Intra block replication mode for screen content coding

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017143467A1 (en) * 2016-02-22 2017-08-31 Mediatek Singapore Pte. Ltd. Localized luma mode prediction inheritance for chroma coding
US11012715B2 (en) * 2018-02-08 2021-05-18 Qualcomm Incorporated Intra block copy for video coding
US11509919B2 (en) * 2018-10-17 2022-11-22 Tencent America Reference sample memory size restrictions for intra block copy
CN110719467B (en) * 2019-09-18 2022-04-19 浙江大华技术股份有限公司 Prediction method of chrominance block, encoder and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107646195A (en) * 2015-06-08 2018-01-30 Vid拓展公司 Intra block replication mode for screen content coding

Also Published As

Publication number Publication date
CN111669581A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
TWI520579B (en) Picture coding supporting block partitioning and block merging
TWI774141B (en) Method and apparatus for video conding
US20140205006A1 (en) Super macro block based intra coding method and apparatus
WO2022104498A1 (en) Intra-frame prediction method, encoder, decoder and computer storage medium
US8204136B2 (en) Image encoding apparatus
KR102434319B1 (en) Method and apparatus for encoding or decoding video data in FRUC mode with reduced memory access
US20210203978A1 (en) Merge mode-based inter-prediction method and apparatus
KR20110017783A (en) Method and apparatus for video encoding considering scanning order of coding units with hierarchical structure, and method and apparatus for video decoding considering scanning order of coding units with hierarchical structure
CN110999295B (en) Boundary forced partition improvement
CN113826393B (en) Image encoding/decoding method and apparatus, and recording medium storing bit stream
US20210258601A1 (en) Image encoding/decoding method and apparatus
US20230042640A1 (en) Inter prediction method, encoder, decoder, and storage medium
CN111741297A (en) Inter-frame prediction method, video coding method and related devices thereof
US20230319265A1 (en) Intra prediction method and device, decoder, and encoder
CN117156133B (en) Inter-frame prediction mode selection method and device for video coding
CN111586415B (en) Video coding method, video coding device, video coder and storage device
CN114501019A (en) Partition prediction
CN111669581B (en) Video coding method and related device
CN113365080B (en) Encoding and decoding method, device and storage medium for string coding technology
CN115917611A (en) Method and system for video coding and decoding using reference region
CN114342392A (en) Video signal processing method and apparatus
US11375183B2 (en) Methods and systems for combined lossless and lossy coding
TW202425631A (en) Encoding and decoding method, code stream, encoder, decoder and storage medium
CN118511508A (en) Method, apparatus and medium for video processing
CN111492655A (en) Texture-based partition decision for video compression

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