A vector quantization method and system for video coding

By determining the non -zero -coefficient threshold based on the quantification relationship in the video coding, reducing the number of coefficients participating in quantitativeization, the problem of high complexity of vector quantification calculation, and realizing more efficient video codes.

CN115379218BActive Publication Date: 2025-01-28BIGO TECH PTE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210800009.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-06
Publication Date
2025-01-28
Estimated Expiration
2042-07-06

AI Technical Summary

Technical Problem

In the existing video encoding technology, the calculation complexity of vector quantization is relatively high, which affects the video encoding efficiency.

Method used

By the quantitative relationship between the transformation coefficient and quantitative coefficient based on the transformation block, determine the number of non -zero coefficient thresholds and target non -zero coefficient thresholds, scanning the change coefficient of the block change, and the coefficient of the target non -zero coefficient threshold to be set to Zero, perform vector quantification.

Benefits of technology

The calculation complexity of vector quantification is reduced, the video coding efficiency is improved, and the user's video viewing experience is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115379218B_ABST
    Figure CN115379218B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a vector quantization method and system for video coding. The technical solution provided by the embodiment of the present application determines the first non-zero coefficient threshold of the transform block based on the scalar quantization relationship between the transform coefficient and the quantization coefficient of the transform block, and the transform block is used to record the transform coefficient of the video residual block after transformation. Then, the target non-zero coefficient threshold of the transform block is selected based on the first non-zero coefficient threshold and the set second non-zero coefficient threshold. After that, by scanning the transform coefficients of the transform block, the transform coefficients less than the target non-zero coefficient threshold are set to zero, and the transform block is vector quantized. By adopting the above technical means, the target non-zero coefficient threshold can be selected in combination with the scalar quantization relationship to replace the transform coefficient, so as to perform vector quantization, which can reduce the computational complexity of vector quantization while retaining certain signal details, improve video coding efficiency, and optimize the user's video viewing experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of video coding technology, and in particular to a vector quantization method and system for video coding. Background Art

[0002] At present, in video encoding scenarios, quantization operations are required to achieve signal conversion. Common quantization methods are divided into two categories. One is scalar quantization, which divides the value range of data into several intervals, and each interval is represented by a numerical value (scalar). The other is vector quantization, which regards N data as an N-dimensional vector, divides each N-dimensional value space into multiple subspaces, and each subspace uses an N-dimensional vector to represent all vector values ​​of the subspace. Compared with scalar quantization, vector quantization can take into account the correlation between data, and its effect is better, and it can well preserve the details of the signal.

[0003] However, since the correlation between parameters needs to be considered in the vector quantization process, the current coefficient to be quantized must refer to the information of the previously quantized coefficient for quantization operations, which makes it difficult to use assembly instructions to achieve fast parallel calculations. The computational complexity is relatively high, affecting the video encoding efficiency. Summary of the invention

[0004] The embodiments of the present application provide a vector quantization method and system for video coding, which can reduce the computational complexity of vector quantization, improve video coding efficiency, and solve the technical problem of high computational complexity of vector quantization.

[0005] In a first aspect, an embodiment of the present application provides a vector quantization method for video coding, including:

[0006] Determining a first non-zero coefficient threshold of a transform block based on a scalar quantization relationship between a transform coefficient and a quantization coefficient of the transform block, where the transform block is used to record the transform coefficient of the video residual block after transformation;

[0007] Selecting a target non-zero coefficient threshold of a transform block based on a first non-zero coefficient threshold and a set second non-zero coefficient threshold, wherein the second non-zero coefficient threshold is determined by video data for video encoding based on vector quantization;

[0008] The transform coefficients of the transform block are scanned, the transform coefficients that are less than the target non-zero coefficient threshold are set to zero, and vector quantization is performed on the transform block.

[0009] In a second aspect, an embodiment of the present application provides a vector quantization system for video coding, including:

[0010] A determination module configured to determine a first non-zero coefficient threshold of a transform block based on a scalar quantization relationship between a transform coefficient and a quantization coefficient of the transform block, wherein the transform block is used to record the transform coefficient of the video residual block after the transform;

[0011] A threshold selection module, configured to select a target non-zero coefficient threshold of a transform block based on a first non-zero coefficient threshold and a set second non-zero coefficient threshold, wherein the second non-zero coefficient threshold is determined according to video data for video encoding based on vector quantization;

[0012] The scanning module is configured to scan the transform coefficients of the transform block, set the transform coefficients less than the target non-zero coefficient threshold to zero, and perform vector quantization on the transform block.

[0013] In a third aspect, an embodiment of the present application provides a vector quantization device for video coding, including:

[0014] memory and one or more processors;

[0015] a memory configured to store one or more programs;

[0016] When one or more programs are executed by one or more processors, the one or more processors implement the vector quantization method for video encoding as described in the first aspect.

[0017] In a fourth aspect, an embodiment of the present application provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are configured to perform a vector quantization method for video encoding as in the first aspect.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the vector quantization method for video encoding as in the first aspect.

[0019] The embodiment of the present application determines the first non-zero coefficient threshold of the transform block based on the scalar quantization relationship between the transform coefficient and the quantization coefficient of the transform block. The transform block is used to record the transform coefficient of the video residual block after transformation. Then, based on the first non-zero coefficient threshold and the set second non-zero coefficient threshold, the target non-zero coefficient threshold of the transform block is selected. The second non-zero coefficient threshold is determined by the video data for video encoding based on vector quantization. Afterwards, by scanning the transform coefficients of the transform block, the transform coefficients less than the target non-zero coefficient threshold are set to zero, and the transform block is vector quantized. By adopting the above-mentioned technical means, the target non-zero coefficient threshold can be selected in combination with the scalar quantization relationship to replace the transform coefficients, so as to perform vector quantization, which can reduce the computational complexity of vector quantization while retaining certain signal details, improve video encoding efficiency, and optimize the user's video viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of a vector quantization method for video coding provided by an embodiment of the present application;

[0021] Figure 2 is a vector quantization flow chart based on non-zero coefficient replacement in an embodiment of the present application;

[0022] Figure 3 is a non-zero coefficient replacement flow chart in an embodiment of the present application;

[0023] Figure 4 It is a structural diagram of a vector quantization system for video coding provided in an embodiment of the present application;

[0024] Figure 5 It is a structural diagram of a vector quantization device for video encoding provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0026] A vector quantization method for video coding provided in the present application aims to select a target non-zero coefficient threshold for transform coefficient replacement by combining a scalar quantization relationship, thereby reducing the computational complexity of vector quantization and improving video coding efficiency while retaining certain signal details and satisfying a certain compression efficiency loss.

[0027] In the video coding scenario, quantization is one of the important modules in video coding. Each frame in the video will first be divided into a fixed-size LCU (Largest Coding Unit, the basic unit for dividing an image into blocks), and then divided into CUs (Coding Units, further divided into smaller blocks based on the LCU) of different sizes according to the complexity of the image. Each CU uses intra-frame or inter-frame prediction methods to obtain a predicted image. The residual between the predicted image and the original image is transformed to obtain the transformed coefficients, which will be sent to the quantization module for further compression. The quantization module divides the data into different intervals, and multiple values ​​in each interval are represented by only the same value. Since there is no one-to-one correspondence between the quantization value and the transformed value, it is impossible to accurately restore the transformed value from the quantization value. Therefore, quantization is the source of coding distortion, so using a good quantization method is crucial to the video coding result.

[0028] Common quantization methods are divided into two categories, one is scalar quantization, which divides the value range of data into several intervals, each interval is represented by a numerical value (scalar). The other is vector quantization, which regards N data as an N-dimensional vector, divides each N-dimensional value space into multiple subspaces, and each subspace uses an N-dimensional vector to represent all vector values ​​of the subspace. Compared with scalar quantization, vector quantization can take into account the correlation between data, and its encoding effect is better, and it can well preserve the details of the signal. At the same time, since the correlation between parameters needs to be considered in the vector quantization process, the current coefficient to be quantized must refer to the information of the previously quantized coefficients for quantization operations, which makes it difficult to use assembly instructions to achieve fast parallel calculations, and its computational complexity is relatively high, affecting the video coding efficiency. Based on this, a vector quantization method for video coding in an embodiment of the present application is provided to solve the technical problem of high computational complexity of vector quantization in existing video coding scenarios.

[0029] Example:

[0030] Figure 1 A flow chart of a vector quantization method for video coding provided in an embodiment of the present application is provided. The vector quantization method for video coding provided in this embodiment can be executed by a vector quantization device for video coding, which can be implemented by software and / or hardware, and which can be composed of two or more physical entities or one physical entity. Generally speaking, the vector quantization device for video coding can be a computing device such as a video coding server.

[0031] The following description is made by taking the vector quantization device for video coding as an example of the main body of the vector quantization method for video coding. Figure 1 , the vector quantization method of the video coding specifically includes:

[0032] S110 , determining a first non-zero coefficient threshold of a transform block based on a scalar quantization relationship between a transform coefficient and a quantization coefficient of the transform block, where the transform block is used to record the transform coefficient of the video residual block after transformation.

[0033] In the present application, in order to reduce the computational complexity of vector quantization when performing vector quantization of video coding, a suitable target non-zero coefficient threshold is set by combining the scalar quantization relationship, and the target non-zero coefficient threshold is used to reduce the number of non-zero coefficients involved in quantization, thereby reducing the complexity of vector quantization. The number of coefficients involved in quantization is related to the non-zero coefficient threshold. In the H.266 encoder, by setting a non-zero coefficient threshold, non-zero coefficients less than the non-zero coefficient threshold are set to 0, thereby reducing the number of non-zero coefficients involved in vector quantization and reducing the computational complexity.

[0034] Based on this demand, the present application constructs a rate-distortion model through the video data for video encoding after actual vector quantization, and then pre-selects a suitable non-zero coefficient threshold according to the rate-distortion model analysis to participate in the setting of the target non-zero coefficient threshold. In addition, since the non-zero coefficient threshold selected by the corresponding vector quantization may be set too small, replacing the transform coefficient only according to the non-zero coefficient threshold selected by the corresponding vector quantization will cause some non-zero coefficients to be omitted, which will still make the calculation amount of vector quantization large. Therefore, the present application determines a non-zero coefficient threshold corresponding to scalar quantization by combining the scalar quantization relationship, so as to comprehensively decide the appropriate target non-zero coefficient threshold by combining the above two non-zero coefficient thresholds, so as to achieve the purpose of improving the quantization speed under a certain compression efficiency loss.

[0035] Exemplarily, in a video encoding scenario, for a video signal received by an encoder, a block division step is first performed, where the encoder divides the image or frame of the video signal into blocks to be encoded. The blocks to be encoded are usually square blocks, and other non-square blocks are also allowed. The sizes of the blocks to be encoded are generally 8x8, 16x16, 32x32, and 64x64. Then, through a prediction step, the video signal in the current block to be encoded is predicted to obtain a prediction signal in a reference block; pixels at corresponding positions of the reference block and the current block to be encoded are subtracted from each other to form a residual signal in a residual block. Afterwards, the residual signal in the residual block is transformed from the spatial domain spectrum to the frequency domain, and then through a preset linear operation, the residual signal energy in the residual block is concentrated on a few preset number of low-frequency transform coefficients, thereby obtaining a transform block with two-dimensional transform coefficients with more concentrated energy in the transform domain. Then, the quantization step of the change coefficients on each transform block is performed. When performing the quantization step, a target non-zero coefficient threshold is first determined through the vector quantization method of video coding in the embodiment of the present application to replace the non-zero coefficients on the transform block that are less than the target non-zero coefficient threshold with zero. Then the remaining non-zero coefficients are vector quantized. The two-dimensional transform coefficients in the transform coefficient block are quantized using the quantization information preset by the encoder and the pixel bit depth information extracted from the block to be encoded. The quantized coefficients in the quantized coefficient block are reduced to coefficients smaller than the transform coefficients in the original transform coefficient block. Finally, through the entropy coding step, entropy coding is performed based on the quantized quantized coefficient block to form a final bit stream. In this way, the entire video coding process is completed.

[0036] Specifically, when performing vector quantization of a transform block, the embodiment of the present application first uses the target non-zero coefficient threshold to filter out some smaller non-zero coefficients. When determining the target non-zero coefficient threshold, firstly, the scalar quantization relationship between the transform coefficient and the quantization coefficient of the current transform block is combined to determine the non-zero coefficient threshold corresponding to the scalar quantization of the current transform block, and the non-zero coefficient threshold is defined as the first non-zero coefficient threshold.

[0037] The scalar quantization relationship is expressed as:

[0038]

[0039] Among them, C represents the transform coefficient, QC represents the quantization coefficient, mult and shift are variables added to convert the division calculation in the quantization calculation into a shift operation, offset is the offset, and mult, shift and offset are set based on the quantization parameter pre-configured in the transform block.

[0040] Based on this scalar quantization relationship, it can be deduced that the transform coefficients with quantized coefficients of 0 satisfy the following conditions:

[0041]

[0042] Also, to avoid using As the first non-zero coefficient threshold, the threshold is set too large, too many non-zero coefficients are filtered, and the video signal distortion rate is too high. The present application considers the impact of different bit rates on the encoding result and predefines a proportional coefficient, which is set based on the quantization parameter pre-configured by the transform block to ensure that the final first non-zero coefficient threshold is set reasonably.

[0043] Then the first non-zero coefficient threshold is expressed as:

[0044]

[0045] ScalarQuantThres represents the first non-zero coefficient threshold, and α is a scale factor predefined based on a quantization parameter preconfigured for the transform block.

[0046] It should be noted that, since the quantization parameter QP of the transform block is set according to the basic quantization parameter baseQP in the actual coding scenario, and combined with the video signal transmission network conditions, the receiving end's requirements for video bit rate and resolution, etc., the value of the quantization parameter QP will fluctuate around the baseQP. That is, the quantization parameter QP of each transform block is determined according to the actual coding environment. Since mult, shift and offset are set based on the quantization parameter pre-configured by the transform block, α is a proportional coefficient pre-defined based on the quantization parameter pre-configured by the transform block, therefore, the first non-zero coefficient threshold determined for each transform block is different. When performing vector quantization of each transform block, the corresponding first non-zero coefficient threshold is determined in advance by the above-mentioned scalar quantization relationship formula, and the target non-zero coefficient threshold is determined in combination with the non-zero coefficient threshold set by the corresponding vector quantization.

[0047] S120, selecting a target non-zero coefficient threshold of the transform block based on the first non-zero coefficient threshold and a set second non-zero coefficient threshold, wherein the second non-zero coefficient threshold is determined by video data for video encoding based on vector quantization.

[0048] Further, based on the first non-zero coefficient threshold determined in the above step S110, it is compared with the non-zero coefficient threshold set by the corresponding vector quantization, and the non-zero coefficient threshold set by the corresponding vector quantization is defined as the second non-zero coefficient threshold. The second non-zero coefficient threshold is determined according to the video data in the case of video encoding using the vector quantization method. The second non-zero coefficient threshold is determined based on the bit rate and distortion model of the video data. Through the analysis result of the functional relationship between its bit rate-distortion model and the quantization coefficient, a suitable second non-zero coefficient threshold is predefined for subsequent selection of the target non-zero coefficient threshold.

[0049] When comparing the first non-zero coefficient threshold and the second non-zero coefficient threshold, a maximum value between the first non-zero coefficient threshold and the second non-zero coefficient threshold is selected as the target non-zero coefficient threshold of the transform block.

[0050] The target non-zero coefficient threshold is expressed as:

[0051] QuantThres=Max(vectorQuantThres,ScalarQuantThres)

[0052] Wherein, QuantThres represents the target non-zero coefficient threshold, ScalarQuantThres represents the first non-zero coefficient threshold, and vectorQuantThres represents the second non-zero coefficient threshold. Each transform block needs to calculate the corresponding target non-zero coefficient threshold for subsequent replacement of non-zero coefficients.

[0053] It is understandable that in the video coding scenario, vector quantization increases coding time while improving coding quality. Reducing the number of coefficients involved in quantization can reduce the complexity of quantization, and the number of coefficients involved in quantization is related to the non-zero coefficient threshold. In the H.266 encoder, the second non-zero coefficient threshold is determined by a correlation between the rate-distortion model and the quantization coefficient. Although most of the coefficients that are 0 after quantization can be filtered out in advance, some coefficients are still missed. Therefore, the application embodiment determines a first non-zero coefficient threshold by combining the scalar quantization relationship, makes a comprehensive decision based on the first non-zero coefficient threshold and the second non-zero coefficient threshold, and selects the larger value of the two as the target non-zero coefficient threshold, so as to optimize the non-zero coefficient threshold, increase the range of filtering out non-zero coefficients, and reduce the number of coefficients involved in vector quantization calculation, thereby improving coding efficiency.

[0054] S130 , scanning the transform coefficients of the transform block, setting the transform coefficients that are smaller than the target non-zero coefficient threshold to zero, and performing vector quantization on the transform block.

[0055] Furthermore, based on the determined target non-zero coefficient threshold, the transform coefficients of the current transform block are scanned to replace the non-zero coefficients.

[0056] When scanning the transform block, start from the lower right corner of the transform block and scan the transform coefficients diagonally toward the upper left corner. In this encoder, the video residual image is transformed to obtain the corresponding transform coefficients. For a transform block, the energy will be concentrated in the upper left corner. In order to obtain the result of vector quantization, it is necessary to determine the position of the last non-zero coefficient and start quantization from this position. It can be understood that after the residual block is transformed, the energy is often concentrated in the upper left corner. The coefficients closer to the lower right corner of the block are generally smaller, and are more likely to be 0 after quantization. Therefore, the scan after quantization starts from the lower right corner to the upper left corner to improve the efficiency of entropy coding.

[0057] Further, refer to Figure 2 , the vector quantization process based on non-zero coefficient replacement in the embodiment of the present application includes:

[0058] S1301, determining non-zero coefficients from the transform coefficients, and replacing non-zero coefficients less than a target non-zero coefficient threshold with zero;

[0059] S1302, determining the last scanned non-zero coefficient from the remaining non-zero coefficients, taking the position of the last scanned non-zero coefficient as the starting position for performing a vector quantization operation on the transform block, and performing vector quantization on the remaining non-zero coefficients one by one starting from the starting position.

[0060] Based on the non-zero coefficients in the scanned transform coefficients, the non-zero coefficients are first compared with the target non-zero coefficient threshold. If the target non-zero coefficient threshold is greater than the non-zero coefficient, the non-zero coefficient is replaced with zero, and so on, the number of non-zero coefficients in the transform block can be reduced, and the encoding speed can be improved with a small loss of encoding quality. For some non-zero coefficients greater than the non-zero coefficient threshold, no adjustment is required. It can be understood that for positions where the transform coefficients have larger values, adjusting them to zero will cause greater distortion. Therefore, the present application sets the target non-zero coefficient threshold and only adjusts some transform coefficients less than the non-zero coefficient threshold, so as to achieve the purpose of improving encoding efficiency with a small loss of encoding quality.

[0061] Furthermore, after the last non-zero coefficient is replaced based on the above scanning method, the position of the last scanned non-zero coefficient is used as the starting position for performing the vector quantization operation on the transform block, and the vector quantization operation of the remaining non-zero coefficients that have not been replaced is started. In the H.266 encoder, to implement vector quantization, the last non-zero coefficient must be determined first, and the non-zero coefficients must be searched from the back to the front, and the remaining non-zero coefficients must be quantized one by one starting from the position of the last non-zero coefficient. In practical applications, the vector quantization operation for the remaining non-zero coefficients can also be scanned from the specified position of the transform block. The embodiment of the present application does not impose fixed restrictions on the specific vector quantization direction, which will not be elaborated here.

[0062] For example, refer to Figure 3 For a transform block that needs to be vector quantized, first calculate the first non-zero coefficient threshold through the scalar quantization relationship between the transform coefficient and the quantization coefficient of the transform block, and then select the target non-zero coefficient threshold in combination with the preset second non-zero coefficient threshold. Scan the current transform block based on the non-zero coefficient threshold, and set the non-zero coefficients less than the target non-zero coefficient threshold to zero. Then find the last non-zero coefficient, and perform the vector quantization operation of the remaining non-zero coefficients from back to front. By combining the information of scalar quantization to optimize the non-zero coefficient threshold and the preset non-zero coefficient threshold of vector quantization, the purpose of improving the vector quantization calculation speed under a certain compression efficiency loss is achieved.

[0063] In the above, based on the scalar quantization relationship between the transform coefficient and the quantization coefficient of the transform block, the first non-zero coefficient threshold of the transform block is determined, and the transform block is used to record the transform coefficient of the video residual block after transformation. Then, based on the first non-zero coefficient threshold and the set second non-zero coefficient threshold, the target non-zero coefficient threshold of the transform block is selected, and the second non-zero coefficient threshold is determined by the video data for video encoding based on vector quantization. Afterwards, by scanning the transform coefficients of the transform block, the transform coefficients less than the target non-zero coefficient threshold are set to zero, and the transform block is vector quantized. By adopting the above technical means, the target non-zero coefficient threshold can be selected in combination with the scalar quantization relationship to replace the transform coefficient, so as to perform vector quantization, which can reduce the computational complexity of vector quantization while retaining certain signal details, improve video encoding efficiency, and optimize the user's video viewing experience.

[0064] Based on the above embodiments, Figure 4 A schematic diagram of the structure of a vector quantization system for video coding provided by this application. Figure 4 The vector quantization system for video coding provided in this embodiment specifically includes: a determination module 21, a threshold selection module 22 and a scanning module 23.

[0065] The determination module 21 is configured to determine a first non-zero coefficient threshold of a transform block based on a scalar quantization relationship between a transform coefficient and a quantization coefficient of the transform block, and the transform block is used to record the transform coefficient of the video residual block after the transform;

[0066] The threshold selection module 22 is configured to select a target non-zero coefficient threshold of the transform block based on the first non-zero coefficient threshold and a set second non-zero coefficient threshold, wherein the second non-zero coefficient threshold is determined according to video data for video encoding based on vector quantization;

[0067] The scanning module 23 is configured to scan the transform coefficients of the transform block, set the transform coefficients that are less than the target non-zero coefficient threshold to zero, and perform vector quantization on the transform block.

[0068] Specifically, the scalar quantization relationship is expressed as:

[0069]

[0070] Among them, C represents the transform coefficient, QC represents the quantization coefficient, mult and shift are variables added to convert the division calculation in the quantization calculation into a shift operation, offset is the offset, and mult, shift and offset are set based on the quantization parameter pre-configured in the transform block.

[0071] Specifically, the first non-zero coefficient threshold is expressed as:

[0072]

[0073] ScalarQuantThres represents the first non-zero coefficient threshold, and α is a scale factor predefined based on a quantization parameter preconfigured for the transform block.

[0074] Specifically, the threshold selection module 22 is configured to select the maximum value between the first non-zero coefficient threshold and the second non-zero coefficient threshold as the target non-zero coefficient threshold of the transform block, wherein the second non-zero coefficient threshold is determined based on the bit rate and distortion model of the video data.

[0075] Specifically, the scanning module is configured to start from the lower right corner of the transform block and scan the transform coefficients diagonally toward the upper left corner; determine the non-zero coefficients from the transform coefficients, and replace the non-zero coefficients that are less than the target non-zero coefficient threshold with zero; determine the last scanned non-zero coefficient from the remaining non-zero coefficients, use the position of the last scanned non-zero coefficient as the starting position for performing a vector quantization operation on the transform block, and perform vector quantization of the remaining non-zero coefficients one by one from the starting position.

[0076] In the above, based on the scalar quantization relationship between the transform coefficient and the quantization coefficient of the transform block, the first non-zero coefficient threshold of the transform block is determined, and the transform block is used to record the transform coefficient of the video residual block after transformation. Then, based on the first non-zero coefficient threshold and the set second non-zero coefficient threshold, the target non-zero coefficient threshold of the transform block is selected, and the second non-zero coefficient threshold is determined by the video data for video encoding based on vector quantization. Afterwards, by scanning the transform coefficients of the transform block, the transform coefficients less than the target non-zero coefficient threshold are set to zero, and the transform block is vector quantized. By adopting the above technical means, the target non-zero coefficient threshold can be selected in combination with the scalar quantization relationship to replace the transform coefficient, so as to perform vector quantization, which can reduce the computational complexity of vector quantization while retaining certain signal details, improve video encoding efficiency, and optimize the user's video viewing experience.

[0077] The vector quantization system for video coding provided in the embodiment of the present application can be configured to execute the vector quantization method for video coding provided in the above embodiment, and has corresponding functions and beneficial effects.

[0078] Based on the above practical example, the present application embodiment also provides a vector quantization device for video coding, referring to Figure 5 , the vector quantization device for video coding includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The memory 32, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the vector quantization method for video coding described in any embodiment of the present application (for example, a determination module, a threshold selection module and a scanning module in a vector quantization system for video coding). The communication module 33 is configured to perform data transmission. The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, to implement the above-mentioned vector quantization method for video coding. The input device 34 can be configured to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device 35 may include a display device such as a display screen. The above-mentioned vector quantization device for video coding can be configured to execute the vector quantization method for video coding provided in the above-mentioned embodiment, and has corresponding functions and beneficial effects.

[0079] On the basis of the above embodiments, the embodiments of the present application further provide a storage medium containing computer executable instructions, wherein the computer executable instructions are configured to execute a vector quantization method for video coding when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the storage medium containing computer executable instructions provided in the embodiments of the present application, whose computer executable instructions are not limited to the vector quantization method for video coding as described above, may also execute related operations in the vector quantization method for video coding provided in any embodiment of the present application.

[0080] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The essence of the technical solution of the present application or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, and includes a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the vector quantization method for video encoding described in each embodiment of the present application.

Claims

1. A vector quantization method for video coding, characterized in that: include: Determining a first non-zero coefficient threshold of a transform block based on a scalar quantization relationship between a transform coefficient and a quantization coefficient of the transform block, wherein the transform block is used to record the transform coefficient of the video residual block after the transform; selecting a maximum value between the first non-zero coefficient threshold and a second non-zero coefficient threshold as a target non-zero coefficient threshold of the transform block, wherein the second non-zero coefficient threshold is determined by video data for video encoding based on vector quantization; Scanning transform coefficients of the transform block, setting the transform coefficients less than the target non-zero coefficient threshold to zero, and performing vector quantization on the transform block; The scalar quantization relationship is expressed as: Wherein, C represents a transform coefficient, QC represents a quantization coefficient, mult and shift are variables added for changing a division calculation in a quantization calculation into a shift operation, and offset is an offset, and the mult, the shift and the offset are set based on a quantization parameter preconfigured in the transform block; The first non-zero coefficient threshold is expressed as: ScalarQuantThres represents the first non-zero coefficient threshold, and α is a proportional coefficient predefined based on a quantization parameter pre-configured for the transform block.

2. The vector quantization method for video coding according to claim 1, characterized in that: The second non-zero coefficient threshold is determined based on a bit rate and a distortion model of the video data.

3. The vector quantization method for video coding according to claim 1, characterized in that: The scanning of the transform coefficients of the transform block comprises: Starting from the lower right corner of the transform block, the transform coefficients are scanned diagonally toward the upper left corner.

4. The vector quantization method for video coding according to claim 3, characterized in that: The step of setting the transform coefficients that are less than the target non-zero coefficient threshold to zero and performing vector quantization on the transform block comprises: Determine non-zero coefficients from the transform coefficients, and replace the non-zero coefficients less than the target non-zero coefficient threshold with zero; The last scanned non-zero coefficient is determined from the remaining non-zero coefficients, the position of the last scanned non-zero coefficient is used as the starting position for performing a vector quantization operation on the transform block, and vector quantization of the remaining non-zero coefficients is performed one by one starting from the starting position.

5. A vector quantization system for video coding, characterized in that: include: A determination module configured to determine a first non-zero coefficient threshold of a transform block based on a scalar quantization relationship between a transform coefficient and a quantization coefficient of the transform block, wherein the transform block is used to record the transform coefficient of the video residual block after the transform; a threshold selection module, configured to select a maximum value between the first non-zero coefficient threshold and a second non-zero coefficient threshold as a target non-zero coefficient threshold of the transform block, wherein the second non-zero coefficient threshold is determined according to video data for video encoding based on vector quantization; a scanning module configured to scan the transform coefficients of the transform block, set the transform coefficients less than the target non-zero coefficient threshold to zero, and perform vector quantization on the transform block; The scalar quantization relationship is expressed as: Wherein, C represents a transform coefficient, QC represents a quantization coefficient, mult and shift are variables added for changing a division calculation in a quantization calculation into a shift operation, and offset is an offset, and the mult, the shift and the offset are set based on a quantization parameter preconfigured in the transform block; The first non-zero coefficient threshold is expressed as: ScalarQuantThres represents the first non-zero coefficient threshold, and α is a proportional coefficient predefined based on a quantization parameter pre-configured for the transform block.

6. A vector quantization device for video coding, characterized in that: include: memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the vector quantization method for video encoding as described in any one of claims 1-4.

7. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are configured to execute the vector quantization method for video encoding as described in any one of claims 1-4.

8. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the vector quantization method for video encoding as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Video encoding method, encoder, electronic device and medium

    CN109874012A

  • Video data decoding method and device

    CN110944179A