Video encoding method and apparatus

By optimizing video coding through a multi-granularity rate-distortion search architecture, the problems of high complexity and long search time in existing technologies are solved, achieving faster coding speed and performance maintenance.

CN119629334BActive Publication Date: 2026-07-14BEIJING DAJIA INTERNET INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
Filing Date
2024-12-11
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing video coding technologies suffer from high complexity and long search times during the Rate-Distortion Optimization (RDO) search process, especially in the VVC coding standard, leading to encoder speed bottlenecks.

Method used

A multi-granularity rate-distortion search architecture is adopted, which combines fast coarse-grained and slow fine-grained searches to optimize the coding mode selection process. By flexibly utilizing the relationships between modes through contextual information, unnecessary search time is reduced.

Benefits of technology

It effectively reduces the time for rate-distortion optimization search, improves encoding speed, and maintains encoding performance, avoiding the time waste and fixed order problems caused by single-granularity search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629334B_ABST
    Figure CN119629334B_ABST
Patent Text Reader

Abstract

Video coding methods and apparatuses are provided. A video coding method can include selecting a first number of candidate prediction modes from a plurality of prediction modes in a plurality of coding modes, wherein each coding mode includes at least one prediction mode; combining, for each candidate prediction mode in the first number of candidate prediction modes, the candidate prediction mode and respective transform modes and respective quantization modes in the coding mode corresponding to the candidate prediction mode to obtain a plurality of candidate modes; obtaining a plurality of reconstructed blocks of a current coding unit (CU) based on the plurality of candidate modes in the plurality of coding modes, respectively; and selecting an optimal mode for coding the current CU from the plurality of candidate modes in the plurality of coding modes based on rate-distortion values between the current CU and the plurality of reconstructed blocks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to video encoding / decoding and compression. More specifically, this disclosure relates to a video encoding method and apparatus, electronic equipment, non-transitory computer-readable storage medium, and computer program product. Background Technology

[0002] Various electronic devices (such as digital televisions, laptops or desktop computers, tablets, digital cameras, digital recording devices, digital media players, video game consoles, smartphones, video conferencing equipment, video streaming devices, etc.) support digital video. Electronic devices send and receive, or otherwise transmit, digital video data via communication networks, and / or store digital video data on storage devices. Due to the limited bandwidth capacity of communication networks and the limited storage resources of storage devices, video data can be compressed using one or more video codec standards before it is transmitted or stored. For example, video codec standards include Universal Video Codec (VVC), Joint Explore Test Model (JEM), High Efficiency Video Codec (HEVC / H.265), Advanced Video Codec (AVC / H.264), Moving Picture Experts Group (MPEG) codec, etc. Video codecs typically employ prediction methods that utilize the inherent redundancy in video data (e.g., inter-frame prediction, intra-frame prediction, etc.). Video codecs aim to compress video data to a form using a lower bitrate while avoiding or minimizing degradation in video quality. Summary of the Invention

[0003] Examples of this disclosure provide a video encoding method and apparatus, an electronic device, a non-transitory computer-readable storage medium, and a computer program product.

[0004] According to a first aspect of this disclosure, a video coding method is provided, comprising: selecting a first number of candidate prediction modes from a plurality of prediction modes in a plurality of coding modes, wherein each coding mode includes at least one prediction mode; for each candidate prediction mode in the first number of candidate prediction modes, combining the candidate prediction mode with each transform mode and each quantization mode in the coding mode corresponding to the candidate prediction mode to obtain a plurality of candidate modes; obtaining a plurality of reconstructed blocks of a current coding unit (CU) based on the plurality of candidate modes in the plurality of coding modes; and selecting an optimal mode for coding the current CU from the plurality of candidate modes in the plurality of coding modes based on the rate-distortion value between the current CU and the plurality of reconstructed blocks.

[0005] Optionally, selecting a first number of candidate prediction modes from multiple prediction modes in multiple coding modes includes: for each coding mode, using at least one prediction mode in the coding mode to predict the current CU to obtain at least one prediction block of the current CU; and selecting the first number of candidate prediction modes from the multiple prediction modes based on the rate-distortion values ​​between the multiple prediction blocks corresponding to the multiple coding modes and the current CU.

[0006] Optionally, selecting a first number of candidate prediction modes from the plurality of prediction modes based on rate-distortion values ​​between multiple prediction blocks corresponding to the plurality of coding modes and the current CU includes: for each coding mode, selecting a second number of candidate prediction modes from at least one prediction mode in the coding mode based on rate-distortion values ​​between at least one prediction block corresponding to the coding mode and the current CU; and selecting the first number of candidate prediction modes from the second number of candidate prediction modes in the plurality of coding modes based on rate-distortion values ​​between prediction blocks and the current CU obtained in the second number of candidate prediction modes corresponding to each coding mode.

[0007] Optionally, obtaining multiple reconstructed blocks of the current coding unit (CU) based on the multiple candidate modes under the multiple coding modes includes: for each candidate mode, performing a transformation operation on the residual block between the current CU and the prediction block obtained under the candidate prediction mode corresponding to the candidate mode based on the transformation mode under the candidate mode to obtain transformation coefficients; performing a quantization operation on the transformation coefficients based on the quantization mode under the candidate mode to obtain quantization coefficients; and reconstructing the current CU based on the quantization coefficients to obtain the reconstructed block of the current CU.

[0008] Optionally, the first quantity and the second quantity are preset or determined based on the context information of the current CU.

[0009] Optionally, the rate distortion value is the sum of absolute errors or the sum of absolute transformation errors.

[0010] According to a second aspect of this disclosure, a video encoding apparatus is provided, comprising: a prediction mode search module configured to: select a first number of candidate prediction modes from a plurality of prediction modes in a plurality of encoding modes, wherein each encoding mode includes at least one prediction mode; a candidate mode search module configured to: for each candidate prediction mode in the first number of candidate prediction modes, combine the candidate prediction mode with each transform mode and each quantization mode in the encoding mode corresponding to the candidate prediction mode to obtain a plurality of candidate modes; and an optimal mode determination module configured to: obtain a plurality of reconstructed blocks of a current encoding unit (CU) based on the plurality of candidate modes in the plurality of encoding modes; and select an optimal mode for encoding the current CU from the plurality of candidate modes in the plurality of encoding modes based on the rate-distortion value between the current CU and the plurality of reconstructed blocks.

[0011] Optionally, the prediction mode search module is configured to: for each coding mode, use at least one prediction mode under the coding mode to predict the current CU to obtain at least one prediction block of the current CU; and select the first number of candidate prediction modes from the multiple prediction modes based on the rate-distortion values ​​between the multiple prediction blocks corresponding to the multiple coding modes and the current CU.

[0012] Optionally, the prediction mode search module is configured to: for each coding mode, select a second number of candidate prediction modes from at least one prediction mode in the coding mode based on the rate-distortion value between at least one prediction block corresponding to the coding mode and the current CU; and select a first number of candidate prediction modes from the second number of candidate prediction modes in the plurality of coding modes based on the rate-distortion value between the prediction block and the current CU obtained in the second number of candidate prediction modes corresponding to each coding mode.

[0013] Optionally, the optimal mode determination module is configured to: for each candidate mode, perform a transformation operation on the residual block between the current CU and the prediction block obtained under the candidate prediction mode corresponding to the candidate mode based on the transformation mode under the candidate mode to obtain transformation coefficients; perform a quantization operation on the transformation coefficients based on the quantization mode under the candidate mode to obtain quantization coefficients; and reconstruct the current CU based on the quantization coefficients to obtain the reconstructed block of the current CU.

[0014] Optionally, the first quantity and the second quantity are preset or determined based on the context information of the current CU.

[0015] Optionally, the rate distortion value is the sum of absolute errors or the sum of absolute transformation errors.

[0016] According to a third aspect of this disclosure, an apparatus for video encoding is provided, comprising: one or more processors; and a memory coupled to the one or more processors and configured to store instructions executable by the one or more processors, wherein the one or more processors are configured to perform a method according to this disclosure when executing the instructions.

[0017] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided for storing computer-executable instructions that, when executed by one or more computer processors, cause the one or more computer processors to perform a method according to this disclosure.

[0018] According to a fifth aspect of this disclosure, a computer program product is provided having instructions for storing a bit stream, the instructions causing the one or more processors to perform a method according to this disclosure when executed by the one or more processors.

[0019] It will be understood that the above general description and the following detailed description are merely examples and do not limit this disclosure. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate examples according to this disclosure and, together with this description, serve to explain the principles of this disclosure.

[0021] Figure 1 This is a block diagram illustrating an exemplary system for encoding and decoding video blocks according to some embodiments of the present disclosure.

[0022] Figure 2 This is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.

[0023] Figure 3 This is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.

[0024] Figure 4 A schematic diagram of rate-distortion search is shown.

[0025] Figure 5 An RDO search architecture is shown.

[0026] Figure 6 This is a flowchart of a video encoding method according to an embodiment of the present disclosure.

[0027] Figure 7 This is a schematic diagram of a multi-granularity rate-distortion pattern search architecture according to an embodiment of the present disclosure.

[0028] Figure 8 This is a block diagram of a video encoding apparatus according to an embodiment of the present disclosure.

[0029] Figure 9 This is a diagram illustrating a computing environment coupled to a user interface according to some embodiments of the present disclosure. Detailed Implementation

[0030] Referring now to the detailed description, examples of which are illustrated in the accompanying drawings. Numerous non-limiting details are set forth in the following detailed description to aid in understanding the subject matter presented herein. However, various alternatives may be used without departing from the scope of the claims, and the subject matter may be practiced without these specific details. For example, the subject matter presented herein can be implemented on many types of electronic devices with digital video capabilities.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this disclosure are used to distinguish objects and are not used to describe any specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in sequences other than those shown in the drawings or described in this disclosure.

[0032] Figure 1 This is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel, according to some embodiments of the present disclosure. Figure 1 As shown, system 10 includes a source device 12 that generates and encodes video data that will later be decoded by a target device 14. The source device 12 and target device 14 can include any electronic device from a wide variety of electronic devices, including cloud servers, server computers, desktop or laptop computers, tablet computers, smartphones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some embodiments, the source device 12 and target device 14 are equipped with wireless communication capabilities.

[0033] In some implementations, the target device 14 may receive the encoded video data to be decoded via link 16. Link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14.

[0034] In some other implementations, the encoded video data can be sent from the output interface 22 to the storage device 32. Subsequently, the target device 14 can access the encoded video data in the storage device 32 via the input interface 28.

[0035] like Figure 1As shown, source device 12 includes a video source 18, a video encoder 20, and an output interface 22. Video source 18 may include sources or combinations of such sources, such as: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video.

[0036] The captured, pre-captured, or computer-generated video can be encoded by the video encoder 20. The encoded video data can be sent directly to the target device 14 via the output interface 22 of the source device 12. Alternatively, the encoded video data can be stored on the storage device 32 for later access by the target device 14 or other devices for decoding and / or playback.

[0037] Target device 14 includes an input interface 28, a video decoder 30, and a display device 34. Input interface 28 may include a receiver and / or a modem, and receives encoded video data via link 16. The encoded video data transmitted via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use by video decoder 30 when decoding the video data. Such syntax elements may be included within encoded video data transmitted on a communication medium, stored on a storage medium, or stored on a file server.

[0038] Video encoder 20 and video decoder 30 can operate according to proprietary or industry standards (e.g., VVC, HEVC, MPEG-4 Part 10, AVC) or extensions of such standards. It should be understood that this application is not limited to a specific video encoding / decoding standard and can be applied to other video encoding / decoding standards. It is generally understood that the video encoder 20 of source device 12 can be configured to encode video data according to any of these current or future standards. Similarly, it is also generally understood that the video decoder 30 of target device 14 can be configured to decode video data according to any of these current or future standards.

[0039] The video encoder 20 and video decoder 30 can be implemented as any circuit of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic devices, software, hardware, firmware, or any combination thereof. When partially implemented in software, the electronic device may store instructions for software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the video encoding / decoding operations disclosed in this disclosure. Each of the video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, and either encoder or decoder may be integrated as part of a combined encoder / decoder (CODEC) in the respective device.

[0040] Figure 2 This is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in this application. The video encoder 20 can perform intra-frame predictive coding and inter-frame predictive coding on video blocks within a video frame. Intra-frame predictive coding relies on spatial prediction to reduce or remove spatial redundancy in the video data within a given video frame or picture. Inter-frame predictive coding relies on temporal prediction to reduce or remove temporal redundancy in the video data within neighboring video frames or pictures of a video sequence. It should be noted that in the field of video encoding and decoding, the term "frame" can be used as a synonym for the terms "image" or "picture".

[0041] like Figure 2As shown, the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a partitioning unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copying (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A loop filter 63, such as a deblocking filter, can be located between the adder 62 and the DPB 64 to filter block boundaries to remove block artifacts from the reconstructed video. In addition to the deblocking filter, another loop filter (e.g., a sample adaptive offset (SAO) filter, a cross-component sample adaptive offset (CCSAO) filter, and / or an adaptive loop filter (ALF)) can be used to filter the output of the adder 62. In some examples, the loop filter can be omitted, and the decoded video block can be directly provided to the DPB 64 by the adder 62. The video encoder 20 can take the form of a fixed or programmable hardware unit, or it can be distributed among one or more of the fixed or programmable hardware units described.

[0042] The video data storage device 40 can store video data encoded by the components of the video encoder 20. For example, it can store data from... Figure 1 The video source 18 shown obtains video data from the video data storage 40. The DPB 64 is a buffer that stores reference video data (e.g., reference frames or pictures) used by the video encoder 20 (e.g., in intra-frame or inter-frame predictive coding mode) when encoding the video data.

[0043] like Figure 2 As shown, after receiving video data, the partitioning unit 45 within the prediction processing unit 41 partitions the video data into video blocks. This partitioning may also include dividing the video frame into strips, tiles (e.g., sets of video blocks) or other larger coding units (CUs) according to a predefined splitting structure (e.g., a quadtree (QT) structure) associated with the video data. It should be noted that the term "block" or "video block" as used herein can be a portion of a frame or image, particularly a rectangular (square or non-square) portion. Referring to, for example, HEVC and VVC, a block or video block can be or corresponds to a coding tree unit (CTU), CU, prediction unit (PU), or transform unit (TU) and / or can be or corresponds to a corresponding block (e.g., coding tree block (CTB), coding block (CB), prediction block (PB), or transform block (TB)) and / or sub-block.

[0044] Prediction processing unit 41 can select one of several feasible predictive coding modes for the current video block based on error results (e.g., coding rate and rate-distortion level), such as one or more inter-frame predictive coding modes among multiple intra-frame predictive coding modes. Prediction processing unit 41 can provide the resulting intra-frame predictive coded block or inter-frame predictive coded block to adder 50 to generate a residual block, and to adder 62 to reconstruct the coded block for subsequent use as part of a reference frame. Prediction processing unit 41 also provides syntax elements (e.g., motion vectors, intra-frame mode indicators, partitioning information, and other such syntax information) to entropy coding unit 56.

[0045] To select a suitable intra-predictive coding mode for the current video block, the intra-predictive processing unit 46 within the prediction processing unit 41 can perform intra-predictive coding of the current video block in relation to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. The motion estimation unit 42 and motion compensation unit 44 within the prediction processing unit 41 perform inter-predictive coding of the current video block in relation to one or more prediction blocks in one or more reference frames to provide temporal prediction. The video encoder 20 can perform multiple coding passes, for example, to select a suitable coding mode for each block of video data.

[0046] In some implementations, motion estimation unit 42 determines an inter-frame prediction mode for the current video frame by generating motion vectors based on a predetermined pattern within the video frame sequence. The motion vectors indicate the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating motion vectors that estimate the motion of video blocks. For example, the motion vectors may indicate the displacement of a video block within the current video frame or picture relative to a prediction block within a reference frame associated with the current block being encoded in the current frame. The predetermined pattern may designate video frames in the sequence as P-frames or B-frames. Intra-frame BC unit 48 may determine vectors (e.g., block vectors) for intra-frame BC coding in a similar manner to how motion estimation unit 42 determines motion vectors for inter-frame prediction, or the block vectors may be determined using motion estimation unit 42.

[0047] Regardless of whether the predicted block comes from the same frame predicted intra-frame or from different frames predicted inter-frame, the video encoder 20 can form a residual video block by subtracting the pixel values ​​of the predicted block from the pixel values ​​of the current video block being encoded. The pixel difference forming the residual video block can include both luma component difference and chroma component difference.

[0048] Intra-prediction processing unit 46 can encode the current block using various intra-prediction modes, for example, during individual encoding passes, and intra-prediction processing unit 46 (or, in some examples, mode selection unit) can select a suitable intra-prediction mode from the tested intra-prediction modes for use. Intra-prediction processing unit 46 can provide information indicating the intra-prediction mode selected for the block to entropy coding unit 56. Entropy coding unit 56 can encode the information indicating the selected intra-prediction mode into the bitstream.

[0049] After prediction processing unit 41 determines the prediction block for the current video block via inter-frame prediction or intra-frame prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and provided to transform processing unit 52. Transform processing unit 52 uses a transform (e.g., discrete cosine transform (DCT) or a conceptually similar transform) to transform the residual video data into residual transform coefficients.

[0050] The transform processing unit 52 can send the resulting transform coefficients to the quantization unit 54. The quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process can also reduce the bit depth associated with some or all of the coefficients. The degree of quantization can be modified by adjusting the quantization parameters. In some examples, the quantization unit 54 can subsequently perform a scan on the matrix including the quantized transform coefficients. Alternatively, the entropy coding unit 56 can perform the scan.

[0051] After quantization, the entropy coding unit 56 entropy-encodes the quantized transform coefficients into a video bitstream using, for example, context-adaptive variable-length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique. The encoded bitstream can then be sent to, for example,... Figure 1 The video decoder 30 shown, or archived in, for example Figure 1 The data is stored in storage device 32 for later transmission to or retrieval by video decoder 30. Entropy coding unit 56 can also entropy code the motion vectors and other syntax elements used for the current video frame being encoded.

[0052] The inverse quantization unit 58 and the inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct residual video blocks in the pixel domain for generating reference blocks to predict other video blocks. As noted above, the motion compensation unit 44 can generate motion-compensated prediction blocks from one or more reference blocks of frames stored in the DPB 64. The motion compensation unit 44 can also apply one or more interpolation filters to the prediction blocks to compute sub-integer pixel values ​​for use in motion estimation.

[0053] Adder 62 adds the reconstructed residual block to the motion-compensated prediction block generated by motion compensation unit 44 to generate a reference block for storage in DPB 64. The reference block can then be used as a prediction block by intra-frame BC unit 48, motion estimation unit 42, and motion compensation unit 44 for inter-frame prediction of another video block in subsequent video frames.

[0054] Figure 3 This is a block diagram illustrating an exemplary video decoder 30 according to some embodiments of this application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 can perform operations in conjunction with the above. Figure 2 The decoding process described for the video encoder 20 is essentially the inverse of the encoding process. For example, the motion compensation unit 82 can generate prediction data based on the motion vectors received from the entropy decoding unit 80, while the intra-frame prediction unit 84 can generate prediction data based on the intra-frame prediction mode indicator received from the entropy decoding unit 80.

[0055] Furthermore, in some examples, embodiments of this disclosure may be distributed across one or more units of the video decoder 30. For example, the intra-frame BC unit 85 may perform embodiments of this application individually or in combination with other units of the video decoder 30 (e.g., motion compensation unit 82, intra-frame prediction unit 84, and entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra-frame BC unit 85, and the functionality of the intra-frame BC unit 85 may be performed by other components of the prediction processing unit 81 (e.g., motion compensation unit 82).

[0056] The video data storage device 79 can store video data, such as encoded video bitstreams, that will be decoded by other components of the video decoder 30. The video data stored in the video data storage device 79 can be obtained, for example, from the storage device 32, from a local video source (e.g., a camera), via wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., a flash drive or hard disk).

[0057] During the decoding process, the video decoder 30 receives a encoded video bitstream representing video blocks and associated syntax elements of encoded video frames. The entropy decoding unit 80 of the video decoder 30 performs entropy decoding on the bitstream to generate quantization coefficients, motion vectors or intra-prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-prediction mode indicators, and other syntax elements to the prediction processing unit 81.

[0058] When a video frame is encoded as an intra-predictive coded (I) frame or used as an intra-coded prediction block in other types of frames, the intra-prediction unit 84 of the prediction processing unit 81 can generate prediction data for the video block of the current video frame based on the intra-prediction mode transmitted by the signal and reference data from the previous decoded block of the current frame.

[0059] When a video frame is encoded as an inter-frame predictive coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the current video frame based on motion vectors and other syntax elements received from the entropy decoding unit 80. Each of the prediction blocks can be generated from a reference frame within a reference frame list. The video decoder 30 can construct the reference frame list, i.e., list 0 and list 1, based on the reference frames stored in the DPB 92 using a default construction technique.

[0060] In some examples, when a video block is encoded according to the intra-frame BC mode described herein, the intra-frame BC unit 85 of the prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from the entropy decoding unit 80. The prediction block can be located within a reconstructed region of the same image as the current video block, as defined by the video encoder 20.

[0061] The motion compensation unit 82 and / or the intra-frame BC unit 85 determine the prediction information for the video block of the current video frame by parsing motion vectors and other syntax elements, and then use the prediction information to generate a prediction block for the current video block being decoded.

[0062] The motion compensation unit 82 can also perform interpolation using interpolation filters, such as those used by the video encoder 20 during encoding of video blocks, to calculate interpolated values ​​for sub-integer pixels of the reference block. In this case, the motion compensation unit 82 can determine the interpolation filters used by the video encoder 20 based on the received syntax elements and use these interpolation filters to generate the prediction block.

[0063] The dequantization unit 86 dequantizes the quantized transform coefficients provided in the bitstream and entropy-decoded by the entropy decoding unit 80 using the same quantization parameters calculated by the video encoder 20 for each video block in the video frame to determine the degree of quantization. The inverse transform processing unit 88 applies an inverse transform (e.g., inverse DCT, inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients in order to reconstruct the residual block in the pixel domain.

[0064] After the motion compensation unit 82 or the intra-frame BC unit 85 generates a prediction block for the current video block based on vectors and other syntax elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra-frame BC unit 85. A loop filter 91 (e.g., a deblocking filter, SAO filter, CCSAO filter, and / or ALF) may be located between the adder 90 and the DPB 92 for further processing of the decoded video block. In some examples, the loop filter 91 may be omitted, and the decoded video block may be directly provided to the DPB 92 by the adder 90. The decoded video block in a given frame is then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a separate memory device may also store the decoded video for later presentation on a display device (e.g., ...). Figure 1 On the display device 34).

[0065] The H.266 / VVC video coding standard was released in 2020. Its compression performance is significantly improved compared to the H.265 / HEVC coding standard, mainly due to the addition of numerous complex, high-performance prediction, transform, and quantization tools in VVC. In the hybrid video coding framework used in VVC, the coding process for each control unit (CU) in the video requires steps such as predictive coding, transform coding, quantization, and reconstruction. To obtain the optimal coding result, each CU needs to traverse and search through a large number of prediction, transform, and quantization tools, and select the optimal prediction mode, transform mode, and quantization mode through rate-distortion optimization (RDO). This process is called rate-distortion search.

[0066] Figure 4 A schematic diagram of rate-distortion search is shown.

[0067] Reference Figure 4 In the current CU encoding process, various encoding modes can be traversed and searched sequentially (e.g., in a fixed order). Each encoding mode may include multiple prediction modes (prediction tools), multiple transformation modes (transformation tools), and multiple quantization modes (quantization tools), etc.

[0068] exist Figure 4 In the process, encoding mode 1 can be searched first, followed by encoding mode 2, and so on. When searching for encoding mode 1, each prediction mode, transform mode, and quantization mode under encoding mode 1 is used to encode the current CU to obtain multiple reconstructed blocks. The obtained reconstructed blocks are then used to calculate the rate-distortion value with the current original CU. Each encoding mode is traversed and searched in the above manner. After obtaining the rate-distortion values ​​for each encoding mode, the encoding mode with the lowest rate-distortion value is selected as the optimal encoding mode for the current CU by comparing the rate-distortion values ​​of each encoding mode.

[0069] However, since each CU needs to traverse and search through a large number of prediction, transformation and quantization modes, this greatly increases the complexity of the encoder. According to statistics, RDO search accounts for more than 80% of the total encoder time on average, which is the core bottleneck of encoder speed.

[0070] To minimize search time, existing solutions employ various fast algorithms, such as skipping some encoding patterns based on contextual information. However, as optimization progresses, simply designing fast algorithms is no longer sufficient to guarantee minimal loss of encoding performance while achieving speedup. Therefore, a more flexible encoder search architecture is needed to unlock the acceleration potential.

[0071] Figure 5 An RDO search architecture is shown.

[0072] exist Figure 5 Under the shown search architecture, the pattern search order for each CU is fixed, and the specific operation is as follows.

[0073] Reference Figure 5 First, a search is performed within the coding mode. For each coding mode, various prediction modes, transform modes, and quantization modes need to be traversed. Taking the regular merge mode as an example, it is necessary to first traverse and search among many prediction modes to obtain a candidate list of optimal prediction modes. Then, this candidate list is traversed, and for each prediction mode, a further traversal and search is performed among many transform modes and quantization modes. Based on the results obtained after prediction, transformation, quantization, and reconstruction, the rate-distortion value is calculated. Finally, the combination with the smallest rate-distortion value among many combinations of prediction, transformation, quantization, and reconstruction is selected as the optimal regular merge mode.

[0074] After searching within a coding mode, an inter-coding mode search is performed. For example, after obtaining the optimal regular merge mode using the above method, other coding modes are traversed in the same way. The traversal order of coding modes is: regular merge mode, affine merge mode, geometric partitioning mode, ordinary inter-frame mode (ordinary AMVP), affine inter-frame mode (Affine AMVP), adaptive precision inter-frame mode (AMVR), intra-block copy mode (IBC), intra-prediction mode, etc. Finally, the mode with the minimum rate-distortion value is selected as the optimal coding mode for the current CU.

[0075] This CU (Coding Encoding Pattern) search architecture first iterates through all prediction patterns, transformation patterns, quantization patterns, etc., of the previous encoding pattern before iterating to the next. Essentially, it's a single-granularity, depth-first search. However, this single-granularity search leads to a rigid and inflexible search order, failing to flexibly utilize the contextual information between patterns. Because each encoding pattern is always searched in a fixed order, the contextual information of each pattern cannot be flexibly applied during the search process. Furthermore, depth-first search results in significant time wastage due to erroneous searches. Since each encoding pattern needs to undergo a complete prediction, transformation, quantization, and reconstruction search, a significant amount of search time is wasted if a particular encoding pattern is not the final optimal pattern.

[0076] Therefore, this disclosure designs a multi-granularity rate-distortion search architecture. By splitting the encoder's search architecture into a multi-granularity architecture that combines fast coarse-grained search and slow fine-grained search, the RDO search time is greatly reduced, and the encoding speed is improved. The following will refer to... Figures 6 to 8 The embodiments of this disclosure are described in detail.

[0077] Figure 6 This is a flowchart of a video encoding method according to an embodiment of the present disclosure.

[0078] Reference Figure 6 In step S601, a first number of candidate prediction modes are selected from multiple prediction modes in multiple coding modes, wherein each coding mode includes at least one prediction mode. Each coding mode may include multiple prediction modes (prediction tools), multiple transform modes (transform tools), and multiple quantization modes (quantization tools), etc. For example, prediction modes in the regular Merge mode may include the regular Merge prediction mode, the Motion Vector Difference Combining (MMVD) prediction mode, and the Intra-Inter-Frame Joint (CIIP) prediction mode.

[0079] First, a prediction mode traversal search operation can be performed. This operation may involve generating prediction blocks for the current CU based on each prediction mode within each coding mode, and calculating the rate-distortion value of the current CU based on the prediction blocks of each prediction mode. Then, based on the prediction mode traversal search operation, a candidate prediction mode list is obtained. This candidate list may include several prediction modes selected based on the rate-distortion values. The rate-distortion values ​​may be, for example, absolute error and SAD or absolute transform error and SATD, etc.

[0080] As an example, for each coding mode, at least one prediction mode under that coding mode can be used to predict the current CU, obtaining at least one prediction block for the current CU. Based on the rate-distortion values ​​between the multiple prediction blocks corresponding to multiple coding modes and the current CU, a first number of candidate prediction modes are selected from multiple prediction modes. The first number can be preset or determined based on the context information of the current CU. The context information of the current CU may include coding information of neighboring CUs, coding requirements (such as coding quality and coding speed), and actual coding conditions. A candidate prediction mode list can be formed based on the first number of candidate prediction modes.

[0081] When selecting the first number of candidate prediction modes, a second number of candidate prediction modes can be selected from at least one prediction mode within that coding mode, based on the rate-distortion value between at least one prediction block corresponding to that coding mode and the current CU. In other words, a second number of candidate prediction modes is selected for each coding mode separately. The second number can be preset or determined based on the context information of the current CU. For example, for scenarios with high speed requirements (such as live streaming), the second number can be set to 2 or 3; for scenarios with slower on-demand playback, the second number can be set to 4-5.

[0082] Next, based on the rate-distortion value between the prediction block obtained under the second number of candidate prediction modes corresponding to each coding mode and the current CU, a first number of candidate prediction modes are selected from the second number of candidate prediction modes under multiple coding modes.

[0083] For example, suppose the number of encoding patterns that need to be traversed and searched is N, and the second number is M, that is, M candidate prediction patterns are selected for each encoding pattern. In this case, a total of N×M candidate prediction patterns are selected first, and then the rate-distortion values ​​of these N×M candidate prediction patterns are compared. From the N×M candidate prediction patterns, the first number of candidate prediction patterns are selected and a prediction pattern candidate list is generated.

[0084] In step S602, for each candidate prediction mode, the candidate prediction mode and each transform mode and each quantization mode in the corresponding coding mode are combined to obtain multiple candidate modes.

[0085] For each candidate prediction mode, a transform and quantization mode traversal search operation is performed. This operation may involve combining the candidate prediction mode with various transform and quantization modes from the corresponding encoding mode to obtain multiple candidate modes. For example, for a candidate prediction mode corresponding to a candidate mode, the candidate mode may include the candidate prediction mode, a transform mode, and a quantization mode. Within a candidate prediction mode, different candidate modes may include the same prediction mode but different transform and / or quantization modes.

[0086] In step S603, multiple reconstruction blocks of the current coding unit CU are obtained based on multiple candidate modes under multiple coding modes.

[0087] For each candidate mode, the current CU can be fully predicted, transformed, quantized and reconstructed using that candidate mode to obtain the reconstructed block of the current CU under that candidate mode.

[0088] For example, for each candidate mode, when the prediction block of the current CU can be obtained in step S602, the prediction block obtained in the prediction mode of the candidate mode can be transformed, quantized, and reconstructed to obtain the reconstruction block of the current CU.

[0089] As an example, for each candidate mode, a transformation operation is performed on the residual block between the current CU and the prediction block obtained under the corresponding candidate prediction mode, based on the transformation mode under that candidate mode, to obtain transformation coefficients; a quantization operation is performed on these transformation coefficients based on the quantization mode under that candidate mode, to obtain quantization coefficients; and the current CU is reconstructed based on these quantization coefficients to obtain the reconstructed block of the current CU. (Refer to the above...) Figure 1 and Figure 2 To obtain the reconstruction block.

[0090] In step S604, based on the rate-distortion values ​​between the current CU and multiple reconstructed blocks, the optimal mode for encoding the current CU is selected from multiple candidate modes among multiple encoding modes.

[0091] For example, SAD can be calculated based on each pixel in the current CU and each pixel in the reconstructed block, and then the candidate mode with the minimum SAD can be selected from these candidate modes as the optimal coding mode for the current CU.

[0092] This disclosure, through the design of a flexible, multi-granular, breadth-first RDO search architecture, enables the encoder to support rapid coarse-grained screening among encoding modes first, followed by further fine-grained screening. This approach solves the problems of existing search architectures, such as the inability to flexibly utilize contextual information from each mode and the excessive time wastage caused by erroneous searches. It significantly improves the flexibility of the encoder's rate-distortion search architecture and increases encoding speed.

[0093] Figure 7 This is a schematic diagram of a multi-granularity rate-distortion pattern search architecture according to an embodiment of the present disclosure.

[0094] The search framework disclosed herein breaks down each encoding pattern into two steps: a coarse-grained search that only searches the predicted pattern and a fine-grained search that requires the complete encoding process, thus enabling a multi-granular, breadth-first search architecture.

[0095] Reference Figure 7 In the coarse-grained search, under each encoding mode, only the prediction modes are traversed and searched first. Then, by calculating the distortion values ​​(such as SAD or SATD) between each predicted block obtained under each prediction mode and the original block, a second number of candidate prediction modes are selected from the prediction modes under each encoding mode. At this point, the selected candidate prediction modes under each encoding mode can be stored in the candidate list.

[0096] For example, for the regular Merge mode, it iterates through its subordinate regular Merge prediction modes, MMVD prediction mode, CIIP prediction mode, etc., and selects a second number of candidate prediction modes based on rate-distortion values. For the intra prediction mode, it iterates through its subordinate angle mode, planar mode, DC mode, matrix-based intra prediction (MIP) mode, multiple reference line (MRL) prediction mode, MPM prediction mode, etc., and selects a second number of candidate prediction modes based on rate-distortion values.

[0097] Regarding the second quantity, a smaller quantity means fewer elements to be filtered later, resulting in faster encoding time, but it may also lead to more encoding loss. Therefore, the second quantity generally needs to be set by comprehensively considering the requirements for encoding quality and encoding speed in the application. For example, for scenarios with high speed requirements such as live streaming, the second quantity can be set to 2-3; for scenarios with slower on-demand playback, the second quantity can be set to 4-5.

[0098] Next, sequentially traverse and search the second number of candidate prediction modes for each of the selected encoding modes. Then, sort these candidate modes according to SAD or SATD, and select the first number of candidate prediction modes from them. Finally, a global optimal prediction mode candidate list is obtained for all encoding modes. The number of candidates in the list can be freely set according to needs and actual conditions.

[0099] Suppose that the number of encoding patterns to be traversed and searched is N, and the second number is M, that is, M candidate prediction patterns are selected for each encoding pattern. In this case, a total of N×M candidate prediction patterns are selected first. Then, the rate-distortion values ​​of these N×M candidate prediction patterns are compared and sorted in ascending order. From the N×M candidate prediction patterns, the first number of candidate prediction patterns are selected to form the final candidate prediction pattern list.

[0100] like Figure 7 As shown, when performing a coding mode search (i.e., coarse-grained search), each coding mode can be traversed and searched in a preset order, such as the regular Merge mode, Affine Merge mode, geometric partitioning mode, ordinary AMVP, Affine AMVP, AMVR, intra-block copy mode, intra-prediction mode, etc.

[0101] Furthermore, according to embodiments of this disclosure, during coarse-grained searching, the various encoding patterns can also be searched randomly or based on contextual information. For example, an encoding pattern pool can be constructed, which may include the aforementioned encoding patterns. Then, the search order for each encoding pattern can be determined based on the encoding information of the current CU's neighboring CUs or encoding requirements (such as encoding quality requirements and / or encoding speed requirements).

[0102] During fine-grained search, the global optimal prediction mode candidate list obtained above is traversed. For each prediction mode, a complete fine-grained coding search is performed (i.e., a complete process of transformation, quantization, reconstruction, and rate-distortion calculation) to obtain the final rate-distortion value for each mode. Based on the rate-distortion value, the optimal coding mode combination (i.e., a combination of prediction, transformation, and quantization modes) is selected. For example, for a prediction mode, it can be combined with different transformation modes and different quantization modes. Then, based on the rate-distortion cost (RDCost) between the reconstructed block and the original block obtained under various combinations, the optimal combination is selected as the coding mode for the current CU.

[0103] The search framework disclosed herein supports breadth-first search, meaning it first quickly and broadly traverses and searches all coding modes' prediction patterns before delving deeper into transform and quantization modes. This allows the encoder to quickly obtain contextual information such as prediction information for all coding modes, helping it to improve coding speed and performance more efficiently.

[0104] The multi-granularity search method, which first quickly filters and then meticulously filters a limited number of optimal candidates, can quickly filter out redundant patterns based on prediction information. This prevents the encoder from wasting too much time on the meticulous filtering of these redundant patterns, greatly reducing the time wastage cost caused by incorrect selection and improving encoding speed.

[0105] Figure 8 This is a block diagram of a video encoding apparatus according to an embodiment of the present disclosure.

[0106] Reference Figure 8 The video encoding device 800 may include a prediction mode search module 801, a candidate mode search module 802, and an optimal mode determination module 803.

[0107] The prediction pattern search module 801 can be configured to select a first number of candidate prediction patterns from multiple prediction patterns in multiple coding modes, wherein each coding mode includes at least one prediction pattern.

[0108] The candidate pattern search module 802 can be configured to: for each candidate prediction pattern in the first number of candidate prediction patterns, combine the candidate prediction pattern with each transformation mode and each quantization mode in the encoding mode corresponding to the candidate prediction pattern to obtain multiple candidate patterns.

[0109] The optimal mode determination module 803 can be configured to: obtain multiple reconstructed blocks of the current coding unit CU based on the multiple candidate modes among the multiple coding modes; and select the optimal mode for encoding the current CU from the multiple candidate modes among the multiple coding modes based on the rate-distortion value between the current CU and the multiple reconstructed blocks.

[0110] According to another example, the prediction pattern search module 801 may be configured to: predict the current CU using at least one prediction pattern under each coding pattern to obtain at least one prediction block of the current CU; and select a first number of candidate prediction patterns from the plurality of prediction patterns based on the rate-distortion values ​​between the plurality of prediction blocks corresponding to the plurality of coding patterns and the current CU.

[0111] According to another example, the prediction pattern search module 801 may be configured to: for each coding pattern, select a second number of candidate prediction patterns from at least one prediction pattern in the coding pattern based on the rate distortion value between at least one prediction block corresponding to the coding pattern and the current CU; and select a first number of candidate prediction patterns from the second number of candidate prediction patterns in the plurality of coding patterns based on the rate distortion value between the prediction block and the current CU obtained in the second number of candidate prediction patterns corresponding to each coding pattern.

[0112] According to another example, the optimal mode determination module 803 can be configured to: for each candidate mode, perform a transformation operation on the residual block between the current CU and the prediction block obtained under the candidate prediction mode corresponding to the candidate mode based on the transformation mode under the candidate mode to obtain transformation coefficients; perform a quantization operation on the transformation coefficients based on the quantization mode under the candidate mode to obtain quantization coefficients; and reconstruct the current CU based on the quantization coefficients to obtain the reconstructed block of the current CU.

[0113] The first quantity and the second quantity can be preset or determined based on the context information of the current CU.

[0114] Rate distortion can be the sum of absolute errors or the sum of absolute transformation errors.

[0115] Based on the above embodiments, this disclosure designs a multi-granularity rate-distortion pattern search architecture that supports breadth-first search. This allows the encoder to significantly reduce the time wasted due to incorrect selection by combining fast coarse screening with slow fine screening. Simultaneously, the fast coarse screening across all encoding patterns enables the encoder to utilize more effective contextual information, thereby improving encoder speed and performance. This disclosure greatly enhances the flexibility of the encoder pattern search architecture and effectively reduces encoding complexity.

[0116] Furthermore, the above-described methods can be implemented using a device comprising one or more circuits, including application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components. This device can be used in combination with other hardware or software components to perform the above-described methods. Each module, submodule, unit, or subunit disclosed above can be implemented at least partially using one or more circuits.

[0117] Figure 9A computing environment 1610 coupled to a user interface 1650 is shown. The computing environment 1610 may be part of a data processing server. The computing environment 1610 includes a processor 1620, memory 1630, and input / output (I / O) interface 1640.

[0118] Processor 1620 typically controls the overall operation of computing environment 1610, such as operations associated with display, data acquisition, data communication, and image processing. Processor 1620 may include one or more processors for executing instructions to perform all or some of the steps in the methods described above. Furthermore, processor 1620 may include one or more modules that facilitate interaction between processor 1620 and other components. The processor may be a central processing unit (CPU), microprocessor, microcontroller, graphics processing unit (GPU), etc.

[0119] Memory 1630 is configured to store various types of data to support the operation of computing environment 1610. Memory 1630 may include predefined software 1632. Examples of such data include instructions for any application or method operating on computing environment 1610, video datasets, image data, etc. Memory 1630 can be implemented using any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0120] I / O interface 1640 provides an interface between processor 1620 and peripheral interface modules (such as keyboard, click wheel, buttons, etc.). Buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. I / O interface 1640 can be coupled to encoders and decoders.

[0121] In an embodiment, a non-transitory computer-readable storage medium is also provided, including, for example, a plurality of programs in memory 1630 and / or a bitstream generated by the above-described encoding method or a bitstream to be decoded by the above-described decoding method. The plurality of programs can be executed by processor 1620 in computing environment 1610 to perform the above-described methods. In one example, the plurality of programs can be executed by processor 1620 in computing environment 1610 to (e.g., from...) Figure 2The video encoder 20 in the computing environment 1610 receives a bitstream or data stream including encoded video information (e.g., video blocks representing encoded video frames, and / or one or more associated syntax elements, etc.), and can also be executed by the processor 1620 in the computing environment 1610 to perform the above-described decoding method based on the received bitstream or data stream. In another example, the plurality of programs can be executed by the processor 1620 in the computing environment 1610 to perform the above-described encoding method to encode video information (e.g., video blocks representing video frames, and / or one or more associated syntax elements, etc.) into a bitstream or data stream, and can also be executed by the processor 1620 in the computing environment 1610 to (e.g., to...) Figure 3 The video decoder 30 in the middle sends the bitstream or data stream. Alternatively, a non-transitory computer-readable storage medium may store data generated by the encoder (e.g., Figure 2 The video encoder 20 in the video is generated using, for example, the encoding method described above, for use by the decoder (e.g., Figure 3 The video decoder 30 in the video decoder uses a bitstream or data stream that includes encoded video information (e.g., video blocks representing encoded video frames, and / or one or more associated syntax elements, etc.) when decoding video data. Non-transitory computer-readable storage media can be, for example, ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage devices, etc.

[0122] In one embodiment, a bitstream generated by the above-described encoding method or a bitstream to be decoded by the above-described decoding method is provided. In another embodiment, a bitstream comprising encoded video information generated by the above-described encoding method or encoded video information to be decoded by the above-described decoding method is provided.

[0123] In one embodiment, a computing device is also provided, comprising: one or more processors (e.g., processor 1620); and a non-transitory computer-readable storage medium or memory 1630 therein storing a plurality of programs executable by the one or more processors, wherein the one or more processors are configured to perform the methods described above when executing the plurality of programs.

[0124] In one embodiment, a computer program product having instructions for storing or transmitting a bitstream is also provided, the bitstream including encoded video information generated by the encoding method described above or encoded video information to be decoded by the decoding method described above. In another embodiment, a computer program product including, for example, a plurality of programs in a memory 1630, the plurality of programs being executable by a processor 1620 in a computing environment 1610 to perform the methods described above. For example, the computer program product may include a non-transitory computer-readable storage medium.

[0125] In an embodiment, the computing environment 1610 may be implemented by one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components for performing the methods described above.

[0126] In one embodiment, a method for storing a bitstream is also provided, comprising: storing the bitstream on a digital storage medium, wherein the bitstream includes encoded video information generated by the above-described encoding method or encoded video information to be decoded by the above-described decoding method.

[0127] In one embodiment, a method for transmitting a bitstream generated by the encoder described above is also provided. In another embodiment, a method for receiving a bitstream to be decoded by the decoder described above is also provided.

[0128] The description in this disclosure has been presented for illustrative purposes and is not intended to be exhaustive or limited to this disclosure. Many modifications, variations, and alternative embodiments will be apparent to those skilled in the art from the teachings presented in the foregoing description and the associated drawings.

[0129] Unless otherwise specifically stated, the order of steps in the method according to this disclosure is intended to be illustrative only, and the steps of the method according to this disclosure are not limited to the specific order described above, but may be changed according to actual circumstances. Furthermore, at least one step in the method according to this disclosure may be adjusted, combined, or omitted as needed.

[0130] The examples chosen and described are intended to explain the principles of this disclosure and to enable others skilled in the art to understand the various embodiments of this disclosure, and preferably to utilize the basic principles and various embodiments with various modifications suitable for the intended particular purpose. Therefore, it will be understood that the scope of this disclosure is not limited to the specific examples of the disclosed embodiments, and that modifications and other embodiments are intended to be included within the scope of this disclosure.

Claims

1. A video encoding method, comprising: A first number of candidate prediction modes are selected from multiple prediction modes under multiple coding modes, wherein each coding mode includes at least one prediction mode; For each candidate prediction mode in the first number of candidate prediction modes, the candidate prediction mode and each transformation mode and each quantization mode in the coding mode corresponding to the candidate prediction mode are combined to obtain multiple candidate modes, wherein each candidate mode in the multiple candidate modes includes a corresponding prediction mode, transformation mode and quantization mode. Multiple reconstruction blocks of the current coding unit (CU) are obtained based on the multiple candidate modes under the multiple coding modes; and Based on the rate-distortion value between the current CU and the plurality of reconstructed blocks, the optimal mode for encoding the current CU is selected from the plurality of candidate modes among the plurality of encoding modes.

2. The method according to claim 1, wherein, Select a first number of candidate prediction modes from multiple prediction modes under multiple coding modes, including: For each coding mode, at least one prediction mode under the coding mode is used to predict the current CU to obtain at least one prediction block of the current CU; Based on the rate-distortion values ​​between the multiple prediction blocks corresponding to the multiple coding modes and the current CU, a first number of candidate prediction modes are selected from the multiple prediction modes.

3. The method according to claim 2, wherein, Based on the rate-distortion values ​​between multiple prediction blocks corresponding to the multiple coding modes and the current CU, a first number of candidate prediction modes are selected from the multiple prediction modes, including: For each coding mode, a second number of candidate prediction modes are selected from at least one prediction mode under the coding mode, based on the rate-distortion value between at least one prediction block corresponding to the coding mode and the current CU. Based on the rate-distortion value between the prediction block and the current CU obtained under the second number of candidate prediction modes corresponding to each of the multiple coding modes, a first number of candidate prediction modes are selected from the second number of candidate prediction modes under the multiple coding modes.

4. The method according to claim 2, wherein, Based on the multiple candidate modes under the multiple coding modes, multiple reconstruction blocks of the current coding unit (CU) are obtained, including: For each candidate mode, a transformation operation is performed on the residual block between the current CU and the prediction block obtained under the candidate prediction mode corresponding to the candidate mode, based on the transformation mode under the candidate mode, to obtain the transformation coefficients; The transformation coefficients are quantized based on the quantization pattern under the candidate pattern to obtain quantized coefficients; The current CU is reconstructed based on the quantization coefficients to obtain the reconstructed block of the current CU.

5. The method according to any one of claims 1-4, wherein, The first and second quantities are preset or determined based on the context information of the current CU.

6. The method according to any one of claims 1-4, wherein, The rate distortion value is the sum of absolute errors or the sum of absolute transformation errors.

7. A video encoding apparatus, comprising: The prediction pattern search module is configured to select a first number of candidate prediction patterns from multiple prediction patterns in multiple coding modes, wherein each coding mode includes at least one prediction pattern. The candidate mode search module is configured to: for each candidate prediction mode in a first number of candidate prediction modes, combine the candidate prediction mode with each transformation mode and each quantization mode in the encoding mode corresponding to the candidate prediction mode to obtain multiple candidate modes, wherein each candidate mode in the multiple candidate modes includes a corresponding prediction mode, transformation mode and quantization mode. as well as The optimal mode determination module is configured to: obtain multiple reconstructed blocks of the current coding unit (CU) based on the multiple candidate modes among the multiple coding modes; and select the optimal mode for encoding the current CU from the multiple candidate modes among the multiple coding modes based on the rate-distortion value between the current CU and the multiple reconstructed blocks.

8. An apparatus for video encoding, comprising: One or more processors; as well as A memory, coupled to the one or more processors and configured to store instructions executable by the one or more processors. The one or more processors are configured to perform the method according to any one of claims 1-6 when executing the instructions.

9. A non-transitory computer-readable storage medium for storing computer-executable instructions and a bit stream, wherein the computer-executable instructions, when executed by one or more computer processors, cause the one or more computer processors to perform the method according to any one of claims 1-6 to generate the bit stream.

10. A computer program product having instructions that, when executed by one or more processors, cause the one or more processors to perform the method according to any one of claims 1-6.