Encoding and decoding methods implemented by video data codecs and non-transitory computer-readable storage media

By employing a bypass coding method with parity flags in the transform skip residual coding, the number of coding passes is reduced to three, and the scanning order and syntax elements are unified. This solves the problems of coding complexity and low efficiency in existing technologies and improves the performance of video coding.

CN119946306BActive Publication Date: 2026-03-13ALIBABA (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-12
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing transform skip residual coding methods suffer from problems such as excessive coding passes, high hardware implementation complexity, asynchronous scanning order, and numerous bypass coding syntax elements in video coding, which affect coding efficiency and throughput.

Method used

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

Benefits of technology

It simplifies hardware implementation, improves encoding efficiency and throughput, reduces the number of encoding passes, unifies the encoding process, and enhances the performance of encoders and decoders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119946306B_ABST
    Figure CN119946306B_ABST
Patent Text Reader

Abstract

This disclosure provides systems and methods for transforming and encoding / decoding residual video data with skipped transitions. An exemplary method includes performing a first pass of transform coefficients of a sub-block of a scanned video frame, wherein the first pass of the scan includes: bypassing encoding a parity level flag of the transform coefficients, the parity level flag indicating the parity of the absolute value of the level of the transform coefficient.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-reference to related applications

[0002] This disclosure claims priority and priority interests in the following applications: 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. These three provisional applications are incorporated herein by reference in their entirety. Technical Field

[0003] This disclosure generally relates to video data processing, and more specifically, to transformations of video data that skip residual coding. Background Technology

[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 Universal 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, VVC aims to achieve the same subjective quality as HEVC / H.265 using half the bandwidth. Summary of the Invention

[0005] Embodiments of this disclosure provide methods and systems for transforming the encoding of skipped residual video data.

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

[0007] Another exemplary method includes performing a first pass of the transform coefficients of a sub-block of a scanned video frame, wherein the first pass of the scan includes bypassing decoding of a parity level flag of the transform coefficients, the parity level flag indicating the parity of the absolute value of the level of the transform 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 transform coefficients of a sub-block of a scanned video frame, wherein the first pass of the scan includes: bypass encoding a parity level flag of the transform coefficients, the parity level flag indicating the parity of the absolute value of the level of the transform coefficients.

[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 transform coefficients of a sub-block of a scanned video frame, wherein the first pass of the scan includes: bypass decoding of a parity level flag of the transform coefficients, the parity level flag indicating the parity of the absolute value of the level of the transform coefficients. Attached Figure Description

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

[0011] Figure 1 The diagram illustrates a sample encoder block diagram for a hybrid video coding system.

[0012] Figure 2 The diagram illustrates a sample decoder block diagram for a hybrid video coding system.

[0013] Figure 3 illustrates example pseudocode for a syntax that includes transform coding.

[0014] Figure 4 illustrates example pseudocode for a syntax that includes transform skipping residual coding.

[0015] Figure 5 The illustration shows an example method for skipping residual coding in a transform with a coding pass count reduced to 3, according to some embodiments of the present disclosure.

[0016] Figure 6 illustrates some embodiments according to the present disclosure, including... Figure 5 Example pseudocode for the syntax of the method shown.

[0017] Figure 7 The illustration shows another example method of skipping residual coding by reducing the number of coding passes to 3 according to some embodiments of the present disclosure.

[0018] Figure 8 illustrates some embodiments according to the present disclosure, including... Figure 7 Example pseudocode for the syntax of the method shown.

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

[0020] Figure 10A The illustration shows an 8×8 block before flipping, according to some embodiments of the present disclosure.

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

[0022] Figure 11 The illustrations show example multiple-pass coding according to some embodiments of the present disclosure.

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

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

[0025] Figure 14 The illustration shows an example method of transform skipping residual coding by combining single-pass bypass coding with some embodiments of the present disclosure to reduce the number of coding passes to 3.

[0026] Figure 15 illustrates embodiments of the present disclosure including […]. Figure 14 Example pseudocode for the syntax of bypass coding in the method combination.

[0027] Figure 16 The illustration shows an example method of transform skipping residual coding with a first pass for context coding and a second pass for Golomb-Rice coding, according to some embodiments of the present disclosure.

[0028] Figure 17 illustrates some embodiments according to the present disclosure, including... Figure 16 Example pseudocode for the syntax of bypass encoding of the methods in [the code].

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

[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, wherein, unless otherwise indicated, the same numerals in different drawings denote 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 aspects of the invention as set forth in the appended claims. Specific aspects of this disclosure are described below in more detail. In the event of any conflict with terms and / or definitions incorporated by reference, the terms and definitions provided herein shall prevail.

[0031] Video is a collection of still images (or "frames") arranged in chronological order to store visual information. Video capture devices (e.g., cameras) can be used to capture and store these images in chronological order, and video playback devices (e.g., televisions, computers, smartphones, tablets, video players, or any end-user terminal with a display function) can be used to display such images in chronological order. Additionally, in some applications, video capture devices can transmit the captured video in real time to video playback devices (e.g., computers with monitors), such as for surveillance, conferencing, or live broadcasting.

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

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

[0034] In many cases, useful information about an encoded image (referred to as the "current image") can include changes relative to a reference image (e.g., a previously encoded or reconstructed image). Such changes can include variations in pixel position, brightness, or color, with positional changes being the most significant. The positional changes of a set of pixels representing an object can reflect the object's movement between the reference and current images.

[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 Exploratory Model (“JEM”) reference software. Because the coding techniques are incorporated into JEM, it achieves generally higher coding performance than HEVC. VCEG and MPEG have also officially begun development of next-generation video compression standards that 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 used in modern video compression standards such as HEVC, H.264 / AVC, MPEG2, H.263, etc. Figure 1 The diagram illustrates a sample encoder block diagram for a hybrid video coding system. Figure 1 As shown, the video encoder 200 can perform intra-frame or inter-frame coding on blocks or partitions or sub-partitions of video blocks within a video frame (including 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 modes can refer to many spatially based compression modes. Inter-frame modes (such as single prediction or double prediction) can refer to many temporally based compression modes.

[0037] refer to Figure 1The input video signal 202 can be processed block by block. For example, a video block unit can be a 16×16 pixel block (e.g., a macroblock (MB)). The size of the video block unit can vary depending on the coding technique used and the required accuracy and efficiency. In HEVC, the expanded block size (e.g., a coding tree unit (CTU)) can be used to compress video signals at resolutions (e.g., 1080p and higher). In HEVC, a CTU can include up to 64×64 luma samples, corresponding chroma samples, and associated syntax elements. In VVC, the size of the CTU can be further increased to include 128×128 luma samples, corresponding chroma samples, and associated syntax elements. The CTU can be further divided into coding units (CUs) using, for example, quadtrees, binary trees, or ternary trees. CUs can be further partitioned into prediction units (PUs), to which individual 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] 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 neighboring blocks already encoded in the same video image frame / slice to predict the current video block. Spatial prediction can reduce the spatial redundancy inherent in the video signal.

[0039] The timing prediction unit 262 performs timing prediction (e.g., inter-frame prediction) on the current block using information from an image / slice different from the one containing the current block. Timing prediction for a video block can be signaled using one or more motion vectors. In unidirectional timing prediction, a prediction signal for the current block is generated using a single motion vector indicating only one reference image. Conversely, in bidirectional timing prediction, a prediction signal for the current block can be generated using two motion vectors (each indicating a corresponding reference image). The motion vectors can indicate the amount and direction of motion between the current block and one or more related blocks in the reference frame. If multiple reference images are supported, one or more reference image indices can be sent for the video block. The one or more reference indices can be used to identify which reference image(s) in the reference image register or decoded image buffer (DPB) 264 the timing prediction signal might originate from.

[0040] The mode determination and encoder control unit 280 in the encoder can, for example, select a prediction mode based on rate distortion optimization. Based on the determined prediction mode, a prediction block can be obtained. The prediction block can be subtracted from the current video block at adder 216. The prediction residual can be transformed by transform unit 204 and quantized by quantization unit 206. The quantization residual coefficients can be dequantized at inverse quantization unit 210 and inverse transformed at inverse transform unit 212 to form a reconstruction residual. The reconstruction 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 can undergo loop filtering at loop filter 266. For example, loop filtering techniques such as deblocking filters, sample adaptive offset (SAO), and adaptive loop filters (ALF) can be applied. The reconstructed block after loop filtering can be stored in reference image register 264 and can be used to provide inter-frame prediction reference samples for encoding other video blocks. To form the output video bitstream 220, before the data is compressed and packaged to form the bitstream 220, coding modes (e.g., inter-frame or intra-frame), prediction mode information, motion information, and quantization residual coefficients can be sent to entropy coding unit 208 to further reduce the bit rate.

[0042] Figure 2 The diagram illustrates a sample 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 encoding 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 can be sent to the inverse quantization unit 310 and the inverse transform unit 312 to obtain the reconstructed residuals. The predicted block and the reconstructed residuals can be added together at 326 to form a reconstructed block before loop filtering. The reconstructed block can then be loop filtered at the loop filter 366. For example, loop filters such as deblocking filters, SAO, and ALF can be applied. The reconstructed block after loop filtering can then be stored in the reference image register 364. The reconstructed data in the reference image register 364 can be used to obtain the decoded video 320 or to predict future video blocks. The decoded video 320 can be displayed on a display device such as system 100. Figure 1 On the display device 146 described in ).

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

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

[0046] In pass 1, the importance flags (e.g., sig_coeff_flag), the greater than 1 flag (e.g., gtl_flag), the parity flag (e.g., par_level_flag), and the greater than 3 flag (e.g., gt3_flag) are encoded in sequence. If the importance 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. Finally, the position of the encoded coefficients for the rule (e.g., context) can be stored in the variable firstPosModel.

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

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

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

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

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

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

[0053] In pass 2, if abs_level_gtx_flag[0] at a given position is equal to 1, then a 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 if the context-coded bits are available. If the context-coded bits are not available, abs_level_gtx_flag[1] is bypassed and encoded.

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

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

[0056] In pass 5, if the position's abs_level_gtx_flag[3] is equal to 1, then a flag greater than 9 (e.g., abs_level_gtx_flag[4]) is encoded. abs_level_gtx_flag[4] specifies whether the absolute level is greater than 9. Before encoding abs_level_gtx_flag[4] for each coefficient, the CABAC engine checks if the context-coded bits are available. If the context-coded bits 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] equals 1. Non-binary syntax elements are binarized with Columbus-Rice code and the resulting binary bits are encoded in the bypass mode of the arithmetic coding engine.

[0058] Figure 3 illustrates example pseudocode for a syntax that includes transform coding. For example, the syntax shown in Figure 3 can be used for transform coding in VVC. Figure 4 illustrates example pseudocode for a syntax that includes transform skip residual coding. For example, the syntax shown in Figure 4 can be used for transform skip residual coding in VVC.

[0059] Several issues exist in the current design of transform-skip residual coding. First, transform-skip residual coding has six coding passes. That means that in many cases, the CABAC engine needs to scan the coefficient set six times, which significantly impacts CABAC throughput. Second, the number of coding passes for transform-skip residual coding differs from that of transform residual coding (e.g., six passes vs. three passes). This difference in coding passes can introduce hardware implementation complexity. Third, the coefficient scan in transform-skip residual coding is a forward scan, while the scan in transform residual coding is in reverse order. This difference in scan order can also introduce hardware implementation complexity. Fourth, in transform residual coding, the 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 hoped that a unified bypass coding method for transform residual coding and transform skip residual coding can be achieved.

[0060] Embodiments of this disclosure provide a novel bypass coding method for parity flags. A parity flag specifies the parity of an absolute level minus 2, indicating whether the absolute value of a non-zero coefficient position is even or odd. The probability distribution of the parity flag in a transform skip block can be uniform. Therefore, the probabilities of even and odd values ​​can be equal. As a result, bypass coding of the parity flag and the signal parity flag can be applied. This bypass coding can occur before or after signaling `abs_remainder`. If a flag greater than 1 equals 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 allows 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 conventional context-coded binary bits and can be signaled during the second pass of the coefficient encoding process. The parity flag can be signaled before or after a flag greater than 3.

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

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

[0064] In some embodiments, the number of encoding passes for the transformation skip level of a sub-block can be reduced to 3. Figure 5 The illustration shows an example method for skipping residual coding in a transform with a coding pass count reduced to 3, according to some embodiments of the present disclosure. Figure 5 The method involves three repetitions.

[0065] In pass 1 (step 502), the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned from the first scan position of the sub-block to the last scan position of the sub-block. For each coefficient, there may be an importance flag (e.g., sig_coeff_flag). In some embodiments, the importance flag can specify whether the level of the coefficient is a non-zero value. If the importance flag used for the coefficient indicates that the level is a non-zero value (e.g., the importance flag equals 1), then 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 from the first scan position of the sub-block to the last scan position of the sub-block is scanned. If a coefficient's greater than 1 flag indicates an absolute level greater than 1 (e.g., the greater than 1 flag equals 1), then 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. If a coefficient's greater than 3 flag indicates an absolute level greater than 3 (e.g., the greater than 3 flag equals 1), then a 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 a coefficient's greater than 5 flag indicates an absolute level greater than 5 (e.g., the greater than 5 flag equals 1), then a 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 a coefficient greater than 7 indicates an absolute level greater than 7 (e.g., a greater than 7 flag equal to 1), then a 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.

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

[0068] Figure 6 illustrates some embodiments according to the present disclosure, including... Figure 5 The example pseudocode for the syntax of the method shown is provided. Some parts of the pseudocode in Figure 6 are indicated in italics to indicate the handling of the greater than 3 flag, greater than 5 flag, greater than 7 flag, greater than 9 flag, and parity level flag.

[0069] You should understand Figure 5 The method can be generated by the encoder (e.g., Figure 1 The encoder is implemented in some embodiments. In some cases, the encoder is capable of receiving video frames. For the decoder (e.g., Figure 2(The decoder), this method can include three passes.

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

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

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

[0073] In some embodiments, the decoder is capable of receiving video bitstreams.

[0074] Figure 7 The illustration shows another example method of skipping residual coding by reducing the number of coding passes to 3 according to some embodiments of the present disclosure. Figure 7 The method can include three times.

[0075] In pass 1 (step 702), the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned from the first scan position of the sub-block to the last scan position of the sub-block. For each coefficient, there may be an importance flag (e.g., sig_coeff_flag). The importance flag can indicate whether the level is a non-zero value. If the importance flag for a coefficient indicates that the level is a non-zero value (e.g., the importance flag equals 1), then 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 a coefficient indicates that the absolute value of the level is greater than 1 (e.g., the greater than 1 flag equals 1), then 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 from the first scan position of the sub-block to the last scan position of the sub-block is scanned. If a coefficient's greater than 3 flag indicates an absolute level greater than 3 (e.g., the greater than 3 flag equals 1), then a 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 a coefficient's greater than 5 flag indicates an absolute level greater than 5 (e.g., the greater than 5 flag equals 1), then a 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 a coefficient's greater than 7 flag indicates an absolute level greater than 7 (e.g., the greater than 7 flag equals 1), then a greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be encoded. The greater than 9 flag can specify whether the absolute level is greater than 9.

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

[0078] and Figure 5 Compared to the methods in the middle, Figure 7 The method in [the document] processes the encoding of flags greater than 3 in pass 1 instead of pass 2. Figure 8 illustrates some embodiments according to this disclosure, including [the following]. Figure 7 The example pseudocode for the syntax of the method shown is provided. Some parts of the pseudocode in Figure 8 are indicated in italics to indicate the handling of the greater than 3 flag, greater than 5 flag, greater than 7 flag, greater than 9 flag, and parity level flag.

[0079] You should understand Figure 7 The method in the code can be used by the encoder (e.g., Figure 1 The encoder is implemented in some embodiments. In some cases, the encoder is capable of receiving video frames. For the decoder (e.g., Figure 2 (The decoder), this method can include three passes.

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

[0081] In pass 2, the coefficients of the sub-block are scanned. In some embodiments, each coefficient is scanned 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 a 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 a 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 a 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 a 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 from the first scan position of the sub-block to the last scan position of the sub-block is scanned. If a greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), then the remaining absolute levels of the coefficients (e.g., abs_remainder) can be decoded.

[0083] In some embodiments, the decoder is capable of receiving video bitstreams.

[0084] In some embodiments, the scan order of the transform skipped residual blocks can be changed to unify the scan order of the transform residual coding process and the transform skipped residual coding process. For example, the scan order of the transform skipped residual blocks can be changed from forward scanning to reverse scanning. Figure 9 An example reverse scan of an 8×8 transform skip block according to some embodiments of this disclosure is illustrated. Figure 9 As shown, the coefficient scan begins at the coefficient located at the bottom right corner and ends at the coefficient located at the top left corner. It should be understood that this can be achieved through... Figure 5 and Figure 7 The method shown is applied Figure 9 The scanning sequence is shown in the diagram.

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

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

[0087] In some embodiments, single-pass bypass coding of the absolute value of the level can be implemented. Figure 12 The illustration depicts an example single-pass bypass coding method for the absolute value of a level according to some embodiments of the present disclosure. For example... Figure 12 As shown, once the context-coded binary bits reach their maximum limit (e.g., in...), Figure 12 (shown as black dots in the image), the CABAC engine can then begin to use Columbus-Rice coding to bypass the remaining parts of the absolute level.

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

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

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

[0091]

[0092] In some embodiments, single-pass bypass coding can be combined with Figure 7 The methods shown are combined. For example, Figure 14 The illustration shows an example method of transform skipping residual coding by combining single-pass bypass coding with some embodiments of the present disclosure to reduce the number of coding passes to 3. Figure 14 The method involves three repetitions.

[0093] In pass 1 (step 1402), the coefficients of the sub-block are scanned. In some embodiments, each coefficient from the first scan position to the last scan position of the sub-block is scanned. For each coefficient, if the remaining number of context-coded bits is greater than or equal to the group limit, the following can be performed. For example, in some embodiments, it is more efficient to use context coding or bypass coding to encode all flags in the group. As a result, if the number of context-coded bits is less than the group limit, it is more efficient to use bypass coding to encode all remaining flags instead of using context coding to encode some of the remaining flags and using bypass coding to encode the other flags. In this example, there may be 4 flags encoded in the group in pass 1 (e.g., importance flag, signal coefficient sign flag, greater than 1 flag, and greater than 3 flag). Therefore, given a group limit of 4, if the remaining number of context-coded bits is greater than or equal to 4, the following can be performed for each coefficient. If the importance flag (sig_coeff_flag) indicates a non-zero level (e.g., the importance flag equals 1), then 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 an absolute level greater than 1 (e.g., the greater than 1 flag equals 1), then the greater than 3 flag (e.g., abs_level_gtx_flag[1]) can be encoded. In some embodiments, the coefficients can be scanned until the context-coded bits reach their maximum limit (e.g., Figure 12 The scan continues until the black dot in the image is reached, and then stops at the position that is the last position of the first pass.

[0094] After pass 1 ends and before pass 2 begins, the 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-coded bits is greater than or equal to the group limit, the following can be performed. For example, the group limit can be 3 (e.g., a flag greater than 5, a flag greater than 7, and a flag greater than 9). If the flag greater than 3 indicates an absolute level greater than 3 (e.g., the flag greater than 3 equals 1), the flag greater than 5 (e.g., abs_level_gtx_flag[2]) can be encoded. If the flag greater than 5 indicates an absolute level greater than 5 (e.g., the flag greater than 5 equals 1), the flag greater than 7 (e.g., abs_level_gtx_flag[3]) can be encoded. If the flag greater than 7 indicates an absolute level greater than 7 (e.g., the flag greater than 7 equals 1), the flag greater than 9 (e.g., abs_level_gtx_flag[4]) can be encoded.

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

[0097] In pass 3(a) (step 1410), the coefficients from the first scan position of the sub-block to iFirstPassBypassPos can be scanned. For each coefficient, the following can be performed: If the greater than 1 flag indicates an absolute level greater than 1 (e.g., the greater than 1 flag equals 1), the parity level flag (e.g., par_level_flag) can be bypassed. If the greater than 9 flag indicates an absolute level greater than 9 (e.g., the greater than 9 flag equals 1), the remaining absolute levels (e.g., abs_remainder) can be encoded using non-binary syntax elements binarized with Columbus-Less code. The resulting binary bits can be encoded in bypass mode of the arithmetic coding engine.

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

[0099] In some embodiments, in pass 3(b), the coefficients 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, a signal is used to indicate whether dec_abs_level is zero. If dec_abs_level is non-zero, the non-binary syntax elements binarized with Columbus-Less code and the resulting binary bits can be encoded in the bypass mode of the arithmetic coding engine. The signal coefficient sign flag can also be encoded.

[0100] Figure 15 illustrates embodiments of the present disclosure including […]. Figure 14 The following is an example pseudocode of the syntax for the bypass coding method combination in Figure 15. Some parts of the pseudocode in Figure 15 are indicated in italics to indicate the handling of the greater than 3 flag, greater than 5 flag, greater than 7 flag, greater than 9 flag, and parity level flag.

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

[0102] In pass 1 (step 1602), the coefficients of the sub-block are scanned. In some embodiments, each coefficient from the first scan position to the last scan position of the sub-block is scanned. For each coefficient, if the remaining number of context-coded bits is equal to or greater than 8, the following can be performed. The importance flag (e.g., sig_coeff_flag) can be context-coded. If the importance flag indicates a non-zero level (e.g., the importance flag equals 1), the coefficient sign flag (e.g., coeff_sign_flag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) can be signaled. If the greater than 1 flag indicates an absolute level greater than 1 (e.g., the greater than 1 flag equals 1), the parity level flag (e.g., par_level_flag) and the greater than 3 flag (e.g., abs_level_gtx_flag[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 a flag greater than 3 indicates that the absolute level is greater than 3 (e.g., a flag greater than 3 equals 1), then a flag greater than 5 (e.g., abs_level_gtx_flag[2]) can be encoded. If a flag greater than 5 indicates that the absolute level is greater than 5 (e.g., a flag greater than 5 equals 1), then a flag greater than 7 (e.g., abs_level_gtx_flag[3]) can be encoded. If a flag greater than 7 indicates that the absolute level is greater than 7 (e.g., a flag greater than 7 equals 1), then a flag greater than 9 (e.g., abs_level_gtx_flag[4]) can be encoded. A flag greater than 9 can specify whether the absolute level of the level is greater than 9. In some embodiments, the coefficients can be scanned until the context-coded bits reach the maximum limit (e.g., Figure 12 The scan continues until the black dot in the image is reached, and then stops at the position that is the last position of the first pass.

[0103] After pass 1 ends and before pass 2 begins, the first pass bypass position variable (iFirstPassBypassPos) can be set based on the last position of the previous pass (step 1604). In some embodiments, the first pass bypass position variable can be set to the last position of the previous pass plus 1. The first pass bypass position variable can represent the starting position from which the absolute level (e.g., dec_abs_level) syntax is signaled. Coefficients whose scan positions are less than the first pass bypass position can be signaled partially 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, the flags of that coefficient are not context encoded, and the complete coefficients and signs can be signaled using the bypass encoding of pass 2(b).

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

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

[0106] You should understand Figure 16 The method can be generated by the encoder (e.g., Figure 1 This is implemented using an encoder. In some embodiments, the encoder is capable of receiving video frames. It should be understood that a decoder (e.g., an encoder) can be used. Figure 2 The decoder is used to decode the encoded video frames from the method of 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 from the first scan position to the last scan position of the sub-block is scanned. For each coefficient, if the remaining number of context-coded bits is equal to or greater than 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., importance 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). Context decoding of the importance flag (e.g., sig_coeff_flag) is possible. If the importance flag indicates a non-zero level (e.g., the importance 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 a flag greater than 1 indicates that the absolute level is greater than 1 (e.g., a flag greater than 1 equals 1), then 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 a flag greater than 3 indicates that the absolute level is greater than 3 (e.g., a flag greater than 3 equals 1), then the greater than 5 flag (e.g., abs_level_gtx_flag[2]) can be decoded. If a flag greater than 5 indicates that the absolute level is greater than 5 (e.g., a flag greater than 5 equals 1), then the greater than 7 flag (e.g., abs_level_gtx_flag[3]) can be decoded. If a flag greater than 7 indicates that the absolute level is greater than 7 (e.g., a flag greater than 7 equals 1), then the greater than 9 flag (e.g., abs_level_gtx_flag[4]) can be decoded. The greater than 9 flag can specify whether the absolute level of the level is greater than 9. In some embodiments, the coefficients can be scanned until the context-coded binary bits reach their maximum limit (e.g., Figure 12 The scan continues until the black dot in the image is reached, and then stops at the position that is the last position of the first pass.

[0108] After pass 1 ends and before pass 2 begins, the 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 of the absolute level (e.g., dec_abs_level) syntax from which it is signaled. Coefficients whose scan positions are less than the first pass bypass position can be signaled partially 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, the flags of that coefficient are not context-decoded, and the complete coefficients and signs can be signaled using bypass decoding in pass 2(b).

[0109] In pass 2(a), it is possible to scan the coefficients from the first scan position of the subblock to the position of the first pass bypass position variable minus 1. The following can be performed for each coefficient. If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag equals 1), then the binarized residual absolute level (e.g., abs_remainder) can be decoded using Columbus-Less code, and the resulting binary bits can be decoded in the bypass mode of the arithmetic coding engine.

[0110] In pass 2(b), 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 binarized absolute level (e.g., dec_abs_level) can be decoded using Columbus-Less code, and the resulting binary bits 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 bypassed and decoded.

[0111] Figure 17 illustrates some embodiments according to the present disclosure, including... Figure 16 The following is an example pseudocode of the bypass coding syntax for the method in Figure 17. Some parts of the pseudocode in Figure 17 are shown in italics, indicating the bypass position for the first pass and the processing for pass 2(b).

[0112] In some embodiments, as shown in FIG17, pass 1 is performed only when the remaining number of context-coded bits is greater than or equal to 8 (e.g., “MaxCcbs>=8” as shown in FIG17). This means that up to 7 context codes in the context-coded bit budget may be “wasted,” which may impair encoding performance. Therefore, in some embodiments, the number of abs_level_gtx_flag[] flags can be adjusted in the disclosed two-pass encoding method. For example, instead of encoding flags greater than 9 (e.g., abs_level_gtx_flag[4]), only flags greater than 7 (e.g., abs_level_gtx_flag[3]) are encoded. Thus, pass 1 can be performed only when the remaining number of context-coded bits is equal to or greater than 7. In some embodiments, only flags greater than 5 (abs_level_gtx_flag[2]) can be encoded. Thus, pass 1 is performed only when the remaining number of context-coded bits is equal to or greater than 6. It should be understood that the number of abs_level_gtx_flag[] flags can be adjusted to any number. Adjusting the number of abs_level_gtx_flag[] flags allows more positions to be encoded in the first encoding pass, thus providing better encoding efficiency.

[0113] In some embodiments, the Rice parameter cRiceParam can be derived as follows: Given an array TransCoeffLevel[xC][yC] as the coefficient value at scan position (xC, yC) and a minLevel as the minimum bypass coding value, the minLevel of a coefficient is 0 if none of its flags are context-coded. If all flags are context-coded, minLevel equals 10. The variable locSumAbs can be derived as specified by the following pseudocode:

[0114]

[0115] Figure 18 An example lookup table of the Rice parameter is illustrated according to some embodiments of the present disclosure when the minimum bypass coding value is equal to 0. For example... Figure 18 As shown, the Rice parameter can be represented by the variable cRiceParam. 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 equals 0, then... Figure 18 The table shown. If minLevel is not equal to 0, then it is possible to use Figure 13 The table shown.

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

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

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

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

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

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

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

[0124]

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

[0126]

[0127] In VVC (e.g., VVC 7), a single context variable can be used to encode the `par_level_flag` of the transform skip mode. In some embodiments, a total of two context variables (one for luma and one for chroma) can be used to encode the `par_level_flag` of the transform skip mode. The context index used to encode the `par_level_flag` of the transform skip mode can be derived as follows. The input to this process can be the color component index `cIdx`. The output of this process is the encoding index variable `ctxInc`. In some embodiments, the variable `ctxInc` can be derived from the following pseudocode:

[0128]

[0129] In some embodiments, the abs_level_gtx_flag for transform skipping modes can be encoded using separate context variables for luma and chroma. The context index for encoding the abs_level_gtx_flag for transform skipping 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 of the syntax element abs_level_gtx_flag[n][j] for j>0 is derived as ctxInc = j-1; and for the chroma component (e.g., cIdx greater than 0), the context index is incremented to ctxInc = ctxInc + 4.

[0130] In VVC (e.g., VVC 7), six context variables can be used to encode the coeff_sign_flag of the transform skip mode. In some embodiments, a total of 12 context variables (six for luma and six for chroma) can be used to encode the coeff_sign_ftag of the transform skip mode. A context index for encoding the coeff_sign_flag of the transform skip mode can be derived based on the coeff_sign_flag of its neighbors (e.g., the top neighbor and left neighbor). The inputs 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 of the current transform block (e.g., the top-left sample) relative to a specific sample of the current image (e.g., the top-left sample). The output of this process can be the encoding index variable ctxInc. In some embodiments, the variables leftSign and aboveSign can be derived based on the following pseudocode:

[0131]

[0132] In some embodiments, the variable ctxInc can be derived from the following pseudocode:

[0133]

[0134] In VVC (e.g., VVC 7), three context variables can be used to encode the `coded_sub_block_flag` of the transform skip mode. `coded_sub_block_flag` can be a sub-block flag specifying whether the transform coefficient level in the sub-block is equal to 0. For example, if `coded_sub_block_flag[xS][yS]` equals 0, then the transform coefficient level of the sub-block at position (xS, yS) is inferred to be equal to 0. If `coded_sub_block_flag[xS][yS]` equals 1, then at least one of the transform coefficient levels of the sub-block at position (xS, yS) has a non-zero value. In some embodiments, a total of six context variables (three for luma and three for chroma) can be used to encode the `coded_sub_block_flag` of the transform skip mode. Context indices for encoding the `coded_sub_block_flag` of the transform skip mode can be derived based on the `coded_sub_block_flag`s of the upper and left neighbors. The inputs to this process can be the color component index cIdx, the luminance position (x0, y0), the current subblock scan position (xS, yS), the previously decoded binary bits of the syntax element coded_sub_block_flag, the binary logarithms of the transform block width log2TbWidth and transform block height log2TbHeight. The luminance 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 can be the encoded index variable ctxInc. In some embodiments, the variables log2SbWidth and log2SbHeight can be derived from the following pseudocode:

[0135]

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

[0137]

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

[0139]

[0140] In some embodiments, the context index variable ctxInc can be derived using the color component indices cIdx and csbfCtx based on the following pseudocode:

[0141]

[0142] In some embodiments, a non-transitory computer-readable storage medium including instructions that can be executed by means of devices such as the disclosed encoders and decoders to perform the methods described above. Common forms of non-transitory media include, for example, floppy disks, flexible disks, hard disks, solid-state drives, magnetic tape or any other magnetic data storage media, CD-ROMs, any other optical data storage media, any physical media with a perforated pattern, RAM, PROMs and EPRQMs, FLASH-EPROMs or any other flash memory, NVRAMs, caches, registers, any other memory chips or cartridges, and their networking versions. The means may include one or more processors (CPUs), input / output interfaces, network interfaces, and / or memory.

[0143] It should be noted that relational terms such as “first” and “second” in this document are used only to distinguish one entity or operation from another, without requiring or implying any actual relationship or order between these entities or operations. Furthermore, the words “including,” “having,” “containing,” and “including,” and other similar forms are intended to be semantically equivalent and open-ended, as 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 listed one or more items.

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

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

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

[0147] The embodiments may be further described using the following terms:

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

[0149] Perform a first pass of the transform coefficients for sub-blocks of the scanned video frame, wherein the first pass of the scan includes:

[0150] The parity level flag of the transform coefficient is bypassed and encoded, the parity level flag indicating the parity of the absolute value of the level of the transform coefficient.

[0151] 2. The encoding method according to Clause 1 further includes:

[0152] Before the first pass of the scan, a second pass of the scan of the transform coefficients is performed, wherein the second pass of the scan includes:

[0153] Encode 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 includes:

[0155] The parity level flag is bypassed in response to the greater than 1 flag indicating that the absolute value is greater than 1.

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

[0157] Scan the plurality of transform coefficients until the number of context-coded binary bits reaches the maximum limit; and

[0158] In response to the maximum limit being reached in the number of context-coded bits, the absolute values ​​of the levels of the transform coefficients not scanned in the second pass are bypassed and encoded, wherein the bypass encoding includes binarizing the absolute values ​​of the unscanned transform coefficients using Columbus-Rice coding.

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

[0160] The importance flags of the transform coefficients are encoded, and the importance flags indicate whether the level of the transform coefficients is zero; and

[0161] In response to the importance flag indicating that the level of the transformation coefficient is not zero, a flag greater than 1 is encoded.

[0162] 5. The encoding method according to any one 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, the 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 includes:

[0165] After the second pass of the scan and before the first pass of the scan, a third pass of the scan of the transform coefficients is performed, wherein the third pass of the scan includes:

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

[0167] In response to the greater than 5 flag indicating that the absolute value is greater than 5, the greater than 7 flag of the transform coefficient is encoded, 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, the 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 according to 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, the remaining absolute level flag of the transform coefficient is encoded, the remaining absolute level flag indicating the remaining absolute value of the level of the transform coefficient.

[0171] 8. The encoding method according to Clause 2 further includes:

[0172] After the second pass of the scan and before the first pass of the scan, a third pass of the scan of the transform coefficients is performed, wherein the third pass of the scan further includes:

[0173] In response to the greater than 1 flag indicating that the absolute value is greater than 1, the 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 according to Clause 8, wherein the third pass of the scan further comprises:

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

[0176] In response to the greater than 5 flag indicating that the absolute value is greater than 5, the greater than 7 flag of the transform coefficient is encoded, 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, the 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 according to 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, the remaining absolute level flag of the transform coefficient is encoded, the remaining absolute level flag indicating the remaining absolute value of the level of the transform coefficient.

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

[0181] 12. The encoding method according to Clause 11 further includes:

[0182] The plurality of transformation coefficients are flipped before the first pass of the scan is performed.

[0183] 13. The encoding method according to any one 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-13 further comprises:

[0185] Receive the video frame; and

[0186] The video frame is divided into multiple sub-blocks.

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

[0188] Perform a first pass of the transform coefficients for sub-blocks of the scanned video frame, wherein the first pass of the scan includes:

[0189] The parity level flag of the transform coefficients is bypassed and decoded, the parity level flag indicating the parity of the absolute value of the level of the transform coefficients.

[0190] 16. The decoding method according to Clause 15 further includes:

[0191] Before the first pass of the scan, a second pass of the scan of the transform coefficients is performed, wherein the second pass of the scan includes:

[0192] Decode the 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 includes:

[0194] In response to the greater than 1 flag indicating that the absolute value is greater than 1, the parity level flag is bypassed and decoded in the first pass.

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

[0196] Decode the importance flag of the transform coefficients, the importance flag indicating whether the level of the transform coefficient is zero; and

[0197] The greater than 1 flag is decoded in response to the importance flag indicating that the level of the transform coefficient is not zero.

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

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

[0200] In response to the greater than 3 flag indicating that the absolute value is greater than 3, the greater than 5 flag of the transform coefficient is decoded, the greater than 5 flag indicating whether the absolute value is greater than 5;

[0201] In response to the greater than 5 flag indicating that the absolute value is greater than 5, the greater than 7 flag of the transform coefficient is decoded, 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, the 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 includes:

[0204] Perform a third pass of scanning the transform coefficients, wherein the third pass of scanning includes:

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

[0206] 20. The decoding method 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 includes:

[0208] The plurality of transformation coefficients are flipped before the first pass of the scan is performed.

[0209] 22. The decoding method according to any one 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] Memory, the memory storing instruction sets; and

[0212] Processor, the processor being configured to execute the instruction set to enable the system to:

[0213] Perform a first pass of the transform coefficients for sub-blocks of the scanned video frame, wherein the first pass of the scan includes:

[0214] The parity level flag of the transform coefficient is bypassed and encoded, the parity level flag indicating the parity of the absolute value of the level of the transform coefficient.

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

[0216] Memory, the memory storing instruction sets; and

[0217] Processor, the processor being configured to execute the instruction set to enable the system to:

[0218] Perform a first pass of the transform coefficients for sub-blocks of the scanned video frame, wherein the first pass of the scan includes:

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

[0220] 25. An encoding method implemented by an encoder for video data, the method comprising:

[0221] Perform the first pass of the transform coefficients for sub-blocks of the scanned video frame, where:

[0222] The first pass of the scan stops when the number of context-encoded bits reaches the maximum limit.

[0223] In the first pass, the first set of transform coefficients of the sub-block is scanned, and

[0224] The first pass of the scan includes, for each transform coefficient in the first set of transform coefficients, encoding an importance flag indicating whether the level of the transform coefficient is zero; and

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

[0226] The absolute value of the level of each transform coefficient in the second group of transform coefficients is binarized, wherein the second group of transform coefficients is not scanned in the first pass.

[0227] 26. The encoding method according to Clause 25, wherein the first pass of the scan further comprises:

[0228] In response to the importance flag of the first transform coefficient indicating that the level of the first transform coefficient is not zero, a greater than 1 flag is encoded for the first transform coefficient, which is one of the first group of transform coefficients, and the greater than 1 flag indicates whether the absolute value of the level of the first transform coefficient is greater than 1.

[0229] 27. The encoding method according to Clause 26, wherein the first pass of the scan further comprises:

[0230] In response to the greater than 1 flag indicating that the absolute value of the level of the first transform coefficient is greater than 1, the greater than 3 flag of the first transform coefficient is encoded, the greater than 3 flag indicating whether the absolute value of the level of the first transform coefficient is greater than 3, wherein the first pass of the scan is stopped when the number of remaining context code bits is less than the group limit;

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

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

[0233] In response to the greater than 7 flag indicating that the absolute value of the level of the first transform coefficient is greater than 7, the greater than 9 flag 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.

[0234] 28. The encoding method according to Clause 27, wherein the second pass of the scan further comprises:

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

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

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

[0238] The transformation coefficients of the sub-block are flipped before the first pass is performed.

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

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

[0241] The absolute value is binarized using Columbus-Leys code.

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

[0243] Perform the first pass of the transform coefficients for sub-blocks of the scanned video frame, where:

[0244] The first pass of the scan stops when the maximum number of context-encoded bits is reached.

[0245] In the first pass, the first set of transform coefficients of the sub-block is scanned, and

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

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

[0248] The binarized absolute value of each level of the transform coefficients in the second group is decoded, wherein the second group of transform coefficients is not scanned in the first pass.

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

[0250] In response to the importance flag of the first transform coefficient indicating that the level of the first transform coefficient is not zero, the greater than 1 flag of the first transform coefficient is decoded. The first transform coefficient is one of the first group of transform coefficients, and the greater than 1 flag indicates whether the absolute value of the level of the first transform coefficient is greater than 1.

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

[0252] In response to the greater than 1 flag indicating that the absolute value of the level of the first transform coefficient is greater than 1, the greater than 3 flag of the first transform coefficient is decoded, the greater than 3 flag indicating whether the absolute value of the level of the first transform coefficient being scanned is greater than 3, wherein the first pass of the scan is stopped when the number of remaining context-coded bits is less than the group limit.

[0253] In response to the greater than 3 flag indicating that the absolute value of the level of the first transform coefficient is greater than 3, the greater than 5 flag of each of the first transform coefficients is decoded, the greater than 5 flag indicating whether the absolute value of the level of the first transform coefficient is greater than 5;

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

[0255] In response to the greater than 7 flag indicating that the absolute value of the level of the first transform coefficient is greater than 7, the greater than 9 flag 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.

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

[0257] 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, the remaining absolute level flag of 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.

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

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

[0260] The absolute value is decoded using Columbus-Leys code.

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

[0262] Memory, the memory storing instruction sets; and

[0263] Processor, the processor being configured to execute the instruction set to enable the system to:

[0264] Perform the first pass of the transform coefficients for sub-blocks of the scanned video frame, where:

[0265] The first pass of the scan stops when the maximum number of context-encoded bits is reached.

[0266] In the first pass, a first set of transform coefficients of the sub-block is scanned, and the first pass of the scan includes, for each transform coefficient in the first set of transform coefficients, encoding an importance flag indicating whether the level of the transform coefficient is zero; and

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

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

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

[0270] Memory, the memory storing instruction sets; and

[0271] Processor, the processor being configured to execute the instruction set to enable the system to:

[0272] Perform the first scan of the transform coefficients for sub-blocks of the video frame, where:

[0273] The first pass of the scan stops when the maximum number of context-encoded bits is reached.

[0274] In the first pass, a first set of transform coefficients of the sub-block is scanned, and the first pass of the scan includes, for each transform coefficient in the first set of transform coefficients, decoding an importance flag indicating whether the level of the transform coefficient is zero; and

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

[0276] The binarized absolute value of each level of the transform coefficients in the second group is decoded, wherein the second group of transform coefficients is not scanned in the first pass.

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

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

[0279] Generate a second set of context variables for the chroma components of the video frame.

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

[0281] The first set of transform coefficients of the sub-block are encoded based on the first set of context variables and the second set of context variables.

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

[0283] The importance flags of the 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. The importance flags indicate whether the level of the transform coefficient is zero.

[0284] 43. The encoding method according to Clause 42 further includes:

[0285] 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, wherein the generation is based on the color component index, the brightness position of the sub-block relative to the video frame, and the current coefficient scan position.

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

[0287] The greater than x flag of the transform coefficients in the first set of transform coefficients is encoded based on 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 the absolute value of the level of the transform coefficient is greater than the number x.

[0288] 45. The encoding method according to Clause 44 further includes:

[0289] 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, wherein the generation is based on the color component index, the luminance position of the sub-block relative to the video frame, and the current coefficient scan position.

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

[0291] The parity flag of the transform coefficients in the first set of transform coefficients is encoded based on 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 the parity of the absolute value of the level of the transform coefficient.

[0292] 47. The encoding method according to Clause 46 further includes:

[0293] The first context variable is generated from the first set of context variables, and the second context variable is generated from the color component index.

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

[0295] The coefficient sign flag of the transform coefficients in the first set of transform coefficients is encoded based on 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 flag indicates the sign of the value of the transform coefficient.

[0296] 49. The method described under Clause 48 further includes:

[0297] The generation of 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 generation is based on the number of importance coefficients of the neighbors of the video frame, the brightness position of the sub-block relative to the video frame, and the current coefficient scan position.

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

[0299] The sub-block flags of the transform coefficients in the first group of transform coefficients are encoded based on three context variables from the first group of context variables and three context variables from the second group of context variables.

[0300] 51. The method described in accordance with Clause 50 further includes:

[0301] The three context variables generated from the first set of context variables and the three context variables generated from the second set of context variables are based on the number of importance coefficients of the neighbors of the video frame, the brightness position of the sub-block relative to the video frame, and the current coefficient scan position.

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

[0303] Receive video bitstream;

[0304] The video bitstream is divided into multiple sub-blocks;

[0305] Generate the first set of context variables for the luminance components of the sub-block;

[0306] Generate a second set of context variables for the chromaticity components of the sub-block; and

[0307] The first set of transform coefficients of the sub-block are context-coded based on the first set of context variables and the second set of context variables.

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

[0309] Receive video frames;

[0310] The video frame is divided into multiple sub-blocks;

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

[0312] Generate a second set of context variables for the chroma components of the video frame; and

[0313] The first set of transform coefficients of the sub-block are decoded based on the first set of context variables and the second set of context variables.

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

[0315] The importance flags of the 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. These importance flags indicate whether the level of the transform coefficient is zero.

[0316] 55. The decoding method according to Clause 54 further includes:

[0317] 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, wherein the generation is based on the color component index, the brightness position of the upper left sample of the current transform block relative to the upper left sample of the video frame, and the current coefficient scan position.

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

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

[0320] 57. The decoding method according to Clause 56 further includes:

[0321] 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, wherein the generation is based on the color component index, the brightness position of the upper left sample of the current transform block relative to the upper left sample of the video frame, and the current coefficient scan position.

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

[0323] The parity flag of the transform coefficients in the first set of transform coefficients is decoded based on one context variable from the first set of context variables and one context variable from the second set of context variables.

[0324] 59. The decoding method according to Clause 58 further includes:

[0325] One context variable is generated from the first set of context variables and another context variable is generated from the second set of context variables, the generation being based on the color component index.

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

[0327] The context coefficient sign flags of the transform coefficients in the first set of transform coefficients are decoded based on the six context variables from the first set of context variables and the six context variables from the second set of context variables.

[0328] 61. The decoding method according to Clause 60 further includes:

[0329] The six context variables from the first set of context variables and the six context variables from the second set of context variables are generated, wherein the generation is based on the number of importance coefficients of the upper and left neighbors of the video frame, the brightness position of the upper left sample of the current transform block relative to the upper left sample of the video frame, and the current coefficient scan position.

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

[0331] The sub-block flags of the 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.

[0332] 63. The decoding method according to Clause 62 further includes:

[0333] 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 importance coefficients of the upper and left neighbors of the video frame, the brightness position of the upper left sample of the current transform block relative to the upper left sample of the video frame, and the current coefficient scan position.

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

[0335] Memory, the memory storing instruction sets; and

[0336] Processor, the processor being configured to execute the instruction set to enable the system to:

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

[0338] Generate a second set of context variables for the chroma components of the video frame;

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

[0340] The first set of transform coefficients of the sub-block are encoded based on the first set of context variables and the second set of context variables.

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

[0342] Memory, the memory storing instruction sets; and

[0343] Processor, the processor being configured to execute the instruction set to enable the system to:

[0344] Receive video frames;

[0345] The video frame is divided into multiple sub-blocks;

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

[0347] Generate a second set of context variables for the chroma components of the video frame; and

[0348] The first set of transform coefficients of the sub-block are decoded based on the first set of context variables and the second set of context variables.

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

[0350] Perform a first pass of the transform coefficients for sub-blocks of the scanned video frame, wherein the first pass of the scan includes:

[0351] The parity level flag of the transform coefficient is bypassed and encoded, the parity level flag indicating the parity of the absolute value of the level of the transform coefficient.

[0352] 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:

[0353] Perform a first pass of the transform coefficients for sub-blocks of the scanned video frame, wherein the first pass of the scan includes:

[0354] The parity level flag of the transform coefficients is bypassed and decoded, the parity level flag indicating the parity of the absolute value of the level of the transform coefficients.

[0355] 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:

[0356] Perform the first pass of the transform coefficients for sub-blocks of the scanned video frame, where:

[0357] The first pass of the scan stops when the maximum number of context-encoded bits is reached.

[0358] In the first pass, the first set of transform coefficients of the sub-block is scanned, and

[0359] The first pass of the scan includes, for each transform coefficient in the first set of transform coefficients, encoding an importance flag indicating whether the level of the transform coefficient is zero; and

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

[0361] The absolute value of the level of each transform coefficient in the second group of transform coefficients is binarized, wherein the second group 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] Perform the first pass of the transform coefficients for sub-blocks of the scanned video frame, where:

[0364] The first pass of the scan stops when the maximum number of context-encoded bits is reached.

[0365] In the first pass, the first set of transform coefficients of the sub-block is scanned, and

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

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

[0368] The binarized absolute value of each level of the transform coefficients in the second group is decoded, wherein the second group of transform coefficients is not scanned in the first pass.

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

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

[0371] Generate a second set of context variables for the chroma components of the video frame.

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

[0373] The first set of transform coefficients of the sub-block are encoded based on the first set of context variables and the second set of context variables.

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

[0375] Receive video frames;

[0376] The video frame is divided into multiple sub-blocks;

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

[0378] Generate a second set of context variables for the chroma components of the video frame; and

[0379] The first set of transform coefficients of the sub-block are decoded based on the first set of context variables and the second set of context variables.

[0380] Exemplary embodiments have been disclosed in the accompanying drawings and description. However, many variations and modifications can be made to these embodiments. Therefore, although specific terms have been used, they are used in a general and descriptive sense only and not for limiting purposes.

Claims

1. An encoding method implemented by an encoder of video data, the method comprising: encoding by performing a multi-pass scan on a plurality of transform coefficients of a transform-skip subblock of a video frame, only one of the multi-pass scans including: performing a scan from a first scan position of the transform-skip subblock to a last scan position of the transform-skip subblock; and encoding a plurality of flags for each transform coefficient located at each scan position, including: in response to abs_level_gtx_flag[0] of the current transform coefficient being equal to 1, encoding abs_level_gtx_flag[1] of the current transform coefficient, the abs_level_gtx_flag[1] indicating whether an absolute value of a level of the current transform coefficient is greater than 3; in response to abs_level_gtx_flag[1] of the current transform coefficient being equal to 1, encoding abs_level_gtx_flag[2] of the current transform coefficient, the abs_level_gtx_flag[2] indicating whether an absolute value of a level of the current transform coefficient is greater than 5; in response to abs_level_gtx_flag[2] of the current transform coefficient being equal to 1, encoding abs_level_gtx_flag[3] of the current transform coefficient, the abs_level_gtx_flag[3] indicating whether an absolute value of a level of the current transform coefficient is greater than 7; and in response to abs_level_gtx_flag[3] of the current transform coefficient being equal to 1, encoding abs_level_gtx_flag[4] of the current transform coefficient, the abs_level_gtx_flag[4] indicating whether an absolute value of a level of the current transform coefficient is greater than 9.

2. A decoding method implemented by a decoder of video data, the method comprising: decoding by performing a multi-pass scan on a plurality of transform coefficients of a transform-skip subblock of a video frame, only one of the multi-pass scans including: performing a scan from a first scan position of the transform-skip subblock to a last scan position of the transform-skip subblock; and decoding a plurality of flags for each transform coefficient located at each scan position, including: in response to abs_level_gtx_flag[0] of the current transform coefficient being equal to 1, decoding abs_level_gtx_flag[1] of the current transform coefficient, the abs_level_gtx_flag[1] indicating whether an absolute value of a level of the current transform coefficient is greater than 3; in response to abs_level_gtx_flag[0] of the current transform coefficient being equal to 1, abs_level_gtx_flag[1] of the current transform coefficient is decoded, the abs_level_gtx_flag[1] indicating whether an absolute value of a level of the current transform coefficient is greater than 3; in response to abs_level_gtx_flag[1] of the current transform coefficient being equal to 1, abs_level_gtx_flag[2] of the current transform coefficient is decoded, the abs_level_gtx_flag[2] indicating whether an absolute value of a level of the current transform coefficient is greater than 5; in response to abs_level_gtx_flag[2] of the current transform coefficient being equal to 1, abs_level_gtx_flag[3] of the current transform coefficient is decoded, the abs_level_gtx_flag[3] indicating whether an absolute value of a level of the current transform coefficient is greater than 7; and 3. A method of transmitting a bit stream, characterized by, in response to abs_level_gtx_flag[3] of the current transform coefficient being equal to 1, abs_level_gtx_flag[4] of the current transform coefficient is decoded, the abs_level_gtx_flag[4] indicating whether an absolute value of a level of the current transform coefficient is greater than 9. performing the encoding method implemented by the encoder of video data of claim 1 to generate a video bitstream, and transmitting the video bitstream: encoding by performing a multi-pass scan on a plurality of transform coefficients of a transform skipped sub-block of a video frame, only one pass of the multi-pass scan, the encoding comprising: performing a scan from a first scan position of the transform skipped sub-block to a last scan position of the transform skipped sub-block; and encoding a plurality of flags of each transform coefficient located at each scan position, comprising: in response to abs_level_gtx_flag[0] of the current transform coefficient being equal to 1, abs_level_gtx_flag[1] of the current transform coefficient is encoded, the abs_level_gtx_flag[1] indicating whether an absolute value of a level of the current transform coefficient is greater than 3; in response to abs_level_gtx_flag[1] of the current transform coefficient being equal to 1, abs_level_gtx_flag[2] of the current transform coefficient is encoded, the abs_level_gtx_flag[2] indicating whether an absolute value of a level of the current transform coefficient is greater than 5; in response to abs_level_gtx_flag[2] of the current transform coefficient being equal to 1, abs_level_gtx_flag[3] of the current transform coefficient is encoded, the abs_level_gtx_flag[3] indicating whether an absolute value of a level of the current transform coefficient is greater than 7; and in response to abs_level_gtx_flag[3] of the current transform coefficient being equal to 1, abs_level_gtx_flag[4] of the current transform coefficient is decoded, the abs_level_gtx_flag[4] indicating whether an absolute value of a level of the current transform coefficient is greater than 9. In response to abs_level_gtx_flag[3] of the current transform coefficient being equal to 1, abs_level_gtx_flag[4] of the current transform coefficient is encoded, the abs_level_gtx_flag[4] indicating whether an absolute value of a level of the current transform coefficient is greater than 9.