Transform Skip Residual Coding for Video Data

By using bypass encoding and Columbus-Rice encoding with parity flags in the transform skip residual coding, reducing the number of encoding passes and unifying the scanning order, the problems of encoding complexity and hardware implementation difficulty in the transform skip residual coding method are solved, and encoding efficiency and throughput are improved.

CN114679917B9Active Publication Date: 2025-07-08ALIBABA GROUP HOLDING LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing transform skip residual encoding method has too many encoding passes in video encoding, resulting in low throughput of CABAC engine and complex hardware implementation, inconsistent scanning order, increasing the difficulty of hardware implementation, and too many bypass encoding syntax elements.

Method used

The bypass encoding method of parity flags is adopted to reduce the number of encoding passes to three times, and the scanning order of transform residual coding and transform skip the residual coding, and optimize the encoding process through the bypass encoding of parity flags and Columbus-Race coding.

Benefits of technology

It improves the throughput of CABAC, simplifies hardware implementation, reduces coding complexity, and improves coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114679917B9_ABST
    Figure CN114679917B9_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 sub-blocks of a video frame, wherein the first pass of scanning includes: bypass encoding a parity level flag of the transform coefficients, the parity level flag indicating the parity of an absolute value of a level of the transform coefficients.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross - Reference to Related Applications

[0002] This disclosure claims priority and the benefit of priority of the following applications: 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 hereby incorporated by reference in their entirety. Technical Field

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

[0004] New standards for video coding are being developed in the video compression and decompression industry. For example, the Joint Video Exploration Team ("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

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

[0006] 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 scanning includes: bypass - coding a parity level flag of the transform coefficients, the parity level flag indicating the parity of the absolute value of the level of the transform coefficients.

[0007] 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 scanning includes: bypass - decoding a parity level flag of the transform coefficients, the parity level flag indicating the parity of the absolute value of the level of the transform coefficients.

[0008] An exemplary system includes: a memory that stores a set of instructions; and a processor configured to execute the set of instructions 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 scanning includes: bypass - coding a parity level flag of the transform coefficients, the parity level flag indicating the parity of the absolute value of the level of the transform coefficients.

[0009] Another exemplary system includes: a memory that stores 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 sub-blocks of a video frame, wherein the first pass of scanning includes: bypass decoding a parity level flag of the transform coefficients, the parity level flag indicating the parity of the absolute value of the level of the transform coefficients. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

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

[0013] Figure 3 An example pseudocode of a syntax including transform coding is illustrated.

[0014] Figure 4 An example pseudocode of a syntax including transform skip residual coding is illustrated.

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

[0016] Figure 6 An example including Figure 5 The syntax of the method shown is illustrated in an example pseudocode.

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

[0018] Figure 8 An example including Figure 7 The syntax of the method shown is illustrated in an example pseudocode.

[0019] Figure 9 An example reverse scan of an 8×8 transform skip block according to some embodiments of the present disclosure is illustrated.

[0020] Figure 10A An example of an 8×8 block before flipping according to some embodiments of the present disclosure is illustrated.

[0021] Figure 10B An example according to some embodiments of the present disclosure is illustrated inFigure 10A The result block after flipping the 8×8 block in

[0022] Figure 11 Illustrates an example multi-pass encoding according to some embodiments of the present disclosure.

[0023] Figure 12 Illustrates an example single-pass bypass encoding method for the absolute value of a level according to some embodiments of the present disclosure.

[0024] Figure 13 Illustrates an example lookup table for Rice parameters according to some embodiments of the present disclosure.

[0025] Figure 14 Illustrates 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.

[0026] Figure 15 Illustrates an example including Figure 14 The example pseudocode of the syntax of bypass encoding combined with the method in

[0027] Figure 16 Illustrates an example method of transform skip residual encoding having a first pass for context encoding and a second pass for Golomb-Rice encoding according to some embodiments of the present disclosure.

[0028] Figure 17 Illustrates an example including Figure 16 The example pseudocode of the syntax of bypass encoding including the method in

[0029] Figure 18 Illustrates an example lookup table for Rice parameters when the minimum bypass encoding value is equal to 0 according to some embodiments of the present disclosure. Detailed Description

[0030] Now, reference will be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings, where like numbers in different drawings represent the same or similar elements unless otherwise indicated. 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 aspects of the present invention as recited in the appended claims. Specific aspects of the present disclosure are described in more detail below. If there is a conflict with the terms and / or definitions incorporated by reference, the terms and definitions provided herein shall prevail.

[0031] A video is a collection of static images (or "frames") arranged in chronological order to store visual information. A video capture device (e.g., a camera) can be used to capture and store these images in chronological order, and a video playback device (e.g., a television, computer, smartphone, tablet computer, video player, or any end-user terminal with a display function) can be used to display such images in chronological order. Additionally, in some applications, a video capture device can transmit the captured video in real time to a video playback device (e.g., a computer with a monitor), such as for surveillance, conferencing, or live broadcasting, etc.

[0032] 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 achieved by software executed by a processor (e.g., the processor of a general-purpose computer) or dedicated hardware. The module for compression is generally referred to as an "encoder", while the module for decompression is generally referred to as a "decoder". The encoder and decoder can be collectively referred to as a "codec". The encoder and decoder can be implemented as any of a variety of suitable hardware, software, or combinations thereof. For example, hardware implementations of the encoder and decoder can include circuitry, 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. Software implementations of the encoder and decoder 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 achieved through various algorithms or standards such as MPEG-1, MPEG-2, MPEG-4, the H.26x series, etc. In some applications, a codec can decompress a 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".

[0033] The video encoding process can identify and retain useful information that can be used to reconstruct an image. If the information ignored during the video encoding process cannot be fully reconstructed, the encoding process can be called "lossy". Otherwise, it can be called "lossless". Most encoding processes are lossy as a trade-off to reduce the required storage space and transmission bandwidth.

[0034] In many cases, the useful information of an encoded image (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 the position, luminance, or color of pixels, with position changes being of the most concern. The change in the position of a set of pixels representing an object can reflect the movement of that object between the reference image and the current image.

[0035] 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 beyond HEVC. Since the encoding techniques are incorporated into JEM, JEM achieves generally higher encoding performance than HEVC. VCEG and MPEG have also officially started the development of the next-generation video compression standard beyond HEVC.

[0036] The VVC standard continues to include more encoding 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 illustrated. As Figure 1 shown, the video encoder 200 can perform intra or inter coding on blocks, partitions, or sub-partitions within a video frame (including video blocks). Intra coding can rely on spatial prediction to reduce or remove spatial redundancy in the video within a given video frame. Inter coding can rely on temporal prediction to reduce or remove temporal redundancy in the video within adjacent frames of a video sequence. Intra modes can refer to many space-based compression modes. Inter modes (such as single prediction or bi-prediction) can refer to many time-based compression modes.

[0037] 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., macroblock (MB)). Depending on the encoding technique used and the required accuracy and efficiency, the size of the video block unit can vary. In HEVC, an extended block size (e.g., coding tree unit (CTU)) can be used to compress video signals with a resolution of 1080p and higher. In HEVC, a CTU can include up to 64×64 luminance samples, corresponding chrominance samples, and related syntax elements. In VVC, the size of the CTU can be further increased to include 128×128 luminance samples, corresponding chrominance samples, and related syntax elements. A CTU can be further divided into coding units (CUs) using, for example, a quadtree, binary tree, or ternary tree. A CU can be further partitioned into prediction units (PUs) to which separate prediction methods can be applied. Each input video block can be processed by using a spatial prediction unit 260 or a temporal prediction unit 262.

[0038] 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 the spatial redundancy inherent in the video signal.

[0039] The temporal prediction unit 262 performs temporal prediction (e.g., inter prediction) on the current block using information from an image / slice different from the image / slice containing the current block. Temporal prediction for a video block can be signaled by one or more motion vectors. In uni-directional temporal prediction, a single motion vector indicating only one reference image is used to generate the prediction signal for the current block. On the other hand, in bi-directional temporal prediction, two motion vectors (each indicating a respective reference image) can be used to generate the prediction signal for the current block. A motion vector can indicate the amount and direction of motion between the current block and one or more related blocks in a reference frame. If multiple reference images are supported, one or more reference image indices can be sent for a video block. One or more reference indices can be used to identify which reference image(s) in the reference picture buffer or decoded picture buffer (DPB) 264 the temporal prediction signal may be from.

[0040] The mode decision in the encoder and the encoder control unit 280 can select a prediction mode, for example, 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 inverse quantized at the inverse quantization unit 210 and inverse 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 prediction.

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

[0042] Figure 2 An example decoder block diagram of a hybrid video coding system is illustrated. As Figure 2 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 compensation prediction can be applied by the temporal prediction unit 362 to form a temporal prediction block.

[0043] The residual coefficients can 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 can be added together at 326 to form a reconstructed block before loop filtering. The reconstructed block can then be loop filtered at the loop filter 366. For example, loop filtering such as deblocking filter, SAO, and ALF can be applied. Then the reconstructed block after loop filtering can be stored in the reference picture buffer 364. The reconstructed data in the reference picture buffer 364 can be used to obtain the decoded video 320, or to predict future video blocks. The decoded video 320 can be displayed on a display device such as the display device 146 described in system 100 ( Figure 1 ).

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

[0045] In VVC (e.g., VVC 5), the transform coefficients of an encoded 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 over the scan positions. 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 previously encoded syntax elements. For bypass coding, specific bits can be selected to accelerate the coding process with a negligible loss of coding efficiency. In bypass coding, the bits can be encoded with a set probability (e.g., a probability equal to 0.5).

[0046] In pass 1, the significance flag (e.g., sig_coeff_flag), the greater than 1 flag (e.g., gtl_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, then 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, then 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 regular (e.g., context) coded coefficient can be stored in the variable firstPosModel.

[0047] In pass 2(a), the coding of the remaining absolute levels (e.g., abs_remainder) is processed starting from the first scan position of the coefficient group up to the firstPosModel position. Only the positions where the greater than 1 flag equals 1 are coded. Non-binary syntax elements are binarized using the Golomb-Rice code and the resulting binary bits are coded in the bypass mode of the arithmetic coding engine. For example, the value 2 can be represented using the Golomb-Rice code of "001", and each bit of "001" can be referred to as a binary bit (e.g., binary bit 0, binary bit 0, and binary bit 1).

[0048] In pass 2(b), the coding of the absolute levels (dec_abs_level) is processed starting from the first bypass coding position (e.g., firstPosModel - 1, in reverse order) up to the last scan position of the coefficient group and is fully coded using the Golomb-Rice code in the bypass mode of the arithmetic coding engine.

[0049] In pass 3, the coding of the sign flag (e.g., sign_flag) is processed for all scan positions where sig_coeff_flag equals 1.

[0050] For a 4×4 sub-block, it can be expected that no more than 32 regularly coded binary bits (e.g., sig_coeff_flag, gtl_flag, par_level_flag, and gt3_flag) are coded or decoded. For a 2×2 chroma sub-block, the number of regularly coded binary bits can be limited to 8. After reaching the limit, all binary bits are coded in the bypass mode.

[0051] In the new residual coding process adopted by JVET for the transform skip residual block, the coefficient scan order of the transform skip residual coding is a forward scan and starts from the upper left position of the transform skip block. The transform skip coefficient levels of the sub-block are coded in six passes over the scan positions.

[0052] In pass 1, sig_coeff_flag, coeff_sign_flag, the greater than 1 flag (e.g., abs_level_gtx_flag[0]), and par_level_flag are processed in the coding order. If sig_coeff_flag equals 1, then coeff_sign_flag and abs_level_gtx_flag[0] are coded in sequence. 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] equals 1, then par_level_flag is additionally coded. par_level_flag specifies the parity of the absolute level minus 2. Before coding any flag, the context adaptive binary arithmetic coding ("CABAC") engine checks whether context coding bits are available. If the context coding bits are not available, the flag is bypass coded.

[0053] In pass 2, if abs_level_gtx_flag[0] at a given position equals 1, then the greater than 3 flag (e.g., abs_level_gtx_flag[1]) is coded. abs_level_gtx_flag[l] specifies whether the absolute level is greater than 3. Before coding abs_level_gtx_flag[l] for each coefficient, the CABAC engine checks whether context coding bits are available. If the context coding bits are not available, abs_level_gtx_flag[l] is bypass coded.

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

[0055] In pass 4, if abs_level_gtx_flag[2] at a given position equals 1, the greater than 7 flag (e.g., abs_level_gtx_flag[3]) is coded. abs_level_gtx_flag[3] specifies whether the absolute level is greater than 7. Before coding abs_level_gtx_flag[3] for each coefficient, the CABAC engine checks if context coding bits are available. If the context coding bits are not available, abs_level_gtx_flag[3] is bypass coded.

[0056] In pass 5, if abs_level_gtx_flag[3] at a position equals 1, the greater than 9 flag (e.g., abs_level_gtx_flag[4]) is coded. abs_level_gtx_flag[4] specifies whether the absolute level is greater than 9. Before coding abs_level_gtx_flag[4] for each coefficient, the CABAC engine checks if context coding bits are available. If the context coding bits are not available, abs_level_gtx_flag[4] is bypass coded.

[0057] In pass 6, abs_remainder is processed for all scan positions where abs_level_gtx_flag[4] equals 1. Non-binary syntax elements are binarized with Columbus-Rice code and the resulting bits are coded in the bypass mode of the arithmetic coding engine.

[0058] Figure 3 An example pseudo-code of a syntax including transform coding is illustrated. For example, Figure 3 The illustrated syntax can be used for transform coding in VVC. Figure 4 An example pseudo-code of a syntax including transform skip residual coding is illustrated. For example, Figure 4 The illustrated syntax can be used for transform skip residual coding in VVC.

[0059] There are several problems in the current design of transform skip residual coding. First, the number of coding passes of transform skip residual coding is six. That means, in many cases, the CABAC engine needs to scan the coefficient array six times, which significantly affects the throughput of CABAC. Second, the number of coding passes of transform skip residual coding is different from that of transform residual coding (e.g., six passes versus three passes). The difference in the number of coding passes may result in hardware implementation complexity. Third, the coefficient scan of transform skip residual coding is a forward scan, while the scan of transform residual coding is in the reverse order. The difference in the scan order may also result in 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.

[0060] Embodiments of the present disclosure provide a new bypass coding method for parity flags. 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. Thus, the probabilities of even 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 the 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 coded after the parity flag) to be context-coded, which can improve the coding efficiency.

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

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

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

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

[0065] In pass 1 (step 502), the coefficients of the sub-block are scanned. In some embodiments, each coefficient from the first scan position of the sub-block to the last scan position of the sub-block is scanned. There can be a significance flag (e.g., sig_coeff_flag) for each coefficient. In some embodiments, the significance flag can specify whether the level of the coefficient 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), 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 coded. The greater than 1 flag can specify whether the absolute value of the level is greater than 1.

[0066] In pass 2 (step 504), the coefficients of the sub-block are scanned. In some embodiments, each coefficient 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 equals 1), then the greater than 3 flag (e.g., abs_level_gtx_flag[l]) can be coded. 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 equals 1), then the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be coded. 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 equals 1), then the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be coded. 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 equals 1), then the greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be coded. The greater than 9 flag can specify whether the absolute level is greater than 9.

[0067] In pass 3 (step 506), the coefficients of the sub-block are scanned. In some embodiments, each coefficient 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 equals 1), then the parity level flag of the coefficient (e.g., par_level_flag) can be bypass-coded. 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 equals 1), then the remaining absolute level of the coefficient (e.g., abs_remainder) can be coded, and the non-binary syntax elements can be binarized using the Golomb-Rice code. In some embodiments, the resulting binary bits can be coded in the bypass mode of the arithmetic coding engine.

[0068] Figure 6 illustrates an example pseudocode of the syntax of a method according to some embodiments of the present disclosure including Figure 5 The shown method. Figure 6 Some parts of the pseudocode in are italicized, 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.

[0069] It should be appreciated that Figure 5 the method of Figure 1 can be implemented by an encoder (e.g., an encoder ofFigure 2 The decoder), and the method can include three passes.

[0070] In pass 1, the coefficients of the sub-block are scanned. In some embodiments, each coefficient from the first scan position of the sub-block to the last scan position of the sub-block is scanned. There can be a significance flag (e.g., sig_coeff_flag) for each coefficient. The significance flag can be decoded. The significance flag can specify whether the level is a non-zero value. If the significance flag for a coefficient indicates that the level is a non-zero value (e.g., the significance flag equals 1), then 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.

[0071] In pass 2, the coefficients of the sub-block are scanned. In some embodiments, each coefficient 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 a coefficient indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag equals 1), then 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. If the greater than 1 flag of a coefficient indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag equals 1), then the greater than 3 flag (e.g., abs_level_gtx_flag[l]) can be decoded. If the greater than 3 flag of a coefficient indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag equals 1), then the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be decoded. If the greater than 5 flag of a coefficient indicates that the absolute level is greater than 5 (e.g., the greater than 4 flag equals 1), then the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be decoded. If the greater than 7 flag of a coefficient indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag equals 1), then the greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be decoded.

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

[0073] In some embodiments, the decoder can receive a video bitstream.

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

[0075] In pass 1 (step 702), the coefficients of the sub-block are scanned. In some embodiments, each coefficient from the first scan position of the sub-block to the last scan position of the sub-block is scanned. There can 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 a coefficient indicates that the level is a non-zero value (e.g., the significance flag equals 1), then 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 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 a coefficient indicates that the absolute value of the level is greater than 1 (e.g., the greater than 1 flag equals 1), then 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.

[0076] In pass 2 (step 704), the coefficients of the sub-block are scanned. In some embodiments, each coefficient from the first scan position of the sub-block to the last scan position of the sub-block is scanned. If the greater than 3 flag of a coefficient indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag equals 1), then 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 a coefficient indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag equals 1), then 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 a coefficient indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag equals 1), then 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.

[0077] In pass 3 (step 706), the coefficients of the sub-block are scanned. In some embodiments, each coefficient 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 equals 1), then the parity level flag of the coefficient (e.g., par_level_flag) 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 equals 1), then the remaining absolute level of the coefficient (e.g., abs_remainder) can be processed, and the non-binary syntax element can be binarized using the Golomb-Rice code. The resulting binary bits can be encoded in the bypass mode of the arithmetic coding engine.

[0078] Compared with Figure 5 the method in Figure 7 the method in Figure 8 handles the encoding of the greater than 3 flag in pass 1 instead of pass 2. Figure 7 illustrates an example pseudocode of the syntax including the Figure 8 method shown in

[0079] It should be appreciated that Figure 7 the method in Figure 1 can be implemented by an encoder (e.g., Figure 2 the encoder of

[0080] In pass 1, the coefficients of the sub-block are scanned. In some embodiments, each coefficient from the first scan position of the sub-block to the last scan position of the sub-block is scanned. There can be a significance flag (e.g., sig_coeff_flag) for each coefficient. The significance flag is decoded. 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 equals 1), then 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 equals 1), then the greater than 3 flag (e.g., abs_level_gtx_flag[l]) can be decoded.

[0081] In pass 2, the coefficients of the sub-block are scanned. In some embodiments, each coefficient 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 equals 1), then 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 equals 1), then 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 equals 1), then 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 equals 1), then 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.

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

[0083] In some embodiments, the decoder can receive a video bitstream.

[0084] In some embodiments, the scan order of the transform skip residual block can be changed to unify the scan orders of the transform residual coding process and the transform skip residual coding process. For example, the scan order of the transform skip residual block can be changed from a forward scan to a reverse scan. Figure 9 An example reverse scan of an 8×8 transform skip block according to some embodiments of the present disclosure is illustrated. As Figure 9 shown, the scan of the coefficients starts from the coefficient at the lower right corner and ends at the coefficient at the upper left corner. It should be appreciated that the illustrated scan order can be applied by the methods shown in Figure 5 and Figure 7 shown. Figure 9 illustrated.

[0085] In some embodiments, the reverse scan can be performed after the transform block is flipped. Figure 10A and Figure 10B illustrate an example flip of an 8×8 block according to some embodiments of the present disclosure. As Figure 10A and Figure 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, reverse scanning can be performed (e.g., Figure 9 reverse scanning).

[0086] In some embodiments, bypass coding can be performed in multiple passes. Figure 11 The figure illustrates an example multi-pass coding according to some embodiments of the present disclosure. In some embodiments, the Figure 11 shown multi-pass coding can be performed in VVC (e.g., VVC 5). It can be assumed that Figure 11 the number of context-coded binary bits in Figure 11 has reached the maximum limit at the position of the first pass (shown as black dots in Figure 11 ). As shown in

[0087] In some embodiments, single-pass bypass coding of the absolute value of the level can be implemented. Figure 12 The figure illustrates an example single-pass bypass coding method for the absolute value of the level according to some embodiments of the present disclosure. As shown in Figure 12 once the context-coded binary bits reach the maximum limit (e.g., shown as black dots in Figure 12 ), the CABAC engine can start using Golomb-Rice coding to perform bypass coding on the remaining part of the absolute level.

[0088] Figure 13 The figure illustrates an example lookup table for Rice parameters according to some embodiments of the present disclosure. According to Figure 13 , the Rice parameter can be represented by the variable cRiceParam. And the absolute position can be represented by the variable locSumAbs.

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

[0090] In some embodiments, the variable locSumAbs can be derived as specified by the following pseudocode:

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

[0093] In pass 1 (step 1402), the coefficients of the sub-block are scanned. In some embodiments, each coefficient 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 binary 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 use context coding or bypass coding to code all the flags in the group. As a result, if the number of context coding binary bits is less than the group limit, it is more efficient to use bypass coding to code all the remaining flags rather than using context coding to code some of the remaining flags and using bypass coding to code the other flags. In this example, there may be 4 flags coded in the group in pass 1 (e.g., significance flag, sign of signal coefficient flag, greater than 1 flag, and greater than 3 flag). Thus, given a group limit of 4, if the remaining number of context coding binary 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 a non-zero value (e.g., the significance flag equals 1), the sign of signal coefficient flag (e.g., coeff_sign_fiag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) can be coded. If the greater than 1 flag indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag equals 1), the greater than 3 flag (e.g., abs_level_gtx_flag[l]) can be coded. In some embodiments, the coefficients can be scanned until the context coding binary bits reach the maximum limit (e.g., Figure 12 the black dots in ), and then the scan stops at the position that is the last position of the first pass.

[0094] After the end of pass 1 and before the start of pass 2, the first pass bypass position variable (e.g., iFirstPassBypassPos) can be set according to 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.

[0095] 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-encoded bits is greater than or equal to the group limit, the following can be performed. For example, the group limit can be 3 (e.g., greater than 5 flag, greater than 7 flag, and 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 equals 1), then 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 equals 1), then 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 equals 1), then the greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be encoded.

[0096] After the end of pass 2 and before the start of pass 3, the second pass bypass position variable (e.g., iSecondPassBypassPos) can be set according to 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.

[0097] In pass 3(a) (step 1410), coefficients from the first scan position of the sub-block 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 equals 1), then 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 equals 1), then the encoding of the remaining absolute level (e.g., abs_remainder) can be processed by non-binary syntax elements binarized with the Golomb-Rice code. The resulting bits can be encoded in the bypass mode of the arithmetic coding engine.

[0098] In pass 3(b) (step 1412), coefficients 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 non-binary syntax elements binarized with the Golomb-Rice code. The resulting bits can be encoded in the bypass mode of the arithmetic coding engine. The signal coefficient sign flag can also be encoded.

[0099] In some embodiments, in pass 3(b), coefficients from iFirstPassBypassPos to the last scan position can be scanned, and for each coefficient, encoding of the absolute level (e.g., dec_abs_level) can be processed in two steps. First, signal whether dec_abs_level is zero. If dec_abs_level is non-zero, a non-binary syntax element binarized with a 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.

[0100] Figure 15 illustrates an example pseudocode of a syntax including bypass coding combined with the method in Figure 14 according to some embodiments of the present disclosure. Figure 15 Some parts of the pseudocode in

[0101] are italicized, indicating the handling of the greater than 3 flag, greater than 5 flag, greater than 7 flag, greater than 9 flag, and parity level flag. Figure 16 illustrates an example method of transform skip residual coding having a first pass for context coding and a second pass for Golomb-Rice coding according to some embodiments of the present disclosure. Figure 16 The method in

[0102] In pass 1 (step 1602), the coefficients of the sub-block are scanned. In some embodiments, each coefficient 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-coded bits is equal to or greater than 8, the following can be performed. The significance flag (e.g., sig_coeff_flag) can be context-coded. 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 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-coded bits reach the maximum limit (e.g., Figure 12 the black dot in

[0103] [001011After the end of pass 1 and before the start of pass 2, the first-pass bypass position variable (iFirstPassBypassPos) can be set according to 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. The coefficients with scan positions less than the first-pass bypass position can be signaled partially through context coding 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, none of the flags of the coefficient are context-coded, and bypass coding in pass 2(b) can be used to signal the complete coefficient and sign.

[0104] In pass 2(a) (step 1606), coefficients can be scanned from the first scan position of the sub-block to the position of 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 equals 1), then the Golomb-Rice code can be used to binarize the remaining absolute level (e.g., abs_remainder), and the resulting binary bits can be encoded in the bypass mode of the arithmetic coding engine.

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

[0106] It should be appreciated that Figure 16 the method can be implemented by an encoder (e.g., Figure 1 the encoder). In some embodiments, the encoder can receive a video frame. It should be appreciated that a decoder (e.g., Figure 2 the decoder) can be used to decode the encoded video frame from Figure 17 the method. In some embodiments, the decoding method can include 2 passes.

[0107] In pass 1, the coefficients of the sub-block are scanned. In some embodiments, each coefficient 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-encoded bits 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 (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) to be encoded in pass 1. The significance flag (e.g., sig_coeff_flag) can be context-decoded. If the significance flag indicates a non-zero level (e.g., the significance flag equals 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 equals 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 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 equals 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 equals 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 equals 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, the coefficients can be scanned until the context-encoded bits reach the maximum limit (e.g., Figure 12 the black dot in

[0108] After the end of pass 1 and before the start of pass 2, the first pass bypass position variable (IFirstPassBypassPos) can be set according to 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 with a scan position less than the first pass bypass position can be signaled partially through 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, the flags of that coefficient are not context decoded, and bypass decoding of pass 2(b) can be used to signal the full coefficient and sign.

[0109] In pass 2(a), coefficients can be scanned from the first scan position of the sub-block to the position of 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 equals 1), the Columbus - Rice code can be used to decode the binarized remaining absolute level (e.g., abs_remainder), and the resulting binary bits can be decoded in the bypass mode of the arithmetic coding engine.

[0110] In pass 2(b), coefficients can be scanned from the first pass bypass position to the last scan position. The following can be performed for each coefficient. The binarized absolute level (e.g., dec_abs_level) can be decoded using the Columbus - Rice code, and the resulting binary bits can be decoded in the 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.

[0111] Figure 17 Illustrated is an example pseudocode of the syntax of bypass coding including the Figure 16 method according to some embodiments of the present disclosure. Figure 17 Some parts of the pseudocode in

[0112] are italicized, indicating the first pass bypass position and the processing of pass 2(b). Figure 17 In some embodiments, as Figure 17The first pass is executed only when the "MaxCcbs >= 8" as shown. This means that up to 7 context encodings in the context encoding bit budget may be "wasted", which may harm the encoding performance. Thus, in some embodiments, the number of abs_level_gtx_flag[] flags can be adjusted in the disclosed two-pass encoding method. For example, instead of encoding flags greater than 9 (e.g., abs_level_gtx_flag[4]), only up to flags greater than 7 (e.g., abs_level_gtx_flag[3]) are encoded. Thus, the first pass can be executed only when the remaining number of context encoding bits is equal to or greater than 7. In some embodiments, only up to flags greater than 5 (abs_level_gtx_flag[2]) can be encoded. Thus, the first pass is executed only when the remaining number of context encoding bits 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 positions to be encoded in the first encoding pass, thus providing better encoding efficiency.

[0113] 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 encoding value, if none of the flags of the coefficient are context encoded, the minLevel of the coefficient is 0. If all flags are context encoded, minLevel is equal to 10.

[0114] The variable locSumAbs can be derived as specified by the following pseudocode:

[0116] Figure 18 Illustrated is an example lookup table of the Rice parameter when the minimum bypass encoding value is equal to 0 according to some embodiments of the present disclosure. As Figure 18 shown, the Rice parameter can be represented by the variable cRiceParam. And the absolute position can be represented by the variable locSumAbs.

[0117] In some embodiments, two separate lookup tables can be used for Rice parameter derivation based on minLevel. If minLevel is equal to 0, the table shown in Figure 18 can be used. If minLevel is not equal to 0, the table shown in Figure 13 can be used.

[0118] In some embodiments, the derivation of the Rice parameter does not require any look-up tables. For example, cRiceParam can be derived as follows;

[0119] cRiceParam = (locSumAbs + offset) >> 3

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

[0121] In some embodiments, the offset value depends on the color component. For example, the offset value can be 4 for luminance and 0 for chrominance.

[0122] In some embodiments, the offset value depends on the frame type. For example, the offset value can be 4 for intra frames and 0 for inter frames.

[0123] In some embodiments, in VVC (e.g., VVC 7), transform skip mode is allowed for both the luminance component and the chrominance component, 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 an equation containing the most recently decoded binary bits. However, the signal statistics of the luminance blocks and the chrominance blocks can be different. As a result, in some embodiments of the present disclosure, different context variables can be used for the luminance component and the chrominance component. The syntax elements affected by the proposed context model extension can include the significance coefficient flag (e.g., sig_coeff_flag), abs_level_gtx_flag[n][j] (e.g., j = 0 to 4), the parity flag (e.g., par_level_flag), the signal coefficient sign flag (e.g., coeff_sign_flag), and the coded_sub_block_flag (e.g., Figure 3 the coded_sub_block_fiag shown).

[0124] In VVC (e.g., VVC 7), three context variables can be used to encode the sig_coeff_flag of the transform skip mode. In some embodiments, a total of six context variables (e.g., three for luminance and three for chrominance) can be used to encode the sig_coeff_flag of the transform skip mode. The context index for encoding the sig_coeff_flag of the transform skip mode can be derived based on the number of significant coefficients of neighbors (e.g., the upper neighbor and the left neighbor). In some embodiments, the context index may refer to the identifier of the context variable. For example, if six context variables are available, the context index of the first context variable can be 0, the context index of the second context variable can be 1, and so on. The input of this process can be the color component index cldx, the luminance position (x0, y0), and the current coefficient scan position (xC, yC). The luminance position (x0, y0) can specify a particular sample (e.g., the top-left sample) of the current transform block relative to a particular sample (e.g., the top-left sample) of the current image. The output of this process can be the encoded index variable ctxInc. In some embodiments, the variable ctxInc can be derived according to the following pseudocode:

[0126] In VVC (e.g., VVC 7), four context variables can be used to encode the abs_level_gtx_fiag[n][0] of the transform skip mode. In some embodiments, a total of eight context variables (four for luminance and four for chrominance) can be used to encode the abs_level_gtx_flag[n][0] of the transform skip mode. The context index for encoding the abs_level_gtx_flag[n][0] of the transform skip can be derived based on the number of significant coefficients of neighbors (e.g., the upper neighbor and the left neighbor). The input of this process can be the color component index cIdx, the luminance position (x0, y0), and the current coefficient scan position (xC, yC). The luminance position (x0, y0) can specify a particular sample (e.g., the top-left sample) of the current transform block relative to a particular sample (e.g., the top-left sample) of the current image. The output of this process can be the encoded index variable ctxInc. In some embodiments, the variable ctxInc can be derived according to the following pseudocode:

[0128] [001211 In VVC (e.g., VVC 7), one context variable can be used to encode the par_level_flag of the transform skip mode. In some embodiments, a total of two context variables (one for luminance and one for chrominance) can be used to encode the par_level_flag of the transform skip mode. The context index for encoding the par_level_flag of 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 is the encoded index variable ctxInc. In some embodiments, the variable ctxInc can be derived according to the following pseudocode:

[0130] In some embodiments, separate context variables for luminance and chrominance can be used to encode the abs_level_gtx_flag of the transform skip mode. The context index for encoding the abs_level_gtx_flag of 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 encoded 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 chrominance component (e.g., cIdx greater than 0), the context index is incremented as ctxInc = ctxInc + 4.

[0131] In VVC (e.g., VVC 7), six context variables can be used to encode the coeff_sign_flag of the transform skip mode. In some embodiments, a total of twelve context variables (six for luminance and six for chrominance) 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 based on the coeff_sign_flag of neighbors (e.g., the upper neighbor and the left neighbor). The input to this process can be the color component index cIdx, the luminance position (x0, y0), and the current coefficient scan position (xC, yC). The luminance position (x0, y0) can specify a particular sample (e.g., the upper left sample) of the current transform block relative to a particular sample (e.g., the upper left sample) of the current image. The output of this process can be the encoded index variable ctxInc. In some embodiments, the variables leftSign and aboveSign can be derived according to the following pseudocode:

[0133] In some embodiments, the variable ctxInc can be derived according to the following pseudocode:

[0135] In VVC (e.g., VVC 7), three context variables can be used to encode the coded_sub_block_flag for the transform skip mode. The coded_sub_block_flag can be a sub-block flag that specifies whether the transform coefficient level in a 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 six context variables (three for luma and three for chroma) can be used to encode the coded_sub_block_flag for the transform skip mode. The context index for encoding the coded_sub_block_flag for the transform skip mode can be derived based on the coded_sub_block_flags of the upper neighbor and the left neighbor. The input to this process can 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 binary logarithm of the transform block height log2TbHeight. The luma position (x0, y0) can specify the upper-left sample of the current transform block relative to the upper-left sample of the current image. The output of this process can be the encoded index variable ctxInc. In some embodiments, the variables log2SbWidth and log2SbHeight can be derived according to the following pseudocode:

[0137] In some embodiments, the variables log2SbWidth and log2SbHeight can be modified according to the following pseudocode:

[0139] In some embodiments, the variable csbfCtx can be initialized to 0 and the variable csbfCtx can be modified according to the following pseudocode:

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

[0143] 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) to perform the above method. Common forms of non-transitory media include, for example, floppy disks, flexible disks, hard disks, solid state drives, magnetic tapes or any other magnetic data storage media, CD-ROMs, any other optical data storage media, any physical medium with a hole pattern, RAM, PROM, and EPRQM, FLASH-EPROM or any other flash memory, NVRAM, caches, registers, any other memory chip or cartridge, and networked versions thereof. The device may include one or more processors (CPUs), an input / output interface, a network interface, and / or a memory.

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

[0145] As used herein, unless specifically stated otherwise, the term "or" encompasses all possible combinations, unless infeasible. For example, if it is stated that a database may include A or B, then unless specifically stated otherwise or infeasible, 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 infeasible, 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.

[0146] 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 computer-readable medium. The software, when executed by a processor, can perform the disclosed method. The computing units and other functional units described in this 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 of the above modules / units can be combined into one module / unit, and each of the above modules / units can be further divided into multiple sub-modules / sub-units.

[0147] In the foregoing specification, embodiments have been described with reference to numerous 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 in light of the specification and practice of the invention disclosed herein. The specification and examples are to be considered exemplary only, 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 for illustrative purposes only and is not intended to be limited to any particular order of steps. Thus, those skilled in the art will appreciate that these steps can be performed in a different order while achieving the same method.

[0148] The embodiments can be further described using the following clauses:

[0149] 1. An encoding method implemented by an encoder of video data, the method comprising:

[0150] Performing a first pass of scanning transform coefficients of sub-blocks of a video frame, wherein the first pass of scanning comprises:

[0151] Bypass encoding a parity level flag of the transform coefficients, the parity level flag indicating the parity of the absolute value of the level of the transform coefficients.

[0152] 2. The encoding method according to clause 1, further comprising:

[0153] Before the first pass of scanning, performing a second pass of scanning the transform coefficients, wherein the second pass of scanning comprises:

[0154] Encoding a greater than 1 flag, wherein the greater than 1 flag indicates whether the absolute value is greater than 1;

[0155] Wherein the first pass of scanning further comprises:

[0156] Bypass encoding the parity level flag in response to the greater than 1 flag indicating that the absolute value is greater than 1.

[0157] 3. The encoding method according to clause 2, wherein the sub-block has a plurality of transform coefficients, and performing the second pass of scanning further comprises:

[0158] Scanning the plurality of transform coefficients until the number of context-encoded binary bits reaches a maximum limit; and

[0159] In response to the number of context-encoded binary bits reaching the maximum limit, bypass encoding the absolute value of the level of the transform coefficients not scanned in the second pass, wherein the bypass encoding includes binarizing the absolute value of the non-scanned transform coefficients using Golomb-Rice coding.

[0160] 4. The encoding method according to clause 2 or 3, wherein the second pass of the scanning further comprises:

[0161] encoding an importance flag of the transform coefficient, the importance flag indicating whether the level of the transform coefficient is zero; and

[0162] encoding a greater than 1 flag in response to the importance flag indicating that the level of the transform coefficient is not zero.

[0163] 5. The encoding method according to any one of clauses 2-4, wherein the second pass of the scanning further comprises:

[0164] encoding a greater than 3 flag of the transform coefficient in response to the greater than 1 flag indicating that the absolute value is greater than 1, the greater than 3 flag indicating whether the absolute value is greater than 3.

[0165] 6. The encoding method according to clause 5, further comprising:

[0166] performing a third pass of scanning the transform coefficient after the second pass of the scanning and before the first pass of the scanning, wherein the third pass of the scanning comprises:

[0167] encoding a greater than 5 flag of the transform coefficient in response to the greater than 3 flag indicating that the absolute value is greater than 3, the greater than 5 flag indicating whether the absolute value is greater than 5;

[0168] encoding a greater than 7 flag of the transform coefficient in response to the greater than 5 flag indicating that the absolute value is greater than 5, the greater than 7 flag indicating whether the absolute value is greater than 7; and

[0169] encoding a greater than 9 flag of the transform coefficient in response to the greater than 7 flag indicating that the absolute value is greater than 7, the greater than 9 flag indicating whether the absolute value is greater than 9.

[0170] 7. The encoding method according to clause 6, wherein the first pass of the scanning further comprises:

[0171] encoding a remaining absolute level flag of the transform coefficient in response to the greater than 9 flag indicating that the absolute value is greater than 9, the remaining absolute level flag indicating the remaining absolute value of the level of the transform coefficient.

[0172] 8. The encoding method according to clause 2, further comprising:

[0173] performing a third pass of scanning the transform coefficient after the second pass of the scanning and before the first pass of the scanning, wherein the third pass of the scanning further comprises:

[0174] Encoding the greater than 3 flag of the transform coefficient in response to the greater than 1 flag indicating that the absolute value is greater than 1, where the greater than 3 flag indicates whether the absolute value is greater than 3.

[0175] 9. The encoding method according to clause 8, wherein the third pass of the scanning further includes:

[0176] Encoding the greater than 5 flag of the transform coefficient in response to the greater than 3 flag indicating that the absolute value is greater than 3, where the greater than 5 flag indicates whether the absolute value is greater than 5;

[0177] Encoding the greater than 7 flag of the transform coefficient in response to the greater than 5 flag indicating that the absolute value is greater than 5, where the greater than 7 flag indicates whether the absolute value is greater than 7; and

[0178] Encoding the greater than 9 flag of the transform coefficient in response to the greater than 7 flag indicating that the absolute value is greater than 7, where the greater than 9 flag indicates whether the absolute value is greater than 9.

[0179] 10. The encoding method according to clause 9, wherein the first pass of the scanning further includes:

[0180] Encoding the remaining absolute level flag of the transform coefficient in response to the greater than 9 flag indicating that the absolute value is greater than 9, where the remaining absolute level flag indicates the remaining absolute value of the level of the transform coefficient.

[0181] 11. The encoding method according to any one 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 a reverse order.

[0182] 12. The encoding method according to clause 11, further including:

[0183] Flipping the plurality of transform coefficients before performing the first pass of the scanning.

[0184] 13. The encoding method according to any one of clauses 1-12, wherein the encoding method is a transform skip residual encoding method.

[0185] 14. The encoding method according to any one of clauses 1-13, further including:

[0186] Receiving the video frame; and

[0187] Dividing the video frame into a plurality of sub-blocks.

[0188] 15. A decoding method implemented by a decoder of video data, the method comprising:

[0189] Performing a first pass of scanning transform coefficients of sub - blocks of a video frame, wherein the first pass of scanning comprises:

[0190] Bypass - decoding a parity level flag of the transform coefficients, the parity level flag indicating the parity of the absolute value of the level of the transform coefficients.

[0191] 16. The decoding method according to clause 15, further comprising:

[0192] Before the first pass of scanning, performing a second pass of scanning the transform coefficients, wherein the second pass of scanning comprises:

[0193] Decoding a greater - than - 1 flag, wherein the greater - than - 1 flag indicates whether the absolute value is greater than 1;

[0194] Wherein the first pass of scanning further comprises:

[0195] Bypass - decoding the parity level flag in the first pass in response to the greater - than - 1 flag indicating that the absolute value is greater than 1.

[0196] 17. The decoding method according to clause 16, wherein the second pass of scanning further comprises:

[0197] Decoding a significance flag of the transform coefficients, the significance flag indicating whether the level of the transform coefficients is zero; and

[0198] Decoding the greater - than - 1 flag in response to the significance flag indicating that the level of the transform coefficients is not zero.

[0199] 18. The decoding method according to clause 16, wherein the first pass of scanning further comprises:

[0200] Decoding a greater - than - 3 flag of the transform coefficients in response to the greater - than - 1 flag indicating that the absolute value is greater than 1, the greater - than - 3 flag indicating whether the absolute value is greater than 3;

[0201] Decoding a greater - than - 5 flag of the transform coefficients in response to the greater - than - 3 flag indicating that the absolute value is greater than 3, the greater - than - 5 flag indicating whether the absolute value is greater than 5;

[0202] Decoding a greater - than - 7 flag of the transform coefficients in response to the greater - than - 5 flag indicating that the absolute value is greater than 5, the greater - than - 7 flag indicating whether the absolute value is greater than 7; and

[0203] Decoding the greater than 9 flag of the transform coefficient in response to the greater than 7 flag indicating that the absolute value is greater than 7, the greater than 9 flag indicating whether the absolute value is greater than 9.

[0204] 19. The decoding method according to clause 18 further includes:

[0205] Performing a third pass of scanning the transform coefficients, wherein the third pass of scanning includes:

[0206] Decoding the remaining absolute level flag of the transform coefficient in response to the greater than 9 flag indicating that the absolute value is greater than 9, the remaining absolute level flag indicating the remaining absolute value of the level of the transform coefficient.

[0207] 20. The decoding method according to clause 15, wherein the sub-block has a plurality of transform coefficients, and the first pass of scanning is performed by scanning the plurality of transform coefficients from the lower right corner to the upper left corner of the sub-block.

[0208] 21. The decoding method according to clause 20 further includes:

[0209] Flipping the plurality of transform coefficients before performing the first pass of scanning.

[0210] 22. The decoding method according to any one of clauses 15 - 21, wherein the decoding method is a transform skip residual decoding method.

[0211] 23. A system for encoding video data, the system includes:

[0212] A memory that stores an instruction set; and

[0213] A processor configured to execute the instruction set to cause the system to:

[0214] Perform a first pass of scanning the transform coefficients of a sub-block of a video frame, wherein the first pass of scanning includes:

[0215] Bypass encoding the 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.

[0216] 24. A system for decoding video data, the system includes:

[0217] A memory that stores an instruction set; and

[0218] A processor configured to execute the instruction set to cause the system to:

[0219] Perform a first pass of scanning transform coefficients of sub - blocks of a video frame, where the first pass of the scanning includes:

[0220] Decode the parity level flag of the transform coefficients, where the parity level flag indicates the parity of the absolute value of the level of the transform coefficients.

[0221] 25. An encoding method implemented by an encoder of video data, the method including:

[0222] Perform a first pass of scanning transform coefficients of sub - blocks of a video frame, where:

[0223] Stop performing the first pass of the scanning when the number of context - encoded binary bits reaches a maximum limit,

[0224] Scan a first set of transform coefficients of the sub - blocks in the first pass, and

[0225] The first pass of the scanning includes, for each transform coefficient in the first set of transform coefficients, encoding a significance flag indicating whether the level of the transform coefficient is zero; and perform a second pass of scanning transform coefficients of the sub - blocks, where the second pass of the scanning includes:

[0226] Binarize the absolute value of the level of each transform coefficient in a second set of transform coefficients, where the second set of transform coefficients is not scanned in the first pass.

[0227] 26. The encoding method according to clause 25, where the first pass of the scanning further includes:

[0228] Encode a greater - than - 1 flag of a first transform coefficient in response to the significance flag of the first transform coefficient indicating that the level of the first transform coefficient is not zero, where the first transform coefficient is one of the transform coefficients in the first set 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.

[0229] 27. The encoding method according to clause 26, where the first pass of the scanning further includes:

[0230] Encode a greater - than - 3 flag of the first transform coefficient 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, where the greater - than - 3 flag indicates whether the absolute value of the level of the first transform coefficient is greater than 3, and stop performing the first pass of the scanning when the number of remaining context - encoded binary bits is less than a group limit;

[0231] Encoding the greater than 5 flag of the first transform coefficient in response to the greater than 3 flag indicating that the absolute value of the level of the first transform coefficient is greater than 3, where the greater than 5 flag indicates whether the absolute value of the level of the first transform coefficient is greater than 5;

[0232] Encoding the 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, where the greater than 7 flag indicates whether the absolute value of the level of the first transform coefficient is greater than 7; and

[0233] Encoding the greater than 9 flag of the first transform coefficient 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, where the greater than 9 flag indicates whether the absolute value of the level of the first transform coefficient is greater than 9.

[0234] 28. The encoding method according to clause 27, wherein the second pass of the scanning further includes:

[0235] Encoding the remaining absolute level flag of the first transform coefficient 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, where the remaining absolute level flag indicates the remaining absolute value of the level of the first transform coefficient.

[0236] 29. The encoding method according to any one 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.

[0237] 30. The encoding method according to clause 29, wherein the method further includes:

[0238] Flipping the transform coefficients of the sub - block before performing the first pass.

[0239] 31. The encoding method according to any one of clauses 25 - 30, wherein the encoding method is a transform skip residual encoding method.

[0240] 32. The encoding method according to any one of clauses 25 - 31, wherein binarizing the absolute value of the level of each transform coefficient in the second set of transform coefficients further includes:

[0241] Using the Golomb - Rice code to binarize the absolute value.

[0242] 33. A decoding method implemented by a decoder of video data, the method including:

[0243] Performing a first pass of scanning the transform coefficients of a sub - block of a video frame, wherein:

[0244] Stop performing the first pass of the scan when the number of context-encoded binary bits reaches the maximum limit,

[0245] During the first pass, scan the first set of transform coefficients of the sub-block, and

[0246] The first pass of the scan includes, for each transform coefficient in the first set of transform coefficients, decoding a significance flag indicating whether the level of the transform coefficient is zero; and

[0247] Perform a second pass of scanning the transform coefficients of the sub-block, where the second pass of the scan includes:

[0248] Decode the binary absolute value of the level of each transform coefficient in a second set of transform coefficients, where the second set of transform coefficients is not scanned during the first pass.

[0249] 34. The decoding method according to clause 33, wherein the first pass of the scan further includes:

[0250] Decode a greater-than-1 flag of the first transform coefficient in response to the significance flag of the first transform coefficient indicating that the level of the first transform coefficient is not zero, where the first transform coefficient is one of the transform coefficients in the first set 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.

[0251] 35. The decoding method according to clause 34, wherein the first pass of the scan further includes:

[0252] Decode a greater-than-3 flag of the first transform coefficient 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, where the greater-than-3 flag indicates whether the absolute value of the level of the first transform coefficient being scanned is greater than 3, and stop performing the first pass of the scan when the number of remaining context-encoded binary bits is less than the group limit.

[0253] Decode a greater-than-5 flag of each transform coefficient in the first transform coefficient in response to the greater-than-3 flag indicating that the absolute value of the level of the first transform coefficient is greater than 3, where the greater-than-5 flag indicates whether the absolute value of the level of the first transform coefficient is greater than 5;

[0254] Decode a greater-than-7 flag of each transform coefficient in 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, where the greater-than-7 flag indicates whether the absolute value of the level of the first transform coefficient is greater than 7; and

[0255] Decoding the greater than 9 flag for each of the first transform coefficients 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, the greater than 9 flag indicating whether the absolute value of the level of the first transform coefficient is greater than 9.

[0256] 36. The decoding method according to clause 35, wherein the second pass of the scanning further comprises:

[0257] Decoding the remaining absolute level flag of the first transform coefficient 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, wherein the remaining absolute level flag indicates the remaining absolute value of the level of the first transform coefficient.

[0258] 37. The decoding method according to any one of clauses 33-36, wherein the encoding method is a transform skip residual encoding method.

[0259] 38. The decoding method according to any one of clauses 9-13, wherein decoding the binarized absolute value of the level of each transform coefficient in the second set of transform coefficients further comprises:

[0260] Decoding the absolute value using a Golomb-Rice code.

[0261] 39. A system for encoding video data, the system comprising:

[0262] A memory that stores an instruction set; and

[0263] A processor configured to execute the instruction set to cause the system to:

[0264] Perform a first pass of scanning transform coefficients of sub-blocks of a video frame, wherein:

[0265] Stop performing the first pass of the scanning when the number of context-encoded bits reaches a maximum limit,

[0266] Scan a first set of transform coefficients of the sub-blocks in the first pass, and

[0267] The first pass of the scanning includes, for each transform coefficient in the first set of transform coefficients, encoding a significance flag indicating whether the level of the transform coefficient is zero; and

[0268] Perform a second pass of scanning transform coefficients of the sub-blocks, wherein the second pass of the scanning includes:

[0269] Binarize the absolute value of the level of each transform coefficient in a second set of transform coefficients, wherein the second set of transform coefficients is not scanned in the first pass.

[0270] 40. A system for decoding video data, the system comprising:

[0271] A memory that stores an instruction set; and

[0272] A processor configured to execute the instruction set to cause the system to:

[0273] Perform a first pass scan of transform coefficients of sub - blocks of a video frame, wherein:

[0274] Stop executing the first pass of the scan when the number of context - encoded binary bits reaches a maximum limit,

[0275] Scan a first set of transform coefficients of the sub - blocks in the first pass, and

[0276] The first pass of the scan includes, for each transform coefficient in the first set of transform coefficients, decoding a significance flag indicating whether the level of the transform coefficient is zero; and

[0277] Perform a second pass of scanning the transform coefficients of the sub - blocks, wherein the second pass of the scan includes:

[0278] Decoding the binary - valued absolute value of the level of each transform coefficient in a second set of transform coefficients, wherein the second set of transform coefficients is not scanned in the first pass.

[0279] 41. An encoding method implemented by an encoder of video data, the method comprising:

[0280] Generate a first set of context variables for a luminance component of a video frame;

[0281] Generate a second set of context variables for a chrominance component of the video frame,

[0282] Generate sub - blocks of the video frame; and

[0283] Encode a first set of transform coefficients of the sub - blocks according to the first set of context variables and the second set of context variables.

[0284] 42. The encoding method according to clause 41, wherein encoding the first set of transform coefficients includes:

[0285] Encoding a significance flag of a transform coefficient in the first set of transform coefficients, which indicates whether the level of the transform coefficient is zero, according to 3 context variables from the first set of context variables and 3 context variables from the second set of context variables.

[0286] 43. The encoding method according to clause 42 further includes:

[0287] Generating the 3 context variables from the first set of context variables and the 3 context variables from the second set of context variables, the generating being based on a color component index, a luminance position specifying the position of the sub-block relative to the video frame, and a current coefficient scan position.

[0288] 44. The encoding method according to any one of clauses 41-43, wherein encoding the first set of transform coefficients includes:

[0289] Encoding a greater than x flag of a transform coefficient in the first set of transform coefficients according to 4 context variables from the first set of context variables and 4 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.

[0290] 45. The encoding method according to clause 44 further includes:

[0291] Generating the 4 context variables from the first set of context variables and the 4 context variables from the second set of context variables, the generating being based on a color component index, a luminance position specifying the position of the sub-block relative to the video frame, and a current coefficient scan position.

[0292] 46. The encoding method according to any one of clauses 41-45, wherein encoding the first set of transform coefficients includes:

[0293] Encoding a parity flag of a transform coefficient in the first set of transform coefficients 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.

[0294] 47. The encoding method according to clause 46 further includes:

[0295] Generating the 1 context variable from the first set of context variables and the 1 context variable from the second set of context variables according to a color component index.

[0296] 48. The encoding method according to any one of clauses 41-47, wherein encoding the first set of transform coefficients includes:

[0297] Encoding the coefficient sign flag of a transform coefficient in the first set of transform coefficients according to six context variables from the first set of context variables and six context variables from the second set of context variables, where the coefficient sign flag indicates the sign of the value of the transform coefficient.

[0298] 49. The method according to clause 48, further comprising:

[0299] Generating the six context variables from the first set of context variables and the six context variables from the second set of context variables, the generation being based on the number of significant coefficients of neighbors of the video frame, the luminance position specifying the position of the sub-block relative to the video frame, and the current coefficient scan position.

[0300] 50. The method according to any one of clauses 41 - 49, wherein encoding the first set of transform coefficients includes:

[0301] Encoding the sub-block 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.

[0302] 51. The method according to clause 50, further comprising:

[0303] Generating the three context variables from the first set of context variables and the three context variables from the second set of context variables, the generation being based on the number of significant coefficients of neighbors of the video frame, the luminance position specifying the position of the sub-block relative to the video frame, and the current coefficient scan position.

[0304] 52. A video processing method, comprising:

[0305] Receiving a video bitstream;

[0306] Dividing the video bitstream into a plurality of sub-blocks;

[0307] Generating a first set of context variables for the luminance component of the sub-block;

[0308] Generating a second set of context variables for the chrominance component of the sub-block; and

[0309] Performing context encoding on a first set of transform coefficients of the sub-block according to the first set of context variables and the second set of context variables.

[0310] 53. A decoding method implemented by a decoder of video data, the method comprising:

[0311] Receiving a video frame;

[0312] Divide the video frame into a plurality of sub - blocks;

[0313] Generate a first set of context variables for the luminance component of the video frame;

[0314] Generate a second set of context variables for the chrominance component of the video frame; and

[0315] Decode a first set of transform coefficients of the sub - blocks according to the first set of context variables and the second set of context variables.

[0316] 54. The decoding method according to clause 53, wherein decoding the first set of transform coefficients includes:

[0317] Decode an importance flag of a transform coefficient in the first set of transform coefficients according to 3 context variables from the first set of context variables and 3 context variables from the second set of context variables, the importance flag indicating whether the level of the transform coefficient is zero,

[0318] 55. The decoding method according to clause 54, further comprising:

[0319] Generate the 3 context variables from the first set of context variables and the 3 context variables from the second set of context variables, the generation being based on a color component index, a luminance position of the top - left sample of the current transform block relative to the top - left sample of the video frame, and a current coefficient scan position.

[0320] 56. The decoding method according to any one of clauses 53 - 55, wherein decoding the first set of transform coefficients includes:

[0321] Decode a greater - than - x flag of a transform coefficient in the first set of transform coefficients according to 4 context variables from the first set of context variables and 4 context variables from the second set of context variables.

[0322] 57. The decoding method according to clause 56, further comprising:

[0323] Generate the 4 context variables from the first set of context variables and the 4 context variables from the second set of context variables, the generation being based on a color component index, a luminance position of the top - left sample of the current transform block relative to the top - left sample of the video frame, and a current coefficient scan position.

[0324] 58. The decoding method according to any one of clauses 53 - 57, wherein decoding the first set of transform coefficients includes:

[0325] Decode the parity flag of a transform coefficient in the first set of transform coefficients based on one context variable from the first set of context variables and one context variable from the second set of context variables.

[0326] 59. The decoding method according to clause 58, further comprising:

[0327] Generate the one context variable from the first set of context variables and the one context variable from the second set of context variables, the generation being based on a color component index.

[0328] 60. The decoding method according to any one of clauses 53 - 59, wherein decoding the first set of transform coefficients comprises:

[0329] Decode the context coefficient sign flag of a transform coefficient in the first set of transform coefficients according to six context variables from the first set of context variables and six context variables from the second set of context variables.

[0330] 61. The decoding method according to clause 60, further comprising:

[0331] Generate the six context variables from the first set of context variables and the six context variables from the second set of context variables, the generation being based on the number of significant 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 scan position.

[0332] 62. The decoding method according to any one of clauses 53 - 61, wherein decoding the first set of transform coefficients comprises:

[0333] Decode the sub - block 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.

[0334] 63. The decoding method according to clause 62, further comprising:

[0335] Generate the three context variables from the first set of context variables and the three context variables from the second set of context variables, the generation being based on the number of significant 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 scan position.

[0336] 64. A system for encoding video data, the system comprising:

[0337] A memory that stores an instruction set; and

[0338] A processor configured to execute the instruction set to cause the system to:

[0339] Generate a first set of context variables for a luminance component of a video frame;

[0340] Generate a second set of context variables for a chrominance component of the video frame;

[0341] Generate sub - blocks of the video frame; and

[0342] Encode a first set of transform coefficients of the sub - blocks according to the first set of context variables and the second set of context variables.

[0343] 65. A system for decoding video data, the system comprising:

[0344] A memory that stores an instruction set; and

[0345] A processor configured to execute the instruction set to cause the system to:

[0346] Receive a video frame;

[0347] Segment the video frame into a plurality of sub - blocks;

[0348] Generate a first set of context variables for a luminance component of the video frame;

[0349] Generate a second set of context variables for a chrominance component of the video frame; and

[0350] Decode a first set of transform coefficients of the sub - blocks according to the first set of context variables and the second set of context variables.

[0351] 66. A non - transitory computer - readable medium storing an instruction set executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method comprising:

[0352] Perform a first pass of scanning transform coefficients of sub - blocks of a video frame, wherein the first pass of scanning comprises:

[0353] Bypass - encode a parity - level flag of the transform coefficients, the parity - level flag indicating the parity of the absolute value of the level of the transform coefficients.

[0354] 67. A non - transitory computer - readable medium stores an instruction set executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method including:

[0355] Performing a first pass of scanning transform coefficients of sub - blocks of a video frame, wherein the first pass of scanning includes:

[0356] Bypassing the decoding of the parity - level flag of the transform coefficients, the parity - level flag indicating the parity of the absolute value of the level of the transform coefficients.

[0357] 68. A non - transitory computer - readable medium stores an instruction set executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method including:

[0358] Performing a first pass of scanning transform coefficients of sub - blocks of a video frame, wherein:

[0359] Stopping the execution of the first pass of scanning when the number of context - encoded binary bits reaches a maximum limit,

[0360] Scanning a first set of transform coefficients of the sub - blocks in the first pass, and

[0361] The first pass of scanning includes, for each transform coefficient in the first set of transform coefficients, encoding a significance flag indicating whether the level of the transform coefficient is zero; and performing a second pass of scanning transform coefficients of the sub - blocks, wherein the second pass of scanning includes:

[0362] Binarizing the absolute value of the level of each transform coefficient in a second set of transform coefficients, wherein the second set of transform coefficients is not scanned in the first pass.

[0363] 69. A non - transitory computer - readable medium stores an instruction set executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method including:

[0364] Performing a first pass of scanning transform coefficients of sub - blocks of a video frame, wherein:

[0365] Stopping the execution of the first pass of scanning when the number of context - encoded binary bits reaches a maximum limit,

[0366] Scanning a first set of transform coefficients of the sub - blocks in the first pass, and

[0367] The first pass of the scanning includes, for each transform coefficient in the first set of transform coefficients, decoding a significance 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 includes:

[0368] decoding the binary absolute value of the level of each transform coefficient in a second set of transform coefficients, wherein the second set of transform coefficients is not scanned in the first pass.

[0369] 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 including:

[0370] generating a first set of context variables for a luminance component of a video frame;

[0371] generating a second set of context variables for a chrominance component of the video frame,

[0372] generating sub-blocks of the video frame; and

[0373] encoding a first set of transform coefficients of the sub-blocks according to the first set of context variables and the second set of context variables.

[0374] 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 including:

[0375] receiving a video frame;

[0376] segmenting the video frame into a plurality of sub-blocks;

[0377] generating a first set of context variables for a luminance component of the video frame;

[0378] generating a second set of context variables for a chrominance component of the video frame; and

[0379] decoding a first set of transform coefficients of the sub-blocks according to the first set of context variables and the second set of context variables.

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

Claims

1. An encoding method implemented by an encoder of video data, the method comprising: Performing a first pass scan on transform coefficients of sub - blocks of a video frame, wherein the sub - blocks are subjected to three - pass sub - block scans; Wherein the first pass scan includes: Determining the value of sig_coeff_flag, where sig_coeff_flag indicates whether the level of the transform coefficient is a non - zero value; Encoding coeff_sign_flag and abs_level_gtx_flag[0] in response to sig_coeff_flag indicating that the level of the transform coefficient is non - zero, where coeff_sign_flag represents the sign of the level of the current transform coefficient, and abs_level_gtx_flag[0] indicates whether the absolute value of the level of the current transform coefficient is greater than 1; and; Wherein the second pass scan includes: Encoding abs_level_gtx_flag[1] of the transform coefficient in response to abs_level_gtx_flag[0] indicating that the absolute value is greater than 1, where abs_level_gtx_flag[1] indicates whether the absolute value of the level of the current transform coefficient is greater than 3; Encoding abs_level_gtx_flag[2] of the current transform coefficient in response to abs_level_gtx_flag[1] indicating that the absolute value of the level of the current transform coefficient is greater than 3, where abs_level_gtx_flag[2] indicates whether the absolute value of the level of the current transform coefficient is greater than 5; Encoding abs_level_gtx_flag[3] of the transform coefficient in response to abs_level_gtx_flag[2] indicating that the absolute value of the level of the current transform coefficient is greater than 5, where abs_level_gtx_flag[3] indicates whether the absolute value of the level of the current transform coefficient is greater than 7; And, encoding abs_level_gtx_flag[4] of the transform coefficient in response to abs_level_gtx_flag[3] indicating that the absolute value of the level of the current transform coefficient is greater than 7, where abs_level_gtx_flag[4] indicates whether the absolute value of the level of the current transform coefficient is greater than 9; Wherein the third pass scan includes: Encoding abs_remainder of the current transform coefficient in response to abs_level_gtx_flag[4] indicating that the absolute value of the level of the current transform coefficient is greater than 9, where abs_remainder indicates the remaining absolute value of the level of the transform coefficient; and, in response to the 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 includes: Scanning the plurality of transform coefficients until the number of context - encoded binary bits reaches a maximum limit; And In response to the number of context-encoded binary bits reaching the maximum limit, bypass encoding is performed on the absolute values of the levels of the transform coefficients not scanned in the second pass, where the bypass encoding includes binarizing the absolute values using Golomb-Rice coding.

3. The encoding method according to claim 1, wherein the sub-block has a plurality of transform coefficients, and the first pass of scanning is performed by scanning the plurality of transform coefficients in reverse order.

4. The encoding method according to claim 3, further comprising: Flipping the plurality of transform coefficients before performing the first pass of scanning.

5. 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; and Dividing the video frame into a plurality of sub-blocks.

7. A decoding method implemented by a decoder of video data, the method comprising: Performing a first pass of scanning on the transform coefficients of a sub-block of a video frame, where the sub-block is subjected to three passes of sub-block scanning; wherein the first pass of scanning includes: Decoding the sig_coeff_flag of the transform coefficient, where the sig_coeff_flag indicates whether the level of the transform coefficient is zero; and decoding the coeff_sign_flag and abs_level_gtx_flag[0] in response to the sig_coeff_flag indicating that the level of the transform coefficient is not zero, where the coeff_sign_flag represents the sign of the level of the current transform coefficient, and the abs_level_gtx_flag[0] indicates whether the absolute value of the level of the current transform coefficient is greater than 1; wherein the second pass of scanning includes: Decoding the abs_level_gtx_flag[1] of the transform coefficient in response to the abs_level_gtx_flag[0] indicating that the absolute value of the level of the current transform coefficient is greater than 1, where the abs_level_gtx_flag[1] indicates whether the absolute value of the level of the current transform coefficient is greater than 3; Decoding the abs_level_gtx_flag[2] of the transform coefficient in response to the abs_level_gtx_flag[1] indicating that the absolute value of the level of the current transform coefficient is greater than 3, where the abs_level_gtx_flag[2] indicates whether the absolute value of the level of the current transform coefficient is greater than 5; decoding the abs_level_gtx_flag[3] of the transform coefficient in response to the abs_level_gtx_flag[2] indicating that the absolute value of the level of the current transform coefficient is greater than 5, where the abs_level_gtx_flag[3] indicates whether the absolute value of the level of the current transform coefficient is greater than 7; and decoding the abs_level_gtx_flag[4] of the transform coefficient in response to the abs_level_gtx_flag[3] indicating that the absolute value of the level of the current transform coefficient is greater than 7, where the abs_level_gtx_flag[4] indicates whether the absolute value of the level of the current transform coefficient is greater than 9; wherein the third pass scan includes: decoding the abs_remainder of the transform coefficient in response to the abs_level_gtx_flag[4] indicating that the absolute value is greater than 9, where the abs_remainder indicates the remaining absolute value of the level of the transform coefficient.

8. The decoding method according to claim 7, wherein the second pass scan further includes: in response to the abs_level_gtx_flag[0] indicating that the absolute value is greater than 1 in the 9. The decoding method according to claim 7, wherein the sub-block has a plurality of transform coefficients, and the first pass scan is performed by scanning the plurality of transform coefficients from the lower right corner to the upper left corner of the sub-block.

10. The decoding method according to claim 9, further comprising: flipping the plurality of transform coefficients before performing the first pass scan.

11. The decoding method according to claim 7, wherein the decoding method is a transform skip residual decoding method.

12. A system for encoding video data, the system comprising: a memory that stores an instruction set; and a processor configured to execute the instruction set to cause the system to perform any of the encoding methods of claims 1-6.

13. A system for decoding video data, the system comprising: a memory that stores an instruction set; and a processor configured to execute the instruction set to cause the system to perform any of the decoding methods of claims 7-11.

Citation Information

Patent Citations

  • Coding of last significant transform coefficient

    US20130003835A1

  • Sign hiding techniques for quantized transform coefficients in video coding

    US20140003530A1

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

    US20190052909A1