Methods and apparatus for residual and coefficient encoding / decoding
By receiving syntax elements from the bitstream, determining Rice parameters, and decoding pixel codewords in the video data, pixel parameters and symbol values are generated, solving the problem of efficiently encoding/decoding large amounts of video and achieving more efficient video data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
- Filing Date
- 2020-09-29
- Publication Date
- 2026-07-31
AI Technical Summary
As the quality of digital video improves, the amount of video data grows exponentially, making it difficult for existing technologies to encode/decode more efficiently while maintaining the image quality of decoded video data.
By receiving syntax elements from the bitstream, the Rice parameter is determined, the pixel codewords in the video data are decoded, and pixel parameters and symbol values are generated using predefined mapping relationships, thereby determining the quantized pixel values.
It improves the efficiency of video encoding/decoding, reduces the amount of data, and maintains image quality.
Smart Images

Figure CN122496643A_ABST
Abstract
Description
[0001] This application is a divisional application of Chinese Patent Application No. 202080080612.X, which is the Chinese national phase application of International Patent Application PCT / US2020 / 053288 filed on September 29, 2020. This international patent application claims priority to U.S. Provisional Patent Application No. 62 / 909,079, filed October 1, 2019, entitled “Residual and Coefficients Coding for Video Coding”; U.S. Provisional Patent Application No. 62 / 911,260, filed October 5, 2019, entitled “Residual and Coefficients Coding for Video Coding”; and U.S. Provisional Patent Application No. 62 / 911,930, filed October 7, 2019, entitled “Residual and Coefficients Coding for Video Coding”. Technical Field
[0002] This application generally relates to video data encoding and decoding and compression, and more specifically to improved methods and systems for residual and coefficient encoding and decoding of video. Background Technology
[0003] Digital video is supported by a wide variety of electronic devices, including digital televisions, laptops or desktop computers, tablets, digital cameras, digital recording devices, digital media players, video game consoles, smartphones, video conferencing equipment, and video streaming devices. These electronic devices transmit, receive, encode, decode, and / or store digital video data by implementing video compression / decompression standards defined by MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10, Advanced Video Codec (AVC), High Efficiency Video Codec (HEVC), and Universal Video Codec (VVC). Video compression typically involves performing spatial (intra-frame) prediction and / or temporal (inter-frame) prediction to reduce or remove redundancy inherent in the video data. For block-based video codecs, video frames are divided into one or more stripes, each strip containing multiple video blocks, which may also be referred to as coding tree units (CTUs). Each CTU may contain a coding unit (CU) or be recursively divided into smaller CUs until a predefined minimum CU size is reached. Each CU (also called a leaf CU) contains one or more transform units (TUs), and each CU also contains one or more prediction units (PUs). Each CU can be encoded and decoded in intra-frame, inter-frame, or IBC modes. Video blocks in the intra-frame codec (I) strip of a video frame are encoded using spatial prediction relative to reference samples in adjacent blocks within the same video frame. Video blocks in the inter-frame codec (P or B) strip of a video frame can use spatial prediction relative to reference samples in adjacent blocks within the same video frame or temporal prediction relative to reference samples in other previous and / or future reference video frames.
[0004] A prediction block for the current video block to be encoded is generated based on spatial or temporal predictions of previously encoded reference blocks (e.g., neighboring blocks). The process of finding the reference block can be accomplished using a block-matching algorithm. Residual data representing the pixel difference between the current block to be encoded and the prediction block is called the residual block or prediction error. Inter-frame coded blocks are encoded based on the motion vector pointing to the reference block in the reference frame that forms the prediction block, and the residual block. The process of determining the motion vector is typically called motion estimation. Intra-frame coded blocks are encoded based on the intra-frame prediction mode and the residual block. For further compression, the residual block is transformed from the pixel domain to the transform domain, such as the frequency domain, to generate residual transform coefficients, which can then be quantized. The quantized transform coefficients, initially arranged as a two-dimensional array, can be scanned to generate a one-dimensional vector of transform coefficients, and then entropy-encoded into a video bitstream for further compression.
[0005] The encoded video bitstream is then stored in a computer-readable storage medium (e.g., flash memory) for access by another electronic device with digital video capabilities, or transmitted directly to the electronic device via wired or wireless means. The electronic device then performs video decompression (the reverse of the video compression process described above) by, for example, parsing the encoded video bitstream to obtain syntax elements from the bitstream and reconstructing the digital video data from the encoded video bitstream to its original format based at least in part on the syntax elements obtained from the bitstream, and renders the reconstructed digital video data on the display of the electronic device.
[0006] As digital video quality progresses from high definition to 4K × 2K or even 8K × 4K, the amount of video data to be encoded / decoded grows exponentially. Maintaining the image quality of decoded video data while encoding / decoding it more efficiently remains a challenge. Summary of the Invention
[0007] The embodiments described in this application relate to video data encoding and decoding, and more specifically to improved methods and systems for residual and coefficient encoding and decoding of video.
[0008] According to a first aspect of this application, a method for decoding video data includes: receiving one or more syntax elements corresponding to a coding unit and video data from a bitstream; determining Rice parameters based on the one or more syntax elements; decoding a first codeword and a second codeword of a pixel within the coding unit from the video data; converting the first codeword into a parameter of the pixel according to a predefined mapping relationship generated using the determined Rice parameters; converting the second codeword into a sign value of the parameter; and determining a quantized pixel value of the pixel based on the parameter and the sign value.
[0009] According to a second aspect of this application, an electronic device includes one or more processing units, a memory, and a plurality of programs stored in the memory. When executed by the one or more processing units, the programs cause the electronic device to perform the method for decoding video data as described above.
[0010] According to a third aspect of this application, a non-transitory computer-readable storage medium stores a plurality of programs for execution by an electronic device having one or more processing units. When executed by the one or more processing units, the programs cause the electronic device to perform a method for decoding video data as described above. Attached Figure Description
[0011] The accompanying drawings, included to provide a further understanding of the embodiments and incorporated herein by reference and forming part of the specification, illustrate the described embodiments and, together with the specification, serve to explain the underlying principles. Similar reference numerals denote corresponding parts.
[0012] Figure 1 This is a block diagram illustrating an exemplary video encoding and decoding system according to some embodiments of the present disclosure.
[0013] Figure 2 This is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.
[0014] Figure 3 This is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.
[0015] Figures 4A to 4E This is a block diagram illustrating how a frame is recursively divided into multiple video blocks of different sizes and shapes according to some embodiments of the present disclosure.
[0016] Figures 5A to 5B This is a block diagram illustrating an example of transform coefficient encoding / decoding using context encoding / decoding and bypass encoding / decoding according to some embodiments of the present disclosure.
[0017] Figure 6 This is a block diagram illustrating an exemplary process for dependency scalar quantization according to some embodiments of the present disclosure.
[0018] Figure 7 This is a block diagram illustrating an exemplary state machine for switching between two different scalar quantizers according to some embodiments of the present disclosure.
[0019] Figure 8 This is a flowchart illustrating an exemplary process according to some embodiments of the present disclosure, through which a video decoder performs residual and coefficient encoding / decoding on coded blocks.
[0020] Figure 9 This is a block diagram illustrating an example context-adaptive binary arithmetic codec (CABAC) engine according to some embodiments of the present disclosure. Detailed Implementation
[0021] Reference will now be made in detail to the specific embodiments illustrated in the accompanying drawings. Numerous non-limiting specific details are set forth in the following detailed description to aid in understanding the subject matter presented herein. However, it will be apparent to those skilled in the art that various alternatives may be used without departing from the scope of the claims, and that the subject matter may be practiced without these specific details. For example, it will be apparent to those skilled in the art that the subject matter presented herein can be implemented on many types of electronic devices with digital video capabilities.
[0022] Figure 1 This is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1 As shown, system 10 includes a source device 12 that generates and encodes video data to be decoded by a destination device 14 at a later time. The source device 12 and destination device 14 can include any of a variety of electronic devices, including desktop or laptop computers, tablet computers, smartphones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some embodiments, the source device 12 and destination device 14 are equipped with wireless communication capabilities.
[0023] In some implementations, destination device 14 may receive encoded video data to be decoded via link 16. Link 16 may include any type of communication medium or device capable of moving encoded video data from source device 12 to destination device 14. In one example, link 16 may include a communication medium enabling source device 12 to transmit encoded video data directly to destination device 14 in real time. The encoded video data may be modulated and transmitted to destination device 14 according to communication standards such as wireless communication protocols. The communication medium may include any wireless or wired communication medium, such as radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, wide area network, or global network (such as the Internet). The communication medium may include a router, switch, base station, or any other device that may be used to facilitate communication from source device 12 to destination device 14.
[0024] In some other embodiments, encoded video data can be transferred from output interface 22 to storage device 32. The encoded video data in storage device 32 can then be accessed by destination device 14 via input interface 28. Storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as hard disk drives, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In a further example, storage device 32 may correspond to a file server or another intermediate storage device capable of holding the encoded video data generated by source device 12. Destination device 14 can access the stored video data from storage device 32 via streaming or downloading. The file server can be any type of computer capable of storing encoded video data and transferring it to destination device 14. Exemplary file servers include web servers (e.g., for websites), FTP servers, network attached storage (NAS) devices, or local disk drives. Destination device 14 can access encoded video data via any standard data connection, including wireless channels (e.g., Wi-Fi connections), wired connections (e.g., DSL, cable modems, etc.), or combinations thereof, suitable for accessing encoded video data stored on a file server. Transfer of encoded video data from storage device 32 can be streaming, downloading, or a combination of both.
[0025] like Figure 1 As shown, source device 12 includes a video source 18, a video encoder 20, and an output interface 22. The video source 18 may include sources such as video capture devices, such as cameras, video archives containing previously captured video, video feed interfaces for receiving video from video content providers, and / or computer graphics systems for generating computer graphics data as source video, or combinations of such sources. As an example, if the video source 18 is a camera in a security monitoring system, then source device 12 and destination device 14 can form a camera phone or video phone. However, the embodiments described in this application are generally applicable to video encoding and decoding and can be applied to wireless and / or wired applications.
[0026] Captured, pre-captured, or computer-generated video can be encoded by video encoder 20. The encoded video data can be transmitted directly to destination device 14 via output interface 22 of source device 12. The encoded video data can also (or alternatively) be stored on storage device 32 for later access by destination device 14 or other devices for decoding and / or playback. Output interface 22 may further include a modem and / or transmitter.
[0027] Destination device 14 includes an input interface 28, a video decoder 30, and a display device 34. Input interface 28 may include a receiver and / or a modem, and receives encoded video data via link 16. The encoded video data transmitted via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for video decoder 30 to use in decoding the video data. Such syntax elements may be included within encoded video data transmitted over a communication medium, stored on a storage medium, or stored on a file server.
[0028] In some embodiments, destination device 14 may include display device 34, which may be an integrated display device or an external display device configured to communicate with destination device 14. Display device 34 displays decoded video data to a user and may include any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or another type of display device.
[0029] Video encoder 20 and video decoder 30 can operate according to proprietary or industry standards such as VVC, HEVC, MPEG-4 Part 10, Advanced Video Codec (AVC), or extensions of such standards. It should be understood that this application is not limited to any particular video encoding / decoding standard and can be applied to other video encoding / decoding standards. It is generally contemplated that the video encoder 20 of source device 12 can be configured to encode video data according to any of these current or future standards. Similarly, it is generally contemplated that the video decoder 30 of destination device 14 can be configured to decode video data according to any of these current or future standards.
[0030] The video encoder 20 and video decoder 30 can each be implemented as any of a variety of suitable encoder circuit systems, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When implemented in part in software, the electronic device may store instructions for software in a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the video encoding / decoding operations disclosed in this disclosure. Each of the video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, any one of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device.
[0031] Figure 2This is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in this application. The video encoder 20 can perform intra-frame predictive coding and inter-frame predictive coding on video blocks within a video frame. Intra-frame predictive coding relies on spatial prediction to reduce or remove spatial redundancy of video data within a given video frame or image. Inter-frame predictive coding relies on temporal prediction to reduce or remove temporal redundancy of video data within neighboring video frames or images of a video sequence.
[0032] like Figure 2 As shown, the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a partitioning unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copying (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A deblocking filter (not shown) may be located between the adder 62 and the DPB 64 to filter block boundaries to remove block artifacts from the reconstructed video. In addition to the deblocking filter, a loop filter (not shown) may be used to filter the output of the adder 62. The video encoder 20 may be in the form of fixed or programmable hardware units, or may be partitioned within one or more of the fixed or programmable hardware units illustrated.
[0033] Video data memory 40 can store video data to be encoded by components of video encoder 20. The video data in video data memory 40 can be obtained, for example, from video source 18. DPB 64 is a buffer that stores reference video data for encoding the video data by video encoder 20 (e.g., in intra-frame predictive coding mode or inter-frame predictive coding mode). Video data memory 40 and DPB 64 can be formed from any of a variety of memory devices. In various examples, video data memory 40 can be on-chip along with other components of video encoder 20, or off-chip relative to those components.
[0034] like Figure 2As shown, after receiving video data, the partitioning unit 45 within the prediction processing unit 41 partitions the video data into video blocks. This partitioning may also include dividing the video frame into stripes, tiles, or other larger coding units (CUs) according to a predefined partitioning structure (such as a quadtree structure associated with the video data). A video frame can be partitioned into multiple video blocks (or sets of video blocks referred to as tiles). The prediction processing unit 41 can select one of several possible predictive coding modes for the current video block based on error results (e.g., coding rate and distortion level), such as one of several intra-frame predictive coding modes or one of several inter-frame predictive coding modes. The prediction processing unit 41 can provide the resulting intra-frame or inter-frame predictive coding block to adder 50 to generate a residual block, and to adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides syntax elements such as motion vectors, intra-frame mode indicators, partitioning information, and other such syntax information to the entropy coding unit 56.
[0035] To select an appropriate intra-predictive coding mode for the current video block, the intra-predictive processing unit 46 within the prediction processing unit 41 may perform intra-predictive coding on the current video block relative to one or more neighboring blocks in the same frame as the current block to be encoded / decoded, to provide spatial prediction. The motion estimation unit 42 and motion compensation unit 44 within the prediction processing unit 41 perform inter-predictive coding on the current video block relative to one or more prediction blocks in one or more reference frames, to provide temporal prediction. The video encoder 20 may execute multiple coding channels, for example, to select an appropriate coding mode for each block of video data.
[0036] In some implementations, motion estimation unit 42 determines the inter-frame prediction mode of the current video frame by generating motion vectors based on a predetermined mode within the video frame sequence. These motion vectors indicate the displacement of a prediction unit (PU) of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating motion vectors that estimate the motion of the video block. The motion vectors may, for example, indicate the displacement of a PU of a video block within the current video frame or picture relative to a prediction block (or other encoded unit) within a reference frame, relative to a current block (or other encoded unit) encoded within the current frame. The predetermined mode may designate video frames in the sequence as P-frames or B-frames. Intra-frame BC unit 48 may determine vectors for intra-frame BC coding, such as block vectors, in a manner similar to how motion estimation unit 42 determines motion vectors for inter-frame prediction, or block vectors may be determined using motion estimation unit 42.
[0037] A prediction block is a block of reference frames that is considered to closely match the PU of the video block to be encoded or decoded in terms of pixel differences, which can be determined by the sum of absolute differences (SAD), sum of squared differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 can compute values for sub-integer pixel positions of the reference frame stored in the DPB 64. For example, the video encoder 20 can interpolate values for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, the motion estimation unit 42 can perform motion search relative to full-pixel positions and fractional-pixel positions and output motion vectors with fractional-pixel precision.
[0038] The motion estimation unit 42 calculates the motion vector of the PU in the inter-frame predictive coding frame by comparing the position of the PU with the position of the prediction block of a reference frame selected from a first reference frame list (list 0) or a second reference frame list (list 1), each of which is identified by one or more reference frames stored in the DPB 64. The motion estimation unit 42 sends the calculated motion vector to the motion compensation unit 44, and then to the entropy coding unit 56.
[0039] Motion compensation performed by motion compensation unit 44 may involve acquiring or generating prediction blocks based on motion vectors determined by motion estimation unit 42. After receiving the motion vector of the PU for the current video block, motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, acquire the prediction block from DPB 64, and forward the prediction block to adder 50. Adder 50 then forms a residual video block with pixel differences by subtracting the pixel values of the prediction block provided by motion compensation unit 44 from the pixel values of the encoded current video block. The pixel differences forming the residual video block may include a luminance difference component or a chrominance difference component, or both. Motion compensation unit 44 may also generate syntax elements associated with video blocks of a video frame for use by video decoder 30 when decoding video blocks of a video frame. Syntax elements may include, for example, syntax elements defining motion vectors for identifying prediction blocks, any flags indicating prediction modes, or any other syntax information described herein. Note that motion estimation unit 42 and motion compensation unit 44 may be highly integrated, but are illustrated separately for conceptual purposes.
[0040] In some implementations, the intra-BC unit 48 can generate vectors and acquire prediction blocks in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but wherein the prediction blocks are in the same frame as the current block being encoded, and wherein the vectors are referred to as block vectors relative to the motion vectors. Specifically, the intra-BC unit 48 can determine an intra-prediction mode for encoding the current block. In some examples, the intra-BC unit 48 can encode the current block using various intra-prediction modes, for example, during a separate encoding pass, and test its performance through rate-distortion analysis. Next, the intra-BC unit 48 can select an appropriate intra-prediction mode from the various tested intra-prediction modes to use and generate an intra-mode indicator accordingly. For example, the intra-BC unit 48 can use rate-distortion analysis for various tested intra-prediction modes to calculate rate-distortion values and select the intra-prediction mode with the best rate-distortion characteristics from the tested modes as the appropriate intra-prediction mode to use. Rate-distortion analysis typically determines the amount of distortion (or error) between a coded block and the original uncoded block (which is encoded to produce the coded block), as well as the bit rate (i.e., number of bits) used to produce the coded block. Intra-frame BC unit 48 can calculate the ratio based on the distortion and rate of each coded block to determine which intra-frame prediction mode exhibits the optimal rate-distortion value for the block.
[0041] In other examples, the intra-frame BC unit 48 may use, in whole or in part, the motion estimation unit 42 and the motion compensation unit 44 to perform this function for intra-frame BC prediction according to the embodiments described herein. In any case, for intra-frame block copying, the predicted block may be a block that is considered to closely match the block to be encoded or decoded in terms of pixel differences, which may be determined by the sum of absolute differences (SAD), sum of squared differences (SSD), or other difference metrics, and the identification of the predicted block may include calculating values for sub-integer pixel positions.
[0042] Regardless of whether the prediction block originates from the same frame based on intra-frame prediction or from different frames based on inter-frame prediction, the video encoder 20 can form a residual video block by subtracting the pixel values of the prediction block from the pixel values of the current encoded video block, thereby generating a pixel difference. The pixel difference that forms the residual video block can include luminance component difference and chrominance component difference.
[0043] As described above, the intra-prediction processing unit 46 can perform intra-prediction on the current video block as an alternative to the inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44, or the intra-block copy prediction performed by the intra-BC unit 48. Specifically, the intra-prediction processing unit 46 can determine an intra-prediction mode for encoding the current block. To this end, the intra-prediction processing unit 46 can encode the current block using various intra-prediction modes, for example, during a separate encoding pass, and the intra-prediction processing unit 46 (or, in some examples, a mode selection unit) can select an appropriate intra-prediction mode from the tested intra-prediction modes for use. The intra-prediction processing unit 46 can provide information indicating the selected intra-prediction mode of the block to the entropy coding unit 56. The entropy coding unit 56 can encode the information indicating the selected intra-prediction mode in the bitstream.
[0044] After prediction processing unit 41 determines the prediction block of the current video block via inter-frame prediction or intra-frame prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more transform units (TUs) and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using transforms such as discrete cosine transform (DCT) or conceptually similar transforms.
[0045] The transform processing unit 52 can send the resulting transform coefficients to the quantization unit 54. The quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process can also reduce the bit depth associated with some or all of the coefficients. The degree of quantization can be modified by adjusting the quantization parameters. In some examples, the quantization unit 54 can then perform a scan of the matrix including the quantized transform coefficients. Alternatively, the entropy coding unit 56 can perform the scan.
[0046] After quantization, the entropy coding unit 56 entropy-encodes the quantized transform coefficients into a video bitstream using, for example, context-adaptive variable-length codec (CAVLC), context-adaptive binary arithmetic codec (CABAC), syntax-based context-adaptive binary arithmetic codec (SBAC), probability interval partitioning entropy (PIPE) coding, or other entropy coding methods or techniques. The encoded bitstream can then be transmitted to the video decoder 30 or archived in the storage device 32 for later transmission to or retrieval by the video decoder. The entropy coding unit 56 can also entropy-encode the motion vectors and other syntax elements of the current video frame being encoded.
[0047] The dequantization unit 58 and the inverse transform processing unit 60 apply dequantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain, thereby generating a reference block for predicting other video blocks. As described above, the motion compensation unit 44 can generate motion-compensated prediction blocks from one or more reference blocks of frames stored in the DPB64. The motion compensation unit 44 can also apply one or more interpolation filters to the prediction block to compute sub-integer pixel values for motion estimation.
[0048] Adder 62 adds the reconstructed residual block to the motion-compensated prediction block generated by motion compensation unit 44 to produce a reference block for storage in DPB 64. The reference block can then be used as a prediction block by intra-frame BC unit 48, motion estimation unit 42, and motion compensation unit 44 for inter-frame prediction of another video block in subsequent video frames.
[0049] Figure 3 This is a block diagram illustrating an exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction processing unit 84, and an intra-frame prediction (BC) unit 85. The video decoder 30 can perform operations generally combined with the above. Figure 2 The decoding process is the opposite of the encoding process described for video encoder 20. For example, motion compensation unit 82 can generate prediction data based on motion vectors received from entropy decoding unit 80, while intra-frame prediction unit 84 can generate prediction data based on intra-frame prediction mode indicators received from entropy decoding unit 80.
[0050] In some examples, tasks can be assigned to units of the video decoder 30 to perform embodiments of this application. Similarly, in some examples, embodiments of this disclosure can be divided among one or more units of the video decoder 30. For example, the intra-frame BC unit 85 can perform embodiments of this application alone or in combination with other units of the video decoder 30 (such as the motion compensation unit 82, the intra-frame prediction processing unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra-frame BC unit 85, and the function of the intra-frame BC unit 85 can be performed by other components of the prediction processing unit 81 (such as the motion compensation unit 82).
[0051] Video data memory 79 can store video data, such as encoded video bitstreams, to be decoded by other components of video decoder 30. For example, video data stored in video data memory 79 can be obtained from storage device 32, a local video source (such as a camera), or by transmitting video data via a wired or wireless network or by accessing a physical data storage medium (e.g., a flash drive or hard disk). Video data memory 79 may include an encoded picture buffer (CPB) that stores encoded video data from the encoded video bitstream. Decoded picture buffer (DPB) 92 of video decoder 30 stores reference video data for decoding by video decoder 30 (e.g., in intra-frame predictive coding mode or inter-frame predictive coding mode). Video data memory 79 and DPB 92 can be formed of any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, video data memory 79 and DPB 92 are shown in... Figure 3 The video data memory 79 and DPB 92 are depicted as two distinct components of the video decoder 30. However, it will be apparent to those skilled in the art that the video data memory 79 and DPB 92 may be provided by the same memory device or separate memory devices. In some examples, the video data memory 79 may be on-chip along with other components of the video decoder 30, or off-chip relative to those components.
[0052] During the decoding process, the video decoder 30 receives an encoded video bitstream representing video blocks of encoded video frames and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 performs entropy decoding on the bitstream to generate quantized coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors and other syntax elements to the prediction processing unit 81.
[0053] When a video frame is encoded as an intra-predictive coded (I) frame or used as an intra-coded prediction block in other types of frames, the intra-predictive processing unit 84 of the prediction processing unit 81 can generate prediction data for the video block of the current video frame based on the intra-predictive mode of the signal transmission and reference data from the previous decoded block of the current frame.
[0054] When a video frame is encoded as an inter-frame predictive coded (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks of the video blocks of the current video frame based on the motion vectors and other syntax elements received from the entropy decoding unit 80. Each prediction block can be generated from a reference frame within one of the reference frame lists. The video decoder 30 can construct the reference frame list using the default construction technique based on the reference frames stored in the DPB 92: list 0 and list 1.
[0055] In some examples, when a video block is encoded or decoded according to the intra-BC mode described herein, the intra-BC unit 85 of the prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from the entropy decoding unit 80. The prediction block may lie within the reconstructed region of the same image as the current video block defined by the video encoder 20.
[0056] Motion compensation unit 82 and / or intra-frame prediction (BC) unit 85 determine prediction information for video blocks in the current video frame by parsing motion vectors and other syntax elements, and then use the prediction information to generate prediction blocks for the decoded current video blocks. For example, motion compensation unit 82 uses some of the received syntax elements to determine the prediction mode (e.g., intra-frame prediction or inter-frame prediction) used to encode video blocks in the video frame, the inter-frame prediction frame type (e.g., B or P), the construction information of one or more reference frame lists in the frame's reference frame list, the motion vectors of each inter-frame prediction encoded video block in the frame, the inter-frame prediction state of each inter-frame prediction encoded video block in the frame, and other information for decoding video blocks in the current video frame.
[0057] Similarly, the intra-BC unit 85 can use some of the received syntax elements (e.g., flags) to determine whether the current video block was predicted using the following: the intra-BC mode, construction information about the video block of the frame being within the reconstructed region and to be stored in the DPB 92, the block vector of each intra-BC predicted video block of the frame, the intra-BC prediction state of each intra-BC predicted video block of the frame, and other information for decoding the video block in the current video frame.
[0058] The motion compensation unit 82 can also perform interpolation using an interpolation filter to calculate interpolated values for sub-integer pixels of the reference block, as used by the video encoder 20 during encoding of video blocks. In this case, the motion compensation unit 82 can determine the interpolation filter used by the video encoder 20 from the received syntax elements and use the interpolation filter to generate the prediction block.
[0059] The dequantization unit 86 dequantizes the transform coefficients, which are provided in the bitstream and entropy decoded by the entropy decoding unit 80, using the same quantization parameters calculated by the video encoder 20 for each video block in the video frame to determine the degree of quantization. The inverse transform processing unit 88 applies an inverse transform (e.g., inverse DCT, inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.
[0060] After the motion compensation unit 82 or the intra-frame BC unit 85 generates a prediction block for the current video block based on vectors and other syntax elements, the adder 90 reconstructs the decoded video block of the current video block by summing the residual block from the inverse transform processing unit 88 and the corresponding prediction block generated by the motion compensation unit 82 and the intra-frame BC unit 85. A loop filter (not shown) may be positioned between the adder 90 and the DPB 92 to further process the decoded video block. The decoded video block in a given frame is then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a separate memory device may also store the decoded video for later presentation, such as... Figure 1 Display devices such as 34.
[0061] In a typical video encoding and decoding process, a video sequence typically consists of an ordered set of frames or images. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of chroma samples (Cb). SCr is a two-dimensional array of chroma samples (Cr). In other instances, a frame may be monochromatic and therefore consist of only a two-dimensional array of luma samples.
[0062] like Figure 4A As shown, the video encoder 20 (or more specifically, the partitioning unit 45) generates an encoded representation of a frame by first dividing the frame into a set of coding tree units (CTUs). A video frame may include an integer number of CTUs ordered consecutively from left to right and from top to bottom in raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in the sequence parameter set such that all CTUs in the video sequence have the same size, namely one of 128 × 128, 64 × 64, 32 × 32, and 16 × 16. However, it should be noted that this application is not limited to a specific size. Figure 4BAs shown, each CTU may include a coding tree block (CTB) for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements for encoding the samples of the coding tree blocks. The syntax elements describe the attributes of different types of units within the coding block of pixels and how the video sequence can be reconstructed at the video decoder 30. These syntax elements include inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors, and other parameters. In monochrome images or images with three separate color planes, the CTU may include a single coding tree block and syntax elements for encoding the samples of the coding tree block. The coding tree block may be an N × N sample block.
[0063] To achieve better performance, the video encoder 20 can recursively perform tree partitioning on the coding tree blocks of the CTU, such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination of both, and divide the CTU into smaller coding units (CUs). For example... Figure 4C The diagram depicts the 64 × 64 CTU 400 first divided into four smaller CUs, each with a block size of 32 × 32. Of these four smaller CUs, CU 410 and CU 420 are each divided into four 16 × 16 CUs. The two 16 × 16 CUs, 430 and 440, are each further divided into four 8 × 8 CUs. Figure 4D The illustration depicts, as shown in the diagram. Figure 4C The final result of the partitioning process of the CTU 400 described in the figure is a quadtree data structure, where each leaf node of the quadtree corresponds to a CU with a corresponding size ranging from 32 × 32 to 8 × 8. Similar to... Figure 4B The depicted CTU (Color Unit) may include a coded block (CB) of luma samples and two corresponding coded blocks of chroma samples of the same size frame, as well as syntax elements for encoding the samples of the coded blocks. In a monochrome image or an image with three separate color planes, the CU may include a single coded block and a syntax structure for encoding the samples of the coded block. It should be noted that... Figure 4C and Figure 4D The quadtree partitioning depicted is for illustrative purposes only, and a CTU can be partitioned into multiple CUs to accommodate different local characteristics based on quadtree / ternary / binary tree partitioning. In a multi-type tree structure, a CTU is partitioned by a quadtree structure, and each quadtree leaf CU can be further partitioned by a binary or ternary tree structure. Figure 4E As shown, there are five partition types: quadrilateral partition, horizontal binary partition, vertical binary partition, horizontal ternary partition, and vertical ternary partition.
[0064] In some implementations, the video encoder 20 may further divide the coded blocks of the CU into one or more M×N prediction blocks (PBs). A prediction block is a rectangular (square or non-square) block of samples for which the same prediction (inter-frame or intra-frame) is applied. A prediction unit (PU) of the CU may include a prediction block for luma samples, two corresponding prediction blocks for chroma samples, and syntax elements for predicting the prediction blocks. In a monochrome image or an image with three separate color planes, a PU may include a single prediction block and a syntax structure for predicting the prediction blocks. The video encoder 20 may generate predicted luma, Cb, and Cr blocks for each PU of the CU.
[0065] Video encoder 20 can generate prediction blocks for the PU using intra-frame prediction or inter-frame prediction. If video encoder 20 uses intra-frame prediction to generate prediction blocks for the PU, it can generate the prediction blocks for the PU based on decoded samples of the frame associated with the PU. If video encoder 20 uses inter-frame prediction to generate prediction blocks for the PU, it can generate the prediction blocks for the PU based on decoded samples of one or more frames other than the frame associated with the PU.
[0066] After the video encoder 20 generates predicted luminance, Cb, and Cr blocks for one or more PUs of the CU, the video encoder 20 can generate a luminance residual block of the CU by subtracting the predicted luminance block of the CU from its original luminance coding block, such that each sample in the luminance residual block of the CU indicates the difference between a luminance sample in one of the predicted luminance blocks of the CU and a corresponding sample in the original luminance coding block of the CU. Similarly, the video encoder 20 can generate Cb residual blocks and Cr residual blocks of the CU, respectively, such that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU indicates the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.
[0067] In addition, such as Figure 4CAs illustrated, the video encoder 20 can use quadtree partitioning to decompose the luminance, Cb, and Cr residual blocks of the CU into one or more luminance, Cb, and Cr transform blocks. A transform block is a rectangular (square or non-square) block of samples to which the same transform is applied. A transform unit (TU) of the CU can include a transform block for luminance samples, two corresponding transform blocks for chrominance samples, and syntax elements for transforming the samples in the transform blocks. Therefore, each TU of the CU can be associated with a luminance transform block, a Cb transform block, and a Cr transform block. In some examples, the luminance transform block associated with a TU can be a sub-block of the CU's luminance residual block. A Cb transform block can be a sub-block of the CU's Cb residual block. A Cr transform block can be a sub-block of the CU's Cr residual block. In a monochrome image or an image with three separate color planes, a TU can include a single transform block and syntax structures for transforming the samples in the transform block.
[0068] The video encoder 20 can apply one or more transforms to the luminance transform block of the TU to generate a luminance coefficient block of the TU. The coefficient block can be a two-dimensional array of transform coefficients. The transform coefficients can be scalars. The video encoder 20 can apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block of the TU. The video encoder 20 can apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block of the TU.
[0069] After generating coefficient blocks (e.g., luminance coefficient blocks, Cb coefficient blocks, or Cr coefficient blocks), video encoder 20 can quantize the coefficient blocks. Quantization typically refers to the process of quantizing transform coefficients to reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After quantizing the coefficient blocks, video encoder 20 can entropy-encode the syntax elements indicating the quantized transform coefficients. For example, video encoder 20 can perform context-adaptive binary arithmetic encoding / decoding (CABAC) on the syntax elements indicating the quantized transform coefficients. Finally, video encoder 20 can output a bitstream comprising a bit sequence that forms a representation of coded frames and associated data, which is stored in storage device 32 or transmitted to destination device 14.
[0070] After receiving the bitstream generated by the video encoder 20, the video decoder 30 can parse the bitstream to obtain syntax elements from it. The video decoder 30 can reconstruct frames of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing the video data is generally the reverse of the encoding process performed by the video encoder 20. For example, the video decoder 30 can perform an inverse transform on the coefficient block associated with the TU of the current CU to reconstruct the residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coded blocks of the current CU by adding samples of the prediction block of the PU of the current CU to the corresponding samples of the transform block of the TU of the current CU. After reconstructing the coded blocks of each CU of the frame, the video decoder 30 can reconstruct the frame.
[0071] As mentioned above, video encoding and decoding primarily use two modes: intra-frame prediction and inter-frame prediction to achieve video compression. Palette-based encoding and decoding is another encoding and decoding scheme adopted by many video encoding and decoding standards. In palette-based encoding and decoding, which may be particularly suitable for encoding and decoding screen-generated content, the video codec (e.g., video encoder 20 or video decoder 30) forms a palette table representing the colors of a given block of video data. The palette table includes the most prominent (e.g., frequently used) pixel values in a given block. Pixel values that are not frequently represented in the video data of a given block are not included in the palette table, or are included as escape colors in the palette table.
[0072] Each entry in the palette table includes an index to the corresponding pixel value in the palette table. The palette indices of samples within a block can be encoded and decoded to indicate which entry in the palette table should be used to predict or reconstruct which sample. A palette pattern begins with the process of generating palette predictions for the first block of another such grouping of pictures, strips, tiles, or video blocks. As will be explained below, palette predictions for subsequent video blocks are typically generated by updating previously used palette predictions. For illustrative purposes, it is assumed that palette predictions are defined at the picture level. In other words, a picture may include multiple coded blocks, each with its own palette table, but there is one palette prediction for the entire picture.
[0073] To reduce the number of bits required to transmit palette entries in the video bitstream, the video decoder can use palette prediction values to determine new palette entries in the palette table for reconstructing video blocks. For example, palette prediction values can include palette entries from previously used palette tables, or can even be initialized with the most recently used palette table by including all entries from the most recently used palette table. In some implementations, palette prediction values can include fewer than all entries from the most recently used palette table, and then combine some entries from other previously used palette tables. Palette prediction values can have the same size as the palette table used to encode different blocks, or they can be larger or smaller than the palette table used to encode different blocks. In one example, the palette prediction values are implemented as a first-in-first-out (FIFO) table comprising 64 palette entries.
[0074] To generate a palette table for video data blocks from palette prediction values, the video decoder can receive a one-bit flag for each entry of the palette prediction values from the encoded video bitstream. The one-bit flag may have a first value (e.g., binary 1) indicating that the associated entry of the palette prediction value will be included in the palette table, or a second value (e.g., binary 0) indicating that the associated entry of the palette prediction value will not be included in the palette table. If the size of the palette prediction values is larger than the palette table used for the video data blocks, the video decoder may stop receiving more flags once the maximum size of the palette table is reached.
[0075] In some implementations, some entries in the palette table can be directly signaled in the encoded video bitstream, rather than determined using palette prediction values. For such entries, the video decoder can receive three separate m-bit values from the encoded video bitstream, each m-bit value indicating the pixel value of the luminance and two chrominance components associated with the entry, where m represents the bit depth of the video data. Compared to the multiple m-bit values required for directly signaling palette entries, those palette entries derived from palette prediction values require only one bit of flag. Therefore, signaling some or all palette entries using palette prediction values can significantly reduce the number of bits required to signal new palette table entries, thereby improving the overall encoding / decoding efficiency of palette pattern encoding / decoding.
[0076] In many instances, the palette prediction value for a block is determined based on a palette table used to encode one or more previously encoded blocks. However, when encoding the first coding tree unit in a picture, strip, or tile, the palette table for previously encoded blocks may be unavailable. Therefore, entries from previously used palette tables cannot be used to generate the palette prediction value. In this case, a sequence of palette prediction value initializers can be signaled in the Sequence Parameter Set (SPS) and / or Picture Parameter Set (PPS), the initializers being values used to generate the palette prediction value when the previously used palette table is unavailable. The SPS generally refers to the grammatical structure of the syntax elements applied to a series of consecutive encoded video pictures called a Coded Video Sequence (CVS), as determined by the content of the syntax elements found in the PPS, which is referenced by syntax elements found in the header of each strip segment. The PPS generally refers to the grammatical structure of the syntax elements applied to one or more individual pictures within a CVS, as determined by syntax elements found in the header of each strip segment. Therefore, SPS is generally considered to be a higher-level grammatical structure than PPS, which means that the grammatical elements included in SPS generally change less frequently and are applied to a larger portion of the video data compared to those included in PPS.
[0077] Figures 5A to 5B This is a block diagram illustrating an example of transform coefficient encoding / decoding using context encoding / decoding and bypass encoding / decoding according to some embodiments of the present disclosure.
[0078] Transform coefficient encoding and decoding in VVC is similar to that in HEVC because they both use non-overlapping coefficient groups (also called CGs or sub-blocks). However, there are some differences between the two schemes. In HEVC, the size of each CG of a coefficient is fixed at 4 × 4. In VVC draft 6, the CG size becomes dependent on the size of the TB. Therefore, various CG sizes are provided in VVC (1 × 16, 2 × 8, 8 × 2, 2 × 4, 4 × 2, and 16 × 1). CGs within a coded block and transform coefficients within a CG are encoded according to a predefined scan order.
[0079] To limit the maximum number of context codec bits (CCB) per pixel, the maximum number of CCB bits per TB is obtained using the area of the TB and the type of video components (i.e., luma and chroma components). In some embodiments, the maximum number of context codec bits is equal to... .here, TB_zosize This represents the number of samples within TB after the coefficients are reduced to zero. Note that... coded_sub_block_flag It is a flag indicating whether CG contains non-zero coefficients; it is not considered for CCB counts.
[0080] Coefficient zeroing is an operation performed on a transform block to force coefficients located in a specific region of the transform block to be set to zero. For example, in the current VVC, 64 × 64 TB has an associated zeroing operation. Therefore, transform coefficients located outside the 32 × 32 region at the top left of the 64 × 64 TB are forced to zero. In fact, in the current VVC, for any transform block with a size exceeding 32 along a certain dimension, a coefficient zeroing operation is performed along that dimension to force coefficients located outside the 32 × 32 region at the top left to be zero.
[0081] In VVC transform coefficient encoding and decoding, the variable `remBinsPass1` is initially set to the maximum number of allowed context codec bits (MCCB). During the encoding and decoding process, the variable is decremented by one each time context codec bits are transmitted using a signal. When `remBinsPass1` is greater than or equal to four, it is used by including... 、 、 and The syntax elements, including the coefficients, are transmitted using signals. In the first pass, all these syntax elements use binary bits encoded in context. The remaining level information of the coefficients is transmitted through the syntax elements in the second pass using binary bits encoded in Golomb-Rice code and bypass encoding. abs_remainder Encoding and decoding are performed. When remBinsPass1 becomes less than four during the first pass of encoding and decoding, the current coefficient is not encoded and decoded in the first pass, but instead, it is encoded and decoded in the second pass using Golomb-Rice codes and the binary bits of the bypass encoding and decoding through the syntax elements. dec_ abs_level Direct encoding and decoding. After all the above levels of encoding and decoding, the sign of all scan positions where sig_coeff_flag equals one ( sign_flag Ultimately, it is encoded and decoded into bypass binary bits. This process occurs in... Figure 5A The description is performed within this process. remBinsPass1 is reset for each TB. sig_coeff_flag, abs_level_gt1_flag, par_level_flag and abs_level_gt3_flag The transition from using context-coded bits to using bypass-coded bits for the remaining coefficients occurs at most once per TB. For a coefficient subblock, if remBinsPass1 is less than 4 before its first coefficient is encoded, the entire coefficient subblock is encoded using bypass-coded bits.
[0082] Unlike HEVC, which uses a single residual codec scheme to encode and decode both transform coefficients and transform skip coefficients, VVC uses two separate residual codec schemes for transform coefficients and transform skip coefficients (i.e., residuals).
[0083] For example, it was observed that the statistical properties of the residuals in the transform skip mode differed from those of the transform coefficients, and there was no energy compaction around the low-frequency components. The residual encoding / decoding was modified to account for the different signal characteristics of the (spatial) transform skip residuals, including: (1) There is no signal for the final x / y position; (2) When all previous flags are equal to 0, encode and decode each sub-block except the DC sub-block. coded_ sub_block_flag ; (3) Having two adjacent coefficients sig_coeff_flag Context modeling; (4) Using only one context model par_level_flag_ ; (5) Add a symbol greater than 5, 7, or 9; (6) Derivation of rice parameters for remaining binarization modifications; (7) The context modeling of the symbol flag is determined based on the adjacent coefficient values on the left and above, and the symbol flag is parsed after sig_coeff_flag holds all the binary bits of the context encoding together; like Figure 5B As shown, syntax elements sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_flag The first pass uses an interleaving encoding / decoding method from one residual sample to another, followed by the second pass. abs_level_gtX_flag Bit plane, and abs_remainder encoding and decoding in the third pass.
[0084] First time: sig_coeff_flag, coeff_sign_flag, abs_level_gt1_flag, par_level_ flag Second time: abs_level_gt3_flag, abs_level_gt5_flag, abs_level_gt7_flag, abs_ level_gt9_flag 3rd time: abs_remainder Figure 6 This is a block diagram illustrating an exemplary process for dependency scalar quantization according to some embodiments of the present disclosure.
[0085] In the current VVC, the maximum QP value has been expanded from 51 to 63, and the initial QP signal transmission has also changed accordingly. When... slice_qp_delta When encoding and decoding non-zero values, modifications can be made at the stripe segmentation layer. SliceQpYThe initial value is . For transform skip blocks, the minimum allowed QP is defined as four, because when QP equals one, the quantization step size becomes one.
[0086] Furthermore, the scalar quantization used in HEVC employs a new concept called "dependent scalar quantization." Dependent scalar quantization is a method where a set of allowable reconstructed values of transform coefficients depends on the values of transform coefficient levels preceding the current transform coefficient level in the reconstruction order. Compared to traditional independent scalar quantization used in HEVC, the allowable reconstructed vectors are denser in an N-dimensional vector space (where N represents the number of transform coefficients in the transform block). That is, for a given average number of allowable reconstructed vectors per N-dimensional unit volume, the average distortion between the input vector and the nearest reconstructed vector is reduced. The dependent scalar quantization method is implemented by: (a) defining two scalar quantizers with different reconstruction levels, and (b) defining a procedure for switching between these two scalar quantizers.
[0087] The two scalar quantizers used are as follows: Figure 6 The figures are represented by Q0 and Q1. The available reconstruction levels are determined by the quantization step size. Uniquely specified. The scalar quantizer (Q0 or Q1) used is not explicitly transmitted as a signal in the bitstream. Instead, the quantizer used for the current transform coefficient is determined by the parity of the transform coefficient levels preceding the current transform coefficient in the encoding / decoding or reconstruction order.
[0088] Figure 7 This is a block diagram illustrating an exemplary state machine for switching between two different scalar quantizers according to some embodiments of the present disclosure.
[0089] like Figure 7 As shown, the switching between these two scalar quantizers (Q0 and Q1) is implemented via a state machine with four quantizer states (QState). QState can take four distinct values: 0, 1, 2, and 3. It is uniquely determined by the parity of the transform coefficient levels preceding the current transform coefficient in the encoding / decoding / reconstruction order. At the start of dequantization of the transform block, the state is set to 0. The transform coefficients are reconstructed in scan order (i.e., the same order in which they were entropy-decoded). After the current transform coefficient is reconstructed, the state is updated, as shown... Figure 7 As shown, k represents the value of the transformation coefficient level.
[0090] It also supports signal transmission of default and user-defined scaling matrices. In DEFAULT mode, the scaling matrices are flat, with all TB-sized elements equal to 16. IBC and intra-frame codec modes currently share the same scaling matrix. Therefore, for the USER_DEFINED matrix, MatrixType and MatrixType_DC The quantities are updated as follows: MatrixType 30 = 2 (2 for intra-frame and IBC / inter-frame) × 3 (Y / Cb / Cr components) × 5 (square TB size: luminance from 4 × 4 to 64 × 64, chrominance from 2 × 2 to 32 × 32) MatrixType_DC : 14 = 2 (2 for intra-frame and IBC / inter-frame × 1 for Y component) × 3 (TB size: 16×16, 32×32, 64×64) + 4 (2 for intra-frame and IBC / inter-frame × 2 for Cb / Cr component) × 2 (TB size: 16×16, 32×32) DC values are encoded and decoded for the following scaling matrices: 16 × 16, 32 × 32, and 64 × 64. For TBs smaller than 8 × 8, all elements of a scaling matrix are transmitted as signals. If the TB is larger than or equal to 8 × 8, only 64 elements of an 8 × 8 scaling matrix are transmitted as the basic scaling matrix. To obtain a square matrix larger than 8 × 8, the 8 × 8 basic scaling matrix is upsampled (by element-wise copying) to the corresponding square size (i.e., 16 × 16, 32 × 32, 64 × 64). When zeroing is applied to the high-frequency coefficients of the 64-point transform, the corresponding high frequencies of the scaling matrix are also zeroed. That is, if the width or height of the TB is greater than or equal to 32, only the coefficients of the left or upper half are retained, and the remaining coefficients are assigned zero. Furthermore, the number of elements transmitted by signal for a 64 × 64 scaling matrix is reduced from 8 × 8 to three 4 × 4 submatrices, because the 4 × 4 elements in the bottom right corner are never used.
[0091] The choice of the probabilistic model for the grammatical element associated with the absolute value of the transform coefficient level depends on the value of the absolute level in the local neighborhood or the absolute level of the partially reconstructed part.
[0092] The chosen probabilistic model depends on the sum of the absolute levels (or the partially reconstructed absolute levels) in the local neighborhood and the number of absolute levels greater than 0 in the local neighborhood (from 1 to 0). sig_coeff_flags The number is given. Context modeling and binarization depend on the following metrics of the local neighborhood: • numSig: The number of non-zero levels in the local neighborhood; • sumAbs1: The sum of the absolute levels of the partial reconstructions after the first pass in the local neighborhood (absLevel1). • sumAbs: The sum of the absolute levels of reconstructions in the local neighborhood. • Diagonal position (d): The sum of the horizontal and vertical coordinates of the current scan position within the transform block. based on numSig, sumAbs1 And the value of d, choose to use for sig_coeff_flag, abs_level_gt1_ flag, par_level_flag and abs_level_gt3_flag A probabilistic model for encoding and decoding. Based on sumAbs and numSig Value selection for binarization abs_remainder and dec_abs_level The Rice parameter.
[0093] In the current VVC, the Simplified 32-point MTS (also known as RMTS32) is based on skipping high-frequency coefficients and is used to reduce the computational complexity of 32-point DST-7 / DCT-8. Furthermore, it is accompanied by changes in coefficient encoding and decoding, including all types of zeroing (i.e., the existing zeroing of high-frequency components in RMTS32 and DCT2). Specifically, the binarization of the last non-zero coefficient position encoding and decoding is based on a reduced TU size, and the context model selection for the last non-zero coefficient position encoding and decoding is determined by the original TU size. Additionally, 60 context models are used for the transform coefficients. sig_coeff_flag Encoding and decoding are performed. The selection of the context model index is based on the sum of the absolute levels of the five largest previous part reconstructions (called...). locSumAbsPass1 And the dependency quantization state QState, as shown below: if cIdx If it equals 0, then ctxInc The following is obtained:
[0094] Otherwise (cIdx is greater than 0), ctxInc is obtained as follows:
[0095] Figure 8 This is a flowchart 800 illustrating an exemplary process according to some embodiments of the present disclosure, through which a video decoder performs residual and coefficient encoding / decoding on coded blocks.
[0096] In VVC, when encoding and decoding coefficients (e.g., for transform skip mode coded blocks) or residuals (e.g., for transform mode coded blocks), a uniform rice parameter ( RicePara Derivation for signal transmission abs_remainder and dec_abs_level The syntax. The only difference is for abs_remainder and dec_abs_level Encoding and decoding, basic level baseLevel They are set to 4 and 0 respectively. The Rice parameter is determined not only based on the sum of the absolute levels of the five adjacent transform coefficients in the local template, but also on the corresponding base level, as follows:
[0097] In other words, syntax elements abs_remainder and dec_abs_level The binary codeword is adaptively determined based on the level information of adjacent coefficients. Since this codeword determination is performed on a per-sample basis, additional logic is required to handle the adaptation of the codeword to coefficient or residual encoding / decoding.
[0098] Similarly, when encoding and decoding residual blocks in transform skip mode, syntax elements abs_remainder The binary codeword is adaptively determined based on the level information of adjacent residual samples.
[0099] Furthermore, when encoding or decoding syntax elements related to residual encoding / decoding or transform coefficient encoding / decoding, the choice of probabilistic model depends on the level information of adjacent levels, which requires additional logic and additional context models.
[0100] This disclosure proposes several residual and coefficient decoding processes to address the aforementioned problems and improve encoding and decoding efficiency.
[0101] In some embodiments, the video codec uses a variable set of binary codewords to encode and decode certain syntax elements during residual or transform coefficient encoding and decoding, such as abs_remainder The video codec selects a specific set of binary codewords based on certain other coding information for the current block, such as the quantization parameters (QP) of the transform block / coded block, stripe, sequence, CTU, CU, etc., the prediction mode of the CU (e.g., IBC mode, intra-frame or inter-frame), or the stripe type (e.g., I-strip, P-strip, or B-strip). The video codec can obtain a variable set of binary codewords using one of the exemplary methods listed below: 1. Use the same methods as those currently used in VVC for determining... abs_remainder The process of encoding characters, but using different rice parameters.
[0102] 2. k-order exponential Columbus binarization process (EGk) 3. Finite k-order exponential Columbus binarization In these exemplary methods, the video codec can use different Rice parameter values to obtain different sets of binary codewords for residual or transform coefficient encoding and decoding. In some embodiments, for a given residual sample block, the Rice parameter value is based on the representation as... QP CU The CU QP is used for determination, rather than adjacent level information. A specific example is shown in Table 1 below, where... TH1 arrive TH4 It is to satisfy ( TH1 <TH2<TH3<Th4 The predefined threshold of ), where, K0 arrive K4 These are predefined Rice parameter values. It's worth noting that the same logic can be implemented differently in practice. For example, the same rice parameter can also be obtained from the QP value of the current CU using certain equations or lookup tables, as shown in Table 1. In other words, the QP value here serves the dual purpose of defining the quantization level and determining the Rice parameter.
[0103]
[0104] Note that the Rice parameter set and corresponding thresholds can be a complete set or a subset of all Rice parameters and corresponding thresholds associated with the codeword determination of the syntax elements. The Rice parameter set and corresponding thresholds can be signaled at different levels in the video bitstream. For example, they can be signaled at the sequence level (e.g., sequence parameter set), picture level (e.g., picture parameter set), stripe level (e.g., stripe header), coding tree unit (CTU) level, or coding unit (CU) level.
[0105] In one example, it is used to determine the values used in transform skip residual encoding and decoding. abs_remainder The Rice parameter of the codeword used to encode and decode syntax elements is itself transmitted via signaling in the stripe header, PPS header, and / or SPS header. When a CU is encoded and decoded in transform skip mode and the CU is associated with the aforementioned stripe header / PPS / SPS, the signaled Rice parameter is used to determine the parameters used for encoding and decoding. Syntax abs_remainder The codewords used for encoding and decoding. In some embodiments, a larger Rice parameter value results in a more uniform distribution of codeword length.
[0106] In some embodiments, the video codec uses codewords associated with syntax elements encoded and / or encoded with transform coefficients and / or transformed skip residuals to determine the associated parameter set and corresponding thresholds. Furthermore, the video codec may use different sets depending on whether the current block contains luminance residuals / coefficients or chrominance residuals / coefficients. When syntax elements are encoded and decoded via an entropy codec (e.g., arithmetic codec), the determined codewords are used as binarized codewords.
[0107] For example, it is associated with the transform residual encoding / decoding used in current VVC. abs_remainder The codewords are used for both luma and chroma blocks. To improve the encoding and decoding process, video codecs can use different fixed Rice parameters for luma and chroma blocks respectively (e.g., ...). K1 Used for brightness blocks K2 Used for chroma blocks, where K1 and K2 (It is an integer).
[0108] In some embodiments, a set of parameter values (e.g.,) are associated with the codeword determination of syntax elements in transform coefficient encoding / decoding and / or transform skip residual encoding / decoding. K1-K4 ) and / or thresholds (e.g., TH1-TH4 In a bitstream, signals are used for transmission, and for luma and chroma blocks, different sets of parameter values can be transmitted using signals (e.g., K1-K4 ) and / or thresholds (e.g., TH1-TH4 When syntax elements are encoded or decoded using an entropy codec (e.g., an arithmetic codec), the determined codewords are used as binarized codewords.
[0109] To implement the improved process described above for residual / coefficient decoding, the video decoder 30 first receives one or more syntax elements corresponding to the coding unit and video data from the bitstream (810). Next, the video codec 30 determines the Rice parameter value based on one or more syntax elements (820).
[0110] In some embodiments, the video decoder 30 determines the Rice parameter value based on information included in the coded block (e.g., one or more syntax elements). For example, one or more syntax elements include a quantization parameter (QP), and the video codec determines the QP (e.g., ...) ) and a set of thresholds (e.g., TH1-TH4 The comparison is performed, and each threshold has candidate Rice parameter values (e.g., K0-K4 The video codec determines a pair of thresholds that cover the quantization parameters (e.g., Between TH1 and TH2 (between), and then the Rice parameter value is determined as one of the two candidate Rice parameters corresponding to the above threshold pair. In some embodiments, positive infinity and negative infinity are also considered implicit thresholds.
[0111] In some embodiments, the set of thresholds and associated candidate Rice parameter values are constant (e.g., predetermined) values stored in the memory of the video decoder 30. In other words, instead of receiving these values from the bitstream, the video decoder 30 determines these values based on the encoding / decoding specifications. The video decoder 30 then determines the Rice parameter values based on the logic described in Table 1.
[0112] In some embodiments, the set of thresholds and associated candidate Rice parameter values are variables carried in one or more syntax elements of the bitstream. The video decoder 30 then determines these values based on information in the bitstream. For example, the video decoder 30 receives from the bitstream... K1-K4 The value and TH1-TH4 The value of the Rice parameter is then determined by the video decoder 30 based on the logic described in Table 1.
[0113] In some embodiments, one or more syntax elements include the Rice parameter value itself. Therefore, the video decoder 30 receives the Rice parameter value directly from the bitstream. The Rice parameter value can be 1, 2, 3, or other constant values selected by the video encoder 20, for example, based on rate-distortion analysis. Therefore, the video decoder 30 discards the process described in Table 1 because the Rice parameter value is transmitted directly as a signal in the bitstream.
[0114] The video decoder 30 then decodes the first and second codewords (830) of the pixels within the coding unit from the video data. For example, the video decoder 30 converts the first codeword into the pixel parameters based on a predefined mapping relationship generated using previously determined Rice parameter values (e.g., abs_remainder (840). The video decoder 30 converts the second codeword into a sign value of the parameter (850). The video decoder 30 determines the quantized pixel value of the pixel based on the parameter and the sign value (860).
[0115] In some embodiments, the video decoder 30 uses different syntax elements (e.g., Rice parameters) to decode the luma and chroma components of the coding unit. For example, one or more syntax elements further include a first subset of syntax elements associated with a first component (e.g., luma) of the coding unit and a second subset of syntax elements associated with a second component (e.g., chroma) of the coding unit. Therefore, the video codec uses different Rice parameter values and different thresholds (e.g., a set of...) for the luma and chroma components. K1-K4 and TH1-TH4 For the luminance component, a different set of... K1-K4 and TH1-TH4 For the first chromaticity component, and a different set of K1-K4 and TH1-TH4(For the second chromaticity component). These different Rice parameter values and thresholds can be determined based on the process described above (e.g., they can be predetermined or transmitted as signals directly or indirectly in the bitstream via QP values).
[0116] In some embodiments, there is at least one difference between a first subset of syntax elements associated with a first component (e.g., luminance) of the coding unit and a second subset of syntax elements associated with a second component (e.g., chroma) of the coding unit.
[0117] In some embodiments, one or more syntax elements are signaled at a level selected from the group consisting of: sequences, pictures, stripes, tiles, CTUs, CUs, transform units (TUs), and transform blocks (TBs). For example, once the video decoder 30 determines the Rice parameter values and / or thresholds for a particular level, all coding units at or below that level share the same determined Rice parameter values and / or thresholds for decoding.
[0118] In some embodiments, the first codeword is associated with the encoding and decoding of the transform coefficients of the pixels in the encoding unit (e.g., when the encoding unit is encoded using a transform mode).
[0119] In some embodiments, when the coding unit is a transform skip mode coding unit, the video decoder 30 decodes the first set of codewords for the pixels within the transform skip mode coding unit from the video data. Next, the video codec obtains the initial level value from the first set of codewords; and obtains the quantization residual of the pixel from the parameters, sign value, and initial level value.
[0120] In some alternative embodiments, the first codeword is associated with the encoding and decoding of the residual of the pixel in the encoding unit (e.g., when the encoding unit is encoded using a transform skip mode).
[0121] In some embodiments, the predefined mapping relationships are in the form of a lookup table (e.g., as shown in Table 1).
[0122] In some embodiments, the video decoder 30 generates a predefined mapping by performing the following steps: calculating a binarization parameter using a determined Rice parameter; determining a prefix value and an optional suffix value for a codeword for one of a set of candidate remainders using the binarization parameter; and repeating the determination step for a different candidate remainder in the set of candidate remainders until the last candidate remainder in the set of candidate remainders is determined.
[0123] In some embodiments, the prefix value of the codeword is determined using a truncated Rice binarization process.
[0124] In some embodiments, the suffix value of the codeword is determined when the prefix value is equal to a bit string of length 6 with all bits equal to 1.
[0125] Figure 9 This is a block diagram illustrating an example context-adaptive binary arithmetic codec (CABAC) engine according to some embodiments of the present disclosure.
[0126] Context-Adaptive Binary Arithmetic Codec (CABAC) is an entropy coding form used in many video codec standards, such as H.264 / MPEG-4 AVC, High Efficiency Video Codec (HEVC), and VVC. CABAC is based on arithmetic codec with several modifications to adapt it to the needs of video codec standards. For example, CABAC encodes and decodes binary symbols, thus maintaining low complexity and allowing probabilistic modeling of more frequently used bits for any symbol. The probabilistic model is based on locally context-adaptive selection, allowing for better probabilistic modeling because the codec patterns are generally well-correlated locally. Finally, CABAC uses multiplication-free range partitioning by employing quantized probability ranges and probability states.
[0127] CABAC employs multiple probability models for different contexts. First, CABAC converts all non-binary symbols to binary. Then, for each binary bit (also called a byte), the codec selects the probability model to use and optimizes the probability estimate using information from nearby elements. Finally, arithmetic encoding and decoding are applied to compress the data.
[0128] Context modeling provides estimates of the conditional probabilities of encoded and decoded symbols. Using a suitable context model, given inter-symbol redundancy can be utilized by switching between different probability models based on already encoded and decoded symbols near the current symbol to be encoded. Encoding and decoding data symbols involves the following stages.
[0129] Binarization CABAC uses binary arithmetic encoding and decoding, meaning that only binary decisions (1 or 0) are encoded. Before arithmetic encoding and decoding, non-binary value symbols (such as transform coefficients or motion vectors) are "binarized" or converted into binary code. This process is similar to converting data symbols into variable-length code, but the binary code is further encoded (by the arithmetic codec) before transmission. The stage is repeated for each binary bit (or "bit") of the binarized symbol.
[0130] Context model selection A "context model" is a probabilistic model for one or more bits of a binary symbol. This model can be selected from available models based on statistics of recently encoded / decoded data symbols. The context model stores the probability that each bit is "1" or "0".
[0131] Arithmetic coding The arithmetic codec encodes each bit according to a chosen probability model. Note that each bit has only two subranges (corresponding to "0" and "1").
[0132] Probability Update Update the selected context model based on the actual encoding and decoding values (e.g., if the binary bit value is "1", increment the frequency count to "1").
[0133] In CABAC, further processing of each non-binary syntax element value depends on an associated encoding / decoding mode decision, which can be either a regular mode or a bypass mode. The bypass mode is chosen for bits that are assumed to be uniformly distributed, thus simply bypassing the entire regular binary arithmetic encoding (and decoding) process. In the regular encoding mode, each bit value is encoded using a regular binary arithmetic encoding / decoding engine, where the associated probabilistic model is either determined by a fixed choice based on the syntax element type and the bit position or bit index (binIdx) in the binary representation of the syntax element, or adaptively selected from two or more probabilistic models based on relevant auxiliary information (e.g., spatial neighbors, components, depth, or size of the CU / PU / TU, or position within the TU). The selection of the probabilistic model is called context modeling. As an important design decision, the latter case is typically applied only to the most frequently observed bits, while other, less frequently observed bits are processed using a joint (typically zero-order) probabilistic model. In this way, CABAC is able to perform selective adaptive probabilistic modeling at the sub-symbol level, thus providing an efficient tool for leveraging inter-symbol redundancy while significantly reducing overall modeling or learning costs. Note that, in principle, for both the fixed and adaptive cases, the switch from one probabilistic model to another can occur between any two consecutive bits of conventional encoding / decoding. In summary, the design of the context model in CABAC reflects the aim of finding a good trade-off between avoiding unnecessary modeling costs and making substantial use of statistical dependencies.
[0134] In CABAC, the parameters of the probabilistic models are adaptive, meaning that the adaptation of the model probability to statistical changes in the binary bit source is performed bit-by-bit in a backward adaptive and synchronous manner in the encoder and decoder; this process is called probability estimation. For this purpose, each probabilistic model in CABAC can take one of 126 distinct states, where the associated model probability value p ranges from [0:01875; 0:98125]. These two parameters for each probabilistic model are stored as 7-bit entries in the context memory: 6 bits are used for each of the 63 probabilistic states, representing the model probability pLPS of the minimum probability symbol (LPS); and 1 bit represents nMPS, the value of the maximum probability symbol (MPS).
[0135] In one or more examples, the described functionality can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted through a computer-readable medium and executed by a hardware-based processing unit. A computer-readable medium can include a computer-readable storage medium corresponding to a tangible medium such as a data storage medium, or a communication medium that includes any medium that facilitates, for example, transferring a computer program from one place to another according to a communication protocol. In this way, a computer-readable medium can generally correspond to (1) a non-transitory tangible computer-readable storage medium or (2) a communication medium such as a signal or carrier wave. A data storage medium can be any available medium that can be accessed by one or more computers or one or more processors to obtain instructions, code, and / or data structures for implementing the embodiments described in this application. A computer program product can include a computer-readable medium.
[0136] The terminology used in the description of embodiments herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of the claims. As used in the description of embodiments and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term “and / or” as used herein refers to and covers any and all possible combinations of one or more of the associated enumerated items. It will be further understood that when the terms “comprises” and / or “comprising” are used in this specification, they specify the presence of stated features, elements, and / or components, but do not exclude the presence or addition of one or more other features, elements, components, and / or groups thereof.
[0137] It should also be understood that although the terms first, second, etc., may be used herein to describe various elements, these elements should not be limited by these terms. These terms are merely used to distinguish one element from another. For example, without departing from the scope of the embodiments, a first electrode may be referred to as a second electrode, and similarly, a second electrode may be referred to as a first electrode. Both the first electrode and the second electrode are electrodes, but the first electrode and the second electrode are not the same electrode.
[0138] The description of this application has been presented for purposes of illustration and description, and is not intended to be exhaustive or to limit the invention to the form disclosed. Many modifications, variations, and alternative embodiments will be apparent to those skilled in the art from the teachings presented in the foregoing description and the associated drawings. Embodiments were chosen and described in order to best explain the principles of the invention, its practical application, and to enable others skilled in the art to understand the various embodiments of the invention and to best utilize the basic principles and various embodiments with modifications suitable for the intended particular use. Therefore, it should be understood that the scope of the claims should not be limited to the specific examples of the disclosed embodiments, and that modifications and other embodiments are intended to be included within the scope of the appended claims.
Claims
1. A video encoding method, comprising: Determine one or more syntax elements corresponding to the encoding unit; The Rice parameter is determined based on one or more of the syntax elements; The first codeword is determined based on the parameters of the samples within the coding unit, according to a predefined mapping relationship generated using the determined Rice parameters. The second codeword is determined based on the sign value used for the parameters; as well as The first codeword, the second codeword, and the one or more syntax elements are encoded into a bitstream.
2. The method of claim 1, wherein, Determining a parameter value based on the one or more syntax elements, wherein determining the Rice parameter based on the one or more syntax elements includes: The parameter value is compared to a set of thresholds, each of which has a candidate Rice parameter; Determine a pair of thresholds covering the parameter values from the set of thresholds; and The Rice parameter is determined as one of two candidate Rice parameters corresponding to the pair of thresholds.
3. The method of claim 2, wherein, The threshold set and its associated candidate Rice parameter are constant values.
4. The method of claim 2, wherein, The set of thresholds and their associated candidate Rice parameters are variables carried in one or more syntax elements.
5. The method of claim 1, wherein, One of the one or more syntax elements is the Rice parameter.
6. The method of claim 1, wherein, The one or more syntax elements include a first subset of syntax elements associated with a first component of the coding unit and a second subset of syntax elements associated with a second component of the coding unit.
7. The method of claim 6, wherein, There is at least one difference between the first subset of syntax elements and the second subset of syntax elements.
8. The method of claim 1, wherein, One or more syntax elements are transmitted by signaling at a level of a group consisting of the following: sequence, picture, strip, tile, coding tree unit (CTU), coding unit (CU), transform unit (TU), and transform block (TB).
9. The method of claim 1, wherein, The first codeword is associated with the encoding and decoding of the transform coefficients of the sample points in the encoding unit.
10. The method of claim 1, wherein, The first codeword is associated with the encoding and decoding of the transform skip residual of the sample point in the encoding unit.
11. The method of claim 1, wherein, Determining the Rice parameter based on one or more syntax elements includes: searching for the Rice parameter in a lookup table.
12. The method of claim 1, further comprising generating the predefined mapping relationship by: Use the determined Rice parameters to calculate the binarization parameters; The binarization parameters are used to determine the prefix value and the corresponding optional suffix value of the codeword for one of the candidate residual values in a set of candidate residual values; and Repeat the codeword determination steps for a different candidate residual value in the group of candidate residual values until the last candidate residual value in the group of candidate residual values is determined.
13. The method of claim 12, wherein, The prefix value of the codeword is determined using the truncated Rice binarization process.
14. The method of claim 12, wherein, The suffix value of the codeword is determined when the prefix value is equal to a bit string, wherein the bit string has a length of 6 and all bits are equal to 1.
15. The method of claim 1, wherein, The coding unit is a transform skip mode coding unit, and the method further includes: The first group of codewords of the samples in the transform skip mode coding unit is encoded into the bit stream.
16. The method of claim 1, wherein, Determining the Rice parameter based on the one or more syntax elements includes setting the Rice parameter to a constant value for the transformation unit based on the one or more syntax elements in the bitstream.
17. The method of claim 1, wherein, Determining the Rice parameter based on the one or more syntax elements includes: determining the Rice parameter solely based on the one or more syntax elements transmitted in the bitstream.
18. The method of claim 1, wherein, Determining the Rice parameter based on the one or more syntax elements includes: determining the Rice parameter based on whether the residual of the coding unit is in the transform skip mode.
19. The method of claim 18, wherein, Determining the Rice parameter based on whether the residual of the coding unit is in the transform skip mode includes: setting the Rice parameter to a constant value for the transform unit based on determining that the residual of the coding unit is in the transform skip mode.
20. The method of claim 1, wherein, The value of the encoded bit depth is 11.
21. The method of claim 1, wherein, The value of the encoded bit depth is 12.
22. A video decoding method, comprising: Receive one or more syntax elements and video data corresponding to the coding unit from the bitstream; The Rice parameter is determined based on one or more of the syntax elements; Decode the first and second codewords of the samples within the encoding unit from the video data; The parameters for converting the first codeword into the sample point are based on a predefined mapping relationship generated using the determined Rice parameters. Convert the second codeword into a symbolic value for the parameter; The residual sample point value of the sample point is determined based on the parameters and the sign value; as well as The reconstructed sample point value of the sample point is determined based on the residual sample point value.
23. The method of claim 22, wherein, A parameter value is determined based on the one or more syntax elements, and Determining the Rice parameter based on the one or more syntax elements includes: The parameter value is compared to a set of thresholds, each of which has a candidate Rice parameter; Determine a pair of thresholds covering the parameter values from the set of thresholds; and The Rice parameter is determined as one of two candidate Rice parameters corresponding to the pair of thresholds.
24. The method of claim 23, wherein, The threshold set and its associated candidate Rice parameter are constant values.
25. The method of claim 23, wherein, The set of thresholds and their associated candidate Rice parameters are variables carried in one or more syntax elements.
26. The method of claim 22, wherein, One of the one or more syntax elements is the Rice parameter.
27. The method of claim 22, wherein, The one or more syntax elements include a first subset of syntax elements associated with a first component of the coding unit and a second subset of syntax elements associated with a second component of the coding unit.
28. The method of claim 27, wherein, There is at least one difference between the first subset of syntax elements and the second subset of syntax elements.
29. The method of claim 22, wherein, The one or more syntax elements are transmitted by signaling at a level of a group consisting of the following: sequence, picture, strip, tile, coding tree unit (CTU), coding unit (CU), transform unit (TU), and transform block (TB).
30. The method of claim 22, wherein, The first codeword is associated with the encoding and decoding of the transform coefficients of the sample points in the encoding unit.
31. The method of claim 22, wherein, The first codeword is associated with the encoding and decoding of the transform skip residual of the sample point in the encoding unit.
32. The method of claim 22, wherein, Determining the Rice parameter based on one or more of the syntax elements includes: Look up the Rice parameter in the lookup table.
33. The method of claim 22, further comprising generating the predefined mapping relationship by: Use the determined Rice parameters to calculate the binarization parameters; The binarization parameters are used to determine the prefix value and the corresponding optional suffix value of the codeword for one of the candidate residual values in a set of candidate residual values; and Repeat the codeword determination steps for a different candidate residual value in the group of candidate residual values until the last candidate residual value in the group of candidate residual values is determined.
34. The method of claim 33, wherein, The prefix value of the codeword is determined using the truncated Rice binarization process.
35. The method of claim 33, wherein, The suffix value of the codeword is determined when the prefix value is equal to a bit string, wherein the bit string has a length of 6 and all bits are equal to 1.
36. The method of claim 22, wherein, The coding unit is a transform skip mode coding unit, and the method further includes: Decode the first group of codewords for the samples within the transform skip mode coding unit from the video data; Obtain the initial level value from the first set of codewords; and The quantization transformation coefficients of the sample points are obtained from the parameters, the sign value, and the initial level value.
37. The method of claim 22, wherein, Determining the Rice parameter based on one or more of the syntax elements includes: Based on one or more syntax elements in the bitstream, the Rice parameter is set to a constant value for the transformation unit.
38. The method of claim 22, wherein, Determining the Rice parameter based on one or more of the syntax elements includes: The Rice parameter is determined solely based on the one or more syntax elements transmitted in the bitstream.
39. The method of claim 22, wherein, Determining the Rice parameter based on one or more of the syntax elements includes: The Rice parameter is determined based on whether the residual of the encoding unit is in transform skip mode.
40. The method of claim 39, wherein, Determining the Rice parameter based on whether the residual of the coding unit is in the transform skip mode includes: setting the Rice parameter to a constant value for the transform unit based on determining that the residual of the coding unit is in the transform skip mode.
41. The method of claim 22, wherein, The value of the encoded bit depth is 11.
42. The method of claim 22, wherein, The value of the encoded bit depth is 12.
43. An electronic device comprising: One or more processing units; A memory coupled to the one or more processing units; as well as A plurality of programs stored in the memory, which, when executed by the one or more processing units, cause the electronic device to perform the method as described in any one of claims 1 to 42.
44. A computer-readable storage medium storing instructions that, when executed by a computing device having one or more processors, cause the one or more processors to perform the method as described in any one of claims 1 to 42.
45. A computer-readable storage medium storing a bit stream and instructions, wherein the instructions, when executed by a computing device having one or more processors, cause the one or more processors to perform a video encoding method as described in any one of claims 1 to 19 to generate the bit stream.
46. The computer-readable storage medium of claim 45, wherein, The value of the coded bit depth is equal to 11.
47. The computer-readable storage medium of claim 45, wherein, The value of the coded bit depth is equal to 12.
48. A method for storing a bitstream, comprising: performing a video encoding method as claimed in any of claims 1 to 19 to generate a bitstream; and storing the bitstream.
49. The method of claim 48, wherein, The value of the coded bit depth is equal to 11.
50. The method of claim 48, wherein, The value of the coded bit depth is equal to 12.
51. A computer program product comprising instructions, wherein the instructions, when executed by a computing device, cause the computing device to perform a method as claimed in any of claims 1 to 42.