Coding method implemented by encoder of video data and non-transitory computer-readable storage medium

By reducing the number of coding passes of transform skip residual coding to three and adopting parity flag bypass coding and Golomb-Rice code to process non-binary syntax elements, the problems of coding complexity and low throughput are solved and a more efficient coding process is achieved.

CN119946309BActive Publication Date: 2025-09-12ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the existing transform skip residual coding process, too many coding passes lead to low CABAC engine throughput and complex hardware implementation. In addition, differences in scanning order and bypass coding syntax elements increase the complexity of hardware implementation.

Method used

A parity flag bypass coding method is adopted to reduce the number of coding passes to three, and the scanning order and bypass coding method of transform residual coding and transform skip residual coding are unified. Non-binary syntax elements are processed through parity flag bypass coding and Golomb-Rice code binarization.

Benefits of technology

The throughput of CABAC is improved, the hardware implementation is simplified, the coding complexity is reduced, and the coding efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119946309B_ABST
    Figure CN119946309B_ABST
Patent Text Reader

Abstract

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

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

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

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

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

[0005] Embodiments of the present disclosure provide methods and systems for transform-skipped residual video data encoding.

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

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

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

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

[0010]

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

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

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

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

[0014] Figure 4 Example pseudocode including syntax for transform skip residual coding is illustrated.

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

[0016] Figure 6 Some embodiments of the present disclosure include Figure 5 Example pseudocode showing the syntax of the method.

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

[0018] Figure 8 Some embodiments of the present disclosure include Figure 7 Example pseudocode showing the syntax of the method.

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

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

[0021] Figure 10B The diagram shows some embodiments of the present disclosure. Figure 10A The resulting block after the 8×8 block in is flipped.

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

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

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

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

[0026] Figure 15 Some embodiments of the present disclosure include Figure 14 Example pseudocode for the syntax of bypass encoding in combination of methods.

[0027] Figure 16 An example method of transform-skipped residual coding with a first pass for context coding and a second pass for Golomb-Rice coding is illustrated in accordance with some embodiments of the present disclosure.

[0028] Figure 17 Some embodiments of the present disclosure include Figure 16 Example pseudocode for the syntax of the bypass encoding in the method.

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

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

[0031] A video is a collection of static images (or "frames") arranged in 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, video player, or any end-user terminal with display functionality) can be used to display these images in time sequence. In addition, in some applications, the video capture device can transmit the captured video in real time to a video playback device (e.g., a computer with a monitor), such as for monitoring, conferencing, or live broadcasting.

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

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

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

[0035] To achieve the same subjective quality as HEVC / H.265 using half the bandwidth, JVET has been developing technologies that surpass HEVC using the Joint Exploration Model ("JEM") reference software. Since the coding technologies incorporated into JEM, JEM has achieved substantially higher coding performance than HEVC. VCEG and MPEG have also officially begun development of the next-generation video compression standard that will surpass HEVC.

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

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

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

[0039] The temporal prediction unit 262 performs temporal prediction (e.g., inter-frame prediction) on the current block using information from a different picture / slice than the one containing the current block. The temporal prediction for a video block may be signaled via one or more motion vectors. In unidirectional temporal prediction, a single motion vector indicating only one reference picture is used to generate the prediction signal for the current block. On the other hand, in bidirectional temporal prediction, two motion vectors (each indicating a corresponding reference picture) can be used to generate 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 related blocks in a reference frame. If multiple reference pictures are supported, one or more reference picture indices may be sent for the video block. The one or more reference indices may be used to identify which reference picture(s) in the reference picture register or decoded picture buffer (DPB) 264 the temporal prediction signal may come from.

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

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

[0042] Figure 2 FIGURE 1 illustrates an example decoder block diagram for a hybrid video coding system. Figure 2 As shown, the video bitstream 302 can be unpacked or entropy decoded at the entropy decoding unit 308. The coding mode information can be used to determine whether the spatial prediction unit 360 or the temporal prediction unit 362 will be selected. The prediction mode information can be sent to the corresponding prediction unit to generate a prediction block. For example, the temporal prediction unit 362 can apply motion compensated prediction to form a temporal prediction block.

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

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

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

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

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

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

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

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

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

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

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

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

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

[0056] In pass 5, if abs_level_gtx_flag[3] of the position is equal to 1, then the greater than 9 flag (e.g., abs_level_gtx_flag[4]) is 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 context coding bins are available. If context coding bins are not available, abs_level_gtx_flag[4] is bypassed.

[0057] 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 a Golomb-Rice code and the resulting bins are encoded in the bypass mode of the arithmetic coding engine.

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

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

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

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

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

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

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

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

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

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

[0068] Figure 6 Some embodiments of the present disclosure include Figure 5 Example pseudocode showing the syntax of the method. Figure 6 Some parts of the pseudo code in are italicized to indicate the processing of the greater than 3 flag, the greater than 5 flag, the greater than 7 flag, the greater than 9 flag and the parity level flag.

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

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

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

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

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

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

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

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

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

[0078] and Figure 5 Compared with the method in Figure 7 The method in handles encodings of flags greater than 3 in pass 1 instead of pass 2. Figure 8 Some embodiments of the present disclosure include Figure 7 Example pseudocode showing the syntax of the method. Figure 8 Some parts of the pseudo code in are italicized to indicate the processing of the greater than 3 flag, the greater than 5 flag, the greater than 7 flag, the greater than 9 flag and the parity level flag.

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

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

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

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

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

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

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

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

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

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

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

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

[0091]

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

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

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

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

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

[0097] In pass 3(a) (step 1410), coefficients from the first scan position of the sub-block to iFirstPassBypassPos can be scanned. The following can be performed for each coefficient. If the greater than 1 flag indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) can be bypass coded. 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 coding of the remaining absolute level (e.g., abs_remainder) can be handled by a non-binary syntax element binarized with a Golomb-Rice code. The resulting bins can be coded in bypass mode of the arithmetic coding engine.

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

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

[0100] Figure 15 Some embodiments of the present disclosure include Figure 14 Example pseudocode for the syntax of bypass encoding in combination of methods. Figure 15 Some parts of the pseudo code in are italicized to indicate the processing of the greater than 3 flag, the greater than 5 flag, the greater than 7 flag, the greater than 9 flag and the parity level flag.

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

[0102] 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 to the last scan position of the sub-block. For each coefficient, if the remaining number of context coding bins is equal to or greater than 8, the following can be performed. The significance flag (e.g., sig_coeff_flag) can be context coded. If the significance flag indicates that the level is non-zero (e.g., significance flag is equal to 1), the coefficient sign flag (e.g., coeff_sign_flag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) can be signaled. If the greater than 1 flag indicates that the absolute level is greater than 1 (e.g., greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) and the greater than 3 flag (e.g., abs_level_gtx_flag[1]) can be encoded. The parity level flag can specify the parity of the absolute level minus 2. The greater than 3 flag can specify whether the absolute level is greater than 3. If the greater than 3 flag indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be encoded. If the greater than 5 flag indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be encoded. If the greater than 7 flag indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), the greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be encoded. The greater than 9 flag can specify whether the absolute level of the level is greater than 9. In some embodiments, the coefficients can be scanned until the context coding bins reach a maximum limit (e.g., Figure 12 The scanning stops at the position which is the last position of the first pass.

[0103] After Pass 1 ends and before Pass 2 begins, a first-pass bypass position variable (iFirstPassBypassPos) can be set based on the last position of the previous pass (step 1604). In some embodiments, the first-pass bypass position variable can be set to the last position of the previous pass plus 1. The first-pass bypass position variable can represent the starting position from which absolute level (e.g., dec_abs_level) syntax is signaled. Coefficients with scan positions less than the first-pass bypass position can be partially signaled by context coding in Pass 1 and the remaining coefficients can be signaled in Pass 2(a). In some embodiments, if the scan position of a coefficient is greater than or equal to the first-pass bypass position variable, then the sign of the coefficient is not context coded and the complete coefficient and sign can be signaled using bypass coding of Pass 2(b).

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

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

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

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

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

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

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

[0111] Figure 17 Some embodiments of the present disclosure include Figure 16 Example pseudocode for the syntax of the bypass encoding in the method. Figure 17 Portions of the pseudocode in are italicized, indicating first-pass bypass locations and processing of pass 2(b).

[0112] In some embodiments, as Figure 17 As shown, this is only possible if the remaining number of context coding bins is greater than or equal to 8 (e.g., Figure 17Pass 1 is only performed when the remaining number of context coding bins is equal to or greater than 7. In some embodiments, only flags greater than 5 (abs_level_gtx_flag[2]) can be encoded. Therefore, Pass 1 is only performed when the remaining number of context coding bins is equal to or greater than 6. It should be appreciated that the number of abs_level_gtx_flag[] flags can be adjusted to any number. Adjusting the number of abs_level_gtx_flag[] flags can allow more locations to be encoded in the first encoding pass, thereby providing better encoding efficiency.

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

[0114]

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

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

[0117] In some embodiments, the derivation of Rice parameters does not require any lookup table. For example, cRiceParam can be derived as follows:

[0118] cRiceParam=(locSum Abs+offset)>>3

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

[0120] 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.

[0121] 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.

[0122] In some embodiments, in VVC (e.g., VVC 7), transform skip modes are allowed for both luma and chroma components, and both types of components can share the same context variables. Context variables can be variables specified for an adaptive binary arithmetic decoding process of bins by equations containing the most recently decoded bins. However, the signal statistics of luma blocks and chroma blocks can be different. As a result, in some embodiments of the present disclosure, different context variables can be used for luma components and chroma components. Syntax elements affected by the proposed context model extension can include a significance coefficient flag (e.g., sig_coeff_flag), abs_level_gtx_flag[n][j] (e.g., j=0 to 4), a parity flag (e.g., par_level_flag), a signal coefficient sign flag (e.g., coeff_sign_flag), and a coded_sub_block_flag (e.g., Figure 3 coded_sub_block_fiag shown).

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

[0124]

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

[0126]

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

[0128]

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

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

[0131]

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

[0133]

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

[0135]

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

[0137]

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

[0139]

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

[0141]

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

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

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

[0145] 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, it can be stored in the above-mentioned computer-readable medium. The software can perform the disclosed method when executed by a processor. The computing unit and other functional units described in this disclosure can be implemented by hardware, or software, or a combination of hardware and software. Those of ordinary skill in the art will also understand that multiple modules / units in the above-mentioned modules / units can be combined into one module / unit, and each module / unit in the above-mentioned modules / units can be further divided into multiple sub-modules / sub-units.

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

[0147] The following terms may be used to further describe the embodiments:

[0148] 1. A coding method implemented by an encoder of video data, the method comprising:

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

[0150] A parity level flag of the transform coefficient is bypass-encoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient.

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

[0152] Prior to the first pass of scanning, performing a second pass of scanning the transform coefficients, wherein the second pass of scanning comprises:

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

[0154] The first pass of the scan further comprises:

[0155] The parity level flag is bypass-encoded in response to the greater-than-one flag indicating that the absolute value is greater than one.

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

[0157] Scanning the plurality of transform coefficients until the number of context coding bins reaches a maximum limit; and

[0158] In response to the number of context coding bins reaching the maximum limit, bypass encoding the absolute values ​​of the levels of the transform coefficients not scanned in the second pass, wherein the bypass encoding includes binarizing the absolute values ​​of the unscanned transform coefficients using Golomb-Rice encoding.

[0159] 4. A method of encoding according to clause 2 or 3, wherein the second pass of the scan further comprises:

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

[0161] A greater than one flag is encoded in response to the significance flag indicating that the level of the transform coefficient is non-zero.

[0162] 5. A method of encoding according to any of clauses 2-4, wherein the second pass of the scan further comprises:

[0163] In response to the greater-than-1 flag indicating that the absolute value is greater than 1, a greater-than-3 flag of the transform coefficient is encoded, the greater-than-3 flag indicating whether the absolute value is greater than 3.

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

[0165] After the second pass of the scanning and before the first pass of the scanning, performing a third pass of scanning the transform coefficients, wherein the third pass of the scanning comprises:

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

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

[0168] In response to the greater-than-7 flag indicating that the absolute value is greater than 7, a greater-than-9 flag of the transform coefficient is encoded, the greater-than-9 flag indicating whether the absolute value is greater than 9.

[0169] 7. The encoding method of clause 6, wherein the first pass of the scan further comprises:

[0170] In response to the greater than 9 flag indicating that the absolute value is greater than 9, a remaining absolute level flag for the transform coefficient is encoded, the remaining absolute level flag indicating a remaining absolute value of the level of the transform coefficient.

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

[0172] After the second pass of the scanning and before the first pass of the scanning, performing a third pass of scanning the transform coefficients, wherein the third pass of the scanning further comprises:

[0173] In response to the greater-than-1 flag indicating that the absolute value is greater than 1, a greater-than-3 flag of the transform coefficient is encoded, the greater-than-3 flag indicating whether the absolute value is greater than 3.

[0174] 9. The encoding method of clause 8, wherein the third pass of the scan further comprises:

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

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

[0177] In response to the greater-than-7 flag indicating that the absolute value is greater than 7, a greater-than-9 flag of the transform coefficient is encoded, the greater-than-9 flag indicating whether the absolute value is greater than 9.

[0178] 10. The encoding method of clause 9, wherein the first pass of the scan further comprises:

[0179] In response to the greater than 9 flag indicating that the absolute value is greater than 9, a remaining absolute level flag for the transform coefficient is encoded, the remaining absolute level flag indicating a remaining absolute value of the level of the transform coefficient.

[0180] 11. A method of encoding according to any of clauses 1-10, wherein the sub-block has a plurality of transform coefficients, and the first pass of the scanning is performed by scanning the plurality of transform coefficients in reverse order.

[0181] 12. The encoding method according to clause 11, further comprising:

[0182] The plurality of transform coefficients are flipped before performing the first pass of the scan.

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

[0184] 14. The encoding method according to any one of clauses 1 to 13, further comprising:

[0185] receiving the video frame; and

[0186] The video frame is divided into a plurality of sub-blocks.

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

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

[0189] A parity level flag of the transform coefficient is bypass-decoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient.

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

[0191] Prior to the first pass of scanning, performing a second pass of scanning the transform coefficients, wherein the second pass of scanning comprises:

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

[0193] The first pass of the scan further comprises:

[0194] The parity level flag is bypass-decoded in the first pass in response to the greater-than-one flag indicating that the absolute value is greater than one.

[0195] 17. The decoding method of clause 16, wherein the second pass of the scan further comprises:

[0196] decoding a significance flag of the transform coefficient, the significance flag indicating whether a level of the transform coefficient is zero; and

[0197] The greater than one flag is decoded in response to the significance flag indicating that the level of the transform coefficient is non-zero.

[0198] 18. The decoding method of clause 16, wherein the first pass of the scan further comprises:

[0199] decoding a greater than 3 flag of the transform coefficient in response to the greater than 1 flag indicating that the absolute value is greater than 1, the greater than 3 flag indicating whether the absolute value is greater than 3;

[0200] 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;

[0201] 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; and

[0202] In response to the greater-than-7 flag indicating that the absolute value is greater than 7, a greater-than-9 flag of the transform coefficient is decoded, the greater-than-9 flag indicating whether the absolute value is greater than 9.

[0203] 19. The decoding method according to clause 18, further comprising:

[0204] performing a third pass of scanning the transform coefficients, wherein the third pass of scanning comprises:

[0205] In response to the greater than 9 flag indicating that the absolute value is greater than 9, a remaining absolute level flag for the transform coefficient is decoded, the remaining absolute level flag indicating a remaining absolute value of the level of the transform coefficient.

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

[0207] 21. The decoding method according to clause 20, further comprising:

[0208] The plurality of transform coefficients are flipped before performing the first pass of the scan.

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

[0210] 23. A system for encoding video data, the system comprising:

[0211] a memory storing an instruction set; and

[0212] a processor configured to execute the set of instructions to cause the system to:

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

[0214] A parity level flag of the transform coefficient is bypass-encoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient.

[0215] 24. A system for decoding video data, the system comprising:

[0216] a memory storing an instruction set; and

[0217] a processor configured to execute the set of instructions to cause the system to:

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

[0219] A parity level flag of the transform coefficient is decoded, the parity level flag indicating parity of an absolute value of a level of the transform coefficient.

[0220] 25. A coding method implemented by an encoder of video data, the method comprising:

[0221] A first pass of scanning the transform coefficients of sub-blocks of a video frame is performed, where:

[0222] When the number of context coding bins reaches the maximum limit, the first pass of the scan is stopped.

[0223] scanning a first set of transform coefficients of the sub-block in the first pass, and

[0224] The first pass of the scanning comprises, for each transform coefficient in the first set of transform coefficients, encoding an importance flag indicating whether the transform coefficient has a level of zero; and performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises:

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

[0226] 26. The encoding method of clause 25, wherein the first pass of the scan further comprises:

[0227] In response to an importance flag of a first transform coefficient indicating that the level of the first transform coefficient is not zero, a greater than 1 flag of the first transform coefficient is encoded, the first transform coefficient being one of the first group of transform coefficients, the greater than 1 flag indicating whether an absolute value of the level of the first transform coefficient is greater than 1.

[0228] 27. The encoding method of clause 26, wherein the first pass of the scan further comprises:

[0229] encoding a greater than 3 flag for the first transform coefficient in response to the greater than 1 flag indicating that an absolute value of the level of the first transform coefficient is greater than 1, the greater than 3 flag indicating whether an absolute value of the level of the first transform coefficient is greater than 3, wherein performing the first pass of the scan is stopped when the number of remaining context coded bins is less than a group limit;

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

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

[0232] In response to the greater than 7 flag indicating that the absolute value of the level of the first transform coefficient is greater than 7, a greater than 9 flag of the first transform coefficient is encoded, the greater than 9 flag indicating whether the absolute value of the level of the first transform coefficient is greater than 9.

[0233] 28. The encoding method of clause 27, wherein the second pass of the scan further comprises:

[0234] In response to the greater than 9 flag indicating that the absolute value of the level of the first transform coefficient is greater than 9, a remaining absolute level flag of the first transform coefficient is encoded, wherein the remaining absolute level flag indicates a remaining absolute value of the level of the first transform coefficient.

[0235] 29. A method of encoding according to any of clauses 25-28, wherein each of the first pass and the second pass is performed by scanning the transform coefficients of the sub-blocks in reverse order.

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

[0237] The transform coefficients of the sub-block are flipped before performing the first pass.

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

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

[0240] The absolute value is binarized using Golomb-Rice code.

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

[0242] A first pass of scanning the transform coefficients of sub-blocks of a video frame is performed, where:

[0243] Stop performing the first pass of the scan when the number of context coded bins reaches a maximum limit,

[0244] scanning a first set of transform coefficients of the sub-block in the first pass, and

[0245] A first pass of the scan comprises, for each transform coefficient in the first set of transform coefficients, decoding an importance flag indicating whether the transform coefficient has a level of zero; and

[0246] performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises:

[0247] The binarized absolute value of the level of each transform coefficient in a second set of transform coefficients is decoded, wherein the second set of transform coefficients is not scanned in the first pass.

[0248] 34. The decoding method of clause 33, wherein the first pass of the scan further comprises:

[0249] In response to an importance flag of a first transform coefficient indicating that the level of the first transform coefficient is not zero, a greater than 1 flag of the first transform coefficient is decoded, the first transform coefficient being one of the first set of transform coefficients, the greater than 1 flag indicating whether an absolute value of the level of the first transform coefficient is greater than 1.

[0250] 35. The decoding method of clause 34, wherein the first pass of the scan further comprises:

[0251] In response to the greater-than-1 flag indicating that an absolute value of the level of the first transform coefficient is greater than 1, decoding a greater-than-3 flag for the first transform coefficient, the greater-than-3 flag indicating whether an absolute value of the level of the first transform coefficient being scanned is greater than 3, wherein performing a first pass of the scan is stopped when the number of remaining context coding bins is less than a group limit.

[0252] decoding a greater than 5 flag for each of the first transform coefficients in response to the greater than 3 flag indicating that an absolute value of the level of the first transform coefficient is greater than 3, the greater than 5 flag indicating whether an absolute value of the level of the first transform coefficient is greater than 5;

[0253] decoding a greater than 7 flag for each of the first transform coefficients in response to the greater than 5 flag indicating that an absolute value of the level of the first transform coefficient is greater than 5, the greater than 7 flag indicating whether an absolute value of the level of the first transform coefficient is greater than 7; and

[0254] In response to the greater than 7 flag indicating that the absolute value of the level of the first transform coefficient is greater than 7, a greater than 9 flag of each of the first transform coefficients is decoded, the greater than 9 flag indicating whether the absolute value of the level of the first transform coefficient is greater than 9.

[0255] 36. The decoding method of clause 35, wherein the second pass of the scan further comprises:

[0256] In response to the greater than 9 flag indicating that the absolute value of the level of the first transform coefficient being scanned is greater than 9, a remaining absolute level flag for the first transform coefficient is decoded, wherein the remaining absolute level flag indicates the remaining absolute value of the level of the first transform coefficient.

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

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

[0259] The absolute value is decoded using a Golomb-Rice code.

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

[0261] a memory storing an instruction set; and

[0262] a processor configured to execute the set of instructions to cause the system to:

[0263] A first pass of scanning the transform coefficients of sub-blocks of a video frame is performed, where:

[0264] Stop performing the first pass of the scan when the number of context coded bins reaches a maximum limit,

[0265] scanning a first set of transform coefficients of the sub-block in the first pass, and

[0266] A first pass of the scan comprises encoding, for each transform coefficient in the first set of transform coefficients, an importance flag indicating whether the transform coefficient has a level of zero; and

[0267] performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises:

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

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

[0270] a memory storing an instruction set; and

[0271] a processor configured to execute the set of instructions to cause the system to:

[0272] A first pass scan of transform coefficients of sub-blocks of a video frame is performed, where:

[0273] Stop performing the first pass of the scan when the number of context coded bins reaches a maximum limit,

[0274] scanning a first set of transform coefficients of the sub-block in the first pass, and

[0275] A first pass of the scan comprises, for each transform coefficient in the first set of transform coefficients, decoding an importance flag indicating whether the transform coefficient has a level of zero; and

[0276] performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises:

[0277] The binarized absolute value of the level of each transform coefficient in a second set of transform coefficients is decoded, wherein the second set of transform coefficients is not scanned in the first pass.

[0278] 41. A coding method implemented by an encoder of video data, the method comprising:

[0279] generating a first set of context variables for a luma component of a video frame;

[0280] generating a second set of context variables for the chrominance components of the video frame,

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

[0282] A first set of transform coefficients for the subblock is encoded based on the first set of context variables and the second set of context variables.

[0283] 42. A method of encoding according to clause 41, wherein encoding the first set of transform coefficients comprises:

[0284] An importance flag of a transform coefficient in the first set of transform coefficients is encoded according to three context variables from the first set of context variables and three context variables from the second set of context variables, the importance flag indicating whether a level of the transform coefficient is zero.

[0285] 43. The encoding method according to clause 42, further comprising:

[0286] The three context variables from the first set of context variables and the three context variables from the second set of context variables are generated based on a color component index, a luma position specifying a position of the sub-block relative to the video frame, and a current coefficient scan position.

[0287] 44. A method of encoding according to any of clauses 41-43, wherein encoding the first set of transform coefficients comprises:

[0288] A greater than x flag of a transform coefficient in the first set of transform coefficients is encoded according to four context variables from the first set of context variables and four context variables from the second set of context variables, wherein the greater than x flag indicates whether an absolute value of a level of the transform coefficient is greater than a number x.

[0289] 45. The encoding method according to clause 44, further comprising:

[0290] The four context variables from the first set of context variables and the four context variables from the second set of context variables are generated based on a color component index, a luma position specifying a position of the sub-block relative to the video frame, and a current coefficient scan position.

[0291] 46. ​​A method of encoding according to any of clauses 41-45, wherein encoding the first set of transform coefficients comprises:

[0292] A parity flag of a transform coefficient in the first set of transform coefficients is encoded according to one context variable from the first set of context variables and one context variable from the second set of context variables, wherein the parity flag indicates parity of an absolute value of a level of the transform coefficient.

[0293] 47. The encoding method according to clause 46, further comprising:

[0294] The one context variable from the first set of context variables and the one context variable from the second set of context variables are generated according to a color component index.

[0295] 48. A method of encoding according to any of clauses 41-47, wherein encoding the first set of transform coefficients comprises:

[0296] Coefficient sign flags for transform coefficients in the first set of transform coefficients are encoded according to six context variables from the first set of context variables and six context variables from the second set of context variables, wherein the coefficient sign flags indicate signs of values ​​of the transform coefficients.

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

[0298] Generate the six context variables from the first set of context variables and the six context variables from the second set of context variables, wherein the generating is based on the number of significant coefficients of the neighbors of the video frame, the luma position specifying the position of the sub-block relative to the video frame, and the current coefficient scan position.

[0299] 50. A method according to any of clauses 41-49, wherein encoding the first set of transform coefficients comprises:

[0300] Sub-block flags of transform coefficients in the first set of transform coefficients are encoded based on three context variables from the first set of context variables and three context variables from the second set of context variables.

[0301] 51. The method of clause 50, further comprising:

[0302] Generate the three context variables from the first set of context variables and the three context variables from the second set of context variables, wherein the generation is based on the number of significant coefficients of the neighbors of the video frame, the luma position specifying the position of the sub-block relative to the video frame, and the current coefficient scan position.

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

[0304] receiving a video bit stream;

[0305] Splitting the video bitstream into a plurality of sub-blocks;

[0306] generating a first set of context variables for the luma component of the sub-block;

[0307] generating a second set of context variables for the chroma components of the sub-block; and

[0308] A first set of transform coefficients of the subblock is context-encoded based on the first set of context variables and the second set of context variables.

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

[0310] Receive video frames;

[0311] dividing the video frame into a plurality of sub-blocks;

[0312] generating a first set of context variables for a luma component of the video frame;

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

[0314] A first set of transform coefficients for the subblock is decoded based on the first set of context variables and the second set of context variables.

[0315] 54. The decoding method of clause 53, wherein decoding the first set of transform coefficients comprises:

[0316] decoding an importance flag of a transform coefficient in the first set of transform coefficients based on three context variables from the first set of context variables and three context variables from the second set of context variables, the importance flag indicating whether the transform coefficient has a level of zero,

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

[0318] The three context variables from the first set of context variables and the three context variables from the second set of context variables are generated based on a color component index, a luma position of a top-left sample of a current transform block relative to a top-left sample of the video frame, and a current coefficient scan position.

[0319] 56. A decoding method according to any of clauses 53-55, wherein decoding the first set of transform coefficients comprises:

[0320] A greater than x flag of a transform coefficient in the first set of transform coefficients is decoded based on four context variables from the first set of context variables and four context variables from the second set of context variables.

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

[0322] The four context variables from the first set of context variables and the four context variables from the second set of context variables are generated based on a color component index, a luma position of a top-left sample of a current transform block relative to a top-left sample of the video frame, and a current coefficient scan position.

[0323] 58. A decoding method according to any of clauses 53-57, wherein decoding the first set of transform coefficients comprises:

[0324] Parity flags of transform coefficients in the first set of transform coefficients are decoded based on one context variable from the first set of context variables and one context variable from the second set of context variables.

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

[0326] The one context variable from the first set of context variables and the one context variable from the second set of context variables are generated based on a color component index.

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

[0328] Context coefficient sign flags of transform coefficients in the first set of transform coefficients are decoded based on 6 context variables from the first set of context variables and 6 context variables from the second set of context variables.

[0329] 61. The decoding method of clause 60, further comprising:

[0330] Generate the six context variables from the first set of context variables and the six context variables from the second set of context variables, wherein the generating is based on the number of significant coefficients of the upper and left neighbors of the video frame, a luma position specifying an upper left sample of the current transform block relative to an upper left sample of the video frame, and a current coefficient scan position.

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

[0332] Sub-block flags of transform coefficients in the first set of transform coefficients are decoded based on three context variables from the first set of context variables and three context variables from the second set of context variables.

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

[0334] Generate the three context variables from the first set of context variables and the three context variables from the second set of context variables, wherein the generating is based on the number of significant coefficients of the upper and left neighbors of the video frame, a luma position specifying an upper left sample of the current transform block relative to an upper left sample of the video frame, and a current coefficient scan position.

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

[0336] a memory storing an instruction set; and

[0337] a processor configured to execute the set of instructions to cause the system to:

[0338] generating a first set of context variables for a luma component of a video frame;

[0339] generating a second set of context variables for the chrominance components of the video frame;

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

[0341] A first set of transform coefficients for the subblock is encoded based on the first set of context variables and the second set of context variables.

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

[0343] a memory storing an instruction set; and

[0344] a processor configured to execute the set of instructions to cause the system to:

[0345] Receive video frames;

[0346] dividing the video frame into a plurality of sub-blocks;

[0347] generating a first set of context variables for a luma component of the video frame;

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

[0349] A first set of transform coefficients for the subblock is decoded based on the first set of context variables and the second set of context variables.

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

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

[0352] A parity level flag of the transform coefficient is bypass-encoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient.

[0353] 67. A non-transitory computer-readable medium storing a set of instructions executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising:

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

[0355] A parity level flag of the transform coefficient is bypass-decoded, the parity level flag indicating the parity of an absolute value of a level of the transform coefficient.

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

[0357] A first pass of scanning the transform coefficients of sub-blocks of a video frame is performed, where:

[0358] Stop performing the first pass of the scan when the number of context coded bins reaches a maximum limit,

[0359] scanning a first set of transform coefficients of the sub-block in the first pass, and

[0360] The first pass of the scanning comprises, for each transform coefficient in the first set of transform coefficients, encoding an importance flag indicating whether the transform coefficient has a level of zero; and performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises:

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

[0362] 69. A non-transitory computer-readable medium storing a set of instructions executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising:

[0363] A first pass of scanning the transform coefficients of sub-blocks of a video frame is performed, where:

[0364] Stop performing the first pass of the scan when the number of context coded bins reaches a maximum limit,

[0365] scanning a first set of transform coefficients of the sub-block in the first pass, and

[0366] The first pass of the scanning comprises, for each transform coefficient in the first set of transform coefficients, decoding an importance flag indicating whether the transform coefficient has a level of zero; and performing a second pass of scanning the transform coefficients of the sub-block, wherein the second pass of the scanning comprises:

[0367] The binarized absolute value of the level of each transform coefficient in a second set of transform coefficients is decoded, wherein the second set of transform coefficients is not scanned in the first pass.

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

[0369] generating a first set of context variables for a luma component of a video frame;

[0370] generating a second set of context variables for the chrominance components of the video frame,

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

[0372] A first set of transform coefficients for the subblock is encoded based on the first set of context variables and the second set of context variables.

[0373] 71. A non-transitory computer-readable medium storing a set of instructions executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising:

[0374] Receive video frames;

[0375] dividing the video frame into a plurality of sub-blocks;

[0376] generating a first set of context variables for a luma component of the video frame;

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

[0378] A first set of transform coefficients for the subblock is decoded based on the first set of context variables and the second set of context variables.

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

Claims

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

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

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

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

7. A non-transitory computer-readable storage medium storing a set of instructions and a bitstream of a video, the non-transitory computer-readable storage medium being part of a computing device, the computing device being configured to execute the set of instructions to cause the computing device to encode the bitstream according to operations comprising: Performing a first pass scan on transform coefficients of a sub-block of a video frame, the sub-block being subjected to three sub-block scans; The first scanning step includes: encoding a sig_coeff_flag of the transform coefficient, wherein the sig_coeff_flag indicates whether the level of the transform coefficient is zero; and encoding a coeff_sign_flag and an abs_level_gtx_flag[0] in response to the sig_coeff_flag indicating that the level of the transform coefficient is not zero, wherein the coeff_sign_flag represents the sign of the level of the current transform coefficient, and the abs_level_gtx_flag[0] indicates whether the absolute value of the level of the current transform coefficient is greater than 1; The second scan includes: In response to abs_level_gtx_flag[0] indicating that an absolute value of the level of the current transform coefficient is greater than 1, encoding abs_level_gtx_flag[1] of the transform coefficient, wherein the abs_level_gtx_flag[1] indicates whether an absolute value of the level of the current transform coefficient is greater than 3; In response to abs_level_gtx_flag[1] indicating that the absolute value of the level of the current transform coefficient is greater than 3, abs_level_gtx_flag[2] of the transform coefficient is encoded, wherein the abs_level_gtx_flag[2] indicates whether the absolute value of the level of the current transform coefficient is greater than 5; in response to abs_level_gtx_flag[2] indicating that the absolute value of the level of the current transform coefficient is greater than 5, abs_level_gtx_flag[3] of the transform coefficient is encoded, wherein the abs_level_gtx_flag[3] indicates whether the absolute value of the level of the current transform coefficient is greater than 7; and, in response to the abs_level_gtx_flag[3] indicating that the absolute value of the level of the current transform coefficient is greater than 7, encoding the abs_level_gtx_flag[4] of the transform coefficient, wherein the abs_level_gtx_flag[4] indicates whether the absolute value of the level of the current transform coefficient is greater than 9; The third scan includes: In response to the abs_level_gtx_flag[4] indicating that the absolute value is greater than 9, abs_remainder of the transform coefficient is encoded, the abs_remainder indicating a remaining absolute value of the level of the transform coefficient.

8. A decoder for decoding video data, comprising: a processor configured to perform the following method: Performing a first pass scan on transform coefficients of a sub-block of a video frame, the sub-block being subjected to three sub-block scans; The first scanning step includes: decoding a sig_coeff_flag of the transform coefficient, the sig_coeff_flag indicating whether the level of the transform coefficient is zero; and decoding a coeff_sign_flag and abs_level_gtx_flag[0] in response to the sig_coeff_flag indicating that the level of the transform coefficient is not zero, wherein the coeff_sign_flag represents the sign of the level of the current transform coefficient, and the abs_level_gtx_flag[0] indicates whether the absolute value of the level of the current transform coefficient is greater than 1; The second scan includes: In response to abs_level_gtx_flag[0] indicating that an absolute value of the level of the current transform coefficient is greater than 1, decoding abs_level_gtx_flag[1] of the transform coefficient, wherein the abs_level_gtx_flag[1] indicates whether an absolute value of the level of the current transform coefficient is greater than 3; In response to abs_level_gtx_flag[1] indicating that the absolute value of the level of the current transform coefficient is greater than 3, abs_level_gtx_flag[2] of the transform coefficient is decoded, wherein the abs_level_gtx_flag[2] indicates whether the absolute value of the level of the current transform coefficient is greater than 5; in response to abs_level_gtx_flag[2] indicating that the absolute value of the level of the current transform coefficient is greater than 5, abs_level_gtx_flag[3] of the transform coefficient is decoded, wherein the abs_level_gtx_flag[3] indicates whether the absolute value of the level of the current transform coefficient is greater than 7; and, in response to the abs_level_gtx_flag[3] indicating that the absolute value of the level of the current transform coefficient is greater than 7, decoding the abs_level_gtx_flag[4] of the transform coefficient, wherein the abs_level_gtx_flag[4] indicates whether the absolute value of the level of the current transform coefficient is greater than 9; The third scan includes: In response to the abs_level_gtx_flag[4] indicating that the absolute value is greater than 9, abs_remainder of the transform coefficient is decoded, the abs_remainder indicating a remaining absolute value of the level of the transform coefficient.

Citation Information

Patent Citations

  • Context modeling techniques for transform coefficient level coding

    CN103650510A

  • Group flag in transform coefficient coding for video coding

    CN104205832A