Video codec methods, apparatus, computer programs, and electronic devices.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2023-05-25
- Publication Date
- 2026-06-17
Smart Images

Figure 0007875303000001 
Figure 0007875303000002 
Figure 0007875303000003
Abstract
Claims
1. A video decoding method performed by a video decoding device, The steps include: obtaining correction value instruction information when decoding from a video code stream and using template-based in-frame mode derivation (TIMD); A step of obtaining the candidate prediction mode for the current block derived based on TIMD, The steps include: modifying the candidate prediction mode using the correction value indicated by the correction value instruction information to obtain the corrected TIMD prediction mode; A video decoding method comprising the step of performing a decoding operation on the current block based on the modified TIMD prediction mode.
2. The correction value instruction information includes a first flag bit for indicating whether to use a correction value to modify the candidate prediction mode for the current block, and a correction value instruction flag bit. The step of decoding from the video code stream to obtain correction value instruction information when using template-based in-frame mode derivation (TIMD) is: The method is characterized by including the step of decoding the modification value indicator flag bit and obtaining the modification value if the value of the first flag bit obtained by decoding from the video code stream indicates that a modification value should be used to modify the candidate prediction mode for the current block. The video decoding method according to claim 1.
3. The correction value instruction flag bit includes a second flag bit and at least one third flag bit, The value of the second flag bit is used to indicate the sign of the modified value, and the at least one third flag bit is used to indicate the absolute value of the modified value. The video decoding method according to claim 2.
4. The value of each third flag bit is used to indicate whether the absolute value of the correction value corresponds to a value in the set of numerical values, characterized in that The video decoding method according to claim 3.
5. The values of at least one third flag bit are cooperative and used to indicate that a value of the corresponding level is selected from the set of set numbers as the absolute value of the modification value, characterized in that The video decoding method according to claim 3.
6. The correction value instruction flag bit includes correction value index information, and the correction value index information is used to indicate that a corresponding value is selected as the correction value from a set of set values. The video decoding method according to claim 2.
7. If the modified TIMD prediction mode is not within the set of TIMD prediction angle modes, the further step includes adjusting the modified TIMD prediction mode based on the candidate prediction mode and the modified value so that it is within the set of TIMD prediction angle modes. The video decoding method according to claim 1.
8. The step of adjusting the modified TIMD prediction mode based on the candidate prediction mode and the modified value so that it falls within the set of TIMD prediction angle modes is: If the correction value is a positive number, the process includes the steps of calculating the difference between the sum of the candidate prediction mode and the correction value and the first setting value, calculating the remainder between the difference and the second setting value, and determining the adjusted TIMD prediction mode based on the remainder, wherein the first setting value is a positive integer and the second setting value is determined based on the maximum value of the TIMD prediction angle mode. The video decoding method according to claim 7.
9. The step of adjusting the modified TIMD prediction mode based on the candidate prediction mode and the modified value so that it falls within the set of TIMD prediction angle modes is: If the correction value is a negative number, the step includes calculating the sum of the difference between the candidate prediction mode and the correction value and the third setting value, calculating the remainder between the sum and the second setting value, and determining the adjusted TIMD prediction mode based on the remainder, wherein the third setting value and the second setting value are determined based on the maximum value of the TIMD prediction angle mode. The video decoding method according to claim 7.
10. The step of modifying the candidate prediction mode using the modified value indicated by the modified value instruction information and obtaining the modified TIMD prediction mode is as follows: If the candidate prediction mode is the target prediction mode, the method includes the step of setting a predefined prediction mode corresponding to the correction value to the corrected TIMD prediction mode based on the correction value. The video decoding method according to claim 1.
11. When the candidate prediction mode of the current block derived based on TIMD includes multiple candidate prediction modes, the set of correction values corresponding to each of the multiple candidate prediction modes is different, and the correction value is determined from the set of correction values based on the correction value instruction information. The video decoding method according to claim 1.
12. The method further includes the step of determining a set of correction values corresponding to the candidate prediction mode based on at least one of the following: the candidate prediction mode of the current block derived based on TIMD, the size of the current block, the most probable mode MPM set, the candidate prediction mode derived based on the decoding-side in-frame mode derivation (DIMD), and the magnitude of the TIMD cost, wherein the correction value is determined from the set of correction values based on the correction value instruction information. The video decoding method according to claim 1.
13. The modified TIMD prediction mode is as follows: It is characterized by being different from at least one of the following: a candidate prediction mode derived based on TIMD, a prediction mode within the MPM set, a prediction mode within the non-MPM set, a candidate prediction mode derived based on DIMD, and a prediction mode obtained by modifying a candidate prediction mode derived based on DIMD. The video decoding method according to claim 1.
14. The step of modifying the candidate prediction mode using the modified value indicated by the modified value instruction information and obtaining the modified TIMD prediction mode is as follows: The process includes the step of correcting the first candidate prediction mode derived based on TIMD using the correction value indicated by the correction value instruction information, and obtaining the corrected first prediction mode. The step of performing a decoding operation on the current block based on the modified TIMD prediction mode is: The method is characterized by including the step of either setting the predicted value of the modified first prediction mode for the current block as the predicted value of the current block, or fusing the predicted value of the modified first prediction mode for the current block and the predicted value of the set prediction mode for the current block to obtain the predicted value of the current block. The video decoding method according to claim 1.
15. The aforementioned setting prediction mode is, The prediction mode includes at least one of the following: a non-angle prediction mode, a second candidate prediction mode derived based on TIMD, and a prediction mode obtained by modifying the second candidate prediction mode derived based on TIMD. The second candidate prediction mode is characterized by using the same or different correction values as the first candidate prediction mode to modify the second candidate prediction mode. The video decoding method according to claim 14.
16. The step of fusing the predicted value of the modified first prediction mode for the current block with the predicted value of the set prediction mode for the current block to obtain the predicted value of the current block is: The method is characterized by including a step of obtaining a predicted value for the current block by performing weighted addition on the predicted value of the modified first prediction mode and the predicted value of the set prediction mode for the current block according to predetermined weight values. The video decoding method according to claim 14.
17. The current block candidate prediction mode derived based on TIMD, Current block size, The absolute value of the conversion residual and the SATD cost between the first prediction mode before correction and the set prediction mode before correction, and The absolute value of the conversion residual and the SATD cost between the corrected first prediction mode and the corrected set prediction mode. The method further includes the step of determining the predetermined weight value based on at least one of the following. The video decoding method according to claim 16.
18. When TIMD performs decoding in cooperation with other modes, the sets of correction values corresponding to different other modes are either the same or different, and the correction values are determined from the set of correction values based on the correction value instruction information. The video decoding method according to claim 1.
19. The aforementioned other modes include multi-reference line MRL mode, and the video decoding method further includes, The step includes performing a modification process on the TIMD candidate prediction mode for some or all of the reference lines of the MRL mode, Each reference line in the MRL mode corresponds to a different set of correction values, or multiple reference lines in the MRL mode correspond to the same set of correction values. The video decoding method according to claim 18.
20. The aforementioned video decoding method further, The steps include obtaining a designated flag bit by decoding from the grammar elements of the video code stream, and determining whether the current block needs to be modified based on the designated flag bit, The grammatical element is characterized by including at least one of a sequence parameter set (SPS), an image parameter set (PPS), a flag bit in the image header, and a flag bit in the slice header. The video decoding method according to claim 1.
21. A video encoding method performed by a video encoding device, A step of obtaining the candidate prediction mode for the current block derived based on TIMD, If it is necessary to perform a correction process on the current candidate prediction mode of the block, the steps include determining a correction value for the candidate prediction mode based on the rate distortion cost, The steps include generating correction value instruction information based on the aforementioned correction value, A video encoding method comprising the step of adding the aforementioned correction value instruction information to a video code stream.
22. A video decoding device, A decoding unit configured to decode from a video code stream and obtain correction value instruction information when using template-based in-frame mode derivation (TIMD), An acquisition unit configured to acquire the candidate prediction mode of the current block derived based on TIMD, A correction unit is configured to correct the candidate prediction mode using the correction value indicated by the correction value instruction information, and to obtain the corrected TIMD prediction mode. A video decoding device comprising a processing unit configured to perform decoding on the current block based on the modified TIMD prediction mode.
23. A video encoding device, An acquisition unit configured to acquire the candidate prediction mode of the current block derived based on TIMD, When it is determined that a correction process is necessary for the candidate prediction mode of the current block, a decision unit is configured to determine a correction value for the candidate prediction mode based on the rate distortion cost, A generation unit configured to generate correction value instruction information based on the aforementioned correction value, A video encoding apparatus comprising an additional unit configured to add the aforementioned correction value instruction information to a video code stream.
24. It is an electronic device, One or more processors, An electronic device comprising memory for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device implements the video decoding method according to any one of claims 1 to 20, or the video encoding method according to claim 21.
25. A computer program that causes an electronic device to perform the video decoding method described in any one of claims 1 to 20, or to implement the video encoding method described in claim 21.
26. A storage medium storing the computer program described in Claim 25.