Video encoding method, apparatus, electronic device, storage medium, and program product

By calculating the center distance of the transform coefficients to determine the quantization method, the problem of high computational complexity of RDOQ is solved. This reduces computational complexity and improves coding efficiency without weakening rate-distortion performance.

CN123145403APending Publication Date: 2026-11-20BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611588019.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-14
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing video coding techniques have high computational complexity in rate-distortion optimized quantization (RDOQ) and existing methods fail to effectively utilize the distance characteristics between the transform coefficient amplitude and the quantization decision boundary, resulting in unnecessary computational increases.

Method used

The quantization method is determined by calculating the center distance of the transform coefficients, i.e. the difference between the amplitude and the inverse quantization value of the regular quantization level. Different rate-distortion optimized quantization methods are adopted to reduce the number of candidate quantization levels and reduce computational complexity.

Benefits of technology

While maintaining rate-distortion performance, the computational complexity of rate-distortion optimized quantization is significantly reduced, thus improving coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145403A_ABST
    Figure CN123145403A_ABST
Patent Text Reader

Abstract

The present disclosure provides a video coding method, device, electronic equipment, storage medium and program product. The video coding method can include: obtaining a center distance of each transform coefficient in a current transform block, wherein the center distance represents a difference between an amplitude of the transform coefficient and a dequantization value of a regular quantization level corresponding to the transform coefficient, wherein the regular quantization level is obtained by performing regular quantization on the transform coefficient; determining a quantization manner of the each transform coefficient according to the center distance of the each transform coefficient; and performing quantization on the each transform coefficient based on the determined quantization manner of the each transform coefficient.
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, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] Various electronic devices support digital video. These devices transmit and receive, or otherwise transfer, digital video data via communication networks, and / or store digital video data on storage devices. Because communication networks have limited bandwidth capacity and storage devices have limited storage resources, video data can be compressed using one or more video codec standards before transmission or storage to generate coded video data using a lower bit rate, while avoiding or minimizing video quality degradation. Summary of the Invention

[0003] According to one aspect of this disclosure, a video coding method is provided, the video coding method comprising: obtaining the center distance of each transform coefficient in a current transform block, wherein the center distance represents the difference between the magnitude of the transform coefficient and the inverse quantization value of a normal quantization level corresponding to the transform coefficient, wherein the normal quantization level is obtained by performing normal quantization on the transform coefficient; determining the quantization mode of each transform coefficient based on the center distance of each transform coefficient; and performing quantization on each transform coefficient based on the determined quantization mode of each transform coefficient.

[0004] Optionally, determining the quantization method of each transform coefficient based on the center distance of each transform coefficient includes: obtaining a threshold for determining the quantization method; comparing the center distance of each transform coefficient with the threshold to determine the quantization method of each transform coefficient.

[0005] Optionally, the center distance of each transform coefficient is compared with the threshold to determine the quantization method of each transform coefficient, including: determining to use a conventional quantization method based on the center distance being less than a first threshold among the thresholds; determining to use a first rate-distortion optimized quantization method based on the center distance being greater than a second threshold among the thresholds; and determining to use a second rate-distortion optimized quantization method based on the center distance being greater than or equal to the first threshold and less than or equal to the second threshold; wherein the first threshold is less than the second threshold.

[0006] Optionally, the first rate-distortion optimized quantization method represents rate-distortion optimized quantization using the full candidate quantization level set, and the second rate-distortion optimized quantization method represents rate-distortion optimized quantization using the reduced candidate quantization level set, wherein the number of candidate quantization levels included in the full candidate quantization level set is greater than the number of candidate quantization levels included in the reduced candidate quantization level set.

[0007] Optionally, obtaining the threshold for determining the quantization method includes: obtaining a quantization ambiguity index of the current transform block, wherein the quantization ambiguity index represents the proportion of the number of transform coefficients in the current transform block whose center distance is greater than a third threshold to the total number of all non-zero transform coefficients in the current transform block; and determining the threshold for determining the quantization method based on the quantization ambiguity index.

[0008] According to another aspect of this disclosure, a video encoding apparatus is provided, the apparatus comprising: a distance determination module configured to obtain a center distance of each transform coefficient in a current transform block, wherein the center distance represents the difference between the magnitude of the transform coefficient and the inverse quantization value corresponding to a normal quantization level of the transform coefficient, wherein the normal quantization level is obtained by performing normal quantization on the transform coefficient; a quantization determination module configured to determine a quantization mode for each transform coefficient based on the center distance of each transform coefficient; and a quantization execution module configured to perform quantization on each transform coefficient based on the determined quantization mode of each transform coefficient.

[0009] Optionally, the quantization determination module is configured to: obtain a threshold for determining the quantization method; compare the center distance of each transform coefficient with the threshold to determine the quantization method of each transform coefficient.

[0010] Optionally, the quantization determination module is configured to: determine to use a conventional quantization method based on the center distance being less than a first threshold among the thresholds; determine to use a first rate-distortion optimized quantization method based on the center distance being greater than a second threshold among the thresholds; and determine to use a second rate-distortion optimized quantization method based on the center distance being greater than or equal to the first threshold and less than or equal to the second threshold; wherein the first threshold is less than the second threshold.

[0011] Optionally, the first rate-distortion optimized quantization method represents rate-distortion optimized quantization using the full candidate quantization level set, and the second rate-distortion optimized quantization method represents rate-distortion optimized quantization using the reduced candidate quantization level set, wherein the number of candidate quantization levels included in the full candidate quantization level set is greater than the number of candidate quantization levels included in the reduced candidate quantization level set.

[0012] Optionally, the quantization determination module is configured to: obtain a quantization ambiguity index of the current transform block, wherein the quantization ambiguity index represents the proportion of the number of transform coefficients in the current transform block whose center distance is greater than a third threshold to the total number of all non-zero transform coefficients in the current transform block; and determine the threshold for determining the quantization method based on the quantization ambiguity index.

[0013] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and at least one memory storing computer-executable instructions, wherein the computer-executable instructions, when executed by the at least one processor, cause the at least one processor to perform the video encoding method as described above.

[0014] According to another aspect of this disclosure, a computer-readable storage medium is provided that, when instructions in the computer-readable storage medium are executed by at least one processor, causes at least one processor to perform the video encoding method as described above.

[0015] According to another aspect of this disclosure, a computer program product is provided, including computer instructions that, when executed by at least one processor, implement the video encoding method described above.

[0016] According to embodiments of this disclosure, a suitable quantization method for the transform coefficient is determined by considering the distance characteristics between the transform coefficient amplitude and the inverse quantization value of its standard quantization level, thereby significantly reducing the computational complexity of rate-distortion optimized quantization while ensuring rate-distortion performance.

[0017] 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

[0018] 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.

[0019] 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.

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

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

[0022] Figures 4A to 4EThis is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes according to some embodiments of this disclosure.

[0023] Figure 5 This is a flowchart illustrating a video encoding method according to some embodiments of the present disclosure.

[0024] Figure 6 This is a block diagram illustrating a video encoding apparatus according to some embodiments of the present disclosure.

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

[0026] 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.

[0027] It should be noted that the terms "first," "second," etc., used in the specification, claims, and drawings of this disclosure are used to distinguish objects and not 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.

[0028] In video coding, quantization is a core step in eliminating visual redundancy and controlling the coding bitrate. Basic quantization (or conventional quantization) rounds the transformed coefficients (also called transform coefficients) according to the quantization step size to obtain quantized integer coefficients (also called quantization coefficients or quantization levels). However, basic quantization only aims to minimize quantization error and does not consider the impact of the coding bitrate, which may lead to suboptimal rate-distortion performance.

[0029] To improve compression efficiency, existing video coding standards (such as VVC and HEVC) have introduced Rate-Distortion Optimized Quantization (RDOQ). The core idea of ​​RDOQ is that for each non-zero transform coefficient, in addition to considering the standard quantization coefficient (also known as the regular quantization coefficient) obtained from the basic quantization, candidate quantization coefficients one or even several levels lower than the standard quantization coefficient are also examined. By calculating the rate-distortion cost J = D + λ × R for each candidate quantization coefficient, the candidate quantization coefficient with the lowest cost is selected as the final quantization result. Furthermore, RDOQ also needs to determine whether the last non-zero transform coefficient should be set to zero (i.e., quantize this transform coefficient and all subsequent transform coefficients to zero) to reduce the number of encoded bits.

[0030] While RDOQ can significantly improve compression performance, its computational complexity is extremely high for the following reasons: (1) Rate-distortion comparison for multiple candidates for each coefficient: The rate-distortion cost of two or more candidate quantization coefficients needs to be calculated for each non-zero transform coefficient. The more candidate quantization coefficients there are, the more comparisons are required.

[0031] (2) Rate coupling among candidate quantization coefficients: Since entropy coding (such as CABAC) adopts a context-adaptive mechanism, changes in the quantization coefficient of a certain transform coefficient will affect the coding context of subsequent quantization coefficients, thus affecting the overall bit rate. Theoretically, the optimal RDOQ requires joint optimization of all quantization coefficients, but due to the exponential search space, in practice, a greedy algorithm is often used to make decisions one coefficient at a time, and the overhead of context switching still needs to be considered for each decision.

[0032] (3) Search for the last non-zero transform coefficient position: RDOQ needs to traverse multiple candidates for the last non-zero transform coefficient position and calculate the total rate distortion cost for each candidate, which further increases the computational load.

[0033] To address the above problems, the following methods were adopted in the relevant technologies.

[0034] (1) Methods based on quantization coefficient range restrictions: These methods restrict the range of RDOQ candidate quantization coefficients for each transform coefficient, for example, by only considering the standard quantization coefficient and the next lower level quantization coefficient. Although this type of method reduces the number of candidates, it applies the same strategy to all transform coefficients without distinguishing which transform coefficients truly require RDOQ decisions or which transform coefficients have optimal standard quantization results themselves, thus still resulting in unnecessary computation.

[0035] (2) The method based on all-zero block detection: Before quantization, a threshold is used to determine whether all transform coefficients of the current block will be quantized to zero. If it is determined to be an all-zero block, the entire quantization process is skipped. This type of method only handles the extreme case of all-zero blocks and does not work for blocks with non-zero transform coefficients.

[0036] (3) Method based on prediction of the last non-zero transform coefficient position: This method uses the statistical information of the last non-zero transform coefficient position of the coded block to predict the position of the last non-zero transform coefficient of the current block, thus reducing the position search range. This type of method focuses on accelerating the position search and does not involve accelerating the RDOQ decision within each coefficient.

[0037] None of the aforementioned techniques utilize the distance characteristic of the transform coefficient amplitude relative to the quantization decision boundary. The quantization decision boundary can be understood as the inverse quantization value of the quantization coefficient. In fact, which quantization coefficient is used after transform coefficient quantization essentially depends on which quantization coefficient's decision boundary its amplitude is closer to. For candidate quantization coefficients in RDOQ, if the amplitude of a transform coefficient is far from the decision boundaries of all candidate quantization coefficients (e.g., the amplitude is much larger than the inverse quantization value), then the standard quantization result is considered almost certainly optimal, and RDOQ comparison is unnecessary; conversely, if the amplitude is close to the decision boundaries of all candidate quantization coefficients, then the rate-distortion costs of different candidate quantization coefficients are considered similar, and RDOQ decision is meaningful. This degree of "closeness to the decision boundary" can be quantized using boundary distance, but existing technologies completely lack a hierarchical fast decision-making mechanism based on distance characteristics.

[0038] According to embodiments of this disclosure, a fast RDOQ algorithm based on center distance is proposed. Here, center distance can be understood as the distance between the magnitude of a transform coefficient and the inverse quantization value of the normal quantization level of that transform coefficient. Reference will be made below. Figures 1 to 7 The embodiments of this disclosure are described in detail.

[0039] 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 for later decoding 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.

[0040] like Figure 1 As shown, source device 12 includes a video source 18, a video encoder 20, and an output interface 22. The 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.

[0041] Video, whether captured, pre-captured, or computer-generated, can be encoded by video encoder 20. Encoded video data may include a series of images, each of which may include one or more sample arrays, for example, for monochrome, only luminance (Y); luminance and two chrominances in the YCbCr or YCgCo domain; or green, blue, and red in the GBR (also known as RGB) domain. For ease of reference and terminology in this application, in some embodiments, the variables and terms associated with each set having three sample arrays may be referred to as luminance and chrominance, where the two chrominance arrays may be referred to as Cb and Cr, regardless of the actual color representation used. Video data may be in chrominance format 4:0:0, chrominance format 4:2:0, chrominance format 4:2:2, or chrominance format 4:4:4, but this application is not limited thereto. The bit depth (BitDepth) of the samples in the sample array can be an integer ranging from 8 to 16, for example, a BitDepth value of 8, 9, 10, 11, 12, 13, 14, 15, or 16. It should be noted that the value of BitDepth is not limited to this, but can be any other value proposed in the future.

[0042] Encoded video data can be directly transmitted to the target device 14 via link 16 through the output interface 22 of the source device 12. Output interface 22 may include a modem and / or a transmitter. Link 16 may include any type of wireless communication medium or device and / or any type of wired communication medium or device capable of transmitting encoded video data from the source device 12 to the target device 14. The encoded video data may also (or alternatively) be stored on storage device 32 for later access by the target device 14 or by other devices via, for example, input interface 28, for decoding and / or playback. Storage device 32 may include any data storage medium of various distributed or locally accessed data storage media, such as hard disk drives, Blu-ray discs, digital universal discs (DVDs), compact disc read-only memory (CD-ROMs), flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0043] 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. Alternatively, target device 14 may access stored video data from storage device 32 via streaming, downloading, or a combination of both. Encoded video data may include various syntax elements generated by video encoder 20 for use by video decoder 30 when decoding the video data. Display device 34 may be an integrated display device or an external display device configured to communicate with target device 14 and may display the decoded video data to a user.

[0044] The video encoder 20 and video decoder 30 can operate (e.g., encode and decode video data) according to proprietary or industry standards (e.g., Universal Video Codec (VVC), Joint Exploratory Test Model (JEM), High Efficiency Video Codec (HEVC / H.265), Advanced Video Codec (AVC / H.264), Moving Picture Experts Group (MPEG) codec) or extensions of such standards. It should be understood that this application is not limited to any specific video coding / decoding standard and may be applicable to other current and future video coding / decoding standards.

[0045] 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 the 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, either of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device.

[0046] In some implementations, components of source device 12 and / or target device 14 (e.g., Figure 1 , Figure 2 and / or Figure 3At least some of the components shown herein can operate in a cloud computing service network such as Software as a Service (SaaS), Platform as a Service (PaaS), or Infrastructure as a Service (IaaS), where the cloud computing service network can provide software, platform, and / or infrastructure. In some embodiments, one or more components of source device 12 and / or target device 14 not included in the cloud computing service network can be located in one or more client devices, and the one or more client devices can communicate with server computers in the cloud computing service network via wireless communication networks or wired communication networks. In one embodiment, at least some of the operations described herein can be implemented as cloud-based services provided by one or more server computers, wherein the one or more server computers are implemented by at least some of the components of source device 12 and / or target device 14 in the cloud computing service network; and one or more other operations described herein can be implemented by one or more client devices. In some embodiments, the cloud computing service network can be a private cloud, a public cloud, or a hybrid cloud. Without departing from the scope of this disclosure, terms such as “cloud,” “cloud computing,” and “cloud-based” are used interchangeably as appropriate. It should be understood that this disclosure is not limited to implementation in the aforementioned cloud computing service networks. Instead, this disclosure can also be implemented in any other type of computing environment currently known or to be developed in the future.

[0047] Figure 2 This is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in this application.

[0048] 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 segmentation unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (IBC) 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. It should be noted that this application is not limited to the embodiments described herein regarding CCSAO technology. It can also be applied to situations where one or more samples of any one of the luminance component and two chrominance components (as mentioned above, for ease of reference and terminology in this application, in the YCbCr domain, the luminance component and the two chrominance components can represent Y, Cb, and Cr; in the YCgCo domain, the luminance component and the two chrominance components can represent Y, Cg, and Co; or in the RGB domain, the luminance component and the two chrominance components can represent G, B, and R) are used to select an offset for a sample of any other component among the luminance component and the two chrominance components, in order to modify the sample of that other component based on the selected offset. Alternatively, a SAO technology is also provided, which is substantially the same as CCSAO technology, except that in this SAO technology, an offset is selected for a sample of any one of the luminance component and the two chrominance components based on one or more samples of that one component, in order to modify the sample of that one component based on the selected offset. Furthermore, it should be noted that the first component mentioned herein can be either the luminance component or either of the two chrominance components, the second component mentioned herein can be either the luminance component or either of the two chrominance components, and the third component mentioned herein can be the remaining component of the luminance component and the two chrominance components. 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.

[0049] 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 1The video source 18 shown receives video data from the video data memory 40. The DPB 64 is a buffer that stores reference video data (e.g., reference frames or pictures) used by the video encoder 20 when encoding the video data. The video data memory 40 and DPB 64 can be formed from any of a variety of memory devices. In various examples, the video data memory 40 may be on-chip along with other components of the video encoder 20, or off-chip relative to those components. 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".

[0050] like Figure 2 As shown, after receiving video data, segmentation unit 45 segments the video data into video blocks. This segmentation may also include segmenting the video frame into strips, tiles (e.g., a collection of video blocks) or other larger coding units (CUs) according to a predefined splitting structure associated with the video data (e.g., a quadtree (QT) structure). A video frame is, or can be considered, a two-dimensional array or matrix of samples with sample values. Samples in the array may also be referred to as pixels or image elements (pel). The number of samples in the horizontal and vertical directions (or axes) of the array or image defines the size and / or resolution of the video frame. For example, a video frame can be divided into multiple video blocks by using QT segmentation. A video block is again, or can be considered, a two-dimensional array or matrix of samples with sample values, but its dimension is smaller than that of the video frame. The number of samples in the horizontal and vertical directions (or axes) of the video block defines the size of the video block. By iteratively using, for example, QT segmentation, binary tree (BT) segmentation, or ternary tree (TT) segmentation, or any combination thereof, a video block can be further segmented into one or more block partitions or sub-blocks (which can again form blocks). It should be noted that the term "block" or "video block" as used herein can refer to 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.

[0051] 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 distortion level), such as one of several intra-frame or inter-frame predictive coding modes. Prediction processing unit 41 can provide the resulting intra-frame 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 at least one of the syntax elements (e.g., motion vectors, intra-frame or inter-frame mode indicators, segmentation information, and other such syntax information) to entropy coding unit 56.

[0052] To select a suitable intra-predictive coding mode for the current video block, the intra-predictive processing unit 46 may perform intra-predictive coding of the current video block relative 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 the motion compensation unit 44 perform inter-predictive coding of the current video block relative to one or more prediction blocks in one or more reference frames to provide temporal prediction. The video encoder 20 may perform multiple coding passes, for example, to select a suitable coding mode for each block of video data.

[0053] In some implementations, motion estimation unit 42 generates a motion vector for the current block according to a predetermined pattern within the video frame sequence during motion estimation. The motion vector can indicate the displacement of a video block within the current frame relative to a predicted block within a reference frame associated with the current block being encoded. The predetermined pattern can designate video frames in the sequence as P-frames or B-frames. In some implementations, the motion vector prediction value (MVP) of the current block is subtracted from the actual motion vector of the current block to produce the motion vector difference (MVD) of the current block, where the MVP can be determined based on motion information from spatially adjacent blocks and / or temporally co-located blocks of the current block. The MVP and MVD information can then be encoded into the video bitstream instead of the actual motion vector of the current block. IBC unit 48 can determine the vectors (e.g., block vectors) for IBC encoding / decoding in a similar manner to how motion estimation unit 42 determines the motion vectors for inter-frame prediction, or the block vectors can be determined using motion estimation unit 42. It should be noted that the IBC pattern can be considered an intra-frame prediction pattern, or a prediction pattern other than intra-frame and inter-frame prediction patterns.

[0054] Regarding pixel differences, the predicted block for a video block can be, or can correspond to, a block or reference block of a reference frame considered to closely match the video block to be encoded. Pixel differences can be determined by sum of absolute differences (SAD), sum of squared differences (SSD), or other difference metrics. In some implementations, the video encoder 20 can compute values ​​for sub-integer pixel positions of the reference frame stored in the DPB 64. For example, the video encoder 20 can interpolate values ​​for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Therefore, the motion estimation unit 42 can perform motion search relative to full-pixel positions and fractional pixel positions and output a motion vector with fractional pixel accuracy.

[0055] The motion estimation unit 42 determines the motion vector information of a video block in an inter-frame predictive coding frame by comparing the position of the video block with the position of the predicted block of a reference frame selected from either a first reference frame list (list 0) or a second reference frame list (list 1), where each reference frame list identifies one or more reference frames stored in the DPB 64. The motion estimation unit 42 sends the determined motion vector information to the motion compensation unit 44, and then to the entropy coding unit 56.

[0056] Motion compensation performed by motion compensation unit 44 may involve acquiring or generating prediction blocks based on motion vector information determined by motion estimation unit 42. Upon receiving motion vector information for the current video block, motion compensation unit 44 may locate the prediction block pointed to by the motion vector in a reference frame list within a reference frame list, retrieve the prediction block from DPB 64, and forward the prediction block to adder 50. Motion compensation unit 44 may also generate syntax elements associated with video blocks of a video frame for use by video decoder 30 when decoding video blocks of the video frame. Syntax elements may include, for example, syntax elements defining motion vectors for identifying prediction blocks, any flags indicating prediction modes, or any other syntax information described herein. It should be noted that motion estimation unit 42 and motion compensation unit 44 may be highly integrated, but are described separately for conceptual purposes.

[0057] In some implementations, IBC unit 48 may generate vectors and acquire prediction blocks in a manner similar to that described above in conjunction with motion estimation unit 42 and motion compensation unit 44, but these prediction blocks are in the same frame as the current block being encoded, and these vectors are referred to as block vectors rather than motion vectors.

[0058] In other examples, IBC unit 48 may use motion estimation unit 42 and motion compensation unit 44, in whole or in part, to perform such functions for IBC prediction according to the embodiments described herein. In any case, for intra-block copying, in terms of pixel difference, the predicted block may be a block considered to closely match the block to be encoded, the pixel difference may be determined by SAD, SSD, or other difference metrics, and identifying the predicted block may include calculating values ​​for sub-integer pixel positions.

[0059] As an alternative to the inter-frame prediction performed by the motion estimation unit 42 and the motion compensation unit 44 as described above, or the intra-block copy prediction performed by the IBC unit 48, the intra-frame prediction processing unit 46 can perform intra-frame prediction on the current video block. Specifically, the intra-frame prediction processing unit 46 can determine the intra-frame prediction mode for encoding the current block. The intra-frame prediction processing unit 46 can provide information indicating the selected intra-frame prediction mode for the block to the entropy coding unit 56. The entropy coding unit 56 can encode the information indicating the selected intra-frame prediction mode into the bitstream.

[0060] After prediction processing unit 41 determines the prediction block for the current video block, adder 50 forms a residual block by subtracting the pixel values ​​of the prediction block from the pixel values ​​of the current video block (forming a pixel difference). The pixel difference may include a luminance component difference, a chrominance component difference, or both. 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 transforms the residual video data into residual transform coefficients using one or more transforms (e.g., Discrete Cosine Transform (DCT) or a conceptually similar transform).

[0061] 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.

[0062] After quantization, the entropy coding unit 56 entropy codes 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), probabilistic interval segmented 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 1The 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.

[0063] The inverse quantization unit 58 and the inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain for generating a reference block for predicting other video blocks.

[0064] Adder 62 adds the reconstructed residual block to the predicted block to produce a reference block to be stored in DPB 64.

[0065] 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 includes a motion compensation unit 82, an intra-frame prediction unit 84, and an IBC 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.

[0066] In some examples, the units of video decoder 30 may be assigned tasks to perform embodiments of the present disclosure. Furthermore, in some examples, embodiments of the present disclosure may be distributed across one or more units of video decoder 30.

[0067] Video data memory 79 can store video data, such as encoded video bitstreams, that will be decoded by other components of video decoder 30. The video data stored in video data memory 79 can be obtained, for example, from 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). Video data memory 79 may include an encoded picture buffer (CPB) that stores encoded video data from the encoded video bitstream. The DPB 92 of video decoder 30 stores reference video data for use by video decoder 30 when decoding video data. Video data memory 79 and DPB 92 can be formed from any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. In some examples, video data memory 79 may be on-chip along with other components of video decoder 30, or off-chip relative to those components.

[0068] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of encoded video frames and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 performs entropy decoding on the bitstream to generate quantization coefficients, motion vector information 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.

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

[0070] When a video frame is encoded as an inter-frame predictive coded (i.e., B or P) frame, the motion compensation unit 82 generates one or more prediction blocks for the current video frame based on motion vector information 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.

[0071] In some examples, when encoding a video block according to the IBC mode described herein, IBC unit 85 generates a predicted block for the current video block based on block vector information and other syntax elements received from entropy decoding unit 80. The predicted block can be located within a reconstructed region of the same image as the current video block, defined by video encoder 20.

[0072] Motion compensation unit 82 and / or IBC unit 85 determine prediction information for video blocks in the current video frame by parsing vector information and other syntax elements, and then use the prediction information to generate prediction blocks for the current video blocks. For example, motion compensation unit 82 uses some syntax elements from the received syntax elements to determine the prediction mode for encoding video blocks in the video frame, the inter-frame prediction frame type (e.g., B or P), construction information for one or more reference frames in the reference frame list for the frame, motion vectors for each inter-frame prediction encoded video block in the frame, the inter-frame prediction state for each inter-frame prediction encoded video block in the frame, and other information for decoding video blocks in the current video frame.

[0073] Similarly, IBC unit 85 can use some of the syntax elements in the received syntax elements, such as flags, to determine which video blocks in the current video frame are predicted using the IBC mode, which video blocks in the frame are in the reconstruction region and should be stored in the DPB 92, the block vector for each IBC predicted video block in the frame, the IBC prediction state for each IBC predicted video block in the frame, and other information for decoding the video blocks in the current video frame.

[0074] 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.

[0075] Similar to the process of selecting a prediction block in a reference frame during inter-frame prediction of a video block, both the video encoder 20 and the video decoder 30 need to employ a set of rules to construct a motion vector candidate list (also known as a "merging list") for the current block using those potential candidate motion vectors associated with spatially neighboring and / or temporally co-located blocks. Then, a member is selected from the motion vector candidate list as the motion vector prediction value for the current block. By doing so, it is not necessary to send the motion vector candidate list itself from the video encoder 20 to the video decoder 30, and the index of the selected motion vector prediction value within the motion vector candidate list is sufficient for both the video encoder 20 and the video decoder 30 to encode and decode the current block using the same motion vector prediction value from the motion vector candidate list.

[0076] The dequantization unit 86 dequantizes the quantized transform coefficients, which are 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. 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.

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

[0078] In a typical video encoding and decoding process, a video sequence usually consists of an ordered set of frames or images. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luminance samples. SCb is a two-dimensional array of Cb chrominance samples. SCr is a two-dimensional array of Cr chrominance samples. In other instances, a frame may be monochrome and therefore consist of only a two-dimensional array of luminance samples.

[0079] like Figure 4AAs shown, the video encoder 20 (or more specifically, the segmentation unit 45) generates an encoded representation of a frame by first segmenting the frame into a set of CTUs. A video frame may include an integer number of CTUs ordered consecutively from left to right and top to bottom in raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set such that all CTUs in the video sequence have the same size, one of 128×128, 64×64, 32×32, and 16×16. However, it should be noted that this application is not limited to a specific size. Figure 4B As shown, each CTU may include a CTB for luma samples, two corresponding CTBs for chroma samples, and syntax elements for encoding samples of the CTBs. The syntax elements describe the properties of different types of units of the encoded pixel block and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors, and / or other parameters. In a monochrome image or an image with three separate color planes, a CTU may include a single CTB and syntax elements for encoding samples of that CTB. A CTB may be an N×N sample block.

[0080] To achieve better performance, the video encoder 20 can recursively perform tree segmentation on the CTU's CTB, such as binary tree segmentation, ternary tree segmentation, quadtree segmentation, or a combination thereof, and divide the CTU into smaller CUs. For example... Figure 4C As described, the 64×64 CTU 400 is first divided into four smaller CUs, each with a block size of 32×32. Of these four smaller CUs, CU 410 and CU 420 are each divided into four CUs with a block size of 16×16. The two 16×16 CUs, CU 430 and CU 440, are further divided into four CUs with a block size of 8×8. Figure 4D Depicting as shown Figure 4C The final result of the CTU 400 partitioning process described in the figure is a quadtree data structure, where each leaf node of the quadtree corresponds to a CU of a corresponding size ranging from 32×32 to 8×8. Similar to... Figure 4B The CTU depicted in the image may include, for example, a CB for a luminance sample and two corresponding CBs for a chrominance sample, as well as syntax elements for encoding samples of the CBs. In a monochrome image or an image with three separate color planes, a CU may include a single CB and a syntax structure for encoding samples of the CB. It should be noted that... Figure 4C and Figure 4DThe quadtree partitioning depicted is for illustrative purposes only, and a CTU can be split into multiple CUs based on quadtree partitioning / ternary tree partitioning / binary tree partitioning to adapt to varying local characteristics. In multi-type tree structures, a CTU is partitioned according to a quadtree structure, and each quadtree leaf CU can be further partitioned according to a binary and / or ternary tree structure. Figure 4E As shown, a CB with width W and height H has five possible segmentation types: quadrilateral segmentation, horizontal binary segmentation, vertical binary segmentation, horizontal ternary segmentation, and vertical ternary segmentation.

[0081] In some implementations, the video encoder 20 may further segment the CB of the CU into one or more M×N PBs. A PB is a rectangular (square or non-square) sample block to which the same prediction (inter-frame, intra-frame, etc.) is applied. The PU of the CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements for predicting the PBs. In a monochrome image or an image with three separate color planes, a PU may include a single PB and a syntax structure for predicting the PBs. The video encoder 20 may generate predicted luma blocks, predicted Cb blocks, and predicted Cr blocks for each PU of the CU, representing the luma PB, Cb PB, and Cr PB.

[0082] In addition, such as Figure 4C As shown, the video encoder 20 can use quadtree partitioning to decompose the luminance residual block, Cb residual block, and Cr residual block of the CU into one or more luminance transform blocks, Cb transform blocks, and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) sample block to which the same transform is applied. A TU of the CU can include a TB for the luminance sample, two corresponding TBs for the chrominance sample, and syntax elements for transforming the TBs. Therefore, each TU of the CU can be associated with a luminance TB, a Cb TB, and a Cr TB. In some examples, the luminance TB associated with a TU can be a sub-block of the CU's luminance residual block. A Cb TB can be a sub-block of the CU's Cb residual block. A Cr TB can be a sub-block of the CU's Cr residual block. In a monochrome image or an image with three separate color planes, a TU can include a single TB and syntax structures for transforming the samples of that TB.

[0083] Figure 5 This is a flowchart illustrating a video encoding method according to some embodiments of the present disclosure. Figure 5 The method shown can be derived from Figure 1 The video encoder 20 in the middle is executed.

[0084] Reference Figure 5In step S501, the center distance of each transform coefficient in the current transform block is obtained. The center distance can represent the difference between the magnitude of the transform coefficient and the inverse quantization value corresponding to the normal quantization level of the transform coefficient, wherein the normal quantization level is obtained by performing normal quantization on the transform coefficient.

[0085] According to an embodiment, for each transform coefficient in the current transform block, before performing RDOQ, the center distance from the magnitude of the transform coefficient to the quantization decision center (i.e., the inverse quantization value of the normal quantization level of the transform coefficient) can be calculated. Here, the quantization decision center can also be referred to as the center coefficient or center transform coefficient, which represents the reconstructed transform coefficient value (i.e., the inverse quantization value of the quantization level) corresponding to the normal quantization level of the transform coefficient.

[0086] As an example, for quantization coefficients L Quantitative Decision Center C L Defined as such that the quantized transform coefficients are equal to L Quantitative Decision Center C L yes L The inverse quantization value. Center distance. i Indicates the first i Transformation coefficients c i Amplitude | c i The difference between the transformation coefficient and its quantization decision center reflects the degree to which the transformation coefficient deviates from the quantization decision center, and its value ranges from (0, 0.5). The smaller the difference, the closer it is to the quantization decision center, and the more accurate the standard quantization result is.

[0087] As an example, the standard quantification level can be calculated using the following equation (1): L i = round(| c i | (1) in, L i Represents the transformation coefficients c i The standard quantization level, also known as the prequantization amplitude. `round()` represents the rounding operation. Indicates the quantization step size.

[0088] The following equation (2) can be used to calculate the quantitative decision center. C Li : CLi = L i × (2) The center distance can be calculated using the following equation (3): i = (| | c i | - C Li |) (3) The above examples are merely illustrative, and this disclosure is not limited thereto.

[0089] In step S502, the quantization method of each transform coefficient is determined based on the center distance of each transform coefficient.

[0090] According to an embodiment, a threshold for determining the quantization method can be obtained. The center distance of each transform coefficient is compared with the threshold to determine the quantization method of each transform coefficient. For example, the quantization method of the transform coefficient can be determined based on the preset distance range to which the center distance belongs. Here, the quantization method may include quantization methods included in the current video codec, such as conventional quantization or RDOQ. Multiple preset distance ranges can be preset, and each preset distance range may correspond to a quantization method. The corresponding quantization method is determined by judging the preset distance range to which the center distance belongs.

[0091] According to the embodiments, a conventional quantization method can be determined based on the center distance being less than a first threshold; a first rate-distortion optimized quantization method can be determined based on the center distance being greater than a second threshold; and a second rate-distortion optimized quantization method can be determined based on the center distance being greater than or equal to the first threshold and less than or equal to the second threshold. The first threshold is less than the second threshold. For example, the first rate-distortion optimized quantization method represents rate-distortion optimized quantization using the complete candidate quantization level set, which can be the original complete RDOQ. The second rate-distortion optimized quantization method represents rate-distortion optimized quantization using a reduced candidate quantization level set, wherein the number of candidate quantization levels in the complete candidate quantization level set is greater than the number of candidate quantization levels in the reduced candidate quantization level set.

[0092] As an example, the center distance of each transform coefficient can be used as an example. i The transform coefficients in the transform block are divided into three categories: 1) Deterministic coefficient category: i.e., the center distance is less than the first threshold T low For the transformation coefficients, the standard quantization results can be directly used, skipping the RDOQ decision. For example, T lowInitialized to 0.2.

[0093] 2) Complete RDOQ category: i.e., the center distance is greater than the second threshold T high For the transform coefficients, the original full RDOQ decision can be performed, i.e., the RDOQ specified in the current video codec standard. For example, T high Initialized to 0.3.

[0094] 3) A small number of candidate categories: that is, the center distance is within T low and T high The transform coefficients between these coefficients can be used to perform an RDOQ decision on reducing the candidate quantization level set, considering only a small number of candidate quantization coefficients. In this disclosure, the number of quantization levels in the reduced candidate quantization level set can be preset or adaptively determined based on the encoding / decoding parameters of the current block.

[0095] The above categories are merely illustrative. This disclosure is not limited to dividing the categories into three categories. The number of categories can be adjusted as needed, such as further subdividing the categories to create more categories.

[0096] Furthermore, the determination of each category can be based on a predetermined percentage rather than relying on empirical thresholds.

[0097] According to embodiments of this disclosure, the threshold for determining the quantization method can be adaptively determined.

[0098] As an example, the quantization ambiguity index of the current transform block can be obtained, where the quantization ambiguity index represents the proportion of the number of transform coefficients in the current transform block whose center distance is greater than the third threshold to the total number of all non-zero transform coefficients in the current transform block; the threshold used to determine the quantization method is determined based on the quantization ambiguity index.

[0099] For example, the quantization ambiguity index of the current transform block can be calculated. The quantization ambiguity index is defined as the distance between the centers in the transform block being greater than a third threshold T. mid The proportion of the number of transform coefficients to the total number of non-zero transform coefficients. For example, T mid T is 0.25. mid With T low and T high There is no explicit magnitude relationship between them. The larger the value of the quantization ambiguity index, the greater the adjustable range of RDOQ. The third threshold can be preset or adaptively determined based on the encoding and decoding parameters of the current block.

[0100] T is adaptively adjusted based on the fuzziness index. low and T highTo balance the acceleration effect of RDOQ with rate-distortion performance. For example, at a fixed threshold (such as a first threshold and / or a second threshold), a higher quantization ambiguity index value means that it may degenerate into each transform coefficient using the original full RDOQ. In this case, the threshold can be appropriately increased to reduce the proportion of transform coefficients quantized using the full RDOQ, thereby reducing complexity. For example, the threshold can be adaptively adjusted according to preset levels based on the quantization ambiguity index. A mapping relationship between the quantization ambiguity index and the threshold can be constructed to determine the corresponding threshold based on the quantization ambiguity index.

[0101] In step S503, each transform coefficient is quantized based on the determined quantization method for each transform coefficient.

[0102] After the quantization method decision for each transformation coefficient is completed, the corresponding quantization method is executed to output the final quantization result.

[0103] According to embodiments of this disclosure, by utilizing the distance characteristics between the magnitude of the transform coefficients and the quantization decision center, the “boundary-sensitive” coefficients that truly require RDOQ multi-candidate comparison and the “boundary-far” coefficients that can directly adopt the standard quantization results are distinguished, thereby achieving hierarchical RDOQ fast decision-making and significantly reducing the computational complexity of RDOQ while ensuring rate-distortion performance.

[0104] Figure 6 This is a block diagram illustrating a video encoding apparatus according to some embodiments of the present disclosure. Figure 6 The video encoding apparatus 600 shown may include a distance determination module 601, a quantization determination module 602, and a quantization execution module 603. The module names and number of modules are merely exemplary, and this disclosure is not limited thereto.

[0105] The distance determination module 601 can obtain the center distance of each transform coefficient in the current transform block, wherein the center distance represents the difference between the magnitude of the transform coefficient and the inverse quantization value of the normal quantization level corresponding to the transform coefficient, wherein the normal quantization level is obtained by performing normal quantization on the transform coefficient. For example, the center distance can be calculated according to the equations (1), (2) and (3) above.

[0106] The quantization determination module 602 can determine the quantization method of each transformation coefficient based on the center distance of each transformation coefficient.

[0107] The quantization execution module 603 can perform quantization on each of the transformation coefficients based on a determined quantization method for each transformation coefficient.

[0108] According to an embodiment, the quantization determination module 602 can obtain a threshold for determining the quantization method; and compare the center distance of each transform coefficient with the threshold to determine the quantization method of each transform coefficient.

[0109] According to an embodiment, the quantization determination module 602 can determine to use a conventional quantization method based on the center distance being less than a first threshold among the thresholds; determine to use a first rate-distortion optimized quantization method based on the center distance being greater than a second threshold among the thresholds; and determine to use a second rate-distortion optimized quantization method based on the center distance being greater than or equal to the first threshold and less than or equal to the second threshold; wherein the first threshold is less than the second threshold.

[0110] According to an embodiment, the first rate-distortion optimized quantization method represents rate-distortion optimized quantization using a complete candidate quantization level set, and the second rate-distortion optimized quantization method represents rate-distortion optimized quantization using a reduced candidate quantization level set, wherein the number of candidate quantization levels included in the complete candidate quantization level set is greater than the number of candidate quantization levels included in the reduced candidate quantization level set.

[0111] According to an embodiment, the quantization determination module 602 can obtain the quantization ambiguity index of the current transform block, wherein the quantization ambiguity index represents the proportion of the number of transform coefficients in the current transform block whose center distance is greater than a third threshold to the total number of all non-zero transform coefficients in the current transform block; and the threshold for determining the quantization method is determined based on the quantization ambiguity index.

[0112] The video encoding device 600 can perform the above-mentioned functions. Figure 5 The operations described will not be repeated here.

[0113] Existing solutions typically decide whether to skip the RDOQ process based on "result" feedback, which requires performing a portion of the RDOQ calculation before obtaining the result. This disclosure, however, takes a fundamental approach, classifying variable coefficients based on "causes" to predict whether RDOQ is needed, thus avoiding premature execution of the RDOQ process.

[0114] Figure 7 A computing environment 710 coupled to a user interface 750 is shown. The computing environment 710 may be part of a data processing server. The computing environment 710 includes a processor 720, a memory 730, and an input / output (I / O) interface 740.

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

[0116] Memory 730 is configured to store various types of data to support the operation of computing environment 710. Memory 730 may include predefined software 732. Examples of such data include instructions for any application or method operating on computing environment 710, video datasets, image data, etc. Memory 730 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.

[0117] I / O interface 740 provides an interface between processor 720 and peripheral interface modules (such as keyboard, click wheel, buttons, etc.). I / O interface 740 can be coupled with encoders and decoders.

[0118] In embodiments, a non-transitory computer-readable storage medium or computer program product is also provided, including, for example, a plurality of programs in a memory 730 and / or a storage bitstream, said plurality of programs being executable by a processor 720 to perform the above-described encoding or decoding methods, said bitstream being generated by the above-described encoding method and / or to be decoded by the above-described decoding method. For example, the computer program product may include a non-transitory computer-readable storage medium. In one example, said plurality of programs may be executed by a processor 720 to (e.g., from...) Figure 2 The video encoder 20 in the process 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 720 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 720 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 720 to (e.g., to...) Figure 3The video decoder 30 in the middle transmits or stores the bit stream or data stream. Alternatively, the bit stream or data stream may be stored in a non-transitory computer-readable storage medium or a computer program product.

[0119] In an embodiment, a bitstream (e.g., including encoded video information) generated by the above encoding method and / or decoded by the above decoding method is provided.

[0120] In an embodiment, a computing device is also provided, comprising: one or more processors (e.g., processor 720); and a non-transitory computer-readable storage medium or memory 730 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. In one example, the one or more processors are configured to perform the encoding method described above to generate a bitstream when executing the plurality of programs, and the computing device may further include a transmitter configured to transmit the bitstream. In an alternative example, the one or more processors are configured to perform the encoding method described above to generate a bitstream when executing the plurality of programs, and to transmit or store the bitstream. In one example, the bitstream will be decoded using the decoding method described above.

[0121] In an embodiment, the computing environment 710 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.

[0122] In one embodiment, a method for storing a bitstream is also provided, comprising: storing the bitstream on a non-transitory computer-readable storage medium, wherein the bitstream is generated by the above-described encoding method and / or decoded by the above-described decoding method. In another embodiment, a method for storing a bitstream or a method for encoding video data is also provided, comprising: performing the above-described encoding method to generate a bitstream, and storing the bitstream on a non-transitory computer-readable storage medium. In one example, the bitstream will be decoded by the above-described decoding method.

[0123] In one embodiment, a method for transmitting a bitstream is also provided, the bitstream being generated by the above-described encoding method and / or decoded by the above-described decoding method. In another embodiment, a method for transmitting a bitstream or for encoding video data is also provided, comprising: performing the above-described encoding method to generate a bitstream, and transmitting the bitstream to a decoder. In one example, the bitstream will be decoded by the above-described decoding method. In another embodiment, a method for receiving a bitstream is also provided, the bitstream being generated by the above-described encoding method and / or decoded by the above-described decoding method.

[0124] 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.

[0125] 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.

[0126] 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, characterized in that, The method includes: Obtain the center distance of each transform coefficient in the current transform block, wherein the center distance represents the difference between the magnitude of the transform coefficient and the inverse quantization value corresponding to the normal quantization level of the transform coefficient, wherein the normal quantization level is obtained by performing normal quantization on the transform coefficient; The quantization method of each transformation coefficient is determined based on the center distance of each transformation coefficient; Each transform coefficient is quantized based on a determined quantization method.

2. The method according to claim 1, wherein, Based on the center distance of each transform coefficient, the quantization method of each transform coefficient is determined, including: Obtain the threshold used to determine the quantization method; The center distance of each transform coefficient is compared with the threshold to determine the quantization method of each transform coefficient.

3. The method according to claim 2, wherein, The center distance of each transform coefficient is compared with the threshold to determine the quantization method of each transform coefficient, including: Based on the fact that the center distance is less than the first threshold among the thresholds, it is determined that a conventional quantization method will be used; Based on the fact that the center distance is greater than the second threshold among the thresholds, it is determined that the first rate-distortion optimized quantization method shall be adopted. Based on the fact that the center distance is greater than or equal to the first threshold and less than or equal to the second threshold, it is determined that the second rate-distortion optimized quantization method is adopted. Wherein, the first threshold is less than the second threshold.

4. The method according to claim 3, wherein, The first rate-distortion optimized quantization method represents rate-distortion optimized quantization using the complete candidate quantization level set, and the second rate-distortion optimized quantization method represents rate-distortion optimized quantization using the reduced candidate quantization level set, wherein the number of candidate quantization levels contained in the complete candidate quantization level set is greater than the number of candidate quantization levels contained in the reduced candidate quantization level set.

5. The method according to claim 2, wherein, Obtaining the threshold used to determine the quantization method includes: Obtain the quantization ambiguity index of the current transform block, wherein the quantization ambiguity index represents the proportion of the number of transform coefficients in the current transform block whose center distance is greater than a third threshold to the total number of all non-zero transform coefficients in the current transform block; The threshold used to determine the quantization method is determined based on the quantization ambiguity index.

6. A video encoding device, characterized in that, The device includes: A distance determination module is configured to obtain the center distance of each transform coefficient in the current transform block, wherein the center distance represents the difference between the magnitude of the transform coefficient and the inverse quantization value corresponding to the normal quantization level of the transform coefficient, wherein the normal quantization level is obtained by performing normal quantization on the transform coefficient; The quantization determination module is configured to determine the quantization method of each transformation coefficient based on the center distance of each transformation coefficient; The quantization execution module is configured to perform quantization on each transform coefficient based on a determined quantization method for each transform coefficient.

7. The apparatus according to claim 6, wherein, Based on the center distance of each transform coefficient, the quantization method of each transform coefficient is determined, including: Obtain the threshold used to determine the quantization method; The center distance of each transform coefficient is compared with the threshold to determine the quantization method of each transform coefficient.

8. The apparatus according to claim 7, wherein, The center distance of each transform coefficient is compared with the threshold to determine the quantization method of each transform coefficient, including: Based on the fact that the center distance is less than the first threshold among the thresholds, it is determined that a conventional quantization method will be used; Based on the fact that the center distance is greater than the second threshold among the thresholds, it is determined that the first rate-distortion optimized quantization method shall be adopted. Based on the fact that the center distance is greater than or equal to the first threshold and less than or equal to the second threshold, it is determined that the second rate-distortion optimized quantization method is adopted. Wherein, the first threshold is less than the second threshold.

9. The apparatus according to claim 8, wherein, The first rate-distortion optimized quantization method represents rate-distortion optimized quantization using the complete candidate quantization level set, and the second rate-distortion optimized quantization method represents rate-distortion optimized quantization using the reduced candidate quantization level set, wherein the number of candidate quantization levels contained in the complete candidate quantization level set is greater than the number of candidate quantization levels contained in the reduced candidate quantization level set.

10. The apparatus according to claim 7, wherein, Obtaining the threshold used to determine the quantization method includes: Obtain the quantization ambiguity index of the current transform block, wherein the quantization ambiguity index represents the proportion of the number of transform coefficients in the current transform block whose center distance is greater than a third threshold to the total number of all non-zero transform coefficients in the current transform block; The threshold used to determine the quantization method is determined based on the quantization ambiguity index.

11. An electronic device, characterized in that, include: At least one processor; At least one memory that stores computer-executable instructions. The computer-executable instructions, when executed by at least one processor, cause at least one processor to perform the video encoding method as described in any one of claims 1 to 5.

12. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by at least one processor, they cause at least one processor to perform the video encoding method as described in any one of claims 1 to 5.

13. A computer program product comprising computer instructions, characterized in that, The computer instructions, when executed by at least one processor, implement the video encoding method as described in any one of claims 1 to 5.