CN-121985135-A - Video encoding method, method for transmitting and storing bit stream, apparatus, storage medium and program product
Abstract
Embodiments of the present application provide a video encoding method, a method, an apparatus, a storage medium, and a program product for transmitting and storing a bitstream. In the embodiment of the application, a video coding process is optimized, a fast coding decision logic is introduced, after a current coding unit executes rough selection processing of a first prediction mode set, whether carefully selecting processing of the first prediction mode set, searching processing of a second prediction mode set and block dividing processing are skipped or not is judged based on coded information of a reference coding unit and relevant cost information corresponding to the current coding unit, if so, corresponding processing is skipped, and the subsequent flow is directly entered. By performing skip judgment before execution of the corresponding stage, redundant calculation can be effectively avoided, coding complexity is reduced, coding efficiency is improved, and coding cost is saved on the premise of ensuring coding quality.
Inventors
- ZHANG ZONGQIAN
- WANG LIBO
- CHEN YING
Assignees
- 阿里巴巴(深圳)技术有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260109
Claims (17)
- 1. A video encoding method, comprising: Acquiring a current coding unit to be coded in a current video frame, and determining a reference coding unit matched with the current coding unit from coded units of the current video frame; for a current coding unit, performing rough selection processing of a first prediction mode set, wherein the rough selection processing result is used for participating in carefully selecting processing of the first prediction mode set to obtain a first prediction mode; If the selection process is determined to be skipped according to the encoded information of the reference encoding unit and the cost information in the rough selection process, acquiring target cost information corresponding to the first prediction mode set; If the search processing of the second prediction mode set is not skipped according to the coded information of the reference coding unit and the target cost information, executing the search processing of the second prediction mode set to obtain a second prediction mode, and selecting the second prediction mode as a target prediction mode; And if the block division processing for the current coding unit is determined to be skipped according to the coded information of the reference coding unit and the cost information corresponding to the target prediction mode, performing video coding processing on the current coding unit according to the target prediction mode.
- 2. The method as recited in claim 1, further comprising: if the block division processing for the current coding unit is determined not to be skipped according to the coded information of the reference coding unit and the cost information corresponding to the target prediction mode, executing the block division processing, attempting to divide the current coding unit, and determining a target division mode; if the cost information of the target division mode is greater than or equal to the cost information corresponding to the target prediction mode, performing video coding processing on the current coding unit according to the target prediction mode; and if the cost information of the target division mode is smaller than the cost information corresponding to the target prediction mode, performing video coding processing on the sub coding units divided according to the target division mode.
- 3. The method according to claim 1 or 2, further comprising: If the selection process is determined not to be skipped according to the encoded information of the reference encoding unit and the cost information in the rough selection process, executing the selection process to obtain a first prediction mode; if it is determined to skip the search process of the second prediction mode set based on the encoded information of the reference encoding unit and the cost information corresponding to the first prediction mode, taking the first prediction mode as the target prediction mode, and And executing an operation of determining whether to skip block division processing for the current coding unit according to the coded information of the reference coding unit and cost information corresponding to the target prediction mode.
- 4. A method according to claim 3, further comprising: if the search processing of the second prediction mode set is not skipped according to the coded information of the reference coding unit and the cost information corresponding to the first prediction mode, executing the search processing of the second prediction mode set to obtain a second prediction mode; selecting the target prediction mode from the first prediction mode and the second prediction mode, and And executing an operation of determining whether to skip block division processing for the current coding unit according to the coded information of the reference coding unit and cost information corresponding to the target prediction mode.
- 5. The method according to claim 1 or 2 or 4, wherein the first set of prediction modes comprises a first type of inter prediction mode and the second set of prediction modes comprises a second type of inter prediction mode and a plurality of intra prediction modes; The first type of inter prediction mode refers to an inter prediction mode that supports only motion compensation, and the second type of inter prediction mode refers to an inter prediction mode that supports both motion estimation and motion compensation.
- 6. The method of claim 5, wherein the encoded information of the reference coding unit comprises rougher cost information of the reference coding unit, and wherein the method further comprises: determining whether to skip the carefully choosing process according to the encoded information of the reference encoding unit and the cost information in the rough choosing process, specifically: Calculating first reference cost information according to rough selection cost information of the reference coding unit; Determining whether the current coding unit is suitable for a first type of inter-frame prediction mode according to rough selection cost information of each motion vector candidate corresponding to the current coding unit and the first reference cost information; If the current coding unit is determined to be unsuitable for the first type inter prediction mode, determining to skip the carefully chosen processing; if it is determined that the current coding unit is suitable for the first type of inter prediction mode, it is determined that the refinement process is not skipped.
- 7. The method of claim 6, wherein the encoded information of the reference encoding unit further comprises at least one of a prediction mode, a prediction direction, and an angle corresponding to the reference encoding unit; Determining whether the current coding unit is suitable for the first type inter prediction mode according to rough selection cost information of each motion vector candidate corresponding to the current coding unit and the first reference cost information, wherein the method comprises the following steps: and determining whether the current coding unit is suitable for the first type inter prediction mode according to rough selection cost information of each motion vector candidate corresponding to the current coding unit and the first reference cost information and combining the at least one piece of auxiliary information.
- 8. The method of claim 5, wherein the encoded information of the reference coding unit comprises refinement cost information when the reference coding unit selects the first type of inter prediction mode, the method further comprising: determining whether to skip the search processing of the second prediction mode set according to the encoded information of the reference encoding unit and the target cost information, specifically: Determining a target reference coding unit in the reference coding units, wherein the target reference coding unit selects a specific inter-frame prediction mode, and the specific inter-frame prediction mode is one of first-type inter-frame prediction modes; calculating second reference cost information according to the carefully chosen cost information when the target reference coding unit selects a specific inter-frame prediction mode; if the target cost information is smaller than the second reference cost information, determining to skip search processing of a second prediction mode set; And if the target cost information is greater than or equal to the second reference cost information, determining not to skip search processing of the second prediction mode set.
- 9. The method of claim 5, wherein the encoded information of the reference coding unit comprises the reference coding unit encoding corresponding predictive coding cost information, and wherein the method further comprises: Determining whether to skip block division processing for the current coding unit according to the coded information of the reference coding unit and the cost information corresponding to the target prediction mode, specifically: Calculating third reference cost information according to the prediction coding cost information corresponding to the reference coding unit; if the cost information corresponding to the target prediction mode is smaller than the third reference cost information, determining to skip block division processing for the current coding unit; And if the cost information corresponding to the target prediction mode is greater than or equal to the third reference cost information, determining not to skip block division processing for the current coding unit.
- 10. The method according to any of claims 1-2, 4, 6-9, wherein determining a reference coding unit adapted to a current coding unit from coded units of the current video frame comprises: determining a current reference coding block to which a current coding unit belongs; From the current reference coding block and the reference coding blocks located at the left side and above the current reference coding block, coded units having the same size as the current coding unit are respectively determined as the reference coding units.
- 11. A video encoding method, comprising: Acquiring a current coding unit to be coded in a current video frame, and determining a reference coding unit matched with the current coding unit from coded units of the current video frame; for a current coding unit, performing rough selection processing of a first prediction mode set, wherein the rough selection processing result is used for participating in carefully selecting processing of the first prediction mode set to obtain a first prediction mode; If the selection process is determined not to be skipped according to the encoded information of the reference encoding unit and the cost information in the rough selection process, executing the selection process to obtain a first prediction mode; If the search processing of the second prediction mode set is skipped according to the coded information of the reference coding unit and the cost information corresponding to the first prediction mode, selecting the first prediction mode as the target prediction mode; And if the block division processing for the current coding unit is determined to be skipped according to the coded information of the reference coding unit and the cost information corresponding to the target prediction mode, performing video coding processing on the current coding unit according to the target prediction mode.
- 12. A video encoding method, comprising: Acquiring a current coding unit to be coded in a current video frame, and determining a reference coding unit matched with the current coding unit from coded units of the current video frame; for a current coding unit, performing rough selection processing of a first prediction mode set, wherein the rough selection processing result is used for participating in carefully selecting processing of the first prediction mode set to obtain a first prediction mode; If the selection process is determined not to be skipped according to the encoded information of the reference encoding unit and the cost information in the rough selection process, executing the selection process to obtain a first prediction mode; If the search processing of the second prediction mode set is determined not to be skipped according to the coded information of the reference coding unit and the cost information corresponding to the first prediction mode, executing the search processing of the second prediction mode set to obtain a second prediction mode; selecting the target prediction mode from the first prediction mode and the second prediction mode; And if the block division processing for the current coding unit is determined to be skipped according to the coded information of the reference coding unit and the cost information corresponding to the target prediction mode, performing video coding processing on the current coding unit according to the target prediction mode.
- 13. A method of transmitting a bitstream, comprising performing the video encoding method of any one of claims 1-10, 11 or 12 to output a bitstream, and transmitting the bitstream.
- 14. A method of storing a bitstream, comprising performing the video encoding method of any one of claims 1-10, 11 or 12 to output a bitstream, and storing the bitstream.
- 15. An electronic device comprising a processor and a memory, wherein the memory has stored therein a computer program, which, when executed by the processor, performs the method of any of claims 1-10, 11, 12, 13 or 14.
- 16. A computer storage medium, characterized in that the computer storage medium stores a computer program which, when executed by a processor, performs the method of any of claims 1-10, 11, 12, 13 or 14.
- 17. A computer program product comprising computer instructions which, when executed by a processor, perform the method of any of claims 1-10, 11, 12, 13 or 14.
Description
Video encoding method, method for transmitting and storing bit stream, apparatus, storage medium and program product Technical Field The present application relates to the field of video coding technology, and in particular, to a video coding method, a device, a storage medium, and a program product for transmitting and storing a bitstream. Background With the rapid development of information technology, video has become one of the important components in digital content. From traditional television broadcasting to high definition streaming media to virtual reality and augmented reality, the demand for video data grows exponentially. This growth places higher demands on bandwidth, storage space, and transmission efficiency. Video Coding techniques, which are key means for reducing redundancy of Video data and improving compression efficiency, undergo multiple iterations, from h.264/AVC (Advanced Video Coding ) to h.265/HEVC (HIGH EFFICIENCY Video Coding, high efficiency Video Coding) to h.266/VVC (VERSATILE VIDEO CODING, multifunctional Video Coding). The h.266/VVC allows compression efficiency to be greatly improved by introducing more flexible block partitioning structures, enhanced intra/inter prediction modes, and the like, into various and complex coding tools. As coding standards become increasingly complex, the search space and computational complexity of coding decisions are greatly increased, resulting in significant increase in coding delay, which makes it difficult to meet application requirements of real-time communication, live broadcast, cloud gaming, and the like, which have higher requirements on coding speed. Therefore, how to reduce the coding complexity, improve the coding speed and reduce the coding cost while maintaining the advantages of the compression efficiency is one of the technical problems in the video coding field. Disclosure of Invention The embodiment of the application provides a video coding method, a method, equipment, a storage medium and a program product for transmitting and storing a bit stream, which are used for reducing coding complexity, improving coding speed and reducing coding cost while maintaining the advantages of compression efficiency. The embodiment of the application provides a video coding method, which comprises the steps of obtaining a current coding unit to be coded in a current video frame, determining a reference coding unit which is matched with the current coding unit from coded units of the current video frame, aiming at the current coding unit, executing rough selection processing of a first prediction mode set, wherein the rough selection processing result is used for participating in the rough selection processing of the first prediction mode set to obtain a first prediction mode, obtaining target cost information corresponding to the first prediction mode set if the rough selection processing is determined to be skipped according to coded information of the reference coding unit and cost information in the rough selection processing, and executing search processing of a second prediction mode set to obtain a second prediction mode and select the second prediction mode as a target prediction mode if the block division processing aiming at the current coding unit is determined to be skipped according to coded information of the reference coding unit and cost information corresponding to the target prediction mode, and coding the current coding unit is processed according to the target prediction mode. The embodiment of the application also provides a video coding method, which comprises the steps of obtaining a current coding unit to be coded in a current video frame, determining a reference coding unit matched with the current coding unit from coded units of the current video frame, aiming at the current coding unit, executing rough selection processing of a first prediction mode set, wherein the rough selection processing result is used for participating in the selection processing of the first prediction mode set to obtain a first prediction mode, executing the selection processing to obtain the first prediction mode if the selection processing is determined not to be skipped according to the coded information of the reference coding unit and the cost information in the rough selection processing, determining to skip search processing of a second prediction mode set according to the coded information of the reference coding unit and the cost information corresponding to the first prediction mode, selecting the first prediction mode as the target prediction mode, and executing the video coding on the current coding unit according to the target prediction mode if the block division processing of the current coding unit is determined to be skipped according to the coded information of the reference coding unit and the cost information corresponding to the target prediction mode. The embodiment of the application also provides a video coding met