Encoding and decoding method implemented by codec of video data and non-transitory computer readable storage medium

By introducing a bypass encoding method of parity flags in video encoding technology, the problem of too many encoding passes in transform skipping residual encoding is solved, achieving higher encoding efficiency and hardware implementation simplification.

CN119946307AActive Publication Date: 2025-05-06ALIBABA (CHINA) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510106910.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-12-24
Filing Date
2020-05-12
Publication Date
2025-05-06
Estimated Expiration
2040-05-12

AI Technical Summary

Technical Problem

In the existing video encoding technology, the number of encoding passes by transforms skip residual encoding is too large, resulting in a decrease in the throughput of the CABAC engine, an increase in hardware implementation complexity, and inconsistent diversity of bypass encoding syntax elements.

Method used

A new bypass encoding method is proposed, which reduces the number of encoding passes through the encoding and decoding of parity flags, and uniformly transforms residual coding and transforms skip residual coding. The specific method includes bypass encoding or decoding the parity level flag of the transform coefficient in the first pass scan, and adjusting the encoding method of the flag in the subsequent pass count to reduce the total number of coded passes.

Benefits of technology

By reducing the number of encoding passes and unified bypass encoding methods, the throughput of the CABAC engine is improved, the hardware implementation is simplified, and the encoding efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119946307A_ABST
    Figure CN119946307A_ABST
Patent Text Reader

Abstract

The present disclosure provides systems and methods for transform skip residual video data encoding and decoding. An exemplary method includes performing a first pass of scanning transform coefficients of a sub-block of a video frame, where the first pass of scanning includes bypass encoding a parity level flag for the transform coefficients, the parity level flag indicating a parity of an absolute value of a level of the transform coefficients.
Need to check novelty before this filing date? Find Prior Art

Description

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This disclosure claims priority and the benefit of priority to U.S. Provisional Patent Application No. 62 / 865,916, filed on June 24, 2019; U.S. Provisional Patent Application No. 62 / 902,115, filed on September 18, 2019; and U.S. Provisional Patent Application No. 62 / 953,460, filed on December 24, 2019. These three provisional applications are incorporated herein by reference in their entirety. Technical Field

[0002] The present disclosure relates generally to video data processing, and more particularly, to transform skip residual coding of video data. Background Art

[0003] New standards for video coding are being developed in the video compression and decompression industry. For example, the Joint Video Experts Group ("JVET") of the ITU-T Video Coding Experts Group ("VCEG") and the ISO / IEC Moving Picture Experts Group ("MPEG") is currently developing the Versatile Video Coding ("VVC") standard. The VVC standard aims to double the compression efficiency of its predecessor, the High Efficiency Video Coding ("HEVC / H.265") standard. In other words, the goal of VVC is to achieve the same subjective quality as HEVC / H.265 using half the bandwidth. Summary of the invention

[0004] Embodiments of the present disclosure provide methods and systems for transform skip residual video data encoding.

[0005] An exemplary method includes performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of the scan includes bypass encoding a parity level flag of the transform coefficient, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient.

[0006] Another exemplary method includes performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of the scan includes bypass decoding a parity level flag of the transform coefficient, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient.

[0007] An exemplary system includes: a memory storing an instruction set; and a processor configured to execute the instruction set to cause the system to: perform a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of the scan includes: bypass encoding a parity level flag of the transform coefficient, the parity level flag indicating the parity of the absolute value of the level of the transform coefficient.

[0008] Another exemplary system includes: a memory storing an instruction set; and a processor configured to execute the instruction set to cause the system to: perform a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of the scan includes: bypass decoding a parity level flag of the transform coefficient, the parity level flag indicating the parity of the absolute value of the level of the transform coefficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Embodiments and various aspects of the present disclosure are illustrated in the following detailed description and accompanying drawings.The various features shown in the various figures are not drawn to scale.

[0010] Figure 1 An example encoder block diagram of a hybrid video coding system is illustrated.

[0011] Figure 2 An example decoder block diagram of a hybrid video coding system is illustrated.

[0012] FIG. 3 illustrates an example pseudo code including syntax for transform coding.

[0013] FIG. 4 illustrates example pseudo-code including syntax for transform skip residual coding.

[0014] Figure 5 An example method of transform skip residual encoding that reduces the number of encoding passes to 3 according to some embodiments of the present disclosure is illustrated.

[0015] FIG. 6 illustrates a method according to some embodiments of the present disclosure including Figure 5 Example pseudocode showing the syntax of the method.

[0016] Figure 7 Another example method of transform skip residual encoding that reduces the number of encoding passes to 3 according to some embodiments of the present disclosure is illustrated.

[0017] FIG. 8 illustrates a method according to some embodiments of the present disclosure including Figure 7 Example pseudocode showing the syntax of the method.

[0018] Fig. 9 An example reverse scan of an 8x8 transform skip block is illustrated according to some embodiments of the present disclosure.

[0019] Fig. 10A An 8×8 block is illustrated before flipping according to some embodiments of the present disclosure.

[0020] Fig. 10B The present invention is illustrated in some embodiments of the present invention. Fig. 10A The resulting block after the 8×8 block in is flipped.

[0021] Fig.11 An example multi-pass encoding according to some embodiments of the present disclosure is illustrated.

[0022] Fig.12 An example single-pass bypass encoding method for absolute values ​​of levels according to some embodiments of the present disclosure is illustrated.

[0023] Fig.13 An example lookup table of Rice parameters according to some embodiments of the present disclosure is illustrated.

[0024] Fig.14 An example method of transform skip residual encoding that reduces the number of encoding passes to 3 combined with single-pass bypass encoding according to some embodiments of the present disclosure is illustrated.

[0025] FIG. 15 illustrates a method including and Fig.14 Example pseudocode for the syntax of bypass encoding in combination of methods.

[0026] Fig.16 An example method of transform skip residual coding with a first pass for context coding and a second pass for Golomb-Rice coding according to some embodiments of the present disclosure is illustrated.

[0027] FIG. 17 illustrates a method according to some embodiments of the present disclosure including Fig.16 Example pseudocode for the syntax of the bypass encoding of the method in .

[0028] Fig.18 An example lookup table of Rice parameters when the minimum bypass coding value is equal to 0 according to some embodiments of the present disclosure is illustrated. DETAILED DESCRIPTION

[0029] Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings, wherein, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations set forth in the following description of the exemplary embodiments do not represent all implementations consistent with the present invention. Instead, they are merely examples of devices and methods consistent with various aspects related to the present invention as described in the attached claims. Specific aspects of the present disclosure are described in more detail below. If there is a conflict with terms and / or definitions incorporated by reference, the terms and definitions provided herein shall prevail.

[0030] Video is a collection of static images (or "frames") arranged in time sequence to store visual information. A video capture device (e.g., a camera) can be used to capture and store those images in time sequence, and a video playback device (e.g., a television, computer, smart phone, tablet computer, video player, or any end-user terminal with display capability) can be used to display such images in time sequence. In addition, in some applications, the video capture device can transmit the captured video to a video playback device (e.g., a computer with a monitor) in real time, such as for monitoring, conferencing, or live broadcasting.

[0031] In order to reduce the storage space and transmission bandwidth required for such applications, the video can be compressed. For example, the video can be compressed before storage and transmission and decompressed before display. Compression and decompression can be implemented by software or dedicated hardware executed by a processor (for example, a processor of a general-purpose computer). The module for compression is generally referred to as an "encoder", and the module for decompression is generally referred to as a "decoder". Encoders and decoders can be collectively referred to as "codecs". Encoders and decoders can be implemented as any of various suitable hardware, software or combinations thereof. For example, the hardware implementation of encoders and decoders can include circuit systems, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic or any combination thereof. The software implementation of encoders and decoders can include program code, computer executable instructions, firmware, or any suitable computer-implemented algorithm or process fixed in a computer-readable medium. Video compression and decompression can be implemented by various algorithms or standards such as MPEG-1, MPEG-2, MPEG-4, H.26x series, etc. In some applications, a codec can decompress video according to a first coding standard and recompress the decompressed video using a second coding standard, in which case the codec can be referred to as a "transcoder."

[0032] The video encoding process can identify and preserve useful information that can be used to reconstruct the image. If the information ignored in the video encoding process cannot be completely reconstructed, the encoding process can be called "lossy". Otherwise, it can be called "lossless". Most encoding processes are lossy, which is a trade-off to reduce the required storage space and transmission bandwidth.

[0033] In many cases, useful information of an image being encoded (referred to as the "current image") can include changes relative to a reference image (e.g., a previously encoded or reconstructed image). Such changes can include changes in pixel position, brightness, or color, with position changes being of greatest interest. Changes in the position of a group of pixels representing an object can reflect the motion of the object between the reference image and the current image.

[0034] In order to achieve the same subjective quality as HEVC / H.265 using half the bandwidth, JVET has been using the Joint Exploration Model ("JEM") reference software to develop technologies that go beyond HEVC. Since the coding technology is incorporated into JEM, JEM achieves substantially higher coding performance than HEVC. VCEG and MPEG have also officially started the development of the next generation video compression standard that goes beyond HEVC.

[0035] The VVC standard continues to include more coding techniques that provide better compression performance. VVC is based on the same hybrid video coding system that has been used in modern video compression standards such as HEVC, H.264 / AVC, MPEG2, H.263, etc. Figure 1 An example encoder block diagram of a hybrid video coding system is shown. Figure 1 As shown, the video encoder 200 can perform intra-frame or inter-frame coding on blocks within a video frame (including video blocks) or partitions or sub-partitions of video blocks. Intra-frame coding can rely on spatial prediction to reduce or remove spatial redundancy in video within a given video frame. Inter-frame coding can rely on temporal prediction to reduce or remove temporal redundancy in video within adjacent frames of a video sequence. Intra-frame mode can refer to many spatial-based compression modes. Inter-frame mode (such as uni-prediction or bi-prediction) can refer to many temporal-based compression modes.

[0036] refer to Figure 1, the input video signal 202 can be processed block by block. For example, the video block unit can be a 16×16 pixel block (e.g., a macroblock (MB)). Depending on the coding technology used and the accuracy and efficiency required, the size of the video block unit can vary. In HEVC, extended block sizes (e.g., coding tree units (CTUs)) can be used to compress video signals of resolutions (e.g., 1080p and higher). In HEVC, a CTU can include up to 64×64 luma samples, corresponding chroma samples, and related syntax elements. In VVC, the size of the CTU can be further increased to include 128×128 luma samples, corresponding chroma samples, and related syntax elements. The CTU can be further divided into coding units (CUs) using, for example, a quadtree, a binary tree, or a ternary tree. The CU can be further partitioned into prediction units (PUs), to which separate prediction methods can be applied. Each input video block can be processed using a spatial prediction unit 260 or a temporal prediction unit 262.

[0037] The spatial prediction unit 260 performs spatial prediction (e.g., intra prediction) on the current block / CU using information about the same image / slice containing the current block. Spatial prediction can use pixels from neighboring blocks that have already been encoded in the same video image frame / slice to predict the current video block. Spatial prediction can reduce spatial redundancy inherent in video signals.

[0038] The temporal prediction unit 262 performs temporal prediction (e.g., inter-frame prediction) on the current block using information from a different picture / slice than the picture / slice containing the current block. The temporal prediction for the video block may be signaled by one or more motion vectors. In unidirectional temporal prediction, a motion vector indicating only one reference picture is used to generate a prediction signal for the current block. On the other hand, in bidirectional temporal prediction, two motion vectors (each indicating a corresponding reference picture) can be used to generate a prediction signal for the current block. The motion vector may indicate the amount and direction of motion between the current block and one or more related blocks in the reference frame. If multiple reference pictures are supported, one or more reference picture indexes may be sent for the video block. One or more reference indexes may be used to identify which reference picture(s) in the reference picture register or decoded picture buffer (DPB) 264 the temporal prediction signal may come from.

[0039] The mode decision and encoder control unit 280 in the encoder can, for example, select a prediction mode based on rate distortion optimization. Based on the determined prediction mode, a prediction block can be obtained. The prediction block can be subtracted from the current video block at the adder 216. The prediction residual can be transformed by the transform unit 204 and quantized by the quantization unit 206. The quantized residual coefficients can be inversely quantized at the inverse quantization unit 210 and inversely transformed at the inverse transform unit 212 to form a reconstructed residual. The reconstructed residual can be added to the prediction block at the adder 226 to form a reconstructed video block. The reconstructed video block before loop filtering can be used to provide reference samples for intra-frame prediction.

[0040] The reconstructed video blocks may be loop filtered at the loop filter 266. For example, loop filtering such as a deblocking filter, sample adaptive offset (SAO), and an adaptive loop filter (ALF) may be applied. The reconstructed blocks after loop filtering may be stored in the reference picture buffer 264 and can be used to provide inter-frame prediction reference samples for encoding other video blocks. To form the output video bitstream 220, the coding mode (e.g., inter-frame or intra-frame), prediction mode information, motion information, and quantized residual coefficients may be sent to the entropy coding unit 208 to further reduce the bit rate before the data is compressed and packed to form the bitstream 220.

[0041] Figure 2 An example decoder block diagram of a hybrid video coding system is shown. Figure 2 As shown, the video bitstream 302 can be unpacked or entropy decoded at the entropy decoding unit 308. The coding mode information can be used to determine whether the spatial prediction unit 360 or the temporal prediction unit 362 will be selected. The prediction mode information can be sent to the corresponding prediction unit to generate a prediction block. For example, motion compensated prediction can be applied by the temporal prediction unit 362 to form a temporal prediction block.

[0042] The residual coefficients may be sent to the inverse quantization unit 310 and the inverse transform unit 312 to obtain a reconstructed residual. The prediction block and the reconstructed residual may be added together at 326 to form a reconstructed block before loop filtering. The reconstructed block may then be loop filtered at the loop filter 366. For example, loop filtering such as a deblocking filter, SAO, and ALF may be applied. The reconstructed block after loop filtering can then be stored in the reference image buffer 364. The reconstructed data in the reference image buffer 364 may be used to obtain a decoded video 320, or to predict future video blocks. The decoded video 320 may be displayed on a display device such as the system 100 ( Figure 1 ) on the display device 146 described in ).

[0043] In VVC (e.g., VVC 5), a block can be an M×N array of transform coefficients. A transform coefficient can be a scalar considered in the frequency domain, which is associated with a specific one-dimensional or two-dimensional frequency index in the transform. The transform coefficient level can be represented by the array TransCoeffLevel[x0][y0][cIdx][xC][yC]. The array index x0, y0 can specify the position (x0, y0) of the upper left luma sample of the transform block under consideration relative to the upper left luma sample of the image. The array index cIdx can specify an indicator of a color component. The array indexes xC and yC can specify the transform coefficient position (xC, yC) within the current transform block.

[0044] In VVC (e.g., VVC 5), the transform coefficients of a coding block are encoded using non-overlapping coefficient groups (or sub-blocks). For each sub-block, the regular (or context) coded bits and the bypass coded bits are separated in the coding order. For example, all the regular coded bits of the sub-block are transmitted first, and thereafter, the bypass coded bits are transmitted. The transform coefficient levels of the sub-block are encoded in three passes throughout the scanning position. The transform coefficient level can be the value of the transform coefficient. For context coding, each bit can have a probability model selected by the context. The context may refer to a previously coded syntax element. For bypass coding, specific bits can be selected to speed up the coding process with a negligible loss in coding efficiency. In bypass coding, bits can be encoded at a set probability (e.g., a probability equal to 0.5).

[0045] In pass 1, the significance flag (e.g., sig_coeff_flag), the greater than 1 flag (e.g., gt1_flag), the parity flag (e.g., par_level_flag), and the greater than 3 flag (e.g., gt3_flag) are encoded in order. If the significance flag is equal to 1, the greater than 1 flag is encoded first. The greater than 1 flag specifies whether the absolute level (e.g., the absolute value of the level) is greater than 1. If the greater than 1 flag is equal to 1, the parity flag and the greater than 3 flag are encoded. The parity flag specifies the parity of the absolute level minus 2. The greater than 3 flag specifies whether the absolute level is greater than 3. The position of the last rule (e.g., context) coded coefficient can be stored in the variable firstPosModel.

[0046] In pass 2(a), the encoding of the remaining absolute level (e.g., abs_remainder) is processed starting from the first scan position of the coefficient group to the firstPosModel position. Only positions where the greater than 1 flag is equal to 1 are encoded. Non-binary syntax elements are binarized with a Golomb-Rice code and the resulting bins are encoded in bypass mode of the arithmetic coding engine. For example, the value 2 can be represented using a Golomb-Rice code of "001", and each bit of "001" can be called a bin (e.g., bin 0, bin 0, and bin 1).

[0047] In pass 2(b), the encoding of the absolute level (dec_abs_level) is processed starting from the first bypass-coded position (e.g., firstPosModel-1, in reverse order) to the last scanned position of the coefficient group and is fully encoded using Golomb-Rice codes in the bypass mode of the arithmetic coding engine.

[0048] In pass 3, encoding of the sign flag (eg, sign flag) is processed for all scan positions where sig_coeff_flag is equal to 1.

[0049] For 4×4 subblocks, no more than 32 regular coded bits (e.g., sig_coeff_flag, gtl_flag, par_level_flag, and gt3_flag) can be expected to be encoded or decoded. For 2×2 chroma subblocks, the number of regular coded bits can be limited to 8. After the limit is reached, all bits are encoded in bypass mode.

[0050] In the new residual coding process adopted by JVET for transform skip residual blocks, the coefficient scanning order for transform skip residual coding is forward scanning and starts from the top left position of the transform skip block. The transform skip coefficient levels of the sub-block are encoded in six passes across the scanning positions.

[0051] In pass 1, sig_coeff_flag, coeff_sign_flag, a greater than 1 flag (e.g., abs_level_gtx_flag[0]), and par_level_flag are processed in coding order. If sig_coeff_flag is equal to 1, coeff_sign_flag and abs_level_gtx_flag[0] are encoded in order. coeff_sign_flag specifies the sign of the transform coefficient level. abs_level_gtx_ftag[0] specifies whether the absolute level is greater than 1. If abs_level_gtx_flag[0] is equal to 1, par_level_flag is additionally encoded. par_level_flag specifies the parity of the absolute level minus 2. Before encoding any flags, the context adaptive binary arithmetic coding ("CABAC") engine checks whether context coding bits are available. If context coding bits are not available, the flag is bypassed.

[0052] In pass 2, if abs_level_gtx_flag[0] is equal to 1 at a given position, the greater than 3 flag (e.g., abs_level_gtx_flag[1]) is encoded. abs_level_gtx_flag[1] specifies whether the absolute level is greater than 3. Before encoding abs_level_gtx_flag[1] for each coefficient, the CABAC engine checks whether context coding bits are available. If context coding bits are not available, abs_level_gtx_flag[1] is bypassed.

[0053] In pass 3, if abs_level_gtx_flag[1] is equal to 1 for a given position, then the greater than 5 flag (e.g., abs_level_gtx_flag[2]) is encoded. ahs_level_gtx_flag[2] specifies whether the absolute level is greater than 5. Before encoding ahs_level_gtx_flag[2] for each coefficient, the CABAC engine checks whether context coding bits are available. If context coding bits are not available, abs_level_gtx_flag[2] is bypassed.

[0054] In pass 4, if abs_level_gtx_flag[2] is equal to 1 for a given position, the greater than 7 flag (e.g., abs_level_gtx_flag[3]) is encoded. abs_level_gtx_flag[3] specifies whether the absolute level is greater than 7. Before encoding abs_level_gtx_flag[3] for each coefficient, the CABAC engine checks whether context coding bits are available. If context coding bits are not available, abs_level_gtx_flag[3] is bypassed.

[0055] In pass 5, if abs_level_gtx_flag[3] of the position is equal to 1, then the greater than 9 flag (e.g., abs_level_gtx_flag[4]) is encoded. abs_level_gtx_flag[4] specifies whether the absolute level is greater than 9. Before encoding abs_level_gtx_flag[4] for each coefficient, the CABAC engine checks whether context coding bits are available. If context coding bits are not available, abs_level_gtx_flag[4] is bypassed.

[0056] In pass 6, abs_remainder is processed for all scan positions where abs_level_gtx_flag[4] is equal to 1. Non-binary syntax elements are binarized with Golomb-Rice codes and the resulting bins are encoded in bypass mode of the arithmetic coding engine.

[0057] FIG3 illustrates an example pseudocode including syntax for transform coding. For example, the syntax shown in FIG3 can be used for transform coding in VVC. FIG4 illustrates an example pseudocode including syntax for transform skip residual coding. For example, the syntax shown in FIG4 can be used for transform skip residual coding in VVC.

[0058] There are several problems in the current design of transform skip residual coding. First, the number of encoding passes for transform skip residual coding is six. That means that in many cases, the CABAC engine needs to scan the coefficient group six times, which significantly affects the throughput of CABAC. Second, the number of encoding passes for transform skip residual coding is different from that for transform residual coding (e.g., six passes versus three passes). The difference in encoding passes may produce hardware implementation complexity. Third, the coefficient scanning for transform skip residual coding is forward scanning, while the scanning for transform residual coding is in reverse order. The difference in scanning order may also produce hardware implementation complexity. Fourth, in transform residual coding, bypass coding has only two syntax elements (e.g., abs_remainder and dec_abs_level). However, in transform skip residual coding, bypass coding can have more syntax elements such as sig_coeff_flag, coeff_sign_flag, par_level_flag, abs_level_gtx_flag[0], abs_level_gtx_flag[1], abs_level_gtx_flag[2], abs_level_gtx_flag[3], abs_level_gtx_flag[4], and abs_remainder. It is desirable to unify the bypass coding methods of transform residual coding and transform skip residual coding.

[0059] Embodiments of the present disclosure provide a new bypass coding method for a parity flag. The parity flag specifies the parity of the absolute level minus 2, which indicates whether the absolute value of the non-zero coefficient position is even or odd. The probability distribution of the parity flag in the transform skip block can be uniform. Therefore, the probability of even values ​​and odd values ​​can be equal. As a result, bypass coding of the parity flag and the signal parity flag can be applied. This bypass coding can occur before or after signaling abs_remainder. If the greater than 1 flag is equal to 1, the parity flag can be signaled. In some embodiments, since the total number of context coded bits can be limited to 2 bits per sample in the transform block, releasing the context of the parity flag can allow other syntax elements with unequal probability distributions (e.g., any of the greater than x flags encoded after the parity flag) to be context coded, which can improve coding efficiency.

[0060] In some embodiments, the parity flag is encoded as a regular context coded bin and can be signaled in the second pass of the coefficient encoding process.The parity flag can be signaled before or after the greater than 3 flag.

[0061] In VVC (e.g., VVC 5), a total of four encoding passes are used to encode the greater than 3 flag (e.g., abs_level_gtx_flag[1]), the greater than 5 flag (e.g., abs_level_gtx_flag[2]), the greater than 7 flag (abs_level_gtx_flag[3]), and the greater than 9 flag (e.g., abs_level_gtx_flag[4]). In other words, each flag is encoded in a separate encoding pass. Embodiments of the present disclosure provide a new method for encoding all flags in a single pass. As a result, only one encoding pass is required to encode all flags, which can improve the throughput of CABAC.

[0062] In some embodiments, the position of the greater than 3 flag (e.g., abs_level_gtx_lag[1]) can be moved to the first encoding pass. For example, if the greater than 1 flag (e.g., abs_level_gtx_flag[1]) is equal to 1, the greater than 3 flag can be signaled. This change can unify the encoding of the greater than 1 flag and the greater than 3 flag with the transform residual encoding case, which also encodes these two flags in the first encoding pass.

[0063] In some embodiments, the number of encoding passes for transform skip levels of a sub-block can be reduced to three. Figure 5 An example method of transform skip residual encoding that reduces the number of encoding passes to 3 according to some embodiments of the present disclosure is illustrated. Figure 5 The method in includes three passes.

[0064] In pass 1 (step 502), the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the sub-block to the last scan position of the sub-block. There may be an importance flag (e.g., sig_coeff_flag) for each coefficient. In some embodiments, the importance flag can specify whether the level of the coefficient is a non-zero value. If the importance flag for the coefficient indicates that the level is a non-zero value (e.g., the importance flag is equal to 1), a signal coefficient sign flag (e.g., coeff_sign_flag) and a greater than 1 flag (e.g., abs_level_gtx_flag[0]) can be encoded. The greater than 1 flag can specify whether the absolute value of the level is greater than 1.

[0065] In pass 2 (step 504), the coefficients of the sub-block are scanned. In some embodiments, each coefficient of the sub-block is scanned starting from the first scan position of the sub-block to the last scan position of the sub-block. If the greater than 1 flag of the coefficient indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the greater than 3 flag (e.g., abs_level_gtx_flag[1]) can be encoded. The greater than 3 flag can specify whether the absolute level is greater than 3. If the greater than 3 flag of the coefficient indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be encoded. The greater than 5 flag can specify whether the absolute level is greater than 5. If the greater than 5 flag of the coefficient indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be encoded. The greater than 7 flag can specify whether the absolute level is greater than 7. If the greater than 7 flag of the coefficient indicates that the absolute level is greater than 7 (eg, the greater than 7 flag is equal to 1), the greater than 9 flag (eg, abs_level_gtx_flag[4]) can be encoded. The greater than 9 flag can specify whether the absolute level is greater than 9.

[0066] In pass 3 (step 506), the coefficients of the sub-block are scanned. In some embodiments, each coefficient starting from the first scan position of the sub-block to the last scan position of the sub-block is scanned. If the greater than 1 flag of the coefficient indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) of the coefficient can be bypass encoded. The parity level flag can specify the parity of the absolute level minus 2. If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the remaining absolute level of the coefficient (e.g., abs_remainder) can be encoded, and non-binary syntax elements can be binarized using Golomb-Rice codes. In some embodiments, the resulting bins can be encoded in a bypass mode of the arithmetic coding engine.

[0067] FIG. 6 illustrates a method according to some embodiments of the present disclosure including Figure 5 Example pseudo code of the syntax of the method shown. Portions of the pseudo code in Figure 6 are italicized to indicate the handling of the greater than 3 flag, greater than 5 flag, greater than 7 flag, greater than 9 flag, and parity level flag.

[0068] You should understand that Figure 5 The method can be performed by an encoder (e.g., Figure 1 In some embodiments, the encoder is capable of receiving a video frame. For a decoder (e.g., Figure 2decoder), the method can include three passes.

[0069] In pass 1, the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the sub-block to the last scan position of the sub-block. There may be an importance flag (e.g., sig_coeff_flag) for each coefficient. The importance flag can be decoded. The importance flag can specify whether the level is a non-zero value. If the importance flag for the coefficient indicates that the level is a non-zero value (e.g., the importance flag is equal to 1), the signal coefficient sign flag (e.g., coeff_sign_flag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) can be decoded.

[0070] In pass 2, the coefficients of the sub-block are scanned. In some embodiments, each coefficient starting from the first scan position of the sub-block to the last scan position of the sub-block is scanned. If the greater than 1 flag of the coefficient indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) of each coefficient can be decoded. The parity level flag can specify the parity of the absolute level minus 2, and if the greater than 1 flag of the coefficient indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the greater than 3 flag (e.g., abs_level_gtx_flag[1]) can be decoded. If the greater than 3 flag of the coefficient indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be decoded. If the greater than 5 flag of the coefficient indicates that the absolute level is greater than 5 (e.g., the greater than 4 flag is equal to 1), the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be decoded. If the greater than 7 flag of the coefficient indicates that the absolute level is greater than 7 (eg, the greater than 7 flag is equal to 1), the greater than 9 flag (eg, abs_level_gtx_flag[4]) can be decoded.

[0071] In pass 3, the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the sub-block to the last scan position of the sub-block. If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the remaining absolute level of the coefficient (e.g., abs_remainder) can be decoded.

[0072] In some embodiments, a decoder is capable of receiving a video bitstream.

[0073] Figure 7 Another example method of transform skip residual encoding that reduces the number of encoding passes to 3 according to some embodiments of the present disclosure is illustrated. Figure 7 The method can include three passes.

[0074] In pass 1 (step 702), the coefficients of the sub-block are scanned. In some embodiments, each coefficient starting from the first scan position of the sub-block to the last scan position of the sub-block is scanned. There may be a significance flag (e.g., sig_coeff_flag) for each coefficient. The significance flag can indicate whether the level is a non-zero value. If the significance flag for the coefficient indicates that the level is a non-zero value (e.g., the significance flag is equal to 1), a signal coefficient sign flag (e.g., coeff_sign_flag) and a greater than 1 flag (e.g., abs_level_gtx_flag[0]) can be encoded. The greater than 1 flag can specify whether the absolute value of the level is greater than 1. If the greater than 1 flag of the coefficient indicates that the absolute value of the level is greater than 1 (e.g., the greater than 1 flag is equal to 1), a greater than 3 flag (e.g., abs_level_gtx_flag[1]) can be encoded. The greater than 3 flag can specify whether the absolute level is greater than 3.

[0075] In pass 2 (step 704), the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the sub-block to the last scan position of the sub-block. If the greater than 3 flag of the coefficient indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be encoded. The greater than 5 flag can specify whether the absolute level is greater than 5. If the greater than 5 flag of the coefficient indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be encoded. The greater than 7 flag can specify whether the absolute level is greater than 7. If the greater than 7 flag of the coefficient indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), the greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be encoded. The greater than 9 flag can specify whether the absolute level is greater than 9.

[0076] In pass 3 (step 706), the coefficients of the sub-block are scanned. In some embodiments, each coefficient starting from the first scan position of the sub-block to the last scan position of the sub-block is scanned. If the greater than 1 flag of the coefficient indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) of the coefficient can be bypass encoded. The parity level flag can specify the parity of the absolute level minus 2. If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the remaining absolute level of the coefficient (e.g., abs_remainder) can be processed, and non-binary syntax elements can be binarized with Golomb-Rice codes. The resulting bins can be encoded in bypass mode of the arithmetic coding engine.

[0077] and Figure 5 Compared with the method in Figure 7 The method in handles the encoding of the greater than 3 flag in pass 1 instead of pass 2. FIG. 8 illustrates a method including Figure 7 Example pseudo code of the syntax of the method shown. Portions of the pseudo code in Figure 8 are italicized to indicate the handling of the greater than 3 flag, greater than 5 flag, greater than 7 flag, greater than 9 flag, and parity level flag.

[0078] You should understand that Figure 7 The method in can be implemented by an encoder (e.g., Figure 1 In some embodiments, the encoder is capable of receiving a video frame. For a decoder (e.g., Figure 2 decoder), the method can include three passes.

[0079] In pass 1, the coefficients of the sub-block are scanned. In some embodiments, each coefficient starting from the first scan position of the sub-block to the last scan position of the sub-block is scanned. There may be an importance flag (e.g., sig_coeff_flag) for each coefficient. The importance flag is decoded. The importance flag can indicate whether the level is a non-zero value. If the importance flag for the coefficient indicates that the level is a non-zero value (e.g., the importance flag is equal to 1), the signal coefficient sign flag (e.g., coeff_sign_flag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) can be decoded. If the greater than 1 flag of the coefficient indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the greater than 3 flag (e.g., abs_level_gtx_flag[l]) can be decoded.

[0080] In pass 2, the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the sub-block to the last scan position of the sub-block. If the greater than 1 flag of the coefficient indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) of each coefficient can be decoded. If the greater than 3 flag of the coefficient indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be decoded. If the greater than 5 flag of the coefficient indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be decoded. If the greater than 7 flag of the coefficient indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), the greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be decoded. The greater than 9 flag can specify whether the absolute level is greater than 9.

[0081] In pass 3, the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the sub-block to the last scan position of the sub-block. If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the remaining absolute level of the coefficient (e.g., abs_remainder) can be decoded.

[0082] In some embodiments, a decoder is capable of receiving a video bitstream.

[0083] In some embodiments, the scanning order of the transform skip residual block can be changed to unify the scanning order of the transform residual encoding process and the transform skip residual encoding process. For example, the scanning order of the transform skip residual block can be changed from forward scanning to reverse scanning. Fig. 9 An example reverse scan of an 8×8 transform skip block is illustrated according to some embodiments of the present disclosure. Fig. 9 As shown, the scanning of coefficients starts from the coefficient located at the lower right corner and ends at the coefficient located at the upper left corner. It should be appreciated that it is possible to Figure 5 and Figure 7 The method shown is applied Fig. 9 Scanning order shown.

[0084] In some embodiments, the reverse scan can be performed after the transform block is flipped. Fig. 10A and Fig. 10B An example flipping of an 8×8 block according to some embodiments of the present disclosure is illustrated. Fig. 10A and Fig. 10BAs shown, after flipping the block, the position of the upper left residual coefficient is moved to the lower right position. After the block is flipped, it is possible to perform a reverse scan (e.g., Fig. 9 reverse scan).

[0085] In some embodiments, bypass encoding can be performed in multiple passes. Fig.11 An example multi-pass encoding according to some embodiments of the present disclosure is illustrated. In some embodiments, it is possible to perform in a VVC (e.g., VVC 5) Fig.11 The multi-pass encoding shown. It can be assumed that Fig.11 The number of context coded bits in has reached the maximum limit at the first pass position (at Fig.11 As shown in black dots). Fig.11 As shown, it is possible to bypass encode flags (e.g., greater than 3 flags, greater than 5 flags, greater than 7 flags, greater than 9 flags, etc.) in multiple encoding passes.

[0086] In some embodiments, a single pass bypass encoding of the absolute value of the level can be implemented. Fig.12 An example single-pass bypass encoding method for absolute values ​​of levels according to some embodiments of the present disclosure is illustrated. Fig.12 As shown, once the context coding bins reach the maximum limit (e.g., Fig.12 ), the CABAC engine is able to start bypass encoding the remainder of the absolute level using Golomb-Rice coding.

[0087] Fig.13 An example lookup table for Rice parameters according to some embodiments of the present disclosure is illustrated. Fig.13 , the Rice parameter can be represented by the variable cRiceParam. And the absolute position can be represented by the variable locSumAbs.

[0088] In some embodiments, the Rice parameter (e.g., cRiceParam) can be derived in the following manner. Given the array AbsLevel[x][y] of the transform skip block, the upper left luma position (x0, y0), and the current coefficient scan position (xC, yC), assuming that minLevel is the minimum bypass coded value, if none of the flags of the coefficient are context coded, then the minLevel of the coefficient is 0. If all flags are context coded, then minLevel is equal to 10.

[0089] In some embodiments, the variable locSumAbs can be derived as specified by the following pseudo code:

[0090] In some embodiments, single-pass bypass encoding can be used with Figure 7The method combinations shown. For example, Fig.14 An example method of transform skip residual encoding that reduces the number of encoding passes to 3 combined with single-pass bypass encoding according to some embodiments of the present disclosure is illustrated. Fig.14 The method in includes 3 passes.

[0091] In pass 1 (step 1402), the coefficients of the sub-block are scanned. In some embodiments, each coefficient starting from the first scan position of the sub-block to the last scan position is scanned. For each coefficient, if the remaining number of context coding bits is greater than or equal to the group limit, the following can be performed. For example, in some embodiments, it is more efficient to encode all flags in the group using context coding or bypass coding. As a result, if the number of context coding bits is less than the group limit, it is more efficient to encode all remaining flags using bypass coding instead of using context coding to encode some of the remaining flags and using bypass coding to encode other flags. In this example, there may be 4 flags (e.g., significance flags, signal coefficient sign flags, greater than 1 flags, and greater than 3 flags) encoded in the group in pass 1. Therefore, given a group limit of 4, if the remaining number of context coding bits is greater than or equal to 4, the following can be performed for each coefficient. If the significance flag (sig_coeff_flag) indicates that the level is non-zero (e.g., the significance flag is equal to 1), the signal coefficient sign flag (e.g., coeff_sign_fiag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) can be encoded. If the greater than 1 flag indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the greater than 3 flag (e.g., abs_level_gtx_flag[1]) can be encoded. In some embodiments, the coefficients can be scanned until the context coding bins reach the maximum limit (e.g., Fig.12 The scanning stops at the position which is the last position of the first pass.

[0092] After Pass 1 ends and before Pass 2 begins, a first pass bypass position variable (e.g., iFirstPassBypassPos) can be set based on the last position of the previous pass (step 1404). In some embodiments, the first pass bypass position variable can be set to the last position of the previous pass plus 1.

[0093] In pass 2 (step 1406), coefficients from the first scan position of the sub-block to iFirstPassBypassPos can be scanned. For each coefficient, if the remaining number of context coding bins is greater than or equal to the group limit, the following can be performed. For example, the group limit can be 3 (e.g., a greater than 5 flag, a greater than 7 flag, and a greater than 9 flag). If the greater than 3 flag indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be encoded. If the greater than 5 flag indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be encoded. If the greater than 7 flag indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), the greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be encoded.

[0094] After Pass 2 ends and before Pass 3 begins, a second pass bypass position variable (e.g., iSecondPassBypassPos) is set based on the last position of the previous pass (step 1408). In some embodiments, the second pass bypass position variable can be set to the last position of the previous pass plus 1.

[0095] In pass 3(a) (step 1410), coefficients from a first scan position of a subblock to iFirstPassBypassPos can be scanned. The following can be performed for each coefficient. If the greater than 1 flag indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) can be bypass encoded. If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the encoding of the remaining absolute level (e.g., abs_remainder) can be processed by a non-binary syntax element binarized with a Golomb-Rice code. The resulting bins can be encoded in a bypass mode of the arithmetic coding engine.

[0096] In pass 3(b) (step 1412), coefficients starting from iFirstPassBypassPos to the last scan position can be scanned. For each coefficient, the encoding of the absolute level (e.g., dec_abs_level) can be processed by binarizing non-binary syntax elements with Golomb-Rice codes. The resulting binary bits can be encoded in bypass mode of the arithmetic coding engine. The signal coefficient sign flag can also be encoded.

[0097] In some embodiments, in pass 3(b), coefficients starting from iFirstPassBypassPos to the last scan position can be scanned, and for each coefficient, the encoding of the absolute level (e.g., dec_abs_level) can be processed in two steps. First, it is signaled whether dec_abs_level is zero. If dec_abs_level is non-zero, the non-binary syntax elements binarized with the Golomb-Rice code and the resulting binary bits can be encoded in the bypass mode of the arithmetic coding engine. The signal coefficient sign flag can also be encoded.

[0098] FIG. 15 illustrates a method including and Fig.14 Some parts of the pseudo code in FIG15 are in italics, indicating the processing of the greater than 3 flag, the greater than 5 flag, the greater than 7 flag, the greater than 9 flag and the parity level flag.

[0099] In some embodiments, a two-pass encoding method can be used. For example, all flags can be context encoded in pass 1, and Golomb-Rice encoding can be used to bypass encoding in pass 2. Fig.16 An example method of transform skip residual encoding with a first pass for context encoding and a second pass for Golomb-Rice encoding according to some embodiments of the present disclosure is illustrated. Fig.16 The method in consists of 2 passes.

[0100] In pass 1 (step 1602), the coefficients of the sub-block are scanned. In some embodiments, each coefficient starting from the first scan position to the last scan position of the sub-block is scanned. For each coefficient, if the remaining number of context coding bins is equal to or greater than 8, the following can be performed. The significance flag (e.g., sig_coeff_flag) can be context encoded. If the significance flag indicates that the level is non-zero (e.g., the significance flag is equal to 1), the coefficient sign flag (e.g., coeff_sign_flag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) can be signaled. If the greater than 1 flag indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) and the greater than 3 flag (e.g., abs_level_gtx_flag[l]) can be encoded. The parity level flag can specify the parity of the absolute level minus 2. The greater than 3 flag can specify whether the absolute level is greater than 3. If the greater than 3 flag indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be encoded. If the greater than 5 flag indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be encoded. If the greater than 7 flag indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), the greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be encoded. The greater than 9 flag can specify whether the absolute level of the level is greater than 9. In some embodiments, the coefficients can be scanned until the context coding bins reach a maximum limit (e.g., Fig.12 The scanning stops at the position which is the last position of the first pass. [001011 After Pass 1 ends and before Pass 2 begins, a first pass bypass position variable (iFirstPassBypassPos) can be set based on the last position of the previous pass (step 1604). In some embodiments, the first pass bypass position variable can be set to the last position of the previous pass plus 1. The first pass bypass position variable can represent the starting position from which the absolute level (e.g., dec_abs_level) syntax is signaled. Coefficients whose scan positions are less than the first pass bypass position can be partially signaled by context encoding in Pass 1 and the remaining coefficients can be signaled in Pass 2(a). In some embodiments, if the scan position of a coefficient is greater than or equal to the first pass bypass position variable, then the sign of the coefficient is not context encoded, and the bypass encoding of Pass 2(b) can be used to signal the complete coefficient and sign.

[0102] In pass 2(a) (step 1606), coefficients can be scanned from a first scan position of the sub-block to a position where the first pass bypass position variable minus 1. The following can be performed for each coefficient. If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the remaining absolute level (e.g., abs_remainder) can be binarized using a Golomb-Rice code, and the resulting bins can be encoded in a bypass mode of the arithmetic coding engine.

[0103] In pass 2(b) (step 1608), coefficients from the first pass bypass position to the last scan position can be scanned. The following can be performed for each coefficient. The absolute level (e.g., dec_abs_level) can be binarized using a Golomb-Rice code, and the resulting bins can be encoded in a bypass mode of the arithmetic coding engine. If the absolute level is not equal to 0, the coefficient sign flag (e.g., coeff_sign_flag) can be bypass encoded.

[0104] You should understand that Fig.16 The method can be performed by an encoder (e.g., Figure 1 In some embodiments, the encoder can receive a video frame. It should be appreciated that a decoder (e.g., Figure 2 17 ) to decode the encoded video frame from the method of Figure 17. In some embodiments, the decoding method can include 2 passes.

[0105] In pass 1, the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position to the last scan position of the sub-block. For each coefficient, if the remaining number of context coding bins is equal to or greater than the group limit, the following can be performed. For example, the group limit can be 8, indicating the number of different flags to be encoded in pass 1 (e.g., significance flag, coefficient sign flag, greater than 1 flag, parity level flag, greater than 3 flag, greater than 5 flag, greater than 7 flag, and greater than 9 flag). The significance flag (e.g., sig_coeff_flag) can be context decoded. If the significance flag indicates that the level is non-zero (e.g., the significance flag is equal to 1), the coefficient sign flag (e.g., coeff_sign_flag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) can be signaled. If the greater than 1 flag indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) and the greater than 3 flag (e.g., abs_level_gtx_flag[1]) can be decoded. The parity level flag can specify the parity of the absolute level minus 2. The greater than 3 flag can specify whether the absolute level is greater than 3. If the greater than 3 flag indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be decoded. If the greater than 5 flag indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be decoded. If the greater than 7 flag indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), the greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be decoded. The greater than 9 flag can specify whether the absolute level of the level is greater than 9. In some embodiments, coefficients can be scanned until the context coding bins reach a maximum limit (e.g., Fig.12 The scanning stops at the position which is the last position of the first pass.

[0106] After Pass 1 ends and before Pass 2 begins, a first pass bypass position variable (IFirstPassBypassPos) can be set based on the last position of the previous pass. In some embodiments, the first pass bypass position variable can be set to the last position of the previous pass plus 1. The first pass bypass position variable can represent the starting position from which the absolute level (e.g., dec_abs_level) syntax is signaled. Coefficients whose scan positions are less than the first pass bypass position can be partially signaled by context encoding in Pass 1 and the remaining coefficients can be signaled in Pass 2(a). In some embodiments, if the scan position of a coefficient is greater than or equal to the first pass bypass position variable, then the sign of the coefficient is not context decoded, and bypass decoding of Pass 2(b) can be used to signal the complete coefficient and sign.

[0107] In pass 2(a), coefficients can be scanned from a first scan position of the subblock to a position where the first pass bypass position variable minus 1. The following can be performed for each coefficient. If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the binarized residual absolute level (e.g., abs_remainder) can be decoded using a Golomb-Rice code, and the resulting bins can be decoded in a bypass mode of the arithmetic coding engine.

[0108] In pass 2(b), coefficients from the first pass bypass position to the last scan position can be scanned. The following can be performed for each coefficient. The binarized absolute level (e.g., dec_abs_level) can be decoded with a Golomb-Rice code, and the resulting bins can be decoded in bypass mode of the arithmetic coding engine. If the absolute level is not equal to 0, the coefficient sign flag (e.g., coeff_sign_flag) can be bypass decoded.

[0109] FIG. 17 illustrates a method according to some embodiments of the present disclosure including Fig.16 Example pseudo code of the syntax of bypass encoding of the method in FIG. Some parts of the pseudo code in FIG. 17 are in italics, indicating the first pass bypass position and the processing of pass 2(b).

[0110] In some embodiments, as shown in FIG. 17 , pass 1 is performed only when the remaining number of context coding bins is greater than or equal to 8 (e.g., as shown in FIG. 17 , “MaxCcbs>=8”). This means that up to 7 context coding bits in the context coding bin budget may be “wasted”, which may impair encoding performance. Therefore, in some embodiments, the number of abs_level_gtx_flag[] flags may be adjusted in the disclosed two-pass encoding method. For example, instead of encoding the greater than 9 flag (e.g., abs_level_gtx_flag[4]), only the greater than 7 flags (e.g., abs_level_gtx_flag[3]) are encoded. Therefore, pass 1 can be performed only when the remaining number of context coding bins is equal to or greater than 7. In some embodiments, only the greater than 5 flags (abs_level_gtx_flag[2]) can be encoded. Therefore, pass 1 is performed only when the remaining number of context coding bins is equal to or greater than 6. It should be appreciated that the number of abs_level_gtx_flag[] flags can be adjusted to any number. Adjusting the number of abs_level_gtx_flag[] flags can allow more locations to be encoded in the first encoding pass, thereby providing better encoding efficiency.

[0111] In some embodiments, the Rice parameter cRiceParam can be derived in the following manner. Given the array TransCoeffLevel[xC][yC] as the coefficient value at the scan position (xC, yC) and given minLevel as the minimum bypass coding value, if none of the flags of the coefficient are context coded, then the minLevel of the coefficient is 0. If all flags are context coded, then minLevel is equal to 10. The variable locSumAbs can be derived as specified by the following pseudo code:

[0112] Fig.18 An example lookup table of Rice parameters when the minimum bypass coding value is equal to 0 according to some embodiments of the present disclosure is illustrated. Fig.18 As shown, the Rice parameter can be represented by the variable cRiceParam. And the absolute position can be represented by the variable locSumAbs.

[0113] In some embodiments, two separate lookup tables can be used for Rice parameter derivation based on minLevel. If minLevel is equal to 0, then Fig.18 If minLevel is not equal to 0, you can use Fig.13 Table shown.

[0114] In some embodiments, the derivation of Rice parameters does not require any lookup table. For example, cRiceParam can be derived as follows; cRiceParam=(locSumAbs+offset)>>3

[0115] In the above equation, the offset may be a predefined constant and can be determined by offline training. An example of an offset value is 4.

[0116] In some embodiments, the offset value depends on the color component. For example, the offset value may be 4 for luma and 0 for chroma.

[0117] In some embodiments, the offset value depends on the frame type. For example, the offset value may be 4 for an intra frame and 0 for an inter frame.

[0118] In some embodiments, in VVC (e.g., VVC 7), transform skip mode is allowed for both luma and chroma components, and the two types of components can share the same context variables. The context variables can be variables specified for the adaptive binary arithmetic decoding process of the binary bits by equations containing the most recently decoded binary bits. However, the signal statistics of the luma block and the chroma block can be different. As a result, in some embodiments of the present disclosure, different context variables can be used for the luma component and the chroma component. The syntax elements affected by the proposed context model extension can include an importance coefficient flag (e.g., sig_coeff_flag), abs_level_gtx_flag[n][j] (e.g., j=0 to 4), a parity flag (e.g., par_level_flag), a signal coefficient sign flag (e.g., coeff_sign_flag), and a coded_sub_block_flag (e.g., coded_sub_block_fiag shown in FIG. 3).

[0119] In VVC (e.g., VVC 7), 3 context variables can be used to encode the sig_coeff_flag of the transform skip mode. In some embodiments, a total of 6 context variables (e.g., 3 for luma and 3 for chroma) can be used to encode the sig_coeff_flag of the transform skip mode. The context index used to encode the sig_coeff_flag of the transform skip mode can be derived according to the number of important coefficients of the neighbors (e.g., the upper neighbors and the left neighbors). In some embodiments, the context index may refer to an identifier of a context variable. For example, if 6 context variables are available, the context index of the first context variable may be 0, the context index of the second context variable may be 1, and so on. The inputs to this process may be the color component index cldx, the luma position (x0, y0), and the current coefficient scan position (xC, yC). The luma position (x0, y0) can specify a specific sample (e.g., the upper left sample) of the current transform block relative to a specific sample (e.g., the upper left sample) of the current image. The output of this process may be a coded index variable ctxInc. In some embodiments, the variable ctxInc can be derived according to the following pseudo code:

[0120] In VVC (e.g., VVC 7), 4 context variables can be used to encode abs_level_gtx_fiag[n][0] for transform skip mode. In some embodiments, a total of 8 context variables (4 for luma and 4 for chroma) can be used to encode abs_level_gtx_flag[n][0] for transform skip mode. The context index for encoding abs_level_gtx_flag[n][0] for transform skip can be derived based on the number of important coefficients of the neighbors (e.g., the upper and left neighbors). The input to this process can be the color component index cIdx, the luma position (x0, y0), and the current coefficient scan position (xC, yC). The luma position (x0, y0) can specify a specific sample (e.g., the upper left sample) of the current transform block relative to a specific sample (e.g., the upper left sample) of the current image. The output of this process can be the encoding index variable ctxInc. In some embodiments, the variable ctxInc can be derived according to the following pseudo code:

[1211] In VVC (e.g., VVC 7), 1 context variable can be used to encode the par_level_flag of the transform skip mode. In some embodiments, a total of 2 context variables (1 for luma and 1 for chroma) can be used to encode the par_level_flag of the transform skip mode. The context index used to encode the par_level_flag of the transform skip can be derived in the following manner. The input of this process can be the color component index cIdx. The output of this process is the coded index variable ctxInc. In some embodiments, the variable ctxInc can be derived according to the following pseudo code:

[0122] In some embodiments, the abs_level_gtx_flag for transform skip mode can be encoded using separate context variables for luma and chroma. The context index for encoding the abs_level_gtx_flag for transform skip can be derived in the following manner. The input to this process can be the color component index cIdx. The output of this process can be the encoding index variable ctxInc. In some embodiments, the variable ctxInc can be derived in the following manner: the context index of the syntax element abs_level_gtx_flag[n][j] where j>0 is derived as ctxInc=j-1; and for the chroma component (e.g., cIdx is greater than 0), the context index is incremented as ctxInc=ctxInc+4.

[0123] In VVC (e.g., VVC 7), 6 context variables can be used to encode the coeff_sign_flag of the transform skip mode. In some embodiments, a total of 12 context variables (6 for luma and 6 for chroma) can be used to encode the coeff_sign_ftag of the transform skip mode. The context index for encoding the coeff_sign_flag of the transform skip mode can be derived from the coeff_sign_flag of the neighbors (e.g., the upper and left neighbors). The input of this process can be the color component index cIdx, the luma position (x0, y0), and the current coefficient scan position (xC, yC). The luma position (x0, y0) can specify a specific sample (e.g., the upper left sample) of the current transform block relative to a specific sample (e.g., the upper left sample) of the current image. The output of this process can be the encoding index variable ctxInc. In some embodiments, the variables leftSign and aboveSign can be derived according to the following pseudo code:

[0124] In some embodiments, the variable ctxInc can be derived according to the following pseudo code:

[0125] In VVC (e.g., VVC 7), 3 context variables can be used to encode the coded_sub_block_flag of the transform skip mode. The coded_sub_block_flag can be a sub-block flag that specifies whether the transform coefficient level in the sub-block is equal to 0. For example, if coded_sub_block_fiag[xS][yS] is equal to 0, the transform coefficient level of the sub-block at position (xS, yS) is inferred to be equal to 0. If coded_sub_block_flag[xS][yS] is equal to 1, at least one of the transform coefficient levels of the sub-block at position (xS, yS) has a non-zero value. In some embodiments, a total of 6 context variables (3 for luma and 3 for chroma) can be used to encode the coded_sub_block_flag of the transform skip mode. The context index used to encode the coded_sub_block_flag of the transform skip mode can be derived from the coded_sub_block_flag of the upper neighbor and the left neighbor. The inputs to this process may be the color component index cIdx, the luma position (x0, y0), the current sub-block scan position (xS, yS), the previously decoded binary bits of the syntax element coded_sub_block_flag, the binary logarithm of the transform block width log2TbWidth and the transform block height log2TbHeight. The luma position (x0, y0) can specify the top left sample of the current transform block relative to the top left sample of the current image. The output of this process may be the coding index variable ctxInc. In some embodiments, the variables log2SbWidth and log2SbHeight can be derived according to the following pseudo code:

[0126] In some embodiments, the variables log2SbWidth and log2SbHeight can be modified according to the following pseudo code:

[0127] In some embodiments, the variable csbfCtx can be initialized to 0 and modified according to the following pseudo code:

[0128] In some embodiments, the context index variable ctxInc can be derived using the color component index cIdx and csbfCtx according to the following pseudo code:

[0129] In some embodiments, a non-transitory computer-readable storage medium including instructions is also provided, and these instructions can be executed by a device (such as the disclosed encoder and decoder) for performing the above method. Common forms of non-transitory media include, for example, floppy disks, flexible disks, hard disks, solid-state drives, tapes or any other magnetic data storage media, CD-ROMs, any other optical data storage media, any physical media with hole patterns, RAM, PROM and EPROM, FLASH-EPROM or any other flash memory, NVRAM, cache, registers, any other memory chip or box, and networked versions thereof. The device may include one or more processors (CPU), input / output interfaces, network interfaces, and / or memories.

[0130] It should be noted that relational terms such as "first", "second" herein are used only to distinguish one entity or operation from another entity or operation, without requiring or implying any actual relationship or order between these entities or operations. In addition, the words "include", "have", "include", and "including" and other similar forms are intended to be equivalent in meaning and open-ended, in that the one or more items immediately following any of these words are not intended to be an exhaustive list of one or more such items, or to be limited to only the one or more items listed.

[0131] As used herein, unless specifically stated otherwise, the term "or" includes all possible combinations unless not feasible. For example, if it is stated that a database may include A or B, then unless specifically stated otherwise or not feasible, the database may include A, or B, or A and B. As a second example, if it is stated that a database may include A, B, or C, then unless specifically stated otherwise or not feasible, the database may include A, or B, or C, or A and B, or A and C, or B and C, or A and B and C.

[0132] It should be appreciated that the above embodiments can be implemented by hardware, or software (program code), or a combination of hardware and software. If implemented by software, it can be stored in the above-mentioned computer-readable medium. The software can perform the disclosed method when executed by a processor. The computing unit and other functional units described in the present disclosure can be implemented by hardware, or software, or a combination of hardware and software. Those of ordinary skill in the art will also understand that multiple modules / units in the above-mentioned modules / units can be combined into one module / unit, and each module / unit in the above-mentioned modules / units can be further divided into multiple sub-modules / sub-units.

[0133] In the foregoing description, embodiments have been described with reference to many specific details that may vary from implementation to implementation. Certain adaptations and modifications can be made to the described embodiments. Other embodiments may be apparent to those skilled in the art from consideration of the description and practice of the invention disclosed herein. This description and examples are intended to be considered as merely exemplary, while the true scope and spirit of the invention are indicated by the following claims. The order of the steps shown in the figures is also intended to be for illustrative purposes only and is not intended to be limited to any particular order of steps. Therefore, those skilled in the art will appreciate that these steps can be performed in different orders while implementing the same method.

[0134] The following terms may be used to further describe the embodiments: 1. A coding method implemented by an encoder of video data, the method comprising: Performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of the scanning comprises: A parity level flag of the transform coefficient is bypass-encoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient. 2. The encoding method according to clause 1, further comprising: Prior to the first pass of scanning, performing a second pass of scanning the transform coefficients, wherein the second pass of scanning comprises: encoding a greater than 1 flag, wherein the greater than 1 flag indicates whether the absolute value is greater than 1; The first pass of the scanning further comprises: The parity level flag is bypass encoded in response to the greater than one flag indicating that the absolute value is greater than one. 3. A method of encoding according to clause 2, wherein the sub-block has a plurality of transform coefficients, and performing a second pass of the scan further comprises: Scanning the plurality of transform coefficients until the number of context coding bins reaches a maximum limit; and In response to the number of context coding bins reaching the maximum limit, bypass encoding the absolute values ​​of the levels of the transform coefficients not scanned in the second pass, wherein the bypass encoding includes binarizing the absolute values ​​of the not scanned transform coefficients using Golomb-Rice coding. 4. A method of encoding according to clause 2 or 3, wherein the second pass of the scanning further comprises: encoding an importance flag of the transform coefficient, the importance flag indicating whether the level of the transform coefficient is zero; and A greater than one flag is encoded in response to the significance flag indicating that the level of the transform coefficient is not zero. 5. A method of encoding according to any of clauses 2-4, wherein the second pass of the scan further comprises: In response to the greater-than-1 flag indicating that the absolute value is greater than 1, a greater-than-3 flag of the transform coefficient is encoded, the greater-than-3 flag indicating whether the absolute value is greater than 3. 6. The encoding method according to clause 5, further comprising: After the second pass of the scanning and before the first pass of the scanning, performing a third pass of scanning the transform coefficients, wherein the third pass of the scanning comprises: In response to the greater than 3 flag indicating that the absolute value is greater than 3, encoding a greater than 5 flag of the transform coefficient, the greater than 5 flag indicating whether the absolute value is greater than 5; In response to the greater than 5 flag indicating that the absolute value is greater than 5, encoding a greater than 7 flag of the transform coefficient, the greater than 7 flag indicating whether the absolute value is greater than 7; and In response to the greater-than-7 flag indicating that the absolute value is greater than 7, a greater-than-9 flag of the transform coefficient is encoded, the greater-than-9 flag indicating whether the absolute value is greater than 9. 7. The encoding method of clause 6, wherein the first pass of the scanning further comprises: In response to the greater than 9 flag indicating that the absolute value is greater than 9, a remaining absolute level flag for the transform coefficient is encoded, the remaining absolute level flag indicating a remaining absolute value of the level of the transform coefficient. 8. The encoding method according to clause 2, further comprising: After the second pass of the scanning and before the first pass of the scanning, performing a third pass of scanning the transform coefficients, wherein the third pass of the scanning further comprises: In response to the greater-than-1 flag indicating that the absolute value is greater than 1, a greater-than-3 flag of the transform coefficient is encoded, the greater-than-3 flag indicating whether the absolute value is greater than 3. 9. The encoding method of clause 8, wherein the third pass of the scan further comprises: In response to the greater than 3 flag indicating that the absolute value is greater than 3, encoding a greater than 5 flag of the transform coefficient, the greater than 5 flag indicating whether the absolute value is greater than 5; In response to the greater than 5 flag indicating that the absolute value is greater than 5, encoding a greater than 7 flag of the transform coefficient, the greater than 7 flag indicating whether the absolute value is greater than 7; and In response to the greater-than-7 flag indicating that the absolute value is greater than 7, a greater-than-9 flag of the transform coefficient is encoded, the greater-than-9 flag indicating whether the absolute value is greater than 9. 10. The encoding method of clause 9, wherein the first pass of the scanning further comprises: In response to the greater than 9 flag indicating that the absolute value is greater than 9, a remaining absolute level flag for the transform coefficient is encoded, the remaining absolute level flag indicating a remaining absolute value of the level of the transform coefficient. 11. A method of encoding according to any of clauses 1-10, wherein the sub-block has a plurality of transform coefficients, and the first pass of the scanning is performed by scanning the plurality of transform coefficients in reverse order. 12. The encoding method according to clause 11, further comprising: The plurality of transform coefficients are flipped prior to performing a first pass of the scan. 13. The encoding method according to any of clauses 1-12, wherein the encoding method is a transform skip residual encoding method. 14. The encoding method according to any one of clauses 1 to 13, further comprising: receiving the video frame; and The video frame is divided into a plurality of sub-blocks. 15. A decoding method implemented by a decoder of video data, the method comprising: Performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of the scanning comprises: A parity level flag of the transform coefficient is bypass-decoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient. 16. The decoding method according to clause 15, further comprising: Prior to the first pass of scanning, performing a second pass of scanning the transform coefficients, wherein the second pass of scanning comprises: Decoding a greater than 1 flag, wherein the greater than 1 flag indicates whether the absolute value is greater than 1; The first pass of the scanning further comprises: The parity level flag is bypass-decoded in the first pass in response to the greater-than-one flag indicating that the absolute value is greater than one. 17. The decoding method of clause 16, wherein the second pass of the scanning further comprises: decoding a significance flag of the transform coefficient, the significance flag indicating whether a level of the transform coefficient is zero; and The greater than one flag is decoded in response to the significance flag indicating that the level of the transform coefficient is not zero. 18. The decoding method of clause 16, wherein the first pass of the scanning further comprises: In response to the greater than 1 flag indicating that the absolute value is greater than 1, decoding a greater than 3 flag of the transform coefficient, the greater than 3 flag indicating whether the absolute value is greater than 3; In response to the greater than 3 flag indicating that the absolute value is greater than 3, decoding a greater than 5 flag of the transform coefficient, the greater than 5 flag indicating whether the absolute value is greater than 5; In response to the greater than 5 flag indicating that the absolute value is greater than 5, decoding a greater than 7 flag of the transform coefficient, the greater than 7 flag indicating whether the absolute value is greater than 7; and In response to the greater-than-7 flag indicating that the absolute value is greater than 7, a greater-than-9 flag of the transform coefficient is decoded, the greater-than-9 flag indicating whether the absolute value is greater than 9. 19. The decoding method according to clause 18, further comprising: performing a third pass of scanning the transform coefficients, wherein the third pass of scanning comprises: In response to the greater than 9 flag indicating that the absolute value is greater than 9, a remaining absolute level flag for the transform coefficient is decoded, the remaining absolute level flag indicating a remaining absolute value of the level of the transform coefficient. 20. A decoding method according to clause 15, wherein the sub-block has a plurality of transform coefficients, and a first pass of the scanning is performed by scanning the plurality of transform coefficients from a lower right corner of the sub-block to an upper left corner of the sub-block. 21. The decoding method according to clause 20, further comprising: The plurality of transform coefficients are flipped prior to performing a first pass of the scan. 22. The decoding method according to any of clauses 15-21, wherein the decoding method is a transform skip residual decoding method. 23. A system for encoding video data, the system comprising: a memory storing a set of instructions; and a processor configured to execute the set of instructions so that the system: Performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of the scanning comprises: A parity level flag of the transform coefficient is bypass-encoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient. 24. A system for decoding video data, the system comprising: a memory storing a set of instructions; and a processor configured to execute the set of instructions so that the system: Performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of the scanning comprises: A parity level flag of the transform coefficient is decoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient. 25. A coding method implemented by an encoder of video data, the method comprising: A first pass of scanning the transform coefficients of a sub-block of a video frame is performed, where: When the number of context coded bits reaches the maximum limit, the first scan is stopped. scanning a first set of transform coefficients of the sub-block in the first pass, and The first pass of the scanning comprises, for each transform coefficient in the first set of transform coefficients, encoding an importance flag indicating whether the level of the transform coefficient is zero; and performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises: An absolute value of a level of each transform coefficient in a second set of transform coefficients is binarized, wherein the second set of transform coefficients is not scanned in the first pass. 26. The encoding method of clause 25, wherein the first pass of the scanning further comprises: In response to an importance flag of a first transform coefficient indicating that the level of the first transform coefficient is not zero, a greater than 1 flag of the first transform coefficient is encoded, the first transform coefficient is one of the first group of transform coefficients, and the greater than 1 flag indicates whether the absolute value of the level of the first transform coefficient is greater than 1. 27. The encoding method of clause 26, wherein the first pass of the scanning further comprises: encoding a greater than 3 flag for the first transform coefficient in response to the greater than 1 flag indicating that an absolute value of the level of the first transform coefficient is greater than 1, the greater than 3 flag indicating whether an absolute value of the level of the first transform coefficient is greater than 3, wherein performing the first pass of the scan is stopped when the number of remaining context coding bins is less than a group limit; encoding a greater than 5 flag of the first transform coefficient in response to the greater than 3 flag indicating that an absolute value of the level of the first transform coefficient is greater than 3, the greater than 5 flag indicating whether an absolute value of the level of the first transform coefficient is greater than 5; encoding a greater than 7 flag of the first transform coefficient in response to the greater than 5 flag indicating that the absolute value of the level of the first transform coefficient is greater than 5, the greater than 7 flag indicating whether the absolute value of the level of the first transform coefficient is greater than 7; and In response to the greater than 7 flag indicating that the absolute value of the level of the first transform coefficient is greater than 7, a greater than 9 flag of the first transform coefficient is encoded, the greater than 9 flag indicating whether the absolute value of the level of the first transform coefficient is greater than 9. 28. The encoding method of clause 27, wherein the second pass of the scanning further comprises: In response to the greater than 9 flag indicating that the absolute value of the level of the first transform coefficient is greater than 9, a remaining absolute level flag of the first transform coefficient is encoded, wherein the remaining absolute level flag indicates a remaining absolute value of the level of the first transform coefficient. 29. A method of encoding according to any of clauses 25-28, wherein each of the first pass and the second pass is performed by scanning the transform coefficients of the sub-block in reverse order. 30. The encoding method according to clause 29, wherein the method further comprises: The transform coefficients of the sub-block are flipped before performing the first pass. 31. The encoding method according to any of clauses 25-30, wherein the encoding method is a transform skip residual encoding method. 32. The encoding method according to any of clauses 25-31, wherein binarizing the absolute value of the level of each transform coefficient in the second set of transform coefficients further comprises: The absolute value is binarized using Golomb-Rice coding. 33. A decoding method implemented by a decoder of video data, the method comprising: A first pass of scanning the transform coefficients of a sub-block of a video frame is performed, where: When the number of context coded bits reaches a maximum limit, the first pass of the scan is stopped. scanning a first set of transform coefficients of the sub-block in the first pass, and A first pass of the scan comprises, for each transform coefficient in the first set of transform coefficients, decoding an importance flag indicating whether a level of the transform coefficient is zero; and performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises: A binarized absolute value of a level of each transform coefficient in a second set of transform coefficients is decoded, wherein the second set of transform coefficients is not scanned in the first pass. 34. The decoding method of clause 33, wherein the first pass of the scanning further comprises: In response to an importance flag of a first transform coefficient indicating that a level of the first transform coefficient is not zero, a greater than 1 flag of the first transform coefficient is decoded, the first transform coefficient being one of the first group of transform coefficients, the greater than 1 flag indicating whether an absolute value of the level of the first transform coefficient is greater than 1. 35. The decoding method of clause 34, wherein the first pass of the scanning further comprises: In response to the greater than 1 flag indicating that the absolute value of the level of the first transform coefficient is greater than 1, a greater than 3 flag of the first transform coefficient is decoded, the greater than 3 flag indicating whether the absolute value of the level of the first transform coefficient being scanned is greater than 3, wherein the first pass of the scan is stopped when the number of remaining context coding bits is less than a group limit. decoding a greater than 5 flag for each of the first transform coefficients in response to the greater than 3 flag indicating that an absolute value of the level of the first transform coefficient is greater than 3, the greater than 5 flag indicating whether an absolute value of the level of the first transform coefficient is greater than 5; decoding a greater than 7 flag for each of the first transform coefficients in response to the greater than 5 flag indicating that an absolute value of the level of the first transform coefficient is greater than 5, the greater than 7 flag indicating whether an absolute value of the level of the first transform coefficient is greater than 7; and In response to the greater than 7 flag indicating that the absolute value of the level of the first transform coefficient is greater than 7, a greater than 9 flag of each of the first transform coefficients is decoded, the greater than 9 flag indicating whether the absolute value of the level of the first transform coefficient is greater than 9. 36. A method of decoding according to clause 35, wherein the second pass of the scanning further comprises: In response to the greater than 9 flag indicating that the absolute value of the level of the first transform coefficient being scanned is greater than 9, a remaining absolute level flag for the first transform coefficient is decoded, wherein the remaining absolute level flag indicates a remaining absolute value of the level of the first transform coefficient. 37. The decoding method according to any of clauses 33-36, wherein the encoding method is a transform skip residual encoding method. 38. A decoding method according to any of clauses 9 to 13, wherein decoding the binarized absolute value of the level of each transform coefficient in the second set of transform coefficients further comprises: The absolute value is decoded using a Golomb-Rice code. 39. A system for encoding video data, the system comprising: a memory storing a set of instructions; and a processor configured to execute the set of instructions so that the system: A first pass of scanning the transform coefficients of a sub-block of a video frame is performed, where: When the number of context coded bits reaches a maximum limit, the first pass of the scan is stopped. scanning a first set of transform coefficients of the sub-block in the first pass, and A first pass of the scanning comprises encoding, for each transform coefficient in the first set of transform coefficients, an importance flag indicating whether the transform coefficient has a level of zero; and performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises: An absolute value of a level of each transform coefficient in a second set of transform coefficients is binarized, wherein the second set of transform coefficients is not scanned in the first pass. 40. A system for decoding video data, the system comprising: a memory storing a set of instructions; and a processor configured to execute the set of instructions so that the system: A first pass scan of transform coefficients of a sub-block of a video frame is performed, where: When the number of context coded bits reaches a maximum limit, the first pass of the scan is stopped. scanning a first set of transform coefficients of the sub-block in the first pass, and A first pass of the scan comprises, for each transform coefficient in the first set of transform coefficients, decoding an importance flag indicating whether a level of the transform coefficient is zero; and performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises: A binarized absolute value of a level of each transform coefficient in a second set of transform coefficients is decoded, wherein the second set of transform coefficients is not scanned in the first pass. 41. A coding method implemented by an encoder of video data, the method comprising: generating a first set of context variables for a luma component of a video frame; generating a second set of context variables for the chrominance components of the video frame, generating sub-blocks of the video frame; and A first set of transform coefficients for the subblock is encoded based on the first set of context variables and the second set of context variables. 42. A method of encoding according to clause 41, wherein encoding the first set of transform coefficients comprises: An importance flag of a transform coefficient in the first set of transform coefficients is encoded according to three context variables from the first set of context variables and three context variables from the second set of context variables, the importance flag indicating whether a level of the transform coefficient is zero. 43. The encoding method according to clause 42, further comprising: The three context variables from the first set of context variables and the three context variables from the second set of context variables are generated based on a color component index, a luma position specifying a position of the sub-block relative to the video frame, and a current coefficient scan position. 44. A method of encoding according to any of clauses 41-43, wherein encoding the first set of transform coefficients comprises: A greater than x flag of a transform coefficient in the first set of transform coefficients is encoded according to four context variables from the first set of context variables and four context variables from the second set of context variables, wherein the greater than x flag indicates whether an absolute value of a level of the transform coefficient is greater than a number x. 45. The encoding method according to clause 44, further comprising: The four context variables from the first set of context variables and the four context variables from the second set of context variables are generated based on a color component index, a luma position specifying a position of the sub-block relative to the video frame, and a current coefficient scan position. 46. ​​A method of encoding according to any of clauses 41-45, wherein encoding the first set of transform coefficients comprises: A parity flag of a transform coefficient in the first set of transform coefficients is encoded according to 1 context variable from the first set of context variables and 1 context variable from the second set of context variables, wherein the parity flag indicates a parity of an absolute value of a level of the transform coefficient. 47. The encoding method according to clause 46, further comprising: The one context variable from the first set of context variables and the one context variable from the second set of context variables are generated according to a color component index. 48. A method of encoding according to any of clauses 41 to 47, wherein encoding the first set of transform coefficients comprises: Coefficient sign flags of transform coefficients in the first set of transform coefficients are encoded according to six context variables from the first set of context variables and six context variables from the second set of context variables, wherein the coefficient sign flags indicate signs of values ​​of the transform coefficients. 49. The method according to clause 48, further comprising: Generate the 6 context variables from the first set of context variables and the 6 context variables from the second set of context variables, wherein the generation is based on the number of significant coefficients of neighbors of the video frame, a luminance position specifying the position of the sub-block relative to the video frame, and a current coefficient scan position. 50. A method according to any of clauses 41-49, wherein encoding the first set of transform coefficients comprises: Sub-block flags of transform coefficients in the first set of transform coefficients are encoded based on three context variables from the first set of context variables and three context variables from the second set of context variables. 51. The method according to clause 50, further comprising: Generate the three context variables from the first set of context variables and the three context variables from the second set of context variables, wherein the generation is based on the number of significant coefficients of neighbors of the video frame, a luminance position specifying the position of the sub-block relative to the video frame, and a current coefficient scan position. 52. A video processing method, comprising: receiving a video bit stream; Splitting the video bitstream into a plurality of sub-blocks; generating a first set of context variables for a luma component of the sub-block; generating a second set of context variables for the chrominance components of the sub-block; and A first set of transform coefficients of the subblock is context encoded based on the first set of context variables and the second set of context variables. 53. A decoding method implemented by a decoder of video data, the method comprising: Receive video frames; Splitting the video frame into a plurality of sub-blocks; generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for a chrominance component of the video frame; and A first set of transform coefficients for the subblock is decoded based on the first set of context variables and the second set of context variables. 54. A method of decoding according to clause 53, wherein decoding the first set of transform coefficients comprises: decoding an importance flag of a transform coefficient in the first set of transform coefficients according to three context variables from the first set of context variables and three context variables from the second set of context variables, the importance flag indicating whether a level of the transform coefficient is zero, 55. The decoding method according to clause 54, further comprising: The three context variables from the first set of context variables and the three context variables from the second set of context variables are generated based on a color component index, a luma position of an upper left sample of a current transform block relative to an upper left sample of the video frame, and a current coefficient scan position. 56. A decoding method according to any of clauses 53-55, wherein decoding the first set of transform coefficients comprises: A greater than x flag of a transform coefficient in the first set of transform coefficients is decoded based on four context variables from the first set of context variables and four context variables from the second set of context variables. 57. The decoding method according to clause 56, further comprising: The four context variables from the first set of context variables and the four context variables from the second set of context variables are generated based on a color component index, a luma position of an upper left sample of a current transform block relative to an upper left sample of the video frame, and a current coefficient scan position. 58. A decoding method according to any of clauses 53-57, wherein decoding the first set of transform coefficients comprises: Parity flags of transform coefficients in the first set of transform coefficients are decoded based on 1 context variable from the first set of context variables and 1 context variable from the second set of context variables. 59. The decoding method according to clause 58, further comprising: The one context variable from the first set of context variables and the one context variable from the second set of context variables are generated, the generating being based on a color component index. 60. A decoding method according to any of clauses 53-59, wherein decoding the first set of transform coefficients comprises: Context coefficient sign flags of transform coefficients in the first set of transform coefficients are decoded based on 6 context variables from the first set of context variables and 6 context variables from the second set of context variables. 61. The decoding method according to clause 60, further comprising: Generate the 6 context variables from the first set of context variables and the 6 context variables from the second set of context variables, wherein the generation is based on the number of important coefficients of the upper neighbors and the left neighbors of the video frame, the luminance position of the upper left sample of the current transform block specified relative to the upper left sample of the video frame, and the current coefficient scanning position. 62. A decoding method according to any of clauses 53-61, wherein decoding the first set of transform coefficients comprises: Sub-block flags of transform coefficients in the first set of transform coefficients are decoded based on three context variables from the first set of context variables and three context variables from the second set of context variables. 63. The decoding method according to clause 62, further comprising: Generate the three context variables from the first set of context variables and the three context variables from the second set of context variables, wherein the generation is based on the number of important coefficients of the upper neighbor and the left neighbor of the video frame, the luminance position of the upper left sample of the current transform block specified relative to the upper left sample of the video frame, and the current coefficient scanning position. 64. A system for encoding video data, the system comprising: a memory storing a set of instructions; and a processor configured to execute the set of instructions so that the system: generating a first set of context variables for a luma component of a video frame; generating a second set of context variables for a chrominance component of the video frame; generating sub-blocks of the video frame; and A first set of transform coefficients for the subblock is encoded based on the first set of context variables and the second set of context variables. 65. A system for decoding video data, the system comprising: a memory storing a set of instructions; and a processor configured to execute the set of instructions so that the system: Receive video frames; Splitting the video frame into a plurality of sub-blocks; generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for a chrominance component of the video frame; and A first set of transform coefficients for the subblock is decoded based on the first set of context variables and the second set of context variables. 66. A non-transitory computer-readable medium storing a set of instructions executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method comprising: Performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of the scanning comprises: A parity level flag of the transform coefficient is bypass-encoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient. 67. A non-transitory computer-readable medium storing a set of instructions executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising: Performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of the scanning comprises: A parity level flag of the transform coefficient is bypass-decoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient. 68. A non-transitory computer-readable medium storing a set of instructions executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method comprising: A first pass of scanning the transform coefficients of a sub-block of a video frame is performed, where: When the number of context coded bits reaches a maximum limit, the first pass of the scan is stopped. scanning a first set of transform coefficients of the sub-block in the first pass, and The first pass of the scanning comprises, for each transform coefficient in the first set of transform coefficients, encoding an importance flag indicating whether the level of the transform coefficient is zero; and performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises: An absolute value of a level of each transform coefficient in a second set of transform coefficients is binarized, wherein the second set of transform coefficients is not scanned in the first pass. 69. A non-transitory computer-readable medium storing a set of instructions executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising: A first pass of scanning the transform coefficients of a sub-block of a video frame is performed, where: When the number of context coded bits reaches a maximum limit, the first pass of the scan is stopped. scanning a first set of transform coefficients of the sub-block in the first pass, and A first pass of the scanning comprises, for each transform coefficient in the first set of transform coefficients, decoding an importance flag indicating whether a level of the transform coefficient is zero; and performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises: A binarized absolute value of a level of each transform coefficient in a second set of transform coefficients is decoded, wherein the second set of transform coefficients is not scanned in the first pass. 70. A non-transitory computer-readable medium storing a set of instructions executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method comprising: generating a first set of context variables for a luma component of a video frame; generating a second set of context variables for the chrominance components of the video frame, generating sub-blocks of the video frame; and A first set of transform coefficients for the subblock is encoded based on the first set of context variables and the second set of context variables. 71. A non-transitory computer-readable medium storing a set of instructions executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising: Receive video frames; Splitting the video frame into a plurality of sub-blocks; generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for a chrominance component of the video frame; and A first set of transform coefficients for the subblock is decoded based on the first set of context variables and the second set of context variables.

[0135] In the drawings and the specification, exemplary embodiments have been disclosed. However, many changes and modifications can be made to these embodiments. Therefore, although specific terms are employed, they are used only in a generic and descriptive sense and not for the purpose of limitation.

Claims

1. A coding method implemented by an encoder of video data, the method comprising: A first pass scan is performed on a plurality of transform coefficients of a sub-block of a video frame, wherein The encoding of the sub-block is achieved by performing multiple scans on the sub-block, the multiple scans comprising a first scan, a second scan and a third scan, the first scan comprising: determining whether the remaining number of context coded bins is greater than or equal to 4; and In response to the remaining number of binary bits of the context coding being greater than or equal to 4, encoding a sig_coeff_flag of a current transform coefficient, the sig_coeff_flag indicating whether a level of the current transform coefficient is zero; In response to the level of the current transform coefficient being not zero, encoding coeff_sign_flag and abs_level_gtx_flag[0] of the current transform coefficient, wherein the coeff_sign_flag indicates a sign of the level of the current transform coefficient, and the abs_level_gtx_flag[0] indicates that an absolute value of the level of the current transform coefficient is greater than 1; and Performing a second scan on a plurality of transform coefficients of a sub-block of the video frame, the second scan comprising: In response to abs_level_gtx_flag[0] of the current transform coefficient being equal to 1, encoding abs_level_gtx_flag[1] of the current transform coefficient, wherein the abs_level_gtx_flag[1] indicates whether an absolute value of the level of the current transform coefficient is greater than 3; In response to abs_level_gtx_flag[1] of the current transform coefficient being equal to 1, encoding abs_level_gtx_flag[2] of the current transform coefficient, wherein the abs_level_gtx_flag[2] indicates whether an absolute value of the level of the current transform coefficient is greater than 5; In response to abs_level_gtx_flag[2] of the current transform coefficient being equal to 1, encoding abs_level_gtx_flag[3] of the current transform coefficient, the abs_level_gtx_flag[3] indicating whether an absolute value of a level of the current transform coefficient is greater than 7; and In response to abs_level_gtx_flag[3] of the current transform coefficient being equal to 1, encoding abs_level_gtx_flag[4] of the current transform coefficient, wherein the abs_level_gtx_flag[4] indicates whether an absolute value of the level of the current transform coefficient is greater than 9; The third scan is performed on the plurality of transform coefficients of the subblock of the video frame, the third scan comprising bypass encoding a residual absolute value abs_remainder of the level of the current transform coefficient, the residual absolute level abs_remainder indicating a residual absolute value of the level of the transform coefficient. In response to the remaining number of binary bits of the context encoding being less than 4, performing a remaining number of scans; and the remaining number of scans comprises: A remaining absolute level abs_remainder of the current transform coefficient is bypass-encoded, wherein the remaining absolute level abs_remainder indicates a remaining absolute value of the level of the transform coefficient.

2. The encoding method according to claim 1, wherein the sub-block has a plurality of transform coefficients, and performing the first pass scan further comprises: Scanning the plurality of transform coefficients until the number of context coding bits reaches a maximum limit; as well as In response to the number of context coding bins reaching the maximum limit, bypass encoding absolute values ​​of levels of transform coefficients not scanned in the second pass, wherein the bypass encoding includes binarizing the absolute values ​​using Golomb-Rice coding. 3 . The encoding method of claim 1 , wherein the subblock has a plurality of transform coefficients, and the first pass scan is performed by scanning the plurality of transform coefficients in reverse order.

4. The encoding method according to claim 3, further comprising: The plurality of transform coefficients are flipped before performing the first scan pass. The encoding method according to claim 1 , wherein the encoding method is a transform skip residual encoding method.

6. The encoding method according to claim 1, further comprising: Receiving the video frame; as well as The video frame is divided into a plurality of sub-blocks.

7. A decoding method implemented by a decoder of video data, the method comprising: A first pass scan is performed on a plurality of transform coefficients of a sub-block of a video frame, wherein Decoding the sub-block is achieved by performing multiple scans on the sub-block, the multiple scans comprising a first scan, a second scan, and a third scan, the first scan comprising: determining whether the remaining number of context decoded bins is greater than or equal to 4; and In response to the remaining number of binary bits of the context decoding being greater than or equal to 4, decoding a sig_coeff_flag of a current transform coefficient, the sig_coeff_flag indicating whether a level of the current transform coefficient is zero; In response to the level of the current transform coefficient being not zero, decoding coeff_sign_flag and abs_level_gtx_flag[0] of the current transform coefficient, wherein the coeff_sign_flag indicates a sign of the level of the current transform coefficient, and the abs_level_gtx_flag[0] indicates that an absolute value of the level of the current transform coefficient is greater than 1; and Performing a second scan on a plurality of transform coefficients of a sub-block of the video frame, the second scan comprising: In response to abs_level_gtx_flag[0] of the current transform coefficient being equal to 1, decoding abs_level_gtx_flag[1] of the current transform coefficient, wherein the abs_level_gtx_flag[1] indicates whether an absolute value of a level of the current transform coefficient is greater than 3; In response to abs_level_gtx_flag[1] of the current transform coefficient being equal to 1, decoding abs_level_gtx_flag[2] of the current transform coefficient, wherein the abs_level_gtx_flag[2] indicates whether an absolute value of the level of the current transform coefficient is greater than 5; In response to abs_level_gtx_flag[2] of the current transform coefficient being equal to 1, decoding abs_level_gtx_flag[3] of the current transform coefficient, the abs_level_gtx_flag[3] indicating whether an absolute value of a level of the current transform coefficient is greater than 7; and In response to abs_level_gtx_flag[3] of the current transform coefficient being equal to 1, decoding abs_level_gtx_flag[4] of the current transform coefficient, wherein the abs_level_gtx_flag[4] indicates whether an absolute value of the level of the current transform coefficient is greater than 9; The third scan is performed on the plurality of transform coefficients of the subblock of the video frame, the third scan comprising bypass decoding a residual absolute value abs_remainder of a level of the current transform coefficient, the residual absolute value level abs_remainder indicating a residual absolute value of a level of the transform coefficient. In response to the remaining number of binary bits decoded by the context being less than 4, performing a remaining number of scans; and the remaining number of scans comprises: A remaining absolute level abs_remainder of the current transform coefficient is bypass-decoded, where the remaining absolute level abs_remainder indicates a remaining absolute value of the level of the transform coefficient.

8. The decoding method according to claim 7, wherein the second scanning further comprises: In response to the abs_level_gtx_flag[0] indicating that the absolute value is greater than 1, the par_level_flag is bypass-decoded in the first pass.

9. A non-transitory computer-readable storage medium storing a bitstream of a video, the non-transitory computer-readable storage medium being part of a computing device, the computing device being configured to execute a set of instructions causing the computing device to decode the bitstream according to operations comprising: A first pass scan is performed on a plurality of transform coefficients of a sub-block of a video frame, wherein Decoding the sub-block is achieved by performing multiple scans on the sub-block, the multiple scans comprising a first scan, a second scan, and a third scan, the first scan comprising: determining whether the remaining number of context decoded bins is greater than or equal to 4; and In response to the remaining number of binary bits of the context decoding being greater than or equal to 4, decoding a sig_coeff_flag of a current transform coefficient, the sig_coeff_flag indicating whether a level of the current transform coefficient is zero; In response to the level of the current transform coefficient being not zero, decoding coeff_sign_flag and abs_level_gtx_flag[0] of the current transform coefficient, wherein the coeff_sign_flag indicates a sign of the level of the current transform coefficient, and the abs_level_gtx_flag[0] indicates that an absolute value of the level of the current transform coefficient is greater than 1; and Performing a second scan on a plurality of transform coefficients of a sub-block of the video frame, the second scan comprising: In response to abs_level_gtx_flag[0] of the current transform coefficient being equal to 1, decoding abs_level_gtx_flag[1] of the current transform coefficient, wherein the abs_level_gtx_flag[1] indicates whether an absolute value of a level of the current transform coefficient is greater than 3; In response to abs_level_gtx_flag[1] of the current transform coefficient being equal to 1, decoding abs_level_gtx_flag[2] of the current transform coefficient, wherein the abs_level_gtx_flag[2] indicates whether an absolute value of the level of the current transform coefficient is greater than 5; In response to abs_level_gtx_flag[2] of the current transform coefficient being equal to 1, decoding abs_level_gtx_flag[3] of the current transform coefficient, the abs_level_gtx_flag[3] indicating whether an absolute value of a level of the current transform coefficient is greater than 7; and In response to abs_level_gtx_flag[3] of the current transform coefficient being equal to 1, decoding abs_level_gtx_flag[4] of the current transform coefficient, wherein the abs_level_gtx_flag[4] indicates whether an absolute value of the level of the current transform coefficient is greater than 9; The third scan is performed on the plurality of transform coefficients of the subblock of the video frame, the third scan comprising bypass decoding a residual absolute value abs_remainder of the level of the current transform coefficient, the residual absolute level abs_remainder indicating a residual absolute value of the level of the transform coefficient. In response to the remaining number of binary bits decoded by the context being less than 4, performing a remaining number of scans; and the remaining number of scans comprises: A remaining absolute level abs_remainder of the current transform coefficient is bypass-decoded, where the remaining absolute level abs_remainder indicates a remaining absolute value of the level of the transform coefficient.

Citation Information

Patent Citations

  • Coding of last significant transform coefficient

    CN103636213A

  • Group flag in transform coefficient coding for video coding

    CN104205832A

  • Method and apparatus for transform coefficient coding of non-square blocks

    CN107710759A

  • Sign hiding techniques for quantized transform coefficients in video coding

    US20140003530A1

  • Image encoding method and apparatus, and image decoding method and apparatus

    US20190052909A1