Transform-skip residual coding of video data
By reducing the number of coding passes to three and unifying bypass coding methods, the proposed method addresses the inefficiencies and complexity in current transform skip residual coding techniques, resulting in improved encoding efficiency and simplified hardware implementation.
Patent Information
- Application Number
- JP2021571049
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-12-24
- Filing Date
- 2020-05-12
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2040-05-12
AI Technical Summary
Current transform skip residual coding techniques in video compression require six coding passes, leading to reduced throughput and complex hardware implementation due to differences in coding passes and scan orders between transform skip residual coding and transform residual coding.
The proposed method reduces the number of coding passes for transform skip residual coding to three by bypass encoding the parity flag and unifying the bypass coding methods with transform residual coding, thereby improving throughput and simplifying hardware implementation.
This approach enhances the encoding efficiency and simplifies the hardware implementation by reducing the number of coding passes and unifying the bypass coding methods, leading to improved compression performance.
Smart Images

Figure 0007682108000001 
Figure 0007682108000002 
Figure 0007682108000003
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This disclosure claims priority to and the benefit of priority to U.S. Provisional Patent Application No. 62 / 865,916, filed June 24, 2019, No. 62 / 902,115, filed September 18, 2019, and No. 62 / 953,460, filed December 24, 2019. All three provisional applications are incorporated herein by reference in their entireties.
[0002] Technical Field FIELD OF THE DISCLOSURE
[0002] This disclosure relates generally to video data processing, and more particularly to transform skip residual coding of video data. [Background technology]
[0003] background
[0003] In the video compression and decompression industry, new standards for video coding are being developed. For example, the Joint Video Experts Team (JVET) of the ITU-T Video Coding Expert Group (VCEG) and the ISO / IEC Moving Picture Expert Group (MPEG) is currently developing the Versatile Video Coding (VVC) standard. The VVC standard aims to double the compression efficiency of its predecessor, the High Efficiency Video Coding (HEVC / H.265) standard. In other words, the goal of VVC is to achieve the same subjective quality as HEVC / H.265 at half the bandwidth. Summary of the Invention [Means for solving the problem]
[0004] Disclosure Summary
[0004] Embodiments of the present disclosure provide methods and systems for transform skip residual video data encoding.
[0005]
[0005] One exemplary method includes performing a first pass of scanning transform coefficients of a sub-block of a video frame, the first pass of scanning including bypass encoding parity level flags of the transform coefficients, the parity level flags indicating parity of absolute values of levels of the transform coefficients.
[0006]
[0006] Another exemplary method includes performing a first pass of scanning transform coefficients of a sub-block of a video frame, the first pass of scanning including 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.
[0007]
[0007] One exemplary system includes a memory storing a set of instructions and a processor, the processor being configured to execute the set of instructions to cause the system to perform a first pass of scanning transform coefficients of a sub-block of a video frame, the first pass of scanning including bypass encoding parity level flags of the transform coefficients, the parity level flags indicating the parity of the absolute value of the levels of the transform coefficients.
[0008]
[0008] Another exemplary system includes a memory storing a set of instructions and a processor, the processor being configured to execute the set of instructions to cause the system to perform a first pass of scanning transform coefficients of a sub-block of a video frame, the first pass of scanning including bypass decoding of parity level flags of the transform coefficients, the parity level flags indicating the parity of the absolute value of a level of the transform coefficient.
[0009] BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In the following detailed description and the accompanying drawings, embodiments and various aspects of the present disclosure are described. The various features shown in each figure are not necessarily drawn to scale.
Brief Description of the Drawings
[0010] [Figure 1]
[0010] A block diagram of an exemplary encoder of a hybrid video encoding system is shown. [Diagram 2]
[0011] A block diagram of an exemplary decoder of a hybrid video encoding system is shown. [Diagram 3]
[0012] An exemplary pseudocode including the syntax of transform coding is shown. [Figure 4]
[0013] An exemplary pseudocode including the syntax of transform skip residual coding is shown. [Diagram 5]
[0014] An exemplary method of transform skip residual coding with the number of encoding paths reduced to 3 according to some embodiments of the present disclosure is shown. [Figure 6]
[0015] An exemplary pseudocode including the syntax of the method shown in FIG. 5 according to some embodiments of the present disclosure is shown. [Figure 7]
[0016] Another exemplary method of transform skip residual coding with the number of encoding paths reduced to 3 according to some embodiments of the present disclosure is shown. [Figure 8]
[0017] An exemplary pseudocode including the syntax of the method shown in FIG. 7 according to some embodiments of the present disclosure is shown. [Figure 9]
[0018] An exemplary reverse scan of an 8×8 transform skip block according to some embodiments of the present disclosure is shown. [Figure 10A]
[0019] An 8×8 block before inversion is shown according to some embodiments of the present disclosure. [Figure 10B]
[0020] 10B illustrates the resulting block after the 8×8 block of FIG. 10A is flipped, according to some embodiments of the present disclosure. [Figure 11]
[0021] 1 illustrates an exemplary multi-pass encoding according to some embodiments of the present disclosure. [Figure 12]
[0022] 4 illustrates an exemplary single-pass encoding method for absolute values of levels, according to some embodiments of the present disclosure. [Figure 13]
[0023] 1 illustrates an example lookup table of Rice parameters according to some embodiments of the present disclosure. [Figure 14]
[0024] 1 illustrates an example method of transform skip residual coding combined with single-pass bypass coding, reducing the number of coding passes to three, according to some embodiments of the present disclosure. [Figure 15]
[0025] 15 illustrates an example pseudocode including bypass encoding syntax in combination with the method of FIG. 14 according to some embodiments of the present disclosure. [Figure 16]
[0026] 1 illustrates an example method of transform skip residual coding, where a first pass corresponds to context coding and a second pass corresponds to Golomb-Rice coding, in accordance with some embodiments of the present disclosure. [Figure 17]
[0027] 17 illustrates an example pseudocode including bypass encoding syntax for the method of FIG. 16 in accordance with some embodiments of the present disclosure. [Figure 18]
[0028] 13 illustrates an example lookup table of Rice parameters when the minimum bypass encoding value is equal to 0, in accordance with some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Detailed Description
[0029] Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise stated. The implementations described in the following description of the exemplary embodiments do not represent all implementations consistent with the present invention. Instead, these implementations are merely examples of apparatus and methods consistent with aspects related to the present invention as described in the appended claims. Certain aspects of the present disclosure are described in more detail below. In the event that terms and definitions described herein conflict with terms and / or definitions incorporated by reference, the descriptions in the present specification shall control.
[0012]
[0030] A video is a set of still images (or "frames") arranged in a time sequence to store visual information. A video capture device (e.g., a camera) can be used to capture and store these images in time sequence, and a video playback device (e.g., a television, a computer, a smartphone, a tablet computer, a video player, or any end-user terminal with display capabilities) can be used to display such images in time sequence. In some applications, the video capture device can also transmit the captured video in real time to a video playback device (e.g., a computer with a monitor) for purposes such as review, conference, or live broadcast.
[0013]
[0031] To reduce the storage space and transmission bandwidth required in such applications, the video may be compressed. For example, the video may be compressed before storage and transmission, and may be decompressed before display. Compression and decompression may be performed by software executed by a processor (e.g., a processor of a general-purpose computer) or by dedicated hardware. A module for compression is commonly referred to as an "encoder" and a module for decompression is commonly referred to as a "decoder." The encoders and decoders may be collectively referred to as a "codec." The encoders and decoders may be implemented as any of a variety of suitable hardware, software, or combinations thereof. For example, hardware implementations of the encoders and decoders may include circuits such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, or any combination thereof. Software implementations of the encoders and decoders may include program code, computer executable instructions, firmware, or any suitable computer-implemented algorithm or process fixed on a computer-readable medium. Compression and decompression of the video may be implemented by various algorithms or standards, such as MPEG-1, MPEG-2, MPEG-4, or the H.26x series. In some applications, a codec may decompress video from a first encoding standard and recompress the decompressed video using a second encoding standard, in which case the codec may be called a "transcoder."
[0014]
[0032] The video encoding process can identify and retain useful information that can be used to reconstruct an image. If the video encoding process cannot fully reconstruct the ignored information, the encoding process may be called "lossy". Otherwise, the encoding process may be called "lossless". Most encoding processes are lossy, which is a tradeoff for reducing the required storage space and transmission bandwidth.
[0015]
[0033] In many cases, useful information of an image to be coded (called a "target image") may include changes relative to a reference image (e.g., a previously coded or reconstructed image). Such changes may include changes in pixel position, brightness, or color, of which position changes are of primary concern. Changes in the position of a group of pixels representing an object may reflect the object's motion between the reference image and the target image.
[0016]
[0034] To achieve the same subjective quality as HEVC / H.265 using half the bandwidth, JVET has been developing techniques beyond HEVC using the joint exploration model ("JEM") reference software. As the coding techniques have been incorporated into JEM, JEM has achieved significantly higher coding performance than HEVC. VCEG and MPEG have also formally begun development of next-generation video compression standards beyond HEVC.
[0017]
[0035] The VVC standard continues to include many encoding techniques that provide better compression performance. VVC is based on the same hybrid video encoding system that has been used in modern video compression standards such as HEVC, H.264 / AVC, MPEG2, and H.263. FIG. 1 shows a block diagram of an example encoder of a hybrid video encoding system. As shown in FIG. 1, a video encoder 200 may perform intra- or inter-coding of blocks in video frames, including video blocks or partitions or sub-partitions of video blocks. Intra-coding may rely on spatial prediction to reduce or remove spatial redundancy in video within a given video frame. Inter-coding may rely on temporal prediction to reduce or remove temporal redundancy in video within adjacent frames of a video sequence. An intra-mode may refer to several spatial-based compression modes. An inter-mode (such as unidirectional or bidirectional prediction) may refer to several temporal-based compression modes.
[0018]
[0036] Referring to FIG. 1, an input video signal 202 may be processed block by block. For example, a video block unit may be a 16×16 pixel block (e.g., a macroblock (MB)). The size of the video block unit may vary depending on the encoding technique used and the required accuracy and efficiency. In HEVC, extended block sizes (e.g., coding tree units (CTUs)) may be used to compress video signals with resolutions of, for example, 1080p or higher. In HEVC, a CTU may include up to 64×64 luma samples, corresponding chroma samples, and associated syntax elements. In VVC, the size of a CTU may further increase to include 128×128 luma samples, corresponding chroma samples, and associated syntax elements. The CTU may be further divided into coding units (CUs), for example, using a quad-tree, binary tree, or ternary tree. The CUs may be further divided into prediction units (PUs) to which separate prediction methods may be applied. Each input video block may be processed by using a spatial prediction unit 260 or a temporal prediction unit 262.
[0019]
[0037] The spatial prediction unit 260 performs spatial prediction (e.g., intra prediction) on the target block / CU using information about the same image / slice that contains the target block. Spatial prediction may predict the target video block using pixels from already coded neighboring blocks in the same video image frame / slice. Spatial prediction may reduce spatial redundancy inherent in video signals.
[0020]
[0038] The temporal prediction unit 262 performs temporal prediction (e.g., inter prediction) on the target block using information from a different image / slice than the image / slice containing the target block. The temporal prediction of the video block may be signaled by one or more motion vectors. In unidirectional temporal prediction, only one motion vector, pointing to one reference picture, is used to generate a prediction signal for the target block. Meanwhile, in bidirectional temporal prediction, two motion vectors, each pointing to a respective reference picture, may be used to generate a prediction signal for the target block. The motion vector may indicate the amount and direction of motion between the target block and one or more associated blocks in a reference frame. If multiple reference pictures are supported, one or more reference picture indexes may be sent to the video block. The one or more reference picture indexes may be used to identify which reference picture in the reference picture store or decoded picture buffer (DPB) 264 from which the temporal prediction signal may come.
[0021]
[0039] The mode decision and encoder control unit 280 of the encoder may select a prediction mode based on, for example, rate-distortion optimization. Based on the determined prediction mode, a prediction block may be obtained. The prediction block may be subtracted from the current video block at summer 216. The prediction residual may be transformed by transform unit 204 and quantized by quantization unit 206. The quantized residual coefficients may be inverse quantized in inverse quantization unit 210 and inverse transformed in inverse transform unit 212 to form a reconstructed residual. The reconstructed residual may be added to the prediction block at summer 226 to form a reconstructed video block. The reconstructed video block before loop filtering may be used to provide reference samples for intra prediction.
[0022]
[0040] The reconstructed video blocks may go through loop filtering in loop filter 266. For example, loop filtering such as a deblocking filter, sample adaptive offset (SAO), and adaptive loop filter (ALF) may be applied. The reconstructed blocks after loop filtering may be stored in reference image store 264 and may be used to provide inter-prediction reference samples for encoding other video blocks. To form an output video bitstream 220, the coding mode (e.g., inter or intra), prediction mode information, motion information, and quantized residual coefficients may be sent to entropy coding unit 208 to further reduce the bitrate before the data is compressed and packed to form bitstream 220.
[0023]
[0041] Figure 2 shows a block diagram of an example decoder of a hybrid video coding system. As shown in Figure 2, a video bitstream 302 may be unpacked or entropy decoded in an entropy decoding unit 308. The coding mode information may be used to determine whether to select a spatial prediction unit 360 or a temporal prediction unit 362. The prediction mode information may be sent to a corresponding prediction unit to generate a prediction block. For example, motion compensation prediction may be applied by the temporal prediction unit 362 to form a temporal prediction block.
[0024]
[0042] The residual coefficients may be sent to the inverse quantization unit 310 and the inverse transform unit 312 to obtain a reconstructed residual. The predictive block and the reconstructed residual may be added together at 326 to form a reconstructed block before loop filtering. The reconstructed block may then go through loop filtering at the loop filter 366. Loop filtering, such as a deblocking filter, SAO, and ALF, may be applied. The reconstructed block after loop filtering may then be stored in the reference image store 364. The reconstructed data in the reference image store 364 may be used to obtain the decoded video 320 or may be used to predict future video blocks. The decoded video 320 may be displayed on a display device, such as the display device 146 as described in the system 100 (FIG. 1).
[0025]
[0043] In VVC (e.g., VVC5), a block may be an M-by-N array of transform coefficients. A transform coefficient may be a scalar quantity considered to be in the frequency domain that is associated with a particular one- or two-dimensional frequency index in the transform. A transform coefficient level may be represented by an array TransCoeffLevel[x0][y0][cIdx][xC][yC]. The array indexes x0, y0 may specify the location (x0, y0) of the top-left luma sample of the considered transform block relative to the top-left luma sample of the image. The array index cIdx may specify a color component indicator. The array indexes xC and yC may specify the transform coefficient location (xC, yC) within the transform block of interest.
[0026]
[0044] In VVC (e.g., VVC5), the transform coefficients of a coding block are coded using non-overlapping coefficient groups (or sub-blocks). For each sub-block, normal (or context) coded bins and bypass coded bins are separated in coding order. For example, first all normal coded bins of the sub-block are transmitted, and then the bypass coded bins are transmitted. The transform coefficient levels of the sub-block are coded during three passes through the scanning positions. The transform coefficient levels may be the values of the transform coefficients. In the case of context coding, each bin may have a probability model selected by the context. The context may refer to a previously coded syntax element. In the case of bypass coding, a particular bin may be selected to speed up the coding process with little loss of coding efficiency. In bypass coding, the bins may be coded with a set probability (e.g., a probability equal to 0.5).
[0027]
[0045] In pass 1, the significance flag (e.g., sig_coeff_flag), the flag greater than 1 (e.g., gt1_flag), the parity flag (e.g., par_level_flag), and the flag greater than 3 (e.g., gt3_flag) are coded in order. If the significance flag is equal to 1, the flag greater than 1 is coded first. The flag greater than 1 specifies whether the absolute level (e.g., absolute value of the level) is greater than 1 or not. If the flag greater than 1 is equal to 1, the parity flag and the flag greater than 3 are coded. The parity flag specifies the parity of the absolute level minus 2. The flag greater than 3 specifies whether the absolute level is greater than 3 or not. The position of the last normal (e.g., context) coded coefficient may be stored in the variable firstPosMode1.
[0028]
[0046] In pass 2(a), the coding of the remaining absolute levels (e.g., abs_remainder) is processed starting from the first scan position of the coefficient group up to position firstPosMode1. Only positions where the flag greater than 1 is equal to 1 are coded. Non-binary syntax elements are binarized with Golomb-Rice coding and the resulting bins are coded in the bypass mode of the arithmetic coding engine. For example, the value 2 can be represented using a Golomb-Rice code of “001”, and each bit of “001” can be called a bin (e.g., bin 0, bin 0, and bin 1).
[0029]
[0047] In pass 2(b), the coding of the absolute level (dec_abs_level) is processed starting from the first bypass coding position (e.g., from reverse order, firstPosMode1-1) to the last scan position of the coefficient group, and is fully coded in the bypass mode of the arithmetic coding engine using Golomb-Rice coding.
[0030]
[0048] In pass 3, the encoding of the sign flag (eg, sign_flag) is processed for all scan positions where sig_coeff_flag is equal to one.
[0031]
[0049] For 4x4 sub-blocks, no more than 32 normally coded bins (e.g., sig_coeff_flag, gt1_flag, par_level_flag, and gt3_flag) may be expected to be coded or decoded. For 2x2 chroma sub-blocks, the number of normally coded bins may be limited to 8. After the limit is reached, all bins are coded in bypass mode.
[0032]
[0050] In the new residual coding process adopted by JVET for transform skip residual blocks, the scanning order of coefficients in transform skip residual coding is forward scanning, starting from the top-left position of the transform skip block. The transform skip coefficient levels of a subblock are coded during six passes through the scanning positions.
[0033]
[0051] In pass 1, sig_coeff_flag, coeff_sign_flag, flags greater than 1 (e.g., abs_level_gtx_flag[0]), and par_level_flag are processed in coding order. If sig_coeff_flag is equal to 1, then coeff_sign_flag and abs_level_gtx_flag[0] are coded in order. coeff_sign_flag specifies the sign of the transform coefficient level. abs_level_gtx_flag[0] specifies whether the absolute level is greater than 1. If abs_level_gtx_flag[0] is equal to 1, par_level_flag is coded additionally. par_level_flag specifies the parity of the absolute level minus 2. Before coding the flags, a context-adaptive binary arithmetic coding ("CABAC") engine checks whether a context-coded bin is available. If a context coded bin is not available, the flag is bypass coded.
[0034]
[0052] In pass 2, if abs_level_gtx_flag[0] at a given position is equal to 1, then the flag greater than 3 (e.g., abs_level_gtx_flag[1]) is coded. abs_level_gtx_flag[1] specifies whether the absolute level is greater than 3 or not. Before coding abs_level_gtx_flag[1] for each coefficient, the CABAC engine checks whether a context-coded bin is available. If a context-coded bin is not available, abs_level_gtx_flag[1] is bypass coded.
[0035]
[0053] In pass 3, if abs_level_gtx_flag[1] at a given position is equal to 1, then the flag greater than 5 (e.g., abs_level_gtx_flag[2]) is coded. abs_level_gtx_flag[2] specifies whether the absolute level is greater than 5 or not. Before coding abs_level_gtx_flag[2] for each coefficient, the CABAC engine checks whether a context-coded bin is available. If a context-coded bin is not available, abs_level_gtx_flag[2] is bypass coded.
[0036]
[0054] In pass 4, if abs_level_gtx_flag[2] at a given position is equal to 1, then the flag greater than 7 (e.g., abs_level_gtx_flag[3]) is coded. abs_level_gtx_flag[3] specifies whether the absolute level is greater than 7 or not. Before coding abs_level_gtx_flag[3] for each coefficient, the CABAC engine checks whether a context-coded bin is available. If a context-coded bin is not available, abs_level_gtx_flag[3] is bypass coded.
[0037]
[0055] In pass 5, if abs_level_gtx_flag[3] at a position is equal to 1, the flag greater than 9 (e.g., abs_level_gtx_flag[4]) is coded. abs_level_gtx_flag[4] specifies whether the absolute level is greater than 9 or not. Before coding abs_level_gtx_flag[4] for each coefficient, the CABAC engine checks whether a context-coded bin is available. If a context-coded bin is not available, abs_level_gtx_flag[4] is bypass coded.
[0038]
[0056] In pass 6, abs_remainder is processed for all scan positions where abs_level_gtx_flag[4] is equal to 1. Non-binary syntax elements are binarized with Golomb-Rice coding and the resulting bins are coded in the bypass mode of the arithmetic coding engine.
[0039]
[0057] Figure 3 shows an example pseudocode including a syntax for transform coding. For example, the syntax shown in Figure 3 may be used for transform coding in VVC. Figure 4 shows an example pseudocode including a syntax for transform skip residual coding. For example, the syntax shown in Figure 4 may be used for transform skip residual coding in VVC.
[0040]
[0058] There are some problems with the current design of transform skip residual coding. First, the number of coding passes in transform skip residual coding is six. That is, in many cases, the CABAC engine needs to scan a coefficient group six times, which greatly affects the throughput of CABAC. Second, the number of coding passes in transform skip residual coding is different from that in transform residual coding (e.g., six passes vs. three passes). The difference in the number of coding passes may complicate the hardware implementation. Third, the coefficient scan in transform skip residual coding is a forward scan, while the scan in transform residual coding is in a reverse order. The difference in the scan order may also complicate the hardware implementation. 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 may have more syntax elements such as sig_coeff_flag, coeff_sign_flag, par_level_flag, abs_level_gtx_flag[0], abs_level_gtx_flag[1], abs_level_gtx_flag[2], abs_level_gtx_flag[3], abs_level_gtx_flag[4], and abs_remainder, etc. It is desirable to unify the bypass coding methods of transform residual coding and transform skip residual coding.
[0041]
[0059] Embodiments of the present disclosure provide a new bypass encoding method for parity flags. The parity flag specifies a parity obtained by subtracting 2 from an absolute level, which indicates whether the absolute value of a non-zero coefficient position is even or odd. The probability distribution of the parity flag in the transform skip block can be uniform. Thus, the probability of an even value and the probability of an odd value can be equal. Thereby, bypass encoding of the parity flag and the signal parity flag can be applied. This bypass encoding can be performed before or after the abs_remainder is signaled. The parity flag can be signaled when a flag greater than 1 is equal to 1. In some embodiments, since the total number of context-encoded bins can be limited to two bins per sample in the transform block, by freeing up the context of the parity flag, other syntax elements having unequal probability distributions (e.g., any flag greater than x encoded after the parity flag) can be context-encoded, thereby improving the encoding efficiency.
[0042]
[0060] In some embodiments, the parity flag can be encoded as a normal context-encoded bin and signaled in a second pass of the coefficient encoding process. The parity flag can be signaled before or after a flag greater than 3.
[0043]
[0061] In VVC (e.g., VVC5), a total of four encoding paths are used to encode flags greater than 3 (e.g., abs_level_gtx_flag[1]), flags greater than 5 (e.g., abs_level_gtx_flag[2]), flags greater than 7 (abs_level_gtx_flag[3]), and flags greater than 9 (e.g., abs_level_gtx_flag[4]). In other words, each flag is encoded in a separate encoding path. Embodiments of the present disclosure provide a new method for encoding all flags in a single path. As a result, only one encoding path is required to encode all flags, thereby improving the throughput of CABAC.
[0044]
[0062] In some embodiments, the location of the flag greater than 3 (e.g., abs_level_gtx_flag[1]) may be moved to the first encoding pass. For example, a flag greater than 3 may be signaled when the flag greater than 1 (e.g., abs_level_gtx_flag[1]) is equal to 1. This change allows for the unification of the coding of the flag greater than 1 and the flag greater than 3 for the transform residual coding cases, and also allows these two flags to be coded in the first coding pass.
[0045]
[0063] In some embodiments, the number of coding passes of a transform skip level of a sub-block may be reduced to 3. Figure 5 illustrates an example method of transform skip residual coding in accordance with some embodiments of the present disclosure, with the number of coding passes reduced to 3. The method of Figure 5 includes three passes.
[0046]
[0064] In pass 1 (step 502), the coefficients of a subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of the subblock. There may be a significance flag (e.g., sig_coeff_flag) for each coefficient. In some embodiments, the significance flag may specify whether the level of the coefficient is a non-zero value or not. If the significance flag of a coefficient indicates that the level is a non-zero value (e.g., the significance flag is equal to 1), then a signal coefficient sign flag (e.g., coeff_sign_flag) and a flag greater than 1 (e.g., abs_level_gtx_flag[0]) may be coded. The flag greater than 1 may specify whether the absolute value of the level is greater than 1 or not.
[0047]
[0065] In pass 2 (step 504), the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of the subblock. If the coefficient's flag greater than 1 indicates that the absolute level is greater than 1 (e.g., the flag greater than 1 is equal to 1), then a flag greater than 3 (e.g., abs_level_gtx_flag[1]) may be coded. The flag greater than 3 may specify whether the absolute level is greater than 3. If the coefficient's flag greater than 3 indicates that the absolute level is greater than 3 (e.g., the flag greater than 3 is equal to 1), then a flag greater than 5 (e.g., abs_level_gtx_flag[2]) may be coded. The flag greater than 5 may specify whether the absolute level is greater than 5. If the coefficient's greater than 5 flag indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), then a greater than 7 flag (e.g., abs_level_gtx_flag[3]) may be coded. The greater than 7 flag may specify whether the absolute level is greater than 7. If the coefficient's greater than 7 flag indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), then a greater than 9 flag (e.g., abs_level_gtx_flag[4]) may be coded. The greater than 9 flag may specify whether the absolute level is greater than 9.
[0048]
[0066] In pass 3 (step 506), the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of the subblock. If the coefficient's flag greater than 1 indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the coefficient's parity level flag (e.g., par_level_flag) may be bypass coded. The parity level flag may specify absolute level minus 2 parity. If the flag greater than 9 indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the coefficient's remaining absolute level (e.g., abs_remainder) may be coded and non-binary syntax elements may be binarized with a Golomb-Rice code. In some embodiments, the resulting bins may be coded in the bypass mode of the arithmetic coding engine.
[0049]
[0067] Figure 6 illustrates example pseudocode including syntax for the method illustrated in Figure 5, according to some embodiments of the present disclosure. Portions of the pseudocode in Figure 6 are shown in italics to illustrate handling of flags greater than 3, greater than 5, greater than 7, greater than 9, and parity level flags.
[0050]
[0068] It should be understood that the method of Figure 5 may be implemented by an encoder (e.g., the encoder of Figure 1). In some embodiments, the encoder may receive a video frame. For a decoder (e.g., the decoder of Figure 2), the method may include three passes.
[0051]
[0069] In pass 1, the coefficients of a subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of the subblock. There may be a significance flag (e.g., sig_coeff_flag) for each coefficient. The significance flag may be decoded. The significance flag may specify whether the level is a non-zero value or not. If the significance flag of a coefficient indicates that the level is a non-zero value (e.g., the significance flag is equal to 1), the signal coefficient sign flag (e.g., coeff_sign_flag) and a flag greater than 1 (e.g., abs_level_gtx_flag[0]) may be decoded.
[0052]
[0070] In pass 2, the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of the subblock. If the coefficient's flag greater than 1 indicates that the absolute level is greater than 1 (e.g., the flag greater than 1 is equal to 1), then the parity level flag (e.g., par_level_flag) of each coefficient may be decoded. The parity level flag may specify absolute level minus 2 parity. If the coefficient's flag greater than 1 indicates that the absolute level is greater than 1 (e.g., the flag greater than 1 is equal to 1), then the flag greater than 3 (e.g., abs_level_gtx_flag[1]) may be decoded. If the coefficient's flag greater than 3 indicates that the absolute level is greater than 3 (e.g., the flag greater than 3 is equal to 1), then the flag greater than 5 (e.g., abs_level_gtx_flag[2]) may be decoded. If the coefficient's flag greater than 5 indicates an absolute level greater than 5 (e.g., the flag greater than 4 is equal to 1), then the flag greater than 7 (e.g., abs_level_gtx_flag[3]) may be decoded. If the coefficient's flag greater than 7 indicates an absolute level greater than 7 (e.g., the flag greater than 7 is equal to 1), then the flag greater than 9 (e.g., abs_level_gtx_flag[4]) may be decoded.
[0053]
[0071] In pass 3, the coefficients of a subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of a subblock to the last scan position of that subblock. If the flag greater than 9 indicates that the absolute level is greater than 9 (e.g., the flag greater than 9 is equal to 1), the remaining absolute level of the coefficient (e.g., abs_remainder) may be decoded.
[0054]
[0072] In some embodiments, the decoder may receive a video bitstream.
[0055]
[0073] 7 illustrates another example method of transform skip residual coding in accordance with some embodiments of this disclosure, reducing the number of coding passes to three. The method of FIG. 7 may include three passes.
[0056]
[0074] In pass 1 (step 702), the coefficients of a subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of the subblock. There may be a significance flag (e.g., sig_coeff_flag) for each coefficient. The significance flag may indicate whether the level is a non-zero value or not. If the significance flag of a coefficient indicates that the level is a non-zero value (e.g., the significance flag is equal to 1), then a signal coefficient sign flag (e.g., coeff_sign_flag) and a flag greater than 1 (e.g., abs_level_gtx_flag[0]) may be coded. The flag greater than 1 may specify whether the absolute value of the level is greater than 1 or not. If the flag greater than 1 of a coefficient indicates that the absolute value of the level is greater than 1 (e.g., the flag greater than 1 is equal to 1), then a flag greater than 3 (e.g., abs_level_gtx_flag[1]) may be coded. The flag greater than 3 may specify whether the absolute level is greater than 3 or not.
[0057]
[0075] In pass 2 (step 704), the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of the subblock. If the coefficient's flag greater than 3 indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), then a flag greater than 5 (e.g., abs_level_gtx_flag[2]) may be coded. The flag greater than 5 may specify whether the absolute level is greater than 5. If the coefficient's flag greater than 5 indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), then a flag greater than 7 (e.g., abs_level_gtx_flag[3]) may be coded. The flag greater than 7 may specify whether the absolute level is greater than 7. If the coefficient's greater than 7 flag indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), then a greater than 9 flag (e.g., abs_level_gtx_flag[4]) may be coded. The greater than 9 flag may specify whether the absolute level is greater than 9 or not.
[0058]
[0076] In pass 3 (step 706), the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of the subblock. If the coefficient's flag greater than 1 indicates that the absolute level is greater than 1 (e.g., the flag greater than 1 is equal to 1), the parity level flag of the coefficient (e.g., par_level_flag) may be bypass coded. The parity level flag may specify the absolute level minus 2 parity. If the flag greater than 9 indicates that the absolute level is greater than 9 (e.g., the flag greater than 9 is equal to 1), the remaining absolute level of the coefficient (e.g., abs_remainder) may be processed and non-binary syntax elements may be binarized with a Golomb-Rice code. The resulting bins may be coded in the bypass mode of the arithmetic coding engine.
[0059]
[0077] In comparison to the method of Figure 5, the method of Figure 7 handles encoding of flags greater than 3 in pass 1 instead of pass 2. Figure 8 illustrates example pseudocode including syntax for the method illustrated in Figure 7, according to some embodiments of the present disclosure. Portions of the pseudocode in Figure 8 are shown in italics to illustrate handling of flags greater than 3, greater than 5, greater than 7, greater than 9, and parity level flags.
[0060]
[0078] It should be understood that the method of Figure 7 may be implemented by an encoder (e.g., the encoder of Figure 1). In some embodiments, the encoder may receive a video frame. For a decoder (e.g., the decoder of Figure 2), the method may include three passes.
[0061]
[0079] In pass 1, the coefficients of a subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of the subblock. There may be a significance flag (e.g., sig_coeff_flag) for each coefficient. The significance flag is decoded. The significance flag may indicate whether the level is a non-zero value or not. If the significance flag of a coefficient indicates that the level is a non-zero value (e.g., the significance flag is equal to 1), the signal coefficient sign flag (e.g., coeff_sign_flag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) may be decoded. If the greater than 1 flag of a coefficient indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the greater than 3 flag (e.g., abs_level_gtx_flag[1]) may be decoded.
[0062]
[0080] In pass 2, the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position of the subblock. If the coefficient's flag greater than 1 indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), then the parity level flag (e.g., par_level_flag) of each coefficient may be decoded. If the coefficient's flag greater than 3 indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), then the greater than 5 flag (e.g., abs_level_gtx_flag[2]) may be decoded. If the coefficient's flag greater than 5 indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), then the greater than 7 flag (e.g., abs_level_gtx_flag[3]) may be decoded. If the coefficient's greater than 7 flag indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), then the greater than 9 flag (e.g., abs_level_gtx_flag[4]) may be decoded. The greater than 9 flag may specify whether the absolute level is greater than 9 or not.
[0063]
[0081] In pass 3, the coefficients of a subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of a subblock to the last scan position of that subblock. If the flag greater than 9 indicates that the absolute level is greater than 9 (e.g., the flag greater than 9 is equal to 1), the remaining absolute level of the coefficient (e.g., abs_remainder) may be decoded.
[0064]
[0082] In some embodiments, the decoder may receive a video bitstream.
[0065]
[0083] In some embodiments, the scan order of the transform skip residual block may be changed to unify the scan order of the transform residual coding process and the transform skip residual coding process. For example, the scan order of the transform skip residual block may be changed from forward scan to backward scan. Figure 9 illustrates an example backward scan of an 8x8 transform skip block according to some embodiments of the present disclosure. As illustrated in Figure 9, the scan of coefficients starts from the coefficient in the lower right corner and ends with the coefficient in the upper left corner. It should be understood that the scan order illustrated in Figure 9 may be applied by the methods illustrated in Figures 5 and 7.
[0066]
[0084] In some embodiments, the backward scan may be performed after the transform block is inverted. Figures 10A and 10B show an example inversion of an 8x8 block according to some embodiments of the present disclosure. As shown in Figures 10A and 10B, after the block is inverted, the position of the upper left residual coefficient is moved to the lower right position. After the block is inverted, a backward scan (e.g., the backward scan of Figure 9) may be performed.
[0067]
[0085] In some embodiments, bypass coding may be performed in multiple passes. Figure 11 illustrates an exemplary multi-pass coding according to some embodiments of the present disclosure. In some embodiments, the multi-pass coding illustrated in Figure 11 may be performed in VVC (e.g., VVC5). The number of context-coded bins in Figure 11 may be assumed to have reached a maximum limit at the position of the first pass (shown as black dots in Figure 11). As illustrated in Figure 11, flags (e.g., flags greater than 3, flags greater than 5, flags greater than 7, flags greater than 9, etc.) may be bypass coded in multiple coding passes.
[0068]
[0086] In some embodiments, single-pass bypass coding of absolute values of levels may be realized. Figure 12 illustrates an exemplary single-pass coding method of absolute values of levels according to some embodiments of the present disclosure. As shown in Figure 12, when a context-coded bin reaches a maximum limit (e.g., shown as a black dot in Figure 12), the CABAC engine may start bypass coding of the remainder of the absolute levels using Golomb-Rice coding.
[0069]
[0087] 13 illustrates an example lookup table of Rice parameters according to some embodiments of the present disclosure. According to FIG. 13, the Rice parameters may be represented by the variable cRiceParam. The location of the absolute sum may be represented by the variable locSumAbs.
[0070]
[0088] In some embodiments, the Rice parameter (e.g., cRiceParam) may be derived as follows: Given the array AbsLevel[x][y] of a transform skip block, the top-left luma location (x0, y0), and the coefficient scan location (xC, yC) of interest, and assuming minLevel is the minimum bypass coding value, if none of a coefficient's flags are context coded, then the minLevel of that coefficient is 0. If all of the flags are context coded, then minLevel is equal to 10.
[0071]
[0089] In some embodiments, the variable locSumAbs may be derived as specified by the following pseudocode: locSumAbs = 0 if (xC > 0) locSumAbs += AbsLevel[xC - 1][yC] if (yC > 0) locSumAbs += AbsLevel[xC][yC -1] locSumAbs += ( 10 - minLevel ) locSumAbs = Clip3 (0, 31, LocSumAbs)
[0072]
[0090] In some embodiments, single-pass bypass coding may be combined with the method shown in Figure 7. For example, Figure 14 illustrates an example method of transform skip residual coding combined with single-pass bypass coding, reducing the number of coding passes to three, according to some embodiments of the present disclosure. The method of Figure 14 includes three passes.
[0073]
[0091] In pass 1 (step 1402), the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position. For each coefficient, if the number of remaining context-coded bins is equal to or greater than the group limit, the following may be performed. For example, in some embodiments, it is more efficient to code all of the flags in the group using either context coding or bypass coding. As a result, if the number of context-coded bins is less than the group limit, it is more efficient to code all of the remaining flags with bypass coding than to code some of the remaining flags with context coding and other flags with bypass coding. In this example, there may be four flags coded in the group of pass 1 (e.g., significance flag, signal coefficient sign flag, flag greater than 1, and flag greater than 3). Thus, given the group limit of four, for each coefficient, if the number of remaining context-coded bins is equal to or greater than four, the following may be performed. If the significance flag (e.g., sig_coeff_flag) indicates that the level is a non-zero value (e.g., significance flag equals 1), then the signal coefficient sign flag (e.g., coeff_sign_flag) and the flag greater than 1 (e.g., abs_level_gtx_flag[0]) may be coded. If the flag greater than 1 indicates that the absolute level is greater than 1 (e.g., greater than 1 flag equals 1), then the flag greater than 3 (e.g., abs_level_gtx_flag[1]) may be coded. In some embodiments, the coefficients may be scanned until the context coded bin reaches a maximum limit (e.g., the black dot in FIG. 12), and then the scanning stops at the position as the last position of the first pass.
[0074]
[0092] After the end of pass 1 and before the start of pass 2, a first pass bypass position variable (e.g., iFirstPassBypassPos) may be set according to the last position of the previous pass (step 1404). In some embodiments, the first pass bypass position variable may be set to the last position of the previous pass plus one.
[0075]
[0093] In pass 2 (step 1406), coefficients starting from the first scan position of the subblock up to iFirstPassBypassPos may be scanned. For each coefficient, if the remaining number of context coded bins is equal to or greater than the group limit, the following may be performed. For example, the group limit may be 3 (e.g., flags greater than 5, greater than 7, and greater than 9). If the flag greater than 3 indicates that the absolute level is greater than 3 (e.g., flag greater than 3 is equal to 1), then the flag greater than 5 (e.g., abs_level_gtx_flag[2]) may be coded. If the flag greater than 5 indicates that the absolute level is greater than 5 (e.g., flag greater than 5 is equal to 1), then the flag greater than 7 (e.g., abs_level_gtx_flag[3]) may be coded. If a flag greater than 7 indicates that the absolute level is greater than 7 (eg, a flag greater than 7 is equal to 1), then a flag greater than 9 (eg, abs_level_gtx_flag[4]) may be encoded.
[0076]
[0094] After pass 2 ends and before pass 3 begins, a second path bypass position variable (e.g., iSecondPassBypassPos) is set according to the last position of the previous pass (step 1408). In some embodiments, the second path bypass position variable may be set to the last position of the previous pass plus one.
[0077]
[0095] In pass 3(a) (step 1410), coefficients may be scanned starting from the first scan position of the subblock up to iFirstPassBypassPos. For each coefficient, the following may be performed: If a flag greater than 1 indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) may be bypass coded; If a flag greater than 9 indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), coding of the remaining absolute level (e.g., abs_remainder) may be handled by a non-binary syntax element that is binarized with a Golomb-Rice code; The resulting bins may be coded in the bypass mode of the arithmetic coding engine.
[0078]
[0096] In pass 3(b) (step 1412), coefficients may be scanned starting from iFirstPassBypassPos to the last scan position. For each coefficient, the coding of the absolute level (e.g., dec_abs_level) may be handled by a non-binary syntax element binarized with a Golomb-Rice code. The resulting bins may be coded in the bypass mode of the arithmetic coding engine. A signal coefficient sign flag may also be coded.
[0079]
[0097] In some embodiments, in pass 3(b), coefficients may be scanned starting from iFirstPassBypassPos to the last scan position, and the coding of the absolute level (e.g., dec_abs_level) may be processed in two steps for each coefficient. First, whether dec_abs_level is zero or not is signaled. If dec_abs_level is non-zero, the non-binary syntax elements binarized with Golomb-Rice code, and the resulting bins, may be coded in the bypass mode of the arithmetic coding engine. A signal coefficient sign flag may also be coded.
[0080]
[0098] Figure 15 illustrates example pseudocode including bypass encoding syntax in combination with the method of Figure 14, according to some embodiments of the present disclosure. Portions of the pseudocode in Figure 15 are shown in italics to illustrate handling of flags greater than 3, greater than 5, greater than 7, greater than 9, and parity level flags.
[0081]
[0099] In some embodiments, a two-pass coding method may be used. For example, in pass 1, all of the flags may be context coded, and in pass 2, Golomb-Rice coding may be used for bypass coding. Figure 16 illustrates an example method of transform skip residual coding, where a first pass corresponds to context coding and a second pass corresponds to Golomb-Rice coding, according to some embodiments of the present disclosure. The method of Figure 16 includes two passes.
[0082]
[0100] In pass 1 (step 1602), the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position. For each coefficient, if the remaining number of context coded bins is equal to or greater than 8, the following may be performed: The significance flag (e.g., sig_coeff_flag) may be context coded. If the significance flag indicates that the level is non-zero (e.g., the significance flag is equal to 1), the coefficient sign flag (e.g., coeff_sign_flag) and the greater than 1 flag (e.g., abs_level_gtx_flag[0]) may be signaled. If the greater than 1 flag indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), the parity level flag (e.g., par_level_flag) and the greater than 3 flag (e.g., abs_level_gtx_flag[1]) may be coded. The parity level flag may specify the absolute level minus 2 parity. The flag greater than 3 may specify whether the absolute level is greater than 3. If the flag greater than 3 indicates that the absolute level is greater than 3 (e.g., the flag greater than 3 is equal to 1), then the flag greater than 5 (e.g., abs_level_gtx_flag[2]) may be coded. If the flag greater than 5 indicates that the absolute level is greater than 5 (e.g., the flag greater than 5 is equal to 1), then the flag greater than 7 (e.g., abs_level_gtx_flag[3]) may be coded. If the flag greater than 7 indicates that the absolute level is greater than 7 (e.g., the flag greater than 7 is equal to 1), then the flag greater than 9 (e.g., abs_level_gtx_flag[4]) may be coded. The flag greater than 9 may specify whether the absolute level of the level is greater than 9. In some embodiments, the coefficients may be scanned until the context-coded bin reaches a maximum limit (e.g., the black point in FIG. 12), after which the scan stops at the position as the last position of the first pass.
[0083]
[0101] After the end of pass 1 and before the start of pass 2, a first pass bypass position variable (iFirstPassBypassPos) may be set according to the last position of the previous pass (step 1604). In some embodiments, the first pass bypass position variable may be set to the last position of the previous pass plus one. The first pass bypass position variable may represent the starting position where absolute level (e.g., dec_abs_level) syntax is signaled. Coefficients whose scan position is less than the first pass bypass position may be partially signaled via context coding in pass 1, and the remaining coefficients may be signaled in pass 2 (a). In some embodiments, if a coefficient's scan position is greater than or equal to the first pass bypass position variable, none of that coefficient's flags are context coded and the complete coefficient and sign may be signaled using bypass coding in pass 2 (b).
[0084]
[0102] In pass 2(a) (step 1606), coefficients may be scanned starting from the first scan position of the subblock to a location equal to the first pass bypass position variable minus one. For each coefficient, the following may be performed: If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the remaining absolute level (e.g., abs_remainder) may be binarized using a Golomb-Rice code, and the resulting bins may be coded in the bypass mode of the arithmetic coding engine.
[0085]
[0103] In pass 2(b) (step 1608), coefficients may be scanned starting from the first pass bypass position to the last scan position. For each coefficient the following may be performed: The absolute level (e.g., dec_abs_level) may be binarized with a Golomb-Rice code and the resulting bins may be coded in the bypass mode of the arithmetic coding engine. If the absolute level is not equal to 0, the coefficient sign flag (e.g., coeff_sign_flag) may be bypass coded.
[0086]
[0104] It should be understood that the method of FIG. 16 may be implemented by an encoder (e.g., the encoder of FIG. 1). In some embodiments, the encoder may receive the video frames. It should be understood that the encoded video frames from the method of FIG. 17 may be decoded using a decoder (e.g., the decoder of FIG. 2). In some embodiments, the decoding method may include two passes.
[0087]
[0105] In pass 1, the coefficients of the subblock are scanned. In some embodiments, each coefficient is scanned starting from the first scan position of the subblock to the last scan position. For each coefficient, if the remaining number of context-coded bins is equal to or greater than the group limit, the following may be performed. For example, the group limit may be 8, indicating the number of various flags (e.g., significance flag, coefficient sign flag, flags greater than 1, parity level flags, flags greater than 3, flags greater than 5, flags greater than 7, and flags greater than 9) that are coded in pass 1. The significance flag (e.g., sig_coeff_flag) may be context decoded. If the significance flag indicates that the level is non-zero (e.g., significance flag is equal to 1), the coefficient sign flag (e.g., coeff_sign_flag) and the flag greater than 1 (e.g., abs_level_gtx_flag[0]) may be signaled. If the flag greater than 1 indicates that the absolute level is greater than 1 (e.g., the greater than 1 flag is equal to 1), then the parity level flag (e.g., par_level_flag) and the greater than 3 flag (e.g., abs_level_gtx_flag[1]) may be decoded. The parity level flag may specify the absolute level minus 2 parity. The greater than 3 flag may specify whether the absolute level is greater than 3. If the flag greater than 3 indicates that the absolute level is greater than 3 (e.g., the greater than 3 flag is equal to 1), then the greater than 5 flag (e.g., abs_level_gtx_flag[2]) may be decoded. If the flag greater than 5 indicates that the absolute level is greater than 5 (e.g., the greater than 5 flag is equal to 1), then the greater than 7 flag (e.g., abs_level_gtx_flag[3]) may be decoded. If the greater than 7 flag indicates that the absolute level is greater than 7 (e.g., the greater than 7 flag is equal to 1), then the greater than 9 flag (e.g., abs_level_gtx_flag[4]) may be decoded. The greater than 9 flag may specify whether the absolute level of the level is greater than 9.In some embodiments, the coefficients may be scanned until the context-coded bin reaches a maximum limit (e.g., the black point in FIG. 12), after which the scan stops at the position as the last position of the first pass.
[0088]
[0106] After the end of pass 1 and before the start of pass 2, a first pass bypass position variable (iFirstPassBypassPos) may be set according to the last position of the previous pass. In some embodiments, the first pass bypass position variable may be set to the last position of the previous pass plus one. The first pass bypass position variable may represent the starting position where absolute level (e.g., dec_abs_level) syntax is signaled. Coefficients whose scan position is less than the first pass bypass position may be partially signaled via context encoding in pass 1, and the remaining coefficients may be signaled in pass 2 (a). In some embodiments, if a coefficient's scan position is greater than or equal to the first pass bypass position variable, none of that coefficient's flags are context decoded and the complete coefficient and sign may be signaled using bypass decoding in pass 2 (b).
[0089]
[0107] In pass 2(a), coefficients may be scanned starting from the first scan position of the subblock to a location equal to the first pass bypass position variable minus one. For each coefficient, the following may be performed: If the greater than 9 flag indicates that the absolute level is greater than 9 (e.g., the greater than 9 flag is equal to 1), the binarized remaining absolute level (e.g., abs_remainder) may be decoded using Golomb-Rice coding, and the resulting bins may be decoded in the bypass mode of the arithmetic coding engine.
[0090]
[0108] In pass 2(b), coefficients may be scanned starting from the first pass bypass position to the last scan position. For each coefficient, the following may be performed: The binarized absolute level (e.g., dec_abs_level) may be Golomb-Rice coded and the resulting bins may be decoded in the bypass mode of the arithmetic coding engine. If the absolute level is not equal to 0, the coefficient sign flag (e.g., coeff_sign_flag) may be bypass decoded.
[0091]
[0109] Figure 17 illustrates example pseudocode including bypass encoding syntax for the method of Figure 16, according to some embodiments of the present disclosure. Portions of the pseudocode in Figure 17 are shown in italics to illustrate the processing of the first pass bypass location and pass 2(b).
[0092]
[0110] In some embodiments, as shown in FIG. 17, pass 1 is performed only if the remaining number of context coded bins is 8 or more (e.g., “MaxCcbs >= 8” as shown in FIG. 17). This means that up to 7 context codings may be “wasted” in the context coding bin budget, which may adversely affect coding performance. Therefore, in some embodiments, the number of abs_level_gtx_flag[] flags may be adjusted in the disclosed two-pass coding method. For example, instead of coding flags greater than 9 (e.g., abs_level_gtx_flag[4]), only code up to flags greater than 7 (e.g., abs_level_gtx_flag[3]). Thus, pass 1 may be performed only if the remaining number of context coded bins is 7 or more. In some embodiments, only code up to flags greater than 5 (abs_level_gtx_flag[2]). Thus, pass 1 is performed only if the remaining number of context coded bins is 6 or more. It should be understood that the number of abs_level_gtx_flag[] flags can be adjusted to any number. Adjusting the number of abs_level_gtx_flag[] flags provides better coding efficiency since more positions can be coded in the first coding pass.
[0093]
[0111] In some embodiments, the Rice parameter cRiceParam may be derived as follows: Given an array TransCoeffLevel[xC][yC] as the coefficient value at scan location (xC,yC), and a value minLevel as the minimum bypass coding value, if none of a coefficient's flags are context coded, then the minLevel of that coefficient is 0. If all of the flags are context coded, then minLevel is equal to 10. The variable locSumAbs may be derived as specified by the following pseudocode: locSumAbs = 0 if (xC > 0) locSumAbs += Abs(TransCoeffLevel[xC - 1][yC]) if (yC > 0) locSumAbs += Abs(TransCoeffLevel[xC][yC -1]) locSumAbs = locSumAbs - 2*minLevel locSumAbs = Clip3 (0, 31, LocSumAbs)
[0094]
[0112] FIG. 18 shows an exemplary look-up table of the Rice parameter when the minimum bypass coding value is equal to 0, according to some embodiments of the present disclosure. As shown in FIG. 18, the Rice parameter can be represented by the variable cRiceParam. The location of the absolute sum can be represented by the variable locSumAbs.
[0095]
[0113] In some embodiments, two separate look-up tables can be used for the derivation of the Rice parameter based on minLevel. When minLevel is equal to 0, the table shown in FIG. 18 can be used. When minLevel is not equal to 0, the table shown in FIG. 13 can be used.
[0096]
[0114] In some embodiments, the derivation of the Rice parameter does not require a look-up table. For example, cRiceParam can be derived as follows. cRiceParam = (locSumAbs + offset) >> 3
[0097]
[0115] In the above formula, the offset can be a pre-defined constant and can be determined by offline training. An example of the offset value is 4.
[0098]
[0116] 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.
[0099]
[0117] In some embodiments, the offset value depends on the frame type, for example, the offset value may be 4 for an intra frame and 0 for an inter frame.
[0100]
[0118] In some embodiments, in VVC (e.g., VVC7), transform skip mode is possible for both luma and chroma components, and both types of components may share the same context variables. The context variables may be variables specified for the adaptive binary arithmetic decoding process of a bin by an equation involving the recently decoded bin. However, the signal statistics of the luma and chroma blocks may be different. As a result, in some embodiments of the present disclosure, different context variables may be used for the luma and chroma components. Syntax elements affected by the proposed context model extension include significant coefficient flag (e.g., sig_coeff_flag), abs_level_gtx_flag[n][j] (e.g., j=0 to 4), parity flag (e.g., par_level_flag), signal coefficient sign flag (e.g., coeff_sign_flag), and coded_sub_block_flag (e.g., coded_sub_block_flag shown in FIG. 3).
[0101]
[0119] In VVC (e.g., VVC7), three context variables may be used to code sig_coeff_flag for transform skip mode. In some embodiments, a total of six context variables (e.g., three for luma and three for chroma) may be used to code sig_coeff_flag for transform skip mode. The context index for coding sig_coeff_flag for transform skip mode may be derived from the number of significant coefficients in the neighbors (e.g., above and left). In some embodiments, the context index may refer to an identifier of the context variable. For example, if there are six context variables available, the context index for the first context variable may be 0, the context index for the second context variable may be 1, etc. The inputs to this process may be color component index cIdx, luma location (x0, y0), and the coefficient scan location of interest (xC, yC). The luma location (x0, y0) may specify a particular sample (e.g., the top-left sample) of the target transform block relative to a particular sample (e.g., the top-left sample) of the target image. The output of this process may be a coding index variable ctxInc. In some embodiments, the variable ctxInc may be derived according to the following pseudocode: locNumSig = 0 if (xC > 0) locNumSig += sig_coeff_flag[xC - 1][yC] if (yC > 0) locNumSig += sig_coeff_flag[xC][yC - 1] if (cIdx == 0) / / For example, for the luma component, ctxInc can be derived as follows: ctxInc = locNumSig else / / For example, for a chroma component, ctxInc can be derived as follows: ctxInc = locNumSig + 3
[0102]
[0120] In VVC (e.g., VVC7), four context variables may be used to code abs_level_gtx_flag[n][0] for transform skip mode. In some embodiments, a total of eight context variables (four for luma and four for chroma) may be used to code abs_level_gtx_flag[n][0] for transform skip mode. The context index for coding abs_level_gtx_flag[n][0] for transform skip may be derived from the number of significant coefficients in the neighbors (e.g., upper and left neighbors). The inputs to this process may be a color component index cIdx, a luma location (x0, y0), and a target coefficient scan location (xC, yC). The luma location (x0, y0) may specify a particular sample (e.g., top left sample) of a target transform block relative to a particular sample (e.g., top left sample) of a target image. The output of this process may be a coding index variable ctxInc. In some embodiments, the variable ctxInc may be derived according to the following pseudocode: if (BdpcmFlag[x0][y0][cIdx] == 1) ctxInc = 3 else if (xC > 0 and yC > 0) ctxInc = sig_coeff_flag[xC - 1][yC] + sig_coeff_flag[xC][yC - 1] else if (xC > 0) ctxInc = sig_coeff_flag[xC - 1][yC] else if (yC > 0) ctxInc = sig_coeff_flag[xC][yC - 1] else ctxInc = 0 if (cIdx > 0) ctxInc = ctxInc + 4
[0103]
[0121] In VVC (e.g., VVC7), one context variable may be used to code par_level_flag for transform skip mode. In some embodiments, a total of two context variables (one for luma and one for chroma) may be used to code par_level_flag for transform skip mode. The context index for coding par_level_flag for transform skip may be derived as follows: The input to this process may be a color component index cIdx. The output of this process is a coding index variable ctxInc. In some embodiments, the variable ctxInc may be derived according to the following pseudocode: if (cIdx == 0) ctxInc = 0 else ctxInc = 1
[0104]
[0122] In some embodiments, separate context variables for luma and chroma may be used to code abs_level_gtx_flag for transform skip mode. A context index for coding abs_level_gtx_flag for transform skip may be derived as follows: The input to this process may be a color component index cIdx. The output of this process may be a coding index variable ctxInc. In some embodiments, the variable ctxInc may be derived as follows: A context index for syntax element abs_level_gtx_flag[n][j] (j > 0) is derived as ctxInc = j - 1, and for chroma components (e.g., cIdx greater than 0), the context index is incremented as ctxInc = ctxInc + 4.
[0105]
[0123] In VVC (e.g., VVC7), six context variables may be used to code the transform skip mode coeff_sign_flag. In some embodiments, a total of 12 context variables (six for luma and six for chroma) may be used to code the transform skip mode coeff_sign_flag. The context index for coding the transform skip mode coeff_sign_flag may be derived from the neighbors' (e.g., the upper and left neighbors') coeff_sign_flag. The inputs to this process may be a color component index cIdx, a luma location (x0, y0), and a target coefficient scan location (xC, yC). The luma location (x0, y0) may specify a particular sample (e.g., the top left sample) of a target transform block relative to a particular sample (e.g., the top left sample) of a target image. The output of this process may be a coding index variable ctxInc. In some embodiments, the variables leftSign and aboveSign may be derived according to the following pseudocode: if (xC == 0) leftSign = 0 else leftSign = CoeffSignLevel[xC - 1][yC] if (yC == 0) aboveSign = 0 else aboveSign = CoeffSignLevel[xC][yC - 1]
[0106]
[0124] In some embodiments, the variable ctxInc may be derived according to the following pseudocode: if ((leftSign == 0 and aboveSign == 0) or (leftSign == aboveSign)) if (BdpcmFlag[x0][y0][cIdx] == 0) ctxInc = 0 else ctxInc = 3 else if (leftSign >= 0 and aboveSign >= 0) if (BdpcmFlag[x0][y0][cIdx]) ctxInc = 1 else ctxInc = 4 else if (BdpcmFlag[x0][y0][cIdx]) ctxInc = 2 else ctxInc = 5 if (cIdx > 0) ctxInc = ctxInc + 6
[0107]
[0125] In VVC (e.g., VVC7), three context variables may be used to code coded_sub_block_flag for transform skip mode. coded_sub_block_flag may be a sub-block flag that specifies whether the transform coefficient level of the sub-block is equal to 0 or not. For example, if coded_sub_block_flag[xS][yS] is equal to 0, the transform coefficient level of the sub-block at location (xS, yS) is inferred to be equal to 0. If coded_sub_block_flag[xS][yS] is equal to 1, at least one of the transform coefficient levels of the sub-block at location (xS, yS) has a non-zero value. In some embodiments, a total of six context variables (three for luma and three for chroma) may be used to code coded_sub_block_flag for transform skip mode. The context index for coding coded_sub_block_flag for transform skip mode may be derived from the coded_sub_block_flag of the upper and left neighbors. Inputs to this process may be color component index cIdx, luma location (x0,y0), target sub-block scan location (xS,yS), previously decoded bins of syntax element coded_sub_block_flag, binary logarithm of transform block width log2TbWidth, and transform block height log2TbHeight. Luma location (x0,y0) may specify the top-left sample of the target transform block relative to the top-left sample of the target image. Output of this process may be a coding index variable ctxInc. In some embodiments, the variables log2SbWidth and log2SbHeight may be derived according to the following pseudocode: if (minimum (log2TbWidth, log2TbHeight) < 2) log2SbWidth = 1 else log2SbHeight = log2SbWidth
[0108]
[0126] In some embodiments, the variables log2SbWidth and log2SbHeight may be modified according to the following pseudocode: if (log2TbWidth < 2 and cIdx == 0) log2SbWidth = log2TbWidth log2SbHeight = 4 - log2SbWidth else if (log2TbHeight < 2 and cIdx == 0) log2SbHeight = log2TbHeight log2SbWidth = 4 - log2SbHeight
[0109]
[0127] In some embodiments, the variable csbfCtx may be initialized as 0 and modified according to the following pseudocode: if (xS > 0) csbfCtx = csbfCtx + coded_sub_block_flag[xS - 1][yS] if (yS > 0) csbfCtx = csbfCtx + coded_sub_block_flag[xS][yS - 1]
[0110]
[0128] In some embodiments, the context index variable ctxInc may be derived using the color component indices cIdx and csbfCtx according to the following pseudocode: if (cIdx == 0) ctxInc = csbfCtx else ctxInc = 3 + csbfCtx
[0111]
[0129] In some embodiments, a non-transitory computer-readable storage medium is also provided that includes instructions, which may be executed by a device (such as the disclosed encoder and decoder) to perform the above method. Common forms of non-transitory media include, for example, floppy disks, flexible disks, hard disks, solid state drives, magnetic tapes or any other magnetic data storage media, CD-ROMs, any other optical data storage media, any physical media with a pattern of holes, RAM, PROMs, and EPROMs, FLASH-EPROMs or any other flash memory, NVRAMs, caches, registers, any other memory chips or cartridges, and networked versions thereof. The devices may include one or more processors (CPUs), input / output interfaces, network interfaces, and / or memories.
[0112]
[0130] It should be noted that, as used herein, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another and do not require or imply any actual relationship or order between those entities or operations. Furthermore, the words "comprising," "having," "containing," and "including," as well as other similar forms, are intended to be equivalent in meaning and open-ended in that the item or items following any one of these words are not meant to be an exhaustive listing of such item or items or to be limited to only the item or items listed.
[0113]
[0131] As used herein, unless specifically stated otherwise, the term "or" includes all possible combinations unless impracticable. For example, if it is stated that a database may include A or B, the database may include A, or B, or A and B, unless specifically stated otherwise or impracticable. As another example, if it is stated that a database may include A, B, or C, the database may include A, or B, or C, or A and B, or A and C, or B and C, or A and B and C, unless specifically stated otherwise or impracticable.
[0114]
[0132] It should be understood that the above embodiments may be implemented by hardware, or software (program code), or a combination of hardware and software. When implemented by software, the software may be stored in the above computer-readable medium. When executed by a processor, the software may perform the disclosed method. The computing unit and other functional units described in this disclosure may be implemented by hardware, or software, or a combination of hardware and software. It will also be understood by those skilled in the art that multiple of the above modules / units may be combined into one module / unit, and each of the above modules / units may be further divided into multiple sub-modules / sub-units.
[0115]
[0133] In the above specification, the embodiments have been described with reference to numerous specific details that may vary from implementation to implementation. Certain adaptations and modifications may be made to the described embodiments. Other embodiments will occur to those skilled in the art from a consideration of the specification and practice of the invention disclosed herein. It is intended that the specification and examples be considered as merely exemplary, with the true scope and spirit of the invention being indicated by the following claims. It is also intended that the sequence of steps depicted in the figures is for illustrative purposes only, and is not intended to be limited to any particular sequence of steps. Thus, one skilled in the art will recognize that the steps may be performed in different orders while performing the same method.
[0116]
[0134] The following clauses may be used to further describe the embodiments. 1. 1. A method of encoding implemented by an encoder of video data, comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; the first pass of scanning includes bypass coding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; Encoding method. 2. performing a second pass of scanning the transform coefficients prior to the first pass of scanning; a second pass of scanning includes encoding a greater than one flag, the greater than one flag indicating whether the absolute value is greater than one; the first pass of scanning further includes bypass encoding the parity level flag in response to the flag being greater than 1 indicating an absolute value greater than 1. 2. The encoding method according to clause 1. 3. performing a second pass of scanning the sub-blocks having a plurality of transform coefficients; scanning the plurality of transform coefficients until a number of context-coded bins reaches a maximum limit; in response to a number of context-coded bins reaching a maximum limit, bypass coding absolute values of levels of transform coefficients that are not scanned in the second pass, the bypass coding including binarizing absolute values of the transform coefficients that are not scanned using Golomb-Rice coding; 3. The encoding method of claim 2, further comprising: 4. The second pass to scan is encoding a significance flag of a transform coefficient, the significance flag indicating whether the transform coefficient has a level of zero or not; and encoding a significance flag greater than 1 in response to the significance flag indicating that the level of the transform coefficient is not zero. 4. The encoding method of claim 2 or 3, further comprising: 5. The second pass to scan is and encoding a greater than 3 flag of the transform coefficient in response to the greater than 1 flag indicating that the absolute value is greater than 1, the greater than 3 flag indicating whether the absolute value is greater than 3. Item 2. The encoding method according to any one of items 2 to 4. 6. performing a third pass of scanning the transform coefficients after the second pass of scanning and before the first pass of scanning; The third pass to scan is encoding a greater than 5 flag of the transform coefficient in response to the greater than 3 flag indicating that the absolute value is greater than 3, the greater than 5 flag indicating whether the absolute value is greater than 5; encoding a greater than 7 flag of the transform coefficient in response to the greater than 5 flag indicating that the absolute value is greater than 5, the greater than 7 flag indicating whether the absolute value is greater than 7; encoding a greater than 9 flag of the transform coefficient in response to the greater than 7 flag indicating that the absolute value is greater than 7, the greater than 9 flag indicating whether the absolute value is greater than 9; Including 6. The encoding method according to clause 5. 7. The first pass to scan is and encoding a remaining absolute level flag of the transform coefficient in response to the greater than 9 flag indicating the absolute value being greater than 9, the remaining absolute level flag indicating an absolute value of the remaining of the levels of the transform coefficient. 6. An encoding method according to clause 6. 8. performing a third pass of scanning the transform coefficients after the second pass of scanning and before the first pass of scanning; The third pass to scan is encoding a greater than 3 flag of the transform coefficient in response to the greater than 1 flag indicating that the absolute value is greater than 1, the greater than 3 flag indicating whether the absolute value is greater than 3; Further comprising: 2. The encoding method according to claim 2. 9. The third pass to scan is encoding a greater than 5 flag of the transform coefficient in response to the greater than 3 flag indicating that the absolute value is greater than 3, the greater than 5 flag indicating whether the absolute value is greater than 5; encoding a greater than 7 flag of the transform coefficient in response to the greater than 5 flag indicating that the absolute value is greater than 5, the greater than 7 flag indicating whether the absolute value is greater than 7; encoding a greater than 9 flag of the transform coefficient in response to the greater than 7 flag indicating that the absolute value is greater than 7, the greater than 9 flag indicating whether the absolute value is greater than 9; 9. The encoding method of claim 8, further comprising: 10. The first pass to scan is and encoding a remaining absolute level flag of the transform coefficient in response to the greater than 9 flag indicating the absolute value being greater than 9, the remaining absolute level flag indicating an absolute value of the remaining of the levels of the transform coefficient. 9. An encoding method according to clause 9. 11. 11. The method of encoding according to any one of clauses 1 to 10, wherein the sub-block has a plurality of transform coefficients and the first pass of scanning is performed by scanning the plurality of transform coefficients in reverse order. 12. Inverting the plurality of transform coefficients prior to performing a first pass of scanning. 12. The encoding method of claim 11, further comprising: 13. 13. The coding method according to any one of clauses 1 to 12, wherein the coding method is a transform skip residual coding method. 14. receiving a video frame; Dividing a video frame into a number of sub-blocks; 14. The encoding method according to any one of clauses 1 to 13, further comprising: 15. 1. A decoding method implemented by a decoder of video data, comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; the first pass of scanning includes bypass decoding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; Decryption method. 16. performing a second pass of scanning the transform coefficients prior to the first pass of scanning; a second pass of scanning includes decoding a greater than one flag, the greater than one flag indicating whether the absolute value is greater than one; the first pass of scanning further comprising: in response to the flag being greater than 1 indicating an absolute value greater than 1, bypass decoding the parity level flag in the first pass. The decryption method according to clause 15. 17. The second pass to scan is decoding a significance flag of the transform coefficient, the significance flag indicating whether the level of the transform coefficient is zero or not; decoding a flag greater than 1 in response to the significance flag indicating that the level of the transform coefficient is not zero; 17. The method of decrypting as recited in claim 16, further comprising: 18. The first pass to scan is decoding a greater than 3 flag of the transform coefficient in response to the greater than 1 flag indicating that the absolute value is greater than 1, the greater than 3 flag indicating whether the absolute value is greater than 3; decoding a greater than 5 flag of the transform coefficient in response to the greater than 3 flag indicating that the absolute value is greater than 3, the greater than 5 flag indicating whether the absolute value is greater than 5; decoding a greater than 7 flag of the transform coefficient in response to the greater than 5 flag indicating that the absolute value is greater than 5, the greater than 7 flag indicating whether the absolute value is greater than 7; decoding a greater than 9 flag of the transform coefficient in response to the greater than 7 flag indicating that the absolute value is greater than 7, the greater than 9 flag indicating whether the absolute value is greater than 9; 17. The method of decrypting as recited in claim 16, further comprising: 19. performing a third pass of scanning the transform coefficients; a third pass of scanning includes decoding a remaining absolute level flag of the transform coefficient in response to the greater than 9 flag indicating the absolute value being greater than 9, the remaining absolute level flag indicating an absolute value of the remaining of the levels of the transform coefficient; Decryption method according to clause 18. 20. a sub-block having a plurality of transform coefficients; 16. The decoding method of claim 15, wherein the first pass of scanning is performed by scanning the plurality of transform coefficients from a lower right corner of the sub-block to an upper left corner of the sub-block. twenty one. Inverting the plurality of transform coefficients prior to performing a first pass of scanning. 21. The method of decoding as recited in claim 20, further comprising: twenty two. 22. The decoding method according to any one of clauses 15 to 21, wherein the decoding method is a transform skip residual decoding method. twenty three. 1. A system for encoding video data, the system comprising: a memory storing a set of instructions; a processor, the processor executing a set of instructions to configured to cause the system to perform a first pass of scanning transform coefficients of a sub-block of a video frame; the first pass of scanning includes bypass coding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; A system for encoding video data. twenty four. 1. A system for decoding video data, the system comprising: a memory storing a set of instructions; a processor, the processor executing a set of instructions to configured to cause the system to perform a first pass of scanning transform coefficients of a sub-block of a video frame; a first pass of scanning includes decoding a parity level flag of the transform, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; A system for decoding video data. twenty five. 1. A method of encoding implemented by an encoder of video data, comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; and performing a second pass scanning the transform coefficients of the subblock; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; A first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes encoding, for each of a first set of transform coefficients, a significance flag indicating whether a level of the transform coefficient is zero; a second pass of scanning includes binarizing an absolute value of a level for each of the second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; Encoding method. 26. The first pass to scan is and encoding a flag greater than 1 of the first transform coefficient in response to the significance flag of the first transform coefficient indicating that the level of the first transform coefficient is not zero, the first transform coefficient being one of a first set of transform coefficients, and the flag greater than 1 indicating whether an absolute value of the level of the first transform coefficient is greater than 1; 26. The encoding method according to clause 25. 27. The first pass to scan is coding a flag greater than 3 of the first transform coefficient in response to the flag greater than 1 indicating that the absolute value of the level of the first transform coefficient is greater than 1, the flag greater than 3 indicating whether the absolute value of the level of the first transform coefficient is greater than 3 or not, and performing a first pass of scanning is stopped if the number of remaining context coded bins is less than a group limit; encoding a flag greater than 5 of the first transform coefficient in response to the flag greater than 3 indicating that the absolute value of the level of the first transform coefficient is greater than 3, the flag greater than 5 indicating whether the absolute value of the level of the first transform coefficient is greater than 5; Encoding a flag greater than 7 for the first transform coefficient in response to a flag greater than 5 indicating that the absolute value of the level of the first transform coefficient is greater than 5, wherein the flag greater than 7 indicates whether the absolute value of the level of the first transform coefficient is greater than 7, and Encoding a flag greater than 9 for the first transform coefficient in response to a flag greater than 7 indicating that the absolute value of the level of the first transform coefficient is greater than 7, wherein the flag greater than 9 indicates whether the absolute value of the level of the first transform coefficient is greater than 9, and The encoding method according to clause 26, further comprising: 28. The second pass to be scanned is Encoding the remaining absolute level flags of the first transform coefficient in response to a flag greater than 9 indicating that the absolute value of the level of the first transform coefficient is greater than 9, wherein the remaining absolute level flags indicate the remaining absolute values of the levels of the first transform coefficient, The encoding method according to clause 27, further comprising: 29. The encoding method according to any one of clauses 25 to 28, wherein each of the first pass and the second pass is executed by scanning the transform coefficients of the sub-blocks in reverse order. 30. Inverting the transform coefficients of the sub-block before executing the first pass The encoding method according to clause 29, further comprising: 31. The encoding method according to any one of clauses 25 to 30, wherein the encoding method is a transform skip residual encoding method. 32. Binarizing the absolute value of the level for each of the second set of transform coefficients is Binarizing the absolute value using a Golomb-Rice code The encoding method according to any one of clauses 25 to 31, further comprising: 33. A decoding method implemented by a decoder for video data, performing a first pass of scanning transform coefficients of a sub-block of a video frame; and performing a second pass scanning the transform coefficients of the sub-block; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; A first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes decoding, for each of the first set of transform coefficients, a significance flag indicating whether a level of the transform coefficient is zero; a second pass of scanning includes decoding a binarized absolute value of the level for each of the second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; Decryption method. 34. The first pass to scan is decoding a flag greater than one of the first transform coefficient in response to the significance flag of the first transform coefficient indicating that a level of the first transform coefficient is not zero, the first transform coefficient being one of a first set of transform coefficients, and the flag greater than one indicating whether an absolute value of a level of the first transform coefficient is greater than one; 34. The method of decrypting as recited in claim 33, further comprising: 35. The first pass to scan is decoding a flag greater than 3 of the first transform coefficient in response to the flag greater than 1 indicating that the absolute value of the level of the first transform coefficient is greater than 1, the flag greater than 3 indicating whether the absolute value of the level of the first transform coefficient being scanned is greater than 3 or not, and performing a first pass of scanning is stopped if the number of remaining context-coded bins is less than a group limit; decoding a flag greater than 5 of each of the first transform coefficients in response to the flag greater than 3 indicating that the absolute value of the level of the first transform coefficient is greater than 3, the flag greater than 5 indicating whether the absolute value of the level of the first transform coefficient is greater than 5; decoding a flag greater than 7 of each of the first transform coefficients in response to the flag greater than 5 indicating that the absolute value of the level of the first transform coefficient is greater than 5, the flag greater than 7 indicating whether the absolute value of the level of the first transform coefficient is greater than 7; decoding a greater than 9 flag of each of the first transform coefficients in response to the greater than 7 flag indicating that the absolute value of the level of the first transform coefficient is greater than 7, the greater than 9 flag indicating whether the absolute value of the level of the first transform coefficient is greater than 9; 35. The method of decrypting as recited in claim 34, further comprising: 36. The second pass to scan is decoding a remaining absolute level flag of the first transform coefficient in response to the greater than 9 flag indicating that the absolute value of the level of the first transform coefficient being scanned is greater than 9, the remaining absolute level flag indicating an absolute value of the remaining level of the first transform coefficient; 36. The method of decrypting as recited in claim 35, further comprising: 37. 37. The decoding method according to any one of clauses 33 to 36, wherein the coding method is a transform skip residual coding method. 38. Decoding the binarized absolute values of each level of the second set of transform coefficients. Decoding the absolute value using Golomb-Rice coding The decryption method according to any one of clauses 9 to 13, further comprising: 39. 1. A system for encoding video data, the system comprising: a memory storing a set of instructions; a processor, the processor executing a set of instructions to performing a first pass of scanning transform coefficients of a sub-block of a video frame; and performing a second pass scanning the transform coefficients of the sub-blocks; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; A first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes encoding, for each of a first set of transform coefficients, a significance flag indicating whether a level of the transform coefficient is zero; the second pass of scanning includes binarizing the absolute values of the levels of each of the second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; A system for encoding video data. 40. 1. A system for decoding video data, the system comprising: a memory storing a set of instructions; a processor, the processor executing a set of instructions to performing a first pass of scanning transform coefficients of a sub-block of a video frame; and performing a second pass scanning the transform coefficients of the sub-blocks; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; A first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes decoding, for each of the first set of transform coefficients, a significance flag indicating whether a level of the transform coefficient is zero; a second pass of scanning includes decoding binarized absolute values of respective levels of a second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; A system for decoding video data. 41. generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for chroma components of the video frame; generating a sub-block of a video frame; 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; 23. An encoding method implemented by an encoder of video data, comprising: 42. encoding the first set of transform coefficients; encoding a significance flag of a transform coefficient of the first set of transform coefficients according to three context variables from the first set of context variables and three context variables from the second set of context variables, the significance flag indicating whether a level of the transform coefficient is zero or not; 42. The encoding method according to clause 41. 43. generating three context variables from the first set of context variables and three context variables from the second set of context variables, the generating being based on a color component index, a luma location specifying a location of the sub-block relative to the video frame, and a target coefficient scan location; 43. The encoding method according to clause 42. 44. encoding the first set of transform coefficients; encoding a greater-than-x flag for a transform coefficient of the first set of transform coefficients according to four context variables from the first set of context variables and four context variables from the second set of context variables, the greater-than-x flag indicating whether an absolute value of a level of the transform coefficient is greater than x; 44. The encoding method according to any one of clauses 41 to 43. 45. generating four context variables from the first set of context variables and four context variables from the second set of context variables, the generating being based on a color component index, a luma location specifying a location of the sub-block relative to the video frame, and a target coefficient scan location; 45. The encoding method according to clause 44. 46. encoding the first set of transform coefficients; encoding a parity flag of a transform coefficient of the first set of transform coefficients according to one context variable from the first set of context variables and one context variable from the second set of context variables, the parity flag indicating a parity of an absolute value of a level of the transform coefficient; 46. The encoding method according to any one of clauses 41 to 45. 47. generating one context variable from the first set of context variables and one context variable from the second set of context variables according to the color component index; 47. The encoding method of claim 46, further comprising: 48. encoding the first set of transform coefficients; encoding coefficient sign flags of transform coefficients of the first set of transform coefficients according to six context variables from the first set of context variables and six context variables from the second set of context variables, the coefficient sign flags indicating signs of values of the transform coefficients; 48. The encoding method according to any one of clauses 41 to 47. 49. generating six context variables from the first set of context variables and six context variables from the second set of context variables, the generating being based on a number of significant coefficients of video frames neighboring the video frame, a luma location specifying a location of the sub-block relative to the video frame, and a coefficient scan location of the target; The method described in clause 48. 50. encoding the first set of transform coefficients; encoding sub-block flags of the transform coefficients of the first set of transform coefficients according to three context variables from the first set of context variables and three context variables from the second set of context variables; 50. The method according to any one of clauses 41 to 49, comprising: 51. generating three context variables from the first set of context variables and three context variables from the second set of context variables, the generating being based on a number of significant coefficients of video frames neighboring the video frame, a luma location specifying a location of the sub-block relative to the video frame, and a coefficient scan location of the target; The method described in clause 50. 52. receiving a video bitstream; Dividing a video bitstream into a plurality of sub-blocks; generating a first set of context variables for a luma component of the sub-block; generating a second set of context variables for the chroma components of the sub-block; context encoding a first set of transform coefficients of the sub-block according to a first set of context variables and a second set of context variables; 23. A video processing method comprising: 53. receiving a video frame; Dividing a video frame into a plurality of sub-blocks; generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for chroma components of the video frame; decoding a first set of transform coefficients of the sub-block according to the first set of context variables and the second set of context variables; 23. A decoding method implemented by a decoder of video data, comprising: 54. Decoding the first set of transformation coefficients includes decoding the significance flag of the transformation coefficients of the first set of transformation coefficients according to three context variables from the first set of context variables and three context variables from the second set of context variables, where the significance flag indicates whether the level of the transformation coefficient is zero the decoding method described in clause 53. 55. further includes generating three context variables from the first set of context variables and three context variables from the second set of context variables, and the generation is based on the color component index, the luma location specifying the top-left sample of the target transformation block relative to the top-left sample of the video frame, and the target coefficient scan location the decoding method described in clause 54. 56. Decoding the first set of transformation coefficients includes decoding the flag greater than x of the transformation coefficients of the first set of transformation coefficients according to four context variables from the first set of context variables and four context variables from the second set of context variables and includes the decoding method described in any one of clauses 53 to 55. 57. further includes generating four context variables from the first set of context variables and four context variables from the second set of context variables, and the generation is based on the color component index, the luma location specifying the top-left sample of the target transformation block relative to the top-left sample of the video frame, and the target coefficient scan location the decoding method described in clause 56. 58. Decoding the first set of transformation coefficients includes decoding the parity flag of the transformation coefficients of the first set of transformation coefficients according to one context variable from the first set of context variables and one context variable from the second set of context variables The decryption method according to any one of clauses 53 to 57, comprising: 59. generating one context variable from the first set of context variables and one context variable from the second set of context variables, the generating being based on the color component index; Decryption method as described in clause 58. 60. Decoding the first set of transform coefficients decoding context coefficient sign flags of transform coefficients of the first set of transform coefficients according to six context variables from the first set of context variables and six context variables from the second set of context variables; The decryption method according to any one of clauses 53 to 59, comprising: 61. generating six context variables from the first set of context variables and six context variables from the second set of context variables, the generating being based on a number of significant coefficients of an upper neighboring video frame and a left neighboring video frame, a luma location that specifies a top left sample of the target transform block relative to a top left sample of the video frame, and a target coefficient scan location; Decryption method according to clause 60. 62. Decoding the first set of transform coefficients decoding sub-block flags of transform coefficients of the first set of transform coefficients according to three context variables from the first set of context variables and three context variables from the second set of context variables; The decryption method according to any one of clauses 53 to 61, comprising: 63. Further including generating three context variables from a first set of context variables and three context variables from a second set of context variables, wherein the generating is based on the number of significant coefficients of the video frame in the upper and left adjacent positions of the video frame, a luma location specifying the upper left sample of the target transform block with respect to the upper left sample of the video frame, and a target coefficient scan location. The decoding method according to clause 62. 64. A system for encoding video data, the system comprising: A memory for storing a set of instructions; A processor, wherein the processor executes the set of instructions to Generate a first set of context variables for the luma component of the video frame; Generate a second set of context variables for the chroma component of the video frame; Generate sub-blocks of the video frame; Encode a first set of transform coefficients of the sub-blocks according to the first set of context variables and the second set of context variables; And is configured to cause the system to perform the above. A system for encoding video data. 65. A system for decoding video data, the system comprising: A memory for storing a set of instructions; A processor, wherein the processor executes the set of instructions to Receive a video frame; Divide the video frame into a plurality of sub-blocks; Generate a first set of context variables for the luma component of the video frame; Generate a second set of context variables for the chroma component of the video frame; Decode a first set of transform coefficients of the sub-blocks according to the first set of context variables and the second set of context variables; configured to cause the system to A system for decoding video data. 66. A non-transitory computer-readable medium storing a set of instructions, the set of instructions being executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; the first pass of scanning includes bypass coding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; Non-transitory computer-readable medium. 67. A non-transitory computer-readable medium storing a set of instructions, the set of instructions being executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; the first pass of scanning includes bypass decoding a parity level flag of the transform coefficient, the parity level flag indicating a parity of an absolute value of a level of the transform coefficient; Non-transitory computer-readable medium. 68. A non-transitory computer-readable medium storing a set of instructions, the set of instructions being executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; and performing a second pass scanning the transform coefficients of the sub-block; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; A first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes encoding, for each of a first set of transform coefficients, a significance flag indicating whether a level of the transform coefficient is zero; the second pass of scanning includes binarizing the absolute values of the levels of each of the second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; Non-transitory computer-readable medium. 69. A non-transitory computer-readable medium storing a set of instructions, the set of instructions being executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising: performing a first pass of scanning transform coefficients of a sub-block of a video frame; and performing a second pass scanning the transform coefficients of the sub-block; performing a first pass of scanning is stopped when the number of context-encoded bins reaches a maximum limit; A first set of transform coefficients of the sub-block is scanned in a first pass; the first pass of scanning includes decoding, for each of the first set of transform coefficients, a significance flag indicating whether a level of the transform coefficient is zero; a second pass of scanning includes decoding binarized absolute values of respective levels of a second set of transform coefficients, the second set of transform coefficients not being scanned in the first pass; Non-transitory computer-readable medium. 70. A non-transitory computer-readable medium storing a set of instructions, the set of instructions being executable by one or more processors of a device to cause the device to initiate a method for encoding video data, the method comprising: generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for chroma components of the video frame; generating a sub-block of a video frame; 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; A non-transitory computer readable medium comprising: 71. A non-transitory computer-readable medium storing a set of instructions, the set of instructions being executable by one or more processors of a device to cause the device to initiate a method for decoding video data, the method comprising: receiving a video frame; Dividing a video frame into a plurality of sub-blocks; generating a first set of context variables for a luma component of the video frame; generating a second set of context variables for chroma components of the video frame; decoding a first set of transform coefficients of the sub-block according to the first set of context variables and the second set of context variables; A non-transitory computer readable medium comprising:
[0117]
[0135] In the drawings and specification, illustrative embodiments have been disclosed. However, these embodiments are susceptible to many variations and modifications. Thus, although specific terms are employed, they are used in a generic and descriptive sense only and not for purposes of limitation.
Claims
1. 1. A decoding method implemented by a decoder of video data, comprising: performing a first pass of scanning a plurality of transform coefficients of a sub-block of a video frame; The first pass of scanning comprises: determining whether a remaining number of context-encoded bins is greater than or equal to four; In response to the remaining number of context-coded bins being equal to or greater than four, decoding a sig_coeff_flag of a target transform coefficient, the sig_coeff_flag indicating whether the level of the target transform coefficient is zero; and decoding a coeff_sign_flag and an abs_level_gtx_flag[0] of the target transform coefficient in response to the level of the target transform coefficient being not zero, the coeff_sign_flag representing a sign of the level of the target transform coefficient, and the abs_level_gtx_flag[0] representing that the absolute value of the level of the target transform coefficient is greater than 1; and performing
2. The method of decoding of claim 1 , further comprising: terminating the first pass of scanning in response to the remaining number of context-encoded bins being less than four.
3. 1. A method of encoding implemented by an encoder of video data, comprising: performing a first pass of scanning a plurality of transform coefficients of a sub-block of a video frame; The first pass of scanning comprises: determining whether a remaining number of context-encoded bins is greater than or equal to four; In response to the remaining number of context-coded bins being equal to or greater than four, coding a sig_coeff_flag of a target transform coefficient, the sig_coeff_flag indicating whether the level of the target transform coefficient is zero or not; and coding a coeff_sign_flag and an abs_level_gtx_flag[0] of the target transform coefficient in response to the level of the target transform coefficient being non-zero, the coeff_sign_flag representing a sign of the level of the target transform coefficient, and the abs_level_gtx_flag[0] representing that the absolute value of the level of the target transform coefficient is greater than 1; and performing the above steps.
4. In response to the remaining number of the context-coded bins being less than four, the skip 4. The method of claim 3, further comprising completing a first pass of scanning.
5. 1. A system for encoding video data, comprising: at least one memory storing a set of instructions; At least one processor; The processor is configured to execute the set of instructions to cause the system to perform operations including performing a first pass of scanning a plurality of transform coefficients of a sub-block of a video frame, the first pass of scanning comprising: determining whether the number of context-encoded bins is greater than or equal to four; In response to the remaining number of context-coded bins being equal to or greater than four, coding a sig_coeff_flag of a target transform coefficient, the sig_coeff_flag indicating whether the level of the target transform coefficient is zero or not; and coding a coeff_sign_flag and an abs_level_gtx_flag[0] of the target transform coefficient in response to the level of the target transform coefficient being non-zero, the coeff_sign_flag representing a sign of the level of the target transform coefficient, and the abs_level_gtx_flag[0] representing that the absolute value of the level of the target transform coefficient is greater than 1; and executing the above.
6. 1. A system for decoding video data, comprising: at least one memory storing a set of instructions; one or more processors; The processor is configured to execute the set of instructions to cause the system to perform operations including performing a first pass of scanning a plurality of transform coefficients of a sub-block of a video frame, the first pass of scanning comprising: determining whether a remaining number of context-encoded bins is greater than or equal to four; In response to the remaining number of context-coded bins being equal to or greater than four, decoding a sig_coeff_flag of a target transform coefficient, the sig_coeff_flag indicating whether a level of the target transform coefficient is zero; and decoding a coeff_sign_flag and an abs_level_gtx_flag[0] of the target transform coefficient in response to the level of the target transform coefficient being not zero, the coeff_sign_flag representing a sign of the level of the target transform coefficient, and the abs_level_gtx_flag[0] representing that the absolute value of the level of the target transform coefficient is greater than 1; and executing the above.
Citation Information
Cited By
Transform-skip residual coding of video data
JP2025120183A
Transform-skip residual coding of video data
JP2025120184A
Transform-skip residual coding of video data
JP2025120185A