Digital video encoding method and device

By adjusting the coefficients of the target transform block of the video frame, the video coding distortion problem caused by the transform mode is solved, the implicit inclusion of the transform kernel type and the improvement of the accuracy of the encoding result are achieved.

CN110519601BActive Publication Date: 2025-09-19BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910824462.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-02
Publication Date
2025-09-19
Estimated Expiration
2039-09-02

AI Technical Summary

Technical Problem

In existing video coding methods, including the transform mode in the coding block in an encoded manner will cause video coding distortion, and it is difficult to implicitly include the transform kernel type.

Method used

By transforming and quantizing the target transform block of the video frame, in response to the number of non-zero coefficients and the transform kernel not satisfying a preset mapping relationship, the coefficients of the target transform block are adjusted to satisfy the preset distortion conditions and mapping relationship, including adjusting the non-zero coefficients to zero coefficients or adjusting the zero coefficients to non-zero coefficients.

Benefits of technology

The method effectively controls the distortion caused by the adjustment of transform block coefficients while satisfying a fixed mapping relationship, implicitly includes the transform kernel type, and improves the accuracy of video coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110519601B_ABST
    Figure CN110519601B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of video coding. The embodiments of the present disclosure disclose a digital video coding method and apparatus. The digital video coding method includes: using a transform kernel to transform and quantize a target transform block of a video frame to obtain coefficients of the target transform block; in response to determining that the number of non-zero coefficients of the target transform block and the transform kernel do not satisfy a preset mapping relationship, determining a target adjustment method for adjusting the coefficients of the target transform block, wherein the encoding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method and the transform kernel satisfy a preset mapping relationship; adjusting the coefficients of the target transform block using the target adjustment method to obtain an encoding result of the target transform block. This method can effectively control the distortion caused by the coefficient adjustment of the transform block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer technology, specifically to the field of video coding, and more particularly to a method and apparatus for coding digital video. Background Art

[0002] In video coding, transform coding techniques are often used to transform images from the spatial domain into the frequency domain, and then the transformed coefficients are encoded. Common transforms include the Discrete Cosine Transform (DCT) and the Discrete Sine Transform (DST).

[0003] Existing video coding methods divide an image into non-overlapping blocks and perform transform coding on each block independently. The transform mode used in the encoding is often included in the coding block to facilitate video decoding. However, encoding the transform mode in the coding block often introduces distortion to the video encoding. Summary of the Invention

[0004] Embodiments of the present disclosure provide a method and apparatus for encoding digital video, an electronic device, and a computer-readable medium.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for encoding a digital video, comprising: transforming and quantizing a target transform block of a video frame using a transform kernel to obtain coefficients of the target transform block; in response to determining that the number of non-zero coefficients of the target transform block and the transform kernel do not satisfy a preset mapping relationship, determining a target adjustment method for adjusting the coefficients of the target transform block, wherein the encoding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method and the transform kernel satisfy a preset mapping relationship, the target adjustment method comprising: adjusting at least one non-zero coefficient to a zero coefficient, and / or adjusting at least one zero coefficient to a non-zero coefficient; adjusting the coefficients of the target transform block using the target adjustment method to obtain an encoding result of the target transform block.

[0006] In some embodiments, the above-mentioned determination of the target adjustment method for adjusting the coefficients of the target transform block includes: determining whether the number of non-zero coefficients of the target transform block is 1; if the number of non-zero coefficients of the target transform block is 1, constructing at least one candidate adjustment method based on adjusting at least one zero coefficient adjacent to the non-zero coefficient in the target transform block to a non-zero coefficient, and screening out the candidate adjustment method with the smallest encoding distortion cost after adjusting the coefficients as the target adjustment method.

[0007] In some embodiments, the above-mentioned determination of the target adjustment method for adjusting the coefficients of the target transform block includes: if the number of non-zero coefficients of the target transform block is greater than 1, traversing the coefficients of the target transform block, and performing an optimization operation on each coefficient traversed; the optimization operation includes: calculating the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient, if the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient is less than the minimum coding distortion cost, updating the target adjustment method to the adjustment method corresponding to the current coefficient, and updating the minimum coding distortion cost to the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient; wherein, the adjustment method corresponding to the current coefficient includes: if the current coefficient is a zero coefficient, adjusting the current coefficient to a non-zero coefficient; if the current coefficient is a non-zero coefficient, adjusting the current coefficient to a zero coefficient.

[0008] In some embodiments, the adjustment method corresponding to the above-mentioned current coefficient further includes: if the current coefficient is a zero coefficient, the current coefficient is adjusted to 1 or -1 according to the sign consistent with the numerical value of the image data at the position corresponding to the current coefficient in the target transform block after transformation and before quantization.

[0009] In some embodiments, the above method also includes: in response to determining that a non-2N×2N blocking mode is used to divide the coding block of the video frame into at least two transform blocks and the number of transform blocks and prediction blocks of the coding block is not equal, determining the first transform block of the coding block as the target transform block; and using a transform kernel to transform and quantize other transform blocks in the coding block except the target transform block to obtain encoding results of the other transform blocks.

[0010] In a second aspect, an embodiment of the present disclosure provides a digital video encoding device, comprising: a first transformation unit, configured to use a transformation kernel to transform and quantize a target transformation block of a video frame to obtain coefficients of the target transformation block; a determination unit, configured to determine a target adjustment method for adjusting the coefficients of the target transformation block in response to determining that the number of non-zero coefficients of the target transformation block and the transformation kernel do not satisfy a preset mapping relationship, wherein the encoding distortion cost of the target transformation block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transformation block after adjusting the coefficients according to the target adjustment method and the transformation kernel satisfy a preset mapping relationship, and the target adjustment method includes: adjusting at least one non-zero coefficient to a zero coefficient, and / or adjusting at least one zero coefficient to a non-zero coefficient; the adjustment unit, configured to adjust the coefficients of the target transformation block using the target adjustment method to obtain the encoding result of the target transformation block.

[0011] In some embodiments, the above-mentioned determination unit is further configured to determine the target adjustment method for adjusting the coefficients of the target transform block in the following manner: determine whether the number of non-zero coefficients of the target transform block is 1; if the number of non-zero coefficients of the target transform block is 1, construct at least one candidate adjustment method based on adjusting at least one zero coefficient adjacent to the non-zero coefficient in the target transform block to a non-zero coefficient, and screen out the candidate adjustment method with the smallest encoding distortion cost after adjusting the coefficients as the target adjustment method.

[0012] In some embodiments, the above-mentioned determination unit is further configured to determine the target adjustment method for adjusting the coefficients of the target transform block in the following manner: if the number of non-zero coefficients of the target transform block is greater than 1, traverse the coefficients of the target transform block, and perform an optimization operation on each coefficient traversed; the optimization operation includes: calculating the coding distortion cost of the target transform block after adjusting according to the adjustment method corresponding to the current coefficient; if the coding distortion cost of the target transform block after adjusting according to the adjustment method corresponding to the current coefficient is less than the minimum coding distortion cost, update the target adjustment method to the adjustment method corresponding to the current coefficient, and update the minimum coding distortion cost to the coding distortion cost of the target transform block after adjusting according to the adjustment method corresponding to the current coefficient; wherein, the adjustment method corresponding to the current coefficient includes: if the current coefficient is a zero coefficient, adjust the current coefficient to a non-zero coefficient; if the current coefficient is a non-zero coefficient, adjust the current coefficient to a zero coefficient.

[0013] In some embodiments, the adjustment method corresponding to the above-mentioned current coefficient further includes: if the current coefficient is a zero coefficient, the current coefficient is adjusted to 1 or -1 according to the sign consistent with the numerical value of the image data at the position corresponding to the current coefficient in the target transform block after transformation and before quantization.

[0014] In some embodiments, the above-mentioned device also includes: a preprocessing unit, configured to determine that the first transform block of the coding block is a target transform block in response to determining that a non-2N×2N blocking mode is used to divide the coding block of the video frame into at least two transform blocks and the number of transform blocks and prediction blocks of the coding block is not equal; and a second transform unit, configured to use a transform kernel to transform and quantize other transform blocks in the coding block except the target transform block to obtain encoding results of other transform blocks.

[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the digital video encoding method provided in the first aspect.

[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the digital video encoding method provided in the first aspect is implemented.

[0017] The digital video encoding method and apparatus, electronic device, and computer-readable medium of the above-mentioned embodiments of the present disclosure first transform and quantize a target transform block of a video frame using a transform kernel to obtain coefficients of the target transform block. Then, in response to determining that the number of non-zero coefficients of the target transform block and the transform kernel do not satisfy a preset mapping relationship, a target adjustment method is determined for adjusting the coefficients of the target transform block. The encoding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method and the transform kernel satisfy a preset mapping relationship. The target adjustment method includes: adjusting at least one non-zero coefficient to a zero coefficient and / or adjusting at least one zero coefficient to a non-zero coefficient. Finally, the coefficients of the target transform block are adjusted using the target adjustment method to obtain an encoding result of the target transform block. This achieves the implicit inclusion of the transform kernel type in the coefficients of the transform block according to a fixed mapping relationship, and can effectively control distortion caused by adjusting the coefficients of the transform block to satisfy the fixed mapping relationship. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Other features, objects and advantages of the present disclosure will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following drawings:

[0019] Figure 1 is an exemplary system architecture diagram in which embodiments of the present disclosure may be applied;

[0020] Figure 2 is a flowchart of an embodiment of a digital video encoding method according to the present disclosure;

[0021] Figure 3 is a schematic diagram of an exemplary algorithm principle of the digital video encoding method according to the present disclosure;

[0022] Figure 4 is a flowchart of another embodiment of a digital video encoding method according to the present disclosure;

[0023] Figure 5 It is a structural diagram of an embodiment of a digital video encoding device disclosed herein;

[0024] Figure 6 It is a structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] The present disclosure will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.

[0026] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0027] Figure 1 An exemplary system architecture 100 is shown to which the digital video encoding method or digital video encoding apparatus of the present disclosure may be applied.

[0028] like Figure 1 As shown, the system architecture 100 may include Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0029] Terminal devices 101, 102, and 103 interact with server 105 via network 104 to receive or send messages, etc. Various client applications may be installed on terminal devices 101, 102, and 103, such as video editing applications, social platform applications, e-commerce applications, and the like.

[0030] The terminal devices 101, 102, and 103 can be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they can be various electronic devices, including but not limited to smartphones, tablet computers, e-book readers, laptop computers, and desktop computers. When the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or they can be implemented as a single software or software module. No specific limitation is made here.

[0031] The server 105 may be a server that provides various services, such as a server that provides background services for applications on the terminal devices 101, 102, and 103. The server 105 may also be a server that provides video compression and storage services for applications on the terminal devices 101, 102, and 103 that use video data as interactive content (such as various social platform applications, e-commerce applications, etc.).

[0032] In an exemplary application scenario, the server 105 can receive video data uploaded by the terminal devices 101, 102, and 103, encode the video, and store it; the server 105 can also decode the stored video and return it to the terminal devices 101, 102, and 103 when the terminal devices 101, 102, and 103 request to obtain video data.

[0033] It should be noted that the digital video encoding method provided in the embodiments of the present disclosure can be executed by the terminal device 101, 102, 103 or the server 105. Accordingly, the digital video encoding device can be set in the terminal device 101, 102, 103 or the server 105.

[0034] It should also be noted that in some scenarios, the server 105 can obtain the video to be encoded from a database, storage or other device. In this case, the exemplary system architecture 100 may not have the terminal devices 101, 102, 103 and the network 104.

[0035] It should be noted that the server 105 can be hardware or software. When the server 105 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 105 is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitations are given here.

[0036] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0037] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a digital video encoding method according to the present disclosure. The digital video encoding method includes the following steps:

[0038] Step 201 : transform and quantize a target transform block of a video frame using a transform kernel to obtain coefficients of the target transform block.

[0039] In this embodiment, the execution subject of the digital video encoding method can obtain the video to be encoded and perform compression encoding on the video. When encoding the video frame, the spatial image signal can be transformed into the frequency domain, and the transformed frequency domain signal can be quantized and encoded.

[0040] In intra-frame coding and inter-frame coding, a video frame can be divided into multiple coding units, each of which can be split into multiple transform blocks. The transform block size can be 2N×2N, N×N, 2N×N, N×2N, etc., where 2N×2N is the size of the coding unit. Transform kernel quantization can be performed on each transform block separately.

[0041] In this embodiment, a transform block in a coding unit can be used as a target transform block. The target transform block is transformed using a DCT or DST transform kernel, and then the transformed signal is quantized to obtain coefficients of the target transform block. After quantization, the values ​​of some coefficients are non-zero, while the values ​​of other coefficients are zero.

[0042] Step 202 : In response to determining that the number of non-zero coefficients of the target transform block and the transform kernel do not satisfy a preset mapping relationship, a target adjustment method for adjusting coefficients of the target transform block is determined.

[0043] After obtaining coefficients obtained by transforming and quantizing the target transform block, it can be determined whether the number of non-zero coefficients in the coefficients of the target transform block and the transform kernel used to transform the target transform block meet a preset mapping relationship.

[0044] In this embodiment, the preset mapping relationship may be a fixed mapping relationship between a predetermined number of non-zero coefficients and a transform kernel. During image decoding, the type of transform kernel to be used may be parsed based on the fixed mapping relationship and the number of non-zero coefficients in the coefficients of the transform block. In this way, the transform kernel to be used may be implicitly encoded in the image block.

[0045] Commonly used transform kernels may include DCT2, DCT8, DST7, etc. The correspondence between the number of non-zero coefficients and the transform kernel can be pre-constructed. For example, when the number of non-zero coefficients meets the first preset condition, the corresponding transform kernel is DCT2; when the number of non-zero coefficients meets the second preset condition, the corresponding transform kernel is DST7; and when the number of non-zero coefficients meets the third preset condition, the corresponding transform kernel is DCT8.

[0046] As an example, the preset mapping relationship may be: when the number of non-zero coefficients in the transform block is an even number, the corresponding transform kernel is DCT2; when the number of non-zero coefficients in the transform block is an odd number, the transform kernel is DST7. Alternatively, the preset mapping relationship may be: when the number of non-zero coefficients in the transform block is an even number, the corresponding transform kernel is DST7; when the number of non-zero coefficients in the transform block is an odd number, the transform kernel is DCT2.

[0047] When it is determined that the number of non-zero coefficients of the target transform block obtained in step 201 does not satisfy the preset mapping relationship with the transform kernel, the coefficients of the target transform block can be adjusted so that the number of non-zero coefficients of the adjusted target transform block and the transform kernel used to transform the target transform block satisfy the preset mapping relationship.

[0048] For example, if the above-mentioned preset mapping relationship is: when the number of non-zero coefficients in the transform block is an even number, the corresponding transform kernel is DCT2, and when the number of non-zero coefficients in the transform block is an odd number, the transform kernel is DST7, and in the currently encoded video, the actual number of non-zero coefficients obtained after the target transform block of the encoding block adopts DCT2 transform and quantization is an odd number, the coefficients of the target transform block can be adjusted so that the number of non-zero coefficients of the adjusted target transform block is an even number.

[0049] The coefficients of the target transform block can be adjusted in a variety of ways, such as adjusting any odd number of non-zero coefficients in the target transform block to zero coefficients, or adjusting the last zero coefficient in the target transform block to a non-zero coefficient, and so on.

[0050] Adjusting coefficients often results in video coding distortion. In this embodiment, a target adjustment method can be determined from the multiple optional methods described above, such that the coding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset mapping relationship with the transform kernel. This target adjustment method may include: adjusting at least one non-zero coefficient to a zero coefficient, and / or adjusting at least one zero coefficient to a non-zero coefficient.

[0051] The preset distortion condition may be: the coding distortion cost is lower than a preset threshold, or may be: the minimum coding distortion cost among all candidate adjustment modes.

[0052] The execution entity may first determine multiple candidate adjustment methods based on a preset mapping relationship that needs to be satisfied between the number of non-zero coefficients and the transform kernel. For example, if the preset mapping relationship is: when the number of non-zero coefficients in the transform block is an even number, the corresponding transform kernel is DCT2, and when the number of non-zero coefficients in the transform block is an odd number, the transform kernel is DST7, then the corresponding candidate adjustment methods may include: adjusting the first or last zero coefficient to a non-zero coefficient, adjusting the first or last non-zero coefficient to a zero coefficient, adjusting an odd number of non-zero coefficients to a zero coefficient while adjusting an even number of zero coefficients to a non-zero coefficient, adjusting an even number of non-zero coefficients to a zero coefficient while adjusting an odd number of zero coefficients to a non-zero coefficient, and so on. The execution entity may sequentially calculate the coding distortion cost corresponding to each candidate adjustment method, and then select the candidate adjustment method whose coding distortion cost satisfies the preset distortion condition as the target adjustment method for coefficient adjustment of the target transform block.

[0053] Optionally, the target adjustment method can be determined as follows: first, determine whether the number of non-zero coefficients of the target transform block is 1. If the number of non-zero coefficients of the target transform block is 1, construct at least one candidate adjustment method based on adjusting at least one zero coefficient adjacent to the non-zero coefficient in the target transform block to a non-zero coefficient, and screen out the candidate adjustment method with the smallest encoding distortion cost after adjusting the coefficients as the target adjustment method.

[0054] If the target transform block has only one non-zero coefficient, adjusting that non-zero coefficient to zero results in a high coding distortion cost. Furthermore, adjusting zero coefficients that are far from the non-zero coefficient to non-zero coefficients may also result in a high coding distortion cost. Therefore, adjusting one or more zero coefficients adjacent to the non-zero coefficient to non-zero coefficients can effectively control the distortion caused by coefficient adjustment.

[0055] Specifically, one candidate adjustment method is to adjust the zero coefficient adjacent to the right of the only non-zero coefficient in the target transform block to a non-zero coefficient, and another candidate adjustment method is to adjust the zero coefficient adjacent to the bottom of the non-zero coefficient in the target transform block to a non-zero coefficient. Alternatively, three of the four zero coefficients adjacent to the top, bottom, left and right of the non-zero coefficient in the target transform block can be adjusted to non-zero coefficients as another candidate adjustment method. Then, the coding distortion cost of the target transform block after adjustment according to each candidate adjustment method is calculated, and then the candidate adjustment method with the smallest coding distortion cost is selected as the target adjustment method. Here, the coding distortion cost is a measure of the distortion of the video after encoding, which can be calculated based on the difference between the image block restored according to the encoding result and the unencoded image block.

[0056] Alternatively, the target adjustment method may be determined as follows: first, determining whether the number of non-zero coefficients in the target transform block is greater than 1; if the number of non-zero coefficients in the target transform block is greater than 1, traversing each coefficient of the target transform block and performing an optimization operation on each traversed coefficient. The optimization operation includes calculating a coding distortion cost resulting from adjustment of the currently traversed coefficient, and updating the minimum coding distortion cost based on a relationship between the coding distortion cost resulting from adjustment of the currently traversed coefficient and the minimum coding distortion cost.

[0057] Specifically, the optimization operation includes calculating the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient. Here, the adjustment method corresponding to the current coefficient includes: if the current coefficient is a zero coefficient, adjusting the current coefficient to a non-zero coefficient; if the current coefficient is a non-zero coefficient, adjusting the current coefficient to a zero coefficient.

[0058] Further optionally, in the adjustment method corresponding to the current coefficient, if the current coefficient is a zero coefficient, the current coefficient can be adjusted to 1 or -1 according to a sign consistent with the value of the image data at the position corresponding to the current coefficient in the target transform block after transformation and before quantization. The target transform block is a two-dimensional image block formed by the image data of each pixel before transformation. After transformation, the target transform block obtains a two-dimensional matrix formed by values ​​corresponding one-to-one to the pixels in the image block. Whether the current coefficient is adjusted to 1 or -1 can be determined based on the positive or negative sign of the value at the position corresponding to the current coefficient in the two-dimensional matrix of the target transform block after transformation using the transform kernel and before quantization. If the value at the position corresponding to the current coefficient in the two-dimensional matrix of the target transform block after transformation and before quantization is a positive value, the current coefficient is adjusted to 1; if the value at the position corresponding to the current coefficient in the two-dimensional matrix of the target transform block after transformation and before quantization is a negative value, the current coefficient is adjusted to -1. This can minimize the error caused by the coefficient adjustment and improve the efficiency of searching for the optimal adjustment method.

[0059] For each coefficient traversed, it can be determined whether the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient is less than the minimum coding distortion cost. If the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient is less than the minimum coding distortion cost, the target adjustment method is updated to the adjustment method corresponding to the current coefficient, and the minimum coding distortion cost is updated to the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient. Here, the initial minimum coding distortion cost can be a set value, and the minimum coding distortion cost can be updated as the coefficients are traversed. Alternatively, when traversing to the first coefficient, the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the first coefficient is used as the initial value of the minimum coding distortion cost.

[0060] If the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient is not less than the minimum coding distortion cost, then the target adjustment method and the minimum coding distortion cost may not be updated. In this way, after traversing all coefficients, the target adjustment method is updated to the coefficient adjustment method with the minimum coding distortion cost.

[0061] Step 203: Adjust the coefficients of the target transform block using a target adjustment method to obtain an encoding result of the target transform block.

[0062] The target adjustment method determined in step 202 may be used to adjust the coefficients of the target transform block, and the adjusted coefficients are used as the encoding result of the target transform block.

[0063] As an example, if the target adjustment method determined in step 202 is to adjust the first non-zero coefficient to a zero coefficient, then the first non-zero coefficient of the target transform block can be adjusted to a zero coefficient, and the other coefficients are not adjusted to obtain the encoding result of the target transform block. In this way, the encoding result of the target transform block implicitly contains information about the transform kernel that follows the above-mentioned preset mapping relationship. During video decoding, the transform kernel used by the target transform block can be parsed based on the preset mapping relationship, and then the original video data can be decoded based on the transform kernel.

[0064] It should be noted that if the coefficients of the target transform block obtained by transforming and quantizing the target transform block of the video frame using the transform kernel in step 201 satisfy the above-mentioned preset mapping relationship with the transform kernel, the quantized coefficients can be retained and the coefficients of the target transform block are not adjusted.

[0065] The digital video encoding method of the above-mentioned embodiment of the present disclosure first transforms and quantizes a target transform block of a video frame using a transform kernel to obtain coefficients of the target transform block. Then, in response to determining that the number of non-zero coefficients of the target transform block and the transform kernel do not satisfy a preset mapping relationship, a target adjustment method is determined for adjusting the coefficients of the target transform block. The encoding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method and the transform kernel satisfy a preset mapping relationship. The target adjustment method includes: adjusting at least one non-zero coefficient to a zero coefficient and / or adjusting at least one zero coefficient to a non-zero coefficient. Finally, the coefficients of the target transform block are adjusted using the target adjustment method to obtain an encoding result of the target transform block. This achieves the implicit inclusion of the transform kernel type in the coefficients of the transform block according to a fixed mapping relationship, and can effectively control the distortion caused by adjusting the coefficients of the transform block to satisfy the fixed mapping relationship.

[0066] Continue to refer Figure 3, which shows an exemplary algorithm principle diagram of the digital video encoding method according to the present disclosure.

[0067] like Figure 3 As shown, first, determine whether the number of non-zero coefficients in the target transform block is not greater than 1. If not, adjust the zero coefficients adjacent to the right and below the non-zero coefficients to 1 or -1 according to the sign consistent with the value of the corresponding position in the target transform block after transformation and before quantization, so as to minimize distortion. If the number of non-zero coefficients in the target transform block is greater than 1, traverse all coefficients and determine whether the current coefficient is a non-zero coefficient for the current coefficient traversed. If the current coefficient is a non-zero coefficient, calculate the coding distortion of the target transform block after setting the current coefficient to zero; if the current coefficient is a zero coefficient, calculate the coding distortion of the target transform block after setting the current coefficient to 1 or -1. Then, determine whether the coding distortion after adjusting the current coefficient from a zero coefficient to a non-zero coefficient or from a non-zero coefficient to a zero coefficient is less than the current coding distortion. If so, determine the optimal adjustment method as adjusting the current coefficient from a zero coefficient to a non-zero coefficient or from a non-zero coefficient to a zero coefficient. Then, use the next coefficient as the new current coefficient and return to the step of determining whether the current coefficient is a non-zero coefficient.

[0068] from Figure 3 It can be seen that when the number of non-zero coefficients in the target transform block is greater than 1, by traversing all coefficients, the coefficient adjustment method with the smallest coding distortion can be found as the final coefficient adjustment strategy. In this way, the transform kernel information can be implicitly included in the encoding result through a fixed mapping relationship while minimizing the distortion of video encoding.

[0069] The above-described digital video encoding method can be applied in a mode that uses a 2N×2N block partitioning scheme to divide the coding block of a video frame into at least two transform blocks. That is, if the video encoding method uses a 2N×2N block partitioning scheme to divide the coding block of a video frame, the entire coding block is treated as a transform block and encoded according to the above-described encoding method. The above-described digital video encoding method can also be applied in modes that use non-2N×2N block partitioning schemes.

[0070] Please continue to refer to Figure 4 , which shows a flowchart of another embodiment of a digital video encoding method according to the present disclosure.

[0071] Step 401 : in response to determining that a coding block of a video frame is divided into at least two transform blocks using a non-2N×2N block partitioning mode and the number of transform blocks and prediction blocks of the coding block are not equal, determining the first transform block of the coding block as a target transform block.

[0072] When encoding digital video, it is typically divided into multiple coding blocks, each of which contains a prediction block and a transform block. The prediction block contains the prediction mode information for the coding block, while the transform block contains the image data after transform coding. The coding block can be divided using non-2N×2N block division patterns, such as 2N×N, N×2N, or N×N patterns, to obtain at least two transform blocks and at least two prediction blocks. If the number of transform blocks is the same as the number of prediction blocks, and all transform blocks can use the same transform kernel, then only the first transform block can be used as the target transform block for coefficient adjustment.

[0073] Step 402: transform and quantize the target transform block of the video frame using a transform kernel to obtain coefficients of the target transform block.

[0074] Step 403 : In response to determining that the number of non-zero coefficients of the target transform block and the transform kernel do not satisfy a preset mapping relationship, a target adjustment method for adjusting coefficients of the target transform block is determined.

[0075] The target adjustment method includes adjusting at least one non-zero coefficient to a zero coefficient and / or adjusting at least one zero coefficient to a non-zero coefficient. The coding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset mapping relationship with the transform kernel.

[0076] Step 404: adjust the coefficients of the target transform block using a target adjustment method to obtain an encoding result of the target transform block.

[0077] The above steps 402, 403 and 404 are respectively consistent with steps 201, 202 and 203 in the aforementioned embodiment. The specific implementation methods of steps 402, 403 and 404 can refer to the descriptions of steps 201, 202 and 203 in the aforementioned embodiment, and will not be repeated here.

[0078] Step 405 : Using the transform kernel, transform and quantize the transform blocks other than the target transform block in the coding block to obtain coding results of the transform blocks.

[0079] In this embodiment, all transform blocks in the same coding block use the same transform kernel. Then, the transform kernel can be used to transform and quantize the transform blocks other than the target transform block to obtain encoding results of the transform blocks other than the target transform block.

[0080] In the above embodiment, coefficient adjustment is performed only on the first transform block in the coding block to satisfy the preset mapping relationship between the number of non-zero coefficients and the transform kernel. No coefficient adjustment is required for other coding blocks. The transform kernel for the entire coding block can be analytically derived from the number of non-zero coefficients of the first transform block. This allows encoding of the entire coding block to be completed with minimal changes to the coefficients of the transform blocks. Because coefficient adjustment is performed on only one transform block, and the post-adjustment coding distortion satisfies the preset distortion condition, this embodiment effectively controls the coding distortion of the entire coding block.

[0081] Further references Figure 5 As an implementation of the above-mentioned digital video encoding method, the present disclosure provides an embodiment of a digital video encoding device. Figure 2 and Figure 3 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0082] like Figure 5 As shown, the digital video encoding apparatus 500 of this embodiment includes: a first transform unit 501, a determination unit 502, and an adjustment unit 503. The first transform unit 501 is configured to transform and quantize a target transform block of a video frame using a transform kernel to obtain coefficients of the target transform block; the determination unit 502 is configured to, in response to determining that the number of non-zero coefficients of the target transform block and the transform kernel do not satisfy a preset mapping relationship, determine a target adjustment method for adjusting the coefficients of the target transform block, wherein the coding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method and the transform kernel satisfy a preset mapping relationship, and the target adjustment method includes: adjusting at least one non-zero coefficient to a zero coefficient and / or adjusting at least one zero coefficient to a non-zero coefficient; and the adjustment unit 503 is configured to adjust the coefficients of the target transform block using the target adjustment method to obtain an encoding result of the target transform block.

[0083] In some embodiments, the above-mentioned determination unit 502 is further configured to determine the target adjustment method for adjusting the coefficients of the target transform block in the following manner: determine whether the number of non-zero coefficients of the target transform block is 1; if the number of non-zero coefficients of the target transform block is 1, construct at least one candidate adjustment method based on adjusting at least one zero coefficient adjacent to the non-zero coefficient in the target transform block to a non-zero coefficient, and screen out the candidate adjustment method with the smallest encoding distortion cost after adjusting the coefficients as the target adjustment method.

[0084] In some embodiments, the above-mentioned determination unit 502 is further configured to determine the target adjustment method for adjusting the coefficients of the target transform block in the following manner: if the number of non-zero coefficients of the target transform block is greater than 1, traverse the coefficients of the target transform block, and perform an optimization operation on each coefficient traversed; the optimization operation includes: calculating the coding distortion cost of the target transform block after adjusting according to the adjustment method corresponding to the current coefficient; if the coding distortion cost of the target transform block after adjusting according to the adjustment method corresponding to the current coefficient is less than the minimum coding distortion cost, update the target adjustment method to the adjustment method corresponding to the current coefficient, and update the minimum coding distortion cost to the coding distortion cost of the target transform block after adjusting according to the adjustment method corresponding to the current coefficient; wherein, the adjustment method corresponding to the current coefficient includes: if the current coefficient is a zero coefficient, adjust the current coefficient to a non-zero coefficient; if the current coefficient is a non-zero coefficient, adjust the current coefficient to a zero coefficient.

[0085] In some embodiments, the adjustment method corresponding to the above-mentioned current coefficient further includes: if the current coefficient is a zero coefficient, the current coefficient is adjusted to 1 or -1 according to the sign consistent with the numerical value of the image data at the position corresponding to the current coefficient in the target transform block after transformation and before quantization.

[0086] In some embodiments, the above-mentioned device also includes: a preprocessing unit, configured to determine that the first transform block of the coding block is a target transform block in response to determining that a non-2N×2N blocking mode is used to divide the coding block of the video frame into at least two transform blocks and the number of transform blocks and prediction blocks of the coding block is not equal; and a second transform unit, configured to use a transform kernel to transform and quantize other transform blocks in the coding block except the target transform block to obtain encoding results of other transform blocks.

[0087] In the digital video encoding device 500 of the above-mentioned embodiment of the present disclosure, a first transform unit transforms and quantizes a target transform block of a video frame using a transform kernel to obtain coefficients of the target transform block. In response to determining that the number of non-zero coefficients of the target transform block and the transform kernel do not satisfy a preset mapping relationship, a determination unit determines a target adjustment method for adjusting the coefficients of the target transform block, wherein the encoding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method and the transform kernel satisfy a preset mapping relationship. The target adjustment method includes: adjusting at least one non-zero coefficient to a zero coefficient and / or adjusting at least one zero coefficient to a non-zero coefficient. The adjustment unit adjusts the coefficients of the target transform block using the target adjustment method to obtain an encoding result of the target transform block, thereby implicitly including the transform kernel type in the coefficients of the transform block according to a fixed mapping relationship, and effectively controlling distortion caused by adjusting the coefficients of the transform block to satisfy the fixed mapping relationship.

[0088] Reference below Figure 6 , which shows an electronic device (eg, Figure 1 A schematic structural diagram of the server shown in FIG600. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0089] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0090] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead. Figure 6 Each block shown in the figure may represent one device, or may represent multiple devices as needed.

[0091] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed. It should be noted that the computer-readable medium described in the embodiment of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wire, optical cable, RF (radio frequency), etc., or any suitable combination thereof.

[0092] The computer-readable medium may be included in the electronic device, or may exist independently and not be incorporated into the electronic device. The computer-readable medium carries one or more programs. When executed by the electronic device, the computer-readable medium causes the electronic device to: transform and quantize a target transform block of a video frame using a transform kernel to obtain coefficients of the target transform block; determine a target adjustment method for adjusting the coefficients of the target transform block in response to determining that the number of non-zero coefficients of the target transform block does not satisfy a preset mapping relationship with the transform kernel, wherein the encoding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset mapping relationship with the transform kernel, the target adjustment method including: adjusting at least one non-zero coefficient to a zero coefficient and / or adjusting at least one zero coefficient to a non-zero coefficient; and adjust the coefficients of the target transform block using the target adjustment method to obtain an encoding result of the target transform block.

[0093] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0094] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0095] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor comprising a first transform unit, a determination unit, and an adjustment unit. The names of these units do not, in some cases, constitute a limitation on the units themselves. For example, the first transform unit may also be described as "a unit that transforms and quantizes a target transform block of a video frame using a transform kernel to obtain coefficients of the target transform block."

[0096] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A digital video encoding method, comprising: The target transform block of the video frame is transformed and quantized using the transform kernel to obtain coefficients of the target transform block; In response to determining that the number of non-zero coefficients of the target transform block and the transform kernel do not satisfy a preset mapping relationship, determining a target adjustment method for adjusting coefficients of the target transform block, wherein the mapping relationship is a correspondence between the parity of the number of non-zero coefficients and the transform kernel, the coding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method and the transform kernel satisfy the preset mapping relationship, and the target adjustment method includes adjusting the parity of the number of non-zero coefficients of the target transform block in the following manner: adjusting at least one non-zero coefficient to a zero coefficient, and / or adjusting at least one zero coefficient to a non-zero coefficient; The target adjustment method is used to adjust the coefficients of the target transform block to obtain an encoding result of the target transform block.

2. The method according to claim 1, wherein Determining a target adjustment method for adjusting coefficients of a target transform block includes: Determining whether the number of non-zero coefficients of the target transform block is 1; If the number of non-zero coefficients in the target transform block is 1, at least one candidate adjustment method is constructed based on adjusting at least one zero coefficient adjacent to the non-zero coefficient in the target transform block to a non-zero coefficient, and the candidate adjustment method with the smallest encoding distortion cost after adjusting the coefficients is screened out as the target adjustment method.

3. The method according to claim 1 or 2, wherein: Determining a target adjustment method for adjusting coefficients of a target transform block includes: If the number of non-zero coefficients of the target transform block is greater than 1, traversing each coefficient of the target transform block, and performing an optimization operation on each traversed coefficient; The optimization operation includes: Calculate the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient; if the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient is less than the minimum coding distortion cost, update the target adjustment method to the adjustment method corresponding to the current coefficient, and update the minimum coding distortion cost to the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient; The adjustment method corresponding to the current coefficient includes: if the current coefficient is a zero coefficient, adjusting the current coefficient to a non-zero coefficient; if the current coefficient is a non-zero coefficient, adjusting the current coefficient to a zero coefficient.

4. The method according to claim 3, wherein: The adjustment method corresponding to the current coefficient further includes: If the current coefficient is a zero coefficient, the current coefficient is adjusted to 1 or -1 according to a sign consistent with the value of the image data of the target transform block at the position corresponding to the current coefficient after transformation and before quantization.

5. The method according to claim 1, wherein The method further comprises: In response to determining that a coding block of a video frame is divided into at least two transform blocks using a non-2N×2N block partitioning mode and the number of transform blocks and the number of prediction blocks of the coding block are not equal, determining the first transform block of the coding block as a target transform block; and The transform kernel is used to transform and quantize other transform blocks in the coding block except the target transform block to obtain coding results of the other transform blocks.

6. A digital video encoding device, comprising: A first transform unit is configured to transform and quantize a target transform block of the video frame using a transform kernel to obtain coefficients of the target transform block; a determining unit configured to, in response to determining that the number of non-zero coefficients of the target transform block and the transform kernel do not satisfy a preset mapping relationship, determine a target adjustment method for adjusting coefficients of the target transform block, wherein the mapping relationship is a correspondence between the parity of the number of non-zero coefficients and the transform kernel, a coding distortion cost of the target transform block after adjusting the coefficients according to the target adjustment method satisfies a preset distortion condition, and the number of non-zero coefficients of the target transform block after adjusting the coefficients according to the target adjustment method and the transform kernel satisfy the preset mapping relationship, and the target adjustment method includes adjusting the parity of the number of non-zero coefficients of the target transform block in the following manner: adjusting at least one non-zero coefficient to a zero coefficient, and / or adjusting at least one zero coefficient to a non-zero coefficient; The adjustment unit is configured to adjust the coefficients of the target transform block by adopting the target adjustment method to obtain an encoding result of the target transform block.

7. The device according to claim 6, wherein The determining unit is further configured to determine a target adjustment method for adjusting coefficients of the target transform block in the following manner: Determining whether the number of non-zero coefficients of the target transform block is 1; If the number of non-zero coefficients in the target transform block is 1, at least one candidate adjustment method is constructed based on adjusting at least one zero coefficient adjacent to the non-zero coefficient in the target transform block to a non-zero coefficient, and the candidate adjustment method with the smallest encoding distortion cost after adjusting the coefficients is screened out as the target adjustment method.

8. The device according to claim 6 or 7, wherein: The determining unit is further configured to determine a target adjustment method for adjusting coefficients of the target transform block in the following manner: If the number of non-zero coefficients of the target transform block is greater than 1, traversing each coefficient of the target transform block, and performing an optimization operation on each traversed coefficient; The optimization operation includes: Calculate the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient; if the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient is less than the minimum coding distortion cost, update the target adjustment method to the adjustment method corresponding to the current coefficient, and update the minimum coding distortion cost to the coding distortion cost of the target transform block after adjustment according to the adjustment method corresponding to the current coefficient; The adjustment method corresponding to the current coefficient includes: if the current coefficient is a zero coefficient, adjusting the current coefficient to a non-zero coefficient; if the current coefficient is a non-zero coefficient, adjusting the current coefficient to a zero coefficient.

9. The device according to claim 8, wherein The adjustment method corresponding to the current coefficient further includes: If the current coefficient is a zero coefficient, the current coefficient is adjusted to 1 or -1 according to a sign consistent with the value of the image data of the target transform block at the position corresponding to the current coefficient after transformation and before quantization.

10. The device according to claim 6, wherein The device further comprises: a pre-processing unit configured to, in response to determining that a coding block of a video frame is divided into at least two transform blocks using a non-2N×2N blocking mode and the number of transform blocks and prediction blocks of the coding block is not equal, determine the first transform block of the coding block as a target transform block; and The second transform unit is configured to use the transform kernel to transform and quantize other transform blocks in the coding block except the target transform block to obtain coding results of the other transform blocks.

11. An electronic device comprising: one or more processors; a storage device for storing 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 method according to any one of claims 1 to 5.

12. A computer-readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Improved transformation coefficient sign data hiding method based on recovered transformation coefficient

    CN105898300A

  • Video decoding method and apparatus by chroma-multi-transform, and video encoding method and apparatus by chroma-multi-transform

    CN108605135A