Video Decoding Method, Device, Equipment and Storage Medium

By using the first identification information in VVC video encoding, whether the transform block in the BDPCM mode is a fully zero residual block, the problem of low encoding and decoding efficiency in the prior art is solved, and a more efficient encoding and decoding process is realized.

CN113132731BActive Publication Date: 2025-07-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911416697.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-31
Publication Date
2025-07-22
Estimated Expiration
2039-12-31

AI Technical Summary

Technical Problem

The existing VVC video encoding method has low encoding and decoding efficiency for encoding blocks using BDPCM mode, especially because the probability of all zero residual blocks is high, but the same residual encoding and decoding method is still used to lead to low efficiency.

Method used

By using the first identification information on the decoding end and the encoding end to indicate whether the transform block contains a non-zero transformation coefficient. If there are no non-zero transformation coefficients, it is determined as a fully zero residual block, avoiding transmission and decoding the transformation tree syntax structure, and directly determining the residual block is all zero.

Benefits of technology

The encoding and decoding efficiency of image units using BDPCM mode is improved, unnecessary encoding and decoding operations are reduced, and encoding efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113132731B_ABST
    Figure CN113132731B_ABST
Patent Text Reader

Abstract

The present application provides a video decoding method, apparatus, device, and storage medium, relating to the technical field of video codec processing. The method includes: decoding the intra prediction mode information corresponding to the current decoding unit; if the intra prediction mode information indicates that the BDPCM mode is applied to the current decoding unit, decoding the first identification information corresponding to the current decoding unit; if the first identification information indicates that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, determining that the residual block corresponding to the current decoding unit is an all-zero residual block; and reconstructing and generating the current decoding unit according to the residual block and the prediction block corresponding to the current decoding unit. The technical solution provided by the embodiments of the present application improves the codec efficiency of the picture units using the BDPCM mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of video coding and decoding, and particularly to a video decoding method, device, equipment and storage medium. Background Technique

[0002] H.266 is a new generation of video coding technology improved on the basis of H.265 / HEVC (High Efficient Video Coding), and has been officially named VVC (Versatile Video Coding), which is continuously updated and improved under the guidance of the JVET (Joint Video Experts Team).

[0003] Currently, the BDPCM (Block Differential Pulse Code Modulation) mode is introduced in VVC for encoding and transmitting the quantized TB (Transform Block). However, for the coding blocks using the BDPCM mode, the current video coding and decoding method in VVC has low coding and decoding efficiency. Summary of the Invention

[0004] The embodiments of the present application provide a video decoding method, device, equipment and storage medium, which can improve the coding and decoding efficiency for the coding blocks using the BDPCM mode. The technical solutions are as follows:

[0005] On the one hand, the embodiments of the present application provide a video decoding method, which includes:

[0006] Decoding the intra prediction mode information corresponding to the current decoding unit;

[0007] If the intra prediction mode information indicates that the BDPCM mode is applied to the current decoding unit, and all color components of the current decoding unit use the BDPCM mode, then decoding the first identification information corresponding to the current decoding unit, where the first identification information is used to indicate whether the transform block corresponding to the current decoding unit contains non-zero transform coefficients;

[0008] If the first identification information indicates that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, determining that the residual block corresponding to the current decoding unit is an all-zero residual block;

[0009] Reconstructing and generating the current decoding unit according to the residual block and the prediction block corresponding to the current decoding unit.

[0010] On the other hand, an embodiment of the present application provides a video encoding method, the method comprising:

[0011] Obtain a current coding unit;

[0012] Calculate a residual block corresponding to the current coding unit according to the current coding unit and a prediction block corresponding to the current coding unit;

[0013] If the residual block corresponding to the current coding unit is an all-zero residual block and each color component of the current coding unit adopts the BDPCM mode, encode first identification information corresponding to the current coding unit, where the first identification information is used to indicate that a transform block corresponding to the current coding unit does not include non-zero transform coefficients.

[0014] On yet another aspect, an embodiment of the present application provides a video decoding apparatus, the apparatus comprising:

[0015] A first decoding module, configured to decode intra prediction mode information corresponding to a current decoding unit;

[0016] A second decoding module, configured to, if the intra prediction mode information indicates that the block differential pulse code modulation BDPCM mode is applied to the current decoding unit and each color component of the current decoding unit adopts the BDPCM mode, decode first identification information corresponding to the current decoding unit, where the first identification information is used to indicate whether a transform block corresponding to the current decoding unit includes non-zero transform coefficients;

[0017] A residual determination module, configured to, if the first identification information indicates that a transform block corresponding to the current decoding unit does not include non-zero transform coefficients, determine that a residual block corresponding to the current decoding unit is an all-zero residual block;

[0018] A decoding reconstruction module, configured to reconstruct and generate the current decoding unit according to the residual block and a prediction block corresponding to the current decoding unit.

[0019] On yet another aspect, an embodiment of the present application provides a video encoding apparatus, the apparatus comprising:

[0020] A coding block acquisition module, configured to obtain a current coding unit;

[0021] A residual block calculation module, configured to calculate a residual block corresponding to the current coding unit according to the current coding unit and a prediction block corresponding to the current coding unit;

[0022] An identification encoding module, configured to encode first identification information corresponding to the current encoding unit if the residual block corresponding to the current encoding unit is an all-zero residual block and each color component of the current encoding unit adopts the BDPCM mode, where the first identification information is used to indicate that the transform block corresponding to the current encoding unit does not include non-zero transform coefficients.

[0023] In another aspect, an embodiment of the present application provides a computer device, which includes a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above video decoding method or the above video encoding method.

[0024] In another aspect, an embodiment of the present application provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the above video decoding method or the above video encoding method.

[0025] In another aspect, an embodiment of the present application provides a computer program product, which is used to implement the above video decoding method or the above video encoding method when executed by a processor.

[0026] The technical solutions provided by the embodiments of the present application may include the following beneficial effects:

[0027] For an encoding unit (or decoding unit) adopting the BDPCM mode, the first identification information is used to indicate whether the transform block corresponding to the encoding unit (or decoding unit) includes non-zero transform coefficients. If the first identification information indicates that the transform block corresponding to the encoding unit (or decoding unit) does not include non-zero transform coefficients, then the encoder side does not need to encode the transform tree syntax structure corresponding to the encoding unit to encode and transmit the residual block. Correspondingly, the decoder side does not need to decode the transform tree syntax structure corresponding to the decoding unit to decode the residual block, and it can be directly determined that the residual block corresponding to the decoding unit is an all-zero residual block, thereby improving the encoding and decoding efficiency of the image unit adopting the BDPCM mode. Description of the Drawings

[0028] Figure 1 is a schematic diagram of a video encoding exemplarily shown in the present application;

[0029] Figure 2 is a simplified block diagram of a communication system provided by an embodiment of the present application;

[0030] Figure 3It is a schematic diagram showing the placement of the video encoder and video decoder exemplarily shown in this application in a streaming environment;

[0031] Figure 4 It is a schematic encoding diagram in the inter-frame prediction mode provided by an embodiment of this application;

[0032] Figure 5 It is a schematic encoding diagram in the intra-frame prediction mode provided by an embodiment of this application;

[0033] Figure 6 It is a schematic diagram of the functional modules of the video encoder provided by an embodiment of this application;

[0034] Figure 7 It is a schematic diagram of the functional modules of the video decoder provided by an embodiment of this application;

[0035] Figure 8 and Figure 9 respectively show schematic comparison diagrams between the BDPCM mode and the ordinary intra-frame encoding mode of the luminance and chrominance coding blocks;

[0036] Figure 10 It is a flowchart of the video decoding method provided by an embodiment of this application;

[0037] Figure 11 It is a flowchart of the video encoding method provided by an embodiment of this application;

[0038] Figure 12 It is a block diagram of the video decoding device provided by an embodiment of this application;

[0039] Figure 13 It is a block diagram of the video encoding device provided by an embodiment of this application;

[0040] Figure 14 It is a block diagram of the structure of the computer device provided by an embodiment of this application. Detailed implementation manners

[0041] To make the objectives, technical solutions and advantages of this application clearer, the following will further describe the embodiments of this application in detail with reference to the accompanying drawings.

[0042] Please refer to Figure 1, the current block 101 includes samples that have been discovered by the encoder during the motion search process, and the samples can be predicted according to a previous block of the same size that has generated a spatial offset. Additionally, the MV (Motion Vector) can be derived from metadata associated with one or more reference pictures instead of directly encoding the MV. For example, using the MV associated with any one of five surrounding samples A0, A1 and B0, B1, B2 (corresponding to 102 to 106 respectively), the MV is derived from the metadata of the nearest reference picture (in the decoding order).

[0043] As Figure 2 shown, it shows a simplified block diagram of a communication system provided by an embodiment of the present application. The communication system 200 includes a plurality of devices, and the devices can communicate with each other through, for example, a network 250. For example, the communication system 200 includes a first device 210 and a second device 220 interconnected by the network 250. In Figure 2 the embodiment, the first device 210 and the second device 220 perform unidirectional data transmission. For example, the first device 210 can encode video data, such as a video picture stream collected by the first device 210, for transmission to the second device 220 through the network 250. The encoded video data is transmitted in the form of one or more encoded video bitstreams. The second device 220 can receive the encoded video data from the network 250, decode the encoded video data to recover the video data, and display video pictures according to the recovered video data. Unidirectional data transmission is more common in applications such as media services.

[0044] In another embodiment, the communication system 200 includes a third device 230 and a fourth device 240 that perform two-way transmission of encoded video data, and the two-way transmission can occur, for example, during a video conference. For two-way data transmission, each of the third device 230 and the fourth device 240 can encode video data (such as a video picture stream collected by the device) for transmission to the other of the third device 230 and the fourth device 240 through the network 250. Each of the third device 230 and the fourth device 240 can also receive the encoded video data transmitted by the other of the third device 230 and the fourth device 240, can decode the encoded video data to recover the video data, and can display video pictures on an accessible display device according to the recovered video data.

[0045] In Figure 2In embodiments, the first device 210, the second device 220, the third device 230, and the fourth device 240 may be computer devices such as servers, personal computers, and smart phones, but the principles disclosed in this application are not limited thereto. Embodiments of this application are applicable to personal computers (PCs), mobile phones, tablet computers, media players, and / or dedicated video conferencing devices. Network 250 represents any number of networks for transmitting encoded video data between the first device 210, the second device 220, the third device 230, and the fourth device 240, including, for example, wired and / or wireless communication networks. Communication network 250 may exchange data in circuit-switched and / or packet-switched channels. The network may include a telecommunications network, a local area network, a wide area network, and / or the Internet. For the purposes of this application, unless otherwise explained below, the architecture and topology of network 250 may be immaterial to the operations disclosed in this application.

[0046] As an example, Figure 3 illustrates the placement of a video encoder and a video decoder in a streaming environment. The subject matter disclosed in this application is equally applicable to other video-enabled applications, including, for example, video conferencing, digital TV (television), storing compressed video on digital media including CD (Compact Disc), DVD (Digital Versatile Disc), memory sticks, etc.

[0047] A streaming system may include an acquisition subsystem 313, which may include a video source 301 such as a digital camera that creates an uncompressed video picture stream 302. In an embodiment, video picture stream 302 includes samples taken by a digital camera. Compared to the encoded video data 304 (or encoded video stream), video picture stream 302 is depicted as a thick line to emphasize the high data volume of the video picture stream. Video picture stream 302 may be processed by an electronic device 320 that includes a video encoder 303 coupled to video source 301. Video encoder 303 may include hardware, software, or a combination of hardware and software to implement or carry out aspects of the disclosed subject matter described in more detail below. Compared to video picture stream 302, the encoded video data 304 (or encoded video stream 304) is depicted as a thin line to emphasize the lower data volume of the encoded video data 304 (or encoded video stream 304), which may be stored on a streaming server 305 for future use. One or more streaming client subsystems, such as Figure 3The client subsystems 306 and 308 therein can access the streaming server 305 to retrieve copies 307 and 309 of the encoded video data 304. The client subsystem 306 can include, for example, a video decoder 310 in the electronic device 330. The video decoder 310 decodes the incoming copy 307 of the encoded video data and generates an output video picture stream 311 that can be presented on a display 312 (such as a display screen) or another presentation device (not depicted). In some streaming systems, the encoded video data 304, video data 307, and video data 309 (such as video bitstreams) can be encoded according to certain video coding / compression standards.

[0048] It should be noted that the electronic devices 320 and 330 can include other components (not shown). For example, the electronic device 320 can include a video decoder (not shown), and the electronic device 330 can also include a video encoder (not shown). Among them, the video decoder is used to decode the received encoded video data; the video encoder is used to encode the video data.

[0049] When encoding an image block in a video frame, an inter prediction mode or an intra prediction mode can be used to generate a prediction block based on one or more encoded reference blocks. The prediction block can be an estimated version of the original block. A residual block can be generated by subtracting the original block from the prediction block, and vice versa. The residual block can be used to represent the prediction residual (or called prediction error). Since the amount of data required to represent the prediction residual is usually less than the amount of data required to represent the original block, the residual block can be encoded to achieve a higher compression ratio. For example, as Figure 4 shown, for the inter prediction mode, the encoded reference block 41 and the block to be encoded 42 are located in two different video frames. As Figure 5 shown, for the intra prediction mode, the encoded reference block 51 and the block to be encoded 52 are located in the same video frame.

[0050] Next, the residual values of the residual block in the spatial domain can be converted into transform coefficients in the frequency domain. This conversion can be achieved through a two-dimensional transform such as a Discrete Cosine Transform (DCT). In the transform matrix, low-index transform coefficients (such as those located in the upper left region) can correspond to large spatial features and have relatively large magnitudes; while high-index transform coefficients (such as those located in the lower right region) can correspond to small spatial features and have relatively small magnitudes. Further, a quantization matrix including quantization coefficients can be applied to the transform matrix to quantize all transform coefficients into quantized transform coefficients. As a result of quantization, the scale or magnitude of the transform coefficients may be reduced. Some high-index transform coefficients can be reduced to zero and may then be skipped in subsequent scanning and encoding steps.

[0051] Figure 6 shows a portion of an exemplary video encoder 60 that includes a transform module 62, a quantization module 64, and an entropy encoding module 66. Although Figure 6 not shown, it should be understood that other modules such as a prediction module, a dequantization module, a reconstruction module, etc. may also be included in the video encoder 60. In operation, the video encoder 60 may obtain a video frame, and the video frame may include a plurality of image blocks. For the sake of simplicity, encoding one image block is regarded as an example here. To encode the image block, a prediction block may be first generated as an estimate of the image block. In combination with the above, the prediction block may be generated by the prediction module through an inter-frame prediction or an intra-frame prediction mode. Then, the difference between the image block and the prediction block may be calculated to generate a residual block. The residual block may be transformed by the transform module 62 into transform coefficients. During the transformation, the residual values in the spatial domain, including large features and small features, are converted into transform coefficients in the frequency domain, which includes a high-frequency band and a low-frequency band. Then, the quantization module 64 may use QM to quantize the transform coefficients, thereby generating quantized transform coefficients. Further, the quantized transform coefficients may be encoded by the entropy encoding module 46 and finally sent from the video encoder 60 as part of a bitstream.

[0052] Figure 7 shows a portion of an exemplary video decoder 70 that includes an entropy decoding module 72, an inverse quantization module 74, and an inverse transform module 76. Although Figure 7 not shown, it should be understood that other modules such as a prediction module, a transform module, a quantization module, etc. may also be included in the video decoder 70. In operation, the video decoder 70 may receive the bitstream output from the video encoder 60, perform decoding on the bitstream according to an inter-frame prediction or an intra-frame prediction mode, and output a reconstructed video frame. Among them, the entropy decoding module 72 may generate quantized transform coefficients by performing entropy decoding on the input bitstream. The inverse quantization module 74 may inverse-quantize the quantized transform coefficients based on QM to obtain inverse-quantized transform coefficients. The inverse transform module 76 performs an inverse transform on the inverse-quantized transform coefficients to generate a reconstructed residual block. Then, according to the reconstructed residual block and the prediction block, a reconstructed image block is generated.

[0053] As can be seen from the above, QM is an essential part of the video encoding and decoding process. The configuration of QM can determine how much information of transform coefficients is retained or filtered out, so QM can affect the encoding performance and encoding quality. In fact, QM is required in both the encoder and the decoder. Specifically, in order to correctly decode an image, it is necessary to encode the information about quantization coefficients in QM in the encoder and send this information from the encoder to the decoder. In video encoding and decoding technologies and standards, QM may sometimes be referred to as a scaling matrix or a weight matrix. Therefore, the term "QM" used in this article can be a general term covering quantization matrices, scaling matrices, weight matrices, and other equivalent terms.

[0054] Next, some basic concepts involved in the embodiments of the present application will be introduced and explained.

[0055] 1. BDPCM

[0056] BDPCM is an intra-frame encoding tool for video encoding. At the frame sequence level, a BDPCM enable flag is included in the SPS (Sequence Parameter Set); this flag is only encoded and transmitted when the transform skip mode is enabled in the SPS. In the current VTM (VVC Test Model) - 7.0 version, the BDPCM can be enabled for the luminance component, and for the chrominance component, the BDPCM can be enabled only for videos in the 4:4:4 format.

[0057] When BDPCM is enabled, if the CU (Coding Unit) size is less than or equal to MaxTsSize×MaxTsSize in terms of luminance sampling, and if the CU is intra-frame encoded, a flag is sent at the CU layer, where MaxTsSize is defined as the maximum block size allowing the transform skip mode. This flag indicates whether to use conventional intra-frame encoding or BDPCM. If BDPCM is used, a BDPCM prediction direction flag is sent to indicate whether the prediction direction is horizontal or vertical. Then, a horizontal or vertical intra-frame prediction process with unfiltered reference samples is used to predict the block. The residuals are quantized, and the difference between each quantized residual and its predicted value is calculated, that is, the previously encoded residuals at horizontal or vertical (depending on the BDPCM prediction direction) adjacent positions are encoded.

[0058] For a block of size M (height) × N (width), let r i,j , 0 ≤ i ≤ M - 1, 0 ≤ j ≤ N - 1 be the prediction residuals. Let Q(r i,j ), 0 ≤ i ≤ M - 1, 0 ≤ j ≤ N - 1 denote the prediction residuals r i,jQuantized form. Applying BDPCM to the quantized residual values results in a modified M×N array whose elements are where is predicted from its neighboring quantized residual values. For the vertical BDPCM prediction mode, for 0 ≤ j ≤ (N - 1), it is derived using the following formula

[0059]

[0060] For the horizontal BDPCM prediction mode, for 0 ≤ i ≤ (M - 1), it is derived using the following formula

[0061]

[0062] At the decoder side, the above process is calculated in reverse for Q(r i,j ), 0 ≤ i ≤ M - 1, 0 ≤ j ≤ N - 1, as follows:

[0063]

[0064]

[0065] Inverse quantize the residual, Q -1 (Q(r i,j )) and add it to the intra-block prediction value to obtain the reconstructed block.

[0066] Use the same residual coding process as in transform skip mode residual coding to send the predicted quantized residual values to the decoder. According to the MPM (Most Probable Mode) used for future intra-mode coding, if the BDPCM prediction direction is horizontal or vertical, store the horizontal or vertical prediction mode for the CU encoded with BDPCM respectively.

[0067] 2. BDPCM-related syntax and semantics

[0068] 2.1 Sequence Parameter Set (SPS)

[0069] The syntax structure of SPS can be as shown in Table 1 below:

[0070] Table 1

[0071] The syntax element chroma_format_idc represents the sampling rate of the chrominance component relative to the luminance component, as shown in Table 2:

[0072] Table 2

[0073]

[0074] In Table 2 above, SubWidthC and SubHeightC respectively represent the width and height of the CTU (Coding Tree Unit) corresponding to the chrominance component, and Monochrome indicates no chrominance component. Taking chroma_format_idc equal to 1 as an example, its corresponding chrominance format is 4:2:0, which means the width of the luma TB is 2 times the width of the chroma TB, and the height of the luma TB is 2 times the height of the chroma TB. Taking chroma_format_idc equal to 2 as an example, its corresponding chrominance format is 4:2:2, which means the width of the luma TB is 2 times the width of the chroma TB, and the height of the luma TB is the same as the height of the chroma TB. Taking chroma_format_idc equal to 3 as an example, its corresponding chrominance format is 4:4:4, which means the width of the luma TB is the same as the width of the chroma TB, and the height of the luma TB is the same as the height of the chroma TB. Additionally, chroma_format_idc equal to 0 has a corresponding chrominance format of 4:0:0, indicating no chrominance component.

[0075] separate_colour_plane_flag equal to 1 means that the three color components in the 4:4:4 chrominance format are encoded separately. separate_colour_plane_flag equal to 0 means that the color components are not encoded separately. When separate_colour_plane_flag does not exist, its value is inferred to be equal to 0.

[0076] When separate_colour_plane_flag is equal to 1, the coded picture consists of three separate components, each of which consists of coded samples of one color plane (Y, Cb, or Cr) and uses the monochrome coding syntax. In this case, each color plane is associated with a specific colour_plane_id value.

[0077] The colour_plane_id specifies the colour plane associated with the slice associated with the PH (Picture Header). When separate_colour_plane_flag is equal to 1, the value of colour_plane_id shall be in the range of 0 to 2 (including 0 and 2). The values 0, 1, and 2 of colour_plane_id correspond to the Y, Cb, and Cr planes respectively. It should be noted that there is no dependency between the decoding processes of colour planes with different colour_plane_id values. For example, the decoding process of a monochrome image with one colour_plan_id value does not use any data from a monochrome image with a different colour_plan_id value for inter-frame prediction.

[0078] According to the value of separate_colour_plane_flag, the value of the variable ChromaArrayType is defined as follows:

[0079] -- If separate_colour_plane_flag is equal to 0, ChromaArrayType is set to be equal to chroma_format_idc.

[0080] -- Otherwise (i.e., separate_colour_plane_flag is equal to 1), ChromaArrayType is set to be equal to 0.

[0081] qtbtt_dual_tree_intra_flag being equal to 1 specifies that for I slices, each CTU (Coding Tree Unit) is split into coding units with 64×64 luma samples using an implicit quadtree split, and these coding units are the roots of two separate coding_tree syntax structures for luma and chroma, where the variables treeType are set to DUAL_TREE_LUMA and DUAL_TREE_CHROMA respectively. qtbtt_dual_tree_intra_flag being equal to 0 specifies that the separate coding_tree syntax structure is not used for I slices. When qtbtt_dual_tree_intra_flag does not exist, it is inferred to be equal to 0. When the value of qtbtt_dual_tree_intra_flag is equal to or inferred to be equal to 0, the variable treeType is set to SINGLE_TREE.

[0082] When treeType is equal to SINGLE_TREE, the coding_unit contains the syntax of the luma and two chroma coding blocks. When treeType is equal to DUAL_TREE_LUMA, the coding_unit only contains the syntax of the luma coding block. When treeType is equal to DUAL_TREE_CHROMA, the coding_unit only contains the syntax of two chroma coding blocks.

[0083] When sps_transform_skip_enabled_flag is equal to 1, it specifies that transform_skip_flag can appear in the transform unit syntax. When sps_transform_skip_enabled_flag is equal to 0, it specifies that transform_skip_flag does not exist in the transform unit syntax.

[0084] When sps_bdpcm_enabled_flag is equal to 1, it specifies that intra_bdpcm_luma_flag can appear in the coding unit syntax for intra-coded units. When sps_bdpcm_enable_flag is equal to 0, it specifies that intra_bdpcm_luma_flag does not exist in the coding unit syntax for intra-coded units. If it does not exist, it is inferred that the value of sps_bdpcm_enabled_flag is equal to 0.

[0085] When sps_bdpcm_chroma_enabled_flag is equal to 1, it specifies that intra_bdpcm_chroma_flag can appear in the coding unit syntax for intra-coded units. When sps_bdpcm_chroma_enabled_flag is equal to 0, it specifies that intra_bdpcm_chroma_flag does not exist in the coding unit syntax for intra-coded units. If it does not exist, it is inferred that the value of sps_bdpcm_chroma_enabled_flag is equal to 0.

[0086] 2.2. Coding Unit (CU)

[0087] The syntax structure of the coding unit (CU) can be as shown in Table 3 below:

[0088] Table 3

[0089]

[0090] When intra_bdpcm_luma_flag equals 1, it specifies that BDPCM is applied to the current luma coding block at position (x0, y0), i.e., the transform is skipped, and the intra-frame luma prediction mode is specified by intra_bdpcm_luma_dir_flag. When intra_bdpcm_luma_flag equals 0, it specifies that BDPCM is not applied to the current luma coding block at position (x0, y0). When intra_bdpcm_luma_flag does not exist, it is inferred to be equal to 0.

[0091] For x ∈ [x0, x0 + cbWidth - 1], y ∈ [y0, y0 + cbHeight - 1] and cIdx = 0, the variable BdpcmFlag[x][y][cIdx] is set to be equal to intra_bdpcm_luma_flag.

[0092] When intra_bdpcm_luma_dir_flag equals 0, it specifies that the BDPCM prediction direction is horizontal. When intra_bdpcm_luma_dir_flag equals 1, it specifies that the BDPCM prediction direction is vertical.

[0093] For x ∈ [x0, x0 + cbWidth - 1], y ∈ [y0, y0 + cbHeight - 1] and cIdx = 0, the variable BdpcmDir[x][y][cIdx] is set to be equal to intra_bdpcm_luma_dir_flag.

[0094] When intra_bdpcm_chroma_flag equals 1, it specifies that BDPCM is applied to the current chroma coding block at position (x0, y0), i.e., the transform is skipped, and the intra-frame chroma prediction mode is specified by intra_bdpcm_chroma_dir_flag. When intra_bdpcm_chroma_flag equals 0, it specifies that BDPCM is not applied to the current chroma coding block at position (x0, y0). When intra_bdpcm_chroma_flag does not exist, it is inferred to be equal to 0.

[0095] For x ∈ [x0, x0 + cbWidth - 1], y ∈ [y0, y0 + cbHeight - 1] and cIdx = 1 or 2, the variable BdpcmFlag[x][y][cIdx] is set to be equal to intra_bdpcm_chroma_flag.

[0096] When intra_bdpcm_chroma_dir_flag is equal to 0, it specifies that the BDPCM prediction direction is horizontal. When intra_bdpcm_chroma_dir_flag is equal to 1, it specifies that the BDPCM prediction direction is vertical.

[0097] For x ∈ [x0, x0 + cbWidth - 1], y ∈ [y0, y0 + cbHeight - 1] and cIdx = 1 or 2, the variable BdpcmDir[x][y][cIdx] is set to be equal to intra_bdpcm_chroma_dir_flag.

[0098] When cu_cbf is equal to 1, it specifies that there exists a transform_tree() syntax structure for the current coding unit. When cu_cbf is equal to 0, it specifies that there does not exist a transform_tree() syntax structure for the current coding unit.

[0099] When cu_cbf does not exist, the following inferences are made:

[0100] -- If cu_skip_flag[x0][y0] is equal to 1 or pred_mode_plt_flag is equal to 1, then it is inferred that cu_cbf is equal to 0;

[0101] -- Otherwise, it is inferred that cu_cbf is equal to 1.

[0102] 2.3. Transform Unit (TU)

[0103] The syntax structure of the transform unit (TU) can be as shown in Table 4 below:

[0104] Table 4

[0105]

[0106]

[0107] When tu_cbf_cb[x0][y0] is equal to 1, it specifies that the Cb transform block contains one or more transform coefficients that are not equal to 0. The matrix indices x0, y0 specify the top - left position (x0, y0) of the transform block under consideration. When tu_cbf_cb[x0][y0] does not exist, its value is inferred to be equal to 0.

[0108] When tu_cbf_cr[x0][y0] is equal to 1, it specifies that the Cr transform block contains one or more transform coefficients that are not equal to 0. The matrix indices x0, y0 specify the top - left position (x0, y0) of the transform block under consideration. When tu_cbf_cr[x0][y0] does not exist, its value is inferred to be equal to 0.

[0109] tu_cbf_luma[x0][y0] being equal to 1 indicates that the luma transform block contains one or more transform coefficients that are not equal to 0. The matrix indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the transform block under consideration relative to the top-left luma sample of the image. When tu_cbf_luma[x0][y0] does not exist, its value is inferred as follows:

[0110] -- If tu_cbf_luma[x0][y0] is equal to 1 and one of the following conditions is true, then tu_cbf_luma[x0][y0] is inferred to be equal to 0:

[0111] -- subTuIndex is equal to 0 and cu_sbt_pos_flag is equal to 1;

[0112] -- subTuIndex is equal to 1 and cu_sbt_pos_flag is equal to 0.

[0113] -- Otherwise, if treeType is equal to DUAL_TREE_CHROMA, then tu_cbf_luma[x0][y0] is inferred to be equal to 0.

[0114] -- Otherwise, tu_cbf_luma[x0][y0] is inferred to be equal to 1.

[0115] transform_skip_flag[x0][y0][cIdx] specifies whether a transform is applied to the associated transform block. The matrix indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the transform block under consideration relative to the top-left luma sample of the picture. The matrix index cIdx specifies the indicator of the color component; Y is equal to 0, Cb is equal to 1, and Cr is equal to 2. transform_skip_flag[x0][y0][cIdx] being equal to 1 indicates that no transform is applied to the associated transform block. transform_skip_flag[x0][y0][cIdx] being equal to 0 specifies whether a transform is applied to the associated transform block depending on other syntax elements.

[0116] When transform_skip_flag[x0][y0][cIdx] does not exist, its inference is as follows:

[0117] -- If BdpcmFlag[x0][y0][cIdx] is equal to 1, then transform_skip_flag[x0][y0][cIdx] is inferred to be equal to 1;

[0118] -- Otherwise (i.e., BdpcmFlag[x0][y0][cIdx] is equal to 0), it is inferred that transform_skip_flag[x0][y0][cIdx] is equal to 0.

[0119] 2.4, Residual coding for transform skip block

[0120] Predicted quantization residual values in BDPCM The same residual coding process as that for transform skip mode residual coding is used to send data. Table 5 below is the syntax of transform skip mode residual coding.

[0121] Table 5

[0122]

[0123]

[0124]

[0125] The variables CoeffMin and CoeffMax specify the minimum and maximum transform coefficient values, which are derived as follows:

[0126] CoeffMin = -(1 << 15) Equation 5

[0127] CoeffMax = (1 << 15) - 1 Equation 6 where << is the left shift operator.

[0128] The array QStateTransTable[][] is specified as follows:

[0129] QStateTransTable[][] = {{0, 2}, {2, 0}, {1, 3}, {3, 1}} Equation 7

[0130] last_sig_coeff_x_prefix specifies the prefix of the column position of the last significant coefficient in the scan order within the transform block. The value of last_sig_coeff_x_prefix should be in the range from 0 to (log2ZoTbWidth << 1) - 1, inclusive of 0 and (log2ZoTbWidth << 1) - 1. When there is no last_sig_coeff_x_prefix, it is inferred to be 0.

[0131] last_sig_coeff_y_prefix specifies the prefix of the row position of the last significant coefficient in the scan order within a transform block. The value of last_sig_coeff_y_prefix shall be in the range of 0 to (log2ZoTbHeight << 1) – 1, inclusive of 0 and (log2ZoTbHeight << 1) - 1. When last_sig_coeff_y_prefix does not exist, it is inferred as 0.

[0132] last_sig_coeff_x_suffix specifies the suffix of the column position of the last significant coefficient in the scan order within a transform block. The value of last_sig_coeff_x_suffix shall be in the range of 0 to (1 << ((last_sig_coeff_x_prefix >> 1) - 1)) – 1, inclusive of 0 and (1 << ((last_sig_coeff_x_prefix >> 1) - 1)) - 1. The column position of the last significant coefficient in the scan order within transform block LastSignsignantCoeffX is derived as follows:

[0133] If last_sig_coeff_x_suffix does not exist, the following applies:

[0134] LastSignificantCoeffX = last_sig_coeff_x_prefix Formula 8

[0135] Otherwise (i.e., last_sig_coeff_x_suffix exists), the following applies:

[0136] LastSignificantCoeffX = (1 << ((last_sig_coeff_x_prefix >> 1) - 1)) * (2 + (last_sig_coeff_x_prefix & 1)) + last_sig_coeff_x_suffix Formula 9

[0137] last_sig_coeff_y_suffix specifies the suffix of the row position of the last significant coefficient in the scan order within a transform block. The value of last_sig_coeff_y_suffix shall be in the range of 0 to (1 << ((last_sig_coeff_y_prefix >> 1) - 1)) – 1, inclusive of 0 and (1 << ((last_sig_coeff_y_prefix >> 1) - 1)) - 1. The row position of the last significant coefficient in the scan order within transform block LastSignsignantCoeffY is derived as follows:

[0138] If last_sig_coeff_y_suffix does not exist, the following applies:

[0139] LastSignificantCoeffY = last_sig_coeff_y_prefix Formula 10 Otherwise (i.e., last_sig_coeff_y_suffix exists), the following applies:

[0140] LastSignificantCoeffY = (1 << ((last_sig_coeff_y_prefix >> 1) - 1)) * (2 + (last_sig_coeff_y_prefix & 1)) + last_sig_coeff_y_suffix Formula 11

[0141] coded_sub_block_flag[xS][yS] specifies the following for the sub-block at position (xS, yS) within the current transform block, where the sub-block is a (4×4) array of 16 transform coefficients:

[0142] -- If coded_sub_block_flag[xS][yS] is equal to 0, it is inferred that the 16 transform coefficients of the sub-block at position (xS, yS) are equal to 0;

[0143] -- Otherwise (i.e., coded_sub_block_flag[xS][yS] is equal to 1), the following applies:

[0144] -- If (xS, yS) is equal to (0, 0) and (LastSignificantCoeffX, LastSignificantCoeffY) is not equal to (0, 0), then at least one of the 16 sig_coeff_flag syntax elements exists for the sub-block at position (xS, yS);

[0145] -- Otherwise, at least one of the 16 transform coefficients of the sub-block at position (xS, yS) has a non-zero value.

[0146] When coded_sub_block_flag[xS][yS] does not exist, it is inferred to be equal to 1.

[0147] sig_coeff_flag[xC][yC] specifies whether the corresponding transform coefficient at the transform coefficient position (xC, yC) within the current transform block is non-zero, as follows:

[0148] -- If sig_coeff_flag[xC][yC] is equal to 0, set the transform coefficient at position (xC, yC) to be equal to 0;

[0149] -- Otherwise (i.e., sig_coeff_flag[xC][yC] is equal to 1), the transform coefficient at position (xC, yC) is a non-zero value.

[0150] When sig_coeff_flag[xC][yC] does not exist, the inference is as follows:

[0151] -- If (xC, yC) is the last significant position (LastSignificantCoeffX, LastSignificantCoeffY) in the scan order or all of the following conditions are true, infer that sig_coeff_flag[xC][yC] is equal to 1:

[0152] -(xC & ((1 << log2SbW) - 1), yC & ((1 << log2SbH) - 1)) is equal to (0, 0);

[0153] - inferSbDcSigCoeffFlag is equal to 1;

[0154] - coded_sub_block_flag[xS][yS] is equal to 1;

[0155] -- Otherwise, infer that sig_coeff_flag[xC][yC] is equal to 0.

[0156] abs_level_gtx_flag[n][j] specifies whether the absolute value of the transform coefficient (at scan position n) is greater than (j << 1) + 1. When abs_level_gtx_flag[n][j] does not exist, it is inferred to be equal to 0.

[0157] par_level_flag[n] specifies the parity of the transform coefficient at scan position n. When par_level_flag[n] does not exist, it is inferred to be equal to 0.

[0158] abs_remainder[n] is the absolute value remainder of the transform coefficient level encoded with a Golomb - Rice code at scan position n. When abs_remainder[n] does not exist, it is inferred to be equal to 0.

[0159] The bitstream conformance requirement is that the value of abs_remainder[n] should be constrained such that the corresponding value of TransCoeffLevel[x0][y0][cIdx][xC][yC] is within the range of CoeffMin to CoeffMax (including CoeffMin and CoeffMax).

[0160] dec_abs_level[n] is the intermediate value encoded with a Golomb - Rice code at scan position n. Given ZeroPos[n] derived during the parsing of dec_abs_level[n], the absolute value of the transform coefficient AbsLevel[xC][yC] at position (xC,yC) is derived as follows:

[0161] -- If dec_abs_level[n] does not exist or is equal to ZeroPos[n], then AbsLevel[xC][yC] is set to be equal to 0.

[0162] -- Otherwise, if dec_abs_level[n] is less than ZeroPos[n], then AbsLevel[xC][yC] is set to dec_abs_level[n]+1;

[0163] -- Otherwise (i.e., dec_abs_level[n] is greater than ZeroPos[n]), AbsLevel[xC][yC] is set to be equal to dec_abs_level[n].

[0164] The bitstream conformance requirement constrains the value of dec_abs_level[n] such that the corresponding value of TransCoeffLevel[x0][y0][cIdx][xC][yC] is within the range of CoeffMin to CoeffMax (including CoeffMin and CoeffMax).

[0165] coeff_sign_flag[n] specifies the sign of the transform coefficient level at scan position n as follows:

[0166] -- If coeff_sign_flag[n] is equal to 0, then the corresponding transform coefficient is positive;

[0167] -- Otherwise (i.e., coeff_sign_flag[n] is equal to 1), the corresponding transform coefficient is negative.

[0168] When coeff_sign_flag[n] does not exist, it is inferred to be equal to 0.

[0169] The value of CoeffSignLevel[xC][yC] specifies the sign of the transform coefficient at position (xC, yC) as follows:

[0170] -- If CoeffSignLevel[xC][yC] equals 0, the corresponding transform coefficient equals 0;

[0171] -- Otherwise, if CoeffSignLevel[xC][yC] equals 1, the corresponding transform coefficient is positive;

[0172] -- Otherwise (i.e., CoeffSignLevel[xC][yC] equals -1), the corresponding transform coefficient is negative.

[0173] 3. A decoding method for BDPCM residual blocks

[0174] The decoding process of the intra prediction block has the following 4 steps:

[0175] 1. Decode the intra prediction mode information from coding_uint();

[0176] 2. Decode the intra prediction residual block res[x][y], from residual_unit() or residual_ts_uint();

[0177] 3. Use intra prediction to derive the prediction block pred[x][y] according to the decoded intra prediction mode;

[0178] 4. Obtain the reconstructed block by using intra compensation by adding the residual block res[x][y] to the prediction block pred[x][y].

[0179] The decoding process of the BDPCM coded block also follows the above process. As described above, BDPCM is applied to the quantized residual values, and its residual block derivation process is different from the ordinary intra prediction mode. Specifically as follows.

[0180] For the derivation of the residual block res[x][y] of the BDPCM coded block where x ∈ [0, nTbW - 1] and y ∈ [0, nTbH - 1], the following formula applies:

[0181] -- The derivation processes of BdpcmFlag[x][y][cIdx] and BdpcmDir[x][y][cIdx] are shown in Section 2.2 above.

[0182] -- The derivation processes of tu_cbf_luma (cIdx = 0), tu_cbf_cb (cIdx = 1), and tu_cbf_cr (cIdx = 2) are in the transform unit of Section 2.3 above.

[0183] -- For each color component cIdx, where cIdx ranges from 0 to 2 (inclusive of 0 and 2), the following conditions apply:

[0184] -- If the corresponding cbf value of the current color component is equal to 0, set the residual block res[x][y] to 0;

[0185] -- Otherwise, the transform coefficient matrix TransCoeffLevel[xTbY][yTbY] is derived from the residual_ts_unit() introduced in Section 2.4 above.

[0186] -- Modify TransCoeffLevel[x][y] according to BdpcmDir as follows:

[0187] Set the (nTbW) × (nTbH) array dz to be equal to the (nTbW) × (nTbH) array TransCoeffLevel[xTbY][yTbY][cIdx].

[0188] When BdpcmFlag[xTbY][yYbY][cIdx] is equal to 1, modify dz[x][y] as follows:

[0189] -- If BdpcmDir[xTbY][yYbY][cIdx] is equal to 0 and x is greater than 0, the following applies:

[0190] dz[x][y] = Clip3(CoeffMin, CoeffMax, dz[x - 1][y] + dz[x][y]) Equation 12

[0191] -- Otherwise, if BdpcmDir[xTbY][yTbY][cIdx] is equal to 1 and y is greater than 0, the following applies:

[0192] dz[x][y] = Clip3(CoeffMin, CoeffMax, dz[x][y - 1] + dz[x][y]) Equation 13

[0193] The value dnc[x][y] is derived as follows:

[0194] dnc[x][y] = (dz[x][y] * ls[x][y] + bdOffset) >> bdShift Equation 14

[0195] where >> is the right shift operator.

[0196] The scaled transform coefficient d[x][y] is derived as follows:

[0197] d[x][y]=Clip3(CoeffMin, CoeffMax, dnc[x][y]) Formula 15

[0198] res[x][y] is derived from the output of the inverse quantization process on d[x][y].

[0199] 4. BDPCM Mode and Normal Intra Vertical / Horizontal (Hor. / Ver.) Coding Mode

[0200] Figure 8 and Figure 9 respectively show the comparison between the BDPCM mode and the normal intra coding mode for the luminance and chrominance coding blocks. It can be found that the BDPCM mode can be indicated by 2 flag syntax elements (i.e., intra_bdpcm_luma_flag and intra_bdpcm_luma_dir_flag for luminance, and intra_bdpcm_chroma_flag and intra_bdpc_chroma_dir_flag for chrominance). On the other hand, for the luminance coding block, the normal intra vertical and horizontal coding modes should indicate the reference pixel row index, MPM flag, MPM index, plane flag, or MPM remainder by bits; for the chrominance coding block, the CCLM (cross-component linear model prediction) flag, CCLM index, or chrominance prediction mode should be indicated by bits. It can be easily found that the signaling of BDPCM uses fewer bits compared to the normal intra vertical and horizontal coding modes. In addition, the RD cost (J) for coding mode selection is evaluated as follows:

[0201] J = D + λ × R Formula 16

[0202] where D represents the distortion between the original coding block and the reconstructed coding block (also known as the "reconstructed block"), R represents the bit cost, and λ is the Lagrangian multiplier used to trade off distortion and bit cost. It can be considered that after horizontal or vertical intra prediction, the block has zero distortion. It can be inferred that according to the RD evaluation, these blocks tend to select BDPCM as the best mode. As a result, it is very likely that the BDPCM mode encodes the all-zero residual blocks corresponding to the luminance coding block or the chrominance coding block.

[0203] In the current VVC, different from the coding blocks using ordinary intra coding modes, the probability of all-zero residual blocks in the coding blocks using the BDPCM mode is relatively high. An all-zero residual block refers to a residual block in which all the included residual coefficients are 0. There are two main reasons: Firstly, a considerable part of the coding blocks in video images change less, resulting in the appearance of all-zero residual blocks; Secondly, the bit consumption of BDPCM mode coding is lower than that of ordinary intra coding modes. Therefore, most coding blocks with all-zero residual blocks will choose BDPCM as the optimal coding mode. Because the probability of all-zero residual blocks in BDPCM coding blocks is relatively high, still using the same residual encoding and decoding method as the ordinary intra coding mode will lead to the problem of low encoding and decoding efficiency of image blocks using the BDPCM mode.

[0204] In the technical solution provided by the embodiments of the present application, for a coding unit (or decoding unit) using the BDPCM mode, the first identification information is used to indicate whether the transform block corresponding to the coding unit (or decoding unit) contains non-zero transform coefficients. If the first identification information indicates that the transform block corresponding to the coding unit (or decoding unit) does not contain non-zero transform coefficients, then at the encoder side, there is no need to encode the transform tree syntax structure corresponding to the coding unit to encode and transmit the residual block. Correspondingly, at the decoder side, there is no need to decode the transform tree syntax structure corresponding to the decoding unit to decode and obtain the residual block, and it can be directly determined that the residual block corresponding to the decoding unit is an all-zero residual block, thereby improving the encoding and decoding efficiency of the image unit using the BDPCM mode.

[0205] It should be noted that the technical solution provided by the embodiments of the present application can be applied to the H.266 / VCC standard or the next-generation video coding standard. The embodiments of the present application do not limit this.

[0206] It should also be noted that for the video decoding method provided by the embodiments of the present application, the execution subject of each step is the decoding end device, and the execution subject of each step of the video coding method provided by the embodiments of the present application is the encoding end device. The decoding end device and the encoding end device can both be computer devices, which refer to electronic devices with data calculation, processing, and storage capabilities, such as PCs, mobile phones, tablet computers, media players, dedicated video conferencing devices, servers, and so on.

[0207] In addition, the method provided by the present application can be used alone or combined with other methods in any order. The encoder and decoder based on the method provided by the present application can be implemented by one or more processors or one or more integrated circuits. Next, the technical solution of the present application will be introduced and described through several embodiments.

[0208] Please refer to Figure 10, which shows a flowchart of a video decoding method provided by an embodiment of the present application. In this embodiment, it is mainly exemplified by applying this method to the decoding end device introduced above. This method may include the following steps (1001 to 1004):

[0209] Step 1001, decode the intra prediction mode information corresponding to the current decoding unit.

[0210] The current decoding unit can be any decoding unit in the currently decoded video frame. The intra prediction mode information is used to indicate whether the BDPCM mode or the ordinary intra coding mode is adopted for the current decoding unit. If the intra prediction mode information indicates that the BDPCM mode is applied to the current decoding unit, that is, the current decoding unit is encoded using the BDPCM mode, then perform the following step 1002. For the introduction of the BDPCM mode and the ordinary intra coding mode, please refer to the above, and details will not be elaborated here.

[0211] A decoding unit may include several decoding blocks, such as decoding blocks including one or more different color components. When the coding tree type corresponding to the current decoding unit is DUAL_TREE_LUMA, the current decoding unit includes only 1 luma decoding block; when the coding tree type corresponding to the current decoding unit is DUAL_TREE_CHROMA, the current decoding unit includes only 2 chroma decoding blocks; when the coding tree type corresponding to the current decoding unit is SINGLE_TREE, the current decoding unit includes 1 luma decoding block and 2 chroma decoding blocks. Among them, the 2 chroma decoding blocks are respectively the Cb chroma decoding block and the Cr chroma decoding block.

[0212] Optionally, the intra prediction mode information is located in the CU syntax structure. The decoding end device decodes the CU syntax structure to obtain the intra prediction mode information.

[0213] Optionally, the intra prediction mode information includes a first syntax element and a second syntax element; wherein, the first syntax element is used to indicate whether to apply the BDPCM mode to the current luma decoding block when the current decoding unit includes a luma decoding block. The second syntax element is used to indicate whether to apply the BDPCM mode to the current chroma decoding block when the current decoding unit includes a chroma decoding block. Optionally, the first syntax element is intra_bdpcm_luma_flag, and intra_bdpcm_luma_flag being equal to 1 indicates that the BDPCM mode is applied to the current luma decoding block, and intra_bdpcm_luma_flag being equal to 0 indicates that the BDPCM mode is not applied to the current luma decoding block. Optionally, the second syntax element is intra_bdpcm_chroma_flag, and intra_bdpcm_chroma_flag being equal to 1 indicates that the BDPCM mode is applied to the current chroma decoding block, and intra_bdpcm_chroma_flag being equal to 0 indicates that the BDPCM mode is not applied to the current chroma decoding block.

[0214] Step 1002, if the intra prediction mode information indicates that the BDPCM mode is applied to the current decoding unit, decode the first identification information corresponding to the current decoding unit.

[0215] In one example, if the intra prediction mode information indicates that the BDPCM mode is applied to the current decoding unit, the decoding device decodes the first identification information corresponding to the current decoding unit.

[0216] In another example, if the intra prediction mode information indicates that the BDPCM mode is applied to the current decoding unit, and the BDPCM mode is adopted for each color component of the current decoding unit, the decoding device decodes the first identification information corresponding to the current decoding unit. That the BDPCM mode is adopted for each color component of the current decoding unit means that the decoding blocks of each color component included in the current decoding unit all adopt the BDPCM mode. For example, when the coding tree type corresponding to the current decoding unit is DUAL_TREE_LUMA, the current decoding unit only includes one luma decoding block, and in the case where the BDPCM mode is adopted for this luma decoding block, the first identification information corresponding to the current decoding unit is decoded; when the coding tree type corresponding to the current decoding unit is DUAL_TREE_CHROMA, the current decoding unit only includes two chroma decoding blocks, and in the case where the BDPCM mode is adopted for both of these two chroma decoding blocks, the first identification information corresponding to the current decoding unit is decoded; when the coding tree type corresponding to the current decoding unit is SINGLE_TREE, the current decoding unit includes one luma decoding block and two chroma decoding blocks, and in the case where the BDPCM mode is adopted for this one luma decoding block and the two chroma decoding blocks, the first identification information corresponding to the current decoding unit is decoded.

[0217] The first identification information is used to indicate whether the transform block corresponding to the current decoding unit contains non-zero transform coefficients. Optionally, when the first identification information is equal to 1, it indicates that the transform block corresponding to the current decoding unit contains non-zero transform coefficients, that is, the transform block corresponding to the current decoding unit contains one or more non-zero transform coefficients; when the first identification information is equal to 0, it indicates that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, that is, all element values in the transform block corresponding to the current decoding unit are 0.

[0218] It should be noted that since the current decoding unit includes one or more decoding blocks, and each decoding block corresponds to a transform block. Assuming that the current decoding unit includes n decoding blocks, these n decoding blocks and n transform blocks are in one-to-one correspondence, where n is a positive integer. Therefore, if the first identification information indicates that the transform block corresponding to the current decoding unit contains non-zero transform coefficients, it means that at least one of the above n transform blocks contains non-zero transform coefficients; if the first identification information indicates that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, it means that none of the above n transform blocks contains non-zero transform coefficients.

[0219] In addition, the first identification information can be in the CU syntax structure or in the TU syntax structure, and the embodiments of the present application do not limit this.

[0220] In one example, the first identification information is located in the CU syntax structure. Optionally, the first identification information is cu_cbf; where the value of cu_cbf is equal to 1, indicating that the transform block corresponding to the current decoding unit contains non-zero transform coefficients; the value of cu_cbf is equal to 0, indicating that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

[0221] Optionally, if the coding tree type corresponding to the current decoding unit is DUAL_TREE_LUMA, the value of cu_cbf is equal to 1, indicating that the luminance transform block corresponding to the current decoding unit contains non-zero transform coefficients; the value of cu_cbf is equal to 0, indicating that the luminance transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

[0222] Optionally, if the coding tree type corresponding to the current decoding unit is DUAL_TREE_CHROMA, the value of cu_cbf is equal to 1, indicating that at least one of the first chrominance transform block and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients; the value of cu_cbf is equal to 0, indicating that neither the first chrominance transform block nor the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients.

[0223] Optionally, if the coding tree type corresponding to the current decoding unit is SINGLE_TREE, the value of cu_cbf is equal to 1, indicating that at least one of the luminance transform block, the first chrominance transform block, and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients; the value of cu_cbf is equal to 0, indicating that neither the luminance transform block, the first chrominance transform block, nor the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients.

[0224] In another example, the first identification information is located in the TU syntax structure. Optionally, the first identification information is tu_cbf_chroma[xC][yC]; where the value of tu_cbf_chroma[xC][yC] is equal to 1, indicating that at least one of the first chrominance transform block and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients; the value of tu_cbf_chroma[xC][yC] is equal to 0, indicating that neither the first chrominance transform block nor the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients. Since the image chrominance includes Cb and Cr, the above first chrominance transform block is a Cb transform block and the second chrominance transform block is a Cr transform block; or the first chrominance transform block is a Cr transform block and the second chrominance transform block is a Cb transform block.

[0225] Step 1003, if the first identification information indicates that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, determine that the residual block corresponding to the current decoding unit is an all-zero residual block.

[0226] If the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, that is, all the element values in the transform block corresponding to the current decoding unit are 0, then the decoding device can determine that the residual block corresponding to the current decoding unit is an all-zero residual block, that is, all the element values in this residual block are 0. In this case, the encoding device does not need to transmit the residual block by transmitting the transform tree syntax structure (i.e., transform_tree()), and correspondingly, the decoding device does not need to obtain the residual block by decoding the transform tree syntax structure, thereby improving the encoding and decoding efficiency.

[0227] In addition, if the first identification information indicates that the transform block corresponding to the current decoding unit contains non-zero transform coefficients, then the decoding device can further decode the transform tree syntax structure to determine each element value in the residual block corresponding to the current decoding unit.

[0228] Step 1004, reconstruct and generate the current decoding unit according to the residual block and the prediction block corresponding to the current decoding unit.

[0229] After decoding the residual block corresponding to the current decoding unit, the decoding device can combine the prediction block corresponding to the current decoding unit to reconstruct and generate the current decoding unit, and the reconstructed current decoding unit can also be called a reconstruction unit. Optionally, for each decoding block included in the current decoding unit, the decoding device reconstructs and generates the decoding block according to the residual block and the prediction block corresponding to the decoding block, and the reconstructed decoding block can also be called a reconstruction block.

[0230] In summary, in the technical solution provided in the embodiments of the present application, for a decoding unit adopting the BDPCM mode, by decoding the corresponding first identification information, it is known whether the transform block corresponding to the decoding unit contains non-zero transform coefficients. If the first identification information indicates that the transform block corresponding to the decoding unit does not contain non-zero transform coefficients, then the decoder does not need to decode the transform tree syntax structure corresponding to the decoding unit to decode the residual block, and can directly determine that the residual block corresponding to the decoding unit is an all-zero residual block, thereby improving the decoding efficiency of the decoding unit adopting the BDPCM mode.

[0231] In an exemplary embodiment, before decoding the first identification information corresponding to the current decoding unit, the decoding device first determines whether the current decoding unit meets a predefined condition; if the current decoding unit meets the predefined condition, the decoding device then executes the step of decoding the first identification information corresponding to the current decoding unit. Among them, the predefined condition includes: according to the coding tree type corresponding to the current decoding unit, it is determined that all color components of the current decoding unit adopt the BDPCM mode.

[0232] The coding tree type (treeType) can include the following three types: DUAL_TREE_LUMA, DUAL_TREE_CHROMA, and SINGLE_TREE. Among them, DUAL_TREE_LUMA means that the luminance and chrominance are encoded separately and correspond to the luminance coding tree; DUAL_TREE_CHROMA means that the luminance and chrominance are encoded separately and correspond to the chrominance coding tree; SINGLE_TREE means that the luminance and chrominance are encoded together. When treeType is equal to SINGLE_TREE, the CU syntax structure includes the syntax of the luminance and two chrominance coding blocks. When treeType is equal to DUAL_TREE_LUMA, the CU syntax structure only includes the syntax of the luminance coding block. When treeType is equal to DUAL_TREE_CHROMA, the CU syntax structure only includes the syntax of two chrominance coding blocks.

[0233] Optionally, if the coding tree type corresponding to the current decoding unit is DUAL_TREE_LUMA, since the coding tree corresponding to DUAL_TREE_LUMA is the luminance coding tree in the dual tree, at this time the current decoding unit only includes one luminance decoding block. Then, when it is determined that the luminance component of the current decoding unit (i.e., this luminance decoding block) adopts the BDPCM mode, the step of decoding the first identification information corresponding to the current decoding unit is executed.

[0234] Optionally, if the coding tree type corresponding to the current decoding unit is DUAL_TREE_CHROMA, since the coding tree corresponding to DUAL_TREE_CHROMA is the chrominance coding tree in the dual tree, at this time the current decoding unit only includes two chrominance decoding blocks. Then, when it is determined that both of the two chrominance components of the current decoding unit (i.e., these two chrominance decoding blocks) adopt the BDPCM mode, the step of decoding the first identification information corresponding to the current decoding unit is executed.

[0235] Optionally, if the coding tree type corresponding to the current decoding unit is SINGLE_TREE, since the coding tree corresponding to SINGLE_TREE is a single tree, at this time the current decoding unit includes one luminance decoding block and two chrominance decoding blocks. Then, when it is determined that both the luminance component and the two chrominance components of the current decoding unit (that is, one luminance decoding block and two chrominance decoding blocks) adopt the BDPCM mode, the step of decoding the first identification information corresponding to the current decoding block is executed.

[0236] In the embodiments of the present application, by adding the above-mentioned predefined conditions to the CU or TU syntax structure, when the decoding device determines that the BDPCM mode is applied to the current decoding unit and each color component decoding block included in the current decoding unit adopts the BDPCM mode, the first identification information corresponding to the current decoding unit is decoded, thereby improving the decoding accuracy of the first identification information.

[0237] Next, several exemplary embodiments will be used to introduce and illustrate the technical solutions provided by the present application.

[0238] In one example, the first identification information is located in the CU syntax structure, and a coding block flag (i.e., the first identification information introduced above) is transmitted for the BDPCM luma coding block in the CU syntax structure. If this flag indicates that there are no non-zero transform coefficients in this BDPCM luma coding block, the syntax structure transform_tree() will not appear in the bitstream. Exemplarily, the CU syntax structure can be as shown in Table 6 below:

[0239] Table 6

[0240]

[0241]

[0242] The syntax elements and corresponding semantics appearing in Table 6 above are the same as those introduced in Section 2.2 above and will not be elaborated here. In this example, the predefined conditions include:

[0243] The BDPCM mode is applied to the luma component of the current decoding unit and satisfies at least one of the following Condition 1 and Condition 2:

[0244] Condition 1: The coding tree type corresponding to the current decoding unit is DUAL_TREE_LUMA;

[0245] Condition 2: The coding tree type corresponding to the current decoding unit is SINGLE_TREE and the value of ChromaArrayType is not equal to 3, where a value of ChromaArrayType equal to 3 means that the three color components of the current decoding unit are not decoded separately and the chroma format is 4:4:4.

[0246] Optionally, as shown in Table 6, the predefined conditions include: the value of BdpcmFlag[x0][y0][0] is 1 and satisfies at least one of the following Condition 1 and Condition 2:

[0247] Condition 1: The value of treeType is DUAL_TREE_LUMA;

[0248] Condition 2: The value of treeType is SINGLE_TREE and the value of ChromaArrayType is not equal to 3.

[0249] That is to say, when the value of BdpcmFlag[x0][y0][0] is 1 and at least one of the above Condition 1 and Condition 2 is satisfied, the decoding device needs to decode the syntax element cu_cbf. If the value of cu_cbf is equal to 1, then the decoding device determines that the transform block corresponding to the current decoding unit contains non-zero transform coefficients; if the value of cu_cbf is equal to 0, then the decoding device determines that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients. If the value of cu_cbf is equal to 1, the decoding device further decodes the transform_tree() syntax structure to obtain the residual block corresponding to the current decoding unit; if the value of cu_cbf is equal to 0, the decoding device does not need to decode the transform_tree() syntax structure and directly determines that the residual block corresponding to the current decoding unit is an all-zero residual block.

[0250] In another example, the first identification information is located in the CU syntax structure, and a coding block flag (i.e., the first identification information introduced above) is transmitted for the BDPCM chroma coding block in the DUAL_TREE_CHROMA in the CU syntax structure. If this flag indicates that this BDPCM chroma coding block has no non-zero transform coefficients, then the syntax structure transform_tree() will not appear in the bitstream. Exemplarily, the CU syntax structure can be as shown in Table 7 below:

[0251] Table 7

[0252]

[0253] The syntax elements and corresponding semantics appearing in Table 7 above are the same as those introduced in Section 2.2 above and will not be elaborated here. In this example, the predefined conditions include: the BDPCM mode is applied to the chroma component of the current decoding unit, and the coding tree type corresponding to the current decoding unit is DUAL_TREE_CHROMA.

[0254] Optionally, as shown in Table 7, the predefined conditions include: the value of BdpcmFlag[x0][y0][1] is 1 and the value of treeType is DUAL_TREE_CHROMA.

[0255] That is to say, when the value of BdpcmFlag[x0][y0][1] is 1 and treeType is equal to DUAL_TREE_CHROMA, the decoding device needs to decode the syntax element cu_cbf. If the value of cu_cbf is equal to 1, then the decoding device determines that at least one of the first chroma transform block and the second chroma transform block corresponding to the current decoding unit contains non-zero transform coefficients; if the value of cu_cbf is equal to 0, then the decoding device determines that neither the first chroma transform block nor the second chroma transform block corresponding to the current decoding unit contains non-zero transform coefficients. If the value of cu_cbf is equal to 1, the decoding device further decodes the transform_tree() syntax structure to obtain the residual block corresponding to the current decoding unit; if the value of cu_cbf is equal to 0, the decoding device does not need to decode the transform_tree() syntax structure and directly determines that the residual block corresponding to the current decoding unit (including the residual block corresponding to the first chroma transform block and the residual block corresponding to the second chroma transform block) is an all-zero residual block.

[0256] Exemplarily, the TU syntax structure can be as shown in Table 8 below:

[0257] Table 8

[0258]

[0259] Combined with the syntax structures shown in Table 7 and Table 8 above, if the first identification information indicates that the transform block corresponding to the current decoding unit contains non-zero transform coefficients (i.e., the value of cu_cbf is equal to 1), then the second identification information corresponding to the current decoding unit is decoded, and the second identification information is used to indicate whether the first chroma transform block corresponding to the current decoding unit contains non-zero transform coefficients. Optionally, the second identification information is equal to 1, indicating that the first chroma transform block corresponding to the current decoding unit contains non-zero transform coefficients, that is, the first chroma transform block corresponding to the current decoding unit contains one or more non-zero transform coefficients; the second identification information is equal to 0, indicating that the first chroma transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, that is, all element values in the first chroma transform block corresponding to the current decoding unit are 0.

[0260] Optionally, as shown in Table 8, the second identification information is tu_cbf_cb[xC][yC]; where the value of tu_cbf_cb[xC][yC] is equal to 1, indicating that the Cb transform block corresponding to the current decoding unit contains non-zero transform coefficients; the value of tu_cbf_cb[xC][yC] is equal to 0, indicating that the Cb transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

[0261] After decoding the second identification information, if at least one condition in the first condition set is satisfied, the third identification information corresponding to the current decoding unit is further decoded, and the third identification information is used to indicate whether the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients. Optionally, the first condition set includes the following conditions:

[0262] Condition 1, the BDPCM mode is not applied to the chrominance component of the current decoding unit;

[0263] Condition 2, the coding tree type corresponding to the current decoding unit is not DUAL_TREE_CHROMA;

[0264] Condition 3, the value of the second identification information indicates that the first chrominance transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

[0265] Optionally, the third identification information is equal to 1, indicating that the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients, that is, the second chrominance transform block corresponding to the current decoding unit contains one or more non-zero transform coefficients; the third identification information is equal to 0, indicating that the second chrominance transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, that is, all element values in the second chrominance transform block corresponding to the current decoding unit are 0.

[0266] Optionally, as shown in Table 8, the third identification information is tu_cbf_cr[xC][yC]; where the value of tu_cbf_cr[xC][yC] is equal to 1, indicating that the Cr transform block corresponding to the current decoding unit contains non-zero transform coefficients; the value of tu_cbf_cr[xC][yC] is equal to 0, indicating that the Cr transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

[0267] As shown in Table 8, the first condition set includes the following conditions:

[0268] Condition 1, the value of BdpcmFlag[x0][y0][1] is not equal to 1;

[0269] Condition 2, the value of treeType is not equal to DUAL_TREE_CHROMA;

[0270] Condition 3, the value of the second identification information (i.e., tu_cbf_cb[xC][yC] in Table 8) is equal to 0.

[0271] In addition, when tu_cbf_cr[xC][yC] does not exist, the inference process of its value can be as follows:

[0272] -- If the value of BdpcmFlag[x0][y0][1] is equal to 1 and all of the following conditions are satisfied, the value of tu_cbf_cr[xC][yC] is inferred to be equal to 1:

[0273] -- The value of treeType is equal to DUAL_TREE_CHROMA;

[0274] -- The value of tu_cbf_cb[xC][yC] is equal to 0;

[0275] -- Otherwise, the value of tu_cbf_cr[xC][yC] is inferred to be equal to 0.

[0276] In another example, the first identification information is located in the CU syntax structure, and a coding block flag (i.e., the first identification information introduced above) for BDPCM luminance and chrominance coding blocks in SINGLE_TREE is transmitted in the CU syntax structure. If this flag indicates that there are no non-zero transform coefficients for this BDPCM luminance and chrominance coding block, the syntax structure transform_tree() will not appear in the bitstream. Exemplarily, the CU syntax structure can be as shown in Table 9 below:

[0277] Table 9

[0278]

[0279] The syntax elements and corresponding semantics appearing in Table 9 above are the same as those introduced in Section 2.2 above, and will not be elaborated here. In this example, the predefined conditions include: the BDPCM mode is applied to all color components of the current decoding unit, and the coding tree type corresponding to the current decoding unit is SINGLE_TREE.

[0280] Optionally, as shown in Table 9, the predefined conditions include: the value of BdpcmAllFlag[x0][y0] is 1, and the value of treeType is SINGLE_TREE.

[0281] Among them, the derivation process of the variable BdpcmAllFlag[x0][y0] is as follows:

[0282] If BdpcmFlag[x0][y0][cIdx] is equal to 1 for cIdx equal to 0, 1, and 2, the value of BdpcmAllFlag[x0][y0] is set to 1;

[0283] Otherwise, the value of BdpcmAllFlag[x0][y0] is set to 0.

[0284] That is to say, when the value of BdpcmAllFlag[x0][y0] is 1 and treeType is equal to SINGLE_TREE, the decoding device needs to decode the syntax element cu_cbf. If the value of cu_cbf is equal to 1, then the decoding device determines that at least one of the 1 luminance transform block and 2 chrominance transform blocks corresponding to the current decoding unit contains non-zero transform coefficients; if the value of cu_cbf is equal to 0, then the decoding device determines that none of the 1 luminance transform block and 2 chrominance transform blocks corresponding to the current decoding unit contains non-zero transform coefficients. If the value of cu_cbf is equal to 1, the decoding device further decodes the transform_tree() syntax structure to obtain the residual block corresponding to the current decoding unit; if the value of cu_cbf is equal to 0, the decoding device does not need to decode the transform_tree() syntax structure and directly determines that the residual blocks corresponding to the current decoding unit (including the residual blocks corresponding to 1 luminance transform block and 2 chrominance transform blocks respectively) are all-zero residual blocks.

[0285] In another example, the first identification information is located in the TU syntax structure, and a coding block flag (i.e., the first identification information introduced above) is transmitted for the BDPCM chrominance coding block in the SINGLE_TREE of the TU syntax structure. Exemplarily, the TU syntax structure can be as shown in Table 10 below:

[0286] Table 10

[0287]

[0288]

[0289] In this example, the predefined conditions include: the BDPCM mode is applied to all color components of the current decoding unit, and the coding tree type corresponding to the current decoding unit is SINGLE_TREE.

[0290] Optionally, as shown in Table 10, the predefined conditions include: the value of BdpcmAllFlag[x0][y0] is 1 and the value of treeType is SINGLE_TREE.

[0291] That is to say, when the value of BdpcmAllFlag[x0][y0] is 1 and treeType is equal to SINGLE_TREE, the decoding device needs to decode the syntax element tu_cbf_chroma[xC][yC]. If the value of tu_cbf_chroma[xC][yC] is equal to 1, then the decoding device determines that at least one of the first chroma transform block and the second chroma transform block corresponding to the current decoding unit contains non-zero transform coefficients; if the value of tu_cbf_chroma[xC][yC] is equal to 0, then the decoding device determines that neither the first chroma transform block nor the second chroma transform block corresponding to the current decoding unit contains non-zero transform coefficients. If the value of tu_cbf_chroma[xC][yC] is equal to 1, the decoding device further decodes the subsequent syntax elements in the TU syntax structure to obtain the residual block corresponding to the current decoding unit; if the value of tu_cbf_chroma[xC][yC] is equal to 0, the decoding device does not need to decode the subsequent syntax elements in the TU syntax structure and directly determines that the residual block corresponding to the current decoding unit (including the residual block corresponding to the first chroma transform block and the residual block corresponding to the second chroma transform block) is an all-zero residual block.

[0292] Combined with the syntax structure shown in Table 10 above, if the first identification information indicates that at least one of the first chroma transform block and the second chroma transform block corresponding to the current decoding unit contains non-zero transform coefficients (i.e., the value of tu_cbf_chroma[xC][yC] is equal to 1), then the second identification information corresponding to the current decoding unit is decoded, and the second identification information is used to indicate whether the first chroma transform block corresponding to the current decoding unit contains non-zero transform coefficients. Optionally, the second identification information is equal to 1, indicating that the first chroma transform block corresponding to the current decoding unit contains non-zero transform coefficients, that is, the first chroma transform block corresponding to the current decoding unit contains one or more non-zero transform coefficients; the second identification information is equal to 0, indicating that the first chroma transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, that is, all the element values in the first chroma transform block corresponding to the current decoding unit are 0.

[0293] Optionally, as shown in Table 10, the second identification information is tu_cbf_cb[xC][yC]; where the value of tu_cbf_cb[xC][yC] is equal to 1, indicating that the Cb transform block corresponding to the current decoding unit contains non-zero transform coefficients; the value of tu_cbf_cb[xC][yC] is equal to 0, indicating that the Cb transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

[0294] After decoding the second identification information, if at least one condition in the second condition set is satisfied, the third identification information corresponding to the current decoding unit is further decoded, and the third identification information is used to indicate whether the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients. Optionally, the second condition set includes the following conditions:

[0295] Condition 1, the coding tree type corresponding to the current decoding unit is not SINGLE_TREE;

[0296] Condition 2, the value of the second identification information indicates that the first chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients;

[0297] Condition 3, the BDPCM mode is not applied to all color components of the current decoding unit.

[0298] Optionally, the third identification information is equal to 1, indicating that the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients, that is, the second chrominance transform block corresponding to the current decoding unit contains one or more non-zero transform coefficients; the third identification information is equal to 0, indicating that the second chrominance transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, that is, all element values in the second chrominance transform block corresponding to the current decoding unit are 0.

[0299] Optionally, as shown in Table 10, the third identification information is tu_cbf_cr[xC][yC]; where the value of tu_cbf_cr[xC][yC] is equal to 1, indicating that the Cr transform block corresponding to the current decoding unit contains non-zero transform coefficients; the value of tu_cbf_cr[xC][yC] is equal to 0, indicating that the Cr transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

[0300] As shown in Table 10, the second condition set includes the following conditions:

[0301] Condition 1, the value of treeType is not equal to SINGLE_TREE;

[0302] Condition 2, the value of the second identification information (i.e., tu_cbf_cb[xC][yC] in Table 10) is equal to 1;

[0303] Condition 3, the value of BdpcmAllFlag[x0][y0] is not equal to 1.

[0304] In addition, when tu_cbf_cr[xC][yC] does not exist, the inference process of its value can be as follows:

[0305] -- If all the following conditions are satisfied, the value of tu_cbf_cr[xC][yC] is inferred to be equal to 1:

[0306] -- The value of tu_cbf_chroma[x0][y0] is equal to 1;

[0307] -- The value of tu_cbf_cb[xC][yC] is equal to 0;

[0308] -- The value of BdpcmAllFlag[x0][y0] is equal to 1;

[0309] -- The value of treeType is equal to SINGLE_TREE;

[0310] -- Otherwise, the value of tu_cbf_cr[xC][yC] is inferred to be equal to 0.

[0311] In addition, for the syntax element tu_cbf_chroma[xC][yC], the encoding device can use the entropy coding scheme of CABAC (Context-based Adaptive Binary Arithmetic Coding) to encode it; correspondingly, the decoding device can also use the entropy decoding scheme of CABAC to decode it.

[0312] The binarization of the syntax element tu_cbf_chroma[xC][yC] can adopt a fixed-length binarization method with cMax (the maximum upper limit value) of 1. The following is the initialization process of the context ctxIdx of this syntax element, which is guided by the variable initValue. The specific derivation process of the variable initType is shown in the following pseudocode:

[0313]

[0314] The initValue value of the syntax element tu_cbf_chroma is obtained from the value of initType according to Table 11. Combining Table 11 and Table 12, the initValue and shiftIdx of the syntax element tu_cbf_chroma can be derived.

[0315] The following is the process of determining the initialization probability states pStateIdx0 and pStateIdx1 according to the value of initValue:

[0316] First, according to the value of the variable initValue, determine the values of the variables slopeIdx and offsetIdx, as shown in the following formula:

[0317] slopeIdx = initValue >> 3 Formula 17

[0318] offsetIdx = initValue & 7 Formula 18

[0319] Then, determine the initial probability states pStateIdx0 and pStateIdx1 according to the values of slopeIdx and offsetIdx, as shown in the following formula:

[0320] m = slopeIdx – 4 Formula 19

[0321] n = (offsetIdx * 18) + 1 Formula 20

[0322] preCtxState = Clip3(1, 127, ((m * (Clip3(0, 51, SliceQpY) - 16)) >> 1) + n) Formula 21

[0323] Among them, SliceQpY is the QP value of the Y component of the current encoded slice.

[0324] pStateIdx0 = preCtxState << 3 Formula 22

[0325] pStateIdx1 = preCtxState << 7 Formula 23

[0326] The variable shiftIdx is used to update the probability state of entropy coding. The specific process is as follows:

[0327] Input: The probability states pStateIdx0 and pStateIdx1 of the current symbol, and the value binVal of the currently decoded symbol.

[0328] Output: The updated probability states pStateIdx0 and pStateIdx1.

[0329] The specific derivation process is as follows:

[0330] First, calculate the values of variables shift0 and shift1 according to the value of shiftIdx, as shown in the following formula:

[0331] shift0 = (shiftIdx >> 2) + 2 Formula 24

[0332] shift1 = (shiftIdx & 3) + 3 + shift0 Formula 25 Then, determine the updated probability state according to the values of shift0 and shift1, as shown in the following formula:

[0333] pStateIdx0 = pStateIdx0 - (pStateIdx0 >> shift0) + (1023 * binVal >> shift0) Formula 26

[0334] pStateIdx1 = pStateIdx1 - (pStateIdx1 >> shift1) + (16383 * binVal >> shift1) Formula 27

[0335] Table 11

[0336]

[0337] Table 12

[0338]

[0339] The derivation process of the ctxTable and ctxIdx of the syntax element tu_cbf_chroma is as follows:

[0340] The input is the index of the current encoded bit, binIdx;

[0341] The output is the ctxTable and ctxIdx for the context-adaptive arithmetic entropy coding of this bit.

[0342] The values of ctxTable and ctxIdx for each binIdx are derived from Table 13 below, specifically as follows:

[0343] If the corresponding value of the current binIdx in Table 13 is not equal to "na", then binIdx needs to be encoded and decoded using the algorithm: ctxTable is specified by Table 11; ctxInc is specified by Table 13; ctxIdxOffset is specified by initType according to Table 11; ctxIdx is equal to the sum of ctxInc and ctxIdxOffset; bypassFlag is set to 0.

[0344] Otherwise, (the corresponding value of the current binIdx in Table 13 is equal to "na"), the value corresponding to binIdx does not exist in the current syntax element.

[0345] Table 13

[0346]

[0347] In several of the exemplary embodiments described above, by transmitting an encoding block flag (i.e., the first identification information described above) for the BDPCM encoding unit in the CU or TU syntax structure, it is indicated whether the BDPCM encoding unit contains non-zero transform coefficients. Thus, when there are no non-zero transform coefficients, it can be directly determined that the residual block corresponding to the BDPCM encoding unit is an all-zero residual block, thereby improving the encoding and decoding efficiency of the picture unit using the BDPCM mode.

[0348] Please refer to Figure 11 , which shows a flowchart of a video encoding method provided by an embodiment of the present application. In this embodiment, it is mainly exemplified by applying this method to the encoding device introduced above. This method may include the following steps (1101-1103):

[0349] Step 1101, obtain the current coding unit.

[0350] Step 1102, calculate the residual block corresponding to the current coding unit according to the current coding unit and the prediction block corresponding to the current coding unit.

[0351] The current coding unit may include coding blocks corresponding to one or more color components. Optionally, the encoding device may adopt prediction modes such as intra-frame and inter-frame to calculate the prediction blocks corresponding to each coding block included in the current coding unit, and then further calculate the residual blocks corresponding to each coding block respectively.

[0352] Step 1103, if the residual block corresponding to the current coding unit is an all-zero residual block and the BDPCM mode is applied to the current coding unit, encode the first identification information corresponding to the current coding unit, and this first identification information is used to indicate that the transform block corresponding to the current coding unit does not contain non-zero transform coefficients.

[0353] If the residual block corresponding to the current coding unit is an all-zero residual block and the BDPCM mode is applied to the current coding unit, then the encoding device may determine that the first identification information corresponding to the current coding unit is equal to 0; if the residual block corresponding to the current coding unit is not an all-zero residual block, then the encoding device may determine that the first identification information corresponding to the current coding unit is equal to 1. In the case where the first identification information is equal to 0, the encoding device may not transmit the residual block by transmitting the transform tree syntax structure; in the case where the first identification information is equal to 1, the encoding device may transmit the residual block by transmitting the transform tree syntax structure.

[0354] Optionally, if the residual block corresponding to the current coding unit is an all-zero residual block and the BDPCM mode is adopted for each color component of the current coding unit, encode the first identification information corresponding to the current coding unit, and this first identification information is used to indicate that the transform block corresponding to the current coding unit does not contain non-zero transform coefficients.

[0355] In summary, in the technical solution provided by the embodiments of the present application, for a coding unit adopting the BDPCM mode, the first identification information is used to indicate whether the transform block corresponding to the coding unit contains non-zero transform coefficients. If the first identification information indicates that the transform block corresponding to the coding unit does not contain non-zero transform coefficients, then the encoder side does not need to code the transform tree syntax structure corresponding to the coding unit to code and transmit the residual block. Correspondingly, the decoder side does not need to decode the transform tree syntax structure corresponding to the decoding unit to decode the residual block, and can directly determine that the residual block corresponding to the decoding unit is an all-zero residual block, thereby improving the encoding and decoding efficiency of the image unit adopting the BDPCM mode.

[0356] In addition, the encoding process of the encoding end device corresponds to the decoding process of the decoding end device. For details not described in detail in the encoding process, reference can be made to the introduction in the decoding process embodiment above, and details will not be repeated here.

[0357] The following is an embodiment of the apparatus of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the embodiment of the apparatus of the present application, please refer to the method embodiment of the present application.

[0358] Please refer to Figure 12 , which shows a block diagram of a video decoding apparatus provided by an embodiment of the present application. The apparatus has the function of implementing the above video decoding method example, and the function can be implemented by hardware or by hardware executing corresponding software. The apparatus can be the decoding end device introduced above, or can be set on the decoding end device. The apparatus 1200 may include: a first decoding module 1210, a second decoding module 1220, a residual determination module 1230, and a decoding reconstruction module 1240.

[0359] The first decoding module 1210 is configured to decode the intra prediction mode information corresponding to the current decoding unit.

[0360] The second decoding module 1220 is configured to, if the intra prediction mode information indicates that the BDPCM mode is applied to the current decoding unit, and all color components of the current decoding unit adopt the BDPCM mode, decode the first identification information corresponding to the current decoding unit, where the first identification information is used to indicate whether the transform block corresponding to the current decoding unit contains non-zero transform coefficients.

[0361] The residual determination module 1230 is configured to, if the first identification information indicates that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, determine that the residual block corresponding to the current decoding unit is an all-zero residual block.

[0362] A decoding and reconstruction module 1240, configured to reconstruct and generate the current decoding unit according to the residual block and the prediction block corresponding to the current decoding unit.

[0363] In an exemplary embodiment, the first identification information is located in the CU syntax structure.

[0364] Optionally, the first identification information is cu_cbf; wherein, when the value of cu_cbf is equal to 1, it indicates that the transform block corresponding to the current decoding unit contains non-zero transform coefficients; when the value of cu_cbf is equal to 0, it indicates that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

[0365] Optionally, if the coding tree type corresponding to the current decoding unit is DUAL_TREE_LUMA, then the value of cu_cbf is equal to 1, indicating that the luminance transform block corresponding to the current decoding unit contains non-zero transform coefficients;

[0366] If the coding tree type corresponding to the current decoding unit is DUAL_TREE_CHROMA, then the value of cu_cbf is equal to 1, indicating that at least one of the first chrominance transform block and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients;

[0367] If the coding tree type corresponding to the current decoding unit is SINGLE_TREE, then the value of cu_cbf is equal to 1, indicating that at least one of the luminance transform block, the first chrominance transform block, and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients.

[0368] In an exemplary embodiment, the first identification information is located in the TU syntax structure.

[0369] Optionally, the first identification information is tu_cbf_chroma[xC][yC]; wherein, when the value of tu_cbf_chroma[xC][yC] is equal to 1, it indicates that at least one of the first chrominance transform block and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients; when the value of tu_cbf_chroma[xC][yC] is equal to 0, it indicates that neither the first chrominance transform block nor the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients.

[0370] Optionally, the apparatus 1200 further includes: an entropy decoding module, configured to decode the tu_cbf_chroma[xC][yC] by using an entropy decoding scheme of CABAC.

[0371] In an exemplary embodiment, the second decoding module 1220 is further configured to perform the step of decoding the first identification information corresponding to the current decoding unit if the current decoding unit meets a predefined condition;

[0372] Wherein, the predefined condition includes: determining that all color components of the current decoding unit adopt the BDPCM mode according to the coding tree type corresponding to the current decoding unit.

[0373] Optionally, the first identification information is located in the CU syntax structure, and the predefined condition includes:

[0374] The BDPCM mode is applied to the luminance component of the current decoding unit and satisfies at least one of the following conditions:

[0375] The coding tree type corresponding to the current decoding unit is DUAL_TREE_LUMA;

[0376] The coding tree type corresponding to the current decoding unit is SINGLE_TREE and the value of ChromaArrayType is not equal to 3, where the value of ChromaArrayType being equal to 3 means that the 3 color components of the current decoding unit are not decoded separately and the chrominance format is 4:4:4.

[0377] Optionally, the first identification information is located in the CU syntax structure, and the predefined condition includes:

[0378] The BDPCM mode is applied to the chrominance component of the current decoding unit and the coding tree type corresponding to the current decoding unit is DUAL_TREE_CHROMA.

[0379] Optionally, the second decoding module 1220 is further configured to:

[0380] If the first identification information indicates that the transform block corresponding to the current decoding unit contains non-zero transform coefficients, decode the second identification information corresponding to the current decoding unit, where the second identification information is used to indicate whether the first chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients;

[0381] If at least one condition in the first condition set is met, decode the third identification information corresponding to the current decoding unit, where the third identification information is used to indicate whether the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients.

[0382] Optionally, the first condition set includes the following conditions:

[0383] Condition 1, the BDPCM mode is not applied to the chrominance component of the current decoding unit;

[0384] Condition 2, the coding tree type corresponding to the current decoding unit is not DUAL_TREE_CHROMA;

[0385] Condition 3, the value of the second identification information indicates that the first chrominance transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

[0386] Optionally, the first identification information is located in the CU syntax structure or the TU syntax structure, and the predefined conditions include:

[0387] The BDPCM mode is applied to all color components of the current decoding unit, and the coding tree type corresponding to the current decoding unit is SINGLE_TREE.

[0388] Optionally, the second decoding module 1220 is further configured to:

[0389] If the first identification information indicates that at least one of the first chrominance transform block and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients, then decode the second identification information corresponding to the current decoding unit, where the second identification information is used to indicate whether the first chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients;

[0390] If at least one condition in the second condition set is satisfied, then decode the third identification information corresponding to the current decoding unit, where the third identification information is used to indicate whether the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients.

[0391] Optionally, the second condition set includes the following conditions:

[0392] Condition 1, the coding tree type corresponding to the current decoding unit is not SINGLE_TREE;

[0393] Condition 2, the value of the second identification information indicates that the first chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients;

[0394] Condition 3, the BDPCM mode is not applied to all color components of the current decoding unit.

[0395] In summary, for the decoding unit adopting the BDPCM mode in the technical solution provided by the embodiment of the present application, by decoding the corresponding first identification information, it is known whether the transform block corresponding to the decoding unit contains non-zero transform coefficients. If the first identification information indicates that the transform block corresponding to the decoding unit does not contain non-zero transform coefficients, then at the decoder side, it is not necessary to decode the transform tree syntax structure corresponding to the decoding unit to obtain the residual block, and it can be directly determined that the residual block corresponding to the decoding unit is an all-zero residual block, thereby improving the decoding efficiency of the decoding unit adopting the BDPCM mode.

[0396] Please refer to Figure 13 , which shows a block diagram of a video encoding device provided by an embodiment of the present application. This device has the functions of implementing the above-mentioned video encoding method example, and the functions can be implemented by hardware or by hardware executing corresponding software. This device can be the encoding end device introduced above or can be set on the encoding end device. The device 1300 may include: an encoding block acquisition module 1310, a residual block calculation module 1320, and an identification encoding module 1330.

[0397] The encoding block acquisition module 1310 is configured to acquire a current encoding unit.

[0398] The residual block calculation module 1320 is configured to calculate a residual block corresponding to the current encoding unit according to the current encoding unit and a prediction block corresponding to the current encoding unit.

[0399] The identification encoding module 1330 is configured to encode the first identification information corresponding to the current encoding unit if the residual block corresponding to the current encoding unit is an all-zero residual block and all color components of the current encoding unit adopt the BDPCM mode, and the first identification information is used to indicate that the transform block corresponding to the current encoding unit does not contain non-zero transform coefficients.

[0400] In summary, in the technical solution provided by the embodiment of the present application, for the encoding unit adopting the BDPCM mode, the first identification information is used to indicate whether the transform block corresponding to the encoding unit contains non-zero transform coefficients. If the first identification information indicates that the transform block corresponding to the encoding unit does not contain non-zero transform coefficients, then at the encoder side, it is not necessary to encode the transform tree syntax structure corresponding to the encoding unit to encode and transmit the residual block, and correspondingly, at the decoder side, it is not necessary to decode the transform tree syntax structure corresponding to the decoding unit to obtain the residual block, and it can be directly determined that the residual block corresponding to the decoding unit is an all-zero residual block, thereby improving the encoding and decoding efficiency of the picture unit adopting the BDPCM mode.

[0401] In addition, for the details not described in detail on the encoding side, reference can be made to the introduction in the above-mentioned decoding side embodiment, which will not be elaborated here.

[0402] It should be noted that for the device provided in the above embodiments, when implementing its functions, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiments and the method embodiments belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.

[0403] Please refer to Figure 14 , which shows a structural block diagram of a computer device provided in an embodiment of the present application. The computer device may be the encoding device described above or the decoding device described above. The computer device 150 may include: a processor 151, a memory 152, a communication interface 153, an encoder / decoder 154, and a bus 155.

[0404] The processor 151 includes one or more processing cores. The processor 151 executes various functional applications and information processing by running software programs and modules.

[0405] The memory 152 can be used to store computer programs, and the processor 151 is used to execute the computer programs to implement the above video encoding method or the above video decoding method.

[0406] The communication interface 153 can be used to communicate with other devices, such as receiving and sending audio and video data.

[0407] The encoder / decoder 154 can be used to implement encoding and decoding functions, such as encoding and decoding audio and video data.

[0408] The memory 152 is connected to the processor 151 through the bus 155.

[0409] In addition, the memory 152 may be implemented by any type of volatile or non-volatile storage device or a combination thereof. Volatile or non-volatile storage devices include, but are not limited to: magnetic or optical disks, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), SRAM (Static Random-Access Memory), ROM (Read-Only Memory), magnetic memory, flash memory, PROM (Programmable read-only memory).

[0410] Those skilled in the art can understand that Figure 14 the structure shown in does not constitute a limitation on the computer device 150, and it may include more or fewer components than shown in the figure, or combine some components, or adopt a different component arrangement.

[0411] In an exemplary embodiment, a computer-readable storage medium is further provided. At least one instruction, at least one segment of program, a code set or an instruction set is stored in the computer-readable storage medium. When the at least one instruction, the at least one segment of program, the code set or the instruction set is executed by a processor, the above video decoding method or the above video encoding method is implemented.

[0412] In an exemplary embodiment, a computer program product is further provided. When the computer program product is executed by a processor, it is used to implement the above video decoding method or the above video encoding method.

[0413] It should be understood that "a plurality of" as mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects and indicates that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0414] The above are only exemplary embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A video decoding method, characterized in that, The method includes: Decoding the intra prediction mode information corresponding to the current decoding unit; If the intra prediction mode information indicates that the block differential pulse code modulation (BDPCM) mode is applied to the current decoding unit, and all color components of the current decoding unit adopt the BDPCM mode, then decoding the first identification information corresponding to the current decoding unit, where the first identification information is used to indicate whether the transform block corresponding to the current decoding unit contains non-zero transform coefficients; wherein, if the coding tree type corresponding to the current decoding unit is DUAL_TREE_LUMA, the value of the first identification information is equal to 1, indicating that the luminance transform block corresponding to the current decoding unit contains non-zero transform coefficients; if the coding tree type corresponding to the current decoding unit is DUAL_TREE_CHROMA, the value of the first identification information is equal to 1, indicating that at least one of the first chrominance transform block and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients; if the coding tree type corresponding to the current decoding unit is SINGLE_TREE, the value of the first identification information is equal to 1, indicating that at least one of the luminance transform block, the first chrominance transform block, and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients; If the first identification information indicates that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients, determining that the residual block corresponding to the current decoding unit is an all-zero residual block; Reconstructing and generating the current decoding unit according to the residual block and the prediction block corresponding to the current decoding unit.

2. The method according to claim 1, wherein The first identification information is located in the coding unit (CU) syntax structure.

3. The method according to claim 2, wherein The first identification information is cu_cbf; where The value of cu_cbf being equal to 1 indicates that the transform block corresponding to the current decoding unit contains non-zero transform coefficients; The value of cu_cbf being equal to 0 indicates that the transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

4. The method according to claim 1, wherein The first identification information is located in the transform unit (TU) syntax structure.

5. The method according to claim 4, wherein The first identification information is tu_cbf_chroma[xC][yC]; where The value of tu_cbf_chroma[xC][yC] being equal to 1 indicates that at least one of the first chrominance transform block and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients; The value of tu_cbf_chroma[xC][yC] being equal to 0 indicates that neither the first chrominance transform block nor the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients.

6. The method according to claim 5, characterized in that, The method further includes: Performing entropy decoding on tu_cbf_chroma[xC][yC] using a context-based adaptive binary arithmetic coding (CABAC) entropy decoding scheme.

7. The method according to claim 1, characterized in that The method further includes: If the current decoding unit meets a predefined condition, performing the step of decoding the first identification information corresponding to the current decoding unit; Among them, the predefined conditions include: determining that all color components of the current decoding unit adopt the BDPCM mode according to the coding tree type corresponding to the current decoding unit.

8. The method according to claim 7, wherein The first identification information is located in the CU syntax structure, and the predefined conditions include: The BDPCM mode is applied to the luminance component of the current decoding unit and satisfies at least one of the following conditions: The coding tree type corresponding to the current decoding unit is DUAL_TREE_LUMA; The coding tree type corresponding to the current decoding unit is SINGLE_TREE and the value of ChromaArrayType is not equal to 3, where the value of ChromaArrayType being equal to 3 means that the three color components of the current decoding unit are not decoded separately and the chroma format is 4:4:

4.

9. The method according to claim 7, wherein The first identification information is located in the CU syntax structure, and the predefined conditions include: The BDPCM mode is applied to the chrominance component of the current decoding unit, and the coding tree type corresponding to the current decoding unit is DUAL_TREE_CHROMA.

10. The method according to claim 9, characterized in that, After decoding the first identification information corresponding to the current decoding unit, it further includes: If the first identification information indicates that the transform block corresponding to the current decoding unit contains non-zero transform coefficients, then decode the second identification information corresponding to the current decoding unit, and the second identification information is used to indicate whether the first chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients; If at least one condition in the first condition set is satisfied, then decode the third identification information corresponding to the current decoding unit, and the third identification information is used to indicate whether the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients.

11. The method according to claim 10, wherein The first condition set includes the following conditions: Condition 1, the BDPCM mode is not applied to the chrominance component of the current decoding unit; Condition 2, the coding tree type corresponding to the current decoding unit is not DUAL_TREE_CHROMA; Condition 3, the value of the second identification information indicates that the first chrominance transform block corresponding to the current decoding unit does not contain non-zero transform coefficients.

12. The method according to claim 7, wherein The first identification information is located in the CU syntax structure or TU syntax structure, and the predefined conditions include: The BDPCM mode is applied to all color components of the current decoding unit, and the coding tree type corresponding to the current decoding unit is SINGLE_TREE.

13. The method according to claim 12, wherein After decoding the first identification information corresponding to the current decoding unit, it further includes: If the first identification information indicates that at least one of the first chrominance transform block and the second chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients, then decode the second identification information corresponding to the current decoding unit, and the second identification information is used to indicate whether the first chrominance transform block corresponding to the current decoding unit contains non-zero transform coefficients; If at least one condition in the second set of conditions is satisfied, decode the third identification information corresponding to the current decoding unit, where the third identification information is used to indicate whether non-zero transform coefficients are included in the second chrominance transform block corresponding to the current decoding unit.

14. The method according to claim 13, characterized in that, The second set of conditions includes the following conditions: Condition 1, the coding tree type corresponding to the current decoding unit is not SINGLE_TREE; Condition 2, the value of the second identification information indicates that non-zero transform coefficients are included in the first chrominance transform block corresponding to the current decoding unit; Condition 3, the BDPCM mode is not applied to all color components of the current decoding unit.

15. A video decoding device, characterized in that, The apparatus includes: A first decoding module, configured to decode the intra prediction mode information corresponding to the current decoding unit; A second decoding module, configured to, if the intra prediction mode information indicates that the block differential pulse code modulation (BDPCM) mode is applied to the current decoding unit and all color components of the current decoding unit adopt the BDPCM mode, decode the first identification information corresponding to the current decoding unit, where the first identification information is used to indicate whether non-zero transform coefficients are included in the transform block corresponding to the current decoding unit; wherein, if the coding tree type corresponding to the current decoding unit is DUAL_TREE_LUMA, the value of the first identification information is equal to 1, indicating that non-zero transform coefficients are included in the luminance transform block corresponding to the current decoding unit; if the coding tree type corresponding to the current decoding unit is DUAL_TREE_CHROMA, the value of the first identification information is equal to 1, indicating that at least one of the first chrominance transform block and the second chrominance transform block corresponding to the current decoding unit includes non-zero transform coefficients; if the coding tree type corresponding to the current decoding unit is SINGLE_TREE, the value of the first identification information is equal to 1, indicating that at least one of the luminance transform block, the first chrominance transform block, and the second chrominance transform block corresponding to the current decoding unit includes non-zero transform coefficients; A residual determination module, configured to, if the first identification information indicates that no non-zero transform coefficients are included in the transform block corresponding to the current decoding unit, determine that the residual block corresponding to the current decoding unit is an all-zero residual block; A decoding and reconstruction module, configured to reconstruct and generate the current decoding unit according to the residual block and the prediction block corresponding to the current decoding unit.

16. A computer device, characterized in that, The computer device includes a processor and a memory, and at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the method according to any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that, At least one program is stored in the computer-readable storage medium, and the at least one program is loaded and executed by a processor to implement the method according to any one of claims 1 to 14.

18. A computer program product, characterized in that, The computer program product is executed by a processor to implement the method according to any one of claims 1 to 14.