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

By employing a bypass coding method with parity flags in the transform skip residual coding, the number of coding passes is reduced to three, solving the problem of high coding complexity in existing technologies, improving coding efficiency and throughput, and achieving simplification of hardware implementation and unification of the coding process.

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

Patent Information

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

AI Technical Summary

Technical Problem

Existing transform skip residual coding in video compression suffers from problems such as excessive coding passes, high hardware implementation complexity, asynchronous scanning order, and numerous bypass coding syntax elements, 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. The scanning order and bypass coding method 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 processing capabilities of the encoder and decoder.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119922335B_ABST
    Figure CN119922335B_ABST
Patent Text Reader

Abstract

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

Description

[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 example system includes a memory storing a set of instructions and a processor configured to execute the set of instructions to cause the system to perform a first pass of scanning transform coefficients of sub-blocks of a video frame, wherein the first pass of scanning includes bypassing decoding of a parity level flag of the transform coefficients, the parity level flag indicating a parity of an absolute value of a level of the transform coefficients. BRIEF DESCRIPTION OF DRAWINGS

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

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

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

[0013] Figure 3 Example pseudo code illustrating syntax of transform coding is illustrated.

[0014] Figure 4 Example pseudo code illustrating syntax of transform skip residual coding is illustrated.

[0015] Figure 5 An example method of transform skip residual coding reducing the number of coding passes to 3 is illustrated in accordance with some embodiments of the disclosure.

[0016] Figure 6 Example pseudo code illustrating syntax of the method shown is illustrated in accordance with some embodiments of the disclosure. Figure 5

[0017] Figure 7 Another example method of transform skip residual coding reducing the number of coding passes to 3 is illustrated in accordance with some embodiments of the disclosure.

[0018] Figure 8 Example pseudo code illustrating syntax of the method shown is illustrated in accordance with some embodiments of the disclosure. Figure 7

[0019] Figure 9 Example inverse scan of an 8x8 transform skip block is illustrated in accordance with some embodiments of the disclosure.

[0020] Figure 10A An 8x8 block before flipping is illustrated in accordance with some embodiments of the disclosure.

[0021] Figure 10B An 8x8 block after flipping is illustrated in accordance with some embodiments of the 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 The illustrations depict some embodiments of the present disclosure, including those with... 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 The illustrations depict some embodiments according to this 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] A video is a collection of still images (or "frames") arranged in time order to store visual information. Video capture devices (e.g., cameras) can be used to capture and store those images in time order, and video playback devices (e.g., televisions, computers, smart phones, tablet computers, video players, or any end-user terminal with display functionality) can be used to display such images in time order. Additionally, in some applications, a video capture device can transmit captured video to a video playback device (e.g., a computer with a monitor) in real time, such as for surveillance, conferencing, or live broadcasting, etc.

[0032] To reduce the storage space and transmission bandwidth required for such applications, a video can be compressed. For example, a 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 of a general-purpose computer) or by special-purpose hardware. A module for compression is often referred to as an "encoder," while a module for decompression is often referred to as a "decoder." An encoder and a decoder can be collectively referred to as a "codec." An encoder and a decoder can be implemented as any of a variety of suitable hardware, software, or combinations thereof. For example, a hardware implementation of an encoder and a decoder can include circuitry such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic or any combination thereof. A software implementation of an encoder and a decoder can include program code, computer executable instructions, firmware, or any suitable computer-implemented algorithm or process fixed in a computer readable medium. Video compression and decompression can be implemented by various algorithms or standards such as MPEG-1, MPEG-2, MPEG-4, H.26x series, etc. In some applications, a codec can decompress a video according to a first encoding standard and re-compress the decompressed video using a second encoding standard, in which case the codec can be referred to as a "transcoder."

[0033] A video encoding process can identify and retain useful information that can be used to reconstruct images. If information that is disregarded in the video encoding process cannot be completely reconstructed, the encoding process can be referred to as "lossy." Otherwise, it can be referred to as "lossless." Most encoding processes are lossy, which is a tradeoff for reducing the 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 16x16 pixel block (e.g., a macroblock (MB)). The size of the video block unit can vary depending on the encoding technique used and the accuracy and efficiency required. In HEVC, an extended block size (e.g., a coding tree unit (CTU)) can be used for compressing video signals of compression resolutions (e.g., 1080p and higher). In HEVC, a CTU can include up to 64x64 luma samples, corresponding chroma samples, and related syntax elements. In VVC, the size of the CTU can be further increased to include 128x128 luma samples, corresponding chroma samples, and related syntax elements. The CTU can be further partitioned into coding units (CUs) using, for example, quad-tree, binary-tree, or ternary-tree. The CU can be further partitioned into prediction units (PUs) to which a separate prediction method can be applied. Each input video block can be processed by using a spatial prediction unit 260 or a temporal prediction unit 262.

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

[0039] The temporal prediction unit 262 performs temporal prediction (e.g., inter prediction) on a current block using information from a different image / slice than the image / slice that contains the current block. Temporal prediction for a video block can be signaled by one or more motion vectors. In single-direction temporal prediction, a prediction signal for the current block is generated using one motion vector that indicates only one reference image. On the other hand, in bi-directional temporal prediction, two motion vectors (each indicating a respective reference image) can be used to generate a prediction signal for the current block. The motion vectors can indicate the amount and direction of motion between the current block and one or more related blocks in the reference frames. 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 a reference picture buffer or decoded picture buffer (DPB) 264 the temporal prediction signal can come from.

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

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

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

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

[0044] In VVC (e.g., VVC 5), a block can be an M x N array of transform coefficients. A transform coefficient can be a scalar considered in the frequency domain, which is associated with a particular one-dimensional or two-dimensional frequency index in the transform. A transform coefficient level can be denoted by the array TransCoeffLevel[x0][y0][cldx][xC][yC]. The array indices x0, y0 can specify the position (x0, y0) of the top-left luma sample of the considered transform block relative to the top-left luma sample of the picture. The array index cldx can specify an indicator of a color component. The array indices xC and yC can specify the transform coefficient position (xC, yC) within the current transform block.

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

[0046] In pass 1, a significance flag (e.g., sig_coeff_flag), a greater-than-1 flag (e.g., gtl_flag), a parity flag (e.g., par_level_flag), and a greater-than-3 flag (e.g., gt3_flag) are coded in order. If the significance flag is equal to 1, the greater-than-1 flag is coded first. The greater-than-1 flag specifies whether the absolute level (e.g., 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 coded. The parity flag specifies the parity of the absolute level minus 2. The greater-than-3 flag specifies whether the absolute level is greater than 3. The position of the last regular (e.g., context) coded coefficient can be stored in the variable firstPosModel.

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

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

[0049] In pass 3, the coding of the sign flags (e.g., sign flag) is processed for all scan positions for which sig_coeff_flag is equal to 1.

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

[0051] In the new residual coding process employed by JVET for transform skip residual blocks, the coefficient scan order for 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 a subblock are coded in six passes across the scan positions.

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

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

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

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

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

[0057] In pass 6, abs_remainder is processed for all scanned positions for which abs_level_gtx_flag[4] is equal to 1. The non-binary syntax element is binarized with a Golomb-Rice code and the resulting bins are coded in bypass mode of the arithmetic coding engine.

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

[0059] There are several issues in the current design of transform skip residual coding. First, the coding passes of transform skip residual coding is six. That means, in many cases, the CABAC engine needs to scan the coefficient six times, which significantly impacts the throughput of CABAC. Second, the coding passes of transform skip residual coding is different from that of transform residual coding (e.g., six passes vs. three passes). The difference in coding passes can create hardware implementation complexity. Third, the coefficient scan of transform skip residual coding is forward scan, whereas the scan of transform residual coding is in reverse order. The difference in scan order can also create 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, the 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[l], abs_level_gtx_flag[2], abs_level_gtx_flag[3], abs_level_gtx_flag[4], and abs_remainder. It is desirable to unify the bypass coding method of transform residual coding and transform skip residual coding.

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

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

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

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

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

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

[0066] In pass 2 (step 504), the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned from a first scan position of the subblock to a last scan position of the subblock. If the greater-than-1 flag of the coefficient indicates that the absolute level is greater than 1 (e.g., the greater-than-1 flag is equal to 1), the greater-than-3 flag (e.g., abs_level_gt3_flag[l]) can be encoded. The greater-than-3 flag can specify whether the absolute level is greater than 3. If the greater-than-3 flag of the coefficient indicates that the absolute level is greater than 3 (e.g., the greater-than-3 flag is equal to 1), the greater-than-5 flag (e.g., abs_level_gt5_flag[2]) can be encoded. The greater-than-5 flag can specify whether the absolute level is greater than 5. If the greater-than-5 flag of the coefficient indicates that the absolute level is greater than 5 (e.g., the greater-than-5 flag is equal to 1), the greater-than-7 flag (e.g., abs_level_gt7_flag[3]) can be encoded. The greater-than-7 flag can specify whether the absolute level is greater than 7. If the greater-than-7 flag of the coefficient indicates that the absolute level is greater than 7 (e.g., the greater-than-7 flag is equal to 1), the greater-than-9 flag (e.g., abs_level_gt9_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 subblock are scanned. In some embodiments, each coefficient is scanned from a first scan position of the subblock to a last scan position of the subblock. If the greater-than-1 flag of the coefficient indicates that the absolute level is greater than 1 (e.g., the greater-than-1 flag is equal to 1), the parity level flag (e.g., par_level_flag) of the coefficient can be bypass encoded. The parity level flag can specify the parity of the absolute level minus 2. If the greater-than-9 flag indicates that the absolute level is greater than 9 (e.g., the greater-than-9 flag is equal to 1), the remaining absolute level (e.g., abs_remainder) of the coefficient can be encoded, and the non-binary syntax element can be binarized with a Golomb-Rice code. In some embodiments, the resulting bins can be encoded in bypass mode of the arithmetic coding engine.

[0068] Figure 6 FIG. 1 illustrates a method including Figure 5 Example pseudo code for the syntax of the method shown. Figure 6 Some portions of the pseudo code in FIG. 1 are in italics, indicating the processing of the greater-than-3 flag, the greater-than-5 flag, the greater-than-7 flag, the greater-than-9 flag, and the parity level flag.

[0069] It should be appreciated that, Figure 5 The method of FIG. 1 can be implemented by an encoder (e.g., Figure 1 The encoder of FIG. 1). In some embodiments, the encoder can receive a video frame. For the decoder (e.g.,Figure 2 The method can include three passes (e.g., by a decoder of the video decoder 1000).

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

[0071] In pass 2, the coefficients of a subblock are scanned. In some embodiments, each coefficient starting from the first scan position of the subblock to the last scan position of the subblock is scanned. 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 is equal to 1), a parity level flag (e.g., par_level_flag) for 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 for a coefficient indicates that the absolute level is greater than 1 (e.g., the greater-than-1 flag is equal to 1), a greater-than-3 flag (e.g., abs_level_gt3_flag[l]) can be decoded. If the greater-than-3 flag for a coefficient indicates that the absolute level is greater than 3 (e.g., the greater-than-3 flag is equal to 1), a greater-than-5 flag (e.g., abs_level_gt5_flag[2]) can be decoded. If the greater-than-5 flag for a coefficient indicates that the absolute level is greater than 5 (e.g., the greater-than-4 flag is equal to 1), a greater-than-7 flag (e.g., abs_level_gt7_flag[3]) can be decoded. If the greater-than-7 flag for a coefficient indicates that the absolute level is greater than 7 (e.g., the greater-than-7 flag is equal to 1), a greater-than-9 flag (e.g., abs_level_gt9_flag[4]) can be decoded.

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

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

[0074] Figure 7Another example method of transform skip residual coding that reduces the number of coding passes to 3 is illustrated in accordance with some embodiments of the present disclosure. Figure 7 The method of FIG. 7 can include three passes.

[0075] In pass 1 (step 702), the coefficients of the subblock are scanned. In some embodiments, each coefficient starting from the first scan position of the subblock to the last scan position of the subblock is scanned. There can be a significance flag (e.g., sig_coeff_flag) for each coefficient. The significance flag can indicate whether the level is a non-zero value. If the significance flag for a coefficient indicates that the level is a non-zero value (e.g., the significance flag is equal to 1), a signal coefficient sign flag (e.g., coeff_sign_flag) and a greater-than-1 flag (e.g., abs_level_gt_flag[0]) can be encoded. The greater-than-1 flag can specify whether the absolute value of the level is greater than 1. If the greater-than-1 flag for the coefficient indicates that the absolute value of the level is greater than 1 (e.g., the greater-than-1 flag is equal to 1), a greater-than-3 flag (e.g., abs_level_gt_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 subblock are scanned. In some embodiments, each coefficient starting from the first scan position of the subblock to the last scan position of the subblock is scanned. If the greater-than-3 flag for a coefficient indicates that the absolute level is greater than 3 (e.g., the greater-than-3 flag is equal to 1), a greater-than-5 flag (e.g., abs_level_gt_flag[2]) can be encoded. The greater-than-5 flag can specify whether the absolute level is greater than 5. If the greater-than-5 flag for the coefficient indicates that the absolute level is greater than 5 (e.g., the greater-than-5 flag is equal to 1), a greater-than-7 flag (e.g., abs_level_gt_flag[3]) can be encoded. The greater-than-7 flag can specify whether the absolute level is greater than 7. If the greater-than-7 flag for the coefficient indicates that the absolute level is greater than 7 (e.g., the greater-than-7 flag is equal to 1), a greater-than-9 flag (e.g., abs_level_gt_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 subblock are scanned. In some embodiments, each coefficient is scanned from the first scan position of the subblock to the last scan position of the subblock. If the greater-than-1 flag of the coefficient indicates that the absolute level is greater than 1 (e.g., the greater-than-1 flag is equal to 1), the parity level flag (e.g., par_level_flag) of the coefficient can be bypass coded. The parity level flag can specify the parity of the absolute level minus 2. If the greater-than-9 flag indicates that the absolute level is greater than 9 (e.g., the greater-than-9 flag is equal to 1), the remaining absolute level (e.g., abs_remainder) of the coefficient can be processed and the non-binary syntax element can be binarized with a Golomb-Rice code. The resulting bins can be encoded in bypass mode of the arithmetic coding engine.

[0078] In comparison to the method in Figure 5 , Figure 7 the method in processes the encoding of the greater-than-3 flag in pass 1 instead of pass 2. Figure 8 FIG. 1 illustrates a method according to some embodiments of the present disclosure. Figure 7 The example pseudo code of the syntax of the method shown. Figure 8 Some portions of the pseudo code in

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

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

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

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

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

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

[0085] In some embodiments, the reverse scan can be performed after the transform block is flipped. Figure 10A and Figure 10B An example flip of an 8x8 block is illustrated in accordance with some embodiments of the present disclosure. As shown, the coefficients of the block are flipped such that the coefficient located at the upper left corner is moved to the lower right corner and the coefficient located at the lower right corner is moved to the upper left corner. Figure 10A and Figure 10B ​As shown, after flipping the block, the position of the top-left residual coefficient is moved to the bottom-right position. After the block is flipped, a reverse scan (e.g., the reverse scan of Figure 9 ) can be performed.

[0086] In some embodiments, bypass coding can be performed in multiple passes. Figure 11 An example multi-pass coding is illustrated according to some embodiments of the present disclosure. In some embodiments, the multi-pass coding illustrated can be performed in VVC (e.g., VVC 5). It can be assumed that Figure 11 the number of context-coded bins in has reached a maximum limit at the position of the first pass (shown as black dots in Figure 11 ). As shown, flags (e.g., greater-than-3 flag, greater-than-5 flag, greater-than-7 flag, greater-than-9 flag, etc.) can be bypass coded in multiple coding passes. Figure 11 Figure 11 In some embodiments, single-pass bypass coding of the absolute value of the level can be implemented. An example single-pass bypass coding method for the absolute value of the level is illustrated according to some embodiments of the present disclosure. As shown, once the context-coded bins reach a maximum limit (e.g., shown as black dots in

[0087] ), the CABAC engine can start bypass coding the remaining part of the absolute level using the Golomb-Rice coding. Figure 12 Figure 12 Figure 12 An example lookup table for the Rice parameter is illustrated according to some embodiments of the present disclosure. According to , the Rice parameter can be represented by the variable cRiceParam. And the position of the absolute can be represented by the variable locSumAbs.

[0088] Figure 13 In some embodiments, the Rice parameter (e.g., cRiceParam) can be derived in the following way. Given the array AbsLevel[x][y] of the transform skipped block, the top-left luma position (x0, y0), and the current coefficient scan position (xC, yC), assume minLevel is the minimum bypass coded value, which is 0 if none of the flags of the coefficient are context coded. If all the flags are context coded, minLevel is equal to 10. Figure 13 In some embodiments, the variable locSumAbs can be derived as specified by the following pseudo code:

[0089]

[0090]

[0091]

[0092] ​​​In some embodiments, the single-pass bypass coding can be combined with the method shown in FIG. 13. Figure 7 For example, Figure 14 FIG. 13 illustrates an example method of transform skip residual coding that reduces the number of coding passes to 3 combined with single-pass bypass coding according to some embodiments of the disclosure. Figure 14 The method in FIG. 13 includes 3 passes.

[0093] In pass 1 (step 1402), the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned from the first scan position to the last scan position of the subblock. For each coefficient, if the remaining number of context coded bins is greater than or equal to the group limit, the following can be performed. For example, in some embodiments, it is more efficient to encode all the flags in a group using context coding or bypass coding. As a result, if the number of context coded bins is less than the group limit, it is more efficient to encode all the remaining flags using bypass coding instead of encoding some of the remaining flags using context coding and encoding the other flags using bypass coding. In this example, there can be 4 flags (e.g., significance flag, signal coefficient sign flag, greater-than-1 flag, and greater-than-3 flag) that are coded in pass 1 in a group. Thus, given a group limit of 4, if the remaining number of context coded bins is greater than or equal to 4, the following can be performed for each coefficient. If the significance flag (sig_coeff_flag) indicates that the level is a non-zero value (e.g., the significance flag is equal to 1), the signal coefficient sign flag (e.g., coeff_sign_flag) and the greater-than-1 flag (e.g., abs_level_gt1_flag[0]) can be coded. If the greater-than-1 flag indicates that the absolute level is greater than 1 (e.g., the greater-than-1 flag is equal to 1), the greater-than-3 flag (e.g., abs_level_gt3_flag[l]) can be coded. In some embodiments, the coefficients can be scanned until the context coded bins reach the maximum limit (e.g., 4), and then the scanning stops at the position that is the last position of the first pass. Figure 12 In some embodiments, the first pass bypass position variable (e.g., iFirstPassBypassPos) can be set to the last position of the previous pass plus 1.

[0094] After the end of pass 1 and before the start of pass 2, the first pass bypass position variable (e.g., iFirstPassBypassPos) can be set according to the last position of the previous pass (step 1404). In some embodiments, the first pass bypass position variable can be set to the last position of the previous pass plus 1.

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

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

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

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

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

[0100] Figure 15 Figure illustrates example pseudo code for a syntax including bypass coding combined with the method in Figure 14 Figure illustrates example pseudo code for a syntax including bypass coding combined with the method in Figure 15 Some parts of the pseudo code in Figure are in italics, indicating the processing of the greater-than-3 flag, the greater-than-5 flag, the greater-than-7 flag, the greater-than-9 flag, and the parity level flag.

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

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

[0103] After the end of pass 1 and before the start of pass 2, a first pass bypass position variable (iFirstPassBypassPos) can be set according to the last position of the previous pass (step 1604). In some embodiments, the first pass bypass position variable can be set to the last position of the previous pass plus 1. The first pass bypass position variable can indicate the starting position from which the absolute level (e.g., dec_abs_level) syntax is signaled. The coefficients whose scan positions are less than the first pass bypass position can be partially signaled by the context coding in pass 1 and the remaining coefficients can be signaled in pass 2(a), in some embodiments, if the scan position of a coefficient is greater than or equal to the first pass bypass position variable, none of the flags of that coefficient are context-coded, and the full coefficient and sign can be signaled using the bypass coding of pass 2(b).

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

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

[0106] It will be appreciated that, Figure 16 The method of Figure 1 may be implemented by an encoder (e.g., the encoder of Figure 2 In some embodiments, the encoder can receive a video frame. It will be appreciated that the encoded video frame from the method of Figure 17 may be decoded using a decoder (e.g., the decoder of In some embodiments, the decoding method can include 2 passes.

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

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

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

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

[0111] Figure 17 FIG. illustrates example pseudo code for bypass encoding of syntax in a method according to some embodiments of the present disclosure. Figure 16 FIG. illustrates some portions of the pseudo code in FIG. in italics, indicating the first pass bypass position and processing of pass 2(b). Figure 17 FIG. illustrates some portions of the pseudo code in FIG. in italics, indicating the first pass bypass position and processing of pass 2(b).

[0112] In some embodiments, as shown in FIG., the bypass decoding of pass 2(b) is only performed if the remaining number of context encoded bins is greater than or equal to 8 (e.g., as shown in FIG. ). Figure 17 Figure 17 ​The first pass is only executed when the remaining number of context-coded bins is equal to or greater than 8 (i.e., "Max Ccbs >= 8"). This means that up to 7 of the context-coded bins in the context coding bin budget can be "wasted", which can impair coding performance. Thus, in some embodiments, the number of abs_level_gtx_flag[] flags can be adjusted in the disclosed two-pass coding method. For example, instead of coding the greater than 9 flags (e.g., abs_level_gtx_flag[4]), only up to the greater than 7 flags (e.g., abs_level_gtx_flag[3]) are coded. Thus, the first pass can only be executed when the remaining number of context-coded bins is equal to or greater than 7. In some embodiments, only up to the greater than 5 flags (abs_level_gtx_flag[2]) can be coded. Thus, the first pass is executed when the remaining number of context-coded bins is equal to or greater than 6. It should be appreciated that the number of abs_level_gtx_flag[] flags can be adjusted to any number. Adjusting the number of abs_level_gtx_flag[] flags can allow more positions to be coded in the first coding pass, providing better coding efficiency.

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

[0114]

[0115] Figure 18 An example lookup table for the Rice parameter when the minimum bypass coded value is equal to 0 is illustrated in accordance with some embodiments of the present disclosure. As shown, the Rice parameter can be represented by the variable cRiceParam. And the absolute position can be represented by the variable locSumAbs. Figure 18

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

[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 by offline training. One example of the offset value is 4.

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

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

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

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

[0124]

[0125] In VVC (e.g., VVC 7), abs level gtx flag[n][0] for transform skip mode can be coded using 4 context variables. In some embodiments, abs level gtx flag[n][0] for transform skip mode can be coded using a total of 8 context variables (4 for luma and 4 for chroma). The context index used to code abs level gtx flag[n][0] for transform skip can be derived according to the number of significant coefficients of the neighbors (e.g., above neighbor and left neighbor). The input to this process can be color component index cldx, luma position (x0, y0), and current coefficient scan position (xC, yC). The luma position (x0, y0) can specify a particular sample (e.g., top-left sample) of the current transform block relative to a particular sample (e.g., top-left sample) of the current picture. The output of this process can be the coding index variable ctxInc. In some embodiments, the variable ctxInc can be derived according to the following pseudo code:

[0126]

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

[0128]

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

[0130] In VVC (e.g., VVC 7), coeff_sign_flag for transform skip mode can be coded using 6 context variables. In some embodiments, coeff_sign_flag for transform skip mode can be coded using a total of 12 context variables (6 for luma and 6 for chroma). The context index for coding coeff_sign_flag for transform skip mode can be derived according to the coeff_sign_flag of the neighbors (e.g., above neighbor and left neighbor). The input 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 the particular sample (e.g., top-left sample) of the current transform block relative to a particular sample (e.g., top-left sample) of the current picture. The output of this process can be the coding index variable ctxInc. In some embodiments, the variables leftSign and aboveSign can be derived according to the following pseudo code:

[0131]

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

[0133]

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

[0135]

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

[0137]

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

[0139]

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

[0141]

[0142] In some embodiments, a non-transitory computer readable storage medium comprising instructions is also provided, and the instructions can be executed by an apparatus, such as the disclosed encoders and decoders, for performing the above-described methods. Common forms of non-transitory media include, for example, a floppy disk, a flexible disk, a hard disk, a solid-state drive, a magnetic tape, or any other magnetic data storage medium, a CD-ROM, any other optical data storage medium, any physical medium with patterns of holes, a RAM, a PROM, and EPROM, a FLASH-EPROM or any other flash memory, NVRAM, a cache, a register, any other memory chip or cartridge, and a networked version of any of the foregoing. The apparatus can include one or more processors (CPUs), input / output interfaces, network interfaces, and / or memory.

[0143] It should be noted that relational terms herein such as first, second, and the like, are used solely to distinguish one entity or action from another, without necessarily requiring or implying any actual relationship or order between such entities or actions. Moreover, the words "comprises," "has," "includes," and "including," and other similar forms, are intended to be equivalent in meaning and be open ended in that an item or items following any one of these words is not intended to be an exhaustive listing of one or more items, or limited to only those items specifically listed.

[0144] As used herein, unless specifically stated otherwise, the term "or" encompasses all possible combinations, unless impractical. For example, if a database is stated as including A or B, then unless impractical, the database can include A, or B, or A and B. As a second example, if a database is stated as including A, B, or C, then unless impractical, the database can 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 appreciated that the above-described embodiments can be implemented by hardware, or software (program code), or a combination of hardware and software. If implemented by software, it can be stored in the above-described computer-readable medium. The software, when executed by a processor, can perform the disclosed methods. The computing units and other functional units described in this disclosure can be implemented by hardware, or software, or a combination of hardware and software. Those of ordinary skill in the art will also understand that multiple ones of the above-described modules / units can be combined into one module / unit, and each of the above-described modules / units can be further divided into multiple sub-modules / sub-units.

[0146] In the foregoing specification, embodiments have been described with reference to numerous specific details that can vary from implementation to implementation. Certain adaptations and modifications of the described embodiments can occur to those skilled in the art. Other embodiments can be apparent to those of ordinary skill in the art from the disclosure herein, which is to be considered merely exemplary in nature, with the true scope and spirit of the application being indicated by the following claims. The order of the steps shown in the figures can also be intended for illustrative purposes only, and not intended to be limiting to any particular order of steps. Accordingly, those skilled in the art will appreciate that the steps can be performed in a different order than as described, while still achieving the same method.

[0147] Embodiments can be further described using the following clauses:

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

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

[0150] bypass encoding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient.

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

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

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

[0154] wherein the first pass of scanning further comprises:

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

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

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

[0158] in response to the number of context coded bins reaching the maximum limit, bypass coding an absolute value of a level of a transform coefficient that is not scanned in the second pass, wherein the bypass coding comprises binarizing the absolute value of the not scanned transform coefficient using a Golomb-Rice coding.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0180] 11. The encoding method of any 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 of clause 11, further comprising:

[0182] flipping the plurality of transform coefficients prior to performing the first pass of the scan.

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

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

[0185] receiving the video frame; and

[0186] partitioning the video frame into a plurality of sub-blocks.

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

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

[0189] bypass decoding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient.

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

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

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

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

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

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

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

[0197] decoding the greater than one flag in response to the significance flag indicating that the level of the transform coefficient is not zero.

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

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

[0200] decoding a greater-than-5 flag for the transform coefficient in response to the greater-than-3 flag indicating that the absolute value is greater than 3, the greater-than-5 flag indicating whether the absolute value is greater than 5;

[0201] decoding a greater-than-7 flag for the transform coefficient in response to the greater-than-5 flag indicating that the absolute value is greater than 5, the greater-than-7 flag indicating whether the absolute value is greater than 7; and

[0202] decoding a greater-than-9 flag for the transform coefficient in response to the greater-than-7 flag indicating that the absolute value is greater than 7, the greater-than-9 flag indicating whether the absolute value is greater than 9.

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

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

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

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

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

[0208] flipping the plurality of transform coefficients prior to performing the first pass of scanning.

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

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

[0211] a memory storing a set of instructions; and

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

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

[0214] bypass encoding a parity level flag for the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient.

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

[0216] a memory storing a set of instructions; and

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

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

[0219] decode a parity level flag for the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient.

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

[0221] performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein:

[0222] stopping performing the first pass of scanning when a number of context encoded bins reaches a maximum limit,

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

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

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

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

[0227] in response to a significance flag of a first transform coefficient indicating that a level of the first transform coefficient is not zero, encoding a greater-than-one flag of the first transform coefficient, the first transform coefficient being one of the first set of transform coefficients, the greater-than-one flag indicating whether an absolute value of the level of the first transform coefficient is greater than one.

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

[0229] encoding a greater-than-3 flag for the first transform coefficient in response to the greater-than-1 flag indicating that the absolute value of the level of the first transform coefficient is greater than 1, 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 from being performed when the number of remaining context-encoded bins is less than a group limit;

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

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

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

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

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

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

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

[0237] flipping transform coefficients of the sub-block prior to performing the first pass.

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

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

[0240] binarizing the absolute value using a Golomb-Rice code.

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

[0242] performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein:

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

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

[0245] the first pass of the scan comprises, for each transform coefficient in the first set of transform coefficients, decoding a significance flag that indicates whether a level of the transform coefficient is zero; and

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

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

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

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

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

[0251] in response to the greater-than-1 flag indicating that the absolute value of the level of the first transform coefficient is greater than 1, decoding a greater-than-3 flag of the first transform coefficient, 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 from being performed when a number of remaining context coded bins is less than a group limit.

[0252] a greater-than-5 flag for each of the first transform coefficients, the greater-than-5 flag indicating whether an absolute value of a level of the first transform coefficient is greater than 5, 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;

[0253] a greater-than-7 flag for each of the first transform coefficients, the greater-than-7 flag indicating whether an absolute value of a level of the first transform coefficient is greater than 7, 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; and

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

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

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

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

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

[0259] using a Golomb-Rice code to decode the absolute value.

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

[0261] a memory storing a set of instructions; and

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

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

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

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

[0266] the first pass of the scan includes, for each transform coefficient in the first set of transform coefficients, encoding a significance flag that indicates whether a level of the transform coefficient is zero; and

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

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

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

[0270] a memory storing a set of instructions; and

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

[0272] perform a first pass of scanning transform coefficients of a sub-block of a video frame, wherein:

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

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

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

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

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

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

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

[0280] generating a second set of context variables for a chroma component of the video frame,

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

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

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

[0284] encoding a significance flag for a transform coefficient in the first set of transform coefficients according to 3 context variables from the first set of context variables and 3 context variables from the second set of context variables, the significance flag indicating whether a level of the transform coefficient is zero.

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

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

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

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

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

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

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

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

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

[0294] generating the one context variable from the first set of context variables and the one context variable from the second set of context variables as a function of a color component index.

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

[0296] encoding a coefficient sign flag for a transform coefficient in the first set of transform coefficients as a function of 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 a sign of a value of the transform coefficient.

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

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

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

[0300] encoding a subblock flag for a transform coefficient in the first set of transform coefficients as a function of three context variables from the first set of context variables and three context variables from the second set of context variables.

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

[0302] generating the three context variables from the first set of context variables and the three context variables from the second set of context variables based on a number of significant coefficients of neighbors of the video frame, a luma position specifying a position of the subblock relative to the video frame, and a current coefficient scan position.

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

[0304] receiving a video bitstream;

[0305] segmenting the video bitstream into a plurality of subblocks;

[0306] generating a first set of context variables for a luma component of a subblock;

[0307] generating a second set of context variables for a chroma component of the subblock; and

[0308] context-encode a first set of transform coefficients of the sub-block according to the first set of context variables and the second set of context variables.

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

[0310] receiving a video frame;

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

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

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

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

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

[0316] decoding significance flags for transform coefficients in the first set of transform coefficients according to 3 context variables from the first set of context variables and 3 context variables from the second set of context variables, the significance flags indicating whether a level of the transform coefficients is zero,

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

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

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

[0320] decoding greater-than-x flags for transform coefficients in the first set of transform coefficients according to 4 context variables from the first set of context variables and 4 context variables from the second set of context variables.

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

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

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

[0324] decoding a sign flag for a transform coefficient in the first set of transform coefficients according to 1 context variable from the first set of context variables and 1 context variable from the second set of context variables.

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

[0326] generating the 1 context variable from the first set of context variables and the 1 context variable from the second set of context variables based on a color component index.

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

[0328] decoding a context coefficient sign flag for a transform coefficient in the first set of transform coefficients according to 6 context variables from the first set of context variables and 6 context variables from the second set of context variables.

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

[0330] generating the 6 context variables from the first set of context variables and the 6 context variables from the second set of context variables based on a number of significant coefficients of a top neighbor and a left neighbor of the video frame, a luma position of a top-left sample of a current transform block relative to a top-left sample of the video frame, and a current coefficient scan position.

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

[0332] decoding a subblock flag for a transform coefficient in the first set of transform coefficients according to 3 context variables from the first set of context variables and 3 context variables from the second set of context variables.

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

[0334] generating the 3 context variables from the first set of context variables and the 3 context variables from the second set of context variables based on a number of significant coefficients of a top neighbor and a left neighbor of the video frame, a luma position of a top-left sample of a current transform block relative to a top-left sample of the video frame, and a current coefficient scan position.

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

[0336] a memory storing a set of instructions; and

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

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

[0339] generate a second set of context variables for a chroma component of the video frame;

[0340] generate a sub-block of the video frame; and

[0341] encode a first set of transform coefficients of the sub-block according to the first set of context variables and the second set of context variables.

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

[0343] a memory storing a set of instructions; and

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

[0345] receive a video frame;

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

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

[0348] generate a second set of context variables for a chroma component of the video frame; and

[0349] decode a first set of transform coefficients of the sub-block according to the first set of context variables and the second set of context variables.

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

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

[0352] bypass encoding a parity level flag for the transform coefficients, the parity level flag indicating a parity of an absolute value of a level of the transform coefficients.

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

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

[0355] bypass decoding a parity level flag for the transform coefficients, the parity level flag indicating a parity of an absolute value of a level of the transform coefficients.

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

[0357] performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein:

[0358] stopping performing the first pass of scanning when a number of context encoded bins reaches a maximum limit,

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

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

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

[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] performing a first pass of scanning transform coefficients of a sub-block of a video frame, wherein:

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

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

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

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

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

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

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

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

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

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

[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] receiving a video frame;

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

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

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

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

[0380] In the drawings and specification, there have been disclosed exemplary embodiments. However, many variations and modifications can be made to these embodiments. Consequently, it is intended that the scope of the application be limited only by the broadest interpretation of the appended claims to be accorded under applicable law, including 35 U.S.C. § 112.

Claims

1. An encoding method implemented by an encoder of video data, the method comprising: performing a first pass of scanning on a plurality of transform coefficients of a sub-block of a video frame, wherein, implementing encoding of a sub-block by performing a multi-pass scan on the sub-block, the multi-pass scan comprising a first pass and a remaining number of passes, the first pass comprising: determining whether a remaining number of context-coded bins is greater than or equal to 4; and in response to the remaining number of context-coded bins being greater than or equal to 4, encoding a sig_coeff_flag of a current transform coefficient, the sig_coeff_flag indicating whether a level of the current transform coefficient is zero; in response to the level of the current transform coefficient not being zero, encoding a coeff_sign_flag and an abs_level_gtx_flag[0] of the current transform coefficient, the coeff_sign_flag representing a sign of the level of the current transform coefficient, the abs_level_gtx_flag[0] representing that an absolute value of the level of the current transform coefficient is greater than 1; and in response to the remaining number of context-coded bins being less than 4, performing the remaining number of passes; and the remaining number of passes comprising: by-pass encoding a remaining absolute level abs_remainder of the current transform coefficient, the remaining absolute level abs_remainder indicating a remaining absolute value of the level of the transform coefficient.

2. The encoding method of claim 1, wherein the sub-block has a plurality of transform coefficients, and performing the first pass further comprises: scanning the plurality of transform coefficients until a number of context-coded bins reaches a maximum limit; and in response to the number of context-coded bins reaching the maximum limit, by-pass encoding an absolute value of a level of a transform coefficient that is not scanned in a second pass, wherein the by-pass encoding comprises binarizing the absolute value using a Golomb-Rice coding.

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

4. The encoding method of claim 3, further comprising: flipping the plurality of transform coefficients prior to performing the first pass.

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

6. The encoding method of claim 1, further comprising: receiving the video frame; and partitioning the video frame into a plurality of sub-blocks.

7. A decoding method implemented by a decoder of video data, the method comprising: implementing decoding of a sub-block by performing a multi-pass scan on the sub-block, the multi-pass scan comprising a first pass and a remaining number of passes, the first pass comprising: determining whether a remaining number of context-decoded bins is greater than or equal to 4; and performing a first pass of scanning on a plurality of transform coefficients of a sub-block of a video frame, wherein in response to the remaining number of context-decoded bins being greater than or equal to 4, decoding a sig_coeff_flag of a current transform coefficient, the sig_coeff_flag indicating whether a level of the current transform coefficient is zero; in response to the level of the current transform coefficient not being zero, decoding a coeff_sign_flag and an abs_level_gtx_flag[0] of the current transform coefficient, the coeff_sign_flag representing a sign of the level of the current transform coefficient, the abs_level_gtx_flag[0] representing that an absolute value of the level of the current transform coefficient is greater than 1; and in response to the remaining number of context-decoded bins being less than 4, performing the remaining number of passes; and the remaining number of passes comprising: by-pass decoding a remaining absolute level abs_remainder of the current transform coefficient, the remaining absolute level abs_remainder indicating a remaining absolute value of the level of the transform coefficient. in response to the remaining number of context-coded bins being greater than or equal to 4, decoding a sig_coeff_flag of the current transform coefficient, the sig_coeff_flag indicating whether a level of the current transform coefficient is zero; in response to the level of the current transform coefficient not being zero, decoding a coeff_sign_flag and an abs_level_gtx_flag[0] of the current transform coefficient, the coeff_sign_flag representing a sign of the level of the current transform coefficient, the abs_level_gtx_flag[0] representing that an absolute value of the level of the current transform coefficient is greater than 1; and in response to the remaining number of context-coded bins being less than 4, performing the scan of the remaining number of passes; and the scan of the remaining number of passes including: bypass decoding a remaining absolute level abs_remainder of the current transform coefficient, the remaining absolute level abs_remainder indicating a remaining absolute value of the level of the transform coefficient.

8. The decoding method of claim 7, wherein the second pass of scanning further comprises: bypass decoding a par_level_flag in the first pass of scanning in response to the abs_level_gtx_flag[0] indicating that the absolute value is greater than 1, the par_level_flag indicating a parity level flag.

9. A non-transitory computer-readable storage medium storing a bitstream of a video and instructions, the non-transitory computer-readable storage medium being part of a computing device configured to execute a set of the instructions to cause the computing device to encode the bitstream according to operations comprising: performing a first pass of scanning on a plurality of transform coefficients of a sub-block of a video frame, wherein implementing the encoding of the sub-block by performing a multi-pass scan of the sub-block, the multi-pass scan including a first pass of scanning and a scan of a remaining number of passes, the first pass of scanning including: determining whether a remaining number of context-coded bins is greater than or equal to 4; and in response to the remaining number of context-coded bins being greater than or equal to 4, encoding a sig_coeff_flag of the current transform coefficient, the sig_coeff_flag indicating whether a level of the current transform coefficient is zero; in response to the level of the current transform coefficient not being zero, encoding a coeff_sign_flag and an abs_level_gtx_flag[0] of the current transform coefficient, the coeff_sign_flag representing a sign of the level of the current transform coefficient, the abs_level_gtx_flag[0] representing that an absolute value of the level of the current transform coefficient is greater than 1; and in response to the remaining number of context-coded bins being less than 4, performing the scan of the remaining number of passes; and the scan of the remaining number of passes including: a bypass encoding of a remaining absolute level, abs_remainder, of the current transform coefficient, the remaining absolute level, abs_remainder, indicating a remaining absolute value of a level of the transform coefficient.

Citation Information

Patent Citations

  • Coefficient level coding in video coding

    US20170064336A1

  • Coding and decoding of transform skipped blocks

    WO2014053428A1