Transform-skip residual coding of video data

The new bypass coding method for parity flags in transform skip residual coding reduces the number of coding passes to three, addressing complexity issues and enhancing throughput and efficiency in video compression standards.

JP7824465B2Active Publication Date: 2026-03-04ALIBABA GROUP HOLDING LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2025-05-13
Publication Date
2026-03-04

AI Technical Summary

Technical Problem

The existing transform skip residual coding process in video compression standards like VVC requires six coding passes, which complicates hardware implementation and reduces throughput due to differences in scan order and syntax elements between transform residual and skip residual coding.

Method used

A new bypass coding method for parity flags is introduced, allowing all flags to be coded in a single pass, reducing the number of coding passes to three and unifying the coding methods for transform residual and skip residual coding, thereby improving throughput and simplifying hardware implementation.

Benefits of technology

The new method enhances the throughput of the context-adaptive binary arithmetic coding engine by reducing coding passes to three, simplifying hardware implementation, and improving coding efficiency by unifying syntax elements across different coding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007824465000001
    Figure 0007824465000001
  • Figure 0007824465000002
    Figure 0007824465000002
  • Figure 0007824465000003
    Figure 0007824465000003
Patent Text Reader

Abstract

To provide systems and methods for transform-skip residual video data coding and decoding.SOLUTION: A method comprises performing a first pass of scanning a transform coefficient of a sub-block of a video frame, where the first pass of scanning comprises bypass-coding a parity level flag for the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

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

[0002] Technical Field FIELD OF THE DISCLOSURE

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

[0003] background

[0003] In the video compression and decompression industry, new standards for video coding are being developed. For example, the Joint Video Experts Team (JVET) of the ITU-T Video Coding Expert Group (VCEG) and the ISO / IEC Moving Picture Expert 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 at half the bandwidth. Summary of the Invention [Means for solving the problem]

[0004] Disclosure Overview

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

[0005]

[0005] One 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 encoding parity level flags of the transform coefficients, the parity level flags indicating the parity of the absolute values ​​of the levels of the transform coefficients.

[0006]

[0006] Another exemplary method includes performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein the first pass of scanning includes bypass decoding parity level flags of the transform coefficients, the parity level flags indicating the parity of the absolute values ​​of the levels of the transform coefficients.

[0007]

[0007] One exemplary system includes a memory storing a set of instructions and a processor, the processor being 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, the first pass of scanning including bypass encoding parity level flags of the transform coefficients, the parity level flags indicating the parity of the absolute values ​​of the levels of the transform coefficients.

[0008]

[0008] Another exemplary system includes a memory storing a set of instructions and a processor, the processor being 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, the first pass of scanning including bypass decoding parity level flags of the transform coefficients, the parity level flags indicating the parity of the absolute values ​​of the levels of the transform coefficients.

[0009] BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Embodiments and various aspects of the present disclosure are described in the following detailed description and the accompanying drawings, in which the various features illustrated in the figures are not necessarily drawn to scale. [Brief explanation of the drawings]

[0010] [Figure 1] 1 shows a block diagram of an exemplary encoder for a hybrid video encoding system. [Figure 2]

[0011] 1 shows a block diagram of an exemplary decoder for a hybrid video coding system. [Figure 3A]

[0012] 1 shows exemplary pseudocode including transform coding syntax. [Figure 3B]

[0012] An exemplary pseudocode including the syntax for transform coding is shown. [Figure 3C]

[0012] An exemplary pseudocode including the syntax for transform coding is shown. [Figure 3D]

[0012] An exemplary pseudocode including the syntax for transform coding is shown. [Figure 4A]

[0013] 1 shows exemplary pseudo-code including syntax for transform skip residual coding. [Figure 4B]

[0013] Exemplary pseudocode including syntax for transform skip residual coding is shown. [Figure 5]

[0014] 1 illustrates an example method for transform skip residual coding with a reduced number of coding passes to three, according to some embodiments of this disclosure. [Figure 6A]

[0015] 6 illustrates exemplary pseudocode including syntax for the method illustrated in FIG. 5 according to some embodiments of the present disclosure. [Figure 6B] 6 illustrates exemplary pseudocode including syntax for the method illustrated in FIG. 5 according to some embodiments of the present disclosure. [Figure 7]

[0016] 1 illustrates another example method for transform skip residual coding, reducing the number of coding passes to three, according to some embodiments of this disclosure. [Figure 8A]

[0017] 8 illustrates exemplary pseudocode including syntax for the method illustrated in FIG. 7, according to some embodiments of the present disclosure. [Figure 8B] 8 illustrates exemplary pseudocode including syntax for the method illustrated in FIG. 7, according to some embodiments of the present disclosure. [Figure 9]

[0018] 1 illustrates an example backward scan of an 8x8 transform skip block, in accordance with some embodiments of the present disclosure. [Figure 10A]

[0019] 1 illustrates an 8x8 block before being inverted, according to some embodiments of the present disclosure. [Figure 10B]

[0020] 10B illustrates the resulting block after the 8x8 block of FIG. 10A is flipped, according to some embodiments of the present disclosure. [Figure 11]

[0021] 1 illustrates an exemplary multi-pass encoding according to some embodiments of the present disclosure. [Figure 12]

[0022] 1 illustrates an exemplary single-pass encoding method for absolute values ​​of levels, according to some embodiments of the present disclosure. [Figure 13]

[0023] 1 illustrates an example lookup table of Rice parameters, according to some embodiments of the present disclosure. [Figure 14]

[0024] 1 illustrates an example method for transform skip residual coding combined with single-pass bypass coding, reducing the number of coding passes to three, according to some embodiments of this disclosure. [Figure 15A]

[0025] 15 illustrates exemplary pseudocode including bypass encoding syntax combined with the method of FIG. 14 according to some embodiments of the present disclosure. [Figure 15B]15 illustrates exemplary pseudocode including bypass encoding syntax in combination with the method of FIG. 14 according to some embodiments of the present disclosure. [Figure 16]

[0026] 1 illustrates an example method of transform skip residual coding, where a first pass corresponds to context coding and a second pass corresponds to Golomb-Rice coding, according to some embodiments of the present disclosure. [Figure 17A]

[0027] 17 illustrates exemplary pseudocode including bypass encoding syntax for the method of FIG. 16 in accordance with some embodiments of the present disclosure. [Figure 17B] 17 illustrates exemplary pseudocode including bypass encoding syntax for the method of FIG. 16 according to some embodiments of the present disclosure. [Figure 17C] 17 illustrates exemplary pseudocode including bypass encoding syntax for the method of FIG. 16 according to some embodiments of the present disclosure. [Figure 18]

[0028] 10 illustrates an example lookup table of Rice parameters when the minimum bypass encoding value is equal to 0, in accordance with some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0011] Detailed Description

[0029] Reference will now 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 in which the same numbers in different drawings represent the same or similar elements, unless otherwise stated. The implementations described in the following description of the exemplary embodiments do not represent all implementations consistent with the present invention. Instead, these implementations are merely examples of apparatus and methods consistent with aspects related to the present invention as set forth in the appended claims. Certain aspects of the present disclosure are described in more detail below. In the event that terms and definitions set forth herein conflict with terms and / or definitions incorporated by reference, the descriptions in this specification shall control.

[0012]

[0030] A video is a set of still images (or "frames") arranged in time sequence to store visual information. A video capture device (e.g., a camera) can be used to capture and store these images in time sequence, and a video playback device (e.g., a television, computer, smartphone, tablet computer, video player, or any end-user terminal with display capabilities) can be used to display such images in time sequence. In some applications, a video capture device can also transmit the captured video in real time to a video playback device (e.g., a computer with a monitor) for purposes such as research, conferences, or live broadcasts.

[0013]

[0031] To reduce the storage space and transmission bandwidth required for such applications, video can be compressed. For example, video can be compressed before storage and transmission and decompressed before display. Compression and decompression can be performed by software executed by a processor (e.g., a processor in a general-purpose computer) or by dedicated hardware. A module for compression is commonly referred to as an "encoder," and a module for decompression is commonly referred to as a "decoder." Encoders and decoders may be collectively referred to as a "codec." Encoders and decoders can be implemented as any of a variety of suitable hardware, software, or combinations thereof. For example, hardware implementations of encoders and decoders include circuits 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 encoders and decoders include program code, computer-executable instructions, firmware, or any suitable computer-implemented algorithm or process fixed on a computer-readable medium. Video compression and decompression can be implemented by various algorithms or standards, such as MPEG-1, MPEG-2, MPEG-4, or the H.26x series. In some applications, a codec may decompress video from a first encoding standard and recompress the decompressed video using a second encoding standard, in which case the codec may be called a "transcoder."

[0014]

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

[0015]

[0033] In many cases, useful information about an image being coded (called a "target image") may include changes relative to a reference image (e.g., a previously coded or reconstructed image). Such changes may include changes in pixel position, brightness, or color, with position changes being the primary concern. Changes in the position of a group of pixels representing an object may reflect the object's motion between the reference image and the target image.

[0016]

[0034] To achieve the same subjective quality as HEVC / H.265 using half the bandwidth, JVET has been developing technology beyond HEVC using the Joint Exploration Model ("JEM") reference software. Because the coding technology was incorporated into JEM, JEM achieved significantly higher coding performance than HEVC. VCEG and MPEG have also officially begun development of next-generation video compression standards beyond HEVC.

[0017]

[0035] The VVC standard continues to include many encoding techniques that provide better compression performance. VVC is based on the same hybrid video coding system that has been used in recent video compression standards such as HEVC, H.264 / AVC, MPEG2, and H.263. FIG. 1 shows a block diagram of an example encoder of a hybrid video coding system. As shown in FIG. 1, video encoder 200 may perform intra- or inter-coding of blocks within video frames, including video blocks or partitions or subpartitions of video blocks. Intra-coding may rely on spatial prediction to reduce or remove spatial redundancy in video within a given video frame. Inter-coding may rely on temporal prediction to reduce or remove temporal redundancy in video within adjacent frames of a video sequence. Intra-mode may refer to several spatial-based compression modes. Inter-mode (e.g., unidirectional prediction or bidirectional prediction) may refer to several temporal-based compression modes.

[0018]

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

[0019]

[0037] The spatial prediction unit 260 performs spatial prediction (e.g., intra-prediction) on the target block / CU using information about the same image / slice that includes the target block. Spatial prediction may predict the target video block using pixels from already-encoded neighboring blocks within the same video image frame / slice. Spatial prediction may reduce spatial redundancy inherent in video signals.

[0020]

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

[0021]

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

[0022]

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

[0023]

[0041] 2 shows a block diagram of an example decoder for a hybrid video coding system. As shown in FIG. 2, a video bitstream 302 may be unpacked or entropy decoded in an entropy decoding unit 308. Coding mode information may be used to determine whether to select a spatial prediction unit 360 or a temporal prediction unit 362. The prediction mode information may be sent to a corresponding prediction unit to generate a prediction block. For example, motion compensation prediction may be applied by the temporal prediction unit 362 to form a temporal prediction block.

[0024]

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

[0025]

[0043] In VVC (e.g., VVC5), a block may be an M-by-N array of transform coefficients. A transform coefficient may be a scalar quantity considered to be in the frequency domain, associated with a particular one- or two-dimensional frequency index in the transform. A transform coefficient level may be represented by the array TransCoeffLevel[x0][y0][cIdx][xC][yC]. The array indices x0, y0 may specify the location (x0, y0) of the top-left luma sample of the considered transform block relative to the top-left luma sample of the image. The array index cIdx may specify a color component indicator. The array indices xC and yC may specify the transform coefficient location (xC, yC) within the transform block of interest.

[0026]

[0044] In VVC (e.g., VVC5), transform coefficients of a coding block are coded using non-overlapping coefficient groups (or sub-blocks). For each sub-block, normal (or context) coded bins and bypass coded bins are separated in coding order. For example, all normal coded bins of the sub-block are transmitted first, followed by the bypass coded bins. The transform coefficient levels of the sub-block are coded during three passes through the scanning positions. The transform coefficient levels may be the values ​​of the transform coefficients. In the case of context coding, each bin may have a probability model selected by the context. The context may refer to a previously coded syntax element. In the case of bypass coding, a specific bin may be selected to speed up the coding process with little loss in coding efficiency. In bypass coding, a bin may be coded with a set probability (e.g., a probability equal to 0.5).

[0027]

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

[0028]

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

[0029]

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

[0030]

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

[0031]

[0049] For 4x4 sub-blocks, no more than 32 normal coded bins (e.g., sig_coeff_flag, gt1_flag, par_level_flag, and gt3_flag) may be expected to be coded or decoded. For 2x2 chroma sub-blocks, the number of normal coded bins may be limited to 8. After the limit is reached, all bins are coded in bypass mode.

[0032]

[0050] In the new residual coding process adopted by JVET for transform skip residual blocks, the scanning order of coefficients in transform skip residual coding is forward scanning, starting from the top-left position of the transform skip block. The transform skip coefficient levels of a sub-block are coded during six passes through the scanning positions.

[0033]

[0051] In pass 1, sig_coeff_flag, coeff_sign_flag, flags greater than 1 (e.g., abs_level_gtx_flag[0]), and par_level_flag are processed in coding order. If sig_coeff_flag is equal to 1, coeff_sign_flag and abs_level_gtx_flag[0] are coded in order. coeff_sign_flag specifies the sign of the transform coefficient level. abs_level_gtx_flag[0] specifies whether the absolute level is greater than 1. If abs_level_gtx_flag[0] is equal to 1, par_level_flag is additionally coded. par_level_flag specifies the parity of the absolute level minus 2. Before coding the flags, the context-adaptive binary arithmetic coding ("CABAC") engine checks whether context-coded bins are available. If no context-coded bin is available, the flag is bypass-coded.

[0034]

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

[0035]

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

[0036]

[0054] In pass 4, if abs_level_gtx_flag[2] at a given position is equal to 1, then a flag greater than 7 (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 whether a context-coded bin is available. If a context-coded bin is not available, abs_level_gtx_flag[3] is bypass coded.

[0037]

[0055] In pass 5, if abs_level_gtx_flag[3] at a position is equal to 1, a flag greater than 9 (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 whether a context-coded bin is available. If a context-coded bin is not available, abs_level_gtx_flag[4] is bypass coded.

[0038]

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

[0039]

[0057] Figure 3 shows exemplary pseudocode including a syntax for transform coding. For example, the syntax shown in Figure 3 may be used for transform coding in VVC. Figure 4 shows exemplary pseudocode including a syntax for transform skip residual coding. For example, the syntax shown in Figure 4 may be used for transform skip residual coding in VVC.

[0040]

[0058] The current design of transform skip residual coding has several problems. First, the number of coding passes in transform skip residual coding is six. This means that in many cases, the CABAC engine needs to scan a coefficient group six times, which significantly impacts the throughput of CABAC. Second, the number of coding passes in transform skip residual coding is different from the number of coding passes in transform residual coding (e.g., six passes vs. three passes). The difference in the number of coding passes can complicate hardware implementation. Third, the coefficient scan in transform skip residual coding is a forward scan, while the scan in transform residual coding is in a reverse order. The difference in scan order can also complicate hardware implementation. 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, the bypass coding may 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, etc. It is desirable to unify the bypass coding methods of transform residual coding and transform skip residual coding.

[0041]

[0059] 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 a non-zero coefficient position is even or odd. The probability distribution of the parity flag in a transform skip block may be uniform. Therefore, the probability of an even value may be equal to the probability of an odd value. Therefore, bypass coding of the parity flag and the signal parity flag may be applied. This bypass coding may be performed before or after abs_remainder is signaled. The parity flag may be signaled when a flag greater than 1 is equal to 1. In some embodiments, since the total number of context-coded bins may be limited to two bins per sample in a transform block, freeing the context of the parity flag allows other syntax elements with unequal probability distributions (e.g., any flag greater than x coded after the parity flag) to be context-coded, thereby improving coding efficiency.

[0042]

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

[0043]

[0061] In VVC (e.g., VVC5), a total of four coding passes are used to code flags greater than 3 (e.g., abs_level_gtx_flag[1]), flags greater than 5 (e.g., abs_level_gtx_flag[2]), flags greater than 7 (abs_level_gtx_flag[3]), and flags greater than 9 (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, only one coding pass is required to code all flags, which can improve the throughput of CABAC.

[0044]

[0062] In some embodiments, the location of the flag greater than 3 (e.g., abs_level_gtx_flag[1]) may be moved to the first encoding pass. For example, the flag greater than 3 may be signaled when the flag greater than 1 (e.g., abs_level_gtx_flag[1]) is equal to 1. This change allows the coding of the flag greater than 1 and the flag greater than 3 for transform residual coding to be unified, and thereby these two flags are coded in the first encoding pass.

[0045]

[0063] In some embodiments, the number of coding passes of a transform skip level of a sub-block may be reduced to 3. Figure 5 shows an example method of transform skip residual coding in accordance with some embodiments of this disclosure, with the number of coding passes reduced to 3. The method of Figure 5 includes three passes.

[0046]

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

[0047]

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

[0048]

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

[0049]

[0067] Figure 6 shows example pseudocode including syntax for the method shown in Figure 5, according to some embodiments of the present disclosure. Portions of the pseudocode in Figure 6 are shown in italics and illustrate handling of flags greater than 3, greater than 5, greater than 7, greater than 9, and parity level flags.

[0050]

[0068] It should be understood that the method of Figure 5 may be implemented by an encoder (e.g., the encoder of Figure 1). In some embodiments, the encoder may receive a video frame. For a decoder (e.g., the decoder of Figure 2), the method may include three passes.

[0051]

[0069] In pass 1, the coefficients of a sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the sub-block to the last scan position of that sub-block. Each coefficient may have a significance flag (e.g., sig_coeff_flag). The significance flag may be decoded. The significance flag may specify whether the level is a non-zero value. If the significance flag of a 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 a flag greater than 1 (e.g., abs_level_gtx_flag[0]) may be decoded.

[0052]

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

[0053]

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

[0054]

[0072] In some embodiments, the decoder may receive a video bitstream.

[0055]

[0073] 7 illustrates another exemplary method of transform skip residual coding in accordance with some embodiments of this disclosure, reducing the number of coding passes to 3. The method of FIG. 7 may include three passes.

[0056]

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

[0057]

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

[0058]

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

[0059]

[0077] In comparison to the method of Figure 5, the method of Figure 7 handles encoding of flags greater than 3 in pass 1 instead of pass 2. Figure 8 shows example pseudocode including syntax for the method shown in Figure 7 according to some embodiments of the present disclosure. Portions of the pseudocode in Figure 8 are italicized and illustrate handling of flags greater than 3, greater than 5, greater than 7, greater than 9, and parity level flags.

[0060]

[0078] It should be understood that the method of Figure 7 may be implemented by an encoder (e.g., the encoder of Figure 1). In some embodiments, the encoder may receive a video frame. For a decoder (e.g., the decoder of Figure 2), the method may include three passes.

[0061]

[0079] In pass 1, the coefficients of a subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of that subblock. Each coefficient may have a significance flag (e.g., sig_coeff_flag). The significance flag is decoded. The significance flag may indicate whether the level is a non-zero value. If the significance flag of a 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]) may be decoded. 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 is equal to 1), the greater than 3 flag (e.g., abs_level_gtx_flag[1]) may be decoded.

[0062]

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

[0063]

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

[0064]

[0082] In some embodiments, the decoder may receive a video bitstream.

[0065]

[0083] In some embodiments, the scan order of the transform skip residual block may 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 may be changed from a forward scan to a backward scan. Figure 9 shows an example backward scan of an 8x8 transform skip block in accordance with some embodiments of the present disclosure. As shown in Figure 9, the scan of coefficients starts with the coefficient in the lower right corner and ends with the coefficient in the upper left corner. It should be understood that the scan order shown in Figure 9 may be applied by the methods shown in Figures 5 and 7.

[0066]

[0084] In some embodiments, a backward scan may be performed after the transform block is inverted. Figures 10A and 10B show an example inversion of an 8x8 block according to some embodiments of the present disclosure. As shown in Figures 10A and 10B, after inverting the block, the position of the residual coefficient in the upper left is moved to the position in the lower right. After the block is inverted, a backward scan (e.g., the backward scan in Figure 9) may be performed.

[0067]

[0085] In some embodiments, bypass coding may be performed in multiple passes. Figure 11 shows exemplary multi-pass coding according to some embodiments of the present disclosure. In some embodiments, the multi-pass coding shown in Figure 11 may be performed in VVC (e.g., VVC5). The number of context-coded bins in Figure 11 may be assumed to have reached a maximum limit at the position of the first pass (shown as black dots in Figure 11). As shown in Figure 11, flags (e.g., flags greater than 3, flags greater than 5, flags greater than 7, flags greater than 9, etc.) may be bypass coded in multiple coding passes.

[0068]

[0086] In some embodiments, single-pass bypass coding of absolute level values ​​may be implemented. Figure 12 illustrates an exemplary single-pass coding method for absolute level values ​​according to some embodiments of the present disclosure. As shown in Figure 12, when a context-coded bin reaches a maximum limit (e.g., shown as a black dot in Figure 12), the CABAC engine may begin bypass coding of the remainder of the absolute levels using Golomb-Rice coding.

[0069]

[0087] 13 shows an example lookup table of rice parameters according to some embodiments of the present disclosure. According to FIG. 13, the rice parameters may be represented by the variable cRiceParam. The location of the absolute sum may be represented by the variable locSumAbs.

[0070]

[0088] In some embodiments, a Rice parameter (e.g., cRiceParam) may be derived as follows: Given the transform skip block array AbsLevel[x][y], the top-left luma location (x0, y0), and the target coefficient scan location (xC, yC), assuming minLevel is the minimum bypass coding value, if none of a coefficient's flags are context coded, then minLevel for that coefficient is 0. If all of the flags are context coded, then minLevel is equal to 10.

[0071]

[0089] In some embodiments, the variable locSumAbs may be derived as specified by the following pseudocode: locSumAbs = 0 if (xC > 0) locSumAbs += AbsLevel[xC - 1][yC] if (yC > 0) locSumAbs += AbsLevel[xC][yC -1] locSumAbs += ( 10 - minLevel) locSumAbs = Clip3 (0, 31, LocSumAbs)

[0072]

[0090] In some embodiments, single-pass bypass coding may be combined with the method shown in Figure 7. For example, Figure 14 shows an example method of transform skip residual coding combined with single-pass bypass coding, reducing the number of coding passes to three, according to some embodiments of the present disclosure. The method of Figure 14 includes three passes.

[0073]

[0091] In pass 1 (step 1402), the coefficients of a sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the sub-block to the last scan position. For each coefficient, if the number of remaining context-coded bins is greater than or equal to the group limit, the following may be performed. For example, in some embodiments, it is more efficient to code all of the flags in the group using either context coding or bypass coding. As a result, if the number of context-coded bins is less than the group limit, it is more efficient to code all of the remaining flags with bypass coding than to code some of the remaining flags with context coding and other flags with bypass coding. In this example, there may be four flags coded in the group in pass 1 (e.g., significance flag, signal coefficient sign flag, greater than 1 flag, and greater than 3 flag). Thus, given a group limit of 4, for each coefficient, if the number of remaining context-coded bins is greater than or equal to 4, the following may be performed: If the significance flag (e.g., sig_coeff_flag) indicates that the level is a non-zero value (e.g., the significance flag is equal to 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]) may be coded. 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), then the greater than 3 flag (e.g., abs_level_gtx_flag[1]) may be coded. In some embodiments, the coefficients may be scanned until the context-coded bin reaches a maximum limit (e.g., the black dot in FIG. 12), after which the scanning stops at the position as the last position of the first pass.

[0074]

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

[0075]

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

[0076]

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

[0077]

[0095] In pass 3(a) (step 1410), coefficients up to iFirstPassBypassPos may be scanned starting from the first scan position of the subblock. For each coefficient, the following may be performed: If a flag greater than 1 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) may be bypass coded; if a flag greater than 9 indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), coding of the remaining absolute level (e.g., abs_remainder) may be handled by a non-binary syntax element that is binarized with a Golomb-Rice code; the resulting bins may be coded in the bypass mode of the arithmetic coding engine.

[0078]

[0096] In pass 3(b) (step 1412), coefficients may be scanned starting from iFirstPassBypassPos to the last scan position. For each coefficient, the absolute level (e.g., dec_abs_level) may be coded by a non-binary syntax element binarized with a Golomb-Rice code. The resulting bins may be coded in the bypass mode of the arithmetic coding engine. A signal coefficient sign flag may also be coded.

[0079]

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

[0080]

[0098] Figure 15 shows example pseudocode including syntax for bypass encoding combined with the method of Figure 14, according to some embodiments of the present disclosure. Portions of the pseudocode in Figure 15 are shown in italics, illustrating handling of flags greater than 3, greater than 5, greater than 7, greater than 9, and parity level flags.

[0081]

[0099] In some embodiments, a two-pass coding method may be used. For example, in pass 1, all of the flags may be context coded, and in pass 2, Golomb-Rice coding may be used for bypass coding. Figure 16 illustrates an example method of transform skip residual coding, in which the first pass corresponds to context coding and the second pass corresponds to Golomb-Rice coding, according to some embodiments of the present disclosure. The method of Figure 16 includes two passes.

[0082]

[0100] In pass 1 (step 1602), the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the sub-block to the last scan position. For each coefficient, if the remaining number of context-coded bins is 8 or greater, the following may be performed: A significance flag (e.g., sig_coeff_flag) may be context-coded. If the significance flag indicates that the level is non-zero (e.g., the significance flag is equal to 1), a coefficient sign flag (e.g., coeff_sign_flag) and a flag greater than 1 (e.g., abs_level_gtx_flag[0]) may be signaled. If the flag greater than 1 indicates that the absolute level is greater than 1 (e.g., the flag greater than 1 is equal to 1), a parity level flag (e.g., par_level_flag) and a flag greater than 3 (e.g., abs_level_gtx_flag[1]) may be coded. The parity level flag may specify a parity of the absolute level minus 2. The flag greater than 3 may specify whether the absolute level is greater than 3. If the flag greater than 3 indicates that the absolute level is greater than 3 (e.g., the flag greater than 3 is equal to 1), then the flag greater than 5 (e.g., abs_level_gtx_flag[2]) may be coded. If the flag greater than 5 indicates that the absolute level is greater than 5 (e.g., the flag greater than 5 is equal to 1), then the flag greater than 7 (e.g., abs_level_gtx_flag[3]) may be coded. If the flag greater than 7 indicates that the absolute level is greater than 7 (e.g., the flag greater than 7 is equal to 1), then the flag greater than 9 (e.g., abs_level_gtx_flag[4]) may be coded. The flag greater than 9 may specify whether the absolute level of the level is greater than 9. In some embodiments, coefficients may be scanned until the context-coded bin reaches a maximum limit (e.g., the black point in FIG. 12), after which the scan stops at the position as the last position of the first pass.

[0083]

[0101] After the end of pass 1 and before the start of pass 2, a first pass bypass position variable (iFirstPassBypassPos) may be set according to the last position of the previous pass (step 1604). In some embodiments, the first pass bypass position variable may be set to the last position of the previous pass plus one. The first pass bypass position variable may represent the starting position where absolute level (e.g., dec_abs_level) syntax is signaled. Coefficients whose scan position is less than the first pass bypass position may be partially signaled via context coding in pass 1, and the remaining coefficients may be signaled in pass 2(a). In some embodiments, if a coefficient's scan position is greater than or equal to the first pass bypass position variable, none of that coefficient's flags are context coded, and the complete coefficient and sign may be signaled using bypass coding in pass 2(b).

[0084]

[0102] In pass 2(a) (step 1606), coefficients may be scanned starting from the first scan position of the subblock to the location of the first pass bypass position variable minus 1. For each coefficient, the following may be performed: If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the remaining absolute level (e.g., abs_remainder) may be binarized using Golomb-Rice coding, and the resulting bins may be coded in the bypass mode of the arithmetic coding engine.

[0085]

[0103] In pass 2(b) (step 1608), coefficients may be scanned starting from the first pass bypass position to the last scan position. For each coefficient, the following may be performed: The absolute level (e.g., dec_abs_level) may be binarized with a Golomb-Rice code, and the resulting bins may be coded 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) may be bypass coded.

[0086]

[0104] It should be understood that the method of Figure 16 may be implemented by an encoder (e.g., the encoder of Figure 1). In some embodiments, the encoder may receive the video frames. It should be understood that the encoded video frames from the method of Figure 17 may be decoded using a decoder (e.g., the decoder of Figure 2). In some embodiments, the decoding method may include two passes.

[0087]

[0105] In pass 1, the coefficients of a sub-block are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the sub-block to the last scan position. For each coefficient, if the remaining number of context-coded bins is equal to or greater than the group limit, the following may be performed. For example, the group limit may be 8, indicating the number of various 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) that are coded in pass 1. The significance flag (e.g., sig_coeff_flag) may be context decoded. If the significance flag indicates that the level is non-zero (e.g., the significance flag is equal to 1), the coefficient sign flag (e.g., coeff_sign_flag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) may be signaled. If the flag greater than 1 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]) may be decoded. The parity level flag may specify parity at the absolute level minus 2. The greater than 3 flag may specify whether the absolute level is greater than 3. If the flag greater than 3 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]) may be decoded. If the flag greater than 5 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]) may be decoded. If the greater than 7 flag indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), then the greater than 9 flag (e.g., abs_level_gtx_flag[4]) may be decoded. The greater than 9 flag may specify whether the absolute level of the level is greater than 9.In some embodiments, coefficients may be scanned until the context-coded bin reaches a maximum limit (e.g., the black point in FIG. 12), after which the scan stops at the position as the last position of the first pass.

[0088]

[0106] After the end of pass 1 and before the start of pass 2, a first pass bypass position variable (iFirstPassBypassPos) may be set according to the last position of the previous pass. In some embodiments, the first pass bypass position variable may be set to the last position of the previous pass plus one. The first pass bypass position variable may represent the starting position where absolute level (e.g., dec_abs_level) syntax is signaled. Coefficients whose scan position is less than the first pass bypass position may be partially signaled via context encoding in pass 1, and the remaining coefficients may be signaled in pass 2(a). In some embodiments, if a coefficient's scan position is greater than or equal to the first pass bypass position variable, none of that coefficient's flags are context decoded, and the complete coefficient and sign may be signaled using bypass decoding in pass 2(b).

[0089]

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

[0090]

[0108] In pass 2(b), coefficients may be scanned starting from the first pass bypass position to the last scan position. For each coefficient, the following may be performed: The binarized absolute level (e.g., dec_abs_level) may be decoded with a Golomb-Rice code, and the resulting bins may 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) may be bypass decoded.

[0091]

[0109] Figure 17 shows example pseudocode including bypass encoding syntax for the method of Figure 16, according to some embodiments of the present disclosure. Portions of the pseudocode in Figure 17 are shown in italics, illustrating the processing of the first pass bypass location and pass 2(b).

[0092]

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

[0093]

[0111] In some embodiments, the Rice parameter cRiceParam may be derived as follows: Given an array TransCoeffLevel[xC][yC] as the coefficient value at scan location (xC, yC) and a value minLevel as the minimum bypass coding value, if none of a coefficient's flags are context coded, then the coefficient's minLevel is 0. If all of the flags are context coded, then minLevel is equal to 10. The variable locSumAbs may be derived as specified by the following pseudocode: locSumAbs = 0 if (xC > 0) locSumAbs += Abs(TransCoeffLevel[xC - 1][yC]) if (yC > 0) locSumAbs += Abs(TransCoeffLevel[xC][yC -1]) locSumAbs = locSumAbs - 2*minLevel locSumAbs = Clip3 (0, 31, LocSumAbs)

[0094]

[0112] 18 illustrates an example lookup table for Rice parameters when the minimum bypass encoding value is equal to 0, in accordance with some embodiments of the present disclosure. As shown in FIG. 18, the Rice parameters may be represented by the variable cRiceParam. The location of the absolute sum may be represented by the variable locSumAbs.

[0095]

[0113] In some embodiments, two separate lookup tables may be used to derive the Rice parameters based on minLevel: If minLevel is equal to 0, the table shown in Figure 18 may be used. If minLevel is not equal to 0, the table shown in Figure 13 may be used.

[0096]

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

[0097]

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

[0098]

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

[0099]

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

[0100]

[0118] In some embodiments, in VVC (e.g., VVC7), transform skip mode is possible for both luma and chroma components, and both types of components may share the same context variables. The context variables may be variables specified for the adaptive binary arithmetic decoding process of a bin by an equation involving recently decoded bins. However, the signal statistics of luma and chroma blocks may differ. As a result, in some embodiments of the present disclosure, different context variables may be used for the luma and chroma components. Syntax elements affected by the proposed context model extension include significant coefficient flag (e.g., sig_coeff_flag), abs_level_gtx_flag[n][j] (e.g., j = 0 to 4), parity flag (e.g., par_level_flag), signal coefficient sign flag (e.g., coeff_sign_flag), and coded_sub_block_flag (e.g., coded_sub_block_flag shown in FIG. 3).

[0101]

[0119] In VVC (e.g., VVC7), three context variables may be used to encode sig_coeff_flag for transform skip mode. In some embodiments, a total of six context variables (e.g., three for luma and three for chroma) may be used to encode sig_coeff_flag for transform skip mode. The context index for encoding sig_coeff_flag for transform skip mode may be derived from the number of significant coefficients in the neighbors (e.g., above and left). In some embodiments, the context index may refer to the identifier of the context variable. For example, if there are six context variables available, the context index for the first context variable may be 0, the context index for the second context variable may be 1, etc. The input to this process may be a color component index cIdx, a luma location (x0, y0), and a coefficient scan location (xC, yC) of interest. The luma location (x0, y0) may specify a particular sample (e.g., the top-left sample) of the target transform block relative to a particular sample (e.g., the top-left sample) of the target image. The output of this process may be a coding index variable ctxInc. In some embodiments, the variable ctxInc may be derived according to the following pseudocode: locNumSig = 0 if (xC > 0) locNumSig += sig_coeff_flag[xC - 1][yC] if (yC > 0) locNumSig += sig_coeff_flag[xC][yC - 1] if (cIdx == 0) / / For example, for the luma component, ctxInc can be derived as follows: ctxInc = locNumSig else / / For example, for the chroma component, ctxInc can be derived as follows: ctxInc = locNumSig + 3

[0102]

[0120] In VVC (e.g., VVC7), four context variables may be used to encode abs_level_gtx_flag[n][0] for transform skip mode. In some embodiments, a total of eight context variables (four for luma and four for chroma) may be used to encode abs_level_gtx_flag[n][0] for transform skip mode. The context index for encoding abs_level_gtx_flag[n][0] for transform skip may be derived from the number of significant coefficients in the neighbors (e.g., above and left). The inputs to this process may be a color component index cIdx, a luma location (x0, y0), and a target coefficient scan location (xC, yC). The luma location (x0, y0) may specify a particular sample (e.g., the top-left sample) of a target transform block relative to a particular sample (e.g., the top-left sample) of a target image. The output of this process may be a coding index variable ctxInc. In some embodiments, the variable ctxInc may be derived according to the following pseudocode: if (BdpcmFlag[x0][y0][cIdx] == 1) ctxInc = 3 else if (xC > 0 and yC > 0) ctxInc = sig_coeff_flag[xC - 1][yC] + sig_coeff_flag[xC][yC - 1] else if (xC > 0) ctxInc = sig_coeff_flag[xC - 1][yC] else if (yC > 0) ctxInc = sig_coeff_flag[xC][yC - 1] else ctxInc = 0 if (cIdx > 0) ctxInc = ctxInc + 4

[0103]

[0121] In VVC (e.g., VVC7), one context variable may be used to encode par_level_flag for transform skip mode. In some embodiments, a total of two context variables (one for luma and one for chroma) may be used to encode par_level_flag for transform skip mode. The context index for encoding par_level_flag for transform skip may be derived as follows: The input to this process may be a color component index cIdx. The output of this process is a coding index variable ctxInc. In some embodiments, the variable ctxInc may be derived according to the following pseudocode: if (cIdx == 0) ctxInc = 0 else ctxInc = 1

[0104]

[0122] In some embodiments, separate context variables for luma and chroma may be used to encode abs_level_gtx_flag for transform skip mode. The context index for encoding abs_level_gtx_flag for transform skip may be derived as follows: The input to this process may be a color component index cIdx. The output of this process may be a coding index variable ctxInc. In some embodiments, the variable ctxInc may be derived as follows: The context index for the syntax element abs_level_gtx_flag[n][j] (j > 0) is derived as ctxInc = j - 1, and for chroma components (e.g., cIdx greater than 0), the context index is incremented as ctxInc = ctxInc + 4.

[0105]

[0123] In VVC (e.g., VVC7), six context variables may be used to encode the coeff_sign_flag for transform skip mode. In some embodiments, a total of 12 context variables (six for luma and six for chroma) may be used to encode the coeff_sign_flag for transform skip mode. The context index for encoding the coeff_sign_flag for transform skip mode may be derived from the coeff_sign_flag of neighbors (e.g., the upper and left neighbors). The inputs to this process may be a color component index cIdx, a luma location (x0, y0), and a target coefficient scan location (xC, yC). The luma location (x0, y0) may specify a particular sample (e.g., the top-left sample) of a target transform block relative to a particular sample (e.g., the top-left sample) of a target image. The output of this process may be a coding index variable ctxInc. In some embodiments, the variables leftSign and aboveSign may be derived according to the following pseudocode: if (xC == 0) leftSign = 0 else leftSign = CoeffSignLevel[xC - 1][yC] if (yC == 0) aboveSign = 0 else aboveSign = CoeffSignLevel[xC][yC - 1]

[0106]

[0124] In some embodiments, the variable ctxInc may be derived according to the following pseudocode: if ((leftSign == 0 and aboveSign == 0) or (leftSign == aboveSign)) if (BdpcmFlag[x0][y0][cIdx] == 0) ctxInc = 0 else ctxInc = 3 else if (leftSign >= 0 and aboveSign >= 0) if (BdpcmFlag[x0][y0][cIdx]) ctxInc = 1 else ctxInc = 4 else if (BdpcmFlag[x0][y0][cIdx]) ctxInc = 2 else ctxInc = 5 if (cIdx > 0) ctxInc = ctxInc + 6

[0107]

[0125] In VVC (e.g., VVC7), three context variables may be used to encode coded_sub_block_flag for transform skip mode. coded_sub_block_flag may be a sub-block flag that specifies whether the transform coefficient level of the sub-block is equal to 0. For example, if coded_sub_block_flag[xS][yS] is equal to 0, the transform coefficient level of the sub-block at location (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 location (xS, yS) has a non-zero value. In some embodiments, a total of six context variables (three for luma and three for chroma) may be used to encode coded_sub_block_flag for transform skip mode. The context index for encoding coded_sub_block_flag for transform skip mode may be derived from the coded_sub_block_flag of the upper and left neighbors. Inputs to this process may be color component index cIdx, luma location (x0, y0), target sub-block scan location (xS, yS), previously decoded bins of syntax element coded_sub_block_flag, binary logarithm of transform block width log2TbWidth, and transform block height log2TbHeight. Luma location (x0, y0) may specify the top-left sample of the target transform block relative to the top-left sample of the target image. The output of this process may be a coding index variable ctxInc. In some embodiments, the variables log2SbWidth and log2SbHeight may be derived according to the following pseudocode: if (minimum (log2TbWidth, log2TbHeight) < 2) log2SbWidth = 1 else log2SbHeight = log2SbWidth

[0108]

[0126] In some embodiments, the variables log2SbWidth and log2SbHeight may be modified according to the following pseudocode: if (log2TbWidth < 2 and cIdx == 0) log2SbWidth = log2TbWidth log2SbHeight = 4 - log2SbWidth else if (log2TbHeight < 2 and cIdx == 0) log2SbHeight = log2TbHeight log2SbWidth = 4 - log2SbHeight

[0109]

[0127] In some embodiments, the variable csbfCtx may be initialized as 0 and modified according to the following pseudocode: if (xS > 0) csbfCtx = csbfCtx + coded_sub_block_flag[xS - 1][yS] if (yS > 0) csbfCtx = csbfCtx + coded_sub_block_flag[xS][yS - 1]

[0110]

[0128] In some embodiments, the context index variable ctxInc may be derived using the color component indices cIdx and csbfCtx according to the following pseudocode: if (cIdx == 0) ctxInc = csbfCtx else ctxInc = 3 + csbfCtx

[0111]

[0129] In some embodiments, a non-transitory computer-readable storage medium containing instructions is also provided, which may be executed by a device (such as the disclosed encoders and decoders) to perform the above-described methods. Common forms of non-transitory media include, for example, a floppy disk, a flexible disk, a hard disk, a solid-state drive, a magnetic tape, or any other magnetic data storage medium, a CD-ROM, any other optical data storage medium, any physical medium with a pattern of holes, RAM, PROM, and EPROM, FLASH-EPROM or any other flash memory, NVRAM, cache, registers, any other memory chip or cartridge, and networked versions thereof. A device may include one or more processors (CPUs), input / output interfaces, network interfaces, and / or memory.

[0112]

[0130] It should be noted that, as used herein, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another and do not require or imply any actual relationship or order between those entities or operations. Furthermore, the words "comprising," "having," "containing," and "including," as well as other similar forms, are intended to be equivalent in meaning and open-ended in that the item or items following any one of these words are not meant to be an exhaustive listing of such item or items or to be limited only to the listed item or items.

[0113]

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

[0114]

[0132] It should be understood that the above embodiments can be implemented by hardware, or software (program code), or a combination of hardware and software. If implemented by software, the software can be stored in the above-mentioned computer-readable medium. When executed by a processor, the software can perform the disclosed methods. 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. It will also be understood by those skilled in the art that multiple of the above modules / units can be combined into one module / unit, and that each of the above modules / units can be further divided into multiple sub-modules / sub-units.

[0115]

[0133] 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 will occur to those skilled in the art from a consideration of the specification and practice of the invention disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the invention being indicated by the following claims. It is also intended that the sequence of steps depicted in the figures is for illustrative purposes only and is not intended to be limited to any particular sequence of steps. As such, one skilled in the art will recognize that steps may be performed in different orders while performing the same method.

[0116]

[0134] The following clauses can be used to further describe the embodiments. 1. 1. A method of encoding performed by an encoder of video data, comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; the first pass of scanning includes bypass coding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; Encoding method. 2. performing a second pass of scanning the transform coefficients before the first pass of scanning; a second pass of scanning includes encoding a greater than one flag, the greater than one flag indicating whether the absolute value is greater than one; the first pass of scanning further includes bypass encoding the parity level flag in response to a flag greater than 1 indicating an absolute value greater than 1; 1. The encoding method according to clause 1. 3. performing a second pass of scanning the sub-blocks having a plurality of transform coefficients; scanning the plurality of transform coefficients until the number of context-coded bins reaches a maximum limit; bypass coding absolute values ​​of levels of transform coefficients that are not scanned in the second pass in response to the number of context-coded bins reaching a maximum limit, the bypass coding including binarizing the absolute values ​​of the transform coefficients that are not scanned using Golomb-Rice coding; 3. The encoding method of clause 2, further comprising: 4. The second pass to scan is encoding a significance flag of the transform coefficient, the significance flag indicating whether the level of the transform coefficient is zero; encoding a flag greater than 1 in response to the significance flag indicating that the level of the transform coefficient is not zero; 4. The encoding method of clause 2 or 3, further comprising: 5. The second pass to scan is further comprising: encoding a greater-than-three flag of the transform coefficient in response to the greater-than-one flag indicating that the absolute value is greater than one, the greater-than-three flag indicating whether the absolute value is greater than three; The encoding method according to any one of clauses 2 to 4. 6. performing a third pass of scanning the transform coefficients after the second pass of scanning and before the first pass of scanning; The third pass to scan is encoding a greater-than-five flag of the transform coefficient in response to the greater-than-three flag indicating that the absolute value is greater than three, the greater-than-five flag indicating whether the absolute value is greater than five; 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; 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; Including 5. The encoding method according to clause 5. 7. The first pass to scan is and 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 an absolute value of the remaining level of the transform coefficient. 6. The encoding method according to clause 6. 8. performing a third pass of scanning the transform coefficients after the second pass of scanning and before the first pass of scanning; The third pass to scan is encoding a greater-than-three flag of the transform coefficient in response to the greater-than-one flag indicating that the absolute value is greater than one, the greater-than-three flag indicating whether the absolute value is greater than three; Further comprising: 2. The encoding method according to clause 2. 9. The third pass to scan is encoding a greater-than-five flag of the transform coefficient in response to the greater-than-three flag indicating that the absolute value is greater than three, the greater-than-five flag indicating whether the absolute value is greater than five; 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; 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; 9. The encoding method of clause 8, further comprising: 10. The first pass to scan is and 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 an absolute value of the remaining level of the transform coefficient. 9. The encoding method according to clause 9. 11. 11. The encoding method of any one of clauses 1 to 10, 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. 12. Inverting the plurality of transform coefficients before performing the first pass of scanning 12. The encoding method of clause 11, further comprising: 13. 13. The coding method according to any one of clauses 1 to 12, wherein the coding method is a transform skip residual coding method. 14. receiving a video frame; Dividing a video frame into a number of sub-blocks; 14. The encoding method of any one of clauses 1 to 13, further comprising: 15. 1. A decoding method implemented by a decoder of video data, comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; the first pass of scanning includes bypass decoding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; Decryption method. 16. performing a second pass of scanning the transform coefficients before the first pass of scanning; a second pass of scanning includes decoding a greater than one flag, the greater than one flag indicating whether the absolute value is greater than one; the first pass of scanning further comprising: bypass decoding the parity level flag in the first pass in response to the flag being greater than 1 indicating an absolute value greater than 1; Decryption method as described in clause 15. 17. The second pass to scan is decoding a significance flag of the transform coefficient, the significance flag indicating whether the level of the transform coefficient is zero; decoding a flag greater than 1 in response to the significance flag indicating that the level of the transform coefficient is not zero; 17. The decryption method of clause 16, further comprising: 18. The first pass to scan is decoding a greater-than-three flag of the transform coefficient in response to the greater-than-one flag indicating that the absolute value is greater than one, the greater-than-three flag indicating whether the absolute value is greater than three; decoding 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; decoding 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; decoding 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; 17. The decryption method of clause 16, further comprising: 19. performing a third pass of scanning the transform coefficients; a third pass of scanning includes decoding 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 an absolute value of the remaining level of the transform coefficient; Decryption method as described in clause 18. 20. a sub-block having a plurality of transform coefficients; 16. The decoding method of clause 15, wherein the first pass of scanning is performed by scanning the plurality of transform coefficients from a lower right corner of the sub-block to an upper left corner of the sub-block. twenty one. Inverting the plurality of transform coefficients before performing the first pass of scanning 21. The method of claim 20, further comprising: twenty two. 22. The decoding method according to any one of clauses 15 to 21, wherein the decoding method is a transform skip residual decoding method. twenty three. 1. A system for encoding video data, the system comprising: a memory storing a set of instructions; a processor, the processor executing a set of instructions to configured to cause the system to perform a first pass of scanning transform coefficients of a sub-block of a video frame; the first pass of scanning includes bypass coding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; A system for encoding video data. twenty four. 1. A system for decoding video data, the system comprising: a memory storing a set of instructions; a processor, the processor executing a set of instructions to configured to cause the system to perform a first pass of scanning transform coefficients of a sub-block of a video frame; a first pass of scanning includes decoding a parity level flag of the transform, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; A system for decoding video data. twenty five. 1. A method of encoding performed by an encoder of video data, comprising: performing a first pass scanning transform coefficients of a sub-block of a video frame; performing a second pass scanning the transform coefficients of the subblock; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; a first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes encoding, for each of the first set of transform coefficients, a significance flag indicating whether a level of the transform coefficient is zero; a second pass of scanning includes binarizing the absolute value of the level for each of the second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; Encoding method. 26. The first pass to scan is further comprising: encoding a flag greater than 1 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, wherein the first transform coefficient is one of a first set of transform coefficients, and the flag greater than 1 indicates whether the absolute value of the level of the first transform coefficient is greater than 1; 25. The encoding method according to clause 25. 27. The first pass to scan is coding a flag greater than 3 of the first transform coefficient in response to the flag greater than 1 indicating that the absolute value of the level of the first transform coefficient is greater than 1, wherein the flag greater than 3 indicates whether the absolute value of the level of the first transform coefficient is greater than 3, and performing a first pass of scanning is stopped when the number of remaining context-coded bins is less than a group limit; encoding a flag greater than 5 of the first transform coefficient in response to the flag greater than 3 indicating that the absolute value of the level of the first transform coefficient is greater than 3, the flag greater than 5 indicating whether the absolute value of the level of the first transform coefficient is greater than 5; encoding a flag greater than 7 of the first transform coefficient in response to the flag greater than 5 indicating that the absolute value of the level of the first transform coefficient is greater than 5, the flag greater than 7 indicating whether the absolute value of the level of the first transform coefficient is greater than 7; encoding a 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, the greater-than-9 flag indicating whether the absolute value of the level of the first transform coefficient is greater than 9; 27. The encoding method of clause 26, further comprising: 28. The second pass to scan is encoding a 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, wherein the remaining absolute level flag indicates an absolute value of the remaining level of the first transform coefficient; 28. The encoding method of clause 27, further comprising: 29. 29. The encoding method of any one of clauses 25 to 28, wherein each of the first and second passes is performed by scanning the transform coefficients of the sub-blocks in reverse order. 30. Inverting the transform coefficients of the sub-block before performing the first pass 30. The encoding method of clause 29, further comprising: 31. 31. The encoding method according to any one of clauses 25 to 30, wherein the encoding method is a transform skip residual encoding method. 32. binarizing the absolute value of the level for each of the second set of transform coefficients; Binarizing the absolute value using Golomb-Rice coding 32. The encoding method of any one of clauses 25 to 31, further comprising: 33. 1. A decoding method implemented by a decoder of video data, comprising: performing a first pass scanning transform coefficients of a sub-block of a video frame; performing a second pass scanning the transform coefficients of the sub-block; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; a first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes decoding, for each of the first set of transform coefficients, a significance flag indicating whether the level of the transform coefficient is zero; a second pass of scanning includes decoding binarized absolute values ​​of the levels for each of the second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; Decryption method. 34. The first pass to scan is decoding a flag greater than one 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, the first transform coefficient being one of a first set of transform coefficients, and the flag greater than one indicating whether the absolute value of the level of the first transform coefficient is greater than one; 34. The method of claim 33, further comprising: 35. The first pass to scan is decoding a flag greater than 3 of the first transform coefficient in response to the flag greater than 1 indicating that the absolute value of the level of the first transform coefficient is greater than 1, wherein the flag greater than 3 indicates whether the absolute value of the level of the first transform coefficient being scanned is greater than 3, and performing a first pass of scanning is stopped if the number of remaining context-coded bins is less than a group limit; decoding a flag greater than 5 of each of the first transform coefficients in response to the flag greater than 3 indicating that the absolute value of the level of the first transform coefficient is greater than 3, the flag greater than 5 indicating whether the absolute value of the level of the first transform coefficient is greater than 5; decoding a flag greater than 7 of each of the first transform coefficients in response to the flag greater than 5 indicating that the absolute value of the level of the first transform coefficient is greater than 5, the flag greater than 7 indicating whether the absolute value of the level of the first transform coefficient is greater than 7; decoding a greater than 9 flag of 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; 35. The method of claim 34, further comprising: 36. The second pass to scan is decoding a 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 an absolute value of the remaining level of the first transform coefficient; 36. The method of claim 35, further comprising: 37. 37. The decoding method according to any one of clauses 33 to 36, wherein the coding method is a transform skip residual coding method. 38. decoding the binarized absolute values ​​of each level of the second set of transform coefficients; Decoding the absolute value using Golomb-Rice coding The decoding method according to any one of clauses 9 to 13, further comprising: 39. 1. A system for encoding video data, the system comprising: a memory storing a set of instructions; a processor, the processor executing a set of instructions to performing a first pass scanning transform coefficients of a sub-block of a video frame; and performing a second pass scanning the transform coefficients of the sub-blocks; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; a first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes encoding, for each of the first set of transform coefficients, a significance flag indicating whether a level of the transform coefficient is zero; the second pass of scanning includes binarizing the absolute value of each level of the second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; A system for encoding video data. 40. 1. A system for decoding video data, the system comprising: a memory storing a set of instructions; a processor, the processor executing a set of instructions to performing a first pass scanning transform coefficients of a sub-block of a video frame; and performing a second pass scanning the transform coefficients of the sub-blocks; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; a first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes decoding, for each of the first set of transform coefficients, a significance flag indicating whether the level of the transform coefficient is zero; a second pass of scanning includes decoding binarized absolute values ​​of each level of a second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; A system for decoding video data. 41. generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for chroma components of the video frame; generating sub-blocks of a video frame; encoding a first set of transform coefficients of the sub-block according to a first set of context variables and a second set of context variables; 1. A method for encoding video data, comprising: 42. encoding the first set of transform coefficients; encoding a significance flag of a transform coefficient of the first set of transform coefficients according to three context variables from the first set of context variables and three context variables from the second set of context variables, the significance flag indicating whether a level of the transform coefficient is zero; 41. The encoding method according to clause 41. 43. generating three context variables from the first set of context variables and three context variables from the second set of context variables, the generating being based on a color component index, a luma location specifying a location of the sub-block relative to the video frame, and a target coefficient scan location; 42. The encoding method according to clause 42. 44. encoding the first set of transform coefficients; encoding a greater-than-x flag for a transform coefficient of the first set of transform coefficients according to four context variables from the first set of context variables and four context variables from the second set of context variables, the greater-than-x flag indicating whether the absolute value of a level of the transform coefficient is greater than x; 44. The encoding method according to any one of clauses 41 to 43. 45. generating four context variables from the first set of context variables and four context variables from the second set of context variables, the generating being based on a color component index, a luma location specifying a location of the sub-block relative to the video frame, and a target coefficient scan location; 44. The encoding method according to clause 44. 46. encoding the first set of transform coefficients; encoding a parity flag of a transform coefficient of the first set of transform coefficients according to one context variable from the first set of context variables and one context variable from the second set of context variables, the parity flag indicating a parity of an absolute value of a level of the transform coefficient; 46. ​​The encoding method according to any one of clauses 41 to 45. 47. generating one context variable from the first set of context variables and one context variable from the second set of context variables according to the color component index; 47. The encoding method of clause 46, further comprising: 48. encoding the first set of transform coefficients; encoding coefficient sign flags of transform coefficients of 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, the coefficient sign flags indicating signs of values ​​of the transform coefficients; 48. The encoding method according to any one of clauses 41 to 47. 49. generating six context variables from the first set of context variables and six context variables from the second set of context variables, the generating being based on a number of significant coefficients of video frames neighboring the video frame, a luma location specifying a location of the sub-block relative to the video frame, and a coefficient scan location of the target; The method described in clause 48. 50. encoding the first set of transform coefficients; encoding sub-block flags of transform coefficients of 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; 50. The method of any one of clauses 41 to 49, comprising: 51. generating three context variables from the first set of context variables and three context variables from the second set of context variables, the generating being based on a number of significant coefficients of video frames neighboring the video frame, a luma location specifying a location of the sub-block relative to the video frame, and a coefficient scan location of the target; The method described in clause 50. 52. receiving a video bitstream; Dividing a video bitstream into a plurality of sub-blocks; generating a first set of context variables for a luma component of the sub-block; generating a second set of context variables for the chroma components of the sub-block; context encoding a first set of transform coefficients of the sub-block according to a first set of context variables and a second set of context variables; A video processing method comprising: 53. receiving a video frame; Dividing a video frame into a plurality of sub-blocks; generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for chroma components of the video frame; decoding 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; 1. A decoding method implemented by a decoder of video data, comprising: 54. Decoding the first set of transform coefficients decoding significance flags of transform coefficients of the first set of transform coefficients according to three context variables from the first set of context variables and three context variables from the second set of context variables, the significance flags indicating whether the level of the transform coefficients is zero; Decryption method as described in clause 53. 55. generating three context variables from the first set of context variables and three context variables from the second set of context variables, the generating being based on a color component index, a luma location specifying a top-left sample of the target transform block relative to a top-left sample of the video frame, and a target coefficient scan location; Decryption method as described in clause 54. 56. Decoding the first set of transform coefficients decoding greater-than-x flags of transform coefficients of the first set of transform coefficients according to four context variables from the first set of context variables and four context variables from the second set of context variables; The decoding method according to any one of clauses 53 to 55, including: 57. generating four context variables from the first set of context variables and four context variables from the second set of context variables, the generating being based on a color component index, a luma location specifying a top-left sample of the target transform block relative to a top-left sample of the video frame, and a target coefficient scan location; Decryption method as described in clause 56. 58. Decoding the first set of transform coefficients decoding parity flags of transform coefficients of the first set of transform coefficients according to one context variable from the first set of context variables and one context variable from the second set of context variables; The decoding method according to any one of clauses 53 to 57, including: 59. generating one context variable from the first set of context variables and one context variable from the second set of context variables, wherein the generating is based on the color component index; Decryption method as described in clause 58. 60. Decoding the first set of transform coefficients decoding context coefficient sign flags of transform coefficients of 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; The decoding method according to any one of clauses 53 to 59, including: 61. generating six context variables from the first set of context variables and six context variables from the second set of context variables, the generating being based on a number of significant coefficients of upper and left neighboring video frames of the video frame, a luma location specifying a top-left sample of the target transform block relative to a top-left sample of the video frame, and a target coefficient scan location; Decryption method as described in clause 60. 62. Decoding the first set of transform coefficients decoding sub-block flags of transform coefficients of the first set of transform coefficients according to three context variables from the first set of context variables and three context variables from the second set of context variables; The decoding method according to any one of clauses 53 to 61, including: 63. generating three context variables from the first set of context variables and three context variables from the second set of context variables, the generating being based on a number of significant coefficients of upper and left neighboring video frames of the video frame, a luma location specifying a top-left sample of the target transform block relative to a top-left sample of the video frame, and a target coefficient scan location; Decryption method as described in clause 62. 64. 1. A system for encoding video data, the system comprising: a memory storing a set of instructions; a processor, the processor executing a set of instructions to generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for chroma components of the video frame; generating sub-blocks of a video frame; encoding a first set of transform coefficients of the sub-block according to a first set of context variables and a second set of context variables; configured to cause the system to A system for encoding video data. 65. 1. A system for decoding video data, the system comprising: a memory storing a set of instructions; a processor, the processor executing a set of instructions to receiving a video frame; Dividing a video frame into a plurality of sub-blocks; generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for chroma components of the video frame; decoding 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; configured to cause the system to A system for decoding video data. 66. 1. A non-transitory computer-readable medium storing a set of instructions, the set of instructions executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; the first pass of scanning includes bypass coding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; Non-transitory computer-readable medium. 67. A non-transitory computer-readable medium storing a set of instructions, the set of instructions executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; the first pass of scanning includes bypass decoding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; Non-transitory computer-readable medium. 68. A non-transitory computer-readable medium storing a set of instructions, the set of instructions executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method comprising: performing a first pass scanning transform coefficients of a sub-block of a video frame; performing a second pass scanning the transform coefficients of the sub-block; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; a first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes encoding, for each of the first set of transform coefficients, a significance flag indicating whether a level of the transform coefficient is zero; the second pass of scanning includes binarizing the absolute value of each level of the second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; Non-transitory computer-readable medium. 69. A non-transitory computer-readable medium storing a set of instructions, the set of instructions executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising: performing a first pass scanning transform coefficients of a sub-block of a video frame; performing a second pass scanning the transform coefficients of the sub-block; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; a first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes decoding, for each of the first set of transform coefficients, a significance flag indicating whether the level of the transform coefficient is zero; a second pass of scanning includes decoding binarized absolute values ​​of each level of a second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; Non-transitory computer-readable medium. 70. A non-transitory computer-readable medium storing a set of instructions, the set of instructions executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method comprising: generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for chroma components of the video frame; generating sub-blocks of a video frame; encoding a first set of transform coefficients of the sub-block according to a first set of context variables and a second set of context variables; 1. A non-transitory computer-readable medium comprising: 71. A non-transitory computer-readable medium storing a set of instructions, the set of instructions executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising: receiving a video frame; Dividing a video frame into a plurality of sub-blocks; generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for chroma components of the video frame; decoding 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; 1. A non-transitory computer-readable medium comprising:

[0117]

[0135] In the drawings and specification, illustrative embodiments have been disclosed. However, many variations and modifications of these embodiments are possible. Thus, although specific terms are employed, they are used in a generic and descriptive sense only and not for purposes of limitation.

Claims

1. 1. A method for encoding a video sequence, comprising: receiving a video sequence; encoding the video sequence; Including, The encoding step comprises: performing a first pass of scanning a plurality of transform coefficients of a sub-block of a video frame, wherein encoding of the sub-block is performed by multiple passes of scanning the sub-block, including the first pass of scanning and remaining passes of scanning, and the first pass of scanning comprises: determining whether the remaining number of context-coded bins (MaxCcbs) is greater than or equal to 4; In response to the remaining number of context-coded bins being equal to or greater than four, setting a sig_coeff_flag for a target transform coefficient, the sig_coeff_flag indicating whether the target transform coefficient has a level of zero; and setting coeff_sign_flag and abs_level_gtx_flag[0] for the target transform coefficient in response to the level of the target transform coefficient being non-zero, wherein the coeff_sign_flag indicates a sign of the level of the target transform coefficient, and the abs_level_gtx_flag[0] indicates that the absolute value of the level of the target transform coefficient is greater than 1; and performing a remaining pass of scanning the plurality of transform coefficients of the sub-block of the video frame in response to a remaining number of the context-coded bins being less than four, the remaining pass of scanning including bypass-coding a remaining absolute level abs_remainder of the target transform coefficient, wherein the remaining absolute level abs_remainder indicates an absolute value of the remaining level of the transform coefficient; A method comprising:

2. the sub-block having a plurality of transform coefficients, and performing the first pass scanning the plurality of transform coefficients; scanning the plurality of transform coefficients until a number of context-coded bins reaches a maximum limit; bypass coding absolute values ​​of levels of transform coefficients that are not scanned in the remaining passes in response to the number of context-coded bins reaching the maximum limit, wherein the bypass coding includes binarizing the absolute values ​​of the unscanned transform coefficients using Golomb-Rice coding; The method of claim 1 further comprising:

3. 2. The method of 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 method of claim 3 , further comprising inverting the plurality of transform coefficients before performing the first pass of scanning.

5. The method of claim 1 , wherein the encoding method is a transform skip residual encoding method.

6. The method of claim 1 , further comprising dividing the video frame into a plurality of sub-blocks that include the sub-block.

7. 1. A method for decoding a bitstream, comprising: receiving a bitstream; decoding the bitstream to generate a video sequence; Including, The decoding step comprises: performing a first pass of scanning a plurality of transform coefficients of a sub-block of a video frame, wherein decoding of the sub-block is performed by multiple passes of scanning the sub-block, including the first pass of scanning and remaining passes of scanning, and the first pass of scanning comprises: determining whether the remaining number of context-coded bins (MaxCcbs) is greater than or equal to 4; In response to the remaining number of context-coded bins being equal to or greater than four, decoding a sig_coeff_flag for a target transform coefficient, wherein the sig_coeff_flag indicates whether the level of the target transform coefficient is zero; and decoding a coeff_sign_flag and an abs_level_gtx_flag[0] for the target transform coefficient in response to the level of the target transform coefficient being not zero, wherein the coeff_sign_flag indicates a sign of the level of the target transform coefficient and the abs_level_gtx_flag[0] indicates that the absolute value of the level of the target transform coefficient is greater than 1; and performing a remaining pass of scanning the plurality of transform coefficients of the sub-block of the video frame in response to the remaining number of context-coded bins being less than four, wherein the remaining pass of scanning includes bypass decoding a remaining absolute level abs_remainder of the target transform coefficient, wherein the remaining absolute level abs_remainder indicates an absolute value of the remaining level of the transform coefficient; A method comprising:

8. 8. The method of claim 7, wherein the remaining scanning paths further include bypass decoding a parity level flag par_level_flag of the transform coefficient in response to the abs_level_gtx_flag[0] of the target transform coefficient being greater than 1, wherein the parity level flag par_level_flag indicates the parity of the absolute value of the level of the target transform coefficient.

9. 1. A method for transmitting a video bitstream, comprising: receiving a video sequence; encoding the video sequence; transmitting a bitstream generated based on said encoding; Including, The encoding step comprises: performing a first pass of scanning a plurality of transform coefficients of a sub-block of a video frame, wherein encoding of the sub-block is performed by multiple passes of scanning the sub-block, including the first pass of scanning and remaining passes of scanning, and the first pass of scanning comprises: determining whether the remaining number of context-coded bins (MaxCcbs) is greater than or equal to 4; In response to the remaining number of context-coded bins being equal to or greater than four, setting a sig_coeff_flag for a target transform coefficient, the sig_coeff_flag indicating whether the target transform coefficient has a level of zero; and setting coeff_sign_flag and abs_level_gtx_flag[0] for the target transform coefficient in response to the level of the target transform coefficient being non-zero, wherein the coeff_sign_flag indicates a sign of the level of the target transform coefficient, and the abs_level_gtx_flag[0] indicates that the absolute value of the level of the target transform coefficient is greater than 1; and performing a remaining pass of scanning the plurality of transform coefficients of the sub-block of the video frame in response to the remaining number of context-coded bins being less than four, wherein the remaining pass of scanning includes bypass-coding a remaining absolute level abs_remainder of the target transform coefficient, wherein the remaining absolute level abs_remainder indicates an absolute value of the remaining level of the transform coefficient; A method comprising:

Citation Information

Patent Citations

  • JPP7682108B