Video coding method and apparatus, video decoding method and apparatus, and electronic device and computer-readable storage medium

By implicitly deducing the sub-block transformation mode based on the target quantization coefficient in the video decoding method, the problem of high flag bit encoding of the sub-block transformation mode in the hybrid encoding framework is solved, and the effect of improving the encoding and decoding efficiency is achieved.

WO2025036150A1PCT designated stage expired Publication Date: 2025-02-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/108635
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-17
Filing Date
2024-07-30
Publication Date
2025-02-20

AI Technical Summary

Technical Problem

In the hybrid encoding framework, a variety of sub-block transformation modes have been introduced. Although the cost of encoding residuals can be reduced, the flag bit encoding cost of sub-block transformation mode is also increased, which affects the encoding and decoding efficiency.

Method used

By implicitly deducing the sub-block transformation mode used by the current block based on the target quantization coefficients in the target area in the current block, the flag bits of the sub-block transformation mode are avoided at the encoding end.

Benefits of technology

It achieves the saving of code rate, improves encoding and decoding efficiency, and reduces the encoding cost on the encoding side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024108635_20022025_PF_FP_ABST
    Figure CN2024108635_20022025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a video coding method and apparatus, a video decoding method and apparatus, and an electronic device and a computer-readable storage medium, which methods and apparatuses can improve the efficiency of coding and decoding. The video decoding method comprises: acquiring a target quantization coefficient in a target region in a current block; on the basis of the target quantization coefficient in the target region, determining a sub-block transformation mode corresponding to the current block; and decoding the current block on the basis of the sub-block transformation mode corresponding to the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding and decoding method, device, electronic device and computer-readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on August 17, 2023, with application number 202311053293.5 and application name “Video Coding and Decoding Method, Device, Electronic Device and Computer-readable Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of coding and decoding technology, and more particularly, to a video coding and decoding method, apparatus, electronic device, and computer-readable storage medium. Background Art

[0003] In a hybrid coding framework, the residual needs to be transmitted to compensate for the predicted image, thereby improving the quality of the reconstructed image. In some scenarios, multiple sub-block transform modes are introduced. The encoder can transform and encode only the sub-blocks within the residual block based on the sub-block transform mode, reducing the cost of encoding the residual. However, this also introduces the coding cost of the sub-block transform mode flag, which affects encoding and decoding efficiency.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide a video encoding and decoding method, apparatus, electronic device, and computer-readable storage medium, which can improve encoding and decoding efficiency.

[0006] In a first aspect, a video decoding method is provided, comprising:

[0007] Obtain target quantization coefficients within a target region in the current block;

[0008] Determine the sub-block transform mode corresponding to the current block according to the target quantization coefficient in the target area;

[0009] The current block is decoded according to the sub-block transform mode corresponding to the current block.

[0010] In a second aspect, a video encoding method is provided, comprising:

[0011] Determine the sub-block transformation mode corresponding to the current block;

[0012] Determine a target quantization coefficient in a target area in the current block according to a sub-block transform mode corresponding to the current block.

[0013] According to a third aspect, a video decoding apparatus is provided, comprising:

[0014] An acquisition unit, configured to acquire a target quantization coefficient in a target area in a current block;

[0015] A determining unit, configured to determine a sub-block transform mode corresponding to the current block according to a target quantization coefficient in the target area;

[0016] The decoding unit is configured to perform decoding processing on the current block according to the sub-block transformation mode corresponding to the current block.

[0017] In a fourth aspect, a video encoding apparatus is provided, comprising:

[0018] A first determining unit, configured to determine a sub-block transform mode corresponding to a current block;

[0019] The second determining unit is configured to determine a target quantization coefficient in a target area of ​​the current block according to a sub-block transform mode corresponding to the current block.

[0020] In a fifth aspect, a video decoding device is provided, comprising: a communication bus, a processor, a communication interface and a memory, wherein the processor, the communication interface and the memory are interconnected via the communication bus, wherein the memory is used to store program code, and the processor is configured to call the program code to execute the method of the first aspect above.

[0021] In the sixth aspect, a video encoding device is provided, comprising: a communication bus, a processor, a communication interface and a memory, wherein the processor, the communication interface and the memory are interconnected via the communication bus, wherein the memory is used to store program code, and the processor is configured to call the program code to execute the method as described in the second aspect above.

[0022] In the seventh aspect, a video encoding and decoding system is provided, comprising: the video decoding device in the third aspect and the video encoding device in the fourth aspect; or, the video decoding device in the fifth aspect and the video encoding device in the sixth aspect.

[0023] In an eighth aspect, a computer storage medium is provided, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method as described in the first aspect.

[0024] In an eighth aspect, a computer storage medium is provided, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method as described in the second aspect.

[0025] Based on the above technical solution, the decoding end determines the sub-block transformation mode corresponding to the current block according to the target quantization coefficient in the target area in the current block, and can implicitly derive the sub-block transformation mode used by the current block according to the target quantization coefficient in the target area in the current block. Therefore, the encoding end does not need to explicitly encode the flag bit of the sub-block transformation mode used by the current block, thereby saving bit rate and improving encoding and decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0027] FIG1 shows a schematic diagram of an exemplary system architecture applicable to an embodiment of the present application.

[0028] FIG2 shows a basic flow chart of a video encoder.

[0029] FIG3 is a schematic diagram of eight sub-block division methods.

[0030] FIG4 is a schematic diagram of sub-block transformation methods corresponding to the eight sub-block division methods in FIG3 .

[0031] FIG5 is a schematic diagram of 16 sub-block division methods.

[0032] FIG6 is a schematic diagram of sub-block transformation methods corresponding to the 16 sub-block division methods in FIG5 .

[0033] FIG7 is a schematic flowchart of a video decoding method provided in an embodiment of the present application.

[0034] FIG8 is a schematic diagram of target quantization coefficients in a target area provided by an embodiment of the present application.

[0035] FIG9 is a schematic flowchart of a video encoding method provided in an embodiment of the present application.

[0036] FIG10 is a schematic diagram of a video decoding device provided in an embodiment of the present application.

[0037] FIG11 is a schematic diagram of a video encoding device provided in an embodiment of the present application.

[0038] FIG12 is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0040] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner.In the following description, many specific details are provided so as to provide a full understanding of the embodiments of the present application. However, it will be appreciated by those skilled in the art that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps etc. can be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0041] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0042] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0043] It should be noted that the term "plurality" used in this document refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0044] In order to better understand the embodiments of the present application, the system architecture applicable to the embodiments of the present application is described.

[0045] Referring to FIG. 1 , FIG. 1 is a schematic diagram of a system architecture applicable to embodiments of the present application. As shown in FIG. 1 , system architecture 100 may include multiple terminals that can communicate via a network 130. For example, system architecture 100 may include a first terminal 110 and a second terminal 120 that transmit data via the network 130.

[0046] For example, the first terminal 110 can encode video data (such as a video picture stream collected by the first terminal 110) for transmission to the second terminal 120 through the network 130. The encoded video data is transmitted in the form of one or more encoded video streams. The second terminal 120 can receive the encoded video data from the network 130, decode the encoded video data to restore the video data, and display the video picture based on the restored video data.

[0047] In some scenarios, the system architecture may further include more terminals, such as a third terminal and a fourth terminal, etc. The third terminal and the fourth terminal may also perform data transmission through the network 130 .

[0048] The terminal in the embodiments of the present application may be a server, a personal computer, a tablet computer, a smart phone, a media player and / or a dedicated video conferencing device, etc., but the present application is not limited thereto.

[0049] The network 130 may be any number of networks for transmitting encoded video data between terminals, including, for example, a wired network and / or a wireless network. The network 130 may exchange data using circuit switching and / or packet switching channels. The network may include a telecommunications network, a local area network, a wide area network, and / or the Internet.

[0050] In order to better understand the embodiments of the present application, the video encoding technology related to the embodiments of the present application is described.

[0051] In some embodiments of the present application, taking the international video coding standards High Efficiency Video Coding (HEVC), Versatile Video Coding (VVC), and China's national video coding standard (Audio Video Coding Standard, AVS) as examples, a hybrid coding framework is adopted to perform the following series of operations and processing on the input original video signal:

[0052] 1) Block partition structure: The input video frame image will be divided into several non-overlapping processing units according to the size of a block, and each processing unit will perform similar compression operations. This processing unit is called a coding tree unit (CTU), or the largest coding unit (LCU). The CTU can be further divided into more detailed divisions to obtain one or more basic coding units (CU). Each CU is the most basic element in the encoding process. The following describes the various encoding methods that may be used for each CU. 2) Predictive Coding: It includes intra-frame prediction and inter-frame prediction. The original video signal is predicted by the selected reconstructed video signal to obtain a residual video signal. The encoder needs to select the most suitable prediction coding mode for the current CU from many possible prediction coding modes and inform the decoder.

[0053] a: Intra-frame prediction: The predicted signal comes from the area that has been encoded and reconstructed within the same image.

[0054] b: Inter-frame prediction: The predicted signal comes from an already encoded image that is different from the current image (called a reference image).

[0055] 3) Transform & Quantization: After the residual video signal undergoes transformations such as the Discrete Fourier Transform (DFT) and Discrete Cosine Transform (DCT), it is converted to a transform domain, known as transform coefficients. The signal in the transform domain is further subjected to a lossy quantization operation, which loses some information, making the quantized signal more suitable for compression. Some video coding standards may offer more than one transform method. Therefore, the encoder must select one for the current CU being encoded and inform the decoder. The level of quantization is typically determined by the quantization parameter (QP). A larger QP value means that coefficients with a larger value range will be quantized into the same output, which generally results in greater distortion and a lower bitrate. Conversely, a smaller QP value means that coefficients with a smaller value range will be quantized into the same output, which generally results in less distortion and a higher bitrate.

[0056] 4) Entropy Coding or Statistical Coding: The quantized transform domain signal will be statistically compressed and encoded based on the frequency of occurrence of each value, and finally a binary (0 or 1) compressed code stream will be output. At the same time, the encoding generates other information, such as the selected coding mode, motion vector data, etc., which also need to be entropy coded to reduce the bit rate. Statistical coding is a lossless coding method that can effectively reduce the bit rate required to express the same signal. Common statistical coding methods include variable length coding (VLC) or context-based binary arithmetic coding (CABAC).

[0057] 5) Loop Filtering: After the encoded image undergoes inverse quantization, inverse transformation, and prediction compensation (i.e., operations 2 to 4 above), a reconstructed decoded image can be obtained. Compared with the original image, the reconstructed image has some information that is different from the original image due to the influence of quantization, resulting in distortion. Therefore, filtering operations can be performed on the reconstructed image, such as deblocking filter (DB), adaptive pixel offset (SAO), or adaptive loop filter (ALF), which can effectively reduce the degree of distortion caused by quantization. Since these filtered reconstructed images will be used as a reference for subsequent encoded images and used to predict future signals, the above filtering operations are also called loop filtering, and are filtering operations within the encoding loop.

[0058] FIG2 shows a basic flow chart of a video encoder, in which intra-frame prediction is used as an example for explanation. k [x,y] and predicted image signal Perform difference operation to obtain the residual signal u k [x,y], reference signal u k [x,y] is transformed and quantized to obtain the quantized coefficients. The quantized coefficients are entropy coded to obtain the encoded bit stream, and the reconstructed residual signal u′ is obtained through inverse quantization and inverse transformation. k [x,y], predicted image signal and reconstruct the residual signal u′ k [x,y] superposition generates image signal Image signal On the one hand, it is input to the intra-frame mode decision module and the intra-frame prediction module for intra-frame prediction processing, and on the other hand, the reconstructed image signal S' is output through loop filtering k [x,y], reconstructed image signal S′ k [x,y] can be used as the reference image for the next frame for motion estimation and motion compensation prediction. Then based on the result of motion compensation prediction S′ r [x+m x ,y+m y ] and intra prediction results Get the predicted image signal of the next frame And repeat the above process until the encoding is completed.

[0059] Based on the encoding process described above, it can be seen that on the decoding end, for each CU, after the decoder obtains the compression bit rate, it first performs entropy decoding to obtain various mode information and quantization coefficients. The quantization coefficients are then dequantized and inversely transformed to produce a residual signal. Furthermore, based on the known coding mode information, the prediction signal corresponding to the CU can be obtained. The residual signal is then added to the prediction signal to produce a reconstructed signal. The reconstructed signal then undergoes loop filtering and other operations to produce the final output signal.

[0060] Since the prediction method has large errors, the residual needs to be transmitted to compensate the predicted image, thereby improving the quality of the reconstructed image. Therefore, residual processing is an important processing process in the hybrid coding framework.

[0061] As shown in Figure 2, in the hybrid coding framework, the residual is the difference between the original image signal and the predicted image signal, that is,

[0062] For residual processing, there are two processing methods in the HEVC, VVC and AVS3 video coding standards:

[0063] 1) Transformation and quantization:

[0064] By utilizing the correlation of the residuals, the residuals are transformed to concentrate their energy, so that the energy is concentrated in fewer low-frequency coefficients, that is, the values ​​of most coefficients are small. After the subsequent quantization module, the smaller coefficient values ​​will become zero, which greatly reduces the cost of encoding the residuals. Taking the traditional DCT as an example, the transformation is shown in the following formula, which realizes a two-dimensional discrete transformation through two separate one-dimensional discrete transformations (horizontal transformation and vertical transformation). k =CU k C T

[0065] Due to the diversity of residual distribution, a single DCT cannot adapt to all residual characteristics. Therefore, transform kernels such as DST-7 and DCT-8 are introduced into the transform module, and different transform kernels can be used for horizontal and vertical transforms. Taking the adaptive multiple core transform (AMT) technology as an example, the possible combinations of transform kernels selected for a residual block include one or more of the following:

[0066] (DCT-2, DCT-2)

[0067] (DCT-8, DCT-8)

[0068] (DCT-8, DST-7)

[0069] (DST-7, DCT-8)

[0070] (DST-7, DST-7)

[0071] The decision on which combination of transform kernels to use for a residual block can be made at the encoder using rate distortion optimization (RDO). Multiple transform kernels can improve the adaptability of the transform module to residuals, but this comes with the cost of encoding the transform kernel index.

[0072] 2) Transformation skipping and quantization: There are also some residuals whose correlation is weak. Based on 1), skipping the transformation can actually improve the coding efficiency. That is, skipping the transformation process of the residual and directly quantizing the residual.

[0073] To better understand the embodiments of the present application, the sub-block transform (SBT) mode related to the embodiments of the present application is described. When using the sub-block transform mode, the encoder only needs to transform and encode a sub-block of the current coding block, reducing the encoding cost.

[0074] The sub-block transform mode of the current block may include a sub-block partitioning method of the current block, which is used to partition the sub-blocks in the current block. The sub-block partitioning method may be represented by information such as the size of the sub-block and the position of the sub-block in the current block.

[0075] Figure 3 shows a schematic diagram of eight sub-block transformation modes (or sub-block partitioning methods) in the current block, where the quad flag is the syntax for controlling the size of the sub-blocks in the current block. A quad flag value of 1 indicates that after quadtree partitioning the current block, the size of the sub-block is 1 / 4 of the size of the current block, and a value of 0 indicates that the size of the sub-block is 1 / 2 of the size of the current block. The direction (dir) flag and position (pos) flag are syntax for controlling the position of the sub-blocks in the current block. The dir flag is used to control the direction of the sub-block in the current block, such as horizontal or vertical, and the pos flag is used to control the position of the sub-block, such as left or right, up or down. In other words, the quad flag determines the size (shape) of the sub-block, while the dir flag and pos flag determine the position of the sub-block. That is, the partitioning method of the current block can be represented by the size of the sub-block, the direction of the sub-block in the current block, and the position of the sub-block in the current block.

[0076] In some embodiments, in the above 8-subblock division method, only the gray subblock is transform-coded, while the white portion is forcibly cleared to zero. Alternatively, the transformation can be skipped during the residual coding of the gray subblock, and quantization and coding can be performed directly.

[0077] In some embodiments, the sub-block partitioning method and the sub-block transform method of the current block are associated. For example, the sub-block transform method can be pre-set based on the sub-block partitioning method of the current block and the position of the sub-blocks, without the need for additional coding bits for identification. Therefore, the sub-block transform mode of the current block can also be considered to include the sub-block partitioning method and the sub-block transform method of the current block. Optionally, the sub-block transform method can be represented by the transform kernel used for the sub-block transform.

[0078] For example, with respect to the selection of a combination of transform kernels for sub-blocks, when the width or height of a non-zero residual sub-block is 64, the horizontal and vertical transforms of the non-zero residual sub-block are both DCT-2; in other cases, the selection of transform kernels for the horizontal and vertical transforms may be as shown in FIG4 , where the white sub-block is a zero residual sub-block and the gray sub-block is a non-zero residual sub-block.

[0079] In order to better understand the embodiments of the present application, the sub-block transformation extension mode related to the embodiments of the present application is described.

[0080] In some scenarios, an extended sub-block transform mode (Figure 5) is introduced based on the sub-block transform mode to further improve transform efficiency. Similar to the sub-block transform mode, only the residuals in the gray sub-block areas are encoded, and the residuals in the remaining white areas are forcibly cleared to zero.

[0081] In some embodiments, for the 16-block sub-block division method in FIG5 , the sub-block transform method can be as shown in FIG6 , wherein the encoder only transforms and encodes the gray sub-blocks in the current block, while forcibly clearing the white sub-blocks. Alternatively, the transform can be skipped during the residual encoding of the gray sub-blocks, and quantization and encoding can be performed directly.

[0082] In the sub-block division method shown in Figure 5, a00~a11, b00~b11, c00~c11, d00~d11 can be regarded as a type of mode respectively. Optionally, at least one type can be selected from these four types of modes as an extended mode of the sub-block transformation mode. The gray sub-blocks in the four modes in each type of mode are respectively located at the upper left, upper right, lower left and lower right positions of the entire coding block, so each type of mode can be identified by two flag bits: hor_idx (horizontal identification index, or horizontal position identification bit) and ver_idx (vertical identification index, or vertical position identification bit). That is, the sub-block division method of the current block can be represented by the horizontal size, vertical size, horizontal position and vertical position of the sub-block in the current block.

[0083] Table 1

[0084] Using the sub-block transform mode on the encoder side can improve transform efficiency, but this also introduces the coding cost of the sub-block transform mode flag, which affects encoding and decoding efficiency. Therefore, how to improve transform efficiency by using the sub-block transform mode while also balancing encoding and decoding efficiency is an urgent problem that needs to be solved.

[0085] In view of this, the present application provides a technical solution that can use part or all of the target quantization coefficients in the target area of ​​the current block to implicitly indicate the sub-block transformation mode corresponding to the current block, thereby reducing the cost of the flag bit of the sub-block transformation mode encoded at the encoding end and improving the encoding and decoding efficiency.

[0086] FIG7 shows a flowchart of a video decoding method provided in an embodiment of the present application. The video decoding method can be executed by a decoding end, which can be a device with computing and processing capabilities, or can be provided in a device with computing and processing capabilities, such as a terminal device or a server. Referring to FIG7 , the video decoding method 600 includes at least part of the following:

[0087] S610, obtaining a target quantization coefficient within a target area in the current block;

[0088] S620, determining a sub-block transform mode corresponding to the current block according to the target quantization coefficient in the target area;

[0089] S630: Decode the current block according to the sub-block transform mode corresponding to the current block.

[0090] Therefore, in an embodiment of the present application, the decoding end determines the sub-block transformation mode corresponding to the current block according to the target quantization coefficient in the target area in the current block, and can implicitly derive the sub-block transformation mode used by the current block according to the target quantization coefficient in the target area in the current block. Therefore, the encoding end does not need to explicitly encode the flag bit of the sub-block transformation mode used by the current block, thereby saving bit rate and improving encoding and decoding efficiency.

[0091] In some embodiments of the present application, a video image frame sequence includes a series of video image frames, each video image frame can be further divided into slices (or strips), and the slices can be divided into a series of LCUs (or CTUs), and the LCU contains several CUs.

[0092] In some embodiments of the present application, video image frames are encoded in blocks. In some video coding standards, such as the H.264 standard, there is a concept of macroblocks (MBs), which can be further divided into multiple prediction blocks (prediction blocks) that can be used for predictive coding. In the HEVC standard, basic concepts such as CU, prediction unit (PU), and transform unit (TU) are used to functionally divide various block units.

[0093] The current block in the embodiment of the present application may be a functionally divided block unit, such as a current CU, a current PU, a current TU, or a current quantization block, or may be a block smaller than a CU, a PU, a TU, or a quantization block, such as a smaller block obtained by dividing a CU, a PU, a TU, or a quantization block.

[0094] In some embodiments of the present application, the sub-block transform mode may be a sub-block transform mode in AVS3 or VCC or other video coding standards, or an extended mode of the sub-block transform mode.

[0095] In some embodiments of the present application, the sub-block transformation mode can be represented by a size flag and a position flag, wherein the size flag is used to identify at least one of the horizontal size and the vertical size of the sub-block transformation, and the position flag is used to identify at least one of the horizontal position and the vertical position of the sub-block transformation.

[0096] Optionally, the size flag is also called a type flag or a size type flag. For example, different state values ​​of the size flag represent different combinations of horizontal and vertical sizes of the sub-block transformation.

[0097] In a specific example, the size flag may be 2 bits, and different state values ​​of the 2 bits represent different combinations of horizontal and vertical sizes of the sub-block transformation.

[0098] For example, as shown in Figure 5, a00~a11 correspond to a size type, that is, the horizontal size is W / 2 and the vertical size is H / 2; b00~b11 correspond to a size type, that is, the horizontal size is W / 2 and the vertical size is H / 4; c00~c11 correspond to a size type, that is, the horizontal size is W / 4 and the vertical size is H / 2; d00~d11 correspond to a size type, that is, the horizontal size is W / 4 and the vertical size is H / 4.

[0099] For example, the two-bit size flag has different status values ​​representing the four size types described above. For example, 00 represents a combination of W / 2 and H / 2, 01 represents a combination of W / 2 and H / 4, 10 represents a combination of W / 4 and H / 2, and 11 represents a combination of W / 4 and H / 4. It should be understood that the above correspondence between status values ​​and size types is merely an example. This application does not impose any limitations on this as long as each size type corresponds to a unique status value.

[0100] In some embodiments of the present application, when a size flag is used to identify the horizontal size and vertical size of a sub-block transformation, the size flag may include a horizontal size flag and a vertical size flag, wherein the horizontal size flag is used to identify the horizontal size of the sub-block transformation, and the vertical size flag is used to identify the vertical size of the sub-block transformation. That is, the horizontal size and vertical size of the sub-block transformation can be indicated separately by independent flags. For example, different state values ​​of the horizontal size flag represent different horizontal sizes of the sub-block transformation, and different state values ​​of the vertical size flag represent different vertical sizes of the sub-block transformation.

[0101] In a specific example, the horizontal size flag is 1 bit. Different state values ​​of this 1 bit are used to indicate whether the horizontal size of the sub-block transform is W / 4 or W / 2. For example, a state value of 0 indicates W / 2, and a state value of 1 indicates W / 4, or vice versa.

[0102] In a specific example, the vertical size flag is 1 bit. Different state values ​​of this 1 bit are used to indicate whether the vertical size of the sub-block transform is H / 4 or H / 2. For example, a state value of 0 indicates H / 2, and a state value of 1 indicates H / 4, or vice versa.

[0103] In some embodiments of the present application, the position flag bit can be 2 bits, and the different state values ​​of the 2 bits represent different combinations of horizontal positions and vertical positions of the sub-block transformation. For example, the different state values ​​of 2 bits represent the four positions in the example shown in Figure 5: upper left (a00, b00, c00, d00), upper right (a01, b01, c01, d01), lower left (a10, b10, c10, d10), and lower right (a11, b11, c11, d11). For example, 00 represents the upper left, 01 represents the upper right, 10 represents the lower left, and 11 represents the lower right. It should be understood that the correspondence between the above state values ​​and position combinations is only an example. As long as each position combination corresponds to a unique state value, the present application is not limited to this.

[0104] In some embodiments of the present application, when the position flag is used to identify the horizontal position and vertical position of a sub-block transform, the position flag may include a horizontal position flag (e.g., hor_idx) and a vertical position flag (e.g., ver_idx), wherein the horizontal position flag is used to identify the horizontal position of the sub-block transform, and the vertical position flag is used to identify the vertical position of the sub-block transform. That is, the horizontal position and vertical position of the sub-block transform can be indicated by independent flags.

[0105] In some embodiments of the present application, different state values ​​of the horizontal position flag are used to identify different horizontal positions of the sub-block transformation. For example, the horizontal position flag can be 1 bit, and the different state values ​​of this 1 bit are used to indicate whether the horizontal position of the sub-block transformation is left or right. Exemplarily, a state value of 0 indicates left, and a state value of 1 indicates right, or vice versa.

[0106] In some embodiments of the present application, different state values ​​of the vertical position flag are used to identify different vertical positions of the sub-block transformation. For example, the vertical position flag can be 1 bit, and the different state values ​​of this 1 bit are used to indicate whether the vertical position of the sub-block transformation is up or down. Exemplarily, a state value of 0 indicates up, and a state value of 1 indicates down, or vice versa.

[0107] In some embodiments of the present application, S620 may include:

[0108] Determining a target flag corresponding to the sub-block transform mode according to a target quantization coefficient within the target area, where the target flag includes at least one of a size flag and a position flag;

[0109] At least one of size information and position information of the sub-block transformation mode corresponding to the current block is determined according to the target flag corresponding to the sub-block transformation mode.

[0110] That is to say, in the embodiment of the present application, part or all of the flag bits corresponding to the sub-block transform mode can be determined according to the target quantization coefficient.

[0111] In some embodiments, when the target flag includes some flags corresponding to the sub-block transform mode, other flags can be obtained through entropy decoding, for example, by determining specific flag bits in the decoded code stream, that is, the encoding end can only encode other flags, and the target flag is implicitly indicated by the quantization coefficient, or, in other implementations, other flags can also be pre-set, or the values ​​of other flags are default values, for example, 0 or 1 by default.

[0112] Optionally, the target flag includes a position flag (eg, a horizontal position flag and a vertical position flag). In this case, the size flag corresponding to the sub-block transform mode can be obtained through entropy decoding.

[0113] Optionally, the target flag includes a horizontal position flag. In this case, the value of the vertical position flag can be obtained through entropy decoding, for example, by determining a specific identification bit in the decoded bitstream. Optionally, the size flag corresponding to the sub-block transform mode can also be obtained through entropy decoding.

[0114] Optionally, the target flag includes a vertical position flag. In this case, the value of the horizontal position flag may be obtained through entropy decoding, for example, by determining a specific identification bit in the decoded bitstream. Optionally, the size flag corresponding to the sub-block transform mode may also be obtained through entropy decoding, for example, by determining a specific identification bit in the decoded bitstream.

[0115] Optionally, the target flag includes a size flag for identifying the horizontal size and vertical size of the sub-block transformation. In this case, the position flag corresponding to the sub-block transformation mode can be obtained by entropy decoding, for example, by determining a specific identification bit in the decoded bitstream.

[0116] In some embodiments of the present application, the target area is the area where the current block is located, or in other words, the target area includes the entire area where the current block is located, that is, the candidate quantization coefficients include the entire quantization coefficient matrix corresponding to the current block.

[0117] In other embodiments of the present application, the target region is the region where the non-zero coefficients are located in the current block. That is, the candidate quantization coefficients only include the quantization coefficient matrices within the region where the non-zero coefficients are located. For example, the target region can be the Scan Region-based Coefficient Coding (SRCC) region in the current block. This approach is beneficial for reducing the computational complexity of the decoding end, improving processing speed, and facilitating hardware implementation.

[0118] In some embodiments, the target region may be pre-set, i.e., the decoder and the encoder have the same understanding of the target region. For example, the encoder sets the target quantization coefficients within the target region based on the sub-block transform mode flag, and the decoder determines the sub-block transform mode based on the target quantization coefficients within the target region, thereby achieving a consistent understanding of the sub-block transform mode used by the encoder and the decoder on the current block.

[0119] In embodiments of the present application, the target quantization coefficients may include some or all of the quantization coefficients within the target region. That is, the decoder may determine the sub-block transform mode based on some or all of the quantization coefficients within the target region. The following describes implementation methods for the target quantization coefficients within the target region, with reference to specific embodiments.

[0120] Mode 1: The target quantization coefficient may include all quantization coefficients within the target area.

[0121] Mode 2: The target quantization coefficient includes quantization coefficients at X preset positions within the target area, where X is a positive integer.

[0122] Optionally, the positions of the X preset positions in the target area may be pre-set.

[0123] Optionally, the value of X is preset, such as X=1, or X is greater than 1, such as X=2. For example, if X=1, the preset position may be the first row and first column position in the target area, or the last row and last column position.

[0124] Mode 3: The target quantization coefficient includes M rows of quantization coefficients in the target area, where M is a positive integer.

[0125] Optionally, the positions of the M rows of quantization coefficients in the target area may be preset.

[0126] Optionally, the value of M is preset, for example, M=1, or M is greater than 1, for example, M=2.

[0127] Taking M=1 and the target area as a 4*4 quantization coefficient block as an example, as shown in (a) in Figure 8, the M rows of quantization coefficients can be the first row of quantization coefficients in the target area, or the last row of quantization coefficients, etc.

[0128] Taking M=2 and a 4*4 quantization coefficient block as an example, as shown in (b) in Figure 8, the M rows of quantization coefficients can be the last two rows of quantization coefficients in the target area, or the first two rows of quantization coefficients, or the middle two rows of quantization coefficients, or the odd rows of quantization coefficients, or the even rows of quantization coefficients.

[0129] Mode 4: The target quantization coefficient includes N columns of quantization coefficients in the target area, where N is a positive integer.

[0130] Optionally, the positions of the N columns of quantization coefficients in the target area may be preset.

[0131] Optionally, the value of N is preset, for example, N=1, or N is greater than 1, for example, N=2.

[0132] Taking N=1 and the target area as a 4*4 quantization coefficient block as an example, as shown in (c) in Figure 8, the N columns of quantization coefficients can be the first column of quantization coefficients in the target area, or the last column of quantization coefficients, etc.

[0133] Taking N=2 and a 4*4 quantization coefficient block as an example, as shown in (d) in Figure 8, the N columns of quantization coefficients can be the last two columns of quantization coefficients in the target area, or the first two columns of quantization coefficients, or the middle two columns of quantization coefficients, or the odd columns of quantization coefficients, or the even columns of quantization coefficients.

[0134] Mode 5: The target quantization coefficients include P row quantization coefficients and Q column quantization coefficients in the target area, where P and Q are positive integers.

[0135] Optionally, the positions of the P rows and Q columns of quantization coefficients in the target area may be preset.

[0136] Optionally, the value of P is preset, such as P=1, or P is greater than 1, such as P=2.

[0137] Optionally, the value of Q is preset, such as Q=1, or Q is greater than 1, such as Q=2.

[0138] Taking P=Q=1 and a 4*4 quantization coefficient block as an example, as shown in (e) in Figure 8 , the P rows and Q columns of quantization coefficients may include the last row of quantization coefficients and the last column of quantization coefficients in the target area, or, as shown in (g) in Figure 8 , may also include the first row of quantization coefficients and the first column of quantization coefficients in the target area, etc.

[0139] Taking the quantization coefficient block with P=Q=2 and a target area of ​​4*4 as an example, as shown in (f) in Figure 8, the P rows and Q columns of quantization coefficients may include the last two rows of quantization coefficients and the last two columns of quantization coefficients in the target area, or, as shown in (h) in Figure 8, it may also include the first two rows of quantization coefficients and the first two columns of quantization coefficients in the target area, etc., or it may also include odd rows of quantization coefficients and odd columns of quantization coefficients, or it may also include even rows of quantization coefficients and even columns of quantization coefficients.

[0140] Mode 6: The target quantization coefficient includes the quantization coefficients at K oblique positions within the target area, where K is a positive integer.

[0141] Optionally, the positions of the K oblique line positions in the target area may be preset.

[0142] Optionally, the value of K is preset, for example, K=1, or K is greater than 1, for example, K=2.

[0143] Taking K=1 and a 4*4 quantization coefficient block as an example, as shown in (i) in Figure 8 , the quantization coefficients at the K diagonal positions can be the quantization coefficients at the second-to-last diagonal position in the target area, or, as shown in (j) in Figure 8 , they can also be the quantization coefficients at the third-to-last diagonal position, or they can also be the quantization coefficients on the diagonal line.

[0144] Taking K=2 and a quantization coefficient block with a target area of ​​4*4 as an example, as shown in (k) in Figure 8, the quantization coefficients at the K diagonal positions may include the quantization coefficients at the penultimate and second-to-last diagonal positions within the target area, or, as shown in (l) in Figure 8, may also include the quantization coefficients at the second-to-last and third-to-last diagonal positions, or may also include the quantization coefficients on the diagonal and adjacent diagonal lines.

[0145] It should be understood that FIG8 only takes the target area as a 4*4 quantization coefficient block as an example, but the present application is not limited to this. For example, the target area can also be an 8*8 quantization coefficient block, or a 16*16 quantization coefficient block, etc. In addition, each block in FIG8 represents a quantization coefficient, and the area where the gray block is located can be considered as a statistical area for determining the sub-block transformation mode corresponding to the current block.

[0146] Mode 7: The target quantization coefficient includes the quantization coefficients at Y preset positions in the scanning order of the current block, where Y is a positive integer.

[0147] Optionally, the positions of the Y preset positions in the target area may be pre-set.

[0148] Optionally, the value of Y is preset, such as Y=1, or Y is greater than 1, such as Y=2.

[0149] For example, the target quantization coefficients may include the first Y quantization coefficients, or the middle N quantization coefficients, or the last Y quantization coefficients in the scanning order.

[0150] In some embodiments of the present application, the decoding end may also determine whether to use the quantization coefficients to implicitly derive the sub-block transform mode. For example, when the decoding end determines to use the quantization coefficients to implicitly derive the sub-block transform mode, it performs operations in S610 to S630.

[0151] In some embodiments of the present application, the method 600 further includes:

[0152] Obtain at least one of a first index and a size of the current block, where the first index is used to indicate whether to determine a sub-block transform mode corresponding to the current block according to a target quantization coefficient;

[0153] According to at least one of the first index and the size of the current block, it is determined whether to determine a sub-block transform mode corresponding to the current block according to a target quantization coefficient in a target area in the current block.

[0154] In some embodiments, obtaining the first index includes:

[0155] The first index is obtained from at least one of a sequence header corresponding to the current block, a picture header corresponding to the current block, a slice header corresponding to the current block, and a largest coding unit (LCU) corresponding to the current block.

[0156] Optionally, the decoding end may obtain the first index from a sequence header corresponding to the current block. For example, the first index may be obtained by decoding the sequence header. In this case, the first index indicates that all CUs in the video image frame sequence corresponding to the sequence header need to determine a sub-block transform mode based on a quantization coefficient, for example, one or more flag bits corresponding to the sub-block transform mode are determined based on the quantization coefficient.

[0157] Optionally, the decoding end may obtain the first index from the picture header corresponding to the current block. For example, the first index may be obtained by decoding the picture header. In this case, the first index indicates that all CUs in the video image frame corresponding to the picture header need to determine a sub-block transform mode based on a quantization coefficient, for example, one or more flag bits corresponding to the sub-block transform mode are determined based on the quantization coefficient.

[0158] Optionally, the decoding end may obtain the first index from a slice header corresponding to the current block. For example, the first index may be obtained by decoding the slice header. In this case, the first index indicates that all CUs in the slice need to determine a sub-block transform mode based on a quantization coefficient, for example, one or more flag bits corresponding to the sub-block transform mode determined based on the quantization coefficient.

[0159] Optionally, the decoding end can obtain a first index from the LCU corresponding to the current block, for example, by decoding the LCU to obtain the first index. In this case, the first index indicates that all CUs in the LCU need to determine the sub-block transformation mode according to the quantization coefficient, for example, one or more flag bits corresponding to the sub-block transformation mode are determined according to the quantization coefficient.

[0160] Optionally, the decoder may also obtain the size of the current block and determine whether to determine the sub-block transform mode based on the quantization coefficients based on whether the size of the current block is within a preset range. In other words, the encoder may use the size of the current block to indicate whether the sub-block transform mode to be used for the current block needs to be determined based on the quantization coefficients. For example, when the size of the current block is within a preset range, the sub-block transform mode corresponding to the current block is determined based on the target quantization coefficients within the target area of ​​the current block.

[0161] In some embodiments of the present application, the S620 includes:

[0162] Determining statistical values ​​of target quantization coefficients within the target area, or in other words, performing statistical processing on the target quantization coefficients;

[0163] The sub-block transform mode corresponding to the current block is determined according to the statistical value of the target quantization coefficient.

[0164] For example, the value of the target flag of the sub-block transform mode corresponding to the current block is determined according to the statistical value of the target quantization coefficient.

[0165] In some embodiments, determining the statistical value of the target quantization coefficient within the target area includes:

[0166] Sum all quantization coefficients included in the target quantization coefficient to obtain a statistical value of the target quantization coefficient; or

[0167] summing the absolute value of each quantization coefficient among all quantization coefficients included in the target quantization coefficient to obtain a statistical value of the target quantization coefficient; or

[0168] A mapping process is performed on each quantization coefficient among all quantization coefficients included in the target quantization coefficient, and a statistical value of the target quantization coefficient is determined according to the mapping value of each quantization coefficient.

[0169] It should be understood that the mapping process performed on the quantization coefficients may be the mapping process performed on the original values ​​of the quantization coefficients, or the mapping process may be the mapping process performed on the absolute values ​​of the quantization coefficients.

[0170] In some implementations, mapping each quantized coefficient among all quantized coefficients included in the target quantized coefficients may include, for example, mapping the quantized coefficients according to parity. For example, mapping even coefficients and odd coefficients in the target quantized coefficients to a first value and a second value, respectively, where the first value and the second value are different.

[0171] As an example, the first value is 1 and the second value is 0.

[0172] As another example, the first value is 0 and the second value is 1.

[0173] As yet another example, the first value is 2 and the second value is 3.

[0174] As another example, the first value is 3 and the second value is 2.

[0175] In other implementations, each quantization coefficient among all quantization coefficients included in the target quantization coefficient is mapped, for example, it may include: mapping the zero coefficient and non-zero coefficient in the target quantization coefficient to a third value and a fourth value, respectively, where the third value and the fourth value are different.

[0176] As an example, the third value is 1 and the fourth value is 0.

[0177] As another example, the third value is 0 and the fourth value is 1.

[0178] As yet another example, the third value is 3 and the fourth value is 2.

[0179] As yet another example, the third value is 2 and the fourth value is 3.

[0180] It should be understood that the above mapping method is only an example. The embodiments of the present application may also adopt other mapping methods, such as inverse mapping, minus-one mapping, plus-one mapping, etc. The present application is not limited to this.

[0181] In some embodiments, determining the statistical value of the target quantization coefficient according to the mapping value of each quantization coefficient may include, for example:

[0182] The mapping value of each quantization coefficient is summed to obtain the statistical value of the target quantization coefficient; or the absolute value of the mapping value of each quantization coefficient is summed to obtain the statistical value of the target quantization coefficient.

[0183] In some embodiments, performing statistical processing on the target quantization coefficient may include:

[0184] Statistics are taken on the parity of the number of even-numbered coefficients in the target quantized coefficients, or statistics are taken on the parity of the number of odd-numbered coefficients in the target quantized coefficients.

[0185] For example, if the number of even coefficients in the target quantization coefficients is odd, the statistical value of the target quantization coefficients may be a fifth value; if the number of even coefficients in the target quantization coefficients is even, the statistical value of the target quantization coefficients may be a sixth value, where the fifth value and the sixth value are different. For example, the fifth value may be 0 and the sixth value may be 1, or vice versa.

[0186] For another example, if the number of odd coefficients in the target quantization coefficients is odd, the statistical value of the target quantization coefficients may be the seventh value; if the number is even, the statistical value of the target quantization coefficients may be the eighth value, where the seventh value and the eighth value are different. For example, the seventh value is 0 and the eighth value is 1, or vice versa.

[0187] In some embodiments, determining the sub-block transform mode corresponding to the current block according to the statistical value of the target coefficient includes:

[0188] Calculate the modulus of the statistical value of the target quantization coefficient with respect to L, where L is a positive integer greater than 1;

[0189] The sub-block transform mode corresponding to the current block is determined based on the remainder of the statistical value of the target quantization coefficient. For example, the value of the target flag bit of the sub-block transform mode corresponding to the current block is determined based on the remainder of the statistical value of the target quantization coefficient.

[0190] In some embodiments, determining the sub-block transform mode corresponding to the current block according to the remainder result of the statistical value of the target quantization coefficient may include:

[0191] The target flag value of the sub-block transform mode corresponding to the current block is determined based on the remainder result of the statistical value of the target quantization coefficient and the first mapping relationship, wherein the first mapping relationship is a mapping relationship between different state values ​​of the remainder result and the value of the target flag.

[0192] Optionally, L remainder results (0 to L-1) of the statistical value of the target quantization coefficient may correspond to L states. The L states may implicitly indicate L values ​​of the target flag bit.

[0193] Taking L=4 as an example, the remainder result can be 0 to 3, corresponding to four state values, and the four state values ​​can be used to indicate different values ​​of the target flag. For example, the target flag includes a position flag (e.g., hor_idx, ver_idx), and the four state values ​​of the remainder result can correspond to different values ​​of the position flag, such as the four values ​​(hor_idx, ver_idx) in Table 1: 00, 01, 10, and 11.

[0194] As an example, the state value of the remainder result 00 corresponds to the value of (hor_idx, ver_idx) 00, the state value of the remainder result 01 corresponds to the value of (hor_idx, ver_idx) 01, the state value of the remainder result 10 corresponds to the value of (hor_idx, ver_idx) 10, and the state value of the remainder result 11 corresponds to the value of (hor_idx, ver_idx) 11.

[0195] Taking L=2 as an example, the remainder result can be 0 to 1, corresponding to two state values, and the two state values ​​can be used to indicate different values ​​of the target flag bit.

[0196] For example, the target flag includes a horizontal position flag (e.g., hor_idx), and the two state values ​​of the remainder result may correspond to two values ​​of the horizontal position flag (e.g., hor_idx): 0 and 1. For example, a state value of 0 in the remainder result corresponds to a horizontal position flag value of 0, and a state value of 1 in the remainder result corresponds to a horizontal position flag value of 1. As a specific implementation, the parity of the number of even coefficients in all quantized coefficients in the target quantized coefficients may be counted. If the number is odd, the horizontal position flag value is determined to be 0; if the number is even, the horizontal position flag value is determined to be 1, or vice versa.

[0197] For another example, the target flag includes a vertical position flag, and the two state values ​​of the remainder result may correspond to two values ​​of the vertical position flag (e.g., ver_idx): 0 and 1. For example, a state value of 0 of the remainder result may correspond to a value of 0 for the vertical position flag. A state value of 1 of the remainder result may correspond to a value of 1 for the vertical position flag. As a specific implementation, the parity of the number of even coefficients in all quantized coefficients in the target quantized coefficients may be counted. If the number is odd, the value of the vertical position flag is determined to be 0; if the number is even, the value of the vertical position flag is determined to be 1, or vice versa.

[0198] Optionally, when L=2, information of a flag bit of the sub-block transform mode can be derived, and the values ​​of other flag bits of the sub-block transform mode can be obtained through entropy decoding, for example, by decoding specific identification bits in the code stream, or the values ​​of other flag bits are default values, for example, the default value is 1 or 0.

[0199] In some embodiments, when the target flag includes multiple flags, the multiple flags are determined based on target quantization coefficients within the same target region, or the multiple flags are determined based on target quantization coefficients within multiple target regions. That is, the target quantization coefficient within a target region can be used to determine the values ​​of multiple flags, or the target quantization coefficient within a target region can be used to determine the value of one flag.

[0200] It should be understood that when multiple identification bits are determined based on multiple target areas, the multiple target areas may not overlap with each other, or there may be partial overlap. This application does not limit this. The method of determining the target quantization coefficients in the multiple target areas may be the same, or may be different, for example, determined by different methods among the aforementioned methods 1 to 7.

[0201] For example, when the target flag includes a horizontal position flag and a vertical position flag (for example, hor_idx, ver_idx), the decoding end can determine two target areas (recorded as a first target area and a second target area), wherein the target quantization coefficient in the first target area is used to determine the value of the horizontal position flag, and the target quantization coefficient in the second target area is used to determine the value of the horizontal position flag. For example, the decoding end can perform statistics on the target quantization coefficient in the first target area, and determine the value of the horizontal position flag based on the statistical value of the target quantization coefficient in the first target area, for example, the statistical value is modulo 2, and the value of the horizontal position flag is determined based on the remainder result; perform statistics on the target quantization coefficient in the second target area, and determine the value of the vertical position flag based on the statistical value of the target quantization coefficient in the second target area, for example, the statistical value is modulo 2, and the value of the vertical position flag is determined based on the remainder result. For the specific determination method, refer to the relevant description of the aforementioned embodiment, and for the sake of brevity, it will not be repeated here.

[0202] For another example, when the target flag includes a horizontal position flag and a vertical position flag (e.g., hor_idx, ver_idx), the decoding end can determine a target area, and use the target quantization coefficient in the target area to determine the horizontal position flag and the vertical position flag. For example, the target quantization coefficient in the target area is counted, and the values ​​of the horizontal position flag and the vertical position flag are determined based on the statistical value of the target quantization coefficient in the target area. For example, the statistical value is modulo 4, and the values ​​of the horizontal position flag and the vertical position flag are determined based on the modulo result. The specific determination method refers to the relevant description of the aforementioned embodiment, and for the sake of brevity, it is not repeated here.

[0203] In summary, in the embodiments of the present application, the decoding end can implicitly derive part or all of the flag bits of the sub-block transform mode through the statistical values ​​of the quantization coefficients, thereby reducing the cost of encoding the flag bits of the sub-block transform mode at the encoding end, saving bit rate, and improving encoding and decoding efficiency.

[0204] FIG9 shows a flowchart of a video encoding method according to an embodiment of the present application. The video encoding method can be performed by an encoding end, which can be a device with computing and processing capabilities, or can be provided in a device with computing and processing capabilities, such as a terminal device or a server. Referring to FIG9 , the video encoding method 800 may include at least part of the following:

[0205] S810, determining a sub-block transformation mode corresponding to the current block;

[0206] S820 , determining a target quantization coefficient in a target area in the current block according to a sub-block transform mode corresponding to the current block.

[0207] Therefore, in an embodiment of the present application, the encoding end determines the target quantization coefficient in the target area in the current block according to the sub-block transformation mode corresponding to the current block, and can implicitly indicate the sub-block transformation mode corresponding to the current block to the decoding end through the target quantization coefficient in the target area in the current block, so that the encoding end does not need to explicitly encode the flag bit of the sub-block transformation mode used by the current block, thereby saving bit rate and improving encoding and decoding efficiency.

[0208] It should be understood that the behavior of the encoding end implicitly indicating the sub-block transform mode through the quantization coefficient and the behavior of the decoding end obtaining the sub-block transform mode through the quantization coefficient correspond to each other. Similar descriptions can refer to the detailed description of the decoding end. For the sake of brevity, they will not be repeated here.

[0209] In some embodiments, the encoder may use RDO to make a decision and determine the sub-block transform mode corresponding to the current block.

[0210] In some embodiments of the present application, the target area is the area where the current block is located; or,

[0211] The target area is the area where the non-zero coefficients in the current block are located.

[0212] In some embodiments of the present application, the target quantization coefficients include all quantization coefficients within the target area; or

[0213] The target quantization coefficient includes quantization coefficients at X preset positions within the target area, where X is a positive integer; or

[0214] The target quantization coefficients include M rows of quantization coefficients within the target area, where M is a positive integer; or

[0215] The target quantization coefficients include N columns of quantization coefficients within the target area, where N is a positive integer; or

[0216] The target quantization coefficients include P row quantization coefficients and Q column quantization coefficients within the target area, where P and Q are positive integers; or

[0217] The target quantization coefficients include quantization coefficients at K oblique line positions within the target area, where K is a positive integer; or

[0218] The target quantization coefficient includes quantization coefficients at Y preset positions in the scanning order of the current block, where Y is a positive integer.

[0219] In some embodiments of the present application, method 800 further includes:

[0220] The size of the current block is determined, wherein the size of the current block is used to determine whether to determine a sub-block transform mode corresponding to the current block according to the target quantization coefficient.

[0221] In some embodiments of the present application, method 800 further includes:

[0222] A first index is encoded into at least one of a sequence header corresponding to the current block, an image header corresponding to the current block, a slice header corresponding to the current block, and a maximum coding unit corresponding to the current block, wherein the first index is used to indicate whether a sub-block transform mode corresponding to the current block is determined according to a target quantization coefficient.

[0223] In some embodiments, the sub-block transformation mode is represented by a size flag and a position flag, wherein the size flag is used to identify at least one of the horizontal size and the vertical size of the sub-block transformation, and the position flag is used to identify at least one of the horizontal position and the vertical position of the sub-block transformation.

[0224] In some embodiments, the location flag includes at least one of the following flags:

[0225] Horizontal position flag, used to identify the horizontal position of the sub-block transformation;

[0226] The vertical position flag is used to identify the vertical position of the sub-block transformation.

[0227] In some embodiments, determining a target quantization coefficient within a target region in the current block according to a sub-block transform mode corresponding to the current block includes:

[0228] Determining a target statistical value according to a target flag of a sub-block transform mode corresponding to the current block, wherein the target flag includes at least one of a size flag and a position flag;

[0229] According to the statistical rule of the target quantization coefficient, the target quantization coefficient in the target area of ​​the current block is adjusted so that the statistical value of the target quantization coefficient meets the target statistical value.

[0230] In some implementations, the statistical value of the target quantization coefficient within the target region and the value of the target flag corresponding to the sub-block transform mode satisfy a certain mapping relationship. Therefore, the encoder can determine the value of the target flag based on the selected sub-block transform mode and, in conjunction with the mapping relationship, determine the target statistical value that the target quantization coefficient must satisfy. The encoder can then adjust the target quantization coefficient to satisfy the target statistical value, thereby indicating the target flag of the sub-block transform mode to the decoder.

[0231] In some specific implementations, the statistical value of the target quantization coefficient is the parity of the number of even coefficients among all quantization coefficients included in the target quantization coefficient. For example, a horizontal position flag value of 0 corresponds to an odd number of even coefficients, and a horizontal position flag value of 1 corresponds to an even number of even coefficients. If the horizontal position flag corresponding to the sub-block transform mode selected by the encoder is 0, the encoder needs to adjust the value of the target quantization coefficient so that the number of even coefficients among all quantization coefficients is odd, or if the horizontal position flag corresponding to the sub-block transform mode selected by the encoder is 1, the encoder needs to adjust the value of the target quantization coefficient so that the number of even coefficients among all quantization coefficients is even.

[0232] It should be understood that the above-mentioned statistical method of the target quantization coefficient is only an example, and the present application is not limited to this. For example, the statistical value of the target quantization coefficient may also be the sum of all quantization coefficients included in the target quantization coefficient; or the statistical value of the target quantization coefficient may also be the sum of the absolute value of each quantization coefficient in all quantization coefficients included in the target quantization coefficient; or, the statistical value of the target quantization coefficient may also be the statistical value of the mapping value of each quantization coefficient in all quantization coefficients included in the target quantization coefficient. For example, the statistical value of the target quantization coefficient may be the sum of the mapping values ​​of each quantization coefficient, or the sum of the absolute value of each quantization coefficient.

[0233] In some embodiments, the mapping values ​​of the even coefficients and the odd coefficients in the target quantization coefficients are respectively a first value and a second value, wherein the first value and the second value are different.

[0234] In some embodiments, the first value is 1 and the second value is 0.

[0235] In some embodiments, the first value is 0 and the second value is 1.

[0236] In some embodiments, the first value is 2 and the second value is 3.

[0237] In some embodiments, the mapping values ​​of the zero coefficient and the non-zero coefficient in the target quantized coefficient are respectively a third value and a fourth value, wherein the third value and the fourth value are different.

[0238] In some embodiments, the third value is 1 and the fourth value is 0.

[0239] In some embodiments, the third value is 0 and the fourth value is 1.

[0240] In some embodiments, the third value is 3 and the fourth value is 2.

[0241] In some embodiments, when the target flag bit includes multiple flag bits, the multiple flag bits are used to determine the values ​​of the target quantization coefficients within a target area, or the multiple flag bits are used to determine the values ​​of the target quantization coefficients within multiple target areas.

[0242] It should be understood that the video coding and decoding method of the embodiment of the present application can be applied to a video codec or video compression product using sub-block transformation technology.

[0243] The following describes an embodiment of the device of the present application, which can be used to perform the method described in the above embodiments of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the above method embodiment of the present application.

[0244] FIG10 shows a block diagram of a video decoding apparatus according to an embodiment of the present application. The video decoding apparatus may be provided in a device having a computing and processing function, such as a terminal device or a server.

[0245] 10 , a video decoding apparatus 900 according to an embodiment of the present application includes an acquiring unit 910 , a determining unit 920 , and a decoding unit 930 .

[0246] In some embodiments, the acquisition unit 910 is configured to acquire a target quantization coefficient within a target area in the current block;

[0247] A determination unit 920 is configured to determine a sub-block transform mode corresponding to the current block according to a target quantization coefficient in a target area;

[0248] The decoding unit 930 is configured to perform decoding processing on the current block according to the sub-block transform mode corresponding to the current block.

[0249] In some embodiments, the sub-block transformation mode is represented by a size flag and a position flag, wherein the size flag is used to identify at least one of the horizontal size and the vertical size of the sub-block transformation, and the position flag is used to identify at least one of the horizontal position and the vertical position of the sub-block transformation.

[0250] In some embodiments, the determining unit 920 is further configured to:

[0251] Determining a target flag corresponding to the sub-block transform mode according to a target quantization coefficient within the target area, where the target flag includes at least one of a size flag and a position flag;

[0252] At least one of size information and position information of the sub-block transformation mode corresponding to the current block is determined according to the target flag corresponding to the sub-block transformation mode.

[0253] In some embodiments, the target area is the area where the current block is located; or,

[0254] The target area is the area where the non-zero coefficients in the current block are located.

[0255] In some embodiments, the target quantization coefficients include all quantization coefficients within the target region; or

[0256] The target quantization coefficient includes quantization coefficients at X preset positions within the target area, where X is a positive integer; or

[0257] The target quantization coefficients include M rows of quantization coefficients within the target area, where M is a positive integer; or

[0258] The target quantization coefficients include N columns of quantization coefficients within the target area, where N is a positive integer; or

[0259] The target quantization coefficients include P row quantization coefficients and Q column quantization coefficients within the target area, where P and Q are positive integers; or

[0260] The target quantization coefficients include quantization coefficients at K oblique line positions within the target area, where K is a positive integer; or

[0261] The target quantization coefficient includes quantization coefficients at Y preset positions in the scanning order of the current block, where Y is a positive integer.

[0262] In some embodiments, the acquisition unit 910 is further configured to: acquire at least one of a first index and a size of the current block, wherein the first index is used to indicate whether a sub-block transform mode corresponding to the current block is determined according to a target quantization coefficient.

[0263] In some embodiments, the determination unit 920 is further configured to determine, based on at least one of the first index and the size of the current block, whether to determine a sub-block transform mode corresponding to the current block based on a target quantization coefficient within a target area in the current block.

[0264] In some embodiments, the acquiring unit 910 is further configured to:

[0265] The first index is obtained from at least one of a sequence header corresponding to the current block, a picture header corresponding to the current block, a slice header corresponding to the current block, and a maximum coding unit corresponding to the current block.

[0266] In some embodiments, the determining unit 920 is further configured to:

[0267] When the size of the current block is within a preset range, a sub-block transform mode corresponding to the current block is determined according to a target quantization coefficient in a target area in the current block.

[0268] In some embodiments, the determining unit 920 is further configured to:

[0269] Determine the statistical value of the target quantization coefficient within the target area;

[0270] The sub-block transform mode corresponding to the current block is determined according to the statistical value of the target quantization coefficient.

[0271] In some embodiments, the determining unit 920 is further configured to:

[0272] Sum all quantization coefficients included in the target quantization coefficient to obtain a statistical value of the target quantization coefficient; or

[0273] summing the absolute value of each quantization coefficient among all quantization coefficients included in the target quantization coefficient to obtain a statistical value of the target quantization coefficient; or

[0274] A mapping process is performed on each quantization coefficient among all quantization coefficients included in the target quantization coefficient, and a statistical value of the target quantization coefficient is determined according to the mapping value of each quantization coefficient.

[0275] In some embodiments, the determining unit 920 is further configured to:

[0276] Mapping even coefficients and odd coefficients in the target quantized coefficients to a first value and a second value, respectively, wherein the first value and the second value are different; or

[0277] The zero coefficients and the non-zero coefficients in the target quantized coefficients are mapped to a third value and a fourth value, respectively, where the third value and the fourth value are different.

[0278] In some embodiments, the first value is 1 and the second value is 0; or

[0279] The first value is 0 and the second value is 1; or

[0280] The first value is 2 and the second value is 3; or

[0281] The third value is 1 and the fourth value is 0; or

[0282] The third value is 0 and the fourth value is 1; or

[0283] The third value is 3 and the fourth value is 2.

[0284] In some embodiments, the determining unit 920 is further configured to:

[0285] Sum the mapping values ​​of each quantization coefficient to obtain the statistical value of the target quantization coefficient; or

[0286] The absolute value of the mapping value of each quantization coefficient is summed to obtain the statistical value of the target quantization coefficient.

[0287] In some embodiments, the determining unit 920 is further configured to:

[0288] Calculate the modulus of the statistical value of the target quantization coefficient with respect to L, where L is a positive integer greater than 1;

[0289] The sub-block transform mode corresponding to the current block is determined according to the remainder result of the statistical value of the target quantization coefficient.

[0290] In some embodiments, the determining unit 920 is further configured to:

[0291] Determining a value of a target flag corresponding to the sub-block transform mode according to a remainder result of a statistical value of the target quantization coefficient and a first mapping relationship, wherein the target flag includes at least one of a size flag and a position flag, and the first mapping relationship is a mapping relationship between different state values ​​of the remainder result and the value of the target flag;

[0292] At least one of size information and position information of the sub-block transformation mode corresponding to the current block is determined according to the target flag corresponding to the sub-block transformation mode.

[0293] In some embodiments, the location flag includes at least one of the following flags:

[0294] Horizontal position flag, used to identify the horizontal position of the sub-block transformation;

[0295] The vertical position flag is used to identify the vertical position of the sub-block transformation.

[0296] In some embodiments, when the target flag bit includes multiple flag bits, the multiple flag bits are determined based on target quantization coefficients within the same target area, or the multiple flag bits are determined based on target quantization coefficients within multiple target areas.

[0297] FIG11 shows a block diagram of a video encoding apparatus according to an embodiment of the present application. The video encoding apparatus may be provided in a device having a computing and processing function, such as a terminal device or a server.

[0298] 11 , a video encoding apparatus 1000 according to an embodiment of the present application includes a first determining unit 1010 and a second determining unit 1020. The first determining unit 1010 is configured to determine a sub-block transform mode corresponding to a current block, and the second determining unit 1020 is configured to determine a target quantization coefficient within a target region of the current block based on the sub-block transform mode corresponding to the current block.

[0299] In some embodiments of the present application, the target area is the area where the current block is located; or,

[0300] The target area is the area where the non-zero coefficients in the current block are located.

[0301] In some embodiments of the present application, the target quantization coefficients include all quantization coefficients within the target area; or

[0302] The target quantization coefficient includes quantization coefficients at X preset positions within the target area, where X is a positive integer; or

[0303] The target quantization coefficients include M rows of quantization coefficients within the target area, where M is a positive integer; or

[0304] The target quantization coefficients include N columns of quantization coefficients within the target area, where N is a positive integer; or

[0305] The target quantization coefficients include P row quantization coefficients and Q column quantization coefficients within the target area, where P and Q are positive integers; or

[0306] The target quantization coefficients include quantization coefficients at K oblique line positions within the target area, where K is a positive integer; or

[0307] The target quantization coefficient includes quantization coefficients at Y preset positions in the scanning order of the current block, where Y is a positive integer.

[0308] In some embodiments of the present application, the second determining unit 1020 is further configured to:

[0309] At least one of the sizes of the current block is determined, wherein the size of the current block is used to determine whether to determine a sub-block transform mode corresponding to the current block according to a target quantization coefficient.

[0310] In some embodiments of the present application, the video encoding apparatus 1000 further includes:

[0311] A coding unit is used to encode a first index into at least one of a sequence header corresponding to the current block, an image header corresponding to the current block, a slice header corresponding to the current block, and a maximum coding unit corresponding to the current block, wherein the first index is used to indicate whether a sub-block transform mode corresponding to the current block is determined according to a target quantization coefficient.

[0312] In some embodiments of the present application, the second determining unit 1020 is further configured to:

[0313] Determine a target statistical value according to a target flag bit of a sub-block transformation mode corresponding to the current block;

[0314] According to the statistical rule of the target quantization coefficient, the value of the target quantization coefficient in the target area of ​​the current block is adjusted so that the statistical value of the target quantization coefficient meets the target statistical value.

[0315] In some embodiments, the statistical value of the target quantization coefficient is the sum of all quantization coefficients included in the target quantization coefficient; or

[0316] The statistical value of the target quantization coefficient is the sum of the absolute values ​​of each quantization coefficient in all quantization coefficients included in the target quantization coefficient; or

[0317] The statistical value of the target quantization coefficient is a statistical value of the mapping value of each quantization coefficient among all quantization coefficients included in the target quantization coefficient.

[0318] In some embodiments, the mapping values ​​of the even coefficients and the odd coefficients in the target quantized coefficients are respectively a first value and a second value, wherein the first value and the second value are different; or

[0319] The mapping values ​​of the zero coefficient and the non-zero coefficient in the target quantization coefficient are respectively a third value and a fourth value, wherein the third value and the fourth value are different.

[0320] In some embodiments, the first value is 1 and the second value is 0; or

[0321] The first value is 0 and the second value is 1; or

[0322] The first value is 2 and the second value is 3; or

[0323] The third value is 1 and the fourth value is 0; or

[0324] The third value is 0 and the fourth value is 1; or

[0325] The third value is 3 and the fourth value is 2.

[0326] In some embodiments, the sub-block transformation mode is represented by a size flag and a position flag, wherein the size flag is used to identify at least one of the horizontal size and the vertical size of the sub-block transformation, and the position flag is used to identify at least one of the horizontal position and the vertical position of the sub-block transformation.

[0327] In some embodiments of the present application, the second determining unit 1020 is further configured to:

[0328] A target quantization coefficient in a target area of ​​the current block is determined according to a target flag corresponding to the sub-block transform mode, wherein the target flag includes at least one of a size flag and a position flag.

[0329] In some embodiments, the location flag includes at least one of the following flags:

[0330] Horizontal position flag, used to identify the horizontal position of the sub-block transformation;

[0331] The vertical position flag is used to identify the vertical position of the sub-block transformation.

[0332] In some embodiments, when the target flag bit includes multiple flag bits, the multiple flag bits are used to determine the target quantization coefficients in one target area, or the multiple flag bits are used to determine the target quantization coefficients in multiple target areas.

[0333] 12 is a schematic block diagram of an electronic device 1100 provided in an embodiment of the present application. The electronic device may be the video encoding device or the video decoding device mentioned above.

[0334] As shown in FIG12 , the electronic device 1100 may include:

[0335] The memory 1110 and the processor 1120 are configured to store computer programs and transmit the program code to the processor 1120. In other words, the processor 1120 can call and execute the computer program from the memory 1110 to implement the method in the embodiment of the present application.

[0336] In one embodiment of the present application, the processor 1120 is configured to:

[0337] Obtain target quantization coefficients within a target region in the current block;

[0338] Determine the sub-block transform mode corresponding to the current block according to the target quantization coefficient in the target area;

[0339] The current block is decoded according to the sub-block transform mode corresponding to the current block.

[0340] In another embodiment of the present application, the processor 1120 is configured to:

[0341] Determine the sub-block transformation mode corresponding to the current block;

[0342] Determine a target quantization coefficient in a target area in the current block according to a sub-block transform mode corresponding to the current block.

[0343] In some embodiments of the present application, the processor 1120 may include but is not limited to:

[0344] General-purpose processor, Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0345] In some embodiments of the present application, the memory 1110 includes but is not limited to:

[0346] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0347] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 1110 and executed by the processor 1120 to implement the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0348] As shown in FIG12 , the electronic device 1100 may further include:

[0349] The transceiver 1130 may be connected to the processor 1120 or the memory 1110 .

[0350] The processor 1120 may control the transceiver 1130 to communicate with other devices. Specifically, it may send information or data to other devices or receive information or data sent by other devices. The transceiver 1130 may include a transmitter and a receiver. The transceiver 1130 may further include an antenna, which may be one or more.

[0351] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0352] The present application also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. In other words, the present application also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.

[0353] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)).

[0354] It is understandable that in the specific implementation of this application, when the above embodiments of this application are applied to specific products or technologies and involve relevant data such as user information, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.

[0355] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0356] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0357] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module.

[0358] The above content is merely a specific implementation of the embodiments of the present application, but the scope of protection of the embodiments of the present application is not limited thereto. Any person skilled in the art who can easily conceive of changes or substitutions within the technical scope disclosed in the embodiments of the present application should be included in the scope of protection of the embodiments of the present application. Therefore, the scope of protection of the embodiments of the present application should be based on the scope of protection of the claims.

[0359] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A video decoding method, characterized in that: include: Obtain target quantization coefficients in a target area in the current block; Determining a sub-block transform mode corresponding to the current block according to a target quantization coefficient in the target area; The current block is decoded according to the sub-block transformation mode corresponding to the current block.

2. The method according to claim 1, characterized in that: The target area is the area where all coefficients in the current block are located; or, The target area is an area where non-zero coefficients in the current block are located.

3. The method according to claim 1 or 2, characterized in that: The target quantization coefficients include all quantization coefficients within the target area; or The target quantization coefficient includes quantization coefficients at X preset positions within the target area, where X is a positive integer; or The target quantization coefficients include M rows of quantization coefficients in the target area, where M is a positive integer; or The target quantization coefficients include N columns of quantization coefficients in the target area, where N is a positive integer; or The target quantization coefficients include P row quantization coefficients and Q column quantization coefficients in the target area, where P and Q are positive integers; or The target quantization coefficients include quantization coefficients at K oblique line positions within the target area, where K is a positive integer; or The target quantization coefficients include quantization coefficients at Y preset positions in the scanning order of the current block, where Y is a positive integer.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Obtain at least one of a first index and a size of the current block, wherein the first index is used to indicate whether to determine a sub-block transform mode corresponding to the current block according to a target quantization coefficient; According to at least one of the first index and the size of the current block, it is determined whether to determine a sub-block transform mode corresponding to the current block according to a target quantization coefficient in a target area in the current block.

5. The method according to claim 4, characterized in that The obtaining of the first index comprises: The first index is obtained from at least one of a sequence header corresponding to the current block, an image header corresponding to the current block, a slice header corresponding to the current block, and a maximum coding unit corresponding to the current block.

6. The method according to claim 4, characterized in that The determining, according to the size of the current block, whether to determine the sub-block transform mode corresponding to the current block according to the target quantization coefficient in the target area in the current block comprises: In a case where the size of the current block is within a preset range, a sub-block transform mode corresponding to the current block is determined according to a target quantization coefficient in a target area in the current block.

7. The method according to any one of claims 1 to 6, characterized in that The determining, according to the target quantization coefficient in the target area, a sub-block transformation mode corresponding to the current block comprises: Determine the statistical value of the target quantization coefficient within the target area; A sub-block transformation mode corresponding to the current block is determined according to the statistical value of the target quantization coefficient.

8. The method according to claim 7, characterized in that The determining of the statistical value of the target quantization coefficient within the target area includes: summing up all quantization coefficients included in the target quantization coefficient to obtain a statistical value of the target quantization coefficient; or summing up the absolute value of each quantization coefficient in all quantization coefficients included in the target quantization coefficient to obtain a statistical value of the target quantization coefficient; or Each quantization coefficient among all quantization coefficients included in the target quantization coefficient is mapped, and a statistical value of the target quantization coefficient is determined according to the mapping value of each quantization coefficient.

9. The method according to claim 8, characterized in that The mapping process of each quantization coefficient among all quantization coefficients included in the target quantization coefficient comprises: Mapping even coefficients and odd coefficients in the target quantization coefficients to a first value and a second value respectively, wherein the first value and the second value are different; or The zero coefficients and non-zero coefficients in the target quantization coefficients are mapped to a third value and a fourth value respectively, wherein the third value and the fourth value are different.

10. The method according to claim 9, characterized in that The first value is 1, and the second value is 0; or The first value is 0, and the second value is 1; or The first value is 2, and the second value is 3; or The third value is 1, and the fourth value is 0; or The third value is 0, and the fourth value is 1; or The third value is 3, and the fourth value is 2.

11. The method according to any one of claims 8 to 10, characterized in that: The determining the statistical value of the target quantization coefficient according to the mapping value of each quantization coefficient includes: Sum the mapping values ​​of each quantization coefficient to obtain a statistical value of the target quantization coefficient; or The absolute values ​​of the mapping values ​​of each quantization coefficient are summed to obtain the statistical value of the target quantization coefficient.

12. The method according to any one of claims 7 to 11, characterized in that: The determining, according to the statistical value of the target coefficient, a sub-block transform mode corresponding to the current block includes: Calculate the modulus of the statistical value of the target quantization coefficient with respect to L, where L is a positive integer greater than 1; The sub-block transformation mode corresponding to the current block is determined according to the remainder result of the statistical value of the target quantization coefficient.

13. The method according to claim 12, characterized in that The sub-block transformation mode is represented by a size flag and a position flag, wherein the size flag is used to identify at least one of a horizontal size and a vertical size of the sub-block transformation, and the position flag is used to identify at least one of a horizontal position and a vertical position of the sub-block transformation; The determining of the sub-block transform mode corresponding to the current block according to the remainder result of the statistical value of the target quantization coefficient includes: Determine, according to a remainder result of the statistical value of the target quantization coefficient and a first mapping relationship, a value of a target flag bit corresponding to the sub-block transform mode, wherein the target flag bit includes at least one of the size flag bit and the position flag bit, and the first mapping relationship is a mapping relationship between different state values ​​of the remainder result and the value of the target flag bit; At least one of size information and position information of the sub-block transformation mode corresponding to the current block is determined according to the value of the target identification bit corresponding to the sub-block transformation mode.

14. The method according to claim 13, characterized in that The position flag includes at least one of the following flags: A horizontal position flag, used to identify the horizontal position of the sub-block transformation; The vertical position flag is used to identify the vertical position of the sub-block transformation.

15. The method according to claim 13 or 14, characterized in that In the case where the target flag bit includes multiple identification bits, the multiple identification bits are determined based on target quantization coefficients in the same target area, or the multiple identification bits are determined based on target quantization coefficients in multiple target areas.

16. A video encoding method, characterized in that: include: Determine a sub-block transformation mode corresponding to the current block; According to the sub-block transformation mode corresponding to the current block, a target quantization coefficient in a target area in the current block is determined.

17. A video decoding device, characterized in that: include: An acquisition unit, used for acquiring a target quantization coefficient in a target area in a current block; A determination unit, configured to determine a sub-block transformation mode corresponding to the current block according to a target quantization coefficient in the target area; The decoding unit is used to decode the current block according to the sub-block transformation mode corresponding to the current block.

18. A video encoding device, characterized in that: include: A first determining unit, configured to determine a sub-block transformation mode corresponding to a current block; The second determining unit is used to determine a target quantization coefficient in a target area in the current block according to a sub-block transformation mode corresponding to the current block.

19. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the video decoding method as described in any one of claims 1 to 15, or implement the video encoding method as described in claim 16.

20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the video decoding method according to any one of claims 1 to 15, or implements the video encoding method according to claim 16.

21. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the video decoding method according to any one of claims 1 to 15 is implemented, or the video encoding method according to claim 16 is implemented.

Citation Information

Patent Citations

  • Video decoding method and device, computer readable medium and electronic equipment

    CN112533000A

  • Simplification of sub-block transforms in video coding

    CN113545054A

  • Video decoding method and device, computer readable medium and electronic equipment

    CN114079772A

  • Image processing device and image processing method

    WO2020145381A1